sudo mkdir -p /tmp/rootfs
sudo mkdir -p /tmp/container
# Mount root filesystem in read-only mode
sudo mount --bind -o readonly /tmp/rootfs /tmp/container
# Mount the proc filesystem
#include <stdio.h> | |
int main() { | |
int year, nearestLeap; | |
printf("Enter a year: "); | |
scanf("%d", &year); | |
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) { | |
printf("%d is a leap year.\n", year); |
{ | |
"editor.scrollBeyondLastLine": true, | |
"editor.tabSize": 4, | |
"files.autoSaveDelay": 1000, | |
"editor.smoothScrolling": true, | |
"workbench.startupEditor": "none", | |
"files.autoSave": "afterDelay", | |
"editor.renderWhitespace": "none", | |
"editor.cursorStyle": "line-thin", | |
"editor.fontSize": 12, |
<svg viewBox="110 0 190 280" width="100%" > | |
<circle id="sun-outer" cx="210.244" cy="97.409" r="70"></circle> | |
<circle id="sun-inner" cx="210.244" cy="97.409" r="55"></circle> | |
<circle id="sun" cx="210.244" cy="97.409" r="40"></circle> | |
<path | |
d="M 211.278 120.999 C 205.66 122.333 201.013 123.476 200.952 123.541 C 200.819 123.681 197.736 157.278 197.742 158.534 C 197.742 159.014 198.062 159.409 198.452 159.409 C 198.842 159.409 201.712 160.219 204.828 161.206 C 212.998 163.796 221.226 163.319 226.701 159.936 C 227.258 159.591 222.266 119.079 221.614 118.656 C 221.548 118.611 216.897 119.666 211.278 121" | |
fill-rule="evenodd" style="fill: rgb(234, 242, 255);"></path> | |
<path fill="#fd765d" | |
d="M 205.796 72.534 C 204.638 73.154 203.23 74.39 202.668 75.284 L 201.426 76.689 L 209.712 76.909 C 219.087 77.275 218.667 76.899 215.412 73.816 C 212.617 71.168 209.204 70.713 205.796 72.534" | |
fill-rule="evenodd"></path> |
import { useState, useEffect, useRef } from "react"; | |
const LazyImage = ({ src, alt, className }) => { | |
const [isVisible, setIsVisible] = useState(false); | |
const imgRef = useRef(null); | |
useEffect(() => { | |
const observer = new IntersectionObserver( | |
([entry]) => { | |
if (entry.isIntersecting) { |
package main | |
import ( | |
"math" | |
"fmt" | |
) | |
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
//::: ::: | |
//::: This routine calculates the distance between two points (given the ::: |
A running example of the code from:
- http://marcio.io/2015/07/handling-1-million-requests-per-minute-with-golang
- http://nesv.github.io/golang/2014/02/25/worker-queues-in-go.html
This gist creates a working example from blog post, and a alternate example using simple worker pool.
TLDR: if you want simple and controlled concurrency use a worker pool.
Once upon a time…
I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).
I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).
It seems inevitable to throw Domain Driven Design (DDD) in to the mix.