Dave Pereira-Gurnell
Things that enable a "functional style" in Scala:
- Scala Language Features
- Higher Level Theory
/* | |
Overview | |
-------- | |
To run a query using anorm you need to do three things: | |
1. Connect to the database (with or without a transaction) | |
2. Create an instance of `anorm.SqlQuery` using the `SQL` string interpolator | |
3. Call one of the methods on `SqlQuery` to actually run the query |
# Sample latexmk configuration to use xelatex and Preview on OS X. | |
# Should help if you want to use latexmk with MacTeX. | |
# | |
# 1. Install MacTeX | |
# 2. Put this file in ~/.latexmkrc | |
# 3. Continuously recompile and preview your document with the command: | |
# latexmk -pvc myfile.tex | |
$pdflatex = 'xelatex -interaction=nonstopmode %O %S'; | |
$pdf_previewer = 'open -a Preview "%S"'; |
points = script.Parent | |
--[[ | |
This script creates 100 cubes representing "points" on a graph. | |
It loops through the values of x from 0 to 100, and calculates the correct y value at each position. | |
For each pair of values, it creates a cube at position x,y. | |
]] | |
-- Create a variable called "x" and set it to 0 | |
x = 0 |
/* | |
* Copyright (c) 2011 Untyped Ltd, http://untyped.com | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
Functional Brighton Code of Conduct | |
=================================== | |
Welcome! | |
-------- | |
Functional Brighton is a Brighton UK based meetup group that aims to bring together people interested in functional programming. We hope that it will complement London-based groups (eg. the London Scala User Group, Hoodlums, F#unctional Londoners, etc.), giving Londoners an excuse for a trip to the seaside and Brightonians some relief from the train. | |
The current admins are: | |
* Dave Pereira-Gurnell (@davepg) |
/* | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
START OF CONFIGURATION | |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
~~~~~~~~~~~~~~~~~~~~~~~~ | |
Configuration: Form URLs | |
~~~~~~~~~~~~~~~~~~~~~~~~ | |
You can get these from the address bar |
/* ===== NOTE ===== | |
* | |
* This code sample is out-of-date! | |
* | |
* If you're looking for support for shapeless HLists in Slick queries, | |
* check out [Slickless](https://github.com/underscoreio/slickless). | |
* | |
* ================ | |
*/ | |
import slick.driver.MySQLDriver.simple._ |
import MapboxGL from "@react-native-mapbox-gl/maps"; | |
import { storiesOf } from "@storybook/react-native"; | |
import React from "react"; | |
import { StyleSheet, Text, TouchableNativeFeedback, View } from "react-native"; | |
/* | |
Gist to demonstrate an issue I had with @react-native-mapbox-gl/maps. | |
I'm trying to display a button over a map and allow the user to click it without | |
the event bubbling up to the map. However, calls to stopPropagation and preventDefault |
package sandbox | |
import cats.data.Kleisli | |
import cats.implicits._ | |
case class User(username: String, avatarUrl: String, profileId: Int) | |
case class Avatar(url: String, monochrome: Boolean) | |
case class Profile(id: Int, age: Int) | |
object ComposingStuff extends App { |