问:
flutter mapbox error cant read layers, tilelayers
idk whats wrong with my code
I already add flutter map flutter_map: ^3.1.0

```<code>import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart' as latLng;
import 'package:url_launcher/url_launcher.dart';

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

  @override
  State<MapScreen> createState() => _MapScreenState();
}

class _MapScreenState extends State<MapScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: FlutterMap(
        options: MapOptions(
          zoom: 13.0,
          center: latLng.LatLng(51.5, -0.09),
        ),
        nonRotatedChildren: [
        // This does NOT fulfill Mapbox's requirements for attribution
        // See https://docs.mapbox.com/help/getting-started/attribution/
        AttributionWidget.defaultWidget(
            source: '© Mapbox © OpenStreetMap',
            onSourceTapped: () async {
                // Requires 'url_launcher'
                if (!await launchUrl(Uri.parse("https://docs.mapbox.com/help/getting-started/attribution/"))) {
                    print('Could not launch URL');
                }
            },
        )
    ],
        children: [
          TileLayer(
            urlTemplate: "https://api.mapbox.com/styles/v1/starshat/clbyposa4000015qjcb8fq8zf/wmts?access_token=pk.*****",
            additionalOptions: {
              'accesToken':'pk.*******',
              'id': 'mapbox.mapbox-streets-v8'
            },
            userAgentPackageName: "com.utdi.windramayu",
          )
        ],
      ),
    );
  }
}

</code>```

Flutter Web Bootstrap: Auto
ImageCodecException: Failed to detect image file format using the file header.
File header was [0x3c 0x43 0x61 0x70 0x61 0x62 0x69 0x6c 0x69 0x74].

Body:
idk whats wrong with my code
I already add flutter map flutter_map: ^3.1.0

import 'package:flutter/material.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart' as latLng;
import 'package:url_launcher/url_launcher.dart';

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

  @override
  State<MapScreen> createState() => _MapScreenState();
}

class _MapScreenState extends State<MapScreen> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: FlutterMap(
        options: MapOptions(
          zoom: 13.0,
          center: latLng.LatLng(51.5, -0.09),
        ),
        nonRotatedChildren: [
        // This does NOT fulfill Mapbox's requirements for attribution
        // See https://docs.mapbox.com/help/getting-started/attribution/
        AttributionWidget.defaultWidget(
            source: '© Mapbox © OpenStreetMap',
            onSourceTapped: () async {
                // Requires 'url_launcher'
                if (!await launchUrl(Uri.parse("https://docs.mapbox.com/help/getting-started/attribution/"))) {
                    print('Could not launch URL');
                }
            },
        )
    ],
        children: [
          TileLayer(
            urlTemplate: "https://api.mapbox.com/styles/v1/starshat/clbyposa4000015qjcb8fq8zf/wmts?access_token=pk.*****",
            additionalOptions: {
              'accesToken':'pk.*******',
              'id': 'mapbox.mapbox-streets-v8'
            },
            userAgentPackageName: "com.utdi.windramayu",
          )
        ],
      ),
    );
  }
}

Flutter Web Bootstrap: Auto
ImageCodecException: Failed to detect image file format using the file header.
File header was [0x3c 0x43 0x61 0x70 0x61 0x62 0x69 0x6c 0x69 0x74].


来源: stackexchange

问:
Handle Infinispan POD Faults
I'm using the Java version of the Infinispan library.

I'm deploying Infinispan in two Kubernetes PODs and I have defined some replicated caches. Moreover, I have some microservices using such caches, connecting toward an Infinispan POD. Of course, the connection is made using the service name and the port. Indeed, my microservices are able to connect to one POD instance successfully at the end for using the remote caches.

Unluckily, when a POD had some fault and restarts, my microservice is not able to switch automatically to another replica POD of Infinispan, and issues begin to happen.

It's even worse when both POD restarts (I'm causing the restarts for robustness tests).

I was wondering if there's a way to notice when the POD a client is connected to becomes not available. For example, I use some Infinispan listeners to notice when certain operations are performed over the maps. Is there something similar for the service health? Maybe something keeping track of the distributed topology of the Infinispan cluster?

In case there's not, how do you handle these cases?

ContentLicense: CC BY-SA 4.0

Title: Handle Infinispan POD Faults


问:
Gradle build fat jar with multiple versions of jar files
I have requirement in my big data project.

We have two environment Mapr and  HortonWorks.

The challenge here I have single scla codebase using gralde to build fat jar for spark cluster with all dependencies.

Now our requirement is I need to create two fat jar files one for Mapr and another fat jar for HortonWorks.

Here the challenge is for MapR fat jar need to packaged with Kafka-client 1.2 and for HortonWorks need to packed with with kafka-clients-0.9.

Can you please provide me any idea how to achive this in gradle.

I need any thoughts how to achive this process.


问:
function overspills into other function even though async await is being used
Problem

I am trying to pass a nested variable from one function to another, but it's not working as intended. It appears that my async await isn't working as intended, so the variable (content) that's getting passed between functions is an object, as opposed to a variable...

What I've tried

This is the code I have running, which should dictate that functions wait in turn, until their previous function has completed. In this case, tscriptNumberMatcher should wait until getVoicedData has finished executing...

async function processVoicedSearch() {
    try {
    console.log("starting getVoicedData");
    const a = await getVoicedData();
    console.log("getVoicedData finished running");

    console.log("starting numberMatcher");
    let { matchedData, matchedNumber } = await tscriptNumberMatcher(getVoicedData());
    console.log("numberMatcher finished running");

    console.log("starting nextMatcher");
    const result = await nextMatcher(matchedData, matchedNumber);
    console.log("nextMatcher finished running");

    console.log("starting getResponse");
    const markup = await getResponse(nextMatcher(result));
    console.log("getResponse finished running");

    } catch (err) {
        console.log(err)
    }
}```
</div>
</div>
</p>
<p>However, as you can see from the log that's not quite happening. The content variable is returning in getVoicedData only after tscriptNumberMatcher has started and tscriptNumberMatcher needs the string in order to process correctly...</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>starting getVoicedData
bundle.js:6923 The value of event.resultIndex is: undefined
bundle.js:6924 The type of the event.resultIndex is: undefined
bundle.js:6873 getVoicedData finished running
bundle.js:6875 starting numberMatcher
bundle.js:6923 The value of event.resultIndex is: undefined
bundle.js:6924 The type of the event.resultIndex is: undefined
bundle.js:6993 tscriptNumberMatcher is running [object Object] undefined
bundle.js:6888 TypeError: Cannot read properties of undefined (reading 'match')
    at tscriptNumberMatcher (bundle.js:6997:26)
    at processVoicedSearch (bundle.js:6876:48)
bundle.js:6923 The value of event.resultIndex is: 0
bundle.js:6924 The type of the event.resultIndex is: number
bundle.js:6934 This is the transcript: 10 bananas
bundle.js:6946 string</code>```

For some reason getVoicedData seems to overspilling while tscriptNumberMatcher is executing...

Here is getVoicedData:

//getVoicedData function
function getVoicedData() {
    //creating recognition variable using the speechRecognition constructor
    var recognition = new speechRecognition()

    var content = ''

    recognition.continuous = true

    if (content.length) {
        content += ''
    }

    recognition.start();

    //Display voice recognition is on message, when recognition starts
    recognition.onstart = function() {
        instructions.text("Voice Recognition is on")
    }

    //When result (voice) is indicated (heard), start processing voice recognition
    recognition.onresult = function (event) {
        console.log("The value of event.resultIndex is: " + event.resultIndex);
        console.log("The type of the event.resultIndex is: " + (typeof event.resultIndex));

        do {
    if (event.resultIndex == undefined) {return}
} while (event.resultIndex == undefined);

        var current = event.resultIndex;

        var transcript = event.results[current][0].transcript

        console.log("This is the transcript: " + transcript);

        content += transcript

        console.log(typeof content);

        return content;
    }

    return recognition.onresult(content);

}```

Body:
Problem

I am trying to pass a nested variable from one function to another, but it's not working as intended. It appears that my async await isn't working as intended, so the variable (content) that's getting passed between functions is an object, as opposed to a variable...

What I've tried

This is the code I have running, which should dictate that functions wait in turn, until their previous function has completed. In this case, tscriptNumberMatcher should wait until getVoicedData has finished executing...

async function processVoicedSearch() {
    try {
    console.log("starting getVoicedData");
    const a = await getVoicedData();
    console.log("getVoicedData finished running");

    console.log("starting numberMatcher");
    let { matchedData, matchedNumber } = await tscriptNumberMatcher(getVoicedData());
    console.log("numberMatcher finished running");

    console.log("starting nextMatcher");
    const result = await nextMatcher(matchedData, matchedNumber);
    console.log("nextMatcher finished running");

    console.log("starting getResponse");
    const markup = await getResponse(nextMatcher(result));
    console.log("getResponse finished running");

    } catch (err) {
        console.log(err)
    }
}

However, as you can see from the log that's not quite happening. The content variable is returning in getVoicedData only after tscriptNumberMatcher has started and tscriptNumberMatcher needs the string in order to process correctly...

starting getVoicedData
bundle.js:6923 The value of event.resultIndex is: undefined
bundle.js:6924 The type of the event.resultIndex is: undefined
bundle.js:6873 getVoicedData finished running
bundle.js:6875 starting numberMatcher
bundle.js:6923 The value of event.resultIndex is: undefined
bundle.js:6924 The type of the event.resultIndex is: undefined
bundle.js:6993 tscriptNumberMatcher is running [object Object] undefined
bundle.js:6888 TypeError: Cannot read properties of undefined (reading 'match')
    at tscriptNumberMatcher (bundle.js:6997:26)
    at processVoicedSearch (bundle.js:6876:48)
bundle.js:6923 The value of event.resultIndex is: 0
bundle.js:6924 The type of the event.resultIndex is: number
bundle.js:6934 This is the transcript: 10 bananas
bundle.js:6946 string

For some reason getVoicedData seems to overspilling while tscriptNumberMatcher is executing...

Here is getVoicedData:

//getVoicedData function
function getVoicedData() {
    //creating recognition variable using the speechRecognition constructor
    var recognition = new speechRecognition()

    var content = ''

    recognition.continuous = true

    if (content.length) {
        content += ''
    }

    recognition.start();

    //Display voice recognition is on message, when recognition starts
    recognition.onstart = function() {
        instructions.text("Voice Recognition is on")
    }

    //When result (voice) is indicated (heard), start processing voice recognition
    recognition.onresult = function (event) {
        console.log("The value of event.resultIndex is: " + event.resultIndex);
        console.log("The type of the event.resultIndex is: " + (typeof event.resultIndex));

        do {
    if (event.resultIndex == undefined) {return}
} while (event.resultIndex == undefined);

        var current = event.resultIndex;

        var transcript = event.results[current][0].transcript

        console.log("This is the transcript: " + transcript);

        content += transcript

        console.log(typeof content);

        return content;
    }

    return recognition.onresult(content);

}


问:
node-gyp rebuild fail on m1 while installing dependencies
I'm trying to install the project dependency,
and it's failing on trying to rebuild node-gyp, when I removed 'metrohash' from the project dependency everything is working perfectly,
but I can't because it's a shared project,
and it's working for other developers (with Intel chip macbooks)

I've tried:

reinstall xcode

reinstall python2

update brew

uninstall 'metrohash' and 'yarn' to all other dependencies and reinstall 'metrohash'

remove node_modules, dist and reinstall

install node-sass globally

I'm using m1 pro macbook pro with Monterey 12.5.1

```<code># This file contains the result of Yarn building a package (metrohash@npm:2.8.0.**.tgz)
# Script code: node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@14.20.0 | darwin | arm64
gyp info find Python using Python version 3.10.6 found at "/Users/user/.pyenv/versions/3.10.6/bin/python3"
gyp info spawn /Users/user/.pyenv/versions/3.10.6/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/user/Projects/project-name/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/Projects/project-name/node_modules/metrohash/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/Projects/project-name/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/Library/Caches/node-gyp/14.20.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/user/Library/Caches/node-gyp/14.20.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/user/Projects/project-name/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/user/Library/Caches/node-gyp/14.20.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/user/Projects/project-name/node_modules/metrohash',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/metrohash/src/metrohash_wrapper.o
clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
  CXX(target) Release/obj.target/metrohash/src/metrohash128.o
clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
  CXX(target) Release/obj.target/metrohash/src/metrohash128crc.o
clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
In file included from ../src/metrohash128crc.cpp:27:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/emmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/emmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/emmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/xmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:37:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
    __builtin_ia32_emms();
    ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:37:5: note: '__builtin_isless' declared here
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:37:25: error: too few arguments to function call, expected 2, have 0
    __builtin_ia32_emms();
    ~~~~~~~~~~~~~~~~~~~~^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:54:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:71:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
    return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
           ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:133:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:163:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:193:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:220:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:243:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
    return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:264:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
    return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:291:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
    return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:314:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd'
    return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/metrohash/src/metrohash128crc.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/user/Projects/project-name/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/user/.nvm/versions/node/v14.20.0/bin/node" "/Users/user/Projects/project-name/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/user/Projects/project-name/node_modules/metrohash
gyp ERR! node -v v14.20.0
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok

</code>```

Body:
I'm trying to install the project dependency,
and it's failing on trying to rebuild node-gyp, when I removed 'metrohash' from the project dependency everything is working perfectly,
but I can't because it's a shared project,
and it's working for other developers (with Intel chip macbooks)

I've tried:

reinstall xcode

reinstall python2

update brew

uninstall 'metrohash' and 'yarn' to all other dependencies and reinstall 'metrohash'

remove node_modules, dist and reinstall

install node-sass globally

I'm using m1 pro macbook pro with Monterey 12.5.1

# This file contains the result of Yarn building a package (metrohash@npm:2.8.0.**.tgz)
# Script code: node-gyp rebuild

gyp info it worked if it ends with ok
gyp info using node-gyp@9.3.1
gyp info using node@14.20.0 | darwin | arm64
gyp info find Python using Python version 3.10.6 found at "/Users/user/.pyenv/versions/3.10.6/bin/python3"
gyp info spawn /Users/user/.pyenv/versions/3.10.6/bin/python3
gyp info spawn args [
gyp info spawn args   '/Users/user/Projects/project-name/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/Projects/project-name/node_modules/metrohash/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/Projects/project-name/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/user/Library/Caches/node-gyp/14.20.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/user/Library/Caches/node-gyp/14.20.0',
gyp info spawn args   '-Dnode_gyp_dir=/Users/user/Projects/project-name/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/user/Library/Caches/node-gyp/14.20.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/user/Projects/project-name/node_modules/metrohash',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  CXX(target) Release/obj.target/metrohash/src/metrohash_wrapper.o
clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
  CXX(target) Release/obj.target/metrohash/src/metrohash128.o
clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
  CXX(target) Release/obj.target/metrohash/src/metrohash128crc.o
clang: warning: argument unused during compilation: '-msse4.2' [-Wunused-command-line-argument]
In file included from ../src/metrohash128crc.cpp:27:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/emmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/emmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/xmmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
In file included from ../src/metrohash128crc.cpp:27:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/nmmintrin.h:19:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/smmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/tmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/pmmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/emmintrin.h:17:
In file included from /Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/xmmintrin.h:17:
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:14:2: error: "This header is only meant to be used on x86 and x64 architecture"
#error "This header is only meant to be used on x86 and x64 architecture"
 ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:37:5: error: use of undeclared identifier '__builtin_ia32_emms'; did you mean '__builtin_isless'?
    __builtin_ia32_emms();
    ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:37:5: note: '__builtin_isless' declared here
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:37:25: error: too few arguments to function call, expected 2, have 0
    __builtin_ia32_emms();
    ~~~~~~~~~~~~~~~~~~~~^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:54:19: error: use of undeclared identifier '__builtin_ia32_vec_init_v2si'
    return (__m64)__builtin_ia32_vec_init_v2si(__i, 0);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:71:12: error: use of undeclared identifier '__builtin_ia32_vec_ext_v2si'
    return __builtin_ia32_vec_ext_v2si((__v2si)__m, 0);
           ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:133:19: error: use of undeclared identifier '__builtin_ia32_packsswb'
    return (__m64)__builtin_ia32_packsswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:163:19: error: use of undeclared identifier '__builtin_ia32_packssdw'
    return (__m64)__builtin_ia32_packssdw((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:193:19: error: use of undeclared identifier '__builtin_ia32_packuswb'
    return (__m64)__builtin_ia32_packuswb((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:220:19: error: use of undeclared identifier '__builtin_ia32_punpckhbw'
    return (__m64)__builtin_ia32_punpckhbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:243:19: error: use of undeclared identifier '__builtin_ia32_punpckhwd'
    return (__m64)__builtin_ia32_punpckhwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:264:19: error: use of undeclared identifier '__builtin_ia32_punpckhdq'
    return (__m64)__builtin_ia32_punpckhdq((__v2si)__m1, (__v2si)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:291:19: error: use of undeclared identifier '__builtin_ia32_punpcklbw'
    return (__m64)__builtin_ia32_punpcklbw((__v8qi)__m1, (__v8qi)__m2);
                  ^
/Library/Developer/CommandLineTools/usr/lib/clang/14.0.0/include/mmintrin.h:314:19: error: use of undeclared identifier '__builtin_ia32_punpcklwd'
    return (__m64)__builtin_ia32_punpcklwd((__v4hi)__m1, (__v4hi)__m2);
                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make: *** [Release/obj.target/metrohash/src/metrohash128crc.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/user/Projects/project-name/node_modules/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (events.js:400:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:285:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command "/Users/user/.nvm/versions/node/v14.20.0/bin/node" "/Users/user/Projects/project-name/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/user/Projects/project-name/node_modules/metrohash
gyp ERR! node -v v14.20.0
gyp ERR! node-gyp -v v9.3.1
gyp ERR! not ok


问:
How to automatically generate table data in laravel every 2 months
hello I work on a laravel project on travel management.. I would like to generate trips in my project, automatically generate trips that take place for example at 8 a.m. or 10 a.m. for 2 months.. I would like to do it without going through by laravel seeders but using code.

my model Travel

```<code><?php

namespace App\Models;

use App\Models\Bus;
use App\Models\Path;
use App\Models\Codeqr;
use App\Models\Payment;
use App\Models\Schedule;
use App\Models\Passenger;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Travel extends Model
{
use HasFactory;

protected $fillable=[
    'date',
    'path_id',
    'agency_id',
    'price',
    'state',
    'classe',
    'schedule_id'
];

public function codeqr():BelongsTo
{
    return $this->belongsTo(Codeqr::class);
}

public function agency():BelongsTo
{
    return $this->belongsTo(Agency::class);
}

public function paiements():HasMany

{
    return $this->hasMany(Payment::class);
}

public function path():BelongsTo
{
    return $this->belongsTo(Path::class);
}

public function passengers():HasMany
{
    return $this->hasMany(Passenger::class);
}

public function bus():HasOne
{
    return $this->hasOne(Bus::class);
}
public function schedule():BelongsTo
{
    return $this->belongsTo(Schedule::class);
}
</code>```

}

Body:
hello I work on a laravel project on travel management.. I would like to generate trips in my project, automatically generate trips that take place for example at 8 a.m. or 10 a.m. for 2 months.. I would like to do it without going through by laravel seeders but using code.

my model Travel

<?php

namespace App\Models;

use App\Models\Bus;
use App\Models\Path;
use App\Models\Codeqr;
use App\Models\Payment;
use App\Models\Schedule;
use App\Models\Passenger;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasOne;

class Travel extends Model
{
use HasFactory;

protected $fillable=[
    'date',
    'path_id',
    'agency_id',
    'price',
    'state',
    'classe',
    'schedule_id'
];

public function codeqr():BelongsTo
{
    return $this->belongsTo(Codeqr::class);
}

public function agency():BelongsTo
{
    return $this->belongsTo(Agency::class);
}

public function paiements():HasMany

{
    return $this->hasMany(Payment::class);
}

public function path():BelongsTo
{
    return $this->belongsTo(Path::class);
}

public function passengers():HasMany
{
    return $this->hasMany(Passenger::class);
}

public function bus():HasOne
{
    return $this->hasOne(Bus::class);
}
public function schedule():BelongsTo
{
    return $this->belongsTo(Schedule::class);
}

}


问:
Configuring log4j2 in the Spring MVC application
I'm trying to configure log4j2 in spring mvc application.

It was working fine when I was using log4j 2.17.1 when I upgrade to 2.19.0 I'm getting an error.

Servelt version : 2.4

Log4j2 version : 2.19.0

Java version : 8

Tomcat :- 8.5

I'm getting the below error

```<code>4\apache-tomcat-8.5.84\webapps\test.war]
22-Dec-2022 12:27:22.211 INFO [localhost] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
22-Dec-2022 12:27:22.296 SEVERE [localhost] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.apache.logging.log4j.web.Log4jServletContextListener]
        java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.util.PropertiesUtil
                at org.apache.logging.log4j.status.StatusLogger.<clinit>(StatusLogger.java:78)
                at org.apache.logging.log4j.web.Log4jServletContextListener.<clinit>(Log4jServletContextListener.java:44)
</code>```

Does log4j2 2.19.0 supports java 8.

Here are the web.xml configuration details:-

```<code><web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://JAVA.sun.com/xml/ns/j2ee http://JAVA.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <listener>
        <listener-class>org.apache.logging.log4j.web.Log4jServletContextListener
        </listener-class>
    </listener>
    <filter>
        <filter-name>log4jServletFilter</filter-name>
        <filter-class>org.apache.logging.log4j.web.Log4jServletFilter
        </filter-class>
    </filter>
    <filter-mapping>
        <filter-name>log4jServletFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>classpath:log4j2${log4jenv:}.xml</param-value>
    </context-param>
</code>```

Body:
I'm trying to configure log4j2 in spring mvc application.

It was working fine when I was using log4j 2.17.1 when I upgrade to 2.19.0 I'm getting an error.

Servelt version : 2.4

Log4j2 version : 2.19.0

Java version : 8

Tomcat :- 8.5

I'm getting the below error

4\apache-tomcat-8.5.84\webapps\test.war]
22-Dec-2022 12:27:22.211 INFO [localhost] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath
22-Dec-2022 12:27:22.296 SEVERE [localhost] org.apache.catalina.core.StandardContext.listenerStart Error configuring application listener of class [org.apache.logging.log4j.web.Log4jServletContextListener]
        java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.util.PropertiesUtil
                at org.apache.logging.log4j.status.StatusLogger.<clinit>(StatusLogger.java:78)
                at org.apache.logging.log4j.web.Log4jServletContextListener.<clinit>(Log4jServletContextListener.java:44)

Does log4j2 2.19.0 supports java 8.

Here are the web.xml configuration details:-

<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://JAVA.sun.com/xml/ns/j2ee http://JAVA.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4">

    <listener>
        <listener-class>org.apache.logging.log4j.web.Log4jServletContextListener
        </listener-class>
    </listener>
    <filter>
        <filter-name>log4jServletFilter</filter-name>
        <filter-class>org.apache.logging.log4j.web.Log4jServletFilter
        </filter-class>
    </filter>
    <filter-mapping>
        <filter-name>log4jServletFilter</filter-name>
        <url-pattern>/*</url-pattern>
        <dispatcher>REQUEST</dispatcher>
        <dispatcher>FORWARD</dispatcher>
        <dispatcher>INCLUDE</dispatcher>
        <dispatcher>ERROR</dispatcher>
    </filter-mapping>

    <context-param>
        <param-name>log4jConfigLocation</param-name>
        <param-value>classpath:log4j2${log4jenv:}.xml</param-value>
    </context-param>


问:
Wordpress automator plugin missing base tables
I installed automator plugin in wordpress and I got this errors. Can someone please help me to solve it?

I deleted and installed again the plugin but still have the same errors


问:
Null Check Operator Used On a Null Value? GetStorage in flutter give me this error
I am using GetStorage package in Flutter to check if the current user is login or not but it gives the error.

For example, when a user does not login it shows the null error and when I login it then it is filn, check if you can.

```<code>import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:mobihub_2/Screens/main_login.dart';
import 'package:mobihub_2/Screens/navigationscreens.dart/add.dart';

import 'navigationscreens.dart/adds.dart';
import 'navigationscreens.dart/chat.dart';
import 'navigationscreens.dart/home2.dart';
import 'navigationscreens.dart/person.dart';

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

  @override

  // ignore: library_private_types_in_public_api
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  final auth = FirebaseAuth.instance;

  int currentTab = 0;
  final List<Widget> screens = const [
    Home2(),
    Chat(),
    Youradds(),
    Account(),
  ];
  final PageStorageBucket bucket = PageStorageBucket();
  Widget currentScreen = const Home2();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey.shade100,
      body: PageStorage(
        bucket: bucket,
        child: currentScreen,
      ),
      floatingActionButton: FloatingActionButton(
        backgroundColor: const Color(0xFFFFDC3D),
        elevation: 2.5,
        onPressed: () {
          if(FirebaseAuth.instance.currentUser != null){
            Navigator.push(context,
                MaterialPageRoute(builder: (context) => const AddItems()));
          }else{
            Navigator.push(context,
                MaterialPageRoute(builder: (context) =>  MainLogin()));
          }

        },
        child: const Icon(
          Icons.add,
          color: Colors.black,
        ),
      ),
      floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
      bottomNavigationBar: BottomAppBar(
        color: Colors.white,
        shape: const CircularNotchedRectangle(),
        notchMargin: 10,
        child: SizedBox(
          height: 60,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: <Widget>[
              Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        currentScreen = const Home2();
                        currentTab = 0;

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.home,
                          color: currentTab == 0
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 0
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  ),
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        if(FirebaseAuth.instance.currentUser != null){
                          currentScreen = const Chat();
                          currentTab = 1;
                        }else{
                          Navigator.push(context,
                              MaterialPageRoute(builder: (context) =>  MainLogin()));
                        }

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.chat,
                          color: currentTab == 1
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 1
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  )
                ],
              ),
              Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        if(FirebaseAuth.instance.currentUser != null){
                          currentScreen = const Youradds();
                          currentTab = 2;
                        }else{
                          Navigator.push(context,
                              MaterialPageRoute(builder: (context) =>  MainLogin()));
                        }

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.favorite,
                          color: currentTab == 2
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 2
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  ),
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    autofocus: false,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        if(FirebaseAuth.instance.currentUser != null){
                          currentScreen =  Account();
                          currentTab = 3;
                        }else{
                          Navigator.push(context,
                              MaterialPageRoute(builder: (context) =>  MainLogin()));
                        }

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.person,
                          color: currentTab == 3
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 3
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  )
                ],
              )
            ],
          ),
        ),
      ),
    );
  }
}
</code>```

I need help if anyone expert in Flutter checks my code and gives me the right answer. Thank you in advance.

Body:
I am using GetStorage package in Flutter to check if the current user is login or not but it gives the error.

For example, when a user does not login it shows the null error and when I login it then it is filn, check if you can.

import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:mobihub_2/Screens/main_login.dart';
import 'package:mobihub_2/Screens/navigationscreens.dart/add.dart';

import 'navigationscreens.dart/adds.dart';
import 'navigationscreens.dart/chat.dart';
import 'navigationscreens.dart/home2.dart';
import 'navigationscreens.dart/person.dart';

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

  @override

  // ignore: library_private_types_in_public_api
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  final auth = FirebaseAuth.instance;

  int currentTab = 0;
  final List<Widget> screens = const [
    Home2(),
    Chat(),
    Youradds(),
    Account(),
  ];
  final PageStorageBucket bucket = PageStorageBucket();
  Widget currentScreen = const Home2();

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.grey.shade100,
      body: PageStorage(
        bucket: bucket,
        child: currentScreen,
      ),
      floatingActionButton: FloatingActionButton(
        backgroundColor: const Color(0xFFFFDC3D),
        elevation: 2.5,
        onPressed: () {
          if(FirebaseAuth.instance.currentUser != null){
            Navigator.push(context,
                MaterialPageRoute(builder: (context) => const AddItems()));
          }else{
            Navigator.push(context,
                MaterialPageRoute(builder: (context) =>  MainLogin()));
          }

        },
        child: const Icon(
          Icons.add,
          color: Colors.black,
        ),
      ),
      floatingActionButtonLocation: FloatingActionButtonLocation.centerDocked,
      bottomNavigationBar: BottomAppBar(
        color: Colors.white,
        shape: const CircularNotchedRectangle(),
        notchMargin: 10,
        child: SizedBox(
          height: 60,
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: <Widget>[
              Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        currentScreen = const Home2();
                        currentTab = 0;

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.home,
                          color: currentTab == 0
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 0
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  ),
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        if(FirebaseAuth.instance.currentUser != null){
                          currentScreen = const Chat();
                          currentTab = 1;
                        }else{
                          Navigator.push(context,
                              MaterialPageRoute(builder: (context) =>  MainLogin()));
                        }

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.chat,
                          color: currentTab == 1
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 1
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  )
                ],
              ),
              Row(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        if(FirebaseAuth.instance.currentUser != null){
                          currentScreen = const Youradds();
                          currentTab = 2;
                        }else{
                          Navigator.push(context,
                              MaterialPageRoute(builder: (context) =>  MainLogin()));
                        }

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.favorite,
                          color: currentTab == 2
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 2
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  ),
                  MaterialButton(
                    highlightElevation: 0.0,
                    highlightColor: Colors.white,
                    hoverColor: Colors.white,
                    hoverElevation: 0.0,
                    autofocus: false,
                    minWidth: 40,
                    onPressed: () {
                      setState(() {
                        if(FirebaseAuth.instance.currentUser != null){
                          currentScreen =  Account();
                          currentTab = 3;
                        }else{
                          Navigator.push(context,
                              MaterialPageRoute(builder: (context) =>  MainLogin()));
                        }

                      });
                    },
                    child: Column(
                      mainAxisAlignment: MainAxisAlignment.center,
                      children: [
                        Icon(
                          Icons.person,
                          color: currentTab == 3
                              ? const Color(0xFFFFDC3D)
                              : Colors.black,
                          size: 25,
                        ),
                        Text(
                          '',
                          style: TextStyle(
                              color: currentTab == 3
                                  ? const Color(0xFFFFDC3D)
                                  : Colors.white),
                        )
                      ],
                    ),
                  )
                ],
              )
            ],
          ),
        ),
      ),
    );
  }
}

I need help if anyone expert in Flutter checks my code and gives me the right answer. Thank you in advance.


问:
Python Error With Decorator: 'NoneType' object is not callable
I don't understand how the decorator works in Python. I thought it is passing 1 function into another. But I get error with the below code. How do I modify it? Thank you

```<code>
def mes(text):
    print ("Hello" + " " + str(text))

@mes
def name():
    return "Nicky"

print (mes(name()))

</code>```

Actual Result

TypeError: 'NoneType' object is not callable

Expected output

"Hello Nicky"

Body:
I don't understand how the decorator works in Python. I thought it is passing 1 function into another. But I get error with the below code. How do I modify it? Thank you

def mes(text):
    print ("Hello" + " " + str(text))

@mes
def name():
    return "Nicky"

print (mes(name()))

Actual Result

TypeError: 'NoneType' object is not callable

Expected output

"Hello Nicky"


问:
Microservices Architecture with System of Records
We are planning to move from Monolith to Microservices architecture. We will not be able to achieve Database per microservice as we have dependency with approximately 50+ System of records.

The objective is to move the logic from Front end channels API server (Mobile API, Website API etc. and put it into microservices which will be horizontally scalable in the Openshift/Kubernetes environment.

Is it a feasible plan to move to microservices architecture when we cannot directly connect DB to microservices? Some of the logic will be present in system of records and microservices will be communicating with system of records through REST or MQ.

Will it be feasible to talk through message queues or HTTP when talking with system of records though microservices?

The "to be" new architecture is as follows

The Old architecture is as follows.


问:
Conversion of ArrayList<> to Json Object Array in Android
I want to pass my array list which I get it from the Model Class in android to Json Object Array from one Activity to another activity and also suggest me the possibilities to  achieve this process in Java.

```<code>implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

JsonArray jsonElements = (JsonArray) new Gson().toJsonTree(itemsArrayList);

</code>```

And I will Convert this jsonElements to string and finally I will pass this to another activity via Intent.

Body:
I want to pass my array list which I get it from the Model Class in android to Json Object Array from one Activity to another activity and also suggest me the possibilities to  achieve this process in Java.

implementation 'com.squareup.retrofit2:converter-gson:2.3.0'

JsonArray jsonElements = (JsonArray) new Gson().toJsonTree(itemsArrayList);

And I will Convert this jsonElements to string and finally I will pass this to another activity via Intent.