问:
Retrieve data from Firestore with Getx in InitState DragAndDrop
Somebody can help me with this? I'm learning Flutter. I don't know how do this when is StatefulWidget.

How can I get my data from FirebaseFirestore and put in this:

I'm using the package https://pub.dev/packages/drag_and_drop_lists and I'm trying to use the example https://github.com/philip-brink/DragAndDropLists/blob/master/example/lib/list_tile_example.dart in InitState their have this code:

```<code>import 'package:drag_and_drop_lists/drag_and_drop_lists.dart';
import 'package:example/navigation_drawer.dart';
import 'package:flutter/material.dart';

class ListTileExample extends StatefulWidget {
  const ListTileExample({Key? key}) : super(key: key);

  @override
  State createState() => _ListTileExample();
}

class _ListTileExample extends State<ListTileExample> {
  late List<DragAndDropList> _contents;

  @override
  void initState() {
    super.initState();

_contents = List.generate(4, (index) {
  return DragAndDropList(
    header: Column(
      children: <Widget>[
        ListTile(
          title: Text(
            'Header $index',
          ),
          subtitle: Text('Header $index subtitle'),
        ),
        const Divider(),
      ],
    ),
    footer: Column(
      children: <Widget>[
        const Divider(),
        ListTile(
          title: Text(
            'Footer $index',
          ),
          subtitle: Text('Footer $index subtitle'),
        ),
      ],
    ),
    children: <DragAndDropItem>[
      DragAndDropItem(
        child: ListTile(
          title: Text(
            'Sub $index.1',
          ),
          trailing: const Icon(Icons.access_alarm),
        ),
      ),
    ],
  );
});
}
</code>```

This is my Controller:

```<code>class CrController extends GetxController {
  Rx<List<CrModel>> crList = Rx<List<CrModel>>([]);

  List<CrModel> get crs => crList.value;

  void filterCr(String cr) {
    List<CrModel> results = [];
    if (cr.isEmpty) {
      results = crList.value;
    } else {
      results = crList.value
          .where((element) => element.cr
          .toString()
              .toLowerCase()
              .contains(cr.toLowerCase()))
          .toList();
    }
    crList.value = results;
  }
}
</code>```

This is my Model:

```<code>class crModel {
crModel({
  required this.id,
  required this.iSp,
  required this.cr,
});

late final String id;
late final String iSp;
late final String cr;
factory crModel.fromJson(String str) =>
    crModel.fromMap(json.decode(str));
String toJson() => json.encode(toMap());
factory crModel.fromMap(Map<String, dynamic> json) => crModel(
    id: json['id'], iSp: json["iSp"], cr: json["cr"]);

Map<String, dynamic> toMap() => {
  "iSp": iSp,
  "cr": cr,
};

crModel.fromDocumentSnapshot(
    {required DocumentSnapshot documentSnapshot}) {
    id = documentSnapshot.id;
    cr = documentSnapshot['cr'];
    iSp = documentSnapshot["iSp"];
    }
  }
</code>```

Body:
Somebody can help me with this? I'm learning Flutter. I don't know how do this when is StatefulWidget.

How can I get my data from FirebaseFirestore and put in this:

I'm using the package https://pub.dev/packages/drag_and_drop_lists and I'm trying to use the example https://github.com/philip-brink/DragAndDropLists/blob/master/example/lib/list_tile_example.dart in InitState their have this code:

import 'package:drag_and_drop_lists/drag_and_drop_lists.dart';
import 'package:example/navigation_drawer.dart';
import 'package:flutter/material.dart';

class ListTileExample extends StatefulWidget {
  const ListTileExample({Key? key}) : super(key: key);

  @override
  State createState() => _ListTileExample();
}

class _ListTileExample extends State<ListTileExample> {
  late List<DragAndDropList> _contents;

  @override
  void initState() {
    super.initState();

_contents = List.generate(4, (index) {
  return DragAndDropList(
    header: Column(
      children: <Widget>[
        ListTile(
          title: Text(
            'Header $index',
          ),
          subtitle: Text('Header $index subtitle'),
        ),
        const Divider(),
      ],
    ),
    footer: Column(
      children: <Widget>[
        const Divider(),
        ListTile(
          title: Text(
            'Footer $index',
          ),
          subtitle: Text('Footer $index subtitle'),
        ),
      ],
    ),
    children: <DragAndDropItem>[
      DragAndDropItem(
        child: ListTile(
          title: Text(
            'Sub $index.1',
          ),
          trailing: const Icon(Icons.access_alarm),
        ),
      ),
    ],
  );
});
}

This is my Controller:

class CrController extends GetxController {
  Rx<List<CrModel>> crList = Rx<List<CrModel>>([]);

  List<CrModel> get crs => crList.value;

  void filterCr(String cr) {
    List<CrModel> results = [];
    if (cr.isEmpty) {
      results = crList.value;
    } else {
      results = crList.value
          .where((element) => element.cr
          .toString()
              .toLowerCase()
              .contains(cr.toLowerCase()))
          .toList();
    }
    crList.value = results;
  }
}

This is my Model:

class crModel {
crModel({
  required this.id,
  required this.iSp,
  required this.cr,
});

late final String id;
late final String iSp;
late final String cr;
factory crModel.fromJson(String str) =>
    crModel.fromMap(json.decode(str));
String toJson() => json.encode(toMap());
factory crModel.fromMap(Map<String, dynamic> json) => crModel(
    id: json['id'], iSp: json["iSp"], cr: json["cr"]);

Map<String, dynamic> toMap() => {
  "iSp": iSp,
  "cr": cr,
};

crModel.fromDocumentSnapshot(
    {required DocumentSnapshot documentSnapshot}) {
    id = documentSnapshot.id;
    cr = documentSnapshot['cr'];
    iSp = documentSnapshot["iSp"];
    }
  }


来源: stackexchange

问:
An error occurs after applying proguard on kitkat os 4.4
An error occurs when the minifyEnabled = true option is applied. In case of false, it doesn't happen.

When I checked where the error occurred, the error occurred in the part that initializes the google analytics instance.

```<code>I/dalvikvm(10764): Could not find method android.app.job.JobScheduler.cancel, referenced from method com.google.android.gms.internal.gtm.zzcy.zza
W/dalvikvm(10764): VFY: unable to resolve virtual method 629: Landroid/app/job/JobScheduler;.cancel (I)V
W/dalvikvm(10764): VFY:  rejecting opcode 0x6e at 0x002d
W/dalvikvm(10764): VFY:  rejected Lcom/google/android/gms/internal/gtm/zzcy;.zza ()V
W/dalvikvm(10764): Exception Ljava/lang/VerifyError; thrown while initializing Lcom/rsupport/rs/util/Analytics;

public final void zza() {
    this.zzb = false;

    try {
        this.zzc.cancel(this.zzg());
    } catch (NullPointerException var3) {
    }

    if (VERSION.SDK_INT >= 24) {
        Context var1 = this.zzo();
        Object var4 = var1.getSystemService("jobscheduler");
        JobScheduler var5 = (JobScheduler)var4;
        int var2 = this.zzf();
        this.zzP("Cancelling job. JobID", var2);
        var5.cancel(var2);
    }
}
</code>```

I added the corresponding syntax to proguard to solve this problem.

```<code>-keep class com.google.** {*;}
</code>```

Nevertheless, the error is not resolved.

I know that job scheduler is available since os5 and above. However, since analytics uses jobscheduler, there is no way to modify it.

how can i solve this??

ContentLicense: CC BY-SA 4.0

Body:
An error occurs when the minifyEnabled = true option is applied. In case of false, it doesn't happen.

When I checked where the error occurred, the error occurred in the part that initializes the google analytics instance.

I/dalvikvm(10764): Could not find method android.app.job.JobScheduler.cancel, referenced from method com.google.android.gms.internal.gtm.zzcy.zza
W/dalvikvm(10764): VFY: unable to resolve virtual method 629: Landroid/app/job/JobScheduler;.cancel (I)V
W/dalvikvm(10764): VFY:  rejecting opcode 0x6e at 0x002d
W/dalvikvm(10764): VFY:  rejected Lcom/google/android/gms/internal/gtm/zzcy;.zza ()V
W/dalvikvm(10764): Exception Ljava/lang/VerifyError; thrown while initializing Lcom/rsupport/rs/util/Analytics;

public final void zza() {
    this.zzb = false;

    try {
        this.zzc.cancel(this.zzg());
    } catch (NullPointerException var3) {
    }

    if (VERSION.SDK_INT >= 24) {
        Context var1 = this.zzo();
        Object var4 = var1.getSystemService("jobscheduler");
        JobScheduler var5 = (JobScheduler)var4;
        int var2 = this.zzf();
        this.zzP("Cancelling job. JobID", var2);
        var5.cancel(var2);
    }
}

I added the corresponding syntax to proguard to solve this problem.

-keep class com.google.** {*;}

Nevertheless, the error is not resolved.

I know that job scheduler is available since os5 and above. However, since analytics uses jobscheduler, there is no way to modify it.

how can i solve this??


问:
Verify output of xset
`

```<code>#!/bin/bash
foo=$(cat /sys/class/leds/input3::numlock/brightness)
if $foo=1
then
    notify-send 'Keyboard alert' 'Numlock Off.' --icon=dialog-information
else
    notify-send 'Keyboard alert' 'Numlock On.' --icon=dialog-information
fi
exit 0

</code>```

`

So many variations of if var I'm exhausted.

Title: Verify output of xset

Body:
`

#!/bin/bash
foo=$(cat /sys/class/leds/input3::numlock/brightness)
if $foo=1
then
    notify-send 'Keyboard alert' 'Numlock Off.' --icon=dialog-information
else
    notify-send 'Keyboard alert' 'Numlock On.' --icon=dialog-information
fi
exit 0

`

So many variations of if var I'm exhausted.


问:
Webscraping images from just a Wikipedia table
I am having a tough time trying to figure out how to webscrape tables from the US National Parks table images in order of the table.

I am using the Wikipedia python library which allows me to get a list of the images but not in order of the way they show up on the webpage.

```<code>wp.page('List_of_national_parks_of_the_United_States').images
</code>```

Wikipedia Page: https://en.wikipedia.org/wiki/List_of_national_parks_of_the_United_States

Body:
I am having a tough time trying to figure out how to webscrape tables from the US National Parks table images in order of the table.

I am using the Wikipedia python library which allows me to get a list of the images but not in order of the way they show up on the webpage.

wp.page('List_of_national_parks_of_the_United_States').images

Wikipedia Page: https://en.wikipedia.org/wiki/List_of_national_parks_of_the_United_States


问:
how to separate codegen for special operator?
I have many explode function in one compute. It oom.heap dump

I found explode function will codegen in one class, the intermediate result will be buffered in memory.
spark web ui
How can i avoid this promble? separate codegen?

```<code> public Object generate(Object[] references) {
        return new GeneratedIteratorForCodegenStage1(references);
    }

    /*wsc_codegenStageId*/
    final class GeneratedIteratorForCodegenStage1 extends org.apache.spark.sql.execution.BufferedRowIterator {
        private Object[] references;
        private scala.collection.Iterator[] inputs;
        private scala.collection.Iterator scan_input_0;
        private boolean generate_generate_isNull_3_0;
        private boolean generate_generate_isNull_14_0;
        private org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter[] scan_mutableStateArray_0 = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter[10];

        public GeneratedIteratorForCodegenStage1(Object[] references) {
            this.references = references;
        }

        public void init(int index, scala.collection.Iterator[] inputs) {
            partitionIndex = index;
            this.inputs = inputs;
            scan_input_0 = inputs[0];
            scan_mutableStateArray_0[0] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(1, 32);
            scan_mutableStateArray_0[1] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(1, 32);

            scan_mutableStateArray_0[2] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(2, 64);
            scan_mutableStateArray_0[3] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(2, 64);
            scan_mutableStateArray_0[4] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(2, 64);
            scan_mutableStateArray_0[5] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(3, 96);
            scan_mutableStateArray_0[6] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(3, 96);
            scan_mutableStateArray_0[7] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(3, 96);
            scan_mutableStateArray_0[8] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(4, 128);
            scan_mutableStateArray_0[9] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(4, 128);

        }

        private void generate_doConsume_2(UTF8String generate_expr_0_2, boolean generate_exprIsNull_0_2, UTF8String generate_expr_1_1, UTF8String generate_expr_2_0) throws java.io.IOException {
            ArrayData generate_value_26 = null;
            generate_value_26 = new org.apache.spark.sql.catalyst.util.GenericArrayData(generate_expr_1_1.split(((UTF8String) references[7] /* literal */), -1));

            int generate_numElements_2 = false ? 0 : generate_value_26.numElements();
            for (int generate_index_2 = 0; generate_index_2 < generate_numElements_2; generate_index_2++) {
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[8] /* numOutputRows */).add(1);

// common sub-expressions

                UTF8String generate_col_2 = generate_value_26.getUTF8String(generate_index_2);
                scan_mutableStateArray_0[9].reset();

                scan_mutableStateArray_0[9].zeroOutNullBytes();

                if (generate_exprIsNull_0_2) {
                    scan_mutableStateArray_0[9].setNullAt(0);
                } else {
                    scan_mutableStateArray_0[9].write(0, generate_expr_0_2);
                }

                scan_mutableStateArray_0[9].write(1, generate_expr_1_1);

                scan_mutableStateArray_0[9].write(2, generate_expr_2_0);

                scan_mutableStateArray_0[9].write(3, generate_col_2);
                append((scan_mutableStateArray_0[9].getRow()).copy());

            }

        }

        private void generate_doConsume_1(UTF8String generate_expr_0_1, boolean generate_exprIsNull_0_1, UTF8String generate_expr_1_0) throws java.io.IOException {
            generate_generate_isNull_14_0 = true;
            UTF8String generate_value_14 = null;
            do {
                if (!generate_exprIsNull_0_1) {
                    generate_generate_isNull_14_0 = false;
                    generate_value_14 = generate_expr_0_1;
                    continue;
                }

                if (!false) {
                    generate_generate_isNull_14_0 = false;
                    generate_value_14 = ((UTF8String) references[4] /* literal */);
                    continue;
                }

            } while (false);

            ArrayData generate_value_13 = null;
            generate_value_13 = new org.apache.spark.sql.catalyst.util.GenericArrayData(generate_value_14.split(((UTF8String) references[5] /* literal */), -1));

            int generate_numElements_1 = false ? 0 : generate_value_13.numElements();
            for (int generate_index_1 = 0; generate_index_1 < generate_numElements_1; generate_index_1++) {
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[6] /* numOutputRows */).add(1);

// common sub-expressions

                UTF8String generate_col_1 = generate_value_13.getUTF8String(generate_index_1);

                generate_doConsume_2(generate_expr_0_1, generate_exprIsNull_0_1, generate_expr_1_0, generate_col_1);

            }

        }

        protected void processNext() throws java.io.IOException {
            while (scan_input_0.hasNext()) {
                InternalRow scan_row_0 = (InternalRow) scan_input_0.next();
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[0] /* numOutputRows */).add(1);
                boolean scan_isNull_0 = scan_row_0.isNullAt(0);
                UTF8String scan_value_0 = scan_isNull_0 ?
                        null : (scan_row_0.getUTF8String(0));

                generate_doConsume_0(scan_value_0, scan_isNull_0);
                if (shouldStop()) return;
            }
        }

        private void generate_doConsume_0(UTF8String generate_expr_0_0, boolean generate_exprIsNull_0_0) throws java.io.IOException {
            generate_generate_isNull_3_0 = true;
            UTF8String generate_value_3 = null;
            do {
                if (!generate_exprIsNull_0_0) {
                    generate_generate_isNull_3_0 = false;
                    generate_value_3 = generate_expr_0_0;
                    continue;
                }

                if (!false) {
                    generate_generate_isNull_3_0 = false;
                    generate_value_3 = ((UTF8String) references[1] /* literal */);
                    continue;
                }

            } while (false);

            ArrayData generate_value_2 = null;
            generate_value_2 = new org.apache.spark.sql.catalyst.util.GenericArrayData(generate_value_3.split(((UTF8String) references[2] /* literal */), -1));

            int generate_numElements_0 = false ? 0 : generate_value_2.numElements();
            for (int generate_index_0 = 0; generate_index_0 < generate_numElements_0; generate_index_0++) {
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[3] /* numOutputRows */).add(1);

// common sub-expressions

                UTF8String generate_col_0 = generate_value_2.getUTF8String(generate_index_0);

                generate_doConsume_1(generate_expr_0_0, generate_exprIsNull_0_0, generate_col_0);

            }

        }

    }
</code>```

explain output

```<code>== Physical Plan ==
AdaptiveSparkPlan isFinalPlan=false
+- Project [__fcol_4#345 AS table#482, __fcol_5#346 AS table-aaa#483, __fcol_7#335 AS table-bbb#484, __fcol_12#423 AS table-1#485]
   +- Project [__fcol_4#345, __fcol_5#346, __fcol_7#335, UDF(SPLITPART($0$, $1$, 1), , [$1$,$0$], [string_type,string_type], [], array(__fcol_11#417, __fcol_4#345), [], []) AS __fcol_12#423]
      +- Project [__fcol_1#330 AS __fcol_4#345, __fcol_3#323 AS __fcol_5#346, __fcol_7#335, UDF(",", , [], [], [], [], [], []) AS __fcol_11#417]
         +- Generate explode(split(coalesce(__fcol_1#330, ), :, -1)), [__fcol_1#330, __fcol_3#323], false, [__fcol_7#335]
            +- Project [__fcol_0#320 AS __fcol_1#330, __fcol_3#323]
               +- Generate explode(split(coalesce(__fcol_0#320, ), :, -1)), [__fcol_0#320], false, [__fcol_3#323]
                     +- Exchange SinglePartition, ENSURE_REQUIREMENTS, [id=#210]
                           +- Project [table#252 AS __fcol_0#320]
                              +- Scan [table#252] PushedFilters: [], ReadSchema: struct<table:string>
</code>```

I try to separate codegen to avoid this oom.
But i don't know how to do this, or there is a better way to solve this.

Body:
I have many explode function in one compute. It oom.heap dump

I found explode function will codegen in one class, the intermediate result will be buffered in memory.
spark web ui
How can i avoid this promble? separate codegen?

 public Object generate(Object[] references) {
        return new GeneratedIteratorForCodegenStage1(references);
    }

    /*wsc_codegenStageId*/
    final class GeneratedIteratorForCodegenStage1 extends org.apache.spark.sql.execution.BufferedRowIterator {
        private Object[] references;
        private scala.collection.Iterator[] inputs;
        private scala.collection.Iterator scan_input_0;
        private boolean generate_generate_isNull_3_0;
        private boolean generate_generate_isNull_14_0;
        private org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter[] scan_mutableStateArray_0 = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter[10];

        public GeneratedIteratorForCodegenStage1(Object[] references) {
            this.references = references;
        }

        public void init(int index, scala.collection.Iterator[] inputs) {
            partitionIndex = index;
            this.inputs = inputs;
            scan_input_0 = inputs[0];
            scan_mutableStateArray_0[0] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(1, 32);
            scan_mutableStateArray_0[1] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(1, 32);

            scan_mutableStateArray_0[2] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(2, 64);
            scan_mutableStateArray_0[3] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(2, 64);
            scan_mutableStateArray_0[4] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(2, 64);
            scan_mutableStateArray_0[5] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(3, 96);
            scan_mutableStateArray_0[6] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(3, 96);
            scan_mutableStateArray_0[7] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(3, 96);
            scan_mutableStateArray_0[8] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(4, 128);
            scan_mutableStateArray_0[9] = new org.apache.spark.sql.catalyst.expressions.codegen.UnsafeRowWriter(4, 128);

        }

        private void generate_doConsume_2(UTF8String generate_expr_0_2, boolean generate_exprIsNull_0_2, UTF8String generate_expr_1_1, UTF8String generate_expr_2_0) throws java.io.IOException {
            ArrayData generate_value_26 = null;
            generate_value_26 = new org.apache.spark.sql.catalyst.util.GenericArrayData(generate_expr_1_1.split(((UTF8String) references[7] /* literal */), -1));

            int generate_numElements_2 = false ? 0 : generate_value_26.numElements();
            for (int generate_index_2 = 0; generate_index_2 < generate_numElements_2; generate_index_2++) {
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[8] /* numOutputRows */).add(1);

// common sub-expressions

                UTF8String generate_col_2 = generate_value_26.getUTF8String(generate_index_2);
                scan_mutableStateArray_0[9].reset();

                scan_mutableStateArray_0[9].zeroOutNullBytes();

                if (generate_exprIsNull_0_2) {
                    scan_mutableStateArray_0[9].setNullAt(0);
                } else {
                    scan_mutableStateArray_0[9].write(0, generate_expr_0_2);
                }

                scan_mutableStateArray_0[9].write(1, generate_expr_1_1);

                scan_mutableStateArray_0[9].write(2, generate_expr_2_0);

                scan_mutableStateArray_0[9].write(3, generate_col_2);
                append((scan_mutableStateArray_0[9].getRow()).copy());

            }

        }

        private void generate_doConsume_1(UTF8String generate_expr_0_1, boolean generate_exprIsNull_0_1, UTF8String generate_expr_1_0) throws java.io.IOException {
            generate_generate_isNull_14_0 = true;
            UTF8String generate_value_14 = null;
            do {
                if (!generate_exprIsNull_0_1) {
                    generate_generate_isNull_14_0 = false;
                    generate_value_14 = generate_expr_0_1;
                    continue;
                }

                if (!false) {
                    generate_generate_isNull_14_0 = false;
                    generate_value_14 = ((UTF8String) references[4] /* literal */);
                    continue;
                }

            } while (false);

            ArrayData generate_value_13 = null;
            generate_value_13 = new org.apache.spark.sql.catalyst.util.GenericArrayData(generate_value_14.split(((UTF8String) references[5] /* literal */), -1));

            int generate_numElements_1 = false ? 0 : generate_value_13.numElements();
            for (int generate_index_1 = 0; generate_index_1 < generate_numElements_1; generate_index_1++) {
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[6] /* numOutputRows */).add(1);

// common sub-expressions

                UTF8String generate_col_1 = generate_value_13.getUTF8String(generate_index_1);

                generate_doConsume_2(generate_expr_0_1, generate_exprIsNull_0_1, generate_expr_1_0, generate_col_1);

            }

        }

        protected void processNext() throws java.io.IOException {
            while (scan_input_0.hasNext()) {
                InternalRow scan_row_0 = (InternalRow) scan_input_0.next();
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[0] /* numOutputRows */).add(1);
                boolean scan_isNull_0 = scan_row_0.isNullAt(0);
                UTF8String scan_value_0 = scan_isNull_0 ?
                        null : (scan_row_0.getUTF8String(0));

                generate_doConsume_0(scan_value_0, scan_isNull_0);
                if (shouldStop()) return;
            }
        }

        private void generate_doConsume_0(UTF8String generate_expr_0_0, boolean generate_exprIsNull_0_0) throws java.io.IOException {
            generate_generate_isNull_3_0 = true;
            UTF8String generate_value_3 = null;
            do {
                if (!generate_exprIsNull_0_0) {
                    generate_generate_isNull_3_0 = false;
                    generate_value_3 = generate_expr_0_0;
                    continue;
                }

                if (!false) {
                    generate_generate_isNull_3_0 = false;
                    generate_value_3 = ((UTF8String) references[1] /* literal */);
                    continue;
                }

            } while (false);

            ArrayData generate_value_2 = null;
            generate_value_2 = new org.apache.spark.sql.catalyst.util.GenericArrayData(generate_value_3.split(((UTF8String) references[2] /* literal */), -1));

            int generate_numElements_0 = false ? 0 : generate_value_2.numElements();
            for (int generate_index_0 = 0; generate_index_0 < generate_numElements_0; generate_index_0++) {
                ((org.apache.spark.sql.execution.metric.SQLMetric) references[3] /* numOutputRows */).add(1);

// common sub-expressions

                UTF8String generate_col_0 = generate_value_2.getUTF8String(generate_index_0);

                generate_doConsume_1(generate_expr_0_0, generate_exprIsNull_0_0, generate_col_0);

            }

        }

    }

explain output

== Physical Plan ==
AdaptiveSparkPlan isFinalPlan=false
+- Project [__fcol_4#345 AS table#482, __fcol_5#346 AS table-aaa#483, __fcol_7#335 AS table-bbb#484, __fcol_12#423 AS table-1#485]
   +- Project [__fcol_4#345, __fcol_5#346, __fcol_7#335, UDF(SPLITPART($0$, $1$, 1), , [$1$,$0$], [string_type,string_type], [], array(__fcol_11#417, __fcol_4#345), [], []) AS __fcol_12#423]
      +- Project [__fcol_1#330 AS __fcol_4#345, __fcol_3#323 AS __fcol_5#346, __fcol_7#335, UDF(",", , [], [], [], [], [], []) AS __fcol_11#417]
         +- Generate explode(split(coalesce(__fcol_1#330, ), :, -1)), [__fcol_1#330, __fcol_3#323], false, [__fcol_7#335]
            +- Project [__fcol_0#320 AS __fcol_1#330, __fcol_3#323]
               +- Generate explode(split(coalesce(__fcol_0#320, ), :, -1)), [__fcol_0#320], false, [__fcol_3#323]
                     +- Exchange SinglePartition, ENSURE_REQUIREMENTS, [id=#210]
                           +- Project [table#252 AS __fcol_0#320]
                              +- Scan [table#252] PushedFilters: [], ReadSchema: struct

I try to separate codegen to avoid this oom.
But i don't know how to do this, or there is a better way to solve this.


问:
Flutter: I enabled the immersive mode and the AppBar stays big. When I make it smaller the title becomes cropped and does not go up with the AppBar

The image above shows how I enabled the immersive mode.

This is how the AppBar looks without any modification.

And this is how it looks like, when I set the toolbarHeight to 10.

Here is the code from the image:

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) => Scaffold(
    appBar: AppBar(
      backgroundColor: const Color(0xFF892D89),
      toolbarHeight: 10,
      centerTitle: true,
      title: Container(
        height: 30,
        child: Image.asset('assets/fontlogo.png'),
      ),
    ),
  );
}
```
<p>I tried various of ways to solve this problem, but couldn't do it. One of those ways was to set <code>resizeToAvoidBottomInset</code> to <code>true</code>.</p>
<pre class="lang-dart prettyprint-override"><code>Scaffold(
  resizeToAvoidBottomInset: true,
),
</code>```

Or to use titleSpacing.

AppBar(
  titleSpacing: 50,
  title: Text('SignShine'),
),
```

If someone knows the solution, I would appreciate the reply and thank them in advance.

Body:
The image above shows how I enabled the immersive mode.

This is how the AppBar looks without any modification.

And this is how it looks like, when I set the toolbarHeight to 10.

Here is the code from the image:

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) => Scaffold(
    appBar: AppBar(
      backgroundColor: const Color(0xFF892D89),
      toolbarHeight: 10,
      centerTitle: true,
      title: Container(
        height: 30,
        child: Image.asset('assets/fontlogo.png'),
      ),
    ),
  );
}

I tried various of ways to solve this problem, but couldn't do it. One of those ways was to set resizeToAvoidBottomInset to true.

Scaffold(
  resizeToAvoidBottomInset: true,
),

Or to use titleSpacing.

AppBar(
  titleSpacing: 50,
  title: Text('SignShine'),
),

If someone knows the solution, I would appreciate the reply and thank them in advance.


问:
An assist ball with some other icons appear on phone while on a call, why is it coming on my Redmi Note11, Android 12 phone?
An assist ball with some other icons appear on phone while on a call, why is it coming on my Redmi Note11, Android 12 phone?
Phone screenshot while on a call.</p>


问:
Roblox Number Values Not Working Properly
```<code>local debounce = false

script.Parent.Touched:Connect(function(hit)
    local hum = hit.Parent:FindFirstChild("Humanoid")
    if hum then
        local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
        if plr and debounce == false then
            debounce = true
            plr:FindFirstChild("leaderstats").Coins.Value = plr:FindFirstChild("leaderstats").Coins.Value+1
            wait(10)
            debounce = false
        end
    end
end)
</code>```

after i buy something in my game and go to collect another coin it always puts the value at what it was before i bought it but plus 1. Does anyone know how to fix this?

for example I have 5 coins and buy something that's 5 then I have 0, but when I collect a coin it goes back up to 6 coins. I have tried to fix it forever and haven't gotten any luck. if someone got help me it would be amazing.

Body:
local debounce = false

script.Parent.Touched:Connect(function(hit)
    local hum = hit.Parent:FindFirstChild("Humanoid")
    if hum then
        local plr = game:GetService("Players"):GetPlayerFromCharacter(hit.Parent)
        if plr and debounce == false then
            debounce = true
            plr:FindFirstChild("leaderstats").Coins.Value = plr:FindFirstChild("leaderstats").Coins.Value+1
            wait(10)
            debounce = false
        end
    end
end)

after i buy something in my game and go to collect another coin it always puts the value at what it was before i bought it but plus 1. Does anyone know how to fix this?

for example I have 5 coins and buy something that's 5 then I have 0, but when I collect a coin it goes back up to 6 coins. I have tried to fix it forever and haven't gotten any luck. if someone got help me it would be amazing.


问:
is it better to use themida after sourcedefender and pyinstaller than pyinstaller and themida?
I'm trying to encrypt my python program before publishing.
I know program made by python can be easily decompiled so I'm thinking of using themida and sourcedefender.
I know programs made by python can be easily decompiled so I'm thinking of using
themida and sourcedefender.

I lack of knowledge about reverse engineering so this might be a stupid question but:
Is it better to encrypt my source code using sourcedefender and then encrypt once again with themida or will it be not much the difference even if I just use themida?
(I absolutely have no idea how themida works although I heard it's good for protection. I've used sourcedefender once so I know a bit about how this works.)


问:
Error in cross-compiling systemtap for embedded Linux devices
I'm having trouble cross-compiling systemtap under ubuntu 18.04
Here are the compile-time errors

```<code>➜  systemtap-master ./configure --prefix=$PWD/_install --host=aarch64-linux-gnu --with-elfutils=/home/zhongyi/tools/elfutils-0.188 CXXFLAGS=-static CFLAGS=-static LIBS=-lz  CPPFLAGS=-I/home/zhongyi/tools/elfutils-0.188/_install/include LDFLAGS="-L/home/zhongyi/tools/zlib-1.2.13/_install/lib -L/home/zhongyi/tools/elfutils-0.188/_install/lib"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-linux-gnu-strip... aarch64-linux-gnu-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether aarch64-linux-gnu-gcc accepts -g... yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... none needed
checking whether aarch64-linux-gnu-gcc understands -c and -o together... yes
checking dependency style of aarch64-linux-gnu-gcc... gcc3
checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether ln -s works... yes
checking for aarch64-linux-gnu-gcc... (cached) aarch64-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether aarch64-linux-gnu-gcc accepts -g... (cached) yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking whether aarch64-linux-gnu-gcc understands -c and -o together... (cached) yes
checking dependency style of aarch64-linux-gnu-gcc... (cached) gcc3
checking for aarch64-linux-gnu-g++... no
checking for aarch64-linux-gnu-c++... no
checking for aarch64-linux-gnu-gpp... no
checking for aarch64-linux-gnu-aCC... no
checking for aarch64-linux-gnu-CC... no
checking for aarch64-linux-gnu-cxx... no
checking for aarch64-linux-gnu-cc++... no
checking for aarch64-linux-gnu-cl.exe... no
checking for aarch64-linux-gnu-FCC... no
checking for aarch64-linux-gnu-KCC... no
checking for aarch64-linux-gnu-RCC... no
checking for aarch64-linux-gnu-xlC_r... no
checking for aarch64-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E
checking for aarch64-linux-gnu-ar... aarch64-linux-gnu-ar
checking the archiver (aarch64-linux-gnu-ar) interface... ar
checking for aarch64-linux-gnu-ranlib... aarch64-linux-gnu-ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for ppoll... yes
checking for openat... yes
checking for a sed that does not truncate output... /bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by aarch64-linux-gnu-gcc... /usr/aarch64-linux-gnu/bin/ld
checking if the linker (/usr/aarch64-linux-gnu/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for python... /usr/bin/python
checking whether /usr/bin/python is version 2 or 3... 2
checking for a Python interpreter with version >= 2.6... python2
checking for python2... /usr/bin/python2
checking for python2 version... 2.7
checking for python2 platform... linux2
checking for python2 script directory... ${prefix}/lib/python2.7/site-packages
checking for python2 extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for python3... /usr/bin/python3
checking for python3 version... 3.6
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.6/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.6/site-packages
checking to see if prologue searching should be the default... no
checking to see if sdt probes should be the default... yes
checking whether g++ supports C++11 features by default... yes
configure: Compiling with gcc -fstack-protector-all et al.
configure: Compiling with gcc pie et al.
checking whether to use debuginfod... auto
checking for aarch64-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for debuginfod... no
configure: WARNING: libdebuginfod is missing or unusable; some features may be unavailable.
checking for sqlite3... no
checking for latex... no
checking for dvips... no
checking for ps2pdf... yes
configure: will only install prebuilt documentation
checking for xmlto... no
checking for fop... no
checking for nss... no
checking for openssl... yes
configure: using dracut module directory /usr/lib/dracut/modules.d/99stap
configure: using dracut binary /sbin
configure: WARNING: will not build systemtap compile server, cannot find nss headers
configure: WARNING: compile-server client functionality will be disabled, cannot find nss development files
checking for avahi... no
configure: WARNING: some compile-server functionality will be restricted, cannot find avahi development files
checking for rpmtsInitIterator in -lrpm... no
checking for rpmdbNextIterator in -lrpmdb... no
checking for rpmFreeCrypto in -lrpmio... no
checking how to link readline libs... none
checking for ebl_strtabinit in -lebl... no
checking for dwfl_module_getsym in -ldw... no
configure: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)
➜  systemtap-master make && make install
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Output is new file, creating git_version.h
make  all-recursive
make[1]: Entering directory '/home/zhongyi/tools/systemtap-master'
Making all in .
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master'
Making all in java
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/java'
make  all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/java'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/java'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/java'
Making all in python
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/python'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/python'
Making all in stapdyn
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make -C .. git_version.stamp
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master'
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master'
make  all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/stapdyn'
Making all in staprun
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/staprun'
make -C .. git_version.stamp
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master'
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master'
make  all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/staprun'
  CC       staprun-staprun.o
  CC       staprun-staprun_funcs.o
  CC       staprun-ctl.o
  CC       staprun-common.o
  CXX      ../staprun-privilege.o
  CXX      ../staprun-util.o
  CC       libstrfloctime_a-strfloctime.o
  AR       libstrfloctime.a
aarch64-linux-gnu-ar: `u' modifier ignored since `D' is the default (see `U')
  CXXLD    staprun
/usr/bin/ld: libstrfloctime.a(libstrfloctime_a-strfloctime.o): Relocations in generic ELF (EM: 183)
libstrfloctime.a(libstrfloctime_a-strfloctime.o): error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:677: recipe for target 'staprun' failed
make[3]: *** [staprun] Error 1
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/staprun'
Makefile:528: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/staprun'
Makefile:2105: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/zhongyi/tools/systemtap-master'
Makefile:789: recipe for target 'all' failed
make: *** [all] Error 2
</code>```

I specified the option --host=aarch64-linux-gnu at compiling. Why is there still an error?

Cross-compilation toolchain has been installed on ubuntu. Zlib and elfutils can be cross-compiled normally.

I can't find the detailed tutorial of cross-compilation on the official website of systemtap.

Body:
I'm having trouble cross-compiling systemtap under ubuntu 18.04
Here are the compile-time errors

➜  systemtap-master ./configure --prefix=$PWD/_install --host=aarch64-linux-gnu --with-elfutils=/home/zhongyi/tools/elfutils-0.188 CXXFLAGS=-static CFLAGS=-static LIBS=-lz  CPPFLAGS=-I/home/zhongyi/tools/elfutils-0.188/_install/include LDFLAGS="-L/home/zhongyi/tools/zlib-1.2.13/_install/lib -L/home/zhongyi/tools/elfutils-0.188/_install/lib"
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking target system type... aarch64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for aarch64-linux-gnu-strip... aarch64-linux-gnu-strip
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether aarch64-linux-gnu-gcc accepts -g... yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... none needed
checking whether aarch64-linux-gnu-gcc understands -c and -o together... yes
checking dependency style of aarch64-linux-gnu-gcc... gcc3
checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether ln -s works... yes
checking for aarch64-linux-gnu-gcc... (cached) aarch64-linux-gnu-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether aarch64-linux-gnu-gcc accepts -g... (cached) yes
checking for aarch64-linux-gnu-gcc option to accept ISO C89... (cached) none needed
checking whether aarch64-linux-gnu-gcc understands -c and -o together... (cached) yes
checking dependency style of aarch64-linux-gnu-gcc... (cached) gcc3
checking for aarch64-linux-gnu-g++... no
checking for aarch64-linux-gnu-c++... no
checking for aarch64-linux-gnu-gpp... no
checking for aarch64-linux-gnu-aCC... no
checking for aarch64-linux-gnu-CC... no
checking for aarch64-linux-gnu-cxx... no
checking for aarch64-linux-gnu-cc++... no
checking for aarch64-linux-gnu-cl.exe... no
checking for aarch64-linux-gnu-FCC... no
checking for aarch64-linux-gnu-KCC... no
checking for aarch64-linux-gnu-RCC... no
checking for aarch64-linux-gnu-xlC_r... no
checking for aarch64-linux-gnu-xlC... no
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... aarch64-linux-gnu-gcc -E
checking for aarch64-linux-gnu-ar... aarch64-linux-gnu-ar
checking the archiver (aarch64-linux-gnu-ar) interface... ar
checking for aarch64-linux-gnu-ranlib... aarch64-linux-gnu-ranlib
checking whether make sets $(MAKE)... (cached) yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for ppoll... yes
checking for openat... yes
checking for a sed that does not truncate output... /bin/sed
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for ld used by aarch64-linux-gnu-gcc... /usr/aarch64-linux-gnu/bin/ld
checking if the linker (/usr/aarch64-linux-gnu/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking for CFPreferencesCopyAppValue... no
checking for CFLocaleCopyCurrent... no
checking for GNU gettext in libc... yes
checking whether to use NLS... yes
checking where the gettext function comes from... libc
checking for python... /usr/bin/python
checking whether /usr/bin/python is version 2 or 3... 2
checking for a Python interpreter with version >= 2.6... python2
checking for python2... /usr/bin/python2
checking for python2 version... 2.7
checking for python2 platform... linux2
checking for python2 script directory... ${prefix}/lib/python2.7/site-packages
checking for python2 extension module directory... ${exec_prefix}/lib/python2.7/site-packages
checking for python3... /usr/bin/python3
checking for python3 version... 3.6
checking for python3 platform... linux
checking for python3 script directory... ${prefix}/lib/python3.6/site-packages
checking for python3 extension module directory... ${exec_prefix}/lib/python3.6/site-packages
checking to see if prologue searching should be the default... no
checking to see if sdt probes should be the default... yes
checking whether g++ supports C++11 features by default... yes
configure: Compiling with gcc -fstack-protector-all et al.
configure: Compiling with gcc pie et al.
checking whether to use debuginfod... auto
checking for aarch64-linux-gnu-pkg-config... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for debuginfod... no
configure: WARNING: libdebuginfod is missing or unusable; some features may be unavailable.
checking for sqlite3... no
checking for latex... no
checking for dvips... no
checking for ps2pdf... yes
configure: will only install prebuilt documentation
checking for xmlto... no
checking for fop... no
checking for nss... no
checking for openssl... yes
configure: using dracut module directory /usr/lib/dracut/modules.d/99stap
configure: using dracut binary /sbin
configure: WARNING: will not build systemtap compile server, cannot find nss headers
configure: WARNING: compile-server client functionality will be disabled, cannot find nss development files
checking for avahi... no
configure: WARNING: some compile-server functionality will be restricted, cannot find avahi development files
checking for rpmtsInitIterator in -lrpm... no
checking for rpmdbNextIterator in -lrpmdb... no
checking for rpmFreeCrypto in -lrpmio... no
checking how to link readline libs... none
checking for ebl_strtabinit in -lebl... no
checking for dwfl_module_getsym in -ldw... no
configure: error: missing elfutils development headers/libraries (install elfutils-devel, libebl-dev, libdw-dev and/or libebl-devel)
➜  systemtap-master make && make install
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Output is new file, creating git_version.h
make  all-recursive
make[1]: Entering directory '/home/zhongyi/tools/systemtap-master'
Making all in .
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master'
Making all in java
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/java'
make  all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/java'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/java'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/java'
Making all in python
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/python'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/python'
Making all in stapdyn
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make -C .. git_version.stamp
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master'
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master'
make  all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/stapdyn'
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/stapdyn'
Making all in staprun
make[2]: Entering directory '/home/zhongyi/tools/systemtap-master/staprun'
make -C .. git_version.stamp
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master'
/bin/bash ./git_version.sh -k -s . -o git_version.h
git_version.sh: Not a git repo, keeping existing git_version.h
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master'
make  all-am
make[3]: Entering directory '/home/zhongyi/tools/systemtap-master/staprun'
  CC       staprun-staprun.o
  CC       staprun-staprun_funcs.o
  CC       staprun-ctl.o
  CC       staprun-common.o
  CXX      ../staprun-privilege.o
  CXX      ../staprun-util.o
  CC       libstrfloctime_a-strfloctime.o
  AR       libstrfloctime.a
aarch64-linux-gnu-ar: `u' modifier ignored since `D' is the default (see `U')
  CXXLD    staprun
/usr/bin/ld: libstrfloctime.a(libstrfloctime_a-strfloctime.o): Relocations in generic ELF (EM: 183)
libstrfloctime.a(libstrfloctime_a-strfloctime.o): error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
Makefile:677: recipe for target 'staprun' failed
make[3]: *** [staprun] Error 1
make[3]: Leaving directory '/home/zhongyi/tools/systemtap-master/staprun'
Makefile:528: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/home/zhongyi/tools/systemtap-master/staprun'
Makefile:2105: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/zhongyi/tools/systemtap-master'
Makefile:789: recipe for target 'all' failed
make: *** [all] Error 2

I specified the option --host=aarch64-linux-gnu at compiling. Why is there still an error?

Cross-compilation toolchain has been installed on ubuntu. Zlib and elfutils can be cross-compiled normally.

I can't find the detailed tutorial of cross-compilation on the official website of systemtap.


问:
How to share image to twitter from React
This post suggests that you can't use react-share to post an image directly from react to twitter inside of a tweet.

Is there another library/method that's available?


问:
cannot find symbol symbol: class DockerImageName
I have been trying to run an sbomtest that invokes a cyclonedx-cli docker image using test containers but the

```<code>import org.testcontainers.images.DockerImageName; doesn't work properly
</code>```

Here is what I want the test to do for me

The SBOMTest class defines a GenericContainer field named cyclonedxCli that is annotated with the @Rule annotation. This container is based on the cyclonedx/cyclonedx-cli Docker image, and it maps a classpath resource at /path/to/sboms to the path /app/sboms in the container.

The testSBOMValidation method is a JUnit test that starts the cyclonedxCli container, runs the cyclonedx-cli validate command in the container to validate an SBOM file, and then stops the container.

The test method uses the execInContainer method of the GenericContainer class to run the cyclonedx-cli command in the container, and it stores the command's output and exit code in the result variable.

The test method then uses the assertThat method from the AssertJ library to assert that the command's exit code is zero. This indicates that the command completed successfully.

Finally, the test method stops the cyclonedxCli container using the stop method of the GenericContainer class.

Below is my SBOMTest class and my pom.xml. Why doesn't my test pass?

```<code>package com.mkyong.hashing;

import org.junit.Rule;
import org.junit.Test;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.images.DockerImageName;
import org.testcontainers.images.DockerImageName;

import static org.assertj.core.api.Assertions.assertThat;

public class SBOMTest {

    public static final DockerImageName CYCLONEDX_CLI_IMAGE = DockerImageName.parse("cyclonedx/cyclonedx-cli:v0.24.2");

    @Rule
    public GenericContainer<?> cyclonedxCli = new GenericContainer<>(CYCLONEDX_CLI_IMAGE)
            .withClasspathResourceMapping("/home/ntn/workdir", "/app/sboms", BindMode.READ_ONLY);

    @Test
    public void testSBOMValidation() throws Exception {
        // Start the container
        cyclonedxCli.start();

        // Validate the SBOM file using the cyclonedx-cli command
        String sbomFileName = "/home/ntn/workdir/julian.json";
        Container.ExecResult result = cyclonedxCli.execInContainer("cyclonedx-cli", "validate", "--input-file", sbomFileName, "--fail-on-errors");
        String stdout = result.getStdout();

        // Assert that the command returned a zero exit code
        assertThat(result.getExitCode()).isZero();

        // Stop the container
        cyclonedxCli.stop();
    }
}

</code>```

Below is my pom.xml

```<code><?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>
    <groupId>com.mkyong.hashing</groupId>
    <artifactId>java-project</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>java-project</name>
    <url>http://maven.apache.org</url>

    <properties>
        <!-- https://maven.apache.org/general.html#encoding-warning -->
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <version>1.14.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.11</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <!-- Attach the shade into the package phase -->
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.mkyong.hashing.App</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <!-- fat-jar -->
            <!-- https://books.sonatype.com/mvnex-book/reference/customizing-sect-custom-packaged.html -->
            <!--
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                    <archive>
                        <manifest>
                            <mainClass>com.mkyong.hashing.App</mainClass>
                        </manifest>
                    </archive>
                </configuration>
                <executions>
                    <execution>
                        <id>simple-command</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->
        </plugins>
    </build>
</project>

</code>```

I was expecting the test to pass successfully

The following are the error logs

```<code>WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.mkyong.hashing:java-project >-------------------
[INFO] Building java-project 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ java-project ---
[INFO] Deleting /home/ntn/outreachytest/maven-examples/java-project/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ java-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/ntn/outreachytest/maven-examples/java-project/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ java-project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/ntn/outreachytest/maven-examples/java-project/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ java-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/ntn/outreachytest/maven-examples/java-project/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ java-project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ntn/outreachytest/maven-examples/java-project/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[6,33] cannot find symbol
  symbol:   class DockerImageName
  location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[7,33] cannot find symbol
  symbol:   class DockerImageName
  location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,35] package org.assertj.core.api does not exist
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,1] static import only from classes and interfaces
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,25] cannot find symbol
  symbol:   class DockerImageName
  location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,63] cannot find symbol
  symbol:   variable DockerImageName
  location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[18,78] cannot find symbol
  symbol:   variable BindMode
  location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[27,18] package Container does not exist
[INFO] 8 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.466 s
[INFO] Finished at: 2022-12-26T06:24:21+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project java-project: Compilation failure: Compilation failure:
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[6,33] cannot find symbol
[ERROR]   symbol:   class DockerImageName
[ERROR]   location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[7,33] cannot find symbol
[ERROR]   symbol:   class DockerImageName
[ERROR]   location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,35] package org.assertj.core.api does not exist
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,1] static import only from classes and interfaces
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,25] cannot find symbol
[ERROR]   symbol:   class DockerImageName
[ERROR]   location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,63] cannot find symbol
[ERROR]   symbol:   variable DockerImageName
[ERROR]   location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[18,78] cannot find symbol
[ERROR]   symbol:   variable BindMode
[ERROR]   location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[27,18] package Container does not exist
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
</code>```

Body:
I have been trying to run an sbomtest that invokes a cyclonedx-cli docker image using test containers but the

import org.testcontainers.images.DockerImageName; doesn't work properly

Here is what I want the test to do for me

The SBOMTest class defines a GenericContainer field named cyclonedxCli that is annotated with the @Rule annotation. This container is based on the cyclonedx/cyclonedx-cli Docker image, and it maps a classpath resource at /path/to/sboms to the path /app/sboms in the container.

The testSBOMValidation method is a JUnit test that starts the cyclonedxCli container, runs the cyclonedx-cli validate command in the container to validate an SBOM file, and then stops the container.

The test method uses the execInContainer method of the GenericContainer class to run the cyclonedx-cli command in the container, and it stores the command's output and exit code in the result variable.

The test method then uses the assertThat method from the AssertJ library to assert that the command's exit code is zero. This indicates that the command completed successfully.

Finally, the test method stops the cyclonedxCli container using the stop method of the GenericContainer class.

Below is my SBOMTest class and my pom.xml. Why doesn't my test pass?

package com.mkyong.hashing;

import org.junit.Rule;
import org.junit.Test;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.images.DockerImageName;
import org.testcontainers.images.DockerImageName;

import static org.assertj.core.api.Assertions.assertThat;

public class SBOMTest {

    public static final DockerImageName CYCLONEDX_CLI_IMAGE = DockerImageName.parse("cyclonedx/cyclonedx-cli:v0.24.2");

    @Rule
    public GenericContainer<?> cyclonedxCli = new GenericContainer<>(CYCLONEDX_CLI_IMAGE)
            .withClasspathResourceMapping("/home/ntn/workdir", "/app/sboms", BindMode.READ_ONLY);

    @Test
    public void testSBOMValidation() throws Exception {
        // Start the container
        cyclonedxCli.start();

        // Validate the SBOM file using the cyclonedx-cli command
        String sbomFileName = "/home/ntn/workdir/julian.json";
        Container.ExecResult result = cyclonedxCli.execInContainer("cyclonedx-cli", "validate", "--input-file", sbomFileName, "--fail-on-errors");
        String stdout = result.getStdout();

        // Assert that the command returned a zero exit code
        assertThat(result.getExitCode()).isZero();

        // Stop the container
        cyclonedxCli.stop();
    }
}

Below is my pom.xml

<?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>
    <groupId>com.mkyong.hashing</groupId>
    <artifactId>java-project</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>java-project</name>
    <url>http://maven.apache.org</url>

    <properties>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.testcontainers</groupId>
            <artifactId>testcontainers</artifactId>
            <version>1.14.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.11</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.0</version>
                <executions>

                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <transformers>
                                <transformer
                                        implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                    <mainClass>com.mkyong.hashing.App</mainClass>
                                </transformer>
                            </transformers>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>
    </build>
</project>

I was expecting the test to pass successfully

The following are the error logs

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.mkyong.hashing:java-project >-------------------
[INFO] Building java-project 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ java-project ---
[INFO] Deleting /home/ntn/outreachytest/maven-examples/java-project/target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ java-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/ntn/outreachytest/maven-examples/java-project/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ java-project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /home/ntn/outreachytest/maven-examples/java-project/target/classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ java-project ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/ntn/outreachytest/maven-examples/java-project/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ java-project ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to /home/ntn/outreachytest/maven-examples/java-project/target/test-classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[6,33] cannot find symbol
  symbol:   class DockerImageName
  location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[7,33] cannot find symbol
  symbol:   class DockerImageName
  location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,35] package org.assertj.core.api does not exist
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,1] static import only from classes and interfaces
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,25] cannot find symbol
  symbol:   class DockerImageName
  location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,63] cannot find symbol
  symbol:   variable DockerImageName
  location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[18,78] cannot find symbol
  symbol:   variable BindMode
  location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[27,18] package Container does not exist
[INFO] 8 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  3.466 s
[INFO] Finished at: 2022-12-26T06:24:21+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project java-project: Compilation failure: Compilation failure:
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[6,33] cannot find symbol
[ERROR]   symbol:   class DockerImageName
[ERROR]   location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[7,33] cannot find symbol
[ERROR]   symbol:   class DockerImageName
[ERROR]   location: package org.testcontainers.images
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,35] package org.assertj.core.api does not exist
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[10,1] static import only from classes and interfaces
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,25] cannot find symbol
[ERROR]   symbol:   class DockerImageName
[ERROR]   location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[14,63] cannot find symbol
[ERROR]   symbol:   variable DockerImageName
[ERROR]   location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[18,78] cannot find symbol
[ERROR]   symbol:   variable BindMode
[ERROR]   location: class com.mkyong.hashing.SBOMTest
[ERROR] /home/ntn/outreachytest/maven-examples/java-project/src/test/java/com/mkyong/hashing/SBOMTest.java:[27,18] package Container does not exist
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException


问:
Tkinter function with changing value
I have this code wich the number of buttons vary depending on a text file and I need you be able to change the action of the button but when I try this I get the same thing all around. I want it so if I press button number 6 It outputs 6.</p>
```<code>from tkinter import *
from tkinter import ttk
import random

def write (num):
    print (num)

ran = random.randint(1,9)

root = Tk()
frm = ttk.Frame(root, padding=10)
frm.grid()

for d in range (ran):
    ttk.Button(frm, text=d, command=lambda: write(d)).grid(column=d, row=0)
root.mainloop()
</code>```

Title: Tkinter function with changing value

Body:
I have this code wich the number of buttons vary depending on a text file and I need you be able to change the action of the button but when I try this I get the same thing all around. I want it so if I press button number 6 It outputs 6.

from tkinter import *
from tkinter import ttk
import random

def write (num):
    print (num)

ran = random.randint(1,9)

root = Tk()
frm = ttk.Frame(root, padding=10)
frm.grid()

for d in range (ran):
    ttk.Button(frm, text=d, command=lambda: write(d)).grid(column=d, row=0)
root.mainloop()


问:
How to get value for the key from Spark Scala Dataframe with array Struct
I am having the spark data frame with Array of Struct. The structure of the dataframe is:

```<code>root
|-- recs: array (nullable = true)
| |-- element: struct (containsNull = true)
| | |-- key: string (nullable = true)
| | |-- value: binary (nullable = true)`
</code>```

The data in the dataframe is like this

```<code>[{id, 123}, {source, test1}, {type, aa}, {subType, xy}, {createTs, 2022-10-31T10:36:34.951Z}, {requestTrackingId, trackId}, {locationId, 5560}] [{id, 345}, {source, test2}, {type, ab}, {subType, xyz}, {createTs, 2022-10-29T10:36:34.951Z}, {requestTrackingId, trackId2}, {locationId, 55603}]
</code>```

The output should look like this:

```<code>2022-10-31T10:36:34.951Z
2022-10-29T10:36:34.951Z
</code>```

Please provide the code snippet for this.

Body:
I am having the spark data frame with Array of Struct. The structure of the dataframe is:

root
|-- recs: array (nullable = true)
| |-- element: struct (containsNull = true)
| | |-- key: string (nullable = true)
| | |-- value: binary (nullable = true)`

The data in the dataframe is like this

[{id, 123}, {source, test1}, {type, aa}, {subType, xy}, {createTs, 2022-10-31T10:36:34.951Z}, {requestTrackingId, trackId}, {locationId, 5560}] [{id, 345}, {source, test2}, {type, ab}, {subType, xyz}, {createTs, 2022-10-29T10:36:34.951Z}, {requestTrackingId, trackId2}, {locationId, 55603}]

The output should look like this:

2022-10-31T10:36:34.951Z
2022-10-29T10:36:34.951Z

Please provide the code snippet for this.


问:
create a tabBar with a dynamic height
I'm having a screen wrapped inside SingleChildScrollView and there are lots of widgets inside of it. I created detailBuilder function that return a TabBarView inside my singleChildScrollView.

I manage to achieve the layout like the image below but the problem is I can't make my tabBar to have a fully dynamic height. I tried applying nestedScrollView, but it didn't work

Here's the image:

How can I change my code so that the tabBar will have dynamic height value but the at the same time I can scroll of the content simultaneously ?

Here's the current code for the tab bar:

```<code>return Column(
        children: [
          Container(
            height: 40,
            decoration: BoxDecoration(
                color: formBackgroundColor,
                borderRadius: BorderRadius.all(Radius.circular(15))
            ),
            child: TabBar(
              controller: collabTabController,
              indicator: ShapeDecoration(
                shape: RoundedRectangleBorder(
                    borderRadius:
                    const BorderRadius.only(
                        bottomRight: Radius.circular(15),
                        topRight: Radius.circular(15),
                      )
                ),
                color: Colors.orange,
              ),
              tabs: [
                Tab(text:'main'.tr()),
                Tab(text:'solver'.tr()),
              ],
            ),
          ),
          const SizedBox(height: 10),
          SizedBox(
            height: 700, -- Here's the problem I want it to be dynamic depending on my Container 1
            and Container 2 size (both of them aren't fixed size)
            child: TabBarView(
              controller: collabTabController,
              children: [
                /// Container 1
                /// Container 2
              ]
            ),
          ),
        ],
      );
</code>```

Main body code:

```<code>SingleChildScrollView(
   child: Column(
     children: [
        // Content 1
        // Content 2 -- detailBuilder() #Which contain my TabBar
        // Content 3
        // Content 4
     ]
  ),
),
</code>```

Title: create a tabBar with a dynamic height

Body:
I'm having a screen wrapped inside SingleChildScrollView and there are lots of widgets inside of it. I created detailBuilder function that return a TabBarView inside my singleChildScrollView.

I manage to achieve the layout like the image below but the problem is I can't make my tabBar to have a fully dynamic height. I tried applying nestedScrollView, but it didn't work

Here's the image:

How can I change my code so that the tabBar will have dynamic height value but the at the same time I can scroll of the content simultaneously ?

Here's the current code for the tab bar:

return Column(
        children: [
          Container(
            height: 40,
            decoration: BoxDecoration(
                color: formBackgroundColor,
                borderRadius: BorderRadius.all(Radius.circular(15))
            ),
            child: TabBar(
              controller: collabTabController,
              indicator: ShapeDecoration(
                shape: RoundedRectangleBorder(
                    borderRadius:
                    const BorderRadius.only(
                        bottomRight: Radius.circular(15),
                        topRight: Radius.circular(15),
                      )
                ),
                color: Colors.orange,
              ),
              tabs: [
                Tab(text:'main'.tr()),
                Tab(text:'solver'.tr()),
              ],
            ),
          ),
          const SizedBox(height: 10),
          SizedBox(
            height: 700, -- Here's the problem I want it to be dynamic depending on my Container 1
            and Container 2 size (both of them aren't fixed size)
            child: TabBarView(
              controller: collabTabController,
              children: [
                /// Container 1
                /// Container 2
              ]
            ),
          ),
        ],
      );

Main body code:

SingleChildScrollView(
   child: Column(
     children: [
        // Content 1
        // Content 2 -- detailBuilder() #Which contain my TabBar
        // Content 3
        // Content 4
     ]
  ),
),


问:
Perl: What does this "=~s|" mean in Perl?
I am new to Perl regex. I am trying to understand a chunk of existing code that parses a file and modifies it based on certain groups of comments.

The code has the following lines:

```<code>sub parse_comments{
    #.... function to parse and modify comments
    ....
}

open(FILEP, $filename);
$filecontent = join('', <FILEP>); #load the whole file(s) in one string
close(FILEP);

$filecontent =~s|[\x0b\x0c]+|&parse_comments($&)|gxe;
$filecontent =~s/[#][^\n]*/&parse_comments($&)/gxe;
</code>```

I understand that the "s/" in line# 5 stands for substitution. Zero or more occurrences of '#' and '^\n' are substituted in the function "parse_comments".

But I am not clear on what line# 4 does. I understand that "|" is the alternation operator. But what does "=~s|" accomplish here ? What does the "s" stand for ?

Body:
I am new to Perl regex. I am trying to understand a chunk of existing code that parses a file and modifies it based on certain groups of comments.

The code has the following lines:

sub parse_comments{
    #.... function to parse and modify comments
    ....
}

open(FILEP, $filename);
$filecontent = join('', <FILEP>); #load the whole file(s) in one string
close(FILEP);

$filecontent =~s|[\x0b\x0c]+|&parse_comments($&)|gxe;
$filecontent =~s/[#][^\n]*/&parse_comments($&)/gxe;

I understand that the "s/" in line# 5 stands for substitution. Zero or more occurrences of '#' and '^\n' are substituted in the function "parse_comments".

But I am not clear on what line# 4 does. I understand that "|" is the alternation operator. But what does "=~s|" accomplish here ? What does the "s" stand for ?


问:
How do I see the json data stored in the collections in mysql. it just shows the binary when I check in mysql workbench.?
How do I see the json data stored in the collections in mysql. it just shows the binary when I check in mysql workbench.?? Am I missing something or some other tool to be used.
It is handy you are developing to see the data in the collection. It help troubleshoot much faster.

I tried using mysql workbench, but that does not show the data.


问:
Simple three.js object does not appear on the server even though it runs fine when opening html file
I'm trying to run the so-called three.js "Hello World" program where a single cube geometry is rendered.

```<code>import * as THREE from 'three';

      let scene = new THREE.Scene();
      scene.background = new THREE.Color(0x56535c);

      let camera = new THREE.PerspectiveCamera(75,
      (document.getElementById("3Dcube").parentElement.clientWidth)/(document.getElementById("3Dcube").parentElement.clientHeight),
      0.1, 1000);

      let renderer = new THREE.WebGLRenderer({ antialias: true });
      renderer.setSize(document.getElementById("3Dcube").parentElement.clientWidth, document.getElementById("3Dcube").parentElement.clientHeight);
      document.getElementById("3Dcube").appendChild(renderer.domElement);

      const frame = new THREE.BoxGeometry(5,1,4);
      var cubeMaterials = [
        new THREE.MeshBasicMaterial({color : 0x03045e}),
        new THREE.MeshBasicMaterial({color : 0x023e8a}),
        new THREE.MeshBasicMaterial({color : 0x0077b6}),
        new THREE.MeshBasicMaterial({color : 0x03045e}),
        new THREE.MeshBasicMaterial({color : 0x023e8a}),
        new THREE.MeshBasicMaterial({color : 0x0077b6}),
      ];

      let obj = new THREE.Mesh(frame, cubeMaterials);

      scene.add(obj);
      camera.position.z = 5;

      function animate() {
      requestAnimationFrame(animate);
      renderer.render(scene, camera);
      };
      animate();

    function onWindowResize() {
      camera.aspect = document.getElementById("3Dcube").parentElement.clientWidth/document.getElementById("3Dcube").parentElement.clientHeight;
      camera.updateProjectionMatrix();
      renderer.setSize(document.getElementById("3Dcube").parentElement.clientWidth, document.getElementById("3Dcube").parentElement.clientHeight);
    }
</code>```

What seems strange to me is that this program works perfectly fine when I open the html file in my browser, however it shows nothing when I host it on ESP32 Async Web Server. Am I missing anything?

Body:
I'm trying to run the so-called three.js "Hello World" program where a single cube geometry is rendered.

import * as THREE from 'three';

      let scene = new THREE.Scene();
      scene.background = new THREE.Color(0x56535c);

      let camera = new THREE.PerspectiveCamera(75,
      (document.getElementById("3Dcube").parentElement.clientWidth)/(document.getElementById("3Dcube").parentElement.clientHeight),
      0.1, 1000);

      let renderer = new THREE.WebGLRenderer({ antialias: true });
      renderer.setSize(document.getElementById("3Dcube").parentElement.clientWidth, document.getElementById("3Dcube").parentElement.clientHeight);
      document.getElementById("3Dcube").appendChild(renderer.domElement);

      const frame = new THREE.BoxGeometry(5,1,4);
      var cubeMaterials = [
        new THREE.MeshBasicMaterial({color : 0x03045e}),
        new THREE.MeshBasicMaterial({color : 0x023e8a}),
        new THREE.MeshBasicMaterial({color : 0x0077b6}),
        new THREE.MeshBasicMaterial({color : 0x03045e}),
        new THREE.MeshBasicMaterial({color : 0x023e8a}),
        new THREE.MeshBasicMaterial({color : 0x0077b6}),
      ];

      let obj = new THREE.Mesh(frame, cubeMaterials);

      scene.add(obj);
      camera.position.z = 5;

      function animate() {
      requestAnimationFrame(animate);
      renderer.render(scene, camera);
      };
      animate();

    function onWindowResize() {
      camera.aspect = document.getElementById("3Dcube").parentElement.clientWidth/document.getElementById("3Dcube").parentElement.clientHeight;
      camera.updateProjectionMatrix();
      renderer.setSize(document.getElementById("3Dcube").parentElement.clientWidth, document.getElementById("3Dcube").parentElement.clientHeight);
    }

What seems strange to me is that this program works perfectly fine when I open the html file in my browser, however it shows nothing when I host it on ESP32 Async Web Server. Am I missing anything?


问:
how to show a popup alert window in background in flutter
here I'm developing a chat application using AWS and flutter, i want to show a popup alert like a true Caller, I did it using a #system_alert_window it works perfectly when app is opened and AWS connect connected. but i also want it to show When the app in INACTIVE STATE or Terminated state.

What I did was When a Msg received from the AWS socket i show a popup alert in using system_alert_window but the problem is in Background ideal state AWS Socket got disconnected and system_alert_window was Not triggered.
here i want to keep the AWS socket connected or Some Other ways to Trigger the system_alert_window

is there a way to Trigger it using Push notification
Here im using FCM(Firebase cloud messaging)


问:
How to loop in imacro using Current.iim single file?
For example i tried to go to google.com and then search for 1 and 2 and 3 then i want to loop for infinite again but it's not work. How can i do that ?</p>
```<code>
    VERSION BUILD=1011 RECORDER=CR
    URL GOTO=https://www.google.com/
    SET !LOOP 999
    TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/search ATTR=NAME:q CONTENT=1
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/search ATTR=NAME:btnK
    wait seconds =2
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=NAME:q CONTENT=2
    TAG POS=1 TYPE=BUTTON FORM=ID:tsf ATTR=TXT:
    wait seconds =2
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=NAME:q CONTENT=3
    TAG POS=1 TYPE=BUTTON FORM=ID:tsf ATTR=TXT:
    wait seconds =2

</code>```

Body:
For example i tried to go to google.com and then search for 1 and 2 and 3 then i want to loop for infinite again but it's not work. How can i do that ?

    VERSION BUILD=1011 RECORDER=CR
    URL GOTO=https://www.google.com/
    SET !LOOP 999
    TAG POS=1 TYPE=INPUT:TEXT FORM=ACTION:/search ATTR=NAME:q CONTENT=1
    TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:/search ATTR=NAME:btnK
    wait seconds =2
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=NAME:q CONTENT=2
    TAG POS=1 TYPE=BUTTON FORM=ID:tsf ATTR=TXT:
    wait seconds =2
    TAG POS=1 TYPE=INPUT:TEXT FORM=ID:tsf ATTR=NAME:q CONTENT=3
    TAG POS=1 TYPE=BUTTON FORM=ID:tsf ATTR=TXT:
    wait seconds =2


问:
Is there any way to do the same but using serializers?
```<code>
    if request.method == "GET":
        preguntas = models.Test.objects.all()
        pregunta = request.GET #this gets a queryset from my database

        lista_question = list(pregunta.keys())
        lista_valores =list(pregunta.values())

        dictionary = {}
        points = 0
        for i in range(len(lista_question)):
            dictionary[lista_question[i]] = lista_valores[i]

        for i in range(len(lista_question)):
            answer_right = models.Test.objects.get(pregunta = lista_question[i]).respuesta
            answer_got = dictionary[lista_question[i]]
            if answer_got == answer_right:
                points += 1

        print(points)
</code>```

I am trying to check if my answers in my database are equal to the answers given in a test.
I know this works well but I would like to use Serializers because I`m learning DRF. Is there any way to serialize my SQL database (output of the request.GET)to a python dict without doing all the convertion to list I did?
Sorry for my Spanglish.

Body:
    if request.method == "GET":
        preguntas = models.Test.objects.all()
        pregunta = request.GET #this gets a queryset from my database

        lista_question = list(pregunta.keys())
        lista_valores =list(pregunta.values())

        dictionary = {}
        points = 0
        for i in range(len(lista_question)):
            dictionary[lista_question[i]] = lista_valores[i]

        for i in range(len(lista_question)):
            answer_right = models.Test.objects.get(pregunta = lista_question[i]).respuesta
            answer_got = dictionary[lista_question[i]]
            if answer_got == answer_right:
                points += 1

        print(points)

I am trying to check if my answers in my database are equal to the answers given in a test.
I know this works well but I would like to use Serializers because I`m learning DRF. Is there any way to serialize my SQL database (output of the request.GET)to a python dict without doing all the convertion to list I did?
Sorry for my Spanglish.


问:
C++ code is not compiling with g++ -o object test.cpp for AWS SDK
I have followed the steps to install the AWS SDK for C++ on a linux machiine. Now I am struggling to figure out how to compile and run my code. I have a file called test.cpp and I am compiling it by running g++ -o something test.cpp

I tried to compile the test.cpp file with:

g++ -o something test.cpp

I expected the file to compile. Instead, I got this error message:

(std::__cxx11::basic_string<char, std::char_traits, std::allocator >)':
test.cpp:(.text.ZN3Aws11DeleteArrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvPT[ZN3Aws11DeleteArrayINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEEEvPT]+0xd9): undefined reference to `Aws::Free(void)'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE

This is a subset of the error message.