- Open a new spreadsheet, on the menu tab, choose Tools > Script editor
-
Now you can write your own function in javascript
- This is a simple function that wraps HTML input tags
- Now, you can use it in your spreadsheet
Notebook 2013 - 2021. Notebook 2021 - Current: sntpham.github.io
/**
* Generate a string for input tag.
*
* @param {"text"} type - type can be checkbox, text,....
* @param {"region"} name - name is required for php form.
* @param {"parent_form"} id - .
* @param {"table01"} clas - .
* @param {"country-of-birth"} placeholder - .
* @return the tring wraped with input tags.
* @customfunction
*/
function htmlInput(type,name,id,clas,placeholder){
var outputString = '<input type=';
var qm = '\"';//qm: quotation mark
var space = ' ';
outputString = outputString.concat(qm,type,qm,space);
if(name){
outputString = outputString.concat('name=',qm,name,qm,space);
}
if (id) {
outputString = outputString.concat('id=',qm,id,qm,space);
}
if (clas) {
outputString = outputString.concat('class=',qm,clas,qm,space);
}
if (placeholder) {
outputString = outputString.concat('id=',qm,placeholder,qm,space);
}
outputString = outputString.concat('>')
return (outputString);
}
Documentation style using JSDoc
If you can keep your head when all about you
Are losing theirs and
blaming it on you,
If you can trust yourself when all men doubt you,
But make allowance for
their doubting too;
If you can wait and not be tired by waiting,
Or being lied about, don’t
deal in lies,
Or being hated, don’t give way to hating,
And yet don’t look too
good, nor talk too wise:
If you can dream—and not make dreams your master;
If you can think—and not
make thoughts your aim;
If you can meet with Triumph and Disaster
And treat those two
impostors just the same;
If you can bear to hear the truth you’ve spoken
Twisted by knaves to make a
trap for fools,
Or watch the things you gave your life to, broken,
And stoop and build ’em up
with worn-out tools:
If you can make one heap of all your winnings
And risk it on one turn of
pitch-and-toss,
And lose, and start again at your beginnings
And never breathe a word
about your loss;
If you can force your heart and nerve and sinew
To serve your turn long
after they are gone,
And so hold on when there is nothing in you
Except the Will which says
to them: ‘Hold on!’
If you can talk with crowds and keep your virtue,
Or walk with Kings—nor lose the common
touch,
If neither foes nor loving friends can hurt you,
If all men count with you,
but none too much;
If you can fill the unforgiving minute
With sixty seconds’ worth
of distance run,
Yours is the Earth and everything that’s in it,
And—which is more—you’ll be
a Man, my son!
|
Nếu con có thể ngẩn cao đầu
khi mọi người
Rối trí và đỗ lỗi cho con,
Nếu con tin vào bản thân dù tất cả nghi ngờ,
Nhưng chấp nhận những điều nghi kị đó;
Nếu con chờ và không hề mỏi
mệt,
Hoặc bị lừa dối, nhưng không đáp trả,
Hay bị ghét bỏ, nhưng không
để câm ghét cản trở,
Và đừng tỏ ra quá tốt, hoặc nói lời khôn
ngoan:
Nếu con có thể mơ—và không để
giấc mơ làm chủ;
Nếu con có thể nghĩ—và không để suy nghĩ
làm mục tiêu của mình;
Nếu con gặp Thành Công, và
Thất Bại
Và đối xử 2 kẻ mạo danh đó như nhau;
Nếu con dám nghe lời nói của
mình
Bị thay đổi bởi những kẻ gian manh để bẫy
những tên dại khờ,
Hoặc nhìn những thứ con xây
nên, sụp đổ,
Và con đứng lên, gầy dựng lại với những
thứ đã mòn:
Nếu con có thể đặt cược những
thứ con có
Thử trong một ván cờ
Và thất bại, phải bắt đầu lại
từ đầu
Và không nói một lời về những mất mát;
Nếu con có thể bắt con tim,
lý trí và cơ bắp
Làm việc sau khi đã rã rời,
Và vững tin khi không còn gì
trong con
Trừ Ý Chí thúc giục: “Hãy cố lên!”
Nếu con có thể nói với đám đông
nhưng giữ phẩm giá,
Hoặc đi với nhà vua—và không mất đi sự chan
hòa,
Nếu kẻ thù và bạn tốt không
thể làm đau con,
Nếu mọi người dựa vào con, nhưng con không
dựa vào họ quá nhiều;
Nếu con có thể tận dùng từng
phút không khoan nhượng
Với 60 giây đáng giá,
Thế giới này, và mọi thứ trong
đó là của con,
Và—điều quan trọng hơn—Con là đàn ông,
con trai!
|
else{for (i = 0; i < input; i++){digitalWrite(led[i], HIGH);delay(4);}for (i = i; i < 11; i++){digitalWrite(led[i], LOW);}}
The range is improved significantly after the antennas are inserted |
@echo off
setlocal
set username=olaf
REM create new user
net user %username% /add
net user
pause
Result:
Administrator DefaultAccount Guest xxx olaf xxx
sc config %service name% start=autoEx (remember to change %service name% to service name you want to enable):
net start %service name%
sc config RemoteRegistry start=auto
net start RemoteRegistry
sc query type=service state=all | findstr /i “remote”
/i: case insensitive
reg add “%directory%” /v %value% /t %type_of_value% /d %data%
You can read more here
/t:
REG_BINARY // Free form binary
REG_DWORD // 32-bit number
REG_DWORD_LITTLE_ENDIAN // 32-bit number (same as REG_DWORD)
REG_DWORD_BIG_ENDIAN // 32-bit number
REG_LINK // Symbolic Link (unicode)
REG_MULTI_SZ // Multiple Unicode strings
REG_RESOURCE_LIST // Resource list in the resource map
REG_FULL_RESOURCE_DESCRIPTOR // Resource list in the hardware description
REG_QWORD // 64-bit number
shutdown /m %name_of_the_network_machine% /s /f
/s: shutdown
/f: forced shutdown
reg add “\%computer_name%”\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\SpecialAccounts\UserList" /v %user_name_to_be_hidden% /t REG_DWORD /d 00000000
reg add “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System” /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 00000001
net user %your user name% /add
net localgroup administrators %username% /add
net user username /delete
net use %username% %password%
net use \name_of_computer_in_nw
net accounts /maxpwage:%duration%
https://github.com/tripflex/MOD-t You can find both software and firmware at the link above
I'll use the newest one because the developer said that it will improve the printer speed
https://github.com/tripflex/MOD-t/raw/master/firmware/1.0.0/firmware.dfu
We also need to download flashing tool: https://github.com/tripflex/MOD-t/blob/master/firmware/dfu-util.exe And put that in C:/ directory
if you use Windows, you might need to install libusb-win32 here: https://sourceforge.net/projects/libusb-win32/after installing the software, click Install a Device Filter and Choose MOD-t
Run the enter_dfu.py script (it can be found in tripflex repo)
press: Window + R > type cmd
type: cd C:/
type: dfu-util.exe -d 2b75:0003 -a 0 -s 0x0:leave -D firmware_modt_override.dfu
Done!
You can try your first print now.