void *memmove(void *dst, const void *src, size_t len);
Copier la source dans la destination d'une maniere non destructive.
[package] | |
name = "fst-int" | |
version = "0.1.0" | |
authors = ["Andrew Gallant <[email protected]>"] | |
[dependencies] | |
byteorder = "0.4" | |
fst = "0.1" |
No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.
gpg --list-secret-keys
and look for sec
, use the key ID for the next stepgit
to use GPG -- replace the key with the one from gpg --list-secret-keys
It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
#!/usr/bin/env bash | |
# usage: memlog.sh PID | |
# requires gnuplot and matplotlib (dnf install python2-matplotlib gnuplot) | |
PID=$1 | |
LOG=./$PID.log | |
PNG=./$PID.log.png | |
echo recording memory usage for PID $PID |
Let's take the first example from the Rust generators RFC:
#[async]
fn print_lines() -> io::Result<()> {
let addr = "127.0.0.1:8080".parse().unwrap();
let tcp = await!(TcpStream::connect(&addr))?;
...
}
#!/bin/sh | |
# This env variable is here to permit | |
# to use a custom `cargo bench` command if needed | |
CARGO_BENCH_CMD=${CARGO_BENCH_CMD:-cargo bench} | |
if [ $# -eq 0 ]; then | |
echo "comparing benchmarks of HEAD~1 and HEAD..." | |
OLD=$(git rev-parse --short 'HEAD~1') | |
NEW=$(git rev-parse --short 'HEAD') |
Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.
Custom format for displaying bytes as kb
, mb
, gb
or tb
.
Response to a few places on the internet: https://productforums.google.com/forum/#!topic/docs/x_T_N-yRUYg And here: https://stackoverflow.com/questions/1533811/how-can-i-format-bytes-a-cell-in-excel-as-kb-mb-gb-etc
Here is one that I have been using:
[<1000000]0.00," KB";[<1000000000]0.00,," MB";0.00,,," GB"