Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
74,080,841
2
null
74,080,313
1
null
Thank you very much, especially to Adam Quek for the correct solution! "geom_col is the same as geom_bar(stat="identity"). If you want the bar plot to plot the mean for each group, use geom_bar(stat="summary") instead"
null
CC BY-SA 4.0
null
2022-10-15T15:43:50.143
2022-10-15T15:43:50.143
null
null
20,249,255
null
74,080,871
2
null
59,617,766
0
null
Manage -> Setting -> open json ``` "editor.fontLigatures": true, "editor.fontFamily": "'cascadia code',Consolas, 'Courier New', monospace", ``` font Link: [https://github.com/microsoft/cascadia-code/releases/latest](https://github.com/microsoft/cascadia-code/releases/latest)
null
CC BY-SA 4.0
null
2022-10-15T15:48:25.247
2022-10-15T15:51:04.310
2022-10-15T15:51:04.310
20,249,875
20,249,875
null
74,081,048
2
null
69,715,520
0
null
I had a self-inflicted case. i deleted the line ``` app.set('views', path.join(__dirname, 'views')); app.set('view engine', 'jade'); ``` in file app.js and it worked. You can try, Good luck!
null
CC BY-SA 4.0
null
2022-10-15T16:08:09.857
2022-10-15T16:10:01.510
2022-10-15T16:10:01.510
16,171,716
16,171,716
null
74,081,698
2
null
74,076,041
1
null
- `axf:initial-letters`[https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#axf.initial-letters](https://www.antenna.co.jp/AHF/help/en/ahf-ext.html#axf.initial-letters)- `space-before``fo:block-container`- `line-height.conditionality="discard"``fo:initial-property-set`- `axf:baseline-grid="new"``fo:block`- `fo:block-container``fo:block` [](https://i.stack.imgur.com/8nmVm.png) ``` <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" line-height="1.8" font-size="24pt" line-stacking-strategy="font-height"> <fo:layout-master-set> <fo:simple-page-master master-name="pages"> <fo:region-body margin-left="1in" margin-right="1in" margin-top="1in" margin-bottom="1in" /> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="pages"> <fo:flow flow-name="xsl-region-body" axf:baseline-grid="new"> <fo:block space-after="2lh" axf:initial-letters="2"> <fo:external-graphic src="logo-antenna-200x200.png"/>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> <fo:block space-after="2lh" axf:initial-letters="2"> <fo:external-graphic src="logo-antenna-200x200.png"/>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> </fo:flow> </fo:page-sequence> <fo:page-sequence master-reference="pages"> <fo:flow flow-name="xsl-region-body" line-height.conditionality="discard"> <fo:block space-after="2lh"> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-1</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> <fo:block space-after="2lh"> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black" space-before="(1lh - 1em) div 2" space-before.conditionality="retain"> <fo:block>FLOAT-2</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> </fo:flow> </fo:page-sequence> <fo:page-sequence master-reference="pages"> <fo:flow flow-name="xsl-region-body" line-height.conditionality="discard"> <fo:block space-after="2lh"><fo:initial-property-set line-height.conditionality="discard" /> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-1</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> <fo:block space-after="2lh"><fo:initial-property-set line-height.conditionality="discard" /> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-2</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> </fo:flow> </fo:page-sequence> <fo:page-sequence master-reference="pages"> <fo:flow flow-name="xsl-region-body"> <fo:block space-after="2lh" axf:baseline-grid="new"> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-1</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> <fo:block space-after="2lh" axf:baseline-grid="new"> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-2</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> </fo:flow> </fo:page-sequence> <fo:page-sequence master-reference="pages"> <fo:flow flow-name="xsl-region-body" line-height.conditionality="discard"> <fo:block space-after="2lh"> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-1</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> <fo:block-container space-after="2lh"> <fo:block> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-2</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> </fo:block-container> </fo:flow> </fo:page-sequence> </fo:root> ``` --- Another alternative that uses `text-altitude`: ``` <fo:page-sequence master-reference="pages"> <fo:flow flow-name="xsl-region-body"> <fo:block space-after="2lh" text-altitude="0"> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block line-height.conditionality="discard">FLOAT-1</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> <fo:block space-after="2lh" text-altitude="0"> <fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block line-height.conditionality="discard">FLOAT-2</fo:block> </fo:block-container> </fo:float>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> </fo:flow> </fo:page-sequence> ``` --- `<fo:inline line-height.conditionality="discard">` around the `fo:float`: ``` <fo:page-sequence master-reference="pages"> <fo:flow flow-name="xsl-region-body"> <fo:block line-height.conditionality="discard" space-after="2lh"> <fo:inline line-height.conditionality="discard"><fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-1</fo:block> </fo:block-container> </fo:float></fo:inline>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> <fo:block line-height.conditionality="discard" space-after="2lh"> <fo:inline line-height.conditionality="discard"><fo:float float="start"> <fo:block-container inline-progression-dimension="20%" background-color="yellow" border="1px solid black"> <fo:block>FLOAT-2</fo:block> </fo:block-container> </fo:float></fo:inline>Torem dolor amet adipisicing sed eiusmod incididunt labore dolore aliqua enim minim quis exercitation laboris ut ex commodo Duis irure in in velit cillum eu nulla Excepteur occaecat non sunt.</fo:block> </fo:flow> </fo:page-sequence> ``` The `fo:inline` is aligned with the dominant alphabetic baseline, and the `fo:float` is aligned with the top of the `fo:inline`. It's not clear to me why `line-height.conditionality="discard"` should work on the `fo:inline`, but it does.
null
CC BY-SA 4.0
null
2022-10-15T17:40:26.350
2022-10-18T20:23:38.187
2022-10-18T20:23:38.187
4,092,205
4,092,205
null
74,082,012
2
null
74,081,925
1
null
I think this is what you're looking for? ``` w = [1, 2, 3, 4] w[-1], w[:-1] = w[0], w[1:] print(w) # [2, 3, 4, 1] ``` It's not exactly a left "byte" shift, more like a left element shift.
null
CC BY-SA 4.0
null
2022-10-15T18:28:03.427
2022-10-15T19:37:22.780
2022-10-15T19:37:22.780
3,494,774
13,956,730
null
74,082,290
2
null
29,659,404
0
null
You can define your own `setTimeout` function inside the Google Apps ``` function setTimeout(func, timeout) { // Logger.log("setTimeout"); var lock = LockService.getScriptLock(); lock.waitLock(timeout); func(); lock.releaseLock(); } function helloFun() { Logger.log("Hello world!"); } setTimeout(function() { helloFun(); }, 500); ```
null
CC BY-SA 4.0
null
2022-10-15T19:12:51.080
2022-10-15T19:12:51.080
null
null
1,524,350
null
74,082,512
2
null
74,081,925
0
null
If the list has exactly 4 values as in the example: ``` wrot = [w[1], w[2], w[3], w[0]] ``` or for any non-empty list: ``` wrot = w[1:] + [w[0]] ``` In the examples above a new list is created. There is also an option to rotate the list in-place: ``` w.append(w.pop(0)) # remove the first item and append it at the end ``` If there are many shifts and rotations to be made, use a [double-ended queue](https://docs.python.org/3/library/collections.html#collections.deque) instead of a list, it is much more efficient.
null
CC BY-SA 4.0
null
2022-10-15T19:48:27.917
2022-10-15T19:48:27.917
null
null
5,378,816
null
74,082,889
2
null
30,444,718
0
null
What fixed the problem of actual resolution is using size attribute in SKScene: ``` screenWidth = size.width screenHeight = size.height ```
null
CC BY-SA 4.0
null
2022-10-15T20:44:45.980
2022-10-15T20:44:45.980
null
null
10,883,928
null
74,082,918
2
null
72,983,521
0
null
First, try to decrease the confidence value (e.g conf 0.2) in the case you train the model with few epochs or few datasets then try to precise your image (try to use one image): --source /content/dataset/test/images/image_10_jpg.jpg and see how it goes
null
CC BY-SA 4.0
null
2022-10-15T20:48:27.250
2022-10-15T20:48:27.250
null
null
16,349,273
null
74,083,002
2
null
74,082,801
0
null
The simplest storage for such data is a text file: 6;80;125 8;107;166 ... To store data write them line by line delimited by ';'. To read data, read the file content line by line (or ReadAllText) then split each line by ';'.
null
CC BY-SA 4.0
null
2022-10-15T21:01:13.480
2022-10-15T21:01:13.480
null
null
19,547,514
null
74,083,230
2
null
74,065,510
0
null
The `System.Data.DataTable` and `DataGridView` are pure .net based classes not related to the Outlook object model. There is no direct conversion between them. If you need to build the message body based on the information in any .net class you must create a convertor which can translate the information into an HTML markup which Outlook understands. The [HTMLBody](https://learn.microsoft.com/en-us/office/vba/api/outlook.mailitem.htmlbody) property from the Outlook object model returns or sets a string representing the HTML body of the specified item. Setting the `HTMLBody` property will always update the `Body` property immediately.
null
CC BY-SA 4.0
null
2022-10-15T21:40:08.497
2022-10-15T21:40:08.497
null
null
1,603,351
null
74,083,240
2
null
74,083,223
0
null
Your current code is reasonably short and quite readable. Consider sticking with it. Alternatives include - `Array.from``randomNum`- ``` const randomNum = () => Math.floor(Math.random() * 256); const randomRGB = () => Array.from({ length: 3 }, randomNum); console.log(randomRGB()); ``` If you want to do this 6 times, then you might use another `Array.from`. ``` const randomNum = () => Math.floor(Math.random() * 256); const randomRGB = () => Array.from({ length: 3 }, randomNum); const randomSquares = numSquares => Array.from({ length: numSquares }, randomRGB); console.log(randomSquares(6)); ```
null
CC BY-SA 4.0
null
2022-10-15T21:42:17.877
2022-10-15T21:46:49.773
2022-10-15T21:46:49.773
9,515,207
9,515,207
null
74,083,263
2
null
74,083,223
0
null
You can simply grid a six digit hexadecimal number and then use them for your color. Like the following number for example: `#ffffff` (which is white) ``` function random hexColor() { return ((Math.random() * 0xfffff * 1000000).toString(16)).slice(0,6); } ```
null
CC BY-SA 4.0
null
2022-10-15T21:46:36.943
2022-10-15T21:46:36.943
null
null
15,298,697
null
74,083,399
2
null
74,080,661
0
null
Fixed it by my self somehow, not sure if it's correct way. Changed adding data to firestore to this ``` doc(db, `user/${uid}/${levelName}/${uid}/${taskIndex}/data`), ``` And update UI like this: ``` db,`user/${uid}/${currentLevelName}/${uid}/${tiList}`); ``` and then fire all tiList (which is task index state) on `GetUserData` useEffect, and also adding `level` dependency on tiList useEffect
null
CC BY-SA 4.0
null
2022-10-15T22:17:38.260
2022-10-15T22:17:38.260
null
null
20,243,014
null
74,083,436
2
null
74,023,464
0
null
Ran into the same issue. I was able to track it down to the version of `@types/node` being incompatible with the Vue version I was using. The following two Github issues helped me track down a solution: - [https://github.com/johnsoncodehk/volar/issues/1985](https://github.com/johnsoncodehk/volar/issues/1985)- [https://github.com/vuejs/core/pull/6855](https://github.com/vuejs/core/pull/6855) For me, the only solution that worked was to downgrade `@types/node` from the version I was on (`18.11.0`) to `18.8.0`, and this resolved the issues I had. There was mention of using a newer Vue version, however, I was testing with the latest released Vue version (and the same version that Volar was recommending be installed).
null
CC BY-SA 4.0
null
2022-10-15T22:27:59.477
2022-10-15T22:27:59.477
null
null
1,830,159
null
74,083,517
2
null
74,083,223
0
null
A simple approach: use the [hsl() color function](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value/hsl) and generate a random [Hue color](https://en.wikipedia.org/wiki/Color_wheel) (from 0 to 360) ``` const rand = (min, max) => ~~(Math.random() * (max - min) + min); document.querySelectorAll(".grid > div").forEach(elBox => { elBox.style.background = `hsl(${rand(0, 360)}, 100%, 50%)`; }); ``` ``` .grid { display: inline-grid; grid-template-columns: repeat(3, 1fr); } .grid > * { margin: 0.5rem; height: 3rem; width: 3rem; } ``` ``` <div class="grid"> <div></div><div></div><div></div> <div></div><div></div><div></div> </div> ``` The nice thing about it is that you only change the Hue (color), but the saturation and lightness remain the same for all your elements. Example with desaturated, darker colors: ``` const rand = (min, max) => ~~(Math.random() * (max - min) + min); document.querySelectorAll(".grid > div").forEach(elBox => { elBox.style.background = `hsl(${rand(0, 360)}, 70%, 30%)`; }); ``` ``` .grid { display: inline-grid; grid-template-columns: repeat(3, 1fr); } .grid > * { margin: 0.5rem; height: 3rem; width: 3rem; } ``` ``` <div class="grid"> <div></div><div></div><div></div> <div></div><div></div><div></div> </div> ``` Eventually you can generate also a random value in range for the Lightness and Saturation (0 to 100 %)
null
CC BY-SA 4.0
null
2022-10-15T22:45:15.267
2022-10-15T22:51:07.360
2022-10-15T22:51:07.360
383,904
383,904
null
74,084,261
2
null
54,151,351
0
null
I put the kafka folder under c: drive like C:\kafka_2 and also moved the properties files to the windows folder (because it was saying invalid input). Executed the command like : C:\kafka_2\bin\windows>zookeeper-server-start.bat zookeeper.properties, and it worked like magic
null
CC BY-SA 4.0
null
2022-10-16T02:42:29.307
2022-10-16T02:42:29.307
null
null
4,159,521
null
74,084,478
2
null
74,084,455
0
null
Use DataFrame.index and specify range from 1 to length(dataframe) + 1 ``` DF = pd.read_csv("path") DF.index = np.arange(1, len(DF) + 1) ```
null
CC BY-SA 4.0
null
2022-10-16T03:49:29.323
2022-10-16T03:49:29.323
null
null
18,690,536
null
74,084,481
2
null
74,084,455
0
null
You can set the index to whatever you like, but it's probably easier to index from 0 ``` >>> import pandas as pd >>> df = pd.DataFrame({"a": ["foo", "bar"]}) >>> df a 0 foo 1 bar >>> df.index = df.index + 1 >>> df a 1 foo 2 bar ```
null
CC BY-SA 4.0
null
2022-10-16T03:50:08.807
2022-10-16T03:50:08.807
null
null
4,541,045
null
74,084,572
2
null
7,190,898
0
null
``` #progressbar { background-color: #d4d4d4; border-radius: 13px; /* (height of inner div) / 2 + padding */ padding: 3px; } #progressbar>div { background-color: blue; width: 40%; /* Adjust with JavaScript */ height: 20px; border-radius: 10px; } ``` ``` <div id="progressbar"> <div></div> </div> ```
null
CC BY-SA 4.0
null
2022-10-16T04:14:51.583
2022-10-16T04:14:51.583
null
null
19,195,335
null
74,084,785
2
null
74,084,763
0
null
Not sure if this would help but, I usually do any of the steps below when I encounter that kind of Android Studio issue. - - - `.idea`- `.idea``.gradle` Afaik, deleting the generated folders is safe, it will just re-run all IDE and gradle configurations from the start.
null
CC BY-SA 4.0
null
2022-10-16T05:23:28.103
2022-10-16T05:23:28.103
null
null
19,023,745
null
74,085,011
2
null
74,084,981
1
null
It looks very common with holo date picker so you can try [holo date picker](https://pub.dev/packages/flutter_holo_date_picker) [](https://i.stack.imgur.com/GJ1KS.png)
null
CC BY-SA 4.0
null
2022-10-16T06:17:22.983
2022-10-16T06:17:22.983
null
null
6,163,011
null
74,085,216
2
null
74,083,987
0
null
Based on your error, you've imported `import 'dart:js';` on `gameover()`. remove this import and pass `Buildcontext` to the method like ``` void gameover(BuildContext context) { Navigator.push(context, MaterialPageRoute(builder: (context) => MyApp())); } ``` This context will import from `material.dart`, `cupertino.dart` or `widgets.dart` by default .
null
CC BY-SA 4.0
null
2022-10-16T07:09:44.477
2022-10-16T07:09:44.477
null
null
10,157,127
null
74,085,411
2
null
22,389,820
0
null
Actually you could look at ``` seriesTotal.BorderColor = Color.YourColor; seriesTotal.BorderWidth = 1; ```
null
CC BY-SA 4.0
null
2022-10-16T07:50:07.133
2022-10-16T07:50:07.133
null
null
20,253,967
null
74,086,176
2
null
22,680,954
0
null
I think you are looking for a tool like this: [https://axelstudios.github.io/7z/#!/](https://axelstudios.github.io/7z/#!/) In this online tool, you set your settings and then you get correspondent command line options and parameters.
null
CC BY-SA 4.0
null
2022-10-16T10:06:30.253
2022-10-16T10:06:30.253
null
null
11,055,271
null
74,086,229
2
null
74,086,036
0
null
You may try `SUMIFS()`. ``` =SUMIFS(D2:D,B2:B,H4) ```
null
CC BY-SA 4.0
null
2022-10-16T10:16:03.897
2022-10-16T10:16:03.897
null
null
5,514,747
null
74,086,273
2
null
16,268,913
0
null
I used this way: ``` uses IdStack, IdStackConsts; ``` ``` Result.ResponseCode:= -1; try Result.Content:= FHTTP.Get(Url); Result.ResponseCode:= FHTTP.ResponseCode; except on E: EIdSocketError do begin case e.LastError of Id_WSAETIMEDOUT: begin Result.ResponseCode:= 408; Result.Message:= 'زمان ارتباط به پایان رسید'; end; Id_WSAEACCES: begin Result.ResponseCode:= 403; Result.Message:= 'دسترسی وجود ندارد'; end; else begin Result.ResponseCode:= e.LastError; Result.Message:= e.Message; end; end; end; on E: Exception do Result.Content:= E.ClassName + ': ' + E.Message; end; ```
null
CC BY-SA 4.0
null
2022-10-16T10:25:17.660
2022-10-16T10:25:17.660
null
null
1,358,148
null
74,086,551
2
null
74,045,604
20
null
I had this too, it took me a long time to spot the very simple fix. If you look in the console you'll see that the maven project generation is in interactive mode. You just need to click Y (yes) in the console to confirm that you are happy with the configuration and it will finish.
null
CC BY-SA 4.0
null
2022-10-16T11:04:43.683
2022-10-16T11:05:48.877
2022-10-16T11:05:48.877
7,038,150
7,038,150
null
74,087,096
2
null
63,267,118
0
null
add a world environment node then create a new environment there is a setting called ambient light click on it then set the sky contribution to 0 then you can set the color of the light! add a directional light for shadows and shading
null
CC BY-SA 4.0
null
2022-10-16T12:26:00.443
2022-10-16T12:26:00.443
null
null
20,024,839
null
74,087,219
2
null
19,032,970
0
null
if set to `change` then `read` will automatically get checked
null
CC BY-SA 4.0
null
2022-10-16T12:45:42.633
2022-10-22T10:13:44.237
2022-10-22T10:13:44.237
1,501,497
8,553,184
null
74,087,254
2
null
74,071,991
0
null
There is currently an [open ticket](https://support.google.com/docs/thread/181758745) regarding Google Sheets recalculation. See if this array formula works better than your fill-down formula: `=arrayformula( true = isblank(Q2:Q) * (P2:P <> "COBRAR") )`
null
CC BY-SA 4.0
null
2022-10-16T12:51:00.607
2022-10-16T12:51:00.607
null
null
13,045,193
null
74,087,266
2
null
50,447,426
0
null
If you have a timestamp field, you can add a filter on timestamp and sort results by desc. Do not add a filter condition. [](https://i.stack.imgur.com/h3fqz.png)
null
CC BY-SA 4.0
null
2022-10-16T12:53:09.383
2022-10-18T02:40:11.483
2022-10-18T02:40:11.483
16,827,453
16,827,453
null
74,087,445
2
null
74,079,682
0
null
It seems to me that the issue is in your `np.where()` statement, likely with the `nan` values in Ma_multi_high producing the false statement in `df['volume'] > df['Ma_mult_high']` that result in 'red'. Try this: ``` df['C'] = np.where((df['spread'] > 60) & (df['volume'] > df['Ma_mult_high'].fillna(0)),'green','red') ```
null
CC BY-SA 4.0
null
2022-10-16T13:20:36.070
2022-10-16T13:20:36.070
null
null
17,142,551
null
74,087,624
2
null
70,740,045
0
null
We can additionally use WindowInsetsController for SDK > 30, have to add SDK check using IF or @Requires ``` window.insetsController?.apply { hide(WindowInsets.Type.navigationBars()) systemBarsBehavior = WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE //keeps hidden and on swipe transparent bars are shown } ```
null
CC BY-SA 4.0
null
2022-10-16T13:45:30.750
2022-10-16T13:45:30.750
null
null
7,873,768
null
74,087,716
2
null
74,084,763
0
null
I am really not sure about this problem, but i think it's IDE error. you can Clean Project and then Rebuild project. you will find it in Build tab. or you restarting Android Studio might solve your problem. last option : you have to remove every dependency then sync after paste every dependency again and sync. You must need internet connection do this step. I hope this will solve your error.
null
CC BY-SA 4.0
null
2022-10-16T13:56:17.037
2022-10-16T13:56:17.037
null
null
20,255,789
null
74,087,809
2
null
74,086,654
1
null
If you are OK with sf and Tidyverse / ggplot, this should get you bit closer, `nudge_x` and `nudge_y` let you control the position of each individual text. Though to fit Nakuru East to anywhere close to its borders you have to scale up the output image (a lot) and/or decrease font size. There's also [https://yutannihilation.github.io/ggsflabel/index.html](https://yutannihilation.github.io/ggsflabel/index.html) that provides few extra geoms for labelling sf data in ggplot, worth checking out if installing packages from github is also OK. ``` library(ggplot2) library(sf) library(dplyr) library(stringr) ke_subcounty <- st_read("ke_subcounty/ke_subcounty.shp") ke_subcounty %>% filter(county == "Nakuru") %>% mutate(sub = str_remove(subcounty, "\\s+Sub County"), sub = str_replace(sub, "\\s","\n")) %>% ggplot() + geom_sf(fill = "grey95", color = "grey90") + geom_sf_text( aes(label = sub), # KS Na NE NN Su Gi Mo KN NW Nj Ro nudge_x = c(0, 0, .2, 0, 0, 0, 0, 0, 0, 0, -.06), nudge_y = c(0, 0, 0, 0, -.06, 0, 0, -.05, 0, 0, -.05), fun.geometry = sf::st_centroid) + theme_bw() ``` ![](https://i.imgur.com/6R6s7D4.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2022-10-16T14:10:03.180
2022-10-18T04:43:34.070
2022-10-18T04:43:34.070
646,761
646,761
null
74,088,120
2
null
50,110,347
0
null
I've also faced this issue and solved it simply by adding the OpenCV bin path to the environment variable.
null
CC BY-SA 4.0
null
2022-10-16T14:57:12.473
2022-10-19T17:33:49.103
2022-10-19T17:33:49.103
13,253,010
14,574,885
null
74,088,971
2
null
69,482,919
1
null
In the Apache Kafka documentation, under the [Notable changes in 2.2.0](https://kafka.apache.org/documentation/#gettingStarted:%7E:text=The%20bin/kafka%2Dtopics.sh%20command%20line%20tool%20is%20now%20able%20to%20connect%20directly%20to%20brokers%20with%20%2D%2Dbootstrap%2Dserver%20instead%20of%20zookeeper.%20The%20old%20%2D%2Dzookeeper%20option%20is%20still%20available%20for%20now.%20Please%20read%20KIP%2D377%20for%20more%20information.) states that > `bin/kafka-topics.sh``--bootstrap-server` instead of zookeeper. The old `--zookeeper` option is still available for now. Please read KIP-377 for more information. (As of Apache Kafka 3.0.0 `--zookeper` flag was removed). It's unclear what version of Kafka you are using, but given that it accepted the flag `--bootstrap-server` then you're at least using 2.2.0 (probably < 3.0.0 given the dir name but not important for this question). If you're using `--bootstrap-server` then you want to be connecting to the port associated to the not Apache zookeper Recall that > The `bin/kafka-topics.sh` command line tool is now able to connect directly to brokers Therefore, typically port `9092` is used and so your command should be ``` ./bin/kafka-topics.sh --bootstrap-server localhost:9092 --create --topic test --partitions 3 --replication-factor 1 ``` --- However, `--zookeeper` is typically used with port `2181` since that's the port that Apache Zookeper tends to run on.
null
CC BY-SA 4.0
null
2022-10-16T16:43:52.470
2022-10-17T13:47:48.113
2022-10-17T13:47:48.113
5,506,988
5,506,988
null
74,088,983
2
null
74,088,925
3
null
First your code can't work at all because of several issues: - `information.append()``information`- `text` Then other errors - `l_name = ..`- ``` def read_information(file_name): l_name = [] l_nationality = [] l_age = [] with open(file_name) as file: for line in file: if not line.strip(): # skips empty line continue value = line.split(":")[1].strip() if line.startswith("Name"): l_name.append(value) if line.startswith("Nationality"): l_nationality.append(value) if line.startswith("Age"): l_age.append(value) return l_name, l_nationality, l_age ``` Execution would give ``` print(read_information("data.txt")) # (['John', 'Jack'], ['English', 'Spanish'], ['12', '15']) ``` --- Now you could do differently, with a dict ``` def read_information(file_name): result = {} with open(file_name) as file: for line in file: if not line.strip(): # skips empty line continue key, value = line.split(":") result.setdefault(key.strip(), []).append(value.strip()) return result ``` ``` print(read_information("data.txt")) # {'Name': ['John', 'Jack'], 'Nationality': ['English', 'Spanish'], 'Age': ['12', '15']} ```
null
CC BY-SA 4.0
null
2022-10-16T16:45:50.143
2022-10-21T10:57:47.750
2022-10-21T10:57:47.750
13,302
7,212,686
null
74,089,273
2
null
74,088,925
1
null
You can also use list comprehension and yield each list then do unpacking: ``` def read_information(file_name): with open(file_name) as file: information = file.read().splitlines() yield [info.split(':')[1] for info in information if 'Name' in info.split(':')[0]] yield [info.split(':')[1] for info in information if 'Nationality' in info.split(':')[0]] yield [info.split(':')[1] for info in information if 'Age' in info.split(':')[0]] l_name, l_nationality, l_age = read_information('file_name') print(l_name); print(l_nationality); print(l_age) # [' Anthony Hopkins', ' Ezequiel Ruiz', ' Gabriel Jesus', ' Kyllian mbappé', ' Diego Maradona'] # [' English', ' Spanish', ' Brazilian', ' French', ' Argentinian'] # [' 23', ' 39', ' 15', ' 27', ' 50'] ```
null
CC BY-SA 4.0
null
2022-10-16T17:23:40.347
2022-10-16T17:23:40.347
null
null
19,574,157
null
74,089,333
2
null
74,089,159
1
null
The main issue is you are calling `Home` inside the `pages`, similar like recursive thing, ``` final pages = [ Text(""), // use different widget instead of Home Add(), Setting(), ]; ```
null
CC BY-SA 4.0
null
2022-10-16T17:32:36.093
2022-10-16T17:32:36.093
null
null
10,157,127
null
74,089,365
2
null
58,867,974
0
null
I know this is an old question, but I wanted to highlight that having rigidbodies work with moving platforms can be extremely difficult, but one work around is to create isolated physics scenes to 'simulate' the train. In the physics scene, the train is not moving so your simulated player or rigidbody can easily walk around on it without sliding/rolling off. When the simulated player or rigidbody's position is updated, map this back to the real world with respect to the actual moving train. Here is an example of this kind of system in motion: [video](https://www.youtube.com/watch?v=O0_21aA4PxY&t=1s) Here is a link to the documentation about physics scenes: [unity multi-scene physics](https://docs.unity3d.com/Manual/physics-multi-scene.html)
null
CC BY-SA 4.0
null
2022-10-16T17:37:55.193
2022-10-16T17:37:55.193
null
null
5,066,697
null
74,089,431
2
null
31,275,829
0
null
If I understand the question correctly - ``` x = np.linspace(0,10,3) xs = np.array(np.meshgrid(x,x,x)) points = np.transpose(xs.reshape(3,-1)) points ```
null
CC BY-SA 4.0
null
2022-10-16T17:48:31.507
2022-10-16T17:49:34.260
2022-10-16T17:49:34.260
20,257,163
20,257,163
null
74,089,717
2
null
74,085,774
1
null
try like this: ``` ={A9:D, A9:D, A9:D, A9:D} ``` [](https://i.stack.imgur.com/qgeWk.png)
null
CC BY-SA 4.0
null
2022-10-16T18:27:59.627
2022-10-16T18:27:59.627
null
null
5,632,629
null
74,089,997
2
null
74,086,677
-1
null
delete all in range B9:B25 and use this in B9: ``` =INDEX(IFNA(VLOOKUP(A9:A25, Players!A2:B, 2, 0))) ```
null
CC BY-SA 4.0
null
2022-10-16T19:08:21.487
2022-10-16T19:08:21.487
null
null
5,632,629
null
74,090,072
2
null
48,063,067
0
null
## Create a render hook For images in the markdown, you can use a ‘render hook’. This is a file that describes/overrides how markdown images are handled. To use the above approach in the render hook you should create the following file: ``` /layouts/_default/_markup/render-image.html ``` … and put this logic inside: ``` {{ if (resources.GetMatch .Destination) }} <img src=" {{ ((resources.GetMatch .Destination).Fit `600x600 jpg Smart q50`).RelPermalink | safeURL }} " alt="{{ .Text }}" /> {{ end }} ``` Note that we use ‘.Destination’ for the source of the original image and ‘.Text’ for the alt text defined in the markdown. Once you added the render hook all images in your Hugo project can and will be resized. More info can be found at [Hugo Codex](https://hugocodex.org/blog/resize-all-images/) and in the [official docs](https://gohugo.io/templates/render-hooks/).
null
CC BY-SA 4.0
null
2022-10-16T19:19:51.260
2022-10-16T19:19:51.260
null
null
2,397,550
null
74,090,950
2
null
74,087,320
0
null
Into your method ``` .sort_values(by=['Below 30 Years'], ascending=False) ``` add the parameter `key=lambda col: col.astype('int')`: ``` .sort_values(by=['Below 30 Years'], ascending=False, key=lambda col: col.astype('int')) ``` --- You want to sort that column by the order, by the (dictionary) order.
null
CC BY-SA 4.0
null
2022-10-16T21:57:15.557
2022-10-16T22:58:03.917
2022-10-16T22:58:03.917
7,023,590
7,023,590
null
74,091,121
2
null
74,082,801
0
null
I agree with your point that an SQL database is probably an overkill for your use case. Here’s a relatively easy workaround. In Excel, press File, Save as, Text (tab delimited). Move that file into your C# project, add to the project, then right click in visual studio, Properties, set Build Action = Embedded Resource. Then write some C# to parse data from the tab-delimited file. Here’s an example. ``` sealed class Entry { public readonly double diameter, al, adn; Entry( string line ) { string[] fields = line.Split( '\t' ); if( fields.Length != 3 ) throw new ArgumentException(); diameter = double.Parse( fields[ 0 ], CultureInfo.InvariantCulture ); al = double.Parse( fields[ 1 ], CultureInfo.InvariantCulture ); adn = double.Parse( fields[ 2 ], CultureInfo.InvariantCulture ); } public static Entry[] loadTabSeparated( Stream stream ) { using var reader = new StreamReader( stream ); // Ignore the first row with column names reader.ReadLine(); // Parse the rest of the rows in the table List<Entry> list = new List<Entry>(); while( true ) { string? line = reader.ReadLine(); if( null == line ) break; list.Add( new Entry( line ) ); } return list.ToArray(); } } ``` Usage example: ``` static Entry[] loadEntries() { const string resourceName = "DefaultNamespace.someData.tsv"; var ass = Assembly.GetExecutingAssembly(); using var stm = ass.GetManifestResourceStream( resourceName ) ?? throw new ApplicationException( "Embedded resource is missing" ); return Entry.loadTabSeparated( stm ); } ``` If the text file is at least 100kb, and you want to save size of the binary, compress that resource file into GZip. The C# code only needs a single line of code to decompress on the fly, see `GZipStream` class. Also, since that data is immutable, you probably should not load it on every use, instead load it once, and keep the array in memory for as long as your app is running. For instance, you could cache in a `static readonly` field of some class.
null
CC BY-SA 4.0
null
2022-10-16T22:38:42.457
2022-10-16T22:38:42.457
null
null
126,995
null
74,091,161
2
null
74,083,071
0
null
OP needed to login first before using the rest of firebase's functions.
null
CC BY-SA 4.0
null
2022-10-16T22:48:14.723
2022-10-16T22:48:14.723
null
null
8,816,585
null
74,091,178
2
null
74,083,071
2
null
I wrote this code inside of the `nuxtconfig.js` and ``` hooks: { build: { done(builder) { builder.nuxt.options.buildDir const account = { email: process.env.NUXT_ENV_FIREBASE_EMAIL, password: process.env.NUXT_ENV_FIREBASE_PASSWORD } auth.signInWithEmailAndPassword(account.email, account.password).then(() => { db.collection('english').doc('english').get().then((response) => { fs.writeFile('lang/prueba.json', JSON.stringify(response.data(), null, 2), 'utf-8', (err) => { if (err) return console.log('An error happened', err) console.log('File fetched from {JSON} Placeholder and written locally!') }) }) }) .catch((error) => { console.log(error) }) } } } ``` JSON file in the lang folder ![json file in the lang folder](https://i.stack.imgur.com/OJTr3.png)
null
CC BY-SA 4.0
null
2022-10-16T22:51:18.523
2022-10-16T22:53:06.027
2022-10-16T22:53:06.027
8,816,585
16,899,587
null
74,091,270
2
null
25,398,995
0
null
The code for the disconnect button includes this: ``` socketComponent.Dispose(); ``` So the (and later) you try to connect the `socketComponent` it will have been disposed. , so remove that line from the code.
null
CC BY-SA 4.0
null
2022-10-16T23:14:35.190
2022-10-16T23:14:35.190
null
null
3,043
null
74,091,281
2
null
58,987,845
1
null
While inserting a node in a BST, either of the following two can happen: 1. The new node is the left child of the smallest node larger than itself 2. The new node is the right child of the largest node smaller than or equal to itself In order to find the smallest number that is larger than a given number, we can maintain a sorted container and perform binary search, which takes `O(logn)`. So this following implementation is of time complexity `O(nlogn)`, where `n` is the number of nodes in the tree. ``` #include <iostream> #include <set> #include <string> #include <unordered_set> int main(int argc, char* argv[]) { constexpr int kRoot = 0; std::set<int> numbers; std::unordered_set<int> left_occupied_numbers; numbers.insert(kRoot); int num_input, current; std::cin >> num_input; for (int i = 0; i < num_input; ++i) { std::cin >> current; // upper_bound will provide the smallest number that is // strictly greater to than the current number. auto it = numbers.upper_bound(current); if (it != numbers.end() && left_occupied_numbers.find(*it) == left_occupied_numbers.end()) { // Left child at this iterator is still empty, // so the current number can be inserted here. // Mark the left child as taken. left_occupied_numbers.insert(*it); } else { // Decrementing the iterator gives the largest number that is // smaller than (or equal to, if all number are not distinct) // the current number, so the current number can be inserted // as the right child of this number. --it; } // This iterator is where current number's parent is. std::cout << *it; if (i < num_input - 1) { std::cout << " "; } numbers.insert(current); } std::cout << std::endl; return 0; } ``` Sample run: ``` > ./run 7 19 3 5 25 21 -4 2 0 19 3 19 25 0 3 ```
null
CC BY-SA 4.0
null
2022-10-16T23:16:55.567
2022-10-16T23:28:41.687
2022-10-16T23:28:41.687
12,087,117
12,087,117
null
74,091,310
2
null
74,090,914
0
null
The database has a property called `pimage`, while your Java class has a field called `pimg`. Since the two names don't match, the Firebase SDK can't automatically map between them and raises an error. To remove the error, ensure your Java code and database use the same names for properties, i.e.: ``` public String getPimage(){ return pimg; } ... public void setPimage(String pimg){this.pimg = pimg;} ```
null
CC BY-SA 4.0
null
2022-10-16T23:23:51.350
2022-10-16T23:23:51.350
null
null
209,103
null
74,091,761
2
null
74,091,644
0
null
`e.oldValue` and `e.value` might return "unexpected" values, i.e., in Google Sheets a blank cell is "converted" to 0 when using the cell value in an arithmetic operation like a formula making an addition operation of cell A1 and A1 :`=A1+A2`. If a cell is blank and then it's edited, `e.oldValue` will return `undefined`, not 0. If a cell has a value, then it's cleared, `e.value` will return `undefined`. In JavaScript `+` binary operator has two "modes", as arithmetical addition operator and as a string concatenation operator. In order to prevent "weird" results, you might want to verify the data types or coerce the values to the desired data type. I.E: you might use `Number(value)` to convert `"4"` to `4`. You could use `isNaN(value)` to check if `value` is a number. Additionally, - - `onEdit` Related - [What exactly is Type Coercion in Javascript?](https://stackoverflow.com/q/19915688/1595451)- [Why does JavaScript handle the plus and minus operators between strings and numbers differently?](https://stackoverflow.com/q/24383788/1595451)
null
CC BY-SA 4.0
null
2022-10-17T01:19:40.887
2022-10-17T01:25:12.170
2022-10-17T01:25:12.170
1,595,451
1,595,451
null
74,092,550
2
null
22,756,281
0
null
``` .k-group.k-popup.k-reset { max-height: 350px !important; overflow:auto; } ```
null
CC BY-SA 4.0
null
2022-10-17T04:20:10.543
2022-10-17T04:20:10.543
null
null
6,013,064
null
74,093,189
2
null
9,516,324
1
null
Here's a solution without any additional libraries that I implemented in my code after going through a number of other similar StackOverflow questions and blog posts. It's in TypeScript, but remove the types and you have vanilla JavaScript. ``` drawWaveForm(audioBuffer: AudioBuffer, canvas: HTMLCanvasElement) { const canvasWidth = Math.floor(canvas.clientWidth); const canvasHeight = Math.floor(canvas.clientHeight); canvas.width = canvasWidth; canvas.height = canvasHeight; const context: CanvasRenderingContext2D | null = canvas.getContext('2d'); if (!context) return; const lineWidth = 1; const lineColor = '#ff67da'; const nrOfLinesPerPixel = 8; // This is our resolution, tweak for performance vs accuracy const nrOfLines = (nrOfLinesPerPixel * canvasWidth) / lineWidth; const lineGap = canvasWidth / nrOfLines; const leftChannelData = audioBuffer.getChannelData(0); // Float32Array describing left channel const sizeOfABucket = Math.floor(leftChannelData.length / nrOfLines); // Nr of data points to calculate each line const nrOfBuckets = Math.floor(leftChannelData.length / sizeOfABucket); let drawData = new Float64Array(nrOfLines); let maxDataValue = -1e4; // Uncomment to see how your buckets change according to lineWidth and nrOfLinesPerPixel // console.log({ // lineWidth, // nrOfLinesPerPixel, // nrOfLines, // lineGap, // dataLength: leftChannelData.length, // sizeOfABucket, // nrOfBuckets, // }); // Go through all buckets and calculate the mean value in each bucket. Thereafter normalize the data. // // Raw Data: 0.25 0.234 0.146 0.13 0.37 0.267 0.123 0.44 0.32 0.21 ... // Buckets: └──────── Bucket 0 ────────┘ └──────── Bucket 1 ────────┘ // │ │ // Mean: 0.166 0.272 ... // │ │ // Normalized: 0.49 0.66 ... // for (let bucketIndex = 0; bucketIndex < nrOfBuckets; bucketIndex++) { for (let bucketDataIndex = 0; bucketDataIndex < sizeOfABucket; bucketDataIndex++) { const dataIndex = bucketIndex * sizeOfABucket + bucketDataIndex; // Add upp every value in the bucket drawData[bucketIndex] += Math.abs(leftChannelData[dataIndex]); // Save the greatest value if (leftChannelData[dataIndex] > maxDataValue) { maxDataValue = leftChannelData[dataIndex]; } } // Get mean value of each bucket drawData[bucketIndex] /= sizeOfABucket; } // Because we have so much zero or near zero values in the audio data, the resulting averages of the data points are very small. // To make sure this visualization works for all audio files, we need to normalize the data. // Normalize the data --> change the scale of the data so that the loudest sample measure as maxDataValue. const multiplier = Math.pow(Math.max(...drawData), -maxDataValue); drawData = drawData.map((n) => n * multiplier); context.lineWidth = lineWidth; context.strokeStyle = lineColor; context.globalCompositeOperation = 'multiply'; // https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/globalCompositeOperation context.clearRect(0, 0, canvasWidth, canvasHeight); // Save current state of canvas before we translate, scale and draw, and restore once we're done context.save(); // Draw in the vertical middle of the canvas and scale all values (-1 to 1) to fit the canvas height context.translate(0, canvasHeight / 2); context.scale(1, canvasHeight / 2); // Draw all our lines context.beginPath(); for (let i = 0; i < drawData.length; i++) { const x = i * lineGap; const y = drawData[i]; context.moveTo(x, y); context.lineTo(x, y * -1); } context.stroke(); // Draw a line through the middle context.lineWidth = 0.5 / canvasHeight; context.beginPath(); context.moveTo(0, 0); context.lineTo(canvasWidth, 0); context.stroke(); context.restore(); } ``` [](https://i.stack.imgur.com/MBjaD.png)
null
CC BY-SA 4.0
null
2022-10-17T06:15:20.153
2022-10-17T06:15:20.153
null
null
11,763,719
null
74,093,452
2
null
74,093,427
0
null
Your 3rd column is of type `object`, meaning it is not an integer because it has a comma in it. You can treat the type `object` as type `string` or convert it to string, and remove the comma using the `str.replace(",","")` syntax, and then convert the string to integer.
null
CC BY-SA 4.0
null
2022-10-17T06:48:56.183
2022-10-17T06:48:56.183
null
null
20,027,126
null
74,093,548
2
null
30,684,613
1
null
I tried all, Invalidate Cache, Restart, Clean, and rebuild the project. Downgrading from SDK 33 to 30 also I did after searching. Nothing worked. In the end, I updated my Android Studio from Chipmunk to Dolphin. Everything is sorted now. So the final conclusion that worked for me is: Update the Android Studio
null
CC BY-SA 4.0
null
2022-10-17T06:59:00.567
2022-10-17T06:59:00.567
null
null
10,970,789
null
74,093,604
2
null
68,949,271
0
null
By using a Z-Stack and defining the frame, you can align the views inside by manipulating their frame using `.infinity` and setting the alignment to the desired outcome. For example in your scenario: ``` import SwiftUI struct SampleView: View { @State var image = Image(systemName: "person.circle.fill") var body: some View { ZStack { self.image .renderingMode(.original) .resizable() .aspectRatio(contentMode: .fill) .frame(width: 100, height: 100, alignment: .center) .clipShape(Circle()) .padding(1) Circle() .frame(width: 20, height:20) .foregroundColor(.green) .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .bottomTrailing) } .frame(width: 100, height: 100) } } ``` There are several ways to implement it but setting the frame and the alignment is required. Avoid using offset constants since this would not work the same everywhere, for example, in responsive resizing. [SampleView](https://i.stack.imgur.com/auYGQ.png)
null
CC BY-SA 4.0
null
2022-10-17T07:05:20.853
2022-10-19T18:56:48.890
2022-10-19T18:56:48.890
8,864,226
17,349,922
null
74,093,640
2
null
73,968,793
0
null
Install GDAL Enter the code in terminal --> ``` ogr2ogr -f "MySQL" MYSQL:"database_name,host=localhost,user=enter_username,password=enter_password,port=5432" -nln "name_of_the_file" -a_srs "EPSG:4326" QGIS_DATA/Data/NewLayers/school.shp-#filepath# ```
null
CC BY-SA 4.0
null
2022-10-17T07:08:23.280
2022-10-17T07:08:23.280
null
null
19,688,333
null
74,093,908
2
null
28,247,450
1
null
I had the same issue, the below solution work for me > Add the below lines in the firebase.json file (which you will find in your root folder) ``` "rewrites": [ { "source": "**", "destination": "/index.html" } ] ``` > Redeploy your application with command [](https://i.stack.imgur.com/ATpLB.png)
null
CC BY-SA 4.0
null
2022-10-17T07:37:58.643
2022-10-17T07:37:58.643
null
null
10,181,929
null
74,094,049
2
null
73,322,444
1
null
Make sure you set `ENABLE_JAVASCRIPT_CONTROLS: True` inside of `FEATURE_FLAGS` block in `config.py` file. So it must look like this: `config.py`: ``` ... FEATURE_FLAGS = { "ENABLE_JAVASCRIPT_CONTROLS": True } ... ```
null
CC BY-SA 4.0
null
2022-10-17T07:50:39.477
2022-10-17T07:50:39.477
null
null
5,869,447
null
74,094,309
2
null
74,091,618
0
null
You can set the `sections/subsections in toc` template to change to e.g. a square or plain numbered sections: ``` \documentclass{beamer} \usetheme{CambridgeUS} \setbeamertemplate{sections/subsections in toc}[square] %\setbeamertemplate{sections/subsections in toc}[sections numbered] \begin{document} \section{title} \begin{frame} \tableofcontents \end{frame} \end{document} ```
null
CC BY-SA 4.0
null
2022-10-17T08:14:27.157
2022-10-19T15:01:11.520
2022-10-19T15:01:11.520
2,777,074
2,777,074
null
74,094,689
2
null
74,085,774
0
null
To concat multiple arrays horizontally, we can use array literals `{arr1,arr2}`. To automate this process, we can use `REDUCE` to loop and accumulate the `arr` multiple times: ``` =REDUCE(arr,SEQUENCE(number_of_times_to_repeat-1),LAMBDA(a,c,{a,arr})) ``` ### Sample: To repeat `A9:D` three times, ``` =REDUCE(A9:D,SEQUENCE(2),LAMBDA(a,c,{a,A9:D})) ```
null
CC BY-SA 4.0
null
2022-10-17T08:48:21.500
2022-10-17T08:48:21.500
null
null
8,404,453
null
74,094,986
2
null
74,094,848
-1
null
It depends if you can use built-in functions of python such as sort(). If you can then you need an input to get all the values from the user. Apparently you are struggling on sorting them instead of retrieving them, in this case it is better to store them into lists (so your data looks like [4, 85, 3, 234, 45, ...]). Then you can use the sort() function to sort the list. After that you can do a ``` for in in range(len(listName)): print(listName[i]) ``` And you will have the output asked.
null
CC BY-SA 4.0
null
2022-10-17T09:13:42.057
2022-10-17T11:37:28.737
2022-10-17T11:37:28.737
20,261,562
20,261,562
null
74,095,056
2
null
74,094,848
0
null
Assuming you're taking user (keyboard) input, then you could do this: ``` indata = input('Enter some integers separated by space: ') print(*sorted(map(int, indata.split())), sep='\n') ``` ``` Enter some integers separated by space: 4 85 3 234 45 345 345 122 30 12 3 4 12 30 45 85 122 234 345 345 ``` What this does... Gets a string from the standard input. Split the string into tokens delimited by whitespace. Convert each token to an . Sort the output from the object and print
null
CC BY-SA 4.0
null
2022-10-17T09:19:45.257
2022-10-17T09:19:45.257
null
null
17,580,381
null
74,095,928
2
null
74,089,354
1
null
Figured it out. With `winreg` in python 1. ConnectRegistry, then 2. OpenKey with Flag KEY_READ, then 3. QueryValueEx with two arguments: the var you set at OpenKey and second argument the name of the key you want to retrieve, in my case "TaskbarAl" `TaskbarAl` values 0 = left 1 = center Thanks to @Jonathan Potter to pointing me in the direction of registry.
null
CC BY-SA 4.0
null
2022-10-17T10:32:10.417
2022-10-17T10:32:10.417
null
null
20,171,083
null
74,096,616
2
null
74,095,743
1
null
From my understanding, you would like the icon to be bigger than the default size, if that's the case, you will need to either change the size of the image using the font style `.font(.system(size: CGFloat(fontSize)))` or using the code below: ``` NavigationLink { CustomView() } label: { KFImage.url(URL(string: imageUrl)!) .placeholder { Image(systemName: "photo") .resizable() .frame(width: 80) } .fade(duration: 0.25) .onFailure { error in print("Load image error : \(error) = \(earthquakeDetail.imgUrl)") } .resizable() .aspectRatio(contentMode: .fill) } ``` A resizeable needs to be added to the placeholder because the second resizable will only work on the image once it has loaded. Hope this helps!
null
CC BY-SA 4.0
null
2022-10-17T11:31:29.780
2022-10-17T11:31:29.780
null
null
13,279,327
null
74,096,807
2
null
74,096,430
2
null
You can't, that's the whole point of using a hash. If someone forgot their password, then they should set a new one, ie you should implement some form of password reset functionality accordingly.
null
CC BY-SA 4.0
null
2022-10-17T11:49:37.820
2022-10-17T11:49:37.820
null
null
1,392,379
null
74,097,229
2
null
28,190,915
0
null
There are 2 methods to replicate a spreadhsheet table inside a userform. One method is using Spreadsheet Control. Right Click on a blank area in toolbox ---> Additional Controls ---> Microsoft Office Spreadsheet control This Embeds a spreadsheet control in the userform and use the following code as a sample to work with it ``` Sub UserForm_Initialize() Me.Spreadsheet1.Cells.Range("A1:I56").Value = ThisWorkbook.Worksheets("Sheet2").Range("A1:I56").Value End Sub ``` This method also has several benefits as it comes preloaded with multiple excel tools such as Cut, Copy, Paste, Sort, Filter etc. Another Method is a workaround which will come in handy if a whole spreadhseet is not necessary and just displaying some rows and columns are sufficient. This is made possible by using Multi Column ListBox. A brief description is already available in another stackoverflow discussion [VBA Excel Populate ListBox with multiple columns](https://stackoverflow.com/questions/47528558/vba-excel-populate-listbox-with-multiple-columns)
null
CC BY-SA 4.0
null
2022-10-17T12:23:52.167
2022-10-17T12:23:52.167
null
null
8,928,058
null
74,097,593
2
null
74,086,677
0
null
Thanks. This does the same as I had before though. It populates the cell to the left with the players name. I was hoping to enter the ID in A25 & then it would get the name and the ID and move them up to the next available line in the list. So like Player 1 would go to line A& B9, Player two would move to A & B10 etc. Is that possible? Thanks again for responding. Mark
null
CC BY-SA 4.0
null
2022-10-17T12:50:39.587
2022-10-17T12:50:39.587
null
null
20,254,974
null
74,097,810
2
null
74,097,330
0
null
You are correct. Retry interval minutes are only used when a job step is run and fails. I would suggest a job step using the WAITFOR command: ``` `WAITFOR DELAY '03:00'` ```
null
CC BY-SA 4.0
null
2022-10-17T13:07:07.130
2022-10-17T13:07:07.130
null
null
7,491
null
74,098,028
2
null
74,097,707
0
null
Just create an instance of `System.Windows.Forms.Button` class and add it to the forms `Controls` collection as shown below ``` private void InitializeComponent() { this.twitterButton = new System.Windows.Forms.Button(); // // twitterButton // this.twitterButton.Location = new System.Drawing.Point(44, 111); this.twitterButton.Name = "twitterButton"; this.twitterButton.Size = new System.Drawing.Size(89, 23); this.twitterButton.TabIndex = 1; this.twitterButton.Text = "twitter"; this.twitterButton.UseVisualStyleBackColor = true; this.twitterButton.Click += new System.EventHandler(this.twitterButton_Click); this.Controls.Add(this.twitterButton); } ```
null
CC BY-SA 4.0
null
2022-10-17T13:23:34.920
2022-10-17T13:23:34.920
null
null
1,540,415
null
74,098,031
2
null
68,279,077
2
null
The problem here is that your expression `cons12` has floating point numbers and is numerically ill-conditioned. The algorithm used by `plot_implicit` uses a form of fixed precision interval arithmetic and with a numerically ill-conditioned expression this will end up highlighting a wider area as being zero because it is close to zero and can't be distinguished with the given precision. First use exact rational numbers rather than floats: ``` cons12=cons12.subs({'D1':Rational('0.002025')}) cons12=cons12.subs({'D2':1}) ``` Now you can obtain a more numerically stable expression with some manipulation: ``` In [60]: cons12.factor() Out[60]: ⎛ 8 6 6 4 2 4 4 2 3 6561⋅⎝6561⋅b + 26244⋅b ⋅d - 19440000⋅b + 39366⋅b ⋅d - 45360000⋅b ⋅d + 1600000000⋅b + 26244⋅b ⋅d - ─────────────────────────────────────────────────────────────────────────────────────────────────────── ⎛ 2 4096000000000000000000000000⋅⎝b + 2 2 2 2 4 3 2⎞ 32400000⋅b ⋅d - 3200000000⋅b ⋅d + 6561⋅d - 6480000⋅d + 1600000000⋅d ⎠ ───────────────────────────────────────────────────────────────────────── 4 ⎞ d⎠ In [61]: sqf_part(numer(cons12.factor())) Out[61]: 8 6 6 4 2 4 4 2 3 6561⋅b + 26244⋅b ⋅d - 19440000⋅b + 39366⋅b ⋅d - 45360000⋅b ⋅d + 1600000000⋅b + 26244⋅b ⋅d - 324000 2 2 2 4 3 2 00⋅b ⋅d - 3200000000⋅b ⋅d + 6561⋅d - 6480000⋅d + 1600000000⋅d In [62]: horner(sqf_part(numer(cons12.factor()))) Out[62]: 2 ⎛ 2 ⎛ 2 ⎛ 2 ⎞ ⎞ b ⋅⎝b ⋅⎝b ⋅⎝6561⋅b + 26244⋅d - 19440000⎠ + d⋅(39366⋅d - 45360000) + 1600000000⎠ + d⋅(d⋅(26244⋅d - 3240 ⎞ 2 0000) - 3200000000)⎠ + d ⋅(d⋅(6561⋅d - 6480000) + 1600000000) In [63]: plot_implicit(_, (b, 0, 4), (d, 0, 6)) Out[63]: <sympy.plotting.plot.Plot at 0x7ff5097b09d0> ``` [](https://i.stack.imgur.com/c5ojh.png) This still has some spread but is better than the original plot. It is possible that some rescaling will help with the numerical instability but in general SymPy would need to have adaptive precision interval arithmetic to make this sort of thing work. The argument `adaptive=False` can be used to do the calculation with a mesh grid instead: ``` In [120]: eq = horner(sqf_part(numer(cons12.factor()))) In [121]: plot_implicit(eq, (b, 0, 4), (d, 0, 6), adaptive=False, points=1000) Out[121]: <sympy.plotting.plot.Plot at 0x7ff508c9c9d0> ``` That gives: [](https://i.stack.imgur.com/CfFZg.png) In this particular case it is possible to compute explicit radical expressions for the roots for either `b` or `d` which can then be plotted more accurately: ``` In [122]: sols = roots(eq, d) In [123]: plot(*sols, (b, 0, 4), ylim=(0, 6)) <string>:1: RuntimeWarning: invalid value encountered in double_scalars <string>:1: RuntimeWarning: invalid value encountered in double_scalars <string>:1: RuntimeWarning: invalid value encountered in double_scalars <string>:1: RuntimeWarning: invalid value encountered in double_scalars Out[123]: <sympy.plotting.plot.Plot at 0x7ff5080f5d60> ``` That gives: [](https://i.stack.imgur.com/ohxvM.png)
null
CC BY-SA 4.0
null
2022-10-17T13:23:47.713
2022-10-17T13:23:47.713
null
null
9,450,991
null
74,098,146
2
null
25,319,446
0
null
c# winForm Combobox with dropdown tree view you can Use Below Code for a tree view ``` namespace DemoApp ``` { public partial class Form2 : Form { public Form2() { InitializeComponent(); } ``` public void view_dept_tree() { try { List<department> departments = getDept(); ComboTreeNode nod2 = new ComboTreeNode(departments[0].deptid + "-" + departments[0].deptname.ToString()); ctbImages.Nodes.Add(nod2); PopulateTreeView2(Convert.ToInt32(departments[0].deptid), nod2); ctbImages.Sort(); ctbImages.SelectedNode = ctbImages.Nodes[0]; } catch (Exception) { } } private void PopulateTreeView2(int parentId, ComboTreeNode parentNode) { try { var departments = getDept().Where(x=>x.subdeptid== parentId).ToList(); ComboTreeNode childNode; for (int i = 0; i < departments.Count; i++) { if (parentNode == null) childNode = ctbImages.Nodes.Add(departments[i].deptid.ToString() + "-" + departments[i].deptname.ToString()); else childNode = parentNode.Nodes.Add(departments[i].deptid.ToString() + "-" + departments[i].deptname.ToString()); PopulateTreeView2(Convert.ToInt32(departments[i].deptid.ToString()), childNode); } } catch (Exception) { } } public List<department> getDept() { List<department> departments = new List<department>(); departments.Add(new department { deptid = 1, deptname = "main", subdeptid = 0 }); departments.Add(new department { deptid = 2, deptname = "d1", subdeptid = 1 }); departments.Add(new department { deptid = 3, deptname = "d2", subdeptid = 1 }); departments.Add(new department { deptid = 4, deptname = "d3", subdeptid = 1 }); departments.Add(new department { deptid = 5, deptname = "d4", subdeptid = 2 }); departments.Add(new department { deptid = 6, deptname = "d5", subdeptid = 2 }); departments.Add(new department { deptid = 7, deptname = "d6", subdeptid = 2 }); departments.Add(new department { deptid = 8, deptname = "d7", subdeptid = 1 }); departments.Add(new department { deptid = 9, deptname = "d8", subdeptid = 1 }); departments.Add(new department { deptid = 10, deptname = "d9", subdeptid = 5 }); departments.Add(new department { deptid = 11, deptname = "d10", subdeptid = 5 }); departments.Add(new department { deptid = 12, deptname = "d11", subdeptid = 5 }); departments.Add(new department { deptid = 13, deptname = "d12", subdeptid = 5 }); departments.Add(new department { deptid = 14, deptname = "d13", subdeptid = 13 }); departments.Add(new department { deptid = 15, deptname = "d14", subdeptid = 13 }); departments.Add(new department { deptid = 16, deptname = "d15", subdeptid = 13 }); departments.Add(new department { deptid = 17, deptname = "demo13", subdeptid = 14 }); departments.Add(new department { deptid = 18, deptname = "demo14", subdeptid = 14 }); departments.Add(new department { deptid = 19, deptname = "demo15", subdeptid = 14 }); return departments; } private void Form2_Load(object sender, EventArgs e) { view_dept_tree(); ctbImages.ExpandAll(); } public class department { public int deptid { get; set; } public string deptname { get; set; } public int subdeptid { get; set; } } private void button1_Click_1(object sender, EventArgs e) { for (int i = 0; i < ctbImages.CheckedNodes.ToList().Count; i++) { textBox1.Text = ctbImages.CheckedNodes.ToList()[i].Text; MessageBox.Show(ctbImages.CheckedNodes.ToList()[i].Text); } } } ``` }
null
CC BY-SA 4.0
null
2022-10-17T13:32:44.133
2022-10-17T13:32:44.133
null
null
11,637,840
null
74,098,918
2
null
74,075,442
3
null
I had the same problem. All paddings even inside EditTextfields were gone. In my case it was fitsSystemWindows set to true in the postSplashScreenTheme. Setting ``` fitsSystemWindows = false ``` solved the problem for me.
null
CC BY-SA 4.0
null
2022-10-17T14:38:36.893
2022-10-17T17:01:09.403
2022-10-17T17:01:09.403
4,966,705
5,668,880
null
74,099,031
2
null
7,417,123
1
null
Based on @Sdghasemi's solution, here's my Kotlin code, without the deprecated `insets.getSystemWindowInsetBottom()`. Also I added a padding animation to make the keyboard opening smoother. ``` val rootLayout = findViewById<RelativeLayout>(R.id.your_root_layout) ViewCompat.setOnApplyWindowInsetsListener(rootLayout) { v, insets -> val animator = ValueAnimator.ofInt(0, insets.getInsets(WindowInsetsCompat.Type.ime()).bottom)) animator.addUpdateListener { valueAnimator -> v.setPadding(0, 0, 0, valueAnimator.animatedValue as? Int ?: 0) } animator.duration = 200 animator.start() insets } ``` Call it from the `onCreate()` method of your `Activity`. In my case, this snippet works better than setting `android:windowSoftInputMode="adjustPan"` in the `AndroidManifest.xml`
null
CC BY-SA 4.0
null
2022-10-17T14:45:11.687
2022-10-17T15:46:43.027
2022-10-17T15:46:43.027
2,220,839
2,220,839
null
74,099,317
2
null
73,889,788
0
null
Try adding this to `vue.config.js`: ``` module.exports = { ... configureWebpack: { resolve: { fallback: { assert: false, stream: false, os: false, url: false, http: false, https: false, buffer: require.resolve('buffer') } }, plugins: [ new webpack.ProvidePlugin({ process: 'process/browser', Buffer: [ 'buffer', 'Buffer' ] }) ], } }; ```
null
CC BY-SA 4.0
null
2022-10-17T15:06:50.167
2022-10-25T09:39:53.727
2022-10-25T09:39:53.727
11,628,256
20,264,568
null
74,099,381
2
null
54,007,045
0
null
I found the same error, but I had run the `composer require phpmailer/phpmailer` install command from my DOS command line to install on my Windows environment before it got auto-deployed via PHPStorm onto a linux server - so the software files were deployed, but the adjusted autoload_psr4.php file didn't go with that - so that was the problem. To fix, I had to do an additional install on my [auto-deployed] linux machine too.
null
CC BY-SA 4.0
null
2022-10-17T15:11:25.720
2022-10-17T15:11:25.720
null
null
1,432,181
null
74,099,927
2
null
74,094,483
1
null
Can't speak to why the designers choose that somewhat mixed up ordering. But I can say that it doesn't matter, in the sense that it makes no difference to the hardware or software.  This is because there are no instructions that refer to multiple, sequential registers via one register number. An example, that neither MIPS nor RISC V have, would be a store multiple registers instruction, in which one register number, e.g. a low number, is specified explicitly and then sequential register numbers are implied for some count of registers. In architectures that do that, it is important to have, for example, at least the call-preserved (aka callee saves) registers consecutively numbered, for the optimal use of that instruction.  Careful placement of the return address register within the register numbering helps, too. In RISC V, register numbers are always explicit, with the only exception in the compressed instruction extension, where a register number is impicit, namely, sp, for local memory variable manipulation, though never for a range of registers. In this situation, there is neither advantage nor disadvantage to any other alternative register usage ordering.
null
CC BY-SA 4.0
null
2022-10-17T15:53:37.343
2022-10-18T18:19:05.997
2022-10-18T18:19:05.997
471,129
471,129
null
74,100,218
2
null
74,100,068
0
null
here is one way to do it If you post a data as a text or code, I'll be able to share the result. Assumption: all numbers are together and not interspersed with non-digits, with exception of , and . ``` # replace out all characters that are not digits or comma or period. (df[['Type','Size']] .apply(lambda x: x.str.replace(r'[^\d\.,]','', regex=True) , axis=1) .reset_index()) ```
null
CC BY-SA 4.0
null
2022-10-17T16:16:25.753
2022-10-17T16:16:25.753
null
null
3,494,754
null
74,100,740
2
null
74,100,418
2
null
You could add in your yaml a css file which looks like this: ``` .center{ margin: 0!important; height: 30px; } ``` and add it to your yaml like this: ``` --- format: revealjs css: styles.css --- ``` then you can add it to your image ``` I want an inline image but I get: ![](https://upload.wikimedia.org/wikipedia/commons/d/d0/RStudio_logo_flat.svg){.center} ``` [](https://i.stack.imgur.com/RImAC.png) --- : The reason why this happens is the internal css-style of quarto. The above written code overwrites the existing style (that was it is necessary to use `!important`), that looks like this ``` .reveal img { margin: var(--r-block-margin) 0; } ``` Therefore, we use an own css style for that image to override that default.
null
CC BY-SA 4.0
null
2022-10-17T17:02:43.213
2022-10-17T17:02:43.213
null
null
14,137,004
null
74,101,758
2
null
74,101,638
1
null
It cause error because you can not access the postgresql db inside your host machine using localhost. Because your container refering localhost to itself.Therefore when you add `usage-stats-url : jdbc:postgresql://localhost/postgres` to `application.yml` file it try to find a db inside your container instead of the host machine.
null
CC BY-SA 4.0
null
2022-10-17T18:40:46.893
2022-10-17T18:40:46.893
null
null
19,966,820
null
74,102,425
2
null
74,095,775
2
null
Here is one way to do that in Python/OpenCV. - - - - - - - - - Input: ``` import cv2 import numpy as np import skimage.morphology # read input img = cv2.imread('s_curve.jpg') # convert to grayscale gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) # use thresholding thresh = cv2.threshold(gray, 0, 255, cv2.THRESH_BINARY+cv2.THRESH_OTSU)[1] # get distance transform distance = thresh.copy() distance = cv2.distanceTransform(distance, distanceType=cv2.DIST_L2, maskSize=5).astype(np.float32) # get skeleton (medial axis) binary = thresh.copy() binary = binary.astype(np.float32)/255 skeleton = skimage.morphology.skeletonize(binary).astype(np.float32) # apply skeleton to select center line of distance thickness = cv2.multiply(distance, skeleton) # get average thickness for non-zero pixels average = np.mean(thickness[skeleton!=0]) # thickness = 2*average thick = 2 * average print("thickness:", thick) ``` ``` thickness: 28.91813850402832 ``` [](https://i.stack.imgur.com/ZAOwy.jpg)
null
CC BY-SA 4.0
null
2022-10-17T19:43:24.833
2022-10-17T19:43:24.833
null
null
7,355,741
null
74,102,458
2
null
74,102,326
1
null
The error message you have linked is that "Year" is not a valid attribute of your DataFrame. Python is case-sensitive, and from your code, it seems you've called that column "year". Also, [please cut & paste error messages as text rather than using screenshots on StackOverflow](https://meta.stackoverflow.com/questions/285551/why-should-i-not-upload-images-of-code-data-errors-when-asking-a-question)
null
CC BY-SA 4.0
null
2022-10-17T19:45:50.073
2022-10-17T19:45:50.073
null
null
2,112,722
null
74,102,513
2
null
74,102,227
0
null
you can do this if you offset your formula like: ``` ={""; IF(1=2, "something", )} ``` [](https://i.stack.imgur.com/PnBXH.png)
null
CC BY-SA 4.0
null
2022-10-17T19:51:08.357
2022-10-17T19:51:08.357
null
null
5,632,629
null
74,102,545
2
null
74,002,208
0
null
Try the [Message Deduplication Plugin](https://github.com/noxdafox/rabbitmq-message-deduplication/issues). Seems like it could address your rolling-update use-case.
null
CC BY-SA 4.0
null
2022-10-17T19:54:17.950
2022-10-17T19:54:17.950
null
null
6,465,830
null
74,102,664
2
null
74,102,197
0
null
It looks like it's not ready just yet: [https://github.com/chakra-ui/chakra-ui-vue/issues/116#issuecomment-762594573](https://github.com/chakra-ui/chakra-ui-vue/issues/116#issuecomment-762594573)
null
CC BY-SA 4.0
null
2022-10-17T20:06:07.673
2022-10-17T20:06:07.673
null
null
8,816,585
null
74,102,675
2
null
74,085,317
0
null
There is no particular thing to do that. You can do it with standard Javascript. Also, SFRA uses bootstrap 4 and you can do it with Bootstrap Collapse. [https://getbootstrap.com/docs/4.0/components/collapse/](https://getbootstrap.com/docs/4.0/components/collapse/)
null
CC BY-SA 4.0
null
2022-10-17T20:06:58.183
2022-10-17T20:06:58.183
null
null
7,453,516
null
74,102,928
2
null
74,102,567
1
null
Try: ``` import re import requests import urllib.parse from bs4 import BeautifulSoup url = "https://www.ishares.com/us/products/239726/ishares-core-sp-500-etf" html = requests.get(url).text ajax_url = ( "https://www.ishares.com" + re.search(r'dataAjaxUrl = "([^"]+)"', html).group(1) + "?action=ajax" ) soup = BeautifulSoup(requests.get(ajax_url).content, "html.parser") prospectus_url = ( "https://www.ishares.com" + soup.select_one("a:-soup-contains(Prospectus)")["href"] ) pdf_url = ( "https://www.ishares.com" + urllib.parse.parse_qs(prospectus_url)["iframeUrlOverride"][0] ) print("Downloading", pdf_url) with open(pdf_url.split("/")[-1], "wb") as f_out: f_out.write(requests.get(pdf_url).content) ``` Prints: ``` Downloading https://www.ishares.com/us/literature/prospectus/p-ishares-core-s-and-p-500-etf-3-31.pdf ``` and saves `p-ishares-core-s-and-p-500-etf-3-31.pdf`: ``` -rw-r--r-- 1 root root 325016 okt 17 22:31 p-ishares-core-s-and-p-500-etf-3-31.pdf ```
null
CC BY-SA 4.0
null
2022-10-17T20:32:11.777
2022-10-17T20:32:11.777
null
null
10,035,985
null
74,103,245
2
null
74,102,855
1
null
As explained here: [https://stackoverflow.com/a/67751550/8816585](https://stackoverflow.com/a/67751550/8816585) `window` is undefined here because your code runs on both client and server side. But `window` is not available on the server side. Check the solution for further details or use `mounted` if you're in a hurry.
null
CC BY-SA 4.0
null
2022-10-17T21:07:58.190
2022-10-17T21:07:58.190
null
null
8,816,585
null
74,103,736
2
null
74,103,430
0
null
I think this is what you're looking for: ``` select "id" , (select count(1) from "members" where "recommendedby" = m."id") from "members" m ``` Although using subqueries are not very popular and can cause serious performance issues, this is imho the easiest way to learn what you're doing.
null
CC BY-SA 4.0
null
2022-10-17T22:03:43.133
2022-10-17T22:03:43.133
null
null
9,083,475
null
74,104,511
2
null
74,104,455
1
null
In other words you're seeking a vector from hitPosition towards the projection of goalPoint along the Y axis. You don't need trigonometry for this. A vector (X,Y,Z) is perpendicular to the normal of the plane if it satisfies: ``` X*normalVector.X + Y*normalVector.Y + Z*normalVector.Z == 0 ``` (See [dot product](https://en.wikipedia.org/wiki/Dot_product).) That vector points towards the projection of goalPoint along Y axis if ``` X = deltaX Z = deltaZ ``` Substituting and solving for Y: ``` Y = -(deltaX*normalVector.X + deltaZ*normalVector.Z)/normalVector.Y ``` You can normalize the result at the end if needed. Putting it all together: ``` Vector3 DetermineVector(Vector3 normalVector, Vector3 hitPosition, Vector3 goalPoint) { float deltaX = goalPoint.X - hitPosition.X; // TO - FROM float deltaY = goalPoint.Y - hitPosition.Y; // TO - FROM float deltaZ = goalPoint.Z - hitPosition.Z; // TO - FROM float X = deltaX; float Y = -(deltaX*normalVector.X + deltaZ*normalVector.Z)/normalVector.Y; float Z = deltaZ; // optionally normalize: float length = sqrt(X*X + Y*Y + Z*Z); X /= length, Y /= length, Z /= length; return Vector3(X, Y, Z); } ```
null
CC BY-SA 4.0
null
2022-10-18T00:35:32.090
2022-10-18T01:03:04.810
2022-10-18T01:03:04.810
277,176
277,176
null
74,104,770
2
null
74,096,061
0
null
According to this [issue on github](https://github.com/davisking/dlib/issues/2524#issuecomment-1050495674). This is caused by the on your system, use the following command may solve it: ``` python3 setup.py install --no DLIB_PNG_SUPPORT ```
null
CC BY-SA 4.0
null
2022-10-18T01:32:43.187
2022-10-18T01:32:43.187
null
null
18,359,438
null
74,104,831
2
null
74,104,551
2
null
In your function `d`, you have ``` ((= (mod i 3) 1) or (= (mod i 3) 0)) ``` This is, again, ``` ( (= (mod i 3) 1) or (= (mod i 3) 0) ) ``` The result of evaluating `(= (mod i 3) 1)` is used as a function, and is called with the other two arguments. Apparently that result was `#f`, and that is definitely not a function. Maybe you intended it to be ``` ( or (= (mod i 3) 1) (= (mod i 3) 0) ) ``` Now `or` is called with the other two values as arguments, which is a valid call to make.
null
CC BY-SA 4.0
null
2022-10-18T01:46:18.090
2022-10-18T01:46:18.090
null
null
849,891
null
74,104,998
2
null
74,103,430
0
null
You should use a self-join for this: ``` SELECT m.id, count(r.id) AS recommendations FROM members AS m LEFT JOIN members AS r ON r.recommendedby = m.id GROUP BY m.id ORDER BY recommendations; ``` The left join will make `r.id` be NULL for members that made no recommendation, and `count` won't count such NULL values.
null
CC BY-SA 4.0
null
2022-10-18T02:22:23.233
2022-10-18T02:28:46.037
2022-10-18T02:28:46.037
6,464,308
6,464,308
null
74,105,172
2
null
74,099,067
0
null
You can use [history.replaceState()](https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState) to change the URL without navigating. Place this in the created hook of the page you're loading: ``` created() { history.replaceState(history.state, "", "/staffProfile"); } ``` downsides include losing the query params if you manually reload the page or while manually navigating back to the previous page then forward. Only when clicking your button will the page load with the query params intact. If you need an alternative solution that always preserves this data, you might want to look into saving the query params using a state management library (Vuex or Pinia), or the browser's localStorage API
null
CC BY-SA 4.0
null
2022-10-18T02:50:01.010
2022-10-18T02:50:01.010
null
null
6,225,326
null
74,105,313
2
null
74,103,430
0
null
There are two ways you can go with. 1. Join + Group By This is pretty simple, all you need to do is put the query you made as SubQuery and Join your table with that. ``` SELECT members.*, rec.recommendations FROM members LEFT JOIN ( SELECT COUNT(recommendedby) recommendations, recommendedby FROM members GROUP BY recommendedby ) rec ON rec.recommendedby = members.id ``` 1. Lateral ``` SELECT m1.*, rec.recommendations FROM members m1, LATERAL ( SELECT COUNT(recommendedby) recommendations FROM members m2 WHERE m1.id = m2.id ) ``` Hope this can help.
null
CC BY-SA 4.0
null
2022-10-18T03:19:28.297
2022-10-18T03:19:28.297
null
null
20,164,098
null
74,105,327
2
null
74,105,284
1
null
Probably you are talking about background image and background size property here as: ``` th { background-image: url(https://www.w3schools.com/HOWTO/img_snow_wide.jpg); background-size: contain; font-size: 24px; font-weight: bold; } ``` working code: [https://codesandbox.io/s/pensive-panna-qbnkut?file=/index.html:345-531](https://codesandbox.io/s/pensive-panna-qbnkut?file=/index.html:345-531) Other way is to position absolute a div containing text at the center of the 'th' element and use 'img' element as you used now. ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta http-equiv="X-UA-Compatible" content="ie=edge" /> <title>Static Template</title> <style> table { width: 100vh; height: 50vh; margin: 0 auto; } th { background-image: url(https://www.w3schools.com/HOWTO/img_snow_wide.jpg); background-size: contain; font-size: 24px; font-weight: bold; } </style> </head> <body> <table> <tr> <th> CENTERED Text </th> </tr> </table> </body> </html> ```
null
CC BY-SA 4.0
null
2022-10-18T03:22:06.607
2022-10-18T03:48:58.197
2022-10-18T03:48:58.197
3,176,419
2,983,489
null
74,105,505
2
null
74,105,284
0
null
If you want to add the image and text content on the table head then only use `<th>` tag otherwise it is good to use `<td>` tag inside `<tr>` for semantic meaning as `<td>` tag represent table data.
null
CC BY-SA 4.0
null
2022-10-18T03:50:34.963
2022-10-18T03:51:29.280
2022-10-18T03:51:29.280
14,793,310
14,793,310
null