Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
| // "License": Public Domain | |
| // I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
| // In case there are jurisdictions that don't support putting things in the public domain you can also consider it to | |
| // be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it | |
| // an example on how to get the endian conversion functions on different platforms. | |
| #ifndef PORTABLE_ENDIAN_H__ | |
| #define PORTABLE_ENDIAN_H__ | |
| #if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) |
| The Challenge | |
| ------------- | |
| Given the following riddle, write a regular expression describing all possible answers, | |
| assuming you never make a move which simply undoes the last one you made. | |
| The Riddle | |
| ---------- | |
| You are on your way somewhere, taking with you your cabbage, goat, and wolf, as always. | |
| You come upon a river and are compelled to cross it, but you can only carry one of the | |
| three companions at a time. None of them can swim because this isn't THAT kind of riddle. |
| #!/usr/bin/env python3 | |
| import sys | |
| import socket | |
| import select | |
| def command(name, args=None): | |
| return {'name': name, 'args': args} | |
| def readcmd(): |
This post also appears on lisper.in.
Reader macros are perhaps not as famous as ordinary macros. While macros are a great way to create your own DSL, reader macros provide even greater flexibility by allowing you to create entirely new syntax on top of Lisp.
Paul Graham explains them very well in [On Lisp][] (Chapter 17, Read-Macros):
The three big moments in a Lisp expression's life are read-time, compile-time, and runtime. Functions are in control at runtime. Macros give us a chance to perform transformations on programs at compile-time. ...read-macros... do their work at read-time.
Please note that the article is now on my website, and even though I am still working on it, any feedback is appreciated. Thanks for reading !
Back when I did not know anything about programing and started to learn C, I was first introduced to pointers (and other dreaded horrors that made me curl into a corner and cry) and dynamic memory in general.
I was baffled, troubled, yet fascinated by the basic explanation on how memory worked, and started to dread the time where I would need to manually create my char arrays for each and every sentences of my program; right before learning about string literals and feeling like an idiot.
It was then where I was learning about memory allocation and came upon a function that I would call for long the "magic function" : malloc. Magic, because at that point I didn't know how it worked, let alone knew anything about memory other that it was a "chain of boxes for numbers".
The objective here is to find all SegmentNotFoundException type corruption and remove it (as we don't have a valid backup)
Before running any of the below steps we created an index.json file (see the file below) which contains only the index definitions of the corrupted indexes.
java -Xmx8g -jar oak-run-1.8.12.jar index --fds-path=crx-quickstart\repository\datastore crx-quickstart\repository\segmentstore --index-definitions
The objective here is to find all SegmentNotFoundException type corruption and remove it (as we don't have a valid backup)
Before running any of the below steps we created an index.json file (see the file below) which contains only the index definitions of the corrupted indexes.
java -Xmx8g -jar oak-run-1.8.12.jar index --fds-path=crx-quickstart\repository\datastore crx-quickstart\repository\segmentstore --index-definitions