问:
(solved) field has incomplete type of class
I´m building a program with several classes (data structures like stacks, lists,etc).
There is some class (Concesionario) that i need to use in another (ListaE). The class ListaE uses another class called NodoListaE, which uses two pointers, one to the value of the object (Concesionario) and another to the next position of the list (siguiente).

```<code>#ifndef NODOLISTAE_HPP
#define NODOLISTAE_HPP
#include "Concesionario.hpp"

class Concesionario;
class ListaE;
class NodoListaE
{
    public:
        NodoListaE(Concesionario* conc, NodoListaE* sig = NULL);

    private:
        Concesionario* conc;
        NodoListaE* siguiente;
    friend class ListaE;
};
typedef NodoListaE* pnodoListaE;
#endif // NODOLISTAE_HPP

</code>```
```<code>#ifndef LISTAE_HPP
#define LISTAE_HPP
#include "NodoListaE.hpp"
#include "Automovil.hpp"

class Automovil;
class NodoListaE;
class ListaE
{
    private:
        NodoListaE* primero;

    public:
        ListaE();
        void enlistarOrden(Automovil* automovil);

};

#endif // LISTAE_HPP

</code>```
```<code>#ifndef CONCESIONARIO_HPP
#define CONCESIONARIO_HPP
#include <string>
#include "ListaE.hpp"

class ListaE;
class Concesionario
{
    public:
        Concesionario();
        ~Concesionario();
        std::string mostrar();
        void setZona(std::string letra);
        void setNum();
        int getNum();

    private:
        int nc=2;
        int num_conc;
        std::string zona;
        int generadorNumsIntervalo(int min, int max);
        ListaE automoviles;//ERROR HERE

};

#endif // CONCESIONARIO_HPP

</code>```

All the cpp files are not implemented (empty constructor and destructor).
The compiler I´m currently using is MINGWx64.

I´ve tried using forward declarations and it worked for the rest of the classes but not for this one.
The program throws the following error in the **Concesionario ** hpp file: include\Concesionario.hpp|22|error: field 'automoviles' has incomplete type 'ListaE'|
Concesionario is implemented in other classes and the program runs perfectly.

Example of another class implementing Concesionario

```<code>#ifndef ARBOL_HPP
#define ARBOL_HPP
#include <iostream>
#include "NodoArbol.hpp"
#include "Concesionario.hpp"
using namespace std;

class Arbol {

  public:
   Arbol();
   void Insertar(Concesionario* concesionario);

  private:
   pnodoArbol raiz;
   pnodoArbol actual;
   int contador;
   int altura;
   bool Vacio(pnodoArbol nodo);

};

#endif // ARBOL_HPP

</code>```

I`ve also tried deleting this class and creating another one from 0 but the error remains.
Any solution to this problem? Thank you very much.

Body:
I´m building a program with several classes (data structures like stacks, lists,etc).
There is some class (Concesionario) that i need to use in another (ListaE). The class ListaE uses another class called NodoListaE, which uses two pointers, one to the value of the object (Concesionario) and another to the next position of the list (siguiente).

#ifndef NODOLISTAE_HPP
#define NODOLISTAE_HPP
#include "Concesionario.hpp"

class Concesionario;
class ListaE;
class NodoListaE
{
    public:
        NodoListaE(Concesionario* conc, NodoListaE* sig = NULL);

    private:
        Concesionario* conc;
        NodoListaE* siguiente;
    friend class ListaE;
};
typedef NodoListaE* pnodoListaE;
#endif // NODOLISTAE_HPP

#ifndef LISTAE_HPP
#define LISTAE_HPP
#include "NodoListaE.hpp"
#include "Automovil.hpp"

class Automovil;
class NodoListaE;
class ListaE
{
    private:
        NodoListaE* primero;

    public:
        ListaE();
        void enlistarOrden(Automovil* automovil);

};

#endif // LISTAE_HPP

#ifndef CONCESIONARIO_HPP
#define CONCESIONARIO_HPP
#include <string>
#include "ListaE.hpp"

class ListaE;
class Concesionario
{
    public:
        Concesionario();
        ~Concesionario();
        std::string mostrar();
        void setZona(std::string letra);
        void setNum();
        int getNum();

    private:
        int nc=2;
        int num_conc;
        std::string zona;
        int generadorNumsIntervalo(int min, int max);
        ListaE automoviles;//ERROR HERE

};

#endif // CONCESIONARIO_HPP

All the cpp files are not implemented (empty constructor and destructor).
The compiler I´m currently using is MINGWx64.

I´ve tried using forward declarations and it worked for the rest of the classes but not for this one.
The program throws the following error in the **Concesionario ** hpp file: include\Concesionario.hpp|22|error: field 'automoviles' has incomplete type 'ListaE'|
Concesionario is implemented in other classes and the program runs perfectly.

Example of another class implementing Concesionario

#ifndef ARBOL_HPP
#define ARBOL_HPP
#include <iostream>
#include "NodoArbol.hpp"
#include "Concesionario.hpp"
using namespace std;

class Arbol {

  public:
   Arbol();
   void Insertar(Concesionario* concesionario);

  private:
   pnodoArbol raiz;
   pnodoArbol actual;
   int contador;
   int altura;
   bool Vacio(pnodoArbol nodo);

};

#endif // ARBOL_HPP

I`ve also tried deleting this class and creating another one from 0 but the error remains.
Any solution to this problem? Thank you very much.


来源: stackexchange

问:
GridLayout with columns of equal width in Android
I have a GridLayout (4 columns / 8 rows) of MaterialCardViews. Each card has equal layout_columnWeight and layout_rowWeight of 0.25 and their layout_gravity is set to center|fill_horizontal.

The cards have a TextView and two ImageViews of width 30dp in a vertical LinearLayout. Normally the width of each card is 60dp + LinearLayout's margin (6dp); so 72dp in total. However, if the text is too long, the width of the card could exceed 72dp. Also, the GridLayout has 6dp padding and the cards have 6dp margin.

Condsider the following example:

The row's available width is 500dp; Each card should end up being
110dp wide since 110 * 4 + 4 * 6 * 2 (cards' margin) + 6 * 2 (grid layout's padding) = 500dp. This is regardless of the size of the text as long as it doesn't exceed 110dp - 6 * 2 (linear layout's margin) = 98dp.

However, when the text's width exceeds 60dp (the width of the two images), the grid layout doesn't give the cards equal width but rather divides the extra available space between them equally so the cards could end up with different widths.

For example, if all the texts were shorter than 60dp, the cards would be 72dp and they would stretch to 110dp, but say one the texts is actually 80dp; The extra available space would be: 500 - 3 * (60 + 6 + 6) - (80 + 6 + 6) - 6 * 2 (grid layout's padding) - 4 * 6 * 2 (cards' margin) = 132dp. Each card would get 132 / 4 = 33dp and the small ones would end up being 105dp and the large one 125dp.

How can I make the cards have equal width instead of equal extra width ?

the grid layout:

```<code><androidx.gridlayout.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/fragment_home_bottom_sheet_io"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:clipToPadding="false"
    android:layoutDirection="ltr"
    android:padding="6dp"
    app:columnCount="4"
    app:rowCount="8">

    <include
        layout="@layout/item_port"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="6dp"
        app:layout_column="0"
        app:layout_columnWeight="0.25"
        app:layout_gravity="center|fill_horizontal"
        app:layout_row="0"
        app:layout_rowWeight="0.25" />

<!-- include repeated 31 more times with appropriate column and row numbers -->

</androidx.gridlayout.widget.GridLayout>
</code>```

item_port.xml:

```<code><com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:backgroundTint="@color/blue_light_3"
    android:checkable="false"
    android:focusable="false"
    app:cardCornerRadius="24dp"
    app:cardElevation="4dp">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_margin="6dp"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/item_port_number_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/item_port_number"
                android:layout_width="30dp"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true" />

            <ImageView
                android:id="@+id/item_port_type"
                android:layout_width="30dp"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true" />
        </LinearLayout>

        <TextView
            android:id="@+id/item_port_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textAlignment="center"
            android:textAppearance="@style/TextAppearance.AppCompat.Body1"
            android:textSize="12sp" />

    </LinearLayout>

</com.google.android.material.card.MaterialCardView>
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I have a GridLayout (4 columns / 8 rows) of MaterialCardViews. Each card has equal layout_columnWeight and layout_rowWeight of 0.25 and their layout_gravity is set to center|fill_horizontal.

The cards have a TextView and two ImageViews of width 30dp in a vertical LinearLayout. Normally the width of each card is 60dp + LinearLayout's margin (6dp); so 72dp in total. However, if the text is too long, the width of the card could exceed 72dp. Also, the GridLayout has 6dp padding and the cards have 6dp margin.

Condsider the following example:

The row's available width is 500dp; Each card should end up being
110dp wide since 110 * 4 + 4 * 6 * 2 (cards' margin) + 6 * 2 (grid layout's padding) = 500dp. This is regardless of the size of the text as long as it doesn't exceed 110dp - 6 * 2 (linear layout's margin) = 98dp.

However, when the text's width exceeds 60dp (the width of the two images), the grid layout doesn't give the cards equal width but rather divides the extra available space between them equally so the cards could end up with different widths.

For example, if all the texts were shorter than 60dp, the cards would be 72dp and they would stretch to 110dp, but say one the texts is actually 80dp; The extra available space would be: 500 - 3 * (60 + 6 + 6) - (80 + 6 + 6) - 6 * 2 (grid layout's padding) - 4 * 6 * 2 (cards' margin) = 132dp. Each card would get 132 / 4 = 33dp and the small ones would end up being 105dp and the large one 125dp.

How can I make the cards have equal width instead of equal extra width ?

the grid layout:

<androidx.gridlayout.widget.GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/fragment_home_bottom_sheet_io"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_gravity="center_horizontal"
    android:clipToPadding="false"
    android:layoutDirection="ltr"
    android:padding="6dp"
    app:columnCount="4"
    app:rowCount="8">

    <include
        layout="@layout/item_port"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="6dp"
        app:layout_column="0"
        app:layout_columnWeight="0.25"
        app:layout_gravity="center|fill_horizontal"
        app:layout_row="0"
        app:layout_rowWeight="0.25" />

</androidx.gridlayout.widget.GridLayout>

item_port.xml:

<com.google.android.material.card.MaterialCardView xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:backgroundTint="@color/blue_light_3"
    android:checkable="false"
    android:focusable="false"
    app:cardCornerRadius="24dp"
    app:cardElevation="4dp">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_margin="6dp"
        android:orientation="vertical">

        <LinearLayout
            android:id="@+id/item_port_number_type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:orientation="horizontal">

            <ImageView
                android:id="@+id/item_port_number"
                android:layout_width="30dp"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true" />

            <ImageView
                android:id="@+id/item_port_type"
                android:layout_width="30dp"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true" />
        </LinearLayout>

        <TextView
            android:id="@+id/item_port_text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_horizontal"
            android:textAlignment="center"
            android:textAppearance="@style/TextAppearance.AppCompat.Body1"
            android:textSize="12sp" />

    </LinearLayout>

</com.google.android.material.card.MaterialCardView>


问:
how to make drf-yasg generate schema to add accept content type application/json for all the requests
I want to add to all the paths that generated automatically by drf-yasg accept content type application/json by default. something like:

```<code> "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/schema"
              }
            }
          },
          "required": true
        },
</code>```

I found something in DRF settings (setting.py) for the response but not for the request. Any help?

Body:
I want to add to all the paths that generated automatically by drf-yasg accept content type application/json by default. something like:

 "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/schema"
              }
            }
          },
          "required": true
        },

I found something in DRF settings (setting.py) for the response but not for the request. Any help?


问:
Need help on first Tensorflow model
TLDR: Code below creates tensorflow model to predict boolean value based on categorical and numerical input from csv, currently outputting loss nan and unchanging accuracy

UPDATE: I have gotten the accuracy to read at 1.00 through changes to the preprocessing of the csv, but the loss is still nan so I think it may be due to the way that the data is fed to the model, not the model itself

So, I've been trying to get into machine learning and finally entered into the Kaggle titanic competition to have a project to work on for practice, currently though the code runs but the loss will output as nan and the accuracy may start off low, but by the second epoch it is always leveled off at the same value and does not change, it does not output any errors. Here is the jupyter notebook

```<code>import tensorflow as tf
import keras
from keras import layers
from keras.layers import Dense
from keras.models import Sequential, load_model
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as np
from keras.optimizers import SGD
np.set_printoptions(precision=3, suppress=True)

df = pd.read_csv('data/Titanic/train.csv', skipinitialspace=True)
test = pd.read_csv('data/Titanic/test.csv', skipinitialspace=True)
test = test.drop(['PassengerId', 'Name'], axis=1)

def convert(frame):
    frame['HomePlanet'] = pd.Categorical(frame['HomePlanet'])
    frame['HomePlanet'] = frame.HomePlanet.cat.codes

    frame['CryoSleep'] = pd.Categorical(frame['CryoSleep'])
    frame['CryoSleep'] = frame.CryoSleep.cat.codes

    frame['Cabin'] = pd.Categorical(frame['Cabin'])
    frame['Cabin'] = frame.Cabin.cat.codes

    frame['Destination'] = pd.Categorical(frame['Destination'])
    frame['Destination'] = frame.Destination.cat.codes

    frame['VIP'] = pd.Categorical(frame['VIP'])
    frame['VIP'] = frame.VIP.cat.codes

    frame['Transported'] = pd.Categorical(frame['Transported'])
    frame['Transported'] = frame.Transported.cat.codes

    return frame

df = convert(df)

X = df.drop(['PassengerId', 'Name', 'Transported'], axis=1)
y = df['Transported']

tf.convert_to_tensor(X)

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

normalizer1 = tf.keras.layers.experimental.preprocessing.Normalization(axis=None)
normalizer1.adapt(X_train)

model = Sequential([
        layers.Normalization(axis=-1, mean=None, variance=None, invert=False,),
        layers.Dense(units=10, activation='relu'),
        layers.Dense(units=64, activation='relu'),
        layers.Dense(units=1, activation='sigmoid')
    ])

opt = keras.optimizers.SGD(learning_rate=0.0001)

model.compile(optimizer=opt, loss='binary_crossentropy', metrics=['accuracy'])

model.fit(X_train, y_train, epochs=10)

**epoch output**

Epoch 1/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4974
Epoch 2/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 3/10
218/218 [==============================] - 0s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 4/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977
Epoch 5/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977
Epoch 6/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977
Epoch 7/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 8/10
218/218 [==============================] - 0s 1ms/step - loss: nan - accuracy: 0.4977
Epoch 9/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 10/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977

</code>```

I can provide more data if need be, below I will add a section of the CSV I am using in case there is any formatting issues

(NOTE: the formatting in the last couple of columns appears offset due to the length of the words

```<code>   HomePlanet CryoSleep Cabin   Destination     Age     VIP  RoomService FoodCourt ShoppingMall Spa VRDeck
0   Earth   True    G/3/S   TRAPPIST-1e     27.0    False   0.0     0.0     0.0     0.0     0.0
1   Earth   False   F/4/S   TRAPPIST-1e     19.0    False   0.0     9.0     0.0     2823.0  0.0
2   Europa  True    C/0/S   55 Cancri e     31.0    False   0.0     0.0     0.0     0.0     0.0
3   Europa  False   C/1/S   TRAPPIST-1e     38.0    False   0.0     6652.0  0.0     181.0   585.0
4   Earth   False   F/5/S   TRAPPIST-1e     20.0    False   10.0    0.0     635.0   0.0     0.0
</code>```

I have tried both sgd and adam optimizers, I have reduced the learning rate and tried categorical, binary and sparse categorical crossentropy for loss though sparse categorical does not run and returns errors. I have tried 2, 3 and 4 layer models and multiple different activation types. Each one either makes no change or it changes the value at which the accuracy plateaus but no real fix. Any thing could help though so if you do think I should retry a fix I am totally willing, at this point I'm completely lost on why this isn't working

Title: Need help on first Tensorflow model

Body:
TLDR: Code below creates tensorflow model to predict boolean value based on categorical and numerical input from csv, currently outputting loss nan and unchanging accuracy

UPDATE: I have gotten the accuracy to read at 1.00 through changes to the preprocessing of the csv, but the loss is still nan so I think it may be due to the way that the data is fed to the model, not the model itself

So, I've been trying to get into machine learning and finally entered into the Kaggle titanic competition to have a project to work on for practice, currently though the code runs but the loss will output as nan and the accuracy may start off low, but by the second epoch it is always leveled off at the same value and does not change, it does not output any errors. Here is the jupyter notebook

import tensorflow as tf
import keras
from keras import layers
from keras.layers import Dense
from keras.models import Sequential, load_model
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as np
from keras.optimizers import SGD
np.set_printoptions(precision=3, suppress=True)

df = pd.read_csv('data/Titanic/train.csv', skipinitialspace=True)
test = pd.read_csv('data/Titanic/test.csv', skipinitialspace=True)
test = test.drop(['PassengerId', 'Name'], axis=1)

def convert(frame):
    frame['HomePlanet'] = pd.Categorical(frame['HomePlanet'])
    frame['HomePlanet'] = frame.HomePlanet.cat.codes

    frame['CryoSleep'] = pd.Categorical(frame['CryoSleep'])
    frame['CryoSleep'] = frame.CryoSleep.cat.codes

    frame['Cabin'] = pd.Categorical(frame['Cabin'])
    frame['Cabin'] = frame.Cabin.cat.codes

    frame['Destination'] = pd.Categorical(frame['Destination'])
    frame['Destination'] = frame.Destination.cat.codes

    frame['VIP'] = pd.Categorical(frame['VIP'])
    frame['VIP'] = frame.VIP.cat.codes

    frame['Transported'] = pd.Categorical(frame['Transported'])
    frame['Transported'] = frame.Transported.cat.codes

    return frame

df = convert(df)

X = df.drop(['PassengerId', 'Name', 'Transported'], axis=1)
y = df['Transported']

tf.convert_to_tensor(X)

X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2)

normalizer1 = tf.keras.layers.experimental.preprocessing.Normalization(axis=None)
normalizer1.adapt(X_train)

model = Sequential([
        layers.Normalization(axis=-1, mean=None, variance=None, invert=False,),
        layers.Dense(units=10, activation='relu'),
        layers.Dense(units=64, activation='relu'),
        layers.Dense(units=1, activation='sigmoid')
    ])

opt = keras.optimizers.SGD(learning_rate=0.0001)

model.compile(optimizer=opt, loss='binary_crossentropy', metrics=['accuracy'])

model.fit(X_train, y_train, epochs=10)

**epoch output**

Epoch 1/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4974
Epoch 2/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 3/10
218/218 [==============================] - 0s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 4/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977
Epoch 5/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977
Epoch 6/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977
Epoch 7/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 8/10
218/218 [==============================] - 0s 1ms/step - loss: nan - accuracy: 0.4977
Epoch 9/10
218/218 [==============================] - 1s 2ms/step - loss: nan - accuracy: 0.4977
Epoch 10/10
218/218 [==============================] - 1s 3ms/step - loss: nan - accuracy: 0.4977

I can provide more data if need be, below I will add a section of the CSV I am using in case there is any formatting issues

(NOTE: the formatting in the last couple of columns appears offset due to the length of the words

   HomePlanet CryoSleep Cabin   Destination     Age     VIP  RoomService FoodCourt ShoppingMall Spa VRDeck
0   Earth   True    G/3/S   TRAPPIST-1e     27.0    False   0.0     0.0     0.0     0.0     0.0
1   Earth   False   F/4/S   TRAPPIST-1e     19.0    False   0.0     9.0     0.0     2823.0  0.0
2   Europa  True    C/0/S   55 Cancri e     31.0    False   0.0     0.0     0.0     0.0     0.0
3   Europa  False   C/1/S   TRAPPIST-1e     38.0    False   0.0     6652.0  0.0     181.0   585.0
4   Earth   False   F/5/S   TRAPPIST-1e     20.0    False   10.0    0.0     635.0   0.0     0.0

I have tried both sgd and adam optimizers, I have reduced the learning rate and tried categorical, binary and sparse categorical crossentropy for loss though sparse categorical does not run and returns errors. I have tried 2, 3 and 4 layer models and multiple different activation types. Each one either makes no change or it changes the value at which the accuracy plateaus but no real fix. Any thing could help though so if you do think I should retry a fix I am totally willing, at this point I'm completely lost on why this isn't working


问:
VUE: How to change generated image names?
i want to modify generated image names, but cant make it works. With this i have a error of type:

TypeError: Cannot set properties of undefined (setting 'name')

What i doing wrong?

vue.config.js

```<code>const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  runtimeCompiler: true,
  assetsDir: "assets",
  css: {
    loaderOptions: {
      sass: {
        additionalData: `
          @import "@/modules/functions.scss";
          @import "@/modules/mixins.scss";
          @import "@/modules/variables.scss";
        `,
      },
      css: {
        modules: {
          localIdentName: "style-[hash:5]",
        },
      },
    },
  },
  chainWebpack: config => {
    config.module
    .rule('images')
    .test(/\.(png|jpe?g|gif|webp)(\?.*)?$/)
    .use('url-loader')
    .loader('file-loader')
    .tap(options => {
      options.name = 'img/[name].[ext]'
      return options
    })
  }
});
</code>```

Body:
i want to modify generated image names, but cant make it works. With this i have a error of type:

TypeError: Cannot set properties of undefined (setting 'name')

What i doing wrong?

vue.config.js

const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  runtimeCompiler: true,
  assetsDir: "assets",
  css: {
    loaderOptions: {
      sass: {
        additionalData: `
          @import "@/modules/functions.scss";
          @import "@/modules/mixins.scss";
          @import "@/modules/variables.scss";
        `,
      },
      css: {
        modules: {
          localIdentName: "style-[hash:5]",
        },
      },
    },
  },
  chainWebpack: config => {
    config.module
    .rule('images')
    .test(/\.(png|jpe?g|gif|webp)(\?.*)?$/)
    .use('url-loader')
    .loader('file-loader')
    .tap(options => {
      options.name = 'img/[name].[ext]'
      return options
    })
  }
});


问:
Can't install scikit-learn
I am currently trying to install scikit-learn module to my Apple M1 macbook. Whatever I do, whichever way I follow returns me an error. First, It got stuck on

```<code>Installing build dependencies ...
</code>```

Then after I followed a similar post in stackoverflow, the error message I got changed.

```<code>Collecting scikit-learn
  Using cached scikit-learn-1.2.0.tar.gz (7.2 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [77 lines of output]
      Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Windows" and platform_python_implementation != "PyPy"' don't match your environment
      Collecting setuptools<60.0
        Using cached setuptools-59.8.0-py3-none-any.whl (952 kB)
      Collecting wheel
        Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
      Collecting Cython>=0.29.24
        Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
      Collecting oldest-supported-numpy
        Using cached oldest_supported_numpy-2022.11.19-py3-none-any.whl (4.9 kB)
      Collecting scipy>=1.3.2
        Using cached scipy-1.9.3.tar.gz (42.1 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
      ERROR: Exception:
      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
          status = run_func(*args)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
          return func(self, options, args)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 400, in run
          requirement_set = resolver.resolve(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
          result = self._result = resolver.resolve(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
          if not criterion.candidates:
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
          return bool(self._sequence)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
          return any(self)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
          candidate = func()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
          self._link_candidate_cache[link] = LinkCandidate(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
          super().__init__(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
          self.dist = self._prepare()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
          dist = self._prepare_distribution()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
          return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 491, in prepare_linked_requirement
          return self._prepare_linked_requirement(req, parallel_builds)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 577, in _prepare_linked_requirement
          dist = _get_prepared_distribution(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
          abstract_dist.prepare_distribution_metadata(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 48, in prepare_distribution_metadata
          self._install_build_reqs(finder)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 118, in _install_build_reqs
          build_reqs = self._get_build_requires_wheel()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 95, in _get_build_requires_wheel
          return backend.get_requires_for_build_wheel()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 685, in get_requires_for_build_wheel
          return super().get_requires_for_build_wheel(config_settings=cs)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 173, in get_requires_for_build_wheel
          return self._call_hook('get_requires_for_build_wheel', {
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 319, in _call_hook
          raise BackendUnavailable(data.get('traceback', ''))
      pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 77, in _build_backend
          obj = import_module(mod_path)
        File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
      ModuleNotFoundError: No module named 'mesonpy'

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
</code>```

I tried to do anything I saw on internet about this problem but nothing worked, what should I do?

Title: Can't install scikit-learn

Body:
I am currently trying to install scikit-learn module to my Apple M1 macbook. Whatever I do, whichever way I follow returns me an error. First, It got stuck on

Installing build dependencies ...

Then after I followed a similar post in stackoverflow, the error message I got changed.

Collecting scikit-learn
  Using cached scikit-learn-1.2.0.tar.gz (7.2 MB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [77 lines of output]
      Ignoring numpy: markers 'python_version == "3.10" and platform_system == "Windows" and platform_python_implementation != "PyPy"' don't match your environment
      Collecting setuptools<60.0
        Using cached setuptools-59.8.0-py3-none-any.whl (952 kB)
      Collecting wheel
        Using cached wheel-0.38.4-py3-none-any.whl (36 kB)
      Collecting Cython>=0.29.24
        Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
      Collecting oldest-supported-numpy
        Using cached oldest_supported_numpy-2022.11.19-py3-none-any.whl (4.9 kB)
      Collecting scipy>=1.3.2
        Using cached scipy-1.9.3.tar.gz (42.1 MB)
        Installing build dependencies: started
        Installing build dependencies: finished with status 'done'
        Getting requirements to build wheel: started
        Getting requirements to build wheel: finished with status 'done'
      ERROR: Exception:
      Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
          status = run_func(*args)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
          return func(self, options, args)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 400, in run
          requirement_set = resolver.resolve(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
          result = self._result = resolver.resolve(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
          if not criterion.candidates:
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
          return bool(self._sequence)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
          return any(self)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
          candidate = func()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
          self._link_candidate_cache[link] = LinkCandidate(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
          super().__init__(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
          self.dist = self._prepare()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
          dist = self._prepare_distribution()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
          return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 491, in prepare_linked_requirement
          return self._prepare_linked_requirement(req, parallel_builds)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 577, in _prepare_linked_requirement
          dist = _get_prepared_distribution(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
          abstract_dist.prepare_distribution_metadata(
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 48, in prepare_distribution_metadata
          self._install_build_reqs(finder)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 118, in _install_build_reqs
          build_reqs = self._get_build_requires_wheel()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 95, in _get_build_requires_wheel
          return backend.get_requires_for_build_wheel()
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 685, in get_requires_for_build_wheel
          return super().get_requires_for_build_wheel(config_settings=cs)
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 173, in get_requires_for_build_wheel
          return self._call_hook('get_requires_for_build_wheel', {
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", line 319, in _call_hook
          raise BackendUnavailable(data.get('traceback', ''))
      pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
        File "/opt/homebrew/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 77, in _build_backend
          obj = import_module(mod_path)
        File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/importlib/__init__.py", line 126, in import_module
          return _bootstrap._gcd_import(name[level:], package, level)
        File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
        File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
        File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
      ModuleNotFoundError: No module named 'mesonpy'

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

I tried to do anything I saw on internet about this problem but nothing worked, what should I do?


问:
Is there a function in R for leaflet that does the same thing as eachLayer() in leaflet for javascript?
I am trying to get the layerIDs from all markers currently displayed on my leaflet map in my Shiny app.
The Problem is that the map is constantly being updated using leafletProxy during a simulation and at the start of each new loadstep, I would like to know what layerIds have already been plotted.

```<code>m <- leaflet() %>% addTiles() %>%

    leafletProxy(mapId = "m",
                 data = data_1) %>%
    addMarkers(lng = 1, lng = 2, layerId = "Marker_1")

    leafletProxy(mapId = "m",
                 data = data_2) %>%
    addMarkers(lng = 1, lng = 2, layerId = "Marker_2")
</code>```

A useful function exists for leaflet in javascript, but I couldn't find it's counterpart in R: http://leafletjs.com/reference.html#map-eachlayer

The solution proposed by Vlad (Get all layerIds or groups from leaflet) does not work for this specific case, since I am using the leafletProxy function to update the map.

```<code>l <- lapply(lapply(m$x$calls, function(x) x[[2]]), function(x) x[4][[1]])
layerIds <- unlist(l[sapply(l, function(x) {class(x) != "list" & !is.null(x)})])
</code>```

Body:
I am trying to get the layerIDs from all markers currently displayed on my leaflet map in my Shiny app.
The Problem is that the map is constantly being updated using leafletProxy during a simulation and at the start of each new loadstep, I would like to know what layerIds have already been plotted.

m <- leaflet() %>% addTiles() %>%

    leafletProxy(mapId = "m",
                 data = data_1) %>%
    addMarkers(lng = 1, lng = 2, layerId = "Marker_1")

    leafletProxy(mapId = "m",
                 data = data_2) %>%
    addMarkers(lng = 1, lng = 2, layerId = "Marker_2")

A useful function exists for leaflet in javascript, but I couldn't find it's counterpart in R: http://leafletjs.com/reference.html#map-eachlayer

The solution proposed by Vlad (Get all layerIds or groups from leaflet) does not work for this specific case, since I am using the leafletProxy function to update the map.

l <- lapply(lapply(m$x$calls, function(x) x[[2]]), function(x) x[4][[1]])
layerIds <- unlist(l[sapply(l, function(x) {class(x) != "list" & !is.null(x)})])


问:
Request fetch in nuxt3 not found, how to solve?
I'm realizing a fetch request in nuxt 3, the API sends the values but I get the error 404 not found.

```

error: 404
message: "Item requested not found."

url http://localhost:3000/schema/schema/log

The URL is ok, the API warns that sent the data but on the front, I get the error.

Body:
I'm realizing a fetch request in nuxt 3, the API sends the values but I get the error 404 not found.

error: 404
message: "Item requested not found."

url http://localhost:3000/schema/schema/log

The URL is ok, the API warns that sent the data but on the front, I get the error.


问:
react-native: handling wrong onScroll events inside child FlatList
I found one issue and can someone help me.

I use vertical scroll list(FlatList) and inside it i have also another vertical FlatList.

Inside child FlatList I use onScroll events for customise scroll animation.

issue: when I scroll parent FlatList I get onScroll events inside child and animation glitching.

How can I stop get wrong onScroll event inside child FlatList.

Also I do not use onScroll events inside parent component.

```<code><Flatlist
onScroll={
  Animated.event([{nativeEvent: {contentOffset: {y: scrollY}}}], {
  useNativeDriver: false,
  })
}
...
/>
</code>```

Body:
I found one issue and can someone help me.

I use vertical scroll list(FlatList) and inside it i have also another vertical FlatList.

Inside child FlatList I use onScroll events for customise scroll animation.

issue: when I scroll parent FlatList I get onScroll events inside child and animation glitching.

How can I stop get wrong onScroll event inside child FlatList.

Also I do not use onScroll events inside parent component.

<Flatlist
onScroll={
  Animated.event([{nativeEvent: {contentOffset: {y: scrollY}}}], {
  useNativeDriver: false,
  })
}
...
/>


Body:
def read_pict_data(path_2_data):
    path_2_data=r"C:\Users\ichat\Desktop\dataa.txt"
    patterns_all = read_pict_data(path_2_data)

""" Read dataa.text. 4 binary images of shape (32, 32).

    Parameters
    ----------
    path_2_data : str
        Path to data.

    Returns
    ----------
    numpy.ndarray
        Data as array of shape (4, 1024)
    """
    ndim = 1024
    return np.loadtxt(path_2_data, delimiter=" ", dtype=int).reshape(-1, ndim)

# Get first 3 images.
patterns = patterns_all[:3,:]
print(patterns.shape)

hello, im trying to read 4 binary images from this txt file dataa.txt,

+1 +1 +1 -1 -1 -1 +1 +1 +1 +1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +1 +1 +1 +1 +1 -1 -1 -1 -1 -1 +1 +1 +1 -1 -1 -1 +1 +1 +1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +1 +1 +1 +1 -1 -1 -1 -1 -1 +1 +1 -1 -1 -1 +1 +1 +1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +1 +1 +1 +1 -1 -1 -1 -1 -1 +1 +1 -1 -1 -1 +1 -1 +1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1
-1 -1 -1 -1 -1 +1 +1 +1 -1 -1 -1 -1 -1 -1 +1 +1 -1 -1 +1 +1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 +1 +1 -1 -1 -1 -1 -1 -1 -1 +1 +1 -1 -1 +1 +1 +1 -1 -1 -1 -1
-1 -1 -1 +1 -1 +1 -1 -1 -1 -1 -1 +1 +1 +1 +1 +1 -1 -1 -1 -1 -1 +1 +1 +1 -1 +1 +1 +1 -1 +1 +1 -1 -1 -1 -1 +1 -1 +1 -1 -1 -1 -1 +1 +1 +1 +1 +1 -1 -1 -1 -1 -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-1 +1 +1 -1 +1 +1 -1 -1 +1 +1 +1 -1 +1 +1 +1 +1 +1 +1 -1 +1 +1 +1 +1 -1 -1 +1 -1 -1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 -1 -1 +1 +1 +1 +1 +1 -1 -1 +1 +1 +1 -1 +1 +1 +1 +1 -1 -1 -1 +1 +1 -1 +1 +1 +1 +1 -1 +1 +1 +1 -1
-1 -1 +1 +1 +1 +1 +1 +1 -1 +1 +1 +1 +1 +1 +1 -1 -1 +1 -1 -1 +1 -1 -1 +1 -1 -1 -1 -1 +1 -1 +1 -1 -1 +1 +1 +1 -1 -1 +1 +1 -1 +1 +1 +1 +1 +1 -1 -1 -1

but it returns this error : "ValueError: could not convert string '' to int32 at row 0, column 115"

i cant find what its wrong with that, if i change the numbers of elements/line it still appears the same error in other positions. Anyone experiencing the same?


问:
Relative or absolute time stamps for DeepAR training data?
Suppose we would like to use DeepAR gluonts implementation to forecast the views of videos which are created at different times. Is it necessary / better to use the relative time stamps e.g. t_{created}, t_{created}+1,t_{created}+2,... thereby converting time series to the same relative time scale than using time stamps with absolute values? The paper seems to suggest the same, but I couldn't figure out whether this is already done in code or needs to be done while pre-processing the data. Many thanks!


问:
Trying to Update Properties of an object
I am trying to query the database and get the first and last name of a user and use the object maping to dynamicaly add them to what should be returned to the frontend.

but after the everything i dont get the the firstname and lastname on the retuened values. find the code and what i expect below

```<code>const getMyCrushRequest = async (req, res) => {
    // Check if user has sent any crush requests
    const findCrush = await CrushRequest.findAll({
        attributes: {exclude: ['requestFrom']},
        where: {requestFrom: req.user.id}
    });

    // If user has not sent any crush requests
    if(!findCrush || findCrush.length == 0){
        return res.status(StatusCodes.OK).send({
            success: false,
            message: 'you have not sent any crush requests'
        });
    }

    // Map the crush requests to include the first and last name of the recipient
    const requests = await Promise.all(findCrush.map(async (crush) => {
        const nameQuery = await User.findOne({
            attributes: ["firstname", "lastname"],
            where: {id: crush.requestTo}
        });

        // Add the user details to the crush request object
        crush.firstname = nameQuery.firstname;
        crush.lastname = nameQuery.lastname;

        return crush;
    }));

    // console.log (JSON.stringify(requests))
    // Return the mapped crush requests
    return res.status(StatusCodes.OK).json({
        success: true,
        message: 'Crush request retrieved successfully',
        requests: requests
    });
}
</code>```

Below is the response i get

```<code>{
    "success": true,
    "message": "Crush request retrieved successfully",
    "requests": [
        {
            "id": 2,
            "requestTo": "d8b60bcb-c1f4-41c9-8f0b-4f3baf734b06",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T16:45:02.000Z",
            "updatedAt": "2022-12-12T16:45:02.000Z"
        },
        {
            "id": 3,
            "requestTo": "f6516bd8-2577-468c-9779-3f271b6a03db",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T17:06:12.000Z",
            "updatedAt": "2022-12-12T17:06:12.000Z"
        }
    ]
}
</code>```

Here was what i espected

```<code>{
    "success": true,
    "message": "Crush request retrieved successfully",
    "requests": [
        {
            "id": 2,
            "requestTo": "d8b60bcb-c1f4-41c9-8f0b-4f3baf734b06",
            "firstname": "Somename",
            "lastname": "someorthername",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T16:45:02.000Z",
            "updatedAt": "2022-12-12T16:45:02.000Z"
        },
        {
            "id": 3,
            "requestTo": "f6516bd8-2577-468c-9779-3f271b6a03db",
            "firstname": "Somename",
            "lastname": "someorthername",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T17:06:12.000Z",
            "updatedAt": "2022-12-12T17:06:12.000Z"
        }
    ]
}
</code>```

Body:
I am trying to query the database and get the first and last name of a user and use the object maping to dynamicaly add them to what should be returned to the frontend.

but after the everything i dont get the the firstname and lastname on the retuened values. find the code and what i expect below

const getMyCrushRequest = async (req, res) => {
    // Check if user has sent any crush requests
    const findCrush = await CrushRequest.findAll({
        attributes: {exclude: ['requestFrom']},
        where: {requestFrom: req.user.id}
    });

    // If user has not sent any crush requests
    if(!findCrush || findCrush.length == 0){
        return res.status(StatusCodes.OK).send({
            success: false,
            message: 'you have not sent any crush requests'
        });
    }

    // Map the crush requests to include the first and last name of the recipient
    const requests = await Promise.all(findCrush.map(async (crush) => {
        const nameQuery = await User.findOne({
            attributes: ["firstname", "lastname"],
            where: {id: crush.requestTo}
        });

        // Add the user details to the crush request object
        crush.firstname = nameQuery.firstname;
        crush.lastname = nameQuery.lastname;

        return crush;
    }));

    // console.log (JSON.stringify(requests))
    // Return the mapped crush requests
    return res.status(StatusCodes.OK).json({
        success: true,
        message: 'Crush request retrieved successfully',
        requests: requests
    });
}

Below is the response i get

{
    "success": true,
    "message": "Crush request retrieved successfully",
    "requests": [
        {
            "id": 2,
            "requestTo": "d8b60bcb-c1f4-41c9-8f0b-4f3baf734b06",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T16:45:02.000Z",
            "updatedAt": "2022-12-12T16:45:02.000Z"
        },
        {
            "id": 3,
            "requestTo": "f6516bd8-2577-468c-9779-3f271b6a03db",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T17:06:12.000Z",
            "updatedAt": "2022-12-12T17:06:12.000Z"
        }
    ]
}

Here was what i espected

{
    "success": true,
    "message": "Crush request retrieved successfully",
    "requests": [
        {
            "id": 2,
            "requestTo": "d8b60bcb-c1f4-41c9-8f0b-4f3baf734b06",
            "firstname": "Somename",
            "lastname": "someorthername",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T16:45:02.000Z",
            "updatedAt": "2022-12-12T16:45:02.000Z"
        },
        {
            "id": 3,
            "requestTo": "f6516bd8-2577-468c-9779-3f271b6a03db",
            "firstname": "Somename",
            "lastname": "someorthername",
            "requestStatus": "pending",
            "createdAt": "2022-12-12T17:06:12.000Z",
            "updatedAt": "2022-12-12T17:06:12.000Z"
        }
    ]
}


问:
Creating new dataframes for every loop
I've been struggling to solve a problem but could not achieve a solution.

Basically, I'm trying to read JSONs page individually, convert it to a Pandas Dataframe and then store it in a different variable for each time during a for loop.
At the end I would stack each dataframe for create a big dataframe with all the information of each page.

My code:

```<code>#Creating a list to store the URLs that will be used to connect

teste = []
for page_num in range(1, 6):
    url = "pagina=" + str(page_num) + "&situacao=A&dataadmissaode=&codigoempresa=600"
    teste.append(url)

#Loading libraries

import http.client
import pandas as pd
import io
import requests
import json

# auth API
conn = http.client.HTTPSConnection("Company URL")
payload = 'user=MyUser&password=MyPassword'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("GET", "/login", payload, headers)
res = conn.getresponse()
data = res.read()

y = json.loads(data) #load auth and token
access_token = y.get("token", None) #just access token dynamically evey call

#second part: A for routine to execute the code for each URL generated previously in teste list.

my_dictionary = {} #empty dictionary for storing the info if possible
lista_infos = [] #empty list for storing the info if possible

for url in teste:
    conn = http.client.HTTPSConnection("my_web_site.com")
    payload = url
    headers = {
            'x-access-token': access_token,
              'Content-Type': 'application/x-www-form-urlencoded'
    }
    conn.request("GET", "/colaborador", payload, headers)
    res = conn.getresponse()
    data = res.read()
</code>```
```<code>#store in a dataframe and then append it to lista_infos

df_json = pd.read_json(io.StringIO(data.decode('utf-8')))
lista_infos.append(df_json)
</code>```

Is there another approach to properly store the data and then create a single dataframe with the info from df_json after every call?

I've tried creating a Dataframe of information obtained with a API which does not have any documentation.
I can't create a DataFrame with the info all requests together.

Title: Creating new dataframes for every loop

Body:
I've been struggling to solve a problem but could not achieve a solution.

Basically, I'm trying to read JSONs page individually, convert it to a Pandas Dataframe and then store it in a different variable for each time during a for loop.
At the end I would stack each dataframe for create a big dataframe with all the information of each page.

My code:

#Creating a list to store the URLs that will be used to connect

teste = []
for page_num in range(1, 6):
    url = "pagina=" + str(page_num) + "&situacao=A&dataadmissaode=&codigoempresa=600"
    teste.append(url)

#Loading libraries

import http.client
import pandas as pd
import io
import requests
import json

# auth API
conn = http.client.HTTPSConnection("Company URL")
payload = 'user=MyUser&password=MyPassword'
headers = {
  'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("GET", "/login", payload, headers)
res = conn.getresponse()
data = res.read()

y = json.loads(data) #load auth and token
access_token = y.get("token", None) #just access token dynamically evey call

#second part: A for routine to execute the code for each URL generated previously in teste list.

my_dictionary = {} #empty dictionary for storing the info if possible
lista_infos = [] #empty list for storing the info if possible

for url in teste:
    conn = http.client.HTTPSConnection("my_web_site.com")
    payload = url
    headers = {
            'x-access-token': access_token,
              'Content-Type': 'application/x-www-form-urlencoded'
    }
    conn.request("GET", "/colaborador", payload, headers)
    res = conn.getresponse()
    data = res.read()

#store in a dataframe and then append it to lista_infos

df_json = pd.read_json(io.StringIO(data.decode('utf-8')))
lista_infos.append(df_json)

Is there another approach to properly store the data and then create a single dataframe with the info from df_json after every call?

I've tried creating a Dataframe of information obtained with a API which does not have any documentation.
I can't create a DataFrame with the info all requests together.


问:
Abaqus MPI parallelization supported by Windows?
I am trying to run a job with MPI parallelization in Abaqus (on a private Windows PC) but the analysis doesn't start. Abaqus/CAE is not giving any error message but in the .log file the following line can be found:

TypeError: unsupported operand type(s) for +=: 'dict' and 'str'

This seems to be a python error? I modified the abaqus_v6 environment file to compile fortran by the following line:

compile_fortran += ['/names:lowercase',]

When the line is commented, the error message keeps occuring in the .log file though. So I think, this line should not be the problem. Has anybody an idea what could cause the error instead? Is MPI parallelization maybe not supported with windows (see link below)?

https://classes.engineering.wustl.edu/2009/spring/mase5513/abaqus/docs/v6.5/books/usb/default.htm?startat=pt03ch07s19aus70.html#usb-anl-aparallelmodes

I also tried running the job with verbose=3, the error occurs after the MPI part but the last line seems to be pointing to my .com file (which I cannot influence?).

Also, when running the job with thread parallelization everything works fine.

(I am using Abaqus 2020 v6.20.1 and the MPI Library from Microsoft v10.1.12498.18 is installed. Also there should be a MPI Library with the Intel oneAPI toolkit)


问:
Ways of overriding the behavior of the lexik/jwt-authentication-bundle to allow n number of public keys from an external source
Some background:
We have many applications, each with their own auth provider and public / private keypairs and their own key rotation.
When a new application is spun up or rotates its keys the public key is persisted elsewhere in a key store for other applications to pick up.

I have a Symfony 5.4 service that I want to authenticate users from these applications, the JWT provided by them includes the KID in the header, so the flow would be:

Receive request with JWT

Get KID from header

Lookup KID in our key store and load the public key

Verify that the JWT signature matches.

From them on the flow is as you would expect, Load JWSUser etc and the firewall works the way it should do.

I could just grab the key store and generate a large config file for it, but that is less than ideal at runtime and looking through the code it tries every alternative key until one verifies successfully, and that does not scale.

As far as I can see I have two options:

Extend Lexik\Bundle\JWTAuthenticationBundle\Services\JWSProvider\LcobucciJWSProvider with my own and override the verify method to go and find the right public key first.

Create my own JWSProvider that implements JWSProviderInterface and reproduce most of the logic except for how it gets public keys for verification.

Obviously of those two, #1 looks most simple, however the LcobucciJWSProvider is marked @final in the docblock even though the final keyword is not in use in the class itself, so it probably shouldn't be extended.

Am I right in thinking those are my two options?

I was initially hoping I could just implement my own keyloader but it looks like they don't ever receive information about the requested key, just if the public or private key is wanted.


问:
Cannot assign void to an implicitly-typed variable
I am new in C# I wrote this unitest

public async Task AddAshtray()
{
    var service = serviceProvider.GetService<IAshtrayService>();

    var Model = new AddAshtrayViewModel()
    {
        Brand = "Lubinski",
        CountryOfManufacturing = "China",
        ImageUrl = "https://m.media-amazon.com/images/I/51xDDJtDbBL._AC_SY1000_.jpg",
        Comment = "Really nice and colorful ashtray.",
        TypeId = 1,
    };

    int expectedReturnId = 1;

    var actualReturnId = await service.AddAshtraysAsync(Model);  // HERE

    Assert.That(actualReturnId, Is.EqualTo(expectedReturnId));
}
```

and when I create  var actualReturnId = await service.AddAshtraysAsync(Model);  I recive this error

Error  CS0815  Cannot assign void to an implicitly-typed variable

when I remove await the error appear to next line with code.

I google it, without success and I think this is special case so for that reason I didn't find anything.

Body:
I am new in C# I wrote this unitest

public async Task AddAshtray()
{
    var service = serviceProvider.GetService<IAshtrayService>();

    var Model = new AddAshtrayViewModel()
    {
        Brand = "Lubinski",
        CountryOfManufacturing = "China",
        ImageUrl = "https://m.media-amazon.com/images/I/51xDDJtDbBL._AC_SY1000_.jpg",
        Comment = "Really nice and colorful ashtray.",
        TypeId = 1,
    };

    int expectedReturnId = 1;

    var actualReturnId = await service.AddAshtraysAsync(Model);  // HERE

    Assert.That(actualReturnId, Is.EqualTo(expectedReturnId));
}

and when I create  var actualReturnId = await service.AddAshtraysAsync(Model);  I recive this error

Error  CS0815  Cannot assign void to an implicitly-typed variable

when I remove await the error appear to next line with code.

I google it, without success and I think this is special case so for that reason I didn't find anything.


问:
@Binding to an element of an array that must be reinitialized
Sorry if I did something wrong but it's my first time using stackoverflow to ask something.

You will se a View used to represent a Shot variable, which is part of a Shot Array.

I will have as many Row's View as the Array number of elements, to display in a List.

After different tries, leaving the variable shot as @State, I noticed that the TextField did not change the shotName stored value of the single element of the Array, but using Binding it does.

And now comes the problem, in the view where I display all this Row's View, I have at some point to reinitialize the Shot array shots = [Shot](), to create a new one appending new Values.

As soon as I do that, I got an Array out of bound error, during execution, that comes from the reinitialization of the shot array, because I suppose, the binding value loses its variable (?)

PS. i noticed that I did not get the error after the first reinitialization but after the second one

Unfortunately I must reinitialize that array, and so I don't really know how to solve that problem.

```<code>struct ShotRowView: View {
    @Binding var shot: Roll.Shot

    var body: some View {
        HStack {
            Text("\(shot.id)")
                .font(.title)

            TextField(
                "",
                text: $shot.shotName,
                prompt: Text("Shot Name")
            )
            .font(.title)
            .autocorrectionDisabled()

            Text("\(shot.date)")
                .font(.body)
            ShotImageView(image: shot.image)
        }
    }

}

</code>```
```<code>Here's how I use this secondary view in my primary view:
</code>```
```<code>

@State var shots: Array<Roll.Shot> = [Roll.Shot]()
private func viewRoll() -> some View{

        VStack {
            if showPopUp {
                RollPopUp(view: self)
            }else{
                NavigationView(){
                    List {
                        ForEach($shots){shot in
                                NavigationLink {
                                    LogoView()
                                } label: {
                                    ShotRowView(shot: shot)
                            }
                        }
                        .onDelete(perform: removeShot)
                    }
                    .padding([.top, .leading, .trailing])
                    .toolbar {
                        ToolbarItem (placement: .automatic) {
                            HStack {
                            }
                        }
                    }
                }
            }
        }
    }
</code>```
```<code></code>```

Body:
Sorry if I did something wrong but it's my first time using stackoverflow to ask something.

You will se a View used to represent a Shot variable, which is part of a Shot Array.

I will have as many Row's View as the Array number of elements, to display in a List.

After different tries, leaving the variable shot as @State, I noticed that the TextField did not change the shotName stored value of the single element of the Array, but using Binding it does.

And now comes the problem, in the view where I display all this Row's View, I have at some point to reinitialize the Shot array shots = [Shot](), to create a new one appending new Values.

As soon as I do that, I got an Array out of bound error, during execution, that comes from the reinitialization of the shot array, because I suppose, the binding value loses its variable (?)

PS. i noticed that I did not get the error after the first reinitialization but after the second one

Unfortunately I must reinitialize that array, and so I don't really know how to solve that problem.

struct ShotRowView: View {
    @Binding var shot: Roll.Shot

    var body: some View {
        HStack {
            Text("\(shot.id)")
                .font(.title)

            TextField(
                "",
                text: $shot.shotName,
                prompt: Text("Shot Name")
            )
            .font(.title)
            .autocorrectionDisabled()

            Text("\(shot.date)")
                .font(.body)
            ShotImageView(image: shot.image)
        }
    }

}

Here's how I use this secondary view in my primary view:

@State var shots: Array<Roll.Shot> = [Roll.Shot]()
private func viewRoll() -> some View{

        VStack {
            if showPopUp {
                RollPopUp(view: self)
            }else{
                NavigationView(){
                    List {
                        ForEach($shots){shot in
                                NavigationLink {
                                    LogoView()
                                } label: {
                                    ShotRowView(shot: shot)
                            }
                        }
                        .onDelete(perform: removeShot)
                    }
                    .padding([.top, .leading, .trailing])
                    .toolbar {
                        ToolbarItem (placement: .automatic) {
                            HStack {
                            }
                        }
                    }
                }
            }
        }
    }


问:
tabula only reads first two rows
I am trying to scrape a table from a online pdf, but the indexing is not working properly.

see table[0] and table[1]

What i want is a DataFrame with strings in all columns, so i can extract the ICD codes with regex.

```<code>import tabula
import pandas as pd
file = "https://www.bmj.com/content/bmj/suppl/2015/02/03/bmj.h246.DC1/junm020747.ww1_default.pdf"
table = tabula.read_pdf(file1,pages=[1,2,3],multiple_tables=True, guess=False)
table[0] # only part of first row in table
table[1] # all seperate rows of random rows in pdf
</code>```

What i am looking for is to get a dataframe with the text organized as the pdf looks like.
col1: e.g. Intracranial, col2: string, col:3 string

Title: tabula only reads first two rows

Body:
I am trying to scrape a table from a online pdf, but the indexing is not working properly.

see table[0] and table[1]

What i want is a DataFrame with strings in all columns, so i can extract the ICD codes with regex.

import tabula
import pandas as pd
file = "https://www.bmj.com/content/bmj/suppl/2015/02/03/bmj.h246.DC1/junm020747.ww1_default.pdf"
table = tabula.read_pdf(file1,pages=[1,2,3],multiple_tables=True, guess=False)
table[0] # only part of first row in table
table[1] # all seperate rows of random rows in pdf

What i am looking for is to get a dataframe with the text organized as the pdf looks like.
col1: e.g. Intracranial, col2: string, col:3 string


问:
How to commit to a github repo from a website (IN BROWSER) using javascript
I have a website that needs a JSON file to display a sort of timetable that's hosted on GitHub pages. People who do not know what javascript or GitHub are need to be able to change that JSON file each week.

To solve this I've created a website that reads data from a google sheet they can edit, and turns it into a js object at the click of a button. I now just need to get this object from the website into the JSON file on the first GitHub repo, but I have no clue how to do this. I know you can use the GitHub API somehow, but how??

P.s. I know making the token built into the website is a security risk which is why I plan to only put tokens in the google sheet, which requires the user to authenticate a google account before being accessed.


问:
Dynamic responseDecodable to handle responses from Alamofire
Please help me, I am writing a class for sending requests to the API. And I ran into the problem of dynamic substitution of the necessary structures for different answers.

I run into an error with different data types. How can this problem be solved?

```<code>open class Api {
***

    func data (_ method: Methods, _ parameters: (String, Any) ..., callback: @escaping (Any) -> Void) {
        ***

        var ofDecodable = [String: Any]()

        ofDecodable = [
            "auth.logout": saveResponse.self,
            "playlist.get": dataResponse.self
        ]

        let of = ofDecodable[_method].self

        AF.request(url!, method: .post, parameters: parameters) // Generic parameter 'T' could not be inferred
            .responseDecodable(of: of) { response in // Error: Cannot convert value of type 'Any?' to expected argument type 'T.Type'
                switch response.result {
                   case let .success(data):
                        print(data)
                        callback(data)

                   case let .failure(error):
                        print(error)
                    }
            }
    }

}

enum Methods: String {
    case auth_logout = "auth.logout"
    case playlist_get = "playlist.get"
}

public struct saveResponse: Codable  {
    let response: Response

    struct Response: Codable {
        let save: String
    }
}

public struct dataResponse: Codable {
    let response: Response

    struct Response: Codable {
        let id: String?
        let name: String?
    }
}

</code>```

Body:
Please help me, I am writing a class for sending requests to the API. And I ran into the problem of dynamic substitution of the necessary structures for different answers.

I run into an error with different data types. How can this problem be solved?

open class Api {
***

    func data (_ method: Methods, _ parameters: (String, Any) ..., callback: @escaping (Any) -> Void) {
        ***

        var ofDecodable = [String: Any]()

        ofDecodable = [
            "auth.logout": saveResponse.self,
            "playlist.get": dataResponse.self
        ]

        let of = ofDecodable[_method].self

        AF.request(url!, method: .post, parameters: parameters) // Generic parameter 'T' could not be inferred
            .responseDecodable(of: of) { response in // Error: Cannot convert value of type 'Any?' to expected argument type 'T.Type'
                switch response.result {
                   case let .success(data):
                        print(data)
                        callback(data)

                   case let .failure(error):
                        print(error)
                    }
            }
    }

}

enum Methods: String {
    case auth_logout = "auth.logout"
    case playlist_get = "playlist.get"
}

public struct saveResponse: Codable  {
    let response: Response

    struct Response: Codable {
        let save: String
    }
}

public struct dataResponse: Codable {
    let response: Response

    struct Response: Codable {
        let id: String?
        let name: String?
    }
}


问:
php - if a is lower or equal to b and a is greater than 540
how to write this:

if - $w is lower or equal to $h

and - $w is greater than 540 - do something

here is my try

in both cases I'm getting error 500

```<code>if($w =< $h && $w > 540){
  // do something
}

if($w <= $h && $w > 540){
  // do something
}
</code>```

Body:
how to write this:

if - $w is lower or equal to $h

and - $w is greater than 540 - do something

here is my try

in both cases I'm getting error 500

if($w =< $h && $w > 540){
  // do something
}

if($w <= $h && $w > 540){
  // do something
}


问:
angular unit testing spyOn method is not detected by storybook when running StoryBook
I have an existing big size angular application and I added storybook into it. When I run storybook I see a lot of error in the console and lot of them are related to not able detect jasmine pr spyOn method by storybook.

Whats going wrong? Am I missing something when running storybook?

```<code>Error:  - error TS2304: Cannot find name 'spyOn'.

102   spyOn(xxx, 'aaaa').and.returnValue(
      ~~~~~

    at addError ...
</code>```

Body:
I have an existing big size angular application and I added storybook into it. When I run storybook I see a lot of error in the console and lot of them are related to not able detect jasmine pr spyOn method by storybook.

Whats going wrong? Am I missing something when running storybook?

Error:  - error TS2304: Cannot find name 'spyOn'.

102   spyOn(xxx, 'aaaa').and.returnValue(
      ~~~~~

    at addError ...


问:
ParserError when using Pandas script
I'm getting the below error when trying to convert csx to xlx format using Pandas script.
I tried running the below script:

```<code>import os
os.chdir("/opt/alb_test/alb/albt1/Source/alb/al/conversion/scripts")

# Reading the csv file

import pandas as pd
print(pd.__file__)
df_new  = pd.read_csv("sourcefile.csv", sep="|", header=None).dropna(axis=1, how="all")

# saving xlsx file

df_new.to_excel("sourcefile.xlsx", index=False)
</code>```

I am getting the error mentioned below:

```<code>Traceback (most recent call last):
  File "/opt/alb_test/alb/albt1/Source/alb/al/conversion/scripts/pythn.py", line 13, in <module>
    df = pd.read_csv("ff_mdm_reject_report.csv", lineterminator='\n')
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/util/_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/util/_decorators.py", line 331, in wrapper
    return func(*args, **kwargs)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 611, in _read
    return parser.read(nrows)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 1778, in read
    ) = self._engine.read(  # type: ignore[attr-defined]
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 230, in read
    chunks = self._reader.read_low_memory(nrows)
  File "pandas/_libs/parsers.pyx", line 808, in pandas._libs.parsers.TextReader.read_low_memory
  File "pandas/_libs/parsers.pyx", line 866, in pandas._libs.parsers.TextReader._read_rows
  File "pandas/_libs/parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows
  File "pandas/_libs/parsers.pyx", line 1973, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 30488, saw 2
</code>```

Can anyone guide me how to fix it?

Thanks in advance!

Title: ParserError when using Pandas script

Body:
I'm getting the below error when trying to convert csx to xlx format using Pandas script.
I tried running the below script:

import os
os.chdir("/opt/alb_test/alb/albt1/Source/alb/al/conversion/scripts")

# Reading the csv file

import pandas as pd
print(pd.__file__)
df_new  = pd.read_csv("sourcefile.csv", sep="|", header=None).dropna(axis=1, how="all")

# saving xlsx file

df_new.to_excel("sourcefile.xlsx", index=False)

I am getting the error mentioned below:

Traceback (most recent call last):
  File "/opt/alb_test/alb/albt1/Source/alb/al/conversion/scripts/pythn.py", line 13, in <module>
    df = pd.read_csv("ff_mdm_reject_report.csv", lineterminator='\n')
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/util/_decorators.py", line 211, in wrapper
    return func(*args, **kwargs)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/util/_decorators.py", line 331, in wrapper
    return func(*args, **kwargs)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 950, in read_csv
    return _read(filepath_or_buffer, kwds)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 611, in _read
    return parser.read(nrows)
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/readers.py", line 1778, in read
    ) = self._engine.read(  # type: ignore[attr-defined]
  File "/opt/infa/MDW-env/lib/python3.9/site-packages/pandas/io/parsers/c_parser_wrapper.py", line 230, in read
    chunks = self._reader.read_low_memory(nrows)
  File "pandas/_libs/parsers.pyx", line 808, in pandas._libs.parsers.TextReader.read_low_memory
  File "pandas/_libs/parsers.pyx", line 866, in pandas._libs.parsers.TextReader._read_rows
  File "pandas/_libs/parsers.pyx", line 852, in pandas._libs.parsers.TextReader._tokenize_rows
  File "pandas/_libs/parsers.pyx", line 1973, in pandas._libs.parsers.raise_parser_error
pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 30488, saw 2

Can anyone guide me how to fix it?

Thanks in advance!


问:
No such module 'GoogleMobileAds'
I am new to iOS app development and i was learning how to implement admob ads. After importing the google mobile ads sdk and initializing the sdk and showing test ads, I noticed something strange when I exited xcode and reopening. There is now a duplicated of the project . When I show the location of the folder, I saw LearningAds.xcodeproj  and LearningAds.xcworkspace The LearningAds.xcworkspace opens and even build on the simulator but the LearningAds.xcodeproj  does not even build it gives two  error saying

No such module 'GoogleMobileAds'

Title: No such module 'GoogleMobileAds'


问:
How do i access the original filename inside the upload method of a custom service written for active storage in ruby on rails?
I am trying to implement a custom service for google drive for active storage, I want to upload files to google drive using the original name and not with the key as the name, but I couldn't find a way to access or to pass original filename inside the upload method.

My upload method:

```<code>module ActiveStorage
  class Service::GoogleDriveService < Service

    # initialization code

    def upload(key, io, checksum: nil, **options)
     # How do i acces filename here?
    end

  end
end

</code>```

options only contains content_type property, which is the case for most file types as upload method is called by active storage internally with service_metadata (parameter name options in upload method) given by:

inside

```<code>class ActiveStorage::Blob < ActiveStorage::Record
</code>```
```<code>def upload_without_unfurling(io) #:nodoc:
  service.upload key, io, checksum: checksum, **service_metadata
end
</code>```
```<code>def service_metadata
  if forcibly_serve_as_binary?
    { content_type: ActiveStorage.binary_content_type, disposition: :attachment, filename: filename }
  elsif !allowed_inline?
    { content_type: content_type, disposition: :attachment, filename: filename }
  else
    { content_type: content_type }
  end
end
</code>```

Also io.class is File, whereas the original io submitted was tempfile generated automatically as result of form submission.

Now, how do I access filename, or pass it without invoking upload command manually?

Body:
I am trying to implement a custom service for google drive for active storage, I want to upload files to google drive using the original name and not with the key as the name, but I couldn't find a way to access or to pass original filename inside the upload method.

My upload method:

module ActiveStorage
  class Service::GoogleDriveService < Service

    # initialization code

    def upload(key, io, checksum: nil, **options)
     # How do i acces filename here?
    end

  end
end

options only contains content_type property, which is the case for most file types as upload method is called by active storage internally with service_metadata (parameter name options in upload method) given by:

inside

class ActiveStorage::Blob < ActiveStorage::Record

def upload_without_unfurling(io) #:nodoc:
  service.upload key, io, checksum: checksum, **service_metadata
end

def service_metadata
  if forcibly_serve_as_binary?
    { content_type: ActiveStorage.binary_content_type, disposition: :attachment, filename: filename }
  elsif !allowed_inline?
    { content_type: content_type, disposition: :attachment, filename: filename }
  else
    { content_type: content_type }
  end
end

Also io.class is File, whereas the original io submitted was tempfile generated automatically as result of form submission.

Now, how do I access filename, or pass it without invoking upload command manually?


问:
SwiftUI localization swizzle on NSBundle
In SwiftUI when using a view like Text("some value"), the SwiftUI framework automatically assumes "some value" is a LocalizedStringKey and it fetches the stored localized value from Localizable.strings (based on the locale).

For example:

```<code>struct MyView: View {
  var body: some View {
    Text("some value")
  }
}
</code>```
```<code>//Localizable.strings
"some value" = "the translated value";
</code>```

And the result would show "the translated value" on the screen.

In order to return custom localized values dynamically (in runtime), instead of the ones in Localizable.strings, I tried to swizzle the Bundle.main method which handles localization by the UIKit framework:

Bundle.main.localizedString(forKey: "some value", value: "default-value", table: nil)

This is how the swizzle performed in my case:

```<code>func swizzleLocalizationMethods() {
  let originalSelector = #selector(localizedString(forKey:value:table:))

  guard let originalMethod = class_getInstanceMethod(self, originalSelector) else { return }

  let customSelector = #selector(customLocalizedString(forKey:value:table:))

  guard let customMethod = class_getInstanceMethod(self, mySelector) else { return }

  method_exchangeImplementations(orginalMethod, customMethod)
}
</code>```

Then in customLocalizedString, I could return a desired value based on the key in runtime.

The above works perfectly in a UIKit project, since in my project have always use directly NSLocalizedString("some value", "")

For example:

```<code>myLabel.text = NSLocalizedString("some value", "")
</code>```

But seems in SwiftUI localization works differently internally, when trying to use Text("some value"), because the swizzled method, customLocalizedString is not being called unless I explicitly use it like this:

```<code>Text(NSLocalizedString("some value", ""))
</code>```

Something which I want to avoid, and keep using it more cleanly like this Text("some value")

My question:
Does it mean SwiftUI has some other internal way when it loads the Localizable.strings keys I set when using Text("key"), instead of going through the method Bundle.main.localizedString(...)?

Does anyone know more about it?

Thanks

Body:
In SwiftUI when using a view like Text("some value"), the SwiftUI framework automatically assumes "some value" is a LocalizedStringKey and it fetches the stored localized value from Localizable.strings (based on the locale).

For example:

struct MyView: View {
  var body: some View {
    Text("some value")
  }
}

//Localizable.strings
"some value" = "the translated value";

And the result would show "the translated value" on the screen.

In order to return custom localized values dynamically (in runtime), instead of the ones in Localizable.strings, I tried to swizzle the Bundle.main method which handles localization by the UIKit framework:

Bundle.main.localizedString(forKey: "some value", value: "default-value", table: nil)

This is how the swizzle performed in my case:

func swizzleLocalizationMethods() {
  let originalSelector = #selector(localizedString(forKey:value:table:))

  guard let originalMethod = class_getInstanceMethod(self, originalSelector) else { return }

  let customSelector = #selector(customLocalizedString(forKey:value:table:))

  guard let customMethod = class_getInstanceMethod(self, mySelector) else { return }

  method_exchangeImplementations(orginalMethod, customMethod)
}

Then in customLocalizedString, I could return a desired value based on the key in runtime.

The above works perfectly in a UIKit project, since in my project have always use directly NSLocalizedString("some value", "")

For example:

myLabel.text = NSLocalizedString("some value", "")

But seems in SwiftUI localization works differently internally, when trying to use Text("some value"), because the swizzled method, customLocalizedString is not being called unless I explicitly use it like this:

Text(NSLocalizedString("some value", ""))

Something which I want to avoid, and keep using it more cleanly like this Text("some value")

My question:
Does it mean SwiftUI has some other internal way when it loads the Localizable.strings keys I set when using Text("key"), instead of going through the method Bundle.main.localizedString(...)?

Does anyone know more about it?

Thanks