Okay you have an array of concentric rectangles: each concentric rectangle has a type:
{
outer: {
width,
height,
},
inner: {
width,
height,
// This code was generated with the help of OpenAI's ChatGPT-4. | |
import * as FS from 'fs/promises'; | |
import * as Path from 'path'; | |
import {fileURLToPath, pathToFileURL} from 'url'; | |
async function resolvePackageImports(basePath, specifier, conditions) { | |
const pkgJson = JSON.parse(await FS.readFile(fileURLToPath(basePath) + '/package.json')); | |
const imports = pkgJson.imports; | |
if (typeof imports === 'object' && !Array.isArray(imports)) { |
Okay you have an array of concentric rectangles: each concentric rectangle has a type:
{
outer: {
width,
height,
},
inner: {
width,
height,
import Signal | |
import Time exposing (Time) | |
import Keyboard | |
import Window | |
import Text | |
import Color | |
import Graphics.Collage exposing (Shape, circle, rect, collage, filled, move, toForm) | |
import Graphics.Element exposing (Element, container, show) | |
-- MODEL |
set @now = now(); | |
set @six_months_ago = date_sub(now(), interval 6 month); | |
set @three_months_ago = date_sub(now(), interval 3 month); | |
create temporary table if not exists `marketing_contact` ( | |
id int(11) unique, | |
first_name varchar(100), | |
email varchar(100), | |
index `marketing_contact_id` (id) | |
) as ( |
function getLink(id) { | |
var links = $('.zoomer-cover a') | |
.map(function() { return $(this).attr('href'); }) | |
.filter(function() { return this.indexOf(id) > -1; }); | |
return links[0]; | |
} | |
function extractRowData(row) { | |
var id = $(row).data('content-id'); | |
var link = getLink(id); |
def merge(chunk1, chunk2): | |
if len(chunk1) == 0: | |
return chunk2 | |
elif len(chunk2) == 0: | |
return chunk1 | |
else: | |
c1 = chunk1[0] | |
c2 = chunk2[0] | |
if c1 < c2: | |
return [c1] + merge(chunk1[1:], chunk2) |
(ns sudoku.core) | |
(def empty-board (vec (repeat 9 (vec (repeat 9 0))))) | |
(def four-by-four | |
[[0 1 3 2] | |
[2 3 1 0] | |
[1 0 2 3] | |
[3 2 0 1]]) | |
(def solved-board |
(ns boggle.core | |
(:require [clojure.java.io :as io] | |
[clojure.string :as st])) | |
(defprotocol ITrie | |
(next? [this letter]) | |
(insert [this word]) | |
(subtree [this letter]) | |
(terminal? [this])) |
var LikeButton = React.defineClass(LikeButton, withAnimation); //withAnimation is a mixin | |
//The LikeButton function is called on the React component prototype. | |
function LikeButton() { | |
//initialstate would be a method that is already mixed into the component. | |
this.initialState({ | |
liked: false | |
}); | |
this.defaultProps({ |