问:
React-Navigation requireNativeComponent: "RNSScreenStackHeaderConfig" was not found in the UIManager
=> MacOS Monterey Version 12.6.2

=> Xcode Version 14.2

Bellow is my package version:-

```<code>"@react-native-async-storage/async-storage": "^1.17.11",
"@react-navigation/native": "^6.1.2",
"@react-navigation/native-stack": "^6.9.8",
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2"
</code>```

Hear is my Navigation File code:-

```<code>import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import * as React from 'react';
import ScreenManager from './Screens/ScreenManager';

const Stack = createNativeStackNavigator();

export default MyStack = () => {
    return (
        <NavigationContainer>
            <Stack.Navigator
                screenOptions={{
                    headerShown: false
                }}
            >
                <Stack.Screen
                    name="Home"
                    component={ScreenManager}
                />
           </Stack.Navigator>
        </NavigationContainer>
    );
};
</code>```

Showing this error in Simulator

i am install react navigation dependency from follow bellow url =>
https://reactnative.dev/docs/navigation

and also try pod install command. but still getting fail to run my application.

Body:
=> MacOS Monterey Version 12.6.2

=> Xcode Version 14.2

Bellow is my package version:-

"@react-native-async-storage/async-storage": "^1.17.11",
"@react-navigation/native": "^6.1.2",
"@react-navigation/native-stack": "^6.9.8",
"react": "18.1.0",
"react-native": "0.70.6",
"react-native-safe-area-context": "^4.4.1",
"react-native-screens": "^3.18.2"

Hear is my Navigation File code:-

import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import * as React from 'react';
import ScreenManager from './Screens/ScreenManager';

const Stack = createNativeStackNavigator();

export default MyStack = () => {
    return (
        <NavigationContainer>
            <Stack.Navigator
                screenOptions={{
                    headerShown: false
                }}
            >
                <Stack.Screen
                    name="Home"
                    component={ScreenManager}
                />
           </Stack.Navigator>
        </NavigationContainer>
    );
};

Showing this error in Simulator

i am install react navigation dependency from follow bellow url =>
https://reactnative.dev/docs/navigation

and also try pod install command. but still getting fail to run my application.


来源: stackexchange

问:
array of object destruction javascript
So i have an array of response from BE as below:

```<code>const data = [
        {
            "sku": "30as4",
            "sku_name": "AHH Rasd",
            "plant": "Kasd",
            "base_qty": 3as8,
            "uom": "DUS",
            "valid_from": "2017-03-06T16:59:48.000Z",
            "valid_to": "9999-12-30T16:59:48.000Z",
            "status": "Active",
            "component": [
                {
                    "plant": "Kasd",
                    "material": "2123asd00052",
                    "material_name": "asdasd",
                    "qty": 31ad8,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd",
                    "material": "2023asd44",
                    "material_name": "sadaasd",
                    "qty": 3766.416,
                    "uom": "PC",
                    "type": "pm"
                }
            ],

        },
        {
            "sku": "30asd34",
            "sku_name": "asdaad xasd",
            "plant": "Kasd18",
            "base_qty": 3asd,
            "uom": "DUS",
            "valid_from": "2017-11-15T16:59:48.000Z",
            "valid_to": "9999-12-30T16:59:48.000Z",
            "status": "Active",
            "component": [
                {
                    "plant": "Kasd18",
                    "material": "2asdsa0",
                    "material_name": "asdasd",
                    "qty": 313.868,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd18",
                    "material": "201asd057",
                    "material_name": "asdasd",
                    "qty": 5.901,
                    "uom": "ROL",
                    "type": "pm"
                }
            ],

        }
    ]
</code>```

i try to destruct it just to get the component into one new array of object that contains all value from both component into one, here is my try:

```<code>const dataComponent = dataSpec.map((el) => {
    if (el.hasOwnProperty("component")) {
      return [...el.component];
    }
  });
  console.log("dataComponent", dataComponent);
</code>```

instead of returning the object, it return the array of the component and not merge it, here is my expected result:

```<code>      [
                {
                    "plant": "Kasd18",
                    "material": "2asdsa0",
                    "material_name": "asdasd",
                    "qty": 313.868,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd18",
                    "material": "201asd057",
                    "material_name": "asdasd",
                    "qty": 5.901,
                    "uom": "ROL",
                    "type": "pm"
                }, {
                    "plant": "Kasd",
                    "material": "2123asd00052",
                    "material_name": "asdasd",
                    "qty": 31ad8,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd",
                    "material": "2023asd44",
                    "material_name": "sadaasd",
                    "qty": 3766.416,
                    "uom": "PC",
                    "type": "pm"
                }
            ]
</code>```

any help on this on how to properly destruct it and set it into one array of object...

ContentLicense: CC BY-SA 4.0

Title: array of object destruction javascript

Body:
So i have an array of response from BE as below:

const data = [
        {
            "sku": "30as4",
            "sku_name": "AHH Rasd",
            "plant": "Kasd",
            "base_qty": 3as8,
            "uom": "DUS",
            "valid_from": "2017-03-06T16:59:48.000Z",
            "valid_to": "9999-12-30T16:59:48.000Z",
            "status": "Active",
            "component": [
                {
                    "plant": "Kasd",
                    "material": "2123asd00052",
                    "material_name": "asdasd",
                    "qty": 31ad8,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd",
                    "material": "2023asd44",
                    "material_name": "sadaasd",
                    "qty": 3766.416,
                    "uom": "PC",
                    "type": "pm"
                }
            ],

        },
        {
            "sku": "30asd34",
            "sku_name": "asdaad xasd",
            "plant": "Kasd18",
            "base_qty": 3asd,
            "uom": "DUS",
            "valid_from": "2017-11-15T16:59:48.000Z",
            "valid_to": "9999-12-30T16:59:48.000Z",
            "status": "Active",
            "component": [
                {
                    "plant": "Kasd18",
                    "material": "2asdsa0",
                    "material_name": "asdasd",
                    "qty": 313.868,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd18",
                    "material": "201asd057",
                    "material_name": "asdasd",
                    "qty": 5.901,
                    "uom": "ROL",
                    "type": "pm"
                }
            ],

        }
    ]

i try to destruct it just to get the component into one new array of object that contains all value from both component into one, here is my try:

const dataComponent = dataSpec.map((el) => {
    if (el.hasOwnProperty("component")) {
      return [...el.component];
    }
  });
  console.log("dataComponent", dataComponent);

instead of returning the object, it return the array of the component and not merge it, here is my expected result:

      [
                {
                    "plant": "Kasd18",
                    "material": "2asdsa0",
                    "material_name": "asdasd",
                    "qty": 313.868,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd18",
                    "material": "201asd057",
                    "material_name": "asdasd",
                    "qty": 5.901,
                    "uom": "ROL",
                    "type": "pm"
                }, {
                    "plant": "Kasd",
                    "material": "2123asd00052",
                    "material_name": "asdasd",
                    "qty": 31ad8,
                    "uom": "PC",
                    "type": "pm"
                },
                {
                    "plant": "Kasd",
                    "material": "2023asd44",
                    "material_name": "sadaasd",
                    "qty": 3766.416,
                    "uom": "PC",
                    "type": "pm"
                }
            ]

any help on this on how to properly destruct it and set it into one array of object...


问:
Packages installed with Melpa disappear after restarting Emacs
When I install a package from Melpa in Emacs (version 27.1 on Ubuntu 22.04), the package status changes from 'available' to 'installed', although in the compilation window it is listed as 'available obsolete', but otherwise it appears to install normally. When I restart Emacs and try to load the package from my init.el file, however, I receive an error that the file cannot be found and the package did not load, and the package appears as available again in the package list.

I have tried deleting my elpa directory and restarting, but it didn't work.

Many thanks in advance for any help!


问:
I want to use a common method for n similar charts. My barrier is to write the chart name dynamically over a variable. How can I do this?
I have to use several charts in my C# form app. Each chart shall visualize a measuring curve of the related test-step. There is no fix defined amount of test steps. (2…16).

Normaly I would write n times the same chart drwaing method , just with different chart names (Chart1,Chart2....)

In order to shorten my code, I want to call always the same chart drawing method with the "step_no" input parameter. But the problem is that I cannot declare the chart control's name (Chart1, Chart2, Chart3…Chartn) over my step no.

How can I use one method with input parameter “step no”, that will draw the related chart(n)?

Here is my actual method where I draw the chart1. But my main barrier is, that I don't know how to write the chart name over a variable.

```<code>public void Draw_Chart(int step_no)
{
    chart1.Series.Clear();
    chart1.Titles.Clear();
    chart1.Legends.Clear();
    var newSeries_1 = new Series();
    var newSeries_2 = new Series();
    newSeries_1.ChartType = SeriesChartType.Line;
    newSeries_2.ChartType = SeriesChartType.Line;
    chart1.Series.Add(newSeries_1);
    chart1.Series.Add(newSeries_2);
    List_X_Axis.Clear();

    for (int w = 0 ; w <= 940; w++)
    {
        parameter_value_chartX[w] = w;
        //parameter_value_chartY1[w] = 150;
        //parameter_value_chartY1[w] = 250;
    }

    newSeries_1.Points.DataBindXY(parameter_value_chartX, parameter_value_chartY1);
    newSeries_2.Points.DataBindXY(parameter_value_chartX, parameter_value_chartY2);

    chart1.BackColor = Color.Gray;
    chart1.ChartAreas[0].AxisX.Title = ".";
    chart1.ChartAreas[0].AxisY.Title = "mm";
    chart1.ChartAreas[0].AxisY.TitleForeColor = Color.Cyan;
    chart1.ChartAreas[0].AxisY.LabelStyle.ForeColor = Color.Cyan;
    chart1.ChartAreas[0].AxisX.Minimum = 0d;
    chart1.Series[0].Color = Color.Cyan;
    chart1.ChartAreas[0].AxisY.Minimum = cur_scale_min;
    chart1.ChartAreas[0].AxisY.Maximum = cur_scale_max;
    chart1.ChartAreas[0].AxisY2.Enabled = AxisEnabled.True;
    chart1.ChartAreas[0].AxisY2.Minimum = pos_scale_min;
    chart1.ChartAreas[0].AxisY2.Maximum = pos_scale_max;
    chart1.ChartAreas[0].AxisY2.Title = "% of Max. Current";
    chart1.ChartAreas[0].AxisY2.TitleForeColor = Color.Yellow;
    chart1.ChartAreas[0].AxisY2.LabelStyle.ForeColor = Color.Yellow;
    chart1.ChartAreas[0].AxisY2.MajorGrid.LineColor = Color.Silver;
    chart1.ChartAreas[0].AxisY2.MajorTickMark.LineColor = Color.Silver;
    chart1.Series[1].YAxisType = AxisType.Secondary;
    chart1.Series[1].Color = Color.Yellow;
}
</code>```

Body:
I have to use several charts in my C# form app. Each chart shall visualize a measuring curve of the related test-step. There is no fix defined amount of test steps. (2…16).

Normaly I would write n times the same chart drwaing method , just with different chart names (Chart1,Chart2....)

In order to shorten my code, I want to call always the same chart drawing method with the "step_no" input parameter. But the problem is that I cannot declare the chart control's name (Chart1, Chart2, Chart3…Chartn) over my step no.

How can I use one method with input parameter “step no”, that will draw the related chart(n)?

Here is my actual method where I draw the chart1. But my main barrier is, that I don't know how to write the chart name over a variable.

public void Draw_Chart(int step_no)
{
    chart1.Series.Clear();
    chart1.Titles.Clear();
    chart1.Legends.Clear();
    var newSeries_1 = new Series();
    var newSeries_2 = new Series();
    newSeries_1.ChartType = SeriesChartType.Line;
    newSeries_2.ChartType = SeriesChartType.Line;
    chart1.Series.Add(newSeries_1);
    chart1.Series.Add(newSeries_2);
    List_X_Axis.Clear();

    for (int w = 0 ; w <= 940; w++)
    {
        parameter_value_chartX[w] = w;
        //parameter_value_chartY1[w] = 150;
        //parameter_value_chartY1[w] = 250;
    }

    newSeries_1.Points.DataBindXY(parameter_value_chartX, parameter_value_chartY1);
    newSeries_2.Points.DataBindXY(parameter_value_chartX, parameter_value_chartY2);

    chart1.BackColor = Color.Gray;
    chart1.ChartAreas[0].AxisX.Title = ".";
    chart1.ChartAreas[0].AxisY.Title = "mm";
    chart1.ChartAreas[0].AxisY.TitleForeColor = Color.Cyan;
    chart1.ChartAreas[0].AxisY.LabelStyle.ForeColor = Color.Cyan;
    chart1.ChartAreas[0].AxisX.Minimum = 0d;
    chart1.Series[0].Color = Color.Cyan;
    chart1.ChartAreas[0].AxisY.Minimum = cur_scale_min;
    chart1.ChartAreas[0].AxisY.Maximum = cur_scale_max;
    chart1.ChartAreas[0].AxisY2.Enabled = AxisEnabled.True;
    chart1.ChartAreas[0].AxisY2.Minimum = pos_scale_min;
    chart1.ChartAreas[0].AxisY2.Maximum = pos_scale_max;
    chart1.ChartAreas[0].AxisY2.Title = "% of Max. Current";
    chart1.ChartAreas[0].AxisY2.TitleForeColor = Color.Yellow;
    chart1.ChartAreas[0].AxisY2.LabelStyle.ForeColor = Color.Yellow;
    chart1.ChartAreas[0].AxisY2.MajorGrid.LineColor = Color.Silver;
    chart1.ChartAreas[0].AxisY2.MajorTickMark.LineColor = Color.Silver;
    chart1.Series[1].YAxisType = AxisType.Secondary;
    chart1.Series[1].Color = Color.Yellow;
}


问:
How to fetch all specific PRODUCT_NAME that has 200 - 50 QUANTITY
Hi I'm beginner developer, I'm making right now a table that need to be filled by products that have 200 to 50 quantity left.

$sql = "SELECT * FROM products ORDER BY (QUANTITY) WHERE QUANTITY = '200-50' DESC limit  $start_from,$num_per_page";
$result = $connection->query($sql);
```
<p>Hi I'm here again, I follow the instruction about WHERE and ORDER BY, but there is a error too. what is he error of this code?</p>
<pre class="lang-php prettyprint-override"><code>$sql = "SELECT * FROM products WHERE (QUANTITY) >='50' and (QUANTITY) <='200' $start_from,$num_per_page";
$result = $connection->query($sql);
</code>```

I want to fetch all products that have a 200-50 quantity

Body:
Hi I'm beginner developer, I'm making right now a table that need to be filled by products that have 200 to 50 quantity left.

$sql = "SELECT * FROM products ORDER BY (QUANTITY) WHERE QUANTITY = '200-50' DESC limit  $start_from,$num_per_page";
$result = $connection->query($sql);

Hi I'm here again, I follow the instruction about WHERE and ORDER BY, but there is a error too. what is he error of this code?

$sql = "SELECT * FROM products WHERE (QUANTITY) >='50' and (QUANTITY) <='200' $start_from,$num_per_page";
$result = $connection->query($sql);

I want to fetch all products that have a 200-50 quantity


问:
New sonarqube scan is overriding coverage of previous scan though scan is on unique paths
Team,
new sonar scan is deleting coverage of previous scan.

I have Mainrepo that has 10services under one project.

ProjectA has 10Teams and each team has its own product.
so structure is like

```<code>ProjectA > Team1, Team2, Team10
Team1 = src/services/team1
Team2 = src/services/team2
Team10 = src/services/team10
</code>```

so my sonar scan everytime it is running is replacing the coverage of previous team. can this be handled that scan is only update and not replace of the code coverage?

sonar properties i have is below

```<code>#----- Default SonarQube server
sonar.projectVersion=v1
sonar.branch.name=main
sonar.branch.version=v1
sonar.projectKey=Main_Prod
sonar.projectName=Main
sonar.login=xxxxx
#----- Default source code encoding
#sonar.sourceEncoding=UTF-8

#coverage reports
sonar.python.xunit.reportPath=coverage.xml
sonar.python.coverage.reportPaths=coverage.xml

#Exclusions
# Define the same root directory for sources and tests
sonar.sources = src/
sonar.tests = src/

# Include test subdirectories in test scope
sonar.test.inclusions = src/**/test/**/*

# Exclude test subdirectories from source scope
sonar.exclusions = src/**/test/**/*, src/services/**/*test.*, src/services/**/*.tf
#sonar.exclusions=src/services/**/*.tf
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-
</code>```

scanner command is this

```<code>team_list=("team1","team2","team10")
for team in ${team_list}; do
          generate_coverage($team)
          sonar-scanner \
          -Dsonar.sources=src/services/$team/ \
          -Dsonar.coverageReportPaths=coverage.xml
</code>```

note: generate_coverage() is a function that creates coverage.xml that is unique per team.

so above loop runs the scans for each team uniquely.

Body:
Team,
new sonar scan is deleting coverage of previous scan.

I have Mainrepo that has 10services under one project.

ProjectA has 10Teams and each team has its own product.
so structure is like

ProjectA > Team1, Team2, Team10
Team1 = src/services/team1
Team2 = src/services/team2
Team10 = src/services/team10

so my sonar scan everytime it is running is replacing the coverage of previous team. can this be handled that scan is only update and not replace of the code coverage?

sonar properties i have is below

#----- Default SonarQube server
sonar.projectVersion=v1
sonar.branch.name=main
sonar.branch.version=v1
sonar.projectKey=Main_Prod
sonar.projectName=Main
sonar.login=xxxxx
#----- Default source code encoding
#sonar.sourceEncoding=UTF-8

#coverage reports
sonar.python.xunit.reportPath=coverage.xml
sonar.python.coverage.reportPaths=coverage.xml

#Exclusions
# Define the same root directory for sources and tests
sonar.sources = src/
sonar.tests = src/

# Include test subdirectories in test scope
sonar.test.inclusions = src/**/test/**/*

# Exclude test subdirectories from source scope
sonar.exclusions = src/**/test/**/*, src/services/**/*test.*, src/services/**/*.tf
#sonar.exclusions=src/services/**/*.tf
sonar.c.file.suffixes=-
sonar.cpp.file.suffixes=-
sonar.objc.file.suffixes=-

scanner command is this

team_list=("team1","team2","team10")
for team in ${team_list}; do
          generate_coverage($team)
          sonar-scanner \
          -Dsonar.sources=src/services/$team/ \
          -Dsonar.coverageReportPaths=coverage.xml

note: generate_coverage() is a function that creates coverage.xml that is unique per team.

so above loop runs the scans for each team uniquely.


问:
How to pass column as an argument in ensureColumnVisible in ag grid api
I wanted to use this grid api function ensure column visible. But I am not able to figure out how to get the column as an argument to pass into it.

I have tried using colId but it is a number variable , whereas this ensureColumnVisible takes string as an argument.


问:
Get a list of a folder's "Share name"(s)
Using .Net Framework 4.8, how can I get the Share name(s) as listed in a folder's properties dialog on the 'Sharing' tab listed when you click the 'Advanced Sharing' button?
(Ideally without p/Invoke)

I know shared folders can have multiple Share names, each with different permissions.

Keeping that in mind, I have a folder with a path like this:

```<code>X:\Folder1\Folder2\
</code>```

Please note this is a shared folder and has two shared names.  If I'm on any machine other than the server itself, I can get the UNC path using a ManagementObject and a method I found here on SO.  However, that method doesn't work when I'm on the server itself and especially since the folder has multiple share names.

I'm a complete novice with the ManagementObject class and although I understand the code when I read it, I'm not understanding how I could have figured out this code on my own so the answer might be obvious to someone who is familiar with the use of ManagementObject. I have no idea

Update:

Here's an example I've put together with the help of ChatGPT (that doesn't work of course).  If it did it would be exactly what I want so maybe someone can help me by just fixing it???

```<code>public static IEnumerable<string> GetShareNames(this string localPath)
{
    var searcher = new ManagementObjectSearcher($"SELECT * FROM Win32_Share WHERE Path='{localPath}'");
    var shares = searcher.Get().OfType<ManagementObject>();
    return shares.Select(x => x["Name"]?.ToString());
}
</code>```

Body:
Using .Net Framework 4.8, how can I get the Share name(s) as listed in a folder's properties dialog on the 'Sharing' tab listed when you click the 'Advanced Sharing' button?
(Ideally without p/Invoke)

I know shared folders can have multiple Share names, each with different permissions.

Keeping that in mind, I have a folder with a path like this:

X:\Folder1\Folder2\

Please note this is a shared folder and has two shared names.  If I'm on any machine other than the server itself, I can get the UNC path using a ManagementObject and a method I found here on SO.  However, that method doesn't work when I'm on the server itself and especially since the folder has multiple share names.

I'm a complete novice with the ManagementObject class and although I understand the code when I read it, I'm not understanding how I could have figured out this code on my own so the answer might be obvious to someone who is familiar with the use of ManagementObject. I have no idea

Update:

Here's an example I've put together with the help of ChatGPT (that doesn't work of course).  If it did it would be exactly what I want so maybe someone can help me by just fixing it???

public static IEnumerable<string> GetShareNames(this string localPath)
{
    var searcher = new ManagementObjectSearcher($"SELECT * FROM Win32_Share WHERE Path='{localPath}'");
    var shares = searcher.Get().OfType<ManagementObject>();
    return shares.Select(x => x["Name"]?.ToString());
}


问:
Vue Js Base Preset in the UI but dont know where it is in code
I am new in Vue js but I am sure this Base Preset part is not supposed to be there. I am not sure in which file it exits.


问:
no 'nobs' method available: Using the MuMIn package with simultaneous autoregression models
I'm hoping someone can help me figure out why the MuMIn package is not working with my simultaneous autoregression models. I have double checked the documentation for the package and it lists sarlm as one of the supported model types. However, when I try to dredge and average my global SAR models, I get the following error: no 'nobs' method is available. I have tried every workaround that I can think of and still can't figure out where the error is coming from. Any ideas?

Edit: The data frame that I am using contains data for multiple environmental and spatial variables for sites across the continent of Africa. Moran's I indicates that my sites are autocorrelated, hence the use of SAR models instead of traditional OLS. Before creating the model, my data were centered and standardized using the scale() function in spdep. I also created a spatial points data frame and assigned weights based on the nearest neighbor (k=1). I then developed my global model using either errorsarlm. This model had nine predictor variables and four interactions (13 terms total). The error arises when I try to dredge() this model in preparation for averaging it.

Here is my best attempt to recreate the error using the quakes dataset.

```<code>quakes <- as.data.frame(quakes)
quakes

#a. Create model
quakes.mod <- glm(quakes$mag ~ quakes$depth + quakes$lat + quakes$long)
summary(quakes.mod)

#b. Convert data frame into spatial point data frame with coordinates
quakes.df.pt <- SpatialPointsDataFrame(coords=cbind(x = quakes$long, y = quakes$lat),
                                       data = quakes,
                                       proj4string= CRS("+init=epsg:4326"))

#c. Create neighbor matrix. When k = 1, only the closest site will be considered as neighbor
quakes.nb <- knn2nb(knearneigh(quakes.df.pt@coords, k=1, longlat = TRUE))

#d. Check spatial weight by converting to matrix
quakes.nb.mat <- nb2mat(quakes.nb, style = "W")
quakes.nb.mat

#e. Generate spatial weight based on neighbor relationship
quakes.nb.w <- nb2listw(quakes.nb, style="W", zero.policy=T)
quakes.nb.w

#f. Moran's I
lm.morantest(quakes.mod, quakes.nb.w, alternative="two.sided")
      #data are autocorrelated (p = 0.048)

#g. Create global spatial regression model
quakes.reg <- errorsarlm(quakes$mag ~ quakes$depth + quakes$lat + quakes$long,
                         data = quakes, quakes.nb.w,
                         na.action="na.fail")
summary(quakes.reg)

#h. Dredge global model
quakes.dredge <- dredge(quakes.reg, beta = "sd", evaluate = TRUE, rank="AIC")

</code>```

Body:
I'm hoping someone can help me figure out why the MuMIn package is not working with my simultaneous autoregression models. I have double checked the documentation for the package and it lists sarlm as one of the supported model types. However, when I try to dredge and average my global SAR models, I get the following error: no 'nobs' method is available. I have tried every workaround that I can think of and still can't figure out where the error is coming from. Any ideas?

Edit: The data frame that I am using contains data for multiple environmental and spatial variables for sites across the continent of Africa. Moran's I indicates that my sites are autocorrelated, hence the use of SAR models instead of traditional OLS. Before creating the model, my data were centered and standardized using the scale() function in spdep. I also created a spatial points data frame and assigned weights based on the nearest neighbor (k=1). I then developed my global model using either errorsarlm. This model had nine predictor variables and four interactions (13 terms total). The error arises when I try to dredge() this model in preparation for averaging it.

Here is my best attempt to recreate the error using the quakes dataset.

quakes <- as.data.frame(quakes)
quakes

#a. Create model
quakes.mod <- glm(quakes$mag ~ quakes$depth + quakes$lat + quakes$long)
summary(quakes.mod)

#b. Convert data frame into spatial point data frame with coordinates
quakes.df.pt <- SpatialPointsDataFrame(coords=cbind(x = quakes$long, y = quakes$lat),
                                       data = quakes,
                                       proj4string= CRS("+init=epsg:4326"))

#c. Create neighbor matrix. When k = 1, only the closest site will be considered as neighbor
quakes.nb <- knn2nb(knearneigh(quakes.df.pt@coords, k=1, longlat = TRUE))

#d. Check spatial weight by converting to matrix
quakes.nb.mat <- nb2mat(quakes.nb, style = "W")
quakes.nb.mat

#e. Generate spatial weight based on neighbor relationship
quakes.nb.w <- nb2listw(quakes.nb, style="W", zero.policy=T)
quakes.nb.w

#f. Moran's I
lm.morantest(quakes.mod, quakes.nb.w, alternative="two.sided")
      #data are autocorrelated (p = 0.048)

#g. Create global spatial regression model
quakes.reg <- errorsarlm(quakes$mag ~ quakes$depth + quakes$lat + quakes$long,
                         data = quakes, quakes.nb.w,
                         na.action="na.fail")
summary(quakes.reg)

#h. Dredge global model
quakes.dredge <- dredge(quakes.reg, beta = "sd", evaluate = TRUE, rank="AIC")


问:
How to push 500KB length message into Service Bus Topic - Premium Tier?
I am trying to push approx. 500KB size message into Service Bus Topic. But I am able to push only up to 64KB and it is not showing any error and when receiver/subscriber received message it just have 64KB data. As per the Microsoft documentation, we should be able to push this size with premium tier.

Am I missing something here?

Below is my code to push message into Service Bus Topic:

```<code> public async Task PublishMessageIntoEventTypeAsync(EventReceiver @event)
        {
            logger.LogInformation($"Start publishing notification event {@event.EventType} with requestID: {@event.EventMessage.RequestID} " +
                $"into service bus topic: {serviceBusConfigOption.TopicEventTypes}");

            var serviceBusClient = messageBusFactory.GetClient(serviceBusConfigOption.TopicEventTypes);

            await serviceBusClient.PublishMessageAsync(@event.EventMessage, @event.EventMessage.RequestID.ToString(), nameof(@event.EventType), @event.EventType);

            logger.LogInformation($"Successfully published notification event {@event.EventType} with requestID: {@event.EventMessage.RequestID} " +
            $"into service bus topic: {serviceBusConfigOption.TopicEventTypes}");
        }

/// <summary>
    /// AzureServiceBusFactory
    /// </summary>
    public class AzureServiceBusFactory : IMessageBusFactory
    {
        #region private fields
        private readonly object _lockObject = new object();
        private readonly ConcurrentDictionary<string, ServiceBusClient> _clients = new ConcurrentDictionary<string, ServiceBusClient>();
        private readonly ConcurrentDictionary<string, ServiceBusSender> _senders = new ConcurrentDictionary<string, ServiceBusSender>();
        private readonly ServiceBusConfigOption serviceBusConfigOption;
        #endregion

        #region ctors

        public AzureServiceBusFactory(IOptions<ServiceBusConfigOption> serviceBusConfigOption)
        {
            this.serviceBusConfigOption = serviceBusConfigOption.Value;
        }
        #endregion

        #region public methods
        /// <summary>
        /// Get ServiceBusClient
        /// </summary>
        /// <param name="senderName"></param>
        /// <returns>IMessageBus</returns>
        public IMessageBus GetClient(string senderName)
        {
            var connectionString = serviceBusConfigOption.ConnectionString;

            var key = $"{connectionString}-{senderName}";

            if (this._senders.ContainsKey(key) && !this._senders[key].IsClosed)
            {
                return AzureServiceBus.Create(this._senders[key]);
            }

            var client = this.GetServiceBusClient(connectionString);

            lock (this._lockObject)
            {
                if (this._senders.ContainsKey(key) && this._senders[key].IsClosed)
                {
                    if (this._senders[key].IsClosed)
                    {
                        this._senders[key].DisposeAsync().GetAwaiter().GetResult();
                    }

                    return AzureServiceBus.Create(this._senders[key]);
                }

                var sender = client.CreateSender(senderName);

                this._senders[key] = sender;
            }

            return AzureServiceBus.Create(this._senders[key]);
        }
        #endregion

        #region protected methods
        /// <summary>
        /// Create ServiceBusClient
        /// </summary>
        /// <param name="connectionString"></param>
        /// <returns></returns>
        protected virtual ServiceBusClient GetServiceBusClient(string connectionString)
        {
            var key = $"{connectionString}";

            lock (this._lockObject)
            {
                if (this.ClientDoesnotExistOrIsClosed(connectionString))
                {
                    var client = new ServiceBusClient(connectionString, new ServiceBusClientOptions
                    {
                        TransportType = ServiceBusTransportType.AmqpTcp
                    });

                    this._clients[key] = client;
                }

                return this._clients[key];
            }
        }
        #endregion

        #region private methods
        /// <summary>
        /// Check ClientDoesnotExistOrIsClosed
        /// </summary>
        /// <param name="connectionString"></param>
        /// <returns></returns>
        private bool ClientDoesnotExistOrIsClosed(string connectionString)
        {
            return !this._clients.ContainsKey(connectionString) || this._clients[connectionString].IsClosed;
        }
        #endregion

    }

/// <summary>
    /// AzureServiceBus
    /// </summary>
    internal class AzureServiceBus : IMessageBus
    {
        #region private fields
        private const string ContentType = "application/json";
        private readonly ServiceBusSender _serviceBusSender;
        #endregion

        #region ctors
        internal AzureServiceBus(ServiceBusSender serviceBusSender)
        {
            this._serviceBusSender = serviceBusSender;
        }
        #endregion

        #region public methods
        /// <summary>
        /// Publish message into Service Bus Topic
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="message"></param>
        /// <returns></returns>
        public async Task PublishMessageAsync<T>(T message)
        {
            var serviceBusMessage = new ServiceBusMessage(Encoding.UTF8.GetBytes(message.AsJson()))
            {
                ContentType = ContentType
            };
            await this._serviceBusSender.SendMessageAsync(serviceBusMessage);
        }

        /// <summary>
        /// Publish message into Service Bus Topic
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <param name="message"></param>
        /// <param name="messageId"></param>
        /// <param name="filterPropertyName"></param>
        /// <param name="filterPropertyValue"></param>
        /// <returns></returns>
        public async Task PublishMessageAsync<T>(T message, string messageId, string filterPropertyName, string filterPropertyValue)
        {
            var serviceBusMessage = new ServiceBusMessage(Encoding.UTF8.GetBytes(message.AsJson()))
            {
                ContentType = ContentType,
                MessageId = messageId,
                CorrelationId = filterPropertyValue
            };
            serviceBusMessage.ApplicationProperties.Add(filterPropertyName, filterPropertyValue);

            await this._serviceBusSender.SendMessageAsync(serviceBusMessage);
        }
        #endregion

        #region internal methods
        internal static IMessageBus Create(ServiceBusSender sender)
        {
            return new AzureServiceBus(sender);
        }
        #endregion

    }
</code>```

Service Bus Topic - Max message size is 1024KB:

Body:
I am trying to push approx. 500KB size message into Service Bus Topic. But I am able to push only up to 64KB and it is not showing any error and when receiver/subscriber received message it just have 64KB data. As per the Microsoft documentation, we should be able to push this size with premium tier.

Am I missing something here?

Below is my code to push message into Service Bus Topic:

 public async Task PublishMessageIntoEventTypeAsync(EventReceiver @event)
        {
            logger.LogInformation($"Start publishing notification event {@event.EventType} with requestID: {@event.EventMessage.RequestID} " +
                $"into service bus topic: {serviceBusConfigOption.TopicEventTypes}");

            var serviceBusClient = messageBusFactory.GetClient(serviceBusConfigOption.TopicEventTypes);

            await serviceBusClient.PublishMessageAsync(@event.EventMessage, @event.EventMessage.RequestID.ToString(), nameof(@event.EventType), @event.EventType);

            logger.LogInformation($"Successfully published notification event {@event.EventType} with requestID: {@event.EventMessage.RequestID} " +
            $"into service bus topic: {serviceBusConfigOption.TopicEventTypes}");
        }

///
    /// AzureServiceBusFactory
    ///
    public class AzureServiceBusFactory : IMessageBusFactory
    {
        #region private fields
        private readonly object _lockObject = new object();
        private readonly ConcurrentDictionary<string, ServiceBusClient> _clients = new ConcurrentDictionary<string, ServiceBusClient>();
        private readonly ConcurrentDictionary<string, ServiceBusSender> _senders = new ConcurrentDictionary<string, ServiceBusSender>();
        private readonly ServiceBusConfigOption serviceBusConfigOption;
        #endregion

        #region ctors

        public AzureServiceBusFactory(IOptions<ServiceBusConfigOption> serviceBusConfigOption)
        {
            this.serviceBusConfigOption = serviceBusConfigOption.Value;
        }
        #endregion

        #region public methods
        ///
        /// Get ServiceBusClient
        ///
        /// <param name="senderName"></param>
        /// <returns>IMessageBus</returns>
        public IMessageBus GetClient(string senderName)
        {
            var connectionString = serviceBusConfigOption.ConnectionString;

            var key = $"{connectionString}-{senderName}";

            if (this._senders.ContainsKey(key) && !this._senders[key].IsClosed)
            {
                return AzureServiceBus.Create(this._senders[key]);
            }

            var client = this.GetServiceBusClient(connectionString);

            lock (this._lockObject)
            {
                if (this._senders.ContainsKey(key) && this._senders[key].IsClosed)
                {
                    if (this._senders[key].IsClosed)
                    {
                        this._senders[key].DisposeAsync().GetAwaiter().GetResult();
                    }

                    return AzureServiceBus.Create(this._senders[key]);
                }

                var sender = client.CreateSender(senderName);

                this._senders[key] = sender;
            }

            return AzureServiceBus.Create(this._senders[key]);
        }
        #endregion

        #region protected methods
        ///
        /// Create ServiceBusClient
        ///
        /// <param name="connectionString"></param>
        /// <returns></returns>
        protected virtual ServiceBusClient GetServiceBusClient(string connectionString)
        {
            var key = $"{connectionString}";

            lock (this._lockObject)
            {
                if (this.ClientDoesnotExistOrIsClosed(connectionString))
                {
                    var client = new ServiceBusClient(connectionString, new ServiceBusClientOptions
                    {
                        TransportType = ServiceBusTransportType.AmqpTcp
                    });

                    this._clients[key] = client;
                }

                return this._clients[key];
            }
        }
        #endregion

        #region private methods
        ///
        /// Check ClientDoesnotExistOrIsClosed
        ///
        /// <param name="connectionString"></param>
        /// <returns></returns>
        private bool ClientDoesnotExistOrIsClosed(string connectionString)
        {
            return !this._clients.ContainsKey(connectionString) || this._clients[connectionString].IsClosed;
        }
        #endregion

    }

///
    /// AzureServiceBus
    ///
    internal class AzureServiceBus : IMessageBus
    {
        #region private fields
        private const string ContentType = "application/json";
        private readonly ServiceBusSender _serviceBusSender;
        #endregion

        #region ctors
        internal AzureServiceBus(ServiceBusSender serviceBusSender)
        {
            this._serviceBusSender = serviceBusSender;
        }
        #endregion

        #region public methods
        ///
        /// Publish message into Service Bus Topic
        ///
        /// <typeparam name="T"></typeparam>
        /// <param name="message"></param>
        /// <returns></returns>
        public async Task PublishMessageAsync<T>(T message)
        {
            var serviceBusMessage = new ServiceBusMessage(Encoding.UTF8.GetBytes(message.AsJson()))
            {
                ContentType = ContentType
            };
            await this._serviceBusSender.SendMessageAsync(serviceBusMessage);
        }

        ///
        /// Publish message into Service Bus Topic
        ///
        /// <typeparam name="T"></typeparam>
        /// <param name="message"></param>
        /// <param name="messageId"></param>
        /// <param name="filterPropertyName"></param>
        /// <param name="filterPropertyValue"></param>
        /// <returns></returns>
        public async Task PublishMessageAsync<T>(T message, string messageId, string filterPropertyName, string filterPropertyValue)
        {
            var serviceBusMessage = new ServiceBusMessage(Encoding.UTF8.GetBytes(message.AsJson()))
            {
                ContentType = ContentType,
                MessageId = messageId,
                CorrelationId = filterPropertyValue
            };
            serviceBusMessage.ApplicationProperties.Add(filterPropertyName, filterPropertyValue);

            await this._serviceBusSender.SendMessageAsync(serviceBusMessage);
        }
        #endregion

        #region internal methods
        internal static IMessageBus Create(ServiceBusSender sender)
        {
            return new AzureServiceBus(sender);
        }
        #endregion

    }

Service Bus Topic - Max message size is 1024KB:


问:
My sqs queue is sending a s3:TestEvent every few minutes to my lambda
I have a lambda set to trigger via sqs on bucket updates. Usually I see a test event when the lambda is first launched, but now I'm receiving them at regular intervals, every few minutes. What could be causing this?

Here is the printed event:

```<code>{"Records": [{"messageId": "removed",
"receiptHandle": "removed",
"body": "{"Service":"Amazon S3",
        "Event":"s3:TestEvent",
        "Time":"2023-01-11T06:57:48.718Z",
        "Bucket":"my-bucket-xslypc1",
        "RequestId":"removed",
        "HostId":"removed"}",
        "attributes": {"ApproximateReceiveCount": "3",
        "SentTimestamp": "1673420268744",
        "SenderId": "removed",
        "ApproximateFirstReceiveTimestamp": "1673420268751"},
"messageAttributes": {}, "md5OfBody": "removed", "eventSource": "aws:sqs", "eventSourceARN":
"arn:aws:sqs:us-west-2:ACCT:MyQueue-OlY2Ge6bFxnd", "awsRegion": "us-west-2"}]
</code>```

thanks

Body:
I have a lambda set to trigger via sqs on bucket updates. Usually I see a test event when the lambda is first launched, but now I'm receiving them at regular intervals, every few minutes. What could be causing this?

Here is the printed event:

{"Records": [{"messageId": "removed",
"receiptHandle": "removed",
"body": "{"Service":"Amazon S3",
        "Event":"s3:TestEvent",
        "Time":"2023-01-11T06:57:48.718Z",
        "Bucket":"my-bucket-xslypc1",
        "RequestId":"removed",
        "HostId":"removed"}",
        "attributes": {"ApproximateReceiveCount": "3",
        "SentTimestamp": "1673420268744",
        "SenderId": "removed",
        "ApproximateFirstReceiveTimestamp": "1673420268751"},
"messageAttributes": {}, "md5OfBody": "removed", "eventSource": "aws:sqs", "eventSourceARN":
"arn:aws:sqs:us-west-2:ACCT:MyQueue-OlY2Ge6bFxnd", "awsRegion": "us-west-2"}]

thanks


问:
How to resolve access denied error in Multi stage Docker file for nextjs with file upload
I want to containerize a nextjs project using docker . I am  trying to upload some text files in container at absolute path /data/service folder of container . But I am getting access denied error from nextjs api . when I run this project locally (without docker) I can save the file on my windows os .
Here is the docker file I am using

```<code># Install dependencies only when needed
FROM node:14-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why
# libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:14-alpine AS builder

ARG BUILD_BUILDNUMBER
ENV BUILD_BUILDNUMBER=${BUILD_BUILDNUMBER:-undefined}

WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build

# Production image, copy all the files and run next
FROM node:14-alpine AS runner

ARG BUILD_BUILDNUMBER
ENV BUILD_BUILDNUMBER=${BUILD_BUILDNUMBER:-undefined}

WORKDIR /app

ENV NODE_ENV production

RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001

# You only need to copy next.config.js if you are NOT using the default configuration
COPY --from=builder /app/next.config.js ./

# Allow react-env access to write to public directory
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json

USER nextjs

EXPOSE 3000

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry.
ENV NEXT_TELEMETRY_DISABLED 1

CMD ["yarn", "start"]

</code>```

I tried adding RUN mkdir -p /data/offers . but i am still getting same error.
I try to run the code with volume mounted

```<code>docker run -p 3000:3000 -v data/service:data/service imagename
</code>```

then my application gives me error
permission denied.

but if run

```<code>docker run -p 3000:3000
</code>```

I am able to load files into container system.

Body:
I want to containerize a nextjs project using docker . I am  trying to upload some text files in container at absolute path /data/service folder of container . But I am getting access denied error from nextjs api . when I run this project locally (without docker) I can save the file on my windows os .
Here is the docker file I am using

# Install dependencies only when needed
FROM node:14-alpine AS deps
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why
# libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile

# Rebuild the source code only when needed
FROM node:14-alpine AS builder

ARG BUILD_BUILDNUMBER
ENV BUILD_BUILDNUMBER=${BUILD_BUILDNUMBER:-undefined}

WORKDIR /app
COPY . .
COPY --from=deps /app/node_modules ./node_modules
RUN yarn build

# Production image, copy all the files and run next
FROM node:14-alpine AS runner

ARG BUILD_BUILDNUMBER
ENV BUILD_BUILDNUMBER=${BUILD_BUILDNUMBER:-undefined}

WORKDIR /app

ENV NODE_ENV production

RUN addgroup -g 1001 -S nodejs
RUN adduser -S nextjs -u 1001

# You only need to copy next.config.js if you are NOT using the default configuration
COPY --from=builder /app/next.config.js ./

# Allow react-env access to write to public directory
COPY --from=builder --chown=nextjs:nodejs /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json

USER nextjs

EXPOSE 3000

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry.
ENV NEXT_TELEMETRY_DISABLED 1

CMD ["yarn", "start"]

I tried adding RUN mkdir -p /data/offers . but i am still getting same error.
I try to run the code with volume mounted

docker run -p 3000:3000 -v data/service:data/service imagename

then my application gives me error
permission denied.

but if run

docker run -p 3000:3000

I am able to load files into container system.


问:
How to establish SOAP communication with Feign-reactive
```<code>How to make the below SOAP call using Feign-reactive

Response soapCall(Request request){
    JAXBElement<Response> responseJAXBElement =
                     (JAXBElement<Response>) getWebServiceTemplateCustom().marshalSendAndReceive(
                                "https://url.com",
                                objectFactory.createRichiediInquiry(request));
return responseJAXBElement.getValue();
}

I have the below dependency in my springboot module

    <groupId>com.playtika.reactivefeign</groupId>
    <artifactId>feign-reactor-webclient</artifactId>
</code>```

Is there a way to make SOAP call and get Reactive response using feign-reactor?
Feign-reactor supports SOAP communication as well as mutual authentication protocol? If so, how to achieve something like this?

```<code>Mono<Response> soapCall(Request request){
    //Make SoapCall here
return Mono.just(response);
}
</code>```

If this cant be achieved, please suggest any other library to handle SOAP communication with mutual authentication via reactive api(webflux)

Body:
How to make the below SOAP call using Feign-reactive

Response soapCall(Request request){
    JAXBElement<Response> responseJAXBElement =
                     (JAXBElement<Response>) getWebServiceTemplateCustom().marshalSendAndReceive(
                                "https://url.com",
                                objectFactory.createRichiediInquiry(request));
return responseJAXBElement.getValue();
}

I have the below dependency in my springboot module

    <groupId>com.playtika.reactivefeign</groupId>
    <artifactId>feign-reactor-webclient</artifactId>

Is there a way to make SOAP call and get Reactive response using feign-reactor?
Feign-reactor supports SOAP communication as well as mutual authentication protocol? If so, how to achieve something like this?

Mono<Response> soapCall(Request request){
    //Make SoapCall here
return Mono.just(response);
}

If this cant be achieved, please suggest any other library to handle SOAP communication with mutual authentication via reactive api(webflux)


问:
How to make Chrome devtools responsive viewport show right corner when using very large dimension?
I am using a 15-inch MacBook. With the responsive tool of Chrome dev tools, when I choose a very large dimension like 1920x1700 or 2560x1280, and a zoom level of 100%, I can only see the left top corner of my webpage. I can not find a way to make it show the right top corner.
I know zooming down to 50% or smaller can make it show the whole page. But I need it to zoom 100%.
I googled and found nothing about this.
So anybody has solutions?</p>


问:
MySql Pattern Problem , Right-Angled Triangle
The Question was to print a Right-Angled Triangle in Hacker-Rank -:

ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Declare @var int
Select @var=1
While @var < 6
Begin
Print replicate('* ',@var)
' at line 1

This was my Code but it's not working -:

Declare @var int
Select @var=1
While @var < 6
Begin
Print replicate('* ',@var)
Set @var = @var + 1
End


问:
Use same Vite config for both the component AND its demo app
I'm slowly getting the grip on Vite & TypeScript configuration and am currently struggling with a concept I thought was easy:

My project has a component (which gets published to npm) and a demo app showing the component and helping me develop it.

So my folder structure goes something like this:

```<code>index.vue
index.ts
index.html
....
my-component.vue
my-component.spec.ts
....
package.json
tslint.eslint.json
tslint.json
vite.config.ts
</code>```

My build correctly builds the minified umd JavaScript to publish to npm. Relevant vite.config.js section:

```<code>  build: {
    target: 'es2015',
    lib: {
      entry: resolve(__dirname, 'ion-icon.vue'),
      formats: ['umd'],
      fileName: 'ion-icon.ts',
      name: 'ion-icon',
    },
    rollupOptions: {
      external: ['vue', 'axios', 'isomorphic-dompurify'],
      output: { globals: { vue: 'Vue', axios: 'axios', 'isomorphic-dompurify': 'isomorphic-dompurify' } },
    },
  },
</code>```

my tsconfig.json:

```<code>{
  "compilerOptions": {
    "target": "ESNext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
    "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
    "strict": true /* Enable all strict type-checking options. */,
    "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
    "declaration": true,
    "outDir": "dist"
  },
  "include": ["ion-icon.vue"],
  "exclude": ["dist", "coverage"]
}
</code>```

However, this particular section only builds the component sources. When I run Vite dev server, the javascript will not be built correctly for the development / sample application. I actually have to change the entry to "index.vue" and then it will build correctly for demo app, but no longer for publishing.

My assumption and expectation is that Vite has good domain separation to run the following in the same project:

sample application (e.g. it DOES automatic inclusion of index.html and its linked sources)

target component (as specified with build.lib, tsconfig.json)

unit tests (they are actually executed through vitest runner, but still configured in vite.config.ts)

I'm guessing my configuration must be off somewhere. But I'm too new and too n00b to be able to find out.

Basically, I imagine I should have two build targets: one for the final component-only bundle and one for demo app bundle.

How would I go about building those?

Body:
I'm slowly getting the grip on Vite & TypeScript configuration and am currently struggling with a concept I thought was easy:

My project has a component (which gets published to npm) and a demo app showing the component and helping me develop it.

So my folder structure goes something like this:

index.vue
index.ts
index.html
....
my-component.vue
my-component.spec.ts
....
package.json
tslint.eslint.json
tslint.json
vite.config.ts

My build correctly builds the minified umd JavaScript to publish to npm. Relevant vite.config.js section:

  build: {
    target: 'es2015',
    lib: {
      entry: resolve(__dirname, 'ion-icon.vue'),
      formats: ['umd'],
      fileName: 'ion-icon.ts',
      name: 'ion-icon',
    },
    rollupOptions: {
      external: ['vue', 'axios', 'isomorphic-dompurify'],
      output: { globals: { vue: 'Vue', axios: 'axios', 'isomorphic-dompurify': 'isomorphic-dompurify' } },
    },
  },

my tsconfig.json:

{
  "compilerOptions": {
    "target": "ESNext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
    "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
    "strict": true /* Enable all strict type-checking options. */,
    "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
    "declaration": true,
    "outDir": "dist"
  },
  "include": ["ion-icon.vue"],
  "exclude": ["dist", "coverage"]
}

However, this particular section only builds the component sources. When I run Vite dev server, the javascript will not be built correctly for the development / sample application. I actually have to change the entry to "index.vue" and then it will build correctly for demo app, but no longer for publishing.

My assumption and expectation is that Vite has good domain separation to run the following in the same project:

sample application (e.g. it DOES automatic inclusion of index.html and its linked sources)

target component (as specified with build.lib, tsconfig.json)

unit tests (they are actually executed through vitest runner, but still configured in vite.config.ts)

I'm guessing my configuration must be off somewhere. But I'm too new and too n00b to be able to find out.

Basically, I imagine I should have two build targets: one for the final component-only bundle and one for demo app bundle.

How would I go about building those?


问:
How fix red error line below cy. And cypress. Keyword
The red error line are coming below cy. And Cypress. Keywords. How to resolve that issue???

No error line will come below thhat keywords


问:
Deploy OpenAPI generated serverless functions to Vercel
I defined my API using OpenAPI and am looking for a way to generate an interface in TypeScript that I can use to:

create serverless functions in Vercel

validate incoming requests against the API and reject invalid ones

assist with generating responses which are schema conform

I tried various tools listed on openapi.tools's server section but all these tools create an express app which I cannot split into serverless functions.


问:
pratt parsing vs packrat parsing, are they different or the same?
when learning how parser works, I see two parsing technical terms. One is called pratt parsing, and the other called packrat parsing. My question is: are those two referring to the same thing?

It looks like the former one has one section in this wiki page: Operator-precedence parser - Wikipedia, while the later one happens in this wiki page: Parsing expression grammar - Wikipedia.

Thanks.


问:
apply function to column out-of-memory in Python Polars
I have a large GIS dataset (167x25e6) that was generated from GeoJSON, via .csv to now parquet. This is my first time that I really have to deal with out-of-memory dataframes and I am still trying to find out if Polars is the right option for my task, so if you know a solution that uses a different library, I am just as glad to know about that.

Lazily loading the file is no problem, but I need to convert certain values and that's where I am stuck. Since the data is coming from GeoJSON I have for example a column 'geometry.coordinates' that includes stringified lists of coordinate pairs:'[[122.9491889477, 24.4571703672], [122.946780324, 24.4541877508]]'.

In the example of the column above I will need to apply a function that returns me the average longitude and average latitude and writes this into a new column.

I tried casting the column to a pl.List datatype and also tried to use apply with a lambda that does a JSON string load:

df_pl.select(pl.col('geometry.coordinates')).with_column(pl.col('geometry.coordinates').cast(pl.List)).collect()

df_pl.select(pl.col('geometry.coordinates')).with_column(pl.col('geometry.coordinates').apply(lambda x: json.loads(x)).collect()

Unfortunately the first one throws a NotYetImplementedError: Casting from LargeUtf8 to LargeList not supported. The second makes the Python kernel crash immediately since it's not working out-of-memory.

Another thing I tried is sink_parquet instead of using collect such that I could stream the results to the disk and later merge with the actually needed data, but this throws a PanicException: sink_parquet not yet supported in standard engine. Use 'collect().write_parquet()'

I'd appreciate your help!


问:
get sum of column and without sum column in linq query

m.Items
    .GroupBy(x => x.AgeRangeCode)
    .Select(g => new
    {
        population = g.Sum(x => x.population),
        ageRangeCode = x.ageRange
    });
```

i wrote the same query but it is not working.

i want to get sum of population column grouped by agerange and also want other column data without sum.

Body:
m.Items
    .GroupBy(x => x.AgeRangeCode)
    .Select(g => new
    {
        population = g.Sum(x => x.population),
        ageRangeCode = x.ageRange
    });

i wrote the same query but it is not working.

i want to get sum of population column grouped by agerange and also want other column data without sum.


问:
Add date to SQL table
Presto SQL

The idea is to get the historic data from the table by querying date. How to add current_date (YYYY-MM-DD) data I will set a refresh on daily. So when I want to look back of 5 days data I get the info.

**Data type **
member_id bigint
segemnt_id integer

```<code>DROP TABLE IF EXISTS ABC;
CREATE TABLE ABC AS ( SELECT member_id, Segment_id FROM XYZ)
</code>```

This XYZ table has information of member_id and segment_id (Creating a separate table since XYZ contains many column just to reduce the load)

```<code>CREATE TABLE QQQ
(member_id bigint,
segment_id int)

INSERT INTO QQQ
(SELECT*, current_date as date, member_id, segment_id FROM ABC);
</code>```

Title: Add date to SQL table

Body:
Presto SQL

The idea is to get the historic data from the table by querying date. How to add current_date (YYYY-MM-DD) data I will set a refresh on daily. So when I want to look back of 5 days data I get the info.

**Data type **
member_id bigint
segemnt_id integer

DROP TABLE IF EXISTS ABC;
CREATE TABLE ABC AS ( SELECT member_id, Segment_id FROM XYZ)

This XYZ table has information of member_id and segment_id (Creating a separate table since XYZ contains many column just to reduce the load)

CREATE TABLE QQQ
(member_id bigint,
segment_id int)

INSERT INTO QQQ
(SELECT*, current_date as date, member_id, segment_id FROM ABC);


问:
(XAMARIN Forms) Device.IsInvokeRequired is not changing to false after running the method on mainthread
When loading a page asynchronously to a secondary window using a dispatcher on button click.then after running the method on method in secondary window.the Device.IsInvokeRequired Property does not changing to false.

enter image description here

When navigating to new UWP window using dispatcher.Runasync and the running a method on Mainthread.the method is not running on mainthread even after using device.BeginInvoke.
Does it always runs on separate thread when secondary UWP window is opened.


问:
RBAC: access denied when request in kubeflow notebooks
I tried the kserve example and faced the problem of RBAC: Access Denied.

add user

```<code>$ kubectl -n auth edit cm dex
</code>```

add example infomation in staticPasswords

```<code>    - email: my_email@gmail.com
      hash: my_ps_hash
      userID: "myuserid"
      username: myusername
</code>```
```<code>$ kubectl rollout restart deployment dex -n auth
</code>```

add profile for create namespace

```<code>$ vi profile.yaml
</code>```
```<code>apiVersion: kubeflow.org/v1beta1
kind: Profile
metadata:
  name: test-namespace
spec:
  owner:
    kind: User
    name: my_email@gmail.com
  resourceQuotaSpec: {}
</code>```
```<code>kubectl apply -f profile.yaml
</code>```

Serving exam model

kubeflow Central Dashboard - Models - +NEW MODEL SERVER

```<code>apiVersion: "serving.kserve.io/v1beta1"
kind: "InferenceService"
metadata:
  annotations:
    isdecar.istio.is/inject: "false"
  name: "sklearn-iris"
spec:
  predictor:
    sklearn:
      image: "kserve/sklearnserver:v0.9.0"
      storageUri: "gs://kfserving-examples/models/sklearn/1.0/model"
</code>```
```<code>$ kubectl get InferenceService -n test-namespace
</code>```
```<code>NAME                 URL                                                      READY   PREV   LATEST   PREVROLLEDOUTREVISION   LATESTREADYREVISION                          AGE
sklearn-iris   http://sklearn-iris-test2.test-namespace.example.com   True           100                              sklearn-iris-predictor-default-00001   81m
</code>```

READY: True

Add New Notebook

kubeflow Central Dashboard - Notebooks - +New Notebook

and run code

from kserve import (utils, KServeClient)
import requests
import json

sklear_iris_input = dict(instances = [
        [6.8, 2.8, 4.8, 1.4],
        [6.0, 3.4, 4.5, 1.6]
    ])

namespace = utils.get_default_target_namespace()     # Get namespace.  It's worked
service_name = "sklearn-iris"

kserve = KServeClient()
isvc_resp = kserve.get(service_name, namespace = namespace)      # It's worked
# http://sklearn-iris.test-namespace.svc.cluster.local/v1/models/sklearn-iris-test2:predict
isvc_url = isvc_resp['status']['address']['url']

response = requests.post(isvc_url, json = json.dumps(sklear_iris_input))

print(response.text)
```
```RBAC: access denied
```

env:

kserve: 0.9.0

kubeflow: 1.6.0

kubernetes: v1.22.13 and run master node(already disable taint)

Why is this message(RBAC: access denied) occurring?

Your help is of great help to me. Help me!

Body:
I tried the kserve example and faced the problem of RBAC: Access Denied.

add user

$ kubectl -n auth edit cm dex

add example infomation in staticPasswords

    - email: my_email@gmail.com
      hash: my_ps_hash
      userID: "myuserid"
      username: myusername

$ kubectl rollout restart deployment dex -n auth

add profile for create namespace

$ vi profile.yaml

apiVersion: kubeflow.org/v1beta1
kind: Profile
metadata:
  name: test-namespace
spec:
  owner:
    kind: User
    name: my_email@gmail.com
  resourceQuotaSpec: {}

kubectl apply -f profile.yaml

Serving exam model

kubeflow Central Dashboard - Models - +NEW MODEL SERVER

apiVersion: "serving.kserve.io/v1beta1"
kind: "InferenceService"
metadata:
  annotations:
    isdecar.istio.is/inject: "false"
  name: "sklearn-iris"
spec:
  predictor:
    sklearn:
      image: "kserve/sklearnserver:v0.9.0"
      storageUri: "gs://kfserving-examples/models/sklearn/1.0/model"

$ kubectl get InferenceService -n test-namespace

NAME                 URL                                                      READY   PREV   LATEST   PREVROLLEDOUTREVISION   LATESTREADYREVISION                          AGE
sklearn-iris   http://sklearn-iris-test2.test-namespace.example.com   True           100                              sklearn-iris-predictor-default-00001   81m

READY: True

Add New Notebook

kubeflow Central Dashboard - Notebooks - +New Notebook

and run code

from kserve import (utils, KServeClient)
import requests
import json

sklear_iris_input = dict(instances = [
        [6.8, 2.8, 4.8, 1.4],
        [6.0, 3.4, 4.5, 1.6]
    ])

namespace = utils.get_default_target_namespace()     # Get namespace.  It's worked
service_name = "sklearn-iris"

kserve = KServeClient()
isvc_resp = kserve.get(service_name, namespace = namespace)      # It's worked
# http://sklearn-iris.test-namespace.svc.cluster.local/v1/models/sklearn-iris-test2:predict
isvc_url = isvc_resp['status']['address']['url']

response = requests.post(isvc_url, json = json.dumps(sklear_iris_input))

print(response.text)

RBAC: access denied

env:

kserve: 0.9.0

kubeflow: 1.6.0

kubernetes: v1.22.13 and run master node(already disable taint)

Why is this message(RBAC: access denied) occurring?

Your help is of great help to me. Help me!


问:
RPi4 w/ Centos and RPI.GPIO: can't add edge detection
I am running CentOS7 with kernel 5.4.206-v8.1.el7 on a RPi4 and I am trying to setup edge detection on GPIO with RPi.GPIO-0.7.1-py3.9 (*)

I am getting the following error whatever the pin I try to configure:

RPi.GPIO.add_event_detect(self.pin, RPi.GPIO.BOTH, self._on_event) RuntimeError: Failed to add edge detection

I also get it when I run in sudo. I previously tuned the permissions to get:

[blabla@hostname]$  ls -l /dev/gpiomem  crw-rw----. 1 root gpio 246, 0 Jan  1  1970 /dev/gpiomem

so that GPIO in output mode (to blink a LED for instance) works fine.

Running my basic RPi.GPIO-based edge detection code (*) with strace I noticed a few suspicious lines:

faccessat(AT_FDCWD, "/sys/class/gpio/gpio6", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/class/gpio/export", O_WRONLY) = -1 EACCES (Permission denied)

I thought RPi.GPIO was now based on GPIO character and not sysfs anymore? Although I am far from being an expert so I may be wrong / confused

I looked a bit into /sys/class/gpio on my RPi:

[blabla@hostname]$ ls /sys/class/gpio/ export  gpiochip446  gpiochip454  unexport

It seems to me that attempting to create /sys/class/gpio/gpio6 makes no sense here, one should read the base of the controller and do base+6 ? Wouldn't that explain the Permission denied?

I tried to run the event.c example of the bcm2835 library and this works fine, ie button pressed are detected correctly. For technical reasons I would like to use RPi.GPIO.

Sorry again I am far from being an expert so maybe just confused myself, any help to unblock the situation would be great!

Thanks a lot
Best wishes

(*)

```<code>import RPi.GPIO as GPIO

X=6

# Set pin X in GPIO mode
GPIO.setmode(GPIO.BCM)
GPIO.setup(X, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Define a callback function to detect edge events
def my_callback(channel):
    print(f"Edge event detected on pin {X}")

# Set the callback function
GPIO.add_event_detect(X, GPIO.RISING, callback=my_callback)

# Main loop
try:
    while True:
        pass

# Exit gracefully
except KeyboardInterrupt:
    GPIO.cleanup()
</code>```

Body:
I am running CentOS7 with kernel 5.4.206-v8.1.el7 on a RPi4 and I am trying to setup edge detection on GPIO with RPi.GPIO-0.7.1-py3.9 (*)

I am getting the following error whatever the pin I try to configure:

RPi.GPIO.add_event_detect(self.pin, RPi.GPIO.BOTH, self._on_event) RuntimeError: Failed to add edge detection

I also get it when I run in sudo. I previously tuned the permissions to get:

[blabla@hostname]$  ls -l /dev/gpiomem  crw-rw----. 1 root gpio 246, 0 Jan  1  1970 /dev/gpiomem

so that GPIO in output mode (to blink a LED for instance) works fine.

Running my basic RPi.GPIO-based edge detection code (*) with strace I noticed a few suspicious lines:

faccessat(AT_FDCWD, "/sys/class/gpio/gpio6", F_OK) = -1 ENOENT (No such file or directory) openat(AT_FDCWD, "/sys/class/gpio/export", O_WRONLY) = -1 EACCES (Permission denied)

I thought RPi.GPIO was now based on GPIO character and not sysfs anymore? Although I am far from being an expert so I may be wrong / confused

I looked a bit into /sys/class/gpio on my RPi:

[blabla@hostname]$ ls /sys/class/gpio/ export  gpiochip446  gpiochip454  unexport

It seems to me that attempting to create /sys/class/gpio/gpio6 makes no sense here, one should read the base of the controller and do base+6 ? Wouldn't that explain the Permission denied?

I tried to run the event.c example of the bcm2835 library and this works fine, ie button pressed are detected correctly. For technical reasons I would like to use RPi.GPIO.

Sorry again I am far from being an expert so maybe just confused myself, any help to unblock the situation would be great!

Thanks a lot
Best wishes

(*)

import RPi.GPIO as GPIO

X=6

# Set pin X in GPIO mode
GPIO.setmode(GPIO.BCM)
GPIO.setup(X, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Define a callback function to detect edge events
def my_callback(channel):
    print(f"Edge event detected on pin {X}")

# Set the callback function
GPIO.add_event_detect(X, GPIO.RISING, callback=my_callback)

# Main loop
try:
    while True:
        pass

# Exit gracefully
except KeyboardInterrupt:
    GPIO.cleanup()


问:
Command SwiftCompile failed with a nonzero exit code Xcode 14
Unable to Archive the build using XCode 14 but working fine for Xcode 13. I need to upgrade the code for iOS 16. I am updating my own Pod and It has StringExtension.swift inside it:

```<code>func enumerateComponents(separatedBy separator: CharacterSet, groupingSeparators: Bool, invoking body: @escaping ((_ index: Int, _ component: String, _ separator: String, _ stop: inout Bool) -> Void)) -> Void {
        self._enumerateComponents(separatedBy: separator, groupingSeparators: groupingSeparators, invoking: body)
    }
</code>```

When I am commenting the above method call it is allowing me to archive.

```<code>    fileprivate func _enumerateComponents(separatedBy separator: CharacterSet, groupingSeparators: Bool, invoking body: @escaping ((_ index: Int, _ component: String, _ separator: String, _ stop: inout Bool) -> Void)) -> Void {
        guard !self.isEmpty else {
            return
        }

        var index = 0
        var currentComponent: String = ""
        var currentSeparator: String = ""
        var isFinishingComponent = false
        var stop = false

        let finishComponent = { (evenIfBlank: Bool) in
            if evenIfBlank || !currentComponent.isEmpty {
                body(index, currentComponent, currentSeparator, &stop)
                index += 1
                currentComponent = ""
                currentSeparator = ""
            }
            isFinishingComponent = false
        }

        for c in self.unicodeScalars {
            guard !stop else {
                return
            }

            if separator.contains(c) {
                currentSeparator.unicodeScalars.append(c)

                if groupingSeparators {
                    isFinishingComponent = true
                }
                else {
                    finishComponent(true)
                }
            }
            else {
                if isFinishingComponent {
                    finishComponent(true)
                }
                currentComponent.unicodeScalars.append(c)
            }
        }

        finishComponent(isFinishingComponent)
    }

Error:

4.  While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for PUKit)
    5.  While running pass #4393683 SILFunctionTransform "AllocBoxToStack" on SILFunction "@$sSS5PKKitE20_enumerateComponents33_797666E2FD4D301A62EEB955A760B819LL11separatedBy18groupingSeparators8invokingy10Foundation12CharacterSetV_SbySi_S2SSbztctF05$sSS5a25E13_capitalizing33_797666defghiJ50LLySSAA24StringCapitalizationTypeOFySi_S2SSbztcfU_SSz_XxTf1nncn_n".
     for '_enumerateComponents(separatedBy:groupingSeparators:invoking:)' (at /Users/deraj/Documents/PU/CHS/PKKiii/pukit/PUKit/Misc/Extensions/StringExtension.swift:98:17)
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
    0  swift-frontend           0x000000011292afe7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
    1  swift-frontend           0x000000011292a018 llvm::sys::RunSignalHandlers() + 248
    2  swift-frontend           0x000000011292b600 SignalHandler(int) + 288
    3  libsystem_platform.dylib 0x00007ff80a19cdfd _sigtramp + 29
    4  swift-frontend           0x000000010eca7c7d (anonymous namespace)::Remangler::mangle(swift::Demangle::Node*, unsigned int) + 48413
    5  swift-frontend           0x000000010db6dd58 swift::SILBuilder::createApply(swift::SILLocation, swift::SILValue, swift::SubstitutionMap, llvm::ArrayRef<swift::SILValue>, swift::OptionSet<swift::ApplyFlags, unsigned char>, swift::GenericSpecializationInformation const*) + 168
</code>```

I can see _enumerateComponents function call in error log.

Body:
Unable to Archive the build using XCode 14 but working fine for Xcode 13. I need to upgrade the code for iOS 16. I am updating my own Pod and It has StringExtension.swift inside it:

func enumerateComponents(separatedBy separator: CharacterSet, groupingSeparators: Bool, invoking body: @escaping ((_ index: Int, _ component: String, _ separator: String, _ stop: inout Bool) -> Void)) -> Void {
        self._enumerateComponents(separatedBy: separator, groupingSeparators: groupingSeparators, invoking: body)
    }

When I am commenting the above method call it is allowing me to archive.

    fileprivate func _enumerateComponents(separatedBy separator: CharacterSet, groupingSeparators: Bool, invoking body: @escaping ((_ index: Int, _ component: String, _ separator: String, _ stop: inout Bool) -> Void)) -> Void {
        guard !self.isEmpty else {
            return
        }

        var index = 0
        var currentComponent: String = ""
        var currentSeparator: String = ""
        var isFinishingComponent = false
        var stop = false

        let finishComponent = { (evenIfBlank: Bool) in
            if evenIfBlank || !currentComponent.isEmpty {
                body(index, currentComponent, currentSeparator, &stop)
                index += 1
                currentComponent = ""
                currentSeparator = ""
            }
            isFinishingComponent = false
        }

        for c in self.unicodeScalars {
            guard !stop else {
                return
            }

            if separator.contains(c) {
                currentSeparator.unicodeScalars.append(c)

                if groupingSeparators {
                    isFinishingComponent = true
                }
                else {
                    finishComponent(true)
                }
            }
            else {
                if isFinishingComponent {
                    finishComponent(true)
                }
                currentComponent.unicodeScalars.append(c)
            }
        }

        finishComponent(isFinishingComponent)
    }

Error:

4.  While evaluating request ExecuteSILPipelineRequest(Run pipelines { PrepareOptimizationPasses, EarlyModulePasses, HighLevel,Function+EarlyLoopOpt, HighLevel,Module+StackPromote, MidLevel,Function, ClosureSpecialize, LowLevel,Function, LateLoopOpt, SIL Debug Info Generator } on SIL for PUKit)
    5.  While running pass #4393683 SILFunctionTransform "AllocBoxToStack" on SILFunction "@$sSS5PKKitE20_enumerateComponents33_797666E2FD4D301A62EEB955A760B819LL11separatedBy18groupingSeparators8invokingy10Foundation12CharacterSetV_SbySi_S2SSbztctF05$sSS5a25E13_capitalizing33_797666defghiJ50LLySSAA24StringCapitalizationTypeOFySi_S2SSbztcfU_SSz_XxTf1nncn_n".
     for '_enumerateComponents(separatedBy:groupingSeparators:invoking:)' (at /Users/deraj/Documents/PU/CHS/PKKiii/pukit/PUKit/Misc/Extensions/StringExtension.swift:98:17)
    Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
    0  swift-frontend           0x000000011292afe7 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
    1  swift-frontend           0x000000011292a018 llvm::sys::RunSignalHandlers() + 248
    2  swift-frontend           0x000000011292b600 SignalHandler(int) + 288
    3  libsystem_platform.dylib 0x00007ff80a19cdfd _sigtramp + 29
    4  swift-frontend           0x000000010eca7c7d (anonymous namespace)::Remangler::mangle(swift::Demangle::Node*, unsigned int) + 48413
    5  swift-frontend           0x000000010db6dd58 swift::SILBuilder::createApply(swift::SILLocation, swift::SILValue, swift::SubstitutionMap, llvm::ArrayRef<swift::SILValue>, swift::OptionSet<swift::ApplyFlags, unsigned char>, swift::GenericSpecializationInformation const*) + 168

I can see _enumerateComponents function call in error log.


问:
vscode copilot shows an error while running generated test
I just write a JS like this.

```<code>modules.export = {
  add(a, b){
    return a + b;
  },
}
</code>```

it is quite simple and click Suggest a new test.

```<code>describe('test add', function() {
    it('test add.exports', function(done) {
        assert.equal(add.exports(1, 2), 3);
        done();
    })
})
</code>```

I get this then Run this test.

```<code>RESULT
Could not find enclosing package.
</code>```

I just joined subscription to github copilot, installed required library(like chai, mocha)

The error message is too simple so I googled this and try to find solution, I couldn't.

I want to know what the error message means.
I wonder "package 'main'" like golang at the top but this is JS.

Please give me a chance to continue using copilot labs.

Thankyou.

Body:
I just write a JS like this.

modules.export = {
  add(a, b){
    return a + b;
  },
}

it is quite simple and click Suggest a new test.

describe('test add', function() {
    it('test add.exports', function(done) {
        assert.equal(add.exports(1, 2), 3);
        done();
    })
})

I get this then Run this test.

RESULT
Could not find enclosing package.

I just joined subscription to github copilot, installed required library(like chai, mocha)

The error message is too simple so I googled this and try to find solution, I couldn't.

I want to know what the error message means.
I wonder "package 'main'" like golang at the top but this is JS.

Please give me a chance to continue using copilot labs.

Thankyou.


问:
Class '_JsonQueryDocumentSnapshot' has no instance getter 'docID'. Receiver: Instance of '_JsonQueryDocumentSnapshot' Tried calling: docID
```<code>FirebaseFirestore.instance
    .collection("pet_entries")
    .doc(data[index].docID)
    .delete()
</code>```

i m not catch the data[index].docID

In this, I faced an issue in (data[index].docID). i solve this issue after researching that firebase deprecates docID to id then I just replace it with

.doc(data[index].id)

Body:
FirebaseFirestore.instance
    .collection("pet_entries")
    .doc(data[index].docID)
    .delete()

i m not catch the data[index].docID

In this, I faced an issue in (data[index].docID). i solve this issue after researching that firebase deprecates docID to id then I just replace it with

.doc(data[index].id)


问:
Authenticating with a Cookie in ADF
I've got an web address with a URL authentication token in the first activity.
In the second call I can't authenticate with this token anymore, but based on the cookie that I got from the first call I have access to the data that I need.

So in my current config I do an authentication with a token in the first activity, in the second activity I put the Cookie from this first activity in a variable and in the third activity I want to use this Cookie as a Cookie in my copy data activity.

I've tried to set this Cookie as an additional header, but that's not accepted by the webpage. I'm receiving the errors 'authentication failure'. So probably it really needs to be set as a Cookie. Is this possible in ADF/Synapse?

Thanks in advance!

-----EDIT-----

So in the image above you'll find all the activities that I currently have in my pipeline. The set activities could probably also be combined into one activity, but I've two of them because of testing my config with the full Cookie response and a cleanup one.

So the first activity is making a call to a webpage, in the URL is the token.

In the second activity I fetch the cookie out of the output from the frist activity and store it in a variable of my pipeline.

In the third activity I'll clean this cookie a bit so that only the cookie token is left and not all the rest (like valid till, cookie type, etc.).

In the last (but not least) activity I'm trying to use the cleaned up cookie in the header, but it still give an authentication error (the call itself is valid tho, so that's why the status is succeeded. In the SQL table you'll find the response from the webpage.

In Postman my config is actually working, also by adding the Cookie as a header. The cookies are empty in Postman btw.

Title: Authenticating with a Cookie in ADF


问:
I have react native project and when i open and run npm install --force give errors Unexcepted token <:1 at gradle .settings how to solve that and
npm install -- force give creates node module but at the end it show alot of errors
and when i open project in android studio it gives error

Settings file 'E:\Office\TFS_ALL\ScannerDEVOLD\android\settings.gradle' line: 1

Could not compile settings file 'E:\Office\TFS_ALL\ScannerDEVOLD\android\settings.gradle'.

startup failed:
settings file 'E:\Office\TFS_ALL\ScannerDEVOLD\android\settings.gradle': 1: unexpected token: < @ line 1, column 1.


问:
Multiple jobs for same processor not working
If you try adding multiple jobs for the same processor, then the jobs are getting added but not processed. Most of the time only one of added jobs gets processed. I want all the added jobs to be processed, I even tried with delay, but still the problem persists.</p>
```<code>const recipients = ['9988998899', '6677887766'];
for (const recipient of recipients) {
    data.recipient = recipient;
    const job = await this.bsQueue.add('send-push', data);
    this.logger.debug(`Job whatsapp push with id: ${job.id} added!`);
}
</code>```

Body:
If you try adding multiple jobs for the same processor, then the jobs are getting added but not processed. Most of the time only one of added jobs gets processed. I want all the added jobs to be processed, I even tried with delay, but still the problem persists.

const recipients = ['9988998899', '6677887766'];
for (const recipient of recipients) {
    data.recipient = recipient;
    const job = await this.bsQueue.add('send-push', data);
    this.logger.debug(`Job whatsapp push with id: ${job.id} added!`);
}


问:
Unity3d Cinemachine virtual camera 3rd person camera aiming
I'm using the Cinemachine virtual camera and it spins around when the player backs away.

How do I keep the player from spinning around?

And!!!

When aiming in 3rd person, I want to limit the angle and rotate the screen, but I can't.

Aim screen

I want to implement 3rd person camera aiming.

I don't know why not.


问:
It does not take effect after modifying the pool configuration item maxconnect=30 in taosadapter.toml
Java uses restful to connect to taosdb to insert data, and setting maxconnect=30 under the pool configuration item in taosadapter.toml does not take effect.

The maximum number of connections in a single connection pool is still 20, and the maxIdle configuration and idleTimeout configuration need to be enabled at the same time as the maxConnect configuration, otherwise an error will be reported when connecting: error "connect taosd error" model=restful sessionID=6 error=invalid capacity settings

Database parameters used: show databases
Verbs used: Insert/Import/Select?

Environment:

OS: [e.g. CentOS 7.0]
Memory, CPU, current Disk Space
TDengine Version [e.g. 1.6.1.7]


问:
AsyncLocalStorage not working for each request
I am using NestJS as a backend framework in NodeJS +16

I am trying to implement:
https://medium.com/@sascha.wolff/advanced-nestjs-how-to-have-access-to-the-current-user-in-every-service-without-request-scope-2586665741f

My idea is to have a @Injectable() service that will have, among other things, methods like:

```<code>hasUserSomeStuff(){
const user = UserStorage.get()
if(user) {
// do magic
}
</code>```

and then pass this service around as it is usually done in NestJS

To avoid passing the request down the rabbit hole, or bubbling up the request scope so every dependency gets instantiated for each request, but also avoiding to use UserStorage everywhere where I need to get the user from the current request and do stuff

I've gone through the docs many times, it is my understanding that node would take care of instantiating a new storage for each async context (in my case each request), but what seems to happen to me is that when I first run my backend, it works just fine, I've got the user from the current request, but once the first async context / promise is completed, I retrieved data for the consumer, and in the next request UserStorage returns a undefined (as doc states it will if you are outside of the same async context, which I guess it is not what happens, as it should be a brand new async context)

However if I debug, what seems to happen is that this UserStorage is called and a new AsyncLocalStorage is instantiated at init, before the app is ready to be used, and then the very first request returns a undefined user.

I am failing to understand what is going on, can anyone help me on this, or any better approach to achieve my goal?

Thanks in advance

Body:
I am using NestJS as a backend framework in NodeJS +16

I am trying to implement:
https://medium.com/@sascha.wolff/advanced-nestjs-how-to-have-access-to-the-current-user-in-every-service-without-request-scope-2586665741f

My idea is to have a @Injectable() service that will have, among other things, methods like:

hasUserSomeStuff(){
const user = UserStorage.get()
if(user) {
// do magic
}

and then pass this service around as it is usually done in NestJS

To avoid passing the request down the rabbit hole, or bubbling up the request scope so every dependency gets instantiated for each request, but also avoiding to use UserStorage everywhere where I need to get the user from the current request and do stuff

I've gone through the docs many times, it is my understanding that node would take care of instantiating a new storage for each async context (in my case each request), but what seems to happen to me is that when I first run my backend, it works just fine, I've got the user from the current request, but once the first async context / promise is completed, I retrieved data for the consumer, and in the next request UserStorage returns a undefined (as doc states it will if you are outside of the same async context, which I guess it is not what happens, as it should be a brand new async context)

However if I debug, what seems to happen is that this UserStorage is called and a new AsyncLocalStorage is instantiated at init, before the app is ready to be used, and then the very first request returns a undefined user.

I am failing to understand what is going on, can anyone help me on this, or any better approach to achieve my goal?

Thanks in advance