问:
Binary semaphore for process syncronization
I want synchronize between producer and consumer processes. I use a cyclic buffer without mutexes or semaphores.
This solution allows me to avoid waiting on synchronization.
I use shared memory cyclic buffer for the data sharing.

Now I want to allow the consumer process to sleep while the producer doesn't produce new data.
Regular named semaphore doesn't make the job for me, because it has an integer value. I need some binary semaphore, that is not incrementing, but just signals the consumer whether there is a new data or not.
I.e. the produced should not increment the semaphore value, but just to set it to 1.

I write in C++ for Linux OS


来源: stackexchange

问:
prime number finding from array,c language

You are given two positive integers L and R. Now print the prime
numbers between L to R.

Note: Assume that 1 is a prime number

Input Format

The first line will contain T, the number of test cases. Each test
case contains two positive integer L and R Constraints

0 < T <= 20 1 <= L,R <= 100 and where L < R Output Format

Print the prime numbers between L to R.

```<code>int main()
{
    int t, i, j;
    scanf("%d", &t);
    for (i = 0; i < t; i++) {
        int l, r;
        scanf("%d %d\n", &l, &r);

        while (l < r) {
            for (j = 2; j < l / 2; j++) {
                if (l % j != 0) {
                    printf("%d ", l);
                }
                l += 1;
            }
        }
    }
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */
    return 0;
}
</code>```

It takes input but doesnt return any value.
I tried and could not fix it. Can anyone explain what is wrong with the code? And to offer suggestions to fix it please.
Thanks.

ContentLicense: CC BY-SA 4.0

Body:
You are given two positive integers L and R. Now print the prime
numbers between L to R.

Note: Assume that 1 is a prime number

Input Format

The first line will contain T, the number of test cases. Each test
case contains two positive integer L and R Constraints

0 < T <= 20 1 <= L,R <= 100 and where L < R Output Format

Print the prime numbers between L to R.

int main()
{
    int t, i, j;
    scanf("%d", &t);
    for (i = 0; i < t; i++) {
        int l, r;
        scanf("%d %d\n", &l, &r);

        while (l < r) {
            for (j = 2; j < l / 2; j++) {
                if (l % j != 0) {
                    printf("%d ", l);
                }
                l += 1;
            }
        }
    }
    /* Enter your code here. Read input from STDIN. Print output to STDOUT */
    return 0;
}

It takes input but doesnt return any value.
I tried and could not fix it. Can anyone explain what is wrong with the code? And to offer suggestions to fix it please.
Thanks.


问:
Is there any way to fix nested  style issue in the ck-editor-5?
I am facing an issue in my Vue project while using CK Editor5.

When I use the below HTML code in source editing (CK editor component) it shows an error like this-

```<code>Please review the attached image.
</code>```

And I didn't get the expected output from the editor.

Html content :

```<code><p><span  style="color:red"> Sample text <span class="has-text-white"> ABCDEFG</span>, XYZ </span></p>
</code>```

I have used the below code in CK Editor and I got the above-mentioned error.

```<code><section>
    <div class="container">
        <div class="min-height-400">
            <p>
                Heading
            </p>
       <p><span  style="color:red"> Sample text <span class="has-text-white"> ABCDEFG</span>, XYZ </span></p>
        </div>
    </div>
</section>
</code>```

Error:

```<code>ckeditorerror.js?4d68:118 Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at _iterableToArray (iterableToArray.js?5822:2:1)
    at _toConsumableArray (toConsumableArray.js?ab35:6:1)
    at mergeViewElementAttributes (conversionutils.js?9a8a:48:1)
    at dispatcher.on.priority (converters.js?94bb:104:1)
    at UpcastDispatcher.fire (emittermixin.js?0e61:199:1)
    at UpcastDispatcher._convertItem (upcastdispatcher.js?e583:249:1)
    at UpcastDispatcher._convertChildren (upcastdispatcher.js?e583:282:1)
    at UpcastDispatcher.eval (upcasthelpers.js?bb9b:783:1)
    at UpcastDispatcher.fire (emittermixin.js?0e61:199:1)
    at UpcastDispatcher._convertItem (upcastdispatcher.js?e583:249:1)
</code>```

Title: Is there any way to fix nested <span> style issue in the ck-editor-5?

Body:
I am facing an issue in my Vue project while using CK Editor5.

When I use the below HTML code in source editing (CK editor component) it shows an error like this-

Please review the attached image.

And I didn't get the expected output from the editor.

Html content :

 Sample text  ABCDEFG, XYZ

I have used the below code in CK Editor and I got the above-mentioned error.

                Heading

 Sample text  ABCDEFG, XYZ

Error:

ckeditorerror.js?4d68:118 Uncaught TypeError: undefined is not iterable (cannot read property Symbol(Symbol.iterator))
    at _iterableToArray (iterableToArray.js?5822:2:1)
    at _toConsumableArray (toConsumableArray.js?ab35:6:1)
    at mergeViewElementAttributes (conversionutils.js?9a8a:48:1)
    at dispatcher.on.priority (converters.js?94bb:104:1)
    at UpcastDispatcher.fire (emittermixin.js?0e61:199:1)
    at UpcastDispatcher._convertItem (upcastdispatcher.js?e583:249:1)
    at UpcastDispatcher._convertChildren (upcastdispatcher.js?e583:282:1)
    at UpcastDispatcher.eval (upcasthelpers.js?bb9b:783:1)
    at UpcastDispatcher.fire (emittermixin.js?0e61:199:1)
    at UpcastDispatcher._convertItem (upcastdispatcher.js?e583:249:1)


问:
is there a reason for why I have users with weird IDs (i.e: '0', '1'... ) being created randomly in the database (firebase)?
I have a simple chat app where you can sign up for an account, sometimes users with weird IDs pop up in the database.
Signing up does not cause this problem, these users appear to be created randomly.
[]

I tried deleting these users but it keeps popping up. The IDs seem to be indexed starting from 0


问:
How to Verify Email if user use phone to Laravel
User registers on my website and they need to approve their email. User goes to gmail (for example) on phone and they need again to login and again to send verification message. How to solve this problem?

my routes:

```<code>Route::prefix('/email')
    ->name('verification.')
    ->group(function () {
        Route::get('/verify', function () {
            return view('notifications::email');
        })->middleware('auth')->name('notice');

        Route::get('/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
            $request->fulfill();
            return redirect(route('posts.index'))->with('success', '');
        })->middleware(['auth', 'signed'])->name('verify');

        Route::post('/verification-notification', function (Request $request) {
            $request->user()->sendEmailVerificationNotification();
            return back()->with('success', '');
        })->middleware(['auth', 'throttle:6,1'])->name('send');
    });
</code>```

At the moment, on my website, the User logs in automatically, but this solution only works on the PC. Because he is authorized.

My register controller now:

```<code>public function create(UserRegisterRequest $request): RedirectResponse
{
    $user = User::create([
        'email' => $request->email,
        'name' => $request->name,
        'password' => \Hash::make($request->password)
    ]);

    event(new Registered($user));

    auth()->login($user);

    return response()->redirectTo(route('posts.index'))->with(
        'success',
        "{$request->email}"
    );
}
</code>```

I have only one thought in my head how to solve this problem, allow the user to confirm mail without authorization, but I do not like this approach

Body:
User registers on my website and they need to approve their email. User goes to gmail (for example) on phone and they need again to login and again to send verification message. How to solve this problem?

my routes:

Route::prefix('/email')
    ->name('verification.')
    ->group(function () {
        Route::get('/verify', function () {
            return view('notifications::email');
        })->middleware('auth')->name('notice');

        Route::get('/verify/{id}/{hash}', function (EmailVerificationRequest $request) {
            $request->fulfill();
            return redirect(route('posts.index'))->with('success', '');
        })->middleware(['auth', 'signed'])->name('verify');

        Route::post('/verification-notification', function (Request $request) {
            $request->user()->sendEmailVerificationNotification();
            return back()->with('success', '');
        })->middleware(['auth', 'throttle:6,1'])->name('send');
    });

At the moment, on my website, the User logs in automatically, but this solution only works on the PC. Because he is authorized.

My register controller now:

public function create(UserRegisterRequest $request): RedirectResponse
{
    $user = User::create([
        'email' => $request->email,
        'name' => $request->name,
        'password' => \Hash::make($request->password)
    ]);

    event(new Registered($user));

    auth()->login($user);

    return response()->redirectTo(route('posts.index'))->with(
        'success',
        "{$request->email}"
    );
}

I have only one thought in my head how to solve this problem, allow the user to confirm mail without authorization, but I do not like this approach


问:
Resilience4j circuitBreaker blocks all my methods when it's being opened
I have the following code:

```<code>@RestController
@RequestMapping("/test")
public class TmsTestController {

private static final Logger LOGGER = LoggerFactory.getLogger(TmsTestController.class);
private final DummyService dummyService;

public DmsTestController(DummyService dummyService) {
    this.dummyService = dummyService;
}

@GetMapping("/v1")
public void testMethod1() {
    LOGGER.info("Called method v1");
    dummyService.failingMethod1();
}

@GetMapping("/v2")
public void testMethod2() {
    LOGGER.info("Called method v2");
    dummyService.failingMethod2();
}

@GetMapping("/v3")
public void testMethod3() {
    LOGGER.info("Called method v3");
    dummyService.notFailingMethod3();
}
}
</code>```

and the service layer:

```<code>@Service
public class DummyService {

@CircuitBreaker(name = "tms")
@Retry(name = "tms")
public void failingMethod1() {
    System.out.println("This is a second test");
    throw new HttpServerErrorException(HttpStatus.BAD_REQUEST);
}
@CircuitBreaker(name = "tms")
@Retry(name = "tms")
public void failingMethod2() {
    System.out.println("This is a test");
    throw new HttpServerErrorException(HttpStatus.BAD_REQUEST);
}

@CircuitBreaker(name = "tms")
@Retry(name = "tms")
public void notFailingMethod3() {
    System.out.println("This is a test");
    System.out.println("It is being finished!");
}
</code>```

}

and my resilience4j configuration:

```<code>resilience4j.circuitbreaker:
configs:
default:
  registerHealthIndicator: true
  failureRateThreshold: 60
  slidingWindowSize: 10
  minimumNumberOfCalls: 10
  waitDurationInOpenState: 20000
  slowCallDurationThreshold: 60000
  slowCallRateThreshold: 100
  permittedNumberOfCallsInHalfOpenState: 1
  automaticTransitionFromOpenToHalfOpenEnabled: true
</code>```

It all works fine but I am having the following issue:

If I call endpoint /test/v1 10 times the circuit breaker will be opened. But this will also block the /test/v3 endpoint since the circuit breaker is opened. I want to know if there is a way for this one tms circuit breaker to work per method so I won't be blocking the working methods.

In reality my service is calling a lot of endpoints from another microservice and they are all using the same circuit breaker and if one of them fails I am blocking everyone else. And I don't want to have like tms1,tms2 ... tms33 circuit breakers.

If anyone knows how a single circuit breaker to block only the failing method please help!

Body:
I have the following code:

@RestController
@RequestMapping("/test")
public class TmsTestController {

private static final Logger LOGGER = LoggerFactory.getLogger(TmsTestController.class);
private final DummyService dummyService;

public DmsTestController(DummyService dummyService) {
    this.dummyService = dummyService;
}

@GetMapping("/v1")
public void testMethod1() {
    LOGGER.info("Called method v1");
    dummyService.failingMethod1();
}

@GetMapping("/v2")
public void testMethod2() {
    LOGGER.info("Called method v2");
    dummyService.failingMethod2();
}

@GetMapping("/v3")
public void testMethod3() {
    LOGGER.info("Called method v3");
    dummyService.notFailingMethod3();
}
}

and the service layer:

@Service
public class DummyService {

@CircuitBreaker(name = "tms")
@Retry(name = "tms")
public void failingMethod1() {
    System.out.println("This is a second test");
    throw new HttpServerErrorException(HttpStatus.BAD_REQUEST);
}
@CircuitBreaker(name = "tms")
@Retry(name = "tms")
public void failingMethod2() {
    System.out.println("This is a test");
    throw new HttpServerErrorException(HttpStatus.BAD_REQUEST);
}

@CircuitBreaker(name = "tms")
@Retry(name = "tms")
public void notFailingMethod3() {
    System.out.println("This is a test");
    System.out.println("It is being finished!");
}

}

and my resilience4j configuration:

resilience4j.circuitbreaker:
configs:
default:
  registerHealthIndicator: true
  failureRateThreshold: 60
  slidingWindowSize: 10
  minimumNumberOfCalls: 10
  waitDurationInOpenState: 20000
  slowCallDurationThreshold: 60000
  slowCallRateThreshold: 100
  permittedNumberOfCallsInHalfOpenState: 1
  automaticTransitionFromOpenToHalfOpenEnabled: true

It all works fine but I am having the following issue:

If I call endpoint /test/v1 10 times the circuit breaker will be opened. But this will also block the /test/v3 endpoint since the circuit breaker is opened. I want to know if there is a way for this one tms circuit breaker to work per method so I won't be blocking the working methods.

In reality my service is calling a lot of endpoints from another microservice and they are all using the same circuit breaker and if one of them fails I am blocking everyone else. And I don't want to have like tms1,tms2 ... tms33 circuit breakers.

If anyone knows how a single circuit breaker to block only the failing method please help!


问:
Why its not rendering welcome page when I click Sign in button?
app.js

```<code>const express = require('express');
const bodyParser = require('body-parser');
const ejs = require('ejs');
const mongoose = require('mongoose');

const app = express();

app.use(express.static('public'));
app.use(bodyParser.urlencoded({ extended: true }));

app.set('view engine', "ejs");

mongoose.set('strictQuery', false);

mongoose.connect("mongodb://localhost:27017/friendDB", { useNewUrlParser: true });

// Create Schema
const friendSchema = new mongoose.Schema({
    email: String,
    password: Array,
});

// Create Model through Schema
const Friend = new mongoose.model("Friend", friendSchema);

app.get('/', (req, res) => {
    res.render("home");
})

app.get('/SignUp', (req, res) => {
    res.render('SignUp');
})

app.get('/SignIn', (req, res) => {
    res.render('SignIn');
});

app.get('/welcome', (req, res) => {
    res.render('welcome');
})

// app.get("/signInFail", (req,res)=>{
//     res.render("signInFail");
// });

app.post('/SignUp', (req, res) => {
    // console.log(req.body.username);
    // console.log(req.body.password);
    const newFriend = new Friend({
        email: req.body.username,
        password: req.body.password,
        confirmPassword: req.body.password
    });

    newFriend.save((err) => {
        if (err) {
            console.log(err);
        } else {
            res.render("welcome");
        }
    })

});

app.post('/SignIn', (req, res) => {
    const username = req.body.username;
    const password = req.body.password;
    Friend.findOne({ email: username }, function (err, foundFriend) {
        if (err) {
            console.log(err);
        } else {
            if (foundFriend) {
                if (foundFriend.password === password) {
                    res.render("welcome");
                 }
            }
        }
    });

});

// app.post("/SignIn", (req,res)=>{
//    const username = req.body.username;
//    const password = req.body.password;

//    Friend.findOne({email:username}, (err, foundFriend)=>{
//     if(err){
//         console.log(err);
//     }else{
//         if(foundFriend){
//             if(foundFriend.password === password){
//                 res.render("welcome");
//             }
//         }
//     }
//    });
// });

app.listen(3000, () => {
    console.log('server listening at port 3000');
})

</code>```

welcome.ejs

```<code><!doctype html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Welcome</title>
    <link rel="stylesheet" href="css/styles.css">
    <!-- CSS only -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">

</head>

<body class="text-center" style="margin:5% 35% 0 35%;">

    <main class="form-signin w-100 m-auto">
        <form>
            <img src="./images/haikyyu main logo.png" alt="main_logo" height="150" width="150"
                style="padding-bottom: 15px;border-radius: 100px;">

            <h1 class="h3 mb-3 fw-normal">Hurray!</h1>

            <h2>You've Signed In successfully.</h2>

            <p class="mt-5 mb-3 text-muted">© 2022</p>
        </form>
    </main>

</body>

</html>
</code>```

SignIn.ejs

```<code><!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    <title>SignIn</title>
</head>

<body>

    <body class="text-center" style="margin:5% 35% 0 35%;">

        <main class="form-signin w-100 m-auto">
            <form action="/SignIn" method="post">
                <img src="./images/haikyyu main logo.png" alt="main_logo" height="150" width="150"
                    style="padding-bottom: 15px;border-radius: 100px;">

                <h1 class="h3 mb-3 fw-normal">Sign-In</h1>

                <div class="form-floating">
                    <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com" name="username">
                    <label for="floatingInput">Email address</label>
                </div>
                <div class="form-floating" style="padding-top: 3px;">
                    <input type="password" class="form-control" id="floatingPassword" placeholder="Password" name="password">
                    <label for="floatingPassword">Password</label>
                </div>

                <div class="checkbox mb-3" style="padding-top:15px">
                    <label>
                        <input type="checkbox" value="remember-me"> Remember me
                    </label>
                </div>

                <div class="buttons" style="display: flex; justify-content: space-between;">

                    <a href="/SignUp" class="w-50 h-40 btn btn-lg btn-dark">Sign Up</a>

                    <button class="w-50 btn btn-lg" type="submit"
                        style="margin-left: 15px;background-color: rgb(236, 76, 18);color:aliceblue;">Sign In</button>

                </div>
                <p class="mt-5 mb-3 text-muted">© 2022</p>
            </form>
        </main>

    </body>
</body>

</html>
</code>```

It's not showing any error, it was working when I first tried it but after some time, when I tried to sign in with the same username and password the loader is just keep loading not showing the welcome page.

I think there is some problem in this code:

```<code>app.post('/SignIn', (req, res) => {
    const username = req.body.username;
    const password = req.body.password;
    Friend.findOne({ email: username }, function (err, foundFriend) {
        if (err) {
            console.log(err);
        } else {
            if (foundFriend) {
                if (foundFriend.password === password) {
                    res.render("welcome");
                 }
            }
        }
    });

});
</code>```

But I'm unable to figure out what it is.

Body:
app.js

const express = require('express');
const bodyParser = require('body-parser');
const ejs = require('ejs');
const mongoose = require('mongoose');

const app = express();

app.use(express.static('public'));
app.use(bodyParser.urlencoded({ extended: true }));

app.set('view engine', "ejs");

mongoose.set('strictQuery', false);

mongoose.connect("mongodb://localhost:27017/friendDB", { useNewUrlParser: true });

// Create Schema
const friendSchema = new mongoose.Schema({
    email: String,
    password: Array,
});

// Create Model through Schema
const Friend = new mongoose.model("Friend", friendSchema);

app.get('/', (req, res) => {
    res.render("home");
})

app.get('/SignUp', (req, res) => {
    res.render('SignUp');
})

app.get('/SignIn', (req, res) => {
    res.render('SignIn');
});

app.get('/welcome', (req, res) => {
    res.render('welcome');
})

// app.get("/signInFail", (req,res)=>{
//     res.render("signInFail");
// });

app.post('/SignUp', (req, res) => {
    // console.log(req.body.username);
    // console.log(req.body.password);
    const newFriend = new Friend({
        email: req.body.username,
        password: req.body.password,
        confirmPassword: req.body.password
    });

    newFriend.save((err) => {
        if (err) {
            console.log(err);
        } else {
            res.render("welcome");
        }
    })

});

app.post('/SignIn', (req, res) => {
    const username = req.body.username;
    const password = req.body.password;
    Friend.findOne({ email: username }, function (err, foundFriend) {
        if (err) {
            console.log(err);
        } else {
            if (foundFriend) {
                if (foundFriend.password === password) {
                    res.render("welcome");
                 }
            }
        }
    });

});

// app.post("/SignIn", (req,res)=>{
//    const username = req.body.username;
//    const password = req.body.password;

//    Friend.findOne({email:username}, (err, foundFriend)=>{
//     if(err){
//         console.log(err);
//     }else{
//         if(foundFriend){
//             if(foundFriend.password === password){
//                 res.render("welcome");
//             }
//         }
//     }
//    });
// });

app.listen(3000, () => {
    console.log('server listening at port 3000');
})

welcome.ejs

<!doctype html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Welcome</title>
    <link rel="stylesheet" href="css/styles.css">

    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">

        <form>

Hurray!

You've Signed In successfully.

© 2022

        </form>

SignIn.ejs

<!DOCTYPE html>

    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
    <title>SignIn</title>

            <form action="/SignIn" method="post">

Sign-In

                    <input type="email" class="form-control" id="floatingInput" placeholder="name@example.com" name="username">
                    Email address

                    <input type="password" class="form-control" id="floatingPassword" placeholder="Password" name="password">
                    Password

                        <input type="checkbox" value="remember-me"> Remember me

                    Sign Up

                    <button class="w-50 btn btn-lg" type="submit"
                        style="margin-left: 15px;background-color: rgb(236, 76, 18);color:aliceblue;">Sign In</button>

© 2022

            </form>

It's not showing any error, it was working when I first tried it but after some time, when I tried to sign in with the same username and password the loader is just keep loading not showing the welcome page.

I think there is some problem in this code:

app.post('/SignIn', (req, res) => {
    const username = req.body.username;
    const password = req.body.password;
    Friend.findOne({ email: username }, function (err, foundFriend) {
        if (err) {
            console.log(err);
        } else {
            if (foundFriend) {
                if (foundFriend.password === password) {
                    res.render("welcome");
                 }
            }
        }
    });

});

But I'm unable to figure out what it is.


问:
CommandInvokationFailure: Gradle build failed
I am new to unity. I am using unity 2021.3.10f1 I made my own game and added advertising and other features. When trying to build, it shows the error "CommandInvokationFailure: Gradle build failed." Can you help? An error that is shown in unity:

```<code>CommandInvokationFailure: Gradle build failed.
D:\HappyWin\Unity and projects\2021.3.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\HappyWin\gradle-6.1.1\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
</code>```
```<code>stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
  The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.tracing:tracing:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0
</code>```

Changed gradle to different versions. Did not help.

Body:
I am new to unity. I am using unity 2021.3.10f1 I made my own game and added advertising and other features. When trying to build, it shows the error "CommandInvokationFailure: Gradle build failed." Can you help? An error that is shown in unity:

CommandInvokationFailure: Gradle build failed.
D:\HappyWin\Unity and projects\2021.3.10f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\HappyWin\gradle-6.1.1\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"

stderr[

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':launcher:lintVitalRelease'.
> This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry.
  The following AndroidX dependencies are detected: androidx.fragment:fragment:1.0.0, androidx.slidingpanelayout:slidingpanelayout:1.0.0, androidx.versionedparcelable:versionedparcelable:1.1.0, androidx.core:core:1.2.0, androidx.customview:customview:1.0.0, androidx.swiperefreshlayout:swiperefreshlayout:1.0.0, androidx.interpolator:interpolator:1.0.0, androidx.loader:loader:1.0.0, androidx.drawerlayout:drawerlayout:1.0.0, androidx.viewpager:viewpager:1.0.0, androidx.collection:collection:1.0.0, androidx.localbroadcastmanager:localbroadcastmanager:1.0.0, androidx.lifecycle:lifecycle-common:2.0.0, androidx.arch.core:core-common:2.0.0, androidx.annotation:annotation:1.2.0, androidx.startup:startup-runtime:1.0.0, androidx.tracing:tracing:1.0.0, androidx.legacy:legacy-support-core-ui:1.0.0, androidx.lifecycle:lifecycle-livedata:2.0.0, androidx.lifecycle:lifecycle-viewmodel:2.0.0, androidx.lifecycle:lifecycle-livedata-core:2.0.0, androidx.arch.core:core-runtime:2.0.0, androidx.legacy:legacy-support-core-utils:1.0.0, androidx.documentfile:documentfile:1.0.0, androidx.cursoradapter:cursoradapter:1.0.0, androidx.lifecycle:lifecycle-runtime:2.0.0, androidx.coordinatorlayout:coordinatorlayout:1.0.0, androidx.asynclayoutinflater:asynclayoutinflater:1.0.0, androidx.print:print:1.0.0

Changed gradle to different versions. Did not help.


问:
Error Message: From Assembly Cannot Embed Interop Types from Assembly
Im using .NET Framework 4.8 and Im using the ClosedXML Library,but my programm is an class Library type of programm so that the dll of the programm will land in an different folder where all other additional dll like the closedXML dll are not allowed to be there in that folder. So if i want to execute the dll I get error message that the Assembly references not are found, which is logic because in the other folder all the dll like closedXML are not in the folder and cant be referenced.

So what I tried to do is to embedded the Interop Type set to true.

But when I set it to true I get these two Error Messages:

```<code>Error CS1747 Interoptypes cannot be embedded from assembly "DocumentFormat.OpenXml, Version=2.19.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17" because the System.Runtime.InteropServices.GuidAttribute attribute is missing.
</code>```

and

```<code>Error CS1759 Cannot embed interoptypes from assembly "DocumentFormat.OpenXml, Version=2.19.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17" because either the System.Runtime.InteropServices.ImportedFromTypeLibAttribute attribute or the System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute attribute is missing.
</code>```

what I tried to fix this problem was at first rebuild entire solution and install the dll new.

And I tried to add this Code to the assemblyinfor.cs file:

```<code>[assembly: System.Runtime.InteropServices.Guid("2e197457-53cd-4261-81b6-07c65281b2a3")]
[assembly: PrimaryInteropAssembly(1, 0)]
</code>```

but I get the Error message still, all the dll are on the newest version.

Someone an Idea how to set the Interop Type to true without getting this Error message?

Body:
Im using .NET Framework 4.8 and Im using the ClosedXML Library,but my programm is an class Library type of programm so that the dll of the programm will land in an different folder where all other additional dll like the closedXML dll are not allowed to be there in that folder. So if i want to execute the dll I get error message that the Assembly references not are found, which is logic because in the other folder all the dll like closedXML are not in the folder and cant be referenced.

So what I tried to do is to embedded the Interop Type set to true.

But when I set it to true I get these two Error Messages:

Error CS1747 Interoptypes cannot be embedded from assembly "DocumentFormat.OpenXml, Version=2.19.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17" because the System.Runtime.InteropServices.GuidAttribute attribute is missing.

and

Error CS1759 Cannot embed interoptypes from assembly "DocumentFormat.OpenXml, Version=2.19.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17" because either the System.Runtime.InteropServices.ImportedFromTypeLibAttribute attribute or the System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute attribute is missing.

what I tried to fix this problem was at first rebuild entire solution and install the dll new.

And I tried to add this Code to the assemblyinfor.cs file:

[assembly: System.Runtime.InteropServices.Guid("2e197457-53cd-4261-81b6-07c65281b2a3")]
[assembly: PrimaryInteropAssembly(1, 0)]

but I get the Error message still, all the dll are on the newest version.

Someone an Idea how to set the Interop Type to true without getting this Error message?


问:
Babel loader not compiling files in node_modules even when specified in include paths
I have a custom react + webpack + babel + typescript setup for a simple react application that consumes some component from other packages.

File structure

```<code>src
  components/**
  index.ts
docs
  index.ts > importing files from src and packages from @conn.
</code>```

I have webpack config as

```<code>const path = require("path");
const outDir = path.resolve(__dirname, "docs");
const HtmlWebpackPlugin = require("html-webpack-plugin");

const includePaths = [
  path.join(__dirname, "docs"),
  path.join(__dirname, "src"),
  path.resolve("node_modules/@conn")
];

const exportObj = {
  module: {
    rules: [
    {
        test: /\.(js|jsx|ts|tsx)$/,
        use: [
          {
            loader: "babel-loader",
          },
        ],
        include: includePaths,
      },
    ],
  },
};
module.exports = exportObj;
</code>```

babel.config.js

```<code>  "presets": [
    "@babel/preset-env",
    "@babel/preset-react",
    ["@babel/preset-typescript"]
  ]

</code>```
```<code>Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: C:\Users\x\git\node_modules\@conn\URLToProps.jsx: Unexpected token, expected "," (34:24)

  33 |       const { Component } = this;
> 34 |       return <Component {...props} />;
     |                         ^
  35 |     }
  36 |   }
  37 |   return URLToProps;
</code>```

I tried installing babel react preset and all the required babel plugins but the issue still persist.

Body:
I have a custom react + webpack + babel + typescript setup for a simple react application that consumes some component from other packages.

File structure

src
  components/**
  index.ts
docs
  index.ts > importing files from src and packages from @conn.

I have webpack config as

const path = require("path");
const outDir = path.resolve(__dirname, "docs");
const HtmlWebpackPlugin = require("html-webpack-plugin");

const includePaths = [
  path.join(__dirname, "docs"),
  path.join(__dirname, "src"),
  path.resolve("node_modules/@conn")
];

const exportObj = {
  module: {
    rules: [
    {
        test: /\.(js|jsx|ts|tsx)$/,
        use: [
          {
            loader: "babel-loader",
          },
        ],
        include: includePaths,
      },
    ],
  },
};
module.exports = exportObj;

babel.config.js

  "presets": [
    "@babel/preset-env",
    "@babel/preset-react",
    ["@babel/preset-typescript"]
  ]

Module build failed (from ./node_modules/babel-loader/lib/index.js):
SyntaxError: C:\Users\x\git\node_modules\@conn\URLToProps.jsx: Unexpected token, expected "," (34:24)

  33 |       const { Component } = this;
> 34 |       return <Component {...props} />;
     |                         ^
  35 |     }
  36 |   }
  37 |   return URLToProps;

I tried installing babel react preset and all the required babel plugins but the issue still persist.


问:
PHP, XAMPP (index):6792 crbug/1173575, non-JS module files deprecated
When I try to get access to http://localhost/test.php, I got the error (index):6792 crbug/1173575, non-JS module files deprecated. At a browser. I could see it by typing F12.

I confirmed that require 'vendor/autoload.php' is the reason but cannot find how to fix it.

I alredy checked all related issues but they did not help me.

The final goal is to manipulate BigQuery from php file.

Environment

Ubuntu 22.04.1 LTS

XAMPP

How to set up

# Install php
$ sudo apt update
$ sudo apt install -y php

# Install Composer
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
$ php composer-setup.php
$ php -r "unlink('composer-setup.php');"

# Enable Composer
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo chmod +x /usr/local/bin/composer

# Install bigquery package
$ cd /opt/lampp/htdocs/
$ sudo composer require google/cloud-bigquery
# composer.json, composer.lock and vendor/ are created.
```
<h2>Folder structure</h2>
<p>php files and requirements are located in <code>/opt/lampp/htdocs/</code>.</p>
<pre class="lang-bash prettyprint-override"><code>my-pc@my-pc:/opt/lampp/htdocs/$ tree -L 1

├── composer.json
├── composer.lock
├── test.php
└── vendor/
</code>```

test.php

  <title>PHP Test</title>

 <?php
    require 'vendor/autoload.php';
    use Google\Cloud\BigQuery\BigQueryClient;
    // omission
  ?>

```

Reference

https://cloud.google.com/bigquery/docs/reference/libraries#client-libraries-install-php

https://github.com/googleapis/google-cloud-php

Body:
When I try to get access to http://localhost/test.php, I got the error (index):6792 crbug/1173575, non-JS module files deprecated. At a browser. I could see it by typing F12.

I confirmed that require 'vendor/autoload.php' is the reason but cannot find how to fix it.

I alredy checked all related issues but they did not help me.

The final goal is to manipulate BigQuery from php file.

Environment

Ubuntu 22.04.1 LTS

XAMPP

How to set up

# Install php
$ sudo apt update
$ sudo apt install -y php

# Install Composer
$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
$ php composer-setup.php
$ php -r "unlink('composer-setup.php');"

# Enable Composer
$ sudo mv composer.phar /usr/local/bin/composer
$ sudo chmod +x /usr/local/bin/composer

# Install bigquery package
$ cd /opt/lampp/htdocs/
$ sudo composer require google/cloud-bigquery
# composer.json, composer.lock and vendor/ are created.

Folder structure

php files and requirements are located in /opt/lampp/htdocs/.

my-pc@my-pc:/opt/lampp/htdocs/$ tree -L 1

├── composer.json
├── composer.lock
├── test.php
└── vendor/

test.php

  <title>PHP Test</title>

 <?php
    require 'vendor/autoload.php';
    use Google\Cloud\BigQuery\BigQueryClient;
    // omission
  ?>

Reference

https://cloud.google.com/bigquery/docs/reference/libraries#client-libraries-install-php

https://github.com/googleapis/google-cloud-php


问:
How to use DataStore in jetpack compose when splash screen is running?
I have tried by my self, but im getting for close and no error message detected in my ANDROID STUDIO IDE, please help me to solve this. i really appreciate who help me for this. thank you. sorry i am not experience in android dev

MyDataStoreRepoInterface

```<code>interface DataStoreRepo {
    suspend fun putString(key:String,value:String)
    suspend fun putBoolean(key:String,value:Boolean)
    suspend fun getString(key: String):String?
    suspend fun clearPReferences(key: String)

}

</code>```
```<code>**MyDataStoreRepoImpl**

    private val Context.dataStore : DataStore<Preferences> by preferencesDataStore(name=DATASTORE_NAME)

    class DataStoreRepoImpl @Inject constructor(
        private val context: Context
    ): DataStoreRepo {
        override suspend fun putString(key: String, value: String) {
            val prefereneKay = stringPreferencesKey(key)
            context.dataStore.edit {
                it[prefereneKay] = value
            }
        }

        override suspend fun putBoolean(key: String, value: Boolean) {
            val prefernceKey = booleanPreferencesKey(key)
            context.dataStore.edit {
                it[prefernceKey] = value
            }
        }

        override suspend fun getString(key: String): String? {
            return  try {
                val preferenceKey = stringPreferencesKey(key)
                val preference = context.dataStore.data.first()
                preference[preferenceKey]
            }catch (e:Exception){
                e.printStackTrace()
                null
            }
        }

        override suspend fun clearPReferences(key: String) {
            val preferenceKey = stringPreferencesKey(key)
            context.dataStore.edit {
                if (it.contains(preferenceKey)){
                    it.remove(preferenceKey)
                }
            }
        }
    }
</code>```

My Dependency Module

```<code>@Module
@InstallIn(SingletonComponent::class)
object AppModule {

    @Provides
    @Singleton
    fun provideEpodApi(): ApiClient {
        return Retrofit.Builder()
            .baseUrl(BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .build()
            .create(ApiClient::class.java)
    }

    @Provides
    @Singleton
    fun providesDatstoreRepo(
        @ApplicationContext context: Context
    ): DataStoreRepo = DataStoreRepoImpl(context)

    @Provides
    @Singleton
    fun provideCoinRepository(api: ApiClient): LoginRepository {
        return LoginRepositoryImpl(api)
    }
}
</code>```

LoginViewModel

```<code>@HiltViewModel
class LoginViewModel @Inject constructor(
    private val useCase: LoginUseCase,
    private val dataStoreRepository:DataStoreRepo
) : ViewModel() {

    var state by mutableStateOf(LoginState())
    val email = mutableStateOf("")
    val password = mutableStateOf("")

    fun login(username: String, password: String) = viewModelScope.launch {
        state = state.copy(isLoading = true)
        val loginDeferred =
            async { useCase.execute(loginRequest = LoginRequest(username, password)) }
        when (val result = loginDeferred.await()) {
            is Resource.Success -> {
                state = state.copy(
                    login = result.data,
                    error = null,
                    isLoading = false
                )
            }
            is Resource.Error ->
                state = state.copy(
                isLoading = false,
                error = result.message,
                login = null
            )
            else -> Unit
        }

    }

    fun storeUserName(value:String) = runBlocking {
        dataStoreRepository.putString(USER_NAME,value)
    }
    fun getUserName():String = runBlocking {
        dataStoreRepository.getString(USER_NAME)!!
    }

    fun clearPreferences(key:String) = runBlocking {
        dataStoreRepository.clearPReferences(key)
    }
</code>```

LoginScreen

```<code>Button(onClick = {
                            viewModel.login(username, password)
                                viewModel.storeUserName(username)
                            },
                            modifier = Modifier
                                .fillMaxWidth()
                                .height(50.dp),
                            enabled = isFormValid,
                            shape = RoundedCornerShape(8.dp),
                            colors = ButtonDefaults.buttonColors(backgroundColor = Blue500)
                        ) {
                            Text(
                                text = "Login",
                                fontFamily = Poppins,
                                fontWeight = FontWeight.Bold,
                                color = Color.White,
                                fontSize = 16.sp
                            )
                        }
</code>```

SplashScreen

```<code>@Composable
fun SplashScreen(
    navController: NavController,
    viwmodel:LoginViewModel = hiltViewModel()
) {
    var startAnimation by remember { mutableStateOf(false) }

    val scaleAnimation by animateFloatAsState(
        targetValue = if (startAnimation) 0.7f else 0f,
        animationSpec = tween(
            durationMillis = 800,
            easing = {
                OvershootInterpolator(4f).getInterpolation(it)
            })
    )

    val loginState = viwmodel.getUserName()

    when(loginState){
        "USER_NAME" ->{
            navController.popBackStack()
            navController.navigate("login_screen")
        }
        else ->{
            navController.popBackStack()
            navController.navigate("onboarding_screen")
        }

        LaunchedEffect(key1 = loginState ){
            startAnimation = true
            delay(3000L)
        }
    }
    Splash(scaleAnimation)
}
</code>```

Body:
I have tried by my self, but im getting for close and no error message detected in my ANDROID STUDIO IDE, please help me to solve this. i really appreciate who help me for this. thank you. sorry i am not experience in android dev

MyDataStoreRepoInterface

interface DataStoreRepo {
    suspend fun putString(key:String,value:String)
    suspend fun putBoolean(key:String,value:Boolean)
    suspend fun getString(key: String):String?
    suspend fun clearPReferences(key: String)

}

**MyDataStoreRepoImpl**

    private val Context.dataStore : DataStore<Preferences> by preferencesDataStore(name=DATASTORE_NAME)

    class DataStoreRepoImpl @Inject constructor(
        private val context: Context
    ): DataStoreRepo {
        override suspend fun putString(key: String, value: String) {
            val prefereneKay = stringPreferencesKey(key)
            context.dataStore.edit {
                it[prefereneKay] = value
            }
        }

        override suspend fun putBoolean(key: String, value: Boolean) {
            val prefernceKey = booleanPreferencesKey(key)
            context.dataStore.edit {
                it[prefernceKey] = value
            }
        }

        override suspend fun getString(key: String): String? {
            return  try {
                val preferenceKey = stringPreferencesKey(key)
                val preference = context.dataStore.data.first()
                preference[preferenceKey]
            }catch (e:Exception){
                e.printStackTrace()
                null
            }
        }

        override suspend fun clearPReferences(key: String) {
            val preferenceKey = stringPreferencesKey(key)
            context.dataStore.edit {
                if (it.contains(preferenceKey)){
                    it.remove(preferenceKey)
                }
            }
        }
    }

My Dependency Module

@Module
@InstallIn(SingletonComponent::class)
object AppModule {

    @Provides
    @Singleton
    fun provideEpodApi(): ApiClient {
        return Retrofit.Builder()
            .baseUrl(BASE_URL)
            .addConverterFactory(GsonConverterFactory.create())
            .build()
            .create(ApiClient::class.java)
    }

    @Provides
    @Singleton
    fun providesDatstoreRepo(
        @ApplicationContext context: Context
    ): DataStoreRepo = DataStoreRepoImpl(context)

    @Provides
    @Singleton
    fun provideCoinRepository(api: ApiClient): LoginRepository {
        return LoginRepositoryImpl(api)
    }
}

LoginViewModel

@HiltViewModel
class LoginViewModel @Inject constructor(
    private val useCase: LoginUseCase,
    private val dataStoreRepository:DataStoreRepo
) : ViewModel() {

    var state by mutableStateOf(LoginState())
    val email = mutableStateOf("")
    val password = mutableStateOf("")

    fun login(username: String, password: String) = viewModelScope.launch {
        state = state.copy(isLoading = true)
        val loginDeferred =
            async { useCase.execute(loginRequest = LoginRequest(username, password)) }
        when (val result = loginDeferred.await()) {
            is Resource.Success -> {
                state = state.copy(
                    login = result.data,
                    error = null,
                    isLoading = false
                )
            }
            is Resource.Error ->
                state = state.copy(
                isLoading = false,
                error = result.message,
                login = null
            )
            else -> Unit
        }

    }

    fun storeUserName(value:String) = runBlocking {
        dataStoreRepository.putString(USER_NAME,value)
    }
    fun getUserName():String = runBlocking {
        dataStoreRepository.getString(USER_NAME)!!
    }

    fun clearPreferences(key:String) = runBlocking {
        dataStoreRepository.clearPReferences(key)
    }

LoginScreen

Button(onClick = {
                            viewModel.login(username, password)
                                viewModel.storeUserName(username)
                            },
                            modifier = Modifier
                                .fillMaxWidth()
                                .height(50.dp),
                            enabled = isFormValid,
                            shape = RoundedCornerShape(8.dp),
                            colors = ButtonDefaults.buttonColors(backgroundColor = Blue500)
                        ) {
                            Text(
                                text = "Login",
                                fontFamily = Poppins,
                                fontWeight = FontWeight.Bold,
                                color = Color.White,
                                fontSize = 16.sp
                            )
                        }

SplashScreen

@Composable
fun SplashScreen(
    navController: NavController,
    viwmodel:LoginViewModel = hiltViewModel()
) {
    var startAnimation by remember { mutableStateOf(false) }

    val scaleAnimation by animateFloatAsState(
        targetValue = if (startAnimation) 0.7f else 0f,
        animationSpec = tween(
            durationMillis = 800,
            easing = {
                OvershootInterpolator(4f).getInterpolation(it)
            })
    )

    val loginState = viwmodel.getUserName()

    when(loginState){
        "USER_NAME" ->{
            navController.popBackStack()
            navController.navigate("login_screen")
        }
        else ->{
            navController.popBackStack()
            navController.navigate("onboarding_screen")
        }

        LaunchedEffect(key1 = loginState ){
            startAnimation = true
            delay(3000L)
        }
    }
    Splash(scaleAnimation)
}


问:
getCanonicalPath doesn't match with getAbosolutePath
I have an application where i am downloading a zip file into a certain folder. Then i am trying to unzip the same. The getAbsolutePath() method and getCanonicalPath() method doesn't match, though there is no "../". Can someone guide me on this

/data/data/myapppackagename/files/assets/lang100temp/multilang- canonical path

/data/user/0/myapppackagename/files/assets/lang100temp/multilang- absolute path

I have tried using getPath() method, but that is also not matching with the getCanonicalPath() result


问:
Supported languages in purposes OneTrust API
From the OneTrust API that I mentioned below, I just receive the default language but I do not receive all supported languages of a purpose. The languages have already been added to the purpose in OneTrust portal.

API Endpoint:

```<code>/v2/preferencecenterpage/{preferencecenterpageid}/schema
</code>```

Response:

```<code>{
    "id": "8bb68470-d29e-4789-a661-a3e8f3tcbc60",
    "order": 0,
    "isHidden": false,
    "navigationEnabled": false,
    "displaySubscribeSettings": true,
    "displayUnsubscribeAll": true,
    "displaySubscribeAll": false,
    "sections": [
        {
            "id": "497e2fc3-4adb-44ef-bcb6-7cb4567c2cd4",
            "identifierType": "",
            "isHeaderHidden": false,
            "order": 0,
            "purposes": [
                {
                    "id": "73032567-bv24-3986-b388-d19cb5c5bef1",
                    "order": 0,
                    "languages": [
                        {
                            "name": "[qa-p1-v5] ทดสอบ",
                            "language": "th-th",
                            "isDefault": true
                        }
                    ],
                    "label": "[qa-p1-v5] ทดสอบ",
                    "version": 48,
                    "topics": [],
                    "customPreferences": [],
                    "visibility": "VISIBLE_TO_ALL"
                }
            ],
            "customDataElements": [],
            "elements": [],
            "languages": [
                {
                    "name": "New Section",
                    "language": "th-th",
                    "isDefault": true
                },
                {
                    "name": "New Section",
                    "language": "en",
                    "isDefault": false
                }
            ],
            "isSubscriptionSettings": false
        }
    ],
    "languages": [
        {
            "name": "Page 1",
            "language": "th-th",
            "isDefault": true
        }
    ]
}
</code>```

Body:
From the OneTrust API that I mentioned below, I just receive the default language but I do not receive all supported languages of a purpose. The languages have already been added to the purpose in OneTrust portal.

API Endpoint:

/v2/preferencecenterpage/{preferencecenterpageid}/schema

Response:

{
    "id": "8bb68470-d29e-4789-a661-a3e8f3tcbc60",
    "order": 0,
    "isHidden": false,
    "navigationEnabled": false,
    "displaySubscribeSettings": true,
    "displayUnsubscribeAll": true,
    "displaySubscribeAll": false,
    "sections": [
        {
            "id": "497e2fc3-4adb-44ef-bcb6-7cb4567c2cd4",
            "identifierType": "",
            "isHeaderHidden": false,
            "order": 0,
            "purposes": [
                {
                    "id": "73032567-bv24-3986-b388-d19cb5c5bef1",
                    "order": 0,
                    "languages": [
                        {
                            "name": "[qa-p1-v5] ทดสอบ",
                            "language": "th-th",
                            "isDefault": true
                        }
                    ],
                    "label": "[qa-p1-v5] ทดสอบ",
                    "version": 48,
                    "topics": [],
                    "customPreferences": [],
                    "visibility": "VISIBLE_TO_ALL"
                }
            ],
            "customDataElements": [],
            "elements": [],
            "languages": [
                {
                    "name": "New Section",
                    "language": "th-th",
                    "isDefault": true
                },
                {
                    "name": "New Section",
                    "language": "en",
                    "isDefault": false
                }
            ],
            "isSubscriptionSettings": false
        }
    ],
    "languages": [
        {
            "name": "Page 1",
            "language": "th-th",
            "isDefault": true
        }
    ]
}


问:
Protobuf error: Bad type on operand stack
My team has been trying to deploy a setup in our hive production system, where a hql file calls a jar passing some input, and the jar gives some output. The java code runs absolutely fine on terminal, but on hive, throws the following error at times.

```<code>Vertex failed, vertexName=Map 1, vertexId=vertex_1672281536650_0001_1_00, diagnostics=[Task failed, taskId=task_1672281536650_0001_1_00_000003, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_1672281536650_0001_1_00_000003_0:java.lang.RuntimeException: java.lang.RuntimeException: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/google/protobuf/GeneratedMessageV3$ExtendableMessage.getExtension(Lcom/google/protobuf/GeneratedMessage$GeneratedExtension;)Ljava/lang/Object; @2: invokevirtual
  Reason:
    Type 'com/google/protobuf/GeneratedMessage$GeneratedExtension' (current frame, stack[1]) is not assignable to 'com/google/protobuf/ExtensionLite'
  Current Frame:
    bci: @2
    flags: { }
    locals: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
    stack: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
  Bytecode:
    0x0000000: 2a2b b600 23b0

    at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:211)
    at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:168)
    at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
    at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73)
    at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844)
    at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61)
    at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37)
    at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/google/protobuf/GeneratedMessageV3$ExtendableMessage.getExtension(Lcom/google/protobuf/GeneratedMessage$GeneratedExtension;)Ljava/lang/Object; @2: invokevirtual
  Reason:
    Type 'com/google/protobuf/GeneratedMessage$GeneratedExtension' (current frame, stack[1]) is not assignable to 'com/google/protobuf/ExtensionLite'
  Current Frame:
    bci: @2
    flags: { }
    locals: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
    stack: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
  Bytecode:
    0x0000000: 2a2b b600 23b0

</code>```

The first line of the stack trace error:
at edu.stanford.nlp.simple.Document.<init>(Document.java:400)
In the jar we are using stanford core nlp as a dependency, protobuf becomes a transient dependency. The code runs fine at times and throws the above error other times, which is making it even more confusing for us.

Any help in resolving this error would be highly appreciated.

My initial guess was that maybe some version incompatibility was causing this behavior. I have tried using the latest stanford core nlp v4.5.1 jar from maven, and pairing that with the latest protobuf v3.21.12 on one instance and also with protobuf v3.19.2 (which was defined in the pom file file of core nlp) on a different instance. But I got the same result both the times.

Body:
My team has been trying to deploy a setup in our hive production system, where a hql file calls a jar passing some input, and the jar gives some output. The java code runs absolutely fine on terminal, but on hive, throws the following error at times.

Vertex failed, vertexName=Map 1, vertexId=vertex_1672281536650_0001_1_00, diagnostics=[Task failed, taskId=task_1672281536650_0001_1_00_000003, diagnostics=[TaskAttempt 0 failed, info=[Error: Error while running task ( failure ) : attempt_1672281536650_0001_1_00_000003_0:java.lang.RuntimeException: java.lang.RuntimeException: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/google/protobuf/GeneratedMessageV3$ExtendableMessage.getExtension(Lcom/google/protobuf/GeneratedMessage$GeneratedExtension;)Ljava/lang/Object; @2: invokevirtual
  Reason:
    Type 'com/google/protobuf/GeneratedMessage$GeneratedExtension' (current frame, stack[1]) is not assignable to 'com/google/protobuf/ExtensionLite'
  Current Frame:
    bci: @2
    flags: { }
    locals: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
    stack: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
  Bytecode:
    0x0000000: 2a2b b600 23b0

    at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.initializeAndRunProcessor(TezProcessor.java:211)
    at org.apache.hadoop.hive.ql.exec.tez.TezProcessor.run(TezProcessor.java:168)
    at org.apache.tez.runtime.LogicalIOProcessorRuntimeTask.run(LogicalIOProcessorRuntimeTask.java:374)
    at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:73)
    at org.apache.tez.runtime.task.TaskRunner2Callable$1.run(TaskRunner2Callable.java:61)
    at java.security.AccessController.doPrivileged(Native Method)
    at javax.security.auth.Subject.doAs(Subject.java:422)
    at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1844)
    at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:61)
    at org.apache.tez.runtime.task.TaskRunner2Callable.callInternal(TaskRunner2Callable.java:37)
    at org.apache.tez.common.CallableWithNdc.call(CallableWithNdc.java:36)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:750)
Caused by: java.lang.RuntimeException: java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/google/protobuf/GeneratedMessageV3$ExtendableMessage.getExtension(Lcom/google/protobuf/GeneratedMessage$GeneratedExtension;)Ljava/lang/Object; @2: invokevirtual
  Reason:
    Type 'com/google/protobuf/GeneratedMessage$GeneratedExtension' (current frame, stack[1]) is not assignable to 'com/google/protobuf/ExtensionLite'
  Current Frame:
    bci: @2
    flags: { }
    locals: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
    stack: { 'com/google/protobuf/GeneratedMessageV3$ExtendableMessage', 'com/google/protobuf/GeneratedMessage$GeneratedExtension' }
  Bytecode:
    0x0000000: 2a2b b600 23b0

The first line of the stack trace error:
at edu.stanford.nlp.simple.Document.<init>(Document.java:400)
In the jar we are using stanford core nlp as a dependency, protobuf becomes a transient dependency. The code runs fine at times and throws the above error other times, which is making it even more confusing for us.

Any help in resolving this error would be highly appreciated.

My initial guess was that maybe some version incompatibility was causing this behavior. I have tried using the latest stanford core nlp v4.5.1 jar from maven, and pairing that with the latest protobuf v3.21.12 on one instance and also with protobuf v3.19.2 (which was defined in the pom file file of core nlp) on a different instance. But I got the same result both the times.


问:
my app crash because OkHttpChannelBuilder?
I have some users who have my production app who crash when he interact with. I have no idea where the problem come from.</p>
```<code>Fatal Exception: java.lang.RuntimeException: Internal error in Cloud Firestore (24.2.2).
       at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$jx84dqgUsF4ojecSMurRqFLFD1Y.run(-.java:1)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:236)
       at android.app.ActivityThread.main(ActivityThread.java:8051)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)

Caused by g.c.a.b.h.j: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
       at com.google.android.gms.tasks.zzw.getResult(zzw.java:3)
       at com.google.firebase.firestore.remote.FirestoreChannel.lambda$runBidiStreamingRpc$0(FirestoreChannel.java:1)
       at com.google.firebase.firestore.remote.-$$Lambda$FirestoreChannel$ThFui-hvcsrVGYxlBtcTH5vVbvE.onComplete(-.java:6)
       at com.google.android.gms.tasks.zzi.run(zzi.java:21)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15)
       at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.ExceptionInInitializerError:
       at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
       at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
       at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
       at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
       at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
       at com.google.android.gms.tasks.zzz.run(zzz.java:4)
       at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.RuntimeException: java.lang.NoSuchMethodException: j.b.I1.values []
       at java.lang.Enum.enumValues(Enum.java:270)
       at java.lang.Enum.access$000(Enum.java:61)
       at java.lang.Enum$1.create(Enum.java:277)
       at java.lang.Enum$1.create(Enum.java:275)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:289)
       at java.lang.Class.getEnumConstantsShared(Class.java:2428)
       at java.util.EnumSet.getUniverse(EnumSet.java:407)
       at java.util.EnumSet.noneOf(EnumSet.java:109)
       at java.util.EnumSet.of(EnumSet.java:235)
       at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
       at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
       at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
       at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
       at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
       at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
       at com.google.android.gms.tasks.zzz.run(zzz.java:4)
       at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.NoSuchMethodException: j.b.I1.values []
       at java.lang.Class.getMethod(Class.java:2072)
       at java.lang.Class.getDeclaredMethod(Class.java:2050)
       at java.lang.Enum.enumValues(Enum.java:267)
       at java.lang.Enum.access$000(Enum.java:61)
       at java.lang.Enum$1.create(Enum.java:277)
       at java.lang.Enum$1.create(Enum.java:275)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:289)
       at java.lang.Class.getEnumConstantsShared(Class.java:2428)
       at java.util.EnumSet.getUniverse(EnumSet.java:407)
       at java.util.EnumSet.noneOf(EnumSet.java:109)
       at java.util.EnumSet.of(EnumSet.java:235)
       at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
       at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
       at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
       at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
       at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
       at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
       at com.google.android.gms.tasks.zzz.run(zzz.java:4)
       at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)
</code>```

Body:
I have some users who have my production app who crash when he interact with. I have no idea where the problem come from.

Fatal Exception: java.lang.RuntimeException: Internal error in Cloud Firestore (24.2.2).
       at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$jx84dqgUsF4ojecSMurRqFLFD1Y.run(-.java:1)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:236)
       at android.app.ActivityThread.main(ActivityThread.java:8051)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)

Caused by g.c.a.b.h.j: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
       at com.google.android.gms.tasks.zzw.getResult(zzw.java:3)
       at com.google.firebase.firestore.remote.FirestoreChannel.lambda$runBidiStreamingRpc$0(FirestoreChannel.java:1)
       at com.google.firebase.firestore.remote.-$$Lambda$FirestoreChannel$ThFui-hvcsrVGYxlBtcTH5vVbvE.onComplete(-.java:6)
       at com.google.android.gms.tasks.zzi.run(zzi.java:21)
       at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
       at java.util.concurrent.FutureTask.run(FutureTask.java:266)
       at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15)
       at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.ExceptionInInitializerError:
       at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
       at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
       at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
       at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
       at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
       at com.google.android.gms.tasks.zzz.run(zzz.java:4)
       at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.RuntimeException: java.lang.NoSuchMethodException: j.b.I1.values []
       at java.lang.Enum.enumValues(Enum.java:270)
       at java.lang.Enum.access$000(Enum.java:61)
       at java.lang.Enum$1.create(Enum.java:277)
       at java.lang.Enum$1.create(Enum.java:275)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:289)
       at java.lang.Class.getEnumConstantsShared(Class.java:2428)
       at java.util.EnumSet.getUniverse(EnumSet.java:407)
       at java.util.EnumSet.noneOf(EnumSet.java:109)
       at java.util.EnumSet.of(EnumSet.java:235)
       at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
       at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
       at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
       at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
       at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
       at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
       at com.google.android.gms.tasks.zzz.run(zzz.java:4)
       at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)

Caused by java.lang.NoSuchMethodException: j.b.I1.values []
       at java.lang.Class.getMethod(Class.java:2072)
       at java.lang.Class.getDeclaredMethod(Class.java:2050)
       at java.lang.Enum.enumValues(Enum.java:267)
       at java.lang.Enum.access$000(Enum.java:61)
       at java.lang.Enum$1.create(Enum.java:277)
       at java.lang.Enum$1.create(Enum.java:275)
       at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
       at java.lang.Enum.getSharedConstants(Enum.java:289)
       at java.lang.Class.getEnumConstantsShared(Class.java:2428)
       at java.util.EnumSet.getUniverse(EnumSet.java:407)
       at java.util.EnumSet.noneOf(EnumSet.java:109)
       at java.util.EnumSet.of(EnumSet.java:235)
       at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
       at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
       at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
       at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
       at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
       at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
       at com.google.android.gms.tasks.zzz.run(zzz.java:4)
       at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
       at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
       at java.lang.Thread.run(Thread.java:923)


问:
View Note Content using Ionic React
I'm using ionic react + firebase and I'm creating a journal/diary in my app. the thing is, when I update/edit a note in my note history it will show the updated title or detail but when I tried to view that note, it's empty. I need to view other notes first to see the note that I edited.

here's my code for creating a note

```<code>const [title, setTitle] = useState('')
    const [note, setNote] = useState('')
    const [datetime, setDatetime] = useState('')

    const addNote = () => {
        let noteList = JSON.parse(localStorage.getItem('noteList') || '[]')

        // const date = datetime.split('T')[0]
        // const time = datetime.split('T')[1].split('+')[0]

        let previousNoteID = noteList[noteList.length-1]?.id ?? 0

        noteList.push({
            id: previousNoteID+1,
            title: title,
            content: note,
            // 'datetime': datetime
        })

        localStorage.setItem('noteList', JSON.stringify(noteList));
        clearInputs()
    }

    const clearInputs = () => {
        setTitle('')
        setNote('')
    }

    return (
        <IonPage>
        <IonHeader translucent={true} mode="ios" class="ion-no-border">
            <IonToolbar>
                <IonTitle id="headerTitle">Tell me your Story</IonTitle>
                <IonButtons slot="start">
                    <IonButton routerLink="/tab1" id="backIcon">
                        <IonIcon
                            icon={chevronBack}>
                        </IonIcon>
                    </IonButton>
                </IonButtons>
                <IonButtons slot="primary">
                    <IonButton
                        type='submit'
                        id="saveIcon"
                        routerLink='/tab4'
                        onClick={addNote}>
                        <IonIcon
                            slot="icon-only"
                            icon={checkmarkDoneOutline}>
                        </IonIcon>
                    </IonButton>
                </IonButtons>
            </IonToolbar>
        </IonHeader>

            <IonContent fullscreen id="journalContainer">

                <IonItem id="dateTimeContainer" lines="none">
                    <IonLabel id='dateTitle'>Date:</IonLabel>
                    <IonDatetimeButton datetime="datetime"></IonDatetimeButton>
                    <IonModal keepContentsMounted={true}>
                        <IonDatetime
                            id='dateTimeBox'
                            onIonChange={(e: any) => setDatetime(e.target.value)}
                        ></IonDatetime>
                    </IonModal>
                </IonItem>

                <div id="noteContainer">
                    <IonTextarea
                    id="noteTitle"
                    placeholder='Title'
                    maxlength={30}
                    autoGrow={true} value={title}
                    onIonInput={(e: any) => setTitle(e.target.value)}
                    ></IonTextarea>

                    <IonTextarea
                    id="noteDetails"
                    placeholder="Add a note.."
                    autoGrow={true} value={note}
                    onIonInput={(e: any) => setNote(e.target.value)}
                    ></IonTextarea>
                </div>

                <img
                id="journalLogo"
                src={logo}></img>
            </IonContent>
        </IonPage>
</code>```

and here's my code to view and update it

```<code>  const [noteList, setNoteList] = useState<any>([])

  useIonViewWillEnter(() => {
    const noteList = JSON.parse(localStorage.getItem('noteList') || '[]')

    setNoteList(noteList)
  })

  const deleteNote = (index: number) => {
    const noteDeletedList = noteList
    noteDeletedList.splice(index, 1)

    localStorage.setItem('noteList', JSON.stringify(noteDeletedList))
    setNoteList(JSON.parse(localStorage.getItem('noteList') || '[]'))
  }

  return (
    <IonPage>
      <IonHeader translucent={true} mode="ios" class="ion-no-border">
        <IonToolbar>
          <IonTitle id = "headerTitle">Journal History</IonTitle>
          <IonButtons slot="primary">
            <IonButton slot="end" id="headerSettings" routerLink="/settings">
              <IonIcon slot="icon-only" icon={settings}></IonIcon>
            </IonButton>
          </IonButtons>
        </IonToolbar>
      </IonHeader>

      <IonContent fullscreen>
        <IonList id="noteList">
          { noteList !== undefined && noteList.length ?
            noteList.map((note: any, i: number) => {
              return (
                <IonItemSliding class="noteContainer" key={i}>
                  <IonItem button
                    lines="none"
                    class="noteItem"
                    routerLink={`/editnote/${note.id}`}>
                    <IonLabel>
                      <h2>{ note.title }</h2>
                      {/* <h2>{ note.datetime }</h2> */}
                      <p>{ note.content }</p>
                    </IonLabel>
                  </IonItem>
                  <IonItemOptions side="end">
                    <IonItemOption
                    color="tint"
                    expandable
                    onClick={() => deleteNote(i)}
                    >Delete</IonItemOption>
                  </IonItemOptions>
                </IonItemSliding>
              )
            })
          : null }
        </IonList>
      </IonContent>
    </IonPage>
</code>```
```<code>const { id: noteID }: any = useParams()

    const [noteList, setNoteList] = useState([])
    const [title, setTitle] = useState('')
    const [note, setNote] = useState('')

    useIonViewWillEnter(() => {
        hideTabBar();
    });

    useIonViewWillLeave(() => {
        showTabBar();
    });

    useEffect(() => {
        const noteList = JSON.parse(localStorage.getItem('noteList') as string)
        setNoteList(JSON.parse(localStorage.getItem('noteList') as string))

        const note = noteList[noteID-1]

        setTitle(note.title)
        setNote(note.content)
    }, [noteID])

    const updateNote = () => {
        let editedNoteList: any = noteList
        const index = editedNoteList.findIndex((note: any) => note.id == noteID)

        editedNoteList[index].title = title
        editedNoteList[index].content = note

        localStorage.setItem('noteList', JSON.stringify(editedNoteList));
        clearInputs()
    }

    const clearInputs = () => {
        setTitle('')
        setNote('')
    }

    return (
        <IonPage>
        <IonHeader translucent={true} mode="ios" class="ion-no-border">
            <IonToolbar>

                <IonTitle id="headerTitle">Journal</IonTitle>
                <IonButtons slot="start">
                    <IonButton routerLink="/tab4" id="backIcon">
                        <IonIcon icon={chevronBack}></IonIcon>
                    </IonButton>
                </IonButtons>

                <IonButtons slot="primary">
                    <IonButton
                        type='submit'
                        id="saveIcon"
                        routerLink='/tab4'
                        onClick={updateNote}>
                        <IonIcon
                            slot="icon-only"
                            icon={checkmarkDoneOutline}>
                        </IonIcon>
                    </IonButton>
                </IonButtons>

            </IonToolbar>
        </IonHeader>

            <IonContent fullscreen>

                <IonItem id="dateTimeContainer" lines="none">
                    <IonLabel id='dateTitle'>Date:</IonLabel>
                    <IonDatetimeButton datetime="datetime"></IonDatetimeButton>
                    <IonModal keepContentsMounted={true}>
                        <IonDatetime id='dateTimeBox'></IonDatetime>
                    </IonModal>
                </IonItem>

                <div id="noteContainer">
                    <IonTextarea
                    id="noteTitle"
                    placeholder='Title'
                    maxlength={30}
                    autoGrow={true}
                    onIonChange={(e: any) => setTitle(e.target.value)}
                    value={title}
                    ></IonTextarea>

                    <IonTextarea
                    id="noteDetails"
                    placeholder="Add a note.."
                    autoGrow={true}
                    onIonChange={(e: any) => setNote(e.target.value)}
                    value={note}
                    ></IonTextarea>
                </div>

                <img
                id="journalLogo"
                src={logo}></img>
            </IonContent>
        </IonPage>
</code>```

I wanted to make the updated note visible when the user wants to view it without looking at the other notes first just to see the updated note. But I dont know how to fix it, I hope someone can help me. any help will be appreciated.

Title: View Note Content using Ionic React

Body:
I'm using ionic react + firebase and I'm creating a journal/diary in my app. the thing is, when I update/edit a note in my note history it will show the updated title or detail but when I tried to view that note, it's empty. I need to view other notes first to see the note that I edited.

here's my code for creating a note

const [title, setTitle] = useState('')
    const [note, setNote] = useState('')
    const [datetime, setDatetime] = useState('')

    const addNote = () => {
        let noteList = JSON.parse(localStorage.getItem('noteList') || '[]')

        // const date = datetime.split('T')[0]
        // const time = datetime.split('T')[1].split('+')[0]

        let previousNoteID = noteList[noteList.length-1]?.id ?? 0

        noteList.push({
            id: previousNoteID+1,
            title: title,
            content: note,
            // 'datetime': datetime
        })

        localStorage.setItem('noteList', JSON.stringify(noteList));
        clearInputs()
    }

    const clearInputs = () => {
        setTitle('')
        setNote('')
    }

    return (
        <IonPage>
        <IonHeader translucent={true} mode="ios" class="ion-no-border">
            <IonToolbar>
                <IonTitle id="headerTitle">Tell me your Story</IonTitle>
                <IonButtons slot="start">
                    <IonButton routerLink="/tab1" id="backIcon">
                        <IonIcon
                            icon={chevronBack}>
                        </IonIcon>
                    </IonButton>
                </IonButtons>
                <IonButtons slot="primary">
                    <IonButton
                        type='submit'
                        id="saveIcon"
                        routerLink='/tab4'
                        onClick={addNote}>
                        <IonIcon
                            slot="icon-only"
                            icon={checkmarkDoneOutline}>
                        </IonIcon>
                    </IonButton>
                </IonButtons>
            </IonToolbar>
        </IonHeader>

            <IonContent fullscreen id="journalContainer">

                <IonItem id="dateTimeContainer" lines="none">
                    <IonLabel id='dateTitle'>Date:</IonLabel>
                    <IonDatetimeButton datetime="datetime"></IonDatetimeButton>
                    <IonModal keepContentsMounted={true}>
                        <IonDatetime
                            id='dateTimeBox'
                            onIonChange={(e: any) => setDatetime(e.target.value)}
                        ></IonDatetime>
                    </IonModal>
                </IonItem>

                    <IonTextarea
                    id="noteTitle"
                    placeholder='Title'
                    maxlength={30}
                    autoGrow={true} value={title}
                    onIonInput={(e: any) => setTitle(e.target.value)}
                    ></IonTextarea>

                    <IonTextarea
                    id="noteDetails"
                    placeholder="Add a note.."
                    autoGrow={true} value={note}
                    onIonInput={(e: any) => setNote(e.target.value)}
                    ></IonTextarea>

            </IonContent>
        </IonPage>

and here's my code to view and update it

  const [noteList, setNoteList] = useState<any>([])

  useIonViewWillEnter(() => {
    const noteList = JSON.parse(localStorage.getItem('noteList') || '[]')

    setNoteList(noteList)
  })

  const deleteNote = (index: number) => {
    const noteDeletedList = noteList
    noteDeletedList.splice(index, 1)

    localStorage.setItem('noteList', JSON.stringify(noteDeletedList))
    setNoteList(JSON.parse(localStorage.getItem('noteList') || '[]'))
  }

  return (
    <IonPage>
      <IonHeader translucent={true} mode="ios" class="ion-no-border">
        <IonToolbar>
          <IonTitle id = "headerTitle">Journal History</IonTitle>
          <IonButtons slot="primary">
            <IonButton slot="end" id="headerSettings" routerLink="/settings">
              <IonIcon slot="icon-only" icon={settings}></IonIcon>
            </IonButton>
          </IonButtons>
        </IonToolbar>
      </IonHeader>

      <IonContent fullscreen>
        <IonList id="noteList">
          { noteList !== undefined && noteList.length ?
            noteList.map((note: any, i: number) => {
              return (
                <IonItemSliding class="noteContainer" key={i}>
                  <IonItem button
                    lines="none"
                    class="noteItem"
                    routerLink={`/editnote/${note.id}`}>
                    <IonLabel>

{ note.title }

                      {/*
{ note.datetime }
 */}

{ note.content }

                    </IonLabel>
                  </IonItem>
                  <IonItemOptions side="end">
                    <IonItemOption
                    color="tint"
                    expandable
                    onClick={() => deleteNote(i)}
                    >Delete</IonItemOption>
                  </IonItemOptions>
                </IonItemSliding>
              )
            })
          : null }
        </IonList>
      </IonContent>
    </IonPage>

const { id: noteID }: any = useParams()

    const [noteList, setNoteList] = useState([])
    const [title, setTitle] = useState('')
    const [note, setNote] = useState('')

    useIonViewWillEnter(() => {
        hideTabBar();
    });

    useIonViewWillLeave(() => {
        showTabBar();
    });

    useEffect(() => {
        const noteList = JSON.parse(localStorage.getItem('noteList') as string)
        setNoteList(JSON.parse(localStorage.getItem('noteList') as string))

        const note = noteList[noteID-1]

        setTitle(note.title)
        setNote(note.content)
    }, [noteID])

    const updateNote = () => {
        let editedNoteList: any = noteList
        const index = editedNoteList.findIndex((note: any) => note.id == noteID)

        editedNoteList[index].title = title
        editedNoteList[index].content = note

        localStorage.setItem('noteList', JSON.stringify(editedNoteList));
        clearInputs()
    }

    const clearInputs = () => {
        setTitle('')
        setNote('')
    }

    return (
        <IonPage>
        <IonHeader translucent={true} mode="ios" class="ion-no-border">
            <IonToolbar>

                <IonTitle id="headerTitle">Journal</IonTitle>
                <IonButtons slot="start">
                    <IonButton routerLink="/tab4" id="backIcon">
                        <IonIcon icon={chevronBack}></IonIcon>
                    </IonButton>
                </IonButtons>

                <IonButtons slot="primary">
                    <IonButton
                        type='submit'
                        id="saveIcon"
                        routerLink='/tab4'
                        onClick={updateNote}>
                        <IonIcon
                            slot="icon-only"
                            icon={checkmarkDoneOutline}>
                        </IonIcon>
                    </IonButton>
                </IonButtons>

            </IonToolbar>
        </IonHeader>

            <IonContent fullscreen>

                <IonItem id="dateTimeContainer" lines="none">
                    <IonLabel id='dateTitle'>Date:</IonLabel>
                    <IonDatetimeButton datetime="datetime"></IonDatetimeButton>
                    <IonModal keepContentsMounted={true}>
                        <IonDatetime id='dateTimeBox'></IonDatetime>
                    </IonModal>
                </IonItem>

                    <IonTextarea
                    id="noteTitle"
                    placeholder='Title'
                    maxlength={30}
                    autoGrow={true}
                    onIonChange={(e: any) => setTitle(e.target.value)}
                    value={title}
                    ></IonTextarea>

                    <IonTextarea
                    id="noteDetails"
                    placeholder="Add a note.."
                    autoGrow={true}
                    onIonChange={(e: any) => setNote(e.target.value)}
                    value={note}
                    ></IonTextarea>

            </IonContent>
        </IonPage>

I wanted to make the updated note visible when the user wants to view it without looking at the other notes first just to see the updated note. But I dont know how to fix it, I hope someone can help me. any help will be appreciated.


问:
Is there any way to auto increment float values just as we do integers with serial datatype in PostgreSQL?

column
column2

1.1.1
1.0

1.1.2
1.1

1.1.3
1.2

Here, I want these to be auto-incremented. Is there any way to do so?


问:
Parent of RPATH $ORIGIN
I can set install rpath to be the working directory with the following command:
set(CMAKE_INSTALL_RPATH "$ORIGIN")
But is there a possibility to search for the shared libraries in the parent of the $ORIGIN?

Title: Parent of RPATH $ORIGIN


问:
getting this error when trying to deploy vite app COPY failed: stat app/build: file does not exist
i am trying to deploy my react app with vite . but I get this error again and again  .

```<code># Executing 3 build trigger

COPY failed: stat app/build: file does not exist
</code>```

I am not sure problem is in my vite.config.js ?

here is my vite.config.js

```<code>import react from '@vitejs/plugin-react';
import { defineConfig, loadEnv } from 'vite';
import macrosPlugin from 'vite-plugin-babel-macros';

export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, process.cwd(), '');

  return {
    plugins: [react(), macrosPlugin()],
    root: './',
    build: {
      outDir: 'dist',
    },
    publicDir: 'src',
    server: {
      fs: {
        allow: ['..'],
      },
    },
    define: {
      'process.env': env,
    },
  };
});

</code>```

what should i do to resolve this issue ?
error is :
Executing 3 build trigger
COPY failed: stat app/build: file does not exist

Body:
i am trying to deploy my react app with vite . but I get this error again and again  .

# Executing 3 build trigger

COPY failed: stat app/build: file does not exist

I am not sure problem is in my vite.config.js ?

here is my vite.config.js

import react from '@vitejs/plugin-react';
import { defineConfig, loadEnv } from 'vite';
import macrosPlugin from 'vite-plugin-babel-macros';

export default defineConfig(({ mode }) => {
  const env = loadEnv(mode, process.cwd(), '');

  return {
    plugins: [react(), macrosPlugin()],
    root: './',
    build: {
      outDir: 'dist',
    },
    publicDir: 'src',
    server: {
      fs: {
        allow: ['..'],
      },
    },
    define: {
      'process.env': env,
    },
  };
});

what should i do to resolve this issue ?
error is :
Executing 3 build trigger
COPY failed: stat app/build: file does not exist