private fun changedrawabletoUri(resourceId :Int):Uri{
val imageUri = (Uri.Builder())
.scheme(ContentResolver.SCHEME_ANDROID_RESOURCE)
.authority(resources.getResourcePackageName(resourceId))
.appendPath(resources.getResourceTypeName(resourceId))
.appendPath(resources.getResourceEntryName(resourceId))
.build()
return imageUri
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| countries.add(Country("af", "+93", "Afghanistan")) | |
| countries.add(Country("al", "+355", "Albania")) | |
| countries.add(Country("dz", "+213", "Algeria")) | |
| countries.add(Country("ad", "+376", "Andorra")) | |
| countries.add(Country("ao", "+244", "Angola")) | |
| countries.add(Country("ai", "+1", "Anguilla")) | |
| countries.add(Country("aq", "+672", "Antarctica")) | |
| countries.add(Country("ag", "+1", "Antigua and Barbuda")) | |
| countries.add(Country("ar", "+54", "Argentina")) | |
| countries.add(Country("am", "+374", "Armenia")) |
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
| find . -depth -name '* *' | while read fname | |
| do | |
| new_fname=`echo $fname | tr " " "_"` | |
| if [ -e $new_fname ] | |
| then | |
| echo "File $new_fname already exists. Not replacing $fname" | |
| else |
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/sh | |
| # lowerit | |
| # convert all file names in the current directory to lower case | |
| # only operates on plain files--does not change the name of directories | |
| # will ask for verification before overwriting an existing file | |
| for x in `ls` | |
| do | |
| if [ ! -f $x ]; then | |
| continue | |
| fi |
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
| class Order { | |
| String? uid; | |
| String? orderNo; | |
| String? email; | |
| String? phoneNumber; | |
| String? firstName; | |
| String? lastName; | |
| String? numberOfAdults; | |
| String? numberOfChildren; | |
| String? table; |
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
| fun listFilesInDirectory(directoryPath: String): List<File> { | |
| val directory = File(directoryPath) | |
| return directory.listFiles()?.toList() ?: emptyList() | |
| } | |
| //--- Implement Read text from file | |
| fun readTextFromFile(filePath: String): String? { | |
| val file = File(filePath) | |
| if (!file.exists() || !file.isFile) { | |
| return null |
OlderNewer