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
-- This exercise covers the first 6 chapters of "Learn You a Haskell for Great Good!" | |
-- Chapter 1 - http://learnyouahaskell.com/introduction | |
-- Chapter 2 - http://learnyouahaskell.com/starting-out | |
-- Chapter 3 - http://learnyouahaskell.com/types-and-typeclasses | |
-- Chapter 4 - http://learnyouahaskell.com/syntax-in-functions | |
-- Chapter 5 - http://learnyouahaskell.com/recursion | |
-- Chapter 6 - http://learnyouahaskell.com/higher-order-functions | |
-- Download this file and then type ":l Chapter-1-6.hs" in GHCi to load this exercise |
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 _FY_STL_VECTOR | |
#define _FY_STL_VECTOR | |
#include <iostream> | |
#include <cstddef> | |
namespace fateyan { | |
template <typename T> | |
class Vector { | |
public: |
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
<?php | |
function parseTOC($items) { | |
if (count($items) == 0) return []; | |
reset($items); | |
$stack = array(); | |
$ret = array(); | |
$stack[] = &$ret; |
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
// https://new-read.readmoo.com/mags/7 | |
// 犢月刊 | |
var els = document.querySelectorAll('[data-readmoo-id]'); | |
var ans = []; | |
for(var i = 0; i < els.length; ++i) { | |
ans.push(`https://readmoo.com/epub/${els[i].attributes['data-readmoo-id'].value}/eb\n`); | |
} |