Skip to content

Instantly share code, notes, and snippets.

View fakedrake's full-sized avatar

Chris Perivolaropoulos fakedrake

View GitHub Profile
#include <experimental/coroutine>
#include <stdio.h>
#include <future>
// we get suspend_never and return_value
// template<typename T,typename... Args>
// struct std::experimental::coroutine_traits<std::future<T>,Args...> {
// struct promise_type {
#include <experimental/coroutine>
#include <stdio.h>
#include <assert.h>
using namespace std::experimental;
#define SCH_SIZE 10
// The queue can run concurrently as long as
//
// write{i}(dist,n), load{i+n}(dist,n)
# Abstract positions
alias full move screenOriginX;screenOriginY screenSizeX;screenSizeY
alias lefthalf move screenOriginX;screenOriginY screenSizeX/2;screenSizeY
alias righthalf move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY
alias topleft corner top-left resize:screenSizeX/2;screenSizeY/2
alias topright corner top-right resize:screenSizeX/2;screenSizeY/2
alias bottomleft corner bottom-left resize:screenSizeX/2;screenSizeY/2
alias bottomright corner bottom-right resize:screenSizeX/2;screenSizeY/2
alias hyper ctrl;alt;cmd
<?xml version="1.0"?>
<root>
<item>
<name>Find using vimperator</name>
<identifier>private.find</identifier>
<only>FIREFOX</only>
<autogen>__KeyToKey__
KeyCode::F, ModifierFlag::COMMAND_L,
KeyCode::F, ModifierFlag::OPTION_L</autogen>
</item>
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RankNTypes #-}
module Main (main) where
import Control.Monad
import Control.Monad.Except
import Data.Bifunctor
import Data.Constraint
import Data.List
import GHC.Generics
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative
import Text.HTML.Scalpel
import Data.Char
import Data.Hashable
import qualified Data.HashMap.Strict as HM
import Data.List
import Data.Ord
{-# LANGUAGE OverloadedStrings #-}
import Control.Applicative
import Text.HTML.Scalpel
import Data.Char
import Data.List
import Data.Ord
{-# LANGUAGE OverloadedStrings #-}
module Angelos () where
import Control.Applicative
import Text.HTML.Scalpel
type Author = String
data Comment
s1870697 Use the standard library function for sorting in-memory stuff. Use enumerate() to assign indexes to a list's elements. Use list comprehensions instead of for loops where possible to make your code more readable.
s1830962 Good
s1831707 No solution
s1833978 r is a table of indexes (ie naturals) so initialize it with -1 as 0 is a valid value.
s1836526 Good
s1837246 Good, use the standard library sort
s1837803 Good
s1839518 No solution
s1840235 j is not a hash of the lengths. You should search for one that works.
s1840770 No solution
s1843530:
Based on your comment the solution seems on the right track but fillQueue is the important part.
s1869635:
The approach seems ok, break yor code in subroutines.
s1844752:
not much to comment on
s1840770: