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,530,703 | 2 | null | 75,523,581 | 0 | null | Since another project of yours is working, could it be that you forgot to set an explicit max request size limit in this one?
It happened on some projects that the combined file size exceeded max request limit for .NET allowance.
It might require various steps as shown here:
[Try checking this](https://bartwullems.blogspot.com/2022/01/aspnet-core-configure-file-upload-size.html)
"By default, ASP.NET Core allows you to upload files up of (approximately) 28 MB in size"
In the configuration of the applications (either Startup.cs if you're on <= .NET 5 or Program.cs starting from .NET 6):
```
public void ConfigureServices(IServiceCollection services)
{
services.AddControllers();
services.Configure<FormOptions>(options =>
{
// Set the limit to 128 MB for example
options.MultipartBodyLengthLimit = 134217728;
});
}
```
But also on IIS Side (remember when you're going to deploy):
```
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<!-- Removed other configuration -->
<security>
<requestFiltering>
<!-- 128MB = 134,217,728 Bytes -->
<requestLimits maxAllowedContentLength="134217728"/>
</requestFiltering>
</security>
</system.webServer>
</configuration>
```
In the article also explains how to behave for kestrel servers.
| null | CC BY-SA 4.0 | null | 2023-02-22T09:35:09.557 | 2023-02-22T09:35:09.557 | null | null | 2,212,907 | null |
75,530,718 | 2 | null | 22,544,277 | 0 | null |
```
{
"name": "XYZ",
"description" : "XYZ",
"version": "1.0",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"permissions": [
"storage",
"tabs"
],
"action" : {
"default_popup": "popup.html"
},
"content_scripts": [
{
"matches": ["*://*/*"],
"js": ["./jquery.js", "./popup.js" ]
}
],
"icons" : {
"16": "/images/favicon-16x16.png",
"32": "/images/favicon-32x32.png",
"48": "/images/android-icon-48x48.png"
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-22T09:35:52.080 | 2023-02-22T09:35:52.080 | null | null | 3,482,040 | null |
75,530,921 | 2 | null | 65,040,874 | 0 | null | Make sure you have Postgresql installed, open a terminal and type in
`$ which psql`
It will respond something like:
`/usr/bin/psql`
Then Open Dbeaver -> open your connection -> open Databases -> right -> Select Dump database / Restore database
A windows will pop up, at the , click on
Another windows will pop up, select
In the next window, click
Navigate to the output location of postgres `/usr/bin` Then click Open
and click on something so the window fills in the fields. Click OK -> OK.
You should be good to Dump or Restore your database.
| null | CC BY-SA 4.0 | null | 2023-02-22T09:50:07.183 | 2023-02-22T09:50:07.183 | null | null | 4,477,550 | null |
75,531,032 | 2 | null | 22,154,072 | 0 | null | I use `TextView` inside of `constraintLayout` and that `constraintLayout` together `ImageView` inside of a `FrameLayout` to unify all these stuffs. Using this method you can control text position using `app:layout_constraintVertical_bias="0.9"`
[](https://i.stack.imgur.com/Ps8WI.png)
```
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/RelativeLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical">
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:weightSum="2">
<!-- without Text-->
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1">
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:scaleType="fitCenter"
android:src="@drawable/ic_gift_box_giving" />
<ImageButton
android:id="@+id/imageButton2"
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_weight="1"
android:scaleType="fitCenter"
android:src="@drawable/ic_money_bag_riyal" />
</TableRow>
<!-- with Text-->
<TableRow
android:id="@+id/tableRow3"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="1"
android:weightSum="2">
<FrameLayout
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/imageButton6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="30dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_password_lock" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal|bottom"
android:text="LOCKED!"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.9" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
<FrameLayout
android:layout_width="0dp"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:layout_margin="4dp"
android:layout_weight="1">
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/imageButton6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingHorizontal="30dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_password_lock" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.appcompat.widget.AppCompatTextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal|bottom"
android:text="LOCKED!"
android:textSize="20sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.9" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
</TableRow>
</TableLayout>
</RelativeLayout>
```
| null | CC BY-SA 4.0 | null | 2023-02-22T09:58:32.470 | 2023-02-22T09:58:32.470 | null | null | 6,576,302 | null |
75,531,217 | 2 | null | 75,507,334 | 0 | null | As per [This](https://learn.microsoft.com/en-us/sql/azure-data-studio/extensions/azure-sql-migration-extension?view=sql-server-ver16) Azure SQL migration extension migrates SQL Server databases to Azure. By using it migrating Azure SQL database is not possible. May be that's the reason for Can't see database from Azure SQL database when trying to migrate it using Azure data studio.
If you want to migrate Azure SQL database, you can use Data-tier application Wizard in Azure data studio.
Right click on server which you want to migrate from then you will get below options

Select Data-tier application Wizard
Select export the schema and data option and click on next.

Select export backup settings i.e. server, database and the location where to save the .bacpac file, click on next

Click on Export

Export bacpac will be succeeded

You can import that bacpac file where you want to Migrate the database. In this way you can migrate Azure SQL database.
| null | CC BY-SA 4.0 | null | 2023-02-22T10:15:55.090 | 2023-02-22T10:15:55.090 | null | null | 19,893,538 | null |
75,531,798 | 2 | null | 57,826,063 | 0 | null | I show it using example,
example:
will-2
freedom-8
ring-3
day-3
dream-5
let-2
every-3
able-2
one-3
together-4
First import necessary libraries,
```
from wordcloud import WordCloud
import matplotlib.pyplot as plt
```
Then create our words as a list,
```
text={'will': 2, 'freedom': 8, 'ring': 3, 'day': 3, 'dream': 5, 'let': 2, 'every': 3, 'able': 2, 'one': 3, 'together': 4}
```
Then create wordcloud object,
```
wordcloud = WordCloud(width=800, height=800, margin=0,repeat=True).generate_from_frequencies(text)
```
You must add to otherwise it is not working.
Then generate image,
```
plt.imshow(wordcloud, interpolation='bilinear')
plt.axis("off")
plt.margins(x=0, y=0)
plt.show()
```
[](https://i.stack.imgur.com/6XbU9.png)
| null | CC BY-SA 4.0 | null | 2023-02-22T11:00:52.267 | 2023-02-22T11:00:52.267 | null | null | 19,273,724 | null |
75,532,090 | 2 | null | 66,076,726 | 2 | null | You should give more information, even if you don't put code, at least what kind of components you use in your app/web.
For example, some components that cause memory crashes are usually Cached Images, Video Players, Video Streaming, poor data caching management, rendering very heavy images...
On image caching there are several well-known proposals, for example, if you are using `CachedNetworkImage`, do not forget to add `memCacheHeight` and `memCacheWidth` parameters.
You also could try to clean objects when the code detects that the state object will never build again.
Documentation : [https://api.flutter.dev/flutter/widgets/NavigatorState/dispose.html](https://api.flutter.dev/flutter/widgets/NavigatorState/dispose.html)
Exemple:
```
@override
void dispose() {
focusScopeNode.dispose();
for (final _RouteEntry entry in _history)
entry.dispose();
super.dispose();
}
```
Also, you have to review how you are using the navigator to change routes. Do you use navigator `Navigator.pushReplacementNamed()`, `Navigator.pushReplacement()`, push... ? Maybe your screens are stacking.
| null | CC BY-SA 4.0 | null | 2023-02-22T11:27:24.313 | 2023-02-22T11:27:24.313 | null | null | 865,249 | null |
75,532,500 | 2 | null | 8,522,849 | 0 | null | I found the problem was when i reloaded a github project from my menu, instead of the actual project file inside that local downloaded repo. Once I selected the .sln file it worked again!
| null | CC BY-SA 4.0 | null | 2023-02-22T12:08:10.820 | 2023-02-22T12:08:10.820 | null | null | 16,018,235 | null |
75,532,760 | 2 | null | 75,532,698 | 0 | null | You need to use the x86 edition of dotnet, its typical location is `C:\Program Files (x86)\dotnet\dotnet.exe`.
[Breaking change: x86 host path on 64-bit Windows](https://learn.microsoft.com/en-us/dotnet/core/compatibility/deployment/7.0/x86-host-path)
| null | CC BY-SA 4.0 | null | 2023-02-22T12:35:43.220 | 2023-02-22T12:35:43.220 | null | null | 6,196,568 | null |
75,532,949 | 2 | null | 62,157,904 | 0 | null | TL;DR: `AlignAfterOpenBracket: BlockIndent` (clang-format 14+) or `AlwaysAlign` on a technicality, but it doesn't always work because both rely on content length. Other newline-based approaches that exist now or in the future also work, but there are no config options for fixing the root cause. The root cause is that continuation indents are based on the immediate parent function, and not the total level of nesting.
---
Consider a modified example from clang-format's [documentation on ContinuationIndentWidth](https://clang.llvm.org/docs/ClangFormatStyleOptions.html#continuationindentwidth), with `ContinuationIndentWidth: 1` for science:
```
int ifdsfds = // VeryVeryVeryVeryVeryLongComment
longFunction( // Again a long comment
longInnerFunc( // comment
arg));
```
Adding a second argument doesn't do help much:
```
int ifdsfds = // VeryVeryVeryVeryVeryLongComment
longFunction( // Again a long comment
longInnerFunc( // comment
arg),
arg2);
```
Everything is correct so far with the options I had set. But look at what happens if the second comment disappears:
```
int ifdsfds = // VeryVeryVeryVeryVeryLongComment
longFunction(longInnerFunc( // comment
arg),
arg2);
```
Suddenly, the continuation indent is relative to its parent function rather than the root. This primarily happens when `arg2` is present, presumably because of context stuff? I'm not entirely sure, but take a look at `AlignAfterOpenBracket: BlockIndent`, which produces this (with `ContinuationIndentWidth: 4`):
```
vec.erase(
std::remove_if(
vec.begin(), vec.end(),
[](const std::string &) {
std::string x = "I'm here just to expand this block to keep it from collapsing";
return false;
}
),
vec.end()
);
```
I assume this is the case for the previous example as well; when the comment was removed and `longInnerFunction` was collapsed onto its own line, the fact the argument was secretly indented relative to the root just became painfully visible. In fact, I believe most of the indentation (at least in this case) works relative to the immediate parent, with whatever changes propagating down to further sub-nodes.
This is also why `AlignAfterOpenBracket: BlockIndent` works. Its more aggressive newline system forces the functions onto their own lines. Here's another example of code formatted with `BlockIndent`:
```
someFunction(
foooooooo(aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaa, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa),
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
);
```
Because the entire argument list is too long to fit within the `ColumnLimit`, the function is broken onto its new line. If you add a few more characters to the inner function's arguments (or to the function name), its arguments will be pushed onto a new line, and that line is indented `ContinuationIndentWidth` relative to `foooooooo`, which itself is intended `ContinuationIndentWidth` relative to `someFunction`.
In general, as long as each level of nested function calls is on its own line, the indents work as expected, because there isn't a need to add additional spaces to align with a given function call. `BlockIndent` forces newlines to keep the entire block `IndentWidth`-compliant. Mostly.
There are exceptions, such as this:
```
vec.erase(std::remove_if(vec.begin(), vec.end(), [](const std::string &) {
std::string x = "I'm here just to expand this block to keep it from collapsing";
return false;
}), );
```
where the contents of the lambda are indented relative to the parent function via the indent mechanic I've explained in this answer. There isn't enough content in this case to trigger `BlockIndent`. This can be worked around by adding `//` after either `vec.begin()` or `vec.end()` to prevent block collapse.
`AlwaysBreak` is also a solution here, but one I didn't initially consider because I'm not entirely a fan of the formatting style it introduces, especially when it's asymmetric on which bracket is placed on a new line. That's just me though.
Anyway, for the time being at best and permanently at worst, `BlockIndent` is a partial solution. `AlwaysBreak`, in spite of its name, isn't any better, because it still only breaks if the width limit is hit. Both of them are effectively workarounds, and they do work better if combined with empty comments to keep linebreaks, but they're not a true solution.
I assume there's a way to force linebreaks as well, but I've spent too much time on this already to go looking, so this is left as an exercise to the reader with an above-average interest in lots of newlines.
In either case, the config option to base continuation indent on some sanely picked root (that isn't the immediate parent for nested function calls, and it'll still have to be automatically determined by clang-format) does not currently exist, and I'm not convinced there's enough demand for one for it to be available on any finite timescale. This leaves the workaround, or just switching to another solution, and I personally opted for the latter. A couple lines of `cino` config in Vim formats the code mostly good, but it makes up for it in requiring significantly less time to configure stuff.
| null | CC BY-SA 4.0 | null | 2023-02-22T12:52:59.433 | 2023-02-22T12:52:59.433 | null | null | 13,399,610 | null |
75,533,056 | 2 | null | 63,517,294 | 0 | null | I think you need to go inside: C:\Users\Acer And Delete .
| null | CC BY-SA 4.0 | null | 2023-02-22T13:02:12.083 | 2023-02-22T13:02:12.083 | null | null | 19,493,508 | null |
75,533,646 | 2 | null | 75,529,781 | 0 | null | You can flip the y-axis with dygraphs by specifying the `valueRange` as `[max, min]` rather than the usual `[min, max]`. Here's an [example](https://dygraphs.com/tests/reverse-y-axis.html).
```
const g = new Dygraph(
el,
data,
{
legend: 'always',
axes: {
y2: {
valueRange: [14, 0], // inverted range
}
},
series: {
'red': {
axis: 'y2' // plot red series on secondary y axis
}
}
});
```
See [complete demo](https://jsbin.com/caqanowomo/edit?css,js,output).
| null | CC BY-SA 4.0 | null | 2023-02-22T13:50:00.837 | 2023-02-22T13:50:00.837 | null | null | 388,951 | null |
75,533,662 | 2 | null | 75,526,523 | 0 | null | If I just look at the code you posted, I'd suggest trying to remove the inner loop and using Numpy's automatic broadcasting to do the same. I notice that you're calculating euclidean distance in a very manual way, but that the nice [distance module from SciPy](https://docs.scipy.org/doc/scipy/reference/spatial.distance.html) doesn't seem to be supported by [autograd](https://github.com/HIPS/autograd/tree/master/autograd/scipy).
This leaves me with the following code:
```
def potential(x):
A, XI, P, Q, R0 = parameters()
n_atoms = len(A)
di = np.diag_indices(n_atoms)
x = x.reshape(n_atoms, 3)
# preprocess params to minimize work and remove need to special case "i == j"
A[di] = 0.
XI[di] = 0.
P *= -1.
Q *= -1.
R0[di]= 1.
U = 0.
for i, xi in enumerate(x):
dist = np.linalg.norm(xi - x, axis=1) / R0[i] - 1.
Ub = XI[i] * np.exp(Q[i] * dist)
Ur = A[i] * np.exp(P[i] * dist)
U += sum(Ur) - sum(Ub)
return U
```
As I was looking at your upstream code base, I saw you're calling this method from `optimize` which suggests you're loading data from files while doing numerical optimization which feels wrong.
I'd therefore suggest refactoring to remove this repeated loading of data as well as doing parameter clean up. Storing things in an object seems to make sense, and just have it expose methods for `potential` and the gradient. Leaving me:
```
from autograd import elementwise_grad as egrad
import autograd.numpy as np
class GuptaPotential:
def __init__(self):
self.A, self.XI, self.P, self.Q, self.R0 = parameters()
self.n_atoms = len(self.A)
di = np.diag_indices(self.n_atoms)
# preprocess params to minimize work and remove need to special case "i == j"
self.A[di] = 0.
self.XI[di] = 0.
self.P *= -1
self.Q *= -1
self.R0[di] = 1.
def potential(self, x):
x = x.reshape(self.n_atoms, 3)
U = 0.
for i, xi in enumerate(x):
dist = np.linalg.norm(xi - x, axis=1) / self.R0[i] - 1.
U -= sum(self.XI[i] * np.exp(self.Q[i] * dist))
U += sum(self.A[i] * np.exp(self.P[i] * dist))
return U
gradient = egrad(potential)
```
which you could use from the minimizer via:
```
gp = GuptaPotential()
sol = minimize(gp.potential, x0, method='BFGS', jac=gp.gradient, options={'gtol':1e-8, 'disp':True})
```
| null | CC BY-SA 4.0 | null | 2023-02-22T13:51:11.617 | 2023-02-22T13:51:11.617 | null | null | 1,358,308 | null |
75,533,692 | 2 | null | 53,527,964 | 0 | null | Adding this to your component style sheet
`.cdk-overlay-container { z-index: 1200 !important; }`
| null | CC BY-SA 4.0 | null | 2023-02-22T13:53:23.100 | 2023-02-22T13:53:23.100 | null | null | 21,265,974 | null |
75,533,703 | 2 | null | 75,529,685 | 1 | null | Makie calls the axis borders "spines." The appropriate Axis parameter that changes the width of the spine is called [spinewidth](https://docs.makie.org/stable/api/#Axis), and is documented in the API (but is not mentioned in the tutorial):
```
using CairoMakie
f = Figure(resolution = (200, 100))
Axis(f[1, 1])
Axis(f[1, 2], spinewidth = 4.5)
```
[](https://i.stack.imgur.com/UDu2D.png)
Unlike other spine parameters (e.g., `bottomspinecolor`, `leftspinevisible`, etc.), you cannot separately change the width of the spines on the different sides of the axis: it's all or nothing.
| null | CC BY-SA 4.0 | null | 2023-02-22T13:54:14.193 | 2023-02-22T13:54:14.193 | null | null | 5,075,720 | null |
75,533,980 | 2 | null | 75,533,610 | 1 | null | This is like the most basic pivot example there can be.
Admittedly, pivot syntax is kinda weird.
From the top of my head:
```
select id, [Text01], [Text02], [Text03]
from yourtable
pivot (max(value) for Name in ([Text01], [Text02], [Text03])) pv
```
| null | CC BY-SA 4.0 | null | 2023-02-22T14:17:17.273 | 2023-02-22T14:17:17.273 | null | null | 13,061,224 | null |
75,534,134 | 2 | null | 75,510,548 | 1 | null | I had the same issue.
I tried removing the data in the folder, and received the same error upon reinstalling.
I deleted the folder within the folder, and deleted the folder in .
This fixed the problem for me, upon reinstalling everything worked as normal.
I hope this helps.
| null | CC BY-SA 4.0 | null | 2023-02-22T14:28:26.423 | 2023-02-22T14:28:26.423 | null | null | 21,266,131 | null |
75,534,304 | 2 | null | 60,458,459 | 1 | null | I ran into this problem today, and I solved it in a different way:
1. Open your server terminal and find a directory named ".vscode-server" which should be at the path /home/<username>/.vscode-server. It is hidden on most OS's, so you may have to search for it with ls -a.
2. Remove it with rm -rf /home/<username>/.vscode-server/
3. Reconnect your server with VS Code.
| null | CC BY-SA 4.0 | null | 2023-02-22T14:42:59.507 | 2023-03-01T10:15:31.480 | 2023-03-01T10:15:31.480 | 6,951,294 | 17,578,172 | null |
75,534,705 | 2 | null | 74,267,936 | 0 | null | Had same error,
Adding the line below in package.json in the dependencies:
```
"axios": "0.27.2"
```
Worked for me
| null | CC BY-SA 4.0 | null | 2023-02-22T15:14:19.793 | 2023-02-22T15:14:19.793 | null | null | 21,241,198 | null |
75,535,227 | 2 | null | 42,803,390 | 0 | null | I found this solution, I was searching for the same CSS solution.
CodePen:
[https://codepen.io/DesignersWeb/pen/MWqyqKq](https://codepen.io/DesignersWeb/pen/MWqyqKq)
```
.blur {
top: 0px;
left: 0px;
right: 0px;
bottom: 0px;
height: 100%;
overflow: hidden;
filter: blur(13px);
position: absolute;
background-size: cover;
background: url("https://images.unsplash.com/photo-1486723312829-f32b4a25211b?dpr=2&auto=format&fit=crop&w=1500&h=1000&q=80&cs=tinysrgb&crop=&bg=") no-repeat center center fixed;
}
.content {
padding: 20px;
font-size: 18px;
position: relative;
}
```
```
<div class="">
<div class="blur"></div>
<div class="content">
<h3>What is Lorem Ipsum?</h3>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-22T15:58:55.853 | 2023-02-22T15:58:55.853 | null | null | 8,156,216 | null |
75,535,276 | 2 | null | 75,535,192 | 0 | null | Type 5 is of voice channel you should filter on that which is mention in there [documentation](https://discord.com/developers/docs/resources/channel#channels-resource)
```
let channels=client.channels.cache.filter(ch=>ch.type===2)
channels.map(ch=>console.log(ch))
```
| null | CC BY-SA 4.0 | null | 2023-02-22T16:02:48.327 | 2023-02-22T16:02:48.327 | null | null | 12,364,626 | null |
75,535,371 | 2 | null | 75,535,283 | 0 | null | I haven't used Selenium for a long time, but I recall being able to locate items via their XPath, which you can get by right clicking the element in the inspect menu and going to copy -> copy XPath. Maybe if you look at the XPaths of each price or item and spot a pattern to be able to modify the XPath to get the next item's XPath?
Sorry if this isn't helpful
| null | CC BY-SA 4.0 | null | 2023-02-22T16:11:46.900 | 2023-02-22T16:11:46.900 | null | null | 21,241,395 | null |
75,535,386 | 2 | null | 75,535,085 | 0 | null | Let's break your question into parts.
1. JavaScript/Typescript to add a new HTML element to the DOM. You can call this, passing in your new "id" and "name"
2. Assuming your JSON is hosted on the server, use fetch requests in Typescript to get the object. This might look something like:
```
const rawData: any = await fetch('http://example.com/movies.json')
.then((response) => response.json());
rawData.foreach(//inject your new HTML);
```
This code is rough, and it would be helpful to define what type your JSON is instead of `'any'`. Hope this provides a good start
| null | CC BY-SA 4.0 | null | 2023-02-22T16:12:59.533 | 2023-02-22T16:16:39.620 | 2023-02-22T16:16:39.620 | 1,762,224 | 8,663,057 | null |
75,535,575 | 2 | null | 75,535,283 | 1 | null | It's because your selector `#store` is selecting the whole `div` with the ID of `store` and when you do `entry.text` it's the giant item with all the elements that's being converted to a string.
You'll have to do something like `driver.find_elements(By.CSS_SELECTOR, "#store .grayed b")`. You can then iterate over this list and process your items.
| null | CC BY-SA 4.0 | null | 2023-02-22T16:29:13.780 | 2023-02-22T16:29:13.780 | null | null | null | null |
75,535,940 | 2 | null | 75,535,802 | 0 | null | First, in general, it is standard to cut and paste actual code, not an image. Ideally, your "error" should be reproducible by somebody who can help you by cutting/pasting your code into their IDE and running it.
That said...
You are using what I call a "rule-function combo" to make your constraints, but in the call to the function you are not providing the index I.
Try this:
```
model.limite = Constraint(model.i, rule=limite)
```
| null | CC BY-SA 4.0 | null | 2023-02-22T17:02:16.387 | 2023-02-22T17:02:16.387 | null | null | 10,789,207 | null |
75,536,088 | 2 | null | 75,367,888 | 0 | null | Instead, use:
```
x = alt.X("date:O", timeUnit="yearmonth")
```
---
[https://github.com/altair-viz/altair/issues/2876](https://github.com/altair-viz/altair/issues/2876)
| null | CC BY-SA 4.0 | null | 2023-02-22T17:16:27.070 | 2023-02-22T17:16:27.070 | null | null | 5,446,749 | null |
75,536,145 | 2 | null | 75,535,058 | 0 | null | It is this `df.drop_duplicates()` that you need to work around.
Edit: It is the python that does this duplicate drop. Your loaded table in Power BI needs an index column (add in Power Query for example), and you need to use this index column in addition to your two other columns to "force" the `df.drop_duplicates()` to return your whole table.
See this relevant question I have answered previously: [Power BI Python visual doesn't plot all available datapoints](https://stackoverflow.com/questions/74490261/power-bi-python-visual-doesnt-plot-all-available-datapoints/74490430#74490430)
| null | CC BY-SA 4.0 | null | 2023-02-22T17:22:02.537 | 2023-02-22T17:22:02.537 | null | null | 16,528,000 | null |
75,536,204 | 2 | null | 75,480,400 | 1 | null | There is a Custom Question Answering Recognizer package that you can install in your Composer bot project that gives the ability to use the Azure Custom Question Answering Cognitive service in your bot.
Package:
[https://github.com/microsoft/botframework-components/tree/main/packages/Recognizers/CustomQuestionAnswering/dotnet](https://github.com/microsoft/botframework-components/tree/main/packages/Recognizers/CustomQuestionAnswering/dotnet)
| null | CC BY-SA 4.0 | null | 2023-02-22T17:27:14.560 | 2023-02-22T17:27:14.560 | null | null | 14,311,633 | null |
75,536,242 | 2 | null | 75,535,865 | 1 | null | You can't really do this because this page is loaded dynamically with .
doesn't run .
See, when right-clicking in the page and selecting `show page source`, there is mostly just javascript.
To scrape youtube, I'd either use [Selenium](https://selenium-python.readthedocs.io/) to run a headless web-browser, or [Js2Py](https://github.com/PiotrDabkowski/Js2Py) if you need performance.
... or simply use youtube APIs : [https://developers.google.com/youtube/v3/docs](https://developers.google.com/youtube/v3/docs) ^_^'
| null | CC BY-SA 4.0 | null | 2023-02-22T17:31:57.657 | 2023-02-22T17:49:14.520 | 2023-02-22T17:49:14.520 | 3,322,400 | 3,322,400 | null |
75,536,276 | 2 | null | 40,055,893 | 1 | null | One click solution: Android Studio > Build > Clean Project.
| null | CC BY-SA 4.0 | null | 2023-02-22T17:34:37.413 | 2023-02-22T17:34:37.413 | null | null | 5,167,545 | null |
75,536,474 | 2 | null | 75,532,709 | 0 | null | The issue seems to be with the block pop-ups inside Safari by default. I think if you allow the pop-ups for Apps script in Safari that will fix the issue. You can see the steps on how to do so in the following the steps [here](https://support.apple.com/guide/safari/block-pop-ups-sfri40696/mac)
| null | CC BY-SA 4.0 | null | 2023-02-22T17:56:06.913 | 2023-02-22T17:56:06.913 | null | null | 17,390,145 | null |
75,536,547 | 2 | null | 75,535,865 | 2 | null |
Here's how to traverse the game data JSON elements.
First, narrow down to `game_data`, which is a list of JSON elements.
```
game_data = (
json.loads(main[20:-1])
['contents']
['twoColumnBrowseResultsRenderer']
['tabs'][0]
['tabRenderer']
['content']
['sectionListRenderer']
['contents'][0]
['itemSectionRenderer']
['contents'][0]
['shelfRenderer']
['content']
['gridRenderer']
['items']
)
```
Now iterate over the list. For each element, there's a section of the data packet we'll call `details`, which contains game name and views.
Then use the paths I showed in my original answer to capture name and view count for each game.
```
for game in game_data:
details = (
game
['gameCardRenderer']
['game']
['gameDetailsRenderer']
)
game_name = details['title']['simpleText']
view_ct = details['liveViewersText']['runs'][0]['text']
print(f"Game: {game_name} / Views: {view_ct}")
```
Output
```
Game: Valorant / Views: 100K
Game: Grand Theft Auto V / Views: 61K
Game: Dota 2 / Views: 57K
Game: Minecraft / Views: 50K
# ...
```
All of the data you need is stored as JSON in one of the `<script>` tags, it's just a pain to follow down the nested object to the fields you need. You can see it's all there if you just look at `soup.body`.
I had a few spare minutes just now, this should get you started - shows you how to get to the Game and Live Viewers count for the first game listed currently ('Valorant')
```
import json
# buried as JSON in a <script> inside <body>
main = soup.body.find_all('script')[13].contents[0]
```
This is how you get to game name (you can iterate instead of indexing [0] to get all the games):
```
# Game name
print('Game:', json.loads(main[20:-1])
['contents']
['twoColumnBrowseResultsRenderer']
['tabs'][0]
['tabRenderer']
['content']
['sectionListRenderer']
['contents'][0]
['itemSectionRenderer']
['contents'][0]
['shelfRenderer']
['content']
['gridRenderer']
['items'][0]
['gameCardRenderer']
['game']
['gameDetailsRenderer']
['title']
['simpleText']
)
```
Output
```
Game: Valorant
```
And this is Viewer Count:
```
print('Live Viewers:', json.loads(main[20:-1])
['contents']
['twoColumnBrowseResultsRenderer']
['tabs'][0]
['tabRenderer']
['content']
['sectionListRenderer']
['contents'][0]
['itemSectionRenderer']
['contents'][0]
['shelfRenderer']
['content']
['gridRenderer']
['items'][0]
['gameCardRenderer']
['game']
['gameDetailsRenderer']
['liveViewersText']
['runs'][0]
['text'])
```
Output
```
Live Viewers: 100K
```
| null | CC BY-SA 4.0 | null | 2023-02-22T18:04:48.047 | 2023-02-22T23:14:17.950 | 2023-02-22T23:14:17.950 | 2,799,941 | 2,799,941 | null |
75,536,685 | 2 | null | 75,504,467 | 0 | null | The frontend website is using real time traffic data in its calculations. The Bing Maps route API supports calculations with real-time or predictive traffic data (estimated traffic). The distance matrix API only supports predictive traffic data, and only if you specify a start or end date, otherwise no traffic considerations is done. So, the distance matrix API is likely to be slightly different from the frontend site since real time traffic could differ from predicted traffic conditions. The distance matrix service is a batch service, designed for analysis purposes which generally looks at averages for future predictions, and not usually used for real time data scenarios.
| null | CC BY-SA 4.0 | null | 2023-02-22T18:18:21.523 | 2023-02-22T18:18:21.523 | null | null | 1,245,450 | null |
75,536,968 | 2 | null | 75,536,719 | 2 | null | Here is one way how we could do it:
What we are doing:
thanks to @r2evans (one pivot_longer instead of calling twice, and replacing `size` in `geom_line` (deprecated in ggplot2 3.4.0) with `linewidth`:
First we bring the data in long format. The trick to get the line in correct form is to use `group = interaction(Treatment, Type)`:
```
library(tidyverse)
Temps %>%
pivot_longer(-Day, names_pattern = "(.*)_(.*)",
names_to = c("Treatment", "Type"),
values_to = "Temp(C)") %>%
na.omit() %>%
ggplot(aes(x = Day, y = `Temp(C)`, color = Treatment, linetype = Type)) +
geom_line(aes(group = interaction(Treatment, Type)), linewidth = 1.2)+
scale_color_manual(values = c("red", "blue")) +
scale_linetype_manual(values = c("solid", "dashed")) +
labs(x = "Day", y = "Temperature (°C)", color = "Climate Model", linetype = "Temperature Type") +
theme_classic()
```
[](https://i.stack.imgur.com/FMgs6.png)
| null | CC BY-SA 4.0 | null | 2023-02-22T18:48:07.703 | 2023-02-22T19:04:04.213 | 2023-02-22T19:04:04.213 | 13,321,647 | 13,321,647 | null |
75,537,036 | 2 | null | 74,741,261 | 0 | null | I was able to achieve this using the `initialGroupOrderComparator` property.
```
initialGroupOrderComparator={(parmas) => {
const { nodeA, nodeB } = parmas;
if (nodeA.group && !nodeB.group) {
return -1;
else if (!nodeA.group && nodeB.group) {
return 1;
}
return 0;
}}
```
| null | CC BY-SA 4.0 | null | 2023-02-22T18:55:03.410 | 2023-02-22T18:55:03.410 | null | null | 21,267,898 | null |
75,537,266 | 2 | null | 70,505,085 | 2 | null | If you using IRB remotely and do not have permission to update `.irbrc` file, try this:
```
Reline.autocompletion = IRB.conf[:USE_AUTOCOMPLETE] = false
```
This assignment changes the behaviour of the current session.
[source](https://github.com/ruby/ruby/blob/master/lib/irb/input-method.rb#L293).
| null | CC BY-SA 4.0 | null | 2023-02-22T19:20:19.877 | 2023-02-22T19:20:19.877 | null | null | 7,916,508 | null |
75,537,290 | 2 | null | 66,820,101 | 0 | null | Restating what the answer should be from a previous comment:
"The issue you are describing has to do with Postman. from the server in the response panel at the bottom of the screen." - Randy Casburn
| null | CC BY-SA 4.0 | null | 2023-02-22T19:22:22.983 | 2023-02-22T19:22:22.983 | null | null | 17,359,723 | null |
75,537,599 | 2 | null | 75,534,682 | 0 | null | You can add a manual scale for the `color` aesthetic as described in the [documentation](https://ggplot2.tidyverse.org/reference/scale_manual.html).
In regards to your question about adding a line, I suspect your issue is due to the fact that you are not grouping by type globally. If you set `color = type` to be a parameter for the entire `ggplot`, all `geom_*` functions will adhere to those aesthetics (as explained more in this [question](https://stackoverflow.com/questions/69817450/r-ggplot2-understanding-the-parameters-of-the-aes-function)).
This code should solve both issues:
```
myplot <- ggplot(longdata, aes(x = Month, y = temp, color = type)) +
scale_x_discrete(limits = c("January", "February", "March", "April",
"May", "June", "July", "August", "September",
"October", "November", "December")) +
scale_y_discrete(limits=c(0, 5, 10, 15, 20, 25, 30)) +
geom_jitter() +
geom_line() +
scale_color_manual(values = c(Low = "blue",
Average = "black",
High = "red"))
```
| null | CC BY-SA 4.0 | null | 2023-02-22T19:58:38.707 | 2023-02-22T19:58:38.707 | null | null | 21,227,705 | null |
75,538,094 | 2 | null | 72,597,337 | 1 | null | Using [the article mentioned in a comment](https://movingparts.io/variadic-views-in-swiftui) I built the following. It takes the set of views and places a divider between them.
This is also useful when the views are not being generated by a `ForEach`, especially when one or more of the views is removed conditionally (e.g. using an `if` statement).
```
struct Divided<Content: View>: View {
var content: Content
init(@ViewBuilder content: () -> Content) {
self.content = content()
}
var body: some View {
_VariadicView.Tree(DividedLayout()) {
content
}
}
struct DividedLayout: _VariadicView_MultiViewRoot {
@ViewBuilder
func body(children: _VariadicView.Children) -> some View {
let last = children.last?.id
ForEach(children) { child in
child
if child.id != last {
Divider()
}
}
}
}
}
struct Divided_Previews: PreviewProvider {
static var previews: some View {
VStack {
Divided {
Text("Alpha")
Text("Beta")
Text("Gamma")
}
}
.previewDisplayName("Vertical")
HStack {
Divided {
Text("Alpha")
Text("Beta")
Text("Gamma")
}
}
.previewDisplayName("Horizontal")
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-22T20:58:21.610 | 2023-02-25T13:52:30.717 | 2023-02-25T13:52:30.717 | 1,589,422 | 1,589,422 | null |
75,538,355 | 2 | null | 74,432,453 | 0 | null | I installed odoo a week ago and have faced the same problem. After checking a number of forums with a number of suggestions, installing and uninstalling Python programs, and a lot of other things, I checked the installation path. I found out that there is a "_utils.py" file, but no "utils.py", so I made a copy of the first one and named it as the second one. Voilá.
| null | CC BY-SA 4.0 | null | 2023-02-22T21:31:44.160 | 2023-02-22T21:31:44.160 | null | null | 21,268,653 | null |
75,538,395 | 2 | null | 75,537,914 | 0 | null | If you want to apply a specific style to a QWebEngineView object, one approach is to create a helper widget and add the QWebEngineView inside it. Then, you can apply the desired style to the helper widget, which will also affect the QWebEngineView inside it.
To do this, you can create a new widget, such as a QWidget or a QFrame, and set its layout to a QVBoxLayout or QHBoxLayout. Then, you can add the QWebEngineView object to the layout using the addWidget() method. Finally, you can apply the desired style to the helper widget using the setStyleSheet() method.
Here's an example that demonstrates this approach:
```
import sys
from PyQt5.QtWidgets import QWidget, QApplication, QVBoxLayout
from PyQt5.QtWebEngineWidgets import QWebEngineView
from PyQt5.QtCore import QUrl
class Example(QWidget):
def __init__(self):
super().__init__()
self.initUI()
self.setStyleSheet("border: 1px solid black;border-radius: 25px;background-color:red;")
def initUI(self):
vbox = QVBoxLayout(self)
url = QUrl.fromUserInput("https://www.google.com")
self.webEngineView = QWebEngineView()
vbox.addWidget(self.webEngineView)
self.setLayout(vbox)
self.setGeometry(300, 300, 350, 250)
self.setWindowTitle('QWebEngineView')
self.webEngineView.load(url)
self.show()
def main():
app = QApplication(sys.argv)
ex = Example()
sys.exit(app.exec_())
if __name__ == '__main__':
main()
```
[](https://i.stack.imgur.com/82eJV.png)
| null | CC BY-SA 4.0 | null | 2023-02-22T21:37:01.443 | 2023-02-22T21:43:17.847 | 2023-02-22T21:43:17.847 | 9,484,913 | 9,484,913 | null |
75,538,570 | 2 | null | 75,535,830 | 0 | null |
# Solution
I am going to write this as an answer, so I can mark this question as answered (in a couple of days)!
The `np.delete` function did not have anything wrong going on. I made a mistake, where for each iteration it was deleting the i-th column/row from the end of the list, thus, causing the inconsistencies.
The working code is:
```
def shift(image : np.ndarray, x : int = 0, y : int = 0, output_shape : tuple = (28, 28), fill_value : float = 255.0, dtype : str = "float32"):
image_shape = image.shape[:2]
res = image
col = np.array([[fill_value]]*image_shape[0])
row = np.array([fill_value]*image_shape[1])
if x > 0:
for _ in range(x):
res = np.hstack((col, res))
res = np.delete(res, len(res[0]) - 1, 1)
elif x < 0:
for _ in range(np.abs(x)):
res = np.hstack((res, col))
res = np.delete(res, 0, 1)
if y > 0:
for _ in range(y):
res = np.vstack((row, res))
res = np.delete(res, len(res) - 1, 0)
elif y < 0:
for _ in range(np.abs(y)):
res = np.vstack((res, row))
res = np.delete(res, 0, 0)
return res.reshape(output_shape).astype(dtype)
```
: If you want to use this, you might want to swap how the `x` affects the shifting. In my case, I made it so that if `x > 0`, it goes to the right, and viceversa. Some people might find it more intuitive to emulate the four quadrants of the Cartesian plane. So `x < 0, y < 0` means 3rd quadrant, etc.
## Alternative Solution
You can avoid using `np.delete` completely:
```
def shift(image : np.ndarray, x : int = 0, y : int = 0, output_shape : tuple = (28, 28), fill_value : float = 255.0, dtype : str = "float32"):
image_shape = image.shape[:2]
res = image
col = np.array([[fill_value]]*image_shape[0])
row = np.array([fill_value]*image_shape[1])
if x > 0:
for _ in range(x):
res = np.hstack((col, res))
res = res[:, :-1]
elif x < 0:
for _ in range(np.abs(x)):
res = np.hstack((res, col))
res = res[:, 1:]
if y > 0:
for _ in range(y):
res = np.vstack((row, res))
res = res[:-1, :]
elif y < 0:
for _ in range(np.abs(y)):
res = np.vstack((res, row))
res = res[1:, :]
return res.reshape(output_shape).astype(dtype)
```
| null | CC BY-SA 4.0 | null | 2023-02-22T22:00:19.623 | 2023-02-22T22:00:19.623 | null | null | 18,637,675 | null |
75,538,768 | 2 | null | 75,531,191 | 0 | null |
1. edit the iRow = [Counta(Database!A:A] to: iRow = Counta(Database!A:A)
2. Maybe at begining the A:A is empty and iRow takes a value of 0. To avoid an error use .offset(row, col) where the zero is valid for the row and col. Sub submit() Dim iRow ... iRow = Counta(Database!A:A)
With sh.cells(1,1)
.offset(iRow, 0) = iRow+1
.offset(iRow, 1) = UserForm.txtRol.Value
....
end with
End sub
| null | CC BY-SA 4.0 | null | 2023-02-22T22:27:38.713 | 2023-02-22T22:33:47.433 | 2023-02-22T22:33:47.433 | 15,794,828 | 15,794,828 | null |
75,538,998 | 2 | null | 75,391,480 | 0 | null | I have managed to resolve the issue. The provisioning file was in correctly named.
| null | CC BY-SA 4.0 | null | 2023-02-22T22:59:26.613 | 2023-02-22T22:59:26.613 | null | null | 17,725,351 | null |
75,539,088 | 2 | null | 15,121,989 | 0 | null | Here in 2023 and this still is an issue. The accepted answer's link is broken now. Below is how you get this to work.
1. Click on the small down arrow to the right of the Column Groups and check Advanced Mode
2. Click on the (Static) row under the Row Group
3. On the properties area to the far right, Set the following:
4. FixedData = True, KeepWithGroup = After, RepeatOnNewPage = True
5. On the tablix header go into the properties and make sure the Keep header visible while scrolling is UNCHECKED for both the row header and column header sections.
6. Finally set the tablix header row BackgroudColor to white or something else, it is transparent by default. Without the background change the header text will float on of the data.
[](https://i.stack.imgur.com/9eLX8.jpg)
| null | CC BY-SA 4.0 | null | 2023-02-22T23:12:45.400 | 2023-02-22T23:12:45.400 | null | null | 483,290 | null |
75,539,177 | 2 | null | 75,538,626 | 1 | null | `AWSServiceRoleForAmazonEMRServerless` is a created by AWS.
You can delete it, but your error message indicates that something is using the role, so it cannot be deleted. It is used by Amazon EMR, so you should check if your account is running any Amazon EMR Serverless services.
Frankly, there is no harm in leaving it there.
See: [Using service-linked roles - AWS Identity and Access Management](https://docs.aws.amazon.com/IAM/latest/UserGuide/using-service-linked-roles.html)
| null | CC BY-SA 4.0 | null | 2023-02-22T23:29:23.160 | 2023-02-22T23:29:23.160 | null | null | 174,777 | null |
75,539,305 | 2 | null | 75,538,401 | 0 | null | A working solution using [Riverpod](https://riverpod.dev/) would be as follows. It is generally good practice to decouple data sourcing from the UI widgets. For example you can move from Firestore to another data source without changing the UI widgets.
Also using Freezed package will simplify reading/writing json as your data fields increase. The Freezed model classes are generated with:
```
flutter pub run build_runner build --delete-conflicting-outputs
```
main.dart
```
// Flutter imports:
import 'package:flutter/material.dart';
// Package imports:
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:yourapp/screen/news_text_screen.dart';
// Project imports:
import 'firebase_options.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: DefaultFirebaseOptions.currentPlatform,
);
runApp(
const ProviderScope(
child: MyApp(),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
debugShowCheckedModeBanner: false,
title: "News Text",
home: Scaffold(
body: NewsTextScreen(),
),
);
}
}
```
services/news_text_service.dart
```
// Package imports:
import 'package:cloud_firestore/cloud_firestore.dart';
// Project imports:
import 'package:yourapp/models/news_text.dart';
class NewsTextService {
final FirebaseFirestore _firebaseFirestore;
final String newsTextCollection = 'news-text';
NewsTextService(
this._firebaseFirestore,
);
List<NewsText> _newsTextFromFirebase(QuerySnapshot? snapshot) =>
snapshot == null
? []
: snapshot.docs.map(
(DocumentSnapshot document) {
Map<String, dynamic> data =
document.data()! as Map<String, dynamic>;
return NewsText.fromJson(data);
},
).toList();
Stream<List<NewsText>> newsTexts() => _firebaseFirestore
.collection(newsTextCollection)
.snapshots()
.map(_newsTextFromFirebase);
}
```
providers/news_text_provider.dart
```
// Package imports:
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:yourapp/models/news_text.dart';
// Project imports:
import 'package:yourapp/services/news_text_service.dart';
final firestoreProvider =
Provider<FirebaseFirestore>((ref) => FirebaseFirestore.instance);
final newsTextServiceProvider =
Provider<NewsTextService>((ref) => NewsTextService(
ref.watch(firestoreProvider),
));
final newsTextsProvider = StreamProvider.autoDispose<List<NewsText>>(
(ref) => ref.watch(newsTextServiceProvider).newsTexts());
```
models/news_text.dart
```
// Package imports:
import 'package:freezed_annotation/freezed_annotation.dart';
part 'news_text.freezed.dart';
part 'news_text.g.dart';
@Freezed()
class NewsText with _$NewsText {
factory NewsText({
required final String paragraph,
}) = _NewsText;
factory NewsText.fromJson(Map<String, Object?> json) =>
_$NewsTextFromJson(json);
}
```
screens/news_text_screen.dart
```
// Flutter imports:
import 'package:flutter/material.dart';
import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:yourapp/providers/news_text_provider.dart';
class NewsTextScreen extends ConsumerWidget {
const NewsTextScreen({super.key});
@override
Widget build(BuildContext context, WidgetRef ref) {
final newsTexts = ref.watch(newsTextsProvider);
return newsTexts.when(
data: (newsTextsList) => ListView.builder(
itemCount: newsTextsList.length,
itemBuilder: (context, index) {
return Text(newsTextsList[index].paragraph);
},
),
error: (error, stacktrace) {
return Text(
error.toString(),
);
},
loading: () => const CircularProgressIndicator(),
);
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-22T23:52:15.273 | 2023-02-22T23:52:15.273 | null | null | 20,883,304 | null |
75,539,358 | 2 | null | 75,538,558 | 1 | null | You didn’t attach an image, but I think I know what you want to do. The way I would tackle this would be to style the headings as `flex`, then insert an empty pseudo-element which is styled to grow and has a repeating background image containing dots or whatever effect you want.
```
h1 {
display: flex;
gap: 0.5em;
}
h1::after {
content: '';
flex-grow: 1;
background-image: url(https://donald.net.au/bugs/dotted-wave-2.svg);
background-repeat: repeat-x;
background-size: auto 20px;
background-position: left center;
}
```
```
<h1>One</h1>
<h1>Two is longer</h1>
<h1>Three is very long indeed</h1>
```
| null | CC BY-SA 4.0 | null | 2023-02-23T00:01:36.190 | 2023-02-23T00:19:30.520 | 2023-02-23T00:19:30.520 | 2,518,285 | 2,518,285 | null |
75,539,811 | 2 | null | 75,538,872 | 1 | null | be careful don't do any resizing in this function
```
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath)
```
all resizing should be in here
```
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath)
```
Collection view does not know how to draw cells inside of it so it needs a layout so apple provide us with a default layout called [UICollectionViewFlowLayout](https://developer.apple.com/documentation/uikit/uicollectionviewflowlayout). which you implement sizeForItemAt function to tell the layout the size you want for each cell but it's limited so when you want to do something like your example you need to ignore the default layout and create your own custom layout here is the final code
```
import UIKit
class ViewController: UIViewController, UICollectionViewDataSource, UICollectionViewDelegate, UICollectionViewDelegateFlowLayout {
var spiralNumber = 0
var collectionView: UICollectionView!
let colors = [UIColor.yellow, UIColor.red, UIColor.blue, UIColor.green, UIColor.purple, UIColor.systemRed, UIColor.systemMint, UIColor.systemBlue, UIColor.cyan, UIColor.gray, UIColor.systemTeal, UIColor.systemYellow]///testing purposes
func generateRandomNumber(min: Int, max: Int) -> Int {
return Int.random(in: min...max)
}//testing purposes
func subtractionFive(number: Int) -> Int {
let largestMultipleOfFive = (number / 5) * 5
return number - largestMultipleOfFive
}
override func viewDidLoad() {
super.viewDidLoad()
let layout = CustomCollectionViewLayout()
collectionView = UICollectionView(frame: view.frame, collectionViewLayout: layout)
collectionView.dataSource = self
collectionView.delegate = self
collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "cell")
collectionView.backgroundColor = .white
view.addSubview(collectionView)
}
func numberOfSections(in collectionView: UICollectionView) -> Int {
return 1
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return 300
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: "cell", for: indexPath)
let randomNumber = generateRandomNumber(min: 0, max: colors.count-1)
let randomColor = colors[randomNumber]
cell.backgroundColor = randomColor
return cell
}
func collectionView(_ collectionView: UICollectionView, willDisplay cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
// print("test->", indexPath.row/5)
}
}
class CustomCollectionViewLayout: UICollectionViewLayout {
private var cachedAttributes: [UICollectionViewLayoutAttributes] = []
private var contentHeight:CGFloat = 0
var spiralNumber = 0
private var contentWidth: CGFloat {
guard let collectionView = collectionView else {
return 0
}
let insets = collectionView.contentInset
return collectionView.bounds.width - (insets.left + insets.right)
}
override var collectionViewContentSize: CGSize {
return CGSize(width: contentWidth, height: contentHeight)
}
func subtractionFive(number: Int) -> Int {
let largestMultipleOfFive = (number / 5) * 5
return number - largestMultipleOfFive
}
override func prepare() {
guard cachedAttributes.isEmpty, let collectionView else {return}
for index in 0..<collectionView.numberOfItems(inSection: 0) {
let indexPath = IndexPath(item: index, section: 0)
let spiralIndex = subtractionFive(number: indexPath.row)
spiralNumber = spiralIndex
let rowHeight = contentWidth
let rowNumber = CGFloat((indexPath.row/5))
let rowOffset = rowNumber*rowHeight
let width = contentWidth
spiralNumber = spiralIndex
var size: CGSize = .zero
if spiralNumber == 0 || spiralNumber == 4{
size = CGSize(width: width * 2/3, height: width * 1/3)
}else if spiralNumber == 1 || spiralNumber == 2{
size = CGSize(width: width * 1/3, height: width * 2/3)
}else if spiralNumber == 3{
size = CGSize(width: width * 1/3, height: width * 1/3)
}else{
size = CGSize(width: width * 2/3, height: width * 1/3)
}
var frame:CGRect = .zero
if spiralNumber == 0 {
frame = CGRect(x: 0, y: 0+rowOffset, width: size.width, height: size.height)
}else if spiralNumber == 1{
frame = CGRect(x: size.width*2, y: 0+rowOffset, width: size.width, height: size.height)
}else if spiralNumber == 2{
frame = CGRect(x: 0, y: (size.height/2)+rowOffset, width: size.width, height: size.height)
} else if spiralNumber == 3 {
frame = CGRect(x: size.width, y: size.height+rowOffset, width: size.width, height: size.height)
} else if spiralNumber == 4{
frame = CGRect(x: size.width/2, y: (size.height*2)+rowOffset, width: size.width, height: size.height)
}else{
frame = CGRect(x: size.width, y: (size.height*2)+rowOffset, width: size.width, height: size.height)
}
let attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath)
attributes.frame = frame
cachedAttributes.append(attributes)
contentHeight = max(contentHeight, frame.maxY)
}
}
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
var visibleLayoutAttributes: [UICollectionViewLayoutAttributes] = []
for attributes in cachedAttributes {
if attributes.frame.intersects(rect) {
visibleLayoutAttributes.append(attributes)
}
}
return visibleLayoutAttributes
}
}
```
if you want to learn more about collection view custom layout check this helpful blog
[https://www.kodeco.com/4829472-uicollectionview-custom-layout-tutorial-pinterest](https://www.kodeco.com/4829472-uicollectionview-custom-layout-tutorial-pinterest)
| null | CC BY-SA 4.0 | null | 2023-02-23T01:39:13.287 | 2023-02-23T17:18:42.527 | 2023-02-23T17:18:42.527 | 5,575,955 | 10,701,774 | null |
75,539,852 | 2 | null | 4,496,330 | 0 | null | ```
<table width="100%">
<tr>
<td width="200px">
<!-- area1 -->
</td
<td>
<!-- area2 -->
</td>
</tr>
<table>
```
| null | CC BY-SA 4.0 | null | 2023-02-23T01:46:17.273 | 2023-02-23T01:46:17.273 | null | null | 4,630,747 | null |
75,540,463 | 2 | null | 75,540,320 | 0 | null | Is this along the lines of what you're attempting to do?
```
import pandas as pd
import numpy as np
#generating some data
dates = pd.date_range(start = "2015", end = "2016", freq = "7D")
precip = np.random.rand(len(dates))
df = pd.DataFrame({"dates":dates, "precipitation":precip})
df["month"] = df["dates"].dt.month
df.groupby(by = "month", as_index = True).agg({"precipitation":sum}).plot(kind = "bar")
```
| null | CC BY-SA 4.0 | null | 2023-02-23T04:04:57.467 | 2023-02-23T04:04:57.467 | null | null | 18,937,753 | null |
75,540,649 | 2 | null | 75,196,124 | 0 | null | If you use `Theme.AppCompat.Light` it will make everything white.
Here is a way to do it on a newer device where you didn't add support libraries and also want to make it stay dark theme:
```
<resources>
<style name="ThemeActivity" parent="android:Theme.DeviceDefault">
<item name="android:windowSwipeToDismiss">false</item>
</style>
</resources>
```
```
<activity
android:name=".ui.MyActivity"
android:exported="true"
android:theme="@style/ThemeActivity">
</activity>
```
Disables swipe to close activity on a single activity.
| null | CC BY-SA 4.0 | null | 2023-02-23T04:45:01.807 | 2023-02-23T04:45:01.807 | null | null | 11,110,509 | null |
75,540,673 | 2 | null | 55,801,008 | 0 | null | In Visual Studio 2022 ,
I had to navigate to ,
Project Properties-> Debug Tab -> Open Debug launch profile UI
[](https://i.stack.imgur.com/GPYRU.png)
IIS Express-> Use SSL
[](https://i.stack.imgur.com/zQHmL.png)
| null | CC BY-SA 4.0 | null | 2023-02-23T04:50:29.760 | 2023-02-23T04:50:29.760 | null | null | 3,600,790 | null |
75,540,668 | 2 | null | 15,523,667 | 0 | null | I wrote a small jQuery plugin which modifies a specified `<textarea>` element when invoked, adding a grayed out selection when the element is unfocused.
```
// jQuery plugin to make textarea selection visible when unfocused.
// Achieved by adding an underlay with same content with <mark> around
// selected text. (Scroll in textarea not supported, resize is.)
$.fn.selectionShadow = function () {
const $input = this
const prop = n => parseInt($input.css(n))
const $wrap = $input.wrap('<div>').parent() // wrapper
.css({
...Object.fromEntries(
'display width height font background resize margin overflowWrap'
.split(' ').map(x => [x, $input.css(x)])),
position: 'relative',
overflow: 'hidden',
border: 0,
padding: ['top', 'right', 'bottom', 'left'].map(
x => prop(`padding-${x}`) + prop(`border-${x}-width`) + 'px'
).join(' '),
})
const $shadow = $('<span>').prependTo($wrap) // shadow-selection
.css({ color: 'transparent' })
$input // input element
.on('focusin', () => $shadow.hide()) // hide shadow if focused
.on('focusout', () => $shadow.show())
.on('select', evt => { // if selection change
const i = evt.target // update shadow
const [x, s, a] = [i.value ?? '', i.selectionStart, i.selectionEnd]
$shadow.html(x.slice(0, s) + '<mark class=selectionShadow>' +
x.slice(s, a) + '</mark>' + x.slice(a))
})
.css({
boxSizing: 'border-box',
position: 'absolute', top: 0, left: 0, bottom: 0, right: 0,
overflow: 'hidden',
display: 'block',
background: 'transparent',
resize: 'none',
margin: 0,
})
$('head').append(
`<style>mark.selectionShadow { background: #0003; color: transparent }`)
}
```
Invoke the plugin by with `$('textarea').selectionShadow()`.
The above works by adding an 'underlay' to the textarea, and making sure that the underlay have the exact same padding, font style, and word wrapping rules, so that the text of the textarea and the underlay will precisely overlap. Whenever selection in updated the underlay is also updated, and the current selection is marked with `<mark>`, which is styled with a gray background (text color is set to `transparent` in the underlay, so as not to interfere with the antialias edges of the text).
I wrote the above for a web page of mine, but YMMV. Use freely!
| null | CC BY-SA 4.0 | null | 2023-02-23T04:49:03.780 | 2023-02-23T04:49:03.780 | null | null | 351,162 | null |
75,540,822 | 2 | null | 72,727,812 | 0 | null | Solution for Hyper Terminal Error
If hyper doesn't open after changing the Preferences, just follow these steps:
open explorer and go to C://user/YOUR USERNAME/AppData/Roaming/hyper
and open the ".hyper.js" File with a Text-Editor.
(in case you don't see the AppData Folder, change the View -> Folder Options -> View -> scroll down and search for "show hidden files, folders etc" and check this radio button.)
in ".hyper.js" file, look (below the colour section) for the line
"shell: 'C:\Program files\Git\git-cmd.exe'"
IF YOU CHANGED THE DIRECTORY THROUGH THE GIT INSTALL PROCESS:
enter your Path to this line. example: D:\Anywhere\else\Git\git-cmd.exe
Now hit save and try to start hyper again. It should be working now!
| null | CC BY-SA 4.0 | null | 2023-02-23T05:17:48.203 | 2023-02-23T05:17:48.203 | null | null | 21,137,738 | null |
75,540,858 | 2 | null | 75,540,320 | 3 | null | You can create monthly summary stats with resample:
```
monthly_total = da.resample(time="MS").sum()
```
You can then plot a histogram:
```
monthly_total.plot.hist()
```
Or alternatively a time series bar chart:
```
monthly_total.plot.bar()
```
See the xarray docs on [resampling](https://docs.xarray.dev/en/stable/user-guide/time-series.html#resampling-and-grouped-operations) and [plotting](https://docs.xarray.dev/en/stable/user-guide/plotting.html) for more info.
| null | CC BY-SA 4.0 | null | 2023-02-23T05:23:51.543 | 2023-02-23T05:23:51.543 | null | null | 3,888,719 | null |
75,540,932 | 2 | null | 74,655,190 | 0 | null | I had the same issue. `eslint_d` is installed using `Mason` and `eslint:8.34.0`. I tried delete `~/.eslint_d` file and restart `eslint_d` using `eslint_d restart`. `eslint_d` located in `~/.local/share/nvim/mason/bin/eslint_d`. So I dont understand what help me
Also there is a github issue: [https://github.com/mantoni/eslint_d.js/issues/235](https://github.com/mantoni/eslint_d.js/issues/235)
| null | CC BY-SA 4.0 | null | 2023-02-23T05:34:29.507 | 2023-02-23T05:34:29.507 | null | null | 9,019,175 | null |
75,541,049 | 2 | null | 75,521,971 | 1 | null | Strapi can't find your Postgres database. You can configure database access through configuration file or by using environment variables.
See [documentation](https://docs.strapi.io/dev-docs/configurations/database) for details.
| null | CC BY-SA 4.0 | null | 2023-02-23T05:53:56.200 | 2023-02-23T05:53:56.200 | null | null | 8,014,000 | null |
75,541,195 | 2 | null | 74,344,645 | 0 | null | Try the following to convert the binary data to base64 data.
```
res.end(res.data.toString('base64'));
```
| null | CC BY-SA 4.0 | null | 2023-02-23T06:15:17.083 | 2023-02-23T06:15:17.083 | null | null | 20,878,091 | null |
75,541,260 | 2 | null | 75,541,072 | 1 | null | ```
val (value, onValueChange) = remember { mutableStateOf("") }
TextField(
value = value,
onValueChange = onValueChange,
textStyle = TextStyle(fontSize = 17.sp),
leadingIcon = { Icon(Icons.Filled.Search, null, tint = Color.Gray) },
modifier = Modifier
.padding(10.dp)
.background(Color(0xFFE7F1F1), RoundedCornerShape(16.dp)),
placeholder = { Text(text = "Bun") },
trailingIcon = {
Icon(
Icons.Filled.Search,
null,
tint = Color.Gray,
modifier = Modifier.clickable { /*Click Action*/ })
},
colors = TextFieldDefaults.textFieldColors(
focusedIndicatorColor = Color.Transparent,
unfocusedIndicatorColor = Color.Transparent,
backgroundColor = Color.Transparent,
cursorColor = Color.DarkGray
)
)
```
| null | CC BY-SA 4.0 | null | 2023-02-23T06:23:54.373 | 2023-02-23T06:23:54.373 | null | null | 19,493,508 | null |
75,541,282 | 2 | null | 75,541,072 | 1 | null | The TextField composable has several properties which you can use (so there is no need to create a custom layout like you did):
- - -
An example would look like this:
```
Row {
TextField(
value = text,
onValueChange = { },
leadingIcon = Icon(
painter = painterResource(id = R.drawable.elogo),
contentDescription = "Leading",
modifier = Modifier
.size(size = 46.dp)
),
trailingIcon = Icon(
painter = painterResource(id = R.drawable.vector),
contentDescription = "Trailing",
modifier = Modifier
.width(width = 19.dp)
.height(height = 19.dp)
.alpha(0.5f)),
shape = RoundedCornerShape(8.dp)
)
}
```
You can read more in the [documentation](https://developer.android.com/jetpack/compose/text#enter-modify-text).
| null | CC BY-SA 4.0 | null | 2023-02-23T06:27:28.707 | 2023-02-23T06:27:28.707 | null | null | 10,632,369 | null |
75,541,733 | 2 | null | 75,541,679 | 0 | null | Try doing `input('body', 'some text')` after you do the `click()`, it can be the next step.
If that doesn't work - please provide a link to a live example, and we will have to figure out if something needs to be improved.
| null | CC BY-SA 4.0 | null | 2023-02-23T07:27:34.020 | 2023-02-23T07:27:34.020 | null | null | 143,475 | null |
75,541,752 | 2 | null | 75,540,260 | 2 | null | The [sequence diagram syntax has this feature](https://plantuml.com/sequence-diagram#d511f8439ecde366) with vertical bars:
```
@startuml
Alice -> Bob: message 1
Bob --> Alice: ok
|||
Alice -> Bob: message 2
Bob --> Alice: ok
||45||
Alice -> Bob: message 3
Bob --> Alice: ok
@enduml
```
[](https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuU9opCbCJbNGjLDmoa-oKiXDBIvEJ4zLCEG2SXLqWS9WUIk5_6okcfeQ7AgDiAesCSMfmHYB1Yw7rBmKa9C0)
Another way is to add the `\n` before the message, e.g.,
```
@startuml
Alice --> Bob: whazzup?
Bob --> Alice: \n\n\n\n\n\nyo
@enduml
```
[](https://www.plantuml.com/plantuml/uml/SoWkIImgAStDuNBCoKnELT3LjLDmoa-oKYZFIAogAYsmvmBomA9WUIk5c3m4hCpdSaZDIm7g1W00)
| null | CC BY-SA 4.0 | null | 2023-02-23T07:29:19.540 | 2023-02-23T16:24:33.880 | 2023-02-23T16:24:33.880 | 1,168,342 | 1,168,342 | null |
75,542,018 | 2 | null | 75,541,072 | 2 | null | You can do like this , first create custom search view
```
@Composable
fun CustomSearchView(
search: String,
modifier: Modifier = Modifier,
onValueChange: (String) -> Unit
) {
Box(
modifier = modifier
.padding(20.dp)
.clip(CircleShape)
.background(Color(0XFF101921))
) {
TextField(value = search,
onValueChange = onValueChange,
colors = TextFieldDefaults.textFieldColors(
backgroundColor = Color(0XFF101921),
placeholderColor = Color(0XFF888D91),
leadingIconColor = Color(0XFF888D91),
trailingIconColor = Color(0XFF888D91),
textColor = Color.White,
focusedIndicatorColor = Color.Transparent, cursorColor = Color(0XFF070E14)
),
leadingIcon = { Icon(imageVector = Icons.Default.Search, contentDescription = "") },
trailingIcon = { Icon(imageVector = Icons.Default.Search, contentDescription = "") },
placeholder = { Text(text = "Search") }
)
}
}
```
Now use where ever you want like this ...
```
@Composable
fun Demo() {
var search by remember { mutableStateOf("") }
Box(
modifier = Modifier
.fillMaxSize()
.background(Color(0XFF070E14))
) {
CustomSearchView(search = search, onValueChange = {
search = it
})
}
}
```
[](https://i.stack.imgur.com/gLdwW.png)
| null | CC BY-SA 4.0 | null | 2023-02-23T08:01:10.650 | 2023-02-24T04:40:36.307 | 2023-02-24T04:40:36.307 | 9,741,578 | 9,741,578 | null |
75,542,032 | 2 | null | 75,525,212 | 0 | null | The Cloud Spanner Hibernate dialect in [this repository only supports Hibernate 5.4](https://github.com/GoogleCloudPlatform/google-cloud-spanner-hibernate#google-cloud-spanner-dialect-for-hibernate-orm).
Hibernate 6.x comes with the Spanner dialect built-in: [https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java](https://github.com/hibernate/hibernate-orm/blob/main/hibernate-core/src/main/java/org/hibernate/dialect/SpannerDialect.java)
So the following should work:
1. Remove the dependency on google-cloud-spanner-hibernate-dialect from your project.
2. Update your dependencies to add Hibernate 6.x. This comes with the SpannerDialect built-in.
3. Make sure that you also have a dependency declaration for google-cloud-spanner-jdbc.
4. Update your configuration so it uses org.hibernate.dialect.SpannerDialect. This is the fully qualified class name of the built-in Spanner dialect in Hibernate 6.x.
| null | CC BY-SA 4.0 | null | 2023-02-23T08:02:38.147 | 2023-02-23T08:02:38.147 | null | null | 7,617,957 | null |
75,542,047 | 2 | null | 75,540,507 | 1 | null | The line: `g = driver.find_element(By.NAME, "g")[0]` is problematic. From my browser's DevTools, I can see that there are no elements with a name of "g". What you probably meant was to do `g = driver.find_element(By.CLASS_NAME, "g")`. You can then proceed to extract out the link as follows: `g.find_element(By.TAG_NAME, "a")`.
| null | CC BY-SA 4.0 | null | 2023-02-23T08:04:00.250 | 2023-02-23T08:04:00.250 | null | null | null | null |
75,542,207 | 2 | null | 75,540,507 | 1 | null | To identify the `<g>` element you can use either of the following [locator strategies](https://stackoverflow.com/questions/48369043/official-locator-strategies-for-the-webdriver):
- Using :```
element = driver.find_element(By.CSS_SELECTOR, "svg g")
```
- Using :```
element = driver.find_element(By.XPATH, "//*[name()='svg']//*[name()='g']")
```
---
## References
You can find a couple of relevant detailed discussions in:
- [Reading title tag in svg?](https://stackoverflow.com/a/63544849/7429447)- [Creating XPATH for svg tag](https://stackoverflow.com/a/49024531/7429447)
| null | CC BY-SA 4.0 | null | 2023-02-23T08:23:13.333 | 2023-02-23T08:23:13.333 | null | null | 7,429,447 | null |
75,542,262 | 2 | null | 75,541,718 | 1 | null | You can still debug the code with these two problems, You can consider them as warnings and ignore them.
You need to install libc6 sources to solve these issues.
So if you are using Debian/Ubuntu:
try:
`$ sudo apt-get source libc6`
and this solves your issue.
| null | CC BY-SA 4.0 | null | 2023-02-23T08:29:54.227 | 2023-02-23T08:29:54.227 | null | null | 19,111,495 | null |
75,542,301 | 2 | null | 65,589,265 | 0 | null | ```
npm add -D sass
```
Then you can use in your `.vue` file. `<style lang="scss"></style>`
You can find it in vite official website.[Vite scss](https://cn.vitejs.dev/guide/features.html#css)
| null | CC BY-SA 4.0 | null | 2023-02-23T08:34:17.413 | 2023-02-23T08:34:17.413 | null | null | 11,077,231 | null |
75,542,721 | 2 | null | 72,006,995 | 0 | null | Most probably this line got copy pasted some how in your code
```
knitr::opts_chunk$set(echo = TRUE)
knitr::opts_chunk$set(warning = FALSE)
knitr::opts_chunk$set(message = FALSE)
```
Delete the duplicate and you are good to go.
| null | CC BY-SA 4.0 | null | 2023-02-23T09:15:07.697 | 2023-02-23T09:15:07.697 | null | null | 15,406,651 | null |
75,542,936 | 2 | null | 75,542,011 | 0 | null | For your case, you can do this but you need the `:has()` pseudo class and there's a gotcha.
We can use :has() to select the parent so in this case we're looking at the #menu div and testing the first input box. Because the first input box is actually the 2nd child of the #menu div (the first child is the div with id of MenuFocus) we have to use nth-child(2) to select the first input box. We can't combine the nth-child selector with other rules to 'filter' unwanted items (see [this](https://stackoverflow.com/q/5545649/12571484) answer on stackoverflow for details),
If this is checked then we can then select the first image using the descendant combinator.
Note that :has() isn't currently supported across all browsers. You can check this on [caniuse.com](https://caniuse.com/?search=%3Ahas)
A good primer on :has() can be found [css-tricks](https://css-tricks.com/the-css-has-selector/) and here's a good [video](https://youtu.be/OGJvhpoE8b4) by Kevin Powell on this.
`nth-of-type` will also work and it makes things a bit more logical. Code added below
P.S. it's much easier for other contributors if you post the actual code rather than a screen shot. It helps you get your answers faster and avoids your question getting closed.
```
#menu:has(input[type="checkbox"]:nth-child(2):checked) #MenuDisplayFocus img:first-child {
outline: 2px solid red;
}
```
```
<div id='menu'>
<div id='MenuInfo'>
<div id='MenuDisplayFocus'>
<img src='https://placekitten.com/200/200'>
<img src='https://placekitten.com/g/200/200'>
</div>
<input type='checkbox' id='SoccerFields' checked='checked'>
<div id='SoccerfieldsDescription' class='Description'>XXX</div>
<input type='checkbox' id='Employees'>
<div id='EmployeesDescription' class='Description'>YYY</div>
</div>
</div>
```
Nth-of-type example
```
#menu:has(input[type="checkbox"]:first-of-type:checked) #MenuDisplayFocus img:first-child {
outline: 2px solid red;
}
#menu:has(input[type="checkbox"]:nth-of-type(2):checked) #MenuDisplayFocus img:nth-child(2) {
outline: 2px solid blue;
}
```
```
<div id='menu'>
<div id='MenuInfo'>
<div id='MenuDisplayFocus'>
<img src='https://placekitten.com/200/200'>
<img src='https://placekitten.com/g/200/200'>
</div>
<input type='checkbox' id='SoccerFields' checked='checked'>
<div id='SoccerfieldsDescription' class='Description'>XXX</div>
<input type='checkbox' id='Employees'>
<div id='EmployeesDescription' class='Description'>YYY</div>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-23T09:35:44.260 | 2023-02-23T13:46:38.767 | 2023-02-23T13:46:38.767 | 12,571,484 | 12,571,484 | null |
75,543,013 | 2 | null | 75,534,838 | 0 | null | If you have already put the phone number in the database, you can try the following code to display it on your web page:
```
@UserManager.FindByEmailAsync(@User.Identity?.Name).Result.PhoneNumber;
```
Note:
Using is because the email here is the default name of the account.
| null | CC BY-SA 4.0 | null | 2023-02-23T09:42:16.627 | 2023-02-23T09:42:16.627 | null | null | 19,151,266 | null |
75,543,183 | 2 | null | 75,542,880 | 0 | null | Remove package.json and try again
| null | CC BY-SA 4.0 | null | 2023-02-23T09:57:50.393 | 2023-02-23T09:57:50.393 | null | null | 19,064,248 | null |
75,543,451 | 2 | null | 75,541,718 | 2 | null | I guess while installing Postgres you forgot to enable debugging. In order to enable debugging symbols for PostgreSQL, you need to recompile PostgreSQL from the source with the appropriate debugging flags enabled. When compiling from the source, you can include the --enable-debug flag to enable debugging symbols.
configure by setting flags
```
./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer"
```
for more details refer to [this](https://theundersurfers.netlify.app/age-installation/)
| null | CC BY-SA 4.0 | null | 2023-02-23T10:22:05.557 | 2023-02-23T10:22:05.557 | null | null | 21,085,660 | null |
75,543,926 | 2 | null | 75,543,925 | 0 | null | At the time of writing, ApexCharts doesn't offer this functionality out of the box. The following is a workaround inspired by [this answer on GitHub from Phili230](https://github.com/apexcharts/apexcharts.js/issues/1980#issuecomment-818590841).
### Output

### Code
```
const data = {
labels: [
"2022-01-01",
"2022-02-01",
"2022-03-01",
"2022-04-01",
"2022-05-01",
"2022-06-01"
],
mean: [14, 16, 18, 15, 19, 16],
low: [11.5, 14, 15, 12.5, 17, 14.5],
high: [15.6, 18, 20.5, 16.5, 21, 17]
};
export default function App() {
const series = [
{
name: "95th quantile",
type: "area",
data: data.high
},
{
name: "5th quantile",
type: "area",
data: data.low
},
{
name: "mean",
type: "line",
data: data.mean
}
];
const options = {
chart: {
stacked: false
},
title: { text: "Mean estimate by month" },
labels: data.labels,
fill: {
colors: ["#94ddf7", "#FFFFFF", "#FFFFFF"],
opacity: [0.5, 1.0, 1.0],
type: "solid"
},
stroke: {
show: true,
colors: ["#94ddf7", "#94ddf7", "#0674fe"],
width: [2, 2, 5]
},
xaxis: {
type: "datetime"
},
grid: {
strokeDashArray: 0,
position: "front"
},
legend: { show: false },
tooltip: { inverseOrder: true },
yaxis: {
min: 0,
title: {
text: "Mean estimate"
}
}
};
return (
<Chart
options={options}
series={series}
type="line"
width={"100%"}
height={"500px"}
/>
);
}
```
### CodeSandbox
[https://codesandbox.io/s/serene-benji-w34gz3](https://codesandbox.io/s/serene-benji-w34gz3)
### Remarks
- - -
| null | CC BY-SA 4.0 | null | 2023-02-23T11:04:05.130 | 2023-02-23T11:04:05.130 | null | null | 8,929,855 | null |
75,543,950 | 2 | null | 75,535,037 | 0 | null | Add this field to your inner-most `Container` that has a height of 120:
`color: Colors.transparent`
I’m betting it’s inheriting some theme from somewhere higher up in your app that’s making it grey.
| null | CC BY-SA 4.0 | null | 2023-02-23T11:06:00.973 | 2023-02-23T11:06:00.973 | null | null | 13,029,516 | null |
75,543,967 | 2 | null | 51,499,168 | 0 | null | It will expand your view horizontally.
```
fun showCustomToast(context: Context, message: String) {
val inflater: LayoutInflater = LayoutInflater.from(context)
val layout: View = inflater.inflate(R.layout.layout_custom_toast, null, false)
val text = layout.findViewById<AppCompatTextView>(R.id.tvMessage) as AppCompatTextView
text.setText(message)
toast.setGravity(Gravity.TOP or Gravity.FILL_HORIZONTAL, 0, 0)
toast.setMargin(16f, 0f)
toast.duration = Toast.LENGTH_LONG
toast.setView(layout)
toast.show()
}
```
| null | CC BY-SA 4.0 | null | 2023-02-23T11:07:17.240 | 2023-02-23T11:07:17.240 | null | null | 21,272,312 | null |
75,544,016 | 2 | null | 75,467,841 | 0 | null | I've also tried to build the android version of FluffyChat recently, and managed with a few minor updates:
For the libolm3 issue itself, I managed to avoid it by using the flutter installation from the tarball ([https://docs.flutter.dev/get-started/install/linux](https://docs.flutter.dev/get-started/install/linux)) instead of the snap version: see [https://gitlab.com/famedly/fluffychat/-/issues/1065](https://gitlab.com/famedly/fluffychat/-/issues/1065)
Then, I update the webrtc repository in pubsec.yaml file:
```
flutter_webrtc:
- git: https://github.com/radzio-it/flutter-webrtc.git
+ git: https://github.com/flutter-webrtc/flutter-webrtc.git
```
Finally, the build command currently tries to sign an apk, so you'd need a keystore and a file referencing it (maybe you could find a way to build a debug version of the apk without this signature?.
I just created an android/key.properties file with the content:
```
storePassword=xxx
keyPassword=xxxx
keyAlias=key
storeFile=/path/to/your/storefile
```
then I built running the commands:
```
git apply scripts/enable-android-google-services.patch
./scripts/build-android-apk.sh
```
| null | CC BY-SA 4.0 | null | 2023-02-23T11:11:42.840 | 2023-02-24T09:57:48.723 | 2023-02-24T09:57:48.723 | 21,272,498 | 21,272,498 | null |
75,544,462 | 2 | null | 75,522,351 | 1 | null | ```
procedure DeleteTimeSheet(TimeSheetCode: Code[20])
var
TimeSheetHeader: Record "Time Sheet Header";
begin
if TimeSheetHeader.Get(TimeSheetCode) then
TimeSheetHeader.Delete(true);
end;
```
A few notes and recommendations.
The length of Code variables should be aligned with respective table fields which this code applies to. In this case, time sheet code in the Time Sheet Header table is Code[20], so it's a good idea to keep the variable the same length. This can protect your code from possible overflow runtime errors.
Variable name "TimeSheetHeader" is more human-readable than RecL950. Yes, the internal table ID of the timesheet header is 950, but I bet there is no developer who remembers all table numbers in BC. Best to name variables in a way that helps identify the object they reference.
Delete needs the primary key to be initialized, and it's a good idea to call it with the true parameter to invoke the OnDelete trigger. Code in the header trigger deletes linked timesheet lines and comments. `TimeSheetHeader.Delete()` will not call the table trigger, and will leave orphan time sheet lines.
You can search for AL books, there are a few available. "Business Central Development Quick Start Guide" by Duilio Tacconi, is one recommendation.
Or you can try "AL for Beginners" by Krzysztof Bialowas, it's free: [http://www.mynavblog.com/2022/07/25/al-for-beginners-workbook-version-2-0/](http://www.mynavblog.com/2022/07/25/al-for-beginners-workbook-version-2-0/)
| null | CC BY-SA 4.0 | null | 2023-02-23T11:51:34.553 | 2023-02-23T11:51:34.553 | null | null | 4,215,639 | null |
75,544,885 | 2 | null | 75,543,279 | 0 | null | If you didn't enable , try to enable it:

| null | CC BY-SA 4.0 | null | 2023-02-23T12:32:25.533 | 2023-02-23T13:12:29.363 | 2023-02-23T13:12:29.363 | 8,864,226 | 21,268,294 | null |
75,545,527 | 2 | null | 63,636,178 | 0 | null | There is actually no way to do it properly with css in Firefox.
Instead you'll need to work with the click & focus events attached to your input.
Exemple with jQuery (can be done with vanilla JS) :
```
$("input[type='date']").on('click, focus', function(event) {
event.preventDefault(); //We prevent default calendar to pop
// YOUR CODE, show your own calendar, etc
});
```
| null | CC BY-SA 4.0 | null | 2023-02-23T13:31:15.387 | 2023-02-23T13:31:15.387 | null | null | 11,350,907 | null |
75,545,644 | 2 | null | 75,350,840 | 2 | null | I have a very similar set-up to yours, and the same issue was driving me nuts. The fix was very straightforward, though, just make sure to do the two following steps:
- -
If VS Code recommends installing Jupyter click accept and do so as well.
Finally, I would recommend you check out [Poetry](https://python-poetry.org/docs/basic-usage/) instead for managing both package dependencies as well as virtual environments. I find it makes the whole workflow more tidy.
[](https://i.stack.imgur.com/CHYDI.png)
[](https://i.stack.imgur.com/nRDK4.png)
| null | CC BY-SA 4.0 | null | 2023-02-23T13:42:16.027 | 2023-02-23T13:42:16.027 | null | null | 4,789,937 | null |
75,545,859 | 2 | null | 75,456,493 | 0 | null | In this case it should be inside a mutate
```
library(dplyr)
# Example data
df <- data.frame(
Swedish = sample(c("Checked", "Unchecked"), 10, replace = TRUE)
)
df=df %>%
mutate(
Swedish=factor(Swedish, levels=c("Checked", "Unchecked"))
)
df = df %>%
mutate(country =
case_when(
Swedish == "Checked" ~ "Swedish",
TRUE ~ "Other"
)
)
df
```
output
```
Swedish country
1 Checked Swedish
2 Unchecked Other
3 Unchecked Other
4 Unchecked Other
```
| null | CC BY-SA 4.0 | null | 2023-02-23T14:03:30.623 | 2023-02-23T14:03:30.623 | null | null | 7,667,381 | null |
75,546,087 | 2 | null | 75,545,156 | 2 | null | It's not possible to copy the linked plot exactly because you have a 3-point Likert scale. Perhaps the best way to handle this is to centre the middle of the 'no opinion' section at 0. This requires taking each question, making the 'disagree' values negative, and splitting the 'no opinion' values into two equal positive and negative halfs, then plotting the whole thing as a bar chart.
The statements are too long to have in full on the y axis, so I have substituted these for question labels. You may prefer to have these in the order the questions appear rather than in ascending order as per the linked plot for extra clarity:
```
library(tidyverse)
df_long %>%
group_by(statement) %>%
reframe(value = c(value[answer == 'agree'],
value[answer == 'no opinion']/2,
-value[answer == 'no opinion']/2,
-value[answer == 'disagree']),
answer = c('agree', 'no opinion', 'no opinion', 'disagree'),
overall = sum(value)) %>%
mutate(question = paste0('Q', as.numeric(factor(statement))),
question = reorder(question, overall)) %>%
ggplot(aes(x = value, y = question, fill = answer)) +
geom_col(orientation = 'y', width = 0.6) +
geom_vline(xintercept = 0) +
scale_fill_manual(values = c('#5ab4ac', '#d8b366', 'gray80')) +
theme_classic()
```
[](https://i.stack.imgur.com/FHIr0.png)
| null | CC BY-SA 4.0 | null | 2023-02-23T14:21:08.390 | 2023-02-23T14:21:08.390 | null | null | 12,500,315 | null |
75,546,134 | 2 | null | 75,546,081 | 0 | null | You can store rolled dice values in a list and then print those values with plus signs in between (for example map them to `str` and use `join`). Also you could use `for` loop for getting the results of the roll instead of those `if`s.
Example code:
```
from random import randint
n = int(input())
k = int(input())
dices = []
for _ in range(n):
dices.append(randint(1, k))
print(' + '.join(map(str, dices)), '=', sum(dices))
```
Result:
```
3
6
6 + 1 + 5 = 12
```
| null | CC BY-SA 4.0 | null | 2023-02-23T14:25:41.130 | 2023-02-23T14:25:41.130 | null | null | 10,626,495 | null |
75,546,203 | 2 | null | 75,545,405 | 0 | null | `orientation = Landscape` is the source of the problem.
It is synonymous with `rotate=90` ([http://www.graphviz.org/docs/attrs/landscape/](http://www.graphviz.org/docs/attrs/landscape/)).
If you remove that line, you get this graph:
[](https://i.stack.imgur.com/RU4dj.png)
| null | CC BY-SA 4.0 | null | 2023-02-23T14:30:13.093 | 2023-02-23T14:30:13.093 | null | null | 12,317,235 | null |
75,546,210 | 2 | null | 75,546,081 | 0 | null | If you write `print(2+3)`, you will just have `5`, so you need to write a string with '2', '+' and '3' for example :
```
a = 2
b = 3
print(a+b) # 5
print(a, '+', b) # 2 + 3
# even better :
print(f'{a} + {b} = {a+b}') # 2 + 3 = 5
```
| null | CC BY-SA 4.0 | null | 2023-02-23T14:30:53.110 | 2023-02-23T14:30:53.110 | null | null | 12,403,467 | null |
75,546,345 | 2 | null | 75,546,081 | 1 | null | The data type of range variables are integer so you have to first convert them into string and concate the variables like this
```
import random
range1=random.randint(1,10)
range2=random.randint(1,10)
range3=random.randint(1,10)
res=range1+range2+range3
print(str(range1)+" + "+str(range2)+" + "+str(range3)+" = "+str(res))
```
> Example Output:
8 + 10 + 9 = 27
check out more on how to convert integer to string here [https://www.digitalocean.com/community/tutorials/python-concatenate-string-and-int](https://www.digitalocean.com/community/tutorials/python-concatenate-string-and-int)
| null | CC BY-SA 4.0 | null | 2023-02-23T14:42:46.390 | 2023-02-23T14:42:46.390 | null | null | 21,223,723 | null |
75,546,367 | 2 | null | 75,546,122 | 0 | null | Ok what you need is to know the start and end date of different main phases by case. This query will tell you that:
```
SELECT
s.case_id,
l.main_phase,
min(s.start_date) as start,
max(s.start_date) as end
FROM system3020.group_case_phase AS s
LEFT JOIN lookup.case_phase as l ON s.group_phase_code = l.code
GROUP BY s.case_id, l.main_phase
```
Now that you have that -- you can join when the date is between start and end -- like this:
```
SELECT case_id, transaction_date, s.main_phase, (-1 * amount) AS amount
FROM system3020.transactions
LEFT JOIN (
SELECT
s.case_id,
l.main_phase,
min(s.start_date) as start,
max(s.start_date) as end
FROM system3020.group_case_phase AS s
LEFT JOIN lookup.case_phase as l ON s.group_phase_code = l.code
GROUP BY s.case_id, l.main_phase,
l.detailed_phase -- a main phase can have multiple "parts"
) as S ON transactions.case_id = S.case_id
AND transaction.transaction_date BETWEEN s.start and s.end
WHERE case_id = '1002389' AND payment_cost_ind = 'P' AND orig_cost_type != 'IJ'
```
| null | CC BY-SA 4.0 | null | 2023-02-23T14:44:47.200 | 2023-02-23T15:14:52.657 | 2023-02-23T15:14:52.657 | 215,752 | 215,752 | null |
75,546,401 | 2 | null | 75,535,080 | 0 | null | I'm not sure if it works for Py4JJavaError but if you print error type and error you should get your "header":
```
import traceback
try:
raise ValueError('my error')
except Exception as e:
msg = f'Error details: \n {type(e).__name__} : {e} \n{traceback.format_exc()}'
print(msg)
```
[](https://i.stack.imgur.com/6NVz6.png)
[](https://i.stack.imgur.com/WT4aG.png)
| null | CC BY-SA 4.0 | null | 2023-02-23T14:47:37.563 | 2023-02-23T14:47:37.563 | null | null | 10,381,648 | null |
75,546,437 | 2 | null | 75,546,081 | 0 | null | if you dont want to deal with arrays you can use `print("string", end="")`.The value of this parameter is ‘\n’, the new line character. So we can end the print statement with any character.
## Here i give empty string so it is going to be empty
```
from random import randint
diceCount = int(input("How many dice are you rolling (max 6)"))
sideCount = int(input("How many sides do the dice have?"))
sum = 0
for i in range(diceCount):
randomNum = randint(1, sideCount)
sum = sum + randomNum
if i == 0:
print(f"{str(randomNum)} ",end= '')
else:
print(f" + {str(randomNum)}",end='')
print(f" = {sum}")
```
| null | CC BY-SA 4.0 | null | 2023-02-23T14:50:15.253 | 2023-02-23T14:50:15.253 | null | null | 13,091,066 | null |
75,547,217 | 2 | null | 17,652,039 | 0 | null | Override the DataGridColumnHeadersPresenter template.
This will create header rows that have the normal behaviour, which is that they scroll with the datagrid horizontally, but stay fixed when scrolling vertically.
```
<Style TargetType="{x:Type DataGridColumnHeadersPresenter}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type DataGridColumnHeadersPresenter}">
<Grid Background="Red">
<Grid.RowDefinitions>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
<RowDefinition></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<TextBlock Grid.Row="0" Grid.ColumnSpan="4" Text="MAIN APPLICATION"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Text="Experiment 1"></TextBlock>
<TextBlock Grid.Row="1" Grid.Column="2" Grid.ColumnSpan="2" Text="Experiment 2"></TextBlock>
<DataGridColumnHeader x:Name="PART_FillerColumnHeader"
Grid.Row="2" Grid.ColumnSpan="4"
IsHitTestVisible="False" />
<ItemsPresenter Grid.Row="2" Grid.ColumnSpan="4" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
```
| null | CC BY-SA 4.0 | null | 2023-02-23T15:52:44.640 | 2023-02-23T15:52:44.640 | null | null | 1,919,998 | null |
75,547,243 | 2 | null | 75,544,217 | 1 | null | Nope!
They will all share the same `ScriptableObject` instance and hence also share the same `ItemDetails` instance.
---
If you rather want a copy you can initially use e.g.
```
[SerializeField] private SO_Item soItem;
private SO_Item runtimeSOItem;
private void Awake ()
{
runtimeSOItem = Instantiate(soItem);
}
```
which will create a new detached individual instance of the `ScriptableObject`.
| null | CC BY-SA 4.0 | null | 2023-02-23T15:54:29.513 | 2023-02-23T15:54:29.513 | null | null | 7,111,561 | null |
75,547,300 | 2 | null | 75,545,609 | 2 | null | "POST requests may only be made anonymously."
[https://learn.microsoft.com/en-us/powerquery-m/web-contents](https://learn.microsoft.com/en-us/powerquery-m/web-contents)
And Power BI will not allow you to paste plain-text credentials into your query when refreshing through the service. IE you can't make a BASIC auth call with credentials by writing your own Authentication header.
So the only option to use the Web.Contents connector is to pass the request entirely in the query string or HTTP headers when using a non-Anonymous request.
| null | CC BY-SA 4.0 | null | 2023-02-23T16:00:22.853 | 2023-02-23T16:00:22.853 | null | null | 7,297,700 | null |
75,547,388 | 2 | null | 75,547,227 | 0 | null | I could not find a specific extension for Mac Assembler. I'd recommend using VSCode as your editor and [CodeRunner](https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner) with custom commands.
Alternatively, you could use the terminal pane to manually execute the Mac OSX assembler commands.
Here's a link to the [as command reference from Apple](https://developer.apple.com/library/mac/documentation/DeveloperTools/Reference/Assembler/Assembler.pdf). It'll probably be a useful reference for compiling and linking.
| null | CC BY-SA 4.0 | null | 2023-02-23T16:09:10.553 | 2023-02-23T16:09:10.553 | null | null | 139,609 | null |
75,547,397 | 2 | null | 75,547,379 | 1 | null | You can use a mask and multiplication of the boolean mask as string:
```
m = df.notna()
out = m.mul(df['id'], axis=0).where(m)
```
Or with [numpy](/questions/tagged/numpy):
```
import numpy as np
m = df.notna()
out = pd.DataFrame(np.where(m, np.repeat(df['id'].to_numpy()[:,None],
df.shape[1], axis=1),
df),
index=df.index, columns=df.columns)
```
Another idea with reindexing:
```
out = df[['id']].reindex(columns=df.columns).ffill(axis=1).where(df.notna())
```
Output:
```
id A B C
0 X X X NaN
1 Y NaN Y Y
2 Z Z NaN Z
```
| null | CC BY-SA 4.0 | null | 2023-02-23T16:09:48.603 | 2023-02-23T16:15:57.403 | 2023-02-23T16:15:57.403 | 16,343,464 | 16,343,464 | null |
75,547,489 | 2 | null | 75,546,821 | 0 | null | As @ray stated, you cannot have two fields with the same name in one document in mongo. If you try to do that, the values of the fields will be overridden and you will end up with one field.
| null | CC BY-SA 4.0 | null | 2023-02-23T16:18:32.717 | 2023-02-23T16:18:32.717 | null | null | 11,815,969 | null |
75,547,573 | 2 | null | 75,547,332 | 0 | null | The solution is to wrap the `<img ... />` and `<div class="dot" ... />` in a `<div>` as you already have done. Then apply simple styles.
You just messed up the stylings, I reccomend to read the docs to see how this works rather that ^c ^v.
1. Remove position:relative; on the img tag.
2. Change the dot div css to bottom: 50%, top: 50% and transform: translate(-50%,-50%) (Search 'center div position absolute')
For more information:
- [https://developer.mozilla.org/en-US/docs/Web/CSS/transform](https://developer.mozilla.org/en-US/docs/Web/CSS/transform)- [https://developer.mozilla.org/en-US/docs/Web/CSS/inset](https://developer.mozilla.org/en-US/docs/Web/CSS/inset)
| null | CC BY-SA 4.0 | null | 2023-02-23T16:23:51.647 | 2023-02-23T16:23:51.647 | null | null | 21,274,375 | null |
75,547,595 | 2 | null | 75,541,718 | 0 | null | You have installed PostgreSQL with optimization level-2 that prevent debugging because it does not include symbols.
When you are debugging code, you need to see debugging symbols.
You can reconfigure using:
```
./configure --enable-debug --enable-cassert
```
to solve this problem.
| null | CC BY-SA 4.0 | null | 2023-02-23T16:25:25.000 | 2023-02-23T16:25:25.000 | null | null | 20,972,645 | null |
75,548,183 | 2 | null | 57,130,866 | 0 | null | My preferred syntax, use closures for everything
```
NavigationLink {
WorkoutDetail(workout: workout)
} label: {
WorkoutRow(workout: workout)
}
.buttonStyle(ButtonStyle3D(background: Color.yellow))
```
| null | CC BY-SA 4.0 | null | 2023-02-23T17:17:06.363 | 2023-02-23T17:17:06.363 | null | null | 3,369,207 | null |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.