Skip to content

Instantly share code, notes, and snippets.

View CruciformHawk7's full-sized avatar
📦
git blame stalker

Nikhil Hari CruciformHawk7

📦
git blame stalker
View GitHub Profile
@CruciformHawk7
CruciformHawk7 / README.md
Created February 2, 2024 07:34
Component-preload.js extractor

Copy contents of Component-preload.js into a new file, Component.js. Remove the sap namespace bit from top, and place the contents of "modules" into a module.exports Run the code to extract

@CruciformHawk7
CruciformHawk7 / BaseController.js
Last active June 14, 2021 07:52
Change Theme automatically in OpenUI5/SAPUI5
setMode: function() {
const colorScheme = window.matchMedia("(prefers-color-scheme: dark)");
this.determineColoringScheme(colorScheme);
colorScheme.addEventListener("change", scheme => this.determineColoringScheme(scheme));
},
determineColoringScheme: function(colorScheme) {
if (colorScheme.matches)
sap.ui.getCore().applyTheme("sap_fiori_3_dark");
else
@CruciformHawk7
CruciformHawk7 / kotlinAppCLI.md
Last active June 4, 2019 20:05
Make a basic Kotlin application with Command-Line and Visual Studio Code

Kotlin Application with just Command-Line and VSCode

Tested on Gradle 5.4.1


I have been using the kotlinc and java -jar to run my cli applications, but when I wanted to extend my application to use JavaFX (tornadoFX), I realised I had to use gradle. To familiarise myself with the gradle environment, I pulled up several guides to fix this, but most of them failed to build/never produced a jar binary that I was familiar with. I am aware that I can use IntelliJ, but that is really not my taste.

  1. Open Command Prompt.
  2. Type mkdir HelloTest && cd HelloTest
  3. Then, gradle init
  4. Select 8: Kotlin Application, 1: Groovy.
Changed(WindowContainer.java:319)
06-18 11:15:49.878 3568 3594 E AndroidRuntime: at com.android.server.wm.RootWindowContainer.setDisplayOverrideConfigurationIfNeeded(RootWindowContainer.java:356)
06-18 11:15:49.878 3568 3594 E AndroidRuntime: at com.android.server.wm.WindowManagerService.setNewDisplayOverrideConfiguration(WindowManagerService.java:2631)
06-18 11:15:49.878 3568 3594 E AndroidRuntime: at com.android.server.am.ActivityManagerService.performDisplayOverrideConfigUpdate(ActivityManagerService.java:20619)
06-18 11:15:49.878 3568 3594 E AndroidRuntime: at com.android.server.am.ActivityManagerService.updateGlobalConfiguration(ActivityManagerService.java:20503)
06-18 11:15:49.878 3568 3594 E AndroidRuntime: at com.android.server.am.ActivityManagerService.updateDisplayOverrideConfigurationLocked(ActivityManagerService.java:20573)
06-18 11:15:49.878 3568 3594 E AndroidRuntime: at com.android.server.am.ActivityManagerService.updateDisplayOverrideConfig