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 onEdit() { | |
var s = SpreadsheetApp.getActiveSheet(); | |
if( s.getName() == "Sheet1" ) { // Thay tên sheet tương ứng | |
var r = s.getActiveCell(); | |
if( r.getColumn() == 1 ) { // kiểm tra cột đang nhập dữ liệu phải cột thứ 1 hay không | |
var nextCell = r.offset(0, 1); // dùng offset để ghi thời gian sang cột bên phải | |
if( nextCell.getValue() === '' ) // kiểm tra xem ô kế tiếp có rỗng không | |
nextCell.setValue(new Date()); | |
} | |
} |
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
/** | |
* Unpivots the given data | |
* More: https://stackoverflow.com/questions/24954722/how-do-you-create-a-reverse-pivot-in-google-sheets | |
* | |
* @return Unpivoted data from array | |
* @param {object[][]} arr 2D Input Array | |
* @param {object[][]=} headers [optional] Custom headers for output | |
* @customfunction | |
*/ | |
function unpivot(arr, headers) { |
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
# Python List | |
fruits = ["tao", "chuoi", "cam", "mit", "dua hau", "kiwi", "ca chua"] | |
# print(type(fruits)) | |
# Access item in list, access first item by index, start from 0 | |
# print(fruits[0]) | |
# print(fruits[1]) | |
# print(fruits[2]) | |
# print(fruits[len(fruits)-1]) |
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
/*====================================================================================================================================* | |
ImportJSON by Brad Jasper and Trevor Lohrbeer | |
==================================================================================================================================== | |
Version: 1.5.0 | |
Project Page: https://github.com/bradjasper/ImportJSON | |
Copyright: (c) 2017-2019 by Brad Jasper | |
(c) 2012-2017 by Trevor Lohrbeer | |
License: GNU General Public License, version 3 (GPL-3.0) | |
http://www.opensource.org/licenses/gpl-3.0.html | |
------------------------------------------------------------------------------------------------------------------------------------ |
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
/** | |
* Imports JSON data to your spreadsheet Ex: IMPORTJSON("http://myapisite.com","city/population") | |
* @param url URL of your JSON data as string | |
* @param xpath simplified xpath as string | |
* @customfunction | |
*/ | |
function IMPORTJSON(url,xpath){ | |
try{ | |
// /rates/EUR |
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
Thiết lập: | |
A1=2020 | |
AN1="SUN" hoặc "MON" | |
Tác giả: T.D.Nguyen | |
Rút gọn: N.D.Thanh | |
=ArrayFormula({ | |
{"\/";TEXT(DATE(A1,ROW(1:12),1),"mmmm")} | |
,{ | |
UPPER(TEXT("1/1/2018"+COLUMN($A$1:$AP$1)-(1+(AN1=TEXT(DATE(2017,1,1),"ddd"))),"DDD")); |
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
Option Explicit | |
Private Sub TextBox1_Change() | |
Dim rng As Range | |
Dim q As String | |
q = LCase(TextBox1.Text) | |
Dim c As Long | |
Set rng = Range("rngDaten") | |
Dim strToSearch As String, i As Long | |
Dim lRow As Long, lCol As Long | |
With Me.ListView1 |
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
import { StyleSheet, Button } from 'react-native'; | |
import React, { Component } from 'react'; | |
import { Platform, View, Text } from 'react-native'; | |
import { BleManager } from 'react-native-ble-plx'; | |
export default class ComponentsScreen extends Component { | |
constructor() { | |
super() | |
this.manager = new BleManager(); |
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
Source: https://blog.hocexcel.online/doc-thanh-chu-bang-ham-trong-excel-bao-gom-tieng-anh-tieng-viet.html?hocexcelonline | |
copy only formula below and enter number in cell A2 | |
=TRIM(IF(OR(LEN(FLOOR(A2,1))=13,FLOOR(A2,1)<=0),"Out of range",PROPER(SUBSTITUTE(CONCATENATE( | |
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),1,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "), | |
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),2,1)+1,"", | |
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),3,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),IF(VALUE(MID(TEXT(INT(A2),REPT(0,12)),2,1))>1, | |
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),3,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),IF(VALUE(MID(TEXT(INT(A2),REPT(0,12)),2,1))=0, | |
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),3,1)+1,"","one","two","three","four","five","six","se |
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 myFunction() { | |
var x = 'Hello'; // Kiểu string | |
var z = 23; // Kiểu số, kiểu Number | |
var y = true; // Kiểu boolean | |
var array = ['Hello', 'World', 23, 4, false]; | |
array[0] // 'Hello' | |
var obj = { 'firstName': 'Thanh', 'lastName': 'Nguyen' } |