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,139,428
2
null
75,138,937
0
null
H! The linker is unable to find the "libc++.lib" library. This library is a part of the C++ standard library and is typically included with the C++ compiler. The error message also shows that the linker is looking for the library in the "D:\Visual studio\Community 2022\VC\Tools\MSVC\14.34.31933\lib\x64" directory, but it is not found there. This issue might be caused because you are missing the VC++ runtime libraries or the SDKs installed on your machine. You can try to install the Microsoft Visual C++ Redistributable for Visual Studio 2019 from the official Microsoft website. or Make sure that the correct path to the library is specified in your project's linker settings. Hope this helps.
null
CC BY-SA 4.0
null
2023-01-16T20:37:37.060
2023-01-16T20:37:37.060
null
null
17,958,058
null
75,139,472
2
null
7,043,372
-1
null
It makes editing the code a lot easier. I'm comparing editinc c/c++ array elements with editing json documents - if you forget to remove the last comma, the JSON will not parse. (Yes, I know JSON is not meant to be edited manually)
null
CC BY-SA 4.0
null
2023-01-16T20:43:38.693
2023-01-16T20:43:38.693
null
null
935,512
null
75,139,672
2
null
75,139,584
3
null
You could get your results much easier using just one dataframe, by mapping `sexe` on `fill` instead of on `color` and by setting your desired colors via `scale_fill_manual`: ``` library(tidyverse) library(scales) df <- df %>% group_by(age10, sexe, relation) %>% summarise(n = n()) %>% mutate(pct = n / sum(n)) %>% ungroup() |> filter(relation == "stable") ggplot(data = df) + geom_col(aes(fill = sexe, y = pct, x = age10), width = 0.75, position = position_dodge(preserve = "single") ) + scale_y_continuous(label = percent) + scale_fill_manual(values = c(man = "#99d8c9", woman = "#bcbddc")) + facet_wrap(~relation) + labs( x = "Age group", y = "Percentage" ) + expand_limits(y = 1) + theme(text = element_text(family = "Times New Roman")) ``` [](https://i.stack.imgur.com/L4B8Q.png)
null
CC BY-SA 4.0
null
2023-01-16T21:04:30.967
2023-01-16T21:04:30.967
null
null
12,993,861
null
75,139,749
2
null
75,128,285
0
null
I found that this only occurs if you chose multi-platform app when you created the project. So I went into Build Settings in the Target Settings and changed base SDK from Automatic to iOS and it fixed it! Hopes it saves someone else a few hours of their night…
null
CC BY-SA 4.0
null
2023-01-16T21:12:46.220
2023-01-16T21:12:46.220
null
null
13,543,042
null
75,139,866
2
null
75,136,329
1
null
Found the solution. Go to Environment Variables under System variables. Under PATH , click Edit and add NEW: C:\Windows\System32
null
CC BY-SA 4.0
null
2023-01-16T21:28:31.800
2023-01-16T21:28:31.800
null
null
19,998,047
null
75,139,950
2
null
75,139,812
-1
null
You can use ``` fruit = [['apple', 5], ['pears', 10], ['bananas', 12]] items = [['cars', 3], ['sheets', 5], ['bananas', 8]] colors = [['blue', 3], ['black', 5], ['orange', 8]] merge = fruit + items + colors result = set( (item, sum(quantity for label, quantity in merge if label == item)) for item, _ in merge ) result ``` Output ``` {('apple', 5), ('bananas', 20), ('black', 5), ('blue', 3), ('cars', 3), ('orange', 8), ('pears', 10), ('sheets', 5)} ```
null
CC BY-SA 4.0
null
2023-01-16T21:38:22.750
2023-01-16T21:38:22.750
null
null
3,669,465
null
75,140,386
2
null
75,135,583
0
null
It is not possible to peer with multiple VPCs with the same CIDR range. Also, please note that a `11.x.x.x` network is NOT an appropriate range, since it is using . You should always use [Private network addresses - Wikipedia](https://en.wikipedia.org/wiki/Private_network) to avoid conflicting with actual IP addresses on the Internet.
null
CC BY-SA 4.0
null
2023-01-16T22:44:40.830
2023-01-16T22:44:40.830
null
null
174,777
null
75,140,507
2
null
74,795,397
0
null
I would recommend making two changes to your code. Firstly, you'll need to convert the `Decimal` values you are getting from the database to Python `float`s, by replacing the line ``` tpl_hum.append(value[2]) ``` with ``` tpl_hum.append(float(value[2])) ``` Secondly, the most reliable way to get data from your Python code to your JavaScript code is to get Python to serialize the data as a JSON string, and put this in your template. Try replacing the following line in your Python code ``` return template("index.tpl", x_value = tpl_no, y_value = tpl_hum) ``` with ``` json_data = json.dumps({"x_array": tpl_no, "y_array": tpl_hum}) return template("index.tpl", json_data=json_data) ``` You'll also need to add `import json` to your Python code. The JavaScript within your template then becomes: ``` var jsonData = {{json_data}}; var data = [{ x: jsonData.x_array, y: jsonData.y_array, mode: "lines" }]; var layout = { xaxis:{title:"X: Number"}, yaxis:{title:"Y: Hum"}, title:"This is my graph" }; Plotly.newPlot("myPlot", data, layout); ``` You don't need the loops to read the data into variables such as `x_arry` and `y_arry`. (In fact, it's arguable you wouldn't have needed them before.) Disclaimer: I haven't tested this.
null
CC BY-SA 4.0
null
2023-01-16T23:01:16.387
2023-01-16T23:01:16.387
null
null
48,503
null
75,140,594
2
null
46,833,758
0
null
You can add padding to the text and a negative margin: ``` <span class="text" style="padding-right: 15px;"> Jack Wolfskin Jacke Colorado Flex - Midnight Blue </span> <span class="svg" style="margin-left: -15px;"> <svg> .... </svg> </span> ``` That way, if there isn't room for the padding, the last word will get pushed to the next line also. (This is based on this answer: [https://stackoverflow.com/a/25857961/5899236](https://stackoverflow.com/a/25857961/5899236))
null
CC BY-SA 4.0
null
2023-01-16T23:14:25.050
2023-01-16T23:14:25.050
null
null
5,899,236
null
75,140,682
2
null
72,219,614
0
null
Very slight expansion on AlexK's answer: you can get the color of the dotted vertical lines to match the colors of the kernels like this: ``` for line in lines: x, y = line.get_data() color = line.get_color() print(x[np.argmax(y)]) ax.axvline(x[np.argmax(y)], ls='--', color=color) ```
null
CC BY-SA 4.0
null
2023-01-16T23:32:15.990
2023-01-16T23:32:15.990
null
null
3,874,572
null
75,140,755
2
null
75,140,715
0
null
You can use `str.rjust` to right-justify a string. As long as you know the overall length of each line, that makes it easy to align each line so that they're all aligned on the right: ``` >>> n = 5 >>> for i in range(1, n+1): ... print(''.join(str(j).rjust(3) for j in range(i, n+1)).rjust(n*3)) ... 1 2 3 4 5 2 3 4 5 3 4 5 4 5 5 ```
null
CC BY-SA 4.0
null
2023-01-16T23:43:28.120
2023-01-16T23:50:10.880
2023-01-16T23:50:10.880
3,799,759
3,799,759
null
75,140,899
2
null
75,140,715
0
null
This is how you might modify your code to use `str.rjust`. Adjust the `2` in `rjust(2)` to whatever number you want. ``` print("Program to print a pattern with numbers ") print("-" * 50) n = int(input("Please enter the number of rows ")) print("-" * 50) for i in range(n + 1): # Increase triangle hidden for j in range(i): print(" ".rjust(2), end=" ") # Decrease triangle to include numbers in pattern not in increment for j in range(i, n): print(str(j+1).rjust(2), end=" ") print() ``` For your example, this gives: ``` Program to print a pattern with numbers -------------------------------------------------- Please enter the number of rows 12 -------------------------------------------------- 1 2 3 4 5 6 7 8 9 10 11 12 2 3 4 5 6 7 8 9 10 11 12 3 4 5 6 7 8 9 10 11 12 4 5 6 7 8 9 10 11 12 5 6 7 8 9 10 11 12 6 7 8 9 10 11 12 7 8 9 10 11 12 8 9 10 11 12 9 10 11 12 10 11 12 11 12 12 ```
null
CC BY-SA 4.0
null
2023-01-17T00:09:32.850
2023-01-17T00:09:32.850
null
null
3,943,170
null
75,140,926
2
null
29,591,196
0
null
To elaborate on Brian's answer make sure you import the `_mixins.scss` file in the main sass file. On the top simply do this. ``` // style.scss @import "mixins"; ``` This will fix the undefined error.
null
CC BY-SA 4.0
null
2023-01-17T00:16:54.793
2023-01-17T00:16:54.793
null
null
14,021,166
null
75,141,072
2
null
75,139,389
1
null
We can use FIND and SUBSTITUTE functions to do this, I extractred 5 chars from the other line, you need to adjust these to your sheet: [](https://i.stack.imgur.com/GtNN8.png) [](https://i.stack.imgur.com/yMTvX.png)
null
CC BY-SA 4.0
null
2023-01-17T00:54:08.080
2023-01-17T00:54:08.080
null
null
11,695,049
null
75,141,232
2
null
27,436,050
1
null
For me the problem was having IntelliJ open at the same time as Android Studio. I was using IntelliJ for back-end development at the same time as Android Studio for app development. Even though I was not doing any mobile device work with IntelliJ, it broke debugging in Android Studio. Solution: Shutdown IntelliJ when debugging with Android Studio.
null
CC BY-SA 4.0
null
2023-01-17T01:35:16.703
2023-01-17T01:35:16.703
null
null
602,139
null
75,141,253
2
null
21,229,180
0
null
Simple [typescript](https://www.typescriptlang.org/play?#code/MYewdgzgLgBAlmKBTA5kgTgFRAYRAGwFcBbMGAXhgAoFk10AuGMEgIwwEonp0EUKAfDADeAKBgxQkWKwCGEJACYAbBWoAPJi2Lt0XGDz6DxEmOpgAeGCpOmYAfhgBlKLzAoAdADN0IYjgALWXQ8ABMkKmUAVhgAajMOW1MmOQUVKipzAHprZQ4YAFoYAEZ8%20Jc3Tx8-QOCwiOi4sxgAUlzEiXQkKEJ0MlSlZRpEVE5RAF9RUSkIAiQPfBAUYboMbDwiUioABg58rJyAIgBBQ%20nwWfx5xeXaUaxcAhIwKlL9o4AhM5m5haWV%207rJ5bRR7GAHGCHHCHIA) functional approach ``` const integerToColumn = (integer: number): string => { const base26 = (x: number): string => x < 26 ? String.fromCharCode(65 + x) : base26((x / 26) - 1) + String.fromCharCode(65 + x % 26) return base26(integer) } console.log(integerToColumn(0)) // "A" console.log(integerToColumn(1)) // "B" console.log(integerToColumn(2)) // "C" ```
null
CC BY-SA 4.0
null
2023-01-17T01:40:39.940
2023-01-17T01:40:39.940
null
null
6,638,583
null
75,141,282
2
null
67,706,412
0
null
1. Go to your output apk files (Usually <project_root>\build\app\outputs\flutter-apk). 2. Use keytools to get the SHA1 value (run in terminal / git bash): > keytool -printcert -jarfile app-release.apk 1. Convert the HEX(SHA1) value to base64 to get value that ends with this site 2. Then Update base64 into meta developer
null
CC BY-SA 4.0
null
2023-01-17T01:46:04.277
2023-01-17T01:46:04.277
null
null
19,225,883
null
75,142,018
2
null
75,103,994
2
null
give width like this in your chart component. ``` <Chart options={options} series={options.series} type="bar" width={"100%"} height={150} /> ```
null
CC BY-SA 4.0
null
2023-01-17T04:34:15.267
2023-01-17T04:34:15.267
null
null
21,024,373
null
75,142,269
2
null
75,141,877
0
null
[](https://i.stack.imgur.com/7u6vl.png) Currently you are trying to map Null into string and you are using this null value by trying to parse event["DTSTART"] into a DateTime as shown in the error image above. [](https://i.stack.imgur.com/EEAGG.png)The event variable is a Map value which consists event["dtstart"] but does not have event["DTSTART"]. These are case sensitive. So, you need a fromJson or fromMap methods to map these json objects into object of type Event. Hope it helps.
null
CC BY-SA 4.0
null
2023-01-17T05:31:34.303
2023-01-17T05:31:34.303
null
null
19,431,641
null
75,142,337
2
null
75,142,297
0
null
You can include padding on the scaffold body. while you are using Container widget, you can use padding of it. ``` body: Container( alignment: Alignment.center, padding: EdgeInsets.all(16), //this child: SingleChildScrollView( child: Column( ```
null
CC BY-SA 4.0
null
2023-01-17T05:44:43.480
2023-01-17T05:44:43.480
null
null
10,157,127
null
75,142,338
2
null
75,142,297
0
null
Wrap your `Row` and `ElevatedButton` inside `Padding` ``` Padding( padding: EdgeInsets.only(horizontal:16.0), child: Row(...), ), ``` ``` Padding( padding: EdgeInsets.only(horizontal:16.0), child:ElevatedButton(...) ) ```
null
CC BY-SA 4.0
null
2023-01-17T05:45:06.783
2023-01-17T05:45:06.783
null
null
13,431,819
null
75,142,344
2
null
75,140,956
0
null
Try this, it will replace the old data with the new one. ``` <script> setInterval(function(){ $.ajax({ url: "<?php echo site_url(); ?>chat/user-list", cache : false, success: function(data){ if(data != $("#usuarios_chat").html(data)){ $("#usuarios_chat").remove(); }else{ $("#usuarios_chat").append(data); } }, }) },3000); </script> ```
null
CC BY-SA 4.0
null
2023-01-17T05:45:48.540
2023-01-17T05:45:48.540
null
null
16,249,416
null
75,142,351
2
null
75,142,297
0
null
Use Padding Widget : ``` Padding( padding: const EdgeInsets.all(8.0), child: "YOUR WIDGET", ), ```
null
CC BY-SA 4.0
null
2023-01-17T05:46:39.810
2023-01-17T05:46:39.810
null
null
20,831,311
null
75,142,385
2
null
75,142,297
0
null
Add Padding to Your `Container` or `SingleChildScrollView` like below ``` Container( // padding: EdgeInsets.all(16), or use this alignment: Alignment.center, child: SingleChildScrollView( padding: EdgeInsets.all(16), child: Column(), ), ), ``` Your Result-> [](https://i.stack.imgur.com/xBVDG.png)
null
CC BY-SA 4.0
null
2023-01-17T05:50:59.067
2023-01-17T05:50:59.067
null
null
13,997,210
null
75,142,464
2
null
75,136,912
2
null
The Solution is add a custom CSS file and override the field CSS the best location for the custom CSS file `module_name -> static -> src -> css -> css_file.css` for example add a border on input fields at the lower side the put css ``` .o_form_view .o_input { padding: 2px 4px; border-bottom: 1px solid #000 !important; } ``` Note: this CSS is only for Char fields
null
CC BY-SA 4.0
null
2023-01-17T06:02:31.107
2023-01-17T06:02:31.107
null
null
14,763,084
null
75,142,657
2
null
75,142,297
0
null
Simply Wrap your `Row` and `ElevatedButton` inside a `Padding`.
null
CC BY-SA 4.0
null
2023-01-17T06:25:56.110
2023-01-17T06:25:56.110
null
null
19,490,075
null
75,142,712
2
null
75,142,679
1
null
The values are just a single long string. This is probably not waht you want. Use a list: ``` animaldictionary = { "house pets": [ "cat", "dog", "bird", "hamster", "snake" ], "farm animals": [ "cow", "sheep", "chicken", "goat", "pig" ] } ``` Then to get the output in the way you wanted, you can use [str.join](https://docs.python.org/3/library/stdtypes.html#str.join) with new line: ``` print('\n'.join(animaldictionary[input('enter the category:')])) ``` If you do want the values to be a single string, you can use multilined strings then you will get the output you want with the code you already have but you will need to be careful with the tabs: ``` animaldictionary = { "house pets": """cat dog bird" hamster" snake""", "farm animals": """cow sheep chicken goat pig""" } ``` or manually add new lines (probably the worst "solution"): ``` animaldictionary = { "house pets": "cat\n" "dog\n" "bird\n" "hamster\n" "snake", "farm animals": "cow\n" "sheep\n" "chicken\n" "goat\n" "pig" } ```
null
CC BY-SA 4.0
null
2023-01-17T06:34:06.363
2023-01-17T06:39:29.100
2023-01-17T06:39:29.100
1,453,822
1,453,822
null
75,142,994
2
null
75,138,295
0
null
Instead of , the group name for sorted set commands is (Redis 7.0 or later) or (Before Redis 7.0), depending on the version of redis-cli. So you can try the following command: `help @sorted-set` or `help @sorted_set`.
null
CC BY-SA 4.0
null
2023-01-17T07:14:31.883
2023-01-17T07:14:31.883
null
null
5,384,363
null
75,143,079
2
null
74,076,140
0
null
It is just because you have not setup your Python interpreter properly. Just try this and also make sure you are using Virtual environment- `Run/Debug Configurations -> Check for the correct python interpreter and working directory` then close project and restart Pycharm.
null
CC BY-SA 4.0
null
2023-01-17T07:24:30.347
2023-01-17T07:24:30.347
null
null
14,064,933
null
75,143,258
2
null
75,142,679
0
null
I've got two versions of the answer. 1. Use a function that prints a selected value of the dict vertically 2. A custom class, that inherits all methods from a python dict class {}, and implements a custom behavior. Both options return an output that you are looking for: ``` cow sheep chicken goat pig ``` Option 1. Using a vertical_print function ``` animaldictionary = { "house pets": ["cat", "dog", "bird", "hamster", "snake"], "farm animals": ["cow", "sheep", "chicken", "goat", "pig"] } def vertical_print(input_dict: dict, category: str): """prints a selected dict value vertically Args: input_dict (dict): dictionary category (str): key to select """ print('\n'.join(input_dict.get(category, ''))) vertical_print(animaldictionary, 'farm animals') ``` Option 2. Using a class based on dict class ``` class VerticalPrintingDict(dict): """customized version based on the python dict, will not return an item but a string that prints vertically Args: dict (class): base class that it inherits from """ def __init__(self, *arg, **kw): """initilized using superclass """ super(VerticalPrintingDict, self).__init__(*arg, **kw) def __getitem__(self, item) -> str: """impementation of a custom method [] Args: item (str): key Returns: str: string, \n separated """ return '\n'.join(super().__getitem__(item)) custom_dict = VerticalPrintingDict({ "house pets": ["cat", "dog", "bird", "hamster", "snake"], "farm animals": ["cow", "sheep", "chicken", "goat", "pig"] }) print(custom_dict['farm animals']) ```
null
CC BY-SA 4.0
null
2023-01-17T07:44:42.057
2023-01-17T07:44:42.057
null
null
17,192,324
null
75,143,331
2
null
75,142,738
0
null
I solved the problem by adding ``` if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) ``` this on my urls.py sorry for asking what i could solve it my self, but I will left this for someone who might have same problem... thanks
null
CC BY-SA 4.0
null
2023-01-17T07:53:05.497
2023-01-17T07:53:05.497
null
null
21,024,737
null
75,143,394
2
null
75,009,451
0
null
I'm still not sure if I understand you correctly. Anyway, below is just my guess about what you want ..... [](https://i.stack.imgur.com/LqUcM.gif) The LB (ListBox) in the userform will show only the row with value in column A, hide column B and C, then show column D to Z. So, in the LB, there is H01 and then H04 to H26 while the row is coming from row 2,3,5 and 6. The LB doesn't show row 4 and 7 because in column A those rows are blank/no-value. In the Userform there are 5 textbox to update/edit the row(N) of data for H04,H05,H06,H11 and H12. Example: The user click one item in the LB. Then the textbox (tb) 1 to 5 show the corresponding column value which is clicked. Then the user update/change the value in each tb, then click UPDATE button. The DATA is updated and the LB also updated. [](https://i.stack.imgur.com/UFhuH.gif) ``` Private Sub UserForm_Initialize() Call PopLB End Sub Sub PopLB() With Sheets("helper") .Cells.Clear Sheets("DATA").UsedRange.Copy Destination:=.Range("B1") addr = .UsedRange.Columns(1).Offset(0, -1).Address .Range("A1").Value = Split(addr, ":")(0) .Range("A1").AutoFill Destination:=.Range(addr), Type:=xlFillSeries .Range(addr).Offset(0, 1).SpecialCells(xlBlanks).EntireRow.Delete End With With LB .ColumnCount = 27 .ColumnWidths = "00,28,00,00,28,28,28,28,28,28," & _ "28,28,28,28,28,28,28,28,28,28," & _ "28,28,28,28,28,28,28" .RowSource = "helper!" & Sheets("helper").UsedRange.Address End With End Sub Private Sub LB_Click() tb1.Value = LB.List(LB.ListIndex, 4) tb2.Value = LB.List(LB.ListIndex, 5) tb3.Value = LB.List(LB.ListIndex, 6) tb4.Value = LB.List(LB.ListIndex, 11) tb5.Value = LB.List(LB.ListIndex, 12) End Sub Private Sub bt_Click() If LB.ListIndex = -1 Then Exit Sub With Sheets("DATA") r = Range(LB.List(LB.ListIndex, 0)).Row .Cells(r, 4).Value = tb1.Value .Cells(r, 5).Value = tb2.Value .Cells(r, 6).Value = tb3.Value .Cells(r, 11).Value = tb4.Value .Cells(r, 12).Value = tb5.Value End With Call PopLB End Sub ``` In PopLB sub, first it clear the whole cells in sheet "helper". Then it copy the data in sheet "DATA" to sheet "helper" cell B1. Within sheet "helper": it get the address of the usedrange as addr variable, then put the first split value of addr in cell A1, fill series the range of addr, then finally it delete the blank row of H01 within the LB: It make 27 columns and set each column width. Please note that there are three zero value for the column width. One is to hide the id/row in column A, the other two is to hide H02 and H03. Finally it use the sheet helper used range as the row source for the LB. The sub LB_Click will be triggered when the user click any item in the LB. It will populate textbox (tb) 1 to 5. The bt_Click sub will be triggered when the user click the UPDATE button. It will update the corresponding value in the sheet DATA from the tb1 to tb5 value in the userform, then it call back the PopLB sub. so, as you said : > this UF is meant to connect with an additional UF that can edit / delete data in selected rows. Although maybe it's not exactly what you mean, but this UF still can update/edit the data in sheet DATA although it use a helper sheet.
null
CC BY-SA 4.0
null
2023-01-17T07:59:58.223
2023-01-17T07:59:58.223
null
null
7,756,251
null
75,143,438
2
null
75,135,985
2
null
I fixed the problem. It was the path mappings in the end. The code was done by a previous coworker that is not in the team anymore and he had 2 copies of the same project in the container, but set the 'remoteRoot' to the wrong one. Since the codes are still the same, no error is shown but the breakpoints are also not triggered.
null
CC BY-SA 4.0
null
2023-01-17T08:05:46.333
2023-01-17T08:19:59.640
2023-01-17T08:19:59.640
15,147,662
15,147,662
null
75,143,442
2
null
18,967,859
0
null
Accepted answer by @streem caused some weird behavior with UILabel acting as sections. This worked for me: ``` if let navBar = navigationController?.navigationBar { scrollView.contentInset = UIEdgeInsets(top: -navBar.frame.size.height, left: 0.0, bottom: 0.0, right: 0.0) } ```
null
CC BY-SA 4.0
null
2023-01-17T08:06:36.937
2023-01-17T08:06:36.937
null
null
851,258
null
75,143,587
2
null
21,025,319
1
null
Placing the `<iframe>` inside a container with `display: flex` and removing the border from the `<iframe>` with `border: 0` also seems to work: ``` /* doesn't work */ .container { border: 1px solid black; height: 100%; } .container iframe { height: 100%; } /* works */ .container-flex { margin-top: 50px; display: flex; border: 1px solid black; } .container-flex iframe { border: 0; } ``` ``` <div class="container"> <iframe src="https://www.youtube.com/embed/7X8II6J-6mU"></iframe> </div> <div class="container-flex"> <iframe src="https://www.youtube.com/embed/7X8II6J-6mU"></iframe> </div> ```
null
CC BY-SA 4.0
null
2023-01-17T08:22:58.110
2023-01-17T08:22:58.110
null
null
14,776,809
null
75,143,610
2
null
23,363,073
0
null
In my case (xUnit), the clue was in Visual Studio's "Test" output log (see screenshot below). My NuGet packages were all updated - latest versions - to the point where I needed a (slightly 6.0.13 vs 6.0.12) newer version of .NET, which I didn't have installed. I updated Visual Studio and managed to run the tests. [](https://i.stack.imgur.com/DPAKo.png)
null
CC BY-SA 4.0
null
2023-01-17T08:25:39.387
2023-01-17T08:25:39.387
null
null
1,987,392
null
75,143,690
2
null
23,955,114
0
null
I "solved" it for my use case using reflection to access the `TabePaneSkin.TabHeaderArea.setScrollOffset`. It's not great having to use reflection but I personally prefer it over re-implementing the whole `TabPaneSkin`. ``` private static void resetAutomaticScrollingOfTabPaneHeaders(TabPane tabPane) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException { Skin<?> skin = tabPane.getSkin(); TabPaneSkin tabPaneSkin = (TabPaneSkin) skin; // TabePaneSkin.TabHeaderArea Node tabHeaderArea = tabPaneSkin.getChildren().get(tabPaneSkin.getChildren().size() - 1); // The TabHeaderArea seems to be the last child of the TabPaneSkin. Method setScrollOffset = tabHeaderArea.getClass().getDeclaredMethod("setScrollOffset", double.class); setScrollOffset.setAccessible(true); setScrollOffset.invoke(tabHeaderArea, 0); } ``` You could call this from a width listener, e.g. ``` widthProperty().addListener((observable, oldValue, newValue) -> { try { resetAutomaticScrollingOfTabPaneHeaders(this); } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { log.warn("Could not scroll the TabHeaderArea back to the left.", e); } }); ```
null
CC BY-SA 4.0
null
2023-01-17T08:32:43.773
2023-01-18T09:03:16.560
2023-01-18T09:03:16.560
14,912,225
801,320
null
75,143,906
2
null
64,711,825
1
null
It is actually possible with a get around (might be a bit messy). Here is the way I did it in case someone is looking for this : I manage all navigations from a card to another so that it doesn't stack the cards, but instead pop the current card and add the new one, so I always only have one card in the stack, therefore having no "back" button in the header of the card. So, appart from the homepage trigger from the manifest which return directly a card.build(), I navigate from card to card using a function such as : ``` function showMainCard(e) { var card = buildMainCard(); var nav = CardService.newNavigation().popCard().pushCard(card); var actionresponse = CardService.newActionResponseBuilder() .setNavigation(nav); return actionresponse.build(); } ``` And the build[something]Card() function returns the card.build() The only drawback is that when the add-on is reloaded, it goes back to the first card you build in the homepage trigger. In order to get around this, you need to save page navigation in userProperties when building each card. Then, the homepageTrigger can work this way to load the right card : ``` function onLoad(e) { // Create the card switch (userProperties.getProperty("pageNavigation")) { case pages.MAIN: return buildMainCard(); case pages.CREATE_NEW_FILE_REQUEST: return buildNewFileRequestCard(); case pages.MANAGE_DEFAULT_OPTIONS: return buildManageDefaultOptionsCard(); case pages.MANAGE_OPTIONS: return buildManageOptionsCard(); case pages.CREATE_NEW_FILE_REQUEST_AFTER_AUTHORIZATION: return buildNewFileRequestCard(); case pages.SHOW_FILE_REQUEST_DETAIL: return buildFileRequestDetailCard(); case pages.EDIT_FILE_REQUEST: return buildEditFileRequestCard(); default: console.log("Problem with navigation, main card is loaded"); return buildMainCard(); } } ```
null
CC BY-SA 4.0
null
2023-01-17T08:52:22.317
2023-01-17T08:52:22.317
null
null
21,025,824
null
75,143,925
2
null
69,557,168
0
null
I've managed to create a logarithmic colorbar with even spacing. However, I couldn't figure out how to create a discrete logarithmic colorbar with a logarithmic spacing of the colorbar. I hope this helps! ``` import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np X = np.arange(0, 50) Y = np.arange(0, 50) Z = np.random.rand(50, 50)*10 bounds = [0, 0.1, 0.2, 0.3, 0.4, 0.5, .7, .8, .9, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10] num_c = len(bounds) cmap = mpl.colormaps['viridis'].resampled(num_c) norm = mpl.colors.BoundaryNorm(bounds, cmap.N) fig, ax = plt.subplots() fig.set_size_inches(4*2.5, 3*2.5) ax.pcolormesh(X, Y, Z, norm=norm, cmap=cmap) plt.xlabel("X", horizontalalignment='right', x=1.0) plt.ylabel("Y", horizontalalignment='right', y=1.0) fig.colorbar(mpl.cm.ScalarMappable(cmap=cmap, norm=norm)) plt.tight_layout() ``` [](https://i.stack.imgur.com/mkMqw.png)
null
CC BY-SA 4.0
null
2023-01-17T08:54:27.107
2023-01-20T13:51:50.427
2023-01-20T13:51:50.427
14,079,021
14,079,021
null
75,144,243
2
null
75,143,835
1
null
Use [Data Protection Provider](https://learn.microsoft.com/en-us/aspnet/core/security/data-protection/using-data-protection?view=aspnetcore-7.0). It supports your scenario and is available in .NET.
null
CC BY-SA 4.0
null
2023-01-17T09:22:13.707
2023-01-17T09:22:13.707
null
null
318,508
null
75,144,268
2
null
21,025,319
0
null
pls add `display: flex;` and `flex-direction: column;` in the style. so the style will look like this: ``` .border { background: #e30606; width: 300px; height: 200px; border: 1px solid green; overflow: visible; margin: 0; padding: 0; display: flex; flex-direction: column; } .border iframe { border: none; width: 300px; height: 100px; margin: 0; padding: 0; opacity: 0.8; } .border .lower { height: 100px; margin: 0; padding: 0; background: blue; opacity: 0.8; } ``` ``` <div class="border"> <iframe src="https://example.com"></iframe> <div class="lower"></div> </div> ```
null
CC BY-SA 4.0
null
2023-01-17T09:24:06.473
2023-01-17T09:38:21.267
2023-01-17T09:38:21.267
14,912,225
14,912,225
null
75,144,530
2
null
75,136,912
1
null
Perhaps someone will need it. It`s working for me. ``` <form delete="false" default_order="name"> <field name="title"/> </form> ``` ``` from odoo import fields, models class InfoPageSection(models.Model): _name = "my_module.page.section" title = fields.Char("Title", required=True, index=True) ``` ``` 'assets': { 'web.assets_common': [ ('prepend', 'my_module/static/src/css/mycss.css'), ], }, ```
null
CC BY-SA 4.0
null
2023-01-17T09:45:17.357
2023-01-17T09:45:17.357
null
null
20,991,900
null
75,145,013
2
null
74,279,245
0
null
I had the same issue. But in the `firebase,json` file I didn't have a `rewrites`, And i could not find where i could edit the `firebase.json` on the serverside. I also did a `firebase deploy –-debug` And saw that ``` "rewrites": [ { "source": "**", "function": { "functionId": "ssrrsponse366109" } } ], ``` was added. I checked that function and saw the folling error: ``` Error [ERR_MODULE_NOT_FOUND]: Cannot find package 'firebase' imported from /workspace/.next/server/pages/_app.js at new NodeError code: 'ERR_MODULE_NOT_FOUND' ``` I downloaded the source, and checked the `package.json` and it was missing firebase dependency ``` { "private": true, "scripts": { "dev": "next", "build": "next build", "start": "next start" }, "dependencies": { "js-cookie": "^3.0.1", "next": "latest", "react": "^18.2.0", "react-dom": "^18.2.0", "firebase-frameworks": "^0.6.0", "firebase-functions": "^3.23.0", "firebase-admin": "^11.0.1" }, "main": "server.js", "engines": { "node": "16" } } ``` Did `npm i firebase` , zipped up the folder again exculding the newly created node_modules folder. Edited the function ,uploaded the new zip, deployed the function. The error was gone. Site worked an could refresh pages other then the homepage. It's a bug in firebase 9 when You use the firebase experiments:enable webframeworks and next.js They forgot to add that dependency. The firebase team should solves this issue.
null
CC BY-SA 4.0
null
2023-01-17T10:23:15.837
2023-01-17T10:23:15.837
null
null
10,269,586
null
75,145,553
2
null
75,139,389
2
null
Let me start with that the question was fairly unclear. You referenced the cell containing several strings separated by line breaks as being a column, so at first I thought a simple VLOOKUP (`=VLOOKUP(3,A:B,2,0)`) would suffice. I edited the question a little to make that more clear (and also allows people to use the data, without having to retype it to be able to reproduce). Then I saw tinazmu's answer and thought why complicate things that much for a simpel lookup. Than looking at the pictures in her(?) post I realized it calculated single cells containing line breaks. Than looking back at your question I realized she spotted that very well. Here's a version that would work without helper column. It does require Microsoft 365 or Excel 2021: ``` =LET(x, "3", a, TEXTSPLIT(A1,,CHAR(10)), b, TEXTSPLIT(B1,,CHAR(10)), XLOOKUP(x,a,b) ) ``` [](https://i.stack.imgur.com/XbcH8.png) `LET` first declares names of strings/calculation results which we can refer to later in the actual formula. In this case I declared the following: > `x` is the value to be searched.`a` is the text in cell `A1` splitted by line breaks (Excel notation for line break: `CHAR(10)`).`b` is the text in cell `B1` spliited by line breaks. Where `x` is a string (should be text) and `a` and `b` are both arrays of the separate strings per cell. We can than use our formula - a simple XLOOKUP - referencing the declared names: `XLOOKUP(x,a,b)` This looks up value `x` in the `a`-array and returns the string found at the same position from the `b`-array. You could also replace the search string for a cell value, for instance `E4`; to be able to change the search value without altering the formula. In this case it could be handy to make sure that if a number value is entered in that cell it will not result in an error while the value is actually found in the string. `TEXTSPLIT` So to avoid this we implement a `VALUETOTEXT` and it would look like this: ``` =LET(x, E4, a, TEXTSPLIT(A1,,CHAR(10)), b, TEXTSPLIT(B1,,CHAR(10)), XLOOKUP(VALUETOTEXT(x),a,b) ) ``` [](https://i.stack.imgur.com/DJ2QP.png) If you want to search a range instead of a single cell we have two options. join the cell values in the range and split them the way described above: ``` =LET(x, E4, a, TEXTSPLIT(TEXTJOIN(CHAR(10),1,A1:A2),,CHAR(10)), b, TEXTSPLIT(TEXTJOIN(CHAR(10),1,B1:B2),,CHAR(10)), XLOOKUP(VALUETOTEXT(x),a,b) ) ``` [](https://i.stack.imgur.com/XTDyS.png) but this way the character limit for textjoin/textsplit would be reached if there would be more cells in the range. If that's the case we can involve `LAMBDA`-helper `REDUCE`: ``` =LET(x,E4, a, DROP(REDUCE(0,A1:A2,LAMBDA(old,new,VSTACK(old,TEXTSPLIT(new,,CHAR(10))))),1), b, DROP(REDUCE(0,B1:B2,LAMBDA(old,new,VSTACK(old,TEXTSPLIT(new,,CHAR(10))))),1), XLOOKUP(VALUETOTEXT(x),a,b) ) ``` [](https://i.stack.imgur.com/pIlfq.png) The `REDUCE`-function behaves like this: you declare a start point and an array/range to "loop" through. You name these and these names can be used in a formula, just like we saw in the `LET` explanation at the start of the explanation of this post. The difference here is that we first mention the value/array/range (after `REDUCE(`) and name them afterwards (after `LAMBDA(`). Another difference is that we can store the calculation value of the previously calculated result and call that value in the next calculation of the same formula; like a loop. In this case for `a` I used the following names: > `old` for the starting point of REDUCE: `0` ``new` for the "loop" array/range: `A1:A2` The function would start at `old`. So it takes value `0` and because combined with VSTACK it vertically stacks that to no value that's there. So it results in `0`. This result is now the replaced value for `old` and it'll now continue the same for the first value found in `new`. Which is the first found in the range `A1:A2`, being `A1`. REDUCE will Vstack the `old` which resulted to `0` to the textsplit of the `new`, so the spill array of the textsplit of `A1`. and this becomes the array stored as `old`. Next REDUCE will Vstack the `old` array to the new calculated spill array of the next in range: `A2`. And the next array for `old becomes the stack of`0`& spill of textsplit of`A1`& spill of textsplit of`A2`. This would be the end value of REDUCE in this case, but if you have a larger range/array it would loop through it one by one and stack the results to one large array of strings. Since REDUCE starts with `0` and this not being an actual value in your range, we use `DROP([REDUCE-result],1)` to remove/drop this value from the array.
null
CC BY-SA 4.0
null
2023-01-17T11:11:26.510
2023-01-17T16:07:03.937
2023-01-17T16:07:03.937
12,634,230
12,634,230
null
75,145,862
2
null
75,144,337
0
null
It really depends on what you want to do. If you just want to store data as it comes, and then have consumers query the data on-demand, you could use a fast database like QuestDB. The 1K consumers would just issue SQL queries (using the rest API or a postgres-compatible library). Those queries could filter by whichever column you want. A good combination of parameters to query would be the timestamp of the message plus the category (or categories) the consumer is monitoring. You could store the category as a `symbol` type in questdb, which is an optimised data type for looking up string values. As you can see, that is a pull strategy, in which consumers need to actively run the queries, but it is very scalable and flexible to query. You can also use the data in the database for all sort of analytics. If you require a push strategy, then I don't think the message queues/brokers/processors you listed (kafka and kinesis) are suitable. You probably want to look better at RabbitMQ, ActiveMQ, or ZeroMQ, which support message routing so your clients can subscribe to messages matching their filters and they will be automatically delivered. In this second scenario you are not persisting your messages to a database, so depending on what you need you might prefer a combination of both approaches: RabbitMQ for pushing messages directly to the subscribers, but also QuestDB to store all the unfiltered messages for further analytics or for on-demand queries on top of the whole dataset.
null
CC BY-SA 4.0
null
2023-01-17T11:39:07.940
2023-01-17T11:39:07.940
null
null
3,035,921
null
75,146,286
2
null
75,146,225
2
null
I'm guessing your fist value of 02/01/2023 and Activity1 is C2. Then for the whole range C2:Z (or whichever you have): ``` =C2>=$B2 ``` Do this for one color for the whole range and it will drag automatically, you don't need to write it as an arrayformula. The "$" will always refer to the value in column B from the row it's positioned [](https://i.stack.imgur.com/Q6wQT.png)
null
CC BY-SA 4.0
null
2023-01-17T12:16:17.767
2023-01-17T12:16:17.767
null
null
20,363,318
null
75,146,395
2
null
75,146,225
0
null
if you are selecting whole range (`C2:Z`), try this for green and red respectively: ``` =(C2>=$B2)*(C2<>"") ``` --- ``` =(C2<$B2)*(C2<>"") ``` - [](https://i.stack.imgur.com/ItY4f.png)
null
CC BY-SA 4.0
null
2023-01-17T12:26:00.160
2023-01-17T12:26:00.160
null
null
5,479,575
null
75,146,440
2
null
75,146,349
3
null
Instead of using ListView, use `Wrap` by wrapping with a scrollable widget like `SingleChildScrolView` if needed. ``` Wrap( children: interests, ) ``` Find more about [Wrap](https://api.flutter.dev/flutter/widgets/Wrap-class.html)
null
CC BY-SA 4.0
null
2023-01-17T12:30:29.510
2023-01-17T12:30:29.510
null
null
10,157,127
null
75,146,549
2
null
75,138,871
0
null
the major problem i found using MutableStateFlow or MutableStateFlow, when i add new value to the reminderState.value the variable hasn't been able to recompose successfully, and even when i read the documentation MutableState is actually mutable value holder which can be observed and if this Mutable State holds a mutable list it won't be observed because the mutable list by default is not observable that's why i was confused when i add new item i'm not able to see any changes in the Lazy Row items, and that's the problem using mutable state with mutable list, and here is a solution example: > ViewModel.kt ``` private val _reminders = mutableStateOf<String>() val reminders : List<String> = _reminders //fun to add element to the list. fun addElement(reminder : String) { _reminders.add(reminder) } ``` the type of the variable now is actually a snapshot state list and this type can be easily converted to immutable list. > inside the lazyRow composable function: ``` //gets the list of elements. val reminderState = habitsViewModel.reminders ``` instead of adding all the items in every re composition that will fire duplicate `items()` in the list instead i used `item {}` to Add a single item using `forEach {}` this will avoid duplicates and it will iterate through each element and accordingly will add new item. > LazyRow composable ``` LazyRow() { if (reminderState.isNotEmpty()) reminderState.forEach { date -> item { Column { RemindMeCard( onClick = { /*TODO*/ }, imageVector = Icons.Default.RingVolume, ) Text( text = date, fontSize = 12.sp ) } } } } ``` any suggestion for better performance will be appreciated.
null
CC BY-SA 4.0
null
2023-01-17T12:40:24.977
2023-01-17T12:40:24.977
null
null
16,528,861
null
75,146,801
2
null
75,146,572
1
null
The `align="right"` attribute on your table was breaking the layout but this has [been deprecated](https://www.w3.org/TR/html401/present/graphics.html) and shouldn't be used. I've used `margin-inline: auto 0` on your table instead that pushes the table to the right. Here's a good [video](https://www.youtube.com/watch?v=Azfj1efPAH0) from Kevin Powell to help you. If you're new to HTML and CSS his videos are a very good introduction. ``` .openingtimes { text-align: right; padding-top: auto; padding-right: auto; padding-left: auto; padding-bottom: auto; } table, tr, td { border: 1px solid; text-align: center; padding-top: auto; padding-right: auto; padding-left: auto; padding-bottom: auto; } table { margin-inline: auto 0; /* added this */ } ``` ``` <div> <table> <tbody> <tr> <td>Monday</td> <td>0900 - 1800</td> </tr> <tr> <td>Tuesday</td> <td>0900 - 1800</td> </tr> <tr> <td>Wednesday</td> <td>0900 - 1800</td> </tr> <tr> <td>Thursday</td> <td>0900 - 1800</td> </tr> <tr> <td>Friday</td> <td>0900 - 1800</td> </tr> <tr> <td>Saturday</td> <td>0900 - 1700</td> </tr> </tbody> </table> </div> <div class="openingtimes"> <br> <b>All major card types accepted including contactless </b><br> <br> <img src="https://stylebyjulie.co.uk/wp-content/uploads/2021/10/paymentmethods.png" alt="style by julie payment methods" width="227" height="28" align="right"> <br><br> <b>Supporting (click to find out more)</b><br><br> <a href="https://stylebyjulie.co.uk/little-princess-trust/"> <img title="little princess trust" src="https://stylebyjulie.co.uk/wp-content/uploads/2021/10/littleprincess-logo.png" alt="little princess trust" width="138" height="111" align="right"></a> </div> ```
null
CC BY-SA 4.0
null
2023-01-17T12:58:21.993
2023-01-17T13:08:34.903
2023-01-17T13:08:34.903
12,571,484
12,571,484
null
75,146,889
2
null
19,654,081
1
null
On Chrome Version 109~ : 1. Go to F12 > Sources Tab > Overrides (You may need to click the chevron next to Page) 2. Select/Create a folder to contain Overrides 3. You can now right-click a file or editor window & save it for Overrides Image of sources tab where Overrides is located
null
CC BY-SA 4.0
null
2023-01-17T13:06:01.223
2023-01-29T16:29:47.070
2023-01-29T16:29:47.070
6,115,238
21,027,576
null
75,146,981
2
null
75,144,512
0
null
As per [JMeter documentation](https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Header_Manager): > JMeter now supports multiple Header Managers. The . If an entry to be merged matches an existing header name, it replaces the previous entry. This allows one to set up a default set of headers, and apply adjustments to particular samplers. Note that an empty value for a header does not remove an existing header, it justs replace its value. So there is only HTTP Header Manager containing combined headers from the top-level one and with the one which is the child of the current sampler. If you want to remove all headers which are set by the top-level header manager - you need to add a [JSR223 PreProcessor](https://jmeter.apache.org/usermanual/component_reference.html#JSR223_PreProcessor) and do it there. New headers can be added in the same JSR223 PreProcessor if needed. Example code: ``` import org.apache.jmeter.protocol.http.control.Header sampler.getHeaderManager().clear() sampler.getHeaderManager().add(new Header('header1','value1')) sampler.getHeaderManager().add(new Header('header2','value2')) ``` More information on Groovy scripting in JMeter: [Apache Groovy: What Is Groovy Used For?](https://www.blazemeter.com/blog/apache-groovy)
null
CC BY-SA 4.0
null
2023-01-17T13:14:26.830
2023-01-17T13:14:26.830
null
null
2,897,748
null
75,147,032
2
null
75,146,759
1
null
GGplot doesn't make it especially easy, but you can do it: ``` library(ggplot2) my_dat <- data.frame( Day = paste("Day",rep(1:3, each=3), rep(c("(AM)", "(Midday)", "(PM)"), 3), sep= " "), day_num = 1:9, inf = seq(from = 13,to = 45, length=9), flow = runif(9, 580, 740) ) ggplot() + geom_bar(data=my_dat, aes(x=day_num, y=inf, fill = "Influent Concentration"), stat="identity", width=.6) + geom_line(data=my_dat, aes(x=day_num, y=flow*(50/800), colour="FLow Rate. L/s")) + scale_fill_manual(values="red") + scale_colour_manual(values="blue") + scale_x_continuous(breaks=1:9, labels=my_dat$Day) + scale_y_continuous(sec.axis = sec_axis(trans = ~.x*800/50, name = "Flow Rate L/S"), limits = c(0,50), name = "Influent. MPs/L") + labs(fill="", colour="", x="") + theme(legend.position="bottom", axis.text.x = element_text(angle=45, hjust=1)) ``` ![](https://i.imgur.com/V2AoXzF.png) [reprex package](https://reprex.tidyverse.org) The main things you have to do are to 1. Transform the second-axis series to have the same range(ish) as the first-series axis. In your case, the excel graph had the second y-axis going from 0-800 and the first y-axis going from 0-50, so the transformation is simple, you multiply the second series values by 50/800. 2. In the scale_y_continuou() function there is an argument sec.axis which allows you to plot a second axis on the right-hand side of the plot. Here, you need to specify the trans argument to transform the values you're plotting back into the original values. That's what trans = ~.x*800/50 does. --- ## EDIT: Modifying OP's code I modified your code as much as I can without actually having the data. The picture of the data that you provided does not give enough information about the data, if you use `dput(data)` and post the results, I could likely help more. For now, try this: ``` inf_plot <- ggplot(data=data, aes(x=Day))+ geom_bar(aes(y=inf, fill="Influent conc"), stat = "identity", width=0.4)+ geom_line(aes(y=flow*(50/800), colour="flow rate"), size = 1.4, group=1)+ ggtitle("Influent Microplastic Concentration \n and Influent Flow Rate")+ xlab("\n\nDay") + ylab("Microplastic Concentration (MPs/L)\n\n")+ scale_fill_manual(values="red4") + scale_colour_manual(values="blue4") + scale_y_continuous(sec.axis = sec_axis(~.*800/50, name = "Inlet flow rate (L/s)\n\n"), limits = c(0,50)) inf_plot + theme(axis.text = element_text( size = 20, colour = "black"), plot.title = element_text (size =25, hjust = 0.5, vjust = 5, face = "bold"), axis.title = element_text (size = 20, face = "bold"), plot.margin =unit(c(1.5, 1.5, 1.5, 1.5), "cm"), legend.position = "bottom") ```
null
CC BY-SA 4.0
null
2023-01-17T13:18:49.703
2023-01-18T11:03:14.940
2023-01-18T11:03:14.940
8,206,434
8,206,434
null
75,147,262
2
null
75,147,071
0
null
You need to change `getClip()` ``` path.lineTo(0, 0); path.lineTo(0, size.height - 50); path.quadraticBezierTo(size.width / 2, size.height, size.width, size.height - 50); path.lineTo(size.width, 0); path.quadraticBezierTo(size.width / 2, size.height/2, 0, 0); ``` I hope this is what you wanted, based on the question you wrote.
null
CC BY-SA 4.0
null
2023-01-17T13:37:14.627
2023-01-17T14:52:46.613
2023-01-17T14:52:46.613
11,066,298
11,066,298
null
75,147,264
2
null
75,146,830
3
null
The way these queries are written, they count individual values, not the count or sum of items per line. For example, `101` and `102` would produce an Y value of 2, while 100 individual `100`s would produce 1. To get totals by line, use `GroupBy` and `Count` or `Sum`, eg : ``` var dailies=dailyScrap.GroupBy(s=>s.Line) .Select(g=>new { X=g.Key, Y=g.Sum(s=>s.Quantity) }) .ToList(); ``` This can be done in EF Core too, retrieving only the totals from the database : ``` var dateFrom=DateTime.Today; var dateTo=dateFrom.AddDays(1); var dailies=_dbContext.Scrap .Where(s=> s.Created>=dateFrom && s.Created <dateTo) .GroupBy(s=>s.Line) .Select(g=>new { X=g.Key, Y=g.Sum(s=>s.Quantity) }) .ToList() ``` This generates ``` SELECT Line,SUM(Quantity) FROM Scrap WHERE Created >=@d1 && Created < @d2 GROUP BY Line ``` The condition can be simplified to only `Where(s=> s.Created>=DateTime.Today)` if there are no future values. The query can be adapted to cover any period by changing the `From` and `To` parameters, eg : ``` var dateFrom=new DateTime(DateTime.Today.Year,DateTime.Today.Month,1); var dateTo=dateFrom.AddMonths(1); ``` or ``` var dateFrom=new DateTime(DateTime.Today.Year,1,1); var dateTo=dateFrom.AddYears(1); ```
null
CC BY-SA 4.0
null
2023-01-17T13:37:19.900
2023-01-17T13:42:49.997
2023-01-17T13:42:49.997
134,204
134,204
null
75,147,323
2
null
75,147,071
0
null
Try this : ``` class NativeClipper extends CustomClipper<Path> { @override Path getClip(Size size) { Path path = Path() ..cubicTo(0, 0, size.width / 2, 50, size.width, 0) ..lineTo(size.width, size.height - 50) ..cubicTo(size.width, size.height - 50, size.width / 2, size.height + 50, 0, size.height - 50); return path; } @override bool shouldReclip(covariant CustomClipper<Path> oldClipper) => true; } ```
null
CC BY-SA 4.0
null
2023-01-17T13:42:22.447
2023-01-17T13:42:22.447
null
null
20,831,311
null
75,147,388
2
null
71,627,367
-2
null
I fixed this error by going into the directory where Git was installed and running the git console ``` git-cmd.exe ``` and inside this console, the command ``` rails new C:\dir.... path to new project\new project name ``` Understanding that it is a PATH problem, I need to know what directory I have to add to the PATH, where Git is installed or more specifically the Bin directory within that same directory, etc.
null
CC BY-SA 4.0
null
2023-01-17T13:46:48.187
2023-01-18T00:02:53.720
2023-01-18T00:02:53.720
843,953
21,028,021
null
75,147,418
2
null
75,104,588
0
null
I managed to fix it copying the old [binding.gyp](https://github.com/hiitiger/goverlay/blob/5c0266879c5464911185d2a37a5f9be9881767eb/electron-overlay/binding.gyp) file and ran electron-rebuild, the new .node file will be here .\electron-overlay\bin\win32-x64-109
null
CC BY-SA 4.0
null
2023-01-17T13:48:54.557
2023-01-17T13:48:54.557
null
null
11,837,758
null
75,147,500
2
null
60,991,462
0
null
In the OP's graphic, you see the , which is a foreign key to the EmployeesInfo object. If you have loaded a salesperson record into memory as a SalesPersons object named "oslp", this is how you'd update the mobile phone: ``` var ohem = company.GetBusinessObject( BoObjectTypes.oEmployeesInfo ) as EmployeesInfo; if ( ohem.GetByKey( oslp.EmployeeId ) ) { ohem.MobilePhone = newMobilePhoneNumber; var errorCode = ohem.Update(); // Deal with error, if any } ``` If you hire a salesperson, you would add the EmployeesInfo first and note the new person's EmployeeId; then add the Salespersons record and fill in the EmployeeId.
null
CC BY-SA 4.0
null
2023-01-17T13:54:16.953
2023-01-17T15:17:21.957
2023-01-17T15:17:21.957
2,227,743
5,885,375
null
75,147,731
2
null
71,970,500
0
null
I was having the same problem and I thought that it was because of the swiperjs, but actually, in my case, I have accidentally enabled caret browsing mode in Chrome by clicking F7 button. Click F7 again to disable that mode. That option can be managed in settings in Accessibility page.
null
CC BY-SA 4.0
null
2023-01-17T14:11:31.003
2023-01-17T14:11:31.003
null
null
396,895
null
75,148,445
2
null
75,145,012
0
null
Here is a solution using the language ([http://www.graphviz.org/pdf/gvpr.1.pdf](http://www.graphviz.org/pdf/gvpr.1.pdf)). comes with the Graphviz package so it should already be present on your computer. As a one-liner: `gvpr -c 'N{if ($.indegree==0)$.shape="ellipse";else $.shape="box";}' yourfile.gv` What it does: - - -
null
CC BY-SA 4.0
null
2023-01-17T15:10:54.940
2023-01-17T15:10:54.940
null
null
12,317,235
null
75,148,459
2
null
75,147,911
0
null
Here's a sample setup as in your screenshot and you may have to adapt it to your design formula in `cell H3` for Lizzie: ``` =INDEX(IF(LEN(H$2:$2),IF(ISERROR(HLOOKUP(G3&H$2:$2&"Approved",TRANSPOSE(A:A&D:D&E:E),1,)),"N","Y"),)) ``` - [](https://i.stack.imgur.com/0150m.png)
null
CC BY-SA 4.0
null
2023-01-17T15:11:55.243
2023-01-17T15:11:55.243
null
null
5,479,575
null
75,148,496
2
null
75,148,450
3
null
You need to extend the widget, on simple case, extend the `StatelessWidget` or `StatefulWidget`. `home:` expect widget, not class. ``` class HomeScreen extends StatelessWidget { const HomeScreen({super.key}); @override Widget build(BuildContext context) { return Column(children: [Text('Helloooo!')]); } } ``` > Every class isn't a widget. I will recommend to check [widgets-intro](https://docs.flutter.dev/development/ui/widgets-intro). You can find more on [.flutter.dev/cookbook](https://docs.flutter.dev/cookbook)
null
CC BY-SA 4.0
null
2023-01-17T15:14:50.040
2023-01-17T15:14:50.040
null
null
10,157,127
null
75,148,541
2
null
75,089,137
1
null
This error occurs because twisted-iocpsupport is not supported by python 3.11 Consider going back to any versions between 3.6 and 3.10 that fixed the problem for me. Go to twisted-iocpsupport documentation and see the versions of python it supports
null
CC BY-SA 4.0
null
2023-01-17T15:17:44.320
2023-01-17T15:17:44.320
null
null
14,558,732
null
75,148,621
2
null
75,146,441
0
null
`npm` scripts use `cmd.exe`, not powershell, to execute the commands. You would need to add a `powershell` invocation first: ``` { "scripts": { "start": "webpack serve", "watch": "webpack --watch", "build": "set NODE_ENV=production && webpack", "build-dev": "webpack", "clean": "powershell \"Remove-Item -Recurse -Force dist\"" } } ```
null
CC BY-SA 4.0
null
2023-01-17T15:22:55.890
2023-01-17T15:22:55.890
null
null
8,188,846
null
75,148,802
2
null
28,031,021
0
null
Go to Tools > Deployment > Configuration > Connection > Advanced and select: - - - It worked out for me! [Step by step image](https://i.stack.imgur.com/z9Cz6.png)
null
CC BY-SA 4.0
null
2023-01-17T15:39:29.973
2023-01-17T15:39:29.973
null
null
1,467,957
null
75,149,019
2
null
62,356,188
0
null
Although using the `spread` operator in combination with `push` or `splice` is terse and efficient, you will run into `stack overflow` errors for large arrays. So if your data set is expected to be large, either: 1. Always use concat. 2. Check the size and then conditionally either use the spread operator with push or splice, or concat for larger arrays. ``` const data1 = Array(1_000).fill('X') const data2 = Array(1_000_000).fill('X') // Spread will work, but only up to a certain size try { const target = [] target.push(...data1) console.log(target.length) } catch (e) { console.log(e.message) } // Spread will fail try { const target = [] target.push(...data2) console.log(target.length) } catch (e) { console.log(e.message) } // Concat will work try { const target = [] const newTarget = target.concat(data2) console.log(newTarget.length) } catch (e) { console.log(e.message) } // safeConcat will work try { const target = [] const maybeNewTarget = safeConcat(target, data2) console.log(maybeNewTarget.length) } catch (e) { console.log(e.message) } // A safe concat that uses the faster spread operator. function safeConcat(items, data) { // Max items will depend on your runtime if (data.length < 500_000) { items.push(...data) return items } else { return items.concat(data) } } ```
null
CC BY-SA 4.0
null
2023-01-17T15:55:53.357
2023-01-17T15:55:53.357
null
null
5,093,961
null
75,149,119
2
null
28,732,845
1
null
## For those who want to push this topic further I had a very similar problem, difference being that I wanted the legend to represent a custom shape (also created with `plot` and `fill_between`) by a rectangle with dashed line and filled (since the shape had this pattern). The example is shown in the following image: [](https://i.stack.imgur.com/O1IEl.png) The solution I found is to implement a custom legend handler following the Matplotlib [Legend guide](https://matplotlib.org/stable/tutorials/intermediate/legend_guide.html#implementing-a-custom-legend-handler). In particular, I implemented a class that defines a `legend_artist` method that allows you to customize the handler as much as you want by adding patches to a `handlebox` (or that is what I understood). I post a MWE with a rectangle instead of the blob shape (that takes a lot of space and will blurry the information). ``` import matplotlib.patches as mpatches import matplotlib.pyplot as plt class DashedFilledRectangleHandler: def legend_artist(self, legend, orig_handle, fontsize, handlebox): x0, y0 = handlebox.xdescent, handlebox.ydescent width, height = handlebox.width, handlebox.height patch_fill = mpatches.Rectangle((x0, y0), width, height, facecolor='tab:blue', linestyle='', alpha=0.1, transform=handlebox.get_transform()) patch_line = mpatches.Rectangle((x0, y0), width, height, fill=False, edgecolor='tab:blue', linestyle='--', transform=handlebox.get_transform()) handlebox.add_artist(patch_line) handlebox.add_artist(patch_fill) return patch_line fig, ax = plt.subplots() rectangle_fill = ax.add_patch(mpatches.Rectangle((0, 0), 2, 1, facecolor='tab:blue', edgecolor='tab:blue', linestyle='', alpha=0.1)) rectangle_line = ax.add_patch(mpatches.Rectangle((0, 0), 2, 1, fill=False, edgecolor='tab:blue', linestyle='--', lw=3)) ax.legend([rectangle_fill], ['Dashed filled rectangle handler'], handler_map={rectangle_fill: DashedFilledRectangleHandler()}) ax.set_xlim([-1, 3]) ax.set_ylim([-1, 2]) plt.show() ```
null
CC BY-SA 4.0
null
2023-01-17T16:04:28.410
2023-01-17T16:04:28.410
null
null
10,808,395
null
75,149,239
2
null
75,146,917
0
null
Yes, simply use the menu option of to insert a crosstab in the report header or footer. Select as the column field. Select as the field to summarize.
null
CC BY-SA 4.0
null
2023-01-17T16:14:51.213
2023-01-17T16:14:51.213
null
null
1,734,722
null
75,149,397
2
null
64,009,743
0
null
Just quoting an answer from the question itself as it wasn't obvious to me that there was a solution when I first scrolled down. > ...The problem and posting the solution in case someone has a similar problem. In my case the problem was not on the builder but on the linker that followed. The way I constructed the include files made my project too big and the linking time was taking for ever (over 11 hours). I had to manually change the host-linker to 64 bits (for some reason the default in my system was the 32 bit) and rearrange the includes and the problem was solved.
null
CC BY-SA 4.0
null
2023-01-17T16:26:40.500
2023-01-18T10:17:02.300
2023-01-18T10:17:02.300
446,477
446,477
null
75,149,454
2
null
75,145,006
0
null
It is related to nesting of data. You have two choices... 1. Flatten your JSON to be more friendly to the built in sorting. 2. Use sortFunction on the column to write a custom sort on how that column should be sorted.
null
CC BY-SA 4.0
null
2023-01-17T16:31:42.337
2023-01-17T16:31:42.337
null
null
502,366
null
75,149,485
2
null
75,149,198
1
null
Does it have to be regex? `substr` handles it in a simple manner: ``` SQL> with station (city) as 2 (select 'Zagreb' from dual union all 3 select 'Athens' from dual union all 4 select 'Rome' from dual union all 5 select 'Ottawa' from dual 6 ) 7 select distinct city 8 from station 9 where upper(substr(city, 1, 1)) not in ('A', 'E', 'I', 'O', 'U') 10 and upper(substr(city, -1)) not in ('A', 'E', 'I', 'O', 'U'); CITY ------ Zagreb SQL> ``` If you must use regex, then ``` 7 select distinct city 8 from station 9 where regexp_like(city, '^[^aeiou].*[^aeiou]$', 'i'); CITY ------ Zagreb SQL> ```
null
CC BY-SA 4.0
null
2023-01-17T16:34:00.723
2023-01-17T16:34:00.723
null
null
9,097,906
null
75,149,690
2
null
75,149,593
0
null
`List.remove(item)` removes the first occurrence of value from this list. So `numbers.remove(numbers.length);` is not removing the last number because `numbers.length` is always greater than the last number in the list by one. Instead, you should use `List.removeLast()`. ``` void onClickedMinus() { setState(() { numbers.removeLast(); }); } ```
null
CC BY-SA 4.0
null
2023-01-17T16:50:29.893
2023-01-17T16:50:29.893
null
null
14,891,973
null
75,149,829
2
null
75,139,342
0
null
There's a few errors with some of your extensions, I think the one causing you the biggest issue is this extension (or something similar with omi snippets): React/Redux/Typescript/Javascript/Omi snippets - try disabling this extension
null
CC BY-SA 4.0
null
2023-01-17T17:02:41.057
2023-01-17T17:02:41.057
null
null
13,463,062
null
75,149,999
2
null
75,149,149
0
null
I'm not sure to have fully understand, but I tried something with grid. Only 1 grid, not nested grid. I split your 1 block of 2 elements in 2 elements. You need 3 columns, I put 4 total, 3 first are auto (meaning auto fit), last 1 is fr, it will take the remaining space. Perhaps It's not eaxctly what you're looking, but it's a beginning, tell me... ``` .container { display: grid; grid-template-columns: auto auto auto 1fr; grid-template-rows: 1fr; border: 1px solid green; align-items: self-start; min-height: 48px; justify-content: left; } .trial { display: grid; } .switch__container { width: 56px; height: 48px; cursor: pointer; padding: 8px 5px 5px 5px; border: 1px solid orange; grid-column: span 3; } .switch__label-container { grid-row: span 2; } .switch__hint-container { grid-row: span 2; } ``` ``` <div class="container"> <label class="trial"> <div class="switch__container"> <input class="input" type="checkbox"/> <span class="switch"></span> </div> </label> <div class="switch__label-container"> <span class="switch__label"> {{ label }} </span> </div> <div class="switch__hint-container"> <span v-if="hint || $slots.hint" class="switch__hint"> <slot name="hint"> {{ hint }} </slot> </span> </div> </div> ```
null
CC BY-SA 4.0
null
2023-01-17T17:17:20.847
2023-01-17T17:17:20.847
null
null
19,996,700
null
75,150,089
2
null
75,138,635
0
null
Thank you for the response. I figured out the issue, it had nothing to do with my matplotlib/tkinter implementation. I just totally missed that I had a scope inheritance issue. The lists of 'time' and 'line1' are not persistent in the entire scope and therefore being rewritten to empty lists every time the 'graph_plotdata()' function is called. my solution is as follows: ``` timet = [] line1 = [] """----------Graph Updater-----------""" def graph_plotdata(): global B global a global graph1 global timet global line1 timet.append(next(index)) line1.append(B[0]) a.clear() a.plot(timet, line1) a.patch.set_facecolor("#f0f0f0") a.set_xlabel('time (Sec)') a.set_ylabel('pressure(kPa)') a.set_ylim(0,30) a.set_xlim(0,30) graph1.draw() ``` Hopefully this helps people in the future running into a similar issue!
null
CC BY-SA 4.0
null
2023-01-17T17:27:21.990
2023-01-17T17:27:21.990
null
null
21,021,905
null
75,150,159
2
null
75,149,593
0
null
The way your code is written the remove case will always fail. Let me explain why, your list is of length 0 at first and 1st add button will add 0 to the list. Next add button will add 1 to the list. Now, when you click on minus button the length is 2 but the list only contains [0,1]. So this will never work. Instead, you can write ``` void onClickedMinus() { setState(() { numbers.remove(numbers.length-1); }); //setState function is a function that we use to notify our state class that the data has changed } ``` this will delete the last element from the list.
null
CC BY-SA 4.0
null
2023-01-17T17:33:45.500
2023-01-17T17:33:45.500
null
null
11,814,358
null
75,150,254
2
null
75,144,727
0
null
There is an option to close or mute selected issues, you can use one of this options depending on what you need. Then, when using the filter `Issue state = "Open"` those won't show up in the list. Check this screenshot: [](https://i.stack.imgur.com/tNvHz.png) However, this will affect only the issue list, it doesn't affect the stats. Especially the `Crash-Free Users` because this information comes from Analytics and not from Crashlytics. Check this [response](https://stackoverflow.com/a/74468880) for reference.
null
CC BY-SA 4.0
null
2023-01-17T17:44:39.880
2023-01-17T17:44:39.880
null
null
4,044,241
null
75,150,410
2
null
59,295,889
0
null
``` @override Widget build(BuildContext context) { return Scaffold( body: Center( child: FutureBuilder<DocumentSnapshot<Map<String, dynamic>>>( future: FirebaseFirestore.instance .collection('users') .doc(FirebaseAuth.instance.currentUser!.uid) // Your document id change accordingly .get(), builder: (_, snapshot) { if (snapshot.hasError) return Text('Error = ${snapshot.error}'); if (snapshot.connectionState == ConnectionState.waiting) { return const Text("Loading"); } UserCheck data = UserCheck.fromJson( snapshot.data!.data()!) // Here you have to use fromJson method return Text(data.fName); // Your data parameter here }, )), ); } ``` Also refer: [How to use StreamBuilder and FutureBuilder for single and multiple documents](https://stackoverflow.com/a/75148843/13431819)`
null
CC BY-SA 4.0
null
2023-01-17T17:57:37.993
2023-01-17T20:28:43.970
2023-01-17T20:28:43.970
13,431,819
13,431,819
null
75,150,624
2
null
10,468,504
1
null
This is an old question but a common one which needs more up to date answer: It is the editor updating the content multiple times. First and foremost, it is advised to use `fs.watch` instead. However you may experience same problem with `fs.watch` but it does not fire same event multiple times for a single change, you get that because your editor is updating the file content multiple times. We can test this using a simple node server which writes to file when it receives a request: ``` const http = require('http'); const fs = require('fs'); const path = require('path'); const host = 'localhost'; const port = 3000; const file = path.join(__dirname, 'config.json'); const requestListener = function (req, res) { const data = new Date().toString(); fs.writeFileSync(file, data, { encoding: 'utf-8' }); res.end(data); }; const server = http.createServer(requestListener); server.listen(port, host, () => { fs.watch(file, (eventType, filename) => { console.log({ eventType }); }); console.log(`Server is running on http://${host}:${port}`); }); ``` Visit the server and observe the output. You will see it logs single event: ``` Server is running on http://localhost:3000 { eventType: 'change' } ``` If you edit the file in an editor like VSCode, you may see multiple events are logged. That is because editors tend to use stream API for efficiency and read and write files in chunks which causes the change event fired multiple times depending on the chunk size and the file length. Since file has the same stats, you can use it to eliminate the duplicate event: ``` let lastModified; fs.watch(file, (eventType, filename) => { stat(file).then(({ mtimeMs }) => { if (lastModified !== mtimeMs) { lastModified = mtimeMs; // Do your work here! It will run once! console.log({ eventType, filename }); } }); }); ``` Check this anwswer to see how you can use it with other fs methods: [https://stackoverflow.com/a/75149864/7134134](https://stackoverflow.com/a/75149864/7134134)
null
CC BY-SA 4.0
null
2023-01-17T18:17:59.070
2023-01-18T11:34:47.073
2023-01-18T11:34:47.073
7,134,134
7,134,134
null
75,150,855
2
null
75,132,630
0
null
If the formatting, amount and interval of the labels is static, you can use variables from outside of the chart. For example: ``` const labels = []; let labelIndex = 0; for (let i = -6; i < 7; i++) { labels.push(i); } Highcharts.stockChart('container', { xAxis: { ..., labels: { formatter: function() { labelIndex++; if (this.isFirst) { labelIndex = 0; } const label = labels[labelIndex]; if (label < 0) { return label + 'm'; } else if (label === 0) { return 'T-' + label; } return '+' + label + 'm'; } } }, ... }); ``` --- [http://jsfiddle.net/BlackLabel/L7uy29kw/](http://jsfiddle.net/BlackLabel/L7uy29kw/) [https://api.highcharts.com/highstock/xAxis](https://api.highcharts.com/highstock/xAxis)
null
CC BY-SA 4.0
null
2023-01-17T18:38:55.377
2023-01-17T18:38:55.377
null
null
8,951,377
null
75,150,927
2
null
75,150,926
0
null
My understanding of , based on the presentation linked in the question, is that they are a from a point to a line. That is, a scalar whose absolute value is the distance from the point to the line, and is positive if the point and the origin are on the opposite sides of the line, negative if they are on the same side. [](https://i.stack.imgur.com/IVztv.png) How you calculate that distance, and why it works, I can't explain it in formal terms, but [this](https://guide.handmadehero.org/code/day044/) video by Casey M. can point you in the right direction. Use it to understand how the dot product relate to the lengths of the two input vectors and come back. You can use this image as a reference: [](https://i.stack.imgur.com/KUgDa.png) To check if two points are on the opposite sides of a line, just check whether their s have the same sign. Do that for both sets of points and line, and you know if the lines are intersecting. How do you find those values? Well, for the line defined by and , you are basically looking for a that describes how much of the length of you should take to place the new point; and that's exactly what those instructions are doing. [](https://i.stack.imgur.com/jkA83.png) Note that in the picture, and so . Try to convince yourself that those last two assignments are equivalent to that in the picture. Here's my version of the pseudocode, with type annotations: ``` lines_intersect :: (p1: Vector2, p2: Vector2, q1: Vector2, q2: Vector2) -> bool, float, float { intersection_found: bool = false; p_alpha: float = 0; q_alpha: float = 0; q_normal: Vector2 = { q2.y - q1.y, q1.x - q2.x }; p1_wec: float = dot_product(q_normal, p1 - q1); p2_wec: float = dot_product(q_normal, p2 - q1); if p1_wec * p2_wec <= 0 { p_normal: Vector2 = { p2.y - p1.y, p1.x - p2.x }; q1_wec: float = dot_product(p_normal, q1 - p1); q2_wec: float = dot_product(p_normal, q2 - p1); if q1_wec * q2_wec <= 0 { intersection_found = true; p_alpha = p1_wec / (p1_wec - p2_wec); q_alpha = q1_wec / (q1_wec - q2_wec); } } return intersection_found, p_alpha, q_alpha; } ```
null
CC BY-SA 4.0
null
2023-01-17T18:45:24.213
2023-01-17T18:45:24.213
null
null
13,045,830
null
75,151,163
2
null
75,149,007
0
null
You can open each book through it's link within the [website](https://www.springer.com/series/136/books) in a seperate [tab](https://stackoverflow.com/a/53327494/7429447) and after [switching](https://stackoverflow.com/a/51893230/7429447) to the new tab you need to induce [WebDriverWait](https://stackoverflow.com/a/59130336/7429447) for the [visibility_of_element_located()](https://stackoverflow.com/a/50474905/7429447) and you can extract any of the desired info. As an example to extract the you can use the following [locator strategies](https://stackoverflow.com/a/48056120/7429447): - Code Block:``` driver.get('https://www.springer.com/series/136/books') WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "button[data-cc-action='accept']"))).click() hrefs = [my_elem.get_attribute("href") for my_elem in WebDriverWait(driver, 20).until(EC.visibility_of_all_elements_located((By.CSS_SELECTOR, "a[data-track='click'][data-track-label^='article'][href]")))] for href in hrefs: main_window = driver.current_window_handle driver.execute_script("window.open('" + href +"');") WebDriverWait(driver, 5).until((EC.number_of_windows_to_be(2))) windows_after = driver.window_handles new_window = [handle for handle in windows_after if handle != main_window][0] driver.switch_to.window(new_window) print(WebDriverWait(driver, 5).until(EC.visibility_of_element_located((By.XPATH, "//span[text()='Hardcover ISBN']//following::span[@class='c-bibliographic-information__value']"))).text) driver.close() driver.switch_to.window(main_window) driver.quit() ``` - Console Output:``` 978-3-031-25631-8 978-3-031-19706-2 978-3-031-13378-7 978-3-031-00941-9 978-3-031-14204-8 978-3-030-56692-0 978-3-030-73838-9 978-3-030-71249-5 978-3-030-35117-5 978-3-030-59241-7 ```
null
CC BY-SA 4.0
null
2023-01-17T19:08:35.050
2023-01-17T19:17:48.270
2023-01-17T19:17:48.270
7,429,447
7,429,447
null
75,151,178
2
null
75,149,007
0
null
For this easy task you can use both Selenium and BeautifulSoup, but the latter is easier and faster so let's use it to get title and E-ISBN codes. First install BeautifulSoup with the command `pip install beautifulsoup4`. ## Method 1 (faster): get E-ISBN directly from books list Notice that in the books list for each book there is an eBook link, which is something like `https://www.springer.com/book/9783031256325` where `9783031256325` is the EISBN code without the `-` characters. [](https://i.stack.imgur.com/67EGYm.png) So we can get the EISBN codes directly from those urls, without the need to load a new page for each book: ``` import requests from bs4 import BeautifulSoup url = 'https://www.springer.com/series/136/books' soup = BeautifulSoup(requests.get(url).text, "html.parser") titles = [title.text.strip() for title in soup.select('.c-card__title')] EISBN = [] for a in soup.select('ul:last-child .c-meta__item:last-child a'): c = a['href'].split('/')[-1] # a['href'] is something like https://www.springer.com/book/9783031256325 EISBN.append( f'{c[:3]}-{c[3]}-{c[4:7]}-{c[7:12]}-{c[-1]}' ) # insert four '-' in the number 9783031256325 to create the E-ISBN code for i in range(len(titles)): print(EISBN[i],titles[i]) ``` Output ``` 978-3-031-25632-5 Random Walks on Infinite Groups 978-3-031-19707-9 Drinfeld Modules 978-3-031-13379-4 Partial Differential Equations 978-3-031-00943-3 Stationary Processes and Discrete Parameter Markov Processes 978-3-031-14205-5 Measure Theory, Probability, and Stochastic Processes 978-3-030-56694-4 Quaternion Algebras 978-3-030-73839-6 Mathematical Logic 978-3-030-71250-1 Lessons in Enumerative Combinatorics 978-3-030-35118-2 Basic Representation Theory of Algebras 978-3-030-59242-4 Ergodic Dynamics ``` ## Method 2 (slower): get E-ISBN by loading a page for each book This method load the details page for each book and extract from there the EISBN code: ``` soup = BeautifulSoup(requests.get(url).text, "html.parser") books = soup.select('a[data-track-label^="article"]') titles, EISBN = [], [] for book in books: titles.append(book.text.strip()) soup_book = BeautifulSoup(requests.get(book['href']).text, "html.parser") EISBN.append( soup_book.select('p:has(span[data-test=electronic_isbn_publication_date]) .c-bibliographic-information__value')[0].text ) ``` If you are wondering `p:has(span[data-test=electronic_isbn_publication_date])` select the parent `p` of the `span` having attribute `data-test=electronic_isbn_publication_date`.
null
CC BY-SA 4.0
null
2023-01-17T19:10:02.203
2023-01-18T07:49:53.640
2023-01-18T07:49:53.640
8,157,304
8,157,304
null
75,152,074
2
null
75,146,759
0
null
The answer was a great help in how to transform my axis. Initially produced the graph a slightly different way, but incorporated the same transformation of axis. However, I can't seem to get the legend to appear at the bottom of the graph with the following code. ``` inf_plot <- ggplot(data=data, aes(x=Day))+ geom_bar(aes(y=inf, fill="Influent conc"), stat = "identity", width=0.4, colour="red4", fill = "red4")+ ggtitle("Influent Microplastic Concentration \n and Influent Flow Rate")+ xlab("\n\nDay") + ylab("Microplastic Concentration (MPs/L)\n\n")+ geom_line(aes(y=flow*(50/800), colour="flow rate"), size = 1.4, colour ="blue4", group = 1)+ scale_fill_manual(values="red4") + scale_colour_manual(values="blue4") + scale_y_continuous(sec.axis = sec_axis(~.*800/50, name = "Inlet flow rate (L/s)\n\n"), limits = c(0,50)) inf_plot + theme(axis.text = element_text( size = 20, colour = "black"), plot.title = element_text (size =25, hjust = 0.5, vjust = 5, face = "bold"), axis.title = element_text (size = 20, face = "bold"), plot.margin =unit(c(1.5, 1.5, 1.5, 1.5), "cm"), legend.position = "bottom") ``` [enter image description here](https://i.stack.imgur.com/JHiwg.png)
null
CC BY-SA 4.0
null
2023-01-17T20:50:50.290
2023-01-17T20:50:50.290
null
null
21,027,458
null
75,152,154
2
null
75,152,111
0
null
This error message... ``` pip : The term 'pip' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1 + pip install -U PySide + ~~~ + CategoryInfo : ObjectNotFound: (pip:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException ``` ...implies that system was unable to locate `pip`. --- ## Solution This error is shown on [windows](/questions/tagged/windows) when user tries to use `pip` in the command prompt. To address this error on windows [os](/questions/tagged/os) you need to add the path of the to the system `Path` variable. To see a list of things you can do with `pip`, you can execute the command on your terminal: ``` py -m pip ``` --- Additionally, you may need to upgrade [pip](https://pip.pypa.io/en/stable/) as follows: ``` python -m pip install --upgrade pip ``` Then you can simply install or upgrade the [Selenium Python bindings](https://pypi.org/project/selenium/) as follows: ``` pip install -U selenium ```
null
CC BY-SA 4.0
null
2023-01-17T21:00:10.397
2023-01-17T22:17:41.523
2023-01-17T22:17:41.523
63,550
7,429,447
null
75,152,242
2
null
65,454,186
0
null
I will suggest you follow the link mentioned in this blog post to have python installed and working with Visual Studio Code. [https://techdirectarchive.com/2023/01/17/getting-started-with-python-automation-in-windows-with-visual-studio-code/](https://techdirectarchive.com/2023/01/17/getting-started-with-python-automation-in-windows-with-visual-studio-code/) Microsoft recommends installing python from the Microsoft Store. since installing from the Microsoft Store uses the basic Python3 interpreter, and handles the set-up of your PATH settings for the current user (avoiding the need for admin access), in addition to providing automatic updates.
null
CC BY-SA 4.0
null
2023-01-17T21:10:00.690
2023-01-17T21:10:00.690
null
null
7,836,086
null
75,152,281
2
null
75,152,131
2
null
You just need to set the color/fill with a value in the `aes`, then use a scale function to set the color and create a legend. Here, we move the `color=` and `fill=` values from the bar and line into the `aes`. Then we add `scale_fill/color_manual` functions that set the color based on those names: ``` library(dplyr) library(ggplot2) library(ggrepel) df <- data.frame(day = as.character(seq(from = 1, to = 100, by = 1)), total = rbinom(n=100,30,0.5), prop = runif(100)) df <- df %>% arrange(df, by = day) df$`percentage` <- scales::label_percent(accuracy = 0.01)(df$prop) ggplot(data = df, aes(x = day, y = total)) + geom_bar(aes(x = day, y = total, fill = "Total"), stat = "identity", width = 0.35) + geom_line(data = df, aes(x = day, y = (prop)*15, group = 1, color = 'Percentage'), size = 1,inherit.aes = TRUE) + scale_y_continuous( labels = function(x) format(x, scientific = FALSE), #breaks = seq(from = 0, to = 10000000,by = 100000), sec.axis = sec_axis(trans = ~./15, name = "Secondary axis", breaks = seq(from = 0, to = 10, by = 0.1), scales::percent))+ theme(axis.text.x = element_text(angle = 90, vjust = 0.5))+ geom_label_repel(data=df[nrow(df),], aes(x = day, y = prop*15, label = round(prop*100,2)), color = 'red', nudge_x = 2, segment.alpha = 0.5) + scale_x_discrete(expand = expansion(add = c(0, 7))) + scale_fill_manual(values=c('Total' = 'lightgreen', 'Percentage'='red'), drop=TRUE, name='') + scale_color_manual(values=c('Total' = 'lightgreen', 'Percentage'='red'), drop=TRUE, name='') ``` [](https://i.stack.imgur.com/DCD5C.png) If, for some reason, the `drop` argument isn't working and both colors show up in both scales, there's really no reason to include them in the scale if they're not expected to be there. Just only include the colors in the scale that are desired: ``` scale_fill_manual(values=c('Total' = 'lightgreen'), drop=TRUE, name='') + scale_color_manual(values=c('Percentage'='red'), drop=TRUE, name='') ```
null
CC BY-SA 4.0
null
2023-01-17T21:14:13.110
2023-01-24T16:30:54.557
2023-01-24T16:30:54.557
8,366,499
8,366,499
null
75,152,567
2
null
75,139,088
0
null
There is several problems in your code: 1. You are creating a new figure object (containing the grid of subplots) in every loop iteration, so the plots from different iterations will end up in different figures. Move the plt.subplots command before the loop. 2. In order to plot onto the axis of a different row in each loop iteration, you need an axis index that starts at zero (that is, indexing the first row) and is incremented in each iteration. With these changes, your code becomes: ``` l=150 m=300 i = 75 j = 175 fig,axs = plt.subplots(ncols=3, nrows=3,figsize=(20,20)) ax_idx = 0 while i and j < 700 and l and m < 800 : # Select axis based on the axis index Data.zusi[i:j,75:175].plot.contourf(ax=axs[ax_idx,0]) print(i,j) # plt.show() Data.zusi[l:m,250:400].plot.contourf(ax=axs[ax_idx,1]) # plt.show() Data.zusi[l:m,450:600].plot.contourf(ax=axs[ax_idx,2]) # plt.show() i += 200 j += 200 l += 200 m += 200 # Increase the axis index ax_idx += 1 print(i,j) ``` Note that you could also simplify your code by using a for loop. I would also highly recommend using `xarray`'s capabilities for [label-based indexing](https://docs.xarray.dev/en/stable/user-guide/indexing.html#indexing-with-dimension-names), in this case `isel`. It makes the code a little bit more verbose, but much more understandable. ``` n_rows = 3 fig,axs = plt.subplots(ncols=3, nrows=n_rows, figsize=(20,20)) ax_idx = 0 for ax_idx in range(n_rows): # Compute the index values l = 150 + ax_idx * 200 m = 300 + ax_idx * 200 i = 75 + ax_idx * 200 j = 175 + ax_idx * 200 # Index array based on named dimensions and plot it Data.zusi.isel(x=slice(i, j), y=slice(75, 175)).plot.contourf(ax=axs[ax_idx, 0]) Data.zusi.isel(x=slice(l, m), y=slice(250, 400)).plot.contourf(ax=axs[ax_idx, 1]) Data.zusi.isel(x=slice(l, m), y=slice(450, 600)).plot.contourf(ax=axs[ax_idx, 2]) print(i,j) ```
null
CC BY-SA 4.0
null
2023-01-17T21:48:19.110
2023-01-17T21:48:19.110
null
null
10,201,982
null
75,152,577
2
null
75,152,038
1
null
If you want to use `outside = TRUE` in `annotation_logticks`, you also need to turn clipping off. From the docs for `?annotation_logticks` >      logical that controls whether to move the log ticks outside of the plot area. Default is off (FALSE). You will also need to use `coord_cartesian(clip = "off")` ``` gpl + annotation_logticks(sides="b", outside = TRUE) + coord_cartesian(clip = "off") ``` [](https://i.stack.imgur.com/MWbAa.png)
null
CC BY-SA 4.0
null
2023-01-17T21:49:53.187
2023-01-17T21:49:53.187
null
null
12,500,315
null
75,152,664
2
null
5,668,248
0
null
``` eventContent: function(arg) { var sln = arg.event.title.substring(0, 1); switch(sln) { case '1': arg.backgroundColor='#198754'; break; case '2': arg.backgroundColor='#adb5bd'; break; case '3': arg.backgroundColor='#ffc107'; break; case '4': arg.backgroundColor='#6f42c1'; break; default: // } } ```
null
CC BY-SA 4.0
null
2023-01-17T22:01:05.973
2023-01-18T18:53:20.510
2023-01-18T18:53:20.510
14,267,427
14,604,585
null
75,152,855
2
null
75,152,514
0
null
I am assmuming you are using pandas and there is an easier way to get a median of a specific column. try: ``` median_income = df['median_income'].median() print(median_income) ``` Let me know if it works and hope it helps!
null
CC BY-SA 4.0
null
2023-01-17T22:27:05.327
2023-01-17T22:27:05.327
null
null
18,261,323
null
75,153,096
2
null
22,629,152
0
null
Build -> Clean Project and then Build -> Rebuild Project worked for me.
null
CC BY-SA 4.0
null
2023-01-17T23:01:41.560
2023-01-17T23:01:41.560
null
null
668,962
null
75,153,969
2
null
16,289,540
-1
null
I know this is an old thread, but was looking for something that would Uppercase only the cells I selected (Horizontal, vertical, selected cells with gaps, or any combination). Finally made something that works for me that I put on the ribbon and with a drag select cells, click macro button gets all caps! (If needing entire worksheet caps, there is better methods like UsedRange, but for just a specific small selected range this works great). For the original example I would drag select B4:E7 then click the ribbon macro button "All_Caps" and the rest of the worksheet would stay unchanged. ``` Sub All_Caps() Dim rng As Range Dim cell As Range Dim addr As String addr = Selection.Address Set rng = Range(addr) For Each cell In rng cell.Value = UCase(cell) Next cell End Sub ```
null
CC BY-SA 4.0
null
2023-01-18T01:49:10.800
2023-01-18T07:24:14.593
2023-01-18T07:24:14.593
2,227,743
21,032,168
null
75,154,114
2
null
27,403,285
0
null
In VS2022 you can't set a BreakPoint on a variable declaration without an assignment. Set a BreakPoint on a variable declaration with an assignment or another line that is executable.
null
CC BY-SA 4.0
null
2023-01-18T02:17:41.610
2023-01-18T02:17:41.610
null
null
495,455
null
75,154,444
2
null
75,151,468
1
null
This worked for me, try it. It is milliseconds: ``` * url 'https://httpbin.org/get' * method get * assert responseTime < 2000 ``` Refer docs: [https://github.com/karatelabs/karate#responsetime](https://github.com/karatelabs/karate#responsetime) That said, I personally don't recommend this kind of assertions in your tests. That's what performance testing is for: [https://github.com/karatelabs/karate/tree/master/karate-gatling](https://github.com/karatelabs/karate/tree/master/karate-gatling)
null
CC BY-SA 4.0
null
2023-01-18T03:32:59.907
2023-01-18T03:32:59.907
null
null
143,475
null
75,154,614
2
null
71,080,518
0
null
With the newest android installer "android-studio-2022.1.1.19-windows" there would be a jbr and jre folder existing, hence creating a link from jre to jbr would not work. What you can do is copy the contents of the items in jbr into the jre folder and this would resolve the error.
null
CC BY-SA 4.0
null
2023-01-18T04:13:49.857
2023-01-18T04:13:49.857
null
null
12,364,126
null
75,154,865
2
null
75,137,040
0
null
I reproduced your issue about the 401 error. [](https://i.stack.imgur.com/Mp18J.png) In my side it's related with the `SigningCredentials` defined in the `SecurityService` and the `IssuerSigningKey` defined in `Program.cs`. You used `RandomNumberGenerator.GetBytes(128)` to generate a `Key` and use it to set `SigningCredentials` and define the `IssuerSigningKey`. And when I used a hardcode Key, it worked for me. I used `IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes("ThisismySecretKey"))` in the `Program.cs` and `SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(Encoding.UTF8.GetBytes("ThisismySecretKey")), SecurityAlgorithms.HmacSha512Signature)` in `SecurityService`. [](https://i.stack.imgur.com/QOfcj.png) Therefore, I compared the value of the key used in `Program.cs` and `SecurityService`, I found they don't have the same value. So I recommend you trying to hardcode the key first for testing, then check if it worked for you. [](https://i.stack.imgur.com/gGbt0.png)
null
CC BY-SA 4.0
null
2023-01-18T05:01:26.860
2023-01-18T05:01:26.860
null
null
14,574,199
null
75,154,908
2
null
75,154,675
1
null
Sorry for bothering you, I feel so stupid now, I just placed structures in the wrong order. It seems that structures couldn't access info from another. Still thanks for your response)
null
CC BY-SA 4.0
null
2023-01-18T05:08:06.797
2023-01-18T05:08:06.797
null
null
18,431,793
null
75,154,907
2
null
75,152,605
1
null
You can't. Instead of changing better you display your custom dialog before requesting permission to explain you the purpose of permission You can check this link [https://developer.android.com/training/permissions/requesting.html](https://developer.android.com/training/permissions/requesting.html) > Note: Your app cannot customize the dialog that appears when you call launch(). To provide more information or context to the user, change your app's UI so that it's easier for users to understand why a feature in your app needs a particular permission. For example, you might change the text in the button that enables the feature.Also, the text in the system permission dialog references the permission group associated with the permission that you requested. This permission grouping is designed for system ease-of-use, and your app shouldn't rely on permissions being within or outside of a specific permission group. [Example Custom Dialog Permission](https://i.stack.imgur.com/3JTiU.png)
null
CC BY-SA 4.0
null
2023-01-18T05:07:58.940
2023-01-18T05:07:58.940
null
null
8,371,128
null