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.agens.android.vgsnarvei.databinding; | |
import android.databinding.ObservableField; | |
import android.graphics.Bitmap; | |
import com.agens.android.vgsnarvei.Container; | |
import com.agens.android.vgsnarvei.serviceclients.ImageService; | |
import java.io.Serializable; |
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
<# | |
.SYNOPSIS | |
Add a new path entry to the current user's PATH permanently | |
.DESCRIPTION | |
Script adds the path String to the registry key HKCU/Environment/Path | |
.NOTES | |
Author : Frode Nilsen <nilzor@gmail.com> | |
.EXAMPLE | |
Path-AddHkcu "c:\myScripts" | |
.LINK #> |
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
function global:Path-List() { | |
($env:path).split(";") | |
} | |
function global:Path-Remove() { | |
Param( | |
[Parameter(Mandatory=$TRUE,Position=1)] | |
[String] $ToRemove | |
) | |
$p=($env:path).split(";") | Where { $_ -ne $ToRemove } |
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
/** | |
* Wrapper for the concrete Android logger | |
*/ | |
public class AndroidLogWriter implements ILogWriter { | |
public void println(int severity, String tag, String text) { | |
Log.println(severity, tag, text); | |
} | |
public void printException(String tag, Throwable tr) { | |
Log.e(tag, tr.getMessage(), tr); |
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
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; | |
} |
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
# This is a configuration file for ProGuard. | |
# http://proguard.sourceforge.net/index.html#manual/usage.html | |
-dontobfuscate | |
-dontusemixedcaseclassnames | |
-dontskipnonpubliclibraryclasses | |
-verbose | |
# Optimization is turned off by default. Dex does not like code run | |
# through the ProGuard optimize and preverify steps (and performs some | |
# of these optimizations on its own). |
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
import javax.xml.xpath.XPathConstants | |
import javax.xml.xpath.XPathFactory | |
// Set output filename of APK based on version code from manifest when doing release build | |
// Note: This script will add a couple of seconds to the build script build time | |
gradle.projectsEvaluated { | |
preReleaseBuild.doFirst { | |
android.applicationVariants.all { variant -> | |
// Check version number configured in AndroidManifest | |
if (variant.name != "release") return |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.11.0.min.js"></script> | |
<script> | |
$(function() { | |
getHelloWorldAsync().done(function(res) { | |
$("#content").text(res + " world"); | |
}); | |
}); |
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
$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 |
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
public class Program { | |
public static void main() { | |
var cmd = new SomeCommand(4); | |
CommandResult res = cmd.Execute(); | |
Console.WriteLine(res.ToString()); | |
} | |
} |