Easy to remember, easy to forget.
It's nice to be able to run subl
in a terminal.
<?php | |
namespace App\Traits; | |
trait NPerGroup { | |
/** | |
* query scope nPerGroup | |
* | |
* @return void | |
*/ |
Enabling communication with API if server has Self-Signed Certificate |
#include <SDKDDKVer.h> | |
#include <Windows.h> | |
#pragma warning(disable:4819) | |
#pragma warning(disable:4996) | |
// for OpenCV2 | |
#include "opencv2/imgproc/imgproc.hpp" | |
#include "opencv2/objdetect/objdetect.hpp" | |
#include "opencv2/gpu/gpu.hpp" |
Easy to remember, easy to forget.
It's nice to be able to run subl
in a terminal.
package cc.cubone.turbo.core.rom; | |
import android.os.Build; | |
import android.view.Window; | |
import android.view.WindowManager; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Method; | |
/** |
function copyFbRecord(oldRef, newRef) { | |
oldRef.once('value', function(snap) { | |
newRef.set( snap.value(), function(error) { | |
if( error && typeof(console) !== 'undefined' && console.error ) { console.error(error); } | |
}); | |
}); | |
} |
package com.memtrip; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import android.content.ContentResolver; | |
import android.content.ContentUris; | |
import android.content.ContentValues; | |
import android.graphics.Bitmap; |
val spanned = spannable{ bold("some") + italic(" formatted") + color(Color.RED, " text") } | |
val nested = spannable{ bold(italic("nested ")) + url("www.google.com", "text") } | |
val noWrapping = bold("no ") + sub("wrapping ) + sup("also ") + "works" | |
text_view.text = spanned + nested + noWrapping |
# gap.py | |
# (c) 2013 Mikael Vejdemo-Johansson | |
# BSD License | |
# | |
# SciPy function to compute the gap statistic for evaluating k-means clustering. | |
# Gap statistic defined in | |
# Tibshirani, Walther, Hastie: | |
# Estimating the number of clusters in a data set via the gap statistic | |
# J. R. Statist. Soc. B (2001) 63, Part 2, pp 411-423 |
on run {input, parameters} | |
set output to "http://translate.google.com/translate_t?sl=auto&tl=uk&text=" & urldecode(input as string) | |
return output | |
end run | |
on urldecode(x) | |
set cmd to "'require \"cgi\"; puts CGI.escape(STDIN.read.chomp)'" | |
do shell script "echo " & quoted form of x & " | ruby -e " & cmd | |
end urldecode |