- Use HTML tags to define the table to get the best layout result
- Use either backticks (```) or the HTML
pre
element with attributelang
- Keep a blank line before and after a code block for correct formatting and syntax highlighting
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
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks. | |
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/) | |
(() => { | |
const SHOW_SIDES = false; // color sides of DOM nodes? | |
const COLOR_SURFACE = true; // color tops of DOM nodes? | |
const COLOR_RANDOM = false; // randomise color? | |
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com) | |
const MAX_ROTATION = 180; // set to 360 to rotate all the way round | |
const THICKNESS = 20; // thickness of layers | |
const DISTANCE = 10000; // ¯\\_(ツ)_/¯ |
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
using System; | |
using System.Diagnostics; | |
// Example C# program to make a VDU string for BBC Micro Bot | |
// @P_Malin | |
// Based on stuff from @rheolism and @Kweepa | |
namespace MakeData | |
{ | |
class Program |
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
<< MaTeX` | |
SetOptions[MaTeX, "Preamble" -> {"\\usepackage{color,txfonts}"}]; | |
SetDirectory[NotebookDirectory[]]; | |
Clear[drawLadder]; | |
drawLadder[n_, l_, m_, imsize_: 500] := Module[{maxrungs = 5, mag = 4}, | |
Graphics[{ | |
White, Opacity[1], Thickness[.02], Dashing[None], | |
Table[Line[{{0, k}, {1, k}}], {k, maxrungs}], (*draw n lines*) | |
by 0xabad1dea September 2018
You may notice a decidedly Nintendo bias to the examples. I can't change who I am.
Speedrunning is:
- Completing a video game
http://embedded-lab.com/blog/stm32-gpio-ports-insights/
http://hertaville.com/stm32f0-gpio-tutorial-part-1.html
The libmaple libraries, on which STM32duino is based, provides access to registers by the syntax:
GPIOA->regs->REG
I've recently been setting up multiple remote agents for Bamboo on the same machine to run as Windows service instances. Although there's information out there as to how this is achieved, I thought I'd document all the steps here for future reference.
Assumptions are that you have:
- Installed Bamboo on a server somewhere;
- Have another machine that you want to install remote agents on;
- This other machine can access the server over http;
- The other machine has java installed on it;
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
# coding: utf-8 | |
# 20190825 rewrite | |
import sys | |
import array | |
import ctypes | |
import struct | |
from typing import Any | |
from OpenGL.GL import * | |
from OpenGL.GLUT import * |
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
// don't forget to include related head files | |
void BindCVMat2GLTexture(cv::Mat& image, GLuint& imageTexture) | |
{ | |
if(image.empty()){ | |
std::cout << "image empty" << std::endl; | |
}else{ | |
//glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); | |
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); | |
glGenTextures(1, &imageTexture1); | |
glBindTexture(GL_TEXTURE_2D, imageTexture1); |