Skip to content

Instantly share code, notes, and snippets.

@erictt
erictt / layout.kbd.json
Last active May 1, 2022 05:11
Untitled Keyboard Layout
[
[
"~\n`",
"F1",
"F2",
"F3",
"F4",
"F5",
"F6",
"F7",
@erictt
erictt / layout.kbd.json
Last active May 1, 2022 05:11
Untitled Keyboard Layout
[
[
"Esc",
"!\n1",
"@\n2",
"#\n3",
"$\n4",
"%\n5",
"^\n6",
"&\n7",
@erictt
erictt / anki-card-style-for-confused-words.css
Last active January 19, 2017 00:59
Anki Card Style for confused words(CSS)
.card {
font-size: 16px;
text-align: center;
color: #32517d;
line-height: 15px;
}
h1 {
font-family: times;
font-size: 18px;
<!-- front -->
<h1 class="R">Recite</h1>
<div class="front">
<div class="word-line">
<span class="word">{{单词1}}</span><br/>
<span class="PhoneticSymbol">{{音标1}}</span><br/>
<span class="POSR">{{发音1}}</span>
</div>
<div>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
void myMergeSort(int arr[], int size);
void printarr(int arr[], int length);
void mergeBothSide(int arr[], int leftarr[], int rightarr[], int halfLen, int rightHalfLen);
int main(void)
{
#include <stdio.h>
void myQuickSort(int arr[], int size, int low, int high);
void swapItem(int arr[], int i, int j);
void printarr(int arr[], int length);
int main(void)
{
int arr[] = { 1, 4, 5, 4, 1, 8, 9, 3, 12, 10, 9, 10};
int length = 12;
@erictt
erictt / sort.py
Last active October 19, 2018 00:35
Quick Sort & Merge Sort with Python 3
def quicksort(items):
if len(items) <= 1:
return items
pivot = items.pop()
leftItems = []
rightItems = []
for i in items:
if i <= pivot:
leftItems.append(i)