git add -p
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
// Source: http://codereview.stackexchange.com/questions/95464/is-the-copy-swap-idiom-implemented-here-correctly | |
class Array | |
{ | |
int size; | |
int* data; | |
public: | |
Array(Array const& copy) | |
: size(copy.size) | |
, data(new int[size]) |
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
# Zsh commands reminder | |
## Create an alias for a directory | |
``` | |
hash -d name=~path | |
``` | |
## Sources |
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
/* Copyright (c) Mark J. Kilgard, 1994, 1997. */ | |
/** | |
(c) Copyright 1993, Silicon Graphics, Inc. | |
ALL RIGHTS RESERVED | |
Permission to use, copy, modify, and distribute this software | |
for any purpose and without fee is hereby granted, provided |
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
package ch.heigvd.infogr.maths.collision; | |
import ch.heigvd.infogr.maths.Vector3; | |
import ch.heigvd.infogr.maths.collision.algorithms.AaBbBoxedCollisionAlgorithm; | |
import ch.heigvd.infogr.maths.collision.algorithms.ICollisionAlgorithm; | |
import ch.heigvd.infogr.maths.collision.representation.IBoxedCollidable; | |
import ch.heigvd.infogr.maths.collision.representation.ICollidable; | |
import com.jogamp.opengl.GL2; | |
import javafx.util.Pair; |
Here is the looks and feel of your terminal once the tutorial has been applied on your system:
Using Homebrew:
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
package scalaInAction.chapter8ScalableExtensibleComponents | |
import org.scalatest.{FlatSpec, Matchers} | |
class Food | |
class Grass extends Food | |
abstract class Animal { | |
type SuitableFood <: Food // Upper bound (<:) |
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
package scalaInAction.chapter8ScalableExtensibleComponents | |
import org.scalatest.{FlatSpec, Matchers} | |
/** | |
* Declare the .NET keyword as a singleton. | |
*/ | |
object using { | |
/** | |
* Type alias. |
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
package scalaInAction.chapter8ScalableExtensibleComponents | |
import org.scalatest.{FlatSpec, Matchers} | |
trait HasAtLeastOneElement[F[_]] { | |
def any[A](xs: F[A]): Boolean | |
} | |
/** | |
* Higher-kinded types are types that know how to create a new type from the type argument. That's why |
OlderNewer