ZDQ3NTMtOTRjZTMKZjIxMmItZDE0YmYKYTI5MWMtYmY5NjAKMWY3OWYtMTc1ZjIKNWQ0NjItNjQxZTIKZjYzZjQtM2E2NjcKZGM2YzUtMjYyNzIKOTBiMjgtNTM3YmEKYTc3ODUtOWI5Y2EKM2U3ZjktMTY5YmUKYzNiNjMtZjlhZTcKNTcyNWQtMTRlNjgKMDhiM2EtZGVlNjQKZjE2ODItM2IxNWQKM2UzMmMtYzllNDgKOTE4MDAtZDk3N2U=
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
# th30z@u1310:[Desktop]$ psql -h localhost -p 55432 | |
# Password: | |
# psql (9.1.10, server 0.0.0) | |
# WARNING: psql version 9.1, server version 0.0. | |
# Some psql features might not work. | |
# Type "help" for help. | |
# | |
# th30z=> select foo; | |
# a | b | |
# ---+--- |
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
// ---- .hpp ---- | |
// Refer to | |
// https://blog.rubenwardy.com/2019/02/17/cpp-self-registering-test-macros | |
#include <functional> | |
#define Test(name) \ | |
void test_##name(); \ | |
static bool test_##name##_registered = TestFactory::Register(#name, &test_##name); \ | |
void test_##name() |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <error.h> | |
#include <errno.h> | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> |
Blog wotchin's notebook
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
private static int getCapacity(int numElements) { | |
int initialCapacity = numElements; | |
initialCapacity |= (initialCapacity >>> 1); | |
initialCapacity |= (initialCapacity >>> 2); | |
initialCapacity |= (initialCapacity >>> 4); | |
initialCapacity |= (initialCapacity >>> 8); | |
initialCapacity |= (initialCapacity >>> 16); | |
initialCapacity++; | |
if (initialCapacity < 0) // Too many elements, must back off | |
initialCapacity >>>= 1;// Good luck allocating 2 ^ 30 elements |
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
function modalRender(text) { | |
var modal = $("<div class=\"modal fade\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"alertModal\" aria-hidden=\"true\"></div>").append( | |
$("<div class=\"modal-dialog\"></div>").append( | |
$("<div class=\"modal-content\"></div>").append( | |
$("<div class=\"modal-body\">"+text+"</div>") | |
) | |
) | |
); | |
modal.modal(); | |
} |
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
[Link](https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference) | |
link url: | |
>https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference | |
for ex. | |
``` | |
- in the line: $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$。 | |
- block: | |
$$ x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} $$ |