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 ProfileActivity: GaragePresenter.Contract.View { | |
| lateinit var garagePresenter : GaragePresenter; | |
| fun onCreate(){ | |
| garagePresenter = GaragePresenter(this) | |
| garagePresenter.loadTheCars() // we just only need this function on this page | |
| } | |
| override fun onDeleteSucceed() { | |
| // tidak dipakai,dirty code, sia-sia! |
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
| ===== soal 1: 20 menit ============= | |
| Buatlah sebuah program yang mencetak angka dari 1 sampai dengan 100, | |
| yang mana, bila angka merupakan kelipatan tiga akan mencetak kata “Fizz” (tanpa tanda petik dua), | |
| lalu bila angka merupakan kelipatan lima akan mencetak “Buzz”, | |
| dan jika angka merupakan kelipatan tiga dan lima kedua-duanya, maka akan mencetak “FizzBuzz”. | |
| contoh output: | |
| 1 | |
| 2 | |
| Fizz |
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
| <Window x:Class="bookstore.MainWindow" | |
| xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
| xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
| xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
| xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
| xmlns:local="clr-namespace:bookstore" | |
| mc:Ignorable="d" | |
| Title="MainWindow" Height="450" Width="800"> | |
| <Window.Resources> | |
| <DataTemplate x:Key="DataTemplateItemBook"> |
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 main(args:Array<String>){ | |
| var view1 = ViewPage1() | |
| view1.main() | |
| var view2 = ViewPage2() | |
| view2.main() | |
| var view3 = ViewPage3() | |
| view3.main() | |
| } |
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
| <Window | |
| //.... | |
| Title="MainWindow" Height="452.55" Width="737.535"> | |
| <Grid> | |
| <Image HorizontalAlignment="Left" Height="100" Margin="45,105,0,0" VerticalAlignment="Top" Width="100" Source="assets/anggur.jpg" Stretch="Fill"/> | |
| <Image HorizontalAlignment="Left" Height="100" Margin="176,105,0,0" VerticalAlignment="Top" Width="100" Source="assets/apple.png" Stretch="Fill"/> | |
| <Image HorizontalAlignment="Left" Height="100" Margin="45,255,0,0" VerticalAlignment="Top" Width="100" Source="assets/banana.jpg"/> | |
| <Image HorizontalAlignment="Left" Height="100" Margin="176,255,0,0" VerticalAlignment="Top" Width="100" Source="assets/orange.png"/> | |
| <Button x:Name="Button1" Content="Add" HorizontalAlignment="Left" Margin="57,217,0,0" VerticalAlignment="Top" Width="75" Click="Button1_Click"/> | |
| <Button x:Name="Button2" Content="Add" HorizontalAlignment="Left" Margin="187,216,0,0" VerticalAlignment="Top" Width="75" Click="Button2_Click"/> |
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
| <Window x:Class="TheCompany.MainWindow" | |
| Title="MainWindow" Height="710" Width="470"> | |
| <Grid Margin="0,0,2,-3"> | |
| <ListBox x:Name="listBox" HorizontalAlignment="Left" Height="217" Margin="58,328,0,0" VerticalAlignment="Top" Width="344"> | |
| <ListBox.ItemTemplate> | |
| <DataTemplate> | |
| <Grid Margin="0,2"> | |
| <Grid.ColumnDefinitions> | |
| <ColumnDefinition Width="100" /> | |
| <ColumnDefinition Width="75" /> |
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
| TheGunListener theGunListener = new TheGunListener(); | |
| //shotGun is take out one projectiles per shoot | |
| Gun shotGun = new ShotGun("S12K", "Brown"); | |
| shotGun.addProjectile(3); | |
| shotGun.setOnShootListener(theGunListener); | |
| //Deagle is take out two projectiles in one shoot | |
| Gun deagle = new Deagle("Deagle", "Red"); | |
| deagle.addProjectile(3); | |
| deagle.setOnShootListener(theGunListener); |
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 PrivacyPolicy : AppCompatActivity() { | |
| val privacyPolicyUrl = "http://hepicar.com/privacy_policy.html" | |
| override fun onCreate(savedInstanceState: Bundle?) { | |
| super.onCreate(savedInstanceState) | |
| setContentView(R.layout.activity_privacy_policy) | |
| title = "Privacy Policy" | |
| val webViewClient = object :WebViewClient(){ |
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
| function myFunction() { | |
| String.prototype.format = function() { | |
| a = this; | |
| for (k in arguments) { | |
| a = a.replace("{" + k + "}", arguments[k]) | |
| } | |
| return a | |
| }; | |
| var weekday = new Array(7); | |
| weekday[0] = "Minggu"; |
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
| apply plugin: 'com.android.library' | |
| apply plugin: 'kotlin-android' | |
| apply plugin: 'maven-publish' | |
| publishing { | |
| publications { | |
| library(MavenPublication) { | |
| // Don't forget to change these | |
| groupId 'com.hepicar' | |
| artifactId 'sdk' | |
| version '0.0.1' |