问:
why GET parameters not forwarded to php from nginx for specific urls?
I'm having a wired problem with NGINX or PHP (Laravel). I don't know what happened to the server. It was working fine and I know I haven't change any configuration on NGINX or PHP.

Problem: When I'm using php $_GET to access params then for some reasons on some urls, this variable is empty and for some there is value which I want.

1st URL : /news/rapido-news?pid=123
In the above url I'm able to get pid successfully in php.

2nd URL : /news/amazon-aws-services?pid=432
In this url I'm not able to get pid from php and if I add more params then still $_GET is empty for this url .

I'm having this issue on multiple urls and some urls working fine.

here is my NGNIX conf file :

```<code>server {

        root          /home/project/public_html/public;

        #if ($bad_referer) {
        #    return 444;
        #}      i
        if ($http_from != "some_specific_page") {
            return 301 https://example.com$request_uri;
        }
        server_name example.com ;

        rewrite ^/((?!blackfridaysale)(?!cybermondaysale)(?!review-competition).*)/$ /$1 permanent;

        keepalive_timeout 3;

        error_log /var/log/nginx/example.error.log;
        access_log /var/log/nginx/example.access.log main buffer=100k flush=5m;
        gzip on;        gzip_types      image/svg+xml  text/plain application/x-javascript text/xml text/css application/javascript;
        gzip_proxied    no-cache no-store private expired auth;
        gzip_min_length 1000;        gzip_vary on;
        open_file_cache max=1000 inactive=20s;
        open_file_cache_valid 30s;        open_file_cache_min_uses 5;
        open_file_cache_errors off;
        proxy_http_version 1.1;
        proxy_set_header Connection "";        index index.php index.html index.htm;

        add_header Access-Control-Allow-Origin  $http_origin;
        add_header "Access-Control-Allow-Credentials" "true";

        location ~ ^/(rs\/(.+)\/(.*?\.(jpg|png|gif|jpeg|bmp|JPG|PNG|GIF|JPEG|BMP)))\/([0-9]+)\/([0-9]+)$ {
                access_log off; log_not_found off;
                try_files "/images/rs/$2/$5x$6/$3" 404;
                expires 300d;                add_header Pragma "public";
                add_header Cache-Control "public";
                proxy_ignore_headers Set-Cookie;
                proxy_hide_header "Set-Cookie";
        }

        location ~* \.(ico|css|js|woff|woff2|gif|jpeg|jpg|png|ttf|otf|svg|eot|webp)$ {
                access_log off; log_not_found off;
                rewrite ^(.+)\.(@@hash|\d+)\.(svg|js|css|png|jpg|gif)$ $1.$3 last;

                proxy_ignore_headers Set-Cookie;
                proxy_hide_header "Set-Cookie";
                expires 300d;
                add_header Pragma "public";
                add_header Cache-Control "public";
        }

        error_page 404 /404.html;

        location / {
                root    /home/project/public_html/public;
                try_files $uri /index.php?$query_string;
        }

        location ~ \.php$ {
                root          /home/project/public_html/public;
                fastcgi_pass   127.0.0.1:9001; # php-fpm;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
                include        fastcgi_params;

                add_header 'Access-Control-Allow-Origin' "$http_origin";
                add_header 'Access-Control-Allow-Credentials' 'true';
                #add_header X-Content-Type-Options nosniff;
                add_header X-Frame-Options "SAMEORIGIN";
                add_header X-XSS-Protection "1; mode=block";
                #add_header X-Robots-Tag none;
                #add_header X-Download-Options noopen;
                #add_header X-Permitted-Cross-Domain-Policies none;
                #fastcgi_buffer_size 128k;
                #fastcgi_buffers 256 16k;
                #fastcgi_busy_buffers_size 256k;
                #fastcgi_temp_file_write_size 256k;
                proxy_connect_timeout 1200s;
                proxy_send_timeout 1200s;
                proxy_read_timeout 1200s;
                fastcgi_send_timeout 1200s;
                fastcgi_read_timeout 1200s;
        }

}
</code>```

Body:
I'm having a wired problem with NGINX or PHP (Laravel). I don't know what happened to the server. It was working fine and I know I haven't change any configuration on NGINX or PHP.

Problem: When I'm using php $_GET to access params then for some reasons on some urls, this variable is empty and for some there is value which I want.

1st URL : /news/rapido-news?pid=123
In the above url I'm able to get pid successfully in php.

2nd URL : /news/amazon-aws-services?pid=432
In this url I'm not able to get pid from php and if I add more params then still $_GET is empty for this url .

I'm having this issue on multiple urls and some urls working fine.

here is my NGNIX conf file :

server {

        root          /home/project/public_html/public;

        #if ($bad_referer) {
        #    return 444;
        #}      i
        if ($http_from != "some_specific_page") {
            return 301 https://example.com$request_uri;
        }
        server_name example.com ;

        rewrite ^/((?!blackfridaysale)(?!cybermondaysale)(?!review-competition).*)/$ /$1 permanent;

        keepalive_timeout 3;

        error_log /var/log/nginx/example.error.log;
        access_log /var/log/nginx/example.access.log main buffer=100k flush=5m;
        gzip on;        gzip_types      image/svg+xml  text/plain application/x-javascript text/xml text/css application/javascript;
        gzip_proxied    no-cache no-store private expired auth;
        gzip_min_length 1000;        gzip_vary on;
        open_file_cache max=1000 inactive=20s;
        open_file_cache_valid 30s;        open_file_cache_min_uses 5;
        open_file_cache_errors off;
        proxy_http_version 1.1;
        proxy_set_header Connection "";        index index.php index.html index.htm;

        add_header Access-Control-Allow-Origin  $http_origin;
        add_header "Access-Control-Allow-Credentials" "true";

        location ~ ^/(rs\/(.+)\/(.*?\.(jpg|png|gif|jpeg|bmp|JPG|PNG|GIF|JPEG|BMP)))\/([0-9]+)\/([0-9]+)$ {
                access_log off; log_not_found off;
                try_files "/images/rs/$2/$5x$6/$3" 404;
                expires 300d;                add_header Pragma "public";
                add_header Cache-Control "public";
                proxy_ignore_headers Set-Cookie;
                proxy_hide_header "Set-Cookie";
        }

        location ~* \.(ico|css|js|woff|woff2|gif|jpeg|jpg|png|ttf|otf|svg|eot|webp)$ {
                access_log off; log_not_found off;
                rewrite ^(.+)\.(@@hash|\d+)\.(svg|js|css|png|jpg|gif)$ $1.$3 last;

                proxy_ignore_headers Set-Cookie;
                proxy_hide_header "Set-Cookie";
                expires 300d;
                add_header Pragma "public";
                add_header Cache-Control "public";
        }

        error_page 404 /404.html;

        location / {
                root    /home/project/public_html/public;
                try_files $uri /index.php?$query_string;
        }

        location ~ \.php$ {
                root          /home/project/public_html/public;
                fastcgi_pass   127.0.0.1:9001; # php-fpm;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME   $document_root$fastcgi_script_name;
                include        fastcgi_params;

                add_header 'Access-Control-Allow-Origin' "$http_origin";
                add_header 'Access-Control-Allow-Credentials' 'true';
                #add_header X-Content-Type-Options nosniff;
                add_header X-Frame-Options "SAMEORIGIN";
                add_header X-XSS-Protection "1; mode=block";
                #add_header X-Robots-Tag none;
                #add_header X-Download-Options noopen;
                #add_header X-Permitted-Cross-Domain-Policies none;
                #fastcgi_buffer_size 128k;
                #fastcgi_buffers 256 16k;
                #fastcgi_busy_buffers_size 256k;
                #fastcgi_temp_file_write_size 256k;
                proxy_connect_timeout 1200s;
                proxy_send_timeout 1200s;
                proxy_read_timeout 1200s;
                fastcgi_send_timeout 1200s;
                fastcgi_read_timeout 1200s;
        }

}


来源: stackexchange

问:
Why next.js source maps are in ES5
I have set productionBrowserSourceMaps: true in next.config.js.

Full next.config.js

```<code>const { withRNV } = require('@rnv/engine-rn-next');
const path = require('path');
const fs = require('fs');
const cp = require('child_process');

const config = {
    compress: false,
    webpack: (cfg, { isServer }) => {
        if (!isServer) cfg.resolve.alias['@sentry/node'] = '@sentry/browser';
        cfg.module.rules.push({
            test: /\.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/,
            use: {
                loader: 'url-loader',
                options: {
                    limit: 100000,
                    name: '[name].[ext]',
                },
            },
        });
        return cfg;
    },
    typescript: {
        ignoreBuildErrors: true,
    },
    publicRuntimeConfig: {
        deployEnv: process.env.DEPLOY_ENV || 'Development',
        customScripts: [],
    },
    images: {
        loader: 'akamai',
        path: '',
    },
    async headers() {
        return [
            {
                source: '/(.*)',
                headers: [
                    {
                        key: 'X-Application-Version',
                        value: getPackageVersion(),
                    },
                    {
                        key: 'access-control-allow-origin',
                        value: '*',
                    },
                ],
            },
        ];
    },
    experimental: {
        outputStandalone: true,
    },
    productionBrowserSourceMaps: true,
};

module.exports = withRNV(config, {
    enableNextCss: false,
    enableOptimizedImages: true,
});
</code>```

But in sources i see this ES5 code:

I don't see original ES6 source code.
How should I set config to see it?

This is my babel.config.js

```<code>const { withRNVBabel } = require('rnv');

const fs = require('fs');
const resolveObj = {
    alias: {},
};
if (process.env.NEXT_ENV === 'prod') {
        resolveObj.root = ['.'];
} else {
        resolveObj.root = ['../..'];
}
const config = {
    retainLines: true,
    ignore: [/@babel[/\\]runtime/],
    presets: ['module:babel-preset-expo'],
    plugins: [
        'styled-jsx/babel',
        [
            'module:react-native-dotenv',
            {
                moduleName: '@env',
                path: '.env',
            },
        ],
    ],
};

let finalConfig;

if (!fs.existsSync(process.env.RNV_ENGINE_PATH)) {
    config.plugins.push([require.resolve('babel-plugin-module-resolver'), resolveObj]);
    finalConfig = config;
} else {
    finalConfig = withRNVBabel(config);
}

module.exports = finalConfig;
</code>```

ContentLicense: CC BY-SA 4.0

Title: Why next.js source maps are in ES5

Body:
I have set productionBrowserSourceMaps: true in next.config.js.

Full next.config.js

const { withRNV } = require('@rnv/engine-rn-next');
const path = require('path');
const fs = require('fs');
const cp = require('child_process');

const config = {
    compress: false,
    webpack: (cfg, { isServer }) => {
        if (!isServer) cfg.resolve.alias['@sentry/node'] = '@sentry/browser';
        cfg.module.rules.push({
            test: /\.(eot|woff|woff2|ttf|svg|png|jpg|gif)$/,
            use: {
                loader: 'url-loader',
                options: {
                    limit: 100000,
                    name: '[name].[ext]',
                },
            },
        });
        return cfg;
    },
    typescript: {
        ignoreBuildErrors: true,
    },
    publicRuntimeConfig: {
        deployEnv: process.env.DEPLOY_ENV || 'Development',
        customScripts: [],
    },
    images: {
        loader: 'akamai',
        path: '',
    },
    async headers() {
        return [
            {
                source: '/(.*)',
                headers: [
                    {
                        key: 'X-Application-Version',
                        value: getPackageVersion(),
                    },
                    {
                        key: 'access-control-allow-origin',
                        value: '*',
                    },
                ],
            },
        ];
    },
    experimental: {
        outputStandalone: true,
    },
    productionBrowserSourceMaps: true,
};

module.exports = withRNV(config, {
    enableNextCss: false,
    enableOptimizedImages: true,
});

But in sources i see this ES5 code:

I don't see original ES6 source code.
How should I set config to see it?

This is my babel.config.js

const { withRNVBabel } = require('rnv');

const fs = require('fs');
const resolveObj = {
    alias: {},
};
if (process.env.NEXT_ENV === 'prod') {
        resolveObj.root = ['.'];
} else {
        resolveObj.root = ['../..'];
}
const config = {
    retainLines: true,
    ignore: [/@babel[/\\]runtime/],
    presets: ['module:babel-preset-expo'],
    plugins: [
        'styled-jsx/babel',
        [
            'module:react-native-dotenv',
            {
                moduleName: '@env',
                path: '.env',
            },
        ],
    ],
};

let finalConfig;

if (!fs.existsSync(process.env.RNV_ENGINE_PATH)) {
    config.plugins.push([require.resolve('babel-plugin-module-resolver'), resolveObj]);
    finalConfig = config;
} else {
    finalConfig = withRNVBabel(config);
}

module.exports = finalConfig;


问:
Printing a data from a list in dart
Am trying to print out data of Role object stored in User list in dart but unfortunately the output prints Instance of
role instead of the data am trying to access by looping through the list.Please help me out.Thank you.

<--this is the Role class-->

```<code>import 'Role.dart'
class User{
  List roles=[];
  List newlist=[];
  user(){
    roles=newlist;
  }

  operator +(Role newrole){
    this.roles.add(newrole);
  }

  checkinginfo(){
    for(int i=0;i<roles.length;i++){
      var newinfo=;
      print(newinfo);
    }
  }
}

<--this is the role class-->

class Role{
  final String name;
  final int _level;

  Role(this.name, this._level);

  bool operator>(Role other){
    return this._level>other._level;
  }

  bool operator<(Role other){
    return this._level<other._level;
  }

  }
}

void main{

  User alice=new User();
  Role name=new Role("Emmanuel",45);
  Role age1=new Role("ruth",5);
  alice+name;
  alice+age1;
  print(alice.roles.length);
  print(alice.roles.length);

  print(alice.checkinginfo());
}
</code>```

Title: Printing a data from a list in dart

Body:
Am trying to print out data of Role object stored in User list in dart but unfortunately the output prints Instance of
role instead of the data am trying to access by looping through the list.Please help me out.Thank you.

<--this is the Role class-->

import 'Role.dart'
class User{
  List roles=[];
  List newlist=[];
  user(){
    roles=newlist;
  }

  operator +(Role newrole){
    this.roles.add(newrole);
  }

  checkinginfo(){
    for(int i=0;i<roles.length;i++){
      var newinfo=;
      print(newinfo);
    }
  }
}

<--this is the role class-->

class Role{
  final String name;
  final int _level;

  Role(this.name, this._level);

  bool operator>(Role other){
    return this._level>other._level;
  }

  bool operator<(Role other){
    return this._level<other._level;
  }

  }
}

void main{

  User alice=new User();
  Role name=new Role("Emmanuel",45);
  Role age1=new Role("ruth",5);
  alice+name;
  alice+age1;
  print(alice.roles.length);
  print(alice.roles.length);

  print(alice.checkinginfo());
}


问:
Projecting a photo as a texture onto a model in SketchUp?
SketchUp has many third party tools and add-ons, so my question is if there is already a tool to do the following task.

Let's say I'm modeling a building project and I have the 3D-model done. Then the actual construction takes place and I have some photos of the project being partially done. So I take one of the photos and match the 3D-model camera view to it exactly. I want then for the photo to be projected onto the visible 3D-scene as a texture. Obviously, so that I could then move the scene/camera to a degree, while preserving some resemblance of how it actually looks in real world.

Is there already a solution to make it possible?


问:
Insert data to Visual studio local DB, using C#
I am making an application, and I added a local database in visual studio. It all works fine while logging into app using crediantials stored in the database. But while adding new records, the query runs with no error but data is not actually stored in data base. Every thing else is working fine, except for the data not being stored.

Here is my code:

```<code>SqlConnection con = new SqlConnection(@" Data Source = (LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security = True");
SqlCommand cmd = new SqlCommand("insert into users(username,password,phone,adress,father_name,email)VALUES('"+username.Text+ "','"+password.Text+ "','"+phone.Text+ "','"+adress.Text+ "','"+fathername.Text+ "','"+email.Text+"')",con);
try
{
   con.Open();
   cmd.ExecuteNonQuery();
   MessageBox.Show(username.Text + " Has been Added");
 }
 catch (Exception ex)
 {
   MessageBox.Show(ex.Message);
 }
 finally
 {
   con.Close();
 }
</code>```

Body:
I am making an application, and I added a local database in visual studio. It all works fine while logging into app using crediantials stored in the database. But while adding new records, the query runs with no error but data is not actually stored in data base. Every thing else is working fine, except for the data not being stored.

Here is my code:

SqlConnection con = new SqlConnection(@" Data Source = (LocalDB)\MSSQLLocalDB;AttachDbFilename=|DataDirectory|\Database1.mdf;Integrated Security = True");
SqlCommand cmd = new SqlCommand("insert into users(username,password,phone,adress,father_name,email)VALUES('"+username.Text+ "','"+password.Text+ "','"+phone.Text+ "','"+adress.Text+ "','"+fathername.Text+ "','"+email.Text+"')",con);
try
{
   con.Open();
   cmd.ExecuteNonQuery();
   MessageBox.Show(username.Text + " Has been Added");
 }
 catch (Exception ex)
 {
   MessageBox.Show(ex.Message);
 }
 finally
 {
   con.Close();
 }


问:
WhatsApp status in java
When I had the Target API 29, the app was showing WhatsApp statuses, but when I increase the target api to 32, it is not showing the statuses.

```<code>public File getWhatsupFolder() {
        if (new File(Environment.getExternalStorageDirectory().toString() + File.separator + "Android/media/com.whatsapp/WhatsApp" + File.separator + "Media" + File.separator + ".Statuses").isDirectory()) {
            return new File(Environment.getExternalStorageDirectory() + File.separator + "Android/media/com.whatsapp/WhatsApp" + File.separator + "Media" + File.separator + ".Statuses");
        } else {
            return new File(Environment.getExternalStorageDirectory() + File.separator + "WhatsApp" + File.separator + "Media" + File.separator + ".Statuses");
        }
    }
</code>```

Here is the code of my getting status that was working fine in target api 29.

If anyone knows what is the issue. Please let me know. Thanks in advance.

Title: WhatsApp status in java

Body:
When I had the Target API 29, the app was showing WhatsApp statuses, but when I increase the target api to 32, it is not showing the statuses.

public File getWhatsupFolder() {
        if (new File(Environment.getExternalStorageDirectory().toString() + File.separator + "Android/media/com.whatsapp/WhatsApp" + File.separator + "Media" + File.separator + ".Statuses").isDirectory()) {
            return new File(Environment.getExternalStorageDirectory() + File.separator + "Android/media/com.whatsapp/WhatsApp" + File.separator + "Media" + File.separator + ".Statuses");
        } else {
            return new File(Environment.getExternalStorageDirectory() + File.separator + "WhatsApp" + File.separator + "Media" + File.separator + ".Statuses");
        }
    }

Here is the code of my getting status that was working fine in target api 29.

If anyone knows what is the issue. Please let me know. Thanks in advance.


问:
How do I use this python function within the params section of my Snakemake rule?
I'm trying to figure out how to extract the read-group lane information from a fastq file, and then use this string within my GATK AddOrReplaceReadGroups Snakemake below (below). I've written a short Python function (at the top of the rule) to do this operation, but can't quite figure out how to actually use it in the script such that I can access the string output (e.g., "ABCHGSX35:2") of the function on a given fastq file in my GATK shell command. Basically, I want to feed {params.PathToReadR1} into the extract_lane_info function, but can't figure out how to integrate them correctly.

Open to any solutions to the problem posed, or if there's an entirely more efficiently and different way to achieve the same result (getting the read-group lane info as a param value), that'd be great, too. Thanks for any help.

```<code>def extract_lane_info(file_path):
    # Run the bash command using subprocess.run()
    elements = subprocess.run(["zcat", file_path], stdout=subprocess.PIPE).stdout.split(b"\n")[0].split(b":")[2:4]
    # Extract the lane information from the output of the command using a regular expression
    read_group = elements[0].decode().strip("'")
    string_after = elements[1].decode().strip("'")
    elements = read_group + ":" + string_after
    return(elements)

rule AddOrReplaceReadGroups:
    input:
         "results/{species}/bwa/merged/{read}_pese.bam",

     output:
        "results/{species}/GATK/AddOrReplace/{read}.pese.bwa_mem.addRG.bam",

    threads: config["trimmmomatic"]["cpu"]

    log:
        "results/{species}/GATK/AddOrReplace/log/{read}_AddOrReplace.stderrs"

    message:
        "Running AddOrReplaceReadGroups on {wildcards.read}"

    conda:
        config["CondaEnvs"]

    params:
        ReadGroupID = lambda wildcards: final_Prefix_ReadGroup[wildcards.read],
        PathToReadR1 = lambda wildcards: final_Prefix_RawReadPathR1[wildcards.read],
        LIBRARY = lambda wildcards: final_Prefix_ReadGroupLibrary[wildcards.read],

    shell:"gatk AddOrReplaceReadGroups -I {input} -O {output} -ID {params.ReadGroupID}.1 -LB {params.LIBRARY} -PL illumina -PU {input.lane_info}:{params.ReadGroupID} -SM {params.ReadGroupID} --SORT_ORDER 'coordinate' --CREATE_INDEX true 2>> {log}"

</code>```

Basically, {params.PathToReadR1} would be "path/to/file.fastq.gz", and I want this file to be inputted into the extract_lane_info function, and then the output of this function to be used in the -PU section of the shell command (e.g., {params.lane_info}. I keep getting all types of errors as I've messed around with it, and am unsure how to move forward.

Body:
I'm trying to figure out how to extract the read-group lane information from a fastq file, and then use this string within my GATK AddOrReplaceReadGroups Snakemake below (below). I've written a short Python function (at the top of the rule) to do this operation, but can't quite figure out how to actually use it in the script such that I can access the string output (e.g., "ABCHGSX35:2") of the function on a given fastq file in my GATK shell command. Basically, I want to feed {params.PathToReadR1} into the extract_lane_info function, but can't figure out how to integrate them correctly.

Open to any solutions to the problem posed, or if there's an entirely more efficiently and different way to achieve the same result (getting the read-group lane info as a param value), that'd be great, too. Thanks for any help.

def extract_lane_info(file_path):
    # Run the bash command using subprocess.run()
    elements = subprocess.run(["zcat", file_path], stdout=subprocess.PIPE).stdout.split(b"\n")[0].split(b":")[2:4]
    # Extract the lane information from the output of the command using a regular expression
    read_group = elements[0].decode().strip("'")
    string_after = elements[1].decode().strip("'")
    elements = read_group + ":" + string_after
    return(elements)

rule AddOrReplaceReadGroups:
    input:
         "results/{species}/bwa/merged/{read}_pese.bam",

     output:
        "results/{species}/GATK/AddOrReplace/{read}.pese.bwa_mem.addRG.bam",

    threads: config["trimmmomatic"]["cpu"]

    log:
        "results/{species}/GATK/AddOrReplace/log/{read}_AddOrReplace.stderrs"

    message:
        "Running AddOrReplaceReadGroups on {wildcards.read}"

    conda:
        config["CondaEnvs"]

    params:
        ReadGroupID = lambda wildcards: final_Prefix_ReadGroup[wildcards.read],
        PathToReadR1 = lambda wildcards: final_Prefix_RawReadPathR1[wildcards.read],
        LIBRARY = lambda wildcards: final_Prefix_ReadGroupLibrary[wildcards.read],

    shell:"gatk AddOrReplaceReadGroups -I {input} -O {output} -ID {params.ReadGroupID}.1 -LB {params.LIBRARY} -PL illumina -PU {input.lane_info}:{params.ReadGroupID} -SM {params.ReadGroupID} --SORT_ORDER 'coordinate' --CREATE_INDEX true 2>> {log}"

Basically, {params.PathToReadR1} would be "path/to/file.fastq.gz", and I want this file to be inputted into the extract_lane_info function, and then the output of this function to be used in the -PU section of the shell command (e.g., {params.lane_info}. I keep getting all types of errors as I've messed around with it, and am unsure how to move forward.


问:
Android MQTT app connection issue + app UI widgets not showing
I have 2 issues,

first: my android widgets/ control are not showing on the screen when the app runs

second: my app does not connect the mosquito broker

```<code> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MQTTMain">

    <TextView
        android:id="@+id/subText"
        android:layout_width="202dp"
        android:layout_height="70dp"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="114dp"
        android:layout_marginTop="204dp"
        android:layout_marginEnd="95dp"
        android:layout_marginBottom="457dp"
        android:text="@string/textview"
        android:visibility="visible"
        tools:visibility="visible" />

    <Button
        android:id="@+id/button"
        android:layout_width="107dp"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="262dp"
        android:layout_marginTop="405dp"
        android:layout_marginEnd="42dp"
        android:layout_marginBottom="278dp"
        android:text="@string/subscribe"
        android:visibility="visible"
        tools:visibility="visible" />

    <Button
        android:id="@+id/button2"
        android:layout_width="110dp"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="60dp"
        android:layout_marginTop="404dp"
        android:layout_marginEnd="241dp"
        android:layout_marginBottom="277dp"
        android:text="@string/publish"
        android:visibility="visible"
        tools:visibility="visible" />

</RelativeLayout>
</code>```

Java file ------------------------------------------------------------------

```<code>package com.example.MQTTMain;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import org.eclipse.paho.android.service.MqttAndroidClient;
import org.eclipse.paho.client.mqttv3.IMqttActionListener;
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.IMqttToken;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;

import java.nio.charset.StandardCharsets;

public class MQTTMain extends AppCompatActivity {

    MqttAndroidClient client;
    TextView subText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_m_q_t_t);

        subText = (TextView)findViewById(R.id.subText);
        String clientId = MqttClient.generateClientId();
     client = new MqttAndroidClient(this.getApplicationContext(), "tcp://192.168.1.7:1883",clientId);
   // client = new MqttAndroidClient(this.getApplicationContext(), "192.168.1.7:1883",clientId);

        try {

            IMqttToken token = client.connect();
            token.setActionCallback(new IMqttActionListener() {
                @Override
                public void onSuccess(IMqttToken asyncActionToken) {
                    Toast.makeText(MQTTMain.this,"CONNECTED!!",Toast.LENGTH_LONG).show();
                    setSubscription();
                }

                @Override
                public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
                    Toast.makeText(MQTTMain.this,"CONNECTION FAILED!!",Toast.LENGTH_LONG).show();
                }
            });

        } catch (MqttException e) {
            e.printStackTrace();
        }

        client.setCallback(new MqttCallback() {
            @Override
            public void connectionLost(Throwable cause) {

            }

            @Override
            public void messageArrived(String topic, MqttMessage message) throws Exception {
                subText.setText(new String(message.getPayload()));
            }

            @Override
            public void deliveryComplete(IMqttDeliveryToken token) {

            }
        });

    }

    public void published(View v){

        String topic = "EVENT";
        String message = "the payload";

        try {
            client.publish(topic, message.getBytes(),0,false);
            Toast.makeText(this,"Published Message",Toast.LENGTH_SHORT).show();
        } catch ( MqttException e) {
            e.printStackTrace();
        }
    }

    private void setSubscription(){

        try{

            client.subscribe("EVENT",0);

        }catch (MqttException e){
            e.printStackTrace();
        }
    }

    public void conn(View v){

        try {
            IMqttToken token = client.connect();
            token.setActionCallback(new IMqttActionListener() {
                @Override
                public void onSuccess(IMqttToken asyncActionToken) {
                    Toast.makeText(MQTTMain.this,"connected!!",Toast.LENGTH_LONG).show();
                    setSubscription();

                }

                @Override
                public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
                    Toast.makeText(MQTTMain.this,"connection failed!!",Toast.LENGTH_LONG).show();
                }
            });
        } catch (MqttException e) {
            e.printStackTrace();
        }

    }

    public void disconn(View v){

        try {
            IMqttToken token = client.disconnect();
            token.setActionCallback(new IMqttActionListener() {
                @Override
                public void onSuccess(IMqttToken asyncActionToken) {
                    Toast.makeText(MQTTMain.this,"DISCONNECTED!!",Toast.LENGTH_LONG).show();

                }

                @Override
                public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
                    Toast.makeText(MQTTMain.this,"Could not diconnect!!",Toast.LENGTH_LONG).show();
                }
            });
        } catch (MqttException e) {
            e.printStackTrace();
        }
    }

    }
</code>```

My IDEA IS TO build a simple MQTT app that can publish and subscribe to a topic, but the actual broker location has to be hardcoded.

LOGS -----------------------------

```<code>2022-12-28 00:11:42.393 23963-23963/? I/xample.MQTTMai: Late-enabling -Xcheck:jni
2022-12-28 00:11:42.477 23963-23963/? I/xample.MQTTMai: Unquickening 22 vdex files!
2022-12-28 00:11:42.507 23963-23963/? D/ActivityThread: setConscryptValidator
2022-12-28 00:11:42.507 23963-23963/? D/ActivityThread: setConscryptValidator - put
2022-12-28 00:11:42.572 23963-23963/com.example.MQTTMain D/ActivityThread: handleBindApplication()++ app=com.example.MQTTMain
2022-12-28 00:11:42.606 23963-23963/com.example.MQTTMain D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
2022-12-28 00:11:42.759 23963-23963/com.example.MQTTMain D/LoadedApk: LoadedApk::makeApplication() appContext=android.app.ContextImpl@21846dd appContext.mOpPackageName=com.example.MQTTMain appContext.mBasePackageName=com.example.MQTTMain appContext.mPackageInfo=android.app.LoadedApk@5dbb252
2022-12-28 00:11:42.759 23963-23963/com.example.MQTTMain D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2022-12-28 00:11:42.818 23963-23963/com.example.MQTTMain D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2022-12-28 00:11:42.820 23963-23963/com.example.MQTTMain D/ActivityThread: handleBindApplication() -- skipGraphicsSupport=false
2022-12-28 00:11:42.827 23963-23963/com.example.MQTTMain I/ActivityThread: handleStopService: token=android.os.BinderProxy@c4c1923 not found.
</code>```

Body:
I have 2 issues,

first: my android widgets/ control are not showing on the screen when the app runs

second: my app does not connect the mosquito broker

 <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MQTTMain">

    <TextView
        android:id="@+id/subText"
        android:layout_width="202dp"
        android:layout_height="70dp"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="114dp"
        android:layout_marginTop="204dp"
        android:layout_marginEnd="95dp"
        android:layout_marginBottom="457dp"
        android:text="@string/textview"
        android:visibility="visible"
        tools:visibility="visible" />

    <Button
        android:id="@+id/button"
        android:layout_width="107dp"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="262dp"
        android:layout_marginTop="405dp"
        android:layout_marginEnd="42dp"
        android:layout_marginBottom="278dp"
        android:text="@string/subscribe"
        android:visibility="visible"
        tools:visibility="visible" />

    <Button
        android:id="@+id/button2"
        android:layout_width="110dp"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_alignParentTop="true"
        android:layout_alignParentEnd="true"
        android:layout_alignParentBottom="true"
        android:layout_marginStart="60dp"
        android:layout_marginTop="404dp"
        android:layout_marginEnd="241dp"
        android:layout_marginBottom="277dp"
        android:text="@string/publish"
        android:visibility="visible"
        tools:visibility="visible" />

</RelativeLayout>

Java file ------------------------------------------------------------------

package com.example.MQTTMain;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
import android.widget.Toast;

import org.eclipse.paho.android.service.MqttAndroidClient;
import org.eclipse.paho.client.mqttv3.IMqttActionListener;
import org.eclipse.paho.client.mqttv3.IMqttDeliveryToken;
import org.eclipse.paho.client.mqttv3.IMqttToken;
import org.eclipse.paho.client.mqttv3.MqttCallback;
import org.eclipse.paho.client.mqttv3.MqttClient;
import org.eclipse.paho.client.mqttv3.MqttException;
import org.eclipse.paho.client.mqttv3.MqttMessage;

import java.nio.charset.StandardCharsets;

public class MQTTMain extends AppCompatActivity {

    MqttAndroidClient client;
    TextView subText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_m_q_t_t);

        subText = (TextView)findViewById(R.id.subText);
        String clientId = MqttClient.generateClientId();
     client = new MqttAndroidClient(this.getApplicationContext(), "tcp://192.168.1.7:1883",clientId);
   // client = new MqttAndroidClient(this.getApplicationContext(), "192.168.1.7:1883",clientId);

        try {

            IMqttToken token = client.connect();
            token.setActionCallback(new IMqttActionListener() {
                @Override
                public void onSuccess(IMqttToken asyncActionToken) {
                    Toast.makeText(MQTTMain.this,"CONNECTED!!",Toast.LENGTH_LONG).show();
                    setSubscription();
                }

                @Override
                public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
                    Toast.makeText(MQTTMain.this,"CONNECTION FAILED!!",Toast.LENGTH_LONG).show();
                }
            });

        } catch (MqttException e) {
            e.printStackTrace();
        }

        client.setCallback(new MqttCallback() {
            @Override
            public void connectionLost(Throwable cause) {

            }

            @Override
            public void messageArrived(String topic, MqttMessage message) throws Exception {
                subText.setText(new String(message.getPayload()));
            }

            @Override
            public void deliveryComplete(IMqttDeliveryToken token) {

            }
        });

    }

    public void published(View v){

        String topic = "EVENT";
        String message = "the payload";

        try {
            client.publish(topic, message.getBytes(),0,false);
            Toast.makeText(this,"Published Message",Toast.LENGTH_SHORT).show();
        } catch ( MqttException e) {
            e.printStackTrace();
        }
    }

    private void setSubscription(){

        try{

            client.subscribe("EVENT",0);

        }catch (MqttException e){
            e.printStackTrace();
        }
    }

    public void conn(View v){

        try {
            IMqttToken token = client.connect();
            token.setActionCallback(new IMqttActionListener() {
                @Override
                public void onSuccess(IMqttToken asyncActionToken) {
                    Toast.makeText(MQTTMain.this,"connected!!",Toast.LENGTH_LONG).show();
                    setSubscription();

                }

                @Override
                public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
                    Toast.makeText(MQTTMain.this,"connection failed!!",Toast.LENGTH_LONG).show();
                }
            });
        } catch (MqttException e) {
            e.printStackTrace();
        }

    }

    public void disconn(View v){

        try {
            IMqttToken token = client.disconnect();
            token.setActionCallback(new IMqttActionListener() {
                @Override
                public void onSuccess(IMqttToken asyncActionToken) {
                    Toast.makeText(MQTTMain.this,"DISCONNECTED!!",Toast.LENGTH_LONG).show();

                }

                @Override
                public void onFailure(IMqttToken asyncActionToken, Throwable exception) {
                    Toast.makeText(MQTTMain.this,"Could not diconnect!!",Toast.LENGTH_LONG).show();
                }
            });
        } catch (MqttException e) {
            e.printStackTrace();
        }
    }

    }

My IDEA IS TO build a simple MQTT app that can publish and subscribe to a topic, but the actual broker location has to be hardcoded.

LOGS -----------------------------

2022-12-28 00:11:42.393 23963-23963/? I/xample.MQTTMai: Late-enabling -Xcheck:jni
2022-12-28 00:11:42.477 23963-23963/? I/xample.MQTTMai: Unquickening 22 vdex files!
2022-12-28 00:11:42.507 23963-23963/? D/ActivityThread: setConscryptValidator
2022-12-28 00:11:42.507 23963-23963/? D/ActivityThread: setConscryptValidator - put
2022-12-28 00:11:42.572 23963-23963/com.example.MQTTMain D/ActivityThread: handleBindApplication()++ app=com.example.MQTTMain
2022-12-28 00:11:42.606 23963-23963/com.example.MQTTMain D/ApplicationLoaders: Returning zygote-cached class loader: /system/framework/android.test.base.jar
2022-12-28 00:11:42.759 23963-23963/com.example.MQTTMain D/LoadedApk: LoadedApk::makeApplication() appContext=android.app.ContextImpl@21846dd appContext.mOpPackageName=com.example.MQTTMain appContext.mBasePackageName=com.example.MQTTMain appContext.mPackageInfo=android.app.LoadedApk@5dbb252
2022-12-28 00:11:42.759 23963-23963/com.example.MQTTMain D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2022-12-28 00:11:42.818 23963-23963/com.example.MQTTMain D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2022-12-28 00:11:42.820 23963-23963/com.example.MQTTMain D/ActivityThread: handleBindApplication() -- skipGraphicsSupport=false
2022-12-28 00:11:42.827 23963-23963/com.example.MQTTMain I/ActivityThread: handleStopService: token=android.os.BinderProxy@c4c1923 not found.


问:
Access different module versions
Imagine I use a pretty standard module, like numpy, and that I have a custom version locally.

Currently, I would store my custom numpy in a folder, say

```<code>.../MyPackages/
</code>```

which I added to sys.path in second position (after ''). This way, any package that I use and which calls numpy, will use my numpy by default. When I don't want to use my numpy as default, I rename .../MyPackages/numpy to .../MyPackages/_numpy. This way, I can still call it manually with

```<code>import _numpy
</code>```

if I want to, but it's not the default behaviour anymore.

This way of storing custom packages works pretty well for me so far, but doesn't allow me to call the usual numpy (not my custom version) without renaming the folder first, which is a bit heavy...

Is there a cleaner/better way to organize my packages to add this flexibility?

Thanks in advance.

_ I described above what I tried._

Title: Access different module versions

Body:
Imagine I use a pretty standard module, like numpy, and that I have a custom version locally.

Currently, I would store my custom numpy in a folder, say

.../MyPackages/

which I added to sys.path in second position (after ''). This way, any package that I use and which calls numpy, will use my numpy by default. When I don't want to use my numpy as default, I rename .../MyPackages/numpy to .../MyPackages/_numpy. This way, I can still call it manually with

import _numpy

if I want to, but it's not the default behaviour anymore.

This way of storing custom packages works pretty well for me so far, but doesn't allow me to call the usual numpy (not my custom version) without renaming the folder first, which is a bit heavy...

Is there a cleaner/better way to organize my packages to add this flexibility?

Thanks in advance.

_ I described above what I tried._


问:
Convering variable Google Fonts to static fonts due to variable font text-stroke issues
There are some documented issues with Google Fonts where specifically many variable fonts don't play with with -webkit-text-stroke.

The font that is discussed primarily on github et al. is Montserrat and while someone did provide some static Montserrat files as a quick fix, I am finding there are many more fonts with this issue beyond just that one.

The text renders with little cross lines all over the words (see picture).

While I understand there are other ways to attempt to create text-strokes, they won't work for me, so not looking to re-invent the wheel as far as the CSS part goes.

The solution seems to be to just self-host the static versions of the fonts.

However, I have tried to find where to download the static versions of the fonts, but they don't seem to be available via Google Fonts.

I have read others post about merging contours of the variable font which I guess means making it static again?  Is there a tool out there where you can just convert the variable font to static or perform this "countour merge?"

Or is there a way to download the static versions from Google and I just don't know it?  (note I don't mean a static URL, I mean the static version of the font.)


问:
Using nest-csv-parser to parse CSV into objects
I have a structure of classes in Typescript that are nested.

export class Vehicle {
  id: string;
  brand: string;
  owner: Owner;
}
export class Owner {
  id: string;
  name: string;
}
```
<p>I then have a CSV file from which I intend to load this structure.</p>
```id;brand;owner.id;owner.name
1;mazda;100;James
...
```
<p>I'm having an issue with these nested values, since the <code>id</code> and <code>brand</code> are loaded correctly but the owner is not recognized by <code>nest-csv-parser</code>.</p>
<p>The parsing:</p>
<pre class="lang-js prettyprint-override"><code>const stream = fs.createReadStream('/path/to/file.csv');
const entities = await this.csvParser.parse(stream, Vehicle, undefined, undefined, { separator: ';'});
</code>```

Please note that nest provides a CsvParser module that is actually being imported.

Is there a way to successfully import this nested structure?

Thanks in advance.

Body:
I have a structure of classes in Typescript that are nested.

export class Vehicle {
  id: string;
  brand: string;
  owner: Owner;
}
export class Owner {
  id: string;
  name: string;
}

I then have a CSV file from which I intend to load this structure.

id;brand;owner.id;owner.name
1;mazda;100;James
...

I'm having an issue with these nested values, since the id and brand are loaded correctly but the owner is not recognized by nest-csv-parser.

The parsing:

const stream = fs.createReadStream('/path/to/file.csv');
const entities = await this.csvParser.parse(stream, Vehicle, undefined, undefined, { separator: ';'});

Please note that nest provides a CsvParser module that is actually being imported.

Is there a way to successfully import this nested structure?

Thanks in advance.


问:
I'm tryng to get 15 minutes data from an investing chart using Python
Using Network in Chrome I can see the data in "history?symbol" . I'm trying to use requests to retrieve the data from the server but i get a "wrong" answer.

Here you can see the data.

I tried to include all Request headers:

```<code>import requests as r

headers = {

headers = {

'authority': 'tvc6.investing.com',
'method': 'GET',
'path': '/2d19c201b143891a2a93d0dac067cd2f/1671821408/9/9/16/history?symbol=8826&resolution=15&from=1670525414&to=1671821474',
'scheme': 'https',
'accept': '*/*',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
'content-type': 'text/plain',
'origin': 'https://tvc-invdn-com.investing.com',
'referer': 'https://tvc-invdn-com.investing.com/',
'sec-ch-ua': '"Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-site',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
}

url = 'ttps://tvc6.investing.com/9768149495242e3a981657248a331375/1671817931/9/9/16/history?symbol=169&resolution=D&from=1640713937&to=1671817997'

res = r.get(url, headers=headers)
print(res.text)
</code>```

At this point i expected to get the quotes instead this is output of res.text :

```<code><!DOCTYPE html>
<html lang="en-US">
<head>
    <title>Just a moment...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">

</head>
<body class="no-js">
    <div class="main-wrapper" role="main">
    <div class="main-content">
        <h1 class="zone-name-title h1">
            <img class="heading-favicon" src="/favicon.ico"
                 onerror="this.onerror=null;this.parentNode.removeChild(this)">
            tvc6.investing.com
        </h1>
        <h2 class="h2" id="challenge-running">
            Checking if the site connection is secure
        </h2>
        <noscript>
            <div id="challenge-error-title">
                <div class="h2">
                    <span class="icon-wrapper">
                        <div class="heading-icon warning-icon"></div>
                    </span>
                    <span id="challenge-error-text">
                        Enable JavaScript and cookies to continue
                    </span>
                </div>
            </div>
        </noscript>
        <div id="trk_jschal_js" style="display:none;background-image:url('/cdn-cgi/images/trace/managed/nojs/transparent.gif?ray=77e333dbcb67baa9')"></div>
        <div id="challenge-body-text" class="core-msg spacer">
            tvc6.investing.com needs to review the security of your connection before proceeding.
        </div>
        <form id="challenge-form" action="/f40164d944674ed76becf8db0e9c14b0/1671820539/9/9/16/history?symbol=169&resolution=D&from=1640716550&to=1671820611&__cf_chl_f_tk=PAKC13kdHaKQTG3W4_hgr.5.RMPMRkeKVU2SUyk09ro-1671820584-0-gaNycGzNB-U" method="POST" enctype="application/x-www-form-urlencoded">
            <input type="hidden" name="md" value="J.f3.wMZ.BNTJYPadA1vYlaXEyX0q0O.2lARxYp8Hpo-1671820584-0-ATK8iV0CZVOWRlqDK62tq_XSUSX20BbMR2OvQfb2HEl3tlNNeozMBAaRzucZ-JQASJwYKAFRvecMyxBbNUH44941PhGo6CVJrssNYwnHJwBx5XHKTXwGGPMUXbR8T0MEBi2hzsic-320H9ZlYQlGI349dbpFIhxGFDR0-C9IF_2rqCHiBt6NoWfs-vef2peqxQwgWBsWBiGWgxOUV3a1Fs3hHxBvKlOmIuMuDiqqdTyhp6-vZMfsyeFzvPP2zHeq8xcV2-avF3_9ZYDiNSOzE8LeLVf5S7JIPuQzFFSJ8F_wigow__c3AtLiEK-YIhOep_GROBBGqFg6eeQR_6IDuv-pvNiVyixPwL6M4pK-_CCt1Yz9EZT2yPDEK-xGIFKb57OU53cYKVRIFoGM05V1Vi7CyuJ2R7-l6xGd9PWqjTmElNpYr6LWixAvbXw4iXxBG7M5MT3UPNJSmvjcl8pLarK7nRueANA7_JLAypHzGDJbIeZZjDGR-_wD7OxiMq7_HjDbrXNxico6Hm-Y0ufOhFOBs0pTXQh50qwWZuZQR2wI24zNAD-C9MbSByhImb64BKbJUjEkQ42WUd1nAvfWFHCI7_CQNefj_4ODtiQuv6MUIu4Soh3q-ziA5p3MGPQ9oja-G6lcOTbDWRdDXN2SiO9iC_lHStuIGmPpnndCtYNdXHHoROsj08J8SDrumhgQakSvqz5TOuEhM_cPD3fgfcdfUfsXMxONrcr5tr_pW5GIZxT-yNMwZPCCOuk3tHp9gpoHswT21VAvJmW3-tUUKhqv1tAJ2YjyOq5GSk-B2Od1IUHAYEjLo7VLx9nj1e3KSrLqbk-rk_88tnmXwqlO9ll0gCeD0Yd6Ay9pDO--BLxuqlm8oKCUKcdTJGDW2Upk5GXzql4Z7KAsrvbb5WxYpD_WUN8vQoiVv-NWX8n4ayzhRqIJI8dJMhO8VRYyVCU4BQ">
            <input type="hidden" name="r" value="HJnrCKhJ_gjr.LD3n579C0trZHejKyPIuY_UoC.XofQ-1671820584-0-AYI17YqGYokU6nqTrBmDFwZkLXezZSSSBfgBxXK9VQM9hV7hnBTb508OVh4ZAHgcZYuzdTDEOY25FGJqVUWRd3TFvXYukZtcbZyu3M8Qc5mDgFekFqDTKF3H3tRU8S34wHnO4pO/IBBKL4lLVck1onxUV8sMagm558aPpNv8IhRwBLpJ0hzPMNSBmJYF7j/YVJHMHk3tN8+Zlrfav/vauY1my4+kuiykiMhakn43EdwUE48chc60yyslmeR06MGHVkfvj8zqUCfNU8bu+rjhCF6efGEmfPKYxTq64Bw26VCnX5I0J59H2Y1S7wU2IJiTele953W+VMpA5Qn7keDJfS4hKIN+dv9bzFuIhrwwBsDuZIKL2IYeb1K6cCume1BA3eliI1DZGPlk8lOCXMqSiX93dZtGPuJ/IEv/x7X7aTuWBrIzVn8Mtc4yuz5UV0C32Pd28/PswG3YYL/DyGkbZFU9dr4b6PxOvTzSTh/1+ROc/UiQb1bVakYLRerBKp6CWrL8ocTwYcpcwuoJgo5AJEHE3nPLl6l/ZbxWox1GnV4c2tbOIptmwoW1bTCHmdJpN2a71AdmcoKlpNCpNaiwUF6uyGN1aY/LELoN4CNTKmZDmYgYV9FpSnmTl/yZVA5I/ESazqZHB06zC70TbvmuNsvk5fyp6/12ZcebXu6kp03Blhe9eOCDrCgmuG3CPCX/gDHWBz/M7AktUNArSKaRmOj6zC8ZEV/jmpoU3Wtu5isGA6OWa2R5F/c4HdcFZwpErodR+mYow8LW3bY63+LWGd1k1/onW1rphxdzPOeDFxDvmiQmD3rhgLjvBNs5hF1btS8WeKw9JbNc2rZFLVhcEIep1/HSPXPVx4vuqIQlorlxMBeDPK5TKeAJKSs758mEuWm92pPA1VNyMsygR+PJvpk445dqI/VioJEmWIrzBc0xjAhQBRDjqFs6/Op3mjwUipxYzGtpkBgI25K/u7JwASR/vEk0QRUj4xVIwK7Ermdx1AdbiWUksuJPVy5GV6cLwZeNhp3D+DjAd9KB4x1Vh9kJNSxRMd42+4XnKQrQrI6VQTIVRebhgnvhpmFxb3CbdR46JQ0/FT+3EWBJgxpIAOcFSxRytdAa0uwOsU0gUDpJs4z7J1VQ765AH5JT3O/tpbCsPA0HarH+yvQVR3qMzVrFjGlOncCtjO5/tsyGxyceRW8nYQq4jtJIVrz63W3U0B5FqTnHhyBsVgxRlvehUPEUMBUPYtXkJolk0YjbEcmoPcj4fGmN/ohz/GZ/LReM3G4R3LaA4Jc+E0XZLV48Qf3osFUJBSO9v45hA1zgne9VgkEvDRb1YJpiZJQhmCUcQJIf+8vjE8ApXcV88hDMyZt6yVTyu1HdnnYhk3HRfTSzCfRgXQHCLAP9Nn+KfwJdXb79ZxX4LrM8wRwTxVKBepBnAAnLWS88IqHsVNJ0xjthd9H3xB/XWfYYje6bighx6NTUY0C5rp8oZKnNtdFn1s4Vq7rca0bNsLXmQO7cHez/ypkJA4YkZIXm7EnxWOV0WjYxAVX4APCUQwIeViHOaIljQJpIk08EOOyaDoVuyw/76BySw0Z2Q8OAOq9nMnxEiE76NsrZphAspqDPEI0H70tqqwJ6xGI7EB0nlC+UbmAamar0izGoKxgwu+MFbgxvQYfAqW84rZy3wYKE4vyAVVjh9xdLB5KczdMWddd2bjxudO5QNb9qi51SVrT4AdFfeN9/z3HbfNy4pGXZP2Jt+5Gjg2uCAggOLxA4ru2QORWu9c7OSic318QwH5UWSNY5wuoi7YlkmSiPVNrmpnbv8hgz7AdiPPOXsgDQY8NIY2/oiqAK5CW931fHj7Of112qCFLK/gsgPwmlaeIH3gpwf37ikEi8b00k/TIiN6SAwOWGDXuzuiBHMFlowsTMcegAQ8rD0aYRr47nLif9pBbBH3pc4or33IjC+aPxaPgM3FMc">
        </form>
    </div>
</div>
<script>
    (function(){
        window._cf_chl_opt={
            cvId: '2',
            cType: 'managed',
            cNounce: '90776',
            cRay: '77e333dbcb67baa9',
            cHash: 'f11ad78e5776344',
            cUPMDTk: "\/f40164d944674ed76becf8db0e9c14b0\/1671820539\/9\/9\/16\/history?symbol=169&resolution=D&from=1640716550&to=1671820611&__cf_chl_tk=PAKC13kdHaKQTG3W4_hgr.5.RMPMRkeKVU2SUyk09ro-1671820584-0-gaNycGzNB-U",
            cFPWv: 'g',
            cTTimeMs: '1000',
            cTplV: 4,
            cTplB: 'cf',
            cRq: {
                ru: 'aHR0cHM6Ly90dmM2LmludmVzdGluZy5jb20vZjQwMTY0ZDk0NDY3NGVkNzZiZWNmOGRiMGU5YzE0YjAvMTY3MTgyMDUzOS85LzkvMTYvaGlzdG9yeT9zeW1ib2w9MTY5JnJlc29sdXRpb249RCZmcm9tPTE2NDA3MTY1NTAmdG89MTY3MTgyMDYxMQ==',
                ra: 'TW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzEwOC4wLjAuMCBTYWZhcmkvNTM3LjM2',
                rm: 'UE9TVA==',
                d: 'n++4axZmX2mAd12fizErjtqepvQQqXoEdNgJPQYOSjN1WYLAUDFsw+8ZKzn2nncw45za+gOyWKQ3ZKQ5YraewzjWz52Jfp3BXzd2Oz2MZrPc7glQx1VUssVzfquKH9mm8RT7q0x6RCSsZT9dmoLO0et7DrHH1lpyn8UfZBL07vUizU9EiX1N5cxSKYHRaFdbjFn1mExG6HBlFfgfgHl3YHJEx25gZwunT462VFk4hK5FSqjLzyIBRTnA596P0I7WECyExhv1Hy2D6ujgLrA5qRyzqybypqoUQwgcUaU4jGDjneCwlmt2MDucL6NJ46TOmb0+umu05rwIPXcv/ECZ722AZeQTWURCGzW08ZvLqrWcbYBEIfQfTtSL6DQudtCIJCVfhskyyh7buAK3DRy1DT7HsAYIV3O0JNlCT3Pa9xeb1RXTgpxjKw146ET7KG9Yd7JawIVa5XnNea2J7kJTRR8x748BJqgFvC3bGCJGD6BsPaJTEx9Fv+QJQrT/pYKIp8fLs11R3s6zGy/vVxHW089HH0ZKKjBO7U8+mBtAZyfStTddTcuKdIFgtOqo2C+do/u92QcqLkD2HzpDR2BmS2u8HO60sUjrGsasXCj9H9V1/wStZT6npTNjQ8VFntXK9MqlVIO5hyyDQqMnGDg+UsHTs5EbA8bxbm+W/5pEf6qM/tPOe+OB3kIrNxyrsXt2',
                t: 'MTY3MTgyMDU4NC4yOTUwMDA=',
                m: 'L1y5xK1/Sq7cd5oLYYhW4KwqKSOAa3n71efNpVtp3+g=',
                i1: 'q+IjrBusVkHd4eEfQRD10A==',
                i2: '953cHnmvQ+drrrrvPtwV4A==',
                zh: 'JJQg2KI/+bPgJbLHlLjmrs/mnno8aAGH5k3tm8QDk4c=',
                uh: 'JkAkY486s8b7quQvdaIQRGNNNpmu+ejtUZNcz6o7wFM=',
                hh: 'BOEQT4xQDG4tL5g1V86g4le5vNzUl5zMva+mAqYjhqI=',
            }
        };
        var trkjs = document.createElement('img');
        trkjs.setAttribute('src', '/cdn-cgi/images/trace/managed/js/transparent.gif?ray=77e333dbcb67baa9');
        trkjs.setAttribute('style', 'display: none');
        document.body.appendChild(trkjs);
        var cpo = document.createElement('script');
        cpo.src = '/cdn-cgi/challenge-platform/h/g/orchestrate/managed/v1?ray=77e333dbcb67baa9';
        window._cf_chl_opt.cOgUHash = location.hash === '' && location.href.indexOf('#') !== -1 ? '#' : location.hash;
        window._cf_chl_opt.cOgUQuery = location.search === '' && location.href.slice(0, -window._cf_chl_opt.cOgUHash.length).indexOf('?') !== -1 ? '?' : location.search;
        if (window.history && window.history.replaceState) {
            var ogU = location.pathname + window._cf_chl_opt.cOgUQuery + window._cf_chl_opt.cOgUHash;
            history.replaceState(null, null, "\/f40164d944674ed76becf8db0e9c14b0\/1671820539\/9\/9\/16\/history?symbol=169&resolution=D&from=1640716550&to=1671820611&__cf_chl_rt_tk=PAKC13kdHaKQTG3W4_hgr.5.RMPMRkeKVU2SUyk09ro-1671820584-0-gaNycGzNB-U" + window._cf_chl_opt.cOgUHash);
            cpo.onload = function() {
                history.replaceState(null, null, ogU);
            };
        }
        document.getElementsByTagName('head')[0].appendChild(cpo);
    }());
</script>

    <div class="footer" role="contentinfo">
        <div class="footer-inner">
            <div class="clearfix diagnostic-wrapper">
                <div class="ray-id">Ray ID: <code>77e333dbcb67baa9</code></div>
            </div>
            <div class="text-center">Performance & security by <a rel="noopener noreferrer" href="https://www.cloudflare.com?utm_source=challenge&utm_campaign=m" target="_blank">Cloudflare</a></div>
        </div>
    </div>
</body>
</html>
</code>```

Body:
Using Network in Chrome I can see the data in "history?symbol" . I'm trying to use requests to retrieve the data from the server but i get a "wrong" answer.

Here you can see the data.

I tried to include all Request headers:

import requests as r

headers = {

headers = {

'authority': 'tvc6.investing.com',
'method': 'GET',
'path': '/2d19c201b143891a2a93d0dac067cd2f/1671821408/9/9/16/history?symbol=8826&resolution=15&from=1670525414&to=1671821474',
'scheme': 'https',
'accept': '*/*',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7',
'content-type': 'text/plain',
'origin': 'https://tvc-invdn-com.investing.com',
'referer': 'https://tvc-invdn-com.investing.com/',
'sec-ch-ua': '"Not?A_Brand";v="8", "Chromium";v="108", "Google Chrome";v="108"',
'sec-ch-ua-mobile': '?0',
'sec-ch-ua-platform': '"Windows"',
'sec-fetch-dest': 'empty',
'sec-fetch-mode': 'cors',
'sec-fetch-site': 'same-site',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36'
}

url = 'ttps://tvc6.investing.com/9768149495242e3a981657248a331375/1671817931/9/9/16/history?symbol=169&resolution=D&from=1640713937&to=1671817997'

res = r.get(url, headers=headers)
print(res.text)

At this point i expected to get the quotes instead this is output of res.text :

<!DOCTYPE html>

    <title>Just a moment...</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <meta name="robots" content="noindex,nofollow">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <link href="/cdn-cgi/styles/challenges.css" rel="stylesheet">

            tvc6.investing.com

            Checking if the site connection is secure

                        Enable JavaScript and cookies to continue

            tvc6.investing.com needs to review the security of your connection before proceeding.

        <form id="challenge-form" action="/f40164d944674ed76becf8db0e9c14b0/1671820539/9/9/16/history?symbol=169&resolution=D&from=1640716550&to=1671820611&__cf_chl_f_tk=PAKC13kdHaKQTG3W4_hgr.5.RMPMRkeKVU2SUyk09ro-1671820584-0-gaNycGzNB-U" method="POST" enctype="application/x-www-form-urlencoded">
            <input type="hidden" name="md" value="J.f3.wMZ.BNTJYPadA1vYlaXEyX0q0O.2lARxYp8Hpo-1671820584-0-ATK8iV0CZVOWRlqDK62tq_XSUSX20BbMR2OvQfb2HEl3tlNNeozMBAaRzucZ-JQASJwYKAFRvecMyxBbNUH44941PhGo6CVJrssNYwnHJwBx5XHKTXwGGPMUXbR8T0MEBi2hzsic-320H9ZlYQlGI349dbpFIhxGFDR0-C9IF_2rqCHiBt6NoWfs-vef2peqxQwgWBsWBiGWgxOUV3a1Fs3hHxBvKlOmIuMuDiqqdTyhp6-vZMfsyeFzvPP2zHeq8xcV2-avF3_9ZYDiNSOzE8LeLVf5S7JIPuQzFFSJ8F_wigow__c3AtLiEK-YIhOep_GROBBGqFg6eeQR_6IDuv-pvNiVyixPwL6M4pK-_CCt1Yz9EZT2yPDEK-xGIFKb57OU53cYKVRIFoGM05V1Vi7CyuJ2R7-l6xGd9PWqjTmElNpYr6LWixAvbXw4iXxBG7M5MT3UPNJSmvjcl8pLarK7nRueANA7_JLAypHzGDJbIeZZjDGR-_wD7OxiMq7_HjDbrXNxico6Hm-Y0ufOhFOBs0pTXQh50qwWZuZQR2wI24zNAD-C9MbSByhImb64BKbJUjEkQ42WUd1nAvfWFHCI7_CQNefj_4ODtiQuv6MUIu4Soh3q-ziA5p3MGPQ9oja-G6lcOTbDWRdDXN2SiO9iC_lHStuIGmPpnndCtYNdXHHoROsj08J8SDrumhgQakSvqz5TOuEhM_cPD3fgfcdfUfsXMxONrcr5tr_pW5GIZxT-yNMwZPCCOuk3tHp9gpoHswT21VAvJmW3-tUUKhqv1tAJ2YjyOq5GSk-B2Od1IUHAYEjLo7VLx9nj1e3KSrLqbk-rk_88tnmXwqlO9ll0gCeD0Yd6Ay9pDO--BLxuqlm8oKCUKcdTJGDW2Upk5GXzql4Z7KAsrvbb5WxYpD_WUN8vQoiVv-NWX8n4ayzhRqIJI8dJMhO8VRYyVCU4BQ">
            <input type="hidden" name="r" value="HJnrCKhJ_gjr.LD3n579C0trZHejKyPIuY_UoC.XofQ-1671820584-0-AYI17YqGYokU6nqTrBmDFwZkLXezZSSSBfgBxXK9VQM9hV7hnBTb508OVh4ZAHgcZYuzdTDEOY25FGJqVUWRd3TFvXYukZtcbZyu3M8Qc5mDgFekFqDTKF3H3tRU8S34wHnO4pO/IBBKL4lLVck1onxUV8sMagm558aPpNv8IhRwBLpJ0hzPMNSBmJYF7j/YVJHMHk3tN8+Zlrfav/vauY1my4+kuiykiMhakn43EdwUE48chc60yyslmeR06MGHVkfvj8zqUCfNU8bu+rjhCF6efGEmfPKYxTq64Bw26VCnX5I0J59H2Y1S7wU2IJiTele953W+VMpA5Qn7keDJfS4hKIN+dv9bzFuIhrwwBsDuZIKL2IYeb1K6cCume1BA3eliI1DZGPlk8lOCXMqSiX93dZtGPuJ/IEv/x7X7aTuWBrIzVn8Mtc4yuz5UV0C32Pd28/PswG3YYL/DyGkbZFU9dr4b6PxOvTzSTh/1+ROc/UiQb1bVakYLRerBKp6CWrL8ocTwYcpcwuoJgo5AJEHE3nPLl6l/ZbxWox1GnV4c2tbOIptmwoW1bTCHmdJpN2a71AdmcoKlpNCpNaiwUF6uyGN1aY/LELoN4CNTKmZDmYgYV9FpSnmTl/yZVA5I/ESazqZHB06zC70TbvmuNsvk5fyp6/12ZcebXu6kp03Blhe9eOCDrCgmuG3CPCX/gDHWBz/M7AktUNArSKaRmOj6zC8ZEV/jmpoU3Wtu5isGA6OWa2R5F/c4HdcFZwpErodR+mYow8LW3bY63+LWGd1k1/onW1rphxdzPOeDFxDvmiQmD3rhgLjvBNs5hF1btS8WeKw9JbNc2rZFLVhcEIep1/HSPXPVx4vuqIQlorlxMBeDPK5TKeAJKSs758mEuWm92pPA1VNyMsygR+PJvpk445dqI/VioJEmWIrzBc0xjAhQBRDjqFs6/Op3mjwUipxYzGtpkBgI25K/u7JwASR/vEk0QRUj4xVIwK7Ermdx1AdbiWUksuJPVy5GV6cLwZeNhp3D+DjAd9KB4x1Vh9kJNSxRMd42+4XnKQrQrI6VQTIVRebhgnvhpmFxb3CbdR46JQ0/FT+3EWBJgxpIAOcFSxRytdAa0uwOsU0gUDpJs4z7J1VQ765AH5JT3O/tpbCsPA0HarH+yvQVR3qMzVrFjGlOncCtjO5/tsyGxyceRW8nYQq4jtJIVrz63W3U0B5FqTnHhyBsVgxRlvehUPEUMBUPYtXkJolk0YjbEcmoPcj4fGmN/ohz/GZ/LReM3G4R3LaA4Jc+E0XZLV48Qf3osFUJBSO9v45hA1zgne9VgkEvDRb1YJpiZJQhmCUcQJIf+8vjE8ApXcV88hDMyZt6yVTyu1HdnnYhk3HRfTSzCfRgXQHCLAP9Nn+KfwJdXb79ZxX4LrM8wRwTxVKBepBnAAnLWS88IqHsVNJ0xjthd9H3xB/XWfYYje6bighx6NTUY0C5rp8oZKnNtdFn1s4Vq7rca0bNsLXmQO7cHez/ypkJA4YkZIXm7EnxWOV0WjYxAVX4APCUQwIeViHOaIljQJpIk08EOOyaDoVuyw/76BySw0Z2Q8OAOq9nMnxEiE76NsrZphAspqDPEI0H70tqqwJ6xGI7EB0nlC+UbmAamar0izGoKxgwu+MFbgxvQYfAqW84rZy3wYKE4vyAVVjh9xdLB5KczdMWddd2bjxudO5QNb9qi51SVrT4AdFfeN9/z3HbfNy4pGXZP2Jt+5Gjg2uCAggOLxA4ru2QORWu9c7OSic318QwH5UWSNY5wuoi7YlkmSiPVNrmpnbv8hgz7AdiPPOXsgDQY8NIY2/oiqAK5CW931fHj7Of112qCFLK/gsgPwmlaeIH3gpwf37ikEi8b00k/TIiN6SAwOWGDXuzuiBHMFlowsTMcegAQ8rD0aYRr47nLif9pBbBH3pc4or33IjC+aPxaPgM3FMc">
        </form>

Ray ID: 77e333dbcb67baa9

Performance & security by Cloudflare


问:
eslint error 'foo is defined but never use (no-unused-vars)' in for of loop
in a for of loop written as below

```<code>
 for (let child of main.childNodes) {
      if (child.textContent === w.toUpperCase()) {
        const classes = child.classList;
        classes.toggle('show');
        break;
      }
}

</code>```

but in vscode it gives eslint error,

child is defined but never use (no-unused-vars)

check screenshot

what could be the issue here

vscode v: 1.74.2

.eslintrc

```<code>module.exports = {
  extends: ['eslint:recommended'],
  parser: 'babel-eslint',
  rules: {},
};
</code>```

from package.json

    "eslint": "^8.30.0",
    "eslint-webpack-plugin": "^3.2.0",
```

what could be the issue and how to eliminitae this error

Body:
in a for of loop written as below

 for (let child of main.childNodes) {
      if (child.textContent === w.toUpperCase()) {
        const classes = child.classList;
        classes.toggle('show');
        break;
      }
}

but in vscode it gives eslint error,

child is defined but never use (no-unused-vars)

check screenshot

what could be the issue here

vscode v: 1.74.2

.eslintrc

module.exports = {
  extends: ['eslint:recommended'],
  parser: 'babel-eslint',
  rules: {},
};

from package.json

    "eslint": "^8.30.0",
    "eslint-webpack-plugin": "^3.2.0",

what could be the issue and how to eliminitae this error


Title: remove lengend title created by add_trace in R plotly

Body:
I would like to know how to do the following:

remove or rename the legend title (see below in red)

remove the entire legend created by the function add_trace from the package plotly. As this doesn't seem to work through the conventional way with showlegend = FALSE

data + code

library(tidyverse)
library(plotly)

Strat <- structure(list(GS.Open = c(200.600006, 200.220001, 198.429993,
                                    199.050003, 203.539993, 203.399994, 208.339996, 210.899994, 210.850006,
                                    212.199997, 213.75), GS.High = c(203.320007, 200.669998, 200,
                                                                     203.949997, 204.899994, 208.440002, 213.169998, 214.220001, 215.130005,
                                                                     214.089996, 214.809998), GS.Low = c(197.820007, 198.070007, 197.899994,
                                                                                198.100006, 202, 201.5, 207.600006, 210.399994, 210.850006, 210.850006,
                                                                                209.100006), GS.Close = c(200.720001, 198.850006, 199.050003,
                                                                                203.729996, 204.080002, 208.110001, 211.880005, 213.990005, 213.589996,
                                                                                213.229996, 209.679993), GS.Volume = c(6494900, 6460200, 5892900,
                                                                                7851000, 7147100, 8025700, 9039400, 6618900, 5846600, 5306300,
                                                                                6423200), GS.Adjusted = c(162.160843, 160.65007, 160.811646,
                                                                                164.59259, 164.875336, 168.131134, 171.177002, 172.881592, 172.558426,
                                                                                172.267532, 169.399551), date = c("2007-01-03", "2007-01-04",
                                                                                "2007-01-05", "2007-01-08", "2007-01-09", "2007-01-10", "2007-01-11",
                                                                                "2007-01-12", "2007-01-16", "2007-01-17", "2007-01-18"), level = c(200,
                                                                                200, 200, 200, 200, 200, 200, 200, 200, 200, 200), level2 = c(250,
                                                                                250, 250, 250, 250, 250, 250, 250, 250, 250, 250), points = -5:5), row.names = c("2007-01-03",
                                                                                "2007-01-04", "2007-01-05", "2007-01-08", "2007-01-09", "2007-01-10",
                                                                                "2007-01-11", "2007-01-12", "2007-01-16", "2007-01-17", "2007-01-18"
                                                                                ), class = "data.frame")
Plot_Points <- Strat %>%
  filter((points <= -3 | points >= 3))

i <- list(line = list(color = '#6b998b'))
d <- list(line = list(color = '#996b6b'))

p <- Strat %>% plot_ly(x = ~date, type="candlestick",
                       open = ~GS.Open, close = ~GS.Close,
                       high = ~GS.High, low = ~GS.Low,
                       increasing = i, decreasing = d) %>%
  add_trace(x = ~Plot_Points$date, y = ~Plot_Points$GS.Close, color = ~Plot_Points$points, type = "scatter",
            mode = 'markers',
            marker = list(size = 8, opacity = 0.8),
            showlegend = FALSE,
            hovertemplate = paste("Signal: %{marker.color:f}", "<extra></extra>")) %>% # marker.color:,.0f round
  layout(
    showlegend = FALSE,
    plot_bgcolor='#343E48',
    paper_bgcolor='#343E48',
    font = list(color = 'grey')
    # hovermode = "x unified"
  )
p


问:
Share buttons from Sharethis.com does not appear until I resize a viewport
I added share buttons from Sharethis.com. When I refresh the page button does not appear, but when I resize the wievport it appears.
`

```<code><!DOCTYPE html>
<html lang="en">
<head>
  <script type="text/javascript" src="https://platform-api.sharethis.com/js/sharethis.js#property=63a323358fb8b6001abbbf6b&product=inline-share-buttons&source=platform" async="async"></script>

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
  <title>Article preview component</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@500&display=swap" rel="stylesheet">
  <script src="https://kit.fontawesome.com/7ab7d5ca64.js" crossorigin="anonymous"></script>
  <style>
    body {
      font-family: 'Kumbh Sans', sans-serif;
      background: hsl(240, 5%, 91%);
    }
    .arrow {
      width: 70px;
    }
    .pop {
      width: 15rem;
      right: 16rem;
      top: 14rem;
    }
    .arrow {
      width: 5rem;
      color: black;
    }
    #share {
      color: white;
    }
  </style>
</head>
<body>
  <div id="fb-root"></div>
  <div class="container mt-5">
    <div class="card shadow-lg">
      <div class="row">
        <img src="./images/drawers.jpg" alt="drawer image" class="col-4">
        <div class="col-6 p-4">
          <h1>Shift the overall look and feel by adding these wonderful touches to furniture in your home</h1>
          <p>Ever been in a room and felt like something was missing? Perhaps it felt slightly bare and uninviting. I’ve got some simple tips to help you make any room feel complete.</p>
          <div class="row">
            <img src="./images/avatar-michelle.jpg" alt="michele image" class="col-2 rounded-circle">
            <div class="col-6 mt-3">Michelle Apleton <br> 28 Jun 2020</div>
            <div class="bg-light rounded-circle col-1 p-3 m-3 d-flex justify-content-center" id="button">
              <img src="./images/icon-share.svg" alt="" class="">
            </div>
            <div class="pop position-absolute end-10 d-none" id="popup">
              <div class="row bg-dark rounded text-white py-1 d-flex justify-content-center align-items-center">
                <div class=" col-4 p-2">SHARE</div>
                <div class="col-8 zet sharethis-inline-share-buttons"></div>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <script>
    let changeClass = document.getElementById("button").addEventListener('click', () => {
      document.getElementById("popup").classList.remove("d-none")
      document.getElementById("popup").classList.add("d-block")
    })
  </script>

  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>
</body>
</html>
</code>```

`

I placed their head code into the head. I tried Z-index, but it does not appear until resizing the viewport, narrowing or expanding does not matter, in both cases it appears.

Body:
I added share buttons from Sharethis.com. When I refresh the page button does not appear, but when I resize the wievport it appears.
`

<!DOCTYPE html>

  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
  <title>Article preview component</title>
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
  <link rel="preconnect" href="https://fonts.googleapis.com">
  <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  <link href="https://fonts.googleapis.com/css2?family=Kumbh+Sans:wght@500&display=swap" rel="stylesheet">

Shift the overall look and feel by adding these wonderful touches to furniture in your home

Ever been in a room and felt like something was missing? Perhaps it felt slightly bare and uninviting. I’ve got some simple tips to help you make any room feel complete.

Michelle Apleton
 28 Jun 2020

SHARE

`

I placed their head code into the head. I tried Z-index, but it does not appear until resizing the viewport, narrowing or expanding does not matter, in both cases it appears.


问:
Why does intellisense update on C debugger launch.json when it seems to break the run and debug?
Every time Intellisense says it wants to know what folder to use for debugging and I select the folder for it to work with. It updates my launch.json to the following

```<code>{
      "name": "C/C++ Runner: Debug Session",
      "type": "cppdbg",
      "request": "launch",
      "args": [],
      "stopAtEntry": false,
      "externalConsole": true,
      "cwd": "d:/programming/cs50/substitution",
      "program": "d:/programming/cs50/substitution/build/Debug/outDebug",
      "MIMode": "gdb",
      "miDebuggerPath": "gdb",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        }
      ]
    }
</code>```

I've found these settings break the running and debugging process. I can get a working result with the code below...

```<code>    {
      "name": "C/C++ Runner: Debug Session",
      "type": "cppdbg",
      "request": "launch",
      "args": ["abc"],
      "stopAtEntry": true,
      "externalConsole": true,
      "cwd": "${workspaceFolder}",
      "program": "${workspaceFolder}\\${fileBasenameNoExtension}.exe",
      "MIMode": "gdb",
      "miDebuggerPath": "C:/ProgramData/chocolatey/bin/gdb.exe",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        }
      ]
    }
</code>```

As far as I can see the only differences are the cwd and program properties. Is there any reason why it wants me to point the program property away from my exe file? It doesn't feel very helpful, but maybe I'm missing something in my environment that would mean the settings it suggests are beneficial.

Body:
Every time Intellisense says it wants to know what folder to use for debugging and I select the folder for it to work with. It updates my launch.json to the following

{
      "name": "C/C++ Runner: Debug Session",
      "type": "cppdbg",
      "request": "launch",
      "args": [],
      "stopAtEntry": false,
      "externalConsole": true,
      "cwd": "d:/programming/cs50/substitution",
      "program": "d:/programming/cs50/substitution/build/Debug/outDebug",
      "MIMode": "gdb",
      "miDebuggerPath": "gdb",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        }
      ]
    }

I've found these settings break the running and debugging process. I can get a working result with the code below...

    {
      "name": "C/C++ Runner: Debug Session",
      "type": "cppdbg",
      "request": "launch",
      "args": ["abc"],
      "stopAtEntry": true,
      "externalConsole": true,
      "cwd": "${workspaceFolder}",
      "program": "${workspaceFolder}\\${fileBasenameNoExtension}.exe",
      "MIMode": "gdb",
      "miDebuggerPath": "C:/ProgramData/chocolatey/bin/gdb.exe",
      "setupCommands": [
        {
          "description": "Enable pretty-printing for gdb",
          "text": "-enable-pretty-printing",
          "ignoreFailures": true
        }
      ]
    }

As far as I can see the only differences are the cwd and program properties. Is there any reason why it wants me to point the program property away from my exe file? It doesn't feel very helpful, but maybe I'm missing something in my environment that would mean the settings it suggests are beneficial.


问:
Component not rendering input type="radio" for all questions
I have this component, where on click user gets from API 3 questions, and each question has 4 potential answers that the user can chose from. However, once rendered, only the last question has  input type="radio".

Here is the pic

And here is the code:

```<code>import React, { Component } from 'react';
import { Form, Button } from 'react-bootstrap';
import { Configuration, OpenAIApi } from 'openai';

class QuizApp extends Component {
  constructor() {
    super();
    this.state = {
      book: '',
      questions: [],
      message: '',
    };

    this.handleChange = this.handleChange.bind(this);
    this.handleSubmit = this.handleSubmit.bind(this);
    this.handleAnswer = this.handleAnswer.bind(this);
  }

  handleChange(event) {
    this.setState({ book: event.target.value });
  }

  async handleSubmit(event) {
    event.preventDefault();

    const configuration = new Configuration({
      apiKey: 'APIKEY',
    });
    const openai = new OpenAIApi(configuration);

    try {
      const response = await openai.createCompletion({
        model: 'text-davinci-003',
        prompt: `Generate 3 quiz questions about the book "${this.state.book}" with 4 possible answers for each question"`,
        temperature: 1,
        max_tokens: 200,
        top_p: 1,
        frequency_penalty: 0,
        presence_penalty: 0,
      });

      const questions = [];
      let match;
      const regex = /([^]*)\n([^]*)\n([^]*)\n([^]*)\n([^]*)\n([^]*)/g;

while ((match = regex.exec(response.data.choices[0].text))) {
  const question = {
    question: match[1],
    correctAnswer: match[2],
    wrongAnswer1: match[3],
    wrongAnswer2: match[4],
    wrongAnswer3: match[5],
  };
  questions.push(question);
}

this.setState({ questions });
    } catch (error) {
      console.error(error);
      this.setState({ message: 'An error occurred while generating the quiz questions' });
    }
  }

  handleAnswer(event, index) {
    const { questions } = this.state;
    const question = questions[index];

    if (event.target.value === question.correctAnswer) {
      this.setState({ message: 'Good job!' });
    } else {
      this.setState({ message: 'Wrong answer' });
    }
  }

  render() {
    const { book, questions, message } = this.state;

    return (
      <div>
        <Form onSubmit={this.handleSubmit}>
          <Form.Group>
            <Form.Label>Enter the name of a book:</Form.Label>
            <Form.Control type="text" value={book} onChange={this.handleChange} />
          </Form.Group>
          <Button type="submit">Generate Quiz</Button>
        </Form>
        {questions.map((question, index) => (
          <div key={index}>
            <p>{question.question}</p>
             <Form.Group style={{color: '#fff'}}>
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.correctAnswer}
        value={question.correctAnswer}
        onChange={(event) => this.handleAnswer(event, index)}
      />
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.wrongAnswer1}
        value={question.wrongAnswer1}
        onChange={(event) => this.handleAnswer(event, index)}
      />
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.wrongAnswer2}
        value={question.wrongAnswer2}
        onChange={(event) => this.handleAnswer(event, index)}
      />
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.wrongAnswer3}
        value={question.wrongAnswer3}
        onChange={(event) => this.handleAnswer(event, index)}
      />
    </Form.Group>
          </div>
        ))}
        {message && <p style={{color: '#fff'}}>{message}</p>}
      </div>
    );
  }
}

export default QuizApp;
</code>```

Been working on this for a few hours with no luck. Any help is appreciated!!!

Body:
I have this component, where on click user gets from API 3 questions, and each question has 4 potential answers that the user can chose from. However, once rendered, only the last question has  input type="radio".

Here is the pic

And here is the code:

import React, { Component } from 'react';
import { Form, Button } from 'react-bootstrap';
import { Configuration, OpenAIApi } from 'openai';

class QuizApp extends Component {
  constructor() {
    super();
    this.state = {
      book: '',
      questions: [],
      message: '',
    };

    this.handleChange = this.handleChange.bind(this);
    this.handleSubmit = this.handleSubmit.bind(this);
    this.handleAnswer = this.handleAnswer.bind(this);
  }

  handleChange(event) {
    this.setState({ book: event.target.value });
  }

  async handleSubmit(event) {
    event.preventDefault();

    const configuration = new Configuration({
      apiKey: 'APIKEY',
    });
    const openai = new OpenAIApi(configuration);

    try {
      const response = await openai.createCompletion({
        model: 'text-davinci-003',
        prompt: `Generate 3 quiz questions about the book "${this.state.book}" with 4 possible answers for each question"`,
        temperature: 1,
        max_tokens: 200,
        top_p: 1,
        frequency_penalty: 0,
        presence_penalty: 0,
      });

      const questions = [];
      let match;
      const regex = /([^]*)\n([^]*)\n([^]*)\n([^]*)\n([^]*)\n([^]*)/g;

while ((match = regex.exec(response.data.choices[0].text))) {
  const question = {
    question: match[1],
    correctAnswer: match[2],
    wrongAnswer1: match[3],
    wrongAnswer2: match[4],
    wrongAnswer3: match[5],
  };
  questions.push(question);
}

this.setState({ questions });
    } catch (error) {
      console.error(error);
      this.setState({ message: 'An error occurred while generating the quiz questions' });
    }
  }

  handleAnswer(event, index) {
    const { questions } = this.state;
    const question = questions[index];

    if (event.target.value === question.correctAnswer) {
      this.setState({ message: 'Good job!' });
    } else {
      this.setState({ message: 'Wrong answer' });
    }
  }

  render() {
    const { book, questions, message } = this.state;

    return (

        <Form onSubmit={this.handleSubmit}>
          <Form.Group>
            <Form.Label>Enter the name of a book:</Form.Label>
            <Form.Control type="text" value={book} onChange={this.handleChange} />
          </Form.Group>
          <Button type="submit">Generate Quiz</Button>
        </Form>
        {questions.map((question, index) => (

{question.question}

             <Form.Group style={{color: '#fff'}}>
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.correctAnswer}
        value={question.correctAnswer}
        onChange={(event) => this.handleAnswer(event, index)}
      />
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.wrongAnswer1}
        value={question.wrongAnswer1}
        onChange={(event) => this.handleAnswer(event, index)}
      />
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.wrongAnswer2}
        value={question.wrongAnswer2}
        onChange={(event) => this.handleAnswer(event, index)}
      />
      <Form.Check style={{color: '#fff'}}
        type="radio"
        label={question.wrongAnswer3}
        value={question.wrongAnswer3}
        onChange={(event) => this.handleAnswer(event, index)}
      />
    </Form.Group>

        ))}
        {message &&
{message}
}

    );
  }
}

export default QuizApp;

Been working on this for a few hours with no luck. Any help is appreciated!!!


问:
Is there a way to differentiate HTML classes in VSCode?
In HTML, when using Bootstrap, Tailwind CSS or similar, it can get really hard to skim the code, because of so many classes. I would like to be able to differentiate HTML classes, like alternating colours, or something similar.

Example 1
Example 2

Looked for extensions, but nothing that got close to this. Could I make one, perhaps?


问:
Getting Data using query Params and Firebase with React
I am trying to return a single Booklet from firestore whose ID matches the id from the URL. I am using useParams() to extract the id from the url. When I console.log singleBooklet, it is an empty Array. I am pretty sure the problem is that the component is rendering before the query in the useEffect has time to setSingleBooklet. Any solutions?</p>
```<code>const Booklet = () => {
  const [singleBooklet, setSingleBooklet] = useState([]);
  const params = useParams();
  useEffect(() => {
    if (params.id) {
      const q = query(
        collection(db, "Booklet"),
        where("bookletId", "==", params.id)
      );
      const unsubscribe = onSnapshot(q, (querySnapshot) => {
        setSingleBooklet(
          querySnapshot.docs.map((doc) => ({ ...doc.data(), id: doc.id }))
        );
      });
      console.log(singleBooklet);
      return unsubscribe;
    }
  }, []);
  return (
    <div className="booklet-section row">
      <div className="col-md-8 col-sm-10 col-lg-7 col-xl-5 mx-auto">
        <Carousel interval={null}>
          <Carousel.Item>
            <h4 className="text-center">Cover</h4>
            <div className="cover">
              <img src={ELFlogo} className="cover-logo"></img>
              <h1 className="text-secondary">{singleBooklet[0].title}</h1>
              <br></br>
              <h5>By</h5>
              <h3 className="text-secondary"></h3>
            </div>
          </Carousel.Item>
        </Carousel>
      </div>
    </div>
  );
};
</code>```

Body:
I am trying to return a single Booklet from firestore whose ID matches the id from the URL. I am using useParams() to extract the id from the url. When I console.log singleBooklet, it is an empty Array. I am pretty sure the problem is that the component is rendering before the query in the useEffect has time to setSingleBooklet. Any solutions?

const Booklet = () => {
  const [singleBooklet, setSingleBooklet] = useState([]);
  const params = useParams();
  useEffect(() => {
    if (params.id) {
      const q = query(
        collection(db, "Booklet"),
        where("bookletId", "==", params.id)
      );
      const unsubscribe = onSnapshot(q, (querySnapshot) => {
        setSingleBooklet(
          querySnapshot.docs.map((doc) => ({ ...doc.data(), id: doc.id }))
        );
      });
      console.log(singleBooklet);
      return unsubscribe;
    }
  }, []);
  return (

        <Carousel interval={null}>
          <Carousel.Item>

Cover

{singleBooklet[0].title}

By

          </Carousel.Item>
        </Carousel>

  );
};


问:
Xamarin Forms Plugin.CloudFirestore - How to Handle Firestore Map Fields and Firestore Map Arrays with Reactive
I am currently using the Plugin.CloudFirestore.Sample project (link: https://github.com/f-miyu/Plugin.CloudFirestore) as a reference for creating my own application and would like to know how I should code my project to upload documents containing Firestore Maps and Firestore Arrays that have nested Firestore Maps then listen for document changes and display these changes using Xamarin Forms, Plugin.CloudFirestore, and Reactive. I would also like to know the maximum amount of Map conversions that can be handled at a time while converting from a Firestore Document to a .Net Model Class. To clarify, if the ExampleItem Class mentioned below contains another Model Class as a property, how would the class and reactive class viewmodel code look to upload/listen for changes. If anyone knows the answer to my question, it would be awesome if you could download the Plugin.CloudFirestore.Sample project, make the changes to the file, share a response explaining what you added, and share a download link.</p>
```<code>    public class TodoItem
    {
        public static string CollectionPath = "todoItems";

        //Should I use DocumentConverters for converting to the "DataMap" and "DataMapArray" properties? If so what would the code for them look like?

        [Id]
        public string? Id { get; set; }

        public string? Name { get; set; }

        public string? Notes { get; set; }

        public ExampleItem1? DataMap { get; set; }

        public ObservableCollection<ExampleItem1>? DataMapArray { get; set; }

        [ServerTimestamp(CanReplace = false)]
        public Timestamp CreatedAt { get; set; }

        [ServerTimestamp]
        public Timestamp UpdatedAt { get; set; }
    }

    public class ExampleItem1
    {
        // Should I use [Id] on the Id property or any other Plugin.CloudFirestore.Attributes?

        public string? Id { get; set; }

        public string? Name { get; set; }

        public ExampleItem2? DataMap { get; set; }

        public ObservableCollection<ExampleItem2>? DataMapArray { get; set; }
    }

    public class TodoItemViewModel : BindableBase
    {
        public string? Id { get; }

        public ReactivePropertySlim<string?> Name { get; set; } = new ReactivePropertySlim<string?>();
        public ReactivePropertySlim<string?> Notes { get; set; } = new ReactivePropertySlim<string?>();
        public ReactivePropertySlim<ExampleItem?> DataMap { get; set; } = new ReactivePropertySlim<ExampleItem?>();
        public ReactivePropertySlim<ObservableCollection<ExampleItem>?> DataMapArray { get; set; } = new ReactivePropertySlim<ObservableCollection<ExampleItem>?>();

        public TodoItemViewModel(TodoItem item)
        {
            Id = item.Id;
            Name.Value = item.Name;
            Notes.Value = item.Notes;
            DataMap.Value = item.DataMap;
            DataMapArray.Value = item.DataMapArray;
        }

        public void Update(string? name, string? notes, ExampleItem1? dataMap, ObservableCollection<ExampleItem1>? dataMapArray)
        {
            Name.Value = name;
            Notes.Value = notes;
            DataMap.Value = dataMap;
            DataMapArray.Value = dataMapArray;
        }
    }
</code>```

Body:
I am currently using the Plugin.CloudFirestore.Sample project (link: https://github.com/f-miyu/Plugin.CloudFirestore) as a reference for creating my own application and would like to know how I should code my project to upload documents containing Firestore Maps and Firestore Arrays that have nested Firestore Maps then listen for document changes and display these changes using Xamarin Forms, Plugin.CloudFirestore, and Reactive. I would also like to know the maximum amount of Map conversions that can be handled at a time while converting from a Firestore Document to a .Net Model Class. To clarify, if the ExampleItem Class mentioned below contains another Model Class as a property, how would the class and reactive class viewmodel code look to upload/listen for changes. If anyone knows the answer to my question, it would be awesome if you could download the Plugin.CloudFirestore.Sample project, make the changes to the file, share a response explaining what you added, and share a download link.

    public class TodoItem
    {
        public static string CollectionPath = "todoItems";

        //Should I use DocumentConverters for converting to the "DataMap" and "DataMapArray" properties? If so what would the code for them look like?

        [Id]
        public string? Id { get; set; }

        public string? Name { get; set; }

        public string? Notes { get; set; }

        public ExampleItem1? DataMap { get; set; }

        public ObservableCollection<ExampleItem1>? DataMapArray { get; set; }

        [ServerTimestamp(CanReplace = false)]
        public Timestamp CreatedAt { get; set; }

        [ServerTimestamp]
        public Timestamp UpdatedAt { get; set; }
    }

    public class ExampleItem1
    {
        // Should I use [Id] on the Id property or any other Plugin.CloudFirestore.Attributes?

        public string? Id { get; set; }

        public string? Name { get; set; }

        public ExampleItem2? DataMap { get; set; }

        public ObservableCollection<ExampleItem2>? DataMapArray { get; set; }
    }

    public class TodoItemViewModel : BindableBase
    {
        public string? Id { get; }

        public ReactivePropertySlim<string?> Name { get; set; } = new ReactivePropertySlim<string?>();
        public ReactivePropertySlim<string?> Notes { get; set; } = new ReactivePropertySlim<string?>();
        public ReactivePropertySlim<ExampleItem?> DataMap { get; set; } = new ReactivePropertySlim<ExampleItem?>();
        public ReactivePropertySlim<ObservableCollection<ExampleItem>?> DataMapArray { get; set; } = new ReactivePropertySlim<ObservableCollection<ExampleItem>?>();

        public TodoItemViewModel(TodoItem item)
        {
            Id = item.Id;
            Name.Value = item.Name;
            Notes.Value = item.Notes;
            DataMap.Value = item.DataMap;
            DataMapArray.Value = item.DataMapArray;
        }

        public void Update(string? name, string? notes, ExampleItem1? dataMap, ObservableCollection<ExampleItem1>? dataMapArray)
        {
            Name.Value = name;
            Notes.Value = notes;
            DataMap.Value = dataMap;
            DataMapArray.Value = dataMapArray;
        }
    }


问:
Dynamic Route in NEXTjs with sanity not working
I checked my code many times , also compared with people who have done the same project but i m still not able to undersatnd where my code is breaking down. There is no error as as byt even renderng using dynamic routes i get a 404
Here is my node

[slug].js

```<code>import { GetStaticProps } from "next";
import Navbar from "../../components/Navbar";
import { sanityClient, urlFor } from "../../sanity";
import { Post } from "../../typing";

interface Props {
  post: Post;
}

function Post({ post }: Props) {
  console.log(post);
  return (
    <div>
      <Navbar></Navbar>
    </div>
  );
}

export default Post;
export const getStaticPaths = async () => {
  const query = `*[_type == "post"]{
          _id,
          slug{
            current,
          }
        }`;

  const posts = await sanityClient.fetch(query);

  const paths =
    posts.map((post: Post) => ({
      params: {
        slug: post.slug.current,
      },
    })) || [];

  return {
    paths,
    // fallback: true,
  };
};

export const getStaticProps: GetStaticProps = async ({ params }) => {
  const query = `*[_type == "post" && slug.current == $slug][0]{
          _id,
          _createdAt,
          title,
          author-> {
              name,
              image
          },
          description,
          mainImage,
          slug,
          body
      }`;
  const post = await sanityClient.fetch(query, { slug: params?.slug });

  if (!post) {
    return {
      notFound: true,
    };
  }
  return {
    props: {
      post,
    },
    revalidate: 60,
  };
};

</code>```

Folder Structure
enter image description here

Sanity.js

```<code>import { createCurrentUserHook, createClient} from "next-sanity";
import createImageUrlBuilder from "@sanity/image-url";

const config = {
    dataset : process.env.NEXT_PUBLIC_SANITY_DATASET || "production",
    projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID,
    apiVersion: "2021-03-25",
    useCdn: process.env.NODE_ENV === "production"
}

export const sanityClient= createClient(config);

export const urlFor = (source) => createImageUrlBuilder(config).image(source);

// export const useCurrentUser= createCurrentUserHook(config);
</code>```

I have tried everything, please help!!!
Here is the github link ---- https://github.com/manaskshatriya/Next_Sanity_tutorial_Blog

Body:
I checked my code many times , also compared with people who have done the same project but i m still not able to undersatnd where my code is breaking down. There is no error as as byt even renderng using dynamic routes i get a 404
Here is my node

[slug].js

import { GetStaticProps } from "next";
import Navbar from "../../components/Navbar";
import { sanityClient, urlFor } from "../../sanity";
import { Post } from "../../typing";

interface Props {
  post: Post;
}

function Post({ post }: Props) {
  console.log(post);
  return (

      <Navbar></Navbar>

  );
}

export default Post;
export const getStaticPaths = async () => {
  const query = `*[_type == "post"]{
          _id,
          slug{
            current,
          }
        }`;

  const posts = await sanityClient.fetch(query);

  const paths =
    posts.map((post: Post) => ({
      params: {
        slug: post.slug.current,
      },
    })) || [];

  return {
    paths,
    // fallback: true,
  };
};

export const getStaticProps: GetStaticProps = async ({ params }) => {
  const query = `*[_type == "post" && slug.current == $slug][0]{
          _id,
          _createdAt,
          title,
          author-> {
              name,
              image
          },
          description,
          mainImage,
          slug,
          body
      }`;
  const post = await sanityClient.fetch(query, { slug: params?.slug });

  if (!post) {
    return {
      notFound: true,
    };
  }
  return {
    props: {
      post,
    },
    revalidate: 60,
  };
};

Folder Structure
enter image description here

Sanity.js

import { createCurrentUserHook, createClient} from "next-sanity";
import createImageUrlBuilder from "@sanity/image-url";

const config = {
    dataset : process.env.NEXT_PUBLIC_SANITY_DATASET || "production",
    projectId: process.env.NEXT_PUBLIC_SANITY_PROJECT_ID,
    apiVersion: "2021-03-25",
    useCdn: process.env.NODE_ENV === "production"
}

export const sanityClient= createClient(config);

export const urlFor = (source) => createImageUrlBuilder(config).image(source);

// export const useCurrentUser= createCurrentUserHook(config);

I have tried everything, please help!!!
Here is the github link ---- https://github.com/manaskshatriya/Next_Sanity_tutorial_Blog