Here I'm trying to understand what happens when I run
./hello
#include
import scala.util.{Try, Success, Failure} | |
def f(s: String): Try[Int] = Try { s.toInt } | |
def g(i: Int): Try[Int] = Try { i * 2 } | |
def unit[T](v: T): Try[T] = Success(v) | |
//val v = "1" | |
val v = "bad" | |
val m = Success(v) |
Here I'm trying to understand what happens when I run
./hello
#include
import numpy as np | |
import pandas as pd | |
import matplotlib | |
import pylab | |
from matplotlib import pyplot | |
from scipy.stats import gaussian_kde | |
data = pd.read_csv('fitbit.csv', usecols = [0, 1], parse_dates = True) | |
#count and remove days where <100 steps were logged, |
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
# Scaladoc Developer Guide | |
## Introduction | |
Scaladoc is the tool that enables developers to automatically generate documentation for their Scala (and Java) projects. It is Scala's equivalent of the widely-used Javadoc tool. This means that Javadoc (and even doxygen) users will be familiar with Scaladoc from day 1: for them, it is most beneficial to check out the Scaladoc/Javadoc comparison tables and if necessary, skim through this document to understand specific features. | |
The rest of this tutorial is aimed at developers new to Scaladoc and other similar tools. It assumes a basic understanding of the Scala language, which is necessary to follow the examples given throughout the tutorial. For the user perspective on the Scaladoc-generated documentation, such as finding a class, understanding the page layout, navigating through diagrams, please refer to the Scaladoc User Guide. | |
The tutorial will start by a short motivation and then will explain the main concept in Scaladoc: the doc comment. | |
### Why document? |
141.195.91.37 |
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
class ClobberTable<K, T> { | |
ClobberTable parent; | |
HashTable<K, T> my; | |
ArrayList<K> whites; | |
public ClobberTable() { | |
parent = null; | |
my = new HashTable<K, T>(); | |
whites = new ArrayList<K>(); | |
} |
import annotation.unchecked.uncheckedVariance | |
/** The trait of things that can be compared safely */ | |
trait Equals[-T] { | |
/** A witness of Equals' type parameter. Should only used for | |
* the constraint in EqlDecorator, hence, @uncheckedVariance should not be a problem. | |
*/ | |
type EqualsDomain = T @uncheckedVariance |
package scalax.collection | |
import scala.collection.mutable.ListBuffer | |
/** FoldTransformers and the views based on them are a Scala | |
* adaptation, and to some degree an extension, of Rich Hickey's | |
* transducers for Clojure. They show that the concepts can be | |
* implemented in a type-safe way, and that the implementation is | |
* quite beautiful. | |
*/ | |
object FoldingViews { |