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
list
73,802,170
2
null
73,801,741
2
null
I had the same problem before. You probably have to uncheck the "Enforce password policy" [](https://i.stack.imgur.com/zugQN.png)
null
CC BY-SA 4.0
null
2022-09-21T14:07:50.963
2022-09-21T14:07:50.963
null
null
12,875,014
null
73,802,742
2
null
73,163,900
2
null
It's because of Docker context. You can see them easily in VSCode > Docker tab. [SCREENSHOT](https://i.stack.imgur.com/0cS8T.png) I guess it caused by installation of docoker-desktop, which points to meanwhile the default context points to So what you need to do is to change the context either in PyCharm or in docker-desktop. In PyCharm it's in Settings > Build, execution, deployment > Docker and then set the Engine API URL to Maybe the more clear solution would be to uninstall system docker and install only the docker-desktop. But it't up to you.
null
CC BY-SA 4.0
null
2022-09-21T14:43:58.543
2022-09-21T15:39:11.653
2022-09-21T15:39:11.653
13,317,529
13,317,529
null
73,803,279
2
null
73,798,632
1
null
There are multiple issues here. First, sometimes grayscale images are written to file as if they were RGB images (in a TIFF file, this could be as simple as storing a grayscale color map, the pixel values will be interpreted as indices into the map, and the loaded image will be an RGB image instead of a grayscale image, even through it has only grayscale colors). This is the case here. All three channels have exactly the same information, but there are three channels stored, and your FFT will compute the same thing three times! After loading the image with `dip.ImageReadTIFF()`, you can use parentheses to index one of the channels: ``` img1 = dip.ImageReadTIFF('RAW_FFT.tif') img1 = img1(0) ``` We now have an actual gray-scale image. This should get rid of the red color in the output. After computing the FFT, we have a floating-point image with a very high dynamic range (the largest magnitude, at the middle pixel, is 437536704). pyplot, by default, will show floating-point images with 0 and all negative values as black, and 1 and all larger values as white (actual colors depend of course on the color map it uses). So your display will be all white. Use the `vmax` parameter to `imshow` to determine the value shown as white. Setting this to 1e6 should give you a similar display as in the GMS software. Instead of pyplot you can use DIPlib for display. Its interactive viewer will let you use a slider to manually set the grayscale limits, and you can manually select to display the magnitude, as well as choose a logarithmic mapping (which tend to be most useful for displaying the frequency domain). ``` f = dip.FourierTransform(img) dip.viewer.ShowModal(f) ``` Alternatively, you can use a static display, which uses pyplot under the hood: ``` f.Show((0, 1e6)) ``` or ``` f.Show('log') ```
null
CC BY-SA 4.0
null
2022-09-21T15:20:02.490
2022-09-21T15:20:02.490
null
null
7,328,782
null
73,803,451
2
null
73,783,383
0
null
Consider using this configuration instead: ``` <target xsi:type="File" name="jsonFileTrace" keepFileOpen="true" archiveAboveSize="5242880" autoFlush="false" openFileFlushTimeout="5" concurrentWrites="false" fileName="${basedir}/logs/trace/${shortdate}/trace.${shortdate}.log"> <layout xsi:type="JsonLayout" includeAllProperties="true"> <attribute name="time" layout="${longdate}" /> .......//other attributes </layout> </target> ``` And setup a scheduled-task on the machine (or in the application) that runs every day and removes sub-folders that are older than 10 days.
null
CC BY-SA 4.0
null
2022-09-21T15:33:11.857
2022-10-01T18:49:09.837
2022-10-01T18:49:09.837
193,178
193,178
null
73,803,728
2
null
73,768,917
0
null
Try to update the gradle and sync files. It work for me.
null
CC BY-SA 4.0
null
2022-09-21T15:52:18.250
2022-09-21T15:52:18.250
null
null
11,781,309
null
73,804,019
2
null
73,768,917
4
null
I'm suffering from same issue/bug. What I did so far? ## Attempt 1 - `Sync Project with gradle files`- `Invalid catch and Restart`- `.gradle`- ## Attempt 2 Tried all step from attempt 1 Also tried what siregar2103 answered - ## Attempt 3 All from Attempt 1 and 2 but not solve in my main project so I decided to upgrade my years old project to latest one. I did upgrade my Gradle from `4.1.3 to 7.3.0` Update all dependency to latest one but I face many error while doing that. Hilt error and other errors too. Which I'm going to mention below. For Hilt I did removed all old Hilt related library and and below ``` kapt "com.google.dagger:dagger-compiler:2.42" kapt "com.google.dagger:hilt-android-compiler:2.43.2" implementation "com.google.dagger:dagger:2.42" implementation "com.google.dagger:hilt-android:2.43.2" implementation 'androidx.hilt:hilt-work:1.0.0' kapt "androidx.hilt:hilt-compiler:1.0.0" implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1' implementation "androidx.navigation:navigation-compose:2.5.1" ``` --- In `build.gradle` file (not `.app` level) - `id 'com.google.dagger.hilt.android' version '2.43.2' apply false` : I did add `implementation "androidx.navigation:navigation-compose:2.5.1"` dependency because I got > java.lang.IllegalArgumentException: CreationExtras must have a value by error in runtime. --- Other Error which I faced is > Exception is: com.intellij.openapi.externalSystem.model.ExternalSystemException: `lateinit property _buildFeatureValues has not been initialized` For this I did build gradle using command line and it give me full error which I didn't get when I directly build don't know why? But It's through error related flat dir and aar file so I did removed code and change now It's started to build and my app started to install. Now still some of my file not rendering and that because of I'm using custom `attr` from style so I'm trying to figuring out why it's happening and I'll update this answer when I find solution for that. So using above my 60% xml files preview start showing in my old projects. For 40% screen I have to change my default theme to so it can start rendering. --- - - `Android Gradle Plugin` This 2 step should solve your problem. And build using command line for more error related details.
null
CC BY-SA 4.0
null
2022-09-21T16:16:02.760
2022-09-21T16:16:02.760
null
null
6,333,971
null
73,804,029
2
null
68,484,507
0
null
This worked for me: ``` library(plotly) set.seed(123) df <- diamonds[sample(1:nrow(diamonds), size = 1000),] p <- ggplot(df, aes(cut, price, fill = cut)) + geom_boxplot(outlier.shape = NA, outlier.size = NA, outlier.colour = NA) + ggtitle("Ignore outliers in ggplot2") # Need to modify the plotly object and make outlier points have opacity equal to 0 fig <- plotly_build(p) fig$x$data <- lapply(fig$x$data, FUN = function(x){ x$marker = list(opacity = 0) ###### added line to remove hoverinfo: x$hoverinfo = "none" ###### end of addition return(x) }) fig ```
null
CC BY-SA 4.0
null
2022-09-21T16:16:48.597
2022-09-21T16:16:48.597
null
null
11,856,430
null
73,804,349
2
null
73,804,179
0
null
Here's one way, by dividing the columns by 90, then using `groupy` and `count`: ``` import numpy as np import pandas as pd data = [ [87.084,5.293], [55.695,0.985], [157.504,2.995], [97.701,179.593], [97.67,170.386], [118.713,177.53], [99.972,176.665], [124.849,1.633], [72.787,179.459] ] df = pd.DataFrame(data,columns=['Var1','Var2']) df = (df / 90).astype(int) df1 = pd.DataFrame([["0-90"], ["90-180"]]) df1['Var1'] = df.groupby('Var1').count() df1['Var2'] = df.groupby('Var2').count() print(df1) ``` Output: ``` 0 Var1 Var2 0 0-90 3 4 1 90-180 6 5 ```
null
CC BY-SA 4.0
null
2022-09-21T16:45:01.007
2022-09-21T16:45:01.007
null
null
1,883,316
null
73,804,753
2
null
72,458,894
2
null
Have same issue, microsoft says it is products limitation. and suggested to use Power BI Data Gateway. it works fine with power bi data gateway. I do understand a data gateway is not required as GCP is Cloud source but we have considered this as a interim setup.
null
CC BY-SA 4.0
null
2022-09-21T17:24:14.477
2022-09-21T17:24:14.477
null
null
20,054,710
null
73,804,812
2
null
73,462,525
0
null
To insert data, you can consult it in the appsmith documentation in the following links. Link to the explanation of mongodb methods: [https://www.mongodb.com/docs/manual/reference/insert-methods/](https://www.mongodb.com/docs/manual/reference/insert-methods/) Link to query syntax: [https://docs.appsmith.com/reference/datasources/querying-mongodb/mongo-syntax](https://docs.appsmith.com/reference/datasources/querying-mongodb/mongo-syntax) Query configuration:[enter image description here](https://i.stack.imgur.com/6Z5Yy.png)
null
CC BY-SA 4.0
null
2022-09-21T17:28:39.733
2022-09-21T17:28:39.733
null
null
20,053,481
null
73,805,141
2
null
30,055,796
0
null
Close the Visual Studio This is for Visual Studio 2019. Change this for the project causing issue in the `*.dtproj` file ``` <SSIS:Property SSIS:Name="ProtectionLevel">0</SSIS:Property> ``` delete the .vs/ bin/ and obj/ folders Then rebuild your solution
null
CC BY-SA 4.0
null
2022-09-21T18:01:10.827
2022-09-21T18:01:10.827
null
null
3,308,533
null
73,805,139
2
null
73,796,627
0
null
I managed to get around this and recorded the steps as a [comment on the GitHub issue](https://github.com/flutter/flutter/issues/111987#issuecomment-1254040309), reproducing it here for reference: I managed to resolve the issue through this truly bizarre sequence of steps: 1. Create a new Google Play account (actually using this new account would be a showstopper, so we don't want to do that at the end of the day, but we'll get there). 2. Invite the new account to the internal test. 3. Log into the new account on the phone. 4. Access the internal test through one of the version-specific links, hidden somewhere in the depths of Google Play Console (e.g. https://play.google.com/apps/test/dk.fuglede.electricity_prices/5). 5. This time around there is an install button. Clicking it, however, prompts me to verify my age. Click the link to verify my age. 6. This opens a browser which (since I used Google Play from the browser with my previous account) importantly is logged into my old account. 7. Complete the verification (I used the credit card option which was particularly painful since most cards are debit cards around here). 8. Go back to Google Play and laugh at the fact that the new account still doesn't have it's age verified since we accidentally did it for the old account. 9. Switch account back to the old one. 10. Everything works now. So, I suppose the issue was that the existing account didn't have its age verified, but a rather terrible bug in Google Play wouldn't ever tell me what the problem was, or allow me to do anything about it without creating a new account.
null
CC BY-SA 4.0
null
2022-09-21T18:01:07.767
2022-09-21T18:01:07.767
null
null
5,085,211
null
73,805,524
2
null
73,802,870
0
null
We recently rewrote all the built-in color schemes except `default`. Whenever possible, we based the rewrite on the highest definition information available, the GUI colors to achieve maximum consistency. In all cases, it means that the TUI experience is brought closer to the GUI experience but it also means that people used to the old, broken, look of their favorite colorscheme might get a shock. What you get now is how `elflord` was supposed to look to begin with. If you want the old `elflord`, you can find it [here](https://raw.githubusercontent.com/vim/colorschemes/master/legacy_colors/elflord.vim).
null
CC BY-SA 4.0
null
2022-09-21T18:40:58.433
2022-09-21T18:40:58.433
null
null
546,861
null
73,805,556
2
null
30,188,011
2
null
I searched a long time for a fix of this. In [a github issue](https://github.com/matplotlib/matplotlib/issues/4419#issuecomment-101253070) I found a fix for this: ``` # ... setup code CS = plt.contourf(X, Y, Z, colors=[[0,0,0.5],[0,0,0.2]]) for a in CS.collections: a.set_edgecolor("face") ```
null
CC BY-SA 4.0
null
2022-09-21T18:44:41.340
2022-09-21T18:44:41.340
null
null
12,356,463
null
73,805,642
2
null
20,357,282
0
null
I made some tests and with my pygame version (2.1.2) drawing aapolygons (lines) on top of a polygon (jagged edges) results in jaggies on the right and lower sides because the lines are inside the jagged polygon area. I whipped up a quick test for a workaround function that uses supersampling to convert the jagged polygon into a smooth one. For anyone interested here is the code: ``` def draw_aapolygon(surface, color, points, scale=2): """ Draw antialiased polygon using supersampling. """ # Calculate minimum x and y values. x_coords = tuple(x for x, _ in points) x_min, x_max = min(x_coords), max(x_coords) y_coords = tuple(y for _, y in points) y_min, y_max = min(y_coords), max(y_coords) # Calculate width and height of target area. w = x_max - x_min + 1 h = y_max - y_min + 1 # Create scaled surface with properties of target surface. s = pygame.Surface((w * scale, h * scale), 0, surface) s_points = [((x - x_min) * scale, (y - y_min) * scale) for x, y in points] pygame.draw.polygon(s, color, s_points) # Scale down surface to target size for supersampling effect. s2 = pygame.transform.smoothscale(s, (w, h)) # Paint smooth polygon on target surface. surface.blit(s2, (x_min, y_min)) ``` Feel free to point out errors, except that is uses quite a bit of resources, which is obvious. : The `smoothscale` function does not honour transparency, I will write a version that uses transparency when I'm on it again. You can use this function as a proof of concept meanwhile.
null
CC BY-SA 4.0
null
2022-09-21T18:53:13.137
2022-09-22T16:45:47.787
2022-09-22T16:45:47.787
589,206
589,206
null
73,806,111
2
null
73,805,771
0
null
It looks like there is some white spaces in the `Yes/No` values. Select all the `object` (/string) columns and use [pandas.Series.str.strip](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.str.strip.html) : ``` df_obj = df.select_dtypes(['object']) df[df_obj.columns] = df_obj.apply(lambda x: x.str.strip()) df.loc[(df["Unnamed: 17"] == "Yes")] ```
null
CC BY-SA 4.0
null
2022-09-21T19:36:55.847
2022-09-21T19:36:55.847
null
null
16,120,011
null
73,806,539
2
null
31,140,521
0
null
Just got this. Just went there. Invalidated the cache. Seemed to work until I wrote further lines. Then noticed that I was writing my code outside of the `main()` function. Moved the ending curly bracket further and voila.
null
CC BY-SA 4.0
null
2022-09-21T20:22:56.023
2022-09-21T20:22:56.023
null
null
13,749,668
null
73,806,885
2
null
26,220,795
0
null
``` from flask import send_file @app.route('/svg_returned_endpoint', methods=['POST']) def svg_returned_endpoint(): # HTML version # this gets the json object from the user json_obj = {'input_1': request.values['input_1']} input_1_item = json_obj["input_1"] # normal endpoint version # this gets the json object from the user json_obj = request.get_json(force=True) input_1_item = json_obj["input_1"] #### ## Your Actual function/model Code Goes Here #### filename = 'YOUR_SAVED_IMAGE.svg' return send_file(filename, mimetype='image/svg+xml') ```
null
CC BY-SA 4.0
null
2022-09-21T21:00:50.687
2022-09-21T21:00:50.687
null
null
19,026,461
null
73,807,069
2
null
73,806,837
0
null
There are several lengths that you have to take into account: 1. The length of the number of items (the first %d) - use a length specification there as well to take care of counts with a bigger number of digits that 1 (e.g. if somebody has 23 items of something) 2. The length of the item name: "Pygmy Puffs" is shorter than "bags of Pygmy Puffs" - before you output the very first line, you have to know the length of the longest item name and add spaces to the end of the line if the current items name is shorter 3. The length of the price per item (the second %d). Either use a length specification there as well (e.g. %4d) but this will create a gap before the price per item, or count the number of digits of the largest item in the list and add spaces at the end of the text (similar to 2.) 4. The length of the item price for all items. This is the only thing that you already handle right (with %10d). Before that you have to insert the extra spaces from parts 2 and 3 - I would specify a %s there and then prepare a string with the necessary spaces (e.g. with " ".repeat(spaces)) So the final format string would look like this: `"%4d %s at %d Knuts ea.: %s%10d%n"` The first parameter is the count, the second the item name, the third the single item price, the fourth a string with spaces to fill up everything and the fifth the price of item times the number of items. A "cheaper" option would be to have everything specified with a minimum width (as for the first and last parameter in my example) but that will leave blank regions before or after the item, depending on how you specify it.
null
CC BY-SA 4.0
null
2022-09-21T21:23:35.827
2022-09-21T21:23:35.827
null
null
2,846,138
null
73,807,120
2
null
73,802,957
0
null
Your `kv` file is being loaded twice. Once by you `Builder.load_file()` and once by the `App` (see [documentation](https://kivy.org/doc/stable-2.0.0/api-kivy.app.html#kivy.app.App.load_kv)). Just remove that `Builder.load_file()` line.
null
CC BY-SA 4.0
null
2022-09-21T21:28:55.310
2022-09-21T21:28:55.310
null
null
7,254,633
null
73,807,602
2
null
73,577,906
0
null
This question has been [asked](https://github.com/jbogard/MediatR/issues/564) on GitHub MediatR repository. [Aaron Roberts](https://github.com/lilasquared) gives a nice explanation in this [answer](https://github.com/jbogard/MediatR/issues/564#issuecomment-700348447): > Likely the problem here is that you are using a single class for both the razor backend and the notification handler. The `.AddServices()` extension method registers the handlers as `Transient`, which creates a new instance of the class to handle the notification. That means the one that is being used in rendering is not the same instance as the one that is handling the notification. In order to share data between the handlers and the Razor components you will need a shared dependency that both can interact with.
null
CC BY-SA 4.0
null
2022-09-21T22:36:32.240
2022-09-21T22:36:32.240
null
null
10,839,134
null
73,808,034
2
null
62,578,925
1
null
You can do this in the proposed api: [treeItemCheckbox](https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.treeItemCheckbox.d.ts) in Insiders v1.72 now and since it is a fairly simple new api I suspect it will be released with Stable 1.72. You can play with this now, see [using the proposed apis](https://code.visualstudio.com/api/advanced-topics/using-proposed-api). Instead of extending `TreeItem` you will extend `TreeItem2` (which extends `TreeItem`) if you want to use checkboxes. Here is some sample code I put together: ``` export class TreeTab extends vscode.TreeItem2 { ... if (tab.isActive) { this.iconPath = new vscode.ThemeIcon("arrow-small-right", new vscode.ThemeColor("tab.unfocusedActiveBackground")); this.checkboxState = vscode.TreeItemCheckboxState.Checked; // this.checkboxState = {state: vscode.TreeItemCheckboxState.Checked, tooltip: "my nifty checkbox tooltip"}; } ... ``` and elsewhere in your code if you want to detect when that checkbox is clicked/unclicked: ``` // use your TreeView variable instead of 'tabView' // from this.tabView = vscode.window.createTreeView(...); const checkBoxListener = this.tabView.onDidChangeCheckboxState(async event => { // event = {item: Array(n)}, which TreeItem's checkbox was clicked and its state after clicking:0/1 = on/off console.log(event); }); ``` [](https://i.stack.imgur.com/x7xrf.gif)
null
CC BY-SA 4.0
null
2022-09-21T23:59:05.973
2022-09-21T23:59:05.973
null
null
836,330
null
73,808,257
2
null
73,807,399
0
null
Using wildcards will apply rules to the given collection and all sub collections. For example, ``` match /users/123ABC { // this will apply to the specific // doc in the users collection // with an ID of 123ABC } match /users/{document} { // this will apply to all documents // in the users collection match /likes/{document} { // This will apply to all documents in //the users/likes sub collection } match /hearts/{document=**} { // This will apply to all documents in // the users/hearts sub collection as // well as any sub collections that are // further nested. } } match /users/{document=**} { // this will apply to all documents // in the users collection, as well as all // documents in any sub collections under /users } ```
null
CC BY-SA 4.0
null
2022-09-22T00:49:31.460
2022-09-22T00:49:31.460
null
null
10,673,068
null
73,808,507
2
null
69,968,835
0
null
Try this code: ``` import numpy as np import matplotlib.pyplot as plt print(np.ones((5, 5))) ``` You can the change the matrix dimensions as you like.
null
CC BY-SA 4.0
null
2022-09-22T01:49:47.163
2022-09-26T13:45:23.980
2022-09-26T13:45:23.980
18,159,334
20,057,279
null
73,808,797
2
null
73,806,812
0
null
Based on the picture in your post (as far as I am concerned), you can always get the ASCII character using Python built-in function. And if you want to split up the binary strings, you can also use Python `join` function. ``` def binary_alphabet_split(astring): result = bin(int.from_bytes(astring.encode(), 'big')) result = result.replace('b', '') return [','.join(result)] binary_alphabet_split('A') Out[20]: ['0,1,0,0,0,0,0,1'] ``` This will get you a list of split binary codes of the alphabet.
null
CC BY-SA 4.0
null
2022-09-22T02:42:48.337
2022-09-22T02:42:48.337
null
null
null
null
73,808,883
2
null
61,373,330
0
null
Under Connectivity, while you are creating a DB try to create a new VPC and DB Subnet group new VPC security group makes sure you add inbound rule [all traffic] any pv4 Virtual private cloud (VPC) Settings [](https://i.stack.imgur.com/K5Tca.png) Hope it helps I had a hard time with this one
null
CC BY-SA 4.0
null
2022-09-22T03:02:04.577
2022-09-28T18:08:24.097
2022-09-28T18:08:24.097
13,050,564
20,057,583
null
73,809,236
2
null
73,805,585
0
null
To be honest, several concepts are missing in the question. If that helps, you can easily achieve sort of that display by using a few extra lines of code. I guess the expected result is for homework, but it makes no sense to hide the checkbox and give no clue if it is missing. Also, there is no relation with a form, which means it is purely aesthetic. I can see you are repeating id's which is not correct. Anyway, I hope this help to your goal: ``` /* Format the style of your whole html document */ html { font-size: 23px; font-style: italic; font-family: 'Arial'; } .form-group, .checkbox { display: inline-flex; /* you might need to explore css flexbox */ margin-bottom: 5px; } .name { margin-bottom: 0; /* remove this */ background: #66bb6a !important; font-size: 1.2rem !important; color: #F7F5F5 !important; text-align: center; font-weight: 400; padding: 0; /* remove this */ border: 0; /* remove this */ text-shadow: 1px 0px 3px #6F6F6F; } .price { background: #66bb6a !important; font-weight: 400; padding: 10px; color: #fff !important; border-color: #66bb6a !important; transition-property: all; transition-duration: 0.3s; -webkit-transition-property: all; -webkit-transition-duration: 1s; } .form-group { border: 1px solid #66bb6a; } /* Modify the inputs */ input { border: 0; } label { padding: 10px; } input[type="text"] { text-align:center; font-size: 23px; font-style: italic; } ``` ``` <form role="form"> <div class="row"> <div class="form-group"> <div class="checkbox name"> <label> <input type="checkbox" value="closedqueue">Option 1</label> </div> <input type="text" class="form-control" id="queuename1"> <label for="queuename" class="price">$2.99</label> </div> </div> <div class="row"> <div class="form-group"> <div class="checkbox name"> <label> <input type="checkbox" value="closedqueue">Option 2</label> </div> <input type="text" class="form-control" id="queuename2"> <label for="queuename" class="price">$2.99</label> </div> </div> <div class="row"> <div class="form-group"> <div class="checkbox name"> <label> <input type="checkbox" value="closedqueue">Option 3</label> </div> <input type="text" class="form-control" id="queuename3"> <label for="queuename" class="price">$2.99</label> </div> </div> </form> ```
null
CC BY-SA 4.0
null
2022-09-22T04:06:10.500
2022-09-22T04:06:10.500
null
null
9,239,975
null
73,809,379
2
null
73,809,058
0
null
So in your current implementation you changing the icon based on `data.status` which is `my_name[index].data.staus`. But when changing the data after api fetched, you assigning `this.res.data.status = 0 or 1` which not relevant to what you binding on screen. So should change to: HTML: Adding index to the click handler ``` <b-col class="mt-3 mb-0 view-more d-flex align-items-center justify-content-end" @click="changeStatus(data.id, index)"> <b-icon v-if="data.status=='done'" icon="check-circle-fill" font-scale="2" variant="success"></b-icon> <b-icon v-else icon="check-circle-fill" font-scale="2" variant="secondary"></b-icon> </b-col> ``` In the Viewmodel (I do not refactor your code) something like: ``` changeStatus(id, index) { axios.post('/api/name/update_my_name',{id,id}).then(res => { if(this.my_name[index].data.status =='0'){ this.my_name[index].data.status == '1' } else { this.my_name[index].data.status == '0' } }) .catch((error) => { let error_msg = error.res.data.message; this.$bvToast.toast(error_msg,{ variant:'danger', noCloseButton: true, solid:true}) this.loading = false; }); } ```
null
CC BY-SA 4.0
null
2022-09-22T04:32:34.197
2022-09-22T04:32:34.197
null
null
6,298,705
null
73,809,639
2
null
73,785,152
-1
null
I updated the stripe keys in the env file with the a function in controller. ``` protected function updateDotEnv($key, $newValue, $delim='') { $path = base_path('.env'); // get old value from current env $oldValue = env($key); // was there any change? if ($oldValue === $newValue) { return; } // rewrite file content with changed data if (file_exists($path)) { // replace current value with new value file_put_contents( $path, str_replace( $key.'='.$delim.$oldValue.$delim, $key.'='.$delim.$newValue.$delim, file_get_contents($path) ) ); } } ``` $key is new name of variable in env and $newValue is the updated key.
null
CC BY-SA 4.0
null
2022-09-22T05:15:01.360
2022-09-22T05:15:01.360
null
null
20,041,440
null
73,810,869
2
null
58,613,492
0
null
None of the answers helped me, what did help me was making sure my NODE_ENV was set to test, since babel config is per NODE_ENV using the wrong NODE_ENV by accident that is not configured in babel config will mean you wont be using babel and the typescript files will not be transformed. It took me couple of hours to figure this one out so i hope it will save someone else the time it took me.
null
CC BY-SA 4.0
null
2022-09-22T07:32:43.480
2022-09-22T07:32:43.480
null
null
3,158,666
null
73,810,872
2
null
13,225,817
0
null
usage: start [SERVICE...] Starts the given system service, or netd/surfaceflinger/zygotes. usage: stop [SERVICE...] Stops the given system service, or netd/surfaceflinger/zygotes.
null
CC BY-SA 4.0
null
2022-09-22T07:33:14.840
2022-09-22T07:33:14.840
null
null
6,935,264
null
73,810,925
2
null
73,810,815
0
null
Make sure to enter Parameter4 as a and (sorted decending) you'll get: [](https://i.stack.imgur.com/EpjFH.png)
null
CC BY-SA 4.0
null
2022-09-22T07:38:04.997
2022-09-22T07:38:04.997
null
null
7,108,589
null
73,810,963
2
null
73,657,950
1
null
You can simply try to get the safe area top insets and use the dynamic height as you want. In my scenario, requirement was to change status bar background colour. So I did something like this: ``` let window = UIApplication.shared.windows.first let topPadding = window?.safeAreaInsets.top let statusBar = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.size.width, height: topPadding ?? 0.0)) statusBar.backgroundColor = UIColor(named: "AppPrimaryColor") UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.addSubview(statusBar) ``` Dynamic island is fun to play with. [screen shot](https://i.stack.imgur.com/VDj8z.png)
null
CC BY-SA 4.0
null
2022-09-22T07:42:28.597
2022-09-22T07:42:28.597
null
null
10,165,005
null
73,810,999
2
null
73,810,719
0
null
If using regex is okay, you can use it to replace every newline character with `'newlinechar'` and just add `'` at the start and end of your text. (matching new line was taken from [this answer](https://stackoverflow.com/a/20056634/12444149)) ``` import re text = "asd\n123\nslfdgj" text = re.sub(r"(\r\n|\r|\n)", "'\n'", text) text = f"'{text}'" print(text) ``` This example produces: ``` 'asd' '123' 'slfdgj' ```
null
CC BY-SA 4.0
null
2022-09-22T07:45:35.110
2022-09-22T07:45:35.110
null
null
12,444,149
null
73,811,759
2
null
73,808,827
2
null
You can use `fig-prefix` option to change the inline reference prefix and also `fig-title` option to change the figure caption accordingly. See [here in Quarto Documentation](https://quarto.org/docs/authoring/cross-references.html#references-1) to know more options to change the reference style. ``` --- title: "Cross Reference Prefix" format: pdf crossref: fig-prefix: "Picture" fig-title: "Picture" --- ## Quarto ![Elephant](elephant.png){#fig-elephant} See @fig-elephant for an illustration. ``` --- [](https://i.stack.imgur.com/BxQ45.png) ---
null
CC BY-SA 4.0
null
2022-09-22T08:46:59.437
2022-09-22T08:52:06.687
2022-09-22T08:52:06.687
10,858,321
10,858,321
null
73,812,036
2
null
73,811,862
0
null
Try referencing `img` instead of `image`. You are initially trying to index the `Image` object rather than the actual image data which is in `img`: ``` cv2.imwrite("image.jpg", img[y1:y2-1,x1:x2-1]) ```
null
CC BY-SA 4.0
null
2022-09-22T09:09:36.520
2022-09-22T09:09:36.520
null
null
5,609,328
null
73,812,449
2
null
27,839,105
1
null
If you want to set default color of `navigationBar`, which depends on day or night theme, for example, after setting custom colour in one of the fragments, you need to use this: ``` requireActivity().window.navigationBarColor = requireContext().getColorFromAttr(android.R.attr.navigationBarColor) ```
null
CC BY-SA 4.0
null
2022-09-22T09:39:57.723
2022-09-22T09:39:57.723
null
null
10,705,006
null
73,812,960
2
null
73,223,991
1
null
You have two options how to return your results. Firstly, you need to register your parameter `id` in custom definitions. Basically GA4 / Firebase interface works with few parameters by default. At the moment you are sending custom event with custom parameter, which GA4 / Firebase doesn't know. It is needed to tell GA4 "Hey this is my new parameter, use it in interface". You can find it here, how to register this parameter: [https://support.google.com/analytics/answer/10075209?hl=en](https://support.google.com/analytics/answer/10075209?hl=en) (part: Create custom dimensions) You can set up a BigQuery export. The property will automatically export data to BigQuery in raw format. Over there you can run a SQL query to find results. It is not needed to register parameter within GA4 / Firebase to query it in BigQuery.
null
CC BY-SA 4.0
null
2022-09-22T10:17:26.577
2022-09-22T10:17:26.577
null
null
10,862,360
null
73,812,977
2
null
13,035,192
0
null
I have a similar issue. Fail on "using System.Threading.Channels;" my solution is to add reference of " System.Threading.Tasks.Extensions.dll" [](https://i.stack.imgur.com/7Xn3W.png)
null
CC BY-SA 4.0
null
2022-09-22T10:18:40.003
2022-09-22T10:18:40.003
null
null
4,988,586
null
73,813,121
2
null
73,812,971
1
null
try: ``` =INDEX(IF(TRIM(FLATTEN(QUERY(TRANSPOSE(L2:P),,9^9)))="",, IF(REGEXMATCH(FLATTEN(QUERY(TRANSPOSE(L2:P),,9^9)), "(?i)black"), "BLACK", "COLOR"))) ``` [](https://i.stack.imgur.com/95SXH.png) [](https://i.stack.imgur.com/6P6qw.png) or: ``` =INDEX(IF(LEN(L2:L&M2:M&N2:N&O2:O&P2:P), UPPER(MAP(L2:L, M2:M, N2:N, O2:O, P2:P, LAMBDA(L,M,N,O,P, IFS(L="BLACK",L,M="BLACK",M,N="BLACK",N,O="BLACK",O,P="BLACK",P,TRUE,"COLOR")))), )) ``` [](https://i.stack.imgur.com/JbjHn.png) --- ## update: ``` =INDEX(QUERY(IF(TRIM(FLATTEN(QUERY(TRANSPOSE(L2:P),,9^9)))="",, IF(REGEXMATCH(FLATTEN(QUERY(TRANSPOSE(L2:P),,9^9)), "(?i)\bblack\b"), "BLACK", "COLOR")), "select Col1,count(Col1) where Col1 is not null group by Col1 label count(Col1)''")) ``` [](https://i.stack.imgur.com/sjzbI.png)
null
CC BY-SA 4.0
null
2022-09-22T10:30:33.233
2022-09-22T11:10:08.573
2022-09-22T11:10:08.573
5,632,629
5,632,629
null
73,813,150
2
null
57,290,366
1
null
@kuklyy answer didnt work for me. Try this: You should wrap {{theme.themeDescription}} in p tag. .html ``` <div class="themeSelection"> <mat-radio-group class="radioButtons"> <mat-radio-button class ="radBtn" *ngFor="let theme of themeList" [value]="theme.themeName"> <mat-expansion-panel> <mat-expansion-panel-header> <mat-panel-title> {{theme.themeName}} </mat-panel-title> </mat-expansion-panel-header> <p class="myClass"> {{theme.themeDescription}} </p> </mat-expansion-panel> </mat-radio-button> </mat-radio-group> </div> ``` And then in .css ``` .myClass { word-break: break-word; } ```
null
CC BY-SA 4.0
null
2022-09-22T10:33:32.550
2022-09-22T10:33:32.550
null
null
14,413,934
null
73,813,488
2
null
42,685,288
0
null
I am having same issue. it's resolved using following terminal command ``` chmod a+x "path of permission denied" ```
null
CC BY-SA 4.0
null
2022-09-22T11:04:18.293
2022-09-22T11:04:18.293
null
null
4,852,079
null
73,813,679
2
null
7,009,463
-1
null
These steps worked for me - - `Device Manager`- - `Cold Boot Now`
null
CC BY-SA 4.0
null
2022-09-22T11:18:41.207
2022-09-22T11:18:41.207
null
null
7,977,448
null
73,813,789
2
null
29,201,059
0
null
Just a reference, as this helped me out so posting here to help others. Pressing CTRL + F opens up "Quick Find" which will open a small dialog box in the top corner of the file and will jump around all the files you are searching. Pressing SHIFT + CTRL + F opens up "Find in Files" which will open up a bigger dockable dialog box which you can have floating or dock to the windows. This does take slightly longer to search, but im sure if you configure the find settings it will be quicker. The plus for me was the docking aspect. This is on VS 2019, not sure what other versions this might be on.
null
CC BY-SA 4.0
null
2022-09-22T11:27:03.597
2022-09-22T11:27:03.597
null
null
2,653,438
null
73,813,785
2
null
59,663,435
0
null
I have run into the very same issue recently, and almost decided to give up, but finally, I have managed to find a way to make it work! The thing is that you need to execute the Ajax call in the following way: ``` _createEnvelops: function () { var deferred = $.Deferred(); var oTemplateData = this._getTemplateData(); var oFormData = new FormData(); oFormData.append('envelope', JSON.stringify(oTemplateData)); var settings = { "async": true, "crossDomain": true, "url": '/docusign/envelopes', "method": "POST", "data": oFormData, processData: false, contentType: false, "headers": { "Authorization": sAuthToken } }; $.ajax(settings).done(function (response) { deferred.resolve(response); }.bind(this)).fail(function (error) { deferred.reject(error); }.bind(this)); return deferred; }, ``` Maybe it will be useful for someone in the future ;)
null
CC BY-SA 4.0
null
2022-09-22T11:26:49.557
2022-09-22T11:26:49.557
null
null
2,477,513
null
73,813,939
2
null
23,664,510
0
null
For me, It's working ``` html, body { overflow-x: hidden; margin:0px; padding:0px; } ```
null
CC BY-SA 4.0
null
2022-09-22T11:37:13.093
2022-10-07T11:47:20.543
2022-10-07T11:47:20.543
20,001,401
20,001,401
null
73,813,975
2
null
73,813,898
3
null
`key` is a reserved prop in a React component. You won't be able to access it in child component. If you need it, give it some other name.
null
CC BY-SA 4.0
null
2022-09-22T11:39:14.307
2022-09-22T11:39:14.307
null
null
8,822,610
null
73,813,989
2
null
73,813,898
2
null
The `key` property is used by React under the hood, and is not exposed to us inside the component. You can see more info in the official documentation: [https://reactjs.org/docs/lists-and-keys.html#keys-must-only-be-unique-among-siblings](https://reactjs.org/docs/lists-and-keys.html#keys-must-only-be-unique-among-siblings) (`Keys serve as a hint to React but they don’t get passed to your components. If you need the same value in your component, pass it explicitly as a prop with a different name`)
null
CC BY-SA 4.0
null
2022-09-22T11:40:02.040
2022-09-22T11:40:02.040
null
null
2,606,899
null
73,814,213
2
null
73,812,971
1
null
You could do it like this in I2 say ``` =countif(byrow(L2:P,lambda(r,countifs(r,"<>Black",r,"<>"))),">"&0) ``` and in J2 ``` =countif(byrow(L2:P,lambda(r,counta(r))),">"&0)-I2 ``` [](https://i.stack.imgur.com/aKGbM.png) Add a sheet reference if you need the formula to be in a different sheet e.g. ``` =countif(byrow(Sheet6!L2:P,lambda(r,countifs(r,"<>Black",r,"<>"))),">0") =countif(byrow(Sheet6!L2:P,lambda(r,counta(r))),">0")-A2 ``` if in A2 and B2 of a separate sheet. If your database gets large and you get problems with Byrow/Lambda you can revert back to the more conventional Mmult: ``` =ArrayFormula(countif(mmult(n((L2:P<>"Black")*(L2:P<>"")),sequence(5,1,1,0)),">0")) ``` and ``` =ArrayFormula(countif(mmult(n(L2:P<>""),sequence(5,1,1,0)),">0"))-C2 ``` assuming previous formula is in C2.
null
CC BY-SA 4.0
null
2022-09-22T11:54:59.607
2022-09-23T11:15:22.377
2022-09-23T11:15:22.377
3,894,917
3,894,917
null
73,814,772
2
null
73,814,729
0
null
It seems I've found the answer. I had to add the intended path name in the path link above. If you have a similar issue, take note ![answer/correction to the error](https://i.stack.imgur.com/qD38S.png)
null
CC BY-SA 4.0
null
2022-09-22T12:38:13.373
2022-09-30T01:11:41.640
2022-09-30T01:11:41.640
3,025,856
18,287,821
null
73,815,093
2
null
73,299,906
0
null
Seems like a VSCode issue: [https://github.com/microsoft/vscode/issues/157322](https://github.com/microsoft/vscode/issues/157322) As mentioned in [this comment](https://github.com/microsoft/vscode/issues/157322#issuecomment-1211092343), a temporal solution meanwhile the issue is fixed is to exclude the `<` `>` pair from the [colorizedBracketPairs](https://github.com/microsoft/vscode/blob/433e5f7ee4504e27ea283fefb72772aa4b698b2e/extensions/typescript-basics/language-configuration.json#L102). Add the following to your [settings.json](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson): ``` "editor.language.colorizedBracketPairs": [ ["{", "}"], ["[", "]"], ["(", ")"] ], ```
null
CC BY-SA 4.0
null
2022-09-22T13:00:10.570
2022-09-22T13:00:10.570
null
null
5,442,142
null
73,815,263
2
null
73,813,480
0
null
You can match values of two arrays by their index. In your case, I think it's easiest to use [Array.map()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map) to return a transformed array based on the one you loop trough. So for example, if you have two arrays called `namesArray` and `valuesArray`, do the following: ``` const validationResults = valuesArray.map((value, index) => { return { valid: checkValidity(value), // or whatever your validation function is called name: namesArray[index] // match the index of the namesArray with the index of this one (valuesArray) }; // or `return namesArray[index] + ', valid: ' + checkValidity(value)` }); ``` This loops through the `valuesArray`, and `validationResults` will then be an array of what you return per each item in the map function above. One important note is that this assumes the arrays are both in the same order . If you want to sort them, for instance, do this this.
null
CC BY-SA 4.0
null
2022-09-22T13:11:09.623
2022-09-22T13:11:09.623
null
null
251,961
null
73,815,679
2
null
73,805,429
0
null
Checked it & it looks like something related to how you have written the HTML [check here](https://stackoverflow.com/a/71870995/10971131)
null
CC BY-SA 4.0
null
2022-09-22T13:38:53.313
2022-09-22T13:38:53.313
null
null
10,971,131
null
73,815,731
2
null
62,743,256
0
null
when you created your store procedure, you build the exec in the next line for test, you executed together Your problem is that the "EXEC sp_name" command is inside the stored procedure itself, so it keeps running in a loop, still that it's after of the end. you can do: create sp_name... begin ... end exec(sp_name) that will do the exec run separated
null
CC BY-SA 4.0
null
2022-09-22T13:41:45.640
2022-11-18T13:02:58.487
2022-11-18T13:02:58.487
20,062,043
20,062,043
null
73,815,941
2
null
73,768,917
0
null
The XML file in your project may contain an error. The reason may be a font issue or a file not linking correctly with your XML layout. This is for your reference on how to find errors. [](https://i.stack.imgur.com/wq8Xg.png) Hope you find it useful.
null
CC BY-SA 4.0
null
2022-09-22T13:56:31.797
2022-09-22T13:56:31.797
null
null
8,361,616
null
73,816,130
2
null
17,759,990
0
null
I've been using vipsthumbnail for years. I use it to resize 700MP images (enormous 16,384 x 42,731 = 2.6BG if loaded into php) to a viewable size. This takes about 10 seconds to generate a small preview that's 3000px tall. [https://www.libvips.org/API/current/Using-vipsthumbnail.html](https://www.libvips.org/API/current/Using-vipsthumbnail.html) By specifying one dimension, it keeps the original aspect ratio and limits the x or y, which ever is greater ``` $exec_command = sprintf('vipsthumbnail --size 3000 "%s" -o "%s"', $source, $destination); exec( $exec_command, $output, $return_var ); if($return_var != 0) { // Handle Error Here } ``` I was still using php to resize smaller images, but my system recently generated a secondary image that was 15,011 x 15,011 (1.075GB uncompressed). My PHP settings allow for 1GB of ram, and it was crashing!. I increased PHP's memory limit over time to deal with these images. I finally converted this function to also use vipsthumbnail. These smaller images only take about 100ms each to generate. Should have done this a long time ago. ``` $exec_command = sprintf('vipsthumbnail --size 150 "%s" -o "%s"', $src, $dst); exec( $exec_command, $output, $return_var ); ```
null
CC BY-SA 4.0
null
2022-09-22T14:10:19.827
2022-09-22T14:10:19.827
null
null
692,331
null
73,816,483
2
null
73,816,250
0
null
You need to rebase `br2` to get rid of the branch if `br1` was rewritten to get rid of `C`. Assuming that both branches are local (and if they are remote adjust the instructions to use them): ``` git rebase old-commit-for-E br2 --onto new-commit-for-E-or-br1 ``` `old-commit-for-E` is the old commit of `E` as you have it in `br2`. Then if you feel like placing the branch on top of `br1`, use it as the parameter of `--onto`... otherwise, get the commit id for `E` and use it there.
null
CC BY-SA 4.0
null
2022-09-22T14:33:32.377
2022-09-22T14:33:32.377
null
null
2,437,508
null
73,816,824
2
null
73,815,295
1
null
Plotly may ignore you regardless of what you do because it looks like you are asking for almost 300 tick labels on the x-axis. However, when you use `ggplotly`, date fields become character fields. (I don't know if this is from `ggplot` or if it's a Plotly-ism.) After rendering the `ggplotly` object, you can replace the `x` in each trace and replace the majority of the arguments for `layout.xaxis`. Alternatively, you may find it to be a lot easier if you create this in Plotly, to begin with. I've added the data I used because your question is not reproducible. It looks like you're new to SO; welcome to the community! If you want great answers quickly, it's best to make all questions reproducible. For example, sample data from the output of `dput()` or `reprex::reprex()`. Check it out: [making R reproducible questions](https://stackoverflow.com/q/5963269). In the following code, the only parts you need to create the plot without the aesthetics are the first two piped: `plot_ly()` and `add_lines()`. I added comments to explain what different aspects of this code is doing. Additionally, I've broken down some of this a bit further after the code and plot image. ``` library(tidyverse) library(plotly) # Periode <- as.Date(website$Datum) # data not provided # Index <- website$KonSens set.seed(353) website <- data.frame( Periode = sample(seq(as.Date("1998-03-31"), as.Date("2022-06-30"), by = "week"), 50), Index = sample(runif(100, -4.5, 2.5), 50)) %>% arrange(Periode) plot_ly(type = "scatter", mode = "markers", marker = list(color = "#7AA489", size = 8, line = list(width = 2, color = "#003478")), data = website, x = ~Periode, y = ~Index) %>% add_lines(line = list(width = 5, color = "#7AA489")) %>% layout(xaxis = list(dtick = "M18", # every 18 months tickformat = "%b %Y"), # Abbrev Month, 4-digit year yaxis = list(range = c(-6, 3), # show this range zeroline = F, # remove horizontal line at 0 showline = T), # vertical line along y-axis showlegend = F) %>% # no legend htmlwidgets::onRender("function(el, x){. # make the axis titles BOLD gimmeX = document.querySelector('g.infolayer g.g-xtitle text'); gimmeY = document.querySelector('g.infolayer g.g-ytitle text'); gimmeX.style.fontWeight = 'bold'; gimmeY.style.fontWeight = 'bold'; }") %>% rangeslider(borderwidth = 1) ``` [](https://i.stack.imgur.com/DkYaM.png) ### Specifying the Range on the y-axis In Plotly, you won't need to set breaks and labels. You just need to define the range. If that's all you designated in the `layout`, it would like something like this. ``` layout(yaxis = list(range = c(-6, 3)) ``` ### Non-Dynamic Date x-axis Tick Text Formatting Labels on the x-axis can be specified to be labeled by month. However, like a commenter mentioned, you loose the dynamic date scaling done when you zoom. You can actually set the scaling date format for zooming ranges, as well. (I won't go into that in this answer, though.) To specify the labels on the x-axis as every month by month, you would use `layout.xaxis.dtick = "M1"`, every 18 months is `M18`, and so on. If you wanted to specify the appearance as the month and year, you can use the same formatting as used in `as.Date`, where `%b` is an abbreviated month name, and `%Y` is a four-digit year. If this was all you needed to set in the `layout`, it would look like this. ``` layout(xaxis = list(dtick = "M18", # every 18 months tickformat = "%b %Y")) # Abbrev Month, 4-digit year ``` ### Bold Axis Labels Additionally, there isn't a parameter you can set to make the axis labels bold. It doesn't really matter if it's `ggplotly` or `plot_ly`. However, you can use `htmlwidgets::onRender` to make this happen. ``` htmlwidgets::onRender("function(el, x){ gimmeX = document.querySelector('g.infolayer g.g-xtitle text'); gimmeY = document.querySelector('g.infolayer g.g-ytitle text'); gimmeX.style.fontWeight = 'bold'; gimmeY.style.fontWeight = 'bold'; }") ```
null
CC BY-SA 4.0
null
2022-09-22T14:57:44.720
2022-09-22T14:57:44.720
null
null
5,329,073
null
73,817,597
2
null
24,413,517
0
null
I had a similar issue where the image would not refresh to anew image regardless of methods called to try to force it. For some reason only happened when the PictureBox was not set to "Dock:FILL" My fix was to both dispose the image and to assign it to NULL and then apply the new cloned image as shown below. ``` Public Sub ApplyLastImage() If ScreenPicture.Image IsNot Nothing Then ScreenPicture.Image.Dispose() ScreenPicture.Image = Nothing End If ScreenPicture.Image = CType(LastImage.Clone, Drawing.Image) ScreenPicture.Update() End Sub ```
null
CC BY-SA 4.0
null
2022-09-22T15:56:57.260
2022-09-22T15:56:57.260
null
null
813,266
null
73,817,966
2
null
30,294,132
1
null
You can use `100vh` (Viewport-height), to set your page is full. For example, on the last page. You have an empty white space below that I want to fill with color. You can try to use the `vh`. ``` @media print { height: 100vh; min-height: 100%; background: #CCC; } ```
null
CC BY-SA 4.0
null
2022-09-22T16:28:08.793
2022-09-28T14:40:55.027
2022-09-28T14:40:55.027
7,405,706
15,103,163
null
73,818,371
2
null
30,294,132
0
null
``` @media print{ body,html{ height:100%; min-height:100%; background:#ccc; } } ```
null
CC BY-SA 4.0
null
2022-09-22T17:04:47.660
2022-09-22T17:04:47.660
null
null
13,723,867
null
73,818,382
2
null
73,813,480
0
null
Looking up and registering the values in a `Map` seems like the best answer. ``` // ... const serialdata = await response.text(); const seriallookup = new Map(); // Set all Serial values to Names for (let s in serialdata.split("\n")) { let data = s.split(','); seriallookup.set(data[0], data[1]); } ``` Using this, checking for a serial's existance could be done with `.has()` ``` if (inputserialnumber.length == 7 && seriallookup.has(inputserialnumber)) { ``` And set to the elements text using ``` document.getElementById('validity').innerHTML = serialdata.get(inputserialnumber); ``` If the `.csv` file most likely wouldn't change between multiple requests (or if you only send just one request), you should probably initialize and request the data outside of the function.
null
CC BY-SA 4.0
null
2022-09-22T17:05:53.410
2022-09-22T21:06:01.190
2022-09-22T21:06:01.190
19,857,885
19,857,885
null
73,818,652
2
null
50,927,989
0
null
Use the absolute file path with Microsoft.Office.Interop.Excel: ``` String fullFilepath = Path.GetFullPath(relativePath); ```
null
CC BY-SA 4.0
null
2022-09-22T17:31:07.093
2022-09-22T17:31:07.093
null
null
4,335,677
null
73,818,979
2
null
27,298,934
0
null
I added some clip paths to [@Vittorino fernandes](https://stackoverflow.com/users/4025556/vitorino-fernandes) code, to avoid white space between pseudos and make it sharper. I added some 1px adjustments to avoid bad svg rendering problems. You can use the variable called shadow-dimension to set the shadow width and height. I Put it on a codePen: [https://codepen.io/silviamalavasi/pen/XWqeWEq](https://codepen.io/silviamalavasi/pen/XWqeWEq) ``` :root { --shadow-dimension: 20px; --blue: #0039a6; } .box-container { position: relative; } .box-container>div { border: 2px solid var(--blue); } .box-container>div:after, .box-container>div:before { content: ''; background-color: var(--blue); position: absolute; } .box-container>div:before { width: calc(var(--shadow-dimension) + 1px); height: calc(100% + 100px + 1px); left: calc(var(--shadow-dimension) * -1); transform: skewy(-45deg); top: calc(0.5*var(--shadow-dimension)); clip-path: polygon(0% 0%, 100% 0%, 100% calc(100% - 100px - 2px + var(--shadow-dimension)), 0% calc(100% - 100px - 2px)); } .box-container>div:after { width: calc(100% + 100px); height: calc(var(--shadow-dimension) + 1px); left: calc(-0.5*var(--shadow-dimension) - 100px); bottom: 1px; transform: translateY(100%) skewx(-45deg); clip-path: polygon(100px 0%, 100% 0%, 100% 100%, calc(100px + 2px) 100%); } ```
null
CC BY-SA 4.0
null
2022-09-22T18:02:27.313
2022-09-22T18:02:27.313
null
null
2,889,846
null
73,819,102
2
null
72,233,145
0
null
You are attempting to run `eth-sig-util` in the frontend. `eth-sig-util` depends on a Nodejs structure called `Buffer`. Try using Metamask's `ethereum` API [https://docs.metamask.io/guide/signing-data.html](https://docs.metamask.io/guide/signing-data.html)
null
CC BY-SA 4.0
null
2022-09-22T18:16:57.830
2022-09-22T18:16:57.830
null
null
4,428,008
null
73,819,806
2
null
15,620,454
-1
null
I had a `TableLayoutPanel` on a `UserControl`, docked in Fill mode, with all rows on the `TableLayoutPanel` set to AutoSize. This `UserControl` would then dynamically get put on a panel, again in Fill mode, to show it to the user when needed. I put the `UserControl` on `AutoScroll`, but that alone did not solve it. In the end, I solved it by going over all controls in the `TableLayoutPanel`, storing the extremities, and baking that into a `Size` to put in my `UserControl`'s `AutoScrollMinSize`: ``` private void AdjustPanelSize(ScrollableControl panel, TableLayoutPanel tableLayoutPanel) { int maxX = 0; int maxY = 0; foreach (Control c in tableLayoutPanel.Controls) { maxX = Math.Max(maxX, c.Location.X + c.Width); maxY = Math.Max(maxY, c.Location.Y + c.Height); } panel.AutoScrollMinSize = new Size(maxX, maxY); } ``` This worked, and it also has the advantage that it can be called if there would ever be controls dynamically added or removed from the `TableLayoutPanel`.
null
CC BY-SA 4.0
null
2022-09-22T19:29:53.043
2022-09-22T19:29:53.043
null
null
395,685
null
73,819,815
2
null
73,819,785
1
null
`realloc` only reserves memory for use. Nothing in the C standard requires a C implementation to prevent you from using, or trying to use, memory you have not reserved. When your program executes `arr[0] = (void *)1;`, it writes to memory it has not reserved. If nothing else is using that memory, you may “get away with it.” Memory allocation software generally does not reserve memory in one-byte pieces, so, when you ask for one byte, it actually provides whatever its smallest allocation unit is. (This does not mean you can safely use that memory. Compiler optimizers have become increasingly more aggressive and “knowledgeable” about C rules and semantics, so optimization effects may make a program that violates the rules go awry even if the memory is available.) The screenshot does not show that only four bytes are written for that assignment. The high bytes are zeros, so they show up as “0x00000000”. The C implmentation you are using stores the low-value bytes in the low-addressed word and the high-value bytes in the high-addressed word, so a pointer to address 1 is stored as 0x00000001 in the first four bytes and 0x00000000 in the second four bytes.
null
CC BY-SA 4.0
null
2022-09-22T19:31:18.127
2022-09-22T19:31:18.127
null
null
298,225
null
73,820,000
2
null
73,819,785
0
null
It is undefined behavour. In C nothing prevents you from writing to the invalid or not allocated memory. > it seems that the first assignment a[0] = 1 takes up only the first 4B chunk even though void*s are 8Bytes. No, it is called little endian and less significant bytes are stored first. example: ``` #include <stdio.h> #include <stdlib.h> #include <string.h> int main(void) { unsigned long long x[] = {1,2,3}; unsigned y[sizeof(x) / sizeof(unsigned)]; memcpy(y,x,sizeof(x)); for(int i = 0; i < sizeof(y) / sizeof(y[0]); i ++) printf("0x%08x ", y[i]); printf("\n"); } ``` result: ``` 0x00000001 0x00000000 0x00000002 0x00000000 0x00000003 0x00000000 ``` [https://godbolt.org/z/a7vrrPWGx](https://godbolt.org/z/a7vrrPWGx) You can also see it on the byte level: [https://godbolt.org/z/b7xMMfxhc](https://godbolt.org/z/b7xMMfxhc) or [https://godbolt.org/z/scT7barvs](https://godbolt.org/z/scT7barvs)
null
CC BY-SA 4.0
null
2022-09-22T19:53:28.383
2022-09-22T20:00:24.590
2022-09-22T20:00:24.590
6,110,094
6,110,094
null
73,820,017
2
null
19,825,227
2
null
I was having a similar issue that `Composer` was hanging and leaving it for more than an hour did not help. I executed `composer -vvv update` and from the resulting log I saw that the requests to github were giving a response of 401, authentication failed. I resolved it by logging into `Github` and generating a new OAuth token [over here](https://github.com/settings/tokens). I then copied the token and pasted it into this command: ``` composer config -g github-oauth.github.com <oauthtoken> ``` After executing this command, `composer install` then worked correctly and completed in less than a minute.
null
CC BY-SA 4.0
null
2022-09-22T19:54:35.797
2022-09-22T19:54:35.797
null
null
649,497
null
73,820,094
2
null
73,819,529
0
null
If i understand you correctly, you want to make select option like in the image. if that's the case, Kindly check some changes below - if that helps. I have added the icon using pseudo element ::after ``` select{ padding: 5px 30px 5px 5px; appearance: none; width: 150px; border: 1px solid #bebebe; } .select, .select-dark{ position: relative; } .select::after { content: '\25BC'; position: absolute; top: 5px; right: 10px; color: #6BBDD7; cursor:pointer; pointer-events:none; transition:.25s all ease; } .select-dark::after { content: '\25BC'; position: absolute; top: 0; right: 0; background-color: #117CC0; color: #fff; cursor: pointer; pointer-events: none; transition: .25s all ease; padding: 6px 6px 3px } ``` ``` <div class="select-div" style="display: flex;gap:20px"> <div class="select"> <select name="country" class="form-control" id="country"> <option value="USA" label="United States">United States</option> <option value="CN" label="Canada">Canada</option> </select> </div> <div class="select"> <select name="language" class="form-control" id="language"> <option value="USA" label="English">English</option> <option value="Mexico" label="Spanish">Spanish</option> </select> </div> <div class="select-dark"> <select name="search" class="form-control" id="search"> <option value="search" label="Search">Search</option> </select> </div> </div> ```
null
CC BY-SA 4.0
null
2022-09-22T20:01:55.093
2022-09-22T20:01:55.093
null
null
12,808,836
null
73,820,604
2
null
11,295,661
1
null
When you update any changes in the credential, make sure you could see the client ID and secret in the dashboard before downloading. Google cloud takes at the least 10 seconds to regenerate the client id and add it in the json. Once json is downloaded you can check for `client_secret` to be present. [](https://i.stack.imgur.com/XnYHA.jpg)
null
CC BY-SA 4.0
null
2022-09-22T20:58:33.943
2022-09-22T20:58:33.943
null
null
6,769,119
null
73,821,022
2
null
26,839,898
2
null
In Idea 2022.2.2: project view -> gear icon -> -> [](https://i.stack.imgur.com/77SOh.png)
null
CC BY-SA 4.0
null
2022-09-22T21:49:50.683
2022-09-22T21:49:50.683
null
null
2,147,927
null
73,821,137
2
null
60,976,684
0
null
I had this issue as well. Another alternative solution that I haven't seen mentioned is to just create a new database migration. If you have the [EF Core CLI tools](https://learn.microsoft.com/en-us/ef/core/cli/dotnet) installed, you can just run `dotnet ef migrations add AddedEFCoreTables` followed by `dotnet ef database update`. This will add the SQL tables needed for user authentication with ASP.NET Core Identity and EF Core. However, I think this is only useful if you're working with a persistent database and don't want to keep building up the database every time.
null
CC BY-SA 4.0
null
2022-09-22T22:08:45.913
2022-09-22T22:08:45.913
null
null
19,376,382
null
73,821,791
2
null
20,386,331
0
null
My problem was with Glide. Pasting this in build.gradle and execute "Sync project with gradle files" works perfectly: ``` dependencies { implementation 'com.github.bumptech.glide:glide:4.12.0' // Glide v4 uses this new annotation processor -- see https://bumptech.github.io/glide/doc/generatedapi.html annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0' } ``` Hope this help someone.
null
CC BY-SA 4.0
null
2022-09-23T00:07:34.713
2022-09-23T00:07:34.713
null
null
14,374,912
null
73,822,119
2
null
20,335,378
0
null
You can follow these steps: I found this solution and it worked for me.
null
CC BY-SA 4.0
null
2022-09-23T01:24:39.447
2022-09-23T01:24:39.447
null
null
16,780,383
null
73,822,200
2
null
73,822,123
0
null
Just add a margin to your html element that contains your 'Header' text, and some margins to the button. This is a good resource for that: [https://www.w3schools.com/css/css_margin.asp](https://www.w3schools.com/css/css_margin.asp)
null
CC BY-SA 4.0
null
2022-09-23T01:41:36.087
2022-09-23T01:41:36.087
null
null
12,121,325
null
73,822,326
2
null
73,822,123
0
null
`gap` style property is for `display: flex`, but you can use `margin-bottom` for this, here is an example. ### HTML ``` <div> <div class="header"> <h2>Header</h2> </div> <h1>Header</h1> <div> ``` ### CSS ``` .header { margin-bottom: 50px; } ```
null
CC BY-SA 4.0
null
2022-09-23T02:09:46.933
2022-09-28T12:26:17.280
2022-09-28T12:26:17.280
15,721,671
13,553,914
null
73,822,354
2
null
73,822,272
3
null
Try increasing height or reducing top/bottom padding. Seeing your HTML would help...
null
CC BY-SA 4.0
null
2022-09-23T02:16:19.717
2022-09-23T02:16:19.717
null
null
20,056,500
null
73,822,428
2
null
17,721,668
0
null
I wanted to clarify a few things about your question. Your question reads "Tell Sidekiq to use all available Heroku workers". In fact, for each Dyno, a sidekiq process will execute using a command like `bundle exec sidekiq -e production -C config/sidekiq.yml`. Each one of these Sidekiq processes can handle multiple threads as specified in the `config/sidekiq.yml` file with a line like: `:concurrency: 3` which is what the Sidekiq docs recommend for a Heroku standard-2x dyno (read here for more details [https://github.com/mperham/sidekiq/wiki/Heroku](https://github.com/mperham/sidekiq/wiki/Heroku)), which only has 1gb of memory. But technically you don't need to tell Sidekiq to use all available Heroku processes. There is another key element of this, which is the Redis server. Our main app will publish messages to a Redis server. Each Sidekiq process running on a given Dyno can be configured with the same Queue and thus all are subscribed to that Redis queue and pull the messages from the Queue. This is clearly stated by the creator of Sidekiq from the Sidekiq github page: [https://github.com/mperham/sidekiq/issues/3603](https://github.com/mperham/sidekiq/issues/3603). There are a couple of key points to share the load. First restrict the concurrency of a given Sidekiq process to a number like I mentioned above. Second, you can also limit the connections to the Redis server from within `Sidekiq.configure_client`. Finally, think of the Heroku load balancing somewhat different from how ALB in AWS works. ALB is a round robin that distributes traffic to instances in Target Groups based on certain metrics defined in Launch Templates and Auto Scaling Groups, such as vCPU utilization, memory utilization and read/write io. Rather the load balancing here is more like a publish-subscribe system where Sidekiq instances take work when they are able to and based on their restrictions both on concurrency and connection limits to the Redis server. Finally, Heroku discourages long running jobs. The longer your job runs the higher the amount of memory it will eat up. Heroku dynos are expensive. The standard-2x is 4x the cost of a t3.micro in AWS for the same vCPU and Memory (1gb). Furthermore, in AWS you can create a spot fleet, where you purchase compute for 10 percent of the cost of its on-demand price and then execute these spot instances as batch jobs. In fact, AWS also has a service called AWS Batch. The spot fleet option doesn't exist in Heroku. Therefore, it's important to keep price in mind and thus how long the job runs. Read this article here where Heroku delineates why it is bad running long running jobs in Heroku environment: [https://devcenter.heroku.com/articles/scaling#understanding-concurrency](https://devcenter.heroku.com/articles/scaling#understanding-concurrency). Try to keep a job under 2 minutes.
null
CC BY-SA 4.0
null
2022-09-23T02:30:53.923
2022-09-23T03:13:00.410
2022-09-23T03:13:00.410
4,501,354
4,501,354
null
73,822,722
2
null
73,822,617
0
null
Extract must have a date to extract something from, and not the name of the day of the week (parse_date is not working as well - it wont create a date from day of the week). What you might do is create a inline table with day name and day value, and then join those two tables.
null
CC BY-SA 4.0
null
2022-09-23T03:34:10.490
2022-09-23T03:34:10.490
null
null
11,949,273
null
73,822,811
2
null
73,822,334
0
null
look like beautiful soup not work correctly with standart tag format but when you try print firm without .text the data is exist so u can do simple substring operation : i try is work here the code: ``` from bs4 import BeautifulSoup import requests url = "https://www.point2homes.com/MX/Real-Estate-Listings.html?LocationGeoId=&LocationGeoAreaId=&Location=San%20Felipe,%20Baja%20California,%20Mexico" headers = {"User-Agent": "Mozilla/5.0","Content-Type": "application/json"} page_scrape = requests.get(url, headers=headers) soup = BeautifulSoup(page_scrape.content, 'html.parser') lists = soup.find_all('article') for list in lists: address = list.find('div', class_="address-container").text try: beds = list.find('li', class_="ic-beds").text except: print("Data Not Logged") try: baths = list.find('li', class_="ic-baths").text except: print("Data not logged") try: size = list.find('li', class_="ic-sqft").text except: print("Data not logged") type = list.find('li', class_="property-type ic-proptype").text price = list.find('span', class_="green").text agent = list.find('div', class_="agent-name").text firmstr = list.find('div', class_="agent-company") firm='' if firmstr is not None: spl_word = '>' firmstr2=str(firmstr) res = firmstr2.split(spl_word, 1) splitString = res[1] res2 = splitString.split('<', 1) splitString2 = res2[0] firm=splitString2 info = [address, beds, baths, size, type, price, agent, firm] print(info); ```
null
CC BY-SA 4.0
null
2022-09-23T03:52:14.220
2022-09-23T03:52:14.220
null
null
9,755,893
null
73,823,058
2
null
73,822,617
0
null
`PARSE_DATE` does not find a date for days of week alone, returning '1970-01-01', which results 1 if we extract the day. Would, thus, define the correspondence as a 2nd CTE: ``` , b as ( select 'Monday' name_of_day, 1 day_number union all select 'Tuesday' name_of_day, 2 day_number union all select 'Wednesday' name_of_day, 3 day_number union all select 'Thursday' name_of_day, 4 day_number union all select 'Friday' name_of_day, 5 day_number union all select 'Saturday' name_of_day, 6 day_number union all select 'Sunday' name_of_day, 7 day_number ) ``` and then order by day_number after joining a and b: ``` select a.user_type , a.name_of_day , a.user_count , a.percentage , a.avg_trip_duration , b.day_number from a join b on b.name_of_day = a.name_of_day order by user_type, day_number ``` [https://console.cloud.google.com/bigquery?sq=1013309549723:5a56ae1b50f948b4830e58b2a449118a](https://console.cloud.google.com/bigquery?sq=1013309549723:5a56ae1b50f948b4830e58b2a449118a)
null
CC BY-SA 4.0
null
2022-09-23T04:40:10.487
2022-09-23T04:40:10.487
null
null
7,865,030
null
73,823,132
2
null
73,816,965
0
null
Use below ``` select *, ( select count(*) > 0 from unnest(split(Breakfast, ' ')) word1 join unnest(split(Lunch, ' ')) word2 on lower(trim(word1)) = lower(trim(word2)) ) result from Recipes ``` if applied to sample data in your question - output is [](https://i.stack.imgur.com/E8T0N.png)
null
CC BY-SA 4.0
null
2022-09-23T04:53:42.603
2022-09-23T04:53:42.603
null
null
5,221,944
null
73,823,214
2
null
73,811,762
0
null
You can create your own shape using [https://editor.method.ac/](https://editor.method.ac/) and save as a Image, so you can get a SVG file as a output. After creating your shape as a SVG, you can add this SVG as a Vector Asset in you android app drawable folder from `app->New->Vector Asset` In opened dialog for vector asset set the below detail and create xml for svg. ``` Asset Type : Local file Name : your desired xml file name Path : SVG file path ``` So now you can use this xml in your code.
null
CC BY-SA 4.0
null
2022-09-23T05:08:00.913
2022-09-23T05:08:00.913
null
null
2,617,062
null
73,823,391
2
null
73,823,238
0
null
I solved this issue by myself! I found that 'outerHTML' could be a keyword to get what I wanted. Instead of ``` Resultstring = Selenium.FindElementByCss(".LC20lb.MBeuO.DKV0Md").Text ``` I tried ``` Resultstring = Selenium.FindElementByCss(".LC20lb.MBeuO.DKV0Md").attribute("outerHTML") ``` and got I wanted.
null
CC BY-SA 4.0
null
2022-09-23T05:32:21.467
2022-09-23T05:32:21.467
null
null
18,971,988
null
73,823,728
2
null
73,823,564
2
null
As far as I'm aware, pandas doesn't really support merged cells/cells spanning multiple rows in the same way as Excel/HTML do. A pandas-esque way to include the total row for a single column would be something like the following: ``` import pandas as pd columns = ['Student ID', 'Course ID', 'Marks'] data = [(103, 201, 67), (103, 203, 67), (103, 204, 89)] df = pd.DataFrame(data, columns=columns) df.at['Total marks', 'Marks'] = df['Marks'].sum() print(df) ``` (per [this answer](https://stackoverflow.com/a/41286607/17568469)) This gives you: ``` Student ID Course ID Marks 0 103.0 201.0 67.0 1 103.0 203.0 67.0 2 103.0 204.0 89.0 Total marks NaN NaN 223.0 ``` For HTML output like the image you provided, it looks like you would have to edit the HTML after exporting from pandas ([this thread](https://stackoverflow.com/questions/49533330/pandas-data-frame-how-to-merge-columns) talks about columns but I believe the same applies for merging cells in rows).
null
CC BY-SA 4.0
null
2022-09-23T06:24:51.060
2022-09-23T06:24:51.060
null
null
17,568,469
null
73,823,937
2
null
73,821,308
0
null
I think that's because the security function has different default values for the bargaps and lookahead parameters between v2 and v4 With v4, both are set to false by default With v2, probably one or both of them are set to true
null
CC BY-SA 4.0
null
2022-09-23T06:49:49.143
2022-09-23T06:49:49.143
null
null
19,456,724
null
73,824,031
2
null
73,823,564
1
null
Assuming you wish to export your dataframe (df) with merged cells into excel, then try this code; ``` writer = pd.ExcelWriter(r"C:\Users\pandas_excel_export.xlsx", engine='xlsxwriter') df.to_excel(writer, sheet_name='Sheet1') workbook = writer.book worksheet = writer.sheets['Sheet1'] # Edit below code if required (coloring, bold etc.) merge_format = workbook.add_format({ 'bold': 1, 'border': 1, 'align': 'center', 'valign': 'vcenter', 'fg_color': 'yellow'}) worksheet.merge_range('B5:C5', 'Total Marks', merge_format) writer.save() ``` Hope this Helps...
null
CC BY-SA 4.0
null
2022-09-23T06:59:03.217
2022-09-23T06:59:03.217
null
null
20,040,720
null
73,824,102
2
null
63,837,678
0
null
Extract the zip file whether its a source connector or sink connector and place the whole folder with all the jars inside of it under: plugin.path which you have set
null
CC BY-SA 4.0
null
2022-09-23T07:06:08.100
2022-09-23T07:06:08.100
null
null
18,792,807
null
73,824,151
2
null
25,558,449
0
null
I had this problem when loading local images and figured out that ``` $dompdf->getOptions()->setChroot($path_to_images); ``` was not enough, I additionally had to set ``` chdir($path_to_images); ```
null
CC BY-SA 4.0
null
2022-09-23T07:11:15.367
2022-09-23T07:11:15.367
null
null
3,684,296
null
73,824,222
2
null
73,823,940
0
null
You are using deprecated "babel-eslint". Try with "@babel/eslint-parser" [https://github.com/eslint/eslint-scope/issues/77#issuecomment-1133775347](https://github.com/eslint/eslint-scope/issues/77#issuecomment-1133775347)
null
CC BY-SA 4.0
null
2022-09-23T07:18:39.947
2022-09-23T07:18:39.947
null
null
15,288,543
null
73,824,287
2
null
73,822,560
0
null
Hi Rosalie and welcome to SO. The main problem I see is that you have to define your `diagnostic` variable as a factor. Otherwise, R is using it as a normal number and cannot group it accordingly. First, is a solution using only the base `ggplot2` functions including the function `geom_jitter()` replacing `geom_sina()` from the `ggforce` package: ``` library(tidyverse) #data generation company_a <- sample(1:200, 100,replace = TRUE) company_b <- sample(1:200, 100,replace = TRUE) company_c <- sample(1:200, 100,replace = TRUE) diagnostic<- sample(1:4, 100,replace = TRUE) df<-data.frame(company_a,company_b,company_c,diagnostic) df_r=gather(df, "Companies", "FIT", 1:3) df_r$diagnostic <- as.factor(df_r$diagnostic) #Creating boxplot df_r %>% ggplot(aes(x = diagnostic, y = FIT, fill = Companies))+ geom_boxplot(alpha = 0.1, position = "dodge2")+ geom_point(aes(color = Companies), position = position_dodge(width = 0.75))+ geom_jitter(aes(color = Companies), position = position_dodge2(width = 0.75), size = 1)+ scale_y_continuous(breaks = seq(0, 200, 25))+ theme_classic()+ theme(legend.position = "top") ``` ![](https://i.imgur.com/9LGFE2B.png) Second there is another solution also using the `geom_sina()` function: ``` #Creating boxplot df_r %>% ggplot(aes(x = diagnostic, y = FIT, fill = Companies))+ geom_boxplot(alpha = 0.1, position = "dodge2")+ geom_point(aes(color = Companies), position = position_dodge(width = 0.75))+ ggforce::geom_sina(aes(color = Companies), size = 1, position = position_dodge(width = 0.75))+ scale_y_continuous(breaks = seq(0, 200, 25))+ theme_classic()+ theme(legend.position = "top") ``` ![](https://i.imgur.com/XBKWY3z.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2022-09-23T07:24:37.880
2022-09-23T07:30:57.343
2022-09-23T07:30:57.343
19,741,556
19,741,556
null
73,824,364
2
null
45,315,299
0
null
``` public int[] getPoints(int n){ int[] k = new int[2]; if(n == 0){ k[0] = 0; k[1] = 0; return k; } n--; int r = (int) (Math.floor((Math.sqrt(n + 1) -1) / 2) + 1); int p = (8 * r * (r - 1)) / 2; int a = (1 + n - p) % (r * 8); switch ((int) Math.floor(a / (r * 2))) { case 0: k[0] = a - r; k[1] = -r; return k; case 1: k[0] = r; k[1] = (a % (r * 2)) - r; return k; case 2: k[0] = r - (a % (r * 2)); k[1] = r; return k; case 3: k[0] = -r; k[1] = r - (a % (r * 2)); return k; } return null; } ```
null
CC BY-SA 4.0
null
2022-09-23T07:32:02.703
2022-09-23T07:32:02.703
null
null
7,112,195
null
73,824,374
2
null
73,823,396
2
null
You need some global variables for 3 points and one index that is telling you which point you actually edit ... ``` float point[3][2]; int ix=0; ``` the render change to ``` glBegin(GL_LINE_LOOP); // or GL_TRIANGLE glVertex2fv(point[0]); glVertex2fv(point[1]); glVertex2fv(point[2]); glEnd(); ``` now I do not code in GLFW but you need to change the onclick events to something like: ``` static bool q0 = false; // last state of left button bool q1 = (action == GLFW_PRESS && button == GLFW_MOUSE_BUTTON_LEFT); //actual state of left button if ((!q0)&&(q1)) // on mouse down { if (ix==0) // init all points at first click { point[0][0]=xw; point[0][1]=yw; point[1][0]=xw; point[1][1]=yw; point[2][0]=xw; point[2][1]=yw; } } if (q1) // mouse drag { point[ix][0]=xw; point[ix][1]=yw; } if ((q0)&&(!q1)) // mouse up { point[ix][0]=xw; point[ix][1]=yw; ix++; if (ix==3) { ix=0; // here finalize editation for example // copy the new triangle to some mesh or whatever... } } q0=q1; // remember state of mouse for next event ``` This is my standard editation code I use in my editors for more info see: - [Does anyone know of a low level (no frameworks) example of a drag & drop, re-order-able list?](https://stackoverflow.com/a/20924609/2521214) I am not sure about the `q1` as I do not code in GLFW its possible you could extract the left mouse button state directly with different expression. the `q0` does not need to be static but in such case it should be global... Also its possible the GLFW holds such state too in which case you could extract it similarly to `q1` and no global or static is needed for it anymore...
null
CC BY-SA 4.0
null
2022-09-23T07:32:58.550
2022-09-23T07:40:53.707
2022-09-23T07:40:53.707
2,521,214
2,521,214
null
73,824,382
2
null
73,824,354
1
null
The `getItemPrice` is a Future function, so you should `await` for its result, like this: ``` var price = await DatabaseHelper.instance.getItemPrice(item.id!); ``` And also the best way to use async function in build method is using `FutureBuilder`, so change your `_buildItemCards` to this: ``` FutureBuilder<int>( future: DatabaseHelper.instance.getItemPrice(item.id!), builder: (context, snapshot) { switch (snapshot.connectionState) { case ConnectionState.waiting: return Text('Loading....'); default: if (snapshot.hasError) { return Text('Error: ${snapshot.error}'); } else { int price = snapshot.data!; return Card( child: ListTile( title: Text(item.name), subtitle: Text('${price}G'), ), ); } } }, ) ```
null
CC BY-SA 4.0
null
2022-09-23T07:33:39.467
2022-09-23T07:53:32.210
2022-09-23T07:53:32.210
10,306,997
10,306,997
null
73,824,405
2
null
73,823,828
0
null
This is a problem with GCP creating default user with id 1001. The quorum docker containers expect user 1000 to be used. Logging in as user 1000 solves the issue.
null
CC BY-SA 4.0
null
2022-09-23T07:35:12.730
2022-09-23T07:35:12.730
null
null
3,356,092
null
73,824,535
2
null
73,822,123
0
null
you can also insert in a line break with the br tag `<br>`
null
CC BY-SA 4.0
null
2022-09-23T07:48:48.173
2022-09-23T07:48:48.173
null
null
8,490,743
null
73,824,687
2
null
73,815,265
0
null
What you see is actually the expected result. `TextGeometry` produces a geometry intended for meshes. If you use the same data for a point cloud, the result is probably not as expected since you just render each vertex as a point. When doing this with `TextGeometry`, you will only see points at the front and back side of the text since points in between are not necessary for a mesh. Consider to author the geometry in a tool like Blender instead and import it via `GLTFLoader`.
null
CC BY-SA 4.0
null
2022-09-23T08:02:31.467
2022-09-23T08:02:31.467
null
null
5,250,847
null
73,825,315
2
null
73,823,919
1
null
Yes, you can use subplot with row = 1 and columns = whatever you want, like that: ``` import plotly.express as px from plotly.subplots import make_subplots df = px.data.iris() fig = make_subplots(rows=1, cols=3) fig.add_trace( go.Scatter(x=df["sepal_width"], y=df["petal_length"], mode="markers",name="Scatter 1"), row=1, col=1 ) fig.add_trace( go.Scatter(x=df["sepal_length"], y=df["petal_length"], mode="markers",name="Scatter 2"), row=1, col=2 ) fig.add_trace( go.Scatter(x=df["petal_width"], y=df["petal_length"], mode="markers", name="Scatter 3",), row=1, col=3 ) fig.show() ``` [](https://i.stack.imgur.com/kLNH0.png)
null
CC BY-SA 4.0
null
2022-09-23T08:56:46.817
2022-09-23T08:56:46.817
null
null
16,733,101
null
73,825,344
2
null
25,178,329
0
null
If you are using recyclerview without scrollview you can do this and it will work ``` recyclerview.isNestedScrollingEnabled = true ```
null
CC BY-SA 4.0
null
2022-09-23T08:58:23.870
2022-09-23T08:58:23.870
null
null
10,705,754
null