Skip to content

Instantly share code, notes, and snippets.

View 07_lists.py
# 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])
View ImportJsonAdvanced.gs
/*====================================================================================================================================*
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
------------------------------------------------------------------------------------------------------------------------------------
View ImportJsonFunction.gs
/**
* 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
View one_formula_calendar_short.txt
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"));
View listview_extended.bas
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
View ComponentsScreen.js
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();
View English_num_to_word
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
View GAS01.js
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' }
View example-for-editor.html
<p>Đây là một đoạn văn bình thường dành cho việc dẫn dắt</p>
<pre>Đây là một đoạn văn bình thường dành cho việc dẫn dắt</pre>
<blockquote>=SUM(A1:A10)</blockquote>
<pre style="background: rgb(0, 31, 63); color: white;"><p>=SUM(A1:A10)</p></pre>
<pre style="background: rgb(40, 41, 35); color: rgb(103, 216, 239);"><p><strong style="color: rgb(103, 216, 239);">=SUM(A1:A10)</strong></p></pre>
View heo-addin-manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->