This file contains hidden or 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
| #!/bin/bash | |
| # Filename: rename.sh | |
| path=$1 | |
| extension=$2 | |
| count=1 | |
| replace="" | |
| for entry in "$path"/* | |
| do | |
| oldfile=$(echo ${entry/$path/$replace}| cut -d'/' -f 2) |
This file contains hidden or 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
| var Cipher = (function () { | |
| var shiftCharactor = function (charAt) { | |
| if (charAt == 65) { | |
| return 93; // A -> Z | |
| } else if (charAt == 97) { | |
| return 122; // a -> z | |
| } else if (charAt == 93) { | |
| return 65; // Z -> A | |
| } else if (charAt == 122) { | |
| return 97; // z -> a |
This file contains hidden or 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 trikke.gists; | |
| import android.graphics.Typeface; | |
| import android.text.Spannable; | |
| import android.text.SpannableString; | |
| import android.text.style.BackgroundColorSpan; | |
| import android.text.style.ForegroundColorSpan; | |
| import android.text.style.RelativeSizeSpan; | |
| import android.text.style.StrikethroughSpan; | |
| import android.text.style.StyleSpan; |
This file contains hidden or 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
| -module (calculator). | |
| -export ([exponential/2, multiply/2]). | |
| multiply(_, 0) -> 1; | |
| multiply(Num, 1) -> Num; | |
| multiply(Num, Exp) -> Num + multiply(Num, Exp-1). | |
| exponential(_, 0) -> 1; | |
| exponential(Base, 1) -> Base; | |
| exponential(_, Exp) when(Exp < 0) -> throw("Bad argument"); |
This file contains hidden or 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
| -module (calculator). | |
| -export ([exponential/2, multiply/2]). | |
| exponential(_, Exp) when(Exp < 0) -> | |
| throw("Bad argument"); | |
| exponential(Num, Exp) when (Exp > 0) -> | |
| calc_exponential(Num, Num, Exp). | |
| calc_exponential(_, _, 0) -> |