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
| # users/admin.py | |
| from django.contrib import admin | |
| from django.contrib.auth import get_user_model | |
| from django.contrib.auth.admin import UserAdmin | |
| from .forms import CustomUserCreationForm, CustomUserChangeForm | |
| from .models import CustomUser | |
| class CustomUserAdmin(UserAdmin): | |
| add_form = CustomUserCreationForm |
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 Shape { | |
| var numberOfSides = 0 | |
| fun simpleDescription() = | |
| "A shape with $numberOfSides sides." | |
| } | |
| var shape = Shape() | |
| shape.numberOfSides = 7 | |
| println(shape.simpleDescription()) |
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
| Empty file |
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
| //the readline function reads data input by the user into the keyboard | |
| //this is similar to the scanner class in java. | |
| fun main(args :Array<String>){ | |
| print("Enter a number") | |
| val dataInput = readLine() | |
| println() | |
| print("Enter the second number") | |
| val secondNumber = readLine() | |
| println(dataInput) |
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
| <?xml version="1.0" encoding="UTF-8"?> | |
| <project version="4"> | |
| <component name="Kotlin2JvmCompilerArguments"> | |
| <option name="jvmTarget" value="1.8" /> | |
| </component> | |
| <component name="KotlinCommonCompilerArguments"> | |
| <option name="apiVersion" value="1.2" /> | |
| <option name="languageVersion" value="1.2" /> | |
| </component> | |
| </project> |
NewerOlder