- Check if
git
is installed in your system - Open terminal
# Clone your own gecko repository git clone https://github.com/<your_username>/gecko-dev.git
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
#!/usr/bin/python | |
import re | |
import sys | |
def removeComments(text): | |
""" remove c-style comments. | |
text: blob of text with comments (can include newlines) | |
returns: text with comments removed | |
""" | |
pattern = r""" |
Here is the one-stop manual. For more details (or latest information), please check https://code.videolan.org/videolan/dav1d.
dav1d relies on meson build system (and ninja), so meson installation is required. It might be best to see https://mesonbuild.com/ to know how to do it, but here are the steps:
- Run
$ sudo apt-get install python3 python3-pip python3-setuptools python3-wheel ninja-build
- Run
$ pip3 install meson
(as root)- This is the best way to get the latest version of Mesonbuild. Due to our frequent release cycle and development speed, distro packaged software may quickly become outdated.
An example to simulate a C++ class in C.
This is a comparison to [ChunMinChang/8e04130e778d77e0b30b8954cc5f2473][c++], which implement a linked-list in C++.
- Implement delete function to remove a node from the list
- Implement move function to move cursor to a specific node
- Implement search function to return one specific node
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
#ifndef COMMON | |
#define COMMON | |
#include <iostream> | |
#include <unistd.h> | |
#define DEBUG false // Set true to log the debugging messages. | |
#define LOG(...) DEBUG && fprintf(stdout, __VA_ARGS__) | |
template<typename T, size_t N> |
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
<html><head> | |
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta charset="utf-8"> | |
<style> | |
* { | |
box-sizing: border-box; | |
} | |
.wrapper { | |
border: 1px dashed black; | |
padding: 1em; | |
max-width: 50vw; |
Implementation of different methods to calculate the Fibonacci numbers by fast doubling.
Please read my blog post for more detail.
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
all: | |
# Build a static library from the Rust file | |
rustc --crate-type=staticlib ext.rs | |
# Compile the C file with the static library | |
# gcc -o sample-c sample.c libext.a | |
gcc -o sample-c sample.c -L. -lext | |
./sample-c | |
# g++ -o sample-cpp sample.cpp libext.a | |
g++ -o sample-cpp sample.cpp -L. -lext | |
./sample-cpp |
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
#include <alsa/asoundlib.h> // for ALSA APIs | |
#include <stddef.h> // for offsetof | |
#include <stdio.h> // for fprintf | |
#include <stdlib.h> // for calloc | |
#include <string.h> // for strcmp | |
#define DEBUG 1 // Set 1 to log the debugging messages. | |
#define LOG(...) DEBUG && fprintf(stdout, __VA_ARGS__) | |
#define ALSA_DEFAULT_DEVICE_NAME "default" |
NewerOlder