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
{ | |
"login": { | |
"message": "If you are having trouble logging in please contact your account administrator." | |
}, | |
"main.home": { | |
"message": "This is your course home, a general overview of your current course load and to-do" | |
}, | |
"main.conversation": { | |
"message": "Welcome to your conversations! If you see nothing here try to create a conversations from the icon next to the one you just clicked!" | |
}, |
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
var rootFolder = $firebaseObject(FolderService.getFolders($scope.courseID)); | |
//reference to rootFolder is created and can be used, once the data is loaded | |
//it will show up in scope | |
//or wait till loaded like below | |
rootFolder.$loaded().then(function(){ | |
//do stuff with rootFolder | |
}) | |
... | |
getFolders: function(courseID) { |
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
class SecureUserStorage { | |
fun putUser(user: User, context: Context) { | |
val sharedpreferences = context.getSharedPreferences("userPrefs", Context.MODE_PRIVATE) | |
val crypto = Crypto( | |
SharedPrefsBackedKeyChain(context), | |
SystemNativeCryptoLibrary()) | |
try { | |
val json = LoganSquare.serialize(user) | |
val cipherArray = crypto.encrypt(json.toByteArray(), Entity("user")) |
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
class BitmapUtils { | |
companion object | |
} | |
fun BitmapUtils.Companion.getCompressedImage(pathName: String, scalingLogic: ImageView.ScaleType): String { | |
val options = BitmapFactory.Options() | |
options.inJustDecodeBounds = true | |
BitmapFactory.decodeFile(pathName, options) | |
options.inJustDecodeBounds = false | |
val dstWidth: Double = ((options.outWidth.toDouble() / (options.outWidth.toDouble() * options.outHeight.toDouble())) * 1000) * options.outWidth.toDouble() |
NewerOlder