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 http.server | |
import socketserver | |
import datetime | |
import sys | |
import socket | |
# Default port if not provided as a command-line argument | |
DEFAULT_PORT = 9999 | |
# Get the port from the command-line arguments, if provided |
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
package com.example.flightgear.view | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Paint | |
import android.graphics.PointF | |
import android.util.AttributeSet | |
import android.util.Log | |
import android.view.MotionEvent |
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
package com.example.flightgear.view | |
import android.content.Context | |
import android.graphics.Canvas | |
import android.graphics.Color | |
import android.graphics.Paint | |
import android.graphics.PointF | |
import android.util.AttributeSet | |
import android.util.Log | |
import android.view.MotionEvent |
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 SoundBoard(val ctx: Context) { | |
companion object { | |
private const val DELAY_BETWEEN_SOUNDS = 100L | |
private const val ADDITIONAL_DELAY_FOR_INVOCATION = 1000L | |
} | |
private val parentJob = Job() | |
private val handler = CoroutineExceptionHandler { _, throwable -> | |
Log.e(":::SoundBoard", "@handler -> exception ${throwable.message}") |
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 RulerView @JvmOverloads constructor(ctx: Context, attrs: AttributeSet? = null) : View(ctx, attrs), AnkoLogger { | |
private var centimeters: Int = 0 | |
private var cmSize = 0f | |
private val lPaint = Paint() | |
private val tPaint = TextPaint() | |
companion object { |