Assignment | |
---|---|
Assign value to variable if variable is not already set, value is returned.Combine with a : no-op to discard/ignore return value . |
${variable="value"} : ${variable="value"} |
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
// Example: cities.sortedWithLocaleBy(Locale("tr")) { it.name } | |
inline fun <T, R : Comparable<R>> Iterable<T>.sortedWithLocaleBy( | |
locale: java.util.Locale, | |
crossinline selector: (T) -> R? | |
) = sortedWith(compareBy(java.text.Collator.getInstance(locale), selector)) | |
// Example: cities.sortedWithLocaleByDescending(Locale("tr")) { it.name } | |
inline fun <T, R : Comparable<R>> Iterable<T>.sortedWithLocaleByDescending( | |
locale: java.util.Locale, | |
crossinline selector: (T) -> R? |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Visualizing your Spring Integration Components & Flows</title> | |
<script type="text/javascript" src="http://d3js.org/d3.v4.min.js"></script> | |
<script type="text/javascript" src="http://d3js.org/d3-selection-multi.v1.min.js"></script> | |
<style> |
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
#!/usr/bin/env python | |
import RPi.GPIO as GPIO | |
from time import sleep | |
# Define GPIO to LCD mapping | |
LCD_RS = 7 | |
LCD_E = 8 | |
LCD_D4 = 25 | |
LCD_D5 = 24 | |
LCD_D6 = 23 |
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
# Clean, simple, compatible and meaningful. | |
# Tested on Linux, Unix and Windows under ANSI colors. | |
# It is recommended to use with a dark background. | |
# Colors: black, red, green, yellow, *blue, magenta, cyan, and white. | |
# | |
# Mar 2013 Yad Smood | |
# VCS | |
YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} " | |
YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}" |