所得税額 = (所得金額(A) - 所得控除額(B)) × 税率 - 税額控除額(C)
- 「所得金額(A)- 所得控除額(B)」は 課税所得金額 といい、1,000円未満の端数を切り捨てる。
| /** | |
| * The -Webkit-scrollbar challenge | |
| * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
| * Make the first div’s scrollbar like the second’s | |
| * without changing the styling of the div (i.e. you | |
| * can only change the ::-webkit-scrollbar-* rules | |
| * * * * * * * * * * * * * * * * * * * * * * * * * * * * | |
| * It doesn't matter if the second div doesn't look the same | |
| * after your changes, it's only there to show you how the |
| #! /your/favourite/path/to/ruby | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) 2013 Urabe, Shyouhei | |
| # | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| class GF256(object): | |
| """ GF(256), defined as GF(2)[x]/(x^8 + x^4 + x^3 + x + 1). | |
| """ | |
| def __init__(self, byteval): | |
| byteval = int(byteval) |
| /* | |
| This script is meant to be used with a Google Sheets spreadsheet. When you edit a cell containing a | |
| valid CSS hexadecimal colour code (like #000 or #000000), the background colour will be changed to | |
| that colour and the font colour will be changed to the inverse colour for readability. | |
| To use this script in a Google Sheets spreadsheet: | |
| 1. go to Tools » Script Editor » Spreadsheet; | |
| 2. erase everything in the text editor; | |
| 3. change the title to "Set colour preview on edit"; |
| #1a1a1a,#444444,#8397a9,#39444d,#303030,#a8a8a8,#a3a46f,#af7070 |
| CREATE TEMP FUNCTION parseMessage(messageB64 BYTES) | |
| RETURNS STRING | |
| LANGUAGE js AS """ | |
| const toSextet = (ch) => { | |
| if (0x41 <= ch && ch < 0x41 + 26) { | |
| return ch - 0x41; | |
| } else if (0x61 <= ch && ch < 0x71 + 26) { | |
| return ch - (0x61 - 26); | |
| } else if (0x30 <= ch && ch < 0x30 + 10) { | |
| return ch + (52 - 0x30); |