I hereby claim:
- I am mancvso on github.
- I am avidal_c (https://keybase.io/avidal_c) on keybase.
- I have a public key whose fingerprint is 0F7E AC6E E928 C047 B705 4C39 C6A5 B9BC EE72 FF3A
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): |
I hereby claim:
To claim this, I am signing this object:
| // 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; |
| 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; |
| Grammatical endings, affixes, correlatives: | |
| -a adjective | |
| -e adverb | |
| -j plural | |
| -n accusative | |
| -o noun | |
| Verbs: |
| @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 { |
I hereby claim:
To claim this, I am signing this object:
| Platform.runLater(new Runnable() { | |
| @Override | |
| public void run() { | |
| //Execute some script to hide a div | |
| webEngine.executeScript("document.getElementById('myDiv').style.display='none';"); | |
| } | |
| }); |
| % 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} |
| // --- 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 |