Written by @xxrjun
Discover gists
# Goal: put 1 in new col where 1 appears across other cols | |
library(dplyr) | |
df <- tibble( | |
x1 = c(1, NA, NA), | |
x2 = c(NA, 1, NA), | |
x3 = c(NA, 1, NA) | |
) |
<!-- agrega aquí el header con el logo --> | |
<!-- Contenido --> | |
<section class="container-fluid content py-5"> | |
<div class="row justify-content-center"> | |
<!-- Post --> | |
<div class="col-12 col-md-7 text-center"> | |
<h1>POO con Javascript, feo pero posible</h1> | |
<hr> | |
<img src="images/8.png" alt="Post Javascript" class="img-fluid"> |
package goddrinksjava; | |
/** | |
* The program GodDrinksJava implements an application that | |
* creates an empty simulated world with no meaning or purpose. | |
* | |
* @author momocashew | |
* @lyrics hibiyasleep | |
*/ | |
<# | |
.SYNOPSIS | |
Script to Initialize my custom powershell setup. | |
.DESCRIPTION | |
Script uses scoop | |
.NOTES | |
**NOTE** Will configure the Execution Policy for the "CurrentUser" to Unrestricted. | |
Author: Mike Pruett | |
Date: October 18th, 2018 |
const crypto = require('crypto'); | |
// this usually takes a few seconds | |
function work(limit = 100000) { | |
let start = Date.now(); | |
n = 0; | |
while(n < limit) { | |
crypto.randomBytes(2048); | |
n++; | |
} |
#!/usr/bin/awk -f | |
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff | |
# My copy here is written in awk instead of C, has no compelling benefit. | |
# Public domain. @thingskatedid | |
# Run as awk -v x=xyz ... or env variables for stuff? | |
# Assumptions: the data is evenly spaced along the x-axis | |
# TODO: moving average |
You take a stream/buffer of binary data. The start of your data is a "Page", which has a header followed by data.
You need to read the following data from the header (see https://xiph.org/ogg/doc/framing.html for more detail)
capture_pattern
- bytes 0 to 3, must read OggSstream_structure_version
- byte 4, must be 0header_type_flag
- byte 5, a bitflag that tells you metadata about the page (is it a new packet? is a packet continued here? is it the first/last page of the stream?)absolute granule position
- bytes 6 to 13, not needed unless you want seekingstream serial number
- bytes 14 to 17, a serial number given to each stream contained in the Ogg file. This is important for playing Ogg files that contain other streams, such as video or cover art. You need to identify and only bother parsing the Opus stream.
Certainly! Obsidian is a popular note-taking application that supports Markdown with LaTeX integration for mathematical notation. When using LaTeX in Obsidian's Markdown flavor, you typically enclose the LaTeX code within double dollar signs $$...$$
for block math and single dollar signs $...$
for inline math.
Here's an exhaustive list of the symbols for propositional logic and their formulas specifically formatted for Obsidian flavor Markdown:
-
Conjunction (AND)
- Symbol: ∧
- Obsidian Markdown:
$\land$
or$\wedge$
-
Disjunction (OR)
- Symbol: ∨
This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.
Description | Syntax |
---|---|
Get the length of a string | ${#VARNAME} |
Get a single character | ${VARNAME[index]} |