Id
int64
1.68k
75.6M
PostTypeId
int64
1
2
AcceptedAnswerId
int64
1.7k
75.6M
ParentId
int64
1.68k
75.6M
Score
int64
-60
3.16k
ViewCount
int64
8
2.68M
Body
stringlengths
1
41.1k
Title
stringlengths
14
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
1
CreationDate
stringlengths
23
23
LastActivityDate
stringlengths
23
23
LastEditDate
stringlengths
23
23
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
1
21.3M
Tags
sequence
75,256,354
2
null
22,146,192
0
null
Add minHeight and minWidth to your button as 0dp ``` <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:background="@drawable/record_selector" android:gravity="center" android:textColor="#ffffffff" android:minHeight="0dp" android:minWidth="0dp" android:text="@string/charge_record"/> ```
null
CC BY-SA 4.0
null
2023-01-27T09:45:06.117
2023-01-30T05:24:05.077
2023-01-30T05:24:05.077
4,639,479
4,639,479
null
75,256,415
2
null
59,594,875
0
null
it will not show, but it is actually inputing, just enter the correct password and then press enter
null
CC BY-SA 4.0
null
2023-01-27T09:50:11.073
2023-01-27T09:50:11.073
null
null
16,254,990
null
75,256,530
2
null
75,201,207
1
null
For drawing cirlce you can use [SVGRenderer](https://api.highcharts.com/class-reference/Highcharts.SVGRenderer) inside events. ``` chart: { height: 600, events: { load: function() { let chart = this; chart.myCustomCircle = chart.renderer.circle(chart.plotLeft + chart.plotWidth / 2, chart.plotTop + chart.plotHeight / 2, Math.min(chart.plotWidth / 2, chart.plotHeight / 2)).attr({ dashstyle: 'Dot', fill: 'transparent', stroke: 'green', 'stroke-width': 0.1 }).add(); }, redraw: function() { let chart = this, yAxis = chart.yAxis[0], yMax = yAxis.dataMax; if (chart.myCustomCircle) { chart.myCustomCircle.attr({ x: chart.plotLeft + chart.plotWidth / 2, y: chart.plotTop + chart.plotHeight / 2, r: Math.min(chart.plotWidth / 2, chart.plotHeight / 2) }); } } }, ``` [https://jsfiddle.net/BlackLabel/6am2ojxc/](https://jsfiddle.net/BlackLabel/6am2ojxc/) The next suggestion is to use [xAxis.plotBands](https://api.highcharts.com/highcharts/xAxis.plotBands), with customization core code, it's possible to set plotBands related to series color. ``` xAxis: { plotBands: [{ color: 'cyan', from: -0.5, to: 0.5, outerRadius: '110%', innerRadius: '100%' }, { color: 'blue', from: 0.5, to: 1.5, outerRadius: '110%', innerRadius: '100%' }, { color: 'red', from: 1.5, to: 2.5, outerRadius: '110%', innerRadius: '100%' }, { color: 'green', from: 2.5, to: 3.5, outerRadius: '110%', innerRadius: '100%' }, { color: 'yellow', from: 3.5, to: 4.5, outerRadius: '110%', innerRadius: '100%' }, { color: 'orange', from: 4.5, to: 5.5, outerRadius: '110%', innerRadius: '100%' } ] }, ``` [https://jsfiddle.net/BlackLabel/prmhku7j/](https://jsfiddle.net/BlackLabel/prmhku7j/)
null
CC BY-SA 4.0
null
2023-01-27T10:01:30.103
2023-01-27T10:01:30.103
null
null
12,171,673
null
75,256,720
2
null
75,256,561
0
null
You dont have an accululative sum after each iteration of the loop ``` Sub Integral() Dim i As Integer Dim Integral As Double Dim Sum_Area as Double For i = 1 To 2 Integral = (Cells(3 + i, 2) - Cells(2 + i, 2)) * (Cells(3 + i, 3) + Cells(2 + i, 3)) / 2 Sum_Area = Sum_Area + Integral Next i Sheet1.Cells(4, 7) = Sum_Area End Sub ```
null
CC BY-SA 4.0
null
2023-01-27T10:19:08.490
2023-01-27T10:19:08.490
null
null
12,113,829
null
75,257,344
2
null
1,109,536
0
null
Thanks for the help in this topic, here's the code in C++ if anyone interested. Tested it, its working. If you give offset = -1.5, it will shrink the polygon. ``` typedef struct { double x; double y; } Point2D; double Hypot(double x, double y) { return std::sqrt(x * x + y * y); } Point2D NormalizeVector(const Point2D& p) { double h = Hypot(p.x, p.y); if (h < 0.0001) return Point2D({ 0.0, 0.0 }); double inverseHypot = 1 / h; return Point2D({ (double)p.x * inverseHypot, (double)p.y * inverseHypot }); } void offsetPolygon(std::vector<Point2D>& polyCoords, std::vector<Point2D>& newPolyCoords, double offset, int outer_ccw) { if (offset == 0.0 || polyCoords.size() < 3) return; Point2D vnn, vpn, bisn; double vnX, vnY, vpX, vpY; double nnnX, nnnY; double npnX, npnY; double bisX, bisY, bisLen; unsigned int nVerts = polyCoords.size() - 1; for (unsigned int curr = 0; curr < polyCoords.size(); curr++) { int prev = (curr + nVerts - 1) % nVerts; int next = (curr + 1) % nVerts; vnX = polyCoords[next].x - polyCoords[curr].x; vnY = polyCoords[next].y - polyCoords[curr].y; vnn = NormalizeVector({ vnX, vnY }); nnnX = vnn.y; nnnY = -vnn.x; vpX = polyCoords[curr].x - polyCoords[prev].x; vpY = polyCoords[curr].y - polyCoords[prev].y; vpn = NormalizeVector({ vpX, vpY }); npnX = vpn.y * outer_ccw; npnY = -vpn.x * outer_ccw; bisX = (nnnX + npnX) * outer_ccw; bisY = (nnnY + npnY) * outer_ccw; bisn = NormalizeVector({ bisX, bisY }); bisLen = offset / std::sqrt((1 + nnnX * npnX + nnnY * npnY) / 2); newPolyCoords.push_back({ polyCoords[curr].x + bisLen * bisn.x, polyCoords[curr].y + bisLen * bisn.y }); } } ```
null
CC BY-SA 4.0
null
2023-01-27T11:13:09.330
2023-01-27T11:13:09.330
null
null
16,742,342
null
75,257,395
2
null
23,527,385
0
null
Another approach with `scale_y_continuous` and `guides` to have y-axis on right side of graph: ``` library(ggplot2) ggplot(mtcars, aes(hp, mpg)) + geom_point() + scale_y_continuous(name = NULL, sec.axis = sec_axis(~., name = "Y-axis Label on right side")) + guides(y = "none") ``` ![](https://i.imgur.com/ENeXAnI.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-01-27T11:18:08.150
2023-01-27T11:18:08.150
null
null
14,282,714
null
75,257,642
2
null
75,253,446
0
null
> Error Code 4508 Spark cluster not found. This error can cause because of two reasons. - ![enter image description here](https://i.imgur.com/XkJVJKH.png)- > Error code 5000 Failure type User configuration issue Details [plugins.*** ADF.adf-ir-001 WorkspaceType: CCID:] [Monitoring] Livy Endpoint=[https://hubservice1.eastus.azuresynapse.net:8001/api/v1.0/publish/815b62a1-7b45-4fe1-86f4-ae4b56014311]. Livy Id=[0] Job failed during run time with state=[dead]. - `StdOut`- If error persist my suggestion is to raise Microsoft support ticket [here](https://azure.microsoft.com/en-us/support/create-ticket)
null
CC BY-SA 4.0
null
2023-01-27T11:42:43.277
2023-01-27T11:42:43.277
null
null
18,043,699
null
75,257,808
2
null
25,736,700
0
null
You can skip defining key into `.plist` if you set it in `InfoPlist.string` `.plist` ``` ``` `InfoPlist.string` ``` "NSPhotoLibraryAddUsageDescription" = "You need to allow access to the photo library to download image"; ```
null
CC BY-SA 4.0
null
2023-01-27T11:59:36.760
2023-02-11T11:42:03.170
2023-02-11T11:42:03.170
4,770,877
4,770,877
null
75,257,917
2
null
75,205,197
0
null
You need to provide a `key` for each text field `CustomTextFormField` so that Flutter can determine the position of your fields and thus change their position in the list. Try the following code: ``` CustomTextFormField( key: const Key("signIn-name-field"), ), CustomTextFormField( key: const Key("signIn-email-field"), ), ``` Source: [https://github.com/flutter/flutter/issues/119200#issuecomment-1405219170](https://github.com/flutter/flutter/issues/119200#issuecomment-1405219170) > @mycar98765 Thanks for the recording ✨ You need to provide a `key` to the individual text fields `CustomTextFormField` so that flutter knows for certain where your fields are and so it knows certain that they changed position on within the list.``` CustomTextFormField( key: const Key('signIn-name-field'), // add this to name field ), CustomTextFormField( key: const Key('signIn-email-field'), // add this to email field ), ``` If you want to see the visual difference when you have and don't have keys on them, try entering a value on email or name fields then toggle the auth mode state. more on the [importance of key here](https://www.youtube.com/watch?v=kn0EOS-ZiIc&ab_channel=GoogleDevelopers).
null
CC BY-SA 4.0
null
2023-01-27T12:10:33.733
2023-01-27T12:10:33.733
null
null
16,124,033
null
75,258,046
2
null
75,251,510
0
null
I'll try to help with a reproducible example. I tried to make the example look like your `Sofia` information. Basically, I added the series to the chart `chart.addSeries(series)` before the attachAxis definition `series.attachAxis(axis_x)`. If the series is added after attachAxis, the series will be readjusted to the external ``` import sys from PyQt5.Qt import Qt from PyQt5.QtGui import QPainter from PyQt5.QtCore import QPoint from PyQt5.QtChart import QCategoryAxis, QValueAxis from PyQt5.QtChart import QChart, QChartView, QLineSeries from PyQt5.QtWidgets import QApplication, QMainWindow class MyChart(QMainWindow): def __init__(self): super().__init__() axis_x = QValueAxis() axis_x.setRange(0, 10) axis_x.setTitleText("Second") axis_y = QValueAxis() axis_y.setRange(0, 10) axis_y.setTitleText("Other") series = QLineSeries() p1 = QPoint(2, 0) series.append(p1) p2 = QPoint(2, 1) series.append(p2) p3 = QPoint(4, 2) series.append(p3) p4 = QPoint(6, 3) series.append(p4) p5 = QPoint(8, 4) series.append(p5) series.setName("hei") chart = QChart() chart.addSeries(series) chart.legend().setVisible(True) chart.createDefaultAxes() chart.setAxisX(axis_x) chart.setAxisY(axis_y) #chart.addAxis(axis_x, Qt.AlignBottom) #chart.addAxis(axis_y, Qt.AlignLeft) series.attachAxis(axis_x) series.attachAxis(axis_y) chartView = QChartView(chart) chartView.setRenderHint(QPainter.Antialiasing) self.setCentralWidget(chartView) self.resize(1200, 800) if __name__ == '__main__': app = QApplication(sys.argv) chartDemo = MyChart() chartDemo.show() sys.exit(app.exec_()) ```
null
CC BY-SA 4.0
null
2023-01-27T12:22:18.520
2023-01-27T19:05:15.853
2023-01-27T19:05:15.853
8,265,685
8,265,685
null
75,258,132
2
null
75,256,721
1
null
You can draw lines on the joint and marginal axes, as shown for example in [this post](https://stackoverflow.com/questions/56116021/add-arbitrary-lines-on-seaborn-jointplot). Here is an example approach to show the mean and the standard deviation. Many alternatives are possible. ``` from matplotlib import pyplot as plt import seaborn as sns sns.set_theme(style="darkgrid") tips = sns.load_dataset("tips") g = sns.jointplot(x="total_bill", y="tip", data=tips, kind="reg", truncate=False, xlim=(0, 60), ylim=(0, 12), color="m", height=7) x_mean = tips["total_bill"].mean() x_std = tips["total_bill"].std() g.ax_marg_x.axvspan(x_mean - x_std, x_mean + x_std, color='red', alpha=0.1) y_mean = tips["tip"].mean() y_std = tips["tip"].std() g.ax_marg_y.axhspan(y_mean - y_std, y_mean + y_std, color='red', alpha=0.1) g.refline(x=x_mean, y=y_mean, color='red', ls='--') plt.show() ``` [](https://i.stack.imgur.com/FseSY.png) PS: As mentioned in the comments [refline()](https://seaborn.pydata.org/generated/seaborn.JointGrid.refline.html) can be used to replace these four lines: ``` for ax in [g.ax_joint, g.ax_marg_x]: ax.axvline(x_mean, color='red', ls='--') for ax in [g.ax_joint, g.ax_marg_y]: ax.axhline(y_mean, color='red', ls='--') ```
null
CC BY-SA 4.0
null
2023-01-27T12:29:51.407
2023-01-27T13:41:06.830
2023-01-27T13:41:06.830
12,046,409
12,046,409
null
75,258,168
2
null
73,273,458
0
null
import * as ClassicEditor from '@ckeditor/ckeditor5-build-classic'; [enter image description here](https://i.stack.imgur.com/1OFd5.png) Test answer
null
CC BY-SA 4.0
null
2023-01-27T12:33:57.727
2023-01-27T12:33:57.727
null
null
null
null
75,258,270
2
null
36,436,913
0
null
I will suggest you a simple solution to apply if it's convenient for you. use "ImageBackground" component of react-native. so your code will become something like this: ``` <ImageBackground source={{uri:'http://resizing.flixster.com/DeLpPTAwX3O2LszOpeaMHjbzuAw=/53x77/dkpu1ddg7pbsk.cloudfront.net/movie/11/16/47/11164719_ori.jpg'}} style={{flex: 1}} /> ``` In your particular case you are apparently trying to cover whole screen with the image so this solution is exactly for that purpose. However most of the time it works in other cases as well where you want to fit the image properly in its view.
null
CC BY-SA 4.0
null
2023-01-27T12:43:23.927
2023-01-27T12:43:23.927
null
null
15,537,919
null
75,258,592
2
null
75,246,804
1
null
The border of `mat-form-field` is created by block `.mdc-notched-outline`. You can set border to this, but it overlaps the old border this may cause an strikethrough label when typing. Using DevTools, you can see they are using 3 element inside this block: `__leading`, `__notch` and `__trailing`. By change the `border-color` attribute of them: ``` ::ng-deep .mdc-notched-outline__leading { border-color: darkorange !important; } ::ng-deep .mdc-notched-outline__notch { border-color: darkorange !important; } ::ng-deep .mdc-notched-outline__trailing { border-color: darkorange !important; } ``` Now `mat-form-field` has darkorange border color. You can also change the `border-radius` to your form: ``` ... ::ng-deep .mdc-notched-outline__trailing { border-color: darkorange !important; border-top-right-radius: 100px !important; border-bottom-right-radius: 100px !important; } ``` This is [Stackblitz Demo](https://stackblitz.com/edit/mat-form-field-border). --- Update: because the block has no other element, we can shorten by: ``` ::ng-deep .mdc-notched-outline > * { border-color: darkorange !important; } ``` --- Update 2: You can also apply color depend on status of input field by: - ``` ::ng-deep .mdc-notched-outline > * { border-color: green !important; } ``` - ``` ::ng-deep .mdc-text-field--focused .mdc-notched-outline > * { border-color: darkorange !important; } ``` - ``` ::ng-deep .mdc-text-field--invalid .mdc-notched-outline > * { border-color: cyan !important; } ```
null
CC BY-SA 4.0
null
2023-01-27T13:13:08.990
2023-01-31T15:53:04.337
2023-01-31T15:53:04.337
19,782,508
19,782,508
null
75,258,691
2
null
59,033,410
0
null
As i see the kotlin file is not destroyed, but the "Decompile Java file" is added on the right side of tabs. So there is no problem in loosing your code data. [](https://i.stack.imgur.com/zjtay.png) Hope i understand your problem right.
null
CC BY-SA 4.0
null
2023-01-27T13:21:41.247
2023-01-31T06:38:10.893
2023-01-31T06:38:10.893
5,148,289
20,984,036
null
75,258,719
2
null
75,258,613
1
null
It is because your code is synchronous. Each addTodo happens sequentially and synchronous To get different dates, Make functions async, await each transaction to database (it will take time) ``` html5rocks.indexedDB.addTodo = async function(... ... var request = await store.put(data); ```
null
CC BY-SA 4.0
null
2023-01-27T13:24:16.893
2023-01-27T13:24:16.893
null
null
16,942,009
null
75,258,734
2
null
75,257,835
1
null
you need to fulfill CrmServiceClient.Delete method signature -> it accepts two parameters, not one. First one is entity logical name and second one is the ID of the entity. I guess that new_EmploymentHugCollegues is early bound entity generated via crmsvcutil.exe, so you can easily modify your method to this: ``` public bool DeleteEmployeeRecord(new_EmploymentHubCollegues employmentHubCollegue) { CrmServiceClient serviceClient = GetCrmServiceClient(); serviceClient.Delete(employmentHubCollegue.LogicalName, employmentHubCollegue.Id); return true; } ```
null
CC BY-SA 4.0
null
2023-01-27T13:25:27.837
2023-01-27T13:25:27.837
null
null
18,977,345
null
75,258,733
2
null
75,247,212
0
null
Fragments like this expect there contents in the form of a table, with rows and columns. Currently you are only returning a single row, but somehow you would like to split the different values for `ElementTypeBName-Hyperlink` into different rows. I think you have two possibilities here: 1. Return each ElementTypeBName-Hyperlink element with a different name e.g. ElementTypeBName-Hyperlink1, ElementTypeBName-Hyperlink2,... and then use each of those in your table template. Downside of this approach is that it isn't flexible at all, and only useful if you have more or less the same number of ElementB names. 2. Split your template into two templates. One template for the upper part, and one for the lower part. Another observation is that you are taking the complicated (and slow) route. For requirements like this, it's much easier to create an SQL template instead of a script template.
null
CC BY-SA 4.0
null
2023-01-27T13:25:16.320
2023-01-27T13:25:16.320
null
null
2,018,133
null
75,258,800
2
null
75,251,066
0
null
`Delays[Reason]` wants to return three rows - but there is not enough space to spill down - because next cell is blocked by the next formula. Therefore you receive the error. You have to retrieve the delays reason for the special date. As I don't know if there could be overalpping events for delays I added the `TEXTJOIN` function to merge two or more reasons into one cell. ``` =IF([@delta]<0, TEXTJOIN("; ",TRUE, FILTER(Delays[reason],([@date]>=Delays[delay began])*([@date]<=Delays[delay ended]),"- no reason found") ),"") ```
null
CC BY-SA 4.0
null
2023-01-27T13:32:21.433
2023-01-27T13:32:21.433
null
null
16,578,424
null
75,258,923
2
null
75,258,639
0
null
You can use this formula: ``` =LET(d,A1:A4, R,IF(LEN(d)>2,LEFT(d,LEN(d)-4),d), gm,IF(LEN(d)>2,RIGHT(d,4),""), HSTACK(R,gm)) ``` It handles first the `R`- column retrieving the first letters except of the last 4. Then the retrieve the last four characters for guidance mark. Finally puttin them into a new array (`HSTACK`)
null
CC BY-SA 4.0
null
2023-01-27T13:42:49.093
2023-01-27T13:42:49.093
null
null
16,578,424
null
75,258,972
2
null
75,258,632
2
null
In `diff = img - gauss`, the subtraction produces negative values, but the two inputs are of type uint8, so the result of the operation is coerced to that same type, which cannot hold negative values. You’d have to convert one of the images to a signed type for this to work. For example: ``` gauss = cv2.GaussianBlur(img,(7,7),0) diff = img.astype(np.int_) - gauss sharp = np.clip(img + diff, 0, 255).astype(np.uint8) ``` Using `cv2.addWeighted()` is more efficient.
null
CC BY-SA 4.0
null
2023-01-27T13:46:52.590
2023-01-27T13:46:52.590
null
null
7,328,782
null
75,259,012
2
null
75,258,891
0
null
Here is a two-step approach: 1. Ignoring the metrics, the code removes duplicates, so that you get all characteristics for each person, but only one row per person. 2. Delete the current characteristics and replace them with the complete characteristics. The merge() performs a join which brings the duplicated characteristics back. Code: ``` import pandas as pd # specify which columns are characteristics and which are metrics characteristics = ['characteristic_1', 'characteristic_2'] metrics = ['metric_1', 'metric_2'] # create a sample dataframe with missing characteristics df = pd.DataFrame({'name': ['John', 'John', 'Jane', 'Jane', 'Jane'], 'characteristic_1': [None, 'Male', 'Female', None, 'Female'], 'characteristic_2': [5.5, None, 5.6, 5.5, None], 'metric_1': [10, 20, 30, 40, 50], 'metric_2': [100, 200, 300, 400, 500]}) # Step 1: Group by name and fill missing characteristics df_filled_characteristics = df.groupby('name')[characteristics].first().reset_index() # Step 2: Drop the characteristics from the original dataframe and join the filled characteristics df_final = df.drop(characteristics, axis=1).merge(df_filled_characteristics, on='name') # Output the final dataframe print(df_final) ``` Don't be confused by the `first()`, it uses the first non-NaN (i.e. filled) value.
null
CC BY-SA 4.0
null
2023-01-27T13:49:26.883
2023-02-10T12:24:28.447
2023-02-10T12:24:28.447
8,781,465
8,781,465
null
75,259,059
2
null
75,258,632
2
null
I believe the difference is caused by over/underflow in `diff = img - gauss` If the source images have both 8-bit unsigned integer depth, the diff will have the same depth as well, which can cause underflow in the subtraction operation. In contrast, `addWeighted()`, performs the operation in double precision, and perform saturation cast to the destination type after the operation (see [documentation](https://docs.opencv.org/3.4/d2/de8/group__core__array.html#gafafb2513349db3bcff51f54ee5592a19)). That effectively reduces the likelihood of over/underflow, and cast will automatically trim the values to the supported range of the destination scalar type. If you still want to use the first approach, either convert the images to floating point depth, or use big enough signed integers. After the operation, you may need to perform saturation cast to the destination depth.
null
CC BY-SA 4.0
null
2023-01-27T13:53:27.303
2023-01-27T13:53:27.303
null
null
1,603,969
null
75,259,066
2
null
75,242,660
0
null
There is no way to do this accurately for arbitrary objects, since there can be parts of the object that contribute to the "top area", but which the camera cannot see. Since the camera cannot see these parts, you can't tell how big they are. Since all your objects are known to be chickens, though, you could get a pretty accurate estimate like this: 1. Use Principal Component Analysis to determine the orientation of each chicken. 2. Using many objects in many images, find a best-fit polynomial that estimates apparent chicken size by distance from the image center, and orientation relative to the distance vector. 3. For any given chicken, then, you can divide its apparent size by the estimated average apparent size for its distance and orientation, to get a normalized chicken size measurement.
null
CC BY-SA 4.0
null
2023-01-27T13:53:57.153
2023-01-27T13:53:57.153
null
null
5,483,526
null
75,259,144
2
null
75,258,843
0
null
First read about deferred rendering, maybe it will help you to find a nice solution. Second, you can assign an ID to each object, then you could render all objects into a render texture using this . Then use that render texture in your shader to differentiate objects. Some bit logic and you'll get what you need.
null
CC BY-SA 4.0
null
2023-01-27T14:00:51.133
2023-01-27T14:00:51.133
null
null
841,599
null
75,259,741
2
null
75,258,027
0
null
[Error resolved](https://i.stack.imgur.com/MkfOU.png) What I did to resolve the error? I deposited sol token from sol faucet [https://solfaucet.com/](https://solfaucet.com/) under devnet network and then performed the "sugar upload" command at the command prompt. The error was gone and the 28 nft assets were successfully uploaded and ready for deployment. =)
null
CC BY-SA 4.0
null
2023-01-27T14:51:59.727
2023-01-27T14:53:26.827
2023-01-27T14:53:26.827
21,093,199
21,093,199
null
75,260,282
2
null
75,257,992
0
null
Instead of `return LocationPage` direclry , do something like code below. You may need to change it a bit according to your code. Or you can follow this video so you can fully understand what is going on : [Tutorial on how to handle simple role base login](https://www.youtube.com/watch?v=q5E8811Ut_8) ``` User? user = FirebaseAuth.instance.currentUser; var firebaseData = FirebaseFirestore.instance .collection('users') .doc(user!.uid) .get() .then((DocumentSnapshot documentSnapshot) { if (documentSnapshot.exists) { if (documentSnapshot.get('type') == "Admin") { Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => AdminPage(), ), ); }else{ Navigator.pushReplacement( context, MaterialPageRoute( builder: (context) => StudentPage(), ), ); } } else { print('Document doesn't exist on the DB'); } }); ```
null
CC BY-SA 4.0
null
2023-01-27T15:40:00.550
2023-01-27T16:01:21.043
2023-01-27T16:01:21.043
17,260,568
17,260,568
null
75,260,587
2
null
63,453,163
0
null
I'll assume that this issue has already been solved, but, in any case, here is my contribuition using fontAwesome so you can understand the logic: Change the definition of your data `tabs` and `currentTab` to something like this: ``` currentTab: {title:'Post section',icon:'bell',page:'Post'}, tabs:{ title:'Post section', icon:'bell', page:'Post' }, { title:'List of posts', icon:'list', page:'List' } ``` Convert your `font-awesome-icon` tag to: ``` <button v-for="tab in tabs" :key="tab" :class="['tab-button', { active: currentTab === tab }]" @click="currentTab = tab" title="tab.title"> <i class="fa" :class="'fa-'+tab.icon"></i> </button> ``` Finally change you `component` tag to: ``` <component :is="currentTab.page" class="tab"></component> ``` And them you can ignore the whole `compuded: {}` section of your `export default`
null
CC BY-SA 4.0
null
2023-01-27T16:08:35.430
2023-02-06T15:52:47.330
2023-02-06T15:52:47.330
8,116,111
8,116,111
null
75,260,740
2
null
74,791,058
1
null
I had the same error, changing tailwind.config.js file location to under the "sanity-backend" folder, fixed an error for me.
null
CC BY-SA 4.0
null
2023-01-27T16:22:11.997
2023-01-27T16:22:11.997
null
null
21,094,711
null
75,261,201
2
null
17,237,812
0
null
None of these answers helped me, then I discovered the issue: a stray `fixedHeader` CDN import from a different datatables version. This didn't kill the fixed header functionality outright, but did prevent it from aligning. ``` <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/fixedheader/3.1.2/css/fixedHeader.dataTables.min.css"> ``` Figured I'd add in case this helps someone.
null
CC BY-SA 4.0
null
2023-01-27T17:05:31.087
2023-01-27T17:05:31.087
null
null
1,901,391
null
75,261,705
2
null
71,571,616
0
null
Starting ChromeDriver 109.0.5414.74 (e7c5703604daa9cc128ccf5a5d3e993513758913-refs/branch-heads/5414@{#1172}) on port 48484 Only local connections are allowed. Please see [https://chromedriver.chromium.org/security-considerations](https://chromedriver.chromium.org/security-considerations) for suggestions on keeping ChromeDriver safe. ChromeDriver was started successfully. Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Failed to create Chrome process. Host info: host: 'A-LAPTOP', ip: '192.' Build info: version: '4.7.2', revision: '4d4020c3b7' System info: os.name: 'Windows 11', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.5' Driver info: org.openqa.selenium.chrome.ChromeDriver Command: [null, newSession {capabilities=[Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}], desiredCapabilities=Capabilities {browserName: chrome, goog:chromeOptions: {args: [], extensions: []}}}] at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:148) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:106) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:67) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:156) at org.openqa.selenium.remote.service.DriverCommandExecutor.invokeExecute(DriverCommandExecutor.java:167) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:142) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:535) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:228) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:156) at org.openqa.selenium.chromium.ChromiumDriver.(ChromiumDriver.java:101) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:82) at org.openqa.selenium.chrome.ChromeDriver.(ChromeDriver.java:50) at com.project.skyfall.Browser_Drivers.main(Browser_Drivers.java:13)
null
CC BY-SA 4.0
null
2023-01-27T17:55:08.340
2023-01-27T17:55:08.340
null
null
21,095,281
null
75,261,720
2
null
75,261,628
0
null
Happy to be wrong, but I think you'll be better served by uninstalling Express and doing a clean install of SQL Server 2019 developer edition. Having Express and developer edition installed on the same machine is supported. I have developer edition for 2017 and 3 Express instances [](https://i.stack.imgur.com/2AdRI.png) But given what you're running into, I'd nuke the existing, install the full product and then if you need Express as well, install it again.
null
CC BY-SA 4.0
null
2023-01-27T17:57:29.043
2023-01-27T17:57:29.043
null
null
181,965
null
75,261,718
2
null
75,245,090
1
null
Since `surf`, like `plot` and other commands, requires `X` and `Y` to be same length, graphically inverting the function, what in AutoCAD is called rotating the UCS rather that starting with a symbolic inversion attempt, makes sense. : niversal oordinates ystem . The tripod on the CAD drawing sheet indicating axes and origin. ``` % MATLAB close all;clear all;clc c0=299792458; % [m/s] light velocity % guessing frequency band centre f0=2e9; % [Hz] lambda0=c0/f0; % wavelength k0=2*pi/lambda0 % wave number d=.03 % 3 [cm]? chip size? connector? antenna? waveguide length? the kettle? % range_n=[0:lambda0/10:lambda0/4]; range_n=[0:.01:4.25]; range_e=[0:.05:10]; [N,E]=meshgrid(range_n,range_e); %% Reflection Coefficient R=1j*tan(N*k0*d).*(1./E-E)./(2-1j*tan(N*k0*d).*(1./E+E)); figure(1); ax1=gca; hs1=surf(ax1,N,E,abs(R)) hs1.EdgeColor='none'; grid on;xlabel('n');ylabel('e');zlabel('abs(R)');title('|R(n,e)|') ``` [](https://i.stack.imgur.com/W6rrm.jpg) [](https://i.stack.imgur.com/CfOdj.jpg) ``` xcr1_1=ax1.XTickLabel; % x axis x measure ruler xcr1_2=ax1.YTickLabel; % x axis y measure ruler figure(2); ax2=gca; hs2=surf(ax2,N,E,angle(R)) hs2.EdgeColor='none'; grid on;xlabel('n');ylabel('e');zlabel('angle(R)');title('phase(R(n,e)) [rad]') ``` [](https://i.stack.imgur.com/7v2NU.jpg) ``` %% Transmission Coefficient T=2./(cos(N*k0*d).*(2-1j*tan(N*k0*d).*(1./E+E))); figure(3); ax3=gca; hs3=surf(ax3,N,E,abs(T)) hs3.EdgeColor='none'; grid on;xlabel('n');ylabel('e');zlabel('abs(T)');title('|T(n,e)|') ``` [](https://i.stack.imgur.com/ID29C.jpg) It makes sense that where there's high reflection then there's low transmission and where there's low reflection, then `T` gets close or equal to 1. It's a passive device / material. [](https://i.stack.imgur.com/z2uTZ.jpg) ``` figure(4); ax4=gca; hs4=surf(ax4,N,E,angle(T)) hs4.EdgeColor='none'; grid on;xlabel('n');ylabel('e');zlabel('angle(T)');title('phase(T(n,e))') ``` [](https://i.stack.imgur.com/U4EXC.jpg) `E` ``` E2up=abs((((1+R).^2-T.^2)./((1-R)-T.^2)).^.5); E2down=-abs((((1+R).^2-T.^2)./((1-R)-T.^2)).^.5); [sz_s11,sz_s12]=size(E2up); range_s11=[1:1:sz_s11]; range_s12=[1:1:sz_s12]; [sz_s1,sz_s2]=size(E2up); range_s11=[1:1:sz_s11]; range_s12=[1:1:sz_s12]; [S11,S12]=meshgrid(range_s11,range_s12); % |E(S,T)|>0 figure(5); ax5=gca; hs5=surf(ax5,S11,S12,abs(E2up')); hs5.EdgeColor='none'; grid on;xlabel('s1_R');ylabel('s1_T');zlabel('abs(E_u_p)');title('|E_u_p(s1_R,s1_T)|') ``` [](https://i.stack.imgur.com/X0rEg.jpg) `s1_R` `s1_T` variables in this particular context scattering parameters. `s1_r` `s1_T` are numerals, indexs related to `R` and `T`. `n` and `m` already in use. inverted surface `X` `Y` `R``T` ``` ax5.XTickLabel=xcr1_1; % x axis x change ruler ax5.YTickLabel=xcr1_2; % x axis y change ruler xlabel(ax5,'R');ylabel(ax5,'T');zlabel(ax5,'|(E_u_p)| positive values only'); ``` [](https://i.stack.imgur.com/I25Pi.jpg) ``` % |E(S,T)|<0 ax6=gca; hs6=surf(ax6,S11,S12,abs(E2down')); hs6.EdgeColor='none'; grid on;xlabel('s1_R');ylabel('s1_T');zlabel('abs(E2_d_o_w_n)');title('|E_d_o_w_n(s1_R,s2_T)|') ax6.XTickLabel=xcr1_1; % x axis x change ruler ax6.YTickLabel=xcr1_2; % x axis y change ruler xlabel(ax6,'R');ylabel(ax6,'T');zlabel(ax6,'|(E_d_o_w_n)| negative values only'); ``` [](https://i.stack.imgur.com/VF5wJ.jpg) Repeat for `angle(Edown(R,T))` and then for `n_up(R,T)` `n_down(R,T)`. Including the `2*pi*m/(k0*d)` shouldn't be difficult either. Assumed waveguide filled with air. Dielectrics modify `lambda0` to `lambda` `k0` to `k` and may add more cut-offs. Is the material and ?
null
CC BY-SA 4.0
null
2023-01-27T17:57:14.830
2023-01-27T18:10:58.583
2023-01-27T18:10:58.583
9,927,941
9,927,941
null
75,261,777
2
null
75,259,878
4
null
Prerequisites: - [https://en.wikipedia.org/wiki/Pythagorean_theorem](https://en.wikipedia.org/wiki/Pythagorean_theorem)- [https://en.wikipedia.org/wiki/Origin_(mathematics)](https://en.wikipedia.org/wiki/Origin_(mathematics))- [https://en.wikipedia.org/wiki/Unit_vector](https://en.wikipedia.org/wiki/Unit_vector)- [https://en.wikipedia.org/wiki/Rotation_matrix](https://en.wikipedia.org/wiki/Rotation_matrix) Your algorithm is: 1. Find the unit vector that points from the origin to (x0,y0) 2. Multiply the unit vector by the rotation matrix 3. Multiply this new vector by your desired length (3cm in your example) 4. Move the newly-scaled vector's starting point back to (x0,y0) Let `A` be the vector between the origin and `(x0,y0)`. We need to find `|A|`, magnitude of `A`, (aka the length of the line segment) using the Pythagorean Theorem. Find the unit vector by dividing `(x0,y0)` by `|A|`, giving us `(x0/|A|,y0/|A|)`. This is the unit vector along `A`. Prove it to yourself by drawing a little, tiny right triangle with one end of the hypotenuse at the origin and the other end at `(x0/|A|,y0/|A|)`. Just to make things easier to type, let `xhat=x0/|A|` and `yhat=y0/|A|`. You can rotate the unit vector by any angle `θ` by multiplying by the rotation matrix. After shaking out the matrix multiplication, you get the new point `(xhat',yhat')` where ``` xhat' = xhat*Cosθ - yhat*Sinθ yhat' = xhat*Sinθ + yhat*Cosθ ``` 90 degrees is a friendly angle, so this simplifies to: ``` xhat' = -yhat yhat' = xhat ``` Scale the new vector by 3 units (centimeters in your example): ``` 3*(-yhat,xhat) = (-3*yhat,3*xhat) ``` Move this new vector's starting point back to `(x0,y0)` ``` (x1,y1) = (-3*yhat,3*xhat) + (x0,y0) = (-3*yhat+x0,3*xhat+y0) ``` Those are the coordinates for your new point. As a quick example, if you have the point `(3,4)`, and you want to perform the same translation as in your example image, then you'd do this: 1. |A| = 5, so (xhat, yhat) = (3/5, 4/5) 2. (xhat', yhat') = (-4/5, 3/5) 3. 3*(-4/5, 3/5) = (-12/5, 9/5) 4. (-12/5+3, 9/5+4) = (0.6, 5.8) Now prove to yourself that the two points are 3 units apart, again using the Pythagorean Theorem. A right triangle with hypotenuse connecting the two points `(3,4) and (0.6,5.8)` has sides with lengths `(3-0.6)` and `(5.8-3)` [](https://i.stack.imgur.com/HUXot.png)
null
CC BY-SA 4.0
null
2023-01-27T18:02:14.117
2023-01-27T18:31:13.113
2023-01-27T18:31:13.113
6,030,926
6,030,926
null
75,261,862
2
null
75,261,101
1
null
I am going to take this to our Microsoft Support plan, I have a feeling this may be happening from the database being the backend for a Microsoft Dynamics 365 application. That or SQL Server is stripping out the reserved keyword "file" from the fileattachments table, and since it has the lower objectid, its getting returned first when it goes hunting for the attachment table. To sum up the suggested reasons for this issue: 1. I am in the wrong database (I am not as there is only one SQL Server database I have ever connected to and I can only see one database listed in the GUI) 2. I am swapping connections (I am not as this is the only connection I have ever made in SSMS on this machine) 3. I have multiple schemas (There is only one schema according to sys.schemas...dbo) 4.Someone is modifying the tables,columns,etc. (that would be concerning since I am the only developer on staff and wouldnt explain how the column/table names remain the same after refreshing the GUI repeatedly) 4. It could be a view (there are no views in the database, attachment and fileattachment are also both tables) 5. I have no idea what I am doing (Maybe some days, but today I am feeling pretty confident I am not crazy) A quick summary of queries I ran and the results that were outputted (I cant post a screenshot yet). ``` SELECT SCHEMA_NAME(); -- Default schema, returns "dbo" select * from sys.databases; -- Returns 1 row of my organizations database SELECT * from sys.schemas; -- Returns 1 row, name of "dbo", schema_id of 1, and principal_id of 1 select * from sys.tables t where t.name in ('attachment', 'fileattachment') and t.schema_id = 1; select * from sys.views -- returns two rows for the tables fileattachment and attachment select object_id('dbo."attachment"') ;--returns null select object_id('"attachment"'); --returns null select object_id('attachment'); --returns null select object_id('fileattachment'); --returns null select object_id('sys.tables'); -- returns -386, so object_id does in fact execute within this database select distinct type_Desc FROM sys.objects -- returns foreign_key_constraints, and user_table ... no views SELECT CHECKSUM_AGG(CHECKSUM(*)) FROM attachment; SELECT CHECKSUM_AGG(CHECKSUM(*)) FROM fileattachment; --return the exact same result; ```
null
CC BY-SA 4.0
null
2023-01-27T18:11:50.350
2023-01-27T18:31:51.420
2023-01-27T18:31:51.420
16,816,053
16,816,053
null
75,262,132
2
null
75,246,568
0
null
try this ``` use WithFileUploads; public $title; public $file; protected function rules() { return [ 'title' => ['required', 'string', 'max:50'], 'file' => ['required', 'file', 'mimes:pdf,doc,docx', 'max:5000'] ]; } public function submit() { $this->validate(); $data = [ 'title' => $this->title ]; if (!empty($this->file)) { $url = $this->file->store('files', 'public'); $data['file'] = $url; } File::create($data); session()->flash('message', 'File successfully Uploaded.'); } ```
null
CC BY-SA 4.0
null
2023-01-27T18:38:41.727
2023-01-29T01:05:27.177
2023-01-29T01:05:27.177
9,569,941
9,569,941
null
75,262,232
2
null
75,262,169
0
null
Looks like a candidate for `lag` analytic function. Sample data is rather so it is unclear what happens when there's more data, but - that's the general idea. Sample data: ``` SQL> with test (codmes, customer, deudaprestamo_pagper) as 2 (select 202212, 'T1009', 200 from dual union all 3 select 202211, 'T1009', 150 from dual 4 ) ``` Query: ``` 5 select codmes, customer, 6 deudaprestamo_pagper, 7 deudaprestamo_pagper - 8 lag(deudaprestamo_pagper) over (partition by customer order by codmes) sale_ct 9 from test; CODMES CUSTO DEUDAPRESTAMO_PAGPER SALE_CT ---------- ----- -------------------- ---------- 202211 T1009 150 202212 T1009 200 50 SQL> ``` --- If you want to fetch only the last row (sorted by `codmes`), you could e.g. ``` 6 with temp as 7 (select codmes, customer, 8 deudaprestamo_pagper, 9 deudaprestamo_pagper - 10 lag(deudaprestamo_pagper) over (partition by customer order by codmes) sale_ct, 11 -- 12 row_number() over (partition by customer order by codmes desc) rn 13 from test 14 ) 15 select codmes, customer, deudaprestamo_pagper, sale_ct 16 from temp 17 where rn = 1; CODMES CUSTO DEUDAPRESTAMO_PAGPER SALE_CT ---------- ----- -------------------- ---------- 202212 T1009 200 50 SQL> ```
null
CC BY-SA 4.0
null
2023-01-27T18:51:34.193
2023-01-27T18:51:34.193
null
null
9,097,906
null
75,262,977
2
null
61,606,661
0
null
Alternatively, you can create a modifier that allows you to change the View in question when it's hovered: ``` extension View { func onHover<Content: View>(@ViewBuilder _ modify: @escaping (Self) -> Content) -> some View { modifier(HoverModifier { modify(self) }) } } private struct HoverModifier<Result: View>: ViewModifier { @ViewBuilder let modifier: () -> Result @State private var isHovering = false func body(content: Content) -> AnyView { (isHovering ? modifier().eraseToAnyView() : content.eraseToAnyView()) .onHover { self.isHovering = $0 } .eraseToAnyView() } } ``` Then each Circle on your example would go something like: ``` Circle().fill(Color.red).frame(width: 50, height: 50) .animation(.default) .onHover { view in _ = print("Mouse hover") view.scaleEffect(2.0) } ```
null
CC BY-SA 4.0
null
2023-01-27T20:19:50.253
2023-01-27T20:19:50.253
null
null
1,588,543
null
75,263,083
2
null
75,263,042
0
null
JavaScript strings are not mutable, meaning you can't change the value of a character at a certain index. You'll need to make a new string made of these values. ``` let string = 'lowercasestring'; // Creates a variable and stores a string. let letterOne = string.indexOf('l'); // Should store as 0. let letterTwo = string.indexOf('s'); // Should store as 7. // mutiple lines for readability string = string[letterOne].toUpperCase() + string.slice(letterOne + 1, letterTwo) + string[letterTwo].toUpperCase() + string.slice(letterTwo + 1); console.log(string); ``` Output: ``` "LowercaSestring" ```
null
CC BY-SA 4.0
null
2023-01-27T20:32:44.387
2023-01-27T20:32:44.387
null
null
12,101,554
null
75,263,432
2
null
75,262,324
1
null
Use img.naturalHeight and img.naturalWidth to determine the position at which the effective image starts. Briefly, the following quantity will be negative if the Y of the event is relative to a point above the image, so capture it in your event and check: ``` y0 = (400 - 400*mainImg.naturalHeight/mainImg.naturalWidth)/2; var effectiveY = event.offsetY - y0; ``` A little math is involved here, feel free to ask if you need a general description when the image can be a portrait, or if you still need help detecting events below the image. ``` var y0; window.addEventListener("load", function(ev) { y0 = (400 - 400*mainImg.naturalHeight/mainImg.naturalWidth)/2; }); mainImg.addEventListener("mousemove", function(ev) { infoDiv.innerText = ev.offsetY - y0; }); ``` ``` img { object-fit: scale-down; border: 1px solid #AAA; } ``` ``` effectiveY is: <span id="infoDiv"></span> <br> <img id="mainImg" src="https://st.hzcdn.com/simgs/pictures/gardens/garden-with-oval-lawns-fenton-roberts-garden-design-img~1971dc9307c80c73_4-8900-1-60a5647.jpg" width=400 height=400> ```
null
CC BY-SA 4.0
null
2023-01-27T21:15:46.877
2023-01-27T21:15:46.877
null
null
1,212,815
null
75,263,498
2
null
75,262,145
1
null
I think you dont have to pass `/public` ``` src={"/images/logo.png"} ``` next.js automatically will go inside `public` folder
null
CC BY-SA 4.0
null
2023-01-27T21:24:00.527
2023-01-27T21:24:00.527
null
null
10,262,805
null
75,263,546
2
null
75,263,327
4
null
It's because you used upper-case `HH` instead of lower-case `hh` in the format string. You also need the AM/PM indicator: ``` hh:mm tt ``` This is well-documented: > [https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings) Unfortunately, right now this always results in an uppercase indicator, so you'll see `11:30 PM`. If you really need to see `11:30 pm` you need to correct it with normal string manipulation. I'd like to see the `t` ("t"ime of day) specifiers enhanced, such that lowercase `t` is a lowercase indicator and uppercase `T` is an uppercase indicator, along with a mechanism to infer the case from the system's datetime format. I suspect the reason this has not happened is a certain important time format uses a literal `T` to separate the date and time portions of the string.
null
CC BY-SA 4.0
null
2023-01-27T21:30:51.470
2023-01-28T02:44:33.100
2023-01-28T02:44:33.100
3,043
3,043
null
75,263,617
2
null
75,263,327
1
null
why not consider just one text box, and use textmode= So, say this text box: ``` <asp:TextBox ID="TextBox1" runat="server" TextMode="DateTimeLocal"> </asp:TextBox> ``` You then get/see this: [](https://i.stack.imgur.com/cl9cM.gif) In other words, you have one text box - it will have both date and time for you. About the only thing I don't like, is tab key does not select, you have to hit enter key. but, it also allows in-line editing if you don't want to use the picker. Hence this: [](https://i.stack.imgur.com/A9IK0.gif) And if you enter (without the picker), then you have to use arrow keys to move to the next part. Again, I don't find this 100% intuitive. However, you can drop in 2 controls, and feed it the "one" date time variable. You feed using "iso" date format, but it will take on your local settings. So, say this markup: ``` <h4>Enter Date</h4> <asp:TextBox ID="txtDate" runat="server" TextMode="Date"> </asp:TextBox> <h4>Enter Time</h4> <asp:TextBox ID="txtTime" runat="server" TextMode="Time"> </asp:TextBox> ``` And code to load: ``` DateTime dtStart = DateTime.Now; txtDate.Text = dtStart.ToString(@"yyyy-MM-dd"); txtTime.Text = dtStart.ToString(@"HH:mm"); ``` NOTE close above, I feed the time a 24 hour format, but it does display in 12 hour format. and now we get/see this: [](https://i.stack.imgur.com/en5W0.gif)
null
CC BY-SA 4.0
null
2023-01-27T21:41:10.617
2023-01-27T21:59:20.037
2023-01-27T21:59:20.037
10,527
10,527
null
75,263,870
2
null
75,261,412
1
null
Although the error looks some what confusing, your are missing the keyword `steps`. ``` trigger: - develop pool: vmImage: windows-2019 steps: - task: MSBuild@1 inputs: solution: '**/*.sln' - task: DownloadBuildArtifacts@1 inputs: buildType: 'current' downloadType: 'single' itemPattern: '**/*.exe' downloadPath: '$(System.ArtifactsDirectory)' ```
null
CC BY-SA 4.0
null
2023-01-27T22:20:24.393
2023-01-27T22:20:24.393
null
null
8,843,952
null
75,263,975
2
null
29,500,227
-2
null
I had the same issue building my first app. Try Open project with .xcodeproj Quit Xcode Reopen project from .xcworkspace
null
CC BY-SA 4.0
null
2023-01-27T22:34:33.490
2023-01-27T22:34:33.490
null
null
18,920,514
null
75,264,038
2
null
22,415,651
0
null
An idea using gradient: ``` .box { width: 200px; aspect-ratio: 2; border-radius: 999px 999px 0 0; background: radial-gradient(50% 100% at bottom,#0000 80%,red 80.5%); } ``` ``` <div class="box"></div> ```
null
CC BY-SA 4.0
null
2023-01-27T22:44:34.247
2023-01-27T22:44:34.247
null
null
8,620,333
null
75,264,104
2
null
75,130,331
0
null
the reason is that you didn't add the relay plugin to your grade settings. Check section [https://developer.android.com/jetpack/compose/tooling/relay/install-relay#install-relay](https://developer.android.com/jetpack/compose/tooling/relay/install-relay#install-relay)
null
CC BY-SA 4.0
null
2023-01-27T22:54:14.977
2023-01-27T22:54:14.977
null
null
2,268,063
null
75,264,190
2
null
74,726,036
1
null
As you mentioned, adding this to the `Tooltip` tag solved the issue for me: ``` style={{position:"fixed"}} ```
null
CC BY-SA 4.0
null
2023-01-27T23:07:15.747
2023-01-27T23:07:15.747
null
null
11,217,960
null
75,264,647
2
null
5,768,739
0
null
If you want to have padding around the scrolling area anyway, a more recent CSS solution is to set the property `scrollbar-gutters: stable both-edges;`. This will always include space for the vertical scrollbar, but only draws the scrollbar when needed. You can remove the `both-edges` part to just have padding on one edge. It is not ideal, but at least a little better than setting `overflow-y: scroll;` or `overflow-x: hidden;`. I use it in my popup component. In most cases my popups don't need scroll, but I can set this once on my popup component and know the few scrolling cases will look good enough. MDN docs: [https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter](https://developer.mozilla.org/en-US/docs/Web/CSS/scrollbar-gutter) That page points out it is currently not supported on Safari.
null
CC BY-SA 4.0
null
2023-01-28T00:49:40.403
2023-01-28T00:49:40.403
null
null
7,823,887
null
75,264,872
2
null
60,717,543
1
null
Actually I had this problem and the answer is really easy. First of all you need to see which version of pip do you have. you can try `which pip` and also try with `which pip3`. Next, when you open the terminal and and want to write your code if you have pyhton3 write on the command line '`python3` then `from scapy.all import *` will be okay to use.
null
CC BY-SA 4.0
null
2023-01-28T01:51:21.170
2023-01-28T01:51:21.170
null
null
21,069,603
null
75,264,935
2
null
75,264,913
1
null
Don't return inside the loop, as that will only return the first element. Either build up a result array to return after the loop, or use [Array#map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). ``` var userChosenBadges = ['Next.js', 'React'] function generateFrameworkBadges(userChosenBadges) { var badgeUrlArray = []; for(let i=0;i<userChosenBadges.length;i++)switch(userChosenBadges[i]){case"Next.js":badgeUrlArray.push("url1");break;case"React":badgeUrlArray.push("url2");break;case"Vue":badgeUrlArray.push("url3");break;case"Angular":badgeUrlArray.push("url4");break;case"Svelte":badgeUrlArray.push("url5");break;case"Laravel":badgeUrlArray.push("url6");break;case"Bootstrap":badgeUrlArray.push("url7");break;case"jQuery":badgeUrlArray.push("url8")} return userChosenBadges.map((badge, i) => `![${badge}](${badgeUrlArray[i]})`); } console.log(generateFrameworkBadges(userChosenBadges)) ```
null
CC BY-SA 4.0
null
2023-01-28T02:05:48.810
2023-01-28T02:05:48.810
null
null
9,513,184
null
75,264,970
2
null
75,264,913
1
null
In addition to the @Unmitigated answer, which you should feel free to accept, note that the switch can be stated much more concisely with an object literal, and with that, the whole function can be restated as a single map. ``` function generateFrameworkBadges(userChosenBadges) { const badge2Url = { 'Next.js': 'url1', 'React': 'url2', 'Vue': 'url3', 'Angular': 'url4', 'Svelte': 'url5', 'Laravel': 'url6', 'Bootstrap': 'url7', 'jQuery': 'url8' } return userChosenBadges.map(b => `![${b}](${badge2Url[b]})`); } const userChosenBadges = ['Next.js', 'React'] console.log(generateFrameworkBadges(userChosenBadges)) ```
null
CC BY-SA 4.0
null
2023-01-28T02:18:36.093
2023-01-28T02:18:36.093
null
null
294,949
null
75,265,093
2
null
31,117,069
0
null
As of Xcode 14/iOS 16, in your subclass, you simply set the and properties of : ``` tabBar.tintColor = 'some UI color' tabBar.unselectedItemTintColor = 'some UI color' ```
null
CC BY-SA 4.0
null
2023-01-28T02:59:11.010
2023-01-28T02:59:11.010
null
null
18,546,561
null
75,265,090
2
null
75,265,023
1
null
``` #container { text-align : center; } .button { border : none; color : rgba(93, 24, 172, 0.603); padding : 15px 15px; text-align : center; text-decoration : none; display : inline-block; font-size : 10px; margin : 15px 10px; cursor : pointer; } .button1 { background-color : white; } /* added to see white text */ body { background : darkblue; } pre{ display:inline-block; text-align:left; margin:0 auto;} ``` ``` <div id="container"> <pre style="font-family:Calibri; color:white;border: 1px solid white;"> Duis aute irure dolor in reprehenderit in voluptare velit esse cillum dolore eu fugiat nulla pariatur. Exceptur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est.</pre> <div text-align="center"> <button class="button button1" style="text-align:right;">READ MORE</button> </div> </div> ```
null
CC BY-SA 4.0
null
2023-01-28T02:59:00.957
2023-01-28T19:45:39.090
2023-01-28T19:45:39.090
4,398,966
4,398,966
null
75,265,193
2
null
75,265,023
0
null
The main issue with your code is that button has an absolute position so it was removed from the normal document flow. Also depending on your website, you would need some sort of layout, or container around the button and text to keep them together. I moved the button under the text and made a container for them. I also removed some unnecessary css and html you had, like the div around the button. ``` body { background: #496bbe } .Container { display: flex; flex-direction: column; justify-content: center; align-items: center; width: fit-content; } .button { border: none; color: rgba(93, 24, 172, 0.603); padding: 15px 15px; font-size: 10px; cursor: pointer; } .button1 { background-color: white; } pre { font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif; color: white; text-align: left; white-space: pre-wrap; } ``` ``` <section class="Container"> <pre> Duis aute irure dolor in reprehenderit in voluptare velit esse cillum dolore eu fugiat nulla pariatur. Exceptur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est.</pre> <button class="button button1" style="text-align:right;">READ MORE</button> </section> ```
null
CC BY-SA 4.0
null
2023-01-28T03:32:01.667
2023-01-28T03:32:01.667
null
null
16,095,730
null
75,265,183
2
null
75,241,161
0
null
You've provided so much code that it's a bit confusing coming up with an answer. All these other bits that you've included like marketplace products, data stores loading the player's progress, initializing touch events, saving player data, etc.; all of this is unnecessary to your question. At the most basic, you have two values : `leaderstats.Stage` and `CurrentStage`, and you don't want `CurrentStage` to be able to go beyond `leaderstats.Stage`. The safest thing to do would be to put safety checks into your server Script so that the client cannot request to go higher than their unlocked stage. And the thing is, you've got the right pieces already in place, I think you just need to simplify your code and pass around the right values to make it all work together properly. Here are the changes I would make... - `local CurrentStage``player.CurrentStage`- - `CurrentStage` ``` --SERVICES -- local Players = game:GetService("Players") local ReplicatedStorage = game:GetService("ReplicatedStorage") -- VARIABLES -- local player = Players.LocalPlayer local event = ReplicatedStorage:WaitForChild("Handler") -- UI Elements local Stage = script.Parent.Main.EditStageTXT local SkipButton = script.Parent.Main.SkipStageBTN local MaxStage = script.Parent.Main.MaxLevelTXT -- TRIGGERS -- player.CurrentStage.Changed:Connect(function(newValue) -- update the text whenever the `CurrentStage` value changes Stage.Text = "Stage: " .. tostring(newValue) end) SkipButton.MouseButton1Click:Connect(function() event:FireServer("SkipStage") end) Stage.LeftEditStageBTN.MouseButton1Click:Connect(function(stage) -- request the server to move us to the previous stage event:FireServer("MoveToStage", player.CurrentStage.Value - 1) end) Stage.RightEditStageBTN.MouseButton1Click:Connect(function(stage) -- request the server to move us to the next stage event:FireServer("MoveToStage", player.CurrentStage.Value + 1) end) ``` I have only updated these two functions, there were too many other moving parts and I wanted to focus on just the parts that mattered to your problem. - `player.leaderstats.Stage`- `MoveToStage`- `UpdateStage``CurrentStage.Value` ``` function TpToStage(player, stageNumber) if stageNumber == player.CurrentStage.Value then return end player.CurrentStage.Value = stageNumber player.Character.HumanoidRootPart.CFrame = Stages[tostring(stageNumber)].CFrame + Vector3.new(0,4,0) end function MoveToStage(player, nextStage) -- clamp the value between [0, leaderstats.Stage] local function clamp(minimum, value, maximum) return math.max(minimum, math.min(value, maximum)) end nextStage = clamp(0, nextStage, player.leaderstats.Stage.Value) TpToStage(player, nextStage) end ```
null
CC BY-SA 4.0
null
2023-01-28T03:30:09.887
2023-01-28T03:39:15.397
2023-01-28T03:39:15.397
2,860,267
2,860,267
null
75,265,374
2
null
6,050,094
1
null
If you want to find the "concave" hull (i.e., counter-clockwise sort the points around a centroid), you might try: ``` import matplotlib.pyplot as plt import numpy as np # List of coords coords = np.array([7,7, 5, 0, 0, 0, 5, 10, 10, 0, 0, 5, 10, 5, 0, 10, 10, 10]).reshape(-1, 2) centroid = np.mean(coords, axis=0) sorted_coords = coords[np.argsort(np.arctan2(coords[:, 1] - centroid[1], coords[:, 0] - centroid[0])), :] plt.scatter(coords[:,0],coords[:,1]) plt.plot(coords[:,0],coords[:,1]) plt.plot(sorted_coords[:,0],sorted_coords[:,1]) plt.show() ``` [](https://i.stack.imgur.com/JxaRi.png)
null
CC BY-SA 4.0
null
2023-01-28T04:34:36.850
2023-02-15T21:25:01.373
2023-02-15T21:25:01.373
2,769,997
2,769,997
null
75,265,489
2
null
75,265,204
1
null
With every one of the console output problems for drawing asterisk triangles or boxes or whatever, it is often useful to get out a piece of graph paper and an pencil and actually draw what you want to see. Then, consider the :       `` `` `-` `-` `-` `` ``       `` `{` `:` `@` `:` `}` ``       `` `` `-` `-` `-` `` ``       `` `{` `:` `:` `:` `}` ``       `{` `:` `:` `@` `:` `:` `}`       `` `{` `:` `:` `:` `}` ``       `` `` `-` `-` `-` `` ``       `` `` `` `|` `/` `` ``       `` `` `` `|` `` `` ``       `` `` `\` `|` `` `` ``       `` `` `` `|` `` `` `` Notice the blank spaces on the of the graphic? The number of blank spaces to the left is directly related to the width of the centered figure. There must be some number (zero or more) blank spaces printed on a line that line’s graphic. --- One other hint: You should be using to implement each one of your menu selections. Have a function that does the flower. And another to do the HELLO graphic. It is also a good idea to have a function which simply does the menu. Then your main function can look something like this: ``` int main() { bool done = false; while (!done) { switch (menu()) { case '1': hello(); break; case '2': flower(); break; case '3': done = true; } } } ```
null
CC BY-SA 4.0
null
2023-01-28T05:04:11.897
2023-01-28T05:04:11.897
null
null
2,706,707
null
75,265,776
2
null
75,028,157
0
null
Even I got the same error but I continued adding a listener and the error was gone `enter code here` ``` DevTools devTools = driver.getDevTools(); devTools.createSession(); devTools.send(Network.enable( Optional.empty(), Optional.empty(), Optional.empty())); //devTools.send(Network.enable(null,null,null)); devTools.addListener(Network.requestWillBeSent(), request -> {System.out.println("Reuest URL:" +request.getRequest().getUrl()); System.out.println("Request Method: "+request.getRequest().getMethod());}); driver.get("https://stackoverflow.com/questions/75028157/network-enable-is-not-working-on-devtools"); ```
null
CC BY-SA 4.0
null
2023-01-28T06:17:54.033
2023-01-28T06:17:54.033
null
null
19,704,721
null
75,265,909
2
null
75,265,820
1
null
You can create a loop to go through each `id` and `run` cutoff value, and for each iteration of the loop, determine the new segment of your dataframe by the id and run values of the original dataframe, and append the new dataframe to your final dataframe. ``` df_truncated = pd.DataFrame(columns=df.columns) for id,run_cutoff in zip([1,2,3],[6,3,5]): df_chunk = df[(df['id'] == id) & (df['runs'] > run_cutoff)].copy() df_chunk['runs'] = range(1, len(df_chunk)+1) df_truncated = pd.concat([df_truncated, df_chunk]) ``` Result: ``` id runs Children Days 6 1 1 Yes 128 7 1 2 Yes 66 8 1 3 Yes 120 9 1 4 No 141 13 2 1 Yes 141 14 2 2 Yes 52 15 2 3 Yes 96 21 3 1 Yes 36 22 3 2 Yes 58 23 3 3 No 89 ```
null
CC BY-SA 4.0
null
2023-01-28T06:52:33.027
2023-01-28T06:52:33.027
null
null
5,327,068
null
75,265,914
2
null
75,265,820
3
null
Filter out the duplicates with [loc](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.loc.html) and [duplicated](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.duplicated.html), then renumber with [groupby.cumcount](https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.GroupBy.cumcount.html): ``` out = (df[~df.duplicated(subset=['id', 'runs'], keep=False)] .assign(runs=lambda d: d.groupby(['id']).cumcount().add(1)) ) ``` Output: ``` id runs Children Days 6 1 1 Yes 128 7 1 2 Yes 66 8 1 3 Yes 120 9 1 4 No 141 13 2 1 Yes 141 14 2 2 Yes 52 15 2 3 Yes 96 21 3 1 Yes 36 22 3 2 Yes 58 23 3 3 No 89 ```
null
CC BY-SA 4.0
null
2023-01-28T06:55:05.197
2023-01-28T07:00:55.140
2023-01-28T07:00:55.140
16,343,464
16,343,464
null
75,266,257
2
null
75,177,357
0
null
Clone the particular branch of AGE ``` git clone -b PG12 https://github.com/apache/age.git ``` Try with this branch as well. You can go inside the database terminal and do ``` SELECT version(); ``` to confirm whether Postgres is actually in version 12.
null
CC BY-SA 4.0
null
2023-01-28T08:11:16.157
2023-01-28T08:11:16.157
null
null
14,530,392
null
75,266,649
2
null
75,266,579
0
null
You could use `results="hold"` in your chunk. Here is a reproducible example using the `iris` dataset: ``` --- title: "Test" date: "2023-01-28" output: pdf_document --- ```{r, results="hold"} ncol(iris) nrow(iris) names(iris) ``` ``` Output: [](https://i.stack.imgur.com/KIg9A.png)
null
CC BY-SA 4.0
null
2023-01-28T09:28:19.470
2023-01-28T09:28:19.470
null
null
14,282,714
null
75,266,760
2
null
75,266,729
0
null
I don't know by "space above `ListView.builder`" or "How can I change the position of the `ListView.builder` that uses `shrinkWrap`?" what you mean Possible solutions considering all cases: - If it's outside the `ListView` is because of wrapping it in `Center` which is obvious.- If you are referring to the top margin inside the `ListView` it is because of this line `margin: EdgeInsets.all(32),`- You just have to remove `Center` widget, it will change it's position to the start of the app. Extra: You can remove the default `padding` of `ListView.builder` by adding `padding:EdgeInsets.zero`. If this is what you are talking about. ``` Scaffold( body: Container( decoration: BoxDecoration( border: Border.all(color: Colors.red), color: Colors.amber), child: ListView( padding: EdgeInsets.zero, shrinkWrap: true, children: const <Widget>[ ListTile(title: Text('Item 1')), ListTile(title: Text('Item 2')), ListTile(title: Text('Item 3')), ], ), )), ``` [](https://i.stack.imgur.com/9Fn6km.png) Note: You dont have to use `shrinkWrap:true` everytime , it is preferred to be used, only when your `listView` is inside another `Scrollable` view. Else it is preferred to be `false` which is the option by default --- Refer the [docs:](https://api.flutter.dev/flutter/widgets/ScrollView/shrinkWrap.html) > Shrink wrapping the content of the scroll view is significantly more expensive than expanding to the maximum allowed size because the content can expand and contract during scrolling, which means the size of the scroll view needs to be recomputed whenever the scroll position changes.
null
CC BY-SA 4.0
null
2023-01-28T09:51:47.750
2023-02-15T13:11:19.373
2023-02-15T13:11:19.373
13,302
13,431,819
null
75,266,802
2
null
75,266,788
1
null
If you build/compile from intellij or eclipse it will just compile the source code whereas will build/compile the source and creates the jar file.
null
CC BY-SA 4.0
null
2023-01-28T10:00:23.760
2023-01-28T10:00:23.760
null
null
5,156,999
null
75,266,945
2
null
3,962,558
0
null
There is experimental `onscrollend` event [https://developer.mozilla.org/en-US/docs/Web/API/Document/scrollend_event](https://developer.mozilla.org/en-US/docs/Web/API/Document/scrollend_event) For now works only in firefox 109+, if other browsers catch up will be very nice. Have polyfill for that [https://github.com/argyleink/scrollyfills](https://github.com/argyleink/scrollyfills) Use like ``` import "scrollyfills"; ... scrollContainer.addEventListener( "scrollend", (ev) => { console.log('scroll END') } ); ```
null
CC BY-SA 4.0
null
2023-01-28T10:28:18.180
2023-01-28T10:28:18.180
null
null
5,538,912
null
75,267,165
2
null
75,266,911
1
null
The screenshot with VS Code window shows `index.html` marked as modified since opening. It looks like you have NOT saved the file before committing and pushing. After you save, commit and push the changes should appear in your GitHub repo.
null
CC BY-SA 4.0
null
2023-01-28T11:07:29.407
2023-01-28T11:07:29.407
null
null
581,076
null
75,267,290
2
null
75,250,454
0
null
Your question is not clear. When do you want the LED switches on? You just read values from the serial line and print them on the serial monitor. you have to use: ``` Serial.read(); ``` to get data from the serial monitor and after that decide how the LED changes behavior. Also, you need to use ``` digitalWrite(pinNumber, HIGH); ``` to set LED pins high and then base on your condition (get some specified data from Serial or a temperature limit) turn them off by: ``` digitalWrite(pinNumber, LOW); ```
null
CC BY-SA 4.0
null
2023-01-28T11:28:31.090
2023-01-28T11:28:31.090
null
null
21,077,383
null
75,267,545
2
null
75,265,468
1
null
try: ``` =QUERY(D:F; "select D,sum(F) where D is not null group by D label sum(F)''") ``` if you insist on injection use: ``` =INDEX(IFNA(VLOOKUP(A2:A; QUERY(D:F; "select D,sum(F) where D is not null group by D label sum(F)''"); 2; ))) ``` --- ## update: use in F2: ``` =INDEX(IFNA(VLOOKUP(E2:E, QUERY({L:L, O:O}, "select Col1,sum(Col2) where Col1 is not null group by Col1 label sum(Col2)''"), 2, ))) ```
null
CC BY-SA 4.0
null
2023-01-28T12:11:40.733
2023-01-28T18:32:52.633
2023-01-28T18:32:52.633
5,632,629
5,632,629
null
75,267,593
2
null
75,260,718
1
null
As @teunbrand said completely right in the comments, the line is not perfectly continuously covered because of the small line cutes (a lot of timestamp values). To fix this we could use `lineend = "round"` to make the ends round of each line like this: ``` library(ggplot2) x = seq(0,2*pi,length.out=10000) y = sin(x) df<-data.frame(x=x,y=y, width = seq(from = 0.0001, to = 1, by = 0.0001)) ggplot(df, aes(x = x, y = y, linewidth = width)) + geom_line(show.legend = FALSE, lineend = "round") ``` ![](https://i.imgur.com/NYNkZxu.png) [reprex v2.0.2](https://reprex.tidyverse.org) As we can see, the transparent line is gone.
null
CC BY-SA 4.0
null
2023-01-28T12:17:57.460
2023-01-28T12:17:57.460
null
null
14,282,714
null
75,267,626
2
null
75,267,522
0
null
In case of HTML you need to get the required formatting from Excel objects and then set up HTML attributes (or styles) on your own. You can also use the Word object model for copying and pasting the data with formatting. The [WordEditor](https://learn.microsoft.com/en-us/office/vba/api/outlook.inspector.wordeditor) property returns the Microsoft Word Document Object Model of the message being displayed. The returned Word `Document` object provides access to most of the Word object model. See [Chapter 17: Working with Item Bodies](https://msdn.microsoft.com/en-us/library/dd492012(v=office.12).aspx) for more information. Also be aware, the `HTMLBody` property in the following piece of code returns a well formed HTML document: ``` Signature = OutMail.HTMLBody ``` But later in the code you add some HTML markup before the document begins which is not correct. Even if Outlook handles such cases correctly, there is a possible mistake if the behavior is changed at some point. Keep the HTML markup well-formed inserting the content between the opening and closing `<body>` tags.
null
CC BY-SA 4.0
null
2023-01-28T12:22:31.073
2023-01-28T12:22:31.073
null
null
1,603,351
null
75,267,652
2
null
75,266,686
1
null
this below code is sample for `RichText` widget :) ``` import 'package:flutter/material.dart'; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: 'Flutter Demo', home: Scaffold( body: Center( child: RichText( text: const TextSpan( text: 'خصومات تصل علی', style: TextStyle(color: Colors.black), children: <TextSpan>[ TextSpan( text: ' 60% ', style: TextStyle(fontWeight: FontWeight.bold,color: Colors.red)), TextSpan( text: ' علی ', style: TextStyle(color: Colors.black)), ], ), ), ), ), ); } } ```
null
CC BY-SA 4.0
null
2023-01-28T12:26:10.900
2023-01-28T12:26:10.900
null
null
9,854,260
null
75,268,196
2
null
75,268,167
-1
null
``` df['col3'] = df.apply(lambda row: row['col1'] * row['col2'], axis=1) ```
null
CC BY-SA 4.0
null
2023-01-28T14:01:41.393
2023-01-28T14:01:41.393
null
null
12,172,073
null
75,268,292
2
null
75,265,895
1
null
To logout the user, you'll need to send a push message which in turn basically triggers the submit of a hidden logout form. You can do this via a web socket. A kickoff example can be found in this answer: [Notify only specific user(s) through WebSockets, when something is modified in the database](https://stackoverflow.com/questions/32426674/notify-only-specific-users-through-websockets-when-something-is-modified-in-t/32476664#32476664). To logout the user, you'll need to implement a [servlet filter](https://stackoverflow.com/tags/servlet-filters/info) which checks on every single request if the currently logged-in user is still valid. Here's a kickoff example assuming that you're using [homegrown user authentication](https://stackoverflow.com/questions/13274279/authentication-filter-and-servlet-for-login/13276996#13276996) (which is confirmed by [the screenshot](https://i.stack.imgur.com/Tdpua.png) as visible in your deleted answer here): ``` @WebFilter("/whatever_url_pattern_covering_your_restricted_pages/*") public class YourLoginFilter extends HttpFilter { @Override public void doFilter(HttpServletRequest request, HttpServletRequest response, FilterChain chain) throws IOException, ServletException { HttpSession session = request.getSession(false); YourUser user = (session == null) ? null : (YourUser) session.getAttribute("user"); if (user == null) { // No logged-in user found, so redirect to login page. response.sendRedirect(request.getContextPath() + "/login"); } else { // Logged-in user found, so validate it. if (yourUserService.isValid(user)) { // User is still valid, so continue request. chain.doFilter(request, response); } else { // User is not valid anymore (e.g. deleted by admin), so block request. response.sendRedirect(request.getContextPath() + "/blocked"); } } } } ```
null
CC BY-SA 4.0
null
2023-01-28T14:18:49.913
2023-01-30T11:04:32.990
2023-01-30T11:04:32.990
157,882
157,882
null
75,268,409
2
null
75,268,365
0
null
You can try with ARRAYFORMULA in another column: ``` =ARRAYFORMULA(0&A1:A) =INDEX(0&A1:A) ``` (PS: you may change A1:A with A1:A783) --- If you want to just change the values in that column, you may use FIND AND REPLACE --> (Edit -> Find and Replace), be sure you tick . Put to find `^` and to replace `0` [](https://i.stack.imgur.com/WMAu8.png) --- NOTE: thanks to @rockinfreakshow, prior this second option, first format to plain text: [](https://i.stack.imgur.com/jQoiR.png) And then do the replacement: [](https://i.stack.imgur.com/8F68s.png)
null
CC BY-SA 4.0
null
2023-01-28T14:36:16.540
2023-01-28T14:50:50.343
2023-01-28T14:50:50.343
20,363,318
20,363,318
null
75,268,433
2
null
75,268,338
1
null
They are green because you have a git repository in this folder and the files are untracked (hence U symbol) Either track them or remove the git repository
null
CC BY-SA 4.0
null
2023-01-28T14:40:16.357
2023-01-28T14:40:16.357
null
null
5,089,567
null
75,268,411
2
null
60,848,669
0
null
The answer is that the question is flawed. The code below finds these flaws/"CONFLICTS": ``` Mac_3.2.57$cat kmap_so_60848669--how-can-i-find-the-equation-from-this-truth-table-using-k-map-or-qm-method.c #include <stdio.h> #define F0 0 #define F1 1 #define F2 2 #define F3 3 #define ALUOp0 4 #define ALUOp1 5 #define Operation2 6 #define Operation1 7 #define Operation0 8 #define dontKnow 2 #define dontCare 3 int main(void){ int op[64][9]; /* populate inputs */ for(int i=0; i<64; i++){ if(i % 2 == 1){ op[i][0] = 1; }else{ op[i][0] = 0; } if(i/2 % 2 == 1){ op[i][1] = 1; }else{ op[i][1] = 0; } if(i/4 % 2 == 1){ op[i][2] = 1; }else{ op[i][2] = 0; } if(i/8 % 2 == 1){ op[i][3] = 1; }else{ op[i][3] = 0; } if(i/16 % 2 == 1){ op[i][4] = 1; }else{ op[i][4] = 0; } if(i/32 % 2 == 1){ op[i][5] = 1; }else{ op[i][5] = 0; } op[i][Operation2] = 3; op[i][Operation1] = 3; op[i][Operation0] = 3; } /* populate outputs based on CKT */ for(int i=0; i<64; i++){ /* from given ckt */ op[i][Operation2] = op[i][ALUOp0] || (op[i][ALUOp1] && op[i][F1]); op[i][Operation1] = !op[i][ALUOp1] || !op[i][F2]; op[i][Operation0] = op[i][ALUOp1] && (op[i][F3] || op[i][F0]); } /* print truth table */ printf( "ALUOp1 ALUOp0 F3 F2 F1 F0 Operation210 Notes\n"); for(int i=0; i<64; i++){ printf("%d %d %d %d %d %d %d%d%d ", op[i][ALUOp1], op[i][ALUOp0], op[i][F3], op[i][F2], op[i][F1], op[i][F0], op[i][Operation2], op[i][Operation1], op[i][Operation0]); if(op[i][ALUOp1] == 0 && op[i][ALUOp0] == 0){ printf("row1 "); if(op[i][Operation2] != 0 || op[i][Operation1] != 1 || op[i][Operation0] != 0){ printf("CONFLICTS WITH TABLE! "); } } if(op[i][ALUOp1] == 0 && op[i][ALUOp0] == 1){ printf("row2 "); if(op[i][Operation2] != 1 || op[i][Operation1] != 1 || op[i][Operation0] != 0){ printf("CONFLICTS WITH TABLE! "); } } if(op[i][ALUOp1] == 1 && op[i][F3] == 0 && op[i][F2] == 0 && op[i][F1] == 0 && op[i][F0] == 0){ printf("row3 "); if(op[i][Operation2] != 0 || op[i][Operation1] != 1 || op[i][Operation0] != 0){ printf("CONFLICTS WITH TABLE! "); } } if(op[i][ALUOp1] == 1 && op[i][F3] == 0 && op[i][F2] == 0 && op[i][F1] == 1 && op[i][F0] == 0){ printf("row4 "); if(op[i][Operation2] != 1 || op[i][Operation1] != 1 || op[i][Operation0] != 0){ printf("CONFLICTS WITH TABLE! "); } } if(op[i][ALUOp1] == 1 && op[i][F3] == 0 && op[i][F2] == 1 && op[i][F1] == 0 && op[i][F0] == 0){ printf("row5 "); if(op[i][Operation2] != 0 || op[i][Operation1] != 0 || op[i][Operation0] != 0){ printf("CONFLICTS WITH TABLE! "); } } if(op[i][ALUOp1] == 1 && op[i][F3] == 0 && op[i][F2] == 1 && op[i][F1] == 0 && op[i][F0] == 1){ printf("row6 "); if(op[i][Operation2] != 0 || op[i][Operation1] != 0 || op[i][Operation0] != 1){ printf("CONFLICTS WITH TABLE! "); } } if(op[i][ALUOp1] == 1 && op[i][F3] == 1 && op[i][F2] == 0 && op[i][F1] == 1 && op[i][F0] == 0){ printf("row7 "); if(op[i][Operation2] != 1 || op[i][Operation1] != 1 || op[i][Operation0] != 1){ printf("CONFLICTS WITH TABLE! "); } } printf("\n"); } return(0); } Mac_3.2.57$cc kmap_so_60848669--how-can-i-find-the-equation-from-this-truth-table-using-k-map-or-qm-method.c Mac_3.2.57$./a.out ALUOp1 ALUOp0 F3 F2 F1 F0 Operation210 Notes 0 0 0 0 0 0 010 row1 0 0 0 0 0 1 010 row1 0 0 0 0 1 0 010 row1 0 0 0 0 1 1 010 row1 0 0 0 1 0 0 010 row1 0 0 0 1 0 1 010 row1 0 0 0 1 1 0 010 row1 0 0 0 1 1 1 010 row1 0 0 1 0 0 0 010 row1 0 0 1 0 0 1 010 row1 0 0 1 0 1 0 010 row1 0 0 1 0 1 1 010 row1 0 0 1 1 0 0 010 row1 0 0 1 1 0 1 010 row1 0 0 1 1 1 0 010 row1 0 0 1 1 1 1 010 row1 0 1 0 0 0 0 110 row2 0 1 0 0 0 1 110 row2 0 1 0 0 1 0 110 row2 0 1 0 0 1 1 110 row2 0 1 0 1 0 0 110 row2 0 1 0 1 0 1 110 row2 0 1 0 1 1 0 110 row2 0 1 0 1 1 1 110 row2 0 1 1 0 0 0 110 row2 0 1 1 0 0 1 110 row2 0 1 1 0 1 0 110 row2 0 1 1 0 1 1 110 row2 0 1 1 1 0 0 110 row2 0 1 1 1 0 1 110 row2 0 1 1 1 1 0 110 row2 0 1 1 1 1 1 110 row2 1 0 0 0 0 0 010 row3 1 0 0 0 0 1 011 1 0 0 0 1 0 110 row4 1 0 0 0 1 1 111 1 0 0 1 0 0 000 row5 1 0 0 1 0 1 001 row6 1 0 0 1 1 0 100 1 0 0 1 1 1 101 1 0 1 0 0 0 011 1 0 1 0 0 1 011 1 0 1 0 1 0 111 row7 1 0 1 0 1 1 111 1 0 1 1 0 0 001 1 0 1 1 0 1 001 1 0 1 1 1 0 101 1 0 1 1 1 1 101 1 1 0 0 0 0 110 row3 CONFLICTS WITH TABLE! 1 1 0 0 0 1 111 1 1 0 0 1 0 110 row4 1 1 0 0 1 1 111 1 1 0 1 0 0 100 row5 CONFLICTS WITH TABLE! 1 1 0 1 0 1 101 row6 CONFLICTS WITH TABLE! 1 1 0 1 1 0 100 1 1 0 1 1 1 101 1 1 1 0 0 0 111 1 1 1 0 0 1 111 1 1 1 0 1 0 111 row7 1 1 1 0 1 1 111 1 1 1 1 0 0 101 1 1 1 1 0 1 101 1 1 1 1 1 0 101 1 1 1 1 1 1 101 Mac_3.2.57$ ``` 0 FWIW, here is the start of the kmaps (not accurate due to conflicts between table and CKT): Op = o2o1o0 ``` o2: f1\f0 0 1 p1p0\f3f2 00 01 11 10 p1p2\f3f2 00 01 11 10 00 0 0 0 0 00 0 0 0 0 01 x x x x 01 x x x x 0 11 0 0 x x 11 x 0 x x 10 0 0 x x 10 x 0 x x p1p0\f3f2 00 01 11 10 p1p2\f3f2 00 01 11 10 00 0 0 0 0 00 0 0 0 0 01 x x x x 01 x x x x 1 11 1 x x 1 11 x x x x 10 1 x x 1 10 x x x x o1: f1\f0 0 1 p1p0\f3f2 00 01 11 10 p1p2\f3f2 00 01 11 10 00 1 1 1 1 00 1 1 1 1 01 x x x x 01 x x x x 0 11 1 0 x x 11 x 0 x x 10 1 0 x x 10 x 0 x x p1p0\f3f2 00 01 11 10 p1p2\f3f2 00 01 11 10 00 1 1 1 1 00 1 1 1 1 01 x x x x 01 x x x x 1 11 1 x x 1 11 x x x x 10 1 x x 1 10 x x x x o0: f1\f0 0 1 p1p0\f3f2 00 01 11 10 p1p2\f3f2 00 01 11 10 00 0 0 0 0 00 0 0 0 0 01 x x x x 01 x x x x 0 11 1 0 x x 11 x 1 x x 10 1 0 x x 10 x 1 x x p1p0\f3f2 00 01 11 10 p1p2\f3f2 00 01 11 10 00 0 0 0 0 00 0 0 0 0 01 x x x x 01 x x x x 1 11 0 x x 1 11 x x x x 10 0 x x 1 10 x x x x ```
null
CC BY-SA 4.0
null
2023-01-28T14:36:30.997
2023-01-28T15:20:35.877
2023-01-28T15:20:35.877
11,844,224
11,844,224
null
75,268,518
2
null
75,255,360
0
null
One option is to selectively suppress (using the suppress expression) the repeating values so that: In a 1-repeat case, they are not suppressed In a 2-repeat case, only the 1st row is visible In a 3-repeat case, only the 2nd row is visible etc.
null
CC BY-SA 4.0
null
2023-01-28T14:53:59.497
2023-01-28T14:53:59.497
null
null
1,734,722
null
75,268,808
2
null
75,268,404
2
null
It will get created under whatever path the parameter `db_create_file_dest` specifies. In SQL Plus, type `show parameter db_create_file_dest` or query `v$parameter`. If that parameter is not defined, it should create it in `$ORACLE_HOME/dbs` , which you probably don't want it to do.
null
CC BY-SA 4.0
null
2023-01-28T15:39:22.807
2023-01-28T15:39:22.807
null
null
20,542,862
null
75,268,813
2
null
19,026,351
0
null
I've been struggling with this issue myself for a couple days now. This is how I fixed it on my project: I have a property on my VC for my refreshControl: ``` private lazy var refreshControl: UIRefreshControl = { let refresh = UIRefreshControl() refresh.tintColor = UIColor.yellow refresh.addTarget(self, action: #selector(doSomething), for: .valueChanged) return refresh }() ``` On my `viewDidAppear` method, I was using ``` override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) tableView.setContentOffset(CGPoint(x: 0, y: -refreshControl.frame.height), animated: true) refreshControl.beginRefreshing() } ``` Well, turns out that if you set the `animated` property of `setContentOffset` to false, the refresh control tint color appears correctly from the very first time... ``` override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) tableView.setContentOffset(CGPoint(x: 0, y: -refreshControl.frame.height), animated: false) refreshControl.beginRefreshing() } ``` [](https://i.stack.imgur.com/O52sP.png)
null
CC BY-SA 4.0
null
2023-01-28T15:39:42.080
2023-01-28T15:39:42.080
null
null
3,636,532
null
75,269,169
2
null
54,708,981
1
null
Just in case anybody is still searching for an answer: set the [DisableImplicitFrameworkReferences](https://learn.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#disableimplicitframeworkreferences) property to true, then add references to the assemblies that are actually needed.
null
CC BY-SA 4.0
null
2023-01-28T16:32:59.173
2023-01-28T16:32:59.173
null
null
3,445,735
null
75,269,751
2
null
66,082,050
0
null
So I've managed to get somewhat close results shown in the picture by using ``` decoration: const BoxDecoration( gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment(0.8, 1), colors: <Color>[ Color(0xff87c7b9), Color(0xffe6be84), Color(0xff8f66bd), Color(0xff8634c3), Color(0xffb11ba7), ], tileMode: TileMode.mirror, ), ), ``` Feel free to experiment with more colors
null
CC BY-SA 4.0
null
2023-01-28T18:02:29.423
2023-01-28T18:02:29.423
null
null
16,867,144
null
75,270,091
2
null
75,213,233
2
null
![Fixed version](https://i.stack.imgur.com/opgIT.png) I'm fixed this bug. My mistake was that the ray intersected with the object without taking into account the direction of the ray, let's say the ray was directed forward (0, 0, 1), but it also intersected the object that was behind, I corrected this for triangles, for spheres I did not observe this ``` if dot(D-O, object_.normal) > 0: continue ``` As you can see, in the final image I got rid of many distortions that seemed to me to be serviceable
null
CC BY-SA 4.0
null
2023-01-28T18:52:38.100
2023-01-29T06:44:23.420
2023-01-29T06:44:23.420
2,521,214
16,606,758
null
75,270,214
2
null
75,269,750
0
null
If you like to use `Expanded` on Text(`hello`) widget. You need to get constrains from top level/parent widget, but this is not the solution you like to archive. - [/layout/constraints](https://docs.flutter.dev/development/ui/layout/constraints) As for the answer, you need to wrap `Row` widget `Column` to place another child just after the row widget. It could be skipped if you we had same color as background. ``` import 'package:percent_indicator/percent_indicator.dart'; import 'package:flutter/material.dart'; void main() { runApp(const MaterialApp( debugShowCheckedModeBanner: false, home: Pomodoro(), )); } class Pomodoro extends StatefulWidget { const Pomodoro({Key? key}) : super(key: key); @override State<Pomodoro> createState() => _PomodoroState(); } class _PomodoroState extends State<Pomodoro> { double percent = 0; // ignore: non_constant_identifier_names, unused_field static int TimeInMinut = 25; // ignore: non_constant_identifier_names int TimeInSec = TimeInMinut = 60; @override Widget build(BuildContext context) { return SafeArea( child: Scaffold( body: Container( decoration: const BoxDecoration( gradient: LinearGradient( colors: [Color(0xff1542bf), Color(0xff51a8ff)], begin: FractionalOffset(0.5, 1)), ), width: double.infinity, child: Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: [ const Padding( padding: EdgeInsets.only(top: 25.0), child: Text( 'Pomodoro Clock', style: TextStyle(color: Colors.white, fontSize: 40.0), ), ), Expanded( child: SizedBox( height: 20.0, width: 50.0, child: CircularPercentIndicator( percent: percent, animation: true, animateFromLastPercent: true, radius: 90.0, lineWidth: 20.0, progressColor: Colors.white, center: Text( '$TimeInMinut', style: const TextStyle( color: Colors.white, fontSize: 30.0), ), ), ), ), Expanded( child: Container( width: double.infinity, padding: const EdgeInsets.only( top: 30.0, left: 20.0, right: 20.0), decoration: const BoxDecoration( color: Color.fromARGB(255, 163, 48, 48), borderRadius: BorderRadius.only( topRight: Radius.circular(30.0), topLeft: Radius.circular(30.0)), ), child: Column( children: [ Row( children: [ Expanded( child: Column( children: const [ Text( 'Study Time', style: TextStyle( fontSize: 30.0, ), ), SizedBox( height: 10.0, ), Text( '25', style: TextStyle( fontSize: 80.0, ), ), ], ), ), Column( children: const [ Text( 'Pause Timer', style: TextStyle( fontSize: 30.0, ), ), Text( '5', style: TextStyle( fontSize: 80.0, ), ), Padding( padding: EdgeInsets.symmetric(vertical: 10.0), child: Text( 'hello', ), ) ], ), ], ), Container( height: 100, width: 200, padding: const EdgeInsets.symmetric(vertical: 0.0), child: ElevatedButton( onPressed: () {}, style: ElevatedButton.styleFrom( backgroundColor: Colors.red, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(100.0), ), ), child: const Padding( padding: EdgeInsets.all(20.0), child: Text( 'start studing', style: TextStyle( color: Colors.white, fontSize: 22.0), ), ), ), ), ], ), ), ), ]), ), ), ); } } ```
null
CC BY-SA 4.0
null
2023-01-28T19:17:14.820
2023-01-28T19:17:14.820
null
null
10,157,127
null
75,270,367
2
null
57,774,309
0
null
First, make sure these 2 options are activated in the developer options. - `USB debugging`- `Install via USB` For Xiaomi devices, you have only `8 seconds to confirm` the installation on your phone. after 8 seconds the installation will be denied automatically and you have to try again.
null
CC BY-SA 4.0
null
2023-01-28T19:39:22.010
2023-01-28T20:00:48.703
2023-01-28T20:00:48.703
10,728,184
10,728,184
null
75,270,764
2
null
75,268,365
0
null
You can use this formula in the adjacent cell: [](https://i.stack.imgur.com/XLJKi.png) Then you apply it across all your rows. Do not forget to copy and paste as values.
null
CC BY-SA 4.0
null
2023-01-28T20:46:11.140
2023-01-28T20:46:11.140
null
null
21,075,766
null
75,271,405
2
null
75,268,732
0
null
Generally `<span>` tags are easier to click. So within `clickAlertEl()` try: ``` BrowserFactory.getBrowser().wait(until.elementLocated(By.xpath("//span[text()='Alerts']//ancestor::li[1]"))) ``` or simply ``` BrowserFactory.getBrowser().wait(until.elementLocated(By.xpath("//span[text()='Alerts']"))) ```
null
CC BY-SA 4.0
null
2023-01-28T22:40:27.000
2023-01-28T22:40:27.000
null
null
7,429,447
null
75,271,706
2
null
75,271,675
0
null
You would need to use escape sequence in `"cookies"` See below ``` cookies = driver.executeScript("return document.querySelector('#usercentrics-root').shadowRoot.querySelector(\"cookies\")"); ```
null
CC BY-SA 4.0
null
2023-01-28T23:49:41.470
2023-01-28T23:49:41.470
null
null
4,445,920
null
75,271,845
2
null
37,040,798
0
null
As of 2023, `youtube-dl` seems to work fine, but note that sometimes the live stream separates the audio and video into distinct streams, then if you try to supply `-f <preferred stream code>` you will only get either the video or the audio. The solution then is to simply not pass any argument, just `youtube-dl https://address-to-the-stream.m3u8` and it will automatically download the best quality video stream and merge it transparently with the best audio stream via `ffmpeg` (tested on Windows 10).
null
CC BY-SA 4.0
null
2023-01-29T00:27:09.563
2023-01-29T00:27:09.563
null
null
1,121,352
null
75,271,967
2
null
75,269,874
0
null
You cannot symbolicate using any archive. You use the dSYM from the particular archive that was uploaded. Here’s the [detailed documentation](https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report) describing the desymbolication process.
null
CC BY-SA 4.0
null
2023-01-29T00:55:28.263
2023-01-29T00:55:28.263
null
null
4,944,020
null
75,272,184
2
null
75,265,468
0
null
#### Formula in Table 1 $A$2 ``` =MAP(SORT(UNIQUE(D2:D)), LAMBDA(n, IF(n<>"", {n,SUM(INDEX(FILTER(D:F,D:D=n),,3))},""))) ``` ![](https://i.stack.imgur.com/aUuSz.png)
null
CC BY-SA 4.0
null
2023-01-29T02:03:44.843
2023-01-29T02:03:44.843
null
null
11,262,439
null
75,272,426
2
null
26,303,782
0
null
I also have the same problem. Later, I found that there is a problem with the files opened to the public in my own library. If I only open the. h file to the public, it will be fine.[](https://i.stack.imgur.com/mkiDi.png)
null
CC BY-SA 4.0
null
2023-01-29T03:22:19.777
2023-01-29T03:22:19.777
null
null
15,502,765
null
75,272,456
2
null
75,266,729
0
null
Instead of using `ListView.builder`, you should use `Column`: ``` Column( children: list.map((element) => …).toList(), ), ```
null
CC BY-SA 4.0
null
2023-01-29T03:33:25.153
2023-01-29T03:33:25.153
null
null
16,124,033
null
75,272,502
2
null
75,272,470
1
null
Use [groupby.sum](https://pandas.pydata.org/docs/reference/api/pandas.core.groupby.GroupBy.sum.html) on the starting string: - If the starting string is fixed, use [.str[:n]](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.slice.html) to slice the first `n` chars``` df = pd.DataFrame({'path': ['google.com/A/123', 'google.com/A/124', 'google.com/A/125', 'google.com/B/3333', 'google.com/C/11111111', 'google.com/C/11111113'], 'A': 1, 'B': 2}) # path A B # 0 google.com/A/123 1 2 # 1 google.com/A/124 1 2 # 2 google.com/A/125 1 2 # 3 google.com/B/3333 1 2 # 4 google.com/C/11111111 1 2 # 5 google.com/C/11111113 1 2 start = df['path'].str[:12] # first 12 chars of df['path'] out = df.groupby(start).sum() # A B # path # google.com/A 3 6 # google.com/B 1 2 # google.com/C 2 4 ``` - If the starting string is dynamic, use [.str.extract()](https://pandas.pydata.org/docs/reference/api/pandas.Series.str.extract.html) to capture the desired pattern (e.g., up to the 2nd slash)``` df = pd.DataFrame({'path': ['A.com/A', 'A.com/A/B/C', 'google.com/A/123', 'google.com/A/124', 'google.com/A/125', 'google.com/B/3333', 'google.com/C/11111111', 'google.com/C/11111113'], 'A': 1, 'B': 2}) # path A B # 0 A.com/A 1 2 # 1 A.com/A/B/C 1 2 # 2 google.com/A/123 1 2 # 3 google.com/A/124 1 2 # 4 google.com/A/125 1 2 # 5 google.com/B/3333 1 2 # 6 google.com/C/11111111 1 2 # 7 google.com/C/11111113 1 2 start = df['path'].str.extract(r'^([^/]+/[^/]+)', expand=False) # up to 2nd slash of df['path'] out = df.groupby(start).sum() # A B # path # A.com/A 2 4 # google.com/A 3 6 # google.com/B 1 2 # google.com/C 2 4 ``` Breakdown of `^([^/]+/[^/]+)` regex: | regex | meaning | | ----- | ------- | | ^ | beginning of string | | ( | start capturing | | [^/]+ | non-slash characters | | / | slash character | | [^/]+ | non-slash characters | | ) | stop capturing |
null
CC BY-SA 4.0
null
2023-01-29T03:52:53.250
2023-01-29T13:59:05.513
2023-01-29T13:59:05.513
13,138,364
13,138,364
null
75,272,521
2
null
75,272,470
0
null
Group by the path whilst disregarding the final subpath and aggregate (sum) the other columns. ``` df['path'] = df["path"].apply(lambda x: "/".join(x.split("/")[:-1])) df.groupby("path").sum() ```
null
CC BY-SA 4.0
null
2023-01-29T03:59:29.607
2023-01-29T03:59:29.607
null
null
5,673,316
null
75,272,668
2
null
75,269,749
0
null
Fixed by removing "Content-type: application/json" header from my golang application server for the API route '/'
null
CC BY-SA 4.0
null
2023-01-29T04:48:27.410
2023-01-29T04:48:27.410
null
null
16,752,434
null
75,272,718
2
null
75,271,992
3
null
I can think of some ways to do this. The way is just to check against the interval `(j-0.5,j+0.5)` by replacing the test ``` if(i==nearbyint(3*amp*cos(5*freq*j*convert))+10){ cout<<"*"; } ``` with ``` void graph( double amp, double freq ){ int x=140; int y=20; double convert = 3.141592/180; for(int i=0; i<y; i++){ for(int j=0; j<x; j++){ double jx = j; double v1 = 3*amp*cos(5*freq*(jx-0.5)*convert)+10; double v2 = 3*amp*cos(5*freq*(jx+0.5)*convert)+10; if( ((i>=v1)&&(i<=v2)) || ((i<=v1)&&(i>=v2))){ cout<<"*"; } else if(i==y/2){ cout<<"-"; } else if(j==x/2){ cout<<"|"; } else{ cout<<" "; } } cout<<endl; } } ``` Godbolt Link: [https://godbolt.org/z/G47WjqafP](https://godbolt.org/z/G47WjqafP) This results in ``` Program stdout | | * * * * * * * * * * | * * * * * * * * * * * * * * * * * * * * | * * * * * * * * * * * * * * * * * * * * | * * * * * * * * * * * * * * * * * * * * | * * * * * * * * * * * * * * * * * * * * | * * * * * * * * * * * * * * * * * * * * | * * * * * * * * * * * * * * * * * * * | * * * * * * * * * * * * * * * * * * * | * * * * * * * * * ----*------*------*------*------*-------*------*------*------*------*-------*------*------*------*------*-------*------*------*------*------ * * * * * * * * * *| * * * * * * * * * * * * * * * * * * *| * * * * * * * * * * * * * * * * * * *| * * * * * * * * * * * * * * * * * * *| * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * |* * * * * * * * * * | ``` But the coolest I could find for a 10 minute Blitz code project is an approach where you can use something like the [Bresenham line algorithm](https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm). Bresenham will guarantee that the space between two adjacent point while drawing a line is maximum one pixel, which is exactly what you are asking. I could apply Bresenham straight to your algorithm but why not extend this to make it more generic? I'm already wasted so here we go... First you need to define a viewport for your graph that will map between fictitious coordinates to screen coordinates. ``` struct Extents { double x[2]; double y[2]; }; ``` Second you will need a class to hold a virtual screen with a character buffer inside and some way to clear it up. This map will contain characters that will be printed out later. ``` template< int WIDTH, int HEIGHT > struct Graph { Extents ext; char map[WIDTH][HEIGHT]; void clear() { memset( map, ' ', WIDTH*HEIGHT ); } void print() { for ( int i=0; i<HEIGHT; ++i ) { for ( int j=0; j<WIDTH; ++j ) { std::cout << map[j][HEIGHT-i-1]; } std::cout << std::endl; } } }; ``` Then you need some methods to convert from viewport to screen and vice versa ``` double from_screen_x( int j ) { return ext.x[0] + (j*(ext.x[1]-ext.x[0]))/WIDTH; } int from_viewport_x( double x ) { return (x-ext.x[0])/(ext.x[1]-ext.x[0])*WIDTH; } int from_viewport_y( double y ) { return HEIGHT*((y-ext.y[0])/(ext.y[1]-ext.y[0])); } ``` Then once we have a way to convert from `(x,y)` to `(i,j)` screen coordinates, we can easily 'plot' a single point with a given character. ``` void point( int x, int y, char ch ) { if ( (x>=0) && (x<WIDTH) ) { if ( (y>=0) && (y<HEIGHT) ) { map[x][y] = ch; } } } ``` Now the workhorse of the entire class - the Bresenham algorithm which you can find on [Wikipedia](https://en.wikipedia.org/wiki/Bresenham%27s_line_algorithm) ``` void line( int x0, int y0, int x1, int y1, char ch ) { int dx = abs(x1 - x0); int sx = x0 < x1 ? 1 : -1; int dy = - int( abs(y1 - y0) ); int sy = y0 < y1 ? 1 : -1; int error = dx + dy; while( true ) { point(x0, y0, ch); if ( (x0 == x1) && (y0 == y1) ) break; int e2 = 2 * error; if ( e2 >= dy ) { if (x0 == x1) break; error = error + dy; x0 = x0 + sx; } if (e2 <= dx) { if (y0 == y1) break; error = error + dx; y0 = y0 + sy; } } } ``` Then we need the high level functions: one to draw the axis and another to plot the chart. The axis is easy - just find the screen coordinates of the origin `(0,0)` and plot it on our 'map'. ``` void axis() { int i = from_viewport_y(0); for ( int j=0; j<WIDTH; ++j ) { point(j,i,'-'); } int j = from_viewport_x(0); for ( int i=0; i<HEIGHT; ++i ) { point(j,i,'|'); } } ``` For the chart algorithm I decided to go fancy and using a templated function that will allow us to externalize the actual computation. This algorithm will sweep the x axis in screen space, map into the viewport, compute the point in virtual coordinates and bring them back to the actual `(i,j)` screen coordinates. Once we have obtained the first point we can from the 2nd point call the line algorithm between the old and the new point and keep iterating until the end. ``` template< typename Fn > void chart( char ch, Fn&& fn ) { int lasti = 0; for ( int j=0; j<WIDTH; ++j ) { double x = from_screen_x( j ); int i = from_viewport_y( fn(x) ); if ( j>0 ) { line( j-1,lasti, j, i, ch ); } lasti = i; } } ``` Now we are left with just the business logic. Let's create a cosine functor that will give us a cosine function with a given amplitude and frequency. ``` struct CosFn { double amp; double freq; double operator()( double x ) { return amp*cos( freq*x ); } }; ``` Now we just need to put everything together and plot it all ``` int main() { Extents ext{{-1,1},{-1,1}}; Graph<120,20> g{ext}; g.clear(); g.axis(); g.chart( '.', CosFn{1,2} ); g.chart( '^', CosFn{0.75,4} ); g.chart( '*', CosFn{0.5,8} ); g.print(); } ``` This will produce: ``` Program stdout .............|............. ...... | ...... .... ^^^^^^^^^^^ .... .... ^^^^ | ^^^^ .... .... ^^^ * ^^^ .... ********* ... ^^^ ****|**** ^^^ ... ********* *** ** ... ^^ ** | ** ^^ ... ** *** * .**. ^^ ** | ** ^^ .**. * ** ... ** ^^ ** | ** ^^ ** ... ** --*----------...--------*------------^^----------*----------|----------*----------^^------------*--------...----------*- ** ... ** ^^ ** | ** ^^ ** ... * ... * ^^ * | * ^^ * ... ... ** ^^ ** | ** ^^ ** ... ... ^** ** | ** **^ ... ^ ^^^ ********** | ********** ^^^ ^^^ ^^^ | ^^^ ^^^ ^^^^ ^^^^ | ^^^^ ^^^^ ^^^^^^^^^^^ | ^^^^^^^^^^^ | | ``` Godbolt link: [https://godbolt.org/z/P3Wx1vE7s](https://godbolt.org/z/P3Wx1vE7s)
null
CC BY-SA 4.0
null
2023-01-29T05:08:56.787
2023-01-29T10:32:51.143
2023-01-29T10:32:51.143
19,642,884
19,642,884
null
75,272,988
2
null
74,811,702
0
null
``` git config --global credential.gitlab.xxx.com.provider generic ``` replace gitlab.xxx.com with your repository address --- git automatically recognizes the repository address and switches between different providers. The latest gitlab providers have abandoned HTTP, but many older versions of standalone deployments are still HTTP, so we need to specify that our repositories use generic providers. > [https://code.fitness/post/2022/01/git-detecting-host-provider.html](https://code.fitness/post/2022/01/git-detecting-host-provider.html)
null
CC BY-SA 4.0
null
2023-01-29T06:24:10.953
2023-01-29T06:24:10.953
null
null
14,124,583
null
75,273,282
2
null
30,857,680
0
null
Because it is designed for time-series data, as the error says, `resample()` works only if the index is datetime, timedelta or period. The following are a few common ways this error may show up. However, you can also use the `on=` parameter to , without having a datetime index. ``` df['Timestamp'] = pd.to_datetime(df['Timestamp'], unit='s') bars = df.resample('30min', on='Timestamp')['Price'].ohlc() volumes = df.resample('30min', on='Timestamp')['Volume'].sum() ``` [](https://i.stack.imgur.com/FmHVA.png) If you have a where one of the index is datetime, then you can use `level=` to select that level as the grouper. ``` volumes = df.resample('30min', level='Timestamp')['Volume'].sum() ``` [](https://i.stack.imgur.com/HKp43.png) You can also use `resample.agg` to pass multiple methods. ``` resampled = df.resample('30min', on='Timestamp').agg({'Price': 'ohlc', 'Volume': 'sum'}) ``` [](https://i.stack.imgur.com/fWvbG.png)
null
CC BY-SA 4.0
null
2023-01-29T07:33:53.537
2023-01-29T07:33:53.537
null
null
19,123,103
null
75,273,521
2
null
75,273,392
0
null
You can check status of job on [describe-pii-entities-detection-job](https://docs.aws.amazon.com/cli/latest/reference/comprehend/describe-pii-entities-detection-job.html) with `job-id` from start job response.
null
CC BY-SA 4.0
null
2023-01-29T08:23:53.263
2023-01-29T08:23:53.263
null
null
5,589,820
null