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
| // Set the constants for schedule and pay rate | |
| const schedule = { | |
| start: "09:00", // Start of schedule in HH:mm format | |
| end: "17:00", // End of schedule in HH:mm format | |
| breakStart: "12:00", // Start of break time in HH:mm format | |
| breakEnd: "13:00" // End of break time in HH:mm format | |
| }; | |
| const payRate = 100; // Pay rate in dollars per day |
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
| import tauri.ShellMod | |
| import typings.std.stdStrings.close | |
| import typings.tauriAppsApi.tauriAppsApiStrings | |
| import scala.util.Failure | |
| import scala.util.Success | |
| import scala.concurrent.Future | |
| import scala.collection.mutable.ArrayBuffer | |
| import scala.concurrent.Promise | |
| import scalajs.js.JSConverters.iterableOnceConvertible2JSRichIterableOnce |
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
| mkdir: can't create directory '/config/usb_gadget/g1/functions/rndis.usb0': Function not implemented | |
| Couldn't create /config/usb_gadget/g1/functions/rndis.usb0 | |
| ln: /config/usb_gadget/g1/configs/c.1/rndis.usb0: No such file or directory | |
| Couldn't symlink rndis.usb0 | |
| ~ # ls /config/usb_gadget/g1/functions/ | |
| ~ # |
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
| import org.scalajs.dom.document | |
| import org.scalajs.dom.window | |
| import org.scalajs.dom.URL | |
| import org.scalajs.dom.Blob | |
| def download(filename: String, contents: Blob): Unit = { | |
| val elem = window.document.createElement("a").asInstanceOf[HTMLAnchorElement]; | |
| elem.href = URL.createObjectURL(contents); | |
| elem.download = filename; | |
| document.body.appendChild(elem); |
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
| import scala.scalajs.js | |
| import typings.node.dgramMod as dgram | |
| import typings.node.dgramMod.SocketType | |
| import typings.node.nodeStrings.message | |
| import typings.node.global.console | |
| import typings.std.stdStrings.add | |
| object Dgram { | |
| def send(msg: String, host: String, port: Int): Unit = { |
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
| import scala.concurrent.Future | |
| import scala.scalajs.js | |
| import scala.util.Success | |
| import scala.util.Failure | |
| object SelfTest { | |
| def GREEN_CIRCLE: String = "\uD83D\uDFE2" | |
| def RED_CIRCLE: String = "\uD83D\uDD34" |
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
| import scala.concurrent.Future | |
| import org.scalajs.dom | |
| import org.scalajs.dom.Request | |
| import org.scalajs.dom.Fetch | |
| import org.scalajs.dom.HttpMethod | |
| import org.scalajs.dom.RequestInit | |
| import org.scalajs.dom.Headers | |
| implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global | |
| object ApiClient { |
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
| import elemental2.dom.DomGlobal; | |
| import elemental2.promise.Promise; | |
| import java.util.List; | |
| import java.util.function.Supplier; | |
| public class Tests { | |
| public static final String GREEN_CIRCLE = "\uD83D\uDFE2"; | |
| public static final String RED_CIRCLE = "\uD83D\uDD34"; |
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
| import elemental2.dom.XMLHttpRequest; | |
| import elemental2.promise.Promise; | |
| public class Http { | |
| enum HttpMethod { | |
| GET, POST | |
| } | |
| public static Promise<String> request(HttpMethod method, String url) { |