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
/* ヒュベニの公式より世界測地系1984(WGS84)での二点間距離を算出します */ | |
/* http://yamadarake.jp/trdi/report000001.htmlを基に作成 */ | |
function calc_len(lat1,lon1,lat2,lon2){ | |
// 角度をラジアンに | |
lat1 = lat1/180*Math.PI; | |
lat2 = lat2/180*Math.PI; | |
lon1 = lon1/180*Math.PI; | |
lon2 = lon2/180*Math.PI; | |
// 長半径(赤道半径) |
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
(?:[吃唖妾跛躄]|(?:健全なる精神は健全なる身体に宿|(?:娘を片付|股に掛)け|将棋倒しにな|群盲象をなで|本腰を入れ|灸を据え|ずらか|婿をと|嫁にや|発狂す)る|(?:[屑床魚]|汲み取り|ゴミ|バタ|代書|八百|周旋|担ぎ|蛸部)屋|イ(?:ン(?:ディアン嘘つ | |
かない|チキ)|カサマ|タ公|モ)|盲(?:[人目縞]|蛇に怖じず|判を押す|愛する|滅法)?|馬(?:[丁喰]|鹿(?:でもチョンでも|チョンカメラ))|(?:[坑漁農鉱]|(?:線路)?工|潜水|雑役)夫|(?:(?:越後の米|まえ)つ|ぽん引|釣り書)き|エ(?:(?:スキモ|ディタ)ー|チ | |
ゼンクラゲ)|ジ(?:(?:プシ|ュ)ー|ャ(?:ップ|リ))|チ(?:ャ(?:リンコ|ンコロ)|ョン|ビ)|女(?:[中傑工給]|の腐ったような|子供)|ブ(?:[スツ]|ラインドタッチ|タ箱)|狂(?:[う人女]|気(?:の沙汰)?)|(?:ダッチマ|ルンペ|ザギ|ナオ)ン|(?:皮[切被]|千摺|地 | |
回|首切)り|サ(?:ラ(?:ブレッド|金)|ツ)|精(?:神(?:分裂病|異常)|薄)|(?:[外芸非鮮]|半島|紅毛)人|(?:いちゃも|あらめ|運ちゃ)ん|(?:引かれ|労務|町医|障害)者|土(?:[人工方]|左衛門|建屋)|支那(?:[人竹]|料理|蕎麦)?|未(?:開(?:発国|人)|亡人)|落(?:ちこぼれ|とし前|人部落)|(?:すけこま|ほんぼ|犬殺)し|ア(?:イヌ系|メ公|ル中|カ)|ス(?:チュワーデス|ラム|ケ)|ポ(?:ッポー屋|コペン|リ公)|三(?:韓征伐|つ口|国人|助)|片(?:[目端肺親足]|手落ち)|(?:合いの|魔女っ|連れ)子|南(?:部の鮭の鼻まが>り|鮮)|が(?:っぷり四つ|ちゃ目)|ニ(?:コヨン|ガー|グロ)|パ(?:ーマ屋|クる|ン助)|ヤ(?:ンキー|バい|ー様)|不(?:可触民|治の病|具)|日(?:本のチベット|雇い)|気違い(?:に刃物|沙汰)?|特殊(?:学[校級]|部落)|か(?:さっかき|ったい)|オ(?:ールドミス|カマ)|タ(?:ケノコ医者|タキ)|(?:やさぐ|知恵遅)れ|(?:伊勢|河原)?乞食|ど(?:さ回り|ん百姓)|ゲ(?:ンナマ|ーセン)|人(?:[夫足]|非人)|低(?:脳児?|開発国)|小(?:[人僧]|使い)|(?:しらっ|うん)こ|(?:富山の三|露) |
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
with recursive | |
limitxy AS (SELECT * FROM (VALUES(20, 20)) AS t (x,y)), | |
formula(n, x, y, c) AS ( | |
VALUES(0, 0, 0, '') | |
UNION ALL | |
SELECT n+1, | |
(SELECT x FROM (SELECT n % (SELECT x FROM limitxy) AS x, n / (SELECT x FROM limitxy) AS y) AS xy), | |
(SELECT y FROM (SELECT n % (SELECT x FROM limitxy) AS x, n / (SELECT x FROM limitxy) AS y) AS xy), | |
CASE WHEN ( | |
SELECT (abs(point.x * point.x + point.y * point.y - 80) < 8) -- 条件式 |
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
with recursive | |
limitxy AS (SELECT * FROM (VALUES(20, 20)) AS t (x,y)), | |
formula(n, x, y, c) AS ( | |
VALUES(0, 0, 0, '') | |
UNION ALL | |
SELECT n+1, | |
(SELECT x FROM (SELECT n % (SELECT x FROM limitxy) AS x, n / (SELECT x FROM limitxy) AS y) AS xy), | |
(SELECT y FROM (SELECT n % (SELECT x FROM limitxy) AS x, n / (SELECT x FROM limitxy) AS y) AS xy), |
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
with recursive | |
limitxy AS (SELECT * FROM (VALUES(20, 20)) AS t (x,y)), | |
formula(n, x, y, c) AS ( | |
VALUES(0, 0, 0, '') | |
UNION ALL | |
SELECT n+1, | |
(SELECT x FROM (SELECT n % (SELECT x FROM limitxy) AS x, n / (SELECT x FROM limitxy) AS y) AS xy), | |
(SELECT y FROM (SELECT n % (SELECT x FROM limitxy) AS x, n / (SELECT x FROM limitxy) AS y) AS xy), | |
CASE WHEN ( | |
SELECT ( |
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
SELECT n | |
FROM tbl | |
ORDER BY n |
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
SELECT n | |
FROM tbl | |
ORDER BY n |
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
SELECT | |
SUM(n) AS sum, | |
MAX(n) AS max, | |
MIN(n) AS min | |
FROM tbl |
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
SELECT n, | |
CASE | |
WHEN n % 15 = 0 THEN 'FizzBuzz' | |
WHEN n % 3 = 0 THEN 'Fizz' | |
WHEN n % 5 = 0 THEN 'Buzz' | |
ELSE CAST(n AS text) | |
END AS f | |
FROM | |
GENERATE_SERIES( | |
(SELECT a FROM tbl), |
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
SELECT i, TRANSLATE(str, | |
'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', | |
'nopqrstuvwxyzabcdefghijklmNOPQRSTUVWXYZABCDEFGHIJKLM' | |
) AS converted_str | |
FROM tbl; |
OlderNewer