-
Clone the seed project https://github.com/kerimovscreations/cicdworkshop1
-
Check the classes and tests work correctly
BookingService
,
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
fun getShortenedCount(count: Int): String { | |
return if (count < 1000) { | |
count.toString() | |
} else if (count < 1000000) { | |
val firstPart = count / 1000 | |
val secondPart = count % 1000 / 100 | |
if (secondPart > 0) { | |
"$firstPart,${secondPart}k}" | |
} else { | |
"${firstPart}k" |
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
import { Directive, ElementRef, Output, HostListener, EventEmitter } from '@angular/core'; | |
@Directive({ | |
selector: '[appClickOutside]' | |
}) | |
export class ClickOutsideDirective { | |
constructor(private elementRef: ElementRef) { } | |
@Output() |
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
public static String getRelativeTimeSpanString(Context context, Date fromdate) { | |
long then; | |
then = fromdate.getTime(); | |
Date date = new Date(then); | |
StringBuilder dateStr = new StringBuilder(); | |
Calendar calendar = Calendar.getInstance(); | |
calendar.setTime(date); |
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
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.view.MotionEvent; | |
import android.view.ScaleGestureDetector; | |
import android.view.View; | |
import android.widget.FrameLayout; | |
/** | |
* Layout that provides pinch-zooming of content. This view should have exactly one child | |
* view containing the content. |
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
<?xml version="1.0" encoding="utf-8"?> | |
<resources> | |
<!--https://raw.githubusercontent.com/wada811/Android-Material-Design-Colors/master/library/src/main/res/values/colors.xml--> | |
<!-- red --> | |
<color name="md_red_50">#ffebee</color> | |
<color name="md_red_100">#ffcdd2</color> | |
<color name="md_red_200">#ef9a9a</color> | |
<color name="md_red_300">#e57373</color> |