I hereby claim:
- I am nilzor on github.
- I am frodenilsen (https://keybase.io/frodenilsen) on keybase.
- I have a public key ASAl5OwmAffcKHYFXAub-yC-Z2TP1v9XlbbFy70Qtt55eAo
To claim this, I am signing this object:
fun <R, A, B> withNoNulls(p1: A?, p2: B?, function: (p1: A, p2: B) -> R): R? = p1?.let { p2?.let { function.invoke(p1, p2) } } | |
fun <R, A, B, C> withNoNulls(p1: A?, p2: B?, p3: C?, function: (p1: A, p2: B, p3: C) -> R): R? = p1?.let { p2?.let { p3?.let { function.invoke(p1, p2, p3) } } } |
package nilzor.public.views; | |
import android.content.Context; | |
import android.graphics.drawable.Drawable; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.widget.ImageView; | |
public class ScalingImageView extends ImageView { | |
private boolean mAdjustViewBounds; |
I hereby claim:
To claim this, I am signing this object:
Android application is debugging. | |
Loaded assembly: /storage/emulated/0/Android/data/xam_android_news.xam_android_news/files/.__override__/xam-android-news.dll | |
Loaded assembly: /storage/emulated/0/Android/data/xam_android_news.xam_android_news/files/.__override__/RestSharp.dll [External] | |
Loaded assembly: Mono.Android.dll [External] | |
Loaded assembly: Java.Interop.dll [External] | |
Loaded assembly: System.Runtime.dll [External] | |
Loaded assembly: System.Collections.Concurrent.dll [External] | |
09-09 13:59:37.789 I/art ( 3889): Not late-enabling -Xcheck:jni (already on) | |
09-09 13:59:37.789 W/art ( 3889): Unexpected CPU variant for X86 using defaults: x86 | |
09-09 13:59:37.828 W/monodroid( 3889): Creating public update directory: `/data/user/0/xam_android_news.xam_android_news/files/.__override__` |
$xml = "<?xml version=`"1.0`" encoding=`"utf-8`"?>`n" | |
$xml += "<packages>`n" | |
foreach ($program in $input) { | |
$name, $version, $shouldBeEmpty = $program.Split(" ") | |
if (!$shouldBeEmpty) { | |
$xml += (" <package id=`"{0}`" version=`"{1}`"/>`n" -f $name,$version) | |
} | |
} | |
$xml += "</packages>`n" | |
echo $xml |
And-Screenshot() { | |
# Todo: Add demo mode: https://android.googlesource.com/platform/frameworks/base/+/master/packages/SystemUI/docs/demo_mode.md | |
if [ "$1" = "" ] ; then echo "Specify output file name" | |
else | |
adb shell screencap -p /sdcard/screen.png | |
adb pull /sdcard/screen.png | |
adb shell rm /sdcard/screen.png | |
PCT=$2 | |
if [ "$PCT" = "" ]; then PCT=33%; fi | |
convert screen.png -resize $PCT $1 |
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using GalaSoft.MvvmLight.Messaging; | |
using GTWin8.Messages; | |
using GTWin8.Ui; | |
using Windows.UI.Xaml; |
public static class DictionaryExtensions | |
{ | |
/// <summary> | |
/// Returns a default value of type U if the key does not exist in the dictionary | |
/// </summary> | |
/// <param name="dic">The dictionary to search</param> | |
/// <param name="key">Key to search for</param> | |
/// <param name="onMissing">Optional default value of type U. If not specified, the C# default value will be returned.</param> | |
public static U GetOrDefault<T, U>(this Dictionary<T, U> dic, T key, U onMissing = default(U)) | |
{ |
public class LangUtils { | |
public static <K,V> ArrayList<V> getOrCreateArrayList(HashMap<K, ArrayList<V>> hashMap, K key) { | |
ArrayList<V> list = hashMap.get(key); | |
if (list == null) { | |
list = new ArrayList<V>(); | |
hashMap.put(key, list); | |
} | |
return list; | |
} |
sudo apt-get install php5-xdebug
[xdebug]
zend_extension="/usr/lib/php5/20121212/xdebug.so"
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req