Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
75,274,067
2
null
75,161,458
0
null
You cannot use `paper` as a External JAR. Instead download `Bukkit` or `Spigot` from the internet (or use [BuildTools](https://www.spigotmc.org/wiki/buildtools/) to compile your own jar file), and use those instead of paper.
null
CC BY-SA 4.0
null
2023-01-29T10:03:24.207
2023-01-29T10:03:24.207
null
null
9,564,834
null
75,274,189
2
null
75,273,389
0
null
I think why your pages dropdown is not working is you gave the same id to your both dropdown menu. ``` id="navbarDropdownMenuLink" ``` Try to change one of the dropdown'd id. Remember, If two Bootstrap dropdown menus have the same id and aria-labelledby values, the first dropdown will function correctly but the second dropdown will not work as expected.
null
CC BY-SA 4.0
null
2023-01-29T10:30:29.157
2023-01-29T10:30:29.157
null
null
16,013,381
null
75,274,477
2
null
75,271,675
0
null
You have to either use single quotes around cookie in js.executeScript method if your css selector is cookie not java variable. And Cookie defined above is WebElement which can not be directly used while calling executeScript method. ``` cookies = driver.executeScript("return document.querySelector('#usercentrics-root').querySelector(button[data-testid = 'uc-accept-all-button'])"); ``` And this does not solve your problem, please explain your issue in details.
null
CC BY-SA 4.0
null
2023-01-29T11:21:27.303
2023-01-29T11:21:27.303
null
null
7,722,807
null
75,274,705
2
null
75,274,443
0
null
In firebase, The collection wont be created unless you write something to it. So remember to write something in the collection you just created.Here's the code for it. ``` let reservationRef = Firestore.firestore().collection("Restaurants").document(userUID).collection("Reservations") let reservationData = [ "userName": userName, "userEmail": email] reservationRef.addDocument(data: reservationData) ``` Happy Coding :)
null
CC BY-SA 4.0
null
2023-01-29T11:59:41.087
2023-01-29T11:59:41.087
null
null
17,427,890
null
75,275,037
2
null
69,380,121
0
null
Try this. It worked for me: ``` middleware: (getDefaultMiddleware) => getDefaultMiddleware().concat(fooApi.middleware), ``` ([https://redux-toolkit.js.org/api/getDefaultMiddleware](https://redux-toolkit.js.org/api/getDefaultMiddleware))
null
CC BY-SA 4.0
null
2023-01-29T12:53:04.657
2023-01-29T12:55:16.497
2023-01-29T12:55:16.497
17,854,711
17,854,711
null
75,275,085
2
null
75,273,671
0
null
Use "androidx.appcompat.widget.AppCompatButton" instead of Button. ``` android:background="@drawable/abc" android:gravity="center" app:backgroundTint="@null" android:textColor="@color/black" ```
null
CC BY-SA 4.0
null
2023-01-29T13:00:05.073
2023-01-29T13:00:05.073
null
null
20,027,397
null
75,275,344
2
null
75,274,686
1
null
The rendered content seen via a browser is not exactly the same as that returned by an XHR request (rvest). This is because a browser can run JavaScript to update content. Inspect the page source by pressing + in browser on that webpage. You can re-write your css selector list to match the actual html returned. One example would be as follows, which also removes the reliance on dynamic classes which change more frequently and would break your program more quickly. ``` library(rvest) read_html("https://in.coursera.org/degrees/bachelors") |> html_elements('[data-e2e="degree-list"] div[class] > p:first-child') |> html_text2() ``` Learn about CSS selectors and operators here: [https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Selectors)
null
CC BY-SA 4.0
null
2023-01-29T13:40:30.943
2023-01-29T13:40:30.943
null
null
6,241,235
null
75,275,347
2
null
75,270,655
2
null
First of all, you need to know that an ABAP List is not like a general screen. An ABAP List has fields which are not identified by their field names but by their positions, the Technical Information is of no help. Visually speaking, this is an ABAP List (monospaced font only): [](https://i.stack.imgur.com/2pOc6.png) And this is a general screen (labels using proportional font): [](https://i.stack.imgur.com/DUfxy.png) This script loops at all the fields in an ABAP List: ``` text = "" For Each field In session.findById("wnd[0]/usr").Children text = text & field.CharTop & " " & field.CharLeft & " " & field.Text & " " _ & field.Id & " " & field.Type & chr(10) Next msgbox text ``` For the ABAP List above (first screenshot), the script will show: [](https://i.stack.imgur.com/HfsPC.png) The loop goes from top to bottom and from left to right. You can't just look at the fields of one row, but you can stop looping after a given row: ``` If field.CharTop > 2 Then Exit For End If ``` Each field can be of type [GuiLabel](https://help.sap.com/docs/search?q=GuiLabel&product=sap_gui_for_windows), [GuiTextField](https://help.sap.com/docs/search?q=GuiTextField&product=sap_gui_for_windows) or [GuiCheckBox](https://help.sap.com/docs/search?q=GuiCheckBox&product=sap_gui_for_windows), and has these common properties: - `CharLeft`- `CharTop`- `Text``DisplayedText`- `Id`- `Type` By adapting the script above, you will be able to find the horizontal positions (`CharLeft`) and numbers (`Text`) of all vendors in the row `2` (`CharTop = 2`), and finally you can position the cursor on the vendor you want. In the below code, reusing yours, `i` would take the value of `CharLeft` (use `lbl` because it's a `GuiLabel` field, that would be respectively `txt` and `chk` for `GuiTextField` and `GuiCheckBox` fields): ``` session.findById("wnd[0]/usr/lbl[" & i & ",2]").SetFocus session.findById("wnd[0]").sendVKey 2 ``` But instead of `field.CharLeft`, you could also use directly `field` or `field.Id` that you obtain during the loop.
null
CC BY-SA 4.0
null
2023-01-29T13:41:02.653
2023-01-29T13:41:02.653
null
null
9,150,270
null
75,275,468
2
null
75,275,422
1
null
You could use `text` with all the values in your dataframe as a vector by converting your data to a longer format using `pivot_longer` and assign them to each bar like this: ``` barplot1=c(8,3,4,1) barplot2=c(18,11,11,13) barplot3=c(39,42,42,45) barplot4=c(26,30,31,34) barplot5=c(9,13,12,7) data <- data.frame(barplot1,barplot2,barplot3,barplot4,barplot5) percantage <- 50 library(dplyr) library(tidyr) values <- data %>% pivot_longer(cols = everything()) %>% arrange(name) # plotting multiple bar plots plot = barplot(as.matrix(data), main="", yaxp=c(0, max(percantage), 5), col = c("#b62528","#f49401","#f9e536","#018404"), ylab="Percentage", xlab = "Elevation [m. a. s. l.]", beside=T, legend.text = c("CR","EN","VU","LC or NT"), ylim = c(0, 50), args.legend=list(bty="n",horiz=F, x="topright", inset = c(-0.05, -0.1)), ) text(x = plot, y = values$value, label = values$value, pos = 3) ``` ![](https://i.imgur.com/MYFZ6QL.png) [reprex v2.0.2](https://reprex.tidyverse.org) --- To add percentage to labels you could use `paste0` with percent sign like this: ``` plot = barplot(as.matrix(data), main="", yaxp=c(0, max(percantage), 5), col = c("#b62528","#f49401","#f9e536","#018404"), ylab="Percentage", xlab = "Elevation [m. a. s. l.]", beside=T, legend.text = c("CR","EN","VU","LC or NT"), ylim = c(0, 50), args.legend=list(bty="n",horiz=F, x="topright", inset = c(-0.05, -0.1)), ) text(x = plot, y = values$value, label = paste0(values$value, "%"), pos = 3) ``` ![](https://i.imgur.com/JvCaEZY.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-29T14:00:05.360
2023-01-29T15:02:34.773
2023-01-29T15:02:34.773
14,282,714
14,282,714
null
75,275,484
2
null
75,275,422
2
null
Just add the `names.arg` argument. ``` labels = c("label1", "label2", "label3", "label4", "label5") percantage <- 50 # plotting multiple bar plots barplot(as.matrix(data), main="", yaxp=c(0, max(percantage), 5), col = c("#b62528","#f49401","#f9e536","#018404"), ylab="Percentage", xlab = "Elevation [m. a. s. l.]", beside=T, legend.text = c("CR","EN","VU","LC or NT"), names.arg = labels, args.legend=list(bty="n",horiz=F, x="topright", inset = c(- 0.05, -0.1)), ) ``` [](https://i.stack.imgur.com/mlai7.png)
null
CC BY-SA 4.0
null
2023-01-29T14:01:58.350
2023-01-29T14:01:58.350
null
null
4,752,675
null
75,275,539
2
null
75,275,422
1
null
Please check the below code where we can use `names.arg` and `text` to get the expected output ``` barplot1=c(8,3,4,1) barplot2=c(18,11,11,13) barplot3=c(39,42,42,45) barplot4=c(26,30,31,34) barplot5=c(9,13,12,7) data <- data.frame(barplot1,barplot2,barplot3,barplot4,barplot5) percantage <- 55 # plotting multiple bar plots bar <- barplot(as.matrix(data), main="", ylim = c(0,percantage), col = c("#b62528","#f49401","#f9e536","#018404"), ylab="Percentage", xlab = "Elevation [m. a. s. l.]", beside=T, legend.text = c("CR","EN","VU","LC or NT"), names.arg=c("group1","group2","group3","group4","group5"), args.legend=list(bty="n",horiz=F, x="topright", inset = c(- 0.05, -0.1)), ) text(bar, as.matrix(data) + 2, labels = as.matrix(data)) ``` ![](https://i.imgur.com/YHX3jgQ.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-29T14:10:25.157
2023-01-29T17:57:16.563
2023-01-29T17:57:16.563
14,454,397
14,454,397
null
75,275,664
2
null
75,274,836
1
null
You can create a derived class from `DataGridTextColumn` and override `GenerateElement()`: ``` using CommunityToolkit.WinUI.UI.Controls; using Microsoft.UI.Xaml.Media; using Microsoft.UI.Xaml; using System.Collections.Generic; using Windows.UI; namespace DataGridTests; public class DataGridTextColumnEx : DataGridTextColumn { public Dictionary<string, Color> ValueToColorDictionary { get => (Dictionary<string, Color>)GetValue(ValueToColorDictionaryProperty); set => SetValue(ValueToColorDictionaryProperty, value); } public static readonly DependencyProperty ValueToColorDictionaryProperty = DependencyProperty.Register( nameof(ValueToColorDictionary), typeof(Dictionary<string, Color>), typeof(DataGridTextColumnEx), new PropertyMetadata(new Dictionary<string, Color>())); protected override FrameworkElement GenerateElement(DataGridCell cell, object dataItem) { if (dataItem is Item item && ValueToColorDictionary.TryGetValue(item.Value, out Color color) is true) { cell.Background = new SolidColorBrush(color); } return base.GenerateElement(cell, dataItem); ; } } ``` We can pass he colors using the `DependencyProperty` ValueToColorDictionary. Now wen can use it like this: ``` using CommunityToolkit.Mvvm.ComponentModel; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Linq; namespace DataGridTests; public class Item { public string Name { get; set; } = string.Empty; public string Value { get; set; } = string.Empty; } public partial class MainWindowViewModel : ObservableObject { [ObservableProperty] private ObservableCollection<Item> items = new() { { new Item() { Name="Person1", Value="A" } }, { new Item() { Name="Person2", Value="Z" } }, { new Item() { Name="Person3", Value="B" } }, { new Item() { Name="Person4", Value="Z" } }, { new Item() { Name="Person5", Value="C" } }, }; [ObservableProperty] private Dictionary<string, Color>valueToDictionary = new() { { "A", Colors.HotPink }, { "B", Colors.LightGreen }, { "C", Colors.SkyBlue }, }; } ``` ``` <Window x:Class="DataGridTests.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="using:DataGridTests" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:toolkit="using:CommunityToolkit.WinUI.UI.Controls" mc:Ignorable="d"> <Grid> <toolkit:DataGrid AutoGenerateColumns="False" ItemsSource="{x:Bind ViewModel.Items, Mode=OneWay}"> <toolkit:DataGrid.Columns> <toolkit:DataGridTextColumn Width="250" Binding="{Binding Name}" FontSize="14" Header="Name" /> <local:DataGridTextColumnEx Width="250" Binding="{Binding Value}" FontSize="14" Header="Value" ValueToColorDictionary="{x:Bind ViewModel.ValueToDictionary, Mode=OneWay}" /> </toolkit:DataGrid.Columns> </toolkit:DataGrid> </Grid> </Window> ```
null
CC BY-SA 4.0
null
2023-01-29T14:28:46.210
2023-01-29T14:33:57.417
2023-01-29T14:33:57.417
2,411,960
2,411,960
null
75,275,834
2
null
75,270,931
0
null
The most common cause is not adding the `-ObjC` to the `Other Linker Flags` options in the Xcode `Build Settings` tab. More details at [https://github.com/firebase/firebase-ios-sdk/blob/master/SwiftPackageManager.md](https://github.com/firebase/firebase-ios-sdk/blob/master/SwiftPackageManager.md).
null
CC BY-SA 4.0
null
2023-01-29T14:56:41.833
2023-01-29T14:56:41.833
null
null
556,617
null
75,275,919
2
null
75,271,115
0
null
I find out what was causing the problem. It was the property ``` lazy var textDetectionRequest: VNRecognizeTextRequest = { let request = VNRecognizeTextRequest(completionHandler: handleDetectedText) request.recognitionLevel = .accurate request.recognitionLanguages = ["en_GB"] return request }() ``` I just need to move it to start of the class(removing it from inside the function) and everything works perfectly now on Xcode 14
null
CC BY-SA 4.0
null
2023-01-29T15:07:33.527
2023-01-29T15:07:33.527
null
null
1,353,621
null
75,275,958
2
null
75,268,651
0
null
I tried to set up the vueitfy3 with vite-plugin-vuetify and some addition config to overriding the variables, but faced with so many warnings related to vuetify. [warrnings](https://i.stack.imgur.com/wkGdd.png) ``` nuxt.config import vuetify from 'vite-plugin-vuetify' export default defineNuxtConfig({ build: { transpile: ['vuetify'], }, modules: [ async (options, nuxt) => { nuxt.hooks.hook('vite:extendConfig', (config) => // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore config.plugins.push( vuetify({ styles: { configFile: 'assets/variables.scss', }, }) ) ); } ], vite: { define: { 'process.env.DEBUG': false, }, css: { preprocessorOptions: { scss: { additionalData: ` @import "assets/variables.scss"; ` } } } }, app: { head: { title: '', meta: [ { charset: 'utf-8' }, { name: 'viewport', content: 'width=device-width, initial-scale=1' }, { hid: 'description', name: 'description', content: '' }, { name: 'format-detection', content: 'telephone=no' }, ], link: [ { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' } ] } } }) ``` ``` plugins/vuetify import { createVuetify } from 'vuetify' import * as components from 'vuetify/components' import * as directives from 'vuetify/directives' import 'vuetify/styles' export default defineNuxtPlugin(nuxtApp => { const vuetify = createVuetify({ components, directives }) nuxtApp.vueApp.use(vuetify) }) ``` ``` assets/variables.scss @use 'vuetify/settings' with ( $application-background: red, $application-color: red ); ```
null
CC BY-SA 4.0
null
2023-01-29T15:11:43.107
2023-01-29T15:50:06.640
2023-01-29T15:50:06.640
21,099,947
21,099,947
null
75,275,996
2
null
75,275,100
0
null
So, a few things: Don't wrap long lines of code, they are VERY prone to errors. Looking at your SQL, you have this: ``` select datelogged AS EntredDatetime, Doc_type AS OrderType, Printer_name, BranchID AS BranchCode, Status, id from Print_Report where cast(datelogged as date)=@datelogged and and FORMAT(CAST(datelogged AS DATETIME), 'HH:mm')>'@FromTime' AND FORMAT(CAST(datelogged AS DATETIME), 'HH:mm')<@ToTime" ``` Note how easy now we see "and and" in your SQL. And don't do those casts in the SQL, since it messy, but such expressions can't be indexed, and they will run turtle slow. (besides, it makes the SQL rather a mess to work with). next up: consider moving the in-line SQL out to a stored procedure, but even better (and less effort and work) is to use a view, and thus "less" work then a stored procedure, you can use the query builder/designer, and EVEN better is multiple routines can use that one "view". You still use in-line SQL, but only say ``` select * from vPrint_Report WHERE datelogged is BETWEEN @dtStart AND @dtEnd"; ``` next up: Don't use add with value - use STRONG typed parameter's. next up: While using Parmaters.Add("some parm", "some value") is deprecated, since the 2nd parameter can be confused with int as dbtype? using typed parameter with "ADD" IS NOT deprecated!!!, and in fact I recommend using ``` .ADD("@ParmName", sqlDbType.int).Value = ``` Again, above format is NOT deprecated, with a non dbtype for 2nd parameter in above is deprecated!!! Next up: You don't show where that connection object is created. DO NOT try to make some global scoped connection object. While before the "web days", for performance, yes, often we "persisted" a connection object, but with web based, there is a automatic "connection" pool, and thus the standard is to re-create the connection's each time, and LET THE SYSTEM AUTOMATIC dispose for you. By doing this, you leverage the "automatic" connection system in .net web based system. Re-creating the connection object each time is NOT a performance hit, since the connection pool will "find" and use cached connection - it runs fast - feel free to re-create connection object each time. And how do you LET the system manage this for you? Why of course you ALWAYS wrap that code in using blocks. In your example, you ONLY dispose of the connection when code errors, but not on success. next up: As noted, don't try to parse out, or convert the date, and date time in the SQL, but supply STRONG types for start and end date (both with time). Not only is such code less of a mess, but it also a "tiny" bit of work in the code, but the SQL becomes VAST VAST less messy. So, we trade a "wee bit" of code for a HUGE bonus of nice clean SQL. So, lets take all of the above lessons, and thus we get this now: ``` public DataTable GetDataForSearch(string datelogged, string FromTime, string ToTime) { DataTable dt = new DataTable(); string strCon = Properties.Settings.Default.TEST4; // change to YOUR conneciton using (SqlConnection conn = new SqlConnection(strCon)) { string strSQL = @"select datelogged AS EntredDatetime, Doc_type AS OrderType, Printer_name, BranchID AS BranchCode, Status, id FROM Print_Report WHERE datelogged is BETWEEN @dtStart AND @dtEnd"; DateTime dtDate = DateTime.Parse(datelogged); DateTime dtFromTime = DateTime.Parse(FromTime); DateTime dtToTime = DateTime.Parse(ToTime); DateTime dtStart = dtDate.Add(new TimeSpan(dtFromTime.Hour, dtFromTime.Minute, dtFromTime.Second)); DateTime dtEnd = dtDate.Add(new TimeSpan(dtToTime.Hour, dtToTime.Minute, dtToTime.Second)); using (SqlCommand cmd = new SqlCommand(strSQL, conn)) { cmd.Parameters.Add("@dtStart", SqlDbType.DateTime).Value = dtStart; cmd.Parameters.Add("@dtEnd", SqlDbType.DateTime).Value = dtEnd; try { conn.Open(); dt.Load(cmd.ExecuteReader()); } } } return dt; } ``` So, note how we let the system "close" the connection's, and dispose of it. And even if the code errors out, even when NOT trapped, the connection and command object will be correctly disposed and managed for you - IN ALL cases!!! Also, note how a bit of effort on the code side to get STRONG TYPED date start and end, thus makes the SQL part a whole lot less work, but MORE important also means that we use + enjoy STRONG typed values for the parameter's, and we enjoy use of high speed indexing.
null
CC BY-SA 4.0
null
2023-01-29T15:16:47.737
2023-01-29T15:38:38.493
2023-01-29T15:38:38.493
10,527
10,527
null
75,276,083
2
null
75,275,100
0
null
Always declare the type of parameter you're passing into SQL. Don't rely on sql to infer it. Also make a habit of wrapping your db connection in a `Using` block. ``` cmd.Parameters.Add("@datelogged", sqldbtype.datetime).value = datelogged; cmd.Parameters.Add("@FromTime", sqldbtype.time).value = FromTime; cmd.Parameters.Add("@ToTime", Sqldbtype.time).value = ToTime; ``` You'll need to add code for the @branch and @ordertype parameters as well. Your SQL would look like the below. When writing SQL, most mistakes can be managed by consistently formatting your SQL while you write it. Parameters do not need to be wrapped in quotes when you declare the data type of the param like I have above. It handles all that for you. Rather than comparing the date separately, I opted to pass the times in as Time data type and then cast them to datetime inside the query. From there, you can add two date times together with the `+` and then do your comparison the same way. If you decide to pass your to/from values in as datetime then just remove the declare line at the top. You could use `BETWEEN` in the `WHERE` clause but that's at your discretion. ``` DECLARE @To DATETIME = (@datelogged + CAST(@ToTime AS DATETIME)), @From DATETIME = (@datelogged + CAST(@FromDate AS DATETIME)); SELECT datelogged AS EntredDatetime, Doc_type AS OrderType, Printer_name, BranchID AS BranchCode, Status, ID FROM Print_Report WHERE BranchID = @BranchCode AND Doc_type = @OrderType AND datelogged >= @From AND datelogged <= @To ```
null
CC BY-SA 4.0
null
2023-01-29T15:28:37.963
2023-01-29T15:34:36.367
2023-01-29T15:34:36.367
18,920,732
18,920,732
null
75,276,251
2
null
19,841,915
0
null
Look at this video in youtube: Missing the ASP.NET Web Template option in Visual Studio For me work: Using the installer from visual studio 2022 por example, Modify > Individual components > Select .NET Framework project and item templates and click Modify, and try again.
null
CC BY-SA 4.0
null
2023-01-29T15:54:01.523
2023-01-29T15:54:01.523
null
null
21,105,307
null
75,276,624
2
null
55,586,591
0
null
I also had the same issue in my which has a dependency on Realm. Building was fine, but when archiving everything was stuck. The solution was to change target dependency from ``` .product(name: "Realm", package: "realm-swift") ``` to ``` .product(name: "RealmSwift", package: "realm-swift") ``` Hope this will help somebody having a similar issue.
null
CC BY-SA 4.0
null
2023-01-29T16:48:04.403
2023-01-29T16:48:04.403
null
null
5,765,283
null
75,276,712
2
null
75,276,627
0
null
You can on both teams (and that fits your request: ): ``` df.groupBy("HomeTeam","AwayTeam").count().show(truncate=False) ```
null
CC BY-SA 4.0
null
2023-01-29T17:01:16.613
2023-01-29T17:01:16.613
null
null
3,185,459
null
75,278,003
2
null
25,182,303
0
null
This is the answer using html. You add this as a method in your `ModelAdmin` class: ``` def title_(self, obj): from django.utils.html import format_html return format_html( f'<div style="width: 100px; word-wrap: break-word">{obj.title}</div>' ) ``` Then you add `title_` to your `list_display` declaration instead of `title`.
null
CC BY-SA 4.0
null
2023-01-29T20:05:17.120
2023-01-29T20:05:17.120
null
null
10,134,077
null
75,278,085
2
null
75,268,731
0
null
When you create the variable activationCOnfigParser you're in a try/Catch block. You can bypass this error : ``` private void getGtcj(String gtcjStatusValue, String strArchiveReqd) throws Exception { XPathHelper activationConfigParser = null; try { activationConfigParser = ConfigUtil.getInstance().getConfigParser(new URL((V21Constants.FILE + System.getProperty(V21Constants.USER_DIR) + "/vServe21/config/ActivationParameters.xml"))); } catch (Exception e) { actionConfigParser = <DEFAULT VALUE> log.error(e.getMessage()); } ``` In catch block there is that you can replace with a value that actionConfigParser has to assuming in case of exception.
null
CC BY-SA 4.0
null
2023-01-29T20:16:22.507
2023-01-29T20:16:22.507
null
null
16,979,662
null
75,278,339
2
null
75,278,128
1
null
You can't do this with the built-in [Picker](https://developer.apple.com/documentation/swiftui/picker#), because it doesn't offer a style like that and [PickerStyle](https://developer.apple.com/documentation/swiftui/pickerstyle#) doesn't let you create custom styles (as of the 2022 releases). You can create your own implementation out of other SwiftUI views instead. Here's what my brief attempt looks like: [](https://i.stack.imgur.com/p29p0.gif) Here's the code: ``` enum SoundOption { case none case alertsOnly case all } struct SoundOptionPicker: View { @Binding var option: SoundOption @State private var isExpanded = false var body: some View { HStack(spacing: 0) { button(for: .none, label: "volume.slash") .foregroundColor(.red) button(for: .alertsOnly, label: "speaker.badge.exclamationmark") .foregroundColor(.white) button(for: .all, label: "volume.2") .foregroundColor(.white) } .buttonStyle(.plain) .background { Capsule(style: .continuous).foregroundColor(.black) } } @ViewBuilder private func button(for option: SoundOption, label: String) -> some View { Button { withAnimation(.easeOut) { if isExpanded { self.option = option isExpanded = false } else { isExpanded = true } } } label: { Image(systemName: label) .fontWeight(.bold) .padding(10) } .frame(width: shouldShow(option) ? buttonSize : 0, height: buttonSize) .opacity(shouldShow(option) ? 1 : 0) .clipped() } private var buttonSize: CGFloat { 44 } private func shouldShow(_ option: SoundOption) -> Bool { return isExpanded || option == self.option } } struct ContentView: View { @State var option = SoundOption.none var body: some View { ZStack { Color(hue: 0.6, saturation: 1, brightness: 0.2) SoundOptionPicker(option: $option) .shadow(color: .gray, radius: 3) .frame(width: 200, alignment: .trailing) } } } ```
null
CC BY-SA 4.0
null
2023-01-29T20:58:14.423
2023-01-29T20:58:14.423
null
null
77,567
null
75,278,391
2
null
73,659,617
0
null
It's because your class is named "RestController" same as the interface you are trying to implement by @RestController annotation
null
CC BY-SA 4.0
null
2023-01-29T21:06:22.277
2023-01-29T21:06:22.277
null
null
20,401,498
null
75,278,430
2
null
75,278,203
0
null
Here is one way to achieve your end goal: ``` from selenium import webdriver from selenium.webdriver.chrome.service import Service from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC chrome_options = Options() chrome_options.add_argument("--no-sandbox") chrome_options.add_argument('disable-notifications') chrome_options.add_argument("window-size=1280,720") webdriver_service = Service("chromedriver_linux64/chromedriver") ## path to where you saved chromedriver binary driver = webdriver.Chrome(service=webdriver_service, options=chrome_options) wait = WebDriverWait(driver, 25) url = 'https://opensource-demo.orangehrmlive.com/' driver.get(url) wait.until(EC.element_to_be_clickable((By.XPATH, '//input[@name="username"]'))).send_keys('Admin') wait.until(EC.element_to_be_clickable((By.XPATH, '//input[@name="password"]'))).send_keys('admin123') wait.until(EC.element_to_be_clickable((By.XPATH, '//button[@type="submit"]'))).click() wait.until(EC.element_to_be_clickable((By.XPATH, '//span[text()="Admin"]'))).click() wait.until(EC.element_to_be_clickable((By.XPATH, '//button[@class="oxd-button oxd-button--medium oxd-button--secondary"]'))).click() wait.until(EC.presence_of_all_elements_located((By.XPATH, '//div[@class="oxd-select-wrapper"]')))[0].click() ## let's look at the dropdown with options structure print(wait.until(EC.presence_of_element_located((By.XPATH, '//div[@role="listbox"]'))).get_attribute('outerHTML')) ## do you want to make it an Admin? # wait.until(EC.element_to_be_clickable((By.XPATH, '//div[@role="listbox"]//span[text()="Admin"]'))).click() ## do you want to make it an ESS? wait.until(EC.element_to_be_clickable((By.XPATH, '//div[@role="listbox"]//span[text()="ESS"]'))).click() ## moving on to the next dropdown wait.until(EC.presence_of_all_elements_located((By.XPATH, '//div[@class="oxd-select-wrapper"]')))[1].click() ### please continue yourself ``` You can find Selenium documentation [here](https://www.selenium.dev/documentation/).
null
CC BY-SA 4.0
null
2023-01-29T21:13:44.417
2023-01-29T21:18:52.530
2023-01-29T21:18:52.530
19,475,185
19,475,185
null
75,278,550
2
null
75,269,949
0
null
I only added `unique` to `Mongoose Schema` ``` const mongoose = require('mongoose') const userSchema = mongoose.Schema({ "id": { type: Number, required: true, unique:true }, "email": { type: String, required: true, unique:true }, "first_name":{ type: String, required: true }, "last_name":{ type: String, required: true }, "company":{ type: String, required: true }, "url":{ type: String, required: true, unique:true }, "text":{ type: String, required: true } }); module.exports = mongoose.model('User', userSchema); ```
null
CC BY-SA 4.0
null
2023-01-29T21:33:06.587
2023-01-29T21:33:38.073
2023-01-29T21:33:38.073
20,911,687
20,911,687
null
75,278,602
2
null
75,271,675
0
null
The element button is within [#shadow-root (open)](https://stackoverflow.com/q/56380091/7429447) ![usercentrics](https://i.stack.imgur.com/GGajq.png) --- ## Solution To click on the desired element you need to use [querySelector()](https://stackoverflow.com/a/70198069/7429447) and you can use the following [locator strategies](https://stackoverflow.com/questions/48369043/official-locator-strategies-for-the-webdriver): ``` driver.get("https://www.dm.rs/?wt_mc=sea.google.ads_generic.15146192844.132927670207.558370268562"); Thread.sleep(5000); WebElement element = driver.findElement(By.cssSelector("#usercentrics-root")); SearchContext context = element.getShadowRoot(); WebElement cookieAcceptAll = context.findElement(By.cssSelector("button[data-testid='uc-accept-all-button']")); cookieAcceptAll.click(); ``` --- ## References You can find a couple of relevant detailed discussions in: - [How to automate shadow DOM elements using selenium?](https://stackoverflow.com/a/73242476/7429447)- [How to locate the First Name element within #shadow-root (open) using Selenium4 and Java](https://stackoverflow.com/a/73174561/7429447)
null
CC BY-SA 4.0
null
2023-01-29T21:43:07.017
2023-01-29T21:43:07.017
null
null
7,429,447
null
75,279,029
2
null
73,012,612
0
null
You can achieve this by converting your circle to a mask and assign it to a `foreignObject`, this object contains a div with the conic-gradient style. Here is an example how it works: ``` const control = document.getElementById('control'); const circle = document.getElementsByClassName('circle')[0]; const bg = document.getElementsByClassName('bg')[0]; control.addEventListener('input', function(event) { circle.style.setProperty('--progress', event.target.valueAsNumber); const deg = (event.target.valueAsNumber/100) * 360; bg.style.setProperty('background', `conic-gradient(#00bcd4, #ffeb3b ${deg}deg)`); }); ``` ``` .root { width: 400px; height: 400px; text-align: center; } svg { } .circle { stroke: white; stroke-width: 3; stroke-linecap: round; stroke-dasharray: calc((2 * 3.14) * 45); stroke-dashoffset: calc((2 * 3.14 * 45) * (1 - calc(var(--progress, 50) / 100))); transform-origin: 50% 50%; transform: rotate(-87deg); } .bg { background: conic-gradient(#00bcd4, #ffeb3b 180deg); width: 100%; height: 100%; } ``` ``` <div class='wrap'> <div class='root'> <svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <defs> <mask id="mask"> <circle class='circle' cx="50" cy="50" r="45" stroke='white' stroke-width='3' fill='none' /> </mask> </defs> <foreignObject x="0" y="0" width="100" height="100" mask="url(#mask)"> <div class='bg'></div> </foreignObject> </svg> <input id="control" type="range" value="60" /> </div> </div> ```
null
CC BY-SA 4.0
null
2023-01-29T23:04:54.240
2023-01-29T23:04:54.240
null
null
1,373,110
null
75,279,284
2
null
37,805,754
0
null
, This is pretty easy, starting from iOS 13 `UISearchBar` has a `.searchTextField` property we may want to tweak somehow. Just set image view as its `.leftView` property, apply required tint color if needed. ``` let image = UIImage(systemName: "location") searchBar.searchTextField.leftView = UIImageView(image: image) searchBar.searchTextField.leftView?.tintColor = .purple ```
null
CC BY-SA 4.0
null
2023-01-30T00:07:11.143
2023-01-30T00:12:52.520
2023-01-30T00:12:52.520
1,583,877
1,583,877
null
75,279,337
2
null
64,493,316
0
null
I think you have empty cells. You should fill them with zeros.
null
CC BY-SA 4.0
null
2023-01-30T00:21:59.833
2023-01-30T00:21:59.833
null
null
9,097,148
null
75,279,641
2
null
61,761,567
0
null
Seems like something is wrong with the dependencies, just close down the react-native environment ( android studio) and your IDE, just closing and restarting may work if not, check for updates or delete and reinstall your dependencies ( expo i )
null
CC BY-SA 4.0
null
2023-01-30T01:52:18.540
2023-01-30T01:52:18.540
null
null
21,107,400
null
75,279,766
2
null
57,159,286
0
null
You can remove link underlining in email signatures in Gmail by using a non-Chrome browser to set up the signature, as follows: 1. Open your email signature in a non-Chrome browser, e.g. Firefox 2. Copy the entire signature - select all (Ctrl/Cmd-A), copy (Ctrl/Cmd-C) 3. Open Gmail in the same non-Chrome browser (this is important - Chrome's user-agent stylesheet will interfere if you perform this step using Chrome) 4. Select the Gear icon > See all settings 5. Paste the signature into the email signature field 6. Save You can now open a Chrome browser and compose a new email. The email signature should appear without the underlines. If it doesn't work the first time (as it for me), delete the draft, reload Gmail and compose again.
null
CC BY-SA 4.0
null
2023-01-30T02:20:07.910
2023-01-30T02:20:07.910
null
null
1,684,875
null
75,280,271
2
null
75,278,333
1
null
This is the `editor.guides.bracketPairs` setting. You can add ``` "editor.guides.bracketPairs": true ``` to your settings.json, or if you only want the guide for the current line, ``` "editor.guides.bracketPairs": "active" ```
null
CC BY-SA 4.0
null
2023-01-30T04:29:29.317
2023-02-04T08:05:31.947
2023-02-04T08:05:31.947
11,107,541
11,107,541
null
75,280,332
2
null
75,270,599
0
null
Linear gradient mask-image transparency (several different ways to make it). Below is one of the ways. A helpful source for this is: [mozilla](https://developer.mozilla.org/en-US/docs/Web/CSS/mask-image) ``` .mask { color: #000; font-size: 20px; mask-image: linear-gradient(to left, rgba(0,0,0,1), transparent); mask-size: 100% 100%; mask-repeat: no-repeat; } ``` ``` <div class="mask"><p>text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text text </p></div> ```
null
CC BY-SA 4.0
null
2023-01-30T04:43:47.970
2023-01-30T05:35:06.133
2023-01-30T05:35:06.133
19,217,876
19,217,876
null
75,280,394
2
null
28,683,327
0
null
I tried different libraries but could not find one that I like. Some require you to migrate your code, some require to run via the command line. So I made a Gradle plugin that add updates to comments. Minimize the modification of your codes. [https://github.com/zeroarst/dependency-updates-commenter](https://github.com/zeroarst/dependency-updates-commenter) Example: Before ``` object Junit { const val junit = "junit:junit:4.12" } ``` After ``` import io.github.zeroarst.dependencyupdatescommenter.CommentUpdates object Junit { // Available versions: // 4.13-rc-2 // 4.13-rc-1 // 4.13-beta-3 // 4.13-beta-2 // 4.13-beta-1 @CommentUpdates const val junit = "junit:junit:4.12" } ```
null
CC BY-SA 4.0
null
2023-01-30T04:54:53.173
2023-01-30T04:54:53.173
null
null
452,486
null
75,280,541
2
null
73,685,028
0
null
There maybe 2 problems with your database connection. Try to write correct database username and password at your .env file, in case you have created manually, OR If you are working on existing database, then try to create new user for your my sql database, Open your mysql database go to privileges, add new user for your database and set password, then rewrite the username and password at .env file. [](https://i.stack.imgur.com/549z2.png)
null
CC BY-SA 4.0
null
2023-01-30T05:28:44.047
2023-01-30T05:44:58.977
2023-01-30T05:44:58.977
11,227,220
11,227,220
null
75,280,620
2
null
75,272,790
0
null
It is green. Just use the LEFT Arrow to select and proceed. [](https://i.stack.imgur.com/0tpv6.png)
null
CC BY-SA 4.0
null
2023-01-30T05:44:18.990
2023-01-30T05:44:18.990
null
null
10,867,936
null
75,280,925
2
null
75,267,096
1
null
You will need to create a deep link for your React Native app: [https://reactnative.dev/docs/linking](https://reactnative.dev/docs/linking) and then set this as your redirect URL. Here a similar example with Flutter: [https://supabase.com/docs/guides/getting-started/tutorials/with-flutter#setup-deep-links](https://supabase.com/docs/guides/getting-started/tutorials/with-flutter#setup-deep-links)
null
CC BY-SA 4.0
null
2023-01-30T06:34:35.553
2023-01-30T06:34:35.553
null
null
17,622,044
null
75,281,031
2
null
75,254,348
0
null
I found answer! I installed mui and material-ui. When I deleted material-ui and installed mui/lab it worked
null
CC BY-SA 4.0
null
2023-01-30T06:52:40.517
2023-01-30T06:52:40.517
null
null
21,091,157
null
75,281,310
2
null
75,281,234
0
null
Use [Series.value_counts](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.value_counts.html) with normalize for percentages and for remove groups bellow `0.05` filter mapped column greater or equal `0.05` in [boolean indexing](http://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#boolean-indexing): ``` percentage = crime.OffenseDescription.value_counts(normalize=True) crime[crime['OffenseDescriptiom'].map(percentage) >= 0.05)] ```
null
CC BY-SA 4.0
null
2023-01-30T07:30:51.007
2023-01-30T07:30:51.007
null
null
2,901,002
null
75,281,499
2
null
74,781,566
0
null
The Dialog you see is the `LinkSelector` control which is used to select multiple link fields and append them to the child table. If you open your browser's devtools, you'll notice a `search_widget` API call being made with some parameters like the following: ``` searchfield: name query: erpnext.controllers.queries.item_query filters: {"supplier":"_Test Supplier","is_purchase_item":1,"has_variants":0} doctype: Item ``` You'll have to override the `get_query` call set on `item_code` field of `purchase_invoice.js`. Here's the snippet that queries the current result: ``` cur_frm.fields_dict['items'].grid.get_field("item_code").get_query = function(doc, cdt, cdn) { return { query: "erpnext.controllers.queries.item_query", filters: {'is_purchase_item': 1} } } ``` Understand how the `item_query` API works and make the appropriate changes to tailor your requirements from there. From a quick search & review of the code, I have a hunch that you'll have to add more fields under the `searchfield` parameter.
null
CC BY-SA 4.0
null
2023-01-30T07:53:01.033
2023-01-30T07:53:01.033
null
null
10,309,266
null
75,281,823
2
null
75,280,635
0
null
can you try morphological operations like dilation and see if it improves ?
null
CC BY-SA 4.0
null
2023-01-30T08:29:17.510
2023-01-30T08:29:17.510
null
null
4,286,568
null
75,281,872
2
null
75,279,852
1
null
You've tagged vba, and you've asked for vba to do this.. so here is a solution using vba. Some (most!) might call this overkill. The following code scans the sheet and looks for the edges of the table before starting. Because of this, column A and row 1 need to be empty other than for this table - like your screenshot. It then examines each cell of the table and if the left-most cell ends with the word "Total", it creates a formula to sum up from the last subtotal down to the cell above the formula. ``` Sub try_this() Dim wb As Workbook, ws As Worksheet Dim x As Long, y as Long, lastrow As Long, lastcolumn As Long Dim last_subtotal as long Set wb = ActiveWorkbook Set ws = wb.ActiveSheet With ws lastcolumn = .Cells(1, .Columns.Count).End(xlToLeft).Column lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row For x = 2 To lastcolumn last_subtotal = 1 For y = 2 To lastrow If Right(.Cells(y, 1).Value, 5) = "Total" Then .Cells(y, x).Formula2 = "=sum(" & .Cells(last_subtotal + 1, x).Address & ":" & .Cells(y - 1, x).Address & ")" last_subtotal = y End If Next Next End With End Sub ``` Each time it is run, it will overwrite the formula before so can be used to 'correct' formulae that have become incorrect due to a user inserting rows in the wrong place etc. You could even perhaps use an event to ensure they're re-written all the time if you wanted full over-kill.
null
CC BY-SA 4.0
null
2023-01-30T08:34:37.007
2023-01-30T08:34:37.007
null
null
7,446,760
null
75,282,347
2
null
75,265,820
0
null
``` def function1(dd:pd.DataFrame): dd1=dd.drop_duplicates(subset='runs',keep=False) return dd1.assign(runs=dd1.runs.rank().astype(int)) df.groupby('id').apply(function1).reset_index(drop=True) ``` out: ``` id runs Children Days 0 1 1 Yes 128 1 1 2 Yes 66 2 1 3 Yes 120 3 1 4 No 141 4 2 1 Yes 141 5 2 2 Yes 52 6 2 3 Yes 96 7 3 1 Yes 36 8 3 2 Yes 58 9 3 3 No 89 ```
null
CC BY-SA 4.0
null
2023-01-30T09:23:01.563
2023-01-30T09:23:01.563
null
null
20,284,103
null
75,282,371
2
null
7,725,809
0
null
Child process`s stdout is not a TTY I'm facing a similar issue ``` // main const child = spawn('node', ['./child.js'], { stdio: 0, 'pipe', 2 }); child.stdout.pipe(process.stdout); // child console.log(process.stdout.isTTY); // undefined console.log(123); // no color console.log('\u001b[1;34mhello\u001b[0m'); // color preserved ``` Only the third console will display color, and `isTTY` is undefined. I tried `node-pty`, but that will lost IPC support. So I tried to replace the global console instance: ``` // main const child = spawn('node', ['./child.js'], { stdio: 0, 'pipe', 2 }); child.stdout.pipe(process.stdout); // child const { Console } = require('console'); // node>=8 global.console = new Console({ stdout: process.stdout, stderr: process.stderr, colorMode: true, }); console.log(process.stdout.isTTY); // undefined console.log(123); // color preserved console.log('\u001b[1;34mhello\u001b[0m'); // color preserved ```
null
CC BY-SA 4.0
null
2023-01-30T09:24:35.417
2023-01-30T09:24:35.417
null
null
21,109,294
null
75,282,892
2
null
75,282,847
0
null
Your code is correct , but you have made a minor mistake which is making it false . ``` <T> boolean allDistinct(T[] a) { boolean r = true; for (int i = 0; i < a.length; i++) { for (int j = i+1; j < a.length; j++) // changed j=0 to j=i+1 { if (a[i] == a[j]) { r = false; } } } return r; } ``` I have changed `j=0` to `j=i+1` , because when looping again , you are checking if both first elements are equal and it is failing
null
CC BY-SA 4.0
null
2023-01-30T10:12:09.513
2023-01-30T10:20:48.227
2023-01-30T10:20:48.227
12,224,743
12,224,743
null
75,282,906
2
null
75,282,847
1
null
This is very simple task. First of all, you should compare two objects with type `T` using `equals()`. Your task is to put all data into a `HashSet` collection. And if the final size of the collection is less thant the length of the array, it means, that the array contains not distinct values. ``` public static <T> boolean isAllDistinct(T[] arr) { Set<T> unique = new HashSet<>(); for (T item : arr) if (!unique.add(item)) return false; return true; } ``` or using `Stream` ``` public static <T> boolean isAllDistinct(T[] arr) { return Arrays.stream(arr).collect(Collectors.toSet()).size() == arr.length; } ```
null
CC BY-SA 4.0
null
2023-01-30T10:13:33.863
2023-01-30T12:06:54.207
2023-01-30T12:06:54.207
3,461,397
3,461,397
null
75,282,971
2
null
75,282,847
1
null
First, you were right, you absolutely need to use `equals` and not `==` (see, e.g., [What is the difference between == and equals() in Java?](https://stackoverflow.com/q/7520432/2422776)). Second, as [Umeshwaran's answer](https://stackoverflow.com/a/75282892/2422776)'s states, by "naively" looping over `i` and `j`, you have multiple cases where `i` and `j` are the same, and thus you'd be comparing an object to itself and wrongly returning `false`. Third, while this has no effect on the of the solution, from a performance perspective you should use the early return idom. Once you found a duplicate value there's no chance of it getting "unduplicated", so it's pointless to continue iterating over the rest of the array: ``` <T> boolean allDistinct(T[] a) { for (int i = 0; i < a.length; i++) { for (int j = i + 1; j < a.length; j++) { // changed j=0 to j=i+1 if (a[i] == a[j]) { return false; // Early return } } } return true; } ``` Having said all of that, it may be easier to let Java's `Set`s do the heavy lifting for you, although this is tradeoff between runtime complexity and memory complexity: ``` <T> boolean allDistinct(T[] a) { Set<T> tempSet = new HashSet<>(Arrays.asList(a)); return tempSet.size() == a.length; } ```
null
CC BY-SA 4.0
null
2023-01-30T10:18:29.177
2023-01-30T10:18:29.177
null
null
2,422,776
null
75,283,329
2
null
22,403,261
0
null
I had the same problem. In the template on my server I put my script tag inside of the main content container. ``` {% block content %} {% block js %} <script src='path/toJSFile.js'></script> {% endblock %} {% endblock %} ``` Which means that after rendering my script was not at the bottom of the `<body>` tag but inside of `div.container` and for some reason after rendering I had two duplicated scripts instead of one. One in a `div.container` another at the bottom of the `<body>` tag. Second one was inserted automatically for some reason. So after I moved script outside of the `div.content` container my script started behave as I expect. No duplicates, no double fetch requests. ``` {% block content %} ... {% endblock %} {% block js %} <script src='path/toJSFile.js'></script> {% endblock %} ``` Though my answer represents a snippet from a django template this approach should work in other cases as well. My suggestion is: you definitely want to place your script in a proper place (head or body) not inside of any divs.
null
CC BY-SA 4.0
null
2023-01-30T10:48:03.210
2023-01-31T23:21:45.157
2023-01-31T23:21:45.157
13,138,364
5,784,180
null
75,283,393
2
null
75,283,242
0
null
Based on your table schema, the data type for is VARCHAR. Have you tried a query like this? ``` select * from Annual_Crop where Geo = 'Alberta' ``` or ``` select * from Annual_Crop where Geo = '41600' ``` Varchar / string needs to use single quotes for the value.
null
CC BY-SA 4.0
null
2023-01-30T10:53:41.230
2023-01-30T10:53:41.230
null
null
4,923,755
null
75,283,577
2
null
75,269,279
0
null
I've just encountered a similar issue myself (when switching from `mysql:5.5` to `mysql:8`). The key to resolving it when using Azure Files appears to be setting the [- nobrl](https://learn.microsoft.com/en-us/troubleshoot/azure/azure-kubernetes/mountoptions-settings-azure-files) setting on the `StorageClass` : ``` kind: StorageClass apiVersion: storage.k8s.io/v1 metadata: name: mysql-sc-azurefile provisioner: file.csi.azure.com allowVolumeExpansion: true mountOptions: - file_mode=0777 - mfsymlinks - uid=999 - dir_mode=0777 - gid=999 - actimeo=30 - cache=strict - nobrl parameters: skuName: Standard_LRS ``` Additionally, you may need to set the [securityContext](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/) on the deployment to use `999` (to prevent mysql attempting to switch the user at startup) : ``` securityContext: runAsUser: 999 runAsGroup: 999 fsGroup: 999 ```
null
CC BY-SA 4.0
null
2023-01-30T11:10:43.900
2023-01-30T11:10:43.900
null
null
94,256
null
75,284,076
2
null
18,360,561
0
null
I resolved this issue by changing the framework to match the framework that the project is being built against. [resolution explained here](https://kb.blackbaud.com/knowledgebase/Article/119372)
null
CC BY-SA 4.0
null
2023-01-30T11:57:50.810
2023-01-30T11:57:50.810
null
null
12,421,110
null
75,284,203
2
null
64,887,265
0
null
It might be late or not relevant for specific PowerShell or Vstest software but more to help anyone like me searching for an answer on how to make (and eventually ending up here). The solution is pretty simple - use text wrapped in ANSI colour markup! I found some source examples for [typescript](https://github.com/joshmgross/action-template/blob/main/src/utils.ts#L12) and [shell](https://github.com/GhostWriters/DockSTARTer/blob/5d8d79459a6976dc5aed3581cb780a238099b5ac/main.sh#L232-L316) scripts. Yes, simple as that - if you can control the output then wrap your text with special markup and that would be it! P.S. More info and the most packed guide on ANSI colour output is here: [List of ANSI color escape sequences](https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences)
null
CC BY-SA 4.0
null
2023-01-30T12:10:21.493
2023-01-30T12:10:21.493
null
null
1,383,209
null
75,284,343
2
null
75,284,048
3
null
When specifying style using `key=val` inline, do not put space before and after the equal sign (`=`), ``` ![](Rlogo_svg.png){.absolute top=0 right=0 width=100 height=100} ``` --- [](https://i.stack.imgur.com/a9UgV.png) ---
null
CC BY-SA 4.0
null
2023-01-30T12:25:30.433
2023-01-30T12:57:02.960
2023-01-30T12:57:02.960
10,858,321
10,858,321
null
75,284,438
2
null
75,283,582
3
null
Somewhere in your code, you import ./lib/stringify which does not exist. Please check that, and if that wasn't your problem, then try to create a new react app. and delete the src and then copy your old src to a new react app. You can either manually install or copy the old package.json to the new react app. Then try npm i --legacy-peer-deps
null
CC BY-SA 4.0
null
2023-01-30T12:34:23.517
2023-01-30T12:34:23.517
null
null
19,429,308
null
75,284,579
2
null
75,283,602
0
null
Using structured logging resolves the problem. I don't understand why it doesn't work with a simple concatenation.
null
CC BY-SA 4.0
null
2023-01-30T12:45:54.507
2023-01-30T12:45:54.507
null
null
9,552,967
null
75,284,903
2
null
75,284,793
1
null
The "gnode" you seem to be running, is not part of the official distribution of NodeJS. Someone similar with your problem ([https://github.com/nodejs/help/issues/3670](https://github.com/nodejs/help/issues/3670)), found a solution by uninstalling whatever he had installed, and reinstalling the LTS version of node ([https://nodejs.org/en/download/](https://nodejs.org/en/download/)).
null
CC BY-SA 4.0
null
2023-01-30T13:12:01.307
2023-01-30T13:12:01.307
null
null
1,543,677
null
75,285,453
2
null
75,268,014
0
null
I fixed it. I used UndetectedChromeDriver wich does not use different ports. I use another Undetected driver now. Thank you all
null
CC BY-SA 4.0
null
2023-01-30T13:58:00.887
2023-01-30T13:58:00.887
null
null
19,534,353
null
75,285,725
2
null
17,040,200
0
null
This is what fixed my issue : - `ob_end_clean`- `exit`
null
CC BY-SA 4.0
null
2023-01-30T14:19:47.893
2023-01-30T14:34:52.777
2023-01-30T14:34:52.777
5,211,833
7,509,211
null
75,285,745
2
null
74,987,165
1
null
I had the same problem, only opened the project after disabling iCloud
null
CC BY-SA 4.0
null
2023-01-30T14:21:49.143
2023-02-01T15:33:26.560
2023-02-01T15:33:26.560
10,192,284
10,192,284
null
75,285,750
2
null
75,285,145
0
null
Apparently your app doesn't look into `blog`'s template folder. It only looks into `personal` and `account`'s template folders. You can check that in the attached picture under `template-loader postmortem`. It usually means that the app is not installed properly. There are lots of reasons for such a thing, among them: - `./src/``url.py`- `settings.py``blog`- [A restart and a migrate command might help](https://stackoverflow.com/questions/34952966/django-app-not-found-despite-adding-to-installed-apps#34955252) Otherwise you might have changed the app's template directory somewhere.
null
CC BY-SA 4.0
null
2023-01-30T14:22:17.047
2023-01-30T15:11:36.293
2023-01-30T15:11:36.293
19,043,901
19,043,901
null
75,285,868
2
null
75,285,030
1
null
This is mainly a question about Android build, not flutter. To change the output file name you can add this code into `android/app/bundle.gradle` ``` android { // ... applicationVariants.all { variant -> variant.outputs.all { outputFileName = "yourname.apk" } } } ``` Even when you run the command `flutter build apk` you will see the wrong name in the output (I guess that's a flutter issue), but no worries, your file name will be correct: [](https://i.stack.imgur.com/4iCDk.png)
null
CC BY-SA 4.0
null
2023-01-30T14:33:19.753
2023-01-30T14:33:19.753
null
null
4,977,439
null
75,286,141
2
null
73,805,429
0
null
You need to navigate to the exported folder and open the cmd and run the http server use [https://www.npmjs.com/package/http-server](https://www.npmjs.com/package/http-server) and run below command `npx http-server` this will run the application in port 8080
null
CC BY-SA 4.0
null
2023-01-30T14:57:50.513
2023-01-30T14:57:50.513
null
null
2,922,212
null
75,286,142
2
null
75,285,145
0
null
You have, in your settings.py, the configuration ``` 'DIRS': [os.path.join(BASE_DIR, 'Templates')], ``` so you need to have the Templates directory in your base directory, not inside each app, it should be ``` Template/blog/create.html ``` and not ``` blog/Template/blog/create.html ```
null
CC BY-SA 4.0
null
2023-01-30T14:57:51.787
2023-02-06T16:31:00.220
2023-02-06T16:31:00.220
13,203,011
13,203,011
null
75,286,222
2
null
75,276,424
0
null
# SOLUTION ## 1)HIDE/REMOVE EXTENSION : The extensions present in your browser are the PRIMARY reason why the error is caused. You can effectively disable the extensions. ## 2)USE INCOGNITO WINDOW: Using incognito window means that there is no interference of the extensions installed ( provided that you have not allowed access to your extensions in incognito mode ,in that case it can be easily disabled in extension setting ) [Image showing Extension access setting](https://i.stack.imgur.com/fo52R.png) ## BONUS TIP: - [EXTENSION MANAGER](https://chrome.google.com/webstore/detail/extension-manager/gjldcdngmdknpinoemndlidpcabkggco?hl=en)
null
CC BY-SA 4.0
null
2023-01-30T15:02:44.277
2023-01-30T15:06:03.157
2023-01-30T15:06:03.157
19,172,528
19,172,528
null
75,286,241
2
null
75,285,145
1
null
With [APP_DIRS](https://docs.djangoproject.com/en/4.1/ref/templates/api/#django.template.loaders.app_directories.Loader) enabled Django searches for templates inside each app `/templates/` subfolder. Lowercase, plural. You have `Template` - wrong case, missing `s` in the end. So yes, the template does not exist for Django because it cannot be found at any expected location.
null
CC BY-SA 4.0
null
2023-01-30T15:04:34.840
2023-01-30T18:02:15.997
2023-01-30T18:02:15.997
5,921,826
5,921,826
null
75,286,373
2
null
75,286,191
1
null
I assume you have build context in the folder with `Api.csproj` file. First - WORKDIR sets the current working directory in the container. It is not a directory on the host system. You start with a directory where you copy source code from the build context to the container. Good name for it /src ``` FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src # current directory in the container COPY . . # Copy everything from build context to /src RUN dotnet restore "Api.csproj" ``` Note that in order to optimize the build process and use caching, its better to start with copying *.csproj file only and restore dependencies. Because source code changes more often then dependencies of the application. Next you want to build/publish your application somewhere in a container. Usually you create new directory for that and don't use the system root: ``` #publish app to folder /publish RUN dotnet publish "Api.csproj" -c release -o /publish ``` And the last step - you should copy the published application to the runtime container. Here you set the current directory to the directory where the published application will be located: ``` FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app #now set the current directory to /app COPY --from=build /publish . #copy from build stage to /app ``` And don't forget to expose ports used by your API. Dockerfile: ``` FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src COPY "Api.csproj" . RUN dotnet restore "Api.csproj" COPY . . RUN dotnet publish "Api.csproj" -c release -o /publish FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app EXPOSE 80 COPY --from=build /publish . ENTRYPOINT ["dotnet", "Api.dll"] ```
null
CC BY-SA 4.0
null
2023-01-30T15:15:23.573
2023-01-30T15:22:03.027
2023-01-30T15:22:03.027
470,005
470,005
null
75,286,424
2
null
75,286,191
1
null
There are a number of issues with your Dockerfile. The one giving you the 'unknown switch' is on the publish statement, where you've given the project file name as `/Api.csproj`. It should be `./Api.csproj`. As others have pointed out, your WORKDIR uses Windows syntax, but you're building a Linux image and should use Linux syntax. I like to use `/src` as the directory in my build steps. You publish the project to `./` which means that you'll end up with a directory that contains both your source and the published project. You want to keep them separate, so you can copy only the published project into the final image. Which those changes, you end up with ``` FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build WORKDIR /src # Copy everything COPY . . # Restore as distinct layers RUN dotnet restore "./Api.csproj" RUN dotnet publish "./Api.csproj" -c Release -o out # Build runtime image FROM mcr.microsoft.com/dotnet/aspnet:6.0 COPY --from=build /src/out . ENTRYPOINT ["dotnet", "Api.dll"] ```
null
CC BY-SA 4.0
null
2023-01-30T15:19:33.213
2023-01-30T15:19:33.213
null
null
3,924,803
null
75,286,874
2
null
75,286,773
0
null
You can try the following query to remove duplicates and get the last `session_group`: ``` select ANONYMOUS_ID, order_number, CHAN_ATTRIBUTION, max(session_group) as last_session from channel_to_order where session_group = session_group_b2 group by ANONYMOUS_ID, order_number, CHAN_ATTRIBUTION ``` This query uses the group by clause to group the records by `ANONYMOUS_ID`, `order_number`, and `CHAN_ATTRIBUTION`. The max function is used to get the maximum value of `session_group` for each group. Since you only want to keep the last session, this is equivalent to getting the last `session_group`.
null
CC BY-SA 4.0
null
2023-01-30T15:52:23.000
2023-01-31T05:00:26.320
2023-01-31T05:00:26.320
5,600,153
21,039,681
null
75,287,132
2
null
75,283,293
0
null
You can just use [Bootstrap's spacing classes](https://getbootstrap.com/docs/5.2/utilities/spacing/#margin-and-padding) to adjust as needed. I'm removing the horizontal padding from the container with `px-0` and adding it back onto the nav header with `px-2`. ``` #header-nav { background-color: rgb(162, 162, 162); border-radius: 0; border-top: 5px solid black; border-bottom: 5px solid black; } .navbar-brand a { text-decoration: none; } .navbar-brand h1 { font-family: 'Ubuntu', sans-serif; font-weight: bold; color: black; text-shadow: 1px 1px 1px white; } .navbar-brand a:hover, a:focus { text-decoration: none; } .nav-item a { color: black; font-family: 'Ubuntu', sans-serif; font-weight: bold; text-align: center; background-color: white; } .nav-item a:hover, a:focus, a:active { color: black; background-color: rgb(188, 188, 188); } .navbar-nav { border-top: 3px solid black; } #chickenNav, #beefNav { border-bottom: 2px solid black; } ``` ``` <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous"> <header> <nav id="header-nav" class="navbar"> <div class="container px-0"> <div class="navbar-header px-2"> <div class="navbar-brand"> <a href="index.html"> <h1>Food, LLC</h1> </a> </div> </div> <button class="navbar-toggler d-block d-sm-none" type="button" data-bs-toggle="collapse" data-bs-target="#collapse" aria-controls="collapse" aria-expanded="false" aria-label="Toggle navigation">=</button> <div class="collapse navbar-collapse" id="collapse"> <ul class="navbar-nav"> <li class="nav-item"> <a id="chickenNav" class="nav-link" href="#">Chicken</a> </li> <li class="nav-item"> <a id="beefNav" class="nav-link" href="#">Beef</a> </li> <li class="nav-item"> <a class="nav-link" href="#">Sushi</a> </li> </ul> </div> </div> </nav> </header> <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script> ```
null
CC BY-SA 4.0
null
2023-01-30T16:13:39.900
2023-01-30T16:13:39.900
null
null
1,264,804
null
75,287,158
2
null
60,301,088
0
null
I had the same error and after many checks i found the root cause: it was the JDK that i had imported/selected into Eclipse that was corrupted. Replaced the JDK with a fresh copy downloaded from Oracle and installed, the issue has been resolved.
null
CC BY-SA 4.0
null
2023-01-30T16:16:32.323
2023-01-30T16:16:32.323
null
null
2,830,588
null
75,287,225
2
null
75,285,752
0
null
I would suggest add those changes make `MovementUpdate` abstract like this so you will need to always implement this method. ``` protected abstract void MovementUpdate(); ``` The second I would separate data and execution of pattern to two separate classes. Then I would redo the ShootPattern like this. ``` [Header("Projectile info")] [SerializeField] private Projectile projectile; [SerializeField] private AMovementPattern projectileMovementPattern; public virtual void Shoot(Vector3 origin) { float angleDelta = (Vector2.SignedAngle(startVector,endVector)) / projectileAmount; for (int i = 0 ; i < projectileAmount ; i++) { var currentProjectile = Instantiate(projectile,origin,quaternion.identity); currentProjectile.Init(projectileMovementPattern, startVector.normalized); } } ``` And I suggest you to use [ScriptableObject](https://docs.unity3d.com/Manual/class-ScriptableObject.html) to hold such a data. Remark from a Unity/C# guy It has nothing to do with a abstract class.
null
CC BY-SA 4.0
null
2023-01-30T16:22:22.770
2023-01-30T16:22:22.770
null
null
21,051,001
null
75,287,266
2
null
21,729,451
-2
null
[](https://i.stack.imgur.com/FZnrU.png) Note: this.file should be you base64 file
null
CC BY-SA 4.0
null
2023-01-30T16:26:00.643
2023-01-30T16:26:00.643
null
null
11,197,904
null
75,287,404
2
null
75,284,935
1
null
According to [Use your (de)compression algorithm](https://github.com/fluent/fluent-plugin-s3/blob/master/docs/howto.md#use-your-decompression-algorithm), `compress` takes two arguments: ``` # chunk is buffer chunk. tmp is destination file for upload def compress(chunk, tmp) # call command or something end ``` You need to update your implementation accordingly. Check the implementation of the here: - [https://github.com/fluent/fluent-plugin-s3/tree/master/lib/fluent/plugin](https://github.com/fluent/fluent-plugin-s3/tree/master/lib/fluent/plugin) Here's a thread that discusses (might be helpful): - [https://groups.google.com/g/fluentd/c/4KME4WB-np8](https://groups.google.com/g/fluentd/c/4KME4WB-np8) --- Using [zstd](https://github.com/DatekWireless/zstd) gem, the implementation of the compressor may look like this (): ``` require 'zstd' module Fluent::Plugin class S3Output class LZMA2Compressor < Compressor S3Output.register_compressor('zstd', self) def initialize(options = {}) begin require 'zstd' rescue LoadError raise Fluent::ConfigError, 'zstd gem not installed, run: gem install zstd' end end def ext 'zst'.freeze end def compress(chunk, tmp) s = StringIO.new chunk.write_to(s) tmp.write(Zstd.new.compress(s.string)) end end end end ```
null
CC BY-SA 4.0
null
2023-01-30T16:36:44.683
2023-01-31T17:36:45.983
2023-01-31T17:36:45.983
7,670,262
7,670,262
null
75,287,447
2
null
75,277,838
0
null
This is a rather detailed answer and I've made some big guesses. [I've sat on a plane all morning and got bored]. There are several design considerations, principally: 1. You are switching in and out of edit mode and need to consider how to track data state. 2. You are probably interfacing with an async DB context or a Web API. I've created an interface to decribe the data pipeline functionality we need to interact with the passenger data store. It's all async. ``` public interface IDataBroker { public ValueTask<IQueryable<Passenger>> GetPassengersAsync(); public ValueTask<Passenger?> GetItemAsync(Guid uid); public ValueTask<bool> AddItemAsync(Passenger record); public ValueTask<bool> UpdateItemAsync(Passenger record); public ValueTask<bool> DeleteItemAsync(Passenger record); } ``` I've defined the Passenger record like this: ``` public sealed record Passenger { public Guid Uid { get; init; } = Guid.Empty; public string FirstName { get; set; } = "Not Set"; public string LastName { get; set; } = "Not Set"; } ``` And an edit context for this record: ``` public sealed class PassengerEditContext { public Passenger BaseRecord { get; private set; } public Guid Uid { get; private set; } public string? FirstName { get; set; } public string? LastName { get; set; } public PassengerEditContext(Passenger passenger) { this.BaseRecord = passenger; this.Load(passenger); } public void Load(Passenger? passenger) { passenger = passenger ?? new(); this.BaseRecord = passenger; this.Uid = passenger.Uid; this.FirstName = passenger.FirstName; this.LastName = passenger.LastName; } public Passenger Record => new() { Uid = this.Uid, FirstName = this.FirstName ?? string.Empty, LastName = this.LastName ?? string.Empty }; public bool IsDirty => this.BaseRecord != this.Record; } ``` The view service does all the data management for the component form: ``` public sealed class DataPresenterService { private IDataBroker _dataBroker; public Task LoadingTask { get; private set; } = Task.CompletedTask; public DataPresenterService(IDataBroker dataBroker) { _dataBroker = dataBroker; LoadingTask = this.LoadData(); } public readonly PassengerEditContext Passenger = new(new()); public IEnumerable<Passenger> Passengers = Enumerable.Empty<Passenger>(); public async Task LoadData() => this.Passengers = await _dataBroker.GetPassengersAsync(); public async ValueTask GetPassengerAsync(Guid uid) { var passenger = await _dataBroker.GetItemAsync(uid); this.Passenger.Load(passenger); } public ValueTask ResetPassengerAsync() { this.Passenger.Load(this.Passenger.BaseRecord); return ValueTask.CompletedTask; } public async ValueTask SavePassengerAsync() { if (this.Passenger.Uid == Guid.Empty) { var passenger = this.Passenger.Record with { Uid = Guid.NewGuid() }; await _dataBroker.AddItemAsync(passenger); this.Passenger.Load(passenger); } else { var passenger = this.Passenger.Record with { }; await _dataBroker.UpdateItemAsync(passenger); this.Passenger.Load(passenger); } await LoadData(); } public async ValueTask<bool> DeletePassengerAsync(Passenger passenger) => await _dataBroker.DeleteItemAsync(passenger); } ``` And the Edit Form: ``` @page "/" @inject DataPresenterService Service <PageTitle>Index</PageTitle> <h1>Demo</h1> <div class="m-2 row"> <div class="col-12 col-lg-4 mb-2"> <label class="form-label text-muted small">Passenger</label> <select class="form-select" disabled="@_isDirty" value="@this.Service.Passenger.Uid" @onchange=OnChangePassenger> @if(this.Service.Passenger.Uid == Guid.Empty) { <option selected value="@Guid.Empty" > -- Add Passenger -- </option> } else { <option value="@Guid.Empty"> -- Add Passenger -- </option> } @foreach(var passenger in this.Service.Passengers) { <option value="@passenger.Uid">@passenger.FirstName @passenger.LastName</option> } </select> </div> <div class="col-12 col-lg-4 mb-2"> <label class="form-label text-muted small">First Name</label> <input class="form-control" @bind=this.Service.Passenger.FirstName @bind:event="oninput" /> </div> <div class="col-12 col-lg-4 mb-2"> <label class="form-label text-muted small">Last Name</label> <input class="form-control" @bind=this.Service.Passenger.LastName @bind:event="oninput" /> </div> <div class="col-12 text-end mb-2"> <div class="btn-group"> <button class="btn btn-primary btn-sm" disabled="@_isClean" @onclick=UpdatePassenger>@_saveText</button> <button class="btn btn-danger btn-sm" disabled="@_isClean" @onclick=ResetPassenger>Discard</button> </div> </div> </div> @code { private bool _isDirty => this.Service.Passenger.IsDirty; private bool _isClean => !this.Service.Passenger.IsDirty; private bool _isNew => this.Service.Passenger.Uid == Guid.Empty; private string _saveText => _isNew ? "Add" : "Update"; protected async override Task OnInitializedAsync() => await this.Service.LoadingTask; private async Task OnChangePassenger(ChangeEventArgs e) { if (BindConverter.TryConvertTo<Guid>(e.Value, System.Globalization.CultureInfo.CurrentCulture, out Guid value)) { await this.Service.GetPassengerAsync(value); return; } await this.Service.GetPassengerAsync(Guid.Empty); } private async Task UpdatePassenger() => await this.Service.SavePassengerAsync(); private async Task ResetPassenger() => await this.Service.ResetPassengerAsync(); } ``` Key Points: 1. Separation of Concerns. The data is separated from the UI into a View and a data pipeline. 2. The data pipeline is Readonly. Everything is a record. An edit object, which track state, is used in the edit context. 3. There's no form locking when the data is dirty. You need to be on Net7.0 for that built in functionality. ## Test Data Provider Services registered as follows: ``` builder.Services.AddScoped<IDataBroker, DataProvider>(); builder.Services.AddTransient<DataPresenterService>(); ``` ``` public sealed class DataProvider : IDataBroker { public async ValueTask<IQueryable<Passenger>> GetPassengersAsync() { await Task.Yield(); var list = new List<Passenger>(); passengers.ForEach(item => list.Add(item with { })); return list.AsQueryable(); } public async ValueTask<Passenger?> GetItemAsync(Guid uid) { await Task.Yield(); return this.passengers.SingleOrDefault(item => item.Uid == uid); } public async ValueTask<bool> AddItemAsync(Passenger record) { await Task.Yield(); if (this.passengers.Any(item => item.Uid == record.Uid)) return false; this.passengers.Add(record); return true; } public async ValueTask<bool> UpdateItemAsync(Passenger record) { await Task.Yield(); if (!this.passengers.Any(item => item.Uid == record.Uid)) return false; var oldRecord = this.passengers.Single(item => item.Uid == record.Uid); this.passengers.Remove(oldRecord); this.passengers.Add(record); return true; } public async ValueTask<bool> DeleteItemAsync(Passenger record) { await Task.Yield(); if (!this.passengers.Any(item => item == record)) return false; var rec = this.passengers.Single(item => item.Uid == record.Uid); this.passengers.Remove(record); return true; } private List<Passenger> passengers = new List<Passenger> { new() { Uid = Guid.NewGuid(), FirstName="John", LastName = "Doe"}, new() { Uid = Guid.NewGuid(), FirstName="Fred", LastName = "Bloggs"}, new() { Uid = Guid.NewGuid(), FirstName="Luke", LastName = "Skywalker"}, }; } ```
null
CC BY-SA 4.0
null
2023-01-30T16:39:25.630
2023-01-30T16:39:25.630
null
null
13,065,781
null
75,287,623
2
null
30,823,837
1
null
In `res` -> `menu` -> `menu.xml` create `<item>` with field: `app:actionViewClass` example: ``` <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" xmlns:app="http://schemas.android.com/apk/res-auto"> <item android:title=""> <menu> <group android:checkableBehavior="single"> <item android:checkable="false" android:id="@+id/is_night_mode" android:icon="@drawable/main_navigation_night_mode_light" android:title="@string/main_navigation_night_mode" app:actionViewClass="com.google.android.material.switchmaterial.SwitchMaterial" /> </group> </menu> </item> </menu> ``` Next in `Activity` or `Fragment` find `actionView` like this: ``` val nightModeSwitch = binding.navView.menu.findItem(R.id.is_night_mode).actionView as SwitchMaterial ``` Set `OnCheckedChangeListener` ``` nightModeSwitch.setOnCheckedChangeListener { buttonView, isChecked -> //do something } ```
null
CC BY-SA 4.0
null
2023-01-30T16:54:14.237
2023-01-31T08:58:13.213
2023-01-31T08:58:13.213
12,980,819
12,980,819
null
75,287,702
2
null
75,284,274
0
null
I already solved it. Here is a code if someone is interested: ``` fig = plt.figure() ax = fig.add_subplot(111, projection='3d') ax.scatter(playlists["Year"], playlists["Playlist title number"] , playlists["Playlist views"], c='r', marker='o') ax.set_xticks([2021, 2022]) ax.set_xlabel('Year') ax.set_ylabel('Playlist Title Number') ax.set_zlabel('Views') playlists_2021=playlists.loc[playlists['Year'] == 2021] playlists_2022=playlists.loc[playlists['Year'] == 2022] x = playlists_2021["Playlist title number"].values.reshape(-1, 1) y = playlists_2021["Playlist views"] reg = LinearRegression().fit(x, y) y_pred = reg.predict(x) ax.plot(np.tile(2021, y_pred.shape), playlists_2021["Playlist title number"], y_pred, color='blue', linewidth=2) x = playlists_2022["Playlist title number"].values.reshape(-1, 1) y = playlists_2022["Playlist views"] reg = LinearRegression().fit(x, y) y_pred = reg.predict(x) ax.plot(np.tile(2022, y_pred.shape), playlists_2022["Playlist title number"], y_pred, color='blue', linewidth=2) plt.show() ```
null
CC BY-SA 4.0
null
2023-01-30T17:00:18.283
2023-01-30T17:00:18.283
null
null
21,110,497
null
75,288,054
2
null
75,277,938
0
null
You can use [vim.api.nvim_set_hl()](https://neovim.io/doc/user/api.html#nvim_set_hl()) for this. ``` vim.api.nvim_set_hl(0, 'LineNrAbove', { fg='blue' }) vim.api.nvim_set_hl(0, 'LineNr', { fg='yellow' }) vim.api.nvim_set_hl(0, 'LineNrBelow', { fg='magenta' }) ``` These need to be set after you set your colourscheme for them to not be immediately overwritten. If you have `cursorline` enabled, `LineNr` should be replaced with `CursorLineNr`.
null
CC BY-SA 4.0
null
2023-01-30T17:30:51.197
2023-01-31T21:20:50.703
2023-01-31T21:20:50.703
1,916,917
1,916,917
null
75,288,098
2
null
75,286,888
0
null
In general, sass needs a compiler written based on different programming languages to be compiled, if the speed of any of these compilers is slow for you, you can use [Sass direct](https://sass-lang.com/install) or use [https://sass-lang.com/dart-sass](https://sass-lang.com/dart-sass) or use compilers in faster programming languages such as java this is good answer [(--link--)](https://stackoverflow.com/questions/66404966/ways-to-speed-up-scss-during-watch-compiling-in-webpack) there are three things to think about: 1. Sass becomes slowly as many SASS files are included to the process. Big SASS-Frameworks tend to use a lot of files and latest when you use a lot of big modules it heavily could slow down at all. Sometimes there are more modules included than needed. 2. Often the standard project settings try to to a lot of work at the same time. I.e. writing min-files in same process simply doubles the time. If it is that: just prepare 'min-files' at the end of your work. Up to that using additonal post-processors to autoprefix like linters and maby postcss needs extra time ... which counts doubles when writing min-files at once... 3. JS-Sass-Compilers are slower at all. So you can save time using native SASS direct. This may not be handsome but in big projects that helped me a lot. If you may try that here the link to information how to install: https://sass-lang.com/install
null
CC BY-SA 4.0
null
2023-01-30T17:34:36.587
2023-01-30T17:34:36.587
null
null
12,653,523
null
75,288,387
2
null
29,824,773
0
null
Simply annotate with a text layer. A tick can be hacked with "|" or capital "i" (I) (only works using sans serif font) ``` library(ggplot2) df <- data.frame(x = seq(1:100), y = sort(rexp(100, 2), decreasing = T)) ggplot(df, aes(x = x, y = y)) + geom_point() + annotate( x = 30, y = -Inf, label = "I\nxyz", geom = "text", color = "red", lineheight = .6, vjust = .8 ) + coord_cartesian(clip = "off") ``` ![](https://i.imgur.com/sLsdcNo.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-30T18:02:46.647
2023-01-30T18:02:46.647
null
null
7,941,188
null
75,288,883
2
null
75,288,235
1
null
I believe it is easier to use a well-constructed svg file like this: ``` #Livello_1{width: 500px;} /*Verde*/ #verde:hover .cls-8{fill: yellow;} /*Blu*/ #blu:hover .cls-3{fill:red;} /*Azzurro*/ #azzurro:hover .cls-2{fill: green;} /*Viola*/ #viola:hover .cls-9{fill: blue;} /*Rosso*/ #rosso:hover .cls-11{fill: orange;} /*Giallo*/ #giallo:hover .cls-10{fill:violet;} ``` ``` <?xml version="1.0" encoding="UTF-8"?><svg id="Livello_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 660.66 661.95"><defs><style>.cls-1{letter-spacing:0em;}.cls-2{fill:url(#Sfumatura_senza_nome_4);}.cls-3{fill:url(#Sfumatura_senza_nome_8);}.cls-4{letter-spacing:0em;}.cls-5{letter-spacing:0em;}.cls-6{font-family:MyriadPro-Regular, 'Myriad Pro';font-size:29.11px;}.cls-7{letter-spacing:0em;}.cls-8{fill:url(#Sfumatura_senza_nome_12);}.cls-9{fill:url(#Sfumatura_senza_nome_16);}.cls-10{fill:url(#Sfumatura_senza_nome_27);}.cls-11{fill:url(#Sfumatura_senza_nome_22);}</style><linearGradient id="Sfumatura_senza_nome_8" x1="347.13" y1="189.82" x2="656.18" y2="189.82" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1382e1"/><stop offset="1" stop-color="#0731ff"/></linearGradient><linearGradient id="Sfumatura_senza_nome_12" x1="352.71" y1="470.44" x2="660.66" y2="470.44" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#67c30c"/><stop offset="1" stop-color="#b7bb16"/></linearGradient><linearGradient id="Sfumatura_senza_nome_16" x1="180.24" y1="507.83" x2="480.79" y2="507.83" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#c10c98"/><stop offset="1" stop-color="#8317bb"/></linearGradient><linearGradient id="Sfumatura_senza_nome_22" x1="4.48" y1="472.14" x2="313.52" y2="472.14" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fa3d4f"/><stop offset="1" stop-color="#fc1377"/></linearGradient><linearGradient id="Sfumatura_senza_nome_4" x1="179.87" y1="154.12" x2="480.42" y2="154.12" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#14dddc"/><stop offset="1" stop-color="#088fff"/></linearGradient><linearGradient id="Sfumatura_senza_nome_27" x1="0" y1="191.51" x2="307.95" y2="191.51" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#fc9c06"/><stop offset="1" stop-color="#e7e219"/></linearGradient></defs><g id="blu"><path class="cls-3" d="m347.13,322.59l309.04-6.7s-2.03-83.77-42.59-147.92c-40.56-64.14-110.2-110.93-110.2-110.93l-156.26,265.54Z"/><text class="cls-6" transform="translate(480.42 241.5)"><tspan class="cls-1" x="0" y="0">D</tspan><tspan x="19.5" y="0">e</tspan><tspan class="cls-7" x="34.09" y="0">v</tspan><tspan class="cls-5" x="47.8" y="0">elop</tspan></text></g><g id="verde"><path class="cls-8" d="m352.71,346.55l170.82,257.63s69.72-46.48,102.26-115.05c32.54-68.56,34.86-152.42,34.86-152.42l-307.95,9.84Z"/></g><g id="viola"><path class="cls-9" d="m328.67,353.71l-148.44,271.14s73.6,40.06,149.43,36.92c75.83-3.13,151.12-40.13,151.12-40.13l-152.12-267.94Z"/><text class="cls-6" transform="translate(313.52 571.67)"><tspan x="0" y="0">Ok</tspan></text></g><g id="rosso"><path class="cls-11" d="m313.52,339.37l-309.04,6.7s2.03,83.77,42.59,147.92c40.56,64.14,110.2,110.93,110.2,110.93l156.26-265.54Z"/><text class="cls-6" transform="translate(121.99 431.18)"><tspan x="0" y="0">Ops</tspan></text></g><g id="azzurro"><path class="cls-2" d="m331.98,308.24L480.42,37.1S406.82-2.96,330.99.17c-75.83,3.13-151.12,40.13-151.12,40.13l152.12,267.94Z"/><text class="cls-6" transform="translate(297.49 119.32)"><tspan class="cls-1" x="0" y="0">D</tspan><tspan x="19.5" y="0">emo</tspan></text></g><g id="giallo"><path class="cls-10" d="m307.95,315.41L137.12,57.78s-69.72,46.48-102.26,115.05C2.32,241.39,0,325.25,0,325.25l307.95-9.84Z"/><text class="cls-6" transform="translate(506.68 431.18)"><tspan class="cls-4" x="0" y="0">H</tspan><tspan x="19.27" y="0">i</tspan></text><text class="cls-6" transform="translate(86.91 241.18)"><tspan x="0" y="0">Hello</tspan></text></g></svg> ``` This solution is completely custom, I created a svg file with illustrator, exported and put your svg file in your favorite code editor, view it from browser and inspect it for css classes; after that it's all about css, i hope I have been helpful to you.
null
CC BY-SA 4.0
null
2023-01-30T18:53:07.210
2023-01-30T18:53:07.210
null
null
16,983,431
null
75,289,527
2
null
75,288,446
0
null
The numbers in the series are decimal, but in the American style, i.e. floating point with . While in Italy we are in the habit of using the , I fixed it by changing the culture with the code: ``` Threading.Thread.CurrentThread.CurrentCulture = New CultureInfo("us-US") Threading.Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = "." ```
null
CC BY-SA 4.0
null
2023-01-30T20:00:27.783
2023-01-30T20:00:27.783
null
null
18,189,177
null
75,289,612
2
null
72,736,786
0
null
I've been in the same boat all day, I also suspected transactions as a likely cause. Then I came to realize all that was needed is to refresh the database connection when stopped at a breakpoint. I'm not sure if this will be helpful to anyone but I thought I should answer because my situation is so similar to OP's - also running Docker and PhpStorm. We're typically not in the habit of refreshing the db connection on a regular basis so it's easy to overlook. EDIT: To tag a little bit more onto my answer from earlier.. The data will persist if your test does not wipe it which can be useful. You can then tinker with that data by creating a file named ".env.testing" & setting APP_ENV=testing. Then run tinker like so: php artisan tinker --env=testing
null
CC BY-SA 4.0
null
2023-01-30T20:09:29.583
2023-01-31T02:00:45.323
2023-01-31T02:00:45.323
1,272,667
1,272,667
null
75,289,816
2
null
75,283,390
0
null
You want to move your button actions your `AdditionalGuestInforTVCell` cell class, then use a `closure` to tell the controller that the value changed. Use a second `UITableViewCell` class as your "Total" cell - with two labels, so it looks like this: [](https://i.stack.imgur.com/gF3XQ.png) When your `AdditionalGuestInforTVCell` cell tells the controller its value changed, update your data, get the sum of all the "items" and reload the 3rd section. Here's a quick example... First, let's use a `struct` to define your data: ``` struct ItemStruct { var itemName: String = "" var itemDetails: String = "" var itemCount: Int = 0 } ``` In your controller, we'll use a var property like this: ``` // our data is now an Array of ItemStruct Arrays // so we'll have one Array per section var myData: [[ItemStruct]] = [] ``` and we'll initialize the data like this... In `viewDidLoad()`: ``` override func viewDidLoad() { super.viewDidLoad() // all the normal view setup myData = getData() } func getData() -> [[ItemStruct]] { let itemsName = [ ["Shishu", "Baal", "Kishore", "Tarun", "Yuva", "Jyeshta"], ["Shishu", "Baalika", "Kishori", "Taruni", "Yuvati", "Jyeshtaa"], ] let itemsDetails = [ ["Below 5 Years - Pre-primary ", "5 to 11 Years - Primary School", "11 to 16 Years - Middle School", "17 to 25 Years - High School/College", "25 to 60 Years - Adults", ">60 Years - Senior citizen"], ["Below 5 Years - Pre-primary ", "5 to 11 Years - Primary School", "11 to 16 Years - Middle School", "17 to 25 Years - High School/College", "25 to 60 Years - Adults", ">60 Years - Senior citizen"], ] var tmpArray: [[ItemStruct]] = [] // let's fill our data with names and details for (names, details) in zip(itemsName, itemsDetails) { var secData: [ItemStruct] = [] for i in 0..<names.count { let d = ItemStruct(itemName: names[i], itemDetails: details[i], itemCount: 0) secData.append(d) } tmpArray.append(secData) } return tmpArray } ``` --- Here's a complete, runnable example. We create everything via code - no `@IBOutlet` or `@IBAction` connections - so all you need to do is assign the custom class of a plain `UIViewController` as `AdditionalGuestInformationVC`. I've tried to include enough in-line comments in the code to make things clear: ``` struct ItemStruct { var itemName: String = "" var itemDetails: String = "" var itemCount: Int = 0 } class TotalCell: UITableViewCell { var lblTitle = UILabel() var lblValue = UILabel() override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) commonInit() } required init?(coder: NSCoder) { super.init(coder: coder) commonInit() } func commonInit() { // label properties lblTitle.text = "Total Attendees:" lblValue.textAlignment = .center // add views to contentView [lblTitle, lblValue].forEach { v in v.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(v) } // use content view's defaualt margins let g = contentView.layoutMarginsGuide // this avoids autolayout complaints let c = lblTitle.bottomAnchor.constraint(equalTo: g.bottomAnchor, constant: 0.0) c.priority = .required - 1 NSLayoutConstraint.activate([ // Name label Top / Leading lblTitle.topAnchor.constraint(equalTo: g.topAnchor, constant: 0.0), lblTitle.leadingAnchor.constraint(equalTo: g.leadingAnchor, constant: 0.0), lblTitle.heightAnchor.constraint(equalToConstant: 50.0), c, // Value label Trailing lblValue.trailingAnchor.constraint(equalTo: g.trailingAnchor, constant: 0.0), lblValue.widthAnchor.constraint(equalToConstant: 40.0), // vertically center Value label lblValue.centerYAnchor.constraint(equalTo: g.centerYAnchor), ]) } func fillData(_ value: Int) { lblValue.text = "\(value)" } } class AdditionalGuestInforTVCell: UITableViewCell { // closure to inform the controller that the count changed var countChanged: ((UITableViewCell, Int) -> ())? var lblName = UILabel() var lblDetails = UILabel() var btnMinus = UIButton() var lblValue = UILabel() var btnPlus = UIButton() // we'll automatically update the value label when the count changes var currentItemCount: Int = 0 { didSet { lblValue.text = "\(currentItemCount)" } } @objc func minusTap() { if currentItemCount > 0 { // decrement current count currentItemCount -= 1 // inform the controller countChanged?(self, currentItemCount) } } @objc func plusTap() { // increment current count currentItemCount += 1 // inform the controller countChanged?(self, currentItemCount) } // we'll fill the labels from our data struct object func fillData(_ data: ItemStruct) { lblName.text = "\(data.itemName)" lblDetails.text = "\(data.itemDetails)" self.currentItemCount = data.itemCount } override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { super.init(style: style, reuseIdentifier: reuseIdentifier) commonInit() } required init?(coder: NSCoder) { super.init(coder: coder) commonInit() } func commonInit() { // label properties lblDetails.font = .systemFont(ofSize: 14.0) lblDetails.textColor = .gray lblDetails.numberOfLines = 0 lblValue.textAlignment = .center // button titles btnMinus.setTitle("-", for: []) btnPlus.setTitle("+", for: []) // button style [btnMinus, btnPlus].forEach { b in b.setTitleColor(.black, for: .normal) b.setTitleColor(.lightGray, for: .highlighted) b.layer.cornerRadius = 6 b.layer.borderWidth = 1 b.layer.borderColor = UIColor.lightGray.cgColor } // add views to contentView [lblName, lblDetails, btnMinus, lblValue, btnPlus].forEach { v in v.translatesAutoresizingMaskIntoConstraints = false contentView.addSubview(v) } // use content view's defaualt margins let g = contentView.layoutMarginsGuide // this avoids autolayout complaints let c = lblDetails.bottomAnchor.constraint(equalTo: g.bottomAnchor, constant: 0.0) c.priority = .required - 1 NSLayoutConstraint.activate([ // Name label Top / Leading lblName.topAnchor.constraint(equalTo: g.topAnchor, constant: 0.0), lblName.leadingAnchor.constraint(equalTo: g.leadingAnchor, constant: 0.0), // Details label Top (to Name label Bottom) / Leading / Bottom lblDetails.topAnchor.constraint(equalTo: lblName.bottomAnchor, constant: 6.0), lblDetails.leadingAnchor.constraint(equalTo: g.leadingAnchor, constant: 0.0), c, // plus button Trailing btnPlus.trailingAnchor.constraint(equalTo: g.trailingAnchor, constant: 0.0), // Value label Trailing (to Plus button Leading) lblValue.trailingAnchor.constraint(equalTo: btnPlus.leadingAnchor, constant: 0.0), // Minus button Trailing (to Value label Leading) btnMinus.trailingAnchor.constraint(equalTo: lblValue.leadingAnchor, constant: 0.0), // buttons and Value label centered vertically btnPlus.centerYAnchor.constraint(equalTo: g.centerYAnchor), lblValue.centerYAnchor.constraint(equalTo: g.centerYAnchor), btnMinus.centerYAnchor.constraint(equalTo: g.centerYAnchor), btnMinus.widthAnchor.constraint(equalToConstant: 40.0), btnPlus.widthAnchor.constraint(equalTo: btnMinus.widthAnchor), lblValue.widthAnchor.constraint(equalTo: btnMinus.widthAnchor), // Details label Trailing ("right edge") lblDetails.trailingAnchor.constraint(equalTo: btnMinus.leadingAnchor, constant: -8.0), ]) btnMinus.addTarget(self, action: #selector(minusTap), for: .touchUpInside) btnPlus.addTarget(self, action: #selector(plusTap), for: .touchUpInside) } } class AdditionalGuestInformationVC: UIViewController, UITableViewDelegate, UITableViewDataSource { let section = ["Male", "Female", "Total"] var tableView: UITableView! var myData: [[ItemStruct]] = [] func getData() -> [[ItemStruct]] { let itemsName = [ ["Shishu", "Baal", "Kishore", "Tarun", "Yuva", "Jyeshta"], ["Shishu", "Baalika", "Kishori", "Taruni", "Yuvati", "Jyeshtaa"], ] let itemsDetails = [ ["Below 5 Years - Pre-primary ", "5 to 11 Years - Primary School", "11 to 16 Years - Middle School", "17 to 25 Years - High School/College", "25 to 60 Years - Adults", ">60 Years - Senior citizen"], ["Below 5 Years - Pre-primary ", "5 to 11 Years - Primary School", "11 to 16 Years - Middle School", "17 to 25 Years - High School/College", "25 to 60 Years - Adults", ">60 Years - Senior citizen"], ] var tmpArray: [[ItemStruct]] = [] // let's fill our data with names and details for (names, details) in zip(itemsName, itemsDetails) { var secData: [ItemStruct] = [] for i in 0..<names.count { let d = ItemStruct(itemName: names[i], itemDetails: details[i], itemCount: 0) secData.append(d) } tmpArray.append(secData) } return tmpArray } override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .systemGreen tableView = UITableView(frame: .zero, style: .insetGrouped) tableView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(tableView) let g = view.safeAreaLayoutGuide NSLayoutConstraint.activate([ // Top / Leading / Trailing inset by 20-points (so we can see the table frame) tableView.topAnchor.constraint(equalTo: g.topAnchor, constant: 20.0), tableView.leadingAnchor.constraint(equalTo: g.leadingAnchor, constant: 20.0), tableView.trailingAnchor.constraint(equalTo: g.trailingAnchor, constant: -20.0), // let's leave some space at the bottom tableView.bottomAnchor.constraint(equalTo: g.bottomAnchor, constant: -80.0), ]) // register the "input" cells tableView.register(AdditionalGuestInforTVCell.self, forCellReuseIdentifier: "AdditionalGuestInforTVCell") // register the "Total" cell tableView.register(TotalCell.self, forCellReuseIdentifier: "totalCell") tableView.dataSource = self tableView.delegate = self myData = getData() } // MARK: TableView Methods func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? { return self.section[section] } func numberOfSections(in tableView: UITableView) -> Int { // add 1 for the Total section return myData.count + 1 } func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { // if it's the last section, it's the Total section if section == myData.count { return 1 } return myData[section].count } func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { // if it's the last section, it's the Total section if indexPath.section == myData.count { let cell = tableView.dequeueReusableCell(withIdentifier: "totalCell", for: indexPath) as! TotalCell // get the total of values from all data var total: Int = 0 for i in 0..<self.myData.count { total += self.myData[i].reduce(0) { $0 + $1.itemCount } } cell.fillData(total) return cell } // it's not the last section let cell = tableView.dequeueReusableCell(withIdentifier: "AdditionalGuestInforTVCell", for: indexPath) as! AdditionalGuestInforTVCell cell.fillData(myData[indexPath.section][indexPath.row]) // add closure cell.countChanged = { [weak self] aCell, aValue in guard let self = self, let thisCell = aCell as? AdditionalGuestInforTVCell, let idxPath = self.tableView.indexPath(for: thisCell) else { return } // update the data self.myData[idxPath.section][idxPath.row].itemCount = aValue // reload the last section (the "Total" section) self.tableView.reloadSections([self.myData.count], with: .none) } return cell } } ``` and it should look like this when running: [](https://i.stack.imgur.com/Se3k8.png) [](https://i.stack.imgur.com/TZepa.png)
null
CC BY-SA 4.0
null
2023-01-30T20:30:39.230
2023-01-30T20:30:39.230
null
null
6,257,435
null
75,290,036
2
null
75,289,910
0
null
``` Month = EVALUATE ADDCOLUMNS ( Sales, "month", RELATED ( 'period'[day] ) ) ```
null
CC BY-SA 4.0
null
2023-01-30T20:55:31.197
2023-02-02T16:38:50.530
2023-02-02T16:38:50.530
14,267,427
21,113,717
null
75,290,068
2
null
54,043,990
0
null
``` .tableHead { text-align: left; background-color: aqua; } .tableRow { text-align: left; background-color: bisque; } ``` ``` <table width="100%"> <thead> <tr> <th class="tableHead" colspan="1">head</th> <th class="tableHead" colspan="1">head</th> <th class="tableHead" colspan="1">head</th> <th class="tableHead" colspan="1">head</th> <th class="tableHead" colspan="1">head</th> <th class="tableHead" colspan="1">head</th> <th class="tableHead" colspan="1">head</th> </tr> </thead> <tbody> <tr> <td colspan="1">cell</td> <td colspan="1">cell</td> <td colspan="1">cell</td> <td colspan="1">cell</td> <td colspan="1">cell</td> <td colspan="1">cell</td> <td colspan="1">cell</td> </tr> <tr> <td colspan="7"> <table width="100%"> <thead> <tr> <th class="tableHead" colspan="1">embed1</th> <th class="tableHead" colspan="1">embed2</th> <th class="tableHead" colspan="1">embed3</th> </tr> </thead> <tbody> <tr class="tableRow"> <td>1</td> <td>2</td> <td>3</td> </tr> <tr class="tableRow"> <td>1</td> <td>2</td> <td>3</td> </tr> <tr class="tableRow"> <td>1</td> <td>2</td> <td>3</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> ``` try this code
null
CC BY-SA 4.0
null
2023-01-30T20:58:29.560
2023-02-02T21:17:17.353
2023-02-02T21:17:17.353
14,899,069
14,899,069
null
75,291,002
2
null
75,290,042
0
null
You will need something like this: ``` SELECT AVG( CAST( SPLIT( ride_length, ':' )[OFFSET(1)] AS NUMERIC ) + CAST( SPLIT( ride_length, ':' )[OFFSET(0)] AS NUMERIC ) * 60 ) FROM TheTable ``` `SPLIT` is used to separate hours from minutes and then each result converted (`CAST`) to NUMBER. [I did test it] Here is the data verification query (untested as well) to check on format consistency: ``` SELECT ride_id, ride_length WHERE NOT REGEXP_CONTAINS(ride_length, r'^(\d+\:\d+)$)'; ```
null
CC BY-SA 4.0
null
2023-01-30T22:52:35.150
2023-02-02T19:00:02.473
2023-02-02T19:00:02.473
2,055,998
2,055,998
null
75,291,043
2
null
68,127,246
0
null
It seems like import issue ``` import org.kodein.di.KodeinAware import org.kodein.di.android.kodein ```
null
CC BY-SA 4.0
null
2023-01-30T22:58:00.073
2023-01-30T22:58:00.073
null
null
12,611,136
null
75,291,066
2
null
75,290,860
0
null
Use the functional notation of nth-child as explained [here](https://css-tricks.com/how-nth-child-works/) and [here](https://developer.mozilla.org/en-US/docs/Web/CSS/:nth-child). Try setting: - `justify-items: center;`- `justify-self: start;`- `justify-self: end;` ``` #grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1em; justify-items: center; border: 2px solid cyan; } .gridItem { border: 2px solid red; height: 10rem; } /* for every 3rd item starting with the first one */ .gridItem:nth-child(3n+1) { border: 2px solid yellow; justify-self: start; } /* for every 3rd item starting with the third one */ .gridItem:nth-child(3n+3) { border: 2px solid blue; justify-self: end; } .gridItem img { width: 100px; } ``` ``` <div id="grid"> <div id="1" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="2" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="3" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="4" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="5" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> </div> ``` If you are happy to use `auto` for your column widths instead of `1fr`, you can even use `justify-content: space-between;` just like you can with flexbox. This solution is nice and simple. ``` #grid { display: grid; grid-template-columns: auto auto auto; gap: 1em; justify-content: space-between; border: 2px solid cyan; } .gridItem { border: 2px solid red; height: 10rem; } .gridItem img { width: 100px; } ``` ``` <div id="grid"> <div id="1" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="2" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="3" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="4" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> <div id="5" class="gridItem"><img src="https://shotkit.com/wp-content/uploads/2020/08/night-landscape-photography-featured.jpg"></div> </div> ```
null
CC BY-SA 4.0
null
2023-01-30T23:01:53.693
2023-01-30T23:34:59.040
2023-01-30T23:34:59.040
2,518,285
2,518,285
null
75,291,429
2
null
75,001,145
1
null
Here is a working script, integrating the above answer. This version integrates a corrected reference to the Voice Control checkbox, which was provided (above) by Ron Reuter. This works for me under macOS Ventura, as of 2023-01-30. ``` do shell script "open -b com.apple.systempreferences " & ¬ "/System/Library/PreferencePanes/UniversalAccessPref.prefPane" tell application "System Events" tell its application process "System Settings" repeat until UI element 4 of group 1 of scroll area 1 of group 1 of ¬ group 2 of splitter group 1 of group 1 of window "Accessibility" exists delay 0.1 end repeat click UI element 1 of group 3 of scroll area 1 of group 1 of group 2 ¬ of splitter group 1 of group 1 of window "Accessibility" repeat until checkbox "Voice Control" of group 1 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Voice Control" exists delay 0.1 end repeat click checkbox "Voice Control" of group 1 of scroll area 1 of group 1 of group 2 of splitter group 1 of group 1 of window "Voice Control" end tell end tell tell application "System Settings" to quit ```
null
CC BY-SA 4.0
null
2023-01-30T23:59:51.680
2023-01-30T23:59:51.680
null
null
3,142,960
null
75,291,517
2
null
75,291,449
1
null
You have to publish your website, from your repository settings, go to "Pages" [](https://i.stack.imgur.com/sB6Ca.png) Then choose your branch and your root folder [](https://i.stack.imgur.com/xuJD4.png) then click on "Save" and wait for couple of minutes for your website to be published, then refresh the page to see your URL like this: [](https://i.stack.imgur.com/Qwyj2.png)
null
CC BY-SA 4.0
null
2023-01-31T00:15:28.933
2023-01-31T00:15:28.933
null
null
5,078,746
null
75,292,192
2
null
75,223,728
0
null
The watermark logic takes advantange of the fact that all the new records which are inserted after the last watermark saved should only be considered for copying from source A to B , basically we are using ">=" operator to our advantage here . In case of guid you cannot use that logic as guid cann surely be unique but not ">=" or "=<" will not work.
null
CC BY-SA 4.0
null
2023-01-31T02:37:32.560
2023-01-31T02:37:32.560
null
null
11,137,679
null
75,292,358
2
null
35,099,169
0
null
I had followed this link is working fine for me [https://lea-linux.org/documentations/Trucs:Ldap_sasl_bind_cant_contact_LDAP_server](https://lea-linux.org/documentations/Trucs:Ldap_sasl_bind_cant_contact_LDAP_server) The idea for above link just make sure the parameter in the has paramters are setting like this.
null
CC BY-SA 4.0
null
2023-01-31T03:13:05.967
2023-01-31T03:15:28.383
2023-01-31T03:15:28.383
11,921,565
11,921,565
null
75,292,836
2
null
71,462,058
1
null
For me, clientID was not the issue, but this was due to a . on the developers console. In the Google Cloud console, I had `http://localhost:8080` under the redirect URIs in the list while my code was sending `http://localhost:8080/` while making the oAuth call.
null
CC BY-SA 4.0
null
2023-01-31T04:53:49.820
2023-01-31T04:53:49.820
null
null
8,338,842
null
75,293,284
2
null
75,292,261
0
null
You can simply put your code inside another *ngFor. You can get a number input and make array repeatTimes from that number. For example: ``` <div *ngFor="let repeat of repeatTimes"> <div *ngFor="let fun of test; let i = index"> <h4>{{fun}} : {{i + 1}}</h4> <input type="number"> </div> </div> ``` TS preferably in ngOnInit: ``` let repeatCount = 5; let repeatTimes = []; for(let i = 0; i < repeat; i++) { repeatTimes.push(i); } ```
null
CC BY-SA 4.0
null
2023-01-31T06:12:49.907
2023-01-31T06:12:49.907
null
null
18,097,068
null
75,293,371
2
null
62,652,633
0
null
In order to hide Title and select date section I tried adding ``` <dimen name="mtrl_calendar_header_height">0dp</dimen> ``` in dimens.xml I'm using the following version of 'material': implementation 'com.google.android.material:material:1.4.0' [Header and Select date section](https://i.stack.imgur.com/vBk2R.png) Result: [Result](https://i.stack.imgur.com/iLHJA.png)
null
CC BY-SA 4.0
null
2023-01-31T06:25:07.847
2023-01-31T06:27:36.737
2023-01-31T06:27:36.737
13,114,953
13,114,953
null
75,293,426
2
null
75,292,650
0
null
Instead of storing your data in a `List<HashMap<String, String>>`, store them in a `List<Node>` where class `Node` is something like this: ``` public class Node { private String title; private String key; private boolean expanded; private boolean folder; private List<Node> children; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public boolean isExpanded() { return expanded; } public void setExpanded(boolean expanded) { this.expanded = expanded; } public boolean isFolder() { return folder; } public void setFolder(boolean folder) { this.folder = folder; } public List<Node> getChildren() { return children; } public void setChildren(List<Node> children) { this.children = children; } } ``` Then use Jackson or Gson to generate the corresponding Json.
null
CC BY-SA 4.0
null
2023-01-31T06:33:55.363
2023-01-31T06:33:55.363
null
null
7,036,419
null
75,293,458
2
null
75,292,671
0
null
--- Issue here is that data is loaded from an api so you won't get it with `BeautifulSoup` if it is not in response of `requests` - Take a look at your browsers dev tools on xhr tab and use this api call to get results from as JSON. #### Example ``` import requests json_data = requests.get('https://match.uefa.com/v5/matches?competitionId=14&seasonYear=2022&phase=TOURNAMENT&order=DESC&offset=0&limit=20').json() for m in json_data: print(m['awayTeam']['internationalName'], f"{m['score']['total']['away']}:{m['score']['total']['home']}", m['homeTeam']['internationalName']) ``` #### Output ``` Rangers 1:1 Frankfurt West Ham 0:1 Frankfurt Leipzig 1:3 Rangers Frankfurt 2:1 West Ham Rangers 0:1 Leipzig Braga 1:3 Rangers West Ham 3:0 Lyon Frankfurt 3:2 Barcelona Leipzig 2:0 Atalanta Rangers 0:1 Braga ... ```
null
CC BY-SA 4.0
null
2023-01-31T06:39:23.757
2023-01-31T07:46:32.737
2023-01-31T07:46:32.737
14,460,824
14,460,824
null
75,293,631
2
null
75,293,580
0
null
in your onPageFinished method write like that : ``` onPageFinished: (url) async { controller.runJavascript("document.getElementsByTagName('header')[0].style.display='none'"); }, ```
null
CC BY-SA 4.0
null
2023-01-31T07:00:21.233
2023-01-31T07:00:21.233
null
null
13,507,274
null
75,294,224
2
null
75,292,186
0
null
These are so-called inlay hints, which you can enable in the settings (search for "inlay"). Check also [this Youtube video](https://www.youtube.com/watch?v=sUvTP0QvSms) for a quick introduction to this feature.
null
CC BY-SA 4.0
null
2023-01-31T08:07:06.513
2023-01-31T08:07:06.513
null
null
1,137,174
null