问:
I'm trying to find multivariate outliers but the outlier() function only works for one df and not for the other
I'm trying to use the outlier() function from psych. I have 2 df, both integers, 300x10. They are literally the same length and type of df the only difference is it's measurements from different expositions to a stimuli.

When I do it for df1 it's all good. If I do it for df2 it says

```<code>Error in solve.default(Sx) :
  Lapack routine dgesv: system is exactly singular: U[10,10] = 0
</code>```

I tried the solve() but oc doesn't work. I have no idea how to proceed pls help.

df1:

```<code>structure(list(AD_BORING_1 = c(1L, 2L, 3L, 5L, 4L, 5L, 3L, 6L,
4L, 3L, 5L, 3L, 5L, 4L, 3L, 7L, 7L, 4L, 1L, 4L, 4L, 5L, 2L, 3L,
3L, 5L, 6L, 6L, 1L, 2L, 2L, 3L, 4L, 4L, 2L, 1L, 5L, 7L, 3L, 3L,
3L, 4L, 3L, 5L, 3L, 3L, 6L, 6L, 5L, 7L, 4L, 3L, 7L, 5L, 6L, 7L,
5L, 2L, 3L, 5L, 3L, 2L, 4L, 6L, 2L, 5L, 2L, 2L, 2L, 5L, 6L, 2L,
4L, 2L, 4L, 1L, 5L, 7L, 4L, 3L, 4L, 2L, 5L, 3L, 2L, 3L, 3L, 5L,
6L, 6L, 3L, 6L, 2L, 5L, 4L, 4L, 6L, 3L, 5L, 6L, 5L, 5L, 4L, 6L,
3L, 2L, 4L, 4L, 1L, 4L, 2L, 5L, 4L, 6L, 4L, 5L, 6L, 2L, 3L, 3L,
3L, 4L, 6L, 5L, 5L, 3L, 3L, 2L, 2L, 1L, 4L, 6L, 2L, 5L, 2L, 4L,
6L, 1L, 2L, 4L, 5L, 6L, 3L, 3L, 2L, 3L, 6L, 1L, 6L, 5L, 3L, 6L,
5L, 3L, 3L, 3L, 6L, 4L, 5L, 3L, 6L, 5L, 5L, 6L, 3L, 3L, 5L, 5L,
3L, 5L, 6L, 3L, 5L, 1L, 3L, 3L, 3L, 4L, 6L, 4L, 6L, 5L, 4L, 3L,
6L, 3L, 1L, 2L, 4L, 3L, 2L, 5L, 3L, 5L, 6L, 4L, 3L, 3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"data.frame"))
</code>```

答:
Load libraries and group data

I'm not entirely sure what you are trying to group for your multivariate side of things, but I grouped your data by the "AD" variable and tried to identify outliers with their ratings that way:

```<code># Load libraries:
library(tidyverse)
library(rstatix)

# Pivot data to get groups for df1:
df1pivot <- df1 %>%
  pivot_longer(cols = everything(),
               names_to = "AD",
               values_to = "Rating")
</code>```

Find Mahalanobis distance and its outliers

```<code># Find mahalanobis distance for df1 and filter outliers:
df1pivot %>%
  group_by(AD) %>%
  mahalanobis_distance(Rating) %>%
  filter(is.outlier==T)
</code>```

Which gives us no multivariate outliers so far:

```<code># A tibble: 0 x 3
# ... with 3 variables: Rating <int>, mahal.dist <dbl>, is.outlier <lgl>
</code>```

Repeat for df2

```<code># Same for df2 pivot:
df2pivot <- df2 %>%
  pivot_longer(cols = everything(),
               names_to = "AD",
               values_to = "Rating")

# Find mahalanobis distance for df2 and filter outliers:
df2pivot %>%
  group_by(AD) %>%
  mahalanobis_distance(Rating) %>%
  filter(is.outlier==T)
</code>```

And as it was with df1, no outliers in df2:

```<code># A tibble: 0 x 3
# ... with 3 variables: Rating <int>, mahal.dist <dbl>, is.outlier <lgl>
</code>```

Edit

Based off your comments, here is a possible answer:

```<code># Rename "good" and "bad" ratings of people and pivot:
df1pivot <- df1 %>%
  rename_with(.cols = everything(),
              .fn   = ~str_c(., c(rep('_Bad', 3),
                                  rep('_Good', 7)))) %>%
  pivot_longer(cols = everything(),
               names_to = c('Test', 'Test_Type'),
               names_pattern = '(.*)_(.*)',
               values_to = 'Score')

# Check Mahalanobis:
df1pivot %>%
  group_by(Test_Type) %>%
  mahalanobis_distance(Score) %>%
  filter(is.outlier==T)

# Same for df2
df2pivot <- df2 %>%
  rename_with(.cols = everything(),
              .fn   = ~str_c(., c(rep('_Bad', 3),
                                  rep('_Good', 7)))) %>%
  pivot_longer(cols = everything(),
               names_to = c('Test', 'Test_Type'),
               names_pattern = '(.*)_(.*)',
               values_to = 'Score')

# Check df2 outliers:
df2pivot %>%
  group_by(Test_Type) %>%
  mahalanobis_distance(Score) %>%
  filter(is.outlier==T)
</code>```

Body:
I'm trying to use the outlier() function from psych. I have 2 df, both integers, 300x10. They are literally the same length and type of df the only difference is it's measurements from different expositions to a stimuli.

When I do it for df1 it's all good. If I do it for df2 it says

Error in solve.default(Sx) :
  Lapack routine dgesv: system is exactly singular: U[10,10] = 0

I tried the solve() but oc doesn't work. I have no idea how to proceed pls help.

df1:

structure(list(AD_BORING_1 = c(1L, 2L, 3L, 5L, 4L, 5L, 3L, 6L,
4L, 3L, 5L, 3L, 5L, 4L, 3L, 7L, 7L, 4L, 1L, 4L, 4L, 5L, 2L, 3L,
3L, 5L, 6L, 6L, 1L, 2L, 2L, 3L, 4L, 4L, 2L, 1L, 5L, 7L, 3L, 3L,
3L, 4L, 3L, 5L, 3L, 3L, 6L, 6L, 5L, 7L, 4L, 3L, 7L, 5L, 6L, 7L,
5L, 2L, 3L, 5L, 3L, 2L, 4L, 6L, 2L, 5L, 2L, 2L, 2L, 5L, 6L, 2L,
4L, 2L, 4L, 1L, 5L, 7L, 4L, 3L, 4L, 2L, 5L, 3L, 2L, 3L, 3L, 5L,
6L, 6L, 3L, 6L, 2L, 5L, 4L, 4L, 6L, 3L, 5L, 6L, 5L, 5L, 4L, 6L,
3L, 2L, 4L, 4L, 1L, 4L, 2L, 5L, 4L, 6L, 4L, 5L, 6L, 2L, 3L, 3L,
3L, 4L, 6L, 5L, 5L, 3L, 3L, 2L, 2L, 1L, 4L, 6L, 2L, 5L, 2L, 4L,
6L, 1L, 2L, 4L, 5L, 6L, 3L, 3L, 2L, 3L, 6L, 1L, 6L, 5L, 3L, 6L,
5L, 3L, 3L, 3L, 6L, 4L, 5L, 3L, 6L, 5L, 5L, 6L, 3L, 3L, 5L, 5L,
3L, 5L, 6L, 3L, 5L, 1L, 3L, 3L, 3L, 4L, 6L, 4L, 6L, 5L, 4L, 3L,
6L, 3L, 1L, 2L, 4L, 3L, 2L, 5L, 3L, 5L, 6L, 4L, 3L, 3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body:
Load libraries and group data

I'm not entirely sure what you are trying to group for your multivariate side of things, but I grouped your data by the "AD" variable and tried to identify outliers with their ratings that way:

# Load libraries:
library(tidyverse)
library(rstatix)

# Pivot data to get groups for df1:
df1pivot <- df1 %>%
  pivot_longer(cols = everything(),
               names_to = "AD",
               values_to = "Rating")

Find Mahalanobis distance and its outliers

# Find mahalanobis distance for df1 and filter outliers:
df1pivot %>%
  group_by(AD) %>%
  mahalanobis_distance(Rating) %>%
  filter(is.outlier==T)

Which gives us no multivariate outliers so far:

# A tibble: 0 x 3
# ... with 3 variables: Rating <int>, mahal.dist <dbl>, is.outlier <lgl>

Repeat for df2

# Same for df2 pivot:
df2pivot <- df2 %>%
  pivot_longer(cols = everything(),
               names_to = "AD",
               values_to = "Rating")

# Find mahalanobis distance for df2 and filter outliers:
df2pivot %>%
  group_by(AD) %>%
  mahalanobis_distance(Rating) %>%
  filter(is.outlier==T)

And as it was with df1, no outliers in df2:

# A tibble: 0 x 3
# ... with 3 variables: Rating <int>, mahal.dist <dbl>, is.outlier <lgl>

Edit

Based off your comments, here is a possible answer:

# Rename "good" and "bad" ratings of people and pivot:
df1pivot <- df1 %>%
  rename_with(.cols = everything(),
              .fn   = ~str_c(., c(rep('_Bad', 3),
                                  rep('_Good', 7)))) %>%
  pivot_longer(cols = everything(),
               names_to = c('Test', 'Test_Type'),
               names_pattern = '(.*)_(.*)',
               values_to = 'Score')

# Check Mahalanobis:
df1pivot %>%
  group_by(Test_Type) %>%
  mahalanobis_distance(Score) %>%
  filter(is.outlier==T)

# Same for df2
df2pivot <- df2 %>%
  rename_with(.cols = everything(),
              .fn   = ~str_c(., c(rep('_Bad', 3),
                                  rep('_Good', 7)))) %>%
  pivot_longer(cols = everything(),
               names_to = c('Test', 'Test_Type'),
               names_pattern = '(.*)_(.*)',
               values_to = 'Score')

# Check df2 outliers:
df2pivot %>%
  group_by(Test_Type) %>%
  mahalanobis_distance(Score) %>%
  filter(is.outlier==T)


来源: stackexchange

问:
How to change language locale in Jetpack Compose
I want to change language programmatically in Jetpack Compose. I've read quite some posts and watch videos but still can't find the way to do it. (The post and video are in Android view system.)

How to change language in kotlin (locale)

https://www.youtube.com/watch?v=xxPzi2h0Vvc

I want my app works like below image. After clicking the language, the whole app will change the language. Below code is the clickable's part. What should I do in this clickable part and MainActivity.kt?

```<code>@Composable
fun LanguageScreen(
    navController: NavController,
) {
    val context = LocalContext.current
    val langList = arrayOf("English", "繁體中文", "简体中文", "日本語")
    var items by remember {
        mutableStateOf(
            langList.map {
                LanguageItem(
                    title = it,
                    isSelected = false
                )
            }
        )
    }
    LazyColumn(
        modifier = Modifier
            .fillMaxSize()
    ) {
        items(items.size) { i ->
            Row(
                modifier = Modifier
                    .fillMaxWidth()
                    .clickable {

                        items = items.mapIndexed { j, item ->
                            if (i == j) {
                                item.copy(isSelected = true)
                            } else item.copy(isSelected = false)
                        }

                        if (i == 0) {
                            setLocaleLang("", context)
                        } else if (i == 1) {
                            setLocaleLang("zh-rTW", context)
                        } else if (i == 2) {
                            setLocaleLang("zh-rCN", context)
                        } else {
                            setLocaleLang("ja", context)
                        }

                    }
                    .padding(16.dp),
                horizontalArrangement = Arrangement.SpaceBetween,
                verticalAlignment = Alignment.CenterVertically
            ) {
                Text(text = items[i].title, fontSize = 20.sp)
                if (items[i].isSelected) {
                    Icon(
                        imageVector = Icons.Default.Check,
                        contentDescription = "Selected",
                        tint = Color.Blue,
                        modifier = Modifier.size(24.dp)
                    )
                }
            }
            Spacer(
                modifier = Modifier
                    .fillMaxWidth()
                    .height(1.dp)
                    .background(Color.LightGray)
            )
        }
    }
}

fun setLocaleLang(lang: String, context: Context) {
    val locale = Locale(lang)
    Locale.setDefault(locale)
    val resources = context.resources
    val configuration = resources.configuration
    configuration.setLocale(locale)
    resources.updateConfiguration(configuration, resources.displayMetrics)

    val editor = context.getSharedPreferences("Settings", Context.MODE_PRIVATE).edit()
    editor.putString("My_Lang", lang)
    editor.apply()
}

fun loadLocale(context: Context) {
    val sharedPreferences = context.getSharedPreferences("Settings", Activity.MODE_PRIVATE)
    val language = sharedPreferences.getString("My_Lang", "")
    setLocaleLang(language!!, context)
}

</code>```

MainActivity.kt

```<code>class MainActivity : ComponentActivity() {
    @ExperimentalFoundationApi
    override fun onCreate(savedInstanceState: Bundle?) {

        loadLocale(this)

        super.onCreate(savedInstanceState)
        setContent {
            SpanishTravelTheme {
</code>```

Image: https://i.stack.imgur.com/y5kcO.png

答:
You can try this

Create a helper object

LocaleUtils.kt

```<code>object LocaleUtils {

// [AppPrefs] is sharedpreferences or datastore
fun setLocale(c: Context, pref: AppPrefs) = updateResources(c, pref.language ?: "en") //use locale codes

private fun updateResources(context: Context, language: String) {
    context.resources.apply {
        val locale = Locale(language)
        val config = Configuration(configuration)

        context.createConfigurationContext(configuration)
        Locale.setDefault(locale)
        config.setLocale(locale)
        context.resources.updateConfiguration(config, displayMetrics)
    }
  }
}
</code>```

Call setLocale inside setContent to change the language at runtime.

```<code>    setContent {
        LocaleUtils.setLocale(LocalContext.current, viewModel.pref)
</code>```

To change the App language

```<code>    fun changeAppLanguage(languageISO: String) {
        sharedPrefs.edit().putString(LANGUAGE_KEY, languageISO).apply()
    }
</code>```

Please remember to use language ISO 639-1 Code

here's a list of Locale codes
https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/localization

ContentLicense: CC BY-SA 4.0

Body:
I want to change language programmatically in Jetpack Compose. I've read quite some posts and watch videos but still can't find the way to do it. (The post and video are in Android view system.)

How to change language in kotlin (locale)

https://www.youtube.com/watch?v=xxPzi2h0Vvc

I want my app works like below image. After clicking the language, the whole app will change the language. Below code is the clickable's part. What should I do in this clickable part and MainActivity.kt?

@Composable
fun LanguageScreen(
    navController: NavController,
) {
    val context = LocalContext.current
    val langList = arrayOf("English", "繁體中文", "简体中文", "日本語")
    var items by remember {
        mutableStateOf(
            langList.map {
                LanguageItem(
                    title = it,
                    isSelected = false
                )
            }
        )
    }
    LazyColumn(
        modifier = Modifier
            .fillMaxSize()
    ) {
        items(items.size) { i ->
            Row(
                modifier = Modifier
                    .fillMaxWidth()
                    .clickable {

                        items = items.mapIndexed { j, item ->
                            if (i == j) {
                                item.copy(isSelected = true)
                            } else item.copy(isSelected = false)
                        }

                        if (i == 0) {
                            setLocaleLang("", context)
                        } else if (i == 1) {
                            setLocaleLang("zh-rTW", context)
                        } else if (i == 2) {
                            setLocaleLang("zh-rCN", context)
                        } else {
                            setLocaleLang("ja", context)
                        }

                    }
                    .padding(16.dp),
                horizontalArrangement = Arrangement.SpaceBetween,
                verticalAlignment = Alignment.CenterVertically
            ) {
                Text(text = items[i].title, fontSize = 20.sp)
                if (items[i].isSelected) {
                    Icon(
                        imageVector = Icons.Default.Check,
                        contentDescription = "Selected",
                        tint = Color.Blue,
                        modifier = Modifier.size(24.dp)
                    )
                }
            }
            Spacer(
                modifier = Modifier
                    .fillMaxWidth()
                    .height(1.dp)
                    .background(Color.LightGray)
            )
        }
    }
}

fun setLocaleLang(lang: String, context: Context) {
    val locale = Locale(lang)
    Locale.setDefault(locale)
    val resources = context.resources
    val configuration = resources.configuration
    configuration.setLocale(locale)
    resources.updateConfiguration(configuration, resources.displayMetrics)

    val editor = context.getSharedPreferences("Settings", Context.MODE_PRIVATE).edit()
    editor.putString("My_Lang", lang)
    editor.apply()
}

fun loadLocale(context: Context) {
    val sharedPreferences = context.getSharedPreferences("Settings", Activity.MODE_PRIVATE)
    val language = sharedPreferences.getString("My_Lang", "")
    setLocaleLang(language!!, context)
}

MainActivity.kt

class MainActivity : ComponentActivity() {
    @ExperimentalFoundationApi
    override fun onCreate(savedInstanceState: Bundle?) {

        loadLocale(this)

        super.onCreate(savedInstanceState)
        setContent {
            SpanishTravelTheme {

Image: https://i.stack.imgur.com/y5kcO.png

Body:
You can try this

Create a helper object

LocaleUtils.kt

object LocaleUtils {

// [AppPrefs] is sharedpreferences or datastore
fun setLocale(c: Context, pref: AppPrefs) = updateResources(c, pref.language ?: "en") //use locale codes

private fun updateResources(context: Context, language: String) {
    context.resources.apply {
        val locale = Locale(language)
        val config = Configuration(configuration)

        context.createConfigurationContext(configuration)
        Locale.setDefault(locale)
        config.setLocale(locale)
        context.resources.updateConfiguration(config, displayMetrics)
    }
  }
}

Call setLocale inside setContent to change the language at runtime.

    setContent {
        LocaleUtils.setLocale(LocalContext.current, viewModel.pref)

To change the App language

    fun changeAppLanguage(languageISO: String) {
        sharedPrefs.edit().putString(LANGUAGE_KEY, languageISO).apply()
    }

Please remember to use language ISO 639-1 Code

here's a list of Locale codes
https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/localization


问:
Convert all strings in a list to integers
How do I convert all strings in a list to integers?</p>
```<code>['1', '2', '3']  ⟶  [1, 2, 3]
</code>```

答:
There are several methods to convert string numbers in a list to integers.

In Python 2.x you can use the map function:

```<code>>>> results = ['1', '2', '3']
>>> results = map(int, results)
>>> results
[1, 2, 3]
</code>```

Here, It returns the list of elements after applying the function.

In Python 3.x you can use the same map

```<code>>>> results = ['1', '2', '3']
>>> results = list(map(int, results))
>>> results
[1, 2, 3]
</code>```

Unlike python 2.x, Here map function will return map object i.e. iterator which will yield the result(values) one by one that's the reason further we need to add a function named as list which will be applied to all the iterable items.

Refer to the image below for the return value of the map function and it's type in the case of python 3.x

The third method which is common for both python 2.x and python 3.x i.e List Comprehensions

```<code>>>> results = ['1', '2', '3']
>>> results = [int(i) for i in results]
>>> results
[1, 2, 3]
</code>```

Body:
How do I convert all strings in a list to integers?

['1', '2', '3']  ⟶  [1, 2, 3]

Body:
There are several methods to convert string numbers in a list to integers.

In Python 2.x you can use the map function:

>>> results = ['1', '2', '3']
>>> results = map(int, results)
>>> results
[1, 2, 3]

Here, It returns the list of elements after applying the function.

In Python 3.x you can use the same map

>>> results = ['1', '2', '3']
>>> results = list(map(int, results))
>>> results
[1, 2, 3]

Unlike python 2.x, Here map function will return map object i.e. iterator which will yield the result(values) one by one that's the reason further we need to add a function named as list which will be applied to all the iterable items.

Refer to the image below for the return value of the map function and it's type in the case of python 3.x

The third method which is common for both python 2.x and python 3.x i.e List Comprehensions

>>> results = ['1', '2', '3']
>>> results = [int(i) for i in results]
>>> results
[1, 2, 3]


问:
Packaging QT application to an .AppImage file for Linux
I am trying to build and package QGC into a standalone .AppImage file for running on Linux (Ubuntu) systems.

My issue is this: I install Qt Creator with desktop gcc for 5.15.2 as described in the QGC developer docs. On Ubuntu 20 with glibc 2.31 I can use Qt Creator to build QGC. Then I try to package it into an .AppImage with LinuxDeployQT. This fails and says I must have glibc <= 2.27.

So I got an installation of Ubuntu 18. This has glibc 2.27 by default. The problem with Ubuntu 18 with glibc is when I install QT Creator with 5.15.2 and try to run QT Creator I get an error saying glibc_2.28 is not found.

If >= 2.28 is required to build with Qt Creator, but <= 2.27 is required to package into an .AppImage how is this usually done? I know there is a way to do it, but I don’t know what it is. The QGC developer docs specify what is needed to build QGC as well as the versioning and deployment strategy, but not how to bundle the app.

Thank you for your help!

答:
I had exactly the same issue, and was hitting my head to the walls:
No way to install Qt from the official installer on Ubuntu 18.04. it was also impossible to deploy any Qt app when using Ubuntu 20.04. The ultimate dead end..

Here is the solution i came up today:

Back up the files, do fresh Ubuntu 18.04 installation. Your current Qt installation should be cleaned too

Install Qt according to John Ragan's answer, from command line:

Install Qt on Ubuntu

Do not use Qt Online Installer! (this is very critical)

Follow Daniel Gakwaya's deployment strategy, by using linuxdeployqt:

https://youtu.be/2B--nzfoQ9s

The command: ./linuxdeployqt-continuous-x86_64.AppImage ./AppName/Appname -appimage gave me a single .AppImage file, which works as a charm on a ubuntu 20.04 virtualbox

you probably won't have issue with linuxdeployqt, since will be using -appimage option. but if you do, have a check at this forum post:

https://github.com/probonopd/linuxdeployqt/issues/402

hope this solves your issues. happy deployments


问:
What is u0 in verilog?
I was looking at this tutorial on Verilog, and the author uses something like

```<code>module counter_tb;
  reg clk, reset, enable;
  wire [3:0] count;

  counter U0 (
  .clk    (clk),
  .reset  (reset),
  .enable (enable),
  .count  (count)
  );

endmodule
</code>```

What is U0? He does not mention it earlier in the tutorial anywhere.

答:
This is an older question; however, I was perusing the same tutorial and had the same question. I thought I would give a more detailed explanation of the anatomy of the instantiation.

```<code>[moduleName] [instanceName] ( [connections] );
</code>```

The name of the module to instantiate is followed by the name of the instance. This is then followed by a parenthesized list of connections, comma-separated, with the following syntax:

```<code>.[pin] ( [connectionName] ),
</code>```

Where [pin] is the name of the output/input in the original module definition and [connectionName] is how the testbench will refer to that connection.

The pin name and the connection name do not have to match, though many examples I've seen use the pin name as the connection name.

Source on slide 12 of (Updated link originally provided in @osgx's answer):
Verilog_Modules.pdf

ContentLicense: CC BY-SA 3.0

Title: What is u0 in verilog?

Body:
I was looking at this tutorial on Verilog, and the author uses something like

module counter_tb;
  reg clk, reset, enable;
  wire [3:0] count;

  counter U0 (
  .clk    (clk),
  .reset  (reset),
  .enable (enable),
  .count  (count)
  );

endmodule

What is U0? He does not mention it earlier in the tutorial anywhere.

Body:
This is an older question; however, I was perusing the same tutorial and had the same question. I thought I would give a more detailed explanation of the anatomy of the instantiation.

[moduleName] [instanceName] ( [connections] );

The name of the module to instantiate is followed by the name of the instance. This is then followed by a parenthesized list of connections, comma-separated, with the following syntax:

.[pin] ( [connectionName] ),

Where [pin] is the name of the output/input in the original module definition and [connectionName] is how the testbench will refer to that connection.

The pin name and the connection name do not have to match, though many examples I've seen use the pin name as the connection name.

Source on slide 12 of (Updated link originally provided in @osgx's answer):
Verilog_Modules.pdf


问:
startup probes not working with exec as expected
I have a sample webapp and redis  that I am running in Kubernetes.
I am using probes for the basic checks like below
Now I want to make sure that redis is up and running before the application.
below code snippet is from webapp.
when I run a command nc -zv <redis service name> 6379 it works well, but when I use it as command in startupProbe it gives me errors. I think the way I am passing command is not right, can someone help me understand what is wrong

error I get

```<code>OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "nc -zv redis 6379": executable file not found in $PATH: unknown

</code>```
```<code>    readinessProbe:
      httpGet:
        path: /
        port: 5000
      initialDelaySeconds: 20
      periodSeconds: 5
    livenessProbe:
      httpGet:
         path: /
         port: 5000
      initialDelaySeconds: 30
      periodSeconds: 5
    startupProbe:
      exec:
        command:
        - nc -zv redis 6379
      failureThreshold: 20
      periodSeconds: 5
</code>```

答:
The command has to be entered in proper format as it is an array. The below code is in expected format.</p>
```<code>        startupProbe:
          exec:
            command:
            - nc
            - -zv
            - redis
            - "6379"
          failureThreshold: 30
          periodSeconds: 5
</code>```

Body:
I have a sample webapp and redis  that I am running in Kubernetes.
I am using probes for the basic checks like below
Now I want to make sure that redis is up and running before the application.
below code snippet is from webapp.
when I run a command nc -zv <redis service name> 6379 it works well, but when I use it as command in startupProbe it gives me errors. I think the way I am passing command is not right, can someone help me understand what is wrong

error I get

OCI runtime exec failed: exec failed: container_linux.go:380: starting container process caused: exec: "nc -zv redis 6379": executable file not found in $PATH: unknown

    readinessProbe:
      httpGet:
        path: /
        port: 5000
      initialDelaySeconds: 20
      periodSeconds: 5
    livenessProbe:
      httpGet:
         path: /
         port: 5000
      initialDelaySeconds: 30
      periodSeconds: 5
    startupProbe:
      exec:
        command:
        - nc -zv redis 6379
      failureThreshold: 20
      periodSeconds: 5

Body:
The command has to be entered in proper format as it is an array. The below code is in expected format.

        startupProbe:
          exec:
            command:
            - nc
            - -zv
            - redis
            - "6379"
          failureThreshold: 30
          periodSeconds: 5


问:
COM Interop fails when moving to new server
I've run into a problem I just can't seem to solve. The background:  Years ago, I developed a web site for one of my customers using ASP 2.0 and Ajax. One function of the web site is to produce customer invoices, on demand.  Their in-house production system is written in Visual Foxpro 8 with SQL Server 2005 on the back end.  Since I already had an invoice generation object that would produce a PDF file, I rolled up a COM EXE and created a COM wrapper for use in my ASP page.  It works great for years, but now we're trying to move the page to a different location and things aren't working so great.

The network techs have re-produced the environment and the rest of the web site runs perfectly.  I can even instantiate the COM object (I've logged the init and all is well), but the very first call to one of the objects methods results in an "Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))".  I'm just plain stuck!

Here's what does work:

1)  Using a visual foxpro program from the same server I can instantiate the object, call the generate invoice method and produce the PDF - no problem whatsoever.

2)  Using VBScript from a very simple ASP page I can use Server.CreateObject() to instantiate the object and successfully generate the invoice from there.

So far I know:

1)  the object is registered correctly and is launching as the proper user, with all of the rights needed to do it's business.

2)  the wrapper for the COM EXE and COM object versions are matched.

I apologize for the long post.  To make a long story short:  Why would ASP.NET not be able to make a call to any method of a VFP COM object after it's been instantiated successfully?

Thanks in Advance - I'm seriously stuck on this one.

Erik

答: For those running into the same situation, adding the COM EXE to the Data Execution Prevent (DEP) exception list allowed the calls to the objects methods. </p>


问:
R package was installed by version with different internals
On my Win 7 Ent x64 I installed RStudio R-3.4.2.

I installed few packages that I need (RPostgreSQL, sqldf, etc..)
But when I'm executing code, these libraries give me errors:

```<code>library(RPostgreSQL)
</code>```

Error: package ‘RPostgreSQL’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version

In addition: Warning message:
  package ‘RPostgreSQL’ was built under R version 3.5.0

All of the packages are downloaded from CRAN. RPostgrSQL is 0.6-2 version.

I'm pretty sure that solution is quite simple, but I searched a lot and still cannot find the solution.

答:
You can try to find all packages installed with the old version R like this:

grep 'Built: R 3.4' /usr/local/lib/R/site-library/*/DESCRIPTION > temp
```

and then you can uninstall the packages with remove.packages()

Body:
On my Win 7 Ent x64 I installed RStudio R-3.4.2.

I installed few packages that I need (RPostgreSQL, sqldf, etc..)
But when I'm executing code, these libraries give me errors:

library(RPostgreSQL)

Error: package ‘RPostgreSQL’ was installed by an R version with different internals; it needs to be reinstalled for use with this R version

In addition: Warning message:
  package ‘RPostgreSQL’ was built under R version 3.5.0

All of the packages are downloaded from CRAN. RPostgrSQL is 0.6-2 version.

I'm pretty sure that solution is quite simple, but I searched a lot and still cannot find the solution.

Body:
You can try to find all packages installed with the old version R like this:

grep 'Built: R 3.4' /usr/local/lib/R/site-library/*/DESCRIPTION > temp

and then you can uninstall the packages with remove.packages()


问:
Editing CSS shadow part of an ionic select text (color) without affecting other instance of ion select
I am trying to edit the color of inside text of an ion select when i pick an option, but once i edit the shadow part in the component, the rest of the ion selects (in other components) are taking this change. I just want to encapsulate this color change, but i can not without editing the shadow part and affecting the rest as they have different colors.
I have tried to put them in different css files but i doesnt work of course.
Example, i have an ion select in a component with this css

```<code>ion-select::part(text){
    font-weight: 900;
    color: white;
}
</code>```

but it gets overwritten with the css of another component that i edit

```<code>ion-select::part(text){
    font-weight: 900;
    color: #c00000;
}
</code>```

Any help with CSS shadow parts it's appreciate it

答:
For anybody trying to aim a shadow part inside a class selector, this is the right way to do it. In this example, "selector-red" would be the class name in the ion-select component</p>
```<code>ion-select.selector-red::part(text){
    font-weight: 900;
    color: #c00000;
}
</code>```

Body:
I am trying to edit the color of inside text of an ion select when i pick an option, but once i edit the shadow part in the component, the rest of the ion selects (in other components) are taking this change. I just want to encapsulate this color change, but i can not without editing the shadow part and affecting the rest as they have different colors.
I have tried to put them in different css files but i doesnt work of course.
Example, i have an ion select in a component with this css

ion-select::part(text){
    font-weight: 900;
    color: white;
}

but it gets overwritten with the css of another component that i edit

ion-select::part(text){
    font-weight: 900;
    color: #c00000;
}

Any help with CSS shadow parts it's appreciate it

Body:
For anybody trying to aim a shadow part inside a class selector, this is the right way to do it. In this example, "selector-red" would be the class name in the ion-select component

ion-select.selector-red::part(text){
    font-weight: 900;
    color: #c00000;
}


问:
Gremlin query language - how to limit/filter path or start from specific verticle in chain?
I am new to the graph databases and Gremlin.
What I am trying to achieve is to ask a simple question to the database.
Provided id of the Entity and id of the File, I want to find all other entites who have access to this file via the Share and return the result with the property "type" of the share.
Here is the graph itself:

What I tried:

g.V("Enity:1").out("Created").hasLabel("Share").where(out("Shared").hasId("File:1")).in("Access").path()

This returns me:

```<code>[
  {
    //Omitted empty aray
    "objects": [
      {
        "id": "dseg:/Entity/1",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Share/1",
        "label": "Share",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Entity/1",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      }
    ]
  },
  {
    //Omitted empty aray
    "objects": [
      {
        "id": "dseg:/Entity/1",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Share/1",
        "label": "Share",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Entity/3",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      }
    ]
  }
]
</code>```

It shows the path taken from the entry point(Entity:1) to the target(s) Entity 2 and 3

My question with technical details: Is there a way to start gathering path() after Entity:1 or intermediate verticle I chose, so that in result I will get only Share + Entity who has Access to it?

答:
You just need to tell path step where to start from.
You can do something like this:

```<code>gremlin> g.V("entity:1").
......1>   out("Created").
......2>   hasLabel("Share").
......3>   where(out("Shared").hasId("File:1")).as('a').
......4>   in("Access").
......5>   path().from('a').by('Type').by()
==>[RO,v[entity:2]]
==>[RO,v[entity:3]]
</code>```

Another way to do this is :

```<code>gremlin> g.V().
......1>   hasLabel('Share').
......2>   where(out('Shared').hasId('File:1')).
......3>   where(__.in('Created').hasId('entity:1')).
......4>   in('Access').
......5>   path().by('Type').by()
==>[RO,v[entity:2]]
==>[RO,v[entity:3]]
</code>```

Body:
I am new to the graph databases and Gremlin.
What I am trying to achieve is to ask a simple question to the database.
Provided id of the Entity and id of the File, I want to find all other entites who have access to this file via the Share and return the result with the property "type" of the share.
Here is the graph itself:

What I tried:

g.V("Enity:1").out("Created").hasLabel("Share").where(out("Shared").hasId("File:1")).in("Access").path()

This returns me:

[
  {
    //Omitted empty aray
    "objects": [
      {
        "id": "dseg:/Entity/1",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Share/1",
        "label": "Share",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Entity/1",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      }
    ]
  },
  {
    //Omitted empty aray
    "objects": [
      {
        "id": "dseg:/Entity/1",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Share/1",
        "label": "Share",
        "type": "vertex",
        "properties": {}
      },
      {
        "id": "dseg:/Entity/3",
        "label": "Entity",
        "type": "vertex",
        "properties": {}
      }
    ]
  }
]

It shows the path taken from the entry point(Entity:1) to the target(s) Entity 2 and 3

My question with technical details: Is there a way to start gathering path() after Entity:1 or intermediate verticle I chose, so that in result I will get only Share + Entity who has Access to it?

Body:
You just need to tell path step where to start from.
You can do something like this:

gremlin> g.V("entity:1").
......1>   out("Created").
......2>   hasLabel("Share").
......3>   where(out("Shared").hasId("File:1")).as('a').
......4>   in("Access").
......5>   path().from('a').by('Type').by()
==>[RO,v[entity:2]]
==>[RO,v[entity:3]]

Another way to do this is :

gremlin> g.V().
......1>   hasLabel('Share').
......2>   where(out('Shared').hasId('File:1')).
......3>   where(__.in('Created').hasId('entity:1')).
......4>   in('Access').
......5>   path().by('Type').by()
==>[RO,v[entity:2]]
==>[RO,v[entity:3]]


问:
Declare variables in build method or in class itself? - Flutter
Which is the correct usage? Also I'm confused about if we should do "extract method" or "extract widget"? Flutter recommends to extract widgets. But I'm not sure where should I extract widget?

```<code>class TopBarTitle extends StatelessWidget {
  const TopBarTitle();

  static const String title = 'FLASHCARDS';
  static const String fontFamily = 'Itim';

  @override
  Widget build(BuildContext context) {
    return Text(
      title,
      style: TextStyle(
        fontSize: 18.sp,
        color: Theme.of(context).iconTheme.color,
        fontWeight: FontWeight.w500,
        fontFamily: fontFamily,
      ),
    );
  }
}
</code>```

or

```<code>class TopBarTitle extends StatelessWidget {
  const TopBarTitle();

  @override
  Widget build(BuildContext context) {
    const String title = 'FLASHCARDS';
    const String fontFamily = 'Itim';

    return Text(
      title,
      style: TextStyle(
        fontSize: 18.sp,
        color: Theme.of(context).iconTheme.color,
        fontWeight: FontWeight.w500,
        fontFamily: fontFamily,
      ),
    );
  }
}
</code>```

答:
The first one is preferred. build method is supposed to be called many times in a short time and you should keep it simple. In the second code, you're defining two variables every time the method gets called (of course it's a very cheap operation considering they're constant but still it should be prevented whenever possible).

And to answer your question about "extract method" or "extract widget", Flutter recommends "extract widget" since there are lot's optimizations applied in that case and it's easier to debug too. There are lot's of discussions about that which you can easily find by searching. For example read this one: https://stackoverflow.com/a/53234826/5204833

Body:
Which is the correct usage? Also I'm confused about if we should do "extract method" or "extract widget"? Flutter recommends to extract widgets. But I'm not sure where should I extract widget?

class TopBarTitle extends StatelessWidget {
  const TopBarTitle();

  static const String title = 'FLASHCARDS';
  static const String fontFamily = 'Itim';

  @override
  Widget build(BuildContext context) {
    return Text(
      title,
      style: TextStyle(
        fontSize: 18.sp,
        color: Theme.of(context).iconTheme.color,
        fontWeight: FontWeight.w500,
        fontFamily: fontFamily,
      ),
    );
  }
}

or

class TopBarTitle extends StatelessWidget {
  const TopBarTitle();

  @override
  Widget build(BuildContext context) {
    const String title = 'FLASHCARDS';
    const String fontFamily = 'Itim';

    return Text(
      title,
      style: TextStyle(
        fontSize: 18.sp,
        color: Theme.of(context).iconTheme.color,
        fontWeight: FontWeight.w500,
        fontFamily: fontFamily,
      ),
    );
  }
}


问:
branch and checkout using a single command
Creating and using a new branch involves two commands:

```<code>$ git branch new_branch_name
$ git checkout new_branch_name
</code>```

I tend to forget the latter, which can be annoying. Is there a way to do this using a single command? Perhaps using an alias, or something similar? I know I could write a shell function, but that seems a bit much work for such a simple and common task.

Bazaar does support this to some degree using the bzr branch --switch notation.

答:
There are two oneliners for this in git.

git checkout -b new_branch_name

git switch -c new_branch_name

Under the hood, both do the same thing:

git branch new_branch_name
git checkout new_branch_name
```

Body:
Creating and using a new branch involves two commands:

$ git branch new_branch_name
$ git checkout new_branch_name

I tend to forget the latter, which can be annoying. Is there a way to do this using a single command? Perhaps using an alias, or something similar? I know I could write a shell function, but that seems a bit much work for such a simple and common task.

Bazaar does support this to some degree using the bzr branch --switch notation.


问:
R: Return a vector using %in% operator
I have a vector with delimiters and I want to generate a vector of the same length with boolean values based on whether or not one of the delimited values contains what I am after. I cannot find a way to do this neatly in vector-based logic. As an example:

```<code>x <- c('a', 'a; b', 'ab; c', 'b; c', 'c; a', 'c')
</code>```

Using some magic asking whether 'a' %in% x, I want to get the vector:

```<code>TRUE, TRUE, FALSE, FALSE, TRUE, FALSE
</code>```

I initially tried the following:

```<code>'a' %in% trimws(strsplit(x, ';'))
</code>```

But this unexpectedly collapses the entire list and returns TRUE, rather than a vector, since one of the elements in x is 'a'. Is there a way to get the vector I am looking for without rewriting the code into a for-loop?

答:
Base R:

```<code>grepl("a", x)
</code>```

or (when you want to use explicitly %in%):

```<code>sapply(strsplit(x,""), function(x){ "a" %in% x})
</code>```

When working with strings and letters I always use the great library stringr

```<code>library(stringr)
x <- c('a', 'a; b', 'ab; c', 'b; c', 'c; a', 'c')
str_detect(x, "a")
</code>```

Title: R: Return a vector using %in% operator

Body:
I have a vector with delimiters and I want to generate a vector of the same length with boolean values based on whether or not one of the delimited values contains what I am after. I cannot find a way to do this neatly in vector-based logic. As an example:

x <- c('a', 'a; b', 'ab; c', 'b; c', 'c; a', 'c')

Using some magic asking whether 'a' %in% x, I want to get the vector:

TRUE, TRUE, FALSE, FALSE, TRUE, FALSE

I initially tried the following:

'a' %in% trimws(strsplit(x, ';'))

But this unexpectedly collapses the entire list and returns TRUE, rather than a vector, since one of the elements in x is 'a'. Is there a way to get the vector I am looking for without rewriting the code into a for-loop?

Body:
Base R:

grepl("a", x)

or (when you want to use explicitly %in%):

sapply(strsplit(x,""), function(x){ "a" %in% x})

When working with strings and letters I always use the great library stringr

library(stringr)
x <- c('a', 'a; b', 'ab; c', 'b; c', 'c; a', 'c')
str_detect(x, "a")


问:
calculate the real distance between two points in an image with python
In connection with a business project, I need to find the real distance between two points in the images received from the mobile phone. Due to the lack of information such as the physical size of image sensors in smartphone cameras in the EXIF file, by estimating the distance and forcing the user to place an object with a certain height and width in the image, I was able to estimate the size of the image sensor but with some error. But these errors can be avoided and will not be very problematic. To do this, I followed the tips in this post.

https://photo.stackexchange.com/questions/12434/how-do-i-calculate-the-distance-of-an-object-in-a-photo/12437#12437

Now I am looking to find the distance between two points in the image. According to this link,

calculate the real distance between to point using image

the distance between the two desired points can be obtained, but I did not understand how the column and row in this formula are obtained.

I would be very grateful if I could get help. If I went the wrong way, thank you for explaining

答:
In the link you shared, the points u,v are image centers, which are found using the sensor/digitizer row and column and the width and height of the image.

This paper explains image centers well:
https://www.ri.cmu.edu/pub_files/pub4/willson_reg_1994_3/willson_reg_1994_3.pdf

But nonetheless, the row and column values are part of the actual camera itself, not relative to the image necessarily.

Beyond that point, everything else is found using those two values along with the z-axis value and focal length, which is then plugged into the Euclidian distance formula.


问:
Can I do another merge of the same feature branch after a merge?
Here's the scenario:

I have finished working on my feature branch A.

I commit my changes and check out in development

I merge the feature branch A into development

before I git push, I realize that I forgot something in the feature Branch
A (delete inline comment)

Can i do again?

check out to feature branch A and delete the comment.

Then commit the change and check out again in development.

Then again merge the feature branch A into development.

Question Is this possible follow steps 1 to 7 or I have to do create a new branch afterwards point 4. to make the changes? Thanks in advence!

答:
Yes, you can merge again (and again and again...).

This is how the graph would look like after this operation (numbers indicate steps in your scenario, ie. 3 and 7 are merge commits):

```<code>development  --------3----7---
                    /    /
  feature/A  ------2----6
</code>```

Body:
Yes, you can merge again (and again and again...).

This is how the graph would look like after this operation (numbers indicate steps in your scenario, ie. 3 and 7 are merge commits):

development  --------3----7---
                    /    /
  feature/A  ------2----6


问:
How to Implement ABAC Access Control using NGAC
I want to implement ABAC access control model using the Policy Machine or Next Generation Access Control(NGAC), that provide a general and unified framework to support different types of attribute-based policies with its different Components ( PEP, PDP, PAP, PIP). I'm using JAVA as language and i'm seeking for documentation or Github repositories that can help me. </p>

答:
The PM-Master project linked by @c12simple began as a standalone Java project out of NIST called Harmonia.

The implementation here may have some helpful components for you in java.

https://github.com/PM-Master/Harmonia-1.6

As for documentation to help you model ABAC in NGAC, there are some heavy technical documents from the NGAC specifications that may be of some use. They can be pretty dense and dry though.

There were a number of documents that were all consolidated/replaced by INCITS 565. Below is a link to the draft that went out for public comment.

https://standards.incits.org/apps/group_public/download.php/112076/livelink


问:
I am trying to create an Image Slider, but when I set the position of the angle left icon to ABSOLUTE, it disappears from the screen
The angle left icon basically disappears when I set its position to absolute, but it remains otherwise.

Here the angle left icon is not visible due its position property. How can it appear on the screen so that I can position it on the top left part of the image, so as to make an image slider.

This is my html code:

```<code><section>
            <div class="team">
                <div>
                    <h1 id="teamtext">Our Team and Contributers</h1>
                </div>
                <div class="content">
                    <div class="imageslider">
                        <img src="assets/photo1.jpg">
                        <img src="assets/photo2.jpg">
                        <img src="assets/photo3.jpg">
                        <img src="assets/photo4.jpg">
                        <img src="assets/photo5.jpg">
                    </div>
                </div>
                <div class="slideleft">
                    <i class="uil uil-angle-left"></i>
                </div>
                <div class="slideright">
                    <i class="uil uil-angle-right"></i>
                </div>
            </div>
        </section>
</code>```

and this is my CSS code:

```<code>.content{
    height: 400px;
    width: 750px;
    overflow: hidden;
}

.imageslider{
    height: 100%;
    width: 100%;

}

.imageslider img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideleft{
    color: red;
    font-size: 100px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.slideright{
    color: red;
    font-size: 100px;
}
</code>```

I searched similar questions in the internet but they aren't working.

Body:
The angle left icon basically disappears when I set its position to absolute, but it remains otherwise.

Here the angle left icon is not visible due its position property. How can it appear on the screen so that I can position it on the top left part of the image, so as to make an image slider.

This is my html code:

Our Team and Contributers

and this is my CSS code:

.content{
    height: 400px;
    width: 750px;
    overflow: hidden;
}

.imageslider{
    height: 100%;
    width: 100%;

}

.imageslider img{
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slideleft{
    color: red;
    font-size: 100px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.slideright{
    color: red;
    font-size: 100px;
}

I searched similar questions in the internet but they aren't working.

Body:
It appears while having position: absolute;. Please see my codesnippet:

<style type="text/css">.content {
  height: 400px;
  width: 750px;
  overflow: hidden;
  border: solid;
}

.imageslider {
  height: 100%;
  width: 100%;
  border: solid;
  display: flex;
  flex-wrap: wrap;
}

.imageslider img {
  width: 50%;
  height: calc(400px / 3);
  object-fit: cover;
}

.slideleft {
  color: red;
  font-size: 100px;
  position: absolute;
  top: 15%;
}

.slideright {
  color: red;
  font-size: 100px;
}

<section>
  <div class="team">
    <div>
      <h1 id="teamtext">Our Team and Contributers</h1>
    </div>
    <div class="content">
      <div class="imageslider">
        <img src="https://s4.uupload.ir/files/1-6-5_ssnb.jpg">
        <img src="https://s4.uupload.ir/files/1-6-5_ssnb.jpg">
        <img src="https://s4.uupload.ir/files/1-6-5_ssnb.jpg">
        <img src="https://s4.uupload.ir/files/1-6-5_ssnb.jpg">
        <img src="https://s4.uupload.ir/files/1-6-5_ssnb.jpg">
      </div>
    </div>
    <div class="slideleft">
      <i class="uil uil-angle-left">slideleft</i>
    </div>
    <div class="slideright">
      <i class="uil uil-angle-right">slideright</i>
    </div>
  </div>
</section>


问:
axios interceptors and eslint
```<code>axios.interceptors.request.use((config) => {
  config.headers = { ...config.headers, customHeader: 'ABC' };
  return config;
});
</code>```

ESLINT error:

error  Assignment to property of function parameter 'config'
no-param-reassign

How to assign my customHeader to config properly?

答:
Try</p>
```<code>axios.interceptors.request.use((config) => {
  return {
    ...config,
    headers: {...config.headers, customHeader: 'ABC" }
  };
});
</code>```

Title: axios interceptors and eslint

Body:
axios.interceptors.request.use((config) => {
  config.headers = { ...config.headers, customHeader: 'ABC' };
  return config;
});

ESLINT error:

error  Assignment to property of function parameter 'config'
no-param-reassign

How to assign my customHeader to config properly?

Body:
Try

axios.interceptors.request.use((config) => {
  return {
    ...config,
    headers: {...config.headers, customHeader: 'ABC" }
  };
});