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
74,406,390
2
null
28,810,477
0
null
you should only add this path to Manage Jenkins -> Global Tool Configuration -> JDK for java 11 > /usr/lib/jvm/java-11-openjdk-amd64 for java 8 > /usr/lib/jvm/java-8-openjdk-amd64
null
CC BY-SA 4.0
null
2022-11-11T17:52:01.277
2022-11-11T17:52:01.277
null
null
7,534,790
null
74,406,573
2
null
74,404,680
3
null
The easy solution: See [here](https://quarto.org/docs/presentations/revealjs/advanced.html#stretch) for more information. > For slides that contain only a single top-level image, the .r-stretch class is automatically applied to the image. You can disable this behavior by setting the auto-stretch: false option ``` format: revealjs: auto-stretch: false ``` If you like that general stretching behavior you can deactivate the stretching behavior for an individual slide using ``` ## Slide Title {.nostretch} ``` Create own css class: The following code uses the same width (30px), but only the one with the own css style works where the trick is the `!important` to overwrite the default set by `.r-stretch` class. ``` --- format: revealjs css: styles.css --- ## using css class ![Caption](https://upload.wikimedia.org/wikipedia/commons/a/a4/Discharging_capacitor.svg){.width-image} ## using inline css does not work ![Caption](https://upload.wikimedia.org/wikipedia/commons/a/a4/Discharging_capacitor.svg){width=30px} ``` ``` .width-image{ width: 30px!important; } ```
null
CC BY-SA 4.0
null
2022-11-11T18:10:56.670
2022-11-11T18:26:53.613
2022-11-11T18:26:53.613
14,137,004
14,137,004
null
74,406,670
2
null
74,406,580
0
null
Kubernetes by default needs authentication to access the api server. This article might be helpful [https://nieldw.medium.com/curling-the-kubernetes-api-server-d7675cfc398c](https://nieldw.medium.com/curling-the-kubernetes-api-server-d7675cfc398c)
null
CC BY-SA 4.0
null
2022-11-11T18:20:45.187
2022-11-11T18:20:45.187
null
null
2,244,272
null
74,406,909
2
null
74,405,411
0
null
@caTS answered my question in a comment. I had to add `white-space: pre-wrap` to my CSS.
null
CC BY-SA 4.0
null
2022-11-11T18:43:58.327
2022-11-11T18:43:58.327
null
null
20,422,283
null
74,407,638
2
null
74,407,350
0
null
When you listen to data in Firebase with `onValue`, the `event` you get contains a snapshot of all data. Even when only one child node was added/changed/removed, the snapshot will contain all data. So when you add the data from the snapshot to `list`, you are initially adding all child nodes once - but then on an update, you're adding most of them again. The easiest way to fix this is to empty the list every time `onValue` fires an event by calling `list.clear()`.
null
CC BY-SA 4.0
null
2022-11-11T20:11:22.160
2022-11-11T20:11:22.160
null
null
209,103
null
74,407,712
2
null
74,405,739
1
null
here is one way to do it I used a made-up Dataframe, if you had shared the dataframe as a code (preferably) or text, I would have used that. Refer to [https://stackoverflow.com/help/minimal-reproducible-example](https://stackoverflow.com/help/minimal-reproducible-example) ``` # use apply, to capture a row value for a column in forumla, along x-axis df['quantity']=df.apply(lambda x: x[x['formula']] , axis=1) df ``` ``` count area formula quantity 0 1.0 NaN count 1.0 1 1.0 NaN count 1.0 2 NaN 1.4 area 1.4 3 NaN 0.6 area 0.6 ```
null
CC BY-SA 4.0
null
2022-11-11T20:20:19.230
2022-11-11T20:20:19.230
null
null
3,494,754
null
74,408,111
2
null
74,406,226
2
null
If I've understood correctly, you can do something like this: ``` import numpy as np import matplotlib.pyplot as plt import networkx as nx G = nx.complete_graph(10).to_directed() for edge in G.edges: G.add_edge(*edge[::-1]) cycles = [[0, 1, 2, 0], [0, 3, 4, 5, 6, 0], [0, 7, 8, 0]] H = nx.DiGraph() H.add_nodes_from(G.nodes) for cyc in cycles: for a, b in zip(cyc, cyc[1:]): H.add_edge(a, b) plt.figure(figsize=(15, 5)) plt.subplot(1, 2, 1) pos = nx.spring_layout(G) colors = ['aqua'] + ['pink'] * (len(G) - 1) nx.draw(G, pos=pos, with_labels=True, node_color=colors) plt.subplot(1, 2, 2) nx.draw(H, pos=pos, with_labels=True, node_color=colors) plt.show() ``` Resulting figure: [](https://i.stack.imgur.com/V8a0M.png)
null
CC BY-SA 4.0
null
2022-11-11T21:04:35.803
2022-11-11T21:30:03.723
2022-11-11T21:30:03.723
2,476,977
2,476,977
null
74,408,201
2
null
21,646,738
1
null
It's likely overkill for most use cases, but if you need a solution that including all named colors, and actually converts (not just hex) to RGBA: ``` function toRGBA(cssColor) { let el = document.createElement("div"); el.style.color = cssColor; el.style.display = "none"; document.body.appendChild(el); let rgba = window.getComputedStyle(el).getPropertyValue("color"); el.remove(); let [r, g, b, a] = rgba.match(/[0-9.]+/g).map(n => Number(n)); if(a === undefined) a = 1; // <-- getPropertyValue returns rgb(...) if there is no transparency, so we add alpha if missing return [r, g, b, a]; } ``` ``` toRGBA("#34f1a8") // [52, 241, 168, 1] toRGBA("#fe6") // [255, 238, 102, 1] toRGBA("blue") // [0, 0, 255, 1] toRGBA("hsl(0, 90%, 50%)") // [242, 13, 13, 1] ... ``` (Obviously this approach is not appropriate for server-side code like Deno or Node.js)
null
CC BY-SA 4.0
null
2022-11-11T21:15:47.927
2022-11-11T21:15:47.927
null
null
11,950,764
null
74,408,719
2
null
74,405,268
2
null
The documentation totally misses these 2 lines that need to be added to the top of `_Layout.cshtml` file: ``` @using Microsoft.AspNetCore.Mvc.ViewEngines @inject ICompositeViewEngine Engine ``` Adding those lines resolved the error. However, I even go that route at the end. --- In summary, I took and put it inside _. If the steps mentioned below are hard to follow, take a look at the code. The full source code is [here](https://github.com/affableashish/blazor-server-auth/tree/feature/LayoutWithIdentityPages). ## Demo Unauthorized View ![image](https://user-images.githubusercontent.com/30603497/203643011-4a255742-14f6-47cc-89b7-7317acc8b076.png) Login Page ![image](https://user-images.githubusercontent.com/30603497/203643170-ebcec9ce-0ece-465b-8b50-edde35ce9955.png) Authorized View ![image](https://user-images.githubusercontent.com/30603497/203643325-bd80564b-d510-48d4-9fd2-79b5b42d58be.png) ## Step 1: Since we're using and razor components inside _, add these to the top of _: ``` @using HMT.Web.Server.Features.Shared.Layout.NavMenu @using HMT.Web.Server.Features.Identity ``` ## Step 2: Replace `<body>` with this: ``` <body> <div class="page"> <div class="sidebar"> <component type="typeof(NavMenu)" render-mode="ServerPrerendered" /> </div> <main> <div class="top-row px-4 logindisplay"> <component type="typeof(LoginDisplay)" render-mode="ServerPrerendered" /> </div> <article class="content px-4"> @RenderBody() </article> <div class="bottom-row px-4"> <a href=""> <img src="/images/logo-black.png" width="40"/> <span class="fs-4">HMT</span> </a> </div> <div id="blazor-error-ui"> <environment include="Staging,Production"> An error has occurred. This application may no longer respond until reloaded. </environment> <environment include="Development"> An unhandled exception has occurred. See browser dev tools for details. </environment> <a href="" class="reload">Reload</a> <a class="dismiss"></a> </div> </main> </div> <script src="~/Identity/lib/jquery/dist/jquery.js"></script> <script src="~/Identity/lib/bootstrap/dist/js/bootstrap.bundle.js"></script> <script src="~/Identity/js/site.js" asp-append-version="true"></script> @RenderSection("Scripts", required: false) <script src="_framework/blazor.server.js"></script> </body> ``` If you're thinking that I just cut and pasted `<div class="page">` section from , you're absolutely right. ## Step 3: Create: file. Now cut and paste all the styles from your to _. For reference, [this is how](https://github.com/affableashish/blazor-server-auth/blob/feature/LayoutWithIdentityPages/src/HMT.Web.Server/Features/Shared/Layout/_Layout.cshtml.css) mine looks like. ## Step 4: All that remains inside is this: ``` @inherits LayoutComponentBase <PageTitle>Handy Man's Tool</PageTitle> @Body ``` ## Step 5: Wrap `AuthorizeView` in with `<CascadingAuthenticationState>`. The reason is that if you try to use a Razor Component that has `Authorize` components from component that IS NOT wrapped with `<CascadingAuthenticationState>`, it won't work, That is the reason why `<component type="typeof(LoginDisplay)" render-mode="ServerPrerendered" />` doesn't work in _ without it. ## Step 6: If you want to protect the NavLinks in , wrap them inside `AuthorizeView`, and since is rendered from _, don't forget to wrap them inside `<CascadingAuthenticationState>`. For eg: Mine looks like this: ``` <CascadingAuthenticationState> <div class="@NavMenuCssClass" @onclick="ToggleNavMenu"> <nav class="flex-column"> <div class="nav-item px-3"> <NavLink class="nav-link" href="" Match="NavLinkMatch.All"> <span class="oi oi-home" aria-hidden="true"></span> Home </NavLink> </div> <AuthorizeView> <div class="nav-item px-3"> <NavLink class="nav-link" href="counter"> <span class="oi oi-plus" aria-hidden="true"></span> Counter </NavLink> </div> <div class="nav-item px-3"> <NavLink class="nav-link" href="fetchdata"> <span class="oi oi-list-rich" aria-hidden="true"></span> Fetch data </NavLink> </div> </AuthorizeView> </nav> </div> </CascadingAuthenticationState> ``` ## Step 7: Remove the following files as they're unnecessary: 1. Areas/Identity/Pages/_ValidationScriptsPartial.cshtml (as I'm not overriding it.) 2. Features/Shared/Layout/_ViewImports.cshtml 3. Features/Shared/Layout/_LoginPartial.cshtml (Using LoginDisplay instead) ## Full source code [https://github.com/affableashish/blazor-server-auth/tree/feature/LayoutWithIdentityPages](https://github.com/affableashish/blazor-server-auth/tree/feature/LayoutWithIdentityPages)
null
CC BY-SA 4.0
null
2022-11-11T22:21:17.660
2022-11-28T18:02:40.980
2022-11-28T18:02:40.980
8,644,294
8,644,294
null
74,408,834
2
null
29,198,327
0
null
I had the same issue on a brand new computer, and the reason was simple. Although I downloaded and unzipped the Android SDK, I didn't add it to the `PATH`. So: On Windows, you have to launch `envvar` and there, add the path to your `android/platform-tools` On MacOS, edit the `.zshrc` file in your home, and add `export PATH="$PATH:/your/own/path/to/android/platform-tools"`
null
CC BY-SA 4.0
null
2022-11-11T22:37:59.903
2022-11-11T22:37:59.903
null
null
2,191,890
null
74,409,057
2
null
74,405,389
0
null
It looks like you want windowing rather than aggregation. Unfortunately, `string_agg` does not support `over()` in SQL Server ; neither does it support `distinct` in its aggregated form. We could work around it with subqueries ; it is probably more efficient to deduplicate and pre-compute the aggregates first, then `join` with the original table: ``` select t.*, x.column1_alias from mytable t inner join ( select column2, column3, column4, string_agg(column1, ', ') as column1_alias from (select distinct column1, column2, column3, column4 from mytable) t group by column2, column3, column4 ) x on x.column2 = t.column2 and x.column3 = t.column3 and x.column4 = t.column4 ``` Side note : in a database that supports both `over()` and `distinct` on string aggregation, the query would phrase as: ``` select t.*, string_agg(distinct column4, ', ') over(partition by column2, column3, column4) as column1_alias from mytable t ```
null
CC BY-SA 4.0
null
2022-11-11T23:11:44.753
2022-11-11T23:11:44.753
null
null
10,676,716
null
74,410,021
2
null
21,556,413
-1
null
im looking for a solution just like this. People keep on going around the question. What you want is for the custom posts to look like they come from the route mysite.com/todo/have-a-nice-day mysite.com/blog/todo/instead of mysite.com/blog/
null
CC BY-SA 4.0
null
2022-11-12T02:41:13.127
2022-11-12T02:41:13.127
null
null
8,831,145
null
74,410,147
2
null
74,410,129
1
null
> Argument of type '{ id: number; color: string; }[]' is not assignable to parameter of type 'SetStateAction<never[]>' You are missing the when setting the state. ``` const [colors, setColors] = useState<{ color: string; id?: number }[]>([]); ``` [Typescript playground](https://www.typescriptlang.org/play?target=8&ts=4.8.4#code/JYWwDg9gTgLgBAJQKYEMDG8BmUIjgcilQ3wG4AoctCAOwGd5qAbaAZSQEcBXJGtJOAF44AbXJw4AbzgAiZtBkAuCTIDEAZgAmAIwAsu7TLgBfADTips%20VCUrV2zEky6ArEbMXpciCxvLZqroATJrqzu7mEl7WtgHBAGxaABwRnlY%20Cv5qmPFJQepBqVHpvrHZSEgAjJUpJpGW3qVZqkjxlQCcuihFDTHNmAAMBa090Rl%20du1BlUja6u7kALqUmFx8MMC0cACCYGAAFACUUhbU9PAi1nSmcHRIMADC43SLQojEMAB0XHesMCgwJAAHmk1mUDCgwBoAHMTCJFgA%20fbww4UCwAenRdAAFlxMJgmAIYNiBFdTrQGLdcfjCU9fHQ3kchAiThIJGdKTi8QSkJo6dAGcIRJ8RdZ2NxePxlmy2Z86NAYPsmYIWQBZAHYz5QFA0TS4JkAWjgA0%20LkOFhlnxAKAO%202sxxVcH20hFn2sN2AmmU6uJWp1epATOMh3NFrZd0ez32XJpvP5UDoqIsxkoEiIMC4UBocBoXCYTAoEmMQA)
null
CC BY-SA 4.0
null
2022-11-12T03:19:10.553
2022-11-12T03:27:50.323
2022-11-12T03:27:50.323
6,695,924
6,695,924
null
74,410,155
2
null
74,410,129
1
null
You're missing the type definition of the `colors` stateful variable. ``` const [colors, setColors] = useState<{ color: string, id: number }[]>([]); ```
null
CC BY-SA 4.0
null
2022-11-12T03:21:18.450
2022-11-12T03:21:18.450
null
null
3,759,355
null
74,410,204
2
null
74,410,129
-1
null
You're missing the type definition of the state variable.To solved this error there is two way. ``` const [colors, setColors] = useState<{ color: string, id: number }[]>([]); ``` Follow Below 2 steps: 1. make one interface of colors like below. interface colors { color: String, id: Number } 1. Assign interface to the state. const [colors, setColors] = useState< colors >([])
null
CC BY-SA 4.0
null
2022-11-12T03:35:16.110
2022-11-12T03:35:16.110
null
null
19,021,757
null
74,410,259
2
null
74,409,754
1
null
I think you are going to hate me when you see this… Put this in E2: `=SUMIF( B$2:B2, B2, C$2:C2 )` Then copy it down. Mind the dollar signs, they are important. You place this in a named Lambda but the character count reduction is probably immaterial.
null
CC BY-SA 4.0
null
2022-11-12T03:51:59.633
2022-11-12T03:51:59.633
null
null
19,662,289
null
74,410,708
2
null
74,410,669
0
null
Try ``` =ArrayFormula(IFERROR(DATEVALUE(REGEXEXTRACT(A1:A,"(.+) ")))) ``` [](https://i.stack.imgur.com/DwWwV.png)
null
CC BY-SA 4.0
null
2022-11-12T05:56:10.333
2022-11-12T06:37:01.283
2022-11-12T06:37:01.283
19,529,675
19,529,675
null
74,410,709
2
null
42,961,712
0
null
Pasting images seems to be currently in experimental phase on VSCode. According to [this](https://github.com/microsoft/vscode/issues/164843#issuecomment-1294460344), you can set the following configuration options on your personal settings to enable it. ``` "markdown.experimental.editor.pasteLinks.enabled": true, "editor.experimental.pasteActions.enabled": true ``` My test run of it worked perfectly pasting a screen capture, but it seems there's currently no setings as on where the file will be saved or its name. It defaults to saving on the current folder with "image.png" name.
null
CC BY-SA 4.0
null
2022-11-12T05:56:13.297
2022-11-12T05:56:13.297
null
null
1,985,023
null
74,411,090
2
null
74,411,052
0
null
``` private void EqualsButton_Click(object sender, EventArgs e) { var resultA=0; var resultB=0; if(!string.IsNullOrEmpty(InputTextBoxA.Text)) resultA=Convert.ToInt32(InputTextBoxA.Text); if(!string.IsNullOrEmpty(InputTextBoxB.Text)) resultB=Convert.ToInt32(InputTextBoxB.Text); OutputTextBox.Text = resultA+ resultB ; } ```
null
CC BY-SA 4.0
null
2022-11-12T07:23:32.893
2022-11-12T07:23:32.893
null
null
4,256,602
null
74,411,096
2
null
74,411,052
-1
null
You need to convert text fields to int and after for the answer back to the text. If you did not enter a value, then there `""` is considered as `0` when adding. ``` private void EqualsButton_Click(object sender, EventArgs e) { OutputTextBox.Text = Convert.ToString( Convert.ToInt32(InputTextBoxA.Text == "" ? "0" : InputTextBoxA.Text) + Convert.ToInt32(InputTextBoxB.Text == "" ? "0" : InputTextBoxB.Text)); } ```
null
CC BY-SA 4.0
null
2022-11-12T07:24:22.183
2022-11-12T07:38:17.053
2022-11-12T07:38:17.053
20,474,992
20,474,992
null
74,411,114
2
null
74,411,052
1
null
> First you must convert text on textbox to int or any number type Simple way : ``` private void EqualsButton2_Click(object sender, EventArgs e) { int numberA = int.Parse(textBox1.Text.Trim()); int numberB = int.Parse(textBox2.Text.Trim()); var result = numberA + numberB; textBox3.Text = result.ToString(); } ``` Safe way : ``` private void EqualsButton_Click(object sender, EventArgs e) { if (!int.TryParse(textBox1.Text.Trim(), out int numberA)) numberA = 0; if (!int.TryParse(textBox2.Text.Trim(), out int numberB)) numberB = 0; var result = numberA + numberB; textBox3.Text = result.ToString(); } ```
null
CC BY-SA 4.0
null
2022-11-12T07:27:48.427
2022-11-12T07:27:48.427
null
null
2,011,837
null
74,411,139
2
null
74,411,052
0
null
Don't listen to anyone. Do this ``` txtResult.Text = string.Empty; if (!decimal.TryParse(txt1.Text.Trim(), out decimal v1)) { MessageBox.Show("Bad value in txt1"); return; } if (!decimal.TryParse(txt2.Text.Trim(), out decimal v2)) { MessageBox.Show("Bad value in txt2"); return; } txtResult.Text = (v1 + v2).ToString(); ```
null
CC BY-SA 4.0
null
2022-11-12T07:31:23.193
2022-11-12T07:31:23.193
null
null
1,704,458
null
74,411,137
2
null
74,410,694
0
null
Follow the below steps, 1. kotlin-android-extension is Deprecated. use ViewBinding or DataBinding inorder to work properly. //remove deprecated implementation 'com.github.lisawray.groupie:groupie-kotlin-android-extensions:2.10.0' //for viewbinding ,replace with implementation "com.github.lisawray.groupie:groupie-viewbinding:2.10.0" 2. update Groupie Library to latest version(2.10.1) which added support for kotlin version 1.6 (check more about here.). Once you added, it will like below. [](https://i.stack.imgur.com/A9YFp.png) 1. Enable ViewBinding or Databinding in App Level Gradle File inside android tag. > viewBinding{ enabled = true } [](https://i.stack.imgur.com/EDZy5.png) 1. if you not aware on viewBinding, please learn that (which is pretty simple to understand.) 2. now you have to change the UserItem into below in NewMessageActivity.kt, //item with viewBinding. class UserItem(val user: User): BindableItem<UserRowNewMessageBinding>() { // Other implementations... override fun bind(viewBinding: UserRowNewMessageBinding, position: Int) { viewBinding.usernameTextviewNewMessage.text = user.username Picasso.get() .load(user.profileImageUrl) .into(viewBinding.imageviewNewMessage) } override fun getLayout(): Int = R.layout.user_row_new_message override fun initializeViewBinding(view: View): UserRowNewMessageBinding { return UserRowNewMessageBinding.bind(view) } } - - - 1. Change the initialization of GroupieAdapter inside fetchUser() in newMessageActivity.kt. like below val adapter = GroupieAdapter() //remove the Generic Type here. which is no longer need. DON'T FORGET TO ONCE YOU CHANGE ANYTHING IN FILES. , If you are new to , always get learn from some latest version of videos,blogs or atleast less 2 years old videos/blogs.
null
CC BY-SA 4.0
null
2022-11-12T07:30:39.910
2022-11-12T07:30:39.910
null
null
14,682,570
null
74,411,387
2
null
74,411,052
0
null
You can change into this ``` private void EqualsButton_Click(object sender, EventArgs e) { try { OutputTextBox.Text = ($"{ Convert.ToInt32(InputTextBoxA.Text.Trim() == "" ? "0" : InputTextBoxA.Text) + Convert.ToInt32(InputTextBoxB.Text.Trim() == "" ? "0" : InputTextBoxB.Text)}"); } catch(exception ex) { MessageBox.Show("Enter Valid number")' } } ```
null
CC BY-SA 4.0
null
2022-11-12T08:18:28.593
2022-11-12T08:23:47.573
2022-11-12T08:23:47.573
18,704,952
18,704,952
null
74,411,989
2
null
74,398,622
0
null
Find it in hugo [https://discourse.gohugo.io/t/how-to-add-image-to-hugo-with-local-and-remote/41391/8](https://discourse.gohugo.io/t/how-to-add-image-to-hugo-with-local-and-remote/41391/8) The answer is change the conf file. ``` [[module.mounts]] source = 'static' target = 'static' [[module.mounts]] source = 'images' target = 'static/images' ```
null
CC BY-SA 4.0
null
2022-11-12T10:07:07.953
2022-11-12T10:07:07.953
null
null
18,160,216
null
74,412,098
2
null
74,410,669
0
null
try: ``` =INDEX(1*SPLIT(A1:A10; " ");;1) ``` and set formatting to Date
null
CC BY-SA 4.0
null
2022-11-12T10:27:54.337
2022-11-12T10:27:54.337
null
null
5,632,629
null
74,412,733
2
null
8,197,559
0
null
To get the hex values instead of the plot you can use: ``` hue_pal()(3) ``` Instead of this code: ``` show_col(hue_pal()(3)) ```
null
CC BY-SA 4.0
null
2022-11-12T11:58:53.280
2022-11-16T10:17:53.353
2022-11-16T10:17:53.353
16,631,565
20,485,410
null
74,412,737
2
null
66,603,953
0
null
This should work for Records Columns. ``` let ExpandIt = (TableToExpand as table, optional ColumnName as text) => let ListAllColumns = Table.ColumnNames(TableToExpand), ColumnsTotal = Table.ColumnCount(TableToExpand), CurrentColumnIndex = if (ColumnName = null) then 0 else List.PositionOf(ListAllColumns, ColumnName), CurrentColumnName = ListAllColumns{CurrentColumnIndex}, CurrentColumnContent = Table.Column(TableToExpand, CurrentColumnName), IsExpandable = if List.IsEmpty(List.Distinct(List.Select(CurrentColumnContent, each _ is record))) then false else true, FieldsToExpand = if IsExpandable then Record.FieldNames(List.First(List.Select(CurrentColumnContent, each _ is record))) else {}, ColumnNewNames = List.Transform(FieldsToExpand, each CurrentColumnName &"."& _), ExpandedTable = if IsExpandable then Table.ExpandRecordColumn(TableToExpand, CurrentColumnName, FieldsToExpand, ColumnNewNames) else TableToExpand, NextColumnIndex = CurrentColumnIndex+1, NextColumnName = ListAllColumns{NextColumnIndex}, OutputTable = if NextColumnIndex > ColumnsTotal-1 then ExpandedTable else @fx_ExpandIt(ExpandedTable, NextColumnName) in OutputTable in ExpandIt ``` This basically takes Table to Transform as the main argument,and then one by one checks if the Column Record is expandable (if column has "records" in it, it will expand it, otherwise move to next column and checks it again). Then it returns the Output table once everything is expanded. This function is calling the function from inside for each iteration.
null
CC BY-SA 4.0
null
2022-11-12T11:59:31.913
2022-11-12T11:59:31.913
null
null
15,414,213
null
74,413,017
2
null
69,966,691
0
null
Please add filter in theme function file Ex. add_filter( 'woocommerce_order_item_permalink', '__return_false' );
null
CC BY-SA 4.0
null
2022-11-12T12:42:07.497
2022-11-12T12:42:07.497
null
null
17,253,780
null
74,413,227
2
null
36,345,377
0
null
Check1: Remove line space from the application.properties file. ``` spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/javatechie spring.datasource.username=root spring.datasource.password=mypass spring.jpa.show-sql=true spring.jpa.hibernate.ddl-auto=update, spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect server.port=9191 ``` Check2: Or make sure @Id annotation is in POJO(entity) class. Check3: verify username and password and privileges on the database. MySQL version is 8.0.31.
null
CC BY-SA 4.0
null
2022-11-12T13:12:42.297
2022-11-12T13:12:42.297
null
null
11,299,472
null
74,413,291
2
null
74,412,878
1
null
You can clone the `Radio` element and extend it with props: ``` setAnswers( answers.map((item, id) => { return React.cloneElement(props.answerComp, { name: item.questId, key: id + 1 }); }) ); ``` Or even add the key to only a wrapping React.Fragment: ``` return <Fragment key={id + 1}> {React.cloneElement(props.answerComp, { name: item.questId })}. </Fragment>; ``` You'll need to pass the component prop as `answerComp={Radio}`. Note that if the answers can be added, deleted or reordered then you should use a better key, `item.questId` for example, instead of the index.
null
CC BY-SA 4.0
null
2022-11-12T13:20:47.040
2022-11-12T13:20:47.040
null
null
749,523
null
74,413,499
2
null
74,410,936
1
null
There are numerous data type issues with the way you've written the algorithm. The following are some helpful tips to assist you in your endeavor... - All the binary values are written in Big Endian, whereas the for loop is written expecting Little Endian.- The line `r[0] = n[i]` is not doing what you think. Try a simple experiment as follows, and you will see that x does not change as expected... ``` x = "abcd" x[3] = "e" console.log( x ) // x is still "abcd" ``` - The line `if (r >= d)` is performing a string comparison rather than numeric comparison. This will lead to erroneous results. For example, consider... ``` console.log( "11" >= "01111" ) console.log( parseInt( "11", 2 ) >= parseInt( "01111", 2 ) ) ``` - The line `r = String(r - d)` is attempting to substract 2 strings which Javascript will attempt to coerce to Numbers, unless the strings are preceded by "0b" in which case the coercion will interpret the strings as binary numbers. ``` console.log( 'abcd' - 'efghi' ) // NaN console.log( '1100' - '0100' ) // Decimal result of one thousand. console.log( '0b1100' - '0b0100' ) // Proper binary result of 8 (0b1000). ``` - The line `q[i] = 1` suffers the same issue as noted in the second bullet.
null
CC BY-SA 4.0
null
2022-11-12T13:50:44.037
2022-11-12T13:50:44.037
null
null
7,696,162
null
74,413,651
2
null
70,663,255
0
null
It seems that you have a custom User model inside the core app. Be sure you have [substituted your User model](https://docs.djangoproject.com/en/4.1/topics/auth/customizing/#substituting-a-custom-user-model) inside settings.py: ``` AUTH_USER_MODEL = 'myapp.MyUser' ``` Would be 'core.User' in your case, I believe. Then to [reference your custom user model](https://docs.djangoproject.com/en/4.1/topics/auth/customizing/#referencing-the-user-model) you can possibly: ``` from rest_framework import serializers from django.conf import settings from core import models class userSerializer(serializers.ModelSerializer): class Meta: fields=( 'id', 'username') model=settings.AUTH_USER_MODEL ``` or ``` from rest_framework import serializers from django.contrib.auth import get_user_model from core import models class userSerializer(serializers.ModelSerializer): class Meta: fields=( 'id', 'username') model=get_user_model() ```
null
CC BY-SA 4.0
null
2022-11-12T14:12:41.073
2022-11-14T18:08:03.190
2022-11-14T18:08:03.190
17,562,044
7,100,120
null
74,413,665
2
null
74,409,754
1
null
After rebooting and restarting excel, actually I could not reproduce the error. It works fine with the Lambda function now.
null
CC BY-SA 4.0
null
2022-11-12T14:14:22.493
2022-11-12T14:14:22.493
null
null
4,658,181
null
74,414,183
2
null
20,837,773
0
null
Blank out the field from the client side using something like this in your markup/cshtml file : ``` <script> // Blank out the 1/1/0001 12:00 AM from the date field $('#RevisionDate').val(""); </script> ```
null
CC BY-SA 4.0
null
2022-11-12T15:25:18.227
2022-11-12T15:25:18.227
null
null
2,009,880
null
74,414,389
2
null
74,414,272
4
null
One option would be to convert your list of quoted strings to symbols using `sym`: ``` library(ggplot2) plotterOld <- function(...) { args <- lapply(list(...), function(x) if (!is.null(x)) sym(x)) pointAes <- do.call(aes, args = args) ggplot(mpg, aes(displ, cty)) + geom_point(mapping = pointAes) } ``` And we could simplify even further by using `!!!` to get rid of `do.call`: ``` plotterOld <- function(...) { args <- lapply(list(...), function(x) if (!is.null(x)) sym(x)) ggplot(mpg, aes(displ, cty)) + geom_point(mapping = aes(!!!args)) } ``` ``` plotterOld(colour = "cyl", size = "year") ``` ![](https://i.imgur.com/IBWEIaZ.png) ``` plotterOld(colour = "cyl", size = NULL) ``` ![](https://i.imgur.com/tmV31M0.png) ``` plotterOld() ``` ![](https://i.imgur.com/LA1YMFK.png)
null
CC BY-SA 4.0
null
2022-11-12T15:53:20.957
2022-11-12T16:00:04.233
2022-11-12T16:00:04.233
12,993,861
12,993,861
null
74,414,473
2
null
74,414,272
3
null
You can use `ensyms` to convert named string arguments to named symbol arguments, so the equivalent to your old plotting function could be ``` library(ggplot2) plotterNew <- function(...) { ggplot(mpg, aes(displ, cty)) + geom_point(mapping = aes(!!!ensyms(...))) } plotterNew(colour = "cyl", size = "year") ``` ![](https://i.imgur.com/dApjtvW.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2022-11-12T16:02:49.633
2022-11-12T16:02:49.633
null
null
12,500,315
null
74,414,800
2
null
14,042,955
1
null
In the Binary search tree implementation for strings, the strings are stored in lexicographical order. For instance, if there are three alphabets ('K', 'I', and 'N') that are stored in different string data types and are inserted in the same order, then 'K' will be the parent node with 'I' as its left child and 'N' as its right child because 'I' comes before 'K' and 'N' comes after 'K' in alphabetical order (Figure: 1). Same goes for the words: "Linked" will be stored as the left child of "List" or "List" will be stored as the right child of "Linked" depending on the order we are inserting them into the tree. ``` using System; using System.Collections.Generic; namespace BSTString { public class BinaryStringSearchTree { // Private class so that it cannot be accessed outside of parent class private class Node { // Data field of the node public string _data; // Stores address of left child public Node _leftNode; // Stores address of right child public Node _rightNode; /// <summary> /// Constructor /// </summary> /// <param name="data"></param> public Node(string data) { this._data = data; // String is stored in the data field of the node this._rightNode = this._leftNode = null; // Right and left child are set to null } } // Stores the root of the tree private Node root; /// <summary> /// Constructor /// Root is set as null /// </summary> public BinaryStringSearchTree() { root = null; } /// <summary> /// Constructor /// </summary> /// <param name="value"></param> // Value which is to be stored in root public BinaryStringSearchTree(string value) { // Creates a new node with value and stores into root root = new Node(value); } /// <summary> /// Function to call insertString() function /// </summary> /// <param name="data"></param> public void insert(string data) { // Inserting data into tree root = insertString(root, data); } /// <summary> /// Private recursive function which is called to insert data into the tree /// </summary> /// <param name="root"></param> /// <param name="data"></param> /// <returns></returns> private Node insertString(Node root, string data) { // Base Case: // If the tree is empty if (root == null) { // Data is stored at root root = new Node(data); // root node is returned return root; } /* * string.Compare(a, b) function will return * 0 if a is equal to b * 1 if a is greater than b * -1 if a is smaller than b */ // -- Recursively moving down the tree -- // If data stored at root is greater then the data if (string.Compare(root._data, data) > 0) { root._leftNode = insertString(root._leftNode, data); } // If data stored at root is smaller then the data else if (string.Compare(root._data, data) < 0) { root._rightNode = insertString(root._rightNode, data); } return root; } /// <summary> /// Function to call deleteString() function /// </summary> /// <param name="data"></param> public void delete(string data) { root = deleteNode(root, data); } /// <summary> /// Private recursive function which is called to delete data from the tree /// </summary> /// <param name="root"></param> /// <param name="data"></param> /// <returns></returns> private Node deleteNode(Node root, string data) { // Base case: // If the tree is empty if (root == null) { return root; } // -- Recursively moving down the tree -- // If data stored at root is greater then the data if (string.Compare(root._data, data) > 0) { root._leftNode = deleteNode(root._leftNode, data); } // If data stored at root is smaller then the data else if (string.Compare(root._data, data) < 0) { root._rightNode = deleteNode(root._rightNode, data); } // If data stored at root is same as the data else { // Base case // If the node does not have right or left child if (root._leftNode == null && root._rightNode == null) { return null; } // Node with only one child if (root._rightNode == null) { return root._leftNode; } else if (root._leftNode == null) { return root._rightNode; } // Node which has two children // Finds In-Order Sucessor - smallest in the right subtree Node inodrsuc = inOrderSucessor(root._rightNode); // Replacing the In-Order sucessor of root with data of root root._data = inodrsuc._data; // Delete the In-Order Sucessor root._rightNode = deleteNode(root._rightNode, root._data); } return root; } /// <summary> /// Function to find smallest element in the left subtree /// </summary> /// <param name="root"></param> /// <returns></returns> private Node inOrderSucessor(Node inOrder) { // Loop runs till leaf node while (inOrder._leftNode != null) { inOrder = inOrder._leftNode; } return inOrder; } /// <summary> /// Function to call searchTree() function /// </summary> /// <param name="data"></param> String which is to be searched /// <returns></returns> public string search(string data) { Node result = searchTree(root, data); // Data does not exist int the tree if (result == null) { return "Not Found"; } return result._data; } /// <summary> /// Private recursive function to search for a particular node in a tree /// </summary> /// <param name="root"></param> Root of the tree /// <param name="data"></param> String which is to be searched /// <returns></returns> private Node searchTree(Node root, string data) { // Base Case: root is null // or data stored at root is equal to string which is to be searched if (root == null || string.Compare(root._data, data) == 0) { return root; } // -- Recursively moving down the tree -- // Data stored at root is smaller than the string which is to be searched if (string.Compare(root._data, data) < 0) { return searchTree(root._rightNode, data); } // Data stored at root is greater than the string which is to be searched else { return searchTree(root._leftNode, data); } } /// <summary> /// Function to call private inOrder() function /// </summary> public void inOrder() { inOrder(root); } /// <summary> /// -- In-Order traversal -- /// Traverse left subtree recursively /// Visite root node /// traverse right subtree resursively /// </summary> /// <param name="root"></param> private void inOrder(Node root) { if (root != null) { inOrder(root._leftNode); Console.WriteLine(root._data); inOrder(root._rightNode); } } /// <summary> /// Function to call private preOrder() function /// </summary> public void preOrder() { preOrder(root); } /// <summary> /// -- Pre-Order Traverse -- /// Visit root node /// Traverse left subtree recursively /// Traverse right subtree resursively /// </summary> /// <param name="root"></param> private void preOrder(Node root) { if (root != null) { Console.WriteLine(root._data); preOrder(root._leftNode); preOrder(root._rightNode); } } /// <summary> /// Function to call private postOrder() function /// </summary> public void postOrder() { postOrder(root); } /// <summary> /// -- Post-Order Traversal -- /// Traverse left subtree recursively /// Traverse right subtree recursively /// Visite root node /// </summary> /// <param name="root"></param> private void postOrder(Node root) { if (root != null) { postOrder(root._leftNode); postOrder(root._rightNode); Console.WriteLine(root._data); } } /// <summary> /// Printing level order traversal using iterative approach /// Referenced from: https://www.geeksforgeeks.org/print-level-order-traversal-line-line/ /// </summary> public void printTree() { // Base Case // Tree is empty if (root == null) { return; } // Empty queue for level Queue<Node> queue = new Queue<Node>(); queue.Enqueue(root); while (true) { int nodeCount = queue.Count; //number of nodes at current level if (nodeCount == 0) { break; } while (nodeCount > 0) { Node node = queue.Peek(); Console.Write(node._data + " "); queue.Dequeue(); if (node._leftNode != null) { queue.Enqueue(node._leftNode); } if (node._rightNode != null) { queue.Enqueue(node._rightNode); } nodeCount--; } Console.WriteLine(); } } } class Test { static void Main(string[] args) { // Creating an instance of BinaryStringSearchTree class BinaryStringSearchTree tree = new BinaryStringSearchTree(); // Inserting element tree.insert("Karen"); tree.insert("Bob"); tree.insert("Tom"); // Print tree Console.WriteLine("Printing tree"); tree.printTree(); Console.WriteLine(); } } ``` }
null
CC BY-SA 4.0
null
2022-11-12T16:48:17.480
2022-11-12T16:48:57.390
2022-11-12T16:48:57.390
16,510,782
16,510,782
null
74,415,018
2
null
74,410,669
0
null
To do this with `query()`, use the `toDate()` [scalar function](https://developers.google.com/chart/interactive/docs/querylanguage#scalar-functions): `=query(A1:A, "select toDate(A) label toDate(A) '' ", 0)`
null
CC BY-SA 4.0
null
2022-11-12T17:19:49.880
2022-11-12T17:19:49.880
null
null
13,045,193
null
74,416,403
2
null
74,409,754
0
null
Whole different approach, but how about: ``` =LET(f,ISNUMBER(C:C), c,FILTER(C:C,f), d,FILTER(D:D,f), s,SEQUENCE(COUNTA(d)), MMULT( (d=TRANSPOSE(d))*(s>=TRANSPOSE(s)), c)) ``` It first creates an array of `TRUE`'s and `FALSE`'s on column C:C if it contains a number. This is used to filter the values to be used from column C and D. A sequence of the count of filtered values in column C is used to simulate it's row number in that filtered range. Now `MMULT` checks row by row how many values of column D equal it's current value where the sequence number for that "row" is smaller or equal than the current. [](https://i.stack.imgur.com/NIBiM.jpg)
null
CC BY-SA 4.0
null
2022-11-12T20:39:32.450
2022-11-12T20:39:32.450
null
null
12,634,230
null
74,416,879
2
null
74,416,845
1
null
you have to cast it to the correct type first ``` var custom = (CustomPin)pin; if (custom.Name == "...") ```
null
CC BY-SA 4.0
null
2022-11-12T21:54:28.143
2022-11-12T21:54:28.143
null
null
1,338
null
74,417,120
2
null
31,254,533
2
null
I'm several years late to the party but I thought of leaving the solution that worked for me (with ggplot 3.3.6). My solution involved using ggplots's own empty theme called `theme_void()` and hiding the legend (as you had already done). to stretch the graph to fill the entire canvas, I simply used the `expand = c(0,0)` parameter for both the x and y axes, and Viola! [](https://i.stack.imgur.com/dOZqd.png) Here is the R code specific for generating the plot using ggplot: ``` df=as.data.frame(points) ggplot(data=df, aes(V1, V2, color=cl[V3]))+ geom_point() + scale_colour_manual(values = sort(c("#00000000", rainbow(35)), decreasing=FALSE))+ scale_x_continuous(expand=c(0,0))+ scale_y_continuous(expand=c(0,0))+ theme_void()+ theme(legend.position = "none") ```
null
CC BY-SA 4.0
null
2022-11-12T22:41:47.887
2022-11-12T22:41:47.887
null
null
4,053,112
null
74,417,176
2
null
64,283,237
1
null
Here's my solution to implementing a modern, rounded scrollbar. `::-webkit-scrollbar` is a pseudo-element in CSS employed to modify the look of a browser’s scrollbar. Chrome, Edge, and Safari support this standard while Firefox doesn't. The code: ``` /* width */ /* set the width of the scrollbar */ ::-webkit-scrollbar { width: 10px; } /* Handle */ /* set the color of the scrollbar and the radius of its corners */ ::-webkit-scrollbar-thumb { background: rgb(150, 150, 150); border-bottom-left-radius: 5px; border-top-left-radius: 5px; border-bottom-right-radius: 5px; border-top-right-radius: 5px; } /* Handle on hover */ /* set the color of the scrollbar when hovered over */ ::-webkit-scrollbar-thumb:hover { background: rgb(131, 131, 131); } /* Handle on active */ /* set the color of the scrollbar when clicked */ ::-webkit-scrollbar-thumb:active { background: rgb(104, 104, 104); } ``` ``` <!DOCTYPE html> <html> <head> <title>Page Title</title> </head> <body> <h1>Rounded Scrollbar Example</h1> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> <p>Filler text</p> </body> </html> ```
null
CC BY-SA 4.0
null
2022-11-12T22:53:08.193
2022-11-15T22:47:26.973
2022-11-15T22:47:26.973
12,352,865
19,637,822
null
74,418,006
2
null
74,418,005
1
null
With the new routing convention, the contents of `api/sign-in.ts` need to be moved to `api/sign-in/+server.ts`. Once in the new file, they need to be wrapped in the method(s) you need for the route. An simple example of the syntax for a `POST` request route is: ``` export async function POST({ request }: { request: Request }) { const { email, password } = await request.json(); // ... // Insert your real logic here // ... // An example of a simple response return new Response(JSON.stringify({ message: "Hello world!" }, { status: 200 }); } ``` So you would just need to drop your authentication logic into the new file with the correct wrapper, whether that is `GET`, `POST`, `PUT`, etc. Note that the endpoints are required to be all caps now, more information is available [here](https://github.com/sveltejs/kit/discussions/5359).
null
CC BY-SA 4.0
null
2022-11-13T02:16:17.910
2022-11-13T02:16:17.910
null
null
6,456,163
null
74,418,055
2
null
69,709,251
0
null
I had the same error and I don't know how the solution that I'll explain solved I was naming the project as "Joining Data with pandas", "joining_data_with_pandas" but when I changed the name to "joiningDataPandas", it works with no error. I think it may be a bug from the ide or something, because if I tried to create a new project with the old name that has spaces or "_" the error will be back, but with writing the project name with the camelCase, there is no error.
null
CC BY-SA 4.0
null
2022-11-13T02:29:19.297
2022-11-13T02:29:19.297
null
null
6,462,376
null
74,418,498
2
null
64,856,728
1
null
I had a similar problem with some Dash/Plotly charts and y axis label being truncated or hidden. There didn't seem to be much information or documentation on this issue, so it took a while to solve. Solution: Instead of changing the x axis range, you can add this code to the layout settings to prevent truncation of the y axes labels: ``` fig.update_layout( yaxis=dict( automargin=True ) ) ``` or you can update the yaxes setting specifically: ``` fig.update_yaxes(automargin=True) ``` Update: I tried another version of Plotly (5.10 or above) which mentions setting the automargin setting to any combination of automargin=['left+top+right+bottom'] with similar results. This still seems a bit unstable and doesn't solve all possible scenarios or corner cases, but works fine in most cases, especially when the browser window is maximized.
null
CC BY-SA 4.0
null
2022-11-13T04:39:04.120
2022-11-13T04:39:04.120
null
null
13,064,727
null
74,418,828
2
null
44,661,108
0
null
In mycase after commenting or removing the below line, it worked! 1. Goto: C:\ProgramData\Jenkins.jenkins\config.xml 2. Remove the below line in config.xml: enter image description here
null
CC BY-SA 4.0
null
2022-11-13T06:01:47.797
2022-11-13T06:19:11.747
2022-11-13T06:19:11.747
13,293,310
13,293,310
null
74,418,860
2
null
74,418,764
0
null
don use `reset_index` ``` df.groupby(['day','sex'])['tip'].sum().unstack('sex') ``` If this does not solve problem, make a simple example and upload it as text instead of image.
null
CC BY-SA 4.0
null
2022-11-13T06:07:50.257
2022-11-13T06:07:50.257
null
null
20,430,449
null
74,418,927
2
null
74,418,918
0
null
Just place the expression in double parenthesis for example `$((your_expression))` ``` while read Plate City Town Village Area Population; do echo "$Plate $City $Town $Village $Area $Population" printf "\n$totalNumberOfTowns\n " totalNumberOfTowns=$((totalNumberOfTowns + Town)) totalNumberOfVillages=$((totalNumberOfVillages + Village)) done < "cities.txt" ```
null
CC BY-SA 4.0
null
2022-11-13T06:26:24.570
2022-11-13T06:36:38.443
2022-11-13T06:36:38.443
12,906,648
12,906,648
null
74,418,969
2
null
74,418,918
0
null
I know even three ways to calculate in bash: ### Command expr (operators: +, -, *, /, %, (, ); and logic operators: <, <=, ==, !=, >=, >) expr 2 * 3 (the spaces and '' sign before operator are important) or a=5; a=$(expr $a + 1) ### Syntax (( <expression> )) - all operators known in C language a=0; a=$((a+1)) ### Command let x=0; let "x += 2"
null
CC BY-SA 4.0
null
2022-11-13T06:35:03.667
2022-11-13T06:35:03.667
null
null
14,914,074
null
74,419,026
2
null
58,364,308
0
null
I have the same problem. I have the depencancies set up, oAuth links, key hashes etc. But once I click continue with... it just loads forever. My code is consistant with the guide for firebase auth ui. I did notice some errors in logcat though: ``` {HttpStatus: 400, errorCode: 190, subErrorCode: -1, errorType: OAuthException, errorMessage: Invalid OAuth access token type.} E Failed to find provider info for com.facebook.katana.provider.AttributionIdProvider E Failed to find provider info for com.facebook.katana.provider.PlatformProvider W Ignoring header X-Firebase-Locale because its value was null. W Cleared Reference was only reachable from finalizer (only reported once) ``` I also updated the manifest with the query providers as logcat suggested. I have also tried to run it on a real device and deleting the app and running it again.
null
CC BY-SA 4.0
null
2022-11-13T06:49:33.923
2022-11-13T06:49:33.923
null
null
20,102,841
null
74,419,100
2
null
74,418,918
1
null
You can also use variables with [an integer attribute](https://www.gnu.org/software/bash/manual/html_node/Bash-Builtins.html#index-declare): ``` #!/usr/bin/env bash declare -i totalNumberOfTowns=0 totalNumberOfVillages=0 while read Plate City Town Village Area Population; do printf "%s %s %s %s %s %s\n" "$Plate" "$City" "$Town" "$Village" "$Area" "$Population" totalNumberOfTowns+=$Town totalNumberOfVillages+=$Village done < "cities.txt" printf "Total towns: %d\nTotal villages: %d\n" "$totalNumberOfTowns" "$totalNumberOfVillages" ```
null
CC BY-SA 4.0
null
2022-11-13T07:05:33.977
2022-11-13T07:05:33.977
null
null
9,952,196
null
74,419,177
2
null
74,418,918
1
null
You have to ignore first line. ``` #!/usr/bin/env bash average=0 numberOfCities=80 declare -i totalNumberOfTowns=0 totalNumberOfVillages=0 arrayWithOut="" { read -r first_line while read -r Plate City Town Village Area Population; do echo "$Plate $City $Town $Village $Area $Population" printf "\n$totalNumberOfTowns\n " totalNumberOfTowns+=$Town totalNumberOfVillages+=$Village done } < "cities.txt" ```
null
CC BY-SA 4.0
null
2022-11-13T07:23:30.490
2022-11-13T07:23:30.490
null
null
9,072,753
null
74,419,198
2
null
74,419,163
2
null
Use the `g0` format specifier to create the shortest possible representation of a number. ``` program FortranMulTableConsole use, intrinsic :: iso_fortran_env implicit none integer(kind=int64) :: a, b print *, "Input a number : " read(*,*) a do b = 1, 10 print '(g0," * ",g0," = ",g0)', a, b, a*b end do print *, " " do b = 1, 10 print '(g0," ** ",g0," = ",g0)', a, b, a**b end do ! system("pause") contains end program FortranMulTableConsole ``` results in ``` Input a number : 8 8 * 1 = 8 8 * 2 = 16 8 * 3 = 24 8 * 4 = 32 8 * 5 = 40 8 * 6 = 48 8 * 7 = 56 8 * 8 = 64 8 * 9 = 72 8 * 10 = 80 8 ** 1 = 8 8 ** 2 = 64 8 ** 3 = 512 8 ** 4 = 4096 8 ** 5 = 32768 8 ** 6 = 262144 8 ** 7 = 2097152 8 ** 8 = 16777216 8 ** 9 = 134217728 8 ** 10 = 1073741824 ```
null
CC BY-SA 4.0
null
2022-11-13T07:28:44.250
2022-11-13T07:28:44.250
null
null
380,384
null
74,420,098
2
null
74,419,964
0
null
Try settings the data directly to the products state (remove the array) like ths: ``` const [products,setProducts] = useState(data); ```
null
CC BY-SA 4.0
null
2022-11-13T10:22:53.610
2022-11-13T10:41:50.557
2022-11-13T10:41:50.557
9,719,646
9,719,646
null
74,420,310
2
null
74,419,964
0
null
few pointer the may help ``` transform the reponse and filter the items as needed const { loading, error, data = [] } = useQuery(GET_CLOTHES); const [products,setProducts] = useState(data); const [index,setIndex] = useState(0) const transformedResponse = useMemo(() => { try { // put checks and use try catch to handle errors const productsList = []; // check for null data const items = data ?? [] for (const category of items) { const products = category?.products ?? []; productsList.push(...products) } return productsList } catch(error) { // log error return [] } }, [data)] return ( ... { transformedResponse.map(prod => { return (<Prod key={prod.id} {...prod} />) } } ) ``` Docs on [working with arrays](https://beta.reactjs.org/learn/updating-arrays-in-state) Hope it helps
null
CC BY-SA 4.0
null
2022-11-13T10:59:50.760
2022-11-13T11:28:51.370
2022-11-13T11:28:51.370
2,122,822
2,122,822
null
74,420,655
2
null
74,312,856
0
null
You must write src="~/Image/@item.ImagePath" ``` @foreach (var item in Model) { <tr> <td><img src="~/Image/(????)" width="100",height="250"/></td></td> } ```
null
CC BY-SA 4.0
null
2022-11-13T11:48:30.110
2022-11-13T11:48:30.110
null
null
1,378,101
null
74,422,031
2
null
55,801,008
0
null
I am using vs Code . .net version 6. Removing below line from launchSettings.json worked for me > "sslPort": 44308 <-- Remove this. I run the project with > dotnet run --urls "http://localhost:5100"
null
CC BY-SA 4.0
null
2022-11-13T14:53:22.307
2022-11-13T14:53:22.307
null
null
20,493,417
null
74,422,401
2
null
74,419,723
0
null
You're creating your model with: ``` val hackathonModel = HackathonModel(binding.HackTitleET.text.toString() , binding.HackUrlET.text.toString() , binding.HackLocationET.text.toString(), imageUri.toString() ) ``` That last argument is `imageUri.toString()`, which is the path to the image on your local Android device, and the download URL that you told Firebase to generate for you. To get the latter: ``` fileRef.downloadUrl.addOnSuccessListener { task -> binding.progressBar.visibility = View.VISIBLE if (task.isSuccessful) { val downloadUri = task.result val hackathonModel = HackathonModel(binding.HackTitleET.text.toString() , binding.HackUrlET.text.toString() , binding.HackLocationET.text.toString(), downloadUri.toString() ) ... ``` Also see the Firebase documentation on [getting the download URL after uploading a file](https://firebase.google.com/docs/storage/android/upload-files#get_a_download_url).
null
CC BY-SA 4.0
null
2022-11-13T15:40:18.347
2022-11-13T15:40:18.347
null
null
209,103
null
74,423,648
2
null
73,246,951
1
null
Actually `na.rm` is not a function for you to call. It is an argument that is used inside some built-in functions such as `mean()`, `sd()`, `var()` etc. If you want to remove missing (`NA` values) from a data set (vector, matrix, data frame, tibble etc.) you may use `na.omit` for it is a base function. See the example below: ``` x <- c(2, 3, 5, NA, 5, NA) mean(x, na.rm=TRUE) [1] 3.75 ``` As you can see, the mean of `x` vector is calculated excluding the missing values.
null
CC BY-SA 4.0
null
2022-11-13T18:33:57.300
2022-11-13T18:33:57.300
null
null
6,582,929
null
74,423,770
2
null
74,418,918
0
null
And a viable (and most likely quicker) `awk` alternative. ``` awk ' NR==1{print} NR>1{a+=$3;b+=$4;print} END{ print "Total number of towns:",a print "Total number of villages:",b }' cities.txt ```
null
CC BY-SA 4.0
null
2022-11-13T18:46:31.763
2022-11-13T18:46:31.763
null
null
1,394,729
null
74,424,353
2
null
74,414,272
3
null
The answers of Stefan suggesting `sym()` and Allan Cameron suggesting `ensyms()` both really helped point me in the right direction for understanding this problem, so all credit to them. This answer compares both approaches and adds a third approach with `data_sym()` Two behaviours of aes_string, seen below, I was able to replicate using sym(), but not with ensyms() 1. aes_string can accept NULL as an argument's value, 2. aes_string can use strings already stored in objects ``` library(rlang) library(ggplot2) plotterAesString <- function(...) { pointAes <- do.call(aes_string, args = list(...)) ggplot(mpg, aes(displ, cty)) + geom_point(mapping = pointAes) } colourObject <- "cyl" plotterAesString(colour = colourObject, size = NULL, shape = "drv") #> Warning: `aes_string()` was deprecated in ggplot2 3.0.0. #> ℹ Please use tidy evaluation ideoms with `aes()` ``` ![](https://i.imgur.com/wzgnLcI.png) Stefan's suggestion of sym() led me to this approach, which seems to be a pretty great replacement for the use of aes_string ``` plotterSym <- function(...) { args <- list(...) args <- lapply(args, function(x) if (is_string(x)) sym(x) else x) ggplot(mpg, aes(displ, cty)) + geom_point(mapping = aes(!!!args)) } plotterSym(colour = colourObject, size = NULL, shape = "drv") ``` ![](https://i.imgur.com/NrVVZXG.png) I post this answer because the data_sym() function from rlang protects against the problem of accidentally matching an environmental variable instead of a data variable. (The original aes_string approach shares this behaviour!) ``` driv <- "misspelled variable?" plotterSym(shape = "driv") ``` ![](https://i.imgur.com/BjkPeWM.png) ``` plotterDataSym <- function(...) { args <- list(...) args <- lapply(args, function(x) if (is_string(x)) data_sym(x) else x) ggplot(mpg, aes(displ, cty)) + geom_point(mapping = aes(!!!args)) } ``` It works just like the sym approach ``` plotterDataSym(colour = colourObject, size = NULL, shape = "drv") ``` ![](https://i.imgur.com/3hlG0IT.png) But errors on misspelled names, which is desirable behaviour for me. ``` plotterDataSym(shape = "driv") #> Error in `geom_point()`: #> ! Problem while computing aesthetics. #> ℹ Error occurred in the 1st layer. #> Caused by error in `.data$driv`: #> ! Column `driv` not found in `.data`. #> Backtrace: #> ▆ #> 1. ├─base::tryCatch(...) #> 2. │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) #> 3. │ ├─base (local) tryCatchOne(...) #> 4. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) #> 5. │ └─base (local) tryCatchList(expr, names[-nh], parentenv, handlers[-nh]) #> 6. │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> 7. │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) #> 8. ├─base::withCallingHandlers(...) #> 9. ├─base::saveRDS(...) #> 10. ├─base::do.call(...) #> 11. ├─base (local) `<fn>`(...) #> 12. ├─global `<fn>`(input = base::quote("pious-rhino_reprex.R")) #> 13. │ └─rmarkdown::render(input, quiet = TRUE, envir = globalenv(), encoding = "UTF-8") #> 14. │ └─knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet) #> 15. │ └─knitr:::process_file(text, output) #> 16. │ ├─base::withCallingHandlers(...) #> 17. │ ├─knitr:::process_group(group) #> 18. │ └─knitr:::process_group.block(group) #> 19. │ └─knitr:::call_block(x) #> 20. │ └─knitr:::block_exec(params) #> 21. │ └─knitr:::eng_r(options) #> 22. │ ├─knitr:::in_input_dir(...) #> 23. │ │ └─knitr:::in_dir(input_dir(), expr) #> 24. │ └─knitr (local) evaluate(...) #> 25. │ └─evaluate::evaluate(...) #> 26. │ └─evaluate:::evaluate_call(...) #> 27. │ ├─evaluate (local) handle(...) #> 28. │ │ └─base::try(f, silent = TRUE) #> 29. │ │ └─base::tryCatch(...) #> 30. │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) #> 31. │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> 32. │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) #> 33. │ ├─base::withCallingHandlers(...) #> 34. │ ├─base::withVisible(value_fun(ev$value, ev$visible)) #> 35. │ └─knitr (local) value_fun(ev$value, ev$visible) #> 36. │ └─knitr (local) fun(x, options = options) #> 37. │ ├─base::withVisible(knit_print(x, ...)) #> 38. │ ├─knitr::knit_print(x, ...) #> 39. │ └─knitr:::knit_print.default(x, ...) #> 40. │ └─evaluate (local) normal_print(x) #> 41. │ ├─base::print(x) #> 42. │ └─ggplot2:::print.ggplot(x) #> 43. │ ├─ggplot2::ggplot_build(x) #> 44. │ └─ggplot2:::ggplot_build.ggplot(x) #> 45. │ └─ggplot2:::by_layer(...) #> 46. │ ├─rlang::try_fetch(...) #> 47. │ │ ├─base::tryCatch(...) #> 48. │ │ │ └─base (local) tryCatchList(expr, classes, parentenv, handlers) #> 49. │ │ │ └─base (local) tryCatchOne(expr, names, parentenv, handlers[[1L]]) #> 50. │ │ │ └─base (local) doTryCatch(return(expr), name, parentenv, handler) #> 51. │ │ └─base::withCallingHandlers(...) #> 52. │ └─ggplot2 (local) f(l = layers[[i]], d = data[[i]]) #> 53. │ └─l$compute_aesthetics(d, plot) #> 54. │ └─ggplot2 (local) compute_aesthetics(..., self = self) #> 55. │ └─ggplot2:::scales_add_defaults(...) #> 56. │ └─base::lapply(aesthetics[new_aesthetics], eval_tidy, data = data) #> 57. │ └─rlang (local) FUN(X[[i]], ...) #> 58. ├─driv #> 59. ├─rlang:::`$.rlang_data_pronoun`(.data, driv) #> 60. │ └─rlang:::data_pronoun_get(...) #> 61. └─rlang:::abort_data_pronoun(x, call = y) #> 62. └─rlang::abort(msg, "rlang_error_data_pronoun_not_found", call = call) ``` A note on my tests of the ensyms approach suggested by Allan Cameron I found this approach can't accept objects containing strings, or NULL arguments and I couldn't find a way to work around these problems with ensyms ``` plotterEnsyms <- function(...) { ggplot(mpg, aes(displ, cty)) + geom_point(mapping = aes(!!!ensyms(...))) } # 1. uses name of object as symbol, instead of converting the string itself plotterEnsyms(colour = colourObject) ``` ![](https://i.imgur.com/49wzY2j.png) ``` # 2. can't accept NULLs, (and ensyms directly uses the args, so NULLs can't be removed first, I think...) plotterEnsyms(size = NULL) #> Error in `sym()`: #> ! Can't convert NULL to a symbol. #> Backtrace: #> ▆ #> 1. └─global plotterEnsyms(size = NULL) #> 2. ├─ggplot2::geom_point(mapping = aes(!!!ensyms(...))) #> 3. │ └─ggplot2::layer(...) #> 4. ├─ggplot2::aes(!!!ensyms(...)) #> 5. │ └─ggplot2:::arg_enquos("x") #> 6. │ └─rlang::eval_bare(expr[[2]][[2]][[2]], env) #> 7. └─rlang::ensyms(...) #> 8. └─rlang:::map(...) #> 9. └─base::lapply(.x, .f, ...) #> 10. └─rlang (local) FUN(X[[i]], ...) #> 11. └─rlang::sym(expr) #> 12. └─rlang:::abort_coercion(x, "a symbol") #> 13. └─rlang::abort(msg, call = call) ``` [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2022-11-13T20:06:59.297
2022-11-13T20:06:59.297
null
null
9,005,116
null
74,425,750
2
null
74,421,795
0
null
Since the only use (that I can c) for `ticket` is in the subquery with the `MAX`, can you move that into the subquery? These indexes may help: ``` APDMD: INDEX(DAYS_TO_DEMAND_ARREARS) CC: INDEX(FROM_DPD, TO_DPD, STAGE, SUB_CLASSIFICATION, TO_DPD) ticket_T: INDEX(ACCID, TICKETID) app_dms_daily: INDEX(CUST_ID, CLR_BAL_AMT) tickethistory: INDEX(TICKETID, TICKETHISTORYID) tickethistory: INDEX(tickethistoryid, resolutiondescription) ``` `OFFSET` is terribly inefficient for pagination. Normally I [recommend that you remember where you left off](http://mysql.rjweb.org/doc.php/pagination), but that may not be practical with all those `JOINs`.
null
CC BY-SA 4.0
null
2022-11-14T00:02:27.810
2022-11-14T00:02:27.810
null
null
1,766,831
null
74,425,867
2
null
69,326,962
1
null
# In case you can't use HTML elements like iframe I made an API which gets the video's thumbnail, then adds a play button and backdrop to it. ## You can use it in markdown like this: ``` [![](https://markdown-videos.deta/youtube/{video_id})](https://youtu.be/{video_id}) ``` Clicking on the image will open the video in your browser. ## Demo: ``` [![](https://markdown-videos.deta.dev/youtube/dQw4w9WgXcQ)](https://youtu.be/dQw4w9WgXcQ) ``` [](https://youtu.be/dQw4w9WgXcQ) GitHub repo can be found here -> [https://github.com/Snailedlt/Markdown-Videos](https://github.com/Snailedlt/Markdown-Videos)
null
CC BY-SA 4.0
null
2022-11-14T00:29:00.023
2023-01-09T15:50:48.883
2023-01-09T15:50:48.883
12,206,312
12,206,312
null
74,425,958
2
null
74,425,911
1
null
use: ``` =IFNA(INDEX(VLOOKUP(A1:A*1, { 0, "night"; "6:00:00" *1, "morning"; "12:00:00"*1, "afternoon"; "18:00:00"*1, "evening"}, 2, 1))) ```
null
CC BY-SA 4.0
null
2022-11-14T00:52:50.360
2022-11-14T00:52:50.360
null
null
5,632,629
null
74,426,465
2
null
21,739,791
0
null
First of all, you create an empty GameObject which contains MeshFilter, MeshCollider, MeshRenderer, (Rigidbody if u need that for ur usecase). Then you gotta go and put that code what unity provided in the start method of the script. [https://docs.unity3d.com/ScriptReference/Mesh.CombineMeshes.html](https://docs.unity3d.com/ScriptReference/Mesh.CombineMeshes.html) ``` [RequireComponent(typeof(MeshFilter))] [RequireComponent(typeof(MeshRenderer))] public class ExampleClass : MonoBehaviour { void Start() { MeshFilter[] meshFilters = GetComponentsInChildren<MeshFilter>(); CombineInstance[] combine = new CombineInstance[meshFilters.Length]; int i = 0; while (i < meshFilters.Length) { combine[i].mesh = meshFilters[i].sharedMesh; combine[i].transform = meshFilters[i].transform.localToWorldMatrix; meshFilters[i].gameObject.SetActive(false); i++; } transform.GetComponent<MeshFilter>().mesh = new Mesh(); transform.GetComponent<MeshFilter>().mesh.CombineMeshes(combine); transform.gameObject.SetActive(true); } } ``` but you add after CombineMeshes(combine) `transform.GetComponent<MeshCollider>().sharedMesh = transform.GetComponent<MeshFilter>().mesh;` After that your combined mesh has also colliders
null
CC BY-SA 4.0
null
2022-11-14T02:49:36.623
2022-11-14T02:51:26.387
2022-11-14T02:51:26.387
18,188,727
18,188,727
null
74,426,784
2
null
74,426,734
0
null
You can make your `.nested-container` take up more grid sections using `grid-column-start` and `grid-column-end` I see you did this similarly already to the child divs of `.nested-container` but not to `.nested-container` it self. I've added this to `.nested-container` in CSS: ``` grid-column-start: 2; grid-column-end: 5; ``` Working example: ``` .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; grid-template-rows: 0.1fr 1fr 2fr 0.1fr; height: 100vh; width: 100vw; } * { margin: 0; padding: 0; } .header { grid-column-start: 1; grid-column-end: 5; background-color: lightgreen; /* height: 20px; */ } .one { grid-row-start: 2; grid-row-end: 4; background-color: lightpink; } .two { grid-column-start: 2; grid-column-end: 3; grid-row-start: 2; grid-row-end: 3; background-color: lightblue; } .three { grid-column-start: 3; grid-column-end: 4; grid-row-start: 2; grid-row-end: 3; background-color: maroon; } .four { grid-column-start: 4; grid-column-end: 5; grid-row-start: 2; grid-row-end: 3; background-color: burlywood; } .nested-container{ display:grid; grid-template-columns:1fr 1fr; grid-column-start: 2; grid-column-end: 5; } .five{ background-color:blue; grid-column-start:1; grid-column-end:2; } .six{ background-color:red; grid-column-start:2; grid-column-end:3; } .seven{ background-color:green; grid-column-start:1; grid-column-end:3; } ``` ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="container"> <div class="header">header</div> <div class="one">one</div> <div class="two">two</div> <div class="three">three</div> <div class="four">four</div> <div class="nested-container"> <div class="five">five</div> <div class="six">six</div> <div class="seven">seven</div> </div> </div> </body> </html> ``` EDIT: It seems from your updated question the only issue you are having is some whitespace at the bottom of your grid. That's simply due to this code: `grid-template-rows: 0.1fr 1fr 2fr 0.1fr;` in your `.container` Remove the last `0.1fr` and it should be what you are looking for: ``` .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; grid-template-rows: 0.1fr 1fr 2fr; height: 100vh; width: 100vw; } * { margin: 0; padding: 0; } .header { grid-column-start: 1; grid-column-end: 5; background-color: lightgreen; /* height: 20px; */ } .one { grid-row-start: 2; grid-row-end: 4; background-color: lightpink; } .two { grid-column-start: 2; grid-column-end: 3; grid-row-start: 2; grid-row-end: 3; background-color: lightblue; } .three { grid-column-start: 3; grid-column-end: 4; grid-row-start: 2; grid-row-end: 3; background-color: maroon; } .four { grid-column-start: 4; grid-column-end: 5; grid-row-start: 2; grid-row-end: 3; background-color: burlywood; } .nested-container{ display:grid; grid-template-columns:1fr 1fr; grid-template-rows:3fr 0.2fr; grid-column-start: 2; grid-column-end: 5; } .five{ background-color:blue; grid-column-start:1; grid-column-end:2; } .six{ background-color:red; grid-column-start:2; grid-column-end:3; } .seven{ background-color:green; grid-column-start:1; grid-column-end:3; } ``` ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="container"> <div class="header">header</div> <div class="one">one</div> <div class="two">two</div> <div class="three">three</div> <div class="four">four</div> <div class="nested-container"> <div class="five">five</div> <div class="six">six</div> <div class="seven">seven</div> </div> </div> </body> </html> ```
null
CC BY-SA 4.0
null
2022-11-14T03:59:26.530
2022-11-14T04:13:47.017
2022-11-14T04:13:47.017
11,111,119
11,111,119
null
74,426,876
2
null
74,426,540
1
null
You will probably need to translate before rotating. The order of transformations is important (e.g. translating, then rotating will be a different location than rotation, then translating). In your case `image(img, x, y)` makes it easy to miss that behind the scenes it's more like `translate(x,y);image(img, 0, 0);`. I recommend: ``` void draw() { for (int i = 0; i < 12; i++) { for (int j = 0; j < 12; j++) { float r = int(random(4)) * HALF_PI; // I added this translate(100 * i, 100 * j); // translate first rotate(r); // I added this int rand_index= int(random(img_count)); image(img[rand_index], 0, 0, 100, 100 ); } } } ``` (depending on your setup, you might find [imageMode(CENTER);](https://processing.org/reference/imageMode_.html) (in `setup()`) handy to rotate from image centre (as opposed to top left corner (default)))
null
CC BY-SA 4.0
null
2022-11-14T04:15:16.253
2022-11-14T06:53:47.900
2022-11-14T06:53:47.900
89,766
89,766
null
74,427,101
2
null
68,965,190
0
null
Or [font generator](https://espacoinvisivel.com/en/font-generator/) also cannot do this. It just shows you characters that look like they are printed
null
CC BY-SA 4.0
null
2022-11-14T04:58:18.160
2022-11-14T04:58:18.160
null
null
8,859,324
null
74,427,473
2
null
74,415,534
1
null
Alright, since you're using Mac, I think I can give you the answer you're looking for! This will require a bit of finesse on your end because I've installed a lot of fonts. So what I see is unlikely to be exactly what you see. (You won't need to install fonts for this to work.) First, I'm using the library `showtext`. If you don't have that installed, you'll need it. This first function call is where you may see something different than what I see. ``` library(showtext) library(ggwordcloud) library(tidyverse) (where <- font_files()[which(str_detect(font_files()$family, "Arial Unicode MS")), ]) # path file family # 1 /Library/Fonts Arial Unicode.ttf Arial Unicode MS # 74 /System/Library/Fonts/Supplemental Arial Unicode.ttf Arial Unicode MS # face version ps_name # 1 Regular Version 1.01x ArialUnicodeMS # 74 Regular Version 1.01x ArialUnicodeMS ``` As you can see this returned two rows for me. I'm going to call for only the first row since these two lines are identical. If you only return 1 line, then drop the brackets. If your call returned many lines, just make sure that the line you select is "Regular" for "face". ``` # add the font to the workspace font_add(family = where[1, ]$family, regular = where[1, ]$file) # if only returned one line use this instead font_add(family = where$family, regular = where$file) ``` To use this font, you can either call `showtext_begin()` or `showtext_auto()` I really have not seen any difference between the two. Then call the plot. When you call the plot, you need to include the `family` in `geom_text_wordcloud`, I used `where[1, ]$family`, but you can just copy the string, too. ``` showtext_auto() data("thankyou_words_small") ggplot(thankyou_words_small, aes(label = word, size = speakers, color = speakers)) + geom_text_wordcloud(area_corr = T, rm_outside = T, family = where[1, ]$family) + scale_size_area(max_size = 24) + scale_color_gradient(low = "darkblue", high = "lightblue") + theme_minimal() ``` [](https://i.stack.imgur.com/uCUCh.png) It does say that you're supposed to end or close the `showtext` with either `showtext_end()` or `showtext_auto(F)`. However, I've never had an issue if I forgot or left it out intentionally. There are some other errors in this data for example, 'shukran' or thanks in MS Arabic is شكرا However, this is plotting the text backward. In Pashtoon, usually 'manana' is used for thank you (literally it means acceptance), which is written مننه. That's DEFINITELY not what's in this dataset. It's probably backward. (It's not a word in Pashtoon as it is.) I thought the reversal of these was due to the left-to-right thing, but Hindi is correct, Japanese is correct, Gujarati is correct...Urdu is incorrect. Sigh. I couldn't find a font that did this any better. I found a way to flip the words, but Farsi is still incorrect. For example, مننه if written one letter at a time is م ن ن ه. That's what's happening with Farsi. (Farsi == Persian) Here's the manual correctly for these words ``` flips <- c(4, 14, 16, 30, 31, 34) tyws <- thankyou_words_small tyws[flips, ]$word <- stringi::stri_reverse(tyws[flips, ]$word) set.seed(42) ggplot(tyws, aes(label = word, size = speakers, color = speakers)) + geom_text_wordcloud(area_corr = T, rm_outside = T, family = where[1, ]$family) + scale_size_area(max_size = 24) + scale_color_gradient(low = "darkblue", high = "lightblue") + theme_minimal() ``` Here's the difference: [](https://i.stack.imgur.com/QfMS5.png)
null
CC BY-SA 4.0
null
2022-11-14T05:59:27.230
2022-11-14T05:59:27.230
null
null
5,329,073
null
74,428,981
2
null
48,876,541
0
null
Try this ffmpeg -i input.aac -i background.jpg -filter_complex "[0:a]aformat=channel_layouts=mono,showwaves=s=1920x1080:mode=p2p:r=30:colors=#68b847[v];[1:v][v]overlay=format=auto:x=(W-w)/2:y=(H-h)/2,format=yuv420p[outv]" -map "[outv]" -map 0:a -c:v libvpx-vp9 -c:a copy -shortest output.mp4
null
CC BY-SA 4.0
null
2022-11-14T08:51:05.713
2022-11-14T08:51:05.713
null
null
20,489,817
null
74,429,594
2
null
74,429,257
1
null
You implemented the logic of your code a little bit wrong. So, first iterate over all elements from array1. Then, check, if the current element is in the array2. For this you can use a flag. If it is not in, then print it. There are even standard functions in the C++ algorithm library availabe. But let's ge with the below solution: ``` #include <iostream> #include <string> using namespace std; int main() { string array1[] = { "aaa","bbb","ccc","ddd" }; string array2[] = { "aaa","bbb","ccc" }; for (int i = 0; i <= 3; i++) { bool isPresent = false; for (int j = 0; j <= 2; j++) if (array1[i] == array2[j]) isPresent = true; if (not isPresent) std::cout << array1[i] << '\n'; } } ```
null
CC BY-SA 4.0
null
2022-11-14T09:41:59.733
2022-11-14T09:41:59.733
null
null
9,666,018
null
74,429,786
2
null
74,429,732
0
null
Yes, this can be done in your EF configuration, see: [https://learn.microsoft.com/en-us/ef/core/logging-events-diagnostics/simple-logging#configuration-for-specific-messages](https://learn.microsoft.com/en-us/ef/core/logging-events-diagnostics/simple-logging#configuration-for-specific-messages) For ex: ``` /// <summary> /// Configures our preferred default values for the db context /// </summary> /// <param name="optionsBuilder"></param> public static DbContextOptionsBuilder ConfigureDefaultsForDbContext(this DbContextOptionsBuilder optionsBuilder) { #if DEBUG optionsBuilder.EnableDetailedErrors(); optionsBuilder.EnableSensitiveDataLogging(); #endif // Stop log spamming optionsBuilder.ConfigureWarnings(builder => builder.Log( (RelationalEventId.CommandExecuting, LogLevel.Trace), (RelationalEventId.CommandExecuted, LogLevel.Debug), (CoreEventId.ContextInitialized, LogLevel.Trace) #if DEBUG ,(CoreEventId.SensitiveDataLoggingEnabledWarning, LogLevel.None) #endif )); return optionsBuilder; } // In your dbContext: protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) { base.OnConfiguring(optionsBuilder); optionsBuilder.ConfigureOPGDefaultsForDbContext(); // NOTE We have MARS enabled which will cause save points to not work. // This is a feature where within a single transaction save points can be created, and rolled back to. // Transaction in general WILL work - but EF generates a warning about this. // We don't use save points - so we disable the warning. Assume any transactions will be rolled back completely. // See: https://github.com/dotnet/efcore/issues/23269 // Also see: https://docs.microsoft.com/en-us/ef/core/saving/transactions#savepoints optionsBuilder.ConfigureWarnings(w => w.Ignore(SqlServerEventId.SavepointsDisabledBecauseOfMARS)); } ```
null
CC BY-SA 4.0
null
2022-11-14T09:57:12.243
2022-11-14T09:57:12.243
null
null
4,122,889
null
74,429,969
2
null
56,235,851
0
null
Maybe it is not the best option but it can cover some of your issues. ``` import 'package:flutter/material.dart'; class TestFile extends StatefulWidget { const TestFile({Key? key}) : super(key: key); @override State<TestFile> createState() => _TestFileState(); } class _TestFileState extends State<TestFile> { final ScrollController _scrollController = ScrollController(); GlobalKey key = GlobalKey(); @override Widget build(BuildContext context) { return Scaffold( floatingActionButton: FloatingActionButton( onPressed: () { RenderBox box = key.currentContext?.findRenderObject() as RenderBox; Offset position = box.localToGlobal(Offset.zero); //this is global position double y = position.dy; _scrollController.animateTo( y, duration: const Duration(milliseconds: 500), curve: Curves.decelerate, ); }, ), body: CustomScrollView( controller: _scrollController, slivers: [ SliverToBoxAdapter( child: Container( color: Colors.black, height: 700, ), ), SliverToBoxAdapter( child: Container( color: Colors.orange, height: 700, ), ), SliverToBoxAdapter( child: Container( color: Colors.yellow, height: 700, ), ), SliverToBoxAdapter( child: Container( key: key, color: Colors.white, height: 700, ), ), SliverToBoxAdapter( child: Container( color: Colors.red, height: 700, ), ), ], ), ); } } ``` Here is the complete example, you can scroll with an offset and get an offset of the specific widget by a key. I know offset's values will change after scrolling but you can use a simple state manager or a storage to handle this issue
null
CC BY-SA 4.0
null
2022-11-14T10:11:44.730
2022-11-24T08:33:23.397
2022-11-24T08:33:23.397
10,292,408
10,292,408
null
74,430,564
2
null
18,727,894
0
null
##### For a flutter project and personal team. navigate to below address and search for `DEVELOPMENT_TEAM` you should find some thing like this `DEVELOPMENT_TEAM = 64F9WR9M48` `ios/Runner.xcodeproj/project.pbxproj` [](https://i.stack.imgur.com/vtoTt.png)
null
CC BY-SA 4.0
null
2022-11-14T10:58:43.483
2022-11-14T10:58:43.483
null
null
6,813,907
null
74,430,835
2
null
74,430,604
1
null
change ``` onPressed: () => { Navigator.pushNamed(context, '/'), debugPrint("home") }, ``` to ``` onPressed: () { Navigator.pushNamed(context, '/'); debugPrint("home"); }, ``` and moreover, you can set BottomNavigationBar like this, it is easier than your Stack implementation ``` Scaffold( bottomNavigationBar: BottomNav(), // your body ) ```
null
CC BY-SA 4.0
null
2022-11-14T11:21:05.630
2022-11-14T11:21:05.630
null
null
8,921,450
null
74,430,848
2
null
18,470,323
1
null
## For arbitrary level of the column value If the level of the column index shall be arbitrary, this might help you a bit: ``` class DataFrameMultiColumn(pd.DataFrame) : def loc_multicolumn(self, keys): depth = lambda L: isinstance(L, list) and max(map(depth, L))+1 result = [] col = self.columns # if depth of keys is 1, all keys need to be true if depth(keys) == 1: for c in col: # select all columns which contain all keys if set(keys).issubset(set(c)) : result.append(c) # depth of 2 indicates, # the product of all sublists will be formed elif depth(keys) == 2 : keys = list(itertools.product(*keys)) for c in col: for k in keys : # select all columns which contain all keys if set(k).issubset(set(c)) : result.append(c) else : raise ValueError("Depth of the keys list exceeds 2") # return with .loc command return self.loc[:,result] ``` `.loc_multicolumn` will return the same as calling `.loc` but without specifing the level for each key. Please note that this might be a problem is values are the same in multiple column levels! ## Example : ### Sample data: ``` np.random.seed(1) col = pd.MultiIndex.from_arrays([['one', 'one', 'one', 'two', 'two', 'two'], ['a', 'b', 'c', 'a', 'b', 'c']]) data = pd.DataFrame(np.random.randint(0, 10, (4,6)), columns=col) data_mc = DataFrameMultiColumn(data) >>> data_mc one two a b c a b c 0 5 8 9 5 0 0 1 1 7 6 9 2 4 2 5 2 4 2 4 7 3 7 9 1 7 0 6 ``` ### Cases: List depth 1 requires all elements in the list be fit. ``` >>> data_mc.loc_multicolumn(['a', 'one']) one a 0 5 1 1 2 5 3 7 >>> data_mc.loc_multicolumn(['a', 'b']) Empty DataFrame Columns: [] Index: [0, 1, 2, 3] >>> data_mc.loc_multicolumn(['one','a', 'b']) Empty DataFrame Columns: [] Index: [0, 1, 2, 3] ``` List depth 2 allows all elements of the Cartesian product of keys list. ``` >>> data_mc.loc_multicolumn([['a', 'b']]) one two a b a b 0 5 8 5 0 1 1 7 9 2 2 5 2 2 4 3 7 9 7 0 >>> data_mc.loc_multicolumn([['one'],['a', 'b']]) one a b 0 5 8 1 1 7 2 5 2 3 7 9 ``` For the last: All combination from `list(itertools.product(["one"], ['a', 'b']))` are given if all elements in the combination fits.
null
CC BY-SA 4.0
null
2022-11-14T11:22:33.673
2022-11-14T11:23:41.597
2022-11-14T11:23:41.597
16,372,843
16,372,843
null
74,430,878
2
null
74,430,225
-1
null
``` \documentclass{article} \usepackage[inline]{enumitem} \begin{document} Text before list. \begin{enumerate*} \item My first in list. \item My second in list. \end{enumerate*} Text after list. \end{document} ``` For more examples, please visit [overleaf](https://www.overleaf.com/learn/latex/Lists).
null
CC BY-SA 4.0
null
2022-11-14T11:25:11.860
2022-11-14T11:31:18.260
2022-11-14T11:31:18.260
14,047,474
14,047,474
null
74,430,902
2
null
67,493,214
0
null
I had the same error and didn't want to run my Rmd files from the console, so there is the solution for using the button again (which I found [here](https://github.com/rstudio/renv/issues/981)): ``` > usethis::edit_r_profile() * Modify 'C:/Users/User/Documents/.Rprofile' * Restart R for changes to take effect ``` The output then shows you the path to your file. Just copy that path to the address bar in your explorer and choose the program you want to open it with. I chose the normal text editor. Delete "source('renv/activate.R.')" from this file, restart R, and everything should work fine again.
null
CC BY-SA 4.0
null
2022-11-14T11:27:05.010
2022-11-14T11:27:05.010
null
null
10,320,202
null
74,430,986
2
null
74,430,604
0
null
you should find another solution, because your second Indexed with "hallo" is above the BottomNav and it covers the entire area. I made it red so you can see it when you start the application ``` Stack( children: [ const Indexed( index: 10, child: Positioned(bottom: 0, left: 0, child: BottomNav()), ), Indexed( /// <- this widget is above the BottomNav and it covers the entire area index: 1, child: Positioned( bottom: 0, left: 0, right: 0, top: 0, child: Container( color: Colors.red, child: Text("hallo"), ), ), ), ], ) ```
null
CC BY-SA 4.0
null
2022-11-14T11:34:27.877
2022-11-14T11:34:27.877
null
null
1,723,187
null
74,431,177
2
null
74,431,060
1
null
You can control that setting through the diagram properties: [](https://i.stack.imgur.com/SKfDr.png)
null
CC BY-SA 4.0
null
2022-11-14T11:50:55.103
2022-11-14T11:50:55.103
null
null
2,018,133
null
74,431,265
2
null
74,431,182
0
null
Go to the parent Div or element that makes your container design, make that div like so ``` overflow: hidden; ```
null
CC BY-SA 4.0
null
2022-11-14T11:56:54.677
2022-11-14T11:56:54.677
null
null
10,489,766
null
74,431,459
2
null
74,431,329
-2
null
Avoid formatting dates in your database, it should be done in the application that queries the data. But IF you still need to do it in your database for whatever reason: If you want to store the date in the `DD/MM/YYYY` format in your table then you can do 2 things, Change your column data type to `varchar`() Change the regional settings on the machine running SqlServer and keep it as a `date` type (this is somewhat useless if you plan on querying data from another app as the app will probably format the date to its local format). In case you decide to store it as `varchar` you will need to use the `Format` function when inserting or updating like this: `Format(MyDate, 'DD/MM/YYYY')`.
null
CC BY-SA 4.0
null
2022-11-14T12:11:48.763
2022-11-14T13:05:28.030
2022-11-14T13:05:28.030
19,043,015
19,043,015
null
74,431,527
2
null
74,431,429
0
null
You should add Operation filter for that, as well as `AllowAnonymous` to the method ``` public class BasicAuthOperationsFilter : IOperationFilter { public void Apply(OpenApiOperation operation, OperationFilterContext context) { var noAuthRequired = context.ApiDescription.CustomAttributes().Any(attr => attr.GetType() == typeof(AllowAnonymousAttribute)); if (noAuthRequired) return; operation.Security = new List<OpenApiSecurityRequirement> { new OpenApiSecurityRequirement { { new OpenApiSecurityScheme { Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "basic" } }, new List<string>() } } }; } } ```
null
CC BY-SA 4.0
null
2022-11-14T12:18:21.107
2022-11-14T12:18:21.107
null
null
462,669
null
74,431,605
2
null
10,068,566
1
null
Enter the MacBook password and click on always allow.
null
CC BY-SA 4.0
null
2022-11-14T12:24:27.043
2022-11-14T12:24:27.043
null
null
11,812,006
null
74,431,750
2
null
74,430,604
0
null
I got a Solution. It was a Combination of multiple problems. Like @Stellar Creed said, the Container was above my AppBar. Another Problem was that I put SizedBox to width: 0 and height: 0. Align( alignment: const Alignment(0, -0.5), child: SizedBox( width: 0, height: 0, child: OverflowBox( ``` minWidth: 0.0, maxWidth: 100.0, minHeight: 0.0, maxHeight: 100.0, child: Container( width: 64, height: 64, decoration: const BoxDecoration( borderRadius: BorderRadius.all(Radius.circular(100)), color: Color(0xFF00007F)), child: IconButton( icon: SvgPicture.asset('assets/icons/search-navbar.svg'), tooltip: 'Increase volume by 10', onPressed: () { /* Navigator.pushNamed(context, '/'); */ debugPrint("home"); }), ), ), ), ), ```
null
CC BY-SA 4.0
null
2022-11-14T12:35:33.353
2022-11-14T12:35:33.353
null
null
20,372,186
null
74,431,891
2
null
74,430,225
2
null
Assuming you are using the `paralist` package... use the `inparaitem` instead of `inparaenum` ``` \documentclass[11pt]{article} \usepackage{paralist} \begin{document} This list includes the following : \begin{inparaitem} \item option A \item option B \item option C \end{inparaitem}\\ Please choose an option \end{document} ``` [](https://i.stack.imgur.com/3UnyQ.png)
null
CC BY-SA 4.0
null
2022-11-14T12:47:23.897
2022-12-21T08:54:13.973
2022-12-21T08:54:13.973
18,275,876
18,275,876
null
74,432,065
2
null
74,424,653
1
null
First sort the input array, and then consider building the result permutation backwards from the end towards the start. For every element you will either remove the first or last element of the sorted array. Also, for every position k, the disorder of the subarray ending at that position is known -- it's just the difference between the two ends of the remaining element array. To find the optimal selection, then, you can use `DP[k,n]` = the minimum disorder so far if we've chosen n elements from the front of the sorted array (with the remainder chosen from the back). `DP[k,n]` is easily calculated from `DP[k+1,n]` and `DP[k+1,n-1]`, and the minimum `DP[0,?]` is the minimum total disorder.
null
CC BY-SA 4.0
null
2022-11-14T13:01:26.673
2022-11-14T13:01:26.673
null
null
5,483,526
null
74,432,086
2
null
74,431,926
2
null
I don't know how to make rounded corners easy, but the easiest example will be this: ``` const canvas = document.querySelector('canvas') const ctx = canvas.getContext('2d') // define the points const p1 = { x: 30, y: 50 } const p2 = { x: 150, y: 130 } ctx.strokeStyle = 'red' // draw the points ctx.beginPath() ctx.arc(p1.x, p1.y, 5, 0, Math.PI * 2) ctx.stroke() ctx.beginPath() ctx.arc(p2.x, p2.y, 5, 0, Math.PI * 2) ctx.stroke() // get distance between const horizontalDistance = p2.x - p1.x ctx.strokeStyle = 'black' // draw left part ctx.beginPath() ctx.moveTo(p1.x, p1.y) ctx.lineTo(p1.x + horizontalDistance / 2, p1.y) ctx.stroke() // draw vertical part ctx.beginPath() ctx.moveTo(p1.x + horizontalDistance / 2, p1.y) ctx.lineTo(p1.x + horizontalDistance / 2, p2.y) ctx.stroke() // draw right part ctx.beginPath() ctx.moveTo(p1.x + horizontalDistance / 2, p2.y) ctx.lineTo(p2.x, p2.y) ctx.stroke() ``` ``` canvas { border: 1px solid black; } ``` ``` <canvas></canvas> ``` Real-time version: ``` const canvas = document.querySelector('canvas') const ctx = canvas.getContext('2d') const p1 = { x: canvas.width / 2, y: canvas.height / 2 } const p2 = { x: 150, y: 130 } canvas.addEventListener('mousemove', e => { const mousePos = getMousePos(canvas, e) p2.x = mousePos.x p2.y = mousePos.y }) loop() function loop() { draw() requestAnimationFrame(loop) } function draw() { ctx.clearRect(0, 0, canvas.width, canvas.height) ctx.strokeStyle = 'red' ctx.beginPath() ctx.arc(p1.x, p1.y, 5, 0, Math.PI * 2) ctx.stroke() ctx.beginPath() ctx.arc(p2.x, p2.y, 5, 0, Math.PI * 2) ctx.stroke() const horizontalDistance = p2.x - p1.x ctx.strokeStyle = 'black' ctx.beginPath() ctx.moveTo(p1.x, p1.y) ctx.lineTo(p1.x + horizontalDistance / 2, p1.y) ctx.stroke() ctx.beginPath() ctx.moveTo(p1.x + horizontalDistance / 2, p1.y) ctx.lineTo(p1.x + horizontalDistance / 2, p2.y) ctx.stroke() ctx.beginPath() ctx.moveTo(p1.x + horizontalDistance / 2, p2.y) ctx.lineTo(p2.x, p2.y) ctx.stroke() } function getMousePos(canvas, evt) { const rect = canvas.getBoundingClientRect(); return { x: evt.clientX - rect.left, y: evt.clientY - rect.top }; } ``` ``` canvas { border: 1px solid black; } ``` ``` <canvas></canvas> ```
null
CC BY-SA 4.0
null
2022-11-14T13:03:05.933
2022-11-14T13:12:53.437
2022-11-14T13:12:53.437
5,089,567
5,089,567
null
74,432,304
2
null
71,972,811
0
null
``` String email=edt_em_1.getText().toString(); String pass=edt_pass_1.getText().toString(); db1.collection("UserSignUp").whereEqualTo("Email",email).whereEqualTo("Password",pass) .get().addOnCompleteListener(new OnCompleteListener<QuerySnapshot>() { @Override public void onComplete(@NonNull Task<QuerySnapshot> task) { if (task.isSuccessful()) { List<String> list = new ArrayList<>(); List<String> list2=new ArrayList<>(); int i=0,j=0; for (QueryDocumentSnapshot document : task.getResult()) { if(document.exists()){ Toast.makeText(LoginActivity.this, "success "+document.get("Email"), Toast.LENGTH_SHORT).show(); } else{ Toast.makeText(LoginActivity.this, "Wrong details ", Toast.LENGTH_SHORT).show(); } } } else { Toast.makeText(LoginActivity.this, "error", Toast.LENGTH_SHORT).show(); } } }); ```
null
CC BY-SA 4.0
null
2022-11-14T13:19:03.480
2022-11-14T13:25:36.867
2022-11-14T13:25:36.867
14,780,113
14,780,113
null
74,432,376
2
null
74,431,094
0
null
you can use angular environments try to put a part of your code to see if i can help you a little more
null
CC BY-SA 4.0
null
2022-11-14T13:24:51.920
2022-11-14T13:24:51.920
null
null
19,574,035
null
74,432,475
2
null
74,432,370
5
null
At a minimum this will work: 1. you have expressed your x and y values as lists; it will work better if they are (atomic) vectors (which you would have gotten using c() instead of list()). Put them into a data frame (not strictly necessary, but best practice): ``` df <- data.frame(x=unlist(x), y = unlist(y)) ``` 1. Use the data frame to draw your plot: ``` library(ggplot2) ggplot(df, aes(x, y)) + geom_line() ``` To get your graph looking a little more like the example in your post, ``` scalefun <- function(y) (y-min(y))/diff(range(y)) ggplot(df, aes(x, y = scalefun(y))) + geom_line() + scale_x_log10() ```
null
CC BY-SA 4.0
null
2022-11-14T13:32:09.313
2022-11-14T14:22:34.043
2022-11-14T14:22:34.043
190,277
190,277
null
74,432,746
2
null
74,432,335
0
null
I got something really close to my question. Here is the HTML: ``` <label for="formFile">Source Package</label><br> <button class="form-control formname element1" id="formFile" (click)="binaryPackageInput.click()"> Durchsuchen... </button> <input #binaryPackageInput class="binary-package" (change)="onFileSelected($event); checkForm()" type="file" formControlName="fileControl"> <div *ngIf="this.fileName == ''" class="element2"> Keine Datei ausgewählt </div> <span class="element2">{{this.fileName}}</span> </div> ``` Here is the CSS: ``` input.binary-package { display: none; } #formFile { width: auto; } .element1 { display: inline-block; } .element2 { display: inline-block; margin-left: 10px; } ```
null
CC BY-SA 4.0
null
2022-11-14T13:53:44.687
2022-11-14T13:53:44.687
null
null
18,203,720
null
74,432,880
2
null
74,431,890
0
null
Typically I try not to completely rewrite a user's code (as it is easier to teach when you are just fixing/modifying a few small things), but I think your code could be significantly reduced and simplified. There is also some code missing so I'm not entirely sure what some variables are like `vertexList` and `vertexLetters` (). That being said, I think using `.forEach()` to loop through your array and simply checking if each of these nested arrays contains your letter via `.includes()` should give you the desired result. Because I'm not sure what `vertexLetters` is or how it factors into your code I do not have that included in my example. ``` let icon = [ [ [], [] ,[] , [], ["a"]], [ [],[] ,[] ,[] ,[] ], [ [],[] , ["a","b"], ["b","c"],[] ], [ [],[] ,[] ,[] ,[] ], [ [], ["c","d"],[] , ["d","e"], [] ], [ [], [], ["e","f"], ["f","g"], []], [ [], [], [], ["g","h"], ["h"]] ], vertexList = [] const _FindCoordinates = letter => { vertexList = [] icon.forEach((a, y) => { a.forEach((b, x) => { if(icon[y][x].includes(letter)) vertexList = [...vertexList, [x, y]] }) }) return vertexList } console.log(_FindCoordinates("a")) console.log(_FindCoordinates("h")) ``` ### NOTE This works for the provided input/example, but depending on how many nested arrays there are, this obviously would not work.
null
CC BY-SA 4.0
null
2022-11-14T14:03:43.703
2022-11-14T14:03:43.703
null
null
2,339,619
null
74,433,042
2
null
74,432,370
1
null
Same logic as @Ben Bolker: Just another way: ``` library(tidyverse) tibble(x,y) %>% unnest() %>% ggplot(aes(x, y))+ geom_line() ``` [](https://i.stack.imgur.com/XwwVS.png)
null
CC BY-SA 4.0
null
2022-11-14T14:14:51.207
2022-11-14T14:14:51.207
null
null
13,321,647
null
74,433,138
2
null
74,433,089
0
null
Use `pivot` to reshape df1, then `merge`: ``` df2.merge(df1.pivot(index='User Id', columns='Module', values='Status'), on='User Id') ```
null
CC BY-SA 4.0
null
2022-11-14T14:21:41.157
2022-11-14T14:21:41.157
null
null
16,343,464
null
74,433,201
2
null
74,433,089
0
null
You can use [set_index](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.set_index.html) and [stack](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.stack.html) do to: ``` # sample data df1=pd.DataFrame({'UserId': [1,1,2,2], 'Module': ['Lesson1', 'Lesson2', 'Lesson1', 'Lesson2'], 'Status': ['Completed', 'InProgress', 'Completed', 'Completed']}) df2=pd.DataFrame({'UserId': [1,2], 'Name': ['John Smith', 'Jane']}) # merge and use unstack to reshape the data df1=df1.merge(df2, on='UserId', how='left') df1 = df1.set_index(['UserId', 'Name', 'Module']).unstack().reset_index() # fix column names df1.columns = df1.columns.get_level_values(0).tolist()[:2] + df1.columns.get_level_values(1).tolist()[2:] print(df1) UserId Name Lesson1 Lesson2 0 1 John Smith Completed InProgress 1 2 Jane Completed Completed ```
null
CC BY-SA 4.0
null
2022-11-14T14:26:39.160
2022-11-14T14:26:39.160
null
null
9,299,259
null
74,433,638
2
null
74,429,335
0
null
To [delete a node](https://firebase.google.com/docs/database/android/read-and-write#delete_data) from the database you call `removeValue()` on a `DatabaseReference` to that node. So you can create the entire `Chats` node with: ``` DatabaseReference root = FirebaseDatabase.getInstance().getReference(); root.child("Chats").removeValue(); ``` To delete a lower-level node, you can specify the entire path to that node: ``` root.child("Chats/hI151.../messages").removeValue(); ``` You will need to know/specify the entire `hI151...` value in this code.
null
CC BY-SA 4.0
null
2022-11-14T14:58:54.103
2022-11-14T14:58:54.103
null
null
209,103
null
74,433,759
2
null
74,431,486
0
null
It's look like you are missing a lot of closing HTML tags. This may cause your layout to break. - [Do browsers automatically insert missing HTML tags?](https://stackoverflow.com/a/26850313)- [What are the actual problems of not closing tags and attributes in HTML](https://stackoverflow.com/questions/7125354/what-are-the-actual-problems-of-not-closing-tags-and-attributes-in-html)- [What happens if we don’t add a closing tag?](https://discuss.codecademy.com/t/what-happens-if-we-dont-add-a-closing-tag/368401)
null
CC BY-SA 4.0
null
2022-11-14T15:06:00.663
2022-11-14T15:06:00.663
null
null
19,782,508
null
74,433,768
2
null
74,432,875
1
null
`([^\]!]+)` blocks you from matching the `![alt text](https://example.com/image.svg)`, so I replaced it with `(!\[.+?\]\(.+?\)|.+?)` that first looks for `![alt text](https://example.com/image.svg)` and then `alt text` as a text wrapped in `[]` (square braces). ``` /(?=\[(!\[.+?\]\(.+?\)|.+?)]\((https:\/\/[^\)]+)\))/gi ``` Note, for cross-matching, you should wrap the pattern into positive lookahead. Also, see the [demo](https://regex101.com/r/Dv1C7j/1). ``` let str = `# Title with Image [![alt text](https://example.com/image.svg)](https://other-example.com) ## Links - [First](https://somesite.com/path/to-page) - voluptates explicabo debitis aspernatur dolor, qui dolores. - [Second](https://example.io/this/is/page) - molestiae animi eius nisi quam quae quisquam beatae reiciendis.` let regex = /(?=\[(!\[.+?\]\(.+?\)|.+?)]\((https:\/\/[^\)]+)\))/gi let links = [...str.matchAll(regex)].map((m) => ({ text: m[1], link: m[2] })) console.log(links) ```
null
CC BY-SA 4.0
null
2022-11-14T15:06:21.337
2022-11-14T15:06:21.337
null
null
12,755,187
null