Skip to content

Instantly share code, notes, and snippets.

28a1d14c-d17a-4950-8934-d20f2aa873e6
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewTreeObserver android.view.View.getViewTreeObserver()' on a null object reference
----
java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.ViewTreeObserver android.view.View.getViewTreeObserver()' on a null object reference
at android.widget.PopupWindow.attachToAnchor(PopupWindow.java:2773)
at android.widget.PopupWindow.showAsDropDown(PopupWindow.java:1446)
at org.mozilla.fenix.home.HomeFragment$recommendPrivateBrowsingShortcut$$inlined$let$lambda$1.run(HomeFragment.kt:7)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:246)
@sebhoss
sebhoss / install-latest-jetbrains-idea.sh
Created January 11, 2024 04:42
shell script to download latest JetBrains IntelliJ Ultimate
#!/usr/bin/env sh
###############################################################################
# This shell script downloads the latest IntelliJ Ultimate (IU) version
###############################################################################
# modify these at will
install_folder="${XDG_DATA_HOME:-$HOME/.local/share}/installations/software"
binary_folder=$(systemd-path user-binaries)
operating_system='linux'
=== RUN TestListValue
--- FAIL: TestListValue (0.00s)
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x30 pc=0x98b35f]
goroutine 18 [running]:
testing.tRunner.func1.2({0xf22fa0, 0x18bba60})
/usr/local/go/src/testing/testing.go:1396 +0x24e
testing.tRunner.func1()
@sebhoss
sebhoss / schema.json
Created October 27, 2022 06:01
terraform providers schema -json
{
"version": 0,
"block": {
"attributes": {
"api_version": {
"type": "string",
"description": "APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources",
"description_kind": "markdown",
"computed": true
},
@sebhoss
sebhoss / logoutput.txt
Created October 27, 2022 05:24
terraform trace output
This file has been truncated, but you can view the full file.
2022-10-27T05:15:34.642Z [TRACE] vertex "k8s_apps_stateful_set_v1.example": visit complete
2022-10-27T05:15:34.642Z [TRACE] vertex "output.resources (expand)": starting visit (*terraform.nodeExpandOutput)
2022-10-27T05:15:34.642Z [TRACE] vertex "output.resources (expand)": expanding dynamic subgraph
2022-10-27T05:15:34.642Z [TRACE] Expanding output: adding output.resources as *terraform.NodeApplyableOutput
2022-10-27T05:15:34.642Z [TRACE] vertex "output.resources (expand)": entering dynamic subgraph
2022-10-27T05:15:34.642Z [TRACE] vertex "provider[\"localhost/metio/k8s\"] (close)": starting visit (*terraform.graphNodeCloseProvider)
2022-10-27T05:15:34.642Z [TRACE] GRPCProvider.v6: Close
2022-10-27T05:15:34.642Z [TRACE] vertex "output.resources": starting visit (*terraform.NodeApplyableOutput)
2022-10-27T05:15:34.642Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2022-10-27T05:15:34.643Z [TRACE] setValue: Saving Create chang

Keybase proof

I hereby claim:

  • I am sebhoss on github.
  • I am sebhoss (https://keybase.io/sebhoss) on keybase.
  • I have a public key ASDOrdRvCiGtu4j4lAw06SXJqG0MU0QhRXlqwCWXUEX2pwo

To claim this, I am signing this object:

DSLContext database = Mockito.mock(DSLContext.class, Mockito.RETURNS_DEEP_STUBS);
Mockito.when(database.select(ACTIVITY_TYPE.ID)
.from(ACTIVITY_TYPE)
.where(ACTIVITY_TYPE.SINGLE_PERSON_USABLE.isTrue())
.fetch(ACTIVITY_TYPE.ID))
.thenReturn(ImmutableList.of(singleActivityTypeId));
Mockito.when(database.select(ACTIVITY_TYPE.ID)
.from(ACTIVITY_TYPE)
@sebhoss
sebhoss / Person aggregate
Last active August 29, 2015 14:14
Axon command/event handling
public class Person extends AbstractAnnotatedAggregateRoot<PersonId> {
@AggregateIdentifier
private PersonId id;
private String name;
private LocalDate birthday;
@CommandHandler
public Person(AddPersonCommand command) {
apply(new PersonAddedEvent(
@sebhoss
sebhoss / pom.xml
Created December 31, 2010 14:42
Sample POM for DocBook projects
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns = "http://maven.apache.org/POM/4.0.0"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->