问:
Forbidden (HTTP 403) when scraping CSV data in R
I am trying to scrape this web: https://www.idealista.com/venta-viviendas/madrid-provincia/

Unfortunately I get the Error in read_html.response(.) : Forbidden (HTTP 403).

I have also entered the user agent info but I get the same error, this is part of the code:

```<code>idealisto_alter <- function(url, area, ruta = "~/idealisto_alter.csv") {
  start <- Sys.time()

  list.of.packages <- c("stringr", "rvest", "httr")
  new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
  if(length(new.packages)>0) {install.packages(new.packages)}

  library(stringr)
  library(rvest)
  library(httr)

  desktop_agents <-  c('Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14',
                       'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36',
                       'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36',
                       'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0')

</code>```

Body:
I am trying to scrape this web: https://www.idealista.com/venta-viviendas/madrid-provincia/

Unfortunately I get the Error in read_html.response(.) : Forbidden (HTTP 403).

I have also entered the user agent info but I get the same error, this is part of the code:

idealisto_alter <- function(url, area, ruta = "~/idealisto_alter.csv") {
  start <- Sys.time()

  list.of.packages <- c("stringr", "rvest", "httr")
  new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
  if(length(new.packages)>0) {install.packages(new.packages)}

  library(stringr)
  library(rvest)
  library(httr)

  desktop_agents <-  c('Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0.1 Safari/602.2.14',
                       'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36',
                       'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36',
                       'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.71 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36',
                       'Mozilla/5.0 (Windows NT 10.0; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0')


来源: stackexchange

问:
Google Sheets: Fill rows based on grade and type of form
I am trying to display some data in a specific manner, but have quite some issues with my last formula.
I have created this mock file to share (the original has many more tabs), this is just for this last formula that I need.

The data needs to be displayed only on the FSF [Score] tab as seen in columns I to N. The issue there is with the proper positioning of the displayed data in the rows. In row 4, I should have no data from column H onwards.

To give a proper explanation:

A-D is extracted from Responses with a query if the value in Responses!E || F contains TSF

E is extracted from Traffic Safety (Score)

F, H, P and so one, the ones with the numbers do not need editing

I gets the values from Responses based on multiple conditions
- if the person has FSF filed, search for the corresponding row and grab the correct values from the columns: AV, AW, AX, AY, AZ, BA if the language row has EN or EP, EQ, ER, ES, ET, EU if the value in the language cell is NL

The main issue I see with the formula in cell I2 is the

```<code>"where Col1 is not null"
</code>```

which makes every row fill in one after the other.

Any help and advice is appreciated.

I tried some VLookup combinations as well, but could not figure it out. As you can see in each color block there, I have multiple formulas that I am trying to juggle with.

The closest I got was with this formula, but it put put the data in the exact row it was extracted from, instead of matching the B name.

```<code>    =arrayformula(query(if(
      (Responses!E2:E = "First-shift Feedback (FSF)")*(--NOT(ISNA(MATCH(TO_TEXT(B2:B),TO_TEXT(Responses!C2:C),0)))),
      query(Responses!CA2:CF, "select CA, CB, CC", 0),
      query(Responses!FU2:FZ, "select FU, FV, FW", 0)
    ),
    "", 0
  )
)

</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am trying to display some data in a specific manner, but have quite some issues with my last formula.
I have created this mock file to share (the original has many more tabs), this is just for this last formula that I need.

The data needs to be displayed only on the FSF [Score] tab as seen in columns I to N. The issue there is with the proper positioning of the displayed data in the rows. In row 4, I should have no data from column H onwards.

To give a proper explanation:

A-D is extracted from Responses with a query if the value in Responses!E || F contains TSF

E is extracted from Traffic Safety (Score)

F, H, P and so one, the ones with the numbers do not need editing

I gets the values from Responses based on multiple conditions
- if the person has FSF filed, search for the corresponding row and grab the correct values from the columns: AV, AW, AX, AY, AZ, BA if the language row has EN or EP, EQ, ER, ES, ET, EU if the value in the language cell is NL

The main issue I see with the formula in cell I2 is the

"where Col1 is not null"

which makes every row fill in one after the other.

Any help and advice is appreciated.

I tried some VLookup combinations as well, but could not figure it out. As you can see in each color block there, I have multiple formulas that I am trying to juggle with.

The closest I got was with this formula, but it put put the data in the exact row it was extracted from, instead of matching the B name.

    =arrayformula(query(if(
      (Responses!E2:E = "First-shift Feedback (FSF)")*(--NOT(ISNA(MATCH(TO_TEXT(B2:B),TO_TEXT(Responses!C2:C),0)))),
      query(Responses!CA2:CF, "select CA, CB, CC", 0),
      query(Responses!FU2:FZ, "select FU, FV, FW", 0)
    ),
    "", 0
  )
)


问:
React native layout - center a video component
I try to add a video element horizontally centered in react native.

But somehow the style cant be applied to the video tag itself but it is applied to a div around the video tag. The video itself seems to have a postion:absolute.

The template code:

```<code><View style={styles.container}>

   <Video
          ref={video}
          style={styles.video}/>
</View>

</code>```

Here the styling:

```<code>  container: {
    flex: 1,
    display: 'flex',
    backgroundColor: '#25292e',
    flexDirection: 'column',
    justifyContent: 'center',
    alignItems: 'center',
  },

  video:{
    flex: 1,
    alignSelf: 'center',
    border: '1px solid black',
  }
</code>```

I am a react (native) newcomer.
How can I achieve it, that the video is always horizontally centered?

And why are there always extra div's around the elements?

Body:
I try to add a video element horizontally centered in react native.

But somehow the style cant be applied to the video tag itself but it is applied to a div around the video tag. The video itself seems to have a postion:absolute.

The template code:

<View style={styles.container}>

   <Video
          ref={video}
          style={styles.video}/>
</View>

Here the styling:

  container: {
    flex: 1,
    display: 'flex',
    backgroundColor: '#25292e',
    flexDirection: 'column',
    justifyContent: 'center',
    alignItems: 'center',
  },

  video:{
    flex: 1,
    alignSelf: 'center',
    border: '1px solid black',
  }

I am a react (native) newcomer.
How can I achieve it, that the video is always horizontally centered?

And why are there always extra div's around the elements?


问:
JS how to execute contructor in class more times (odd times)
In my case constructor is executed one time per creating new instance of class (new Product()). If I create instances of this class even times my method initAccordion wont work as i want to - I want to toggle class .active of .product element.

I want to execute contructor allways odd times.

Mine task is to build class which will toggle class active in .product element.

class Product {
  static count = 0;
  constructor() {
    this.instanceId = ++Product.count;
    this.initAccordion();
  }
  initAccordion() {
    const thisProduct = this;

    // console.log(thisProduct);
    const clickableTriggers = document.querySelectorAll('.product__header');
    for (let clickableTrigger of clickableTriggers) {
      clickableTrigger.addEventListener('click', function (event) {
        event.preventDefault();
        const products = document.querySelector('.product');
        console.log(Product.count);
        products.classList.toggle('active');
      });
    }
  }
}

new Product();
new Product();
new Product();
new Product();```
<pre class="snippet-code-css lang-css prettyprint-override"><code>.product.active .product__description {
  display: block;
}

.product .product__description {
  display: none;
}</code>```

<!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" />
    <title>Document</title>
    <link rel="stylesheet" href="style.css" />
    <link
      href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
      rel="stylesheet"
    />

          ZIO STEFANO'S DOUGHNUT

$9

Lorem

          ZIO STEFANO'S DOUGHNUT

$9

Lorem

          ZIO STEFANO'S DOUGHNUT

$9

Lorem

          ZIO STEFANO'S DOUGHNUT

$9

Lorem

```

Body:
In my case constructor is executed one time per creating new instance of class (new Product()). If I create instances of this class even times my method initAccordion wont work as i want to - I want to toggle class .active of .product element.

I want to execute contructor allways odd times.

Mine task is to build class which will toggle class active in .product element.

class Product {
  static count = 0;
  constructor() {
    this.instanceId = ++Product.count;
    this.initAccordion();
  }
  initAccordion() {
    const thisProduct = this;

    // console.log(thisProduct);
    const clickableTriggers = document.querySelectorAll('.product__header');
    for (let clickableTrigger of clickableTriggers) {
      clickableTrigger.addEventListener('click', function (event) {
        event.preventDefault();
        const products = document.querySelector('.product');
        console.log(Product.count);
        products.classList.toggle('active');
      });
    }
  }
}

new Product();
new Product();
new Product();
new Product();

.product.active .product__description {
  display: block;
}

.product .product__description {
  display: none;
}

<!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" />
    <title>Document</title>
    <link rel="stylesheet" href="style.css" />
    <link
      href="https://use.fontawesome.com/releases/v5.7.2/css/all.css"
      rel="stylesheet"
    />

          ZIO STEFANO'S DOUGHNUT

$9

Lorem

          ZIO STEFANO'S DOUGHNUT

$9

Lorem

          ZIO STEFANO'S DOUGHNUT

$9

Lorem

          ZIO STEFANO'S DOUGHNUT

$9

Lorem


问:
mongoDB find() method not retrieving the array object of my document in next js 13
I am using next js 13 to fetch my data from mongoDB database.

Schema.js

import mongoose from "mongoose";

const CoursesSchema = new mongoose.Schema({
    semester: String,
    department: String,
    subjects: [
        {
            courseCode: String,
            courseName: String,
            credits: Number,
            attempt: Number,
            type: String,
            electedCourse: Boolean
        },
    ],
})
module.exports = mongoose.models.course || mongoose.model('course', CoursesSchema)
```
<hr />
<p>myApi fetch Call</p>
<p><code>getCourses.js</code></p>
<pre class="lang-js prettyprint-override"><code>import dbConnect from "../../utils/dbConnection";
import course from '../../models/courses'

dbConnect()
export default async function (req, res) {
    try {
        const courses = await course.find({})
        if (courses) {
            return res.json(courses)
        }
    } catch (e) {
        console.log(e);
    }
}
</code>```

My Collection in mongoDB

I have three Documents here

what i am getting when i make the api call

<Problem>

I am missing the Array subjects

How do i get all the fields as a resonse

Body:
I am using next js 13 to fetch my data from mongoDB database.

Schema.js

import mongoose from "mongoose";

const CoursesSchema = new mongoose.Schema({
    semester: String,
    department: String,
    subjects: [
        {
            courseCode: String,
            courseName: String,
            credits: Number,
            attempt: Number,
            type: String,
            electedCourse: Boolean
        },
    ],
})
module.exports = mongoose.models.course || mongoose.model('course', CoursesSchema)

myApi fetch Call

getCourses.js

import dbConnect from "../../utils/dbConnection";
import course from '../../models/courses'

dbConnect()
export default async function (req, res) {
    try {
        const courses = await course.find({})
        if (courses) {
            return res.json(courses)
        }
    } catch (e) {
        console.log(e);
    }
}

My Collection in mongoDB

I have three Documents here

what i am getting when i make the api call

<Problem>

I am missing the Array subjects

How do i get all the fields as a resonse


问:
How to calculate dice coefficient when my Predicted image and input image have different shapes?
I am doing a segmentation using double U-Net and I am getting shape errors while calculating dice coef.
because the y_pred and y_true are not the same size. Now should I re-shape one of the images? If I re-shape one image will it affect the accuracy?

ground_truth_shape:  (None, 65536)
predicted_img_shape:  (None, 131072)

```<code>`import numpy as np
import tensorflow as tf
from tensorflow.keras import backend as K

def iou(y_true, y_pred):
    def f(y_true, y_pred):
        intersection = (y_true * y_pred).sum()
        union = y_true.sum() + y_pred.sum() - intersection
        x = (intersection + 1e-15) / (union + 1e-15)
        x = x.astype(np.float32)
        return x
    return tf.numpy_function(f, [y_true, y_pred], tf.float32)

smooth = 1e-15
def dice_coef(y_true, y_pred):
    y_true = tf.keras.layers.Flatten()(y_true)
    y_pred = tf.keras.layers.Flatten()(y_pred)
    print("ground_truth_shape: ",y_true.shape)
    print("predicted_img_shape: ",y_pred.shape)
    intersection = tf.reduce_sum(y_true * y_pred)
    return (2. * intersection + smooth) / (tf.reduce_sum(y_true) + tf.reduce_sum(y_pred) + smooth)

def dice_loss(y_true, y_pred):
    return 1.0 - dice_coef(y_true, y_pred)`

</code>```

It works fine when Using Unet model.

Body:
I am doing a segmentation using double U-Net and I am getting shape errors while calculating dice coef.
because the y_pred and y_true are not the same size. Now should I re-shape one of the images? If I re-shape one image will it affect the accuracy?

ground_truth_shape:  (None, 65536)
predicted_img_shape:  (None, 131072)

`import numpy as np
import tensorflow as tf
from tensorflow.keras import backend as K

def iou(y_true, y_pred):
    def f(y_true, y_pred):
        intersection = (y_true * y_pred).sum()
        union = y_true.sum() + y_pred.sum() - intersection
        x = (intersection + 1e-15) / (union + 1e-15)
        x = x.astype(np.float32)
        return x
    return tf.numpy_function(f, [y_true, y_pred], tf.float32)

smooth = 1e-15
def dice_coef(y_true, y_pred):
    y_true = tf.keras.layers.Flatten()(y_true)
    y_pred = tf.keras.layers.Flatten()(y_pred)
    print("ground_truth_shape: ",y_true.shape)
    print("predicted_img_shape: ",y_pred.shape)
    intersection = tf.reduce_sum(y_true * y_pred)
    return (2. * intersection + smooth) / (tf.reduce_sum(y_true) + tf.reduce_sum(y_pred) + smooth)

def dice_loss(y_true, y_pred):
    return 1.0 - dice_coef(y_true, y_pred)`

It works fine when Using Unet model.


问:
is it possible to have several threads writing in the same array but in staying at their place in Rust?
I am writing a huge piece of code that do a sluggish operation but several times (almost 150 times)  and I am trying to make the code faster by using multithreading to parallelize several instances of the main operation. The result of each operation instance has to be stored in an array but the main goal is not to have all of the threads writing in the same part of the array.Problem: the code that perform the sluggish operation is extremely long (400 lines and multiple operations) so I have the solution to copy-paste these 400 lines 150 times and moddify some things in each of the instances of the code but I am already struggling because of the size of the whole code.

So in order to simplify the lecture and debugging of my code I am trying to do a loop with a generic version of the piece of code I try to multithread. Problem: with that method I cannot assign to each threat its place to write in the result array by hand. I try to use a shared variable between the threads that will be used as the index of their place in the array but I am encountering some errors and I am not sure to do the right thing to upgrade my code.
I made an extremely basic code that take the architecture (if i can call it like this) of my project:

```<code>use std::thread;
use std::time::Duration;

use std::sync::{Arc, Mutex};

fn main(){
    let shared_array = Arc::new(Mutex::new([0;10]));//i create an array that can be shared between the threads
    let shared_array_copy = shared_array.clone();
    let shared_j = Arc::new(Mutex::new(0 as usize));//i create a variable that will be used as an index
    let shared_j_copy = shared_array.clone();
        let mut j = shared_j_copy.lock().unwrap();//i get the index variable to increment it each turn.
    for i in 1..10{//i do a loop to simplify the lecture of my code (instead of copying my 300 lines long piece of code several times)
        thread::spawn(move || {//in the thread i will put my piece of code that do the long operation
            let mut tab = shared_array_copy.lock().unwrap();
            let mut j = shared_j_copy.lock().unwrap();

            println!("I write in tab[{:?}]",j);
            tab[j]=j;// I try to use the j variable as an index to write in the good place
            thread::sleep(Duration::from_millis(1000));
            });

            j+=1;
    }

        thread::sleep(Duration::from_millis(10000));
        let mut tab = shared_array_copy.lock().unwrap();
        println!("tab= {:?}",tab);  //i print the result tab to verify that all went right
}
</code>```

and the compiller return this error to me:

```<code>testweb 10:29:14 dim. janv. 08  $ rustc testmulti.rs
</code>```

error[E0277]: the type [{integer}] cannot be indexed by MutexGuard<'_, [{integer}; 10]>
--> testmulti.rs:19:8
|
19 |             tab[j]=j;
|                 ^ slice indices are of type usize or ranges of usize
|
= help: the trait SliceIndex<[{integer}]> is not implemented for MutexGuard<'_, [{integer}; 10]>
= note: required because of the requirements on the impl of Index<MutexGuard<'_, [{integer}; 10]>> for [{integer}]

error[E0368]: binary assignment operation += cannot be applied to type MutexGuard<'_, [{integer}; 10]>
--> testmulti.rs:23:7
|
23 |             j+=1;
|             -^^^
|             |
|             cannot use += on type MutexGuard<'_, [{integer}; 10]>

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0368.
For more information about an error, try rustc --explain E0277.

In this example I use shared_j as the index that will increment each turn of the loop to ensure that the thread of the following turn of the loop will write his result in the following place in the array but it dont work and i dont know if it could work.

Body:
I am writing a huge piece of code that do a sluggish operation but several times (almost 150 times)  and I am trying to make the code faster by using multithreading to parallelize several instances of the main operation. The result of each operation instance has to be stored in an array but the main goal is not to have all of the threads writing in the same part of the array.Problem: the code that perform the sluggish operation is extremely long (400 lines and multiple operations) so I have the solution to copy-paste these 400 lines 150 times and moddify some things in each of the instances of the code but I am already struggling because of the size of the whole code.

So in order to simplify the lecture and debugging of my code I am trying to do a loop with a generic version of the piece of code I try to multithread. Problem: with that method I cannot assign to each threat its place to write in the result array by hand. I try to use a shared variable between the threads that will be used as the index of their place in the array but I am encountering some errors and I am not sure to do the right thing to upgrade my code.
I made an extremely basic code that take the architecture (if i can call it like this) of my project:

use std::thread;
use std::time::Duration;

use std::sync::{Arc, Mutex};

fn main(){
    let shared_array = Arc::new(Mutex::new([0;10]));//i create an array that can be shared between the threads
    let shared_array_copy = shared_array.clone();
    let shared_j = Arc::new(Mutex::new(0 as usize));//i create a variable that will be used as an index
    let shared_j_copy = shared_array.clone();
        let mut j = shared_j_copy.lock().unwrap();//i get the index variable to increment it each turn.
    for i in 1..10{//i do a loop to simplify the lecture of my code (instead of copying my 300 lines long piece of code several times)
        thread::spawn(move || {//in the thread i will put my piece of code that do the long operation
            let mut tab = shared_array_copy.lock().unwrap();
            let mut j = shared_j_copy.lock().unwrap();

            println!("I write in tab[{:?}]",j);
            tab[j]=j;// I try to use the j variable as an index to write in the good place
            thread::sleep(Duration::from_millis(1000));
            });

            j+=1;
    }

        thread::sleep(Duration::from_millis(10000));
        let mut tab = shared_array_copy.lock().unwrap();
        println!("tab= {:?}",tab);  //i print the result tab to verify that all went right
}

and the compiller return this error to me:

testweb 10:29:14 dim. janv. 08  $ rustc testmulti.rs

error[E0277]: the type [{integer}] cannot be indexed by MutexGuard<'_, [{integer}; 10]>
--> testmulti.rs:19:8
|
19 |             tab[j]=j;
|                 ^ slice indices are of type usize or ranges of usize
|
= help: the trait SliceIndex<[{integer}]> is not implemented for MutexGuard<'_, [{integer}; 10]>
= note: required because of the requirements on the impl of Index<MutexGuard<'_, [{integer}; 10]>> for [{integer}]

error[E0368]: binary assignment operation += cannot be applied to type MutexGuard<'_, [{integer}; 10]>
--> testmulti.rs:23:7
|
23 |             j+=1;
|             -^^^
|             |
|             cannot use += on type MutexGuard<'_, [{integer}; 10]>

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0277, E0368.
For more information about an error, try rustc --explain E0277.

In this example I use shared_j as the index that will increment each turn of the loop to ensure that the thread of the following turn of the loop will write his result in the following place in the array but it dont work and i dont know if it could work.


问:
What is this plot type called?
Reference image

I would like to generate a plot as in the reference image. I've a text file with three columns in which the first column list the values of 'm', second column lists 'g', and the third column lists 'chi2' values. The 'chi2' value are plotted as colors in the 2D space of 'm' and 'g'.
Can someone just guide me what plot type to read in matplotlib and ,if possible, how to implement it, since I'm a newbie and don't know the name of such plots! If required, I can attach the data file.

I read about contourf and tricountourf but I'm not sure whether they will produce the reference image.

Thanks in advance.

I read about contourf and tricountourf but I'm not sure whether they will produce the reference image.

Title: What is this plot type called?


问:
Python: Draw a (throw-)function with ASCII-Symbols in the Terminal
So I want to draw the trajectory of an object thrown in the Terminal with ASCII Symbols. The plan is to have dots or Xs as the trajectory of the object flying through a predrawn field of empty strings. My approach is to draw the field based on the maximum height and the flight distance of the throw. The code calculates a number of values of the throw beforehand and puts them in lists which it later rounds to integers.

I have to put it in a while loop somehow I think, but how do I count up the values and make it print the dot at the right place?

And I cant just plot it with gnuplot or something like that, since its a task for university.

My code is (with example values):

```<code>import numpy as np
hmax = 10
flightdistance = 43
sizex = flightdistance
sizey = hmax
yvalues = []
xvalues = []
listx_rounded = list(np.around(listx))
listy_rounded = list(np.around(listy))
for iy in range(sizey):
    for ix in range(sizex):
        if listy_rounded == iy and listx_rounded == ix:
            print('x', end='')
        else:
            print('', end='')
    print('')
</code>```

I also thought enumerate() might help, but Im just not getting it.

Body:
So I want to draw the trajectory of an object thrown in the Terminal with ASCII Symbols. The plan is to have dots or Xs as the trajectory of the object flying through a predrawn field of empty strings. My approach is to draw the field based on the maximum height and the flight distance of the throw. The code calculates a number of values of the throw beforehand and puts them in lists which it later rounds to integers.

I have to put it in a while loop somehow I think, but how do I count up the values and make it print the dot at the right place?

And I cant just plot it with gnuplot or something like that, since its a task for university.

My code is (with example values):

import numpy as np
hmax = 10
flightdistance = 43
sizex = flightdistance
sizey = hmax
yvalues = []
xvalues = []
listx_rounded = list(np.around(listx))
listy_rounded = list(np.around(listy))
for iy in range(sizey):
    for ix in range(sizex):
        if listy_rounded == iy and listx_rounded == ix:
            print('x', end='')
        else:
            print('', end='')
    print('')

I also thought enumerate() might help, but Im just not getting it.


问:
It does not show formula result until refreshed manually
When I put a formula in a cell using Excel VBA, It does not show the formula result until I manually goto the cell and click the formula bar, and press enter.

I have tried calculating range, calculate sheet etc.


问:
How to debug Unknown word error while building my Next.js site?
I'm running npm run build on my website and I get this error:

```<code>info  - Creating an optimized production build
Failed to compile.

HookWebpackError: /Activity/SiteNext/static/css/4a5b71b9df803fb8.css:1085:26: Unknown word
    at makeWebpackError (/next/node_modules/next/dist/compiled/webpack/bundle5.js:28:308185)
    at /next/node_modules/next/dist/compiled/webpack/bundle5.js:28:105236
    at eval (eval at create (/next/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:34:1)
-- inner error --
CssSyntaxError: /Activity/SiteNext/static/css/4a5b71b9df803fb8.css:1085:26: Unknown word
    at Input.error (/next/node_modules/next/node_modules/postcss/lib/input.js:148:16)
    at ScssParser.unknownWord (/next/node_modules/next/node_modules/postcss/lib/parser.js:540:22)
    at ScssParser.other (/next/node_modules/next/node_modules/postcss/lib/parser.js:164:12)
    at ScssParser.parse (/next/node_modules/next/node_modules/postcss/lib/parser.js:72:16)
    at scssParse (/next/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:322)
    at new LazyResult (/next/node_modules/next/node_modules/postcss/lib/lazy-result.js:133:16)
    at Processor.process (/next/node_modules/next/node_modules/postcss/lib/processor.js:28:14)
    at CssMinimizerPlugin.optimizeAsset (/next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:42:12)
    at /next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:74:55
    at async Span.traceAsyncFn (/next/node_modules/next/dist/trace/trace.js:79:20)
caused by plugins in Compilation.hooks.processAssets
CssSyntaxError: /Activity/SiteNext/static/css/4a5b71b9df803fb8.css:1085:26: Unknown word
    at Input.error (/next/node_modules/next/node_modules/postcss/lib/input.js:148:16)
    at ScssParser.unknownWord (/next/node_modules/next/node_modules/postcss/lib/parser.js:540:22)
    at ScssParser.other (/next/node_modules/next/node_modules/postcss/lib/parser.js:164:12)
    at ScssParser.parse (/next/node_modules/next/node_modules/postcss/lib/parser.js:72:16)
    at scssParse (/next/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:322)
    at new LazyResult (/next/node_modules/next/node_modules/postcss/lib/lazy-result.js:133:16)
    at Processor.process (/next/node_modules/next/node_modules/postcss/lib/processor.js:28:14)
    at CssMinimizerPlugin.optimizeAsset (/next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:42:12)
    at /next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:74:55
    at async Span.traceAsyncFn (/next/node_modules/next/dist/trace/trace.js:79:20)

</code>```

As you can see, it does not tell me anything about my code. It just says that something does not work while minifying the style.

If I run npm run dev everything works perfectly and there is no error. But I'm stuck at building my site.

The codebase is not small, thus I can't manually check everything in styles. I need to find out a way to do it systematically.

I'm using Tailwind CSS and SASS.

I have searched and found some answers. But the are all related to very specific problems that do not solve mine.

Also CssSyntaxError - unknown word in Tailwind and Next.js project does not have answers.

Body:
I'm running npm run build on my website and I get this error:

info  - Creating an optimized production build
Failed to compile.

HookWebpackError: /Activity/SiteNext/static/css/4a5b71b9df803fb8.css:1085:26: Unknown word
    at makeWebpackError (/next/node_modules/next/dist/compiled/webpack/bundle5.js:28:308185)
    at /next/node_modules/next/dist/compiled/webpack/bundle5.js:28:105236
    at eval (eval at create (/next/node_modules/next/dist/compiled/webpack/bundle5.js:13:28771), <anonymous>:34:1)
-- inner error --
CssSyntaxError: /Activity/SiteNext/static/css/4a5b71b9df803fb8.css:1085:26: Unknown word
    at Input.error (/next/node_modules/next/node_modules/postcss/lib/input.js:148:16)
    at ScssParser.unknownWord (/next/node_modules/next/node_modules/postcss/lib/parser.js:540:22)
    at ScssParser.other (/next/node_modules/next/node_modules/postcss/lib/parser.js:164:12)
    at ScssParser.parse (/next/node_modules/next/node_modules/postcss/lib/parser.js:72:16)
    at scssParse (/next/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:322)
    at new LazyResult (/next/node_modules/next/node_modules/postcss/lib/lazy-result.js:133:16)
    at Processor.process (/next/node_modules/next/node_modules/postcss/lib/processor.js:28:14)
    at CssMinimizerPlugin.optimizeAsset (/next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:42:12)
    at /next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:74:55
    at async Span.traceAsyncFn (/next/node_modules/next/dist/trace/trace.js:79:20)
caused by plugins in Compilation.hooks.processAssets
CssSyntaxError: /Activity/SiteNext/static/css/4a5b71b9df803fb8.css:1085:26: Unknown word
    at Input.error (/next/node_modules/next/node_modules/postcss/lib/input.js:148:16)
    at ScssParser.unknownWord (/next/node_modules/next/node_modules/postcss/lib/parser.js:540:22)
    at ScssParser.other (/next/node_modules/next/node_modules/postcss/lib/parser.js:164:12)
    at ScssParser.parse (/next/node_modules/next/node_modules/postcss/lib/parser.js:72:16)
    at scssParse (/next/node_modules/next/dist/compiled/postcss-scss/scss-syntax.js:1:322)
    at new LazyResult (/next/node_modules/next/node_modules/postcss/lib/lazy-result.js:133:16)
    at Processor.process (/next/node_modules/next/node_modules/postcss/lib/processor.js:28:14)
    at CssMinimizerPlugin.optimizeAsset (/next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:42:12)
    at /next/node_modules/next/dist/build/webpack/plugins/css-minimizer-plugin.js:74:55
    at async Span.traceAsyncFn (/next/node_modules/next/dist/trace/trace.js:79:20)

As you can see, it does not tell me anything about my code. It just says that something does not work while minifying the style.

If I run npm run dev everything works perfectly and there is no error. But I'm stuck at building my site.

The codebase is not small, thus I can't manually check everything in styles. I need to find out a way to do it systematically.

I'm using Tailwind CSS and SASS.

I have searched and found some answers. But the are all related to very specific problems that do not solve mine.

Also CssSyntaxError - unknown word in Tailwind and Next.js project does not have answers.


问:
I have been facing problem with "Unresolved reference: contains" in kotlin android studio with most of the functions
Unresolved reference: contains
while developing the android app I used the function "contains" in kotlin and keep getting the error unresolved reference there are many other functions also which show the same error I tried many ways to solve it but yet no progress code still runs.

I was trying to find the arithmetic operator in the string with contains keyword which is working fine is finds the operator but that error is still their unresolved reference: contains there are many other functions which have same problem they work fine but show the problem unresolved reference"xyz_function
enter image description here


问:
How to develop python and cpp mixed project by pybind11?
Currently I have some python codes and cpp codes. https://github.com/quiver-team/torch-quiver/tree/main/srcs
cpp codes provides API by pybind11::module.
Now I want to develop these codes, change some cpp codes and python codes.
The first problem is that whether I can use pip install -e . to edit such mixed codes. If not, how can I edit python codes except pip install -e?

The following are some of my ideas:

I try to add -e in current install.sh pip install --no-index -U -e .
But the output is :
/opt/conda/lib/python3.8/distutils/extension.py:131: UserWarning: Unknown Extension options: 'with_cuda'
warnings.warn(msg)
error: ("Can't get a consistent path to setup script from installation directory", '/root/share')
https://github.com/quiver-team/torch-quiver/issues/139

I tried solutions at "Can't get a consistent path to setup script from installation directory" But these solution cannot successfully install.
When I add a pyproject.toml file, the output is ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none) But my setuptools  == 58.0.4

I think I can change python path so that I don't need use pip install, but I don't know where I place my .so files?

May you could recommend some good repo or blogs teach me how to develop this type of repo?


问:
Getting JSONDecodeError when trying to post to medium.com using their python API
When I try to post to Medium.com following their documention, I get this error:

```<code>requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
</code>```

To be specific I am only trying to use the create_post function that the client provides.

Has anyone faced this error before? And how did you fix it? Any help would be greatly appreciated.

I followed the instructions in their documentation and this error was not included in their expected auth errors

Body:
When I try to post to Medium.com following their documention, I get this error:

requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

To be specific I am only trying to use the create_post function that the client provides.

Has anyone faced this error before? And how did you fix it? Any help would be greatly appreciated.

I followed the instructions in their documentation and this error was not included in their expected auth errors


问:
Dash progress bar with celery
I am developing a dash application. I am using docker-compose, web and celery are few services to name.

I have a long running task for this I am using celery and I have a progress bar to display progress of that task.

So basically user clicks on run button to start the task and then a progress bar and cancel button is visible to cancel the task and run button is disabled till task is running or cancel button is clicked.

This above setup is working smooth.

Now suppose user clicks on run button i.e. progress bar and cancel button is visible and run button is disabled and after that user do one of the following below actions -

Problem:

If user closes the browser tab or

If user clicks the browser refresh button or

If user switches/clicks on any other page within the application

And now if user again returns/opens the same page again, I observed following things:

Page gets loaded with default page settings i.e. no progress bar and cancel button only run button is visible.

The task is still running in background.

What is preferred approach to handle above problems?

I am trying to get the status of the page as it was left i.e. progress bar and cancel button is visible and run button is disabled.Is this possible?

Please suggest.

Title: Dash progress bar with celery


问:
Why does my paragraph keep moving after inserting a div into it?
I created a fraction using javascript and set the position to static via css. After that i inserted the div in a paragraph via js but the paragraph still moves to the end of the document flow.
How to fix that?

before inserting div
after inserting div

my script:

```<code>
            var rlabel = document.getElementById("test")

            is_fraction = true

            document.getElementById("btndown").disabled = false;
            // generate element instances
            var div1  = document.createElement("div")
            var span1 = document.createElement("span")
            var span2 = document.createElement("span")
            var span3 = document.createElement("span")

            div1.setAttribute("id","d1")

            //add classes
            div1.classList.add("frac")
            div1.classList.add("relative")
            span2.classList.add("symbol")
            span3.classList.add("bottom")

            //create textnodes
            var textspan1 = document.createTextNode("□")
            var textspan2 = document.createTextNode("/")
            var textspan3 = document.createTextNode("□")

            //add textnodes
            span1.appendChild(textspan1)
            span2.appendChild(textspan2)
            span3.appendChild(textspan3)

            //add spans
            div1.appendChild(span1)
            div1.appendChild(span2)
            div1.appendChild(span3)

            // add fraction to paragraph
            document.getElementById("test").appendChild(div1)

            //visualize the paragraph
            document.body.appendChild(document.getElementById("test"))

</code>```

my html:

here is the html

i also tried it with "relative" but it didnt fixed it.
i thought that the div would appear next to the word called "Rechnung: ".

Body:
I created a fraction using javascript and set the position to static via css. After that i inserted the div in a paragraph via js but the paragraph still moves to the end of the document flow.
How to fix that?

before inserting div
after inserting div

my script:

            var rlabel = document.getElementById("test")

            is_fraction = true

            document.getElementById("btndown").disabled = false;
            // generate element instances
            var div1  = document.createElement("div")
            var span1 = document.createElement("span")
            var span2 = document.createElement("span")
            var span3 = document.createElement("span")

            div1.setAttribute("id","d1")

            //add classes
            div1.classList.add("frac")
            div1.classList.add("relative")
            span2.classList.add("symbol")
            span3.classList.add("bottom")

            //create textnodes
            var textspan1 = document.createTextNode("□")
            var textspan2 = document.createTextNode("/")
            var textspan3 = document.createTextNode("□")

            //add textnodes
            span1.appendChild(textspan1)
            span2.appendChild(textspan2)
            span3.appendChild(textspan3)

            //add spans
            div1.appendChild(span1)
            div1.appendChild(span2)
            div1.appendChild(span3)

            // add fraction to paragraph
            document.getElementById("test").appendChild(div1)

            //visualize the paragraph
            document.body.appendChild(document.getElementById("test"))

my html:

here is the html

i also tried it with "relative" but it didnt fixed it.
i thought that the div would appear next to the word called "Rechnung: ".


问:
Want to parse podcast feed in php
I want to get the audio and logo URLs for each episode of the podcast using php.

First I try to use simplepie to parse feed. But, it so complex for me. I only found how to get podcast episode's logo. but I can't find the way to get URL of the audio file from RSS.

Next I try to use the package link below. But when I try to use it, I get an error like that " Error  Call to undefined function Lukaswhite\PodcastFeedParser\Parser().".

https://github.com/lukaswhite/podcast-feed-parser

PS. If you are try for this. This repository's redme file is incorrect.

```<code>composer require lukaswhite/php-feed-parser
</code>```

use this.

```<code>composer require lukaswhite/podcast-feed-parser
</code>```

Title: Want to parse podcast feed in php

Body:
I want to get the audio and logo URLs for each episode of the podcast using php.

First I try to use simplepie to parse feed. But, it so complex for me. I only found how to get podcast episode's logo. but I can't find the way to get URL of the audio file from RSS.

Next I try to use the package link below. But when I try to use it, I get an error like that " Error  Call to undefined function Lukaswhite\PodcastFeedParser\Parser().".

https://github.com/lukaswhite/podcast-feed-parser

PS. If you are try for this. This repository's redme file is incorrect.

composer require lukaswhite/php-feed-parser

use this.

composer require lukaswhite/podcast-feed-parser


问:
Apollo client fetchMore not updating data cache?
I am try to use @apollo/client in my nextjs application (only frontend). My backend is done using nestjs-graphql. I am facing one problem using @apollo/client.

Here is my code-

client.ts

```<code>//Initialize apolloClient
let apolloClient: ApolloClient<NormalizedCacheObject>;

//Creating link
function createIsomorphLink() {
    return new HttpLink({
        uri: "http://localhost:5000/piechat",
        credentials: 'same-origin'
    })
}

//Create apollo client
function createApolloClient() {
    return new ApolloClient({
        ssrMode: true,
        link: createIsomorphLink(),
        cache: new InMemoryCache()
    })
}

//Initialize Apollo
export function initializeApollo(initialState = null) {
    const _apolloClient = apolloClient ?? createApolloClient()
    if (initialState) {
        const existingCache = _apolloClient.extract()
        const data = merge(initialState, existingCache)
        _apolloClient.cache.restore(data)
    }
    if (!apolloClient) apolloClient = _apolloClient
    return _apolloClient
}

//Use Apollo
export function useApollo(initialState = null) {
    const store = useMemo(() => initializeApollo(initialState), [initialState])
    return store
}
</code>```

Then in nextjs getServerSideProps-

```<code>export const getServerSideProps: GetServerSideProps = async (ctx) => {
  const apolloClient = initializeApollo()
  await apolloClient.query({
    query: GET_CONVERSATION_LIST,
    context: { headers: { authorization: `Bearer ${ctx.req.cookies["session"]}` } },
    errorPolicy: "all"
  })
  return {
    props: {
      initialApolloState: apolloClient.cache.extract(),
    }
  }
}
</code>```

Then in one conversation.tsx(I use this data)-

```<code>const { data } = useQuery<GetConversationData>(GET_CONVERSATION_LIST);
</code>```

On the other component (createConver.tsx) I use fetchMore function-

```<code>const { fetchMore } = useQuery(GET_CONVERSATION_LIST)

useEffect(() => {
    if (data) { //If new data creation is success
        fetchMore({
            context: { headers: { authorization: `Bearer ${getCookie("session")}` } }, updateQuery(_, { fetchMoreResult }) {
                return fetchMoreResult
            }
        })
    }
}, [data])
</code>```

Everything is well. But when I refresh my page, I see that new data not comes. please see this gif-

But I am not understanding what is the problem. I am not getting any docs or any things else. Please help me anyone.

Body:
I am try to use @apollo/client in my nextjs application (only frontend). My backend is done using nestjs-graphql. I am facing one problem using @apollo/client.

Here is my code-

client.ts

//Initialize apolloClient
let apolloClient: ApolloClient<NormalizedCacheObject>;

//Creating link
function createIsomorphLink() {
    return new HttpLink({
        uri: "http://localhost:5000/piechat",
        credentials: 'same-origin'
    })
}

//Create apollo client
function createApolloClient() {
    return new ApolloClient({
        ssrMode: true,
        link: createIsomorphLink(),
        cache: new InMemoryCache()
    })
}

//Initialize Apollo
export function initializeApollo(initialState = null) {
    const _apolloClient = apolloClient ?? createApolloClient()
    if (initialState) {
        const existingCache = _apolloClient.extract()
        const data = merge(initialState, existingCache)
        _apolloClient.cache.restore(data)
    }
    if (!apolloClient) apolloClient = _apolloClient
    return _apolloClient
}

//Use Apollo
export function useApollo(initialState = null) {
    const store = useMemo(() => initializeApollo(initialState), [initialState])
    return store
}

Then in nextjs getServerSideProps-

export const getServerSideProps: GetServerSideProps = async (ctx) => {
  const apolloClient = initializeApollo()
  await apolloClient.query({
    query: GET_CONVERSATION_LIST,
    context: { headers: { authorization: `Bearer ${ctx.req.cookies["session"]}` } },
    errorPolicy: "all"
  })
  return {
    props: {
      initialApolloState: apolloClient.cache.extract(),
    }
  }
}

Then in one conversation.tsx(I use this data)-

const { data } = useQuery<GetConversationData>(GET_CONVERSATION_LIST);

On the other component (createConver.tsx) I use fetchMore function-

const { fetchMore } = useQuery(GET_CONVERSATION_LIST)

useEffect(() => {
    if (data) { //If new data creation is success
        fetchMore({
            context: { headers: { authorization: `Bearer ${getCookie("session")}` } }, updateQuery(_, { fetchMoreResult }) {
                return fetchMoreResult
            }
        })
    }
}, [data])

Everything is well. But when I refresh my page, I see that new data not comes. please see this gif-

But I am not understanding what is the problem. I am not getting any docs or any things else. Please help me anyone.


问:
CombineLatestStream is not a subtype of type Query error
I have a various Collection References and Im combining them with CombineLatestStream in totalRef.

```<code>Future<Stream<QuerySnapshot<Object>>> List1() async {
    var idList = _firestore
        .collection('users')
        .doc(user.uid)
        .collection("IDs");
    var idListQuery = await idList.get();
    var map = idListQuery.docs;
    for (int i = 0; i < map.length; i++) {
      setState(() {
        IDList.add(map[i].data()["ID"]);
      });
    }
    var chunks = [];
    for (var i = 0; i < IDList.length; i += 10) {
      chunks.add(IDList.sublist(
          i, i + 10 > IDList.length ? IDList.length : i + 10));
    }
    for (var i = 0; i < chunks.length; i++) {
      combineList.add(Ref
          .where('ID', whereIn: chunks[i])
          .orderBy("uploadTime", descending: true)
          .snapshots());
    }

    totalRef = CombineLatestStream.list(combineList);
  }
</code>```

When Im using this totalRef in StreamBuilder its working well.

But when I want to use this totalRef in FirestoreQueryBuilder(), im getting this error;

```<code>type 'CombineLatestStream<QuerySnapshot<Object>, List<QuerySnapshot<Object>>>' is not a subtype of type 'Query<dynamic>'
</code>```

This is the my FirestoreQueryBuilder(),

```<code>FirestoreQueryBuilder(
                            pageSize: 10,
                            query: totalRef,
                            builder: (context, snapshot, _) {
                              if (snapshot.isFetching) {
                                return const CircularProgressIndicator();
                              }

                              if (snapshot.hasError) {
                                return Text(
                                    'Something went wrong! ${snapshot.error}');
                              }
                              return ListView.builder(
                                physics: ScrollPhysics(),
                                shrinkWrap: true,
                                itemCount: snapshot.docs.length,
                                itemBuilder: (BuildContext context, int index) {
                                  if (snapshot.hasMore &&
                                      index + 1 == snapshot.docs.length) {
                                    snapshot.fetchMore();
                                  }
                                  final post = snapshot.docs[index].data();
                                  return Container(
                                    margin: EdgeInsets.symmetric(
                                        horizontal: 12.0, vertical: 12.0),
                                    child: Column(
                                      children: <Widget>[
                                        Stack(
                                          children: <Widget>[
                                            Align(
                                              alignment: Alignment.topCenter,
                                              child: ClipRRect(
                                                borderRadius:
                                                    BorderRadius.circular(24),
                                                child: GestureDetector(
                                                  onTap: () =>
                                                      navigateToDetail(post),
                                                  child: (post["pic"] != null)
                                                      ? OptimizedCacheImage(
                                                          imageUrl:
                                                              post["pic"],
                                                          imageBuilder: (context,
                                                                  imageProvider) =>
                                                              Container(
                                                            height:
                                                                size.height *
                                                                    0.475,
                                                            width: size.width *
                                                                0.80,
                                                            decoration:
                                                                BoxDecoration(
                                                                    image:
                                                                        DecorationImage(
                                                              image:
                                                                  imageProvider,
                                                              fit: BoxFit.cover,
                                                            )),
                                                          ),
                                                          placeholder:
                                                              (context, url) =>
                                                                  Container(
                                                            height:
                                                                size.height *
                                                                    0.475,
                                                            width: size.width *
                                                                0.80,
                                                            decoration:
                                                                BoxDecoration(
                                                              color: Colors
                                                                  .grey[400],
                                                              borderRadius:
                                                                  BorderRadius
                                                                      .circular(
                                                                          24),
                                                            ),
                                                          ),
                                                        )
                                                      : Image(
                                                          height: size.height *
                                                              0.475,
                                                          width:
                                                              size.width * 0.80,
                                                          fit: BoxFit.cover,
                                                          image: AssetImage(
                                                              "assets/images/n_image.jpg"),
                                                        ),
                                                ),
                                              ),
                                            ),
                                            Positioned(
                                              top: 5,
                                              right: 43,
                                              child: Container(
                                                height: size.height * 0.1,
                                                width: size.width * 0.1,
                                                decoration: BoxDecoration(
                                                    shape: BoxShape.circle,
                                                    color: Colors.grey[700]
                                                        .withOpacity(0.5)),
                                                child: IconFav(
                                                  post: post,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                        SizedBox(
                                          height: size.height * 0.015,
                                        ),
                                        Container(
                                          width: size.width * 0.77,
                                          child: Row(
                                            crossAxisAlignment:
                                                CrossAxisAlignment.start,
                                            children: <Widget>[
                                              Expanded(
                                                child: Column(
                                                  crossAxisAlignment:
                                                      CrossAxisAlignment.start,
                                                  children: <Widget>[
                                                    AutoSizeText(
                                                      post["name"],
                                                      style: Theme.of(context)
                                                          .textTheme
                                                          .subtitle1,
                                                    ),
                                                    SizedBox(
                                                      height:
                                                          size.height * 0.012,
                                                    ),
                                                    GestureDetector(
                                                      onTap: () =>
                                                          navigateToProfile(
                                                              post),
                                                      child: Container(
                                                        child: AutoSizeText(
                                                          post["writer"],
                                                          style:
                                                              Theme.of(context)
                                                                  .textTheme
                                                                  .caption,
                                                        ),
                                                      ),
                                                    ),
                                                  ],
                                                ),
                                              ),
                                              Expanded(
                                                child: Row(
                                                  mainAxisAlignment:
                                                      MainAxisAlignment.end,
                                                  children: <Widget>[
                                                    Icon(Icons.timer_outlined),
                                                    SizedBox(
                                                      width: size.width *
                                                          0.005, //2
                                                    ),
                                                    AutoSizeText(
                                                      "${post["ptime"]}'",
                                                    ),
                                                    SizedBox(
                                                      width: size.width *
                                                          0.007, //3
                                                    ),
                                                    IconLike(
                                                      post: post,
                                                    ),
                                                  ],
                                                ),
                                              )
                                            ],
                                          ),
                                        ),
                                      ],
                                    ),
                                  );
                                },
                              );
                            }),
</code>```

Im using this FirestoreQueryBuilder(), for paginate my datas in order not to get too much data when getting data, so I need to use this QueryBuilder and I also need to use this Combine References as totalRef because I have more than References.

How can I fix this problem.

Body:
I have a various Collection References and Im combining them with CombineLatestStream in totalRef.

Future<Stream<QuerySnapshot<Object>>> List1() async {
    var idList = _firestore
        .collection('users')
        .doc(user.uid)
        .collection("IDs");
    var idListQuery = await idList.get();
    var map = idListQuery.docs;
    for (int i = 0; i < map.length; i++) {
      setState(() {
        IDList.add(map[i].data()["ID"]);
      });
    }
    var chunks = [];
    for (var i = 0; i < IDList.length; i += 10) {
      chunks.add(IDList.sublist(
          i, i + 10 > IDList.length ? IDList.length : i + 10));
    }
    for (var i = 0; i < chunks.length; i++) {
      combineList.add(Ref
          .where('ID', whereIn: chunks[i])
          .orderBy("uploadTime", descending: true)
          .snapshots());
    }

    totalRef = CombineLatestStream.list(combineList);
  }

When Im using this totalRef in StreamBuilder its working well.

But when I want to use this totalRef in FirestoreQueryBuilder(), im getting this error;

type 'CombineLatestStream<QuerySnapshot<Object>, List<QuerySnapshot<Object>>>' is not a subtype of type 'Query<dynamic>'

This is the my FirestoreQueryBuilder(),

FirestoreQueryBuilder(
                            pageSize: 10,
                            query: totalRef,
                            builder: (context, snapshot, _) {
                              if (snapshot.isFetching) {
                                return const CircularProgressIndicator();
                              }

                              if (snapshot.hasError) {
                                return Text(
                                    'Something went wrong! ${snapshot.error}');
                              }
                              return ListView.builder(
                                physics: ScrollPhysics(),
                                shrinkWrap: true,
                                itemCount: snapshot.docs.length,
                                itemBuilder: (BuildContext context, int index) {
                                  if (snapshot.hasMore &&
                                      index + 1 == snapshot.docs.length) {
                                    snapshot.fetchMore();
                                  }
                                  final post = snapshot.docs[index].data();
                                  return Container(
                                    margin: EdgeInsets.symmetric(
                                        horizontal: 12.0, vertical: 12.0),
                                    child: Column(
                                      children: <Widget>[
                                        Stack(
                                          children: <Widget>[
                                            Align(
                                              alignment: Alignment.topCenter,
                                              child: ClipRRect(
                                                borderRadius:
                                                    BorderRadius.circular(24),
                                                child: GestureDetector(
                                                  onTap: () =>
                                                      navigateToDetail(post),
                                                  child: (post["pic"] != null)
                                                      ? OptimizedCacheImage(
                                                          imageUrl:
                                                              post["pic"],
                                                          imageBuilder: (context,
                                                                  imageProvider) =>
                                                              Container(
                                                            height:
                                                                size.height *
                                                                    0.475,
                                                            width: size.width *
                                                                0.80,
                                                            decoration:
                                                                BoxDecoration(
                                                                    image:
                                                                        DecorationImage(
                                                              image:
                                                                  imageProvider,
                                                              fit: BoxFit.cover,
                                                            )),
                                                          ),
                                                          placeholder:
                                                              (context, url) =>
                                                                  Container(
                                                            height:
                                                                size.height *
                                                                    0.475,
                                                            width: size.width *
                                                                0.80,
                                                            decoration:
                                                                BoxDecoration(
                                                              color: Colors
                                                                  .grey[400],
                                                              borderRadius:
                                                                  BorderRadius
                                                                      .circular(
                                                                          24),
                                                            ),
                                                          ),
                                                        )
                                                      : Image(
                                                          height: size.height *
                                                              0.475,
                                                          width:
                                                              size.width * 0.80,
                                                          fit: BoxFit.cover,
                                                          image: AssetImage(
                                                              "assets/images/n_image.jpg"),
                                                        ),
                                                ),
                                              ),
                                            ),
                                            Positioned(
                                              top: 5,
                                              right: 43,
                                              child: Container(
                                                height: size.height * 0.1,
                                                width: size.width * 0.1,
                                                decoration: BoxDecoration(
                                                    shape: BoxShape.circle,
                                                    color: Colors.grey[700]
                                                        .withOpacity(0.5)),
                                                child: IconFav(
                                                  post: post,
                                                ),
                                              ),
                                            ),
                                          ],
                                        ),
                                        SizedBox(
                                          height: size.height * 0.015,
                                        ),
                                        Container(
                                          width: size.width * 0.77,
                                          child: Row(
                                            crossAxisAlignment:
                                                CrossAxisAlignment.start,
                                            children: <Widget>[
                                              Expanded(
                                                child: Column(
                                                  crossAxisAlignment:
                                                      CrossAxisAlignment.start,
                                                  children: <Widget>[
                                                    AutoSizeText(
                                                      post["name"],
                                                      style: Theme.of(context)
                                                          .textTheme
                                                          .subtitle1,
                                                    ),
                                                    SizedBox(
                                                      height:
                                                          size.height * 0.012,
                                                    ),
                                                    GestureDetector(
                                                      onTap: () =>
                                                          navigateToProfile(
                                                              post),
                                                      child: Container(
                                                        child: AutoSizeText(
                                                          post["writer"],
                                                          style:
                                                              Theme.of(context)
                                                                  .textTheme
                                                                  .caption,
                                                        ),
                                                      ),
                                                    ),
                                                  ],
                                                ),
                                              ),
                                              Expanded(
                                                child: Row(
                                                  mainAxisAlignment:
                                                      MainAxisAlignment.end,
                                                  children: <Widget>[
                                                    Icon(Icons.timer_outlined),
                                                    SizedBox(
                                                      width: size.width *
                                                          0.005, //2
                                                    ),
                                                    AutoSizeText(
                                                      "${post["ptime"]}'",
                                                    ),
                                                    SizedBox(
                                                      width: size.width *
                                                          0.007, //3
                                                    ),
                                                    IconLike(
                                                      post: post,
                                                    ),
                                                  ],
                                                ),
                                              )
                                            ],
                                          ),
                                        ),
                                      ],
                                    ),
                                  );
                                },
                              );
                            }),

Im using this FirestoreQueryBuilder(), for paginate my datas in order not to get too much data when getting data, so I need to use this QueryBuilder and I also need to use this Combine References as totalRef because I have more than References.

How can I fix this problem.


问:
How can I see the bluetooth the Bluetooth deviceClass in React Native using ' react-native-bluetooh-classic' package?
I am making a Bluetooth Chat Application in React Native. For this project I am using the package 'react-native-bluetooth-classic'. Everything is working as expected, I can communicate between devices, read data and write data etc.

But now I want to acces the Bluetooth deviceclass, this property is always returning undefined for me. And I do not know why.

I think it has something to do with the 'android.permission.BLUETOOTH_CONNECT'. Because when I created an Android project trying to get the deviceclass everything worked fine.

```<code>public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        BluetoothManager bluetoothManager = getSystemService(BluetoothManager.class);
        BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter();
        if (bluetoothAdapter == null) {
            System.out.println("Device does not support bluetooth");
            return;
        }

        if (!bluetoothAdapter.isEnabled()) {
            Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
            startActivityForResult(enableBtIntent, 123);
        }

        Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();

        if (pairedDevices.size() > 0) {
            // There are paired devices. Get the name and address of each paired device.
            for (BluetoothDevice device : pairedDevices) {
                System.out.println(device.getBluetoothClass());
                System.out.println(device.getBluetoothClass().getDeviceClass());
                System.out.println(device.getBluetoothClass().getMajorDeviceClass());
            }
        }

    }
}
</code>```

This code worked as expected but needs the 'android.permission.BLUETOOTH_CONNECT' permission in the AndroidManifest.xml

So I check if the permission was granted in my React Native project using the following code.

```<code>PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT)
            .then(response => {
                console.log(response);
            });
</code>```

Which returns false, meaning that is does not have the permission. So I assume it has something to do with this 'android.permission.BLUETOOTH_CONNECT' permission.

But when I try to add this permission to my React Native project nothing seems to change.
Even after rebuilding the app.

Body:
I am making a Bluetooth Chat Application in React Native. For this project I am using the package 'react-native-bluetooth-classic'. Everything is working as expected, I can communicate between devices, read data and write data etc.

But now I want to acces the Bluetooth deviceclass, this property is always returning undefined for me. And I do not know why.

I think it has something to do with the 'android.permission.BLUETOOTH_CONNECT'. Because when I created an Android project trying to get the deviceclass everything worked fine.

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        BluetoothManager bluetoothManager = getSystemService(BluetoothManager.class);
        BluetoothAdapter bluetoothAdapter = bluetoothManager.getAdapter();
        if (bluetoothAdapter == null) {
            System.out.println("Device does not support bluetooth");
            return;
        }

        if (!bluetoothAdapter.isEnabled()) {
            Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
            startActivityForResult(enableBtIntent, 123);
        }

        Set<BluetoothDevice> pairedDevices = bluetoothAdapter.getBondedDevices();

        if (pairedDevices.size() > 0) {
            // There are paired devices. Get the name and address of each paired device.
            for (BluetoothDevice device : pairedDevices) {
                System.out.println(device.getBluetoothClass());
                System.out.println(device.getBluetoothClass().getDeviceClass());
                System.out.println(device.getBluetoothClass().getMajorDeviceClass());
            }
        }

    }
}

This code worked as expected but needs the 'android.permission.BLUETOOTH_CONNECT' permission in the AndroidManifest.xml

So I check if the permission was granted in my React Native project using the following code.

PermissionsAndroid.check(PermissionsAndroid.PERMISSIONS.BLUETOOTH_CONNECT)
            .then(response => {
                console.log(response);
            });

Which returns false, meaning that is does not have the permission. So I assume it has something to do with this 'android.permission.BLUETOOTH_CONNECT' permission.

But when I try to add this permission to my React Native project nothing seems to change.
Even after rebuilding the app.


问:
how to store confiq files in gitlab
In below script there are config files (ppsit ppdev ppdev2 ppuat)how to store confiq files in gitlab and schedule it to run every 2 hour .

```<code>#!/bin/bash
#set -eux
files=("ppsit ppdev ppdev2 ppuat")
for file in $files
do
source $file
echo $file

now=$(date +%s)

keytool -list -v -keystore /$path/$env  -storepass $password | sed -nr 's/^Alias name:\s*(.*)$/\1/p;s/Valid from:.*until: *(.*)/\1/p' |
  paste - - |
  while IFS=$'\t' read -r alias expires ; do
    expires_at=$(date -d "$expires" +%s)
    if ((expires_at < now)) ; then
      echo -e "$alias" | tee "$file-out.txt"
      echo -e "$file-out.txt"
      fi
  done
 done

</code>```

i have written shell script which will list all the expire certificates
i need to run it every two hour using gitlab or using openshift as am not aware how to do it.

Title: how to store confiq files in gitlab

Body:
In below script there are config files (ppsit ppdev ppdev2 ppuat)how to store confiq files in gitlab and schedule it to run every 2 hour .

#!/bin/bash
#set -eux
files=("ppsit ppdev ppdev2 ppuat")
for file in $files
do
source $file
echo $file

now=$(date +%s)

keytool -list -v -keystore /$path/$env  -storepass $password | sed -nr 's/^Alias name:\s*(.*)$/\1/p;s/Valid from:.*until: *(.*)/\1/p' |
  paste - - |
  while IFS=$'\t' read -r alias expires ; do
    expires_at=$(date -d "$expires" +%s)
    if ((expires_at < now)) ; then
      echo -e "$alias" | tee "$file-out.txt"
      echo -e "$file-out.txt"
      fi
  done
 done

i have written shell script which will list all the expire certificates
i need to run it every two hour using gitlab or using openshift as am not aware how to do it.


问:
Blur effect for WinForm - Issue with solution
I know this question have been answered with several ways but I am making this separate question in order to avoid potential queue of comments under initial question and its answers with which I am facing an "issue"(?).

What I am trying to achieve (in my case) is to apply what is called the Windows Blur Effect to a borderless WinForm.

I found this answer by György Kőszeg to a similar question and I adapted his code to my project like this:

First I made this BlurEffect class:

internal class BlurEffect
{
    internal enum AccentState
    {
        ACCENT_DISABLED = 0,
        ACCENT_ENABLE_GRADIENT = 1,
        ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
        ACCENT_ENABLE_BLURBEHIND = 3,
        ACCENT_INVALID_STATE = 4
    }

    internal enum WindowCompositionAttribute
    {
        WCA_ACCENT_POLICY = 19
    }

    [StructLayout(LayoutKind.Sequential)]
    internal struct AccentPolicy
    {
        public AccentState AccentState;
        public int AccentFlags;
        public int GradientColor;
        public int AnimationId;
    }

    [StructLayout(LayoutKind.Sequential)]
    internal struct WindowCompositionAttributeData
    {
        public WindowCompositionAttribute Attribute;
        public IntPtr Data;
        public int SizeOfData;
    }

    internal static class User32
    {
        [DllImport("user32.dll")]
        internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
    }

    internal static void Apply(Form form, bool enable)
    {
        var accent = new AccentPolicy { AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND };
        if (!enable)
            accent = new AccentPolicy { AccentState = AccentState.ACCENT_DISABLED };
        var accentStructSize = Marshal.SizeOf(accent);
        var accentPtr = Marshal.AllocHGlobal(accentStructSize);

        Marshal.StructureToPtr(accent, accentPtr, false);

        var data = new WindowCompositionAttributeData
        {
            Attribute = WindowCompositionAttribute.WCA_ACCENT_POLICY,
            SizeOfData = accentStructSize,
            Data = accentPtr
        };

        User32.SetWindowCompositionAttribute(form.Handle, ref data);
        Marshal.FreeHGlobal(accentPtr);
    }
}
```
<p>And then, into my test <code>Form</code>, I added a <code>property</code> and a <code>button</code> so to enable or disable the <strong>Blur Effect</strong>:</p>
<pre class="lang-csharp prettyprint-override"><code>public partial class MyForm : Form
{
    private bool blur_effect = false;
    [Category("• MyForm")]
    [DisplayName("• BlurEffect")]
    [Description("Enables or disables the [Blur] effect.")]
    public bool BlurEffect
    {
        get => this.blur_effect;
        set
        {
            this.blur_effect = value;
            BlurEffect.Apply(this, value);
            base.Invalidate();
        }
    }

    public MyForm()
    {
        InitializeComponent();
    }

    private void BlurEffect_Button_Click(object sender, EventArgs e)
    {
        this.BlurEffect = !this.BlurEffect;
    }
}
</code>```

As you can see on the image below, it "worked" but I had this "issue"(?). Along with the form, the Βlur Effect is applied to the controls as well. Is that normal? Is there something I can do so the Blur Effect applies on the form only?

Note: Form's shadow comes from another class!!!

Body:
I know this question have been answered with several ways but I am making this separate question in order to avoid potential queue of comments under initial question and its answers with which I am facing an "issue"(?).

What I am trying to achieve (in my case) is to apply what is called the Windows Blur Effect to a borderless WinForm.

I found this answer by György Kőszeg to a similar question and I adapted his code to my project like this:

First I made this BlurEffect class:

internal class BlurEffect
{
    internal enum AccentState
    {
        ACCENT_DISABLED = 0,
        ACCENT_ENABLE_GRADIENT = 1,
        ACCENT_ENABLE_TRANSPARENTGRADIENT = 2,
        ACCENT_ENABLE_BLURBEHIND = 3,
        ACCENT_INVALID_STATE = 4
    }

    internal enum WindowCompositionAttribute
    {
        WCA_ACCENT_POLICY = 19
    }

    [StructLayout(LayoutKind.Sequential)]
    internal struct AccentPolicy
    {
        public AccentState AccentState;
        public int AccentFlags;
        public int GradientColor;
        public int AnimationId;
    }

    [StructLayout(LayoutKind.Sequential)]
    internal struct WindowCompositionAttributeData
    {
        public WindowCompositionAttribute Attribute;
        public IntPtr Data;
        public int SizeOfData;
    }

    internal static class User32
    {
        [DllImport("user32.dll")]
        internal static extern int SetWindowCompositionAttribute(IntPtr hwnd, ref WindowCompositionAttributeData data);
    }

    internal static void Apply(Form form, bool enable)
    {
        var accent = new AccentPolicy { AccentState = AccentState.ACCENT_ENABLE_BLURBEHIND };
        if (!enable)
            accent = new AccentPolicy { AccentState = AccentState.ACCENT_DISABLED };
        var accentStructSize = Marshal.SizeOf(accent);
        var accentPtr = Marshal.AllocHGlobal(accentStructSize);

        Marshal.StructureToPtr(accent, accentPtr, false);

        var data = new WindowCompositionAttributeData
        {
            Attribute = WindowCompositionAttribute.WCA_ACCENT_POLICY,
            SizeOfData = accentStructSize,
            Data = accentPtr
        };

        User32.SetWindowCompositionAttribute(form.Handle, ref data);
        Marshal.FreeHGlobal(accentPtr);
    }
}

And then, into my test Form, I added a property and a button so to enable or disable the Blur Effect:

public partial class MyForm : Form
{
    private bool blur_effect = false;
    [Category("• MyForm")]
    [DisplayName("• BlurEffect")]
    [Description("Enables or disables the [Blur] effect.")]
    public bool BlurEffect
    {
        get => this.blur_effect;
        set
        {
            this.blur_effect = value;
            BlurEffect.Apply(this, value);
            base.Invalidate();
        }
    }

    public MyForm()
    {
        InitializeComponent();
    }

    private void BlurEffect_Button_Click(object sender, EventArgs e)
    {
        this.BlurEffect = !this.BlurEffect;
    }
}

As you can see on the image below, it "worked" but I had this "issue"(?). Along with the form, the Βlur Effect is applied to the controls as well. Is that normal? Is there something I can do so the Blur Effect applies on the form only?

Note: Form's shadow comes from another class!!!


问:
Downloaded JDCB driver through Intellij Ultimate not applying in the code? Must import dependancy separately
I have Intellij Ultimate thanks to my university, and one takeaway is the easy installation of database drivers through the Database interface. I am, however, trying to access "com.mysql.cj.jdbc.Driver" in my code and it does not find it? So far I have been importing the same JAR file as a dependancy but I thought all this should have been taken care of automatically?</p>
```<code>import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;

public class JDBCTest {

    public static void main(String[] args) throws Exception {

        if (args.length != 2) {
            System.out.println("Usage: java JDBCTest <user> <password>");
            System.exit(0);
        }

        String user = args[0]; // username
        String pwd = args[1]; // password
        System.out.println(user + ", *********");
        String database = "Company"; // the name of the specific database
        String server
                = "jdbc:mysql://localhost:3306/" + database
                + "?UseClientEnc=UTF8";

        Connection con = null;
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            con = DriverManager.getConnection(server, user, pwd);
            System.out.println("Connected!");

            executeQuery(con, "SELECT * FROM T_Employee");
        } finally {
            try {
                if (con != null) {
                    con.close();
                    System.out.println("Connection closed.");
                }
            } catch (SQLException e) {
            }
        }
    }

    public static void executeQuery(Connection con, String query) throws SQLException {

        try (Statement stmt = con.createStatement()) {
            // Execute the SQL statement
            ResultSet rs = stmt.executeQuery(query);

            // Get the attribute names
            ResultSetMetaData metaData = rs.getMetaData();
            int ccount = metaData.getColumnCount();
            for (int c = 1; c <= ccount; c++) {
                System.out.print(metaData.getColumnName(c) + "\t");
            }
            System.out.println();

            // Get the attribute values
            while (rs.next()) {
                // NB! This is an example, -not- the preferred way to retrieve data.
                // You should use methods that return a specific data type, like
                // rs.getInt(), rs.getString() or such.
                // It's also advisable to store each tuple (row) in an object of
                // custom type (e.g. Employee).
                for (int c = 1; c <= ccount; c++) {
                    System.out.print(rs.getObject(c) + "\t");
                }
                System.out.println();
            }

        }
    }
}
</code>```

Body:
I have Intellij Ultimate thanks to my university, and one takeaway is the easy installation of database drivers through the Database interface. I am, however, trying to access "com.mysql.cj.jdbc.Driver" in my code and it does not find it? So far I have been importing the same JAR file as a dependancy but I thought all this should have been taken care of automatically?

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;

public class JDBCTest {

    public static void main(String[] args) throws Exception {

        if (args.length != 2) {
            System.out.println("Usage: java JDBCTest <user> <password>");
            System.exit(0);
        }

        String user = args[0]; // username
        String pwd = args[1]; // password
        System.out.println(user + ", *********");
        String database = "Company"; // the name of the specific database
        String server
                = "jdbc:mysql://localhost:3306/" + database
                + "?UseClientEnc=UTF8";

        Connection con = null;
        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            con = DriverManager.getConnection(server, user, pwd);
            System.out.println("Connected!");

            executeQuery(con, "SELECT * FROM T_Employee");
        } finally {
            try {
                if (con != null) {
                    con.close();
                    System.out.println("Connection closed.");
                }
            } catch (SQLException e) {
            }
        }
    }

    public static void executeQuery(Connection con, String query) throws SQLException {

        try (Statement stmt = con.createStatement()) {
            // Execute the SQL statement
            ResultSet rs = stmt.executeQuery(query);

            // Get the attribute names
            ResultSetMetaData metaData = rs.getMetaData();
            int ccount = metaData.getColumnCount();
            for (int c = 1; c <= ccount; c++) {
                System.out.print(metaData.getColumnName(c) + "\t");
            }
            System.out.println();

            // Get the attribute values
            while (rs.next()) {
                // NB! This is an example, -not- the preferred way to retrieve data.
                // You should use methods that return a specific data type, like
                // rs.getInt(), rs.getString() or such.
                // It's also advisable to store each tuple (row) in an object of
                // custom type (e.g. Employee).
                for (int c = 1; c <= ccount; c++) {
                    System.out.print(rs.getObject(c) + "\t");
                }
                System.out.println();
            }

        }
    }
}


问:
Add double ripple to dot indicator in Fl_chart #flutter
i want to add double ripple like showing in the picture at dot when selected , to make some animation to the FL_chart ? I used fl_chart 0.55.2 [enter image description here]this is the example of animation (https://i.stack.imgur.com/191fd.png)

```<code>    LineChartBarData(
                    spots: dummyData2,
                    isCurved: true,
                    gradient: LinearGradient(
                      colors: [
                        ColorTween(
                                begin: gradientColorsLu[0],
                                end: gradientColorsLu[1])
                            .lerp(0.2)!,
                        ColorTween(
                                begin: gradientColorsLu[0],
                                end: gradientColorsLu[1])
                            .lerp(0.2)!,
                      ],
                    ),
                    barWidth: 5,
                    isStrokeCapRound: true,
                    dotData: FlDotData(
                      show: true,
                    ),
                    belowBarData: BarAreaData(
                      show: true,
                      gradient: LinearGradient(
                        colors: [
                          ColorTween(
                                  begin: gradientColorsLu[0],
                                  end: gradientColorsLu[1])
                              .lerp(0.2)!
                              .withOpacity(0.1),
                          ColorTween(
                                  begin: gradientColorsLu[0],
                                  end: gradientColorsLu[1])
                              .lerp(0.2)!
                              .withOpacity(0.1),
                        ],
                      ),
                    ),
                  ),
</code>```

I want to add animation to dots in chart when clicked

Body:
i want to add double ripple like showing in the picture at dot when selected , to make some animation to the FL_chart ? I used fl_chart 0.55.2 [enter image description here]this is the example of animation (https://i.stack.imgur.com/191fd.png)

    LineChartBarData(
                    spots: dummyData2,
                    isCurved: true,
                    gradient: LinearGradient(
                      colors: [
                        ColorTween(
                                begin: gradientColorsLu[0],
                                end: gradientColorsLu[1])
                            .lerp(0.2)!,
                        ColorTween(
                                begin: gradientColorsLu[0],
                                end: gradientColorsLu[1])
                            .lerp(0.2)!,
                      ],
                    ),
                    barWidth: 5,
                    isStrokeCapRound: true,
                    dotData: FlDotData(
                      show: true,
                    ),
                    belowBarData: BarAreaData(
                      show: true,
                      gradient: LinearGradient(
                        colors: [
                          ColorTween(
                                  begin: gradientColorsLu[0],
                                  end: gradientColorsLu[1])
                              .lerp(0.2)!
                              .withOpacity(0.1),
                          ColorTween(
                                  begin: gradientColorsLu[0],
                                  end: gradientColorsLu[1])
                              .lerp(0.2)!
                              .withOpacity(0.1),
                        ],
                      ),
                    ),
                  ),

I want to add animation to dots in chart when clicked