问:
Top App Bar and Bottom Bar load first but content of tabs load slowy
I have created a bottom bar like below code snippet and integrate it into Scaffold in jetpack compose but when app starts first time it take a time 2/3 second after rendering

```<code>   setContent {
                val navController = rememberNavController()
                var context = LocalContext.current
                val scaffoldState = rememberScaffoldState()
                val coroutineScope = rememberCoroutineScope()
                val systemUiController = rememberSystemUiController()

                val sheetState = rememberModalBottomSheetState(
                    initialValue = ModalBottomSheetValue.Hidden,
                    confirmStateChange = { it != ModalBottomSheetValue.HalfExpanded }
                )

                var showMenu by remember {
                    mutableStateOf(false)
                }

                ModalBottomSheetLayout(
                    sheetState = sheetState,
                    sheetContent = { BottomSheet() },
                    modifier = Modifier
                        .fillMaxSize(),
                    sheetShape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp)
                ) {
                    TravelApplicationDemoTheme {
                        // A surface container using the 'background' color from the theme
                        systemUiController.setStatusBarColor(
                            color = Color(0xFF16C197),
                            darkIcons = false
                        ) { requestedColor ->
                            Color.Gray
                            // TODO: return a darkened color to be used when the system doesn't
                            // natively support dark icons
                        }

                        Scaffold(
                            scaffoldState = scaffoldState,
                            bottomBar = { BottomNavigationBar(navController) },
                            topBar = {
                                TopAppBar(
                                    backgroundColor = Color(0xFF16C197),
                                    title = {
                                        Text(
                                            text = "Travel Application",
                                            style = TextStyle(
                                                color = Color.White,
                                                fontSize = 20.sp,
                                                fontWeight = FontWeight.Bold
                                            )
                                        )
                                    },
                                    navigationIcon = {
                                        IconButton(
                                            onClick = {
                                                coroutineScope.launch {
                                                    scaffoldState.drawerState.open()
                                                }
                                            },
                                        ) {
                                            Icon(
                                                Icons.Rounded.Menu,
                                                contentDescription = "",
                                                tint = Color.White
                                            )
                                        }
                                    },
                                    actions = {
                                        IconButton(onClick = { /*TODO*/ }) {
                                            Icon(
                                                Icons.Rounded.Send,
                                                contentDescription = "",
                                                tint = Color.White
                                            )
                                        }
                                        IconButton(onClick = { showMenu = !showMenu }) {

                                            Icon(
                                                Icons.Rounded.MoreVert,
                                                contentDescription = "",
                                                tint = Color.White,
                                            )
                                        }

                                        DropdownMenu(
                                            expanded = showMenu,
                                            onDismissRequest = { showMenu = false }
                                        ) {
                                            DropdownMenuItem(onClick = { /*TODO*/ }) {
                                                Row() {
                                                    Icon(
                                                        Icons.Rounded.Refresh,
                                                        contentDescription = "",
                                                        tint = Color.Black
                                                    )
                                                    Spacer(modifier = Modifier.width(10.dp))
                                                    Text(text = "Refresh")
                                                }
                                            }
                                            DropdownMenuItem(onClick = { /*TODO*/ }) {
                                                Row() {
                                                    Icon(
                                                        Icons.Rounded.Refresh,
                                                        contentDescription = "",
                                                        tint = Color.Black
                                                    )
                                                    Spacer(modifier = Modifier.width(10.dp))
                                                    Text(text = "Reload")
                                                }
                                            }
                                        }
                                    }
                                )
                            },
                            drawerContent = {
                                DrawerContent(
                                    onOpenTrendingResortScreen = {
                                        coroutineScope.launch {
                                            scaffoldState.drawerState.close()
                                        }
                                        navController.navigate("home/trendingresorts")
                                    }
                                )
                            }

                        ) {
                            it.calculateBottomPadding()
                            NavHost(
                                navController = navController,
                                startDestination = BottomNavItems.Home.route
                            ) {
                                composable(BottomNavItems.Home.route) { backStack ->

                                    var name = backStack.savedStateHandle.get<String>("key")
                                    print("name is ${name}")

                                    Surface(
                                        modifier = Modifier.fillMaxSize(),
                                        color = MaterialTheme.colors.background
                                    ) {

                                        var time = measureTimeMillis {
                                            // Creating a Bottom Sheet
                                            MainScreenContent(
                                                onSettingScreen = {
                                                    navController.navigate(HomeScreen.DiscoverScreen.route) {
/*                                                    popUpTo(BottomNavItems.Home.route) {
                                                        inclusive = true
                                                    }*/
                                                    }
                                                }
                                            )
                                            /*   Column(modifier = Modifier.fillMaxSize()){
                                                   Text(text = "Sharjeel Ahmad Siddiqui")
                                               }*/

                                        }
                                        println("time taken ${time}")

                                    }
                                }
                                composable(BottomNavItems.Setting.route) {
                                    SettingScreen()
                                }
                                composable(BottomNavItems.CenterButton.route) {

                                    //this will handle a system back press button
                                    BackHandler(sheetState.isVisible) {
                                        coroutineScope.launch {
                                            sheetState.hide()
                                        }
                                    }

                                        CenterButtonScreen(
                                            onOpenBottomSheet = {
                                                coroutineScope.launch {
                                                    if (sheetState.isVisible) sheetState.hide()
                                                    else sheetState.show()
                                                }

                                            }
                                        )

                                }
                                composable(BottomNavItems.Contact.route) {
                                    Column(
                                        modifier = Modifier.fillMaxSize(),
                                        verticalArrangement = Arrangement.Center,
                                        horizontalAlignment = Alignment.CenterHorizontally
                                    ) {
                                        ContactScreen()
                                        //    toast("Practice toast")
                                    }
                                }
                                composable(BottomNavItems.Profile.route) {
                                    ProfileScreen()
                                }
                                navigation(
                                    startDestination = "home/testscreen1",
                                    route = HomeScreen.DiscoverScreen.route
                                ) {
                                    composable("home/testscreen1") {
                                        DiscoverScreen(
                                            /*  onChangeScreen = {
                                                 // navController.navigate("home/testscreen2")
                                                  navController.previousBackStackEntry?.savedStateHandle?.set("key","sharjeel")
                                                  navController.popBackStack()
                                              }*/
                                        )
                                    }
                                    composable("home/testscreen2") {
                                        Column(modifier = Modifier.fillMaxSize()) {
                                            Text(text = "dasasd")
                                        }
                                    }

                                }
                                composable("home/trendingresorts") {
                                    TrendingScreenResort()
                                }
                            }
                        }

                    }
                }

            }

</code>```

This is a composable for bottom navigation bar , issue I face is that it is render slowly first time when app open like Top App Bar and Bottom Bar load first and after 2 /3 seconds all other content load

Note : there is no delay() fun call in my code I've already checked...

```<code>@Composable
fun BottomNavigationBar(navController: NavController) {
    val items = listOf(
        BottomNavItems.Home,
        BottomNavItems.Setting,
        BottomNavItems.CenterButton,
        BottomNavItems.Contact,
        BottomNavItems.Profile,
    )

    //will be consider after sorting glt
    Box(
        modifier = Modifier
            .wrapContentHeight()
            .background(color = Color.Transparent)
            .padding(10.dp)
    )
    {
        BottomNavigation(
            backgroundColor = Color.DarkGray,
            contentColor = Color.White,
            modifier = Modifier.clip(RoundedCornerShape(100f))
        ) {
            val navBackStackEntry by navController.currentBackStackEntryAsState()
            val currentRoute = navBackStackEntry?.destination?.route

            items.forEach { item ->
                if (currentRoute != null) {
                    BottomNavigationItem(
                        icon = {
                            Icon(
                                painterResource(id = item.icon),
                                contentDescription = item.title,
                                modifier = Modifier.size(24.dp)
                            )
                        },
                        label = { Text(text = item.title, style = TextStyle(fontSize = 10.sp)) },
                        selectedContentColor = Color.White,
                        unselectedContentColor = Color.White.copy(0.4f),
                        alwaysShowLabel = true,
                        selected = currentRoute.contains(item.route),// == item.route,
                        onClick = {
                            navController.navigate(item.route) {
                                // Pop up to the start destination of the graph to
                                // avoid building up a large stack of destinations
                                // on the back stack as users select items
                                // to remove in between all screen
                                navController.graph.startDestinationRoute?.let { route ->
                                    popUpTo(route) {
                                        saveState = true
                                    }
                                }
                                // Avoid multiple copies of the same destination when
                                // reselecting the same item
                                launchSingleTop = true
                                // Restore state when reselecting a previously selected item
                                restoreState = true
                            }
                        }
                    )
                }
            }

        }

        Image(
            modifier = Modifier
                .height(55.dp)
                .width(740.dp)
                .offset(y = -8.dp),
            painter = painterResource(id = R.drawable.centerbtn),
            contentDescription = ""
        )
    }

}
</code>```

VIDEO ATTACHED FOR REFERENCE

Body:
I have created a bottom bar like below code snippet and integrate it into Scaffold in jetpack compose but when app starts first time it take a time 2/3 second after rendering

   setContent {
                val navController = rememberNavController()
                var context = LocalContext.current
                val scaffoldState = rememberScaffoldState()
                val coroutineScope = rememberCoroutineScope()
                val systemUiController = rememberSystemUiController()

                val sheetState = rememberModalBottomSheetState(
                    initialValue = ModalBottomSheetValue.Hidden,
                    confirmStateChange = { it != ModalBottomSheetValue.HalfExpanded }
                )

                var showMenu by remember {
                    mutableStateOf(false)
                }

                ModalBottomSheetLayout(
                    sheetState = sheetState,
                    sheetContent = { BottomSheet() },
                    modifier = Modifier
                        .fillMaxSize(),
                    sheetShape = RoundedCornerShape(topStart = 20.dp, topEnd = 20.dp)
                ) {
                    TravelApplicationDemoTheme {
                        // A surface container using the 'background' color from the theme
                        systemUiController.setStatusBarColor(
                            color = Color(0xFF16C197),
                            darkIcons = false
                        ) { requestedColor ->
                            Color.Gray
                            // TODO: return a darkened color to be used when the system doesn't
                            // natively support dark icons
                        }

                        Scaffold(
                            scaffoldState = scaffoldState,
                            bottomBar = { BottomNavigationBar(navController) },
                            topBar = {
                                TopAppBar(
                                    backgroundColor = Color(0xFF16C197),
                                    title = {
                                        Text(
                                            text = "Travel Application",
                                            style = TextStyle(
                                                color = Color.White,
                                                fontSize = 20.sp,
                                                fontWeight = FontWeight.Bold
                                            )
                                        )
                                    },
                                    navigationIcon = {
                                        IconButton(
                                            onClick = {
                                                coroutineScope.launch {
                                                    scaffoldState.drawerState.open()
                                                }
                                            },
                                        ) {
                                            Icon(
                                                Icons.Rounded.Menu,
                                                contentDescription = "",
                                                tint = Color.White
                                            )
                                        }
                                    },
                                    actions = {
                                        IconButton(onClick = { /*TODO*/ }) {
                                            Icon(
                                                Icons.Rounded.Send,
                                                contentDescription = "",
                                                tint = Color.White
                                            )
                                        }
                                        IconButton(onClick = { showMenu = !showMenu }) {

                                            Icon(
                                                Icons.Rounded.MoreVert,
                                                contentDescription = "",
                                                tint = Color.White,
                                            )
                                        }

                                        DropdownMenu(
                                            expanded = showMenu,
                                            onDismissRequest = { showMenu = false }
                                        ) {
                                            DropdownMenuItem(onClick = { /*TODO*/ }) {
                                                Row() {
                                                    Icon(
                                                        Icons.Rounded.Refresh,
                                                        contentDescription = "",
                                                        tint = Color.Black
                                                    )
                                                    Spacer(modifier = Modifier.width(10.dp))
                                                    Text(text = "Refresh")
                                                }
                                            }
                                            DropdownMenuItem(onClick = { /*TODO*/ }) {
                                                Row() {
                                                    Icon(
                                                        Icons.Rounded.Refresh,
                                                        contentDescription = "",
                                                        tint = Color.Black
                                                    )
                                                    Spacer(modifier = Modifier.width(10.dp))
                                                    Text(text = "Reload")
                                                }
                                            }
                                        }
                                    }
                                )
                            },
                            drawerContent = {
                                DrawerContent(
                                    onOpenTrendingResortScreen = {
                                        coroutineScope.launch {
                                            scaffoldState.drawerState.close()
                                        }
                                        navController.navigate("home/trendingresorts")
                                    }
                                )
                            }

                        ) {
                            it.calculateBottomPadding()
                            NavHost(
                                navController = navController,
                                startDestination = BottomNavItems.Home.route
                            ) {
                                composable(BottomNavItems.Home.route) { backStack ->

                                    var name = backStack.savedStateHandle.get<String>("key")
                                    print("name is ${name}")

                                    Surface(
                                        modifier = Modifier.fillMaxSize(),
                                        color = MaterialTheme.colors.background
                                    ) {

                                        var time = measureTimeMillis {
                                            // Creating a Bottom Sheet
                                            MainScreenContent(
                                                onSettingScreen = {
                                                    navController.navigate(HomeScreen.DiscoverScreen.route) {
/*                                                    popUpTo(BottomNavItems.Home.route) {
                                                        inclusive = true
                                                    }*/
                                                    }
                                                }
                                            )
                                            /*   Column(modifier = Modifier.fillMaxSize()){
                                                   Text(text = "Sharjeel Ahmad Siddiqui")
                                               }*/

                                        }
                                        println("time taken ${time}")

                                    }
                                }
                                composable(BottomNavItems.Setting.route) {
                                    SettingScreen()
                                }
                                composable(BottomNavItems.CenterButton.route) {

                                    //this will handle a system back press button
                                    BackHandler(sheetState.isVisible) {
                                        coroutineScope.launch {
                                            sheetState.hide()
                                        }
                                    }

                                        CenterButtonScreen(
                                            onOpenBottomSheet = {
                                                coroutineScope.launch {
                                                    if (sheetState.isVisible) sheetState.hide()
                                                    else sheetState.show()
                                                }

                                            }
                                        )

                                }
                                composable(BottomNavItems.Contact.route) {
                                    Column(
                                        modifier = Modifier.fillMaxSize(),
                                        verticalArrangement = Arrangement.Center,
                                        horizontalAlignment = Alignment.CenterHorizontally
                                    ) {
                                        ContactScreen()
                                        //    toast("Practice toast")
                                    }
                                }
                                composable(BottomNavItems.Profile.route) {
                                    ProfileScreen()
                                }
                                navigation(
                                    startDestination = "home/testscreen1",
                                    route = HomeScreen.DiscoverScreen.route
                                ) {
                                    composable("home/testscreen1") {
                                        DiscoverScreen(
                                            /*  onChangeScreen = {
                                                 // navController.navigate("home/testscreen2")
                                                  navController.previousBackStackEntry?.savedStateHandle?.set("key","sharjeel")
                                                  navController.popBackStack()
                                              }*/
                                        )
                                    }
                                    composable("home/testscreen2") {
                                        Column(modifier = Modifier.fillMaxSize()) {
                                            Text(text = "dasasd")
                                        }
                                    }

                                }
                                composable("home/trendingresorts") {
                                    TrendingScreenResort()
                                }
                            }
                        }

                    }
                }

            }

This is a composable for bottom navigation bar , issue I face is that it is render slowly first time when app open like Top App Bar and Bottom Bar load first and after 2 /3 seconds all other content load

Note : there is no delay() fun call in my code I've already checked...

@Composable
fun BottomNavigationBar(navController: NavController) {
    val items = listOf(
        BottomNavItems.Home,
        BottomNavItems.Setting,
        BottomNavItems.CenterButton,
        BottomNavItems.Contact,
        BottomNavItems.Profile,
    )

    //will be consider after sorting glt
    Box(
        modifier = Modifier
            .wrapContentHeight()
            .background(color = Color.Transparent)
            .padding(10.dp)
    )
    {
        BottomNavigation(
            backgroundColor = Color.DarkGray,
            contentColor = Color.White,
            modifier = Modifier.clip(RoundedCornerShape(100f))
        ) {
            val navBackStackEntry by navController.currentBackStackEntryAsState()
            val currentRoute = navBackStackEntry?.destination?.route

            items.forEach { item ->
                if (currentRoute != null) {
                    BottomNavigationItem(
                        icon = {
                            Icon(
                                painterResource(id = item.icon),
                                contentDescription = item.title,
                                modifier = Modifier.size(24.dp)
                            )
                        },
                        label = { Text(text = item.title, style = TextStyle(fontSize = 10.sp)) },
                        selectedContentColor = Color.White,
                        unselectedContentColor = Color.White.copy(0.4f),
                        alwaysShowLabel = true,
                        selected = currentRoute.contains(item.route),// == item.route,
                        onClick = {
                            navController.navigate(item.route) {
                                // Pop up to the start destination of the graph to
                                // avoid building up a large stack of destinations
                                // on the back stack as users select items
                                // to remove in between all screen
                                navController.graph.startDestinationRoute?.let { route ->
                                    popUpTo(route) {
                                        saveState = true
                                    }
                                }
                                // Avoid multiple copies of the same destination when
                                // reselecting the same item
                                launchSingleTop = true
                                // Restore state when reselecting a previously selected item
                                restoreState = true
                            }
                        }
                    )
                }
            }

        }

        Image(
            modifier = Modifier
                .height(55.dp)
                .width(740.dp)
                .offset(y = -8.dp),
            painter = painterResource(id = R.drawable.centerbtn),
            contentDescription = ""
        )
    }

}

VIDEO ATTACHED FOR REFERENCE


来源: stackexchange

问:
Django-App: IIS Permission for Network Harddrive
I have a Django app that displays files in a folder via "os.listdir" in my Django app.

However, the files are on a network hard drive with the drive letter "W".

When I start Django as a development environment, this also works.

I have deployed Django via IIS but due to lack of permissions, presumably these files cannot be displayed. I then added the user "IIS AppPool\DefaultAppPool" in the "Security" tab for the entire hard drive for testing with "Full Access" but still my Django app cannot read this folder on the external hard drive.

Which user rights do I have to set so that Django can access a network hard disk via IIS to read data there?

ContentLicense: CC BY-SA 4.0


问:
How can block 2 client join 1 link reactjs
I have an issue like this.
I send the link (the link have token) to client, and i just want 1 client can join in, other client will being block.
how can i do that??

This issue come from when i do test in TestDom, and i realize i cant share the link to another, so how TestDom can do that?

*I have an idea like this:
-when client join in, i will check the Status on Server, if the Status is "False" i will let him go in, and set Status is "True", so, if another join in, and check the Status is True, i will block him.


问:
Swagger endpoint always returns raw html
Swagger endpoint always returns raw html
I have faced critical issue while integrating swagger into express project.

I have followed the swagger document but swagger endpoint returns raw HTML.

Expected Results:
HTML page


问:
what is ISO/IEC 14882:2011(E) [reserved.names]/2 means?
first at all, let's see the standard(ISO/IEC 14882:2011(E))

[reserved.names](17.6.4.3) said:

1 The C++ standard library reserves the following kinds of names:

— macros

— global names

— names with external linkage

2 If a program declares or defines a name in a context where it is reserved, other than as explicitly allowed by this Clause, its behavior is undefined.

[global.names](17.6.4.3.2) said:

1 Certain sets of names and function signatures are always reserved to the implementation:

— Each name that contains a double underscore __ or begins with an underscore followed by an uppercase letter (2.12) is reserved to the implementation for any use.

— Each name that begins with an underscore is reserved to the implementation for use as a name in the global namespace.

Q1: what is explicitly allowed in [reserved.names]/2 or in which case a name is explicitly allowed?

Q2: Does that means we can use a name that begins with an underscore followed by an lowercase letter in local namespace? If so is that so-called explicitly allowed?


问:
How do log the outbound soap request after the policy file has been applied in webMethods 8.2?
I have a X509 signature and encryption policy file attached to consumer descriptor. Upon calling the soap operation only the payload that I populate gets logged in the server log (upon enabling soap verbose). The changes made by the policy file are not getting logged even if the server is running in trace mode. Is there any settings that needs to be modifed?</p>


问:
application.yml is not getting overriden by application-local.yml
I have a SB application. Here are my configurations :

bootstrap.yml

```<code>spring:
  profiles:
    active: ${ACTIVE_PROFILE}

aws:
  paramstore:
    enabled: true
    prefix: /abc
    name: xyz/jkl/wer
</code>```

Then I have the below application.yml where I intend to keep common properties :

```<code>spring:
  datasource:
    url: ${DB_URL}
    username: ${DB_USER}
    password: ${DB_PASS}
    driver-class-name: org.postgresql.Driver
  jpa:
    hibernate:
      ddl-auto: update
  flyway:
    baseline-on-migrate: true

hibernate:
  dialect: org.hibernate.dialect.PostgreSQLDialect
  show_sql: true
  #format_sql: true
  #default_schema: operations

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,env,flyway
  endpoint:
    health:
      probes:
        enabled: true
  health:
    livenessState:
      enabled: true
    readinessState:
      enabled: true
</code>```

Then I have env specific application-local.yml :

```<code>spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/postgres?useSSL=false
    username: postgres
    password: abc
    driver-class-name: org.postgresql.Driver
  jpa:
    hibernate:
      ddl-auto: update
  flyway:
    baseline-on-migrate: true

hibernate:
  dialect: org.hibernate.dialect.PostgreSQLDialect
  show_sql: true
  #format_sql: true
  #default_schema: operations

# logback
logging:
  level:
    root: debug
</code>```

When I run the application I pass the env variable :${ACTIVE_PROFILE}  as  local.

I get this error on running the app :

```<code>nested exception is java.lang.RuntimeException:
Driver org.postgresql.Driver claims to not accept jdbcUrl, ${DB_URL}
</code>```

Active Profile from Log :

```<code>The following 1 profile is active: "local"
</code>```

When I remove the db specific properties from application.yml, I get the below error :

```<code>Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

Action:

Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (the profiles local are currently active).
</code>```

UPDATE:

I dont have the below configured for local, that is why I am overriding them in application-local.yml. But for higher env I have them configured.

```<code>url: ${DB_URL}
username: ${DB_USER}
password: ${DB_PASS}
</code>```

What I am expecting is application-local.yml file should override the application.yml file but I am not sure why application-local.yml is not getting read at all and why the properties are being taken from application.yml instead.

Body:
I have a SB application. Here are my configurations :

bootstrap.yml

spring:
  profiles:
    active: ${ACTIVE_PROFILE}

aws:
  paramstore:
    enabled: true
    prefix: /abc
    name: xyz/jkl/wer

Then I have the below application.yml where I intend to keep common properties :

spring:
  datasource:
    url: ${DB_URL}
    username: ${DB_USER}
    password: ${DB_PASS}
    driver-class-name: org.postgresql.Driver
  jpa:
    hibernate:
      ddl-auto: update
  flyway:
    baseline-on-migrate: true

hibernate:
  dialect: org.hibernate.dialect.PostgreSQLDialect
  show_sql: true
  #format_sql: true
  #default_schema: operations

management:
  endpoints:
    web:
      exposure:
        include: health,info,metrics,env,flyway
  endpoint:
    health:
      probes:
        enabled: true
  health:
    livenessState:
      enabled: true
    readinessState:
      enabled: true

Then I have env specific application-local.yml :

spring:
  datasource:
    url: jdbc:postgresql://localhost:5432/postgres?useSSL=false
    username: postgres
    password: abc
    driver-class-name: org.postgresql.Driver
  jpa:
    hibernate:
      ddl-auto: update
  flyway:
    baseline-on-migrate: true

hibernate:
  dialect: org.hibernate.dialect.PostgreSQLDialect
  show_sql: true
  #format_sql: true
  #default_schema: operations

# logback
logging:
  level:
    root: debug

When I run the application I pass the env variable :${ACTIVE_PROFILE}  as  local.

I get this error on running the app :

nested exception is java.lang.RuntimeException:
Driver org.postgresql.Driver claims to not accept jdbcUrl, ${DB_URL}

Active Profile from Log :

The following 1 profile is active: "local"

When I remove the db specific properties from application.yml, I get the below error :

Description:

Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.

Reason: Failed to determine a suitable driver class

Action:

Consider the following:
    If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
    If you have database settings to be loaded from a particular profile you may need to activate it (the profiles local are currently active).

UPDATE:

I dont have the below configured for local, that is why I am overriding them in application-local.yml. But for higher env I have them configured.

url: ${DB_URL}
username: ${DB_USER}
password: ${DB_PASS}

What I am expecting is application-local.yml file should override the application.yml file but I am not sure why application-local.yml is not getting read at all and why the properties are being taken from application.yml instead.


问:
Autodesk Forge Autodesk Civil 3D Object Data Integration
Recently we tried, following the forge help documentation, to extract Object Data (OD) from polylines in a civil 3D drawing archived on our forge account, but we can't seem to be able to find them in the viewer. Any suggestion?
Thanks</p>


问:
Comparing Explorer and Chromium/Electron font rendering on Windows 10
So I am writing an emulation of Windows Explorer, using Electron i.e. the Chromium engine.

I believe that, on Windows 10, Explorer uses Segoe UI as its font, at a 9pt/12px font size.

I took a screenshot of each program, paste into pbrush, zoom 400% and present them here:

They're similar but not identical.

Why are they different? Do they use different underlying, OS-specific APIs or engines to render the font?

Is there something I can change, to make the rendering of my Electron application's closer to Explorer's?

In the CSS (currently I only specify the font face and font size, and line height)?

Or in the configuration of the Electron renderer process?

I naively expected there's an optimal/ideal/native way to render a given font, and that both would do that, do the same.


问:
How to get the maximum number of files per directory in xv6?
I need to get the maximum number of file per directory in xv6, however I don't know how.
I got information that, in xv6, the block size is 512bytes and the maximum numbers of block per file is 140, so that the maximum file size is 70KB (512 * 140)
From these information, how can I get the maximum number of file per directory?</p>


问:
Lato font is broken on Android 13 devices
In a react native project I'm using Lato font, it' working normal on iOS and older Android devices, only on Android 13 there's a line height issue, and some words are cut out.Does anyone know what has been changed that can cause such an issue?

When I change font the issue is not visible anymore.

NOTE: I've noticed this happens when I put text inside View or Pressable components.


问:
redshift connector query to json
I have a problem. Im using redshift_connector to connect to AWS RedShift. Result of my query is tuple. How can change type to json? The problem is that one column is a date and I got a error

"TypeError" Object of type date is not JSON serializable.

```<code>conn = redshift_connector.connect(
    host='',
    database='',
    user='',
    password=''
)

cursor: redshift_connector.Cursor = conn.cursor()
cursor.execute("")
columns = cursor.description
result = [{columns[index][0]:column for index, column in enumerate(value)} for value in cursor.fetchall()]
payload = json.dumps(result)
</code>```

adding default=str to json.dumps but its not a solution
I expect that I will get json which I can use as a payload to POST request

Title: redshift connector query to json

Body:
I have a problem. Im using redshift_connector to connect to AWS RedShift. Result of my query is tuple. How can change type to json? The problem is that one column is a date and I got a error

"TypeError" Object of type date is not JSON serializable.

conn = redshift_connector.connect(
    host='',
    database='',
    user='',
    password=''
)

cursor: redshift_connector.Cursor = conn.cursor()
cursor.execute("")
columns = cursor.description
result = [{columns[index][0]:column for index, column in enumerate(value)} for value in cursor.fetchall()]
payload = json.dumps(result)

adding default=str to json.dumps but its not a solution
I expect that I will get json which I can use as a payload to POST request


问:
Unit testing the login method with firebase in android studio
I'm carrying out a university project. I need to know if the unit test I did of the login method with firebase in android studio is correct. I'm a beginner with unit testing. Below I indicate the method and the test carried out.

```<code>public void signUp(String nickname, String email, String password,String dataOfBirth, String gender){
        auth = FirebaseAuth.getInstance();
        referenceDb = FirebaseDatabase.getInstance().getReference();
        auth.createUserWithEmailAndPassword(email,password)
                .addOnCompleteListener(new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        if (task.isSuccessful()) {

                            String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();

                            UserDao userDao = new UserDao();
                            User currUser = new User(uid, nickname, email, password, dataOfBirth, gender);

                            referenceDb.child("Users").child(uid).setValue(currUser).addOnCompleteListener(new OnCompleteListener<Void>() {
                                @Override
                                public void onComplete(@NonNull Task<Void> task) {
                                    if (task.isSuccessful()) {

                                       Toast.makeText(singUp_fragment.getActivity(), "SingUp successful", Toast.LENGTH_SHORT).show();
                                        openHomeFragment();
                                    } else {
                                        Toast.makeText(singUp_fragment.getActivity(), "SingUp failed. Please try again", Toast.LENGTH_SHORT).show();
                                        singUp_fragment.progressBar.setVisibility(View.GONE);
                                    }
                                }
                            });
                        } else {
                            Resources resources = singUp_fragment.getStartActivity().getResources();
                            singUp_fragment.cleanTextInputErrors();
                            try {
                                throw task.getException();
                            } catch (NoInternetConnectionException e) {
                                MotionToast.display(
                                        singUp_fragment.getStartActivity(),
                                        R.string.toast_warning_internet_connection,
                                        MotionToastType.WARNING_MOTION_TOAST
                                );
                            } catch (FirebaseAuthInvalidUserException e) {
                                singUp_fragment.setTextInputNicknameError(
                                        resources.getString(R.string.fragment_sign_up_invalid_nickname)
                                );
                            } catch (FirebaseAuthUserCollisionException e) {
                                singUp_fragment.setTextInputEmailError(
                                        resources.getString(R.string.fragment_sign_up_invalid_login)
                                );
                            } catch (Exception e) {
                                MotionToast.display(
                                        singUp_fragment.getStartActivity(),
                                        R.string.toast_error_unknown_error,
                                        MotionToastType.ERROR_MOTION_TOAST
                                );
                            }
                        }
                        singUp_fragment.progressBar.setVisibility(View.GONE);
                        singUp_fragment.setEnabledButtonSignUp(true);
                    }
                });
    }
</code>```

I tested it like this:

```<code>public class SingIn_Test {
    FirebaseAuth auth;
    boolean test;

    @Test
    public void ValidEmailPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live.it", "Annamaria2222").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidEmptyEmailPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("", "").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidEmptyEmailTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("", "Annamaria2222").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidEmptyPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live.it", "").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidFormatEmailPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live", "Annamaria").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidFormatPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live.it", "Annamaria").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidFormatEmailTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live", "Annamaria2222").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

}
</code>```

it's correct?

Body:
I'm carrying out a university project. I need to know if the unit test I did of the login method with firebase in android studio is correct. I'm a beginner with unit testing. Below I indicate the method and the test carried out.

public void signUp(String nickname, String email, String password,String dataOfBirth, String gender){
        auth = FirebaseAuth.getInstance();
        referenceDb = FirebaseDatabase.getInstance().getReference();
        auth.createUserWithEmailAndPassword(email,password)
                .addOnCompleteListener(new OnCompleteListener<AuthResult>() {
                    @Override
                    public void onComplete(@NonNull Task<AuthResult> task) {
                        if (task.isSuccessful()) {

                            String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();

                            UserDao userDao = new UserDao();
                            User currUser = new User(uid, nickname, email, password, dataOfBirth, gender);

                            referenceDb.child("Users").child(uid).setValue(currUser).addOnCompleteListener(new OnCompleteListener<Void>() {
                                @Override
                                public void onComplete(@NonNull Task<Void> task) {
                                    if (task.isSuccessful()) {

                                       Toast.makeText(singUp_fragment.getActivity(), "SingUp successful", Toast.LENGTH_SHORT).show();
                                        openHomeFragment();
                                    } else {
                                        Toast.makeText(singUp_fragment.getActivity(), "SingUp failed. Please try again", Toast.LENGTH_SHORT).show();
                                        singUp_fragment.progressBar.setVisibility(View.GONE);
                                    }
                                }
                            });
                        } else {
                            Resources resources = singUp_fragment.getStartActivity().getResources();
                            singUp_fragment.cleanTextInputErrors();
                            try {
                                throw task.getException();
                            } catch (NoInternetConnectionException e) {
                                MotionToast.display(
                                        singUp_fragment.getStartActivity(),
                                        R.string.toast_warning_internet_connection,
                                        MotionToastType.WARNING_MOTION_TOAST
                                );
                            } catch (FirebaseAuthInvalidUserException e) {
                                singUp_fragment.setTextInputNicknameError(
                                        resources.getString(R.string.fragment_sign_up_invalid_nickname)
                                );
                            } catch (FirebaseAuthUserCollisionException e) {
                                singUp_fragment.setTextInputEmailError(
                                        resources.getString(R.string.fragment_sign_up_invalid_login)
                                );
                            } catch (Exception e) {
                                MotionToast.display(
                                        singUp_fragment.getStartActivity(),
                                        R.string.toast_error_unknown_error,
                                        MotionToastType.ERROR_MOTION_TOAST
                                );
                            }
                        }
                        singUp_fragment.progressBar.setVisibility(View.GONE);
                        singUp_fragment.setEnabledButtonSignUp(true);
                    }
                });
    }

I tested it like this:

public class SingIn_Test {
    FirebaseAuth auth;
    boolean test;

    @Test
    public void ValidEmailPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live.it", "Annamaria2222").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidEmptyEmailPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("", "").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidEmptyEmailTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("", "Annamaria2222").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidEmptyPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live.it", "").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidFormatEmailPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live", "Annamaria").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidFormatPasswordTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live.it", "Annamaria").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

    @Test(expected = IllegalArgumentException.class)
    public void InvalidFormatEmailTest(){

        test = false;
        auth = FirebaseAuth.getInstance();

        auth.signInWithEmailAndPassword("annal@live", "Annamaria2222").addOnCompleteListener(new OnCompleteListener<AuthResult>() {
            @Override
            public void onComplete(@NonNull Task<AuthResult> task) {
                if (task.isSuccessful()) {
                    Assert.assertTrue(true);

                } else {
                    Assert.assertFalse(false);
                }
                test = true;
            }
        });
        while(!test){

        }
    }

}

it's correct?


问:
When I'm plotting data in to folium and Leafmap Jupyter notebook is getting lagging, I'd like to know what is issue with this
jupyter notebbok](https://i.stack.imgur.com/8ICeU.png)

When I'm plotting data in to folium and Leafmap Jupyter notebook is getting lagging, I'd like to know  what is issue with this


问:
Mock C++ methods in DLL
I have a large C++ solution, and inside the solutions, I have multiple dll projects. I'm using CppUnitTestFramework and Typemock to write unit tests.

functionA() calls a global functionB() exported to a DDL. How do we usually mock the function in dll with Typemock or other mock frameworks? I tried to use Typemock WHEN_CALLED(functionB()).Return(0), but the test still runs the code inside the dll according to the coverage report.

Should I create a small function (in the same class as functionA()) to wrap functionB() and mock this small function instead?

Title: Mock C++ methods in DLL


问:
Android Instrumented Testing Launch Success but doesn't run any test case
I get problem with my instrumented testing case, where class test doesn't want launching my activity. I was looking foward and many solution have added this section

```<code>defaultConfig {
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  .....
}
</code>```

I have been added but still error.

```<code>@RunWith(AndroidJUnit4::class)
@LargeTest
class MainActivityTest {

    @get:Rule val activityScenario = activityScenarioRule<MainActivity>()

    @Test
    fun launchActivitiy() {
        onView(withId(R.id.textFragmentTitle)).check(matches(withText("Dummy App")))
        onView(withId(R.id.textFragmentTitle)).check(matches(withText("User")))
    }

    @Test
    fun checkActivity() {
        onView(withId(R.id.textFragmentTitle)).check(matches(withText("Test App")))
    }
}

</code>```

enter image description here

enter image description here

I try sample from test sample, it works like a charm

enter image description here

Body:
I get problem with my instrumented testing case, where class test doesn't want launching my activity. I was looking foward and many solution have added this section

defaultConfig {
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
  .....
}

I have been added but still error.

@RunWith(AndroidJUnit4::class)
@LargeTest
class MainActivityTest {

    @get:Rule val activityScenario = activityScenarioRule<MainActivity>()

    @Test
    fun launchActivitiy() {
        onView(withId(R.id.textFragmentTitle)).check(matches(withText("Dummy App")))
        onView(withId(R.id.textFragmentTitle)).check(matches(withText("User")))
    }

    @Test
    fun checkActivity() {
        onView(withId(R.id.textFragmentTitle)).check(matches(withText("Test App")))
    }
}

enter image description here

enter image description here

I try sample from test sample, it works like a charm

enter image description here


问:
Send Elasticsearch logs to Graylog
I have an on-premise infrastructure. I historically have a Graylog to centralize my logs. For my application needs, I have installed an ElasticSearch cluster and I would like to send ElasticSearch logs to Graylog. Neither Graylog nor ElasticSearch is inside a container.
I have not been able to find a way to send my ElasticSearch logs to Graylog, do you know how?
Thanks in advance</p>

Title: Send Elasticsearch logs to Graylog


问:
What code is needed to export crawled data to .csv?
Here is the code I've found. This code crawls the Naver map and stores the information in variables.
But I don't know how to view it with a .csv file. I could barely use an already coding finished no-code commodity due to the lack of knowledge of installing dependencies. What code is needed to the entire code's work finished, exporting crawled data to a .csv file? Especially exporting reviews that are on the list will be tricky to express in .csv IMO.

Source
https://velog.io/@kws04254/Selenium-BeautilfulSoup4%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%9C-%EB%84%A4%EC%9D%B4%EB%B2%84-%EC%A7%80%EB%8F%84-%ED%81%AC%EB%A1%A4%EB%A7%81

```<code>    !pip install pandas
    !pip install selenium
    !pip install webdriver-manager
    !pip install beautifulsoup4

    import selenium #selenium
    import pandas as pd #pandas to read csv and use dataframe
    from selenium import webdriver #webdriver to launch and control the browser
    from selenium.webdriver.common.keys import Keys #for keying into the browser
    To find tags using from selenium.webdriver.common.by import By #webdriver
    from selenium.webdriver.support.ui import WebDriverWait #for Explicitly wait
    from webdriver_manager.chrome import ChromeDriverManager #Necessary when installing Chrome Web Driver for crawling in Chrome
    from selenium.webdriver.support import expected_conditions as EC #For checking the status of certain elements in the browser
    from bs4 import BeautifulSoup #to import and parse browser tags
    from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException, TimeoutException #Exceptions for exception handling

    driver = webdriver.Chrome(ChromeDriverManager().install())
    driver.get("https://map.naver.com/v5/")
    try:
        element = WebDriverWait(driver, 10).until(
            EC.presence_of_element_located((By.CLASS_NAME, "input_search"))
        ) #Wait until the input window appears
    finally:
        pass

    search_box = driver.find_element(By.CLASS_NAME,"input_search")
    search_box.send_keys(keyword)
    search_box.send_keys(Keys.ENTER)

    #Actions based on search results

    driver.find_element(By.CLASS_NAME,"button_clear").send_keys(Keys.ENTER)

    def checkIsList(checkCount):
         try:
             driver.switch_to.default_content()
             WebDriverWait(driver,1.5).until(
             EC.presence_of_element_located((By.ID, searchFrame))
             )
             driver.switch_to.frame(searchFrame)
             WebDriverWait(driver,1).until(
                 EC.presence_of_element_located((By.CLASS_NAME, resultListTitleClass))
             )
             driver.switch_to.default_content()
             return 0;
         except TimeoutException:
             # When you move directly to restaurant information from search results
             try:
                 driver.switch_to.default_content()
                 WebDriverWait(driver,1.5).until(
                 EC.presence_of_element_located((By.ID, entryFrame))
                 )
                 driver.switch_to.frame(entryFrame)
                 WebDriverWait(driver,1).until(
                     EC.presence_of_element_located((By.CLASS_NAME, resultTargetTitleDiv))
                 )
                 driver.switch_to.default_content()
                 return 1
             # When there are no search results
             except TimeoutException:

                 # If it is the first time, reorganize the search term and search
                 if(checkCount==0):
                     return 2
                 # Even after reorganizing the search term, there is no store without it
                 elif(checkCount==1):
                     return 3

    WebDriverWait(driver,1).until(
                 EC.presence_of_element_located((By.CLASS_NAME, resultListTitleClass))
             )

             for i in range(2):
                 search(flag)
                 checkResult = checkIsList(i)
                 if checkResult == 0: #results as a list
                     #todo
                     # Check if it is correct, proceed with crawling if correct, otherwise
                     # select
                     driver.switch_to.default_content()
                     driver.switch_to.frame(searchFrame)
                     #driver.find_element(By.CSS_SELECTOR,resultTitleClick).click()
                     driver.find_element(By.CSS_SELECTOR,resultTitleClick).send_keys(Keys.ENTER)
                     driver.switch_to.default_content()
                     WebDriverWait(driver,4).until(
                     EC.presence_of_element_located((By.ID, entryFrame))
                     )
                     driver.switch_to.frame(entryFrame)
                     getInfo(row)
                     driver.switch_to.default_content()
                     break
                 elif checkResult ==1: #The result is directly displayed as restaurant information
                     # Get information right away
                     driver.switch_to.default_content()
                     WebDriverWait(driver,4).until(
                         EC.presence_of_element_located((By.ID, entryFrame))
                     )
                     driver.switch_to.frame(entryFrame)
                     getInfo(row)
                     break
                 elif checkResult ==2: # First time, no result
                     flag = False
                     continue
                 elif checkResult ==3: # No result even after the second time
                     data.loc[idx,"review"] = "noResult"
                     print(str(idx)+". "+data.loc[idx,"Company name"]+"

         html = driver. page_source
         soup = BeautifulSoup(html,'html.parser')
         address = soup.find("span",addressSpan).text
         day = soup.find_all("span",daySpan)
         time = soup.find_all("div",timeDiv)

             driver.find_element(By.CSS_SELECTOR, reviewTabOpenerSelector).send_keys(Keys.ENTER)
             WebDriverWait(driver,2).until(
                 EC.presence_of_element_located((By.CLASS_NAME, reviewSpan))
             )
             reviewOpeners = driver.find_elements(By.CLASS_NAME,reviewOpenerA)
             for opener in reviewOpeners:
                 #opener. click()
                 opener.send_keys(Keys.ENTER)
             html = driver. page_source`
             soup = BeautifulSoup(html,'html.parser')
             reviews = soup.find_all("span",reviewSpan)
</code>```

All the instruction is in the first URL (Source).

I tried nothing but reading the article and finding it will be useful for me
I found pandas should be used to handle .csv files.

Body:
Here is the code I've found. This code crawls the Naver map and stores the information in variables.
But I don't know how to view it with a .csv file. I could barely use an already coding finished no-code commodity due to the lack of knowledge of installing dependencies. What code is needed to the entire code's work finished, exporting crawled data to a .csv file? Especially exporting reviews that are on the list will be tricky to express in .csv IMO.

Source
https://velog.io/@kws04254/Selenium-BeautilfulSoup4%EB%A5%BC-%EC%9D%B4%EC%9A%A9%ED%95%9C-%EB%84%A4%EC%9D%B4%EB%B2%84-%EC%A7%80%EB%8F%84-%ED%81%AC%EB%A1%A4%EB%A7%81

    !pip install pandas
    !pip install selenium
    !pip install webdriver-manager
    !pip install beautifulsoup4

    import selenium #selenium
    import pandas as pd #pandas to read csv and use dataframe
    from selenium import webdriver #webdriver to launch and control the browser
    from selenium.webdriver.common.keys import Keys #for keying into the browser
    To find tags using from selenium.webdriver.common.by import By #webdriver
    from selenium.webdriver.support.ui import WebDriverWait #for Explicitly wait
    from webdriver_manager.chrome import ChromeDriverManager #Necessary when installing Chrome Web Driver for crawling in Chrome
    from selenium.webdriver.support import expected_conditions as EC #For checking the status of certain elements in the browser
    from bs4 import BeautifulSoup #to import and parse browser tags
    from selenium.common.exceptions import NoSuchElementException, StaleElementReferenceException, TimeoutException #Exceptions for exception handling

    driver = webdriver.Chrome(ChromeDriverManager().install())
    driver.get("https://map.naver.com/v5/")
    try:
        element = WebDriverWait(driver, 10).until(
            EC.presence_of_element_located((By.CLASS_NAME, "input_search"))
        ) #Wait until the input window appears
    finally:
        pass

    search_box = driver.find_element(By.CLASS_NAME,"input_search")
    search_box.send_keys(keyword)
    search_box.send_keys(Keys.ENTER)

    #Actions based on search results

    driver.find_element(By.CLASS_NAME,"button_clear").send_keys(Keys.ENTER)

    def checkIsList(checkCount):
         try:
             driver.switch_to.default_content()
             WebDriverWait(driver,1.5).until(
             EC.presence_of_element_located((By.ID, searchFrame))
             )
             driver.switch_to.frame(searchFrame)
             WebDriverWait(driver,1).until(
                 EC.presence_of_element_located((By.CLASS_NAME, resultListTitleClass))
             )
             driver.switch_to.default_content()
             return 0;
         except TimeoutException:
             # When you move directly to restaurant information from search results
             try:
                 driver.switch_to.default_content()
                 WebDriverWait(driver,1.5).until(
                 EC.presence_of_element_located((By.ID, entryFrame))
                 )
                 driver.switch_to.frame(entryFrame)
                 WebDriverWait(driver,1).until(
                     EC.presence_of_element_located((By.CLASS_NAME, resultTargetTitleDiv))
                 )
                 driver.switch_to.default_content()
                 return 1
             # When there are no search results
             except TimeoutException:

                 # If it is the first time, reorganize the search term and search
                 if(checkCount==0):
                     return 2
                 # Even after reorganizing the search term, there is no store without it
                 elif(checkCount==1):
                     return 3

    WebDriverWait(driver,1).until(
                 EC.presence_of_element_located((By.CLASS_NAME, resultListTitleClass))
             )

             for i in range(2):
                 search(flag)
                 checkResult = checkIsList(i)
                 if checkResult == 0: #results as a list
                     #todo
                     # Check if it is correct, proceed with crawling if correct, otherwise
                     # select
                     driver.switch_to.default_content()
                     driver.switch_to.frame(searchFrame)
                     #driver.find_element(By.CSS_SELECTOR,resultTitleClick).click()
                     driver.find_element(By.CSS_SELECTOR,resultTitleClick).send_keys(Keys.ENTER)
                     driver.switch_to.default_content()
                     WebDriverWait(driver,4).until(
                     EC.presence_of_element_located((By.ID, entryFrame))
                     )
                     driver.switch_to.frame(entryFrame)
                     getInfo(row)
                     driver.switch_to.default_content()
                     break
                 elif checkResult ==1: #The result is directly displayed as restaurant information
                     # Get information right away
                     driver.switch_to.default_content()
                     WebDriverWait(driver,4).until(
                         EC.presence_of_element_located((By.ID, entryFrame))
                     )
                     driver.switch_to.frame(entryFrame)
                     getInfo(row)
                     break
                 elif checkResult ==2: # First time, no result
                     flag = False
                     continue
                 elif checkResult ==3: # No result even after the second time
                     data.loc[idx,"review"] = "noResult"
                     print(str(idx)+". "+data.loc[idx,"Company name"]+"

         html = driver. page_source
         soup = BeautifulSoup(html,'html.parser')
         address = soup.find("span",addressSpan).text
         day = soup.find_all("span",daySpan)
         time = soup.find_all("div",timeDiv)

             driver.find_element(By.CSS_SELECTOR, reviewTabOpenerSelector).send_keys(Keys.ENTER)
             WebDriverWait(driver,2).until(
                 EC.presence_of_element_located((By.CLASS_NAME, reviewSpan))
             )
             reviewOpeners = driver.find_elements(By.CLASS_NAME,reviewOpenerA)
             for opener in reviewOpeners:
                 #opener. click()
                 opener.send_keys(Keys.ENTER)
             html = driver. page_source`
             soup = BeautifulSoup(html,'html.parser')
             reviews = soup.find_all("span",reviewSpan)

All the instruction is in the first URL (Source).

I tried nothing but reading the article and finding it will be useful for me
I found pandas should be used to handle .csv files.


问:
Two declarations cause a collision in the ObjectFactory class
I have xsd specification from external source without option to change anything.
There are two elements inside like this:

```<code><xs:sequence>
   <xs:element ref="p_C.2.1.1" />
   <xs:element ref="p_C.2.11" />
</xs:sequence>

<xs:element name="p_C.2.1.1" type="SpecialType" />
<xs:element name="p_C.2.11" type="SpecialType" />

<xs:simpleType name="SpecialType">
  <xs:restriction base="xs:integer">
     <xs:enumeration value="1" />
  </xs:restriction>
</xs:simpleType>
</code>```

And I asked xjc to generate java classes.
These 2 elements would get the same name pb211 in generated class.
Also there would be two declaration with the same QName in ObjectFactory.

```<code>private final static QName _PB211_QNAME = new QName("", "p_C.2.1.1");
private final static QName _PB211_QNAME = new QName("", "p_C.2.11");
</code>```

How can I fix this ?

Tried

```<code><jaxb:bindings node="//xs:element[@name='p_C.2.1.1']">
   <jaxb:class name="anotherType" />
</jaxb:bindings>
</code>```

or

```<code><jaxb:bindings node="//xs:element[@ref='p_C.2.1.1']">
   <jaxb:property name="anotherName" />
</jaxb:bindings>
</code>```

with no effect.

Maybe there is a global solution, to change default xmlName to javaName convention ?

Body:
I have xsd specification from external source without option to change anything.
There are two elements inside like this:

<xs:sequence>
   <xs:element ref="p_C.2.1.1" />
   <xs:element ref="p_C.2.11" />
</xs:sequence>

<xs:element name="p_C.2.1.1" type="SpecialType" />
<xs:element name="p_C.2.11" type="SpecialType" />

<xs:simpleType name="SpecialType">
  <xs:restriction base="xs:integer">
     <xs:enumeration value="1" />
  </xs:restriction>
</xs:simpleType>

And I asked xjc to generate java classes.
These 2 elements would get the same name pb211 in generated class.
Also there would be two declaration with the same QName in ObjectFactory.

private final static QName _PB211_QNAME = new QName("", "p_C.2.1.1");
private final static QName _PB211_QNAME = new QName("", "p_C.2.11");

How can I fix this ?

Tried

<jaxb:bindings node="//xs:element[@name='p_C.2.1.1']">
   <jaxb:class name="anotherType" />
</jaxb:bindings>

or

<jaxb:bindings node="//xs:element[@ref='p_C.2.1.1']">
   <jaxb:property name="anotherName" />
</jaxb:bindings>

with no effect.

Maybe there is a global solution, to change default xmlName to javaName convention ?


问:
Is there anyway I can get mobile number of both SIM cards in android Java?
I want to add the functionality of login similar to UPI apps. The user will select the SIM card from his phone and I will send an SMS from that SIM and will verify his phone number using that SMS. But I have to compare the number in the back-end or in API. So, I want to acquire the phone numbers of both SIM cards or the phone number of the SIM card user selects (Get the phone number from SMS or while sending SMS).

I am putting a generic class that I made for SIM selections and SMS. I have tried getting the mobile number from SubscriptionInfo, but it gives the operator name and all details right except the mobile number which returns an empty string. I have found in different blogs or my R&D that it is up to the operator whether to put the number there or not. So, if I am getting the mobile number, it is not 100% guaranteed that I will get the mobile number every time.

Here's my generic class: SimUtil.java

import android.Manifest;
import android.app.Activity;
import android.content.Context;
import android.content.pm.PackageManager;
import android.telephony.SmsManager;
import android.telephony.SubscriptionInfo;
import android.telephony.SubscriptionManager;

import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;

import java.util.ArrayList;
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;

public class SimUtil {

    List<SimCard> simCards = new ArrayList<>();
    Context context;

    public SimUtil(Context context) {
        this.context = context;
        if (ActivityCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE) != PackageManager.PERMISSION_GRANTED) {
            setupPermissions();
            return;
        }
        List<SubscriptionInfo> subscriptionInfos = SubscriptionManager.from(context.getApplicationContext()).getActiveSubscriptionInfoList();
        for (int i = 0; i < subscriptionInfos.size(); i++) {
            SubscriptionInfo currentCard = subscriptionInfos.get(i);
            SimCard simCard = new SimCard(i,currentCard);
            simCards.add(simCard);
        }
    }

    public int getSimCardCount() {
        return this.simCards.size();
    }

    public List<SimCard> getSimCardList() {
        if(simCards.size() > 0)
            return simCards;
        else
            return null;
    }

    public SimCard getFirstSimCard() {
        return simCards.get(0);
    }

    public boolean hasDualSim() {
        return simCards.size() > 1;
    }

    public SimCard getSecondSimCard() {
        if(hasDualSim())
            return simCards.get(1);
        else
            return null;
    }

    public static void sendSMSFromSim1(String message) {
        SmsManager.getSmsManagerForSubscriptionId(0)
                .sendTextMessage(AppConstant.LOGIN_MOBILE_NUMBER, null, message, null, null);
    }

    public static void sendSMSFromSim2(String message) {
        SmsManager.getSmsManagerForSubscriptionId(1)
                .sendTextMessage(AppConstant.LOGIN_MOBILE_NUMBER, null, message, null, null);
    }

    private void setupPermissions() {
        int permission = ContextCompat.checkSelfPermission(context, Manifest.permission.SEND_SMS);
        if(permission != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions((Activity)context, new String[]{Manifest.permission.SEND_SMS}, 1);
        }

        int permission2 = ContextCompat.checkSelfPermission(context, Manifest.permission.READ_PHONE_STATE);
        if(permission2 != PackageManager.PERMISSION_GRANTED) {
            ActivityCompat.requestPermissions((Activity)context, new String[]{Manifest.permission.READ_PHONE_STATE}, 1);
        }
    }

    public static class SimCard {
        int index;
        String operatorName;
        String mobileNumber;
        String countryISO;

        public SimCard(int index, String operatorName, String countryISO, String mobileNumber) {
            this.index = index;
            this.operatorName = operatorName;
            this.countryISO = countryISO;
            this.mobileNumber = mobileNumber;
        }

        public SimCard(int index,SubscriptionInfo subscriptionInfo) {
            this.index = index;
            this.operatorName = subscriptionInfo.getCarrierName().toString();
            this.countryISO = subscriptionInfo.getCountryIso();
            this.mobileNumber = subscriptionInfo.getNumber();
        }

        public int getIndex() {
            return index;
        }

        public String getOperatorName() {
            return operatorName;
        }

        public String getCountryISO() {
            return countryISO;
        }

        public String getMobileNumber() {
            return mobileNumber;
        }
    }
}
```


问:
Hyperlegder fabric invoke command (error)
while running the following invoke command, I have seen error

```<code>peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"InitLedger","Args":[]}'
</code>```

ERRO [main] InitCmd -> Cannot run peer because cannot init crypto, specified path "/Users/fabric-samples/config/msp" does not exist or cannot be accessed: stat /Users/fabric-samples/config/msp: no such file or directory

I have tried many alternatives but could not resolve.

Body:
while running the following invoke command, I have seen error

peer chaincode invoke -o localhost:7050 --ordererTLSHostnameOverride orderer.example.com --tls --cafile "${PWD}/organizations/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem" -C mychannel -n basic --peerAddresses localhost:7051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" --peerAddresses localhost:9051 --tlsRootCertFiles "${PWD}/organizations/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" -c '{"function":"InitLedger","Args":[]}'

ERRO [main] InitCmd -> Cannot run peer because cannot init crypto, specified path "/Users/fabric-samples/config/msp" does not exist or cannot be accessed: stat /Users/fabric-samples/config/msp: no such file or directory

I have tried many alternatives but could not resolve.


问:
feign.RetryableException: Unexpected end of file from server executing POST
```<code>feign.RetryableException: Unexpected end of file from server executing POST http://conf-management-online/confLoader
    at feign.FeignException.errorExecuting(FeignException.java:268)
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:129)
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
    at com.sun.proxy.$Proxy124.getConfs(Unknown Source)
</code>```
```<code>Caused by: java.net.SocketException: Unexpected end of file from server
    at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:866)
    at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
    at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
    at feign.Client$Default.convertResponse(Client.java:109)
    at feign.Client$Default.execute(Client.java:105)
</code>```

Already add prefer-ip-address and retry on my config

```<code>Spring.cloud.consul.discovery.prefer-ip-address: True

retry:
  enabled: true
  max-attempts: 20
  max-interval: 2000
  initial-interval: 1000
</code>```

myapplication

Springboot cloud + openfeign + consul

```<code>spring-cloud-starter-openfeign:3.1.3
spring-retry: 1.3.1
</code>```

Problem is how can I avoid this error and make sure That Feign retires using the ip:port?

Body:
feign.RetryableException: Unexpected end of file from server executing POST http://conf-management-online/confLoader
    at feign.FeignException.errorExecuting(FeignException.java:268)
    at feign.SynchronousMethodHandler.executeAndDecode(SynchronousMethodHandler.java:129)
    at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:89)
    at feign.ReflectiveFeign$FeignInvocationHandler.invoke(ReflectiveFeign.java:100)
    at com.sun.proxy.$Proxy124.getConfs(Unknown Source)

Caused by: java.net.SocketException: Unexpected end of file from server
    at java.base/sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:866)
    at java.base/sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:689)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1615)
    at java.base/sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1520)
    at java.base/java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:527)
    at feign.Client$Default.convertResponse(Client.java:109)
    at feign.Client$Default.execute(Client.java:105)

Already add prefer-ip-address and retry on my config

Spring.cloud.consul.discovery.prefer-ip-address: True

retry:
  enabled: true
  max-attempts: 20
  max-interval: 2000
  initial-interval: 1000

myapplication

Springboot cloud + openfeign + consul

spring-cloud-starter-openfeign:3.1.3
spring-retry: 1.3.1

Problem is how can I avoid this error and make sure That Feign retires using the ip:port?


问:
Print page not taking css into consideration
```<code><div>
  <div class="dark-pale no-print text-center">
      <h2>To preview and print, press Alt + F + V.</h2>
      Make sure to review all the pages and adjust the page borders.
  </div>
  <div class="container report">
    <h5 class="title text-center">{{mudCheckWorksheet.title}}</h5>
    <app-mud-check-header [report] ="mudCheckWorksheet"></app-mud-check-header>
  <!-- Rheology & Pyc -->
 <div class="row new-section">
    <div class="cell caption-bold col-md-3">Properties</div>
  </div>
  <div class="row">
    <div class="cell col-md-3">Density, g/ml</div>
    <div class="cell value col-md-1"> </div>
  </div>
  <div class="row">
    <div class="cell col-md-3">Density, lb/gal</div>
    <div class="cell value col-md-1"> </div>
    <div *ngIf ="mudCheckWorksheet.isWbm" class="col-md-3 col-md-offset-5 text-center">
        Re-Checks
    </div>
  </div>
</code>```

css file

```<code>.row{
   font-size: 9pt;
}

.container.report {
  max-width: 800px;
  margin-bottom: 30px;
}

.container.album {
  max-width: 1130px;
  margin-bottom: 30px;
  width: 100%;
}

.title {
  font-weight: bold;
  text-decoration: underline;
}

.caption-bold {
  font-weight: bold;
}

.cell {
  height: 1.5em;
  overflow: hidden;
}

  .cell.value, .cell .value {
      text-align: center;
      border-bottom: 1px solid black;
  }

.new-section {
  margin-top: 10px;
}

.highlight {
  color: red;
}

.no-padding {
  padding: 0;
}

.sub-caption {
  padding-left: 22px;
}

.text-underlined {
  text-decoration: underline;
}

.sub-table {
  position: relative;
}

  .sub-table > div {
      left: 0;
      right: 0;
      position: absolute;
      border: 1px solid black;
  }

      .sub-table > div .row {
          margin: 0;
      }

.right-border {
  border-width: 0 1px 0 0;
  border-style: solid;
  border-color: black;
}

img.logo {
  margin: 10px 10px 10px 0;
}

.table-header {
  font-weight: bold;
  background-color: rgb(238, 238, 82);
  border-bottom: 1px solid black;
}

@media print {
  body {
    -webkit-print-color-adjust:exact !important;
  -print-color-adjust:exact ;
    background: white;
}

  .table-header {
      background-color: rgb(238, 238, 82) !important;

  }

  .highlight {
      color: red !important;
  }

  .no-print {
      display: none;
  }

  * {
      font-size: 7pt;
  }
}

table.printable {
  border-width: 0px;
  border-spacing: 0px;
  border-style: solid;
  border-color: black;
  border-collapse: collapse;
  margin: 3px 0;
  page-break-inside: avoid;
}

table.printable th {
  border-width: 1px;
  padding: 0 1px;
  border-style: solid;
  border-color: black;
  page-break-inside: avoid;
}

table.printable td {
  border-width: 1px;
  padding: 0 3px;
  border-style: solid;
  border-color: black;
  page-break-inside: avoid;
}

table.printable td .wide {
  max-width: 100%;
}
table.content-top td {
  vertical-align: top;
}

.pale {
  background-color: #FFFFDD !important;
}

.dark-pale {
  background-color: #feffa4 !important;
}

.for-reference {
  background-color: #FAF0E6 !important;
}

.group {
  background-color: #9AC361 !important;
}

.notes {
  background-color: #FAF0E6 !important;
}

.divider {
  background-color: #cccccc !important;
}

.vertical-iteration-header {
  background-color: #EAEAEA !important;
  word-wrap: break-word;
}

.nobr   { white-space:nowrap; }

table.printable td.no-border {
  border-width: 0px;
  border-style:none;
  border-color: white;
}

table.printable td.border-bottom {
  border-bottom-width: 1px;
  border-style:solid;
  border-color: black;
}

table.printable td.border-top {
  border-top-width: 1px;
  border-style:solid;
  border-color: black;
}

table.printable tr.no-border td {
  border:none;
}

div.pagebreak {
 page-break-after: always;
 page-break-inside: avoid;
}

div.nopagebreak {
 page-break-inside: avoid;
}

table.fixed {
  width:100%;
  table-layout: fixed;
}

table.fixed td.last {
  width: 1px;
  white-space: nowrap;
}

/*psd chart*/

.bar {
  _fill: #1f77b4;
  fill: #9AC361;
  stroke: #333;
}

.axis path,
.axis line {
  fill: none;
  stroke: black;
  shape-rendering: crispEdges;
}

.axis text {
  _font-family: Arial, Helvetica, sans-serif;
  _font-size: 9pt;
}

.x.axis text {
  font-size: 8pt;
}

path.line {
  fill: none;
  stroke: black;
  stroke-width: 1px;
}

.dot {
  stroke: black;
}

.width10 {
width:10%
}

.width170 {
  width :170px
}
.width155 {
  width: 155px
}

.width50 {
  width: 50px
}

.width40 {
  width: 40px
}
.width60 {
  width: 60px
}
.width80 {
  width: 80px
}
.width75 {
  width: 75px
}
.width110 {
  width: 110px
}
.width15 {
  width: 15px
}
.width20 {
  width: 20px
}
.width100 {
  width: 100%
}

.width100px {
  width : 100px
}
.width200px {
  width: 200px
}

.width160px {
  width: 160px
}

.width730px {
  width: 730px
}

.width25 {
  width: 25%
}
.width26 {
  width: 26%
}
.width1 {
  width: 1%
}

table.printable th.no-border {
  border-width: 0px;
  border-style: none;
  border-color: white;
}

table.printable th.text-center {
text-align:center
}

table.printable th.normalFont {
  font-weight: normal;
}

table caption {
  padding: 0px;
}
</code>```

capture of screen

On Printing

When I am trying to print the page the css is not getting populated. on pressing Ctrl+p the page should get printed exactly what its in the
browser, however it is not taking CSS into consideration. I want to
print the exact page. Please suggest

Body:
To preview and print, press Alt + F + V.

      Make sure to review all the pages and adjust the page borders.

{{mudCheckWorksheet.title}}

    <app-mud-check-header [report] ="mudCheckWorksheet"></app-mud-check-header>

Properties

Density, g/ml

Density, lb/gal

        Re-Checks

css file

.row{
   font-size: 9pt;
}

.container.report {
  max-width: 800px;
  margin-bottom: 30px;
}

.container.album {
  max-width: 1130px;
  margin-bottom: 30px;
  width: 100%;
}

.title {
  font-weight: bold;
  text-decoration: underline;
}

.caption-bold {
  font-weight: bold;
}

.cell {
  height: 1.5em;
  overflow: hidden;
}

  .cell.value, .cell .value {
      text-align: center;
      border-bottom: 1px solid black;
  }

.new-section {
  margin-top: 10px;
}

.highlight {
  color: red;
}

.no-padding {
  padding: 0;
}

.sub-caption {
  padding-left: 22px;
}

.text-underlined {
  text-decoration: underline;
}

.sub-table {
  position: relative;
}

  .sub-table > div {
      left: 0;
      right: 0;
      position: absolute;
      border: 1px solid black;
  }

      .sub-table > div .row {
          margin: 0;
      }

.right-border {
  border-width: 0 1px 0 0;
  border-style: solid;
  border-color: black;
}

img.logo {
  margin: 10px 10px 10px 0;
}

.table-header {
  font-weight: bold;
  background-color: rgb(238, 238, 82);
  border-bottom: 1px solid black;
}

@media print {
  body {
    -webkit-print-color-adjust:exact !important;
  -print-color-adjust:exact ;
    background: white;
}

  .table-header {
      background-color: rgb(238, 238, 82) !important;

  }

  .highlight {
      color: red !important;
  }

  .no-print {
      display: none;
  }

  * {
      font-size: 7pt;
  }
}

table.printable {
  border-width: 0px;
  border-spacing: 0px;
  border-style: solid;
  border-color: black;
  border-collapse: collapse;
  margin: 3px 0;
  page-break-inside: avoid;
}

table.printable th {
  border-width: 1px;
  padding: 0 1px;
  border-style: solid;
  border-color: black;
  page-break-inside: avoid;
}

table.printable td {
  border-width: 1px;
  padding: 0 3px;
  border-style: solid;
  border-color: black;
  page-break-inside: avoid;
}

table.printable td .wide {
  max-width: 100%;
}
table.content-top td {
  vertical-align: top;
}

.pale {
  background-color: #FFFFDD !important;
}

.dark-pale {
  background-color: #feffa4 !important;
}

.for-reference {
  background-color: #FAF0E6 !important;
}

.group {
  background-color: #9AC361 !important;
}

.notes {
  background-color: #FAF0E6 !important;
}

.divider {
  background-color: #cccccc !important;
}

.vertical-iteration-header {
  background-color: #EAEAEA !important;
  word-wrap: break-word;
}

.nobr   { white-space:nowrap; }

table.printable td.no-border {
  border-width: 0px;
  border-style:none;
  border-color: white;
}

table.printable td.border-bottom {
  border-bottom-width: 1px;
  border-style:solid;
  border-color: black;
}

table.printable td.border-top {
  border-top-width: 1px;
  border-style:solid;
  border-color: black;
}

table.printable tr.no-border td {
  border:none;
}

div.pagebreak {
 page-break-after: always;
 page-break-inside: avoid;
}

div.nopagebreak {
 page-break-inside: avoid;
}

table.fixed {
  width:100%;
  table-layout: fixed;
}

table.fixed td.last {
  width: 1px;
  white-space: nowrap;
}

/*psd chart*/

.bar {
  _fill: #1f77b4;
  fill: #9AC361;
  stroke: #333;
}

.axis path,
.axis line {
  fill: none;
  stroke: black;
  shape-rendering: crispEdges;
}

.axis text {
  _font-family: Arial, Helvetica, sans-serif;
  _font-size: 9pt;
}

.x.axis text {
  font-size: 8pt;
}

path.line {
  fill: none;
  stroke: black;
  stroke-width: 1px;
}

.dot {
  stroke: black;
}

.width10 {
width:10%
}

.width170 {
  width :170px
}
.width155 {
  width: 155px
}

.width50 {
  width: 50px
}

.width40 {
  width: 40px
}
.width60 {
  width: 60px
}
.width80 {
  width: 80px
}
.width75 {
  width: 75px
}
.width110 {
  width: 110px
}
.width15 {
  width: 15px
}
.width20 {
  width: 20px
}
.width100 {
  width: 100%
}

.width100px {
  width : 100px
}
.width200px {
  width: 200px
}

.width160px {
  width: 160px
}

.width730px {
  width: 730px
}

.width25 {
  width: 25%
}
.width26 {
  width: 26%
}
.width1 {
  width: 1%
}

table.printable th.no-border {
  border-width: 0px;
  border-style: none;
  border-color: white;
}

table.printable th.text-center {
text-align:center
}

table.printable th.normalFont {
  font-weight: normal;
}

table caption {
  padding: 0px;
}

capture of screen

On Printing

When I am trying to print the page the css is not getting populated. on pressing Ctrl+p the page should get printed exactly what its in the
browser, however it is not taking CSS into consideration. I want to
print the exact page. Please suggest