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
#include <boost/filesystem.hpp> | |
#include <bin/dart_io_api.h> | |
#include <cstdio> | |
#include <dart_api.h> | |
#include <string_view> | |
#include <type_traits> | |
using namespace std::literals; |
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
#include <forge/logging.h> | |
#include <forge/utility/assert.h> | |
#include <boost/filesystem.hpp> | |
#include <bin/dart_io_api.h> | |
#include <cstdio> | |
#include <dart_api.h> | |
#include <random> | |
#include <spdlog/sinks/stdout_color_sinks.h> |
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 forcomp | |
import common._ | |
object Anagrams { | |
/** A word is simply a `String`. */ | |
type Word = String | |
/** A sentence is a `List` of words. */ |
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
def mostRetweeted: Tweet = { | |
val potentialTweets = filterAcc(x => x.retweets > elem.retweets,new Empty) | |
if(!potentialTweets.isEmpty) { | |
potentialTweets.mostRetweeted | |
} else { | |
elem | |
} | |
} |
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 funsets | |
import common._ | |
/** | |
* 2. Purely Functional Sets. | |
*/ | |
object FunSets { | |
/** | |
* We represent a set by its characteristic function, i.e. |
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 funsets | |
import org.scalatest.FunSuite | |
import org.junit.runner.RunWith | |
import org.scalatest.junit.JUnitRunner | |
/** | |
* This class is a test suite for the methods in object FunSets. To run | |
* the test suite, you can either: |
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 recfun | |
import common._ | |
object Main { | |
def main(args: Array[String]) { | |
println("Pascal's Triangle") | |
for (row <- 0 to 10) { | |
for (col <- 0 to row) | |
print(pascal(col, row) + " ") | |
println() |
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
import XMonad | |
import XMonad.Util.Run | |
import XMonad.Util.EZConfig (additionalKeys) | |
import XMonad.Hooks.ManageDocks | |
import XMonad.Hooks.ICCCMFocus | |
import XMonad.Config.Gnome | |
myManageHook = composeAll ( | |
[ className =? "Unity-2d-panel" --> doIgnore | |
, className =? "Unity-2d-launcher" --> doFloat |
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
public interface ICallback<T> { | |
public onComplete(Bitmap b); | |
public onError(); | |
} | |
interface IRemoteBitmapService { | |
public void <T> getBitmap(String url, ICallback<T> cbk); | |
} |
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
#!/bin/bash | |
DIRNAME=`pwd` | |
PROJNAME=`basename $DIRNAME` | |
if [[ ! -f "$HOME/.dialyzer_otp.plt" ]]; | |
then | |
echo "OTP plt not found" | |
exit -1 | |
fi |