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
IEnumerable<int> fib() { | |
var s1 = 0; | |
var s2 = 1; | |
while (true) { | |
var o = s1 + s2; | |
s1 = s2; | |
s2 = o; | |
yield return o; | |
} | |
} |
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
local/lib32-nvidia-340xx-libgl 340.76-1 | |
NVIDIA drivers libraries symlinks (32-bit) | |
local/lib32-nvidia-340xx-utils 340.76-1 | |
NVIDIA drivers utilities (32-bit) | |
local/libvdpau 1.1-1 | |
Nvidia VDPAU library | |
local/nvidia-340xx 340.76-7 | |
NVIDIA drivers for linux, 340xx legacy branch | |
local/nvidia-340xx-libgl 340.76-2 | |
NVIDIA drivers libraries symlinks |
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
# nvidia-xconfig: X configuration file generated by nvidia-xconfig | |
# nvidia-xconfig: version 340.76 (buildmeister@swio-display-x86-rhel47-01) Thu Jan 22 12:12:24 PST 2015 | |
Section "ServerLayout" | |
Identifier "Layout0" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Keyboard0" "CoreKeyboard" | |
InputDevice "Mouse0" "CorePointer" | |
EndSection |
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 com.fullfacing.dao | |
import com.fullfacing.ticketing.macros.Mappable | |
import scala.language.higherKinds | |
/** | |
* Project: dbabspro | |
* Created on 2015/05/19. | |
* ryno aka lemonxah - | |
* https://github.com/lemonxah |
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 com.fullfacing.test | |
import java.text.DecimalFormat | |
import com.fullfacing.network.{TcpClient, Execution} | |
import org.slf4j.LoggerFactory | |
import scala.concurrent.{Await, Promise, ExecutionContext, Future} | |
import scala.language.implicitConversions |
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
class MongoDAO[A <: Model](coll: MongoCollection) extends DAO[A, DBObject, DBObject, DBObject] { | |
import MongoInterpreter._ | |
def interpreter(q: Query, empty: DBObject = new MongoDBObject()): Option[DBObject] = { | |
try { Some(implicitly[Writer[Query, DBObject]].write(q)) } catch { case e: Exception => None } | |
} | |
override def list(limit: Int = 0)(implicit m: Mappable[A, DBObject, DBObject]): Vector[A] = { | |
coll.find().limit(limit).toVector.map(m.fromDBType) | |
} |
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
trait ModelWithId[A] { def copy(id: Option[String]):A } | |
trait Model { def deleted: Boolean; def id: Option[String] } | |
trait DAO[A <: Model, B, C, Q] { | |
def interpreter(q: Query, empty: Q): Throwable \/ Q | |
def insert(a: A)(implicit m: Mappable[A, B, C], ev: A ⇒ ModelWithId[A]): A | |
def insertRaw(b: B) | |
def list(skip: Int = 0, limit: Int = 0)(implicit m: Mappable[A, B, C]): Vector[A] | |
def filter(query: Query, skip: Int = 0, limit: Int = 0)(implicit m: Mappable[A, B, C]): Vector[A] | |
def headOption(query: Query)(implicit m: Mappable[A, B, C]): Option[A] |
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 com.fullfacing.queue | |
import java.io.{ByteArrayOutputStream, ByteArrayInputStream} | |
import java.util.Properties | |
import java.util.concurrent.ConcurrentHashMap | |
import java.util.zip._ | |
import akka.actor.ActorRef | |
import com.fullfacing.framework.Security | |
import com.fullfacing.message.{Response, Request, Retry} |
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
using System; | |
namespace Functional { | |
public class GetOnEmptyOptionException : Exception { } | |
public interface Some { } | |
public interface None { } | |
public abstract class Option { | |
public static bool operator ==(Option a, Option b) => | |
!ReferenceEquals(a, null) && !ReferenceEquals(b, null) && a.Equals(b); | |
public static bool operator !=(Option a, Option b) => !(a == b); | |
public static Option<A> None<A>() => new None<A>(); |
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
object ops { | |
implicit class SemigroupOps[F](val self: F)(implicit val F: Semigroup[F]) { | |
def |+|(other: => F): F = F.combine(self, other) | |
} | |
} | |
import ops._ | |
trait Semigroup[A] { |
OlderNewer