Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75,345,281 | 2 | null | 75,338,300 | 0 | null | Look at the trigger is waiting for a datalayer event : `add_to_cart`.
So you need to ask the developer to push a datalayer event with ecommerce item when user successfully perform an `add_to_cart` event.
Here is the detail about all ecommerce event and its datalayer.
[https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm](https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?client_type=gtm)
You have done half of the job. The there is still another part need to be done.
---
Add: I saw you asked a following question on StackOverflow. But I think I should still add it in here.
Here is a concept image shows the process of the tracking
[](https://i.stack.imgur.com/LCTGr.png)
The green part is you already done.
Set up the Google Tag Manager to GA4, waiting for datalayer from developer.
So the question now :
A. Is your developer implemented the Datalayer code? If yes, can you find someone to verify it?
B. Or your developer didn't get the concept of the Datalayer code. Why it should be implement and when the code need to be triggered.
| null | CC BY-SA 4.0 | null | 2023-02-04T13:02:31.633 | 2023-03-03T10:36:16.253 | 2023-03-03T10:36:16.253 | 2,692,683 | 2,692,683 | null |
75,345,514 | 2 | null | 9,531,078 | 0 | null | In the new version of SQL Server, the RAISERROR function is not available, but you can use THROW instead. It works similarly. However, it is a bit more extensive. For details, please refer to the documentation:
[https://learn.microsoft.com/en-us/sql/t-sql/language-elements/throw-transact-sql?view=sql-server-ver16](https://learn.microsoft.com/en-us/sql/t-sql/language-elements/throw-transact-sql?view=sql-server-ver16)
| null | CC BY-SA 4.0 | null | 2023-02-04T13:48:14.923 | 2023-02-04T13:48:14.923 | null | null | 4,715,585 | null |
75,345,592 | 2 | null | 49,847,791 | 1 | null | The withDefaultPasswordEncoder() method is now deprecated in favor of passwordEncoder() which accepts a PasswordEncoder implementation. It's recommended to use a stronger password encoding mechanism such as bcrypt or scrypt.
To use bcrypt, you can do the following:
```
package com.example.securingweb;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.web.SecurityFilterChain;
@Configuration
@EnableWebSecurity
public class WebSecurityConfig {
@Bean
public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception {
http
.authorizeHttpRequests((requests) -> requests
.requestMatchers("/", "/home").permitAll()
.anyRequest().authenticated()
)
.formLogin((form) -> form
.loginPage("/login")
.permitAll()
)
.logout((logout) -> logout.permitAll());
return http.build();
}
@Bean
public UserDetailsService userDetailsService() {
UserDetails user =
User.builder()
.username("user")
.password(passwordEncoder().encode("password"))
.roles("USER")
.build();
return new InMemoryUserDetailsManager(user);
}
@Bean
public BCryptPasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
}
```
The below code is the new implementation of WebSecurityConfig.java file [https://spring.io/guides/gs/securing-web/](https://spring.io/guides/gs/securing-web/)
| null | CC BY-SA 4.0 | null | 2023-02-04T14:01:24.787 | 2023-02-04T14:01:24.787 | null | null | 18,976,379 | null |
75,345,622 | 2 | null | 75,345,247 | 0 | null | You can use position: sticky in place of position fixed it will push other content away from your header.
```
.sub-page {
padding-left: 40px;
padding-top: 40px;
flex-direction: column;
}
.sub-page h2 {
margin-bottom: 16px;
position: sticky;
top: 0;
background-color: #fff;
}
.scrolling-wrapper {
display: flex;
width: 100%;
height: auto;
flex-wrap: nowrap;
-webkit-overflow-scrolling: touch;
}
```
```
<div class="container">
<div class="page sub-page">
<h2>Selected works</h2>
<div class="scrolling-wrapper">
<div class="list">
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
<a class="list-item"><h3>Card</h3></a>
</div>
</div>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-04T14:07:22.070 | 2023-02-04T14:12:32.617 | 2023-02-04T14:12:32.617 | 6,777,856 | 6,777,856 | null |
75,345,893 | 2 | null | 75,332,083 | 0 | null | That exception indicates that the client was unable to establish a connection with the Event Hubs service. The most common reason for this specific failure is that the network does not allow traffic over the AMQP ports (5761, 5762).
I'd suggest configuring the client to use AMQP over web sockets, as shown in [this sample](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/eventhub/Azure.Messaging.EventHubs/samples/Sample02_EventHubsClients.md#using-web-sockets). That will direct traffic over port 443, which is more commonly allowed in restricted networks.
| null | CC BY-SA 4.0 | null | 2023-02-04T14:51:52.457 | 2023-02-04T14:51:52.457 | null | null | 159,548 | null |
75,346,129 | 2 | null | 75,341,784 | 1 | null | If your question is simplified to what is the code equivalent to `add-corresponding` in the "OO context", this is one possible answer, I propose the method `add_corresponding` below, and a test code to demonstrate how it works - this code compiles in 7.40 SP08:
```
CLASS lcx_add_corresp_not_all_struct DEFINITION INHERITING FROM cx_static_check.
ENDCLASS.
CLASS lcl_app DEFINITION.
PUBLIC SECTION.
CLASS-METHODS add_corresponding IMPORTING from_struct TYPE any
CHANGING to_struct TYPE any
RAISING lcx_add_corresp_not_all_struct
cx_sy_conversion_overflow.
ENDCLASS.
CLASS lcl_app IMPLEMENTATION.
METHOD add_corresponding.
TYPES: ty_names TYPE HASHED TABLE OF abap_compname WITH UNIQUE KEY table_line,
ty_names_in_structs TYPE STANDARD TABLE OF ty_names WITH EMPTY KEY,
ty_table_rtti TYPE STANDARD TABLE OF REF TO cl_abap_typedescr WITH EMPTY KEY.
DATA(rtti_from_struct) = cl_abap_typedescr=>describe_by_data( from_struct ).
DATA(rtti_to_struct) = cl_abap_typedescr=>describe_by_data( to_struct ).
IF rtti_from_struct->kind <> rtti_from_struct->kind_struct
OR rtti_to_struct->kind <> rtti_to_struct->kind_struct.
RAISE EXCEPTION NEW lcx_add_corresp_not_all_struct( ).
ENDIF.
DATA(names_in_structs) = VALUE ty_names_in_structs(
FOR rtti IN VALUE ty_table_rtti( ( rtti_from_struct ) ( rtti_to_struct ) )
( VALUE #( FOR <comp> IN CAST cl_abap_structdescr( rtti )->components
WHERE ( type_kind CA '8abeFIPs' ) " all numeric types
( <comp>-name ) ) ) ).
DATA(same_names) = FILTER ty_names( names_in_structs[ 1 ] IN names_in_structs[ 2 ] WHERE table_line = table_line ).
LOOP AT same_names REFERENCE INTO DATA(same_name).
ASSIGN COMPONENT same_name->* OF STRUCTURE from_struct TO FIELD-SYMBOL(<from_number>).
ASSERT sy-subrc = 0.
ASSIGN COMPONENT same_name->* OF STRUCTURE to_struct TO FIELD-SYMBOL(<to_number>).
ASSERT sy-subrc = 0.
<to_number> = <to_number> + <from_number>.
ENDLOOP.
ENDMETHOD.
ENDCLASS.
CLASS ltc_app DEFINITION
FOR TESTING
DURATION SHORT
RISK LEVEL HARMLESS.
PRIVATE SECTION.
METHODS test FOR TESTING RAISING cx_static_check.
METHODS overflow FOR TESTING RAISING cx_static_check.
ENDCLASS.
CLASS ltc_app IMPLEMENTATION.
METHOD test.
TYPES: ty_output LIKE ls_output.
ls_output = VALUE #( clabs = 100 ceinm = 500 ).
DATA(ls_output2) = ls_output.
lcl_app=>add_corresponding( EXPORTING from_struct = ls_output2 CHANGING to_struct = ls_output ).
cl_abap_unit_assert=>assert_equals( act = ls_output exp = VALUE ty_output( clabs = 200 ceinm = 1000 ) ).
ENDMETHOD.
METHOD overflow.
TYPES: BEGIN OF ty_struct,
int1 TYPE int1,
END OF ty_struct.
DATA(from_struct) = VALUE ty_struct( int1 = 200 ).
DATA(to_struct) = from_struct.
TRY.
lcl_app=>add_corresponding( EXPORTING from_struct = from_struct CHANGING to_struct = to_struct ).
CATCH cx_sy_conversion_overflow INTO DATA(arithmetic_overflow).
ENDTRY.
cl_abap_unit_assert=>assert_bound( act = arithmetic_overflow msg = |Actual: { to_struct-int1 } ; expected: arithmetic overflow| ).
ENDMETHOD.
ENDCLASS.
```
NB: instead of `ADD-CORRESPONDING`, you may simply use `ls_output-clabs = ls_output-clabs + ls_mchb-clabs` and repeat for all numeric components.
NB: `ADD-CORRESPONDING` and other arithmetic "corresponding" statements were [made obsolete because they are considered error-prone](https://help.sap.com/doc/abapdocu_latest_index_htm/latest/en-US/index.htm?file=abapadd-corresponding.htm):
> "These statements are error-prone because, particularly in complex structures, it is not easy to check that identically named components have the data type and content necessary for a numeric operation."
| null | CC BY-SA 4.0 | null | 2023-02-04T15:24:10.343 | 2023-02-04T15:29:45.033 | 2023-02-04T15:29:45.033 | 9,150,270 | 9,150,270 | null |
75,346,240 | 2 | null | 75,345,226 | 0 | null | This is a variant of [Reshape multiple value columns to wide format](https://stackoverflow.com/q/11608167/3358272):
Hasty data:
```
quux <- rbind(tibble::rownames_to_column(mtcars[1:3,], "key"), tibble::rownames_to_column(mtcars[1:3,], "key"))
```
# dplyr
```
library(dplyr)
library(tidyr) # pivot_wider
quux %>%
group_by(key) %>%
mutate(rn = row_number()) %>%
ungroup() %>%
tidyr::pivot_wider(key, names_from=rn, values_from=-c(key, rn), names_vary = "slowest")
# # A tibble: 3 × 23
# key mpg_1 cyl_1 disp_1 hp_1 drat_1 wt_1 qsec_1 vs_1 am_1 gear_1 carb_1 mpg_2 cyl_2 disp_2 hp_2 drat_2 wt_2 qsec_2 vs_2 am_2 gear_2 carb_2
# <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
# 1 Mazda RX4 21 6 160 110 3.9 2.62 16.5 0 1 4 4 21 6 160 110 3.9 2.62 16.5 0 1 4 4
# 2 Mazda RX4 Wag 21 6 160 110 3.9 2.88 17.0 0 1 4 4 21 6 160 110 3.9 2.88 17.0 0 1 4 4
# 3 Datsun 710 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1 22.8 4 108 93 3.85 2.32 18.6 1 1 4 1
```
| null | CC BY-SA 4.0 | null | 2023-02-04T15:39:58.843 | 2023-02-04T15:39:58.843 | null | null | 3,358,272 | null |
75,346,361 | 2 | null | 30,093,738 | 0 | null | Try the following I saw on Microsoft Support website:
`strQuery = "SELECT NUM,CREATION_DATE,CREATOR,STATE,LAST_MODIFICATION_DATE,LAST_MODIFIER,CATEGORY,MODEL_LABEL FROM [MySheet$] WHERE CREATION_DATE<=#" + EndDateTextBox.Value + "# AND CREATION_DATE>=#" + BeginDateTextBox.Value + "#"`
| null | CC BY-SA 4.0 | null | 2023-02-04T16:00:52.417 | 2023-02-07T06:53:00.820 | 2023-02-07T06:53:00.820 | 704,008 | 21,147,480 | null |
75,346,626 | 2 | null | 67,987,624 | 0 | null | Base on this link [https://vuejs.org/guide/components/slots.html#scoped-slots](https://vuejs.org/guide/components/slots.html#scoped-slots)
we can use like this :
```
<template slot="header" slot-scope="headerProps">
{{ headerProps }}
</template>
```
```
<MyComponent>
<template #header="headerProps">
{{ headerProps }}
</template>
<template #default="defaultProps">
{{ defaultProps }}
</template>
<template #footer="footerProps">
{{ footerProps }}
</template>
</MyComponent>
```
| null | CC BY-SA 4.0 | null | 2023-02-04T16:40:36.143 | 2023-02-04T16:40:36.143 | null | null | 6,171,651 | null |
75,346,655 | 2 | null | 75,342,334 | 1 | null | There are various ways to extract the full data pertaining to a certain node and compute any quantity you are interested in. For the distribution of a classification tree one way is to coerce to the `simpleparty` class which stores the `distribution` in the `info` slots of each node.
Using the example from the vignette you mentioned, you can first fit the full `constparty` tree:
```
library("partykit")
data("GlaucomaM", package = "TH.data")
gtree <- ctree(Class ~ ., data = GlaucomaM)
```
And then coerce to `simpleparty`:
```
gtree <- as.simpleparty(gtree)
```
Then you can extract a list of distributions from each node, bind it into a table, and compute the proportions:
```
tab <- nodeapply(gtree, nodeids(gtree), function(node) node$info$distribution)
tab <- do.call(rbind, tab)
proportions(tab, 1)
## glaucoma normal
## 1 0.50000000 0.50000000
## 2 0.86206897 0.13793103
## 3 0.93670886 0.06329114
## 4 0.12500000 0.87500000
## 5 0.21100917 0.78899083
## 6 0.09230769 0.90769231
## 7 0.38636364 0.61363636
```
You can also adapt the panel function for the printing, re-using the functions used in `print.simpleparty`:
```
simpleprint <- function(node) formatinfo_node(node,
FUN = partykit:::.make_formatinfo_simpleparty(gtree),
default = "*", prefix = ": ")
print(gtree, inner_panel = simpleprint)
## Model formula:
## Class ~ ag + at + as + an + ai + eag + eat + eas + ean + eai +
## abrg + abrt + abrs + abrn + abri + hic + mhcg + mhct + mhcs +
## mhcn + mhci + phcg + phct + phcs + phcn + phci + hvc + vbsg +
## vbst + vbss + vbsn + vbsi + vasg + vast + vass + vasn + vasi +
## vbrg + vbrt + vbrs + vbrn + vbri + varg + vart + vars + varn +
## vari + mdg + mdt + mds + mdn + mdi + tmg + tmt + tms + tmn +
## tmi + mr + rnf + mdic + emd + mv
##
## Fitted party:
## [1] root
## | [2] vari <= 0.059: glaucoma (n = 87, err = 13.8%)
## | | [3] vasg <= 0.066: glaucoma (n = 79, err = 6.3%)
## | | [4] vasg > 0.066: normal (n = 8, err = 12.5%)
## | [5] vari > 0.059: normal (n = 109, err = 21.1%)
## | | [6] tms <= -0.066: normal (n = 65, err = 9.2%)
## | | [7] tms > -0.066: normal (n = 44, err = 38.6%)
##
## Number of inner nodes: 3
## Number of terminal nodes: 4
```
| null | CC BY-SA 4.0 | null | 2023-02-04T16:43:51.210 | 2023-02-04T16:43:51.210 | null | null | 4,233,642 | null |
75,347,529 | 2 | null | 75,347,414 | 1 | null | You could use `position_dodge` with a `coord_flip`:
```
library(ggplot2)
sav %>%
ggplot(aes(x = ï..Location, y = Percentage, colour = Subject)) +
geom_point(size = 2.5, position = position_dodge(0.5)) +
geom_linerange(aes(ymin = 0, ymax = Percentage),
linetype = "dotted", position = position_dodge(0.5)) +
coord_flip() +
theme_light()
```
[](https://i.stack.imgur.com/qKWHw.png)
| null | CC BY-SA 4.0 | null | 2023-02-04T18:52:33.093 | 2023-02-04T18:52:33.093 | null | null | 12,500,315 | null |
75,347,535 | 2 | null | 75,347,414 | 1 | null | Something like this:
```
library(ggplot2)
sav %>% ggplot(aes(x = Percentage, y = ï..Location)) +
geom_point(aes(colour = Subject), size = 2.5) +
geom_segment(aes(yend = ï..Location, colour = Subject), xend = 0 , linetype="dotted") +
facet_wrap(. ~ Subject) +
theme_light()
```
[](https://i.stack.imgur.com/tnlsG.png)
| null | CC BY-SA 4.0 | null | 2023-02-04T18:53:04.810 | 2023-02-04T18:53:04.810 | null | null | 13,321,647 | null |
75,347,813 | 2 | null | 3,073,389 | 0 | null | There is a way to customize the entire list view group header using a custom drawn list view.
As an example, I include an outline of a method that handles the entire `CDDS_PREPAINT` drawing phase. It comes from an MFC based project, but I suppose it can be easily translated into a plain Win32 project or into other frameworks.
```
void CMyServiceList::OnCustomDraw(NMHDR* nmhdr, LRESULT* result)
{
auto nmlvcd = LPNMLVCUSTOMDRAW(nmhdr);
switch (nmlvcd->nmcd.dwDrawStage)
{
case CDDS_PREPAINT:
{
switch (nmlvcd->dwItemType)
{
case LVCDI_GROUP:
{
const int nGroupId = int(nmlvcd->nmcd.dwItemSpec);
wchar_t strGroupName[256] = L"";
wchar_t strSubTitle[256] = L"";
LVGROUP lvg = {
.cbSize = sizeof(LVGROUP),
.mask = LVGF_HEADER | LVGF_STATE | (!nGroupId ? LVGF_SUBTITLE : 0u),
.pszHeader = strGroupName,
.cchHeader = _countof(strGroupName),
.stateMask = 0xff,
.pszSubtitle = strSubTitle,
.cchSubtitle = _countof(strSubTitle),
};
auto b = GetGroupInfo(nGroupId, &lvg);
// Drawing code of entire group header
// ...
*result = CDRF_SKIPDEFAULT;
}
return;
break;
}
}
break;
}
CListCtrl::OnCustomDraw(nmhdr, result);
}
```
| null | CC BY-SA 4.0 | null | 2023-02-04T19:32:52.533 | 2023-02-04T19:32:52.533 | null | null | 279,251 | null |
75,348,369 | 2 | null | 72,154,665 | 0 | null | Add leaflet.css and it will fix (node_modules/leaflet/dist/leaflet.css)
| null | CC BY-SA 4.0 | null | 2023-02-04T21:04:50.517 | 2023-02-04T21:04:50.517 | null | null | 4,769,156 | null |
75,348,896 | 2 | null | 75,346,725 | 0 | null | `expandVertically` in your `enterTransition` is not the correct approach for this kind of animation. [Per documentation](https://developer.android.com/reference/kotlin/androidx/compose/animation/package-summary#expandVertically(androidx.compose.animation.core.FiniteAnimationSpec,androidx.compose.ui.Alignment.Vertical,kotlin.Boolean,kotlin.Function1)), it animates a clip revealing the content of the animated item from top to bottom, or vice versa. You apply this animation to the entire column (so all items at once), resulting in the gif you have shown us.
Instead, you should use a different enter/exit animation type, maybe a custom animation where you work with the item scaling to emulate the "pop in" effect like such:
```
scaleFactor.animateTo(2f, tween(easing = FastOutSlowInEasing, durationMillis = 50))
scaleFactor.animateTo(1f, tween(easing = FastOutSlowInEasing, durationMillis = 70))
```
(the scaleFactor is an animatabale of type `Animatable<Float, AnimationVector1D>` in this instance).
Then you create such an animatable for each of the column items, i.e. your menu items. After that, just run the animations in a for loop for each menu item inside a coroutine scope (since compose animations are suspend by default, they will run in sequence, use async/awaitAll if you want to do it in parallel).
Also, don't forget to put your animatabales in `remember {}`, then just use the values you are animating like `scaleFactor` inside modifiers of your column items, and trigger them inside a `LaunchedEffect` when you click to expand/close the menu.
| null | CC BY-SA 4.0 | null | 2023-02-04T22:49:48.820 | 2023-02-04T22:49:48.820 | null | null | 4,464,680 | null |
75,349,221 | 2 | null | 75,349,053 | 1 | null | You'd get a reasonable match with:
```
library(ggplot2)
library(ggtext)
ss <- !is.na(senate2022$seatsheld) & !is.na(senate2022$seatprob_Dparty)
ggplot(senate2022, aes(seatsheld, seatprob_Dparty,
fill = seatsheld < weighted.mean(seatsheld[ss],
seatprob_Dparty[ss]),
alpha = ifelse(abs(50.9 - seatsheld) > 1, 0.8, 1))) +
geom_col() +
geom_vline(xintercept = 50) +
scale_x_continuous(NULL, labels = function(x) {
ifelse(x < 50, paste0("<span style='color:#f86a68;'>", 100 - x),
paste0("<span style='color:#5768ac;'>", x))
}, breaks = 20:31 * 2) +
scale_fill_manual(values = c("#5768ac", "#f86a68"), guide = "none") +
coord_cartesian(expand = FALSE) +
scale_alpha_identity() +
theme_minimal(base_size = 20, base_family = "Roboto Condensed",) +
theme(axis.text.y = element_blank(),
axis.title.y = element_blank(),
axis.text.x = element_markdown(face = "bold"),
panel.grid.major.x = element_blank(),
panel.grid.minor.x = element_blank(),
axis.line.x = element_line())
```
[](https://i.stack.imgur.com/sQDaq.png)
| null | CC BY-SA 4.0 | null | 2023-02-05T00:01:24.140 | 2023-02-05T17:21:04.370 | 2023-02-05T17:21:04.370 | 12,500,315 | 12,500,315 | null |
75,349,325 | 2 | null | 75,349,282 | 0 | null |
1. Use SEO plugin(All in One SEO for WordPress or Yoast…etc / Rank Math is good nowaday)
2. Resize thumbnail image(630*1200..etc)
3. And use facebook debugger site for cleaning facebook cache
| null | CC BY-SA 4.0 | null | 2023-02-05T00:27:25.533 | 2023-02-05T00:30:13.350 | 2023-02-05T00:30:13.350 | 17,373,286 | 17,373,286 | null |
75,349,495 | 2 | null | 75,349,366 | 0 | null | I would suggest to use `display: grid;` in your `.container`. In the image that you say is your challenge, the image takes half of the container. You can achieve that by creating two `<div>` inside your container, and then:
```
.container {
display: grid;
grid-template-columns: 1fr 1fr;
/*More properties*/
}
```
This will set each div to span half of your container. Your first div should have:
```
.your-div{
background-image: url('your-image-path')
background-size: cover;
background-position: center;
}
```
That way you can achieve the left side of your challenge. I would need more information about your problem with the right side. Hope this helped!
*Note: This is just one way of doing this. If you have to strictly use `flex`, play around with its properties.
| null | CC BY-SA 4.0 | null | 2023-02-05T01:10:39.797 | 2023-02-05T01:10:39.797 | null | null | 20,622,341 | null |
75,349,520 | 2 | null | 75,349,366 | 0 | null | As suggested By @aleyo742, `grid` is here your friend, but you will also need to reset some of your `padding`s, `object-fit` can be use too.
```
* {
box-sizing: border-box;
margin: 0;
padding: 10px;
}
:root {
--font1: "Fraunces", sans-serif;
--font2: "Montserrat", sans-serif;
--fs-paragraph: 14px;
--fs-header1: 40px;
--primaryColor1: hsl(158, 36%, 37%);
--primaryColor2: hsl(30, 38%, 92%);
--neutralColor1: hsl(212, 21%, 14%);
--neutralColor2: hsl(228, 12%, 48%);
--neutralColor3: hsl(0, 0%, 100%);
}
body {
background-color: var(--primaryColor2);
display: flex;
flex-direction: column;
min-height: 100vh;
}
.container {
display: grid;
grid-template-columns: 1fr 1fr;
padding: 0;
overflow: hidden;
margin: auto;
background-color: var(--neutralColor3);
max-width: 600px;
border-radius: 1.5em;
}
/* here comes why grid is your handy friend */
@media(max-width: 600px) {
.container {
grid-template-columns: 1fr;
grid-template-rows: 250px auto;
}
}
.img-box {
margin: 0;
padding: 0;
}
.img-box img {
width: 100%;
height: 100%;
padding: 0;
object-fit: cover;
}
.details {
display: flex;
flex-direction: column;
}
.details h2 {
font-family: var(--font2);
font-weight: normal;
letter-spacing: 2px;
text-transform: uppercase;
font-size: var(--fs-paragraph);
}
.brand-title p {
font-family: var(--font1);
font-size: var(--fs-header1);
font-weight: bolder;
}
.brand-desc {}
.brand-desc p {
font-family: var(--font2);
font-size: var(--fs-paragraph);
color: var(--neutralColor2);
line-height: 2em;
}
.prices {
display: flex;
align-items: center;
}
.prices h1 {
font-family: var(--font1);
color: var(--primaryColor1);
}
.prices h4 {
font-family: var(--font2);
color: var(--neutralColor2);
text-decoration: line-through;
}
.addcart {
display: flex;
justify-content: center;
align-items: center;
}
.addcart button {
background: url(/images/icon-cart.svg) no-repeat left center;
padding-left: 20px;
background-color: var(--primaryColor1);
font-family: var(--font2);
font-weight: 600;
}
button {
border: none;
border-radius: 0.5em;
color: var(--neutralColor3);
width: 100%;
height: 50px;
}
.attribution {
font-size: 11px;
text-align: center;
}
.attribution a {
color: hsl(228, 45%, 44%);
}
```
```
<link href="https://fonts.googleapis.com/css2?family=Fraunces:[email protected]&family=Montserrat&family=Outfit&display=swap" rel="stylesheet" />
<div class="container">
<div class="img-box">
<img src="https://i.stack.imgur.com/vloym.jpg" alt="" />
</div>
<div class="details">
<div class="brand-title">
<h2>Perfume</h2>
<p>Gabrielle Essence Eau De Parfum</p>
</div>
<div class="brand-desc">
<p>
A floral, solar and voluptuous interpretation composed by Olivier Polge, Perfumer-Creator for the House of CHANEL.
</p>
</div>
<div class="prices">
<h1>$149.99</h1>
<h4>$169.99</h4>
</div>
<div class="addcart">
<span class="icon"></span>
<button>Add to Cart</button>
</div>
</div>
</div>
<div class="attribution">
Challenge by
<a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a
>. Coded by <a href="#">yes</a>.
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-05T01:17:35.173 | 2023-02-05T01:25:28.270 | 2023-02-05T01:25:28.270 | 2,442,099 | 2,442,099 | null |
75,349,560 | 2 | null | 29,993,763 | 0 | null | Agula Otgonbaatar has the correct answer, however I use these values
```
public const int WM_NCLBUTTONDOWN = 0xA1;
public const int HT_CAPTION = 0x2;
```
I also check for MouseButton.Left in my MouseDown handler, so it would be:
```
if (e.Button == MouseButtons.Left)
{
ReleaseCapture();
SendMessage(Handle, WM_NCLBUTTONDOWN, HT_CAPTION, 0);
}
```
This works for me.
| null | CC BY-SA 4.0 | null | 2023-02-05T01:28:37.253 | 2023-02-05T01:28:37.253 | null | null | 2,722,573 | null |
75,350,071 | 2 | null | 75,350,015 | 1 | null | The error message is telling you exactly what the problem is. Your designer code is trying to register a handler for the form's `Load` event but there is no method with the specified name. Why is that the case in the first place? I'm guessing that you deleted that method while it was still registered as an event handler. Don't do that because this is what happens. If you want to delete an event handler then you have to remove the registration first, which you do in the window of the designer.
Now that you're in this situation, you can just delete that line from the designer code file and that will fix the issue. If you don't try to register a nonexistent method as an event handler then you won't have that problem.
| null | CC BY-SA 4.0 | null | 2023-02-05T04:12:03.357 | 2023-02-05T04:12:03.357 | null | null | 584,183 | null |
75,350,122 | 2 | null | 74,791,058 | 0 | null | After moving the tailwind.config.js file into the Sanity folder, Sanity worked, but the front end caused the error.
To make it work have two copies of the tailwind CSS file one for the root directory and one inside the Sanity folder.
| null | CC BY-SA 4.0 | null | 2023-02-05T04:27:33.130 | 2023-02-09T03:41:39.667 | 2023-02-09T03:41:39.667 | 21,149,761 | 21,149,761 | null |
75,350,222 | 2 | null | 75,350,132 | 1 | null | Try it like this:
Splitting the content into left and right will result in the weight and gravity properties working. Check out this layout below.
```
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tv_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Title"
android:textSize="20sp" />
<!--Separate layout aligned to the left, containing an image and a yummy pizza label. -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:id="@+id/iv_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
<TextView
android:id="@+id/tv_text_left"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Text Left"
android:textSize="16sp" />
</LinearLayout>
<!--Display the pizza price on a separate label aligned to the right -->
<TextView
android:id="@+id/tv_text_right"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="right"
android:text="Text Right"
android:layout_weight="1"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
```
| null | CC BY-SA 4.0 | null | 2023-02-05T05:04:59.157 | 2023-02-05T05:12:52.547 | 2023-02-05T05:12:52.547 | 19,989,188 | 19,989,188 | null |
75,350,247 | 2 | null | 75,347,685 | -1 | null | You need a by-default decorated JFrame, which acquires the look & feel of the machine's operating system.
Setting an icon and customizing text on Title bar is easy.It can be done as shown below,
```
class TitleBar {
TitleBar(){
Frame f=new Frame();
//Setting TitleBar icon with "YourImage.png"
f.setIconImage(Toolkit.getDefaultToolkit().getImage(getClass().getResource("YourImage.png")));
//set other parameters as per your choice viz size layout etc.
//Set the Title Bar text
f.setTitle("YOUR CUSTOM TEXT");
f.setVisible(true);
}
```
Now with the frame decoration turned "ON", it is not possible to change the color of titlebar, font of the top-level JFrame (to the best of my knowledge). You CAN change the color of an InternalFrame however.
If you want to customise these then turn off windows decorations with f.setUndecorated(true) and you can change the title bar appearance with the help of LAF (Look And Feel). This is better explained in the answer below :
[Change the color of the title bar in javax.swing](https://stackoverflow.com/a/69469930/12802843)
You may also try modifying the UIDefaults as shown here :
[Modifying UIDefaults | For Windows 10 and above](https://stackoverflow.com/a/49019710/12802843)
Do upvote if my answer is useful !!
| null | CC BY-SA 4.0 | null | 2023-02-05T05:12:25.627 | 2023-02-05T05:12:25.627 | null | null | 12,802,843 | null |
75,350,259 | 2 | null | 36,967,261 | 1 | null | The following code will plot the elliptic curve your want
```
library(ggplot2)
# Define the elliptic curve equation
elliptic_curve <- function(x) {
return (x^3 - 3*x + 2)
}
# Generate the x and y values for the plot
x_vals <- seq(-3, 3, by = 0.01)
y_vals <- sqrt(elliptic_curve(x_vals))
# Plot the points on the elliptic curve
ggplot(data.frame(x=x_vals, y=y_vals), aes(x=x, y=y)) +
geom_line()
```
| null | CC BY-SA 4.0 | null | 2023-02-05T05:15:02.587 | 2023-02-05T05:15:02.587 | null | null | 7,055,815 | null |
75,350,343 | 2 | null | 75,190,289 | 0 | null | It appears to be an issue with Python 3.10+. I had the exact same issue with 3.10 and 3.11.
Created a new environment in Anaconda Navigator with 3.8.13, ran a Terminal and successfully installed OpenBB with a simple pip install openbb.
| null | CC BY-SA 4.0 | null | 2023-02-05T05:41:32.157 | 2023-02-05T05:41:32.157 | null | null | 20,909,114 | null |
75,351,032 | 2 | null | 75,310,383 | 1 | null | You can do the following workaround using :
1 - inject Renderer2 inside constructor of your component
```
constructor(private _renderer2:Renderer2){}
```
2 - implements `AfterViewInIt` interface
3 - inside ngAfterViewInIt() do the following:
```
ngAfterViewInit(){
let li:HTMLCollectionOf<Element> = document.getElementsByClassName('p-breadcrumb-chevron');
for(let i =0 ;i<li.length;i++){
this._renderer2.removeClass(li[i],'pi-chevron-right')
this._renderer2.addClass(li[i],'pi-circle-fill')
}
}
```
> it's a workaround but it works
| null | CC BY-SA 4.0 | null | 2023-02-05T08:42:15.167 | 2023-02-05T08:42:15.167 | null | null | 19,101,349 | null |
75,351,075 | 2 | null | 75,221,100 | 0 | null | Your screenshot is of hover info for a TypeScript declaration, which shows its documentation comment (which is written in the source code and usually copied to generated type declaration files (for TypeScript), or if the JS isn't generated from TS, just in the JS).
I've never seen a library that provides translations for their code documentation comments.
Much more common on the internet and open source world for web libraries is for English to be used as a lingua franca, which might explain why in my (perhaps limited) experience in web dev, I haven't seen anyone put effort into providing versions of their package files with documentation comments translated to various languages.
So unfortunately, it's not something that [changing your display language setting](https://code.visualstudio.com/docs/getstarted/locales#_changing-the-display-language) can affect.
This probably extends to more than just web libraries. English is fairly well established as the lingua franca of code at least in the open source world. Most of this hover documentation even for other programming lanugages is pulled from documentation comments, which are usually in English, and as already stated, most libraries don't provide header files / documentation sources with translated documentation comments. At least- not that I've observed in my limited experience in the programming world. I'd be happy to be pointed to counterexamples, though!
| null | CC BY-SA 4.0 | null | 2023-02-05T08:52:39.980 | 2023-02-05T08:59:27.803 | 2023-02-05T08:59:27.803 | 11,107,541 | 11,107,541 | null |
75,351,301 | 2 | null | 75,351,183 | 0 | null | You can use word-break: break-word; property to break number string.
```
#canvas{
width: 500px;
/* min-height: 24px; */
height: auto;
overflow: hidden;
margin: 20px auto 0;
display: flex;
justify-content: center;
flex-wrap: wrap;
text-align: center;
background-color: grey;
border: 3px solid rgb(90, 90, 90);
color: white;
word-break: break-word;
}
```
```
<div id="canvas">155555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-05T09:35:34.300 | 2023-02-05T09:35:34.300 | null | null | 6,777,856 | null |
75,351,424 | 2 | null | 67,696,097 | 0 | null | Embedding one split view inside other may work.
Some problems arise if using GeometryReader.
```
HSplitView
{
View1()
HSplitView
{
View2()
View3()
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-05T10:02:49.877 | 2023-02-08T01:40:49.350 | 2023-02-08T01:40:49.350 | 3,025,856 | 21,150,823 | null |
75,351,645 | 2 | null | 75,347,406 | 0 | null | Okay so I thought about the animation in another way. The loading screen is during a network call. I outsourced my network call in an own function. Before that, the network call was was in the init of my Extension View. I now have a bool "isLoading" which calls if the call is loading or not. I wrapped my Stack with the Circles in a If condition with the isLoading Bool and I don't know why, but it worked and I'm happy now.
| null | CC BY-SA 4.0 | null | 2023-02-05T10:41:31.700 | 2023-02-05T10:41:31.700 | null | null | 21,068,319 | null |
75,351,769 | 2 | null | 71,080,518 | 3 | null | Is unnecessary to install the "Desktop development with C++" if you don't want to develop desktop applications for Windows using Flutter.
If you only want to develop mobile apps using Flutter, you can run
`flutter config --no-enable-windows-desktop`
to disable the desktop support for your Flutter projects. After that, when you run the `flutter doctor` command again, you will no longer see the warning.
Read more at: [https://fig.io/manual/flutter/config](https://fig.io/manual/flutter/config)
| null | CC BY-SA 4.0 | null | 2023-02-05T11:04:47.897 | 2023-02-05T11:04:47.897 | null | null | 13,559,747 | null |
75,352,003 | 2 | null | 75,350,818 | 1 | null | You need to reshape your data in Power Query. Append your 4 tables so you have a single fact table. You can also remove MemberName from your fact table as it is already in your dimension table so just retain MemberID in your fact.
| null | CC BY-SA 4.0 | null | 2023-02-05T11:49:56.470 | 2023-02-05T15:09:59.463 | 2023-02-05T15:09:59.463 | 18,345,037 | 18,345,037 | null |
75,352,160 | 2 | null | 26,345,121 | 0 | null | ```
Sys.setlocale("LC_ALL", "English")
```
| null | CC BY-SA 4.0 | null | 2023-02-05T12:17:00.460 | 2023-02-05T12:17:00.460 | null | null | 8,806,649 | null |
75,352,670 | 2 | null | 75,351,112 | 0 | null | Look like the body is not a valid json. Properties `givenName`, `surname`, etc. should be wrapped by quotes.
```
{
"givenName": "Microsoft",
"surname": "Graph",
"emailAddresses": [
{
"address": "[email protected]",
"name": "Microsoft Graph"
}
],
"businessPhones": [
"+334100100"
],
"mobilePhone": "+9857665765"
}
```
| null | CC BY-SA 4.0 | null | 2023-02-05T13:37:52.833 | 2023-02-05T13:37:52.833 | null | null | 2,250,152 | null |
75,352,745 | 2 | null | 75,352,643 | 0 | null | You'd just need to look for the `body`'s `class` when logged in, and if it's `.logged-in`, do something like this:
```
body:not(.logged-in) .sidebar{
display: none;
}
```
| null | CC BY-SA 4.0 | null | 2023-02-05T13:50:01.067 | 2023-02-05T13:56:58.677 | 2023-02-05T13:56:58.677 | 2,817,442 | 2,817,442 | null |
75,353,036 | 2 | null | 75,320,617 | 0 | null | This approach works:
```
waitUntil {
def job = Jenkins.instance.getItemByFullName("Project U")
!job.isBuilding() && !job.isInQueue()
}
```
When this downstream is started, it will check if the upstream job is either active or queued, and if so, will wait until its build has finished.
I haven't been able to find out how to programmatically access the current job's upstream job(s), so the job names need to be copied. (There is a method [getBuildingUpstream()](https://javadoc.jenkins-ci.org/hudson/model/AbstractProject.html#getBuildingUpstream()), which would be much more convenient, but I haven't found a way to obtain the current Project object from the Job instance.)
I finally ended up creating this function in the Jenkins shared library:
```
/*
vars/waitForJobs.groovy
Wait until none of the upstream jobs is building or being queued any more
Parameters:
upstreamProjects String with a comma separated list of Jenkins jobs to check
(use same format as in upstream trigger)
*/
def call( Map params) {
projects = params['upstreamProjects'].split(', *')
echo 'Checking the following upstream projects:'
if ( projects.size() == 0) {
echo 'none'
} else {
projects.each {project ->
echo "${project}"
}
}
waitUntil {
def running = false
projects.each {project ->
def job = Jenkins.instance.getItemByFullName(project)
if (job == null) {
error "Project '${project} not found"
}
if (job.isBuilding()) {
echo "Waiting for ${project} (executing)"
running = true
}
if (job.isInQueue()) {
echo "Waiting for ${project} (queued for execution)"
running = true
}
}
return !running
}
}
```
The nice thing is that I can just copy the parameter from the upstream trigger, because it uses the exact same format. Here's an example of how it looks like:
```
pipeline {
[...]
triggers {
pollSCM('H/5 * * * *')
upstream(upstreamProjects: 'Project U1, Project U2, Project U3', threshold: hudson.model.Result.SUCCESS)
}
[...]
stages {
stage('Wait') {
steps {
script{
// Wait for upstream jobs to finish
waitForJobs(upstreamProjects: 'Project U1, Project U2, Project U3')
}
}
[...]
}
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-05T14:34:32.967 | 2023-02-06T17:23:17.187 | 2023-02-06T17:23:17.187 | 4,850,949 | 4,850,949 | null |
75,353,166 | 2 | null | 75,352,049 | 1 | null | If you want to read the reservations for the current user in your loop, you can do that with:
```
for doc in snapshotDocuments {
let reservationsRef = doc.collection("Reservations")
reservationsRef.getDocuments { (reservationsSnapshot, error) in
...
}
...
}
```
If you want to get all `Reservations` across the entire database in one go, you'll want to have a look at [collection group queries](https://firebase.google.com/docs/firestore/query-data/queries#collection-group-query).
| null | CC BY-SA 4.0 | null | 2023-02-05T14:55:47.010 | 2023-02-05T14:55:47.010 | null | null | 209,103 | null |
75,353,290 | 2 | null | 75,352,612 | 0 | null | It depends on the container environment and limitations based on permissions or if the pod has the required software to run the commands.
As it appears echo is not present in the image which is deployed on pod. Though echo command is part of standard libraries and comes by default you can try installing it again.like in ubuntu use below
```
sudo apt-get update
sudo apt-get install coreutils
```
| null | CC BY-SA 4.0 | null | 2023-02-05T15:14:18.287 | 2023-02-05T15:14:18.287 | null | null | 599,989 | null |
75,353,303 | 2 | null | 62,215,850 | 0 | null | Inside conda environment, for example want removing environment named `py36`
run
```
conda remove py36
```
```
conda clean --all
```
see errors.
[](https://i.stack.imgur.com/F0Yp8.png)
then delete
[](https://i.stack.imgur.com/Gc3dm.png)
then
```
conda clean --all
```
Now it is ok.
[](https://i.stack.imgur.com/gTvoN.png)
Need also command `conda remove` also delete by hand in Windows Explorer.
| null | CC BY-SA 4.0 | null | 2023-02-05T15:16:53.697 | 2023-02-05T15:16:53.697 | null | null | 3,728,901 | null |
75,353,368 | 2 | null | 75,353,247 | 1 | null | The `System.IO.Filesystem.dll` doesn't really contain any code, it just contains links to the actual types. I don't really know why they did that, I presume for some compatibility reasons. The actual implementation of all the classes in there are in the runtime kernel assembly (`System.Private.Corelib.dll`).
Your version of IlSpy doesn't seem to handle this scenario correctly. Maybe there's a newer version. DotPeek shows this correctly:
[](https://i.stack.imgur.com/VmVzn.png)
| null | CC BY-SA 4.0 | null | 2023-02-05T15:28:42.173 | 2023-02-05T15:28:42.173 | null | null | 2,905,768 | null |
75,353,379 | 2 | null | 75,352,876 | 0 | null | No offense but your code is a mess.
And there is a big misunderstanding. Core Data records are unordered, there is no index. To update a record you have to fetch it by a known attribute, in your example by , update it and save it back.
This is a simple method to do that. It searches for a record with the given `name`. If there is one, update the attribute with `newName` and save the record.
The code assumes that there is a `NSManagedObject` subclass `UserInfo` with implemented class method `fetchRequest`.
```
func changeName(_ name: String, to newName: String) {
let context = (UIApplication.shared.delegate as! AppDelegate).persistentContainer.viewContext
let request : NSFetchRequest<UserInfo> = UserInfo.fetchRequest()
request.predicate = NSPredicate(format: "name == %@", name)
do {
let records = try context.fetch(request)
guard let foundRecord = records.first else { return }
foundRecord.name = newName
try context.save()
} catch {
print(error)
}
}
```
Regarding your confusing code:
Create `CoreDataHandler` as singleton (and it be a subclass of `NSManagedObject`). Move the Core Data related code from AppDelegate and the methods to read and write in this class.
| null | CC BY-SA 4.0 | null | 2023-02-05T15:30:21.510 | 2023-02-05T15:36:47.663 | 2023-02-05T15:36:47.663 | 5,044,042 | 5,044,042 | null |
75,354,002 | 2 | null | 75,353,967 | 1 | null | > Class referenced in the manifest, se.linerotech.myapplication.RepositoryActivity, was not found in the project or the libraries
That is because you do not have a class with that fully-qualified class name.
Your class is `se.linerotech.myapplication.activity.RepositoryActivity`, because it resides in the `se.linerotech.myapplication.activity` package. Use `se.linerotech.myapplication.activity.RepositoryActivity` instead of `.RepositoryActivity` in your manifest.
| null | CC BY-SA 4.0 | null | 2023-02-05T17:03:11.320 | 2023-02-05T17:03:11.320 | null | null | 115,145 | null |
75,354,054 | 2 | null | 5,089,030 | 0 | null | These radial trees can be created using .
Ordinarily, the locations of the nodes are not important in a network. That's why we can drag the nodes around in any visualization using `D3.js`. Nonetheless, the locations of the nodes are important for visualization.
We need to allocate positions to the nodes while plotting a network in `NetworkX`.
This is usually achieved by passing the `pos` attribute while calling the method [nx.draw_networkx()](https://networkx.org/documentation/stable/reference/generated/networkx.drawing.nx_pylab.draw_networkx.html). The `pos` attribute (positions of the nodes) can be determined by using any of the layouts specified in [nx.drawing.layout()](https://networkx.org/documentation/stable/reference/drawing.html#module-networkx.drawing.layout).
Radial trees can be created by using [nx.nx_agraph.graphviz_layout()](https://networkx.org/documentation/stable/reference/generated/networkx.drawing.nx_agraph.graphviz_layout.html) by using Graphviz. Instead of `prog='dot'`, you have to use `prog='twopi'` for [radial layout](https://graphviz.org/docs/layouts/twopi/).
The executable codeblock is here:
```
import networkx as nx
import matplotlib.pyplot as plt
plt.figure(figsize=(12,12))
pos = nx.nx_agraph.graphviz_layout(G, prog='twopi', root='0') ##Needs graphviz
nx.draw_networkx(G, pos=pos,
with_labels=False, node_size=0.5,
edge_color='lightgray',
node_color='gray')
plt.show()
```
: You need to have the `graphviz` library installed in your environment. Else, the `graphviz_layout()` method won't work. `G` must be a tree. You need to specify the root node while calling the `graphviz_layout()` method.
Sample result:
[](https://i.stack.imgur.com/8r7MM.png)
| null | CC BY-SA 4.0 | null | 2023-02-05T17:10:57.170 | 2023-02-05T18:04:40.197 | 2023-02-05T18:04:40.197 | 10,468,354 | 10,468,354 | null |
75,354,063 | 2 | null | 75,353,091 | 0 | null | from : [The E-utilities In-Depth: Parameters, Syntax and More](https://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch)
> retmax
> Total number of UIDs from the retrieved set to be shown in the XML output (default=20). By default, ESearch only includes the first 20 UIDs retrieved in the XML output. If usehistory is set to 'y', the remainder of the retrieved set will be stored on the History server; otherwise these UIDs are lost. Increasing retmax allows more of the retrieved UIDs to be included in the XML output, up to a maximum of 10,000 records.
> To retrieve more than 10,000 UIDs from databases other than PubMed, submit multiple esearch requests while incrementing the value of retstart (see Application 3). For PubMed, ESearch can only retrieve the first 10,000 records matching the query. To obtain more than 10,000 PubMed records, consider using that contains additional logic to batch PubMed search results
Unfortunately my code devised on the above mentioned info, doesnt work:
```
from Bio import Entrez, __version__
print('Biopython version : ', __version__)
def article_machine(t):
all_res = []
Entrez.email = 'email'
handle = Entrez.esearch(db='pubmed',
sort='relevance',
rettype='count',
term=t)
number = int(Entrez.read(handle)['Count'])
print(number)
retstart = 0
while retstart < number:
retstart += 1000
print('\n retstart now : ' , retstart ,' out of : ', number)
Entrez.email = 'email'
handle = Entrez.esearch(db='pubmed',
sort='relevance',
rettype='xml',
retstart = retstart,
retmax = str(retstart),
term=t)
all_res.extend(list(Entrez.read(handle)["IdList"]))
return all_res
print(article_machine('T cell'))
```
changing `while retstart < number:` with `while retstart < 5000:`
the code works, but as soon as exceeds 9998, that is using
the former while loop needed to access all the results, I get the following error:
```
RuntimeError: Search Backend failed: Exception:
'retstart' cannot be larger than 9998. For PubMed,
ESearch can only retrieve the first 9,999 records
matching the query.
To obtain more than 9,999 PubMed records, consider
using EDirect that contains additional logic
to batch PubMed search results automatically
so that an arbitrary number can be retrieved.
For details see https://www.ncbi.nlm.nih.gov/books/NBK25499/
```
See [https://www.ncbi.nlm.nih.gov/books/NBK25499/](https://www.ncbi.nlm.nih.gov/books/NBK25499/) that actually should be [https://www.ncbi.nlm.nih.gov/books/NBK179288/?report=reader](https://www.ncbi.nlm.nih.gov/books/NBK179288/?report=reader)
Try to have a look at NCBI APIs to see if there is something could work out your problem usinng a Python interface, I am not an expert on this , sorry : [https://www.ncbi.nlm.nih.gov/pmc/tools/developers/](https://www.ncbi.nlm.nih.gov/pmc/tools/developers/)
| null | CC BY-SA 4.0 | null | 2023-02-05T17:13:31.087 | 2023-02-05T23:28:34.047 | 2023-02-05T23:28:34.047 | 9,877,065 | 9,877,065 | null |
75,354,085 | 2 | null | 75,353,967 | 1 | null | Just to be clear, you have different errors in those screenshots.
The one in the manifest is saying it can't find the `Activity` class with that name, for the reason outlined in [CommonsWare's answer](https://stackoverflow.com/a/75354002/13598222) - it's looking for `se.linerotech.myapplication.RepositoryActivity`, and that's not where your class is. It's in red because it's an unrecognised name/not found.
The other error is in the output window - it's saying you have an `Activity` class at `se.linerotech.myapplication.acitvity.RepositoryActivity` which hasn't been added to the manifest. This is true (you tried adding it, but didn't do it right) and every `Activity` needs to be included in the manifest, which is why it's complaining.
The two errors stem from the same issue, I just wanted to make it clear what each one means, since if you just looked at the error log you might think you've used the correct fully-qualified name for the class (it's right there in the output!). But it's two different sides complaining about the same thing for different reasons.
| null | CC BY-SA 4.0 | null | 2023-02-05T17:16:22.663 | 2023-02-05T17:16:22.663 | null | null | 13,598,222 | null |
75,354,093 | 2 | null | 75,350,840 | 5 | null | I had the same issue, running on m1 mac (Ventura 13.2). If you aren't already, make sure you are utilising a python virtual environment:
```
# Create a python virtual environment
$ python -m venv venv
# Activate your python virtual environment
$ source venv/bin/activate
```
Form your VSCode Command Palette (Shift+Command+P), search and then choose
> Jupyter: Select Interpreter to Start Jupyter Server
You should then select the python version that is associated to your virtual environment (venv).
| null | CC BY-SA 4.0 | null | 2023-02-05T17:17:42.990 | 2023-02-05T17:17:42.990 | null | null | 4,261,307 | null |
75,354,274 | 2 | null | 75,348,156 | 1 | null | It is relatively simple to scale the text based on a comparison between its window extent and the window extent of the rectangle:
```
def rescale_text(rect, text):
r = rect.get_window_extent()
t = text.get_window_extent()
scale = min(r.height / t.height, r.width / t.width)
text.set_size(text.get_size() * scale)
```
[](https://i.stack.imgur.com/NB3gw.png)
However, it looks like the window extent height is computed based on the font, not the actual string. As a result, it properly handles descenders, but it continues to even when they're not present in the string, and it doesn't account for strings with all "short" characters, e.g.:
[](https://i.stack.imgur.com/umS6P.png)
While this is probably passable for my application, if there were a way of getting the text extent tightened to what is actually being drawn, that would be ideal.
| null | CC BY-SA 4.0 | null | 2023-02-05T17:46:17.800 | 2023-02-05T17:46:17.800 | null | null | 1,533,576 | null |
75,354,281 | 2 | null | 75,353,867 | 0 | null | 1- you don't need to use `event.target` because you only use arrow function.
2- the `interval` variable should be local to avoid conflicts in your multiples `setInterval`
3- your code remove all links -> ex `<li><a href="#" >// ABOUT </a><li>` by `<li>// ABOUT <li>`....
so, here it is... ( with some improvemnts )
```
const letters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
document.querySelectorAll('li').forEach( li_Elm =>
{
let interval = null
, li_aLink = li_Elm.querySelector('a')
, textInit = li_aLink.textContent
, length = textInit.length
;
li_Elm.onmouseover =_=>
{
let iteration = 0;
clearInterval(interval);
interval = setInterval(() =>
{
li_aLink.textContent = Array
.from( ({length}), (letter,index) =>
( index < iteration)
? textInit[index]
: letters[Math.floor(Math.random() * 26)]
).join('');
if (iteration >= length)
clearInterval(interval);
iteration += 1 / 3;
}
, 30);
};
});
```
```
<ul>
<li><a href="#" >// ABOUT </a></li>
<li><a href='#' >// PROJECTS </a></li>
<li><a href="#" >// CONTACT </a></li>
</ul>
```
| null | CC BY-SA 4.0 | null | 2023-02-05T17:47:26.167 | 2023-02-05T17:52:50.600 | 2023-02-05T17:52:50.600 | 10,669,010 | 10,669,010 | null |
75,354,323 | 2 | null | 75,341,912 | 3 | null | This question has been asked and answered previously.
Path traversal can be done using a DATA Step hash object.
Example:
```
data have;
length vertex1 vertex2 $8;
input vertex1 vertex2;
datalines;
A B
X B
D B
E B
B C
Q C
C Z
Z X
;
data want(keep=vertex1 vertex2 crumb);
length vertex1 vertex2 $8 crumb $1;
declare hash edges ();
edges.defineKey('vertex1');
edges.defineData('vertex2', 'crumb');
edges.defineDone();
crumb = ' ';
do while (not last_edge);
set have end=last_edge;
edges.add();
end;
trailhead = 'A';
vertex1 = trailhead;
do while (0 = edges.find());
if not missing(crumb) then leave;
output;
edges.replace(key:vertex1, data:vertex2, data:'*');
vertex1 = vertex2;
end;
if not missing(crumb) then output;
stop;
run;
```
All paths in the data can be discovered with an additional outer loop iterating (HITER) over a hash of the vertex1 values.
[](https://i.stack.imgur.com/4U8hY.png)
| null | CC BY-SA 4.0 | null | 2023-02-05T17:54:09.197 | 2023-02-05T17:54:09.197 | null | null | 1,249,962 | null |
75,354,510 | 2 | null | 75,354,460 | 1 | null | You want to get the date of the first login of each user.
As a starter: the first solution that comes to mind here is aggregation:
```
select player_id, min(event_date) first_login
from activity
group by player_id
order by player_id
```
If you really need to do this with a self-join, I would recommend an anti-`left join`:
```
select a1.player_id, a1.event_date first_login
from activity a1
left join activity a2 on a2.player_id = a1.player_id and a2.event_date < a1.event_date
where a2.player_id is null
order by a1.player_id
```
The logic of the query is to ensure that there is no other row for the same user with an earliest event date ; the `left join` looks up such rows, then the `where` clause filters them out.
| null | CC BY-SA 4.0 | null | 2023-02-05T18:20:44.180 | 2023-02-05T18:30:20.390 | 2023-02-05T18:30:20.390 | 10,676,716 | 10,676,716 | null |
75,354,909 | 2 | null | 75,354,713 | 0 | null | The easiest way would be to wrap your `Scaffold` in a `Stack`
```
return Stack(
children: [
Scaffold(
appBar: AppBar(
...
),
body: ...
),
if (showAd)
//Your ad here
Container(
height: kToolbarHeight,
width: MediaQuery.of(context).size.width,
child : ...
),
],
);
```
Here is a [working gist you can try](https://dartpad.dev/?id=7c2cd6175e9d7d1dcb1a1aa5d627de4e)
| null | CC BY-SA 4.0 | null | 2023-02-05T19:23:05.920 | 2023-02-05T19:23:05.920 | null | null | 2,320,127 | null |
75,354,930 | 2 | null | 74,481,993 | 0 | null | I don't know about changing the colors but the options to toggle them on/off are under the section in extension settings.
| null | CC BY-SA 4.0 | null | 2023-02-05T19:26:28.727 | 2023-02-05T19:26:28.727 | null | null | 15,393,940 | null |
75,355,393 | 2 | null | 75,353,292 | 0 | null | If you are running MySQL >= 8.0.14, you can move your correlated sub-queries to [lateral derived tables](https://dev.mysql.com/doc/refman/8.0/en/lateral-derived-tables.html) -
```
SELECT f.numero, f.fecha, CONCAT(c.nombre, ' ', c.apellido) AS Cliente,
fp.Productos, fp.Total_Productos,
fs.Servicios, fs.Total_Servicios,
IFNULL(fs.Total_Servicios, 0) + IFNULL(fp.Total_Productos, 0) AS Total
FROM facturas f
INNER JOIN clientes c ON c.ID = f.clientes_ID
LEFT JOIN LATERAL (
SELECT
GROUP_CONCAT('x', fp2.cantidad, ' ', nombre SEPARATOR ', ') AS Productos,
SUM(fp2.cantidad * productos.precio_venta) AS Total_Productos
FROM facturas_productos fp2
INNER JOIN productos ON productos.codigo = fp2.productos_codigo
WHERE fp2.facturas_numero = f.numero
) fp ON 1 = 1
LEFT JOIN LATERAL (
SELECT
GROUP_CONCAT('x', fs2.cantidad, ' ', nombre SEPARATOR ', ') AS Servicios,
SUM(fs2.cantidad * servicios.precio) AS Total_Servicios
FROM facturas_servicios fs2
INNER JOIN servicios ON servicios.codigo = fs2.servicios_codigo
WHERE fs2.facturas_numero = f.numero
) fs ON 1 = 1
WHERE f.fecha BETWEEN '2023-01-01' AND '2023-02-04'
ORDER BY f.numero ASC;
```
I have changed the joins to `LEFT JOIN LATERAL` as I assume it is possible for an invoice to contain products but not services, and vice versa.
An alternative approach, which does not require MySQL >= 8.0.14, is to aggregate all the products and services in their derived tables, instead of doing the lateral join -
```
SELECT f.numero, f.fecha, CONCAT(c.nombre, ' ', c.apellido) AS Cliente,
fp.Productos, fp.Total_Productos,
fs.Servicios, fs.Total_Servicios,
IFNULL(fs.Total_Servicios, 0) + IFNULL(fp.Total_Productos, 0) AS Total
FROM facturas f
INNER JOIN clientes c ON c.ID = f.clientes_ID
LEFT JOIN (
SELECT
fp.facturas_numero,
GROUP_CONCAT('x', fp.cantidad, ' ', nombre SEPARATOR ', ') AS Productos,
SUM(fp.cantidad * productos.precio_venta) AS Total_Productos
FROM facturas_productos fp
INNER JOIN productos ON productos.codigo = fp.productos_codigo
GROUP BY fp.facturas_numero
) fp ON f.numero = fp.facturas_numero
LEFT JOIN (
SELECT
fs.facturas_numero,
GROUP_CONCAT('x', fs.cantidad, ' ', nombre SEPARATOR ', ') AS Servicios,
SUM(fs.cantidad * servicios.precio) AS Total_Servicios
FROM facturas_servicios fs
INNER JOIN servicios ON servicios.codigo = fs.servicios_codigo
GROUP BY fs.facturas_numero
) fs ON f.numero = fs.facturas_numero
WHERE f.fecha BETWEEN '2023-01-01' AND '2023-02-04'
ORDER BY f.numero ASC;
```
This may be a little bit faster when retrieving all invoices but will probably be slower when retrieving a small subset of a large number of invoices.
And here's a [db<>fiddle](https://dbfiddle.uk/6AFIhN-U)
| null | CC BY-SA 4.0 | null | 2023-02-05T20:46:47.510 | 2023-02-06T23:32:34.060 | 2023-02-06T23:32:34.060 | 1,191,247 | 1,191,247 | null |
75,355,722 | 2 | null | 29,166,260 | 0 | null | You can wrap the button in a button and then use the position as relative of the wrapper and then add a :before, you can add a border to the :before and make the width and height 0.
It's hard to explain, it's better if you check this blog: [https://developerwings.com/button-with-a-sideways-triangle-using-css-html/](https://developerwings.com/button-with-a-sideways-triangle-using-css-html/)
| null | CC BY-SA 4.0 | null | 2023-02-05T21:42:55.930 | 2023-02-05T21:42:55.930 | null | null | 14,831,439 | null |
75,355,752 | 2 | null | 68,572,799 | 0 | null | When executing this code I got the same result. Zigzag didn't want to wave, so I changed this code a bit and now it is waving.
```
import time, sys
indent = 0 # How many spaces to indent.
def print_symbol(symbol):
print(' ' * indent, end='')
print(symbol)
time.sleep(0.1) # Pause for 1/10 of a second
try:
#The main program loop
while True:
print_symbol('********')
#Increase the number of spaces:
indent = indent + 1
if indent == 20:
#Reduction the number of spaces:
for i in range(0, indent):
indent = indent - 1
print_symbol('********')
except KeyboardInterrupt:
sys.exit()
```
| null | CC BY-SA 4.0 | null | 2023-02-05T21:48:54.510 | 2023-02-05T21:54:07.540 | 2023-02-05T21:54:07.540 | 19,310,025 | 19,310,025 | null |
75,355,772 | 2 | null | 74,889,197 | 0 | null | It's a perfectly legal transformation. If `i8` is not a legal type for your target, then legalizer promotes `i8` to `i32`. The `-32` constant is legalized to 224, as upper bits clearly should not matter (and influence the result).
So, if this is a problem, then I'd suppose that there is some problem elsewhere.
| null | CC BY-SA 4.0 | null | 2023-02-05T21:51:21.153 | 2023-02-05T21:51:21.153 | null | null | 164,925 | null |
75,355,891 | 2 | null | 59,433,286 | 0 | null | I had one repo formatting on save and another not, in two different VSCode windows. The broken repo was using this filename:
```
// incorrect
.prettierrc.json
```
The functioning repo was using this filename:
```
// correct
.prettierrc
```
Dropping the `.json` extension corrected the problem.
| null | CC BY-SA 4.0 | null | 2023-02-05T22:16:02.627 | 2023-02-05T22:16:02.627 | null | null | 650,894 | null |
75,356,222 | 2 | null | 75,335,804 | 0 | null | Here is one way to do that in Python/OpenCV.
- - - - - - - - - -
Input:
[](https://i.stack.imgur.com/Ut2z7.png)
```
import cv2
import numpy as np
# read the input
img = cv2.imread('fish.png')
h, w = img.shape[:2]
# create black image like input
black = np.zeros_like(img)
# define original point
points = np.array([[954,88],[905,97],[855,107],[805,114],[755,125],[705,134],[655,139],[605,141],[555,139],[505,134],[455,139],[405,146],[355,146],[305,144],[255,145],[205,125],[155,120],[105,114],[55,104],[1,156]])
# draw points on input
img_pts = img.copy()
cv2.polylines(img_pts, [points], False, (0,0,255), 2)
# augment original polygon array for top region
points1 = np.array([[0,0],[w-1,0],[w-1,88],[954,88],[905,97],[855,107],[805,114],[755,125],[705,134],[655,139],[605,141],[555,139],[505,134],[455,139],[405,146],[355,146],[305,144],[255,145],[205,125],[155,120],[105,114],[55,104],[1,156],[0,156]])
# draw white filled closed polygon on black background
mask1 = black.copy()
cv2.fillPoly(mask1, [points1], (255,255,255))
# Use mask to select top part of image
result1 = np.where(mask1==255, img, black)
# augment polygon array for bottom region
points2 = np.array([[0,h-1],[w-1,h-1],[w-1,88],[954,88],[905,97],[855,107],[805,114],[755,125],[705,134],[655,139],[605,141],[555,139],[505,134],[455,139],[405,146],[355,146],[305,144],[255,145],[205,125],[155,120],[105,114],[55,104],[1,156],[0,156]])
# draw white filled closed polygon on black background
mask2 = black.copy()
cv2.fillPoly(mask2, [points2], (255,255,255))
# Use mask to select part of image
result2 = np.where(mask2==255, img, black)
# save results
cv2.imwrite('fish_with_points.jpg', img_pts)
cv2.imwrite('fish_top_mask.jpg', mask1)
cv2.imwrite('fish_top_masked.jpg', result1)
cv2.imwrite('fish_bottom_mask.jpg', mask2)
cv2.imwrite('fish_bottom_masked.jpg', result2)
# show results
cv2.imshow('img_points',img_pts)
cv2.imshow('mask1',mask1)
cv2.imshow('result1',result1)
cv2.imshow('mask2',mask2)
cv2.imshow('result2',result2)
cv2.waitKey(0)
```
Original Point Polyline on Input:
[](https://i.stack.imgur.com/p9dap.jpg)
Mask1:
[](https://i.stack.imgur.com/0bpqh.jpg)
Result1:
[](https://i.stack.imgur.com/UaWaV.jpg)
Mask2:
[](https://i.stack.imgur.com/SPkOy.jpg)
Result2:
[](https://i.stack.imgur.com/tRjlR.jpg)
| null | CC BY-SA 4.0 | null | 2023-02-05T23:27:06.570 | 2023-02-05T23:27:06.570 | null | null | 7,355,741 | null |
75,356,287 | 2 | null | 75,356,056 | 0 | null | Let's try to show a concrete example of the problem with some simulated data:
```
set.seed(1)
df <- data.frame(y = c(rexp(99), 150), x = rep(c("A", "B"), each = 50))
```
Here, group "B" has a single outlier at 150, even though most values are a couple of orders of magnitude lower. That means that if we try to draw a boxplot, the boxes get squished at the bottom of the plot:
```
boxplot(y ~ x, data = df, col = "lightblue")
```

If we remove outliers, the boxes plot nicely:
```
boxplot(y ~ x, data = df, col = "lightblue", outline = FALSE)
```
[](https://i.stack.imgur.com/5VRs8.png)
The problem comes when we want to add a point indicating the mean value for each boxplot, since the mean of "B" lies outside the plot limits. Let's calculate and plot the means:
```
mean_vals <- sapply(split(df$y, df$x), mean)
mean_vals
#> A B
#> 0.9840417 4.0703334
boxplot(y ~ x, data = df, col = "lightblue", outline = FALSE)
points(1:2, mean_vals, cex = 2, pch = 16, col = "red")
```

The mean for "B" is missing because it lies above the upper range of the plot.
The secret here is to use `boxplot.stats` to get the limits of the whiskers. By concatenating our vector of means to this vector of stats and getting its `range`, we can set our plot limits exactly where they need to be:
```
y_limits <- range(c(boxplot.stats(df$y)$stats, mean_vals))
```
Now we apply these limits to a new boxplot and draw it with the points:
```
boxplot(y ~ x, data = df, outline = FALSE, ylim = y_limits, col = "lightblue")
points(1:2, mean_vals, cex = 2, pch = 16, col = "red")
```

For comparison, you could do the whole thing in ggplot like this:
```
library(ggplot2)
ggplot(df, aes(x, y)) +
geom_boxplot(fill = "lightblue", outlier.shape = NA) +
geom_point(size = 3, color = "red", stat = "summary", fun = mean) +
coord_cartesian(ylim = range(c(range(c(boxplot.stats(df$y)$stats,
mean_vals))))) +
theme_classic(base_size = 16)
```
[](https://i.stack.imgur.com/zP6si.png)
[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2023-02-05T23:42:35.603 | 2023-02-05T23:49:53.100 | 2023-02-05T23:49:53.100 | 12,500,315 | 12,500,315 | null |
75,356,335 | 2 | null | 75,348,983 | 0 | null | To identify the element with text as you can use the following line of code:
```
option_all <- remDr$findElement(using = "css selector", "div.Select-control span.Select-value-label[id^='react-select'] div")
```
| null | CC BY-SA 4.0 | null | 2023-02-05T23:54:49.347 | 2023-02-05T23:54:49.347 | null | null | 7,429,447 | null |
75,356,360 | 2 | null | 75,354,784 | 0 | null | I modified the code:
```
lCurrentSlide = SlideShowWindows(1).View.Slide.SlideNumber
```
to read:
```
On Error Resume Next
Set currentSlide = Application.ActiveWindow.View.Slide
Set currentSlide = ActivePresentation.SlideShowWindow.View.Slide
lCurrentSlide = currentSlide.slideIndex
on Error GoTo 0
```
And now the procedure executes as expected whether I'm in design mode or slideshow mode.
I studied all the articles posted in the comments as well as some insights from pages found from searches on variations of my original question.
Hopefully soon I will understand more about how to work with slides in vba. I'm pretty good with Excel vba - and I know vba is vba but it's not, really.
| null | CC BY-SA 4.0 | null | 2023-02-06T00:02:53.670 | 2023-02-09T01:23:22.253 | 2023-02-09T01:23:22.253 | 18,247,317 | 21,153,081 | null |
75,356,552 | 2 | null | 75,356,488 | 1 | null |
1. Your problem is the same as discussed in this thread: Visual Studio Code "Error while fetching extensions. XHR failed"
2. Unfortunately, there are several DIFFERENT possible root causes, and several different workarounds and solutions discussed in the thread.
3. You said you "tried several things". Please Update your post and specify exactly WHAT you tried, and the results.
4. You said it "works" on certain networks, but fails on your (home? school? other?) network (whether or not the network is "wifi" or not probably doesn't matter). Please clarify exactly "what's different" between the networks (to the best of your knowledge).
5. Please specify the platform you're running VSCode on (windows? MacOS? Linux? Other?)
6. Try this (one of the responses in the SO thread I cited above):
> [https://stackoverflow.com/a/71456820/421195](https://stackoverflow.com/a/71456820/421195)
1. press f1
2. search "user setting"
3. click enter
4. search on user setting "proxy"
5. click enter
6. look for "use the proxy support for extensions."
7. change "override" to on
---
Q1: You're running the same version of VS Code, on Windows, using the same project, at home and at school, correct?
<= Q: Are you using the same PC (e.g. carrying a laptop from home to school), or are you using different PCs at home and at school?
Q2. By "Mobile data" (vs. "wifi"); you mean you "hotspot" for your cell phone service, correct?
Q3. The project ALWAYS works for Wifi (either at home or school), but NEVER works for your Hotspot, correct?
Q4. You're always trying to run the Remote Explorer extension in VS code when the error occurs (it never happens with other VSCode activities), correct?
<= Q: Any problems in other areas of VSCode (e.g. your compiler)?
Q5. The exact error message is `The editor could not be opened due to an unexpected error: XHR failed`, correct?
<= Q: Always using Remote Explorer, correct? What exactly are you doing in Remote Explorer?
[https://code.visualstudio.com/docs/remote/ssh](https://code.visualstudio.com/docs/remote/ssh)
| null | CC BY-SA 4.0 | null | 2023-02-06T00:58:05.410 | 2023-02-06T19:39:39.630 | 2023-02-06T19:39:39.630 | 421,195 | 421,195 | null |
75,356,797 | 2 | null | 75,343,459 | 0 | null | Current web standards would likely dictate [OIDC](https://openid.net/specs/openid-connect-basic-1_0.html), especially if you want your service to be open to direct consumers as opposed to, or in addition to enterprise users. Were I building something today, I would choose to build out only OIDC, because it doesn't limit the Identity Providers I may want to use. In addition to enterprise, you could consider social logins as well, such as Facebook, Google, etc. If your users are enterprise users, then yes, you could consider SAML.
The identity data is usually returned to you in a JSON Web Token, or JWT.
I would suggest looking at OIDC implementations on your favorite stack, or look to a cloud provider.
| null | CC BY-SA 4.0 | null | 2023-02-06T02:12:13.417 | 2023-02-06T02:12:13.417 | null | null | 2,946,563 | null |
75,356,844 | 2 | null | 75,343,075 | 0 | null | The bindable properties from XAML haven't been set yet the constructor is called. So you get the default value which is set to be null. A similar issue on Github i have attached below. You could have a look.
As a workaround, define PropertyChanged event handler to [Detect property changes](https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/bindable-properties?view=net-maui-7.0#detect-property-changes).
```
public static readonly BindableProperty CurrentRequestProperty =
BindableProperty.Create(
propertyName: nameof(CurrentRequest),
...
propertyChanged: OnIsPropertyChanged);
static void OnIsPropertyChanged (BindableObject bindable, object oldValue, object newValue)
{
// Property changed implementation goes here
// could add the logic here
}
```
For more info, you could refer to
[Xamarin Forms Custom Control and Bindable properties not working as expected](https://stackoverflow.com/questions/43838351/xamarin-forms-custom-control-and-bindable-properties-not-working-as-expected) and [Bindable properties](https://learn.microsoft.com/en-us/dotnet/maui/fundamentals/bindable-properties?view=net-maui-7.0).
Hope it works for you.
| null | CC BY-SA 4.0 | null | 2023-02-06T02:26:20.617 | 2023-02-06T02:26:20.617 | null | null | 20,118,901 | null |
75,357,136 | 2 | null | 75,356,694 | 2 | null | The `strtok` source you have is rudimentary--it only processes a single char at a time.
The source is as evidenced by the K&R prototypes instead of ANSI (which were available the copyright on the file).
The `strtok` implementation depends on the quality/speed of the `libc` implementation that is used.
Modern `libc` implementations use special tricks to process more than a single char at a time.
The `glibc` version [which is what linux uses] is tuned/tweaked for speed. Below are some of the source code , taken from the glibc git repository: [https://www.gnu.org/software/libc/sources.html](https://www.gnu.org/software/libc/sources.html)
Note that `glibc` also has arch-specific versions that are coded using SIMD/assembler that can be found in the source packages for the particular linux distro you are using. I've included one example at the bottom.
---
FILE: strtok.c
```
char *
__strtok_r (char *s, const char *delim, char **save_ptr)
{
char *end;
if (s == NULL)
s = *save_ptr;
if (*s == '\0')
{
*save_ptr = s;
return NULL;
}
/* Scan leading delimiters. */
s += strspn (s, delim);
if (*s == '\0')
{
*save_ptr = s;
return NULL;
}
/* Find the end of the token. */
end = s + strcspn (s, delim);
if (*end == '\0')
{
*save_ptr = end;
return s;
}
/* Terminate the token and make *SAVE_PTR point past it. */
*end = '\0';
*save_ptr = end + 1;
return s;
}
```
---
FILE: strcspn.c
```
/* Return the length of the maximum initial segment of S
which contains no characters from REJECT. */
size_t
strcspn (const char *str, const char *reject)
{
if (__glibc_unlikely (reject[0] == '\0')
|| __glibc_unlikely (reject[1] == '\0'))
return __strchrnul (str, reject [0]) - str;
/* Use multiple small memsets to enable inlining on most targets. */
unsigned char table[256];
unsigned char *p = memset (table, 0, 64);
memset (p + 64, 0, 64);
memset (p + 128, 0, 64);
memset (p + 192, 0, 64);
unsigned char *s = (unsigned char*) reject;
unsigned char tmp;
do
p[tmp = *s++] = 1;
while (tmp);
s = (unsigned char*) str;
if (p[s[0]]) return 0;
if (p[s[1]]) return 1;
if (p[s[2]]) return 2;
if (p[s[3]]) return 3;
s = (unsigned char *) PTR_ALIGN_DOWN (s, 4);
unsigned int c0, c1, c2, c3;
do
{
s += 4;
c0 = p[s[0]];
c1 = p[s[1]];
c2 = p[s[2]];
c3 = p[s[3]];
}
while ((c0 | c1 | c2 | c3) == 0);
size_t count = s - (unsigned char *) str;
return (c0 | c1) != 0 ? count - c0 + 1 : count - c2 + 3;
}
```
---
FILE: strspn.c
```
/* Return the length of the maximum initial segment
of S which contains only characters in ACCEPT. */
size_t
strspn (const char *str, const char *accept)
{
if (accept[0] == '\0')
return 0;
if (__glibc_unlikely (accept[1] == '\0'))
{
const char *a = str;
for (; *str == *accept; str++);
return str - a;
}
/* Use multiple small memsets to enable inlining on most targets. */
unsigned char table[256];
unsigned char *p = memset (table, 0, 64);
memset (p + 64, 0, 64);
memset (p + 128, 0, 64);
memset (p + 192, 0, 64);
unsigned char *s = (unsigned char*) accept;
/* Different from strcspn it does not add the NULL on the table
so can avoid check if str[i] is NULL, since table['\0'] will
be 0 and thus stopping the loop check. */
do
p[*s++] = 1;
while (*s);
s = (unsigned char*) str;
if (!p[s[0]]) return 0;
if (!p[s[1]]) return 1;
if (!p[s[2]]) return 2;
if (!p[s[3]]) return 3;
s = (unsigned char *) PTR_ALIGN_DOWN (s, 4);
unsigned int c0, c1, c2, c3;
do {
s += 4;
c0 = p[s[0]];
c1 = p[s[1]];
c2 = p[s[2]];
c3 = p[s[3]];
} while ((c0 & c1 & c2 & c3) != 0);
size_t count = s - (unsigned char *) str;
return (c0 & c1) == 0 ? count + c0 : count + c2 + 2;
}
```
---
FILE: strchrnul.c
```
/* Find the first occurrence of C in S or the final NUL byte. */
char *
STRCHRNUL (const char *s, int c_in)
{
const unsigned char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
unsigned char c;
c = (unsigned char) c_in;
/* Handle the first few characters by reading one character at a time.
Do this until CHAR_PTR is aligned on a longword boundary. */
for (char_ptr = (const unsigned char *) s;
((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0;
++char_ptr)
if (*char_ptr == c || *char_ptr == '\0')
return (void *) char_ptr;
/* All these elucidatory comments refer to 4-byte longwords,
but the theory applies equally well to 8-byte longwords. */
longword_ptr = (unsigned long int *) char_ptr;
/* Bits 31, 24, 16, and 8 of this number are zero. Call these bits
the "holes." Note that there is a hole just to the left of
each byte, with an extra at the end:
bits: 01111110 11111110 11111110 11111111
bytes: AAAAAAAA BBBBBBBB CCCCCCCC DDDDDDDD
The 1-bits make sure that carries propagate to the next 0-bit.
The 0-bits provide holes for carries to fall into. */
magic_bits = -1;
magic_bits = magic_bits / 0xff * 0xfe << 1 >> 1 | 1;
/* Set up a longword, each of whose bytes is C. */
charmask = c | (c << 8);
charmask |= charmask << 16;
if (sizeof (longword) > 4)
/* Do the shift in two steps to avoid a warning if long has 32 bits. */
charmask |= (charmask << 16) << 16;
if (sizeof (longword) > 8)
abort ();
/* Instead of the traditional loop which tests each character,
we will test a longword at a time. The tricky part is testing
if *any of the four* bytes in the longword in question are zero. */
for (;;)
{
/* We tentatively exit the loop if adding MAGIC_BITS to
LONGWORD fails to change any of the hole bits of LONGWORD.
1) Is this safe? Will it catch all the zero bytes?
Suppose there is a byte with all zeros. Any carry bits
propagating from its left will fall into the hole at its
least significant bit and stop. Since there will be no
carry from its most significant bit, the LSB of the
byte to the left will be unchanged, and the zero will be
detected.
2) Is this worthwhile? Will it ignore everything except
zero bytes? Suppose every byte of LONGWORD has a bit set
somewhere. There will be a carry into bit 8. If bit 8
is set, this will carry into bit 16. If bit 8 is clear,
one of bits 9-15 must be set, so there will be a carry
into bit 16. Similarly, there will be a carry into bit
24. If one of bits 24-30 is set, there will be a carry
into bit 31, so all of the hole bits will be changed.
The one misfire occurs when bits 24-30 are clear and bit
31 is set; in this case, the hole at bit 31 is not
changed. If we had access to the processor carry flag,
we could close this loophole by putting the fourth hole
at bit 32!
So it ignores everything except 128's, when they're aligned
properly.
3) But wait! Aren't we looking for C as well as zero?
Good point. So what we do is XOR LONGWORD with a longword,
each of whose bytes is C. This turns each byte that is C
into a zero. */
longword = *longword_ptr++;
/* Add MAGIC_BITS to LONGWORD. */
if ((((longword + magic_bits)
/* Set those bits that were unchanged by the addition. */
^ ~longword)
/* Look at only the hole bits. If any of the hole bits
are unchanged, most likely one of the bytes was a
zero. */
& ~magic_bits) != 0
/* That caught zeroes. Now test for C. */
|| ((((longword ^ charmask) + magic_bits) ^ ~(longword ^ charmask))
& ~magic_bits) != 0)
{
/* Which of the bytes was C or zero?
If none of them were, it was a misfire; continue the search. */
const unsigned char *cp = (const unsigned char *) (longword_ptr - 1);
if (*cp == c || *cp == '\0')
return (char *) cp;
if (*++cp == c || *cp == '\0')
return (char *) cp;
if (*++cp == c || *cp == '\0')
return (char *) cp;
if (*++cp == c || *cp == '\0')
return (char *) cp;
if (sizeof (longword) > 4)
{
if (*++cp == c || *cp == '\0')
return (char *) cp;
if (*++cp == c || *cp == '\0')
return (char *) cp;
if (*++cp == c || *cp == '\0')
return (char *) cp;
if (*++cp == c || *cp == '\0')
return (char *) cp;
}
}
}
/* This should never happen. */
return NULL;
}
weak_alias (__strchrnul, strchrnul)
```
---
FILE: strcspn.S
```
.text
ENTRY (strcspn)
movq %rdi, %rdx /* Save SRC. */
/* First we create a table with flags for all possible characters.
For the ASCII (7bit/8bit) or ISO-8859-X character sets which are
supported by the C string functions we have 256 characters.
Before inserting marks for the stop characters we clear the whole
table. */
movq %rdi, %r8 /* Save value. */
subq $256, %rsp /* Make space for 256 bytes. */
cfi_adjust_cfa_offset(256)
movl $32, %ecx /* 32*8 bytes = 256 bytes. */
movq %rsp, %rdi
xorl %eax, %eax /* We store 0s. */
cld
rep
stosq
movq %rsi, %rax /* Setup skipset. */
/* For understanding the following code remember that %rcx == 0 now.
Although all the following instruction only modify %cl we always
have a correct zero-extended 64-bit value in %rcx. */
.p2align 4
L(2): movb (%rax), %cl /* get byte from skipset */
testb %cl, %cl /* is NUL char? */
jz L(1) /* yes => start compare loop */
movb %cl, (%rsp,%rcx) /* set corresponding byte in skipset table */
movb 1(%rax), %cl /* get byte from skipset */
testb $0xff, %cl /* is NUL char? */
jz L(1) /* yes => start compare loop */
movb %cl, (%rsp,%rcx) /* set corresponding byte in skipset table */
movb 2(%rax), %cl /* get byte from skipset */
testb $0xff, %cl /* is NUL char? */
jz L(1) /* yes => start compare loop */
movb %cl, (%rsp,%rcx) /* set corresponding byte in skipset table */
movb 3(%rax), %cl /* get byte from skipset */
addq $4, %rax /* increment skipset pointer */
movb %cl, (%rsp,%rcx) /* set corresponding byte in skipset table */
testb $0xff, %cl /* is NUL char? */
jnz L(2) /* no => process next dword from skipset */
L(1): leaq -4(%rdx), %rax /* prepare loop */
/* We use a neat trick for the following loop. Normally we would
have to test for two termination conditions
1. a character in the skipset was found
and
2. the end of the string was found
But as a sign that the character is in the skipset we store its
value in the table. But the value of NUL is NUL so the loop
terminates for NUL in every case. */
.p2align 4
L(3): addq $4, %rax /* adjust pointer for full loop round */
movb (%rax), %cl /* get byte from string */
cmpb %cl, (%rsp,%rcx) /* is it contained in skipset? */
je L(4) /* yes => return */
movb 1(%rax), %cl /* get byte from string */
cmpb %cl, (%rsp,%rcx) /* is it contained in skipset? */
je L(5) /* yes => return */
movb 2(%rax), %cl /* get byte from string */
cmpb %cl, (%rsp,%rcx) /* is it contained in skipset? */
jz L(6) /* yes => return */
movb 3(%rax), %cl /* get byte from string */
cmpb %cl, (%rsp,%rcx) /* is it contained in skipset? */
jne L(3) /* no => start loop again */
incq %rax /* adjust pointer */
L(6): incq %rax
L(5): incq %rax
L(4): addq $256, %rsp /* remove skipset */
cfi_adjust_cfa_offset(-256)
#ifdef USE_AS_STRPBRK
xorl %edx,%edx
orb %cl, %cl /* was last character NUL? */
cmovzq %rdx, %rax /* Yes: return NULL */
#else
subq %rdx, %rax /* we have to return the number of valid
characters, so compute distance to first
non-valid character */
#endif
ret
END (strcspn)
libc_hidden_builtin_def (strcspn)
```
| null | CC BY-SA 4.0 | null | 2023-02-06T03:38:56.600 | 2023-02-06T03:54:35.173 | 2023-02-06T03:54:35.173 | 5,382,650 | 5,382,650 | null |
75,357,187 | 2 | null | 53,782,085 | 1 | null | I found this cool workaround for .Net Core projects that sheds lights on @Hans comment.
```
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<VersionSuffix>1.$([System.DateTime]::UtcNow.ToString(yyMM)).$([System.DateTime]::UtcNow.ToString(ddhh)).$([System.DateTime]::UtcNow.ToString(mmss))</VersionSuffix>
<AssemblyVersion Condition=" '$(VersionSuffix)' == '' ">1.0.0.1</AssemblyVersion>
<AssemblyVersion Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</AssemblyVersion>
<Version Condition=" '$(VersionSuffix)' == '' ">1.0.0.1</Version>
<Version Condition=" '$(VersionSuffix)' != '' ">$(VersionSuffix)</Version>
<!--Deterministic tells the compiler to use the same versions of the files if no changes have happened resulting in faster builds-->
<Deterministic>false</Deterministic>
```
REF: [https://sachabarbs.wordpress.com/2020/02/23/net-core-standard-auto-incrementing-versioning/](https://sachabarbs.wordpress.com/2020/02/23/net-core-standard-auto-incrementing-versioning/)
| null | CC BY-SA 4.0 | null | 2023-02-06T03:50:31.510 | 2023-02-06T04:04:31.957 | 2023-02-06T04:04:31.957 | 495,455 | 495,455 | null |
75,357,244 | 2 | null | 75,356,993 | 0 | null | Another alternative is to Dockerize it [https://www.docker.com/blog/containerized-python-development-part-1/](https://www.docker.com/blog/containerized-python-development-part-1/)
| null | CC BY-SA 4.0 | null | 2023-02-06T04:05:02.893 | 2023-02-06T04:05:02.893 | null | null | 6,402,762 | null |
75,357,292 | 2 | null | 53,104,390 | 0 | null | Simplified custom progress bar
// Used the filter gform_progress_bar_8, replace 8 by your form_id
// Showing case for total 4 steps gravity form
```
add_filter( 'gform_progress_bar_8', 'op_custom_progress_bar', 10, 3 );
function op
_custom_progress_bar( $progress_bar, $form, $confirmation_message ) {
$total_page = 4;
$current_page = GFFormDisplay::get_current_page( $form['id'] );
$percent = 25;
$form_page = 1;
if($current_page == 1) {
$percent = 25;
$form_page = 1;
} else if($current_page == 2){
$percent = 50;
$form_page = 2;
} else if($current_page == 3){
$percent = 75;
$form_page = 3;
}
$progress_bar = '
<div id="gf_progressbar_wrapper_8" class="gf_progressbar_wrapper">
<p class="gf_progressbar_title">Step <span class="gf_step_current_page">'.$form_page.'</span> of <span class="gf_step_page_count">'.$total_page.'</span>
</p>
<div class="gf_progressbar gf_progressbar_blue" aria-hidden="true">
<div class="gf_progressbar_percentage percentbar_blue percentbar_'.$percent.'" style="width:'.$percent.'%;"><span>'.$percent.'%</span></div>
</div>
</div>';
return $progress_bar;
}
```
| null | CC BY-SA 4.0 | null | 2023-02-06T04:18:20.710 | 2023-02-06T04:19:46.067 | 2023-02-06T04:19:46.067 | 21,125,159 | 21,125,159 | null |
75,357,329 | 2 | null | 75,115,909 | 2 | null | I had a similar issue, I deleted the contents of the jre file and replaced them with the contents of the jbr file, and it worked
| null | CC BY-SA 4.0 | null | 2023-02-06T04:25:17.490 | 2023-02-06T04:25:17.490 | null | null | 16,401,797 | null |
75,357,389 | 2 | null | 75,352,612 | 0 | null | It was finally found to be related to my kubectl command in pod. Which is override by the following script. When I changed to the original kubectl command, everything works fine.
```
root@bridge-66d98bd46d-zk65m:/data/ww# cat /usr/bin/kubectl
#!/bin/bash
/opt/kubectl1 -ndefault $@
root@bridge-66d98bd46d-zk65m:/data/ww# /opt/kubectl1 -ndefault exec vnc-test -- bash -c 'which echo '
/usr/bin/echo
root@bridge-66d98bd46d-zk65m:/data/ww#
```
| null | CC BY-SA 4.0 | null | 2023-02-06T04:39:20.240 | 2023-02-06T04:39:20.240 | null | null | 3,643,001 | null |
75,357,453 | 2 | null | 75,356,437 | 1 | null | Not exactly, but you clip off the bottom 35 pixels of the element to which the background image is attached. You’ll need to add bottom padding to prevent any content being clipped, and then a negative bottom margin to recover the white space resulting from the clip.
```
clip-path: inset(0 0 35px 0);
padding-bottom: 35px;
margin-bottom: -35px;
```
I think this would have the desired effect without any serious side-effects. The only trouble you might have is if you are using `background-size` to scale your background image larger, or using `cover` or `contain`, because if you are, the height of the watermark might end up being more than 35 pixels. In that case, you may be able to substitute the fixed 35 pixels with a calc expression including viewport width units `vw`.
```
#d1, #d2 {
background-image: url(https://i.stack.imgur.com/hjPqu.png);
background-position: bottom left;
}
#d2 {
clip-path: inset(0 0 35px 0);
padding-bottom: 35px;
margin-bottom: -35px;
}
```
```
<div id="d1">
One<br>
Two<br>
Three<br>
Four<br>
Five<br>
Six<br>
Seven<br>
</div>
<p>Content between</p>
<div id="d2">
One<br>
Two<br>
Three<br>
Four<br>
Five<br>
Six<br>
Seven<br>
</div>
<p>Content between</p>
```
| null | CC BY-SA 4.0 | null | 2023-02-06T04:58:25.130 | 2023-02-06T06:49:45.477 | 2023-02-06T06:49:45.477 | 2,518,285 | 2,518,285 | null |
75,357,494 | 2 | null | 74,645,965 | 0 | null | This is probably due to buffering. See [Is std::cout buffered?](https://stackoverflow.com/q/26975876/11107541) (answer: yes it is buffered). You can manually flush `cout` in two ways:
1. Use the std::flush manipulator: std::cout << std::flush;
2. Use the std::basic_ostream<CharT,Traits>::flush member function: std::cout.flush();
As for why the output appears when your program exits, that's because the C++ specification mandates that all open C streams with unwritten buffered data be flushed at program exit. See [Is there a guarantee of stdout auto-flush before exit? How does it work?](https://stackoverflow.com/q/15911517/11107541).
| null | CC BY-SA 4.0 | null | 2023-02-06T05:04:39.420 | 2023-02-06T07:50:49.053 | 2023-02-06T07:50:49.053 | 11,107,541 | 11,107,541 | null |
75,357,531 | 2 | null | 74,959,090 | 1 | null | Please follow this approach
```
import 'package:hive/hive.dart';
part 'myrepresentation.g.dart';
@HiveType(typeId: 1)
class FriendsGroupEntity extends HiveObject {
@HiveType(0)
final String id;
@HiveType(1)
final Foo foo;
MyRepresentation({required this.id, required this.foo});
}
@HiveType(typeId: 2)
enum Foo {
@HiveField(0)
foo,
@HiveField(1)
bar,
}
```
check this reference [link](https://stackoverflow.com/questions/75058211/how-to-handle-enum-in-hive-flutter)
| null | CC BY-SA 4.0 | null | 2023-02-06T05:12:00.330 | 2023-02-06T05:12:00.330 | null | null | 17,343,976 | null |
75,358,056 | 2 | null | 75,350,723 | 0 | null | When multiple users host their Bots in the same site (for example replit) they all share similar IPs (I will not explain this in detail)
What is happening is that the Discord API is ratelimiting the IP where your Bot is running. However, the webserver does not crash on Bot's errors (such as 429) so the site will be still online for uptime robot.
I would suggest to look for other free hosts but where you need a credit card to use the service (e.g. oracle cloud)
| null | CC BY-SA 4.0 | null | 2023-02-06T06:37:52.250 | 2023-02-06T06:40:18.593 | 2023-02-06T06:40:18.593 | 21,152,545 | 21,152,545 | null |
75,358,161 | 2 | null | 75,348,835 | 0 | null | The UART synchronizes on the falling edge at the start of the start bit.
Characters which have less other falling edges are less likely to cause mis-synchronation when a device starts listening to a busy line.
More significantly, characters which end with sequences that don't contain a falling edge will be more likely to allow a re-synchronization on the start bit of the byte, whatever it is.
Since characters are output little-end first, to get the last wrong falling edge as far away as possible from the right one, you need the longest sequence of zeros followed by ones.
If you are outputting 7-bit ASCII characters in 8-bit frames then the most significant bit will always be 0, so the best chance of resynchronization will be when there are more high-order zeros.
The printing characters with the most high-order zeros are punctuation and digits (note that digits are somehow missing from your ASCII table link).
Control characters have even more zeros, so horizontal tab or newline should resync you even more quickly.
| null | CC BY-SA 4.0 | null | 2023-02-06T06:51:52.953 | 2023-02-06T12:09:45.877 | 2023-02-06T12:09:45.877 | 13,001,961 | 13,001,961 | null |
75,358,397 | 2 | null | 75,357,665 | 0 | null | Yes, you can extract the spot color names used in a PDF using Ghostscript. Here is an example of how to do it with C# and Ghostscript:
```
using System;
using System.Diagnostics;
using System.IO;
namespace GetSpotColorsFromPDF
{
class Program
{
static void Main(string[] args)
{
var filePath = @"path\to\pdf";
var outputFile = @"path\to\output.txt";
var gsProcess = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = @"path\to\gswin64c.exe",
Arguments = $"-dNODISPLAY -dDumpSpotColors -sOutputFile={outputFile} {filePath}",
RedirectStandardOutput = true,
UseShellExecute = false,
CreateNoWindow = true,
}
};
gsProcess.Start();
gsProcess.WaitForExit();
var output = File.ReadAllText(outputFile);
Console.WriteLine(output);
}
}
}
```
Note that you need to have Ghostscript installed on your machine and specify the path to the executable in the code. The and arguments are used to extract the spot color information from the PDF and the argument is used to specify the output file for the extracted information. The extracted information will be saved to the specified output file and then read into a string and printed to the console.
| null | CC BY-SA 4.0 | null | 2023-02-06T07:23:25.547 | 2023-02-06T07:23:25.547 | null | null | 511,876 | null |
75,358,584 | 2 | null | 75,357,969 | 0 | null | Well, be it MOST web pages with code behind, opening the source code page or file means next to nothing.
You need to be running a web server, and one that can consume + run the code behind. When that code runs, then a page is spit out with standard HTML, but those pages have LITTLE use by just opening. You need a working + running web server for those pages to work.
Thankfully, Visual Studio has a built in web server when you install it.
So, to view that page?
you have to open it from/with Visual studio. You can then hit f5, and the code will compile, then IIS (the web server) will be launched, then the .net code behind will run, render the page, and spit out standard HTML.
however, those aspx pages, or cshtml pages? They don't work alone, they required a web server, and one that can run + consume the aspx, or cshtml page. Only have the .net code has run, and THEN can the web server in question render the page, and then crank out standard HTML compatible pages that work on any computer.
So, you need visual studio here. And you then open that page with VS, and then you can say start debugging and run the page by hitting F5.
You need to open the project here - not just the one page.
| null | CC BY-SA 4.0 | null | 2023-02-06T07:49:59.763 | 2023-02-06T07:49:59.763 | null | null | 10,527 | null |
75,358,778 | 2 | null | 75,280,199 | 0 | null | You can modify the validation rules for the telephone field in the code if necessary to meet your specific requirements.
| null | CC BY-SA 4.0 | null | 2023-02-06T08:12:49.567 | 2023-02-06T08:12:49.567 | null | null | 7,564,228 | null |
75,358,801 | 2 | null | 75,358,687 | 0 | null | The time to get the quota increase varies greatly. It kind of depends on how back logged the team is.
In the beginning when they reduced it to 10k and I applied for mine it took more then three months.
These days I think you should get something in less then two weeks but don't hold me to that I dont work for YouTube this is just my experience.
Oh and just check it now and then they may apply it before the actually send you an email saying that they are going to apply it.
| null | CC BY-SA 4.0 | null | 2023-02-06T08:15:27.290 | 2023-02-06T08:15:27.290 | null | null | 1,841,839 | null |
75,359,165 | 2 | null | 75,359,055 | 0 | null | `Model` should return one of the items from `Models`.
Add this to the constructor before DataContext setter:
```
Model = Models[1];
```
The problematic line is
`_Model = new TestModel() { Key = "Joe", Value = "456" }` - you create an instance of `TestModel` that is not present in the list. Even though it has the same property values, it is not the same object.
| null | CC BY-SA 4.0 | null | 2023-02-06T08:57:15.763 | 2023-02-06T08:57:15.763 | null | null | 305,020 | null |
75,359,191 | 2 | null | 75,359,055 | 0 | null | ComboBoxes use the .Equals() method of the objects they are displaying to find the SelectedItem in the ItemsSource.
Since the Equals() method for clasess by default works by comparing object references, you would need to set the SelectedItem to an exact same instance as an object inside the ItemsSource.
Another approach you could take is overriding the Equals() method on your object and making it Equal by value comparison or use a record class which automatically makes your object comparable by value.
| null | CC BY-SA 4.0 | null | 2023-02-06T08:58:59.307 | 2023-02-06T09:22:59.697 | 2023-02-06T09:22:59.697 | 2,493,877 | 2,493,877 | null |
75,359,461 | 2 | null | 75,359,213 | 2 | null | There is nothing wrong with your vcpkg installation or CMake file. You are just including the wrong headers.
Instead of
```
#include <fmt>
```
(which is a directory)
you should include some of the files within that directory:
```
#include <fmt/core.h>
```
| null | CC BY-SA 4.0 | null | 2023-02-06T09:27:38.217 | 2023-02-06T09:27:38.217 | null | null | 1,548,468 | null |
75,359,585 | 2 | null | 75,356,993 | 0 | null | One of my friends tell me about Nuitka
He said that I should use it instead of pyinstaller but he didn't explain more about that, who can tell me what is that??
| null | CC BY-SA 4.0 | null | 2023-02-06T09:41:00.260 | 2023-02-06T09:41:00.260 | null | null | 21,154,791 | null |
75,359,587 | 2 | null | 75,359,497 | 2 | null | You may replace the ComboBox's Template when it has no items, e.g. with a TextBlock or any other visual element.
```
<ComboBox>
<ComboBox.Style>
<Style TargetType="ComboBox">
<Style.Triggers>
<Trigger Property="HasItems" Value="False">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="ComboBox">
<TextBlock Text="No Items"/>
</ControlTemplate>
</Setter.Value>
</Setter>
</Trigger>
</Style.Triggers>
</Style>
</ComboBox.Style>
</ComboBox>
```
| null | CC BY-SA 4.0 | null | 2023-02-06T09:41:03.950 | 2023-02-06T09:41:03.950 | null | null | 1,136,211 | null |
75,359,756 | 2 | null | 75,359,497 | 0 | null | Try this (I can’t check it myself - I don’t have a computer “at hand”):
```
<ComboBox>
<ComboBox.Resources>
<CompositeCollection x:Key="noItems">
<sys:String>No Items</sys:String>
</CompositeCollection>
</ComboBox.Resources>
<ComboBox.Style>
<Style TergetType="ComboBox">
<Setter Property="ItemsSource" Value="{Binding MyCollection}"/>
<Style.Triggers>
<DataTrigger Binding="{Binding MyCollection.Count}"
Value="0">
<Setter Property="ItemsSource" Value="{DynamicResource noItems}"/>
<Setter Property="SelectedIndex" Value="0"/>
</DataTrigger>
</Style.Triggers>
</Style>
<ComboBox.Style>
</ComboBox>
```
Or such variant for TargetNullValue:
```
<ComboBox>
<ComboBox.ItemsSource>
<Binding Path="MyCollection">
<Binding.TargetNullValue>
<CompositeCollection>
<sys:String>No Items</sys:String>
</CompositeCollection>
</Binding.TargetNullValue>
</Binding>
</ComboBox.ItemsSource>
</ComboBox>
```
| null | CC BY-SA 4.0 | null | 2023-02-06T09:54:58.897 | 2023-02-06T10:04:40.290 | 2023-02-06T10:04:40.290 | 13,349,759 | 13,349,759 | null |
75,359,965 | 2 | null | 75,359,699 | 1 | null | Check the local closet mirror for you [from here](https://%20https://launchpad.net/ubuntu/+archivemirrors) and update `sources.list` file
`sudo sed -i "s/archive.ubuntu.com/us.archive.ubuntu.com/" /etc/apt/sources.list`
Found this at [source](https://github.com/microsoft/WSL/issues/2477#issuecomment-371285353)
| null | CC BY-SA 4.0 | null | 2023-02-06T10:16:27.987 | 2023-02-06T10:16:27.987 | null | null | 455,654 | null |
75,360,239 | 2 | null | 75,357,863 | 0 | null | You can try to delete the .gradle directory. It is located in your "user" home directory. This will force Gradle to re-download all dependencies.
Also it might be smart to invalidate caches and restart. Go to File -> Invalidate Caches / Restart.
| null | CC BY-SA 4.0 | null | 2023-02-06T10:42:37.070 | 2023-02-06T10:42:37.070 | null | null | 16,768,434 | null |
75,360,417 | 2 | null | 67,083,878 | 0 | null | remove this line `@apiSampleRequest` from each api function
and run cmd -
```
apidoc -i /yourfolderpath -o /yourfolderpath_apidoc
```
| null | CC BY-SA 4.0 | null | 2023-02-06T10:58:20.357 | 2023-02-06T10:58:20.357 | null | null | 9,802,578 | null |
75,360,517 | 2 | null | 54,617,432 | 0 | null | Use this if You are using Stack in AlertDialog Not Closing on Navigator.of(context).pop();
```
late NavigatorState _navigator;
@override
void didChangeDependencies() {
_navigator = Navigator.of(context);
super.didChangeDependencies();
}
```
Use This
```
Positioned(right: 10.0,child: GestureDetector(
// behavior: HitTestBehavior.translucent,
onTap: () {
_navigator.pop(context);
},
child: Align(
alignment: Alignment.topRight,
child: CircleAvatar(
radius: 14.0,
backgroundColor: Colors.white,
child: Icon(Icons.close, color: black),
),
),
),
),
```
| null | CC BY-SA 4.0 | null | 2023-02-06T11:06:59.937 | 2023-02-09T21:37:14.580 | 2023-02-09T21:37:14.580 | 3,278,010 | 9,989,435 | null |
75,360,605 | 2 | null | 75,359,792 | 0 | null | Try adding the dependency in the package.json like this
```
"dependencies": {
"swagger-ui": "git+https://github.com/awslabs/swagger-ui.git#apigw-fork-v4"
}
```
you can also install it manually like this
```
npm install https://github.com/awslabs/swagger-ui#apigw-fork-v4
```
| null | CC BY-SA 4.0 | null | 2023-02-06T11:17:20.050 | 2023-02-06T11:17:20.050 | null | null | 12,289,886 | null |
75,360,650 | 2 | null | 75,360,216 | 0 | null | Try this :
`/(\d*\,)(\d*\,)*(\d+)/` will make sure to select everything before the last comma.
```
$.each($('.price-lbl-cust'), function() {
var price = $(this).html();
$(this).html(price.replace(/(\d*\,)(\d*\,)*(\d+)/,
'<span style="font-size: 1.675rem;line-height: 1.5rem;font-weight:600;">$1</span><span style="font-size: 1.675rem;line-height: 1.5rem;font-weight:600;">$2</span><span style="font-size: .92222em;font-weight:600;">$3</span>'
));
});
```
```
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="price-lbl-cust">2,948,11</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-06T11:21:42.167 | 2023-02-06T11:21:42.167 | null | null | 4,286,884 | null |
75,360,905 | 2 | null | 75,311,320 | 0 | null | The pop up message clearly says that, the given `redirecturi` is not supported for the current version.
- `RedirectURI``http://localhost`

- `Program.cs``WithRedirectUri`
```
WithRedirectUri("http://localhost")
```
Same is mentioned in the [MSDoc](https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-client-application-configuration#redirect-uri-for-public-client-apps), The `RedirectURI` for `.NET Core` has to be `https://localhost`. The error/alert says the same.


> The `MSAL.NET` not have support for .NET 6? or need make somes adaption to the code?
Even I do not find any official document or any code samples which explains the `.NET 6 version`.
| null | CC BY-SA 4.0 | null | 2023-02-06T11:47:34.817 | 2023-02-06T11:47:34.817 | null | null | 19,648,279 | null |
75,360,928 | 2 | null | 74,638,793 | 0 | null | We are experiencing the same issue.
The problem is caused by [Pimcore Datahub File Export](https://pimcore.com/docs/data-hub-file-export/current/index.html) being an `ENTERPRISE`-only module. You can tell by the badge on its page. It's not available for the "community" edition of Pimcore.
| null | CC BY-SA 4.0 | null | 2023-02-06T11:49:54.593 | 2023-02-06T11:49:54.593 | null | null | 1,204,976 | null |
75,361,061 | 2 | null | 70,538,073 | 0 | null | Thought I would add, there is a bug where this icon appears when it shouldn't, it's probably caused by switching branches. Restarting Visual Studio seems to fix it.
| null | CC BY-SA 4.0 | null | 2023-02-06T12:01:39.667 | 2023-02-06T12:01:39.667 | null | null | 16,861,162 | null |
75,361,092 | 2 | null | 75,360,156 | 0 | null | You have to create a view to extracting the correct rank. Once you use `WHERE` clause, you will get the rank based on the population rather that the subset.
Please find an indicative answer on [fiddle](https://dbfiddle.uk/pDh-Bs-_) where a `CTE` and `ROW` function are used. The indicative code is:
```
WITH sum_cte AS (
SELECT ROW_NUMBER() OVER(ORDER BY SUM(PPC + 1EC + 2eC + 3eC + srC) DESC) AS Row,
id_user,
SUM(PPC + 1EC + 2eC + 3eC + srC) AS total_sum
FROM race
GROUP BY id_user)
SELECT Row, id_user, total_sum
FROM sum_cte
WHERE id_user = 1
```
User 1 with the second score will appear with a row valuation 2.
| null | CC BY-SA 4.0 | null | 2023-02-06T12:05:15.463 | 2023-02-06T12:05:15.463 | null | null | 10,281,681 | null |
75,361,160 | 2 | null | 71,702,448 | 0 | null | After trying all the solutions listed here and nothing worked for me, i simply reinstalled wls2 from windows app store. and everything worked fine for me.
| null | CC BY-SA 4.0 | null | 2023-02-06T12:11:30.343 | 2023-02-06T12:11:30.343 | null | null | 18,613,411 | null |
75,361,209 | 2 | null | 25,823,391 | 0 | null | In graph search, we don't expand the already discovered nodes.
f(node) = cost to node from that path + h(node)
At first step:
```
fringe = {S} - explored = {}
```
S is discarded from the fringe and A and B are added.
```
fringe = {A, B} - explored = {S}
```
Then f(A) = 5 and f(B) = 7. So we discard A from the fringe and add G.
```
fringe = {G, B} - explored = {S, A}
```
Then f(G) = 8 and f(B) = 7 so we discard B from the fringe but don't add A since we already explored it.
```
fringe = {G} - explored = {S, A, B}
```
Finally we have only G left in the fringe So we discard G from the fringe and we have reached our goal.
The path would be S->A->G.
If this was a tree search problem, then we would find the answer S->B->A->G since we would reconsider the A node.
| null | CC BY-SA 4.0 | null | 2023-02-06T12:16:41.133 | 2023-02-12T07:45:06.213 | 2023-02-12T07:45:06.213 | 21,157,535 | 21,157,535 | null |
75,361,278 | 2 | null | 75,360,537 | 0 | null | There is an amazon SDK for C# : the image shows the packages used to develop such application.
[](https://i.stack.imgur.com/a7LFh.png)
| null | CC BY-SA 4.0 | null | 2023-02-06T12:23:40.703 | 2023-02-06T12:23:40.703 | null | null | 5,008,193 | null |
75,361,848 | 2 | null | 75,355,538 | 0 | null |
## Data
```
library(tidyverse)
set.seed(1)
n = 1000
dat <-
data.frame(
x = unlist(map(c(-5, 1.8, 3.2), ~rnorm(n,.x,sd = .5))),
y = unlist(map(c(0, -2.5, 4), ~rnorm(n,.x, sd = .5))),
label = rep(c("1mot","2mot","3mot"), each = n) )
extra <- data.frame(x = c(-5,1.8,3.2), y = c(0,-2.5,4), label = 'extra')
```
### With geom_point(..., shape = 21)
```
ggplot(dat) +
geom_point(aes(x=x,y=y, fill=label, colour = label), shape = 21, alpha = 0.5, show.legend = FALSE) +
geom_point(aes(x=x, y=y, fill=label), shape = 21 , data = extra)
```

### Without geom_point(..., shape = 21)
```
# We can plot two sets of points, the first being a solid color with slightly bigger size to make the shadows
ggplot(dat) +
geom_point(aes(x=x,y=y, colour=label), show.legend = FALSE) +
geom_point(aes(x=x, y=y), colour = 'white', data = extra, size = 2) +
geom_point(aes(x=x, y=y, colour=label), data = extra, size = 1)
```

```
# The pro of doing this way is that the points are plotted over the shadow
dat_new <-
bind_rows(dat,extra)
dat_new %>%
{
tmp_dt <- filter(.,label != 'extra')
tmp_ex <- filter(., label == 'extra')
ggplot(tmp_dt,aes(x=x,y=y)) +
geom_point(aes(x=x,y=y), colour = 'black', size = 3) +
geom_point(aes(x=x,y=y, colour = label), size = 1.5) +
geom_point(aes(x=x,y=y), colour = 'black', size = 3, data= tmp_ex) +
geom_point(aes(x=x,y=y, colour = label), size = 1.5, data = tmp_ex)
}
```

[reprex v2.0.2](https://reprex.tidyverse.org)
## Edit
### Shadow behind cluster
```
# stat_ellipse can be used to drawn a shadow in the cluster with "geom = 'polygon'"
dat_new %>%
{
tmp_dt <- filter(.,label != 'extra')
tmp_ex <- filter(., label == 'extra')
tmp_1mot <- filter(., label == '1mot')
ggplot(tmp_dt,aes(x=x,y=y)) +
geom_point(aes(x=x,y=y), colour = 'black', size = 3) +
geom_point(aes(x=x,y=y, colour = label), size = 1.5) +
geom_point(aes(x=x,y=y), colour = 'black', size = 3, data= tmp_ex) +
geom_point(aes(x=x,y=y, colour = label), size = 1.5, data = tmp_ex) +
stat_ellipse(aes(x=x, y=y, color=label),fill = 'gray50', alpha = 0.3, type = 't', level = 0.9999, geom = 'polygon', data = tmp_1mot)
}
```

[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2023-02-06T13:20:41.177 | 2023-02-06T14:17:03.877 | 2023-02-06T14:17:03.877 | 9,900,368 | 9,900,368 | null |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.