I hereby claim:
- I am mancvso on github.
- I am mancvso (https://keybase.io/mancvso) on keybase.
- I have a public key whose fingerprint is 4B2B 437B CD4A 812A 6ED8 1A80 C6F1 96B9 2BAB C75E
To claim this, I am signing this object:
// --- Shorter with Option[T] --- // | |
implicit class WhenUnless[T](x: => T) { | |
lazy val xx = x | |
def when(cond: => Boolean):Option[T] = if(cond) Some(xx) else None | |
def unless(cond: => Boolean):Option[T] = if(cond) None else Some(xx) | |
} | |
implicit class Otherwise[+T](val x: Option[T]) extends AnyVal { | |
def otherwise[S >: T](z: => S):S = if(x.isDefined) x.get else z //could not use getOrElse |
% sudo apt-get install texlive-fonts-extra texlive-fonts-recommended | |
\documentclass[10pt,letterpaper]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[spanish]{babel} | |
\usepackage{charter} | |
\usepackage[T1]{fontenc} | |
\usepackage{inconsolata} | |
\usepackage{hyperref} |
Platform.runLater(new Runnable() { | |
@Override | |
public void run() { | |
//Execute some script to hide a div | |
webEngine.executeScript("document.getElementById('myDiv').style.display='none';"); | |
} | |
}); |
I hereby claim:
To claim this, I am signing this object:
@Override | |
public F.Promise<Usuario> findById(String id) { | |
F.RedeemablePromise<Usuario> promise = F.RedeemablePromise.empty(); | |
System.out.println("querying..."); | |
usuarios. | |
usuarios.find( eq("_id", id) ).first( (u, e) -> { // FIXME: Single field query | |
System.out.println("dispatching callback..."); | |
if(u == null || e != null){ | |
promise.failure( new Throwable("no user")); | |
} else { |
Grammatical endings, affixes, correlatives: | |
-a adjective | |
-e adverb | |
-j plural | |
-n accusative | |
-o noun | |
Verbs: |
package com.polidea.rxandroidble.sample.example4_characteristic; | |
import android.bluetooth.BluetoothGattCharacteristic; | |
import android.os.Bundle; | |
import android.support.design.widget.Snackbar; | |
import android.util.Log; | |
import android.widget.Button; | |
import android.widget.TextView; | |
import android.widget.Toast; |
// build.gradle | |
// implementation 'org.apache.commons:commons-vfs2:2.2' | |
// implementation 'net.idauto.oss.jcifs:vfs-jcifs-ng:1.0.1' | |
import org.apache.commons.vfs2.FileObject; | |
import org.apache.commons.vfs2.FileSystemManager; | |
import org.apache.commons.vfs2.FileSystemOptions; | |
import org.apache.commons.vfs2.VFS; | |
import org.apache.commons.vfs2.auth.StaticUserAuthenticator; | |
import org.apache.commons.vfs2.impl.DefaultFileSystemConfigBuilder; |
I hereby claim:
To claim this, I am signing this object:
// Taken from Python Cookbook | |
def logged(func=None, *, level=logging.DEBUG, name=None, message=None): | |
if func is None: | |
return partial(logged, level=level, name=name, message=message) | |
logname = name if name else func.__module__ | |
log = logging.getLogger(logname) | |
logmsg = message if message else func.__name__ | |
@wraps(func) | |
def wrapper(*args, **kwargs): |