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,187,215 | 2 | null | 75,186,677 | 0 | null | Fist of all:
- `var codeInImageMessage = "Hard to read"`- `true``false`
Possible problem
- `[SerializableField] private GameObject nameOfThisObject;`- - -
| null | CC BY-SA 4.0 | null | 2023-01-20T17:07:03.020 | 2023-01-20T17:07:03.020 | null | null | 21,051,001 | null |
75,187,503 | 2 | null | 22,629,152 | 0 | null | Sync your project. This fixed my problem.
| null | CC BY-SA 4.0 | null | 2023-01-20T17:33:46.487 | 2023-01-20T17:33:46.487 | null | null | 2,908,583 | null |
75,187,717 | 2 | null | 75,184,894 | 1 | null | Using a macro enabled workbook you can hi-jack the hyperlink open event but it isn't as dynamic as we would hope it to be. Unfortunately, we cannot cancel any followed hyperlink using `Worksheet_FollowHyperlink` so we need to find a way around following a direct hyperlink.
We can create a hyperlink which goes nowhere by referencing itself then set the text to display as "Follow Link". Because the cell reference is then in the hyperlink, we can use an offset from that to get the desired address and sub address from the column before it; which then allows us to open the PDF at the desired place.
[](https://i.stack.imgur.com/kxLw0.png)
Unfortunately, the hyperlink if copied down will still reference the original cell, so each link would need to be edited separately. To date I haven't found a way to use the `HYPERLINK` function successfully.
The hyperlink format in the cell to the left would need to be the full path appended with "#page=" and the relevant page; C:\links\blah.pdf#page=6
> In the worksheet module
```
Const AcrobatReader = "C:\Program Files (x86)\Adobe\Acrobat Reader DC\Reader\AcroRd32.exe"
Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink)
If Target.TextToDisplay = "Follow Link" Then
Dim Ref As String: Ref = Range(Target.SubAddress).Offset(0, -1).Text
Dim URL() As String: URL = Split(Ref, "#page=")
If UBound(URL) > 0 Then Call OpenPDFtoPage(URL(0), CLng(URL(1)))
End If
End Sub
Function OpenPDFtoPage(FilepathPDF As String, page As Long)
Dim Path As String: Path = AcrobatReader & " /A ""page=" & page & """ " & FilepathPDF
Shell Path, vbNormalFocus
End Function
```
> The AcroRd32.exe path may need updating for specific installations
Maybe having just one "Follow Link" hyperlink where the URL in the cell next to it is more dynamic may allow this to be a bit more useable.
| null | CC BY-SA 4.0 | null | 2023-01-20T17:53:42.820 | 2023-01-20T22:03:00.423 | 2023-01-20T22:03:00.423 | 3,688,861 | 3,688,861 | null |
75,187,887 | 2 | null | 75,187,825 | 0 | null | You could first calculate the percentage per groups with `group_by`. Make sure your `fill` aesthetics is a `factor` and if you want to have percent labels you could use `percent` of `scales` package with `scale_y_continuous` like this:
```
library(dplyr)
library(ggplot2)
df %>%
group_by(fyear, decile) %>%
summarise(n = sum(aqc)) %>%
mutate(pct = n/sum(n)) %>%
ggplot(aes(x = fyear, y = pct, fill = factor(decile))) +
geom_area(alpha = 0.6, size = 1, colour = "black") +
labs(fill = "deciles") +
scale_y_continuous(labels = scales::percent)
```

[reprex v2.0.2](https://reprex.tidyverse.org)
---
Replacing negative values with zero using `ifelse`:
```
library(dplyr)
library(ggplot2)
df %>%
group_by(fyear, decile) %>%
summarise(n = sum(aqc)) %>%
mutate(pct = n/sum(n)) %>%
mutate(pct = ifelse(pct < 0, 0, pct)) %>%
ggplot(aes(x = fyear, y = pct, fill = factor(decile))) +
geom_area(alpha = 0.6, size = 1, colour = "black") +
labs(fill = "deciles") +
scale_y_continuous(labels = scales::percent)
```
Output:
[](https://i.stack.imgur.com/Eo3Jk.png)
| null | CC BY-SA 4.0 | null | 2023-01-20T18:09:59.700 | 2023-01-21T10:03:54.970 | 2023-01-21T10:03:54.970 | 14,282,714 | 14,282,714 | null |
75,188,586 | 2 | null | 6,415,284 | 0 | null | this error really bothered me and finally I have figured out how to fix it.
Yes, the error is caused by port conflict, the port 10000 is used by another process, in my case, it is a process called "azurite"... not sure what it, but sounds like something relate to azure :)
Anyways, this command to identify the PID of the process that uses 10000
```
netstat -p tcp -ano | findstr :10000
```
The last number '132864' is the pid
[](https://i.stack.imgur.com/82WT4.png)
run
```
tasklist /fi "pid eq 132864"
```
to see the name of the process.
Finally kill it by
```
taskkill /pid 132864 /f
```
and then I can successfully run the emulator
| null | CC BY-SA 4.0 | null | 2023-01-20T19:27:02.903 | 2023-01-20T19:27:02.903 | null | null | 192,727 | null |
75,188,592 | 2 | null | 20,472,802 | 0 | null |
You can make an L shape with [Path](https://openjfx.io/javadoc/19/javafx.graphics/javafx/scene/shape/Path.html) node and make it clickable.
This is a single class javafx app you can try .
```
public class App extends Application {
@Override
public void start(Stage stage) {
Path path = new Path(new MoveTo(0, 0), new HLineTo(200), new VLineTo(-100),
new HLineTo(100), new VLineTo(-200), new HLineTo(0), new ClosePath());
path.setFill(Color.AQUAMARINE);
path.setOnMouseClicked((e) -> {
System.out.println("do something");
});
var scene = new Scene(new StackPane(path), 640, 480);
stage.setScene(scene);
stage.show();
}
public static void main(String[] args) {
launch();
}
}
```
[](https://i.stack.imgur.com/YJE8v.png)
| null | CC BY-SA 4.0 | null | 2023-01-20T19:27:44.483 | 2023-01-20T19:27:44.483 | null | null | 7,587,451 | null |
75,188,675 | 2 | null | 73,261,715 | 0 | null |
```
npm install react-router-dom
```
in the terminal in your project directory.
| null | CC BY-SA 4.0 | null | 2023-01-20T19:38:15.283 | 2023-01-20T19:38:15.283 | null | null | 7,414,461 | null |
75,189,018 | 2 | null | 75,188,841 | 0 | null | I used the [SeleniumBase](https://github.com/seleniumbase/SeleniumBase) Recorder to generate a script for that:
`pip install seleniumbase`, then run with `python` or `pytest`:
```
from seleniumbase import BaseCase
BaseCase.main(__name__, __file__)
class RecorderTest(BaseCase):
def test_recording(self):
self.open("https://orteil.dashnet.org/cookieclicker/")
self.click("a#changeLanguage")
self.click("div#langSelect-EN")
```
It is working for me.
| null | CC BY-SA 4.0 | null | 2023-01-20T20:25:48.673 | 2023-01-20T20:25:48.673 | null | null | 7,058,266 | null |
75,189,043 | 2 | null | 75,188,371 | 0 | null | Looks like this setting is overriden in the inner scope :

| null | CC BY-SA 4.0 | null | 2023-01-20T20:30:42.640 | 2023-01-20T20:30:42.640 | null | null | 822,455 | null |
75,189,151 | 2 | null | 75,188,841 | 0 | null | To click on the element with text as you need to induce [WebDriverWait](https://stackoverflow.com/a/59130336/7429447) for the [element_to_be_clickable()](https://stackoverflow.com/a/54194511/7429447) and you can use either of the following [locator strategies](https://stackoverflow.com/a/48056120/7429447):
- Using :```
driver.get('https://orteil.dashnet.org/cookieclicker/')
WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "a.cc_btn.cc_btn_accept_all"))).click()
WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.CSS_SELECTOR, "div.langSelectButton.title#langSelect-EN"))).click()
```
- Using :```
driver.get('https://orteil.dashnet.org/cookieclicker/')
WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.XPATH, "//a[@class='cc_btn cc_btn_accept_all']"))).click()
WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.XPATH, "//div[@class='langSelectButton title' and @id='langSelect-EN']"))).click()
```
- : You have to add the following imports :```
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
```
- Browser Snapshot:

| null | CC BY-SA 4.0 | null | 2023-01-20T20:41:47.320 | 2023-01-20T20:41:47.320 | null | null | 7,429,447 | null |
75,189,166 | 2 | null | 75,172,230 | 0 | null |
That data is unusual since normally `send` count should be greater than `received`. It’ll be challenging to pinpoint or even narrow down what could be the problem on a public forum without going into project-specific details. The issue can be in the FCM backend itself or just in the reporting metrics. I would recommend reaching out to [Firebase support](https://firebase.google.com/support) as they can offer personalized help.
| null | CC BY-SA 4.0 | null | 2023-01-20T20:43:21.863 | 2023-01-20T20:43:21.863 | null | null | 20,447,561 | null |
75,189,474 | 2 | null | 28,756,035 | 0 | null |
## Update for Material Components
If you've previously used something like this:
```
<style name="MyTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:buttonStyle">@style/NoShadowButton</item>
</style>
<style name="NoShadowButton" parent="Widget.AppCompat.Button">
<item name="android:stateListAnimator">@null</item>
</style>
```
And like me you're scratching your head wondering why it doesn't work anymore now that you've migrated to `Theme.MaterialComponents.Light.*`, it's because buttonStyle refers only to the AppCompat button style - there is a new style for materialButtonStyle. This fixed the issue for me:
```
<style name="MyTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
<item name="materialButtonStyle">@style/Widget.MaterialComponents.Button.UnelevatedButton</item>
</style>
```
Here's a [good guide](https://material.io/blog/migrate-android-material-components) on what else has changed, and how to migrate properly.
| null | CC BY-SA 4.0 | null | 2023-01-20T21:29:23.697 | 2023-01-20T21:29:23.697 | null | null | 2,001,934 | null |
75,189,610 | 2 | null | 75,189,582 | 0 | null | This is called ["code folding"](https://code.visualstudio.com/docs/editor/codebasics#_folding).
To do it with arbitrary blocks of lines of code, there is built-in functionality for , which you can read more about [in the VS Code docs on editor folding regions](https://code.visualstudio.com/updates/v1_17#_editor). The general patterns is that you create "marker" comments around the block: one like `#region`, and one like `#endregion`. The current languages supporting markers at the time of this writing (according to the documentation) are JS, TS, C#, C, C++, F#, PowerShell, and VB.
For other languages, you should be able to achieve that with [the maptz.regionfolder](https://marketplace.visualstudio.com/items?itemName=maptz.regionfolder) extension or other similar ones.
| null | CC BY-SA 4.0 | null | 2023-01-20T21:45:57.093 | 2023-01-21T03:43:24.297 | 2023-01-21T03:43:24.297 | 11,107,541 | 11,107,541 | null |
75,189,756 | 2 | null | 75,089,137 | 0 | null | According to the [docs](https://pypi.org/project/twisted-iocpsupport/),
> Applications must not import names from the twisted_iocpsupport package directly.
So, if you're using any file with package versioning (requirements.txt, project.toml, etc.), you should remove-it manually.
| null | CC BY-SA 4.0 | null | 2023-01-20T22:07:10.770 | 2023-01-20T22:07:10.770 | null | null | 9,771,745 | null |
75,189,767 | 2 | null | 75,087,437 | 0 | null | Welcome to the SO! You can use the `.get_center()` functions of the two points and connect them via `DashedLine` with `stroke_width` of `2`. You should ignore `bodkociarkaMinus2a` and use the following line:
```
my_line: DashedLine = DashedLine(
bodMinus2a.get_center(), bodMinus2a3.get_center(),stroke_width = 2
)
```
[](https://i.stack.imgur.com/bVQQd.png)
Here is the full code:
```
from manim import *
class KvadratickaFunkcia(Scene):
def construct(self):
suradnicovaOs = Axes(
x_range=[-8,8,1],
y_range=[-8,8,1],
tips=False,
x_length=10,
y_length=10,
axis_config=
{
"stroke_color": GREY_A,
"include_numbers": True,
}
)
#vzorec x-2
posunParabolyVzorecMinus2a = MathTex("{y = (x-2)^2+0}", font_size=50).to_edge(UL).set_color(YELLOW)
posunParabolyVzorecMinus2a[0][5].set_color(RED)
posunParabolyVzorecMinus2a[0][9].set_color(RED)
#vzorec parabola y: (y-2)**2+0
parabolaMinus2a = suradnicovaOs.plot(lambda y: (y-2)**2+0 )
#body 1,2,3
bodMinus2a= Dot(suradnicovaOs.coords_to_point(1, 1), color=YELLOW)
#bodkociarkaMinus2a = suradnicovaOs.get_horizontal_line(suradnicovaOs.c2p(3,1))
bodMinus2a2 = Dot(suradnicovaOs.coords_to_point(2, 0), color=YELLOW)
bodkociarkaMinus2a2 = suradnicovaOs.get_vertical_line(suradnicovaOs.c2p(1,1))
bodMinus2a3 = Dot(suradnicovaOs.coords_to_point(3, 1), color=YELLOW)
bodkociarkaMinus2a3 = suradnicovaOs.get_vertical_line(suradnicovaOs.c2p(3,1))
my_line: DashedLine = DashedLine(
bodMinus2a.get_center(), bodMinus2a3.get_center(),stroke_width = 2
)
VsetkyBodyMinus123AA = VGroup(bodMinus2a,bodMinus2a2,bodMinus2a3, my_line, bodkociarkaMinus2a2, bodkociarkaMinus2a3)
self.play(Write(suradnicovaOs), run_time=3)
self.play(Create(posunParabolyVzorecMinus2a))
self.play(Create(VsetkyBodyMinus123AA))
self.wait()
self.play(FadeIn(parabolaMinus2a))
```
| null | CC BY-SA 4.0 | null | 2023-01-20T22:08:48.073 | 2023-01-20T22:08:48.073 | null | null | 10,082,415 | null |
75,190,311 | 2 | null | 75,190,285 | 1 | null | You can install a package for a specific version of Python with
```
python3.9 -m pip install numpy
```
For a more consistent python environment look at python [venv](https://docs.python.org/3/library/venv.html) or a container.
| null | CC BY-SA 4.0 | null | 2023-01-20T23:51:46.920 | 2023-01-21T00:02:19.937 | 2023-01-21T00:02:19.937 | 4,621,513 | 2,367,867 | null |
75,190,443 | 2 | null | 75,190,285 | 2 | null | Likely what is happening here is, because you have 2 versions of python installed, your `pip3` command is only installing things for one of the versions, 3.8 in this case.
Specifying the python version you want to run your command with will help solve this issue.
For example,
```
python3.9 -m pip install numpy
```
or
```
python3.8 -m pip install numpy
```
| null | CC BY-SA 4.0 | null | 2023-01-21T00:23:10.477 | 2023-01-21T00:23:10.477 | null | null | 10,687,509 | null |
75,190,579 | 2 | null | 75,190,543 | 1 | null | Both the [Get-WmiObject](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/get-wmiobject) cmdlet and its successor, [Get-CimInstance](https://learn.microsoft.com/en-us/powershell/module/cimcmdlets/get-ciminstance), add a `.PSComputerName` property to its output objects whenever the `-ComputerName` parameter is used.
Therefore:
```
$pcnames = 'TestServer1','TestServer2','TestServer3'
Get-CimInstance -Class Win32_Product -ComputerName $pcnames |
Where-Object Name -eq 'VMware Tools' |
Select-Object Name, Version, PSComputerName
```
---
`Get-CimInstance``Get-WmiObject`[this answer](https://stackoverflow.com/a/54508009/45375)
| null | CC BY-SA 4.0 | null | 2023-01-21T01:04:00.810 | 2023-01-21T01:20:39.480 | 2023-01-21T01:20:39.480 | 45,375 | 45,375 | null |
75,190,644 | 2 | null | 71,731,966 | 0 | null | I tried using pointer-events:none on my image, but it still kept showing up on mouse hover. I eventually gave up using the IMG tag altogether, and used a DIV container instead, and then loaded the image as a background image. Apparently, background images don't trigger the visual menu.
```
<DIV style = 'background-image:url("path to image"); background-size:100% 100%;'>
</DIV>
```
| null | CC BY-SA 4.0 | null | 2023-01-21T01:22:55.743 | 2023-01-21T01:22:55.743 | null | null | 12,345,248 | null |
75,190,653 | 2 | null | 75,190,289 | 0 | null | I was able to resolve, there are some items not compatible with the 3.11python. I removed it from my system and removed the environment in Anaconda I created with the same version. I set it up with python3.9.
As well as install the packages from Microsoft Visual Studio to update the C++ version and ran the pip I first attempted and had 0 errors.
| null | CC BY-SA 4.0 | null | 2023-01-21T01:25:38.403 | 2023-01-21T01:25:38.403 | null | null | 21,053,000 | null |
75,190,892 | 2 | null | 75,164,249 | 0 | null | I found out that it's a whats app web shortcut that makes this happen when the library uses the same shortcut to type the slash '/', I didn't find a solution, but in a palliative way, I created a virtual machine with a layout all in English, inside it works perfectly.
Updating, on my machine now it worked, leave the windows keyboard layout with English United States US standard.
| null | CC BY-SA 4.0 | null | 2023-01-21T03:02:20.210 | 2023-01-23T13:54:30.970 | 2023-01-23T13:54:30.970 | 20,411,756 | 20,411,756 | null |
75,191,035 | 2 | null | 64,157,034 | 0 | null | ```
user_num = int(input())
x = int(input())
soln = (user_num / x)
print(int(soln), end=' ')
user_num = (soln / x)
print(int(user_num), end=' ')
user_num = (user_num / x)
print(int(user_num))
```
| null | CC BY-SA 4.0 | null | 2023-01-21T03:51:52.013 | 2023-01-21T03:51:52.013 | null | null | 17,432,103 | null |
75,191,084 | 2 | null | 45,559,610 | 0 | null | For me, killing the process, deleting the pid file, restart, etc. did not help.
What worked was:
Change the directory to the installation folder and go inside the . The path is like:
`C:\Program Files\PostgreSQL\12\bin`
use the pg_ctl to get the status:
`C:\Program Files\PostgreSQL\12\bin>pg_ctl.exe -D "C:\Program Files\PostgreSQL\12\data" status`
The path here is the folder.
The result was:
`pg_ctl: server is running (PID: 7560)`
Even though the service was not running in the windows service page.
`C:\Program Files\PostgreSQL\12\bin>pg_ctl.exe -D "C:\Program Files\PostgreSQL\12\data" stop`
Now you should be able to start the postgres from windows service page or by:
`C:\Program Files\PostgreSQL\12\bin>pg_ctl.exe -D "C:\Program Files\PostgreSQL\12\data" start`
| null | CC BY-SA 4.0 | null | 2023-01-21T04:11:37.227 | 2023-01-21T04:11:37.227 | null | null | 11,845,240 | null |
75,191,103 | 2 | null | 64,834,889 | 0 | null | Clearing @AlexYokisama answer
Yes the easy way is using `id` as the following.
```
<input type="file" id="{{ $rand }}" >
```
And then in you `livewire` component you need to declare this `public $rand`
And you can use it safely in your reset function.
```
public $rand;
public function resetForm()
{
$this->rand++;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-21T04:20:24.727 | 2023-01-21T04:20:24.727 | null | null | 454,012 | null |
75,191,570 | 2 | null | 75,171,858 | -1 | null | The error message "Access violation writing location 0x0081D45C" is indicating that the program is trying to write to a memory location that it does not have access to.
In this specific case, the problem could be caused by the use of the 'k1' and 'k2' variables. The program is incrementing k1 and k2, but then using them as array indices without first initializing them to zero. As a result, it's trying to write to memory locations that are beyond the bounds of the arrays 'vmic' and 'vmare'.
```
int x[] = { 1,2,3,4,5,14,22,0 };
int vmic[10];
int vmare[10];
int n = 10;
int k1 = -1; //vmic
int k2 = -1; // vmare
_asm {
mov eax, 0; //index
lea ebx, x;
lea ecx, vmic;
lea edx, vmare;
mov esi, n; //val 10
bucla:
cmp[ebx + 4 * eax], 0;
je afara;
cmp[ebx + 4 * eax], esi;
jge mai_mare_egal;
inc k1;
mov edi, [ebx + 4 * eax];
mov[ecx + 4 * k1], edi;
mai_mare_egal:
inc k2;
mov edi, [ebx + 4 * eax];
mov[edx + 4 * k2], edi;
inc eax;
jmp bucla;
afara:
}
```
I've initialized the variables k1 and k2 to -1, and in the asm block, before the loop, I incremented them. This way, it will start from the 0th position of the array vmic and vmare.
| null | CC BY-SA 4.0 | null | 2023-01-21T06:39:13.793 | 2023-01-21T06:39:13.793 | null | null | 16,631,400 | null |
75,192,690 | 2 | null | 73,159,443 | 0 | null | Only you need to do is select the correct python interpreter of you project in specific field. See: [https://i.stack.imgur.com/K7QU7.jpg](https://i.stack.imgur.com/K7QU7.jpg)
| null | CC BY-SA 4.0 | null | 2023-01-21T10:39:12.647 | 2023-01-21T10:40:22.600 | 2023-01-21T10:40:22.600 | 20,831,275 | 20,831,275 | null |
75,193,088 | 2 | null | 12,655,227 | 0 | null | go to Services >> Databases >> Java DB >> right-click >>
Stop the Server. and connect your embedded DB.
| null | CC BY-SA 4.0 | null | 2023-01-21T11:51:03.190 | 2023-01-21T11:51:03.190 | null | null | 16,609,530 | null |
75,193,104 | 2 | null | 75,193,073 | 0 | null | You can't (at least, as far as I can tell).
What you could do, is to create select list items (or any number of them) so that they represent a , which means that the 1st item is "master". The 2nd item contains its own query which - in its `where` clause - references the 1st item which is also to be set as the for the 2nd item.
And so forth, for all cascading items.
| null | CC BY-SA 4.0 | null | 2023-01-21T11:53:51.323 | 2023-01-21T11:53:51.323 | null | null | 9,097,906 | null |
75,193,269 | 2 | null | 19,331,362 | 0 | null | You can use this javascript that automatically generates a figcaption from the image's alt.
You can add some css to make the bottom text look more realistic.
The same applies to markdown. Whatever text you put `![HERE]()` appears below the image.
```
var images = document.getElementsByTagName("img");
for (var i = 0; i < images.length; i++) {
var altText = images[i].getAttribute("alt");
var figcaption = document.createElement("figcaption");
figcaption.innerHTML = altText;
images[i].insertAdjacentElement("afterend", figcaption);
}
```
```
var images = document.getElementsByTagName("img");
for (var i = 0; i < images.length; i++) {
var altText = images[i].getAttribute("alt");
var figcaption = document.createElement("figcaption");
figcaption.innerHTML = altText;
images[i].insertAdjacentElement("afterend", figcaption);
}
```
```
<img src="https://www.w3schools.com/tags/img_girl.jpg" alt="Girl in a jacket">
```
| null | CC BY-SA 4.0 | null | 2023-01-21T12:21:31.020 | 2023-01-21T12:28:00.977 | 2023-01-21T12:28:00.977 | 14,637,648 | 14,637,648 | null |
75,193,564 | 2 | null | 75,190,753 | 0 | null | Quite a strange issue....
Apparently, if my charts reference a named range that starts with certain letters, Excel throws an error. however, if I change the named ranges to start with a different letter, it works.
For example, if I change the Rate_Term_Refi named range to xRate_Term_Refi, it works.
```
Sub updateChart()
Dim sh As Worksheet
'set which sheet the charts are
Set sh = ActiveSheet
'For each chart on the selected sheet
For Each ch In sh.ChartObjects
'for each series on the selected chart from the loop above (if there's more than one series of values)
For Each srs In ch.Chart.SeriesCollection
'check if the series has the "NonPort" word
i = InStr(srs.Formula, "Purchase_")
'Debug.Print i
'if i is greater than 0 it means that the series has the word "NonPort"
If i > 0 Then
'replace the word from NonPort to Port
newSrs = Replace(srs.Formula, "Purchase_", "xRate_Term_Refi")
'Debug.Print newSrs
'update the series
srs.Formula = newSrs
End If
'next series
Next
'next chart
Next
End Sub
```
| null | CC BY-SA 4.0 | null | 2023-01-21T13:06:39.223 | 2023-01-21T13:06:39.223 | null | null | 21,008,214 | null |
75,193,571 | 2 | null | 58,350,513 | 0 | null | It unfortunately seems that as of macOS 13.0 and SwiftUI 4.0 the only way for this to work is if your app is SwiftUI app.
```
@main
struct SettingsViewDemoApp: App {
var body: some Scene {
WindowGroup {
ContentView()
}
Settings {
SettingsView()
}
}
}
```
Source: [https://serialcoder.dev/text-tutorials/macos-tutorials/presenting-the-preferences-window-on-macos-using-swiftui/](https://serialcoder.dev/text-tutorials/macos-tutorials/presenting-the-preferences-window-on-macos-using-swiftui/)
| null | CC BY-SA 4.0 | null | 2023-01-21T13:07:59.743 | 2023-01-21T13:07:59.743 | null | null | 2,249,485 | null |
75,193,813 | 2 | null | 75,193,069 | 0 | null | The code didn't work means, how did you check ?
I suspect some of the collections got deleted some weren't.
> Note that delete is NOT an atomic operation in a document based NoSQL database like firebase and it's possible that it
may fail after only deleting some documents.
, you can manually handle all the delete requests of different documents recursively using a cloud function shown [here](https://firebase.google.com/docs/firestore/solutions/delete-collections?authuser=0#node.js)
But it is highly not recommended to do it from a web client, like Flutter.
From the [docs](https://firebase.google.com/docs/firestore/manage-data/delete-data?authuser=0#collections)
> Deleting a collection requires coordinating an unbounded number of
individual delete requests. If you need to delete entire collections,
do so only from a trusted server environment. While it is possible to
delete a collection from a mobile/web client, doing so has negative
security and performance implications.
Cheers :)
| null | CC BY-SA 4.0 | null | 2023-01-21T13:49:11.010 | 2023-01-21T13:49:11.010 | null | null | 7,207,607 | null |
75,193,943 | 2 | null | 70,093,156 | 0 | null | For me installing the `Development tools for .NET` component is not working, and I don't want to reinstall the entire VS, so I tried to unselect `.NET desktop development` in VS installer, then reselect it to reinstall these packages, finally VS can run my console .NET6 project.
| null | CC BY-SA 4.0 | null | 2023-01-21T14:10:50.623 | 2023-01-21T14:10:50.623 | null | null | 12,576,620 | null |
75,194,289 | 2 | null | 75,193,816 | 1 | null | It sounds like you are missing the user creation and role assignment within the SQL database:
Connect to the database with your account and create an account for the data factory:
```
CREATE USER [<datafactory-name>] FROM EXTERNAL PROVIDER;
```
Then grant it the required role for your task:
```
ALTER ROLE [<roleName>] ADD MEMBER [<datafactory-name>]
```
Some available role names are:
- - - - - - - - - -
| null | CC BY-SA 4.0 | null | 2023-01-21T15:04:36.320 | 2023-01-21T15:04:36.320 | null | null | 4,871,566 | null |
75,194,416 | 2 | null | 75,188,734 | 1 | null | Put your
```
toolsTab,
gene_expressions_sign_tab,
genomic_tab,
epigenetics_tab,
immune_oncology_tab,
pharma_tab,
cell_line_selection_tab,
mouse_tab,
multiomics_tab,
other_tab
```
Under `tabsetPanel` with 2 id `Tools` and `Others`
Then use a `reactiveValues` to check user is under which tabsetPanel, then use `updateTabsetPanel` to show different tabset panel
| null | CC BY-SA 4.0 | null | 2023-01-21T15:23:29.770 | 2023-01-21T15:23:29.770 | null | null | 7,155,684 | null |
75,194,568 | 2 | null | 75,193,526 | 2 | null |
1. import the dependencies for firebase_auth
2. import the package (import 'package:firebase_auth/firebase_auth.dart';)
3. final FirebaseAuth auth = FirebaseAuth.instance;
final currentuser = auth.currentUser;
4. user this currentuser variable anywhere. You can use this to get the current user email id or username anything related which is stored in database
| null | CC BY-SA 4.0 | null | 2023-01-21T15:50:10.580 | 2023-01-21T18:01:03.940 | 2023-01-21T18:01:03.940 | 209,103 | 20,292,934 | null |
75,194,609 | 2 | null | 14,794,599 | 1 | null | Just add the size command the aes() function, with any fractional value desired, e.g. size = 1.5
```
geom_line(data,aes(x=x,y=y), size=1.5)
```
| null | CC BY-SA 4.0 | null | 2023-01-21T15:55:46.503 | 2023-01-21T15:55:46.503 | null | null | 11,918,475 | null |
75,194,639 | 2 | null | 75,193,388 | 1 | null | You can pass a function to update the main state as parameter as follow:
```
void showFontPicker() {
showModalBottomSheet(
context: context,
isScrollControlled: true,
isDismissible: true,
builder: (context) => FontPickerSheet(onSelected: updateMainView )).then((value) {
setState(() {
widget.myPostcard.font = value;
});
});
}
void updateMainView(value)
{
setState(() {
widget.myPostcard.font = value
});
}
```
```
CupertinoPicker(
itemExtent: 30,
onSelectedItemChanged: (int value) {
onSelected(value); // or widget.onSelected(value); [it depends on how you passed this value]
},
…
```
| null | CC BY-SA 4.0 | null | 2023-01-21T16:00:55.270 | 2023-01-21T16:00:55.270 | null | null | 21,019,011 | null |
75,194,922 | 2 | null | 75,182,563 | 0 | null | Any time you change the height of a table view element - cell, section header or footer view, etc - you must tell the table view to re-layout its elements.
This is commonly done with a `closure`.
For example, you would add this property to your custom header view class:
```
// closure so table layout can be updated
var contentChanged: (() -> ())?
```
and then set that closure in `viewForHeaderInSection`:
```
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: headerID) as! MyCustomHeader
// set the closure
header.contentChanged = {
// tell the table view to re-layout itself so the header height can be changed
tableView.performBatchUpdates(nil)
}
return header
} else {
let header2 = tableView.dequeueReusableHeaderFooterView(withIdentifier: headerID2) as! OneMoreCustomHeader
return header2
}
}
```
and when you tap the "Set status" button to update the `profileStatusLabel`, you would use the closure to "call back" to the controller:
```
contentChanged?()
```
With the code you posted, you are embedding `ProfileHeaderView` in `MyCustomHeader`, which complicates things a little because you will need a closure in `MyCustomHeader` that works with another closure in `ProfileHeaderView`.
There really is no need to do that -- you can put all of your UI elements directly in `MyCustomHeader` to avoid that issue.
Here is a complete, runnable example. I changed your `MyCustomHeader` as described... as well as added some other code that you will probably end up needing (see the comments):
```
class MyCustomHeader: UITableViewHeaderFooterView {
// closure to inform the controller the status text changed
// so we can update the data and
// so the table layout can be updated
var contentChanged: ((String) -> ())?
// presumably, we'll be setting the statusText and the name from a dataSource
public var statusText: String = "" {
didSet {
profileStatusLabel.text = statusText
}
}
public var name: String = "" {
didSet {
profileNameLabel.text = name
}
}
private lazy var profileImageView: UIImageView = {
let v = UIImageView()
if let img = UIImage(systemName: "person.crop.circle") {
v.image = img
}
v.translatesAutoresizingMaskIntoConstraints = false
return v
}()
private lazy var profileNameLabel: UILabel = {
let profileStatusLabel = UILabel()
profileStatusLabel.numberOfLines = 0
profileStatusLabel.text = ""
profileStatusLabel.textColor = .black
profileStatusLabel.textAlignment = .left
profileStatusLabel.translatesAutoresizingMaskIntoConstraints = false
return profileStatusLabel
}()
private lazy var profileStatusLabel: UILabel = {
let profileStatusLabel = UILabel()
profileStatusLabel.numberOfLines = 0
profileStatusLabel.text = ""
profileStatusLabel.textColor = .gray
profileStatusLabel.textAlignment = .left
profileStatusLabel.translatesAutoresizingMaskIntoConstraints = false
return profileStatusLabel
}()
private lazy var setStatusButton: UIButton = {
let setStatusButton = UIButton()
setStatusButton.backgroundColor = .systemBlue
setStatusButton.layer.cornerRadius = 4
setStatusButton.layer.shadowOffset = CGSize(width: 4, height: 4)
setStatusButton.layer.shadowOpacity = 0.7
setStatusButton.layer.shadowRadius = 4
setStatusButton.layer.shadowColor = UIColor.black.cgColor
setStatusButton.setTitle("Set status", for: .normal)
setStatusButton.setTitleColor(.white, for: .normal)
setStatusButton.setTitleColor(.lightGray, for: .highlighted)
setStatusButton.addTarget(self, action: #selector(buttonAction), for: .touchUpInside)
setStatusButton.translatesAutoresizingMaskIntoConstraints = false
return setStatusButton
}()
private lazy var statusTextField: UITextField = {
let statusTextField = UITextField()
statusTextField.text = ""
statusTextField.borderStyle = .roundedRect
statusTextField.backgroundColor = .white
statusTextField.translatesAutoresizingMaskIntoConstraints = false
return statusTextField
}()
private func setupView() {
contentView.addSubview(profileImageView)
contentView.addSubview(profileNameLabel)
contentView.addSubview(profileStatusLabel)
contentView.addSubview(statusTextField)
contentView.addSubview(setStatusButton)
}
private func setupConstraints() {
NSLayoutConstraint.activate([
profileImageView.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 10),
profileImageView.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 20),
profileImageView.widthAnchor.constraint(equalToConstant: 160.0),
profileImageView.heightAnchor.constraint(equalTo: profileImageView.widthAnchor),
profileNameLabel.topAnchor.constraint(equalTo: contentView.topAnchor, constant: 27),
profileNameLabel.leadingAnchor.constraint(equalTo: profileImageView.trailingAnchor, constant: 20),
profileNameLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),
profileNameLabel.heightAnchor.constraint(equalToConstant: 30),
profileStatusLabel.topAnchor.constraint(equalTo: profileNameLabel.bottomAnchor, constant: 10),
profileStatusLabel.leadingAnchor.constraint(equalTo: profileImageView.trailingAnchor, constant: 20),
profileStatusLabel.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),
profileStatusLabel.heightAnchor.constraint(greaterThanOrEqualToConstant: 49),
statusTextField.topAnchor.constraint(equalTo: profileStatusLabel.bottomAnchor, constant: 10),
statusTextField.leadingAnchor.constraint(equalTo: profileImageView.trailingAnchor, constant: 20),
statusTextField.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),
statusTextField.heightAnchor.constraint(equalToConstant: 40),
setStatusButton.topAnchor.constraint(equalTo: statusTextField.bottomAnchor, constant: 16),
setStatusButton.leadingAnchor.constraint(equalTo: contentView.leadingAnchor, constant: 16),
setStatusButton.trailingAnchor.constraint(equalTo: contentView.trailingAnchor, constant: -16),
setStatusButton.heightAnchor.constraint(equalToConstant: 50),
contentView.bottomAnchor.constraint(equalTo: setStatusButton.bottomAnchor, constant: 16),
])
}
@objc private func buttonAction() {
guard let stText = statusTextField.text else {
print("Text the status before press the button")
return
}
statusTextField.resignFirstResponder()
// update statusText property
// which will also set the text in the label
statusText = stText
// call the closure, passing back the new text
contentChanged?(stText)
}
override init(reuseIdentifier: String?) {
super.init(reuseIdentifier: reuseIdentifier)
contentView.backgroundColor = .systemGray4
setupView()
setupConstraints()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
class ProfileViewController: UIViewController, UIGestureRecognizerDelegate {
// presumably, this will be loaded from saved data, along with the rest of the table data
var dataSourceStatusText: String = "Looking for a big, young, good looking, able to cook female gorilla"
var profileTableView = UITableView()
let headerID = "headerId"
let cellID = "cellId"
func setupTableView() {
profileTableView.contentInsetAdjustmentBehavior = .never
profileTableView.register(UITableViewCell.self, forCellReuseIdentifier: cellID)
profileTableView.delegate = self
profileTableView.dataSource = self
profileTableView.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(profileTableView)
}
func setupMyCustomHeader() {
profileTableView.register(MyCustomHeader.self, forHeaderFooterViewReuseIdentifier: headerID)
}
private func setupConstraints() {
NSLayoutConstraint.activate([
profileTableView.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor),
profileTableView.trailingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.trailingAnchor),
profileTableView.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor),
profileTableView.bottomAnchor.constraint(equalTo: view.safeAreaLayoutGuide.bottomAnchor),
])
}
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .systemGray6
setupTableView()
setupMyCustomHeader()
setupConstraints()
}
}
extension ProfileViewController: UITableViewDelegate, UITableViewDataSource {
// let's use 10 sections each with 5 rows so we can scroll the header out-of-view
func numberOfSections(in tableView: UITableView) -> Int {
return 10
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 5
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let c = tableView.dequeueReusableCell(withIdentifier: cellID, for: indexPath)
c.textLabel?.text = "\(indexPath)"
return c
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if #available(iOS 15, *) {
tableView.sectionHeaderTopPadding = 0
}
if section == 0 {
return UITableView.automaticDimension
} else {
return 50
}
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
let header = tableView.dequeueReusableHeaderFooterView(withIdentifier: headerID) as! MyCustomHeader
header.name = "@KillaGorilla"
header.statusText = dataSourceStatusText
// set the closure
header.contentChanged = { [weak self] newStatus in
guard let self = self else { return }
// update the status text (probably also saving it somewhere?)
// if we don't do this, and the section header scrolls out of view,
// the *original* status text will be shown
self.dataSourceStatusText = newStatus
// tell the table view to re-layout itself so the header height can be changed
tableView.performBatchUpdates(nil)
}
return header
} else {
// this would be your other section header view
// for now, let's just use a label
let v = UILabel()
v.backgroundColor = .yellow
v.text = "Section Header: \(section)"
return v
}
}
}
```
Give that a try.
| null | CC BY-SA 4.0 | null | 2023-01-21T16:39:40.983 | 2023-01-21T16:39:40.983 | null | null | 6,257,435 | null |
75,194,987 | 2 | null | 75,194,704 | 0 | null | The disappearing does not mean it is no longer in memory.
It looks like you keep pushing them onto the navigation stack which increases their retain count.
| null | CC BY-SA 4.0 | null | 2023-01-21T16:50:12.807 | 2023-01-21T16:50:12.807 | null | null | 11,287,363 | null |
75,195,684 | 2 | null | 75,163,115 | 0 | null | I found `wordPattern` in monaco-editor language configuration and updated it with my case + system.
| null | CC BY-SA 4.0 | null | 2023-01-21T18:37:44.500 | 2023-01-21T18:37:44.500 | null | null | 7,757,361 | null |
75,195,842 | 2 | null | 75,195,255 | 2 | null | You need to enable cors before using `app.listen()`. Think of regular express middleware, anything after `app.listen()` doesn't get bound to the server, it's the same thing here
| null | CC BY-SA 4.0 | null | 2023-01-21T19:01:48.510 | 2023-01-21T19:01:48.510 | null | null | 9,576,186 | null |
75,195,836 | 2 | null | 75,195,638 | 1 | null | Use cases are not meant to be used for designing user interfaces and menus. For this purpose, it is better to use more appropriate design practices such as for example [wireframe](https://en.wikipedia.org/wiki/Website_wireframe) and storyboards.
Use cases are not either meant to present a workflow or a sequence or event, like first do that, then chose then, then that. For this activity diagrams are better options.
Use cases should represent actor goals. The last option seems in this regard acceptable, since a user may be interested to manage each of these items, independently of the user interface and the order it is done.
The second option corresponds to the narrative. But it corresponds to a functional decomposition. Moreover it is misleading, as it suggest that managing products is dependent on the others, whereas one could well imagine an independent management of products.
The first option would be an alternative if the main goal of the actor is to manage products, and navigation through menus and categories would just be means to manage the products. Looking at the context (especially the "reservation" use-case) I understand however, that it's for a restaurant management system, and managing product is only one part of the goals. This option would therefore be misleading.
| null | CC BY-SA 4.0 | null | 2023-01-21T19:00:55.137 | 2023-01-21T19:00:55.137 | null | null | 3,723,423 | null |
75,195,937 | 2 | null | 75,195,706 | 0 | null | i think you should add it in AppUserRole
```
builder.HasKey(a => new { a.UserId, a.RoleId });
```
then this is ideal dto
```
public class DtoSelectedUsersAdmin
{
public string UserName { get; set; }
public string Password { get; set; }
public string Gender { get; set; }
public int Age { get; set; }
public int AppRoleId { get; set; }
public string AppRoleName { get; set; }
public virtual ICollection<AppUserRole> AppRole { get; set; }
public override void CustomMappings(IMappingExpression<AppUser, DtoSelectedUsersAdmin> mapping)
{
.ForMember(a => a.AppRoleName, s => s.MapFrom(q => q.Roles.FirstOrDefault().AppRole.Name))
.ForMember(a => a.AppRoleId, s => s.MapFrom(q => q.Roles.FirstOrDefault().AppRole.Id));
}
}
```
and finally service class to get all users with their role
```
public async Task<List<DtoSelectedUsersAdmin>> GetAllUsersWithRolesAsync()
{
var result = await Users.Select(user => new DtoSelectedUsersAdmin
{
Id = user.Id,
AppRole = user.Roles,
UserName = user.UserName
}).ToListAsync();
return result;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-21T19:19:09.900 | 2023-01-21T19:19:09.900 | null | null | 6,091,269 | null |
75,196,061 | 2 | null | 75,196,004 | 0 | null | You can remove the `ListView`, because you have already wrapped with `SingleChildScrollView`.
You have to either use `ListView` or `SingleChildScrollView` to achieve scroll effect.
| null | CC BY-SA 4.0 | null | 2023-01-21T19:41:33.640 | 2023-01-21T19:41:33.640 | null | null | 15,638,854 | null |
75,196,062 | 2 | null | 75,132,009 | 0 | null | @Ramji, @Dhruvil Patel, I try your code and it work fine, but it was making an overflow when the text was long, so I made some changes in your example and I got what I was looking for.
Thanks a lot for you help.
Here is what I dit.
```
return SizedBox(
width: double.infinity,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Row(
children: [
Expanded( child: Text( text, style: style, maxLines: 2, overflow: TextOverflow.ellipsis, ) ),
],),
Row(
children: [
Expanded(
child: Text(
'.' * 150,
style: style,
maxLines: 1,
overflow: TextOverflow.fade,)),
SizedBox(
width: 80,
child: Text(
'\$ $price',
style: style,
textAlign: TextAlign.right,)),
],
),
// Divider( color: Colors.white.withOpacity( 0.5 ),),
],
),
);
```
[](https://i.stack.imgur.com/4eNno.png)
| null | CC BY-SA 4.0 | null | 2023-01-21T19:41:47.543 | 2023-01-21T19:41:47.543 | null | null | 19,691,300 | null |
75,196,105 | 2 | null | 70,493,974 | 0 | null |
1. First of all update your ORDS by registering it with database
2. update your apex images as well.
| null | CC BY-SA 4.0 | null | 2023-01-21T19:50:29.667 | 2023-01-21T19:50:29.667 | null | null | 21,055,990 | null |
75,196,202 | 2 | null | 75,196,004 | 0 | null | You need to remove fixed height from container `height: MediaQuery.of(context).size.height / 1.9,`. Just use `SingleChildScrollView` on Column and remove ListView widget.
```
return Scaffold(
body: Center(
child: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
color: Color.fromRGBO(217, 217, 217, 1),
borderRadius: BorderRadius.all(Radius.circular(20.0)),
),
padding: EdgeInsets.all(20), //config
width: MediaQuery.of(context).size.width,
child: Form(
// key: _formKey,
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
TextFormField(
// validator: _validateName,
// controller: _nameController,
style: TextStyle(
fontSize: 20,
color: Colors.black,
),
decoration: InputDecoration(
prefixIcon: Icon(
Icons.person,
color: Colors.grey,
),
contentPadding: EdgeInsets.all(20),
filled: true,
fillColor: Colors.white,
hintText: 'Adyňyz',
hintStyle: TextStyle(
fontSize: 20,
color: Colors.grey.shade600,
),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
),
),
SizedBox(height: 20),
TextFormField(
// validator: _validatePassword,
// controller: _passController,
style: TextStyle(
fontSize: 20,
color: Colors.black,
),
// obscureText: _hidePass,
decoration: InputDecoration(
prefixIcon: Icon(
Icons.shield,
color: Colors.grey,
),
// suffixIcon: IconButton(
// color: Colors.black,
// onPressed: () {
// setState(() {
// _hidePass = !_hidePass;
// });
// },
// icon: Icon(
// _hidePass
// ? Icons.visibility
// : Icons.visibility_off,
// )
// ),
contentPadding: EdgeInsets.all(20),
filled: true,
fillColor: Colors.white,
hintText: 'Parol',
hintStyle: TextStyle(
fontSize: 20,
color: Colors.grey.shade600,
),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
),
),
SizedBox(height: 20),
TextFormField(
// controller: _teamNameController,
// validator: _validateTeam,
style: TextStyle(
fontSize: 20,
color: Colors.black,
),
decoration: InputDecoration(
prefixIcon: Icon(Icons.people),
contentPadding: EdgeInsets.all(20),
filled: true,
fillColor: Colors.white,
hintText: 'Toparyň ady',
hintStyle: TextStyle(
fontSize: 20,
color: Colors.grey.shade600,
),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
),
),
SizedBox(height: 20),
TextFormField(
// controller: _phoneNumberController,
// validator: _validatePhoneNumber,
keyboardType: TextInputType.number,
style: TextStyle(
fontSize: 20,
color: Colors.black,
),
decoration: InputDecoration(
helperText: "+993-6#-######",
prefixIcon: Icon(Icons.call, color: Colors.grey),
contentPadding: EdgeInsets.all(20),
filled: true,
fillColor: Colors.white,
hintText: "Telefon nomeriňiz",
hintStyle: TextStyle(
fontSize: 20,
color: Colors.grey.shade600,
),
border: OutlineInputBorder(
borderSide: BorderSide.none,
borderRadius: BorderRadius.all(
Radius.circular(10),
),
),
),
),
SizedBox(height: 20),
SizedBox(
height: 60,
child: ElevatedButton(
onPressed: () {
// _submitButton();
},
child: Text(
"Register",
textAlign: TextAlign.left,
style: TextStyle(
fontSize: 20,
color: Color.fromARGB(255, 255, 255, 255),
),
),
style: ButtonStyle(
shape: MaterialStateProperty.all(
RoundedRectangleBorder(
borderRadius: BorderRadius.circular(10.0),
),
),
backgroundColor:
MaterialStateProperty.all(Colors.black),
),
),
),
],
),
),
),
),
),
);
```
| null | CC BY-SA 4.0 | null | 2023-01-21T20:06:56.230 | 2023-01-21T20:06:56.230 | null | null | 10,157,127 | null |
75,196,250 | 2 | null | 75,196,004 | 0 | null | First of all you already gave height to the container i.e
```
height: MediaQuery.of(context).size.height / 1.9
```
at above code your container height is independent of the form validation and without showing any validation all the fields will show But when validation error occurs then error text will be shown which will takes additional height and here you are using Single child child scroll view but the container height is same as before without error text
So now the easiest way to solve this issue is
Remove container height parameter means don't set its height because container will automatically takes the size as much as its child. Now by doing this the container will automatically shrink when there is no error text and will automatically expand when there is error texts
| null | CC BY-SA 4.0 | null | 2023-01-21T20:13:50.100 | 2023-01-21T20:13:50.100 | null | null | 14,562,817 | null |
75,196,361 | 2 | null | 71,964,934 | 1 | null | According to the section on [Remotely hosted code restrictions](https://developer.chrome.com/docs/extensions/mv3/mv3-migration/#remotely-hosted-code) in the v2 to v3 migration guide:
> refers to any code that is included in an extension's package as a loadable resource. For example, the following are considered remotely hosted code:- - -
You'll have to download a local version of the script and reference that
### Manifest V2 Page
```
<script src="https://unpkg.com/react@18/umd/react.production.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
```
### Manifest V3 Page
```
<script src="./react-dom.production.min.js"></script>
<link href="./bootstrap.min.css" rel="stylesheet">
```
| null | CC BY-SA 4.0 | null | 2023-01-21T20:31:45.303 | 2023-01-21T20:31:45.303 | null | null | 1,366,033 | null |
75,196,514 | 2 | null | 56,455,459 | 0 | null | You can use the [distfit](https://erdogant.github.io/distfit/pages/html/Performance.html) library in Python. It will determine the best theoretical distribution for your data.
| null | CC BY-SA 4.0 | null | 2023-01-21T20:58:02.730 | 2023-01-21T20:58:02.730 | null | null | 13,730,780 | null |
75,196,605 | 2 | null | 41,722,084 | 0 | null | This answer made Playground happy:
```
func gemSwitch() {
moveForward()
collectGem()
moveForward()
toggleSwitch()
moveForward()
}
func forwTurn() {
moveForward()
turnLeft()
}
gemSwitch()
turnLeft()
gemSwitch()
forwTurn()
gemSwitch()
turnLeft()
gemSwitch()
```
| null | CC BY-SA 4.0 | null | 2023-01-21T21:14:29.293 | 2023-01-21T21:14:29.293 | null | null | 21,057,398 | null |
75,196,625 | 2 | null | 69,829,463 | 0 | null | In case this is a current issue for anyone else, "import pandas_ta" didn't work for me. Instead I tried "import ta" and it worked.
| null | CC BY-SA 4.0 | null | 2023-01-21T21:17:57.913 | 2023-01-21T21:17:57.913 | null | null | 21,057,442 | null |
75,196,955 | 2 | null | 75,192,471 | 0 | null | You need to before you can use its packages in PBIDesktop.exe. Simple as that.
| null | CC BY-SA 4.0 | null | 2023-01-21T22:20:44.110 | 2023-01-21T23:07:20.417 | 2023-01-21T23:07:20.417 | 712,558 | 7,108,589 | null |
75,197,291 | 2 | null | 75,197,097 | 0 | null | I believe you are looking for the classic optimization problem [Bin packing](https://en.wikipedia.org/wiki/Bin_packing_problem).
You can use [linear solver approach](https://developers.google.com/optimization/pack/bin_packing) or you can use existing python packages for this exact task, most notably [numberpartitioning](https://github.com/fuglede/numberpartitioning) or a wrapper around it like [binpacking](https://github.com/benmaier/binpacking).
```
$ pip install binpacking
```
```
>>> import binpacking
>>> b = {'A': 3.39, 'B': 0.86, 'C': 0.060000000000002274,
'D': 1.43, 'E': 24.66, 'F': 0.34, 'G': 24.49,
'H': 7.59, 'I': 7.24, 'J': 25.58, 'K': 3.96, 'L': 0.4}
>>> bins = binpacking.to_constant_bin_number(b, 3)
>>> bins
[{'J': 25.58, 'K': 3.96, 'A': 3.39, 'L': 0.4},
{'E': 24.66, 'I': 7.24, 'D': 1.43},
{'G': 24.49, 'H': 7.59, 'B': 0.86, 'F': 0.34, 'C': 0.060000000000002274}]
```
| null | CC BY-SA 4.0 | null | 2023-01-21T23:24:17.570 | 2023-01-21T23:24:17.570 | null | null | 260,229 | null |
75,198,314 | 2 | null | 75,198,277 | 1 | null | Using regular expressions will do the trick.
```
from bs4 import BeautifulSoup as bs4
import re
import requests as req
import json
url = 'https://www.11st.co.kr/products/4976666261?NaPm=ct=ld6p5dso|ci=e5e093b328f0ae7bb7c9b67d5fd75928ea152434|tr=slsbrc|sn=17703|hk=87f5ed3e082f9a3cd79cdd0650afa9612c37d9e8&utm_term=&utm_campaign=%B3%D7%C0%CC%B9%F6pc_%B0%A1%B0%DD%BA%F1%B1%B3%B1%E2%BA%BB&utm_source=%B3%D7%C0%CC%B9%F6_PC_PCS&utm_medium=%B0%A1%B0%DD%BA%F1%B1%B3'
res = req.get(url)
soup = bs4(res.text,'html.parser')
# json_data1=soup.find('body').find_all('script',type='text/javascript')[-4].text.split('\n')[1].split('=')[1].replace(';',"")
# data=json.loads(json_data1)
# print(data)
json_data2=soup.find('body').find_all('script',type='text/javascript')[-4].text.split('\n')
for i in json_data2:
results = re.findall(r'lastPrc : (\d+?),',i)
if results:
print(results)
```
OUTPUT
```
['1310000']
```
The value that you are looking for is no longer there.
[](https://i.stack.imgur.com/QAhov.png)
| null | CC BY-SA 4.0 | null | 2023-01-22T05:15:06.597 | 2023-01-22T08:46:22.087 | 2023-01-22T08:46:22.087 | 17,829,451 | 17,829,451 | null |
75,198,455 | 2 | null | 69,232,223 | 0 | null |
1. Move the cursor on top of a word in your code.
2. Type gb to add another cursor. This puts Vim into Visual mode and ready to operate on the word you have selected.
3. Type gb to continue adding cursors until you’re done.
4. Now you can perform an action in Visual mode (delete, change, etc).
5. Go back to Normal mode with <ESC>
| null | CC BY-SA 4.0 | null | 2023-01-22T05:52:54.690 | 2023-01-22T05:52:54.690 | null | null | 8,587,855 | null |
75,198,814 | 2 | null | 52,302,625 | 0 | null | I came here to find out how to add border to "CupertinoButton". I'll post my finding here. Hope it will help to someone.
Result :
[](https://i.stack.imgur.com/y6LuF.png)
Code:
```
import 'package:flutter/cupertino.dart';
...
CupertinoButton(
minSize: 20,
padding: const EdgeInsets.all(0), // remove button padding
color: CupertinoColors.white.withOpacity(0), // use this to make default color to transparent
child: Container( // wrap the text/widget using container
padding: const EdgeInsets.all(10), // add padding
decoration: BoxDecoration(
border: Border.all(
color: const Color.fromARGB(255, 211, 15, 69),
width: 1,
),
borderRadius: const BorderRadius.all(Radius.circular(10)), // radius as you wish
),
child: Wrap(
children: const [
Icon(CupertinoIcons.videocam_circle_fill, color: CupertinoColors.systemPink,),
Text(" Upload video", style: TextStyle(color: CupertinoColors.systemPink),)
],
),
),
onPressed: () {
// on press action
},
),
```
| null | CC BY-SA 4.0 | null | 2023-01-22T07:24:40.110 | 2023-01-22T07:24:40.110 | null | null | 3,661,220 | null |
75,199,415 | 2 | null | 55,073,985 | 1 | null | ```
txt <- 'Statements {
"{ID=12345;TimeStamp=""2019-02-26 00:15:42"";Event=StatusEvent;Status=""WiLoMonitorStart"";Text=""mnew inactivity failure on cable"";}"
"{ID=12346;TimeStamp=""2019-02-26 00:15:43"";Event=StatusEvent;Status=""MetroCode"";Text=""AU"";}"
"{ID=12347;TimeStamp=""2019-02-26 00:15:43"";Event=StatusEvent;Status=""LoWiValidation"";Text=""Password validation 2.5GHz for AES: BigBong"";}"
"{ID=12349;TimeStamp=""2019-02-26 00:15:42"";Event=DomainEvent;MacAddress=""AB:23:34:EF:YN:OT"";LogTime=""2019-02-26 00:15:48"";Domain=""Willing ind"";SecondaryDomain=""No_Perl"";}"
"{ID=12351;TimeStamp=""2019-02-26 00:15:45"";Event=CollectionCallEvent;SerialNumber=""34121"";}"
"{ID=12352;TimeStamp=""2019-02-26 00:15:46"";Event=CollectionCallEvent;SerialNumber=""34151"";Url=""werlkdfa/vierjwerret/vre34f3/df343rsdf343+t45rf/dfgr3443"";}"
} ' # note need for single quotes
```
Then read in with readLines and remove leading and trailing lines and hten remove {,}, and the double quotes, and finally read with `scan`:
```
RL <- readLines(textConnection(txt))
rl <- RL[-1]
input <- scan(text=gsub('[{}"]',"", rl[1:6]), sep=';', what="")
input[1:12]
#------------------
[1] " ID=12345" "TimeStamp=2019-02-26 00:15:42"
[3] "Event=StatusEvent" "Status=WiLoMonitorStart"
[5] "Text=mnew inactivity failure on cable" ""
[7] " ID=12346" "TimeStamp=2019-02-26 00:15:43"
[9] "Event=StatusEvent" "Status=MetroCode"
[11] "Text=AU" ""
```
Then you can process like any key-value pair input with "ID" being the delimiter. Another way that woud keep the origianl lines together in a list would be:
```
sapply( gsub('[{}"]',"", rl[1:6]), function(x) scan(text=x, sep=";", what=""))
#----------------
Read 6 items
Read 6 items
Read 6 items
Read 8 items
Read 5 items
Read 6 items
$` ID=12345;TimeStamp=2019-02-26 00:15:42;Event=StatusEvent;Status=WiLoMonitorStart;Text=mnew inactivity failure on cable;`
[1] " ID=12345" "TimeStamp=2019-02-26 00:15:42" "Event=StatusEvent"
[4] "Status=WiLoMonitorStart" "Text=mnew inactivity failure on cable" ""
# only printed the result from the first line
```
[Convert url query key-value pairs to data frame](https://stackoverflow.com/questions/46570043/convert-url-query-key-value-pairs-to-data-frame)
| null | CC BY-SA 4.0 | null | 2023-01-22T09:36:51.153 | 2023-01-22T11:11:54.203 | 2023-01-22T11:11:54.203 | 1,855,677 | 1,855,677 | null |
75,199,461 | 2 | null | 75,195,024 | 0 | null | You could split the into one part with and another part without the data from `Hamble`. And then plot the two separately.
That is how I did it below. First is filtered without `Hamble` and the other one contains just the `Hamble` part of the original. (I do not think that `arrange` is needed here.)
`ggplot` is then called with `df_woHamble` (without Hamble). Just after `geom_point` another `geom_point` is called with data coming from `df_Hamble`. This has the effect that the last `geom_point` is plotted on top fo the others.
The same concept is applied to `geom_label_repel`.Here I have in addition to the large font size a red color chosen.
What the dashed lines in is concerned, you just have to place `Linotype` outside of `aes`.
```
library(tidyverse)
library(ggrepel)
library(gghighlight)
library(viridis)
options(ggrepel.max.overlaps = Inf)
## without Hamble
df_woHamble <- df |>
#arrange(desc(PM10.2024)) |>
mutate(Name = factor(Name, Name)) |>
filter(Name != "Hamble")
## with Hamble
df_Hamble <- df |>
#arrange(desc(PM10.2024)) |>
mutate(Name = factor(Name, Name)) |>
filter(Name == "Hamble")
ggplot(df_woHamble, aes(x = PM10.2024, y = PM2.5.2024, size = PM2.5.2024, fill = Classification)) +
geom_point(alpha = 0.6, shape = 21, color = "black") +
geom_point(data = df_Hamble, alpha = 0.6, shape = 21, color = "black") +
scale_size(range = c(10, 40), name = bquote(PM[2.5])) +
geom_text_repel(aes(label = Name), size =3, fontface = 1, family = "Calibri") +
geom_text_repel(data = df_Hamble,
aes(label = Name), size = 5,fontface = 1, color = "red", family = "Calibri") +
scale_y_continuous(limits = c(5, 13)) +
scale_x_continuous(limits = c(5, 20)) +
scale_fill_viridis(discrete = TRUE, guide = FALSE, option = "D") +
theme_ipsum() +
xlab(expression(Concentration ~ PM[10])) +
ylab(expression(Concentration ~ PM[2.5])) +
theme(legend.position = "none") +
theme(axis.text.x = element_text(size = 12, angle = 0, vjust = 0.5, hjust = 1)) +
theme(axis.text.y = element_text(size = 12, angle = 0, vjust = 0.5, hjust = 1)) +
geom_hline(aes(yintercept = 7.9), linetype = "dashed", color = "red", ) +
geom_vline(aes(xintercept = 12.9), colour = "red", linetype = "dashed")
```

| null | CC BY-SA 4.0 | null | 2023-01-22T09:48:23.670 | 2023-01-22T09:48:23.670 | null | null | 4,282,026 | null |
75,199,629 | 2 | null | 74,791,058 | 2 | null | In my case create tailwind.config.js file in the sanity folder and add the code below in that created file
```
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
'./pages/**/*.{js,ts,jsx,tsx}',
'./components/**/*.{js,ts,jsx,tsx}',
'./app/**/*.{js,ts,jsx,tsx}',
],
theme: {
extend: {},
},
plugins: [],
}
```
| null | CC BY-SA 4.0 | null | 2023-01-22T10:17:33.283 | 2023-01-22T10:17:33.283 | null | null | 12,541,301 | null |
75,199,751 | 2 | null | 75,108,533 | 0 | null | This error message is usually caused by the browser's popup blocker preventing the popup window from opening. To work around this issue, you can try disabling the popup blocker in your browser or configuring your browser to allow popups from the localhost domain.
Another solution is to use a different library to create a window for your webview, such as `pywebview` which allows you to create a window with JavaScript disabled. This can help to prevent the browser's security features from blocking the popup window.
You can try to add the following lines of code before creating the window
```
webview.config.use_native_window = False
webview.config.guest_instance_handler = 'xwalk'
```
Also, for the localhost to work, you need to run your application on localhost. You can use any local server like XAMPP or `python -m http.server` command.
You can also try using IP address instead of localhost and see if that works.
| null | CC BY-SA 4.0 | null | 2023-01-22T10:40:30.440 | 2023-01-22T10:40:30.440 | null | null | 3,126,121 | null |
75,199,808 | 2 | null | 75,108,533 | 0 | null | This happened to me before and the reason for me was that the default option for the webview was not allowing popups.
You can add when creating the window, so it allows the webview to open a new window.
```
webview.create_window(title='My Window',
url='http://localhost:81',confirm_close=True, new_instance=True)
```
or another option you can check if your browser blocks popups and allow them if so.
| null | CC BY-SA 4.0 | null | 2023-01-22T10:51:59.153 | 2023-01-22T10:51:59.153 | null | null | 10,956,308 | null |
75,199,840 | 2 | null | 75,199,430 | 0 | null | ```
select distinct
item_id,
item_name,
first_value(item_price) over (partition by item_id order by created_dttm) as item_price,
min(created_dttm) over (partition by item_id ) as valid_from_dt,
max(created_dttm) over (partition by item_id ) as valid_to_dt
from item_prices
;
```
output:
| item_id | item_name | item_price | valid_from_dt | valid_to_dt |
| ------- | --------- | ---------- | ------------- | ----------- |
| 1 | spoon | 10.20 | 2023-01-01 01:00:00 | 2023-03-15 12:00:00 |
| 2 | table | 40.00 | 2023-01-01 01:00:00 | 2023-03-10 15:45:00 |
see: [DBFIDDLE](https://dbfiddle.uk/u4vmHDN6)
| null | CC BY-SA 4.0 | null | 2023-01-22T10:58:37.197 | 2023-01-22T10:58:37.197 | null | null | 724,039 | null |
75,199,873 | 2 | null | 28,609,400 | 0 | null | I used Inkscape To convert a .pdf to .EPS. Just upload the .pdf file to Inkscape, in the options to open chose high mesh, and save as . an EPS file.
| null | CC BY-SA 4.0 | null | 2023-01-22T11:02:07.237 | 2023-01-22T11:02:07.237 | null | null | 21,059,652 | null |
75,199,992 | 2 | null | 23,661,203 | 0 | null | Set your image width to 100% (or less) of the parent container to scale the image to any device size in your CSS file. Example:
```
img {
width: 100%;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-22T11:21:17.607 | 2023-01-22T11:21:17.607 | null | null | 20,840,360 | null |
75,200,104 | 2 | null | 75,159,719 | 0 | null | For me downgrading the django channels package seemed to work.
```
pip uninstall channels
pip install channels==3.0.5
```
| null | CC BY-SA 4.0 | null | 2023-01-22T11:41:12.817 | 2023-01-22T11:41:12.817 | null | null | 9,875,922 | null |
75,200,143 | 2 | null | 75,199,430 | 0 | null | Your query is correct. It's only missing the next step:
- `LEAD`-
```
WITH cte AS (
SELECT item_id, item_name, item_price,
MIN(created_dttm) AS valid_from_dt
FROM item_prices
GROUP BY item_id, item_name, item_price
)
SELECT *,
LEAD(valid_from_dt) OVER(PARTITION BY item_id, item_name) - INTERVAL 1 DAY AS valid_to_dt
FROM cte
```
Check the demo [here](https://www.db-fiddle.com/f/2gdsdNR7c2DUDPy1T3z9N1/0).
| null | CC BY-SA 4.0 | null | 2023-01-22T11:48:07.777 | 2023-01-22T11:48:07.777 | null | null | 12,492,890 | null |
75,200,321 | 2 | null | 75,194,704 | 0 | null | You've got a memory leak here:
```
struct HomeView: View {
@ObservedObject var usersViewModels: UsersViewModel
//MARK: - Init
init() {
self.usersViewModels = UsersViewModel() // here
}
```
View structs must not init objects because the View struct is recreated every state change thus the object is being constantly init.
SwiftUI is all about taking advantage of value semantics, try to use `@State` with value types (or group them in a struct) in the `View` struct for your view data.
Model data structs go in a singleton `ObservableObject` supplied to the Views using `.environmentObject`.
| null | CC BY-SA 4.0 | null | 2023-01-22T12:15:46.293 | 2023-01-22T12:15:46.293 | null | null | 259,521 | null |
75,200,704 | 2 | null | 75,198,429 | 0 | null | I'm configuring the window in a slightly different way, without the need for an `AppDelegate`, but I'm seeing the same thing. With a `backgroundColor` of `.clear`, not only is the rendering artefact apparent, also the window has no border.
Using a `NSColor.white.withAlphaComponent(0.00001)` as the `backgroundColor` eliminates the rendering issue, and also shows the border correctly.
```
struct Mac_SwiftUI_testApp: App {
var body: some Scene {
Window("demo", id: "demo") {
ContentView()
.task {
NSApplication.shared.windows.forEach { window in
guard window.identifier?.rawValue == "demo" else { return }
window.standardWindowButton(.zoomButton)?.isHidden = true
window.standardWindowButton(.closeButton)?.isHidden = true
window.standardWindowButton(.miniaturizeButton)?.isHidden = true
window.backgroundColor = NSColor.white.withAlphaComponent(0.00001)
window.isOpaque = false
window.level = .floating
}
}
}
.windowStyle(.hiddenTitleBar)
}
}
```
`backgroundColor = .clear`
[](https://i.stack.imgur.com/zhyjY.png)
`backgroundColor = NSColor.white.withAlphaComponent(0.00001)`
[](https://i.stack.imgur.com/ZFdx1.png)
After trying a few things out, I found that setting
```
window.hasShadow = false
```
will fix your problem. It also removes the top "line" on the clear window
| null | CC BY-SA 4.0 | null | 2023-01-22T13:13:29.580 | 2023-01-22T14:33:54.047 | 2023-01-22T14:33:54.047 | 123,632 | 123,632 | null |
75,200,864 | 2 | null | 49,466,033 | 0 | null | I encountered an issue with bounding box coordinates in Angular when using TensorFlow.js and MobileNet-v2 for prediction. The coordinates were based on the resolution of the video frame.
but I was displaying the video on a canvas with a fixed height and width. I resolved the issue by dividing the coordinates by the ratio of the original video resolution to the resolution of the canvas.
```
const x = prediction.bbox[0] / (this.Owidth / 300);
const y = prediction.bbox[1] / (this.Oheight / 300);
const width = prediction.bbox[2] / (this.Owidth / 300);
const height = prediction.bbox[3] / (this.Oheight / 300);
// Draw the bounding box.
ctx.strokeStyle = '#99ff00';
ctx.lineWidth = 2;
ctx.strokeRect(x, y, width, height);
```
- `this.Owidth & this.Oheight`
```
this.video.addEventListener(
'loadedmetadata',
(e: any) => {
this.Owidth = this.video.videoWidth;
this.Oheight = this.video.videoHeight;
console.log(this.Owidth, this.Oheight, ' pixels ');
},
false
);
```
- `300 X 300`
| null | CC BY-SA 4.0 | null | 2023-01-22T13:38:43.287 | 2023-01-22T13:38:43.287 | null | null | 15,024,355 | null |
75,200,841 | 2 | null | 55,073,985 | 0 | null | Here's a `tidyverse` solution:
```
library(tidyverse)
data.frame(txt) %>%
# tidy strings:
mutate(txt = trimws(gsub("Statements|\\s{2,}|[^\\w=; -]", "", txt, perl = TRUE))) %>%
# separate into rows by splitting on ";":
separate_rows(txt, sep = ";") %>%
# separate into two columns by splitting on "=":
separate(txt, into = c("header", "value"), sep = "=") %>%
na.omit() %>%
group_by(header) %>%
# create grouped row ID:
mutate(rowid = row_number()) %>%
ungroup() %>%
# cast wider:
pivot_wider(rowid,
names_from = "header",
values_from = "value")
# A tibble: 6 × 12
rowid ID TimeStamp Event Status Text MacAd…¹ LogTime Domain Secon…² Seria…³ Url
<int> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr>
1 1 12345 2019-02-26 001542 StatusEvent WiLoM… mnew… AB2334… 2019-0… Willi… No_Perl 34121 werl…
2 2 12346 2019-02-26 001543 StatusEvent Metro… AU NA NA NA NA 34151 NA
3 3 12347 2019-02-26 001543 StatusEvent LoWiV… Pass… NA NA NA NA NA NA
4 4 12349 2019-02-26 001542 DomainEvent NA NA NA NA NA NA NA NA
5 5 12351 2019-02-26 001545 CollectionCallEve… NA NA NA NA NA NA NA NA
6 6 12352 2019-02-26 001546 CollectionCallEve… NA NA NA NA NA NA NA NA
# … with abbreviated variable names ¹MacAddress, ²SecondaryDomain, ³SerialNumber
```
Data:
```
txt <- 'Statements {
"{ID=12345;TimeStamp=""2019-02-26 00:15:42"";Event=StatusEvent;Status=""WiLoMonitorStart"";Text=""mnew inactivity failure on cable"";}"
"{ID=12346;TimeStamp=""2019-02-26 00:15:43"";Event=StatusEvent;Status=""MetroCode"";Text=""AU"";}"
"{ID=12347;TimeStamp=""2019-02-26 00:15:43"";Event=StatusEvent;Status=""LoWiValidation"";Text=""Password validation 2.5GHz for AES: BigBong"";}"
"{ID=12349;TimeStamp=""2019-02-26 00:15:42"";Event=DomainEvent;MacAddress=""AB:23:34:EF:YN:OT"";LogTime=""2019-02-26 00:15:48"";Domain=""Willing ind"";SecondaryDomain=""No_Perl"";}"
"{ID=12351;TimeStamp=""2019-02-26 00:15:45"";Event=CollectionCallEvent;SerialNumber=""34121"";}"
"{ID=12352;TimeStamp=""2019-02-26 00:15:46"";Event=CollectionCallEvent;SerialNumber=""34151"";Url=""werlkdfa/vierjwerret/vre34f3/df343rsdf343+t45rf/dfgr3443"";}"
} '
```
| null | CC BY-SA 4.0 | null | 2023-01-22T13:33:47.893 | 2023-01-22T13:33:47.893 | null | null | 8,039,978 | null |
75,200,965 | 2 | null | 75,200,775 | 0 | null | There are multiple problems in the code:
- `maze[(2 * i) - 1][(2 * j) - 1] = 1;``maze[2 * i][2 * j] = 0;``maze[2 * i][2 * j] = 1;`
Since `i` and `j` vary from `0` to `2 * n`, you should just refer to `maze[i][j]`.
- Furthermore, the test `if (2 * 1 == 0 || 2 * j == 0)` probably has a typo and should be changed to```
if (i == 0 || j == 0)
```
- You should output a newline after each row.
| null | CC BY-SA 4.0 | null | 2023-01-22T13:52:54.847 | 2023-01-22T13:52:54.847 | null | null | 4,593,267 | null |
75,200,958 | 2 | null | 75,200,797 | 2 | null | You can make a smaller dataset that just contains the five observations per group (`summary2` below). You can use the original data to make the boxes and the smaller data to make the points.
```
library(dplyr)
library(ggplot2)
v1 <- c(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
v2 <- c(0,0,0,0,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2)
v3 <- c(13,67,89,280,40,1,23,99,32,1,75,280,270,200,196,300,320,277,23,4,1,2,5,89,45,23,11,1,3,23,100,100,100,100,100,200,100,11,6,6,123,100,100,100,100,100,12,86,11,300,75,100,110,19,299,100,100,100,100,100,100,100,100,11,100,120,110,100,100,300,300,250,100,100,100,12,100,100,75,5,10,10,10,10,10)
summary <- data.frame(v1, v2, v3)
summary$v1 <- as.factor(summary$v1)
summary$v2 <- as.factor(summary$v2)
summary2 <- summary %>%
group_by(v1, v2, v3) %>%
filter(1:n() <= 5)
ggplot() +
geom_boxplot(data = summary, aes(x = v1, y = v3, fill = v2), width = 0.5, position = position_dodge(0.75)) +
geom_dotplot(data = summary2, aes(x = v1, y = v3, fill = v2), binaxis = "y", stackdir = "center", binwidth = 3.25,
position = position_dodge(0.75))
```

[reprex package](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2023-01-22T13:51:52.117 | 2023-01-22T13:51:52.117 | null | null | 8,206,434 | null |
75,201,228 | 2 | null | 75,197,553 | 0 | null | There are two cases here, you're either working on a:
1. non-Node project (doesn't have package.json) - delete any unnecessary package.json files from current folder and immediate parent folders.
2. Node.js project (contains package.json file) - Run npm install, or npm install prettier --save-dev (in the terminal at the folder level) if it still doesn't work.
I had the same problem. In my case, I had a useless `package.json` file in the parent folder, which was causing all the issue. I was working on a simple HTML, CSS and JS project.
| null | CC BY-SA 4.0 | null | 2023-01-22T14:29:53.540 | 2023-01-22T14:44:33.447 | 2023-01-22T14:44:33.447 | 11,392,807 | 11,392,807 | null |
75,201,287 | 2 | null | 75,200,797 | 1 | null | One option is to find out where the counts are going to be high, then add some random noise to just those counts. If you do this in just the data passed to the layer with the points, it will not affect the box plots.
```
library(dplyr)
ggplot(summary, aes(x = v1, y = v3, fill = v2)) +
geom_boxplot(width = 0.5, position = position_dodge(0.75)) +
geom_dotplot(
data = . %>% group_by_all() %>%
mutate(v3 = if(n() > 6) v3 + runif(n(), -5, 5) else v3),
binaxis = "y",
stackdir = "center",
binwidth = 3.25,
position = position_dodge(0.75),
dotsize = 1.2
)
```
[](https://i.stack.imgur.com/9IZSq.png)
Another option to use `geom_beeswarm` rather than `geom_dotplot` using the same approach with the data:
```
library(ggbeeswarm)
ggplot(summary, aes(x = v1, y = v3, fill = v2)) +
geom_boxplot(width = 0.5, position = position_dodge(0.75)) +
geom_beeswarm(data = . %>% group_by_all() %>%
mutate(v3 = if(n() > 6) v3 + runif(n(), -5, 5) else v3),
shape = 21, dodge.width = 0.75, priority = 'density')
```
[](https://i.stack.imgur.com/nw5SE.png)
| null | CC BY-SA 4.0 | null | 2023-01-22T14:36:53.737 | 2023-01-22T14:44:55.333 | 2023-01-22T14:44:55.333 | 12,500,315 | 12,500,315 | null |
75,201,312 | 2 | null | 75,201,027 | 0 | null | um i actually found the file now so its all good:) if anyone in the future have the same problem just go to "~/Library/Application Support/Code/User/" (macos) and delete the settings.json and then just restart the visual studio code app and its all good
| null | CC BY-SA 4.0 | null | 2023-01-22T14:41:48.877 | 2023-01-22T14:41:48.877 | null | null | 21,060,312 | null |
75,201,422 | 2 | null | 75,197,368 | 0 | null |
#### Vectorisation
It is important to understand the vectorised nature of R and that you will almost never need a `for` loop.
What is a vector? For example, the column `hgt` in your data is essentially a vector. A variable named `hgt` containing multiple values.
lets recreate an example vector (a variable named x containig multiple values)
```
x <- c(1, 2, 3, 4, 5)
```
Many operations in R are vectorised. This means, they are carried out on each element of the vector simultaneously and there is no need to go through each element one at a time.
Here is an example:
```
x + 1
# 2 3 4 5 6
```
As a result, we get another vector, where the operation `+ 1` was carried out on each element of the original vector.
Therefore, you will not need a `for` loop.
Just replace the `+ 1` operation with the appropriate operation for your problem.
What you are looking for is:
- `hgt``> 15`
The operation "condition check" is done in R via logical operators such as `>` `==` or `<` or `<=` or `>=` or `!=` .
Lets find out the values in x that are `> 3`.
```
x > 3
# FALSE FALSE FALSE TRUE TRUE
```
What we get is yet another vector that contains the result of the condition check for each element of `x`.
Now there is one other concept that is missing. How to extract certain values from a vector.
This is done via the index operator `[ ]`.
For example, if I wanted to extract values that are bigger than 3, I would write `x[x > 3]`. Read this in your mind as "Give me the values of x where x is bigger than 3".
#### Sampling Distribution
I want to point out that you are missing an important step that your teacher is wanting you to do. It is to repeat the sampling process + calculation of the demanded statistic for each sample 1000 times, in order to get to a sampling distribution [check this out for a real life hands on example why this should even be important](https://moderndive.com/7-sampling.html).
(Remember that I told you to use a `for` loop. Maybe it is appropriate to use one to run the same function 1000 times.)
| null | CC BY-SA 4.0 | null | 2023-01-22T14:58:47.103 | 2023-01-22T14:58:47.103 | null | null | 19,487,551 | null |
75,201,518 | 2 | null | 75,201,290 | 1 | null | I don't think there's an easy way to do this directly within ggplot. The rectangular grobs and annotations don't seem to accept infinite limits with a polar transformation, and any finite limits will result in a circular highlight area being drawn. You cannot pass multiple `element_rect` in `theme` to style multiple panels either.
This leaves two broad options:
1. Generate the plots separately and draw them together on a single page
2. Take the graphical output of your plot and change the appropriate grob to a rectGrob with the appropriate fill color.
One neat way to achieve the first option without repeating yourself is to use `dplyr::group_map` and `patchwork::wrap_plots`:
```
library(tidyverse)
a %>%
group_by(cat) %>%
group_map(.keep = TRUE,
~ ggplot(.x, aes("", pct, fill = action)) +
geom_bar(stat = "identity", position = "fill")+
coord_polar(theta = "y", start = 0) +
ggthemes::theme_solid() +
guides(fill = "none") +
theme(panel.background = element_rect(
fill = if(all(.x$cat == 'All')) '#FF000032' else NA))) %>%
patchwork::wrap_plots()
```
[](https://i.stack.imgur.com/UBOZB.png)
The other option, if for some reason you to use facets, is some form of grob hacking like this:
```
p <- a %>%
ggplot(aes("", pct, fill = action)) +
geom_bar(stat = "identity", position = "fill") +
coord_polar(theta = "y", start = 0) +
facet_wrap(~cat) +
ggthemes::theme_solid() +
guides(fill = "none")
pg <- ggplotGrob(p)
new_background <- grid::rectGrob(gp = grid::gpar(fill = '#FF000032', col = NA))
panel1 <- pg$grobs[[which(pg$layout$name == 'panel-1-1')]]
panel1$children <- panel1$children
background <- grep('rect', sapply(panel1$children[[1]], names)$children)
panel1$children[[1]]$children[[background]] <- new_background
pg$grobs[[which(pg$layout$name == 'panel-1-1')]] <- panel1
grid::grid.newpage()
grid::grid.draw(pg)
```
[](https://i.stack.imgur.com/aOGaz.png)
| null | CC BY-SA 4.0 | null | 2023-01-22T15:13:25.413 | 2023-01-22T15:57:22.293 | 2023-01-22T15:57:22.293 | 12,500,315 | 12,500,315 | null |
75,201,603 | 2 | null | 72,584,763 | 0 | null | For me, the solution was to explicitly set the gesture's `coordinateSpace` to `.global`:
```
DragGesture(coordinateSpace: .global)
.onChanged { ... }
```
| null | CC BY-SA 4.0 | null | 2023-01-22T15:27:03.490 | 2023-01-22T15:27:03.490 | null | null | 4,577,897 | null |
75,201,666 | 2 | null | 38,504,078 | 0 | null | I solved that by using the following:
```
{
"to": "dllBLnfORt6Bnc3hg:APA91bGz7reSbPs-vlgy9fX-gkGRZ5zdUfFB0k9b2UwvYFuEeHwyGywtpjWOQJcxGBq4bb32Uctbh2aR2SDdA8NWRjC6posTUq8WUCHFN_knRDvEfZhkSxsSgI1rbQTfYbUpuKq1kSH_",
"notification": {
"body": "Queen's Platinum Jubilee award recipients honoured",
"OrganizationId": "2",
"content_available": true,
"priority": "high",
"subtitle": "Elementary School",
"title": "Platinum price incresed!",
"image": "https://www.thenaturalsapphirecompany.com/education/wp-content/uploads/2017/12/pyrite-pyrites-mineral-sulfide-56030.jpeg"
},
"data": {
"priority": "high",
"sound": "app_sound.wav",
"content_available": true,
"bodyText": "xxxxxxxxxxxxx",
"organization": "Catalytic Price",
"type" : "asasf"
}
}
```
Add `image` key under `notification`
for more details please follow the following url:
[https://firebase.google.com/docs/cloud-messaging/android/send-image#rest](https://firebase.google.com/docs/cloud-messaging/android/send-image#rest)
| null | CC BY-SA 4.0 | null | 2023-01-22T15:35:38.770 | 2023-01-22T15:35:38.770 | null | null | 8,370,334 | null |
75,202,077 | 2 | null | 75,202,004 | 1 | null | You have to put `double arctan1 = (Math.pow(-1, k) * (Math.pow(x, 2 * k + 1) / (2 * k + 1)));` in the loop as well since that is what the Σ is doing in the formula.
You also didn't need to have a new variable `i` in the for loop in this case. Using `k` like the formula is fine.
So it would be like this instead:
```
public class arctan {
public static double arctan(double x) {
double sum = 0;
for (int k = 0; k < 100; i++) {
sum += (Math.pow(-1, k) * (Math.pow(x, 2 * k + 1) / (2 * k + 1)));
}
return sum;
}
}
```
| null | CC BY-SA 4.0 | null | 2023-01-22T16:32:47.577 | 2023-01-22T16:38:41.617 | 2023-01-22T16:38:41.617 | 16,683,394 | 16,683,394 | null |
75,202,180 | 2 | null | 75,201,943 | 0 | null | To add an object to an array that already contains objects in Firestore without rewriting the entire array, you can use the arrayUnion() or arrayRemove() method.
Here is an example of using arrayUnion() to add an object to an array:
```
// Add a new object to the 'items' array
firestore.collection("collectionName").doc("docId").update({
items: firebase.firestore.FieldValue.arrayUnion({ name: "itemName",
quantity: 2 })
});
```
| null | CC BY-SA 4.0 | null | 2023-01-22T16:46:38.003 | 2023-01-22T16:46:38.003 | null | null | 20,011,423 | null |
75,202,237 | 2 | null | 75,202,004 | 1 | null |
### What does the letter Σ (sum over) mean?
See Wikipedia about the mathematical sum-symbol (uppercase sigma in Greek alphabet): [Σ](https://en.wiktionary.org/wiki/%CE%A3).
In you case it is the sum over a range from `k = 0` until `k = infinite`.
The sum of the the sigma.
### Define it as function instead variable
The is implemented correctly by:
`double arctan1 = (Math.pow(-1, k) * (Math.pow(x, 2 * k + 1) / (2 * k + 1)));`
Extract it as function of `k` and `x`:
```
public static double arctan1(int k, double x) {
return ( Math.pow(-1, k) * (Math.pow(x, 2 * k + 1) / (2 * k + 1) ));
}
```
Because the calculation is depending on inputs `k` and `x` now, you can use it in your sum-over range of k:
```
// Note: the limit is 99 here, not infinite
for (int k = 0; k < 100; k++) {
sum += arctan1( k,x ); // increasing k used as input
}
```
### Put it all together
```
// your "term following the sum-over" implemented by function arctan1(int k, double x)
public static double arctan(double x) {
double sum = 0;
// your loop to sum-up for increasing k
return sum;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-22T16:56:24.593 | 2023-01-22T17:07:06.570 | 2023-01-22T17:07:06.570 | 5,730,279 | 5,730,279 | null |
75,202,291 | 2 | null | 75,067,190 | 0 | null | in new version of sdk this is so easy
you must go to your Text >> Textstyle >> fontVariations
then you apply the changes
```
Text("سپه سالار ایران زمین", style : TextStyle(fontFamily :
"IRANYeaknXVF" ,
fontSize : 18.0,
fontVariations: const <FontVariation>[
FontVariation("dots", 1), // Set any dot you want
FontVariation("wght", 500), // Set any weight you want
],
)
)
```
in you should import it like this :
```
- family: IRANYekanXVF
fonts:
- asset: assets/fonts/iranYekanX/IRANYekanXVF.ttf
```
| null | CC BY-SA 4.0 | null | 2023-01-22T17:03:30.683 | 2023-01-23T15:06:11.843 | 2023-01-23T15:06:11.843 | 15,388,475 | 15,388,475 | null |
75,202,401 | 2 | null | 58,804,416 | 0 | null | In ReactJS, you can use the built-in dangerouslySetInnerHTML prop on a JSX element to set the inner HTML to a string that contains potentially unsafe content. This should be used with caution, as it can open your application up to cross-site scripting (XSS) attacks if the content is not properly sanitized.
You can you library to sanitize the htmlString.
```
import DOMPurify from 'dompurify';
const htmlString = '<p>This is some <strong>unsafe</strong> HTML.</p>';
const cleanedHTML = DOMPurify.sanitize(htmlString);
return <div dangerouslySetInnerHTML={{ __html: cleanedHTML }} />
```
Thnx :)
| null | CC BY-SA 4.0 | null | 2023-01-22T17:18:11.290 | 2023-01-22T17:18:11.290 | null | null | 4,248,767 | null |
75,202,652 | 2 | null | 19,115,223 | 0 | null | version
For those who want to :
I made some improvements to use it directly with a Javascript/Typescript function, enjoy !!! :)
```
static getStaticStyleParams(gmapJson: Record<string, any>[]) {
function isColor(value: string) {
return /^#[0-9a-f]{6}$/i.test(value.toString());
}
function toColor(value: string) {
return `0x${value.slice(1)}`;
}
function parse() {
const currentItems: string[] = [];
const separator = '|';
currentItems.length = 0;
for (let i = 0; i < gmapJson.length; i++) {
const item = gmapJson[i];
const hasFeature = Object.prototype.hasOwnProperty.call(item, 'featureType');
const hasElement = Object.prototype.hasOwnProperty.call(item, 'elementType');
const stylers = item.stylers;
let target = '';
let style = '';
if (!hasFeature && !hasElement) {
target = 'feature:all';
} else {
if (hasFeature) {
target = `feature:${item.featureType}`;
}
if (hasElement) {
target = target ? target + separator : '';
target += `element:${item.elementType}`;
}
}
for (let s = 0; s < stylers.length; s++) {
const styleItem = stylers[s],
key = Object.keys(styleItem)[0]; // there is only one per element
style = style ? style + separator : '';
style += `${key}:${isColor(styleItem[key]) ? toColor(styleItem[key]) : styleItem[key]}`;
}
currentItems.push(target + separator + style);
}
return currentItems;
}
return `&style=${parse().join('&style=')}`;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-22T17:54:51.867 | 2023-01-22T17:54:51.867 | null | null | 6,261,968 | null |
75,202,934 | 2 | null | 75,202,617 | 0 | null | Currently your negative lookahead only prevents matching the last character of the line, because if it's not matched then the match isn't followed by a linefeed and a number dash number anymore.
You can fix that by matching the lookahead before the content you want to capture :
```
(?<=\d+.\d+.\d+ \d+:\d+[\r\n]+)(?!.*[\r\n](\d+)?-(\d+)?)([ a-zA-ZäöüÄÖÜßé0-9'-]{3,})+
```
You can [test it here](https://regex101.com/r/CVpxqA/1).
| null | CC BY-SA 4.0 | null | 2023-01-22T18:37:24.290 | 2023-01-22T18:37:24.290 | null | null | 1,678,362 | null |
75,203,311 | 2 | null | 75,202,495 | 0 | null | I suppose that the required transformation just can't be in a straightforward way done using Pandas functions because the source data structure does not fit well into the concept of a Pandas DataFrame and in addition to this it also does not contain the information about the required column names and columns the target DataFrame is expected to have along with the number of necessary duplicates of rows.
See the Python code illustrating the problem by providing dictionaries for the data tables:
```
import pandas as pd
pd_json_dict_src = {
'Date':'2023-01-01',
'Time':'14:00',
'A':{
'Intro':[
{'FIB':'1.00'},
{'DIB':'2.00'} ] },
'B':{
'Intro':[
{'FIB':'3.00'},
{'DIB':'4.00'} ] }
}
df_src = pd.DataFrame.from_dict(pd_json_dict_src)
print(df_src)
# -----------------------------------------------
pd_json_dict_tgt = {
'Date':['2023-01-01','2023-01-01'],
'Time':['14:00','14:00'],
'Area':['A','B'],
'Tech':['Intro','Intro'],
'FIB' :['1.00','3.00'],
'DIB' :['2.00','4.00']
}
df_tgt = pd.DataFrame.from_dict(pd_json_dict_tgt)
print(df_tgt)
```
prints
```
Date ... B
Intro 2023-01-01 ... [{'FIB': '3.00'}, {'DIB': '4.00'}]
[1 rows x 4 columns]
Date Time Area Tech FIB DIB
0 2023-01-01 14:00 A Intro 1.00 2.00
1 2023-01-01 14:00 B Intro 3.00 4.00
```
I don't also see any easy to code automated way able to transform the by the dictionary defined source data structure into the data structure of the target dictionary.
In other words it seems that there is no straightforward and easy to code general way of flattening column-wise deep nested data structures especially when choosing Python Pandas as a tool for such flattening. At least as long as there is no other answer here proving me and this statement wrong.
| null | CC BY-SA 4.0 | null | 2023-01-22T19:33:52.137 | 2023-01-22T19:42:53.937 | 2023-01-22T19:42:53.937 | 7,711,283 | 7,711,283 | null |
75,204,114 | 2 | null | 75,188,601 | 0 | null | The problem was described against the iframe, it has to be handled in a similar way in order to access the elements
```
cy.enter('iframe[data-testid="iframe-content"]').then((getBody) => {
getBody().find('[data-test-id="create-user-button"]').click();
```
please note that name `shell-content` could be different to what was name in your project.
| null | CC BY-SA 4.0 | null | 2023-01-22T21:39:59.407 | 2023-01-22T21:39:59.407 | null | null | 7,067,519 | null |
75,204,444 | 2 | null | 21,757,179 | 0 | null | Spring mvc IS NOT COMPATIBLE with Tomcat 10. This is because Tomcat 10 is based on Jakarta EE 9 where package names for APIs have changed from javax.* to jakarta.*
[https://jar-download.com/artifacts/jakarta.servlet/jakarta.servlet-api/4.0.2/source-code](https://jar-download.com/artifacts/jakarta.servlet/jakarta.servlet-api/4.0.2/source-code)
the solution that is not recommended is to use, is to use tomcat9 (to lower version)
but what i recommend is to install the and go to your project -> right click -> propreties -> java build path - click on classpath -> add external jars and add jakarta.servlet-api-4.0.2.jar to class path then just go create servlet and select existing, browse and you will see all other classes
| null | CC BY-SA 4.0 | null | 2023-01-22T22:45:53.863 | 2023-01-23T07:53:01.930 | 2023-01-23T07:53:01.930 | 2,227,743 | 15,212,573 | null |
75,204,998 | 2 | null | 74,889,919 | 0 | null | I had the exact same problem with XCode 14.2 and adding iPhone XR, I went to the Project Navigator pane, selected the top line and on the right side window the Project settings appear. I went to the Minimum Deployments section and selected the lowest IOS version I was working with. In my case I had downloaded and installed iOS 15.5. After that, the IOS simulator list updated with all the simulators Listed in the Devices and Simulators where the "Show as Run Destination" was selected for a given simulator.
Hope this helps...
[](https://i.stack.imgur.com/nqK1w.png)
| null | CC BY-SA 4.0 | null | 2023-01-23T01:11:24.740 | 2023-01-23T01:11:24.740 | null | null | 20,344,059 | null |
75,205,417 | 2 | null | 75,204,457 | 0 | null | It appears that you have the `dotnet-core-uninstall` tool in a directory named 'dotnet-core-uninstall' and that the directory is not in the PATH.
To run an executable that is not in the PATH but is in the current directory, you need to be explicit about the location of the executable and use `./`, e.g `./dotnet-core-uninstall`.
The following is correct:
```
./dotnet-core-uninstall -h
```
As you show in your screenshot, this command works and displays the help. The help shows that the usage of the command is:
dotnet-core-uninstall [options] [command]
You can't use an option for the command without the command, e.g. `--help` should be `./dotnet-core-uninstall --help`.
The command to list should be:
```
./dotnet-core-uninstall list
```
The command to get help on dry-run is:
```
./dotnet-core-uninstall dry-run --help
```
Dry runs for 7.0 for SDK and runtimes are the following commands:
```
./dotnet-core-uninstall dry-run --major-minor 7.0 --sdk
```
```
./dotnet-core-uninstall dry-run --major-minor 7.0 --runtime
```
If the dry runs look correct, change `dry-run` to `remove` and use `sudo` to run as admin.
```
sudo ./dotnet-core-uninstall remove --major-minor 7.0 --sdk
```
| null | CC BY-SA 4.0 | null | 2023-01-23T03:15:56.177 | 2023-01-23T03:15:56.177 | null | null | 4,208,174 | null |
75,205,482 | 2 | null | 75,204,568 | 0 | null | In constraint Layout
you can add constraints to your female RadioButton
app:layout_constraintBaseline_toBaselineOf="@id/male"
app:layout_constraintStart_toEndOf="@id/male"
or by right click on the Female RadioButton, then show baseline, it will show you a bar inside the radio button drag to the baseline of the male RadioButton
then constrain the start to the end male RadioButton
| null | CC BY-SA 4.0 | null | 2023-01-23T03:34:50.350 | 2023-01-23T03:34:50.350 | null | null | 11,604,994 | null |
75,205,504 | 2 | null | 75,204,614 | 1 | null | I think the error is already in res.pca because your 'identifier' variable is of type character. Take those out (guess: PCA(clin.oc[,2:14], …).
| null | CC BY-SA 4.0 | null | 2023-01-23T03:41:19.993 | 2023-01-23T03:41:19.993 | null | null | 12,204,202 | null |
75,205,592 | 2 | null | 75,205,197 | 0 | null | I solved your problem using autofocus.. Below the code..
```
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:rezar_app/views/bin/home_view.dart';
import 'package:rezar_app/views/homeViewFlow/home_view.dart';
class BinFile extends StatefulWidget {
const BinFile({super.key});
@override
State<BinFile> createState() => _BinFileState();
}
class _BinFileState extends State<BinFile> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Login View')),
body: Column(
children: [
CustomTextFormField(
labelText: 'Email',
hintText: 'Enter Mail',
readOnly: false,
autofocus: true),
CustomTextFormField(
labelText: 'Password',
hintText: 'Enter Password',
readOnly: false),
SizedBox(
height: 10,
),
SizedBox(
height: 10,
),
ElevatedButton(
onPressed: () {
Get.to(() => HomeNewScreen());
},
child: Text('Next Page'))
],
),
);
}
}
class CustomTextFormField extends StatelessWidget {
const CustomTextFormField({
this.focusNode,
this.textFormFieldKey,
this.controller,
this.validator,
this.icon,
required this.labelText,
required this.hintText,
this.suffixIcon,
this.obscureText,
this.keyboardType,
this.textInputAction,
required this.readOnly,
this.maxLines,
this.onEditingComplete,
this.enabled,
this.onChanged,
this.onFieldSubmitted,
this.onSaved,
this.onTap,
this.initialValue,
this.autofocus,
super.key,
});
final FocusNode? focusNode;
final Key? textFormFieldKey;
final TextEditingController? controller;
final String? Function(String?)? validator;
final IconData? icon;
final String labelText;
final String hintText;
final Widget? suffixIcon;
final bool? obscureText;
final TextInputType? keyboardType;
final TextInputAction? textInputAction;
final bool readOnly;
final int? maxLines;
final VoidCallback? onEditingComplete;
final bool? enabled;
final Function(String)? onChanged;
final Function(String)? onFieldSubmitted;
final Function(String?)? onSaved;
final VoidCallback? onTap;
final String? initialValue;
final bool? autofocus;
@override
Widget build(BuildContext context) => Theme(
data: ThemeData().copyWith(
colorScheme: ThemeData()
.colorScheme
.copyWith(primary: Colors.black.withOpacity(0.5))),
child: TextFormField(
autofocus: autofocus ?? false,
focusNode: focusNode,
key: textFormFieldKey,
controller: controller,
validator: validator,
style: const TextStyle(color: Colors.black),
textAlignVertical: TextAlignVertical.top,
initialValue: initialValue,
decoration: InputDecoration(
alignLabelWithHint: true,
floatingLabelAlignment: FloatingLabelAlignment.start,
prefixIcon: icon == null ? null : Icon(icon, color: Colors.black),
labelText: labelText,
labelStyle: const TextStyle(color: Colors.black),
hintText: hintText,
hintStyle: const TextStyle(color: Colors.black),
border: const OutlineInputBorder(),
focusedBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black, width: 1.0)),
enabledBorder: const OutlineInputBorder(
borderSide: BorderSide(color: Colors.black, width: 1.0)),
suffixIcon: suffixIcon,
filled: true,
fillColor: Colors.white,
),
autocorrect: false,
obscureText: obscureText == null ? false : obscureText!,
keyboardType: keyboardType,
textInputAction: textInputAction,
readOnly: readOnly,
maxLines: maxLines,
onEditingComplete: onEditingComplete,
enabled: enabled,
onChanged: onChanged,
onFieldSubmitted: onFieldSubmitted,
onSaved: onSaved,
onTap: onTap,
),
);
}
```
Second Screen below the code
```
import 'package:flutter/material.dart';
class HomeNewScreen extends StatefulWidget {
const HomeNewScreen({super.key});
@override
State<HomeNewScreen> createState() => _HomeNewScreenState();
}
class _HomeNewScreenState extends State<HomeNewScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(child: Text('Home Screen')),
);
}
}
```
| null | CC BY-SA 4.0 | null | 2023-01-23T04:06:57.847 | 2023-01-23T04:06:57.847 | null | null | 19,726,949 | null |
75,205,668 | 2 | null | 75,205,494 | 0 | null | let suppose you have struct that use to populate tableview
```
struct User {
let name:String
let headerImage:UIImage? // an optional image
}
```
your controller
```
class ViewController:UIViewController {
var users = [User]()
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return users.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if let image = users[indexPath.row].image {
let cell = tableView.dequeueReusableCell(withIdentifier: "UserHeaderCell", for: indexPath) as! UserHeaderCell
return cell
} else {
let cell = tableView.dequeueReusableCell(withIdentifier: "UserSimpleCell", for: indexPath) as! UserSimpleCell
return cell
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if let image = users[indexPath.row].image {
return 100 // with image
}
return 50 // without image
}
}
```
make two cell one for header image and one for simple
```
class UserHeaderCell:UITableViewCell {
}
class UserSimpleCell:UITableViewCell {
}
```
| null | CC BY-SA 4.0 | null | 2023-01-23T04:25:08.463 | 2023-01-23T04:25:08.463 | null | null | 14,260,241 | null |
75,205,675 | 2 | null | 18,711,468 | 0 | null | Objective-c answer of Varun Naharia solution.
```
@property (strong, nonatomic) IBOutletCollection(UITextField) NSArray *otpTextFields;
- (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string
{
if(textField.text.length < 1 && string.length > 0) {
for(int i=0; i<self.otpTextFields.count-1; i++) {
if(textField == self.otpTextFields[i]) {
UITextField* nextTextField = (UITextField*) self.otpTextFields[i+1];
[nextTextField becomeFirstResponder];
}
}
textField.text = string;
return NO;
} else if (textField.text.length >= 1 && string.length == 0) {
for(int i=(int) self.otpTextFields.count-1;i>=1;i--) {
if(textField == self.otpTextFields[i]) {
UITextField* nextTextField = (UITextField*) self.otpTextFields[i-1];
[nextTextField becomeFirstResponder];
}
}
textField.text = @"";
return NO;
} else if(textField.text.length >= 1){
textField.text = string;
return NO;
}
return YES;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-23T04:26:15.950 | 2023-01-23T04:26:15.950 | null | null | 14,206,959 | null |
75,205,866 | 2 | null | 75,191,667 | 0 | null | ADF allows you to write the query in [google bigquery source dataset](https://learn.microsoft.com/en-us/azure/data-factory/connector-google-bigquery?tabs=data-factory#googlebigquerysource-as-a-source-type). Therefore write the query to unnest the nested columns using [unnest operator](https://cloud.google.com/bigquery/docs/reference/standard-sql/query-syntax#unnest_operator) and then map it to the sink.
I tried to repro this with sample nested table.

img:1 nested table

img:2 sample data of nested table
```
select
user_id,
a.post_id,
a.creation_date
from `ds1.stackoverflow_nested`
cross join unnest(comments) a
```

img:3 flattened table.
- -
Reference:
1. MS document on google bigquery as a source - ADF
2. GC document on unnest operator
| null | CC BY-SA 4.0 | null | 2023-01-23T05:17:56.383 | 2023-01-23T11:17:25.190 | 2023-01-23T11:17:25.190 | 19,986,107 | 19,986,107 | null |
75,205,997 | 2 | null | 21,435,753 | 0 | null | Try below code.
```
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
getWindow().getDecorView().setSystemUiVisibility(
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
| View.SYSTEM_UI_FLAG_FULLSCREEN
| View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY);
}
}
```
| null | CC BY-SA 4.0 | null | 2023-01-23T05:44:56.553 | 2023-01-23T05:44:56.553 | null | null | 14,208,424 | 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.