This file contains hidden or 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 traversed (id, name, path, `left`, `right`) AS ( | |
SELECT id, | |
name, | |
CAST(JSON_ARRAY(id) AS JSON), | |
`left`, | |
`right` | |
FROM binary_tree | |
WHERE id = 1 | |
UNION | |
SELECT b.id, |
This file contains hidden or 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 fizz_buzz (sequence, modulo_3, modulo_5) AS ( | |
SELECT 1, CAST('' AS CHAR(4)), CAST('' AS CHAR(5)) | |
UNION ALL | |
SELECT sequence + 1, | |
IF(MOD(sequence + 1, 3) = 0, 'Fizz', ''), | |
IF(MOD(sequence + 1, 5) = 0, 'Buzz', '') | |
FROM fizz_buzz | |
WHERE sequence < 100 | |
) |
This file contains hidden or 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
#! /usr/bin/env python3 | |
import string | |
import sys | |
import re | |
from PyQt5.QtCore import QByteArray, QUrl | |
from PyQt5.QtGui import QFont, QTextDocument | |
from PyQt5.QtNetwork import QNetworkAccessManager, QNetworkRequest | |
from PyQt5.QtWidgets import * |
This file contains hidden or 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
Highcharts.chart('container', { | |
chart: { | |
type: 'column' | |
}, | |
title: { | |
text: 'Monthly Average Rainfall' | |
}, | |
subtitle: { | |
text: 'Source: WorldClimate.com' | |
}, |
This file contains hidden or 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 () { | |
Highcharts.chart('container', { | |
chart: { | |
type: 'bar' | |
}, | |
title: { | |
text: 'Events by Monitoring Server' | |
}, | |
subtitle: { | |
text: 'January 2017' |
This file contains hidden or 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
(ns patterns.decorator.core | |
(:require [clojure.data.json :as json] | |
[clojure.string :as str] | |
[patterns.util :refer [to-xml]])) | |
;; Record impl | |
(defprotocol IRenderable | |
(render [this])) | |
(defrecord WebService [data] |