Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74,125,331 | 2 | null | 74,125,222 | 0 | null | It seems to me that you are clearing all instances of the forms when this event is fired. Instead of clearing all instances, hide the form using the .Hide() method on your form control. Then call the .Show() method to display the form again.
MS .Hide docs:
[https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.hide?view=windowsdesktop-6.0](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.hide?view=windowsdesktop-6.0)
MS .Show docs:
[https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.show?view=windowsdesktop-6.0#system-windows-forms-control-show](https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.control.show?view=windowsdesktop-6.0#system-windows-forms-control-show)
| null | CC BY-SA 4.0 | null | 2022-10-19T12:28:02.807 | 2022-10-19T12:28:02.807 | null | null | 8,559,424 | null |
74,126,034 | 2 | null | 74,125,516 | 0 | null | Found a solution but not sure if that is the correct way.
- [https://github.com/microsoft/vscode-codicons](https://github.com/microsoft/vscode-codicons)`npm i @vscode/codicons`- `./node_modules/@vscode/codicons/src/icons``./src/icons`- `dark``light`- `package.json`
```
"icon": {
"dark": "./src/icons/dark/account.svg",
"light": "./src/icons/light/account.svg"
}
```
- `.svg``./icons/dark/account.svg``./icons/light/account.svg`
```
<svg
width="16"
height="16"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
fill="#478af5"> ...
```
```
<svg
width="16"
height="16"
viewBox="0 0 16 16"
xmlns="http://www.w3.org/2000/svg"
fill="#1f2b40"> ...
```
#### Note on color changes for Icons
If you change the color of an icon afterwards, change the name of the used icon in the `package.json` to any other value, package your Extension, change it back to the origin icon name and package again. Otherwise the color changes will not take place in VSCode. Seems it will be cached.
| null | CC BY-SA 4.0 | null | 2022-10-19T13:16:22.060 | 2022-10-19T13:17:46.397 | 2022-10-19T13:17:46.397 | null | null | null |
74,126,910 | 2 | null | 58,937,461 | 0 | null |
1. Control Panel->Credential Manager (search, depends on your version of windows)
2. Windows Crentials
3. Add a generic credential
4. git:http://yourbonoboserver.info
5. user and password credentials to connect to your server
[https://community.atlassian.com/t5/Sourcetree-questions/In-V-2-x-Where-does-source-tree-store-the-accounts-saved/qaq-p/593158#:~:text=1%20answer&text=The%20credentials%20are%20stored%20in,Windows%20which%20SourceTree%20interacts%20with](https://community.atlassian.com/t5/Sourcetree-questions/In-V-2-x-Where-does-source-tree-store-the-accounts-saved/qaq-p/593158#:%7E:text=1%20answer&text=The%20credentials%20are%20stored%20in,Windows%20which%20SourceTree%20interacts%20with).
| null | CC BY-SA 4.0 | null | 2022-10-19T14:13:08.310 | 2022-10-19T14:13:08.310 | null | null | 6,110,450 | null |
74,127,030 | 2 | null | 27,014,901 | 1 | null | For Linux this should clear them for all devices in one go if your issue is just .lock files
```
find $HOME/.android -type f -name '*.lock' -exec rm {} \;
```
Example with it just echoing out.
```
❯ find $HOME/.android -type f -name '*.lock' -exec echo rm {} \;
rm /home/mike/.android/build-cache.lock
rm /home/mike/.android/debug.keystore.lock
rm /home/mike/.android/avd/Pixel_6_Pro_API_33.avd/multiinstance.lock
rm /home/mike/.android/avd/Pixel_6_Pro_API_33.avd/hardware-qemu.ini.lock
rm /home/mike/.android/avd/Pixel_6_Pro_API_30.avd/multiinstance.lock
rm /home/mike/.android/avd/Pixel_6_Pro_API_30.avd/hardware-qemu.ini.lock
rm /home/mike/.android/build-cache/3.5.2.lock
~ at 10:16:27
❯
```
If you did not stop them all first can run this first beforehand.
```
adb devices | grep emulator | cut -f1 | while read line; do adb -s $line emu kill; done
```
| null | CC BY-SA 4.0 | null | 2022-10-19T14:19:56.733 | 2022-10-19T14:19:56.733 | null | null | 1,621,381 | null |
74,127,363 | 2 | null | 74,127,255 | 0 | null | Columns names seems to be mismatching. check
```
display(wb1.columns, wb2.columns)
```
and compare the names
names are in quotes, so whitespaces will show up
| null | CC BY-SA 4.0 | null | 2022-10-19T14:42:59.897 | 2022-10-19T14:42:59.897 | null | null | 3,494,754 | null |
74,127,417 | 2 | null | 74,127,325 | 0 | null | Try [apply](https://pandas.pydata.org/docs/reference/api/pandas.Series.apply.html)
```
data = pd.read_csv('Book1.csv', sep=',', header=None, encoding='utf-8')
iexp = data.iloc[:, 9]
def power_10(x):
return 10 ** x
iexp.apply(power_10)
```
| null | CC BY-SA 4.0 | null | 2022-10-19T14:46:18.347 | 2022-10-19T14:57:39.137 | 2022-10-19T14:57:39.137 | 9,588,645 | 9,588,645 | null |
74,127,421 | 2 | null | 74,127,325 | 0 | null | You can do it directly with:
```
10 ** iexp
```
| null | CC BY-SA 4.0 | null | 2022-10-19T14:46:29.553 | 2022-10-19T14:46:29.553 | null | null | 3,268,228 | null |
74,127,595 | 2 | null | 74,127,325 | 1 | null | As @BigBen suggested, `int64` is the problem here. You need to change it to a proper dtype:
```
df = df.astype("float")
```
Consider the following example:
```
df = pd.DataFrame({'A': [10,20,30,34],
'B': [10,10,10,10]})
df
```
output:
[](https://i.stack.imgur.com/KtUgh.png)
The columns have `int64` dtypes:
```
df.dtypes
```
output:
[](https://i.stack.imgur.com/Sh5Sa.png)
Something similar to your code:
```
iexp = df.iloc[:, 0]
s = pd.Series(10, index=iexp.index)
iexp, s
```
output:
[](https://i.stack.imgur.com/3aMDd.png)
Now, the output of
```
print(s ** iexp)
```
is this:
[](https://i.stack.imgur.com/055Mq.png)
As can be discerned, the `int64` dtypes becomes problematic at large numbers.
Now, change the dtype:
```
df = df.astype("float")
```
Now, the dtypes are `float64` and you would get the following outputs:
[](https://i.stack.imgur.com/Z4yl3.png)
[](https://i.stack.imgur.com/s6GQp.png)
Finally, note that you can change the dtype of a subset of columns as well if needed. For example to give the column A the dtype of `float`:
```
df = df.astype({"A": float})
```
| null | CC BY-SA 4.0 | null | 2022-10-19T14:56:12.130 | 2022-10-19T15:47:00.387 | 2022-10-19T15:47:00.387 | 17,658,327 | 17,658,327 | null |
74,127,756 | 2 | null | 46,038,909 | 0 | null | In my case I have res/font/regular.xml with this structure:
```
<font-family xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:fontProviderAuthority="com.google.android.gms.fonts"
app:fontProviderAuthority="com.google.android.gms.fonts"
...
```
Reading [Troublesome XML Font-Family file with malformed app namespace in Android Studio](https://stackoverflow.com/questions/63096980/troublesome-xml-font-family-file-with-malformed-app-namespace-in-android-studio) I removed `app:...` attributes.
| null | CC BY-SA 4.0 | null | 2022-10-19T15:07:04.670 | 2022-10-19T15:07:04.670 | null | null | 2,914,140 | null |
74,128,096 | 2 | null | 67,087,030 | 0 | null | My case was with docker because the message was always: the framework 'microsoft aspnetcore app version '5.0 0 was not found at runtime so in the document .Dockerfile add
=> FROM mcr.microsoft.com/dotnet/runtime:5.0 AS base
and
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
was working with workerservice and it worked.
| null | CC BY-SA 4.0 | null | 2022-10-19T15:32:31.290 | 2022-10-19T15:32:31.290 | null | null | 8,387,855 | null |
74,128,302 | 2 | null | 71,592,028 | 2 | null | I drop this answer here, because nothing about proxy helped in my case.
The version check URL redirects and that causes confusion to yarn
So, I went on to examine typical archaic tools, like verbosity check, curl and dig.
So, first thing first, I tried to check verbose output:
Bingo #1.
```
verbose 0.181073051 Performing "GET" request to "https://yarnpkg.com/latest-version".
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.12s.
info There appears to be trouble with your network connection. Retrying...
verbose 33.254841183 Performing "GET" request to "https://yarnpkg.com/latest-version".
info There appears to be trouble with your network connection. Retrying...
verbose 66.292530305 Performing "GET" request to "https://yarnpkg.com/latest-version".
info There appears to be trouble with your network connection. Retrying...
verbose 99.329186881 Performing "GET" request to "https://yarnpkg.com/latest-version".
info There appears to be trouble with your network connection. Retrying...
verbose 132.366749502 Performing "GET" request to "https://yarnpkg.com/latest-version".
```
Why not getting an answer from yarnpkg.com? This is insane... So, let's see if this resolves:
```
$ dig yarnpkg.com
; <<>> DiG 9.18.7-1+b1-Debian <<>> yarnpkg.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 55602
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 9cf3b6f8b290069dbbe8ca8763501b11ea79617323c673e6 (good)
;; QUESTION SECTION:
;yarnpkg.com. IN A
;; ANSWER SECTION:
yarnpkg.com. 300 IN A 104.18.126.100
yarnpkg.com. 300 IN A 104.16.171.99
;; Query time: 11 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Wed Oct 19 18:43:13 EEST 2022
;; MSG SIZE rcvd: 100
```
It does!!! (?)
So, let's see what I get from it, by using curl
```
$ curl https://yarnpkg.com/latest-version
Redirecting to https://classic.yarnpkg.com/latest-version
```
WHAT? A redirect? Ok, this is new..
I tried to set the url to check version not to be yarnpkg.com, but classic.yarnpkg.com, but I couldn't find the yarn configuration variable to use.
So, I used `/etc/hosts`.
```
; <<>> DiG 9.18.7-1+b1-Debian <<>> classic.yarnpkg.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35092
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
; COOKIE: 72636a6924283d51c4127a8463501bbb42e53d34835e8402 (good)
;; QUESTION SECTION:
;classic.yarnpkg.com. IN A
;; ANSWER SECTION:
classic.yarnpkg.com. 300 IN CNAME yarnpkg.netlify.com.
yarnpkg.netlify.com. 20 IN A 3.64.200.242
yarnpkg.netlify.com. 20 IN A 34.141.11.154
;; Query time: 59 msec
;; SERVER: 192.168.1.1#53(192.168.1.1) (UDP)
;; WHEN: Wed Oct 19 18:46:03 EEST 2022
;; MSG SIZE rcvd: 138
```
Set the first IP to yarnpkg.com
```
# /etc/hosts
34.141.48.9 yarnpkg.com
```
BINGO!!! Yarn command finished instantly.
```
$ yarn
yarn install v1.22.19
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.12s.
$
```
| null | CC BY-SA 4.0 | null | 2022-10-19T15:49:00.950 | 2022-10-19T15:49:00.950 | null | null | 2,399,861 | null |
74,128,718 | 2 | null | 74,083,005 | 0 | null | I think I've come up with what is going on and how to easily work around it for this case, . (The developer offers an non-git route that I reference in the comment below the OP.) Since you have `git` working on your machine, you should be good. (I can tell git it working because it says it is cloning in that first line below the code in your image instead of saying `git` isn't recognized.) Try this in Jupyter on your remote machine:
```
dataset="style_ddim"
#!git clone https://github.com/aitrepreneur/SD-Regularization-Images-Style-Dreambooth-{dataset}.git
!git clone https://github.com/aitrepreneur/SD-Regularization-Images-Style-Dreambooth.git
!mkdir -p regularization_images/{dataset}
!mv -v SD-Regularization-Images-Style-Dreambooth/{dataset}/*.* regularization_images/{dataset}
```
That version of the steps should work in Jupyter on your remote server without making the cell keep sitting there running and asking you for a username. (Which you cannot provide post-execution because the way the exclamation point sends things to the shell and how Jupyter cells work.)
All I have done is comment out the original line that was getting a specific folder and replaced it with a line cloning the whole repository.
It seems Github treats the ability of getting a specific directory directly as an 'advanced' ability and wants your GitHub credentials for that. Like it would want them for cloning a private repository. Cloning an entire doesn't trigger that need.
What I said in my comments about how you really would provide your credentials on one line holds and the associated security risks, but all that And you shouldn't need credentials for git cloning public repositories. So the paradigm of just using `!git clone ...` without credentials inside Jupyter cells should hold if you need to use a similar approach to get something from git. In this case we didn't need to adjust any of the subsequent handling of the cloned contents after; however, that may not always be the case.
---
Note:
I would have noted that you could just adjust the git clone line earlier if you had included code along with with your image. People trying to help you want it easy. They don't want to type a lot of code that in your post. In general, avoid images or only use them as a minor supplement to show behavior. This and more is touched on in [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask). (People trying to help also don't want to go digging elsewhere for code where a link to a video is provided. Video is farther from code than a screenshot.)
I will say that your use of an image to show the output was definitely justified and helped me match up what I was seeing with yours and know you had git working. With all the symbols and weird characters there it would have been hard to get just right in text only. So why it is best to avoid images, there definitely is a case for 'reserved use' along with text descriptions and code.
| null | CC BY-SA 4.0 | null | 2022-10-19T16:21:15.290 | 2022-10-19T16:47:18.757 | 2022-10-19T16:47:18.757 | 8,508,004 | 8,508,004 | null |
74,129,161 | 2 | null | 74,127,579 | 1 | null |
I found the problem. It's the implementation of the handling of extern .mmd-files in the `DigrammeR::mermaid()`-function.
Within the `mermaid()`-function the `htmlwidgets::createWidget(name = "DiagrammeR", x = x, width = NULL, height = NULL, package = "DiagrammeR")`-functions takes the processed input x and renders the graph. This functions expects an input in the format "\ngraph LR\nA-->B\n", where every input start and ends with "\n" and each line in your mermaid-code is also separated by "\n". But the input from an extern .mmd-file (`readLines("mermaid.mmd", encoding = "UTF-8", warn = FALSE)`) looks like this:
"graph LR" "A-->B"
Transforming the input into the required format can be done by `mermaid.code <- paste0("\n",paste0(mermaid.code, collapse = "\n"),"\n")`
Unfortunately this processing step is not implemented for extern .mmd-files in `DigrammeR::mermaid()`
- Build a new mermaid()-function, including the required processing step- Replace the mermaid()-function within the DiagrammeR-packages by the new function```
# Build new mermaid()-function
mermaid.new = function (diagram = "", ..., width = NULL, height = NULL) {
is_connection_or_file <- inherits(diagram[1], "connection") ||
file.exists(diagram[1])
if (is_connection_or_file) {
diagram <- readLines(diagram, encoding = "UTF-8", warn = FALSE)
diagram <- paste0("\n",paste0(d, collapse = "\n"),"\n") # NEW LINE
}
else {
if (length(diagram) > 1) {
nosep <- grep("[;\n]", diagram)
if (length(nosep) < length(diagram)) {
diagram[-nosep] <- sapply(diagram[-nosep], function(c) {
paste0(c, ";")
})
}
diagram = paste0(diagram, collapse = "")
}
}
x <- list(diagram = diagram)
htmlwidgets::createWidget(name = "DiagrammeR", x = x, width = width,
height = height, package = "DiagrammeR")
}
#Replace mermaid()-function in DiagrammeR-package
if(!require("R.utils")) install.packages("R.utils")
library(R.utils)
reassignInPackage(name="mermaid", pkgName="DiagrammeR", mermaid.new, keepOld=FALSE)
# Test new function
DiagrammeR::mermaid("mer.mmd")
```
| null | CC BY-SA 4.0 | null | 2022-10-19T16:56:05.687 | 2022-10-19T16:56:05.687 | null | null | 13,674,783 | null |
74,129,445 | 2 | null | 14,093,024 | 0 | null | If you are using gradle 7.5.1 then you need to run the command as --
$ gradle tasks
So in your case the task name would be the one found under chapter folders.
| null | CC BY-SA 4.0 | null | 2022-10-19T17:18:36.850 | 2022-10-19T17:18:36.850 | null | null | 20,285,071 | null |
74,129,446 | 2 | null | 74,129,154 | 2 | null | This was rewritten from your image, but the premise is to check your counter after the for loop.
If one hit is enough from the data, you could also "break" from the "for words in data" loop
```
count = 0
for word in spam_word:
if word in data:
print(word)
count += 1
# after the for loop check if words were found
if count:
# words found
print("Spam word found ",count)
else:
# words not found
print("Email does not include any predefined spam words.")
```
| null | CC BY-SA 4.0 | null | 2022-10-19T17:18:39.397 | 2022-10-19T17:18:39.397 | null | null | 3,482,194 | null |
74,129,523 | 2 | null | 74,129,154 | 0 | null | How about swapping the if condition:
. . .
```
if word not in data:
print("Email does not include any predefined spam words.")
else:
print(word)
count += 1
```
. . .
| null | CC BY-SA 4.0 | null | 2022-10-19T17:24:23.120 | 2022-10-19T17:27:54.523 | 2022-10-19T17:27:54.523 | 20,285,059 | 20,285,059 | null |
74,130,347 | 2 | null | 74,125,354 | 0 | null | In your `nuxt.config.js` file, you made a typo in the `modules` section.
Here is the correct name of the module
```
'@nuxtjs/i18n' // rather than 'nuxt-i18n'
```
Here is the link in the doc: [https://i18n.nuxtjs.org/setup](https://i18n.nuxtjs.org/setup)
---
The rest works fine on my side, I didn't face any other issues by replicating your setup.
| null | CC BY-SA 4.0 | null | 2022-10-19T18:39:44.830 | 2022-10-20T10:11:01.203 | 2022-10-20T10:11:01.203 | 5,471,709 | 8,816,585 | null |
74,130,509 | 2 | null | 74,130,098 | 0 | null | If you open the image on Chrome you will notice the website doesn't allow hotlinking. That's why it doesn't load. Try using a different image (from Wikipedia, for example) and it should work well.
[](https://i.stack.imgur.com/qUTZI.png)
```
new Image("https://upload.wikimedia.org/wikipedia/commons/8/8e/Vaadin-flow-bakery.png","vaadin");
```
I recommend using the alt attribute as well, instead of leaving it empty as you had in your original question.
| null | CC BY-SA 4.0 | null | 2022-10-19T18:53:37.920 | 2022-10-19T18:53:37.920 | null | null | 8,254,923 | null |
74,130,559 | 2 | null | 20,134,622 | 0 | null | For moodle mobile language customization, go to the mobile features section in the site admin. Scroll down to custom language strings. Update your strings there. It works
| null | CC BY-SA 4.0 | null | 2022-10-19T18:58:44.457 | 2022-10-19T18:58:44.457 | null | null | 20,275,531 | null |
74,130,604 | 2 | null | 69,433,432 | 0 | null | [](https://i.stack.imgur.com/55kuM.png)
Go to Runner :
Then Go to Signing & capabilities:
Check All - Debug - Release - Profile
Team , Bundle Identifier and others information are same or Not . if not same kindly fix it . Mainly this is causing the Error.
| null | CC BY-SA 4.0 | null | 2022-10-19T19:03:07.340 | 2022-10-19T19:03:07.340 | null | null | 8,480,069 | null |
74,130,750 | 2 | null | 74,130,669 | 1 | null | Have you tried setting 'sticky' to expand horizontally, e.g.
```
grid(row=0, column=0, columnspan=2, sticky='ew')
```
you could also try adding `weight=1` like so
```
win.grid_columnconfigure(0, weight=1) # '0' refers to column 0
```
| null | CC BY-SA 4.0 | null | 2022-10-19T19:16:57.833 | 2022-10-19T19:16:57.833 | null | null | 8,512,262 | null |
74,130,833 | 2 | null | 31,472,816 | 0 | null | First you will need to put the data as follows: [How to put your data](https://i.stack.imgur.com/P53Aw.png)
You will add a new column in which you will add the frequencies together. Do a simple recursive formula. (ex: f3+f4)
To take it to the modern version of Excel and the new function Xlookup, I propose this formula:
=XLOOKUP(ROWS(K$2[a]:K2),$I$3:$I$8[b],$H$3:$H$8[c],"All frequencies met",1,1
where:
[a] is the column in which you want the data to be displayed. It is important to lock the number
[b] is the added frequencies together
[c] is the element to show at that frequency
How it works ? :
ROWS(K$2[a]:K2) : will determine the position in your column. At the first cell, it will consider itself at the first position. Next cell, it will be second, and so on.
XLOOKUP part : Once we have the position, we are comparing if the position found in ROWS() is lower than or equal to the first frequency (why whe use the first 1).
If it is, it will display the element associated to that frequency.
If it is bigger than the first frequency, it will check for the second frequency and so on.
If we are further than the max combined frequency it will show "All frequencies met".
The last 1 is unecessary for this function.
| null | CC BY-SA 4.0 | null | 2022-10-19T19:25:14.077 | 2022-10-19T19:25:14.077 | null | null | 20,285,939 | null |
74,130,910 | 2 | null | 65,959,830 | 0 | null | The Android version of UIDocumentInteractionController is to use the `createChooser` function of `Intent`. Given a document on your filesystem with a URI of `uri`, do the following:
```
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.setType("application/pdf"); // or whatever content type it is
startActivity(Intent.createChooser(shareIntent, null));
```
Android documentation is here:
[https://developer.android.com/training/sharing/send](https://developer.android.com/training/sharing/send)
| null | CC BY-SA 4.0 | null | 2022-10-19T19:33:39.040 | 2022-10-19T19:33:39.040 | null | null | 1,326,985 | null |
74,131,160 | 2 | null | 74,112,604 | 0 | null | First, try using the .NET API instead of the ActiveX. It should be more stable.
Second, you have to wire all the inputs of the invoke node with a Type: Missing node.[](https://i.stack.imgur.com/O8ioW.png)
| null | CC BY-SA 4.0 | null | 2022-10-19T19:56:52.523 | 2022-10-19T19:56:52.523 | null | null | 7,069,142 | null |
74,131,215 | 2 | null | 74,125,533 | 1 | null | Here two solutions one using Excel formulas and the other one using Power Query. See section for more information about each approach:
# Excel
It is possible with excel without using Power Query, but several manipulations are required. On cell `I2` put the following formula:
```
=LET(counts, BYROW(F2:F3, LAMBDA(a, LEN(a) - LEN(SUBSTITUTE(a, ",", "")))), del, "|",
emptyRowsSet, MAP(A2:A3, B2:B3, C2:C3, D2:D3, E2:E3, F2:F3, G2:G3, counts,
LAMBDA(a,b,c,d,e,f,g,cnts, LET(rep, REPT(";",cnts),a&rep &del& b&rep &del& c&rep &del&
d&rep &del& e&rep &del& SUBSTITUTE(f,", ",";") &del& g&rep ))),
emptyRowsSetByCol, TEXTSPLIT(TEXTJOIN("&",,emptyRowsSet), del, "&"),
byColResult, BYCOL(emptyRowsSetByCol, LAMBDA(a, TEXTJOIN(";",,a))),
singleLine, TEXTJOIN(del,,byColResult),
TRANSPOSE(TEXTSPLIT(singleLine,";",del))
)
```
Here is the output:
[](https://i.stack.imgur.com/VPDp2.png)
## Update
A simplified version of previous formula is the following one:
```
=LET(counts, BYROW(F2:F3, LAMBDA(a, LEN(a) - LEN(SUBSTITUTE(a, ",", "")))), del, "|",
reps, MAKEARRAY(ROWS(A2:G3),COLUMNS(A2:G3), LAMBDA(a,b, INDEX(counts, a,1))),
emptyRowsSetByCol, MAP(A2:G3, reps, LAMBDA(a,b, IF(COLUMN(a)=6,
SUBSTITUTE(a,", ",";"), a&REPT(";",b)))),
byColResult, BYCOL(emptyRowsSetByCol, LAMBDA(a, TEXTJOIN(";",,a))),
singleLine, TEXTJOIN(del,,byColResult),
TRANSPOSE(TEXTSPLIT(singleLine,";",del))
)
```
# Power Query
The following M Code provides the expected result:
```
let
Source = Excel.CurrentWorkbook(){[Name="TB_Sales"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Sales Order", type text}}),
#"Split License Name" = Table.ExpandListColumn(Table.TransformColumns(#"Changed Type", {{"License Name",
Splitter.SplitTextByDelimiter(", ", QuoteStyle.Csv),
let itemType = (type nullable text) meta [Serialized.Text = true] in type {itemType}}}), "License Name"),
ListOfColumns = List.Difference(Table.ColumnNames(#"Split License Name"), {"License Name"}),
RemainingColumns = List.Difference(Table.ColumnNames(#"Changed Type"), ListOfColumns),
RemoveDups = (lst as list) =>
let
concatList = (left as list, right as list) => List.Transform(List.Positions(left), each left{_}&"_"& right{_}),
prefixList = Table.Column(#"Split License Name", "Sales Order"),
tmp = concatList(prefixList, lst),
output = List.Accumulate(tmp, {}, (x, y) => x & {if List.Contains(x, y) then null else y})
in
output,
replaceValues = List.Transform(ListOfColumns, each RemoveDups(Table.Column(#"Split License Name", _))),
#"Added Empty Rows" = Table.FromColumns(
replaceValues & Table.ToColumns(Table.SelectColumns(#"Split License Name", RemainingColumns)),
ListOfColumns & RemainingColumns),
#"Extracted Text After Delimiter" = Table.TransformColumns(#"Added Empty Rows", {{"Sales Order",
each Text.AfterDelimiter(_, "_"), type text}, {"Asset Serial Number", each Text.AfterDelimiter(_, "_"), type text},
{"Asset Model", each Text.AfterDelimiter(_, "_"), type text}, {"Licence Class",
each Text.AfterDelimiter(_, "_"), type text}, {"License Type", each Text.AfterDelimiter(_, "_"), type text},
{"Account Name", each Text.AfterDelimiter(_, "_"), type text}}),
#"Reordered Columns" = Table.ReorderColumns(#"Extracted Text After Delimiter",{"Sales Order", "Asset Serial Number", "Asset Model",
"Licence Class", "License Type", "License Name", "Account Name"})
in
#"Reordered Columns"
```
And here is the output:
[](https://i.stack.imgur.com/iK4fU.png)
And the corresponding Excel Output:
[](https://i.stack.imgur.com/hd9Bj.png)
# Explanation
Here we provide the explanation for each approach: Excel formula and Power Query.
## Excel Formula
We need to calculate how many empty rows we need to add based on column values. We achieve that via `counts` name from `LET`:
```
BYROW(F2:F3, LAMBDA(a, LEN(a) - LEN(SUBSTITUTE(a, ",", ""))))
```
The output for this case is: `{3;3}`, i.e `2x1` array, which represents how many empty rows we need to add for each input row.
Next we need to build the set that includes empty rows. We name it `emptyRowsSet` and the calculation is as follow:
```
MAP(A2:A3, B2:B3, C2:C3, D2:D3, E2:E3, F2:F3, G2:G3, counts,
LAMBDA(a,b,c,d,e,f,g,cnts,
LET(rep, REPT(";",cnts),a&rep &del& b&rep &del& c&rep &del&
d&rep &del& e&rep &del& SUBSTITUTE(f,", ",";") &del& g&rep)))
```
We use inside `MAP` an additional `LET` function to avoid repetition of `rep` value. Because we want to consider the content of as additional rows we replace the `,` by `;` (we are going to consider this token as a row delimiter). We use `del` (`|`) as a delimiter that will serve as a column delimiter.
Here would be the intermediate result of `emptyRowsSet`:
```
10000;;;|1234, 5643, 3463;;;|test-pro;;;|A123;;;|software;;;|LIC-0002;LIC-0188;LIC-0188;LIC-0013|ABC;;;
2000;;;|5678, 9846, 5639;;;|test-pro;;;|A123;;;|software;;;|LIC-00107;LIC-08608;LIC-009;LIC-0610|ABC;;;
```
As you can see additional `;` where added per number of items we have in column per row. In the sample data the number of empty rows to add is the same per row, but it could be different.
The rest is how to accommodate the content of `emptyRowsSet` in the way we want. Because we cannot invoke `TEXTSPLIT` and `BYROW` together because we get `#CALC!` (Nested Array error). We need to try to circumvent this.
For example the following produces an error (`#CALC!`):
```
=BYROW(A1:A2,LAMBDA(a, TEXTSPLIT(a,"|")))
```
where the range `A1:A2` has the following: `={"a|b";"c|d"}`. We don't get the desired output: `={"a","b";"c","d"}`. In short the output of `BYROW` should be a single column so any `LAMBDA` function that expands the columns will not work.
In order to do circumvent that we can do the following:
1. Convert the input into a single string joining each row by ; for example. Now we have column delimiter (|) and row delimiter (;)
2. Use TEXTSPLIT to generate the array (2x2 in this case), identifying the columns and the row via both delimiters.
We can do it as follow (showing the output of each step on the right)
```
=TEXTSPLIT(TEXTJOIN(";",,A1:A2),"|",";") -> 1) "a|b;c|d" -> 2) ={"a","b";"c","d"}
```
We are using the same idea here (but using `&` for joining each row). The name `emptyRowsSetByCol`:
```
TEXTSPLIT(TEXTJOIN("&",,emptyRowsSet), del, "&")
```
Would produce the following intermediate result, now organized by columns ():
| Sales Order | Asset Serial Number | Asset Model | License Class | License Type | License Name | Account Name |
| ----------- | ------------------- | ----------- | ------------- | ------------ | ------------ | ------------ |
| 10000;;; | 1234, 5643, 3463;;; | test-pro;;; | A123;;; | software;;; | LIC-0002;LIC-0188;LIC-0188;LIC-0013 | ABC;;; |
| 2000;;; | 5678, 9846, 5639;;; | test-pro;;; | A123;;; | software;;; | LIC-00107;LIC-08608;LIC-009;LIC-0610 | ABC;;; |
The header are just for illustrative purpose, but it is not part of the output.
Now we need to concatenate the information per column and for that we can use `BYCOL` function. We name the result: `byColResult` of the following formula:
```
BYCOL(emptyRowsSetByCol, LAMBDA(a, TEXTJOIN(";",,a)))
```
The intermediate result would be:
| Sales Order | Asset Serial Number | Asset Model | License Class | License Type | License Name | Account Name |
| ----------- | ------------------- | ----------- | ------------- | ------------ | ------------ | ------------ |
| 10000;;;;2000;;; | 1234, 5643, 3463;;;;5678, 9846, 5639;;; | test-pro;;;;test-pro;;; | A123;;;;A123;;; | software;;;;software;;; | LIC-0002;LIC-0188;LIC-0188;LIC-0013;LIC-00107;LIC-08608;LIC-009;LIC-0610 | ABC;;;;ABC;;; |
`1x7` array and on each column the content already delimited by `;` (ready for the final split).
Now we need to apply the same idea as before i.e. convert everything to a single string and then split it again.
First we convert everything to a single string and name the result: `singleLine`:
```
TEXTJOIN(del,,byColResult)
```
Next we need to do the final split:
```
TRANSPOSE(TEXTSPLIT(singleLine,";",del))
```
We need to transpose the result because `SPLIT` processes the information row by row.
### Update
I provided a simplified version of the initial approach which requires less steps, because we can obtain the result of the `MAP` function directly by columns.
The main idea is to treat the input range `A2:G3` all at once. In order to do that we need to have all the `MAP` input arrays of the same shape. Because we need to take into account the number of empty rows to add (`;`), we need to build this second array of the same shape. The name `reps`, is intended to create this second array as follow:
```
MAKEARRAY(ROWS(A2:G3),COLUMNS(A2:G3),
LAMBDA(a,b, INDEX(counts, a,1)))
```
The intermediate output will be:
```
3|3|3|3|3|3|3
3|3|3|3|3|3|3
```
which represents a `2x7` array, where on each row we have the number of empty rows to add.
Now the name `emptyRowsSetByCol`:
```
MAP(A2:G3, reps,
LAMBDA(a,b, IF(COLUMN(a)=6, SUBSTITUTE(a,", ",";"),
a&REPT(";",b))))
```
Produces the same intermediate result as in above . We treat different the information from column 6 () replacing the `,` with `;`. For other columns just add as many `;` as empty rows we need to add for each input row. The rest of the formula is just similar to the first approach.
## Power Query
`#"Split License Name"` is a standard Power Query (PQ) UI function: .
To generate empty rows we do it by removing duplicates elements on each column that requires this transformation, i.e. all columns except . We do it all at once identifying the columns that require such transformation. In order to do that we define two lists:
- `ListOfColumns``List.Difference()`- `RemainingColumns``List.Difference()``ListOfColumns`
The user defined function `RemoveDups(lst as list)` does the magic of this transformation.
Because we need to remove duplicates, but having unique elements based on each initial row, we use the first column as a prefix, so we can "clean" the column within each partition.
In order to do that we define inside of `RemoveDups()` function a new user defined function `concatList()` to add the first column as prefix.
```
concatList = (left as list, right as list) =>
List.Transform(List.Positions(left), each left{_}&"-"& right{_}),
```
we concatenate each element of the lists (row by row) using a underscore delimiter (`_`). Later we are going to use this delimiter to remove the first column as prefix added at this point.
To remove duplicates and replace them with `null` we use the following logic:
```
output = List.Accumulate(tmp, {}, (x, y) =>
x & {if List.Contains(x, y) then null else y})
```
where `tmp` is a modified list (`lst`) with the first column as prefix.
Now we invoke the `List.Transform()` function for all the columns that require the transformation using as `transform` (second input argument) the function we just defined previously:
```
replaceValues = List.Transform(ListOfColumns, each
RemoveDups(Table.Column(#"Split License Name", _))),
```
`#"Added Empty Rows"` represents the step of this calculation and the output will be the following table:
[](https://i.stack.imgur.com/jfznQ.png)
The step `#"Extracted Text After Delimiter"` is just to remove the prefix we added and for that we use standard PQ UI .
Finally we need to reorder the column to put in a way it is expected via the step: `#"Reordered Columns"` using PQ UI functionality.
| null | CC BY-SA 4.0 | null | 2022-10-19T20:00:26.333 | 2022-10-28T16:36:43.373 | 2022-10-28T16:36:43.373 | 6,237,093 | 6,237,093 | null |
74,131,269 | 2 | null | 74,129,828 | 0 | null | Based on your current UI, the middle dots will take `125` pixel. you can split into half, and reduce the height from top and bottom part,
```
class TestIntroductionScreen extends StatelessWidget {
const TestIntroductionScreen({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('HomePage'),
),
body: LayoutBuilder(
builder: (p0, constraints) {
final maxWidth = constraints.maxWidth;
final maxHeight = constraints.maxHeight;
return Column(
children: [
Expanded(
child: Container(
width: maxWidth,
color: Colors.green,
child: IntroductionScreen(
globalBackgroundColor: Colors.black,
globalHeader: const Align(
alignment: Alignment.topLeft,
child: Text(' Your Pages:',
style:
TextStyle(fontSize: 20, color: Colors.white))),
showDoneButton: false,
showBackButton: true,
next: const Icon(Icons.arrow_forward, color: Colors.white),
back: const Icon(Icons.arrow_back, color: Colors.white),
pages: [
buildTestPage(maxWidth, maxHeight / 2 - (125 / 2)),
],
controlsMargin: const EdgeInsets.all(0),
controlsPadding: const EdgeInsets.all(0),
),
),
),
Container(
height: maxHeight / 2 - (125 / 2),
width: maxWidth,
color: Colors.orange,
child: Container(),
),
],
);
},
),
);
}
PageViewModel buildTestPage(double width, double height) {
return PageViewModel(
useScrollView: false,
titleWidget: Container(
color: Colors.purple,
height: height,
),
body: '',
decoration: const PageDecoration(
contentMargin: EdgeInsets.all(0),
titlePadding: EdgeInsets.only(top: 24, bottom: 0),
footerPadding: EdgeInsets.all(0),
bodyPadding: EdgeInsets.all(0),
imagePadding: EdgeInsets.all(0),
fullScreen: false,
),
);
}
}
```
[](https://i.stack.imgur.com/LvZ8p.png)
| null | CC BY-SA 4.0 | null | 2022-10-19T20:05:50.763 | 2022-10-19T20:05:50.763 | null | null | 10,157,127 | null |
74,131,878 | 2 | null | 58,005,943 | 4 | null | Share my solution:
In Visual Studio go to Options/Environment/Accounts and select "System Web Browser"
The next attempt to login was succeful.
| null | CC BY-SA 4.0 | null | 2022-10-19T21:03:58.210 | 2022-10-20T12:46:16.637 | 2022-10-20T12:46:16.637 | 10,039,243 | 10,039,243 | null |
74,132,119 | 2 | null | 58,613,492 | 0 | null | I discovered that this error might be triggered when you try to load a dependency that is made for the browser and, thus, cannot work with jest (node).
I had a lot of trouble solving this issue for `@zip.js/zip.js` lib. But I could do it like that:
Here is my `jest.config.js`. Adapt it to your need. The trick here is the moduleNameMapper that will make all imports to zip.js point to the file `__mocks__/@zip.js/zip.js` I created in my root folder.
```
export default {
preset: 'ts-jest',
testEnvironment: 'node',
moduleNameMapper: {
'@zip.js/zip.js': '<rootDir>/__mocks__/@zip.js/zip.js',
},
}
```
And here is what I have in `<rootDir>/__mocks__/@zip.js/zip.js` file:
```
module.exports = {}
```
| null | CC BY-SA 4.0 | null | 2022-10-19T21:31:33.510 | 2022-10-19T21:31:33.510 | null | null | 1,967,800 | null |
74,132,328 | 2 | null | 22,477,729 | 1 | null | You can now do this with a meta tag:
```
<meta name="theme-color" content="#923941">
```
| null | CC BY-SA 4.0 | null | 2022-10-19T21:54:58.450 | 2022-10-19T21:54:58.450 | null | null | 5,044,541 | null |
74,132,524 | 2 | null | 74,132,452 | 0 | null | You can use `CupertinoPicker` widget for this.
```
CupertinoPicker(
children: [listOfYear],
itemExtent: 100,
onSelectedItemChanged: (value) {},
)
```
More about [CupertinoPicker](https://api.flutter.dev/flutter/cupertino/CupertinoPicker-class.html)
| null | CC BY-SA 4.0 | null | 2022-10-19T22:17:51.773 | 2022-10-19T22:17:51.773 | null | null | 10,157,127 | null |
74,132,688 | 2 | null | 74,108,310 | 1 | null | You could use [scipy.linalg.orthogonal_procrustes](https://docs.scipy.org/doc/scipy/reference/generated/scipy.linalg.orthogonal_procrustes.html). Here's a demonstration. Note that the function `generateAB` only exists to generate the arrays A and B for the demo. The key steps of the calculation are to center A and B, and then call `orthogonal_procrustes`.
```
import numpy as np
from scipy.stats import ortho_group
from scipy.linalg import orthogonal_procrustes
def generateAB(shape, noise=0, rng=None):
# Generate A and B for the example.
if rng is None:
rng = np.random.default_rng()
m, n = shape
# Random matrix A
A = 3 + 2*rng.random(shape)
Am = A.mean(axis=0, keepdims=True)
# Random orthogonal matrix T
T = ortho_group.rvs(n, random_state=rng)
# Target matrix B
B = ((A - Am) @ T + rng.normal(scale=noise, size=A.shape)
+ 3*rng.random((1, n)))
# Include T in the return, but in a real problem, T would not be known.
return A, B, T
# For reproducibility, use a seeded RNG.
rng = np.random.default_rng(0x1ce1cebab1e)
A, B, T = generateAB((7, 5), noise=0.01, rng=rng)
# Find Q. Note that `orthogonal_procrustes` does not include
# dilation or translation. To handle translation, we center
# A and B by subtracting the means of the points.
A0 = A - A.mean(axis=0, keepdims=True)
B0 = B - B.mean(axis=0, keepdims=True)
Q, scale = orthogonal_procrustes(A0, B0)
with np.printoptions(precision=3, suppress=True):
print('T (used to generate B from A):')
print(T)
print('Q (computed by orthogonal_procrustes):')
print(Q)
print('\nCompare A0 @ Q with B0.')
print('A0 @ Q:')
print(A0 @ Q)
print('B0 (should be close to A0 @ Q if the noise parameter was small):')
print(B0)
```
Output:
```
T (used to generate B from A):
[[-0.873 0.017 0.202 -0.44 -0.054]
[-0.129 0.606 -0.763 -0.047 -0.18 ]
[ 0.055 -0.708 -0.567 -0.408 0.088]
[ 0.024 0.24 -0.028 -0.168 0.955]
[ 0.466 0.272 0.235 -0.78 -0.21 ]]
Q (computed by orthogonal_procrustes):
[[-0.871 0.022 0.203 -0.443 -0.052]
[-0.129 0.604 -0.765 -0.046 -0.178]
[ 0.053 -0.709 -0.565 -0.409 0.087]
[ 0.027 0.239 -0.029 -0.166 0.956]
[ 0.47 0.273 0.233 -0.779 -0.21 ]]
Compare A0 @ Q with B0.
A0 @ Q:
[[-0.622 0.224 0.946 1.038 0.578]
[ 0.263 0.143 -0.031 -0.949 0.492]
[-0.49 0.758 0.473 -0.221 -0.755]
[ 0.205 -0.74 0.065 -0.192 -0.551]
[-0.295 -0.434 -1.103 0.444 0.547]
[ 0.585 -0.378 -0.645 -0.233 0.651]
[ 0.354 0.427 0.296 0.113 -0.963]]
B0 (should be close to A0 @ Q if the noise parameter was small):
[[-0.627 0.226 0.949 1.032 0.576]
[ 0.268 0.135 -0.028 -0.95 0.492]
[-0.493 0.765 0.475 -0.201 -0.75 ]
[ 0.214 -0.743 0.071 -0.196 -0.55 ]
[-0.304 -0.433 -1.115 0.451 0.551]
[ 0.589 -0.375 -0.645 -0.235 0.651]
[ 0.354 0.426 0.292 0.1 -0.969]]
```
| null | CC BY-SA 4.0 | null | 2022-10-19T22:40:13.230 | 2022-10-19T23:03:25.757 | 2022-10-19T23:03:25.757 | 1,217,358 | 1,217,358 | null |
74,133,039 | 2 | null | 74,081,783 | 1 | null | I think you want
```
plot_model(m, type="pred",
pred.type = "re",
terms = c("isoc[n=100]","educ"), show.data = TRUE)
```
- `pred.type = "re"`- `isoc[n=100]``isoc``isoc``[all]`
For the example you've given the prediction lines are all on top of each other (because the fit is singular/the random-effects variance is effectively zero), but that's presumably because your sample data set is so small.
---
For what it's worth, although this is a perfectly well-posed programming problem, I would recommend treating `educ` as a random effect:
- -
Feel free to ask more questions about your model setup/definition on [CrossValidated](https://stats.stackexchange.com)
| null | CC BY-SA 4.0 | null | 2022-10-19T23:47:32.867 | 2022-10-19T23:53:32.537 | 2022-10-19T23:53:32.537 | 190,277 | 190,277 | null |
74,133,168 | 2 | null | 74,133,154 | 1 | null | you can use [iloc](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.iloc.html?highlight=iloc#pandas.DataFrame.iloc) to access the column by its index (which is a zero based index)
```
df.iloc[:,3]
```
| null | CC BY-SA 4.0 | null | 2022-10-20T00:15:24.723 | 2022-10-20T01:40:12.400 | 2022-10-20T01:40:12.400 | 3,494,754 | 3,494,754 | null |
74,133,769 | 2 | null | 74,133,677 | 0 | null | you can try to click the form title before resizing. you may have a panel (or any container control) which is full docked in the form, that's why when you click the form body, you selected the panel instead of the form.
Another issue that I encountered was the windows font size was set to 120% (or more), so go to windows display setting and set the font size to 100%.
| null | CC BY-SA 4.0 | null | 2022-10-20T02:22:43.017 | 2022-10-20T02:22:43.017 | null | null | 10,881,959 | null |
74,133,789 | 2 | null | 74,133,524 | 0 | null | it happens because you add `height : 30px` in class .box-cep,
if you give `height : 100%` then it will be normal, and remove height in class `.box-cep button`
like the example below
```
.box-cep {
width : 245px;
height : 100%;
margin-top : 10px;
margin-left : 25px;
border : 2px solid black;
display : flex;
align-items : "center";
}
.box-cep input {
width : 150px;
height : 30px;
border : none;
}
.box-cep button {
width : 90px;
border : none;
background-color : #FF7518;
color : white;
font-family : "Century Gothic";
font-size : 18px;
font-weight : bold;
}
.cep-txt {
font-family : "Century Gothic";
font-size : 14px;
padding-left : 5px;
}
```
```
<div class="box-cep">
<input type="text" name="input" class="cep-txt" placeholder="Digite seu CEP...">
<button>Calcular!</button>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-20T02:27:12.357 | 2022-10-20T02:34:22.190 | 2022-10-20T02:34:22.190 | 19,123,792 | 19,123,792 | null |
74,133,806 | 2 | null | 74,133,524 | 1 | null | It's happened because you have set the box-cep height, and the height of the input is overflow the container. For alternately, you can use max-content height for box-cep. And to make the button horizontaly with the input, you can make the box-cep flex and place the button outside the label. Here is my example, i hope it can help you.
```
.box-cep {
width : 245px;
height : fit-content;
margin-top : 10px;
margin-left : 25px;
border : 2px solid black;
display : flex;
align-items : center;
}
.box-cep input {
width : 150px;
height : 30px;
border : none;
}
.box-cep button {
width : 90px;
height : 32px;
border : none;
background-color : #FF7518;
color : white;
font-family : "Century Gothic";
font-size : 18px;
font-weight : bold;
}
.cep-txt {
font-family : "Century Gothic";
font-size : 14px;
padding-left : 5px;
}
```
```
<div class="box-cep">
<label for="">
<input type="text" class="cep-txt" placeholder="Digite seu CEP...">
</label>
<button>Calcular!</button>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-20T02:30:59.543 | 2022-10-20T02:30:59.543 | null | null | 19,522,981 | null |
74,133,858 | 2 | null | 74,133,401 | 0 | null | IIUC you want to to replace the string in that column with the substring and also filter the df by it if there is no match.
This should solve it:
About your error mentioned in the comments: we just create the captured group by putting `()` around the joined searchfor list.
```
pattern = '(' + '|'.join(searchfor) + ')'
df['InjuryDetail'] = df['InjuryDetail'].str.extract(pattern, expand=False)
df_cardiovascular = df.dropna(subset='InjuryDetail')
```
| null | CC BY-SA 4.0 | null | 2022-10-20T02:38:56.640 | 2022-10-20T02:50:03.040 | 2022-10-20T02:50:03.040 | 15,521,392 | 15,521,392 | null |
74,133,876 | 2 | null | 62,147,493 | 0 | null | Updating the following line in build.gradle helped me:
```
classpath "de.undercouch:gradle-download-task:5.3.0"
```
and adding the following line also:
```
apply plugin: "de.undercouch.download"
```
As explained in:
[https://plugins.gradle.org/plugin/de.undercouch.download](https://plugins.gradle.org/plugin/de.undercouch.download)
| null | CC BY-SA 4.0 | null | 2022-10-20T02:42:08.237 | 2022-10-20T02:42:08.237 | null | null | 14,504,940 | null |
74,133,999 | 2 | null | 74,133,541 | 1 | null | This is called a MultiIndex and you want to [swaplevel](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.swaplevel.html) after your `pivot`, with an optional [sort_index](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.sort_index.html):
```
df_ticker_fixed = (df_ticker
.reset_index()
.pivot_table(
index='timestamp',
columns='symbol',
values=['open', 'high', 'low', 'close', 'volume']
)
.swaplevel(axis=1)
.sort_index(level='symbol', axis=1, sort_remaining=False)
)
```
| null | CC BY-SA 4.0 | null | 2022-10-20T03:05:48.103 | 2022-10-20T03:05:48.103 | null | null | 16,343,464 | null |
74,134,151 | 2 | null | 74,133,524 | 0 | null | You can use `position:relative` and `height:100%` to get the full width inside the container.
```
.box-cep {
width : 245px;
height : 30px;
margin-top : 10px;
margin-left : 25px;
border : 2px solid black;
}
.box-cep input {
width : 150px;
height : 100%; // Replace 30px with 100%
position : relative; // Add position: relative
border : none;
}
.box-cep button {
width : 90px;
height : 100%; // Here Same, Replace 30px with 100%
position : relative; // Add position: relative here too
border : none;
background-color : #FF7518;
color : white;
font-family : "Century Gothic";
font-size : 18px;
font-weight : bold;
}
.cep-txt {
font-family : "Century Gothic";
font-size : 14px;
padding-left : 5px;
}
```
Then the button and the input will have the same height. Also add `overflow:hidden` to the `.box-cep` div to prevent its contents from overflowing.
| null | CC BY-SA 4.0 | null | 2022-10-20T03:32:35.423 | 2022-10-20T03:32:35.423 | null | null | null | null |
74,134,320 | 2 | null | 74,133,847 | 2 | null | There's two ways to do this. One is the nested IF() approach, where you embed or "nest" IF() statements into other IF() statements. You haven't done that correctly in your example, and there's multiple problems.
The only acceptable format for IF() is:
=IF( `condition` , `value if true` , `value if false`)
And thus your nested IF() would embed another full IF() statement in place of `value if false`, not simply adding it to the end with another `=` sign:
```
=IF(AND(A3="Completed",C3="Completed",E3="Completed"),"Completed", IF(
OR(A3:E3=“Started”), "Started", "Pending" )
```
The second IF() is put in the place where "result if the first IF() is false" would go.
But Excel provides a way to do a sequence of IF() conditions that allows the "ELSEIF" construct in many programming languages, and allows logic similar to the way a "CASE" statement works in other languages. and that is IFS(), plural, with an 's'.
=IFS( `condition1`, `result if true`, `condition2`, `result if true`, `condition3`, `result if true`)
What you end up with is:
```
=IFS( AND(A3="Completed",C3="Completed",E3="Completed") , "Completed" ,
OR(A3:E3=“Started”) , "Started")
```
This tests in order. If condition1 is true, return "Completed" and be done. If not, move on to condition2, and if that's true, return "Started" and be done.
You want one more condition though. If 1 or 2 isn't true, then make the result "Pending." How do we do that, since IFS() requires conditions and results? Since they're checked in order and the IFS() only continues to the next condition if there hasn't been a match yet, we make a third condition of simply TRUE:
```
=IFS( AND(A3="Completed",C3="Completed",E3="Completed") , "Completed" ,
OR(A3:E3=“Started”), "Started", TRUE, "Pending" )
```
The third test is not by the IFS() statement, but most of the time we still want an "otherwise, return x".
| null | CC BY-SA 4.0 | null | 2022-10-20T04:04:11.750 | 2022-10-20T12:59:20.763 | 2022-10-20T12:59:20.763 | 19,662,289 | 19,662,289 | null |
74,134,476 | 2 | null | 69,715,005 | 0 | null | Here is a solution that will scroll down to the end all the time without adding any extra pixels by hand. The only downside is that you can only use `Curves.linear` as animation.
```
Future.doWhile(() {
if (scrollController.position.extentAfter == 0)
return Future.value(false);
return scrollController
.animateTo(scrollController.position.maxScrollExtent,
duration: Duration(milliseconds: 100), curve: Curves.linear)
.then((value) => true);
});
```
| null | CC BY-SA 4.0 | null | 2022-10-20T04:34:03.260 | 2022-10-20T04:34:03.260 | null | null | 563,732 | null |
74,135,119 | 2 | null | 74,135,003 | 0 | null | this problem's have multiple problems , maybe you have to create app at desktop or at C disk (if Windows) , try this
1. rm -rf node_modules
2. rm -rf package-lock.json
3. npm install
4. change node version vie NVM (optional)
Second question check this [dotenv-webpack](https://www.npmjs.com/package/dotenv-webpack)
| null | CC BY-SA 4.0 | null | 2022-10-20T06:05:38.957 | 2022-10-20T06:05:38.957 | null | null | 12,729,577 | null |
74,135,227 | 2 | null | 74,134,891 | 0 | null | I think you could configure tooltip plugin setting `usePointStyle` option to true.
```
options: {
plugins: {
tooltip: {
usePointStyle: true
}
}
}
```
| null | CC BY-SA 4.0 | null | 2022-10-20T06:16:45.087 | 2022-10-20T06:16:45.087 | null | null | 2,057,925 | null |
74,135,415 | 2 | null | 74,133,847 | 0 | null | For the sake of readability you could also use the new `LET`-formula (if you are on Excel 365:
```
=LET(cntCompleted,COUNTIFS(A8:E8,"completed"),
cntStarted,COUNTIFS(A8:E8,"started"),
IF(cntCompleted=3,"completed",
IF(cntStarted>=1,"in progess",
"pending")))
```
The formula counts "completed" and "started" - then uses the `IF`-statement to check the conditions.
| null | CC BY-SA 4.0 | null | 2022-10-20T06:40:44.590 | 2022-10-20T06:40:44.590 | null | null | 16,578,424 | null |
74,135,596 | 2 | null | 74,133,847 | 0 | null | Just a thought, you could count the number of "completed" in the range and test to see if the result is equal to 5:
```
=countif(A3:E3,"completed")=5
```
Which will return True or False, then you can continue other calculations...
| null | CC BY-SA 4.0 | null | 2022-10-20T06:57:25.753 | 2022-10-20T06:57:25.753 | null | null | 4,961,700 | null |
74,135,618 | 2 | null | 21,135,845 | 0 | null | I think when this question was asked, it was based on QtQuick 1.x controls. Now, with QtQuick 2.x some of the properties have changed their names. Anyhow, to fix the problem, I only had to comment out the following property:
```
//highlightRangeMode: ListView.StrictlyEnforceRange
```
To mimic the original look, I updated the highlight delegate, add a horizontal `ScrollBar` and redid the `Button` delegate.
```
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
Page {
ListView {
id: listView
width: 500
height: 100 + 20
clip: true
snapMode: ListView.SnapToItem
anchors.centerIn: parent
//highlightRangeMode: ListView.StrictlyEnforceRange
highlightFollowsCurrentItem: true
highlight: Rectangle {
color: "#00000000"
border.color: "steelblue"
border.width: 2
radius: 5
}
anchors.horizontalCenter: parent.horizontalCenter
orientation: ListView.Horizontal
model: ListModel{
id: listModel
ListElement{ name: "File"}
ListElement{ name: "Edit"}
ListElement{ name: "Build"}
ListElement{ name: "Debug"}
ListElement{ name: "Analyze"}
ListElement{ name: "Tools"}
ListElement{ name: "Window"}
ListElement{ name: "Help"}
}
ScrollBar.horizontal: ScrollBar {
height: 20
policy: ScrollBar.AlwaysOn
}
delegate: Button {
background: Item {
Rectangle {
anchors.fill: parent
anchors.margins: 2
color: "#ccc"
radius: 5
}
}
width: 100
height: 100
text: model.name
onClicked: {
listView.currentIndex = model.index;
listView.forceActiveFocus();
console.log("ListView Button clicked" + model.index)
}
}
}
}
```
You can [Try it Online!](https://stephenquan.github.io/qmlonline/?zcode=AAAGfnicjVTLbtswELz7Kwj1kqCAogToRUUPtusgAVK0eaA909RGJrziCnzUcQL%2FeylbovWwUe1BIGeHXGqWQ1mUpC17tI9OivVEdqbxnJTVhKaPP%2FAtOWsmv3gO7GPCfDxIY39L2NTTKmSWMqzhAG5kZlcp%2B5IkAVqBzFc2ZddJwj6zm2NCoCxTZrWDABnFyx%2BUQRoKxs8eeqF7C0VgcSVWpE0sQFnQ9yplJdd%2BHAhXVytfE6u6T1zl0N%2FSaiksbhfqlbSAPeV43GblLSHSxsydrvauDtA7bGCm7AmE9bsgtPQ5%2FCMh6ZRFn5I6om5%2BSToDHTc0YwFwiQ5O02p1b7pJzTPpjBc9wLuBVP4j3327Oc73ojWSDRJhpcc9wK0k1ZLuLtADsfDi4oFS6YxdBZpbsk91MtWCBULhq3wwxQvfoehWIkS7%2F9IWmbQjaDMnMRvB%2Bw5Ll4%2FgTRXH7fuYA76Qt9UI3h%2BpMtqMIN4Bli3acfQsvINxxnWrk%2BkR7d3HxostF1ZREkqxbS2Lp7jhW%2FNTnajo%2Bwg5t%2F5UM2ctqV6JJRfrXJNTvvGVafqO8HHWLXU0l%2FZVIg68fYpYcJ1LZQbOqCOYUAgRnWQMLTT87%2BGstuN1kpwUuY9bePPo3i5x1dZOktTc92ANXrWhKM0zG4v6MVIZvLFv9V6ymn09v2j%2FyE2FlX%2FhloQzF5dDsiBlCCFGyi%2Bi8NjXDRaHk0X%2B%2BW5VvDyjzGG0m%2Bwm%2FwCk%2BsMr)
| null | CC BY-SA 4.0 | null | 2022-10-20T06:59:22.567 | 2022-10-20T06:59:22.567 | null | null | 881,441 | null |
74,135,636 | 2 | null | 71,275,043 | 0 | null | Somebody had raised this question to the node.js developers through a github issue - [https://github.com/nodejs/node/issues/30242](https://github.com/nodejs/node/issues/30242).
tl;dr It is not essential for node.js
| null | CC BY-SA 4.0 | null | 2022-10-20T07:00:54.447 | 2022-10-24T17:22:57.630 | 2022-10-24T17:22:57.630 | 11,657,257 | 11,657,257 | null |
74,135,688 | 2 | null | 74,134,322 | 2 | null |
## It can be easily implemented with BasicTextField's decorationBox:
```
@Composable
fun RegistrationCodeInput(codeLength: Int, initialCode: String, onTextChanged: (String) -> Unit) {
val code = remember(initialCode) {
mutableStateOf(TextFieldValue(initialCode, TextRange(initialCode.length)))
}
val focusRequester = FocusRequester()
LaunchedEffect(Unit) {
focusRequester.requestFocus()
}
Box(modifier = Modifier.fillMaxWidth(), contentAlignment = Alignment.Center) {
BasicTextField(
value = code.value,
onValueChange = { onTextChanged(it.text) },
modifier = Modifier.focusRequester(focusRequester = focusRequester),
keyboardOptions = KeyboardOptions.Default.copy(keyboardType = KeyboardType.Number),
decorationBox = {
CodeInputDecoration(code.value.text, codeLength)
}
)
}
}
@Composable
private fun CodeInputDecoration(code: String, length: Int) {
Box(modifier = Modifier) {
Row(horizontalArrangement = Arrangement.Center) {
for (i in 0 until length) {
val text = if (i < code.length) code[i].toString() else ""
CodeEntry(text)
}
}
}
}
@Composable
private fun CodeEntry(text: String) {
Box(
modifier = Modifier
.padding(4.dp)
.width(35.dp)
.height(55.dp),
contentAlignment = Alignment.Center
) {
val color = animateColorAsState(
targetValue = if (text.isEmpty()) Color.Gray.copy(alpha = .8f)
else Color.Blue.copy(.8f)
)
Text(
modifier = Modifier.align(Alignment.Center),
text = text,
fontSize = 20.sp,
fontWeight = FontWeight.Medium,
color = MaterialTheme.colors.onSurface
)
Box(
Modifier
.align(Alignment.BottomCenter)
.padding(start = 6.dp, end = 6.dp, bottom = 8.dp)
.height(2.dp)
.fillMaxWidth()
.background(color.value)
)
}
}
```
# Usage:
```
val otp = remember { mutableStateOf("") }
RegistrationCodeInput(
codeLength = 6,
initialCode = otp.value,
onTextChanged = { otp.value = it }
)
```
[](https://i.stack.imgur.com/MkxqS.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T07:05:59.973 | 2022-10-20T07:05:59.973 | null | null | 15,419,983 | null |
74,136,016 | 2 | null | 15,601,451 | 0 | null | In bootstrap 5 you can use
```
data-bs-offset="10,10"
```
See [tooltips](https://getbootstrap.com/docs/5.2/components/tooltips/)
| null | CC BY-SA 4.0 | null | 2022-10-20T07:35:37.083 | 2022-10-20T07:35:37.083 | null | null | 518,587 | null |
74,136,043 | 2 | null | 74,134,601 | 2 | null | If you missed adding the CSS and JS files of bootstrap 4 in your base.html, add the below file to your code.
```
<!-- bootstrap.min.css -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
<!-- jquery and bootstrap.bundle.min.js -->
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
```
| null | CC BY-SA 4.0 | null | 2022-10-20T07:37:39.933 | 2022-10-20T07:37:39.933 | null | null | 9,936,892 | null |
74,136,138 | 2 | null | 30,352,412 | 0 | null | The viridis scales offer this natively:
```
scale_color_viridis_d()
```
| null | CC BY-SA 4.0 | null | 2022-10-20T07:45:16.893 | 2022-10-20T07:45:16.893 | null | null | 2,152,521 | null |
74,136,397 | 2 | null | 70,420,479 | 0 | null | the only solution that worked for me was this:
```
npm add node-stdlib-browser
npm add -D vite-plugin-node-stdlib-browser
```
and then:
```
// vite.config.js
import { defineConfig } from 'vite'
import nodePolyfills from 'vite-plugin-node-stdlib-browser'
export default defineConfig({
// other options
plugins: [nodePolyfills()]
})
```
| null | CC BY-SA 4.0 | null | 2022-10-20T08:06:30.107 | 2022-10-20T08:06:30.107 | null | null | 1,291,727 | null |
74,136,409 | 2 | null | 23,087,724 | 0 | null | pywinauto works
```
import pywinauto
window_title = "Disable Developer Mode Extensions"
app = pywinauto.Application().connect(name_re=window_title)
win_ext = app.window(name=window_title)
win_ext.close()
```
| null | CC BY-SA 4.0 | null | 2022-10-20T08:07:52.900 | 2022-10-20T08:07:52.900 | null | null | 20,211,379 | null |
74,136,710 | 2 | null | 67,510,348 | 0 | null | Late reply, but for anyone stumbling on this the most straightforward way I found was to use the [preserveModules](https://rollupjs.org/guide/en/#outputpreservemodules) option: .
It does respects the file's relative path, `components/Test.jsx` ends up in `dist/components/Test.js`.
This [issue](https://github.com/rollup/rollup/issues/2216) also suggests you can map things in `input` directly; but that doesn't seem to work when using `rollup` programmatically:
```
export default {
input: {
'module1': 'src/module1.js',
'foo/module2': 'src/foo/module2.js',
'foo/bar/module3': 'src/foo/bar/module3.js',
},
output: {
format: cjs,
dir: 'dist'
}
}
```
| null | CC BY-SA 4.0 | null | 2022-10-20T08:31:40.943 | 2022-10-20T08:31:40.943 | null | null | 3,584,587 | null |
74,136,786 | 2 | null | 27,360,375 | 0 | null | Late replay but check how I solved it.
```
ul li{ display: flex; padding: 10px 0; }
```
```
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.0/css/all.min.css"
/>
<ul>
<li>
<i class="fa-solid fa-check"></i>
Font Awesome is the internet's icon library and toolkit used by millions of
designers, developers, and content creators.
</li>
<li>
<i class="fa-solid fa-check"></i>
Font Awesome is the internet's icon library and toolkit used by millions of
designers, developers, and content creators. Font Awesome is the internet's
icon library and toolkit used by millions of designers, developers, and
content creators.
</li>
<li>
<i class="fa-solid fa-check"></i>
Font Awesome is the internet's icon library and toolkit
</li>
<li>
<i class="fa-solid fa-check"></i>
Font Awesome is the internet's icon library and toolkit used by millions of
designers, developers, and content creators.
</li>
</ul>
```
| null | CC BY-SA 4.0 | null | 2022-10-20T08:37:25.077 | 2022-10-20T08:37:25.077 | null | null | 11,166,949 | null |
74,137,842 | 2 | null | 74,134,493 | 0 | null | The closest thing to what you've shown in your question is a simple [recurring event](https://fullcalendar.io/docs/recurring-events).
For example:
```
{
status: "Pending",
title: "title",
startRecur: "2022-10-19",
endRecur: "2022-10-21",
startTime: '10:00',
endTime: '12:00',
}
```
This will create a series of events occurring between the times specified in `startTime` and `endTime`, which will show on every day between `startRecur` and `endRecur` (the end date being exclusive). See the documentation link above for more details and options.
Demo: [https://codepen.io/ADyson82/pen/ExLBbNO](https://codepen.io/ADyson82/pen/ExLBbNO)
| null | CC BY-SA 4.0 | null | 2022-10-20T09:50:15.897 | 2022-10-20T09:50:15.897 | null | null | 5,947,043 | null |
74,137,872 | 2 | null | 47,778,741 | 0 | null | Prepare `BitmapDescriptor`s first in background (i.e. Coroutines `viewModelScope` or another thread or asynctask or Rxjava), then load them to ui. Dont draw anything inside your `ClusterRenderer` class. Doing so helped me a bit.
| null | CC BY-SA 4.0 | null | 2022-10-20T09:52:32.763 | 2022-10-20T09:52:32.763 | null | null | 10,908,886 | null |
74,138,072 | 2 | null | 74,137,771 | 0 | null | ```
int Tmax=7;
int Mmax=5;
range T=1..Tmax;
range M=1..Mmax;
int d[T]=[1,4,6,8,9,2,3];
dvar int+ x[T][M];
dvar boolean y[T][M];
subject to
{
forall(t in T,m in M) x[t][m]<=y[t][m]*sum(tprime in t..Tmax)d[tprime];
}
```
works fine
| null | CC BY-SA 4.0 | null | 2022-10-20T10:06:35.907 | 2022-10-20T10:06:35.907 | null | null | 3,725,596 | null |
74,138,075 | 2 | null | 74,127,138 | 1 | null | - Don't use an equation inside a table cell. You can use inline math like `$...$` instead- to vertically align the image with the equation, you can use the `valign=m` key from the `adjustbox` package- you shouldn't set multi-letter words in math mode, the kerning will be all wrong. Instead you can use `\text{altrove}`
---
```
\documentclass[12pt]{article}
\usepackage{blindtext}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{subcaption}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage[utf8]{inputenc}
\usepackage{hyperref}
\usepackage{fancyhdr, color}
\usepackage[dvipsnames]{xcolor}
\usepackage[thinc]{esdiff}
\usepackage[export]{adjustbox}
\begin{document}
\begin{itemize}
\item \textbf{Finestra rettangolare e area unitaria:}
\begin{tabular}{c c}
$\displaystyle\Pi(t) =
\begin{cases}
1, & -\frac{1}{2} \leq t \leq -\frac{1}{2} \\
0, & \text{altrove} \\
\end{cases}
$
&
\includegraphics[width=3cm,valign=m]{example-image-duck}
\end{tabular}
\end{itemize}
\end{document}
```
[](https://i.stack.imgur.com/DRw2N.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T10:06:43.973 | 2022-10-20T10:06:43.973 | null | null | 2,777,074 | null |
74,138,237 | 2 | null | 74,136,360 | 0 | null | mongo-express seems to need port 8081 internal, so use another external port to be able to login to the webui.
http://localhost:8092 would then be something like this:
```
mongo_admin:
image: mongo-express
container_name: 'mongoadmin'
networks:
- "spark-net"
depends_on:
- mongo
links:
- mongo
ports:
- "8092:8091"
```
| null | CC BY-SA 4.0 | null | 2022-10-20T10:18:34.910 | 2022-10-21T06:26:03.520 | 2022-10-21T06:26:03.520 | 3,163,418 | 3,163,418 | null |
74,138,424 | 2 | null | 73,676,534 | 1 | null | The concept, I would use, is to set to each line a different animation delay and then trigger the animation event, for example by setting the `.line-mask` width to `0%`.
```
<div class="split-lines">
<div class="line" style="display: block">
Lorem Ipsum is
<div class="line-mask" style="width: 100%; transition: width 0.2s ease-in;"></div>
</div>
<div class="line" style="display: block">
simply dummy text of
<div class="line-mask" style="width: 100%; transition: width 0.4s ease-in;"></div>
</div>
<div class="line" style="display: block">
the printing and
<div class="line-mask" style="width: 100%; transition: width 0.6s ease-in;"></div>
</div>
</div>
```
Here is a working example with the same concept, it doesn't matter if the delay is inline style or as `nth-child` CSS element:

```
let splitLines = document.getElementsByClassName('split-lines');
startAnimation = function() {
let classes = splitLines[0].classList;
classes.remove('animate');
setTimeout(function() {
classes.add('animate');
}, 500);
}
setTimeout(function() {
startAnimation()
}, 1000);
```
```
body {
background: #000;
}
.split-lines {
display: block;
margin: 5% auto;
color: #fff;
font-size: 28px;
line-height: 36px;
width: 50%;
}
.split-lines.animate .line-mask {
width: 0% !important;
transition: width 2s cubic-bezier(0.25, 0, 0.4, 1);
}
.line {
position: relative;
}
.line-mask {
position: absolute;
top: 0;
right: 0;
background-color: #000;
opacity: 0.65;
height: 100%;
width: 100%;
z-index: 2;
transition-delay: 0s;
}
.animate .line:nth-child(1) .line-mask {
transition-delay: 0.2s;
}
.animate .line:nth-child(2) .line-mask {
transition-delay: 0.4s;
}
.animate .line:nth-child(3) .line-mask {
transition-delay: 0.6s;
}
.animate .line:nth-child(4) .line-mask {
transition-delay: 0.8s;
}
.animate .line:nth-child(5) .line-mask {
transition-delay: 1.0s;
}
.animate .line:nth-child(6) .line-mask {
transition-delay: 1.2s;
}
.animate .line:nth-child(7) .line-mask {
transition-delay: 1.4s;
}
.animate .line:nth-child(8) .line-mask {
transition-delay: 1.6s;
}
.animate .line:nth-child(9) .line-mask {
transition-delay: 1.8s;
}
.animate .line:nth-child(10) .line-mask {
transition-delay: 2s;
}
a {
position: absolute;
z-index: 10;
top: 5px;
left: 5px;
background: #444;
padding: 4px 9px;
font-size: 13px;
text-decoration: none;
border-radius: 4px;
color: #ccc;
font-family: sans-serif;
margin: 11px;
}
a:hover {
color: #fff;
}
```
```
<div class="split-lines">
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">Lorem</div>
<div class="word" style="display: inline-block;">Ipsum</div>
<div class="word" style="display: inline-block;">is</div>
<div class="line-mask" style="width: 100%;"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">simply</div>
<div class="word" style="display: inline-block;">dummy</div>
<div class="word" style="display: inline-block;">text</div>
<div class="word" style="display: inline-block;">of</div>
<div class="line-mask" style="width: 100%;"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">the</div>
<div class="word" style="display: inline-block;">printing</div>
<div class="word" style="display: inline-block;">and</div>
<div class="line-mask" style="width: 100%;"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">typesetting</div>
<div class="word" style="display: inline-block;">industry.</div>
<div class="line-mask" style="width: 100%;"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">Lorem</div>
<div class="word" style="display: inline-block;">Ipsum</div>
<div class="word" style="display: inline-block;">has</div>
<div class="line-mask" style="width: 100%;"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">been</div>
<div class="word" style="display: inline-block;">the</div>
<div class="word" style="display: inline-block;">industry's</div>
<div class="line-mask"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">standard</div>
<div class="word" style="display: inline-block;">dummy</div>
<div class="word" style="display: inline-block;">text</div>
<div class="line-mask"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">ever</div>
<div class="word" style="display: inline-block;">since</div>
<div class="word" style="display: inline-block;">the</div>
<div class="word" style="display: inline-block;">1500s,</div>
<div class="line-mask"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">when</div>
<div class="word" style="display: inline-block;">an</div>
<div class="word" style="display: inline-block;">unknown</div>
<div class="line-mask"></div>
</div>
<div class="line" style="display: block; text-align: start; width: 100%;">
<div class="word" style="display: inline-block;">printer</div>
<div class="word" style="display: inline-block;">took</div>
<div class="word" style="display: inline-block;">a</div>
<div class="word" style="display: inline-block;">galley</div>
<div class="line-mask"></div>
</div>
</div>
<a onclick="startAnimation()" href="#">Restart animation</a>
```
---
ps: Using a [SCSS for loop](https://sass-lang.com/documentation/at-rules/control/for) you write really fast the `nth-child` CSS code eg.:
```
$anim_start: 0.0;
$anim_gap: 0.2;
@for $i from 1 through 10 {
.line::nth-child(#{$i}) .line-mask {
transition-delay: #{$anim_start + ($anim_gap * ($i - 1))}s;
}
}
```
Here is the example with SCSS on [CODEPEN](https://codepen.io/wittich-the-sasster/pen/ExLBomj).
| null | CC BY-SA 4.0 | null | 2022-10-20T10:34:07.820 | 2022-10-21T21:24:09.940 | 2022-10-21T21:24:09.940 | 3,001,970 | 3,001,970 | null |
74,138,924 | 2 | null | 10,574,126 | 0 | null | You could use the `filter:drop-shadow()` on your code instead of the default `box-shadow`
Here's an example:
```
div.navbar {
filter: drop-shadow(5px 5px 10px #44444d81);
}
```
This does the trick
| null | CC BY-SA 4.0 | null | 2022-10-20T11:13:07.593 | 2022-10-20T11:13:07.593 | null | null | 11,653,178 | null |
74,139,428 | 2 | null | 71,591,971 | 0 | null | for 3.10.8
install with python with brew command
brew install [email protected]
if you have .zshrc file just edit like this
alias python='python3'
alias pip ='pip'
export PATH="/opt/homebrew/opt/[email protected]/libexec/bin:$PATH"
if you dont have .zshrc file:
cd
vi .zshrc
and copy/paste the line below
alias python='python3'
alias pip ='pip'
export PATH="/opt/homebrew/opt/[email protected]/libexec/bin:$PATH"
| null | CC BY-SA 4.0 | null | 2022-10-20T11:53:00.820 | 2022-10-20T11:58:58.867 | 2022-10-20T11:58:58.867 | 20,291,276 | 20,291,276 | null |
74,139,660 | 2 | null | 26,983,301 | 0 | null | For , you can use class `text-nowrap` instead of rolling your own CSS.
```
<td class="text-nowrap">
```
| null | CC BY-SA 4.0 | null | 2022-10-20T12:09:37.050 | 2022-10-20T12:09:37.050 | null | null | 1,804,678 | null |
74,140,350 | 2 | null | 74,139,906 | 1 | null | Your paths should not be wrapped in `<>`
You want:
```
`DEVELOPER_HOME setenv "/home/evol/developer"
`DEVELOPER_DATA setenv "/home/evol/developer/data"
```
| null | CC BY-SA 4.0 | null | 2022-10-20T13:03:04.287 | 2022-10-20T13:03:04.287 | null | null | 4,256,419 | null |
74,140,400 | 2 | null | 74,135,112 | 0 | null | MySQL will not scan 5 million rows.
First of all, the number shown is just an estimate, e.g. a very rough guess of how many rows get scanned with this index choice. It is calculated to help the optimizer make its decisions.
Additionally, the effect of the limit is not actually reflected in that number at all. It shows you the value it would have had without the limit (but with that index). Try changing the value for the limit, the row estimate will not adjust (assuming the execution plan stays the same).
The estimate value was already calculated in a different step and for a different reason, and the decisionmaking around the limit is done at a different place. And while it would be trivial in your specific case to say how many rows will get scanned at most (it could be less, so even in the simplest of cases there is some uncertainty), in most cases, it really isn't.
Try e.g. your table with `where nick_name = 'yates'` or `where id >= 10000 and nick_name = 'yates'`. What should be the correction if you add a `limit 1`? It could be anywhere between "reduce to 1 row" and "no effect at all".
So noone made a recalculation of the estimated rows, which is a very rough estimate to begin with, to include the estimated effect of the limit, which would also be mostly guesswork. Just to be clear, MySQL is of course aware of the limit and can pick a different index/execution plan if you add a limit. It will just not recalculate that value.
To see the actual rows scanned for your query, you can use e.g. [the profiler](https://dev.mysql.com/doc/mysql-perfschema-excerpt/8.0/en/performance-schema-query-profiling.html) (look at the column `rows_examined`) or, starting with MySQL 8.0.18, you could use [EXPLAIN ANALYZE,](https://dev.mysql.com/doc/refman/8.0/en/explain.html#explain-analyze) which will run the query and show the actual rows read (and the time it took).
| null | CC BY-SA 4.0 | null | 2022-10-20T13:06:37.550 | 2022-10-20T13:06:37.550 | null | null | 6,248,528 | null |
74,140,442 | 2 | null | 74,140,292 | 0 | null | You can use:
```
# identify rows with "-"
m = df['power(kW)'].eq('-')
# or based on non-numbers:
# m = pd.to_numeric(df['power(kW)'], errors='coerce').isna()
# split per group while removing the invalid rows
subdfs = [d for _,d in df[~m].groupby(m.cumsum())]
```
output list:
```
[ Timestamp power(kW) ....
0 2020-01-01 17:50:10 4.32 ...
1 2020-01-01 17:55:15 4.30 ...
2 2020-01-01 18:00:20 3.20 ...,
Timestamp power(kW) ....
4 2020-01-03 12:00:20 6.20 ...]
```
Accessing subdataframes:
```
subdf[0]
Timestamp power(kW) ....
0 2020-01-01 17:50:10 4.32 ...
1 2020-01-01 17:55:15 4.30 ...
2 2020-01-01 18:00:20 3.20 ...
```
One option:
```
subdfs = [d for _,d in df[~m].astype({'Timestamp': 'datetime64',
'power(kW)': float})
.groupby(m.cumsum())]
```
| null | CC BY-SA 4.0 | null | 2022-10-20T13:09:32.220 | 2022-10-20T13:10:56.653 | 2022-10-20T13:10:56.653 | 16,343,464 | 16,343,464 | null |
74,140,533 | 2 | null | 31,514,019 | 0 | null | Just add this code/call this function after snack.show()
...
```
snack.show()
snack.setAnimToUnblockBottomNavBar()
...
private fun Snackbar.setAnimToUnblockBottomNavBar() {
val animator = ValueAnimator.ofInt(0, 150)
animator.addUpdateListener { valueAnimator ->
val valueAnim = valueAnimator.animatedValue
if (valueAnim is Int) {
try {
val snackBarView: View = this.view
val params = snackBarView.layoutParams as FrameLayout.LayoutParams
params.setMargins(0, 0, 0, valueAnim)
snackBarView.layoutParams = params
} catch (_: Exception) { /* do nothing */ }
}
}
animator.start()
}
```
| null | CC BY-SA 4.0 | null | 2022-10-20T13:16:49.533 | 2022-10-20T16:43:27.373 | 2022-10-20T16:43:27.373 | 20,232,964 | 20,232,964 | null |
74,140,545 | 2 | null | 73,975,368 | -1 | null | install the php extentions like php intelisense from here [php intelephense](https://marketplace.visualstudio.com/items?itemName=bmewburn.vscode-intelephense-client)
| null | CC BY-SA 4.0 | null | 2022-10-20T13:17:59.933 | 2022-12-31T11:04:20.930 | 2022-12-31T11:04:20.930 | 19,878,978 | 19,878,978 | null |
74,140,779 | 2 | null | 74,140,584 | -1 | null | Let's assume that all the phone numbers in your table are "spelled" the same way. For example, let's assume that `+1.212.555.1212` and `(212)555-1212` are different phone numbers, even though they, according to the North American Dialing Plan, reach the same telephone. Every country has similar alternative phone number "spellings".
Handling phone numbers in the real world is a giant hairball. [Read Falsehood Programmers Believe About Phone Numbers](https://github.com/google/libphonenumber/blob/master/FALSEHOODS.md). But, let's leave that aside.
You should start with a subquery to find all the numbers that appear more than once. This is it
```
SELECT custPhone
FROM Customer
GROUP BY custPhone
HAVING COUNT(*) > 1
```
You're a student. You should strive to completely understand this subquery. Start by running it on your table. HeidiSQL is good for this kind of thing.
Then, use the subquery in a main query.
```
SELECT Customer.*
FROM Customer
JOIN (
SELECT custPhone
FROM Customer
GROUP BY custPhone
HAVING COUNT(*) > 1
) multiple ON Customer.custPhone = multiple.custPhone
ORDER BY custPhone, custName
```
Avoid mixed case in database, table, and column names. It reduces the portability of your data from one server to another.
| null | CC BY-SA 4.0 | null | 2022-10-20T13:34:16.780 | 2022-10-20T18:31:27.957 | 2022-10-20T18:31:27.957 | 205,608 | 205,608 | null |
74,140,765 | 2 | null | 74,139,720 | 3 | null | In spherical coordinates, your point is at `(sin θ cos φ, sin θ sin φ, cos θ)` where `θ = arccos(z)` and `φ = atan2(y, x)`.
Beware of conventions: here, `θ` is the polar angle or inclination and `φ` is the azimuthal angle or azimuth.
Since you want to move your point to `(0, 0, 1)`, you can first set `φ` to zero with a rotation around the z axis, and then set `θ` to zero with a rotation around the y axis.
The first rotation is `Rz(-φ)`:
```
cos φ sin φ 0
-sin φ cos φ 0
0 0 1
```
The second rotation is `Ry(-θ)`:
```
cos θ 0 -sin θ
0 1 0
sin θ 0 cos θ
```
The composition is `Ry(-θ) * Rz(-φ)`:
```
cos θ cos φ cos θ sin φ -sin θ
-sin φ cos φ 0
sin θ cos φ sin θ sin φ cos θ
```
Note that the last row is `(x, y, z)`, which confirms that this point will move to `(0, 0, 1)`.
---
Another way to construct a rotation matrix that takes `(x, y, z)` to `(0, 0, 1)`, is to construct the inverse (that takes `(0, 0, 1)` to `(x, y, z)`) and then transpose it. You need three basis vectors that are perpendicular to each other, one for each column of the matrix. However, since we will transpose the result at the end, we can just consider these vectors to be the rows of the final matrix.
The first vector is `V3 = (x, y, z)`, and this goes into the third row (since we want to move it to the z unit vector). The two other vectors can be computed using the cross-product with some other arbitrary vector. Many games and 3D engines use a "look-at" function that takes an "up" vector because the world usually has a sense of up and down.
Let's take `UP = (0, 1, 0)` as our "up" vector. You can compute `V1 = norm(cross(UP, V3))` and `V2 = cross(V3, V1)`. Depending on the order of arguments, you can flip the sphere (you can also multiply one of the vectors by -1). We don't need to normalize `V2` since `V1` and `V3 are both already unit vectors.
So the vectors are:
```
V3 = (x, y, z)
V1 = norm(cross(UP, V3)) = (z/sqrt(xx+zz), 0, -x/sqrt(xx+zz))
V2 = cross(V3, V1) = (-xy/sqrt(xx+zz), sqrt(xx+zz), -yz/sqrt(xx+zz))
```
And the final rotation matrix, with `S = sqrt(xx+zz)`, is:
```
z/S 0 -x/S
-xy/S S -yz/S
x y z
```
Note that it's different from the one we obtained from `Ry(-θ) * Rz(-φ)`. There are an infinite number of rotation matrices that move a point to another point, because rotations have three degrees of freedom and moving on a surface only has two if you don't consider the final orientation. You can get other results by changing the "up" vector.
| null | CC BY-SA 4.0 | null | 2022-10-20T13:33:18.717 | 2022-10-20T16:24:36.993 | 2022-10-20T16:24:36.993 | 3,854,570 | 3,854,570 | null |
74,141,021 | 2 | null | 74,139,251 | 1 | null | Both problems should be feasible with Gekko but the original appears easier to solve. Here are a few suggestions for the original problem:
- `m.Maximize()`- `sum()``m.sum()``m.sum()``sum()``m.sum()`- `m.min3()`[slack variables](https://apmonitor.com/wiki/index.php/Main/SlackVariables)`s`
```
D = np.array(100)
x = m.Array(m.Var,100,lb=0,ub=2000000)
```
The modified problem has 6000 binary variables and 100 continuous variables. There are 2^6000 potential combinations of those variables so it may take a while to solve, even with the efficient branch and bound method of APOPT. Here are a few suggestions for the modified problem:
-
```
from gekko import GEKKO
import numpy as np
m = GEKKO(remote=False)
ni = 3; nj = 2; nk = 4
# solve AX=B
A = m.Array(m.Var,(ni,nj),lb=0)
X = m.Array(m.Var,(nj,nk),lb=0)
AX = np.dot(A,X)
B = m.Array(m.Var,(ni,nk),lb=0)
# equality constraints
m.Equations([AX[i,j]==B[i,j] for i in range(ni) \
for j in range(nk)])
m.Equation(5==m.sum([m.sum([A[i][j] for i in range(ni)]) \
for j in range(nj)]))
m.Equation(2==m.sum([m.sum([X[i][j] for i in range(nj)]) \
for j in range(nk)]))
# objective function
m.Minimize(m.sum([m.sum([B[i][j] for i in range(ni)]) \
for j in range(nk)]))
m.solve()
print(A)
print(X)
print(B)
```
- `z1``z2``integer=True`[information on using the integer type](https://apmonitor.com/wiki/index.php/Main/IntegerBinaryVariables)- `m=GEKKO(remote=False)`
| null | CC BY-SA 4.0 | null | 2022-10-20T13:48:56.640 | 2022-10-20T13:48:56.640 | null | null | 2,366,941 | null |
74,141,379 | 2 | null | 74,140,584 | -1 | null | ```
SELECT * FROM Customer
WHERE custPhone IN(
SELECT custPhone FROM Customer group by custPhone having count(custPhone) > 1
)
order BY custPhone;
```
Table Data
[click here](https://i.stack.imgur.com/O6bj4.png)
Query Data
[click here](https://i.stack.imgur.com/yDDlt.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T14:13:19.067 | 2022-10-21T07:30:09.540 | 2022-10-21T07:30:09.540 | 14,013,696 | 14,013,696 | null |
74,142,458 | 2 | null | 50,140,371 | 1 | null | I'm sure that there is an analytical solution but I just pulled an all night coding a solution to this problem with a genetic algorithm. I'm not familiar with genetic algorithms, so I sort of just based it off intuition - accordingly, I think this code manages to sit in the intersection of both being moderately intelligent work, and profoundly dumb lmfao. I'll put push it to GitHub if anyone might find it useful. Pic related - converging on decent distribution fit. Given mode and upper and lower 95% confidence interval bounds.
[](https://i.stack.imgur.com/3ZK3Z.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T15:25:26.387 | 2022-10-25T10:52:03.760 | 2022-10-25T10:52:03.760 | 11,717,481 | 13,709,515 | null |
74,142,582 | 2 | null | 74,142,209 | 1 | null | This will probably work if you try with the following
```
<template>
<main v-if="!$fetchState.pending">
<pre>{{ pokemon.sprites.front_shiny }}</pre>
<h1>Normal Image Tag</h1>
<h1>Nuxt Image Tag</h1>
<nuxt-img class="nuxt-img-tag" :src="pokemon.sprites.front_shiny" />
</main>
</template>
<script>
export default {
data() {
return {
pokemon: {},
}
},
async fetch() {
this.pokemon = await this.$axios.$get(
'https://pokeapi.co/api/v2/pokemon/charizard'
)
console.log('poke', this.pokemon)
},
}
</script>
```
You need to have that one in the `nuxt.config.js` file
```
export default {
modules: ['@nuxt/image', '@nuxtjs/axios'],
image: {
domains: ['https://raw.githubusercontent.com'],
},
}
```
since it's referring an external website.
> To enable image optimization on an external website, specify which domains are allowed to be optimized.
Here is the doc related: [https://image.nuxtjs.org/api/options#domains](https://image.nuxtjs.org/api/options#domains)
| null | CC BY-SA 4.0 | null | 2022-10-20T15:34:05.747 | 2022-10-21T08:37:41.233 | 2022-10-21T08:37:41.233 | 8,816,585 | 8,816,585 | null |
74,142,643 | 2 | null | 74,142,209 | 1 | null | In your `nuxt.config` you've specified [domains](https://image.nuxtjs.org/api/options#domains) option for image module. Add your API domain to the array
| null | CC BY-SA 4.0 | null | 2022-10-20T15:39:02.533 | 2022-10-20T15:39:02.533 | null | null | 7,750,063 | null |
74,143,186 | 2 | null | 74,143,101 | 0 | null | Try `subset` argument
```
def color(score):
return [f"background-color:" + (" red;" if score.item() < test.loc['3sigma+', score.name] else "green")]
s = test.style.apply(color, subset=('current value', slice(None)))
s.to_html('74143101.html')
```
[](https://i.stack.imgur.com/f9JLh.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T16:19:12.537 | 2022-10-20T16:58:36.263 | 2022-10-20T16:58:36.263 | 10,315,163 | 10,315,163 | null |
74,143,319 | 2 | null | 30,352,412 | 2 | null | Another option using `scale_colour_gradientn` like this:
```
library(ggplot2)
ggplot(data = df, aes(x = X, y = Y, color = as.integer(category), group = category)) +
geom_line() +
scale_colour_gradientn(name = 'category', colours = c('blue', 'red'))
```

[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2022-10-20T16:29:01.410 | 2022-10-20T16:29:01.410 | null | null | 14,282,714 | null |
74,143,473 | 2 | null | 74,143,307 | 3 | null | This could be done with just two elements and their pseudo-elements. Adjust outer element height and horizontal margin to suit size requirements.
```
.divider {
height: 100px; /* total divider height - could also be fluid */
margin: 0 50px; /* spacing from parent element at sides */
position: relative;
}
.divider::before,
.divider::after {
content: '';
position: absolute;
height: calc(50% - .5px); /* allow for half the border width */
width: calc(50% - .5px); /* allow for half the border width */
}
.divider::before {
border-bottom: 1px dashed #8c8c8c;
border-left: 1px dashed #8c8c8c;
border-bottom-left-radius: 20px;
top: 0;
left: 0;
}
.divider::after {
border-top: 1px dashed #8c8c8c;
border-right: 1px dashed #8c8c8c;
border-top-right-radius: 20px;
right: 0;
bottom: 0;
}
.divider-ends::before,
.divider-ends::after {
content: '•';
position: absolute;
line-height: 0;
color: #8c8c8c;
}
.divider-ends::before {
top: 0;
left: 0;
transform: translateX(-50%); /* shift half of character width */
}
.divider-ends::after {
bottom: 0;
right: 0;
transform: translateX(50%); /* shift half of character width */
}
```
```
<div class="divider">
<div class="divider-ends">
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-20T16:42:16.343 | 2022-10-20T19:00:52.207 | 2022-10-20T19:00:52.207 | 1,264,804 | 1,264,804 | null |
74,143,567 | 2 | null | 74,143,222 | 0 | null | `FullScreenMenu.show(` is a void method, so it cant be use on `child` which accept `Widget`. You use a button to show menu like
```
InkWell(
child: Text("show Menu"),
onTap: () {
FullScreenMenu.show(
context,
items: [
Image.asset('assets/image.png'),
FSMenuItem(
icon: Icon(Icons.ac_unit, color: Colors.white),
text: Text('Make colder'),
gradient: orangeGradient,
onTap: () => print('Cool package check')),
FSMenuItem(
icon: Icon(Icons.wb_sunny, color: Colors.white),
text: Text('Make hotter'),
gradient: blueGradient,
),
],
);
}),
```
| null | CC BY-SA 4.0 | null | 2022-10-20T16:50:34.207 | 2022-10-20T16:50:34.207 | null | null | 10,157,127 | null |
74,143,576 | 2 | null | 74,142,464 | 2 | null | Without no excel version constraint you can use the following assuming your names are in the range `A2:A10` for example:
```
=HSTACK(UNIQUE(A2:A10), COUNTIF(A2:A10,UNIQUE(A2:A10)))
```
It returns in the first column the unique names and the second column the corresponding counts for each unique names.
If you want to have a count by and better to use a like this:
[](https://i.stack.imgur.com/HXq0y.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T16:51:42.280 | 2022-10-20T16:51:42.280 | null | null | 6,237,093 | null |
74,143,755 | 2 | null | 74,143,194 | 0 | null | You can do it by adding `padding: 0` to your css code. What happens behind the scenes is that you are giving a limited height so it seems like not centered, but it is actually.
The CSS code:
```
.swal2-popup.swal2-toast.swal2-show, .swal2-popup.swal2-toast.swal2-hide {
position: fixed !important;
top: 0px !important;
height: 50px !important;
padding: 0;
}
```
[](https://i.stack.imgur.com/pcjFe.png)
[](https://i.stack.imgur.com/eGccj.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T17:07:51.960 | 2022-10-20T19:20:21.260 | 2022-10-20T19:20:21.260 | 14,176,857 | 14,176,857 | null |
74,143,942 | 2 | null | 74,142,464 | 1 | null | When using Office 365 you could use:
```
=LET(data,A1:B12,
_d1,INDEX(data,,1),
_d2,INDEX(data,,2),
u,UNIQUE(data),
_u1,INDEX(u,,1),
_u2,INDEX(u,,2),
m,MMULT(
(TRANSPOSE(_d1)=_u1)*
(TRANSPOSE(_d2)=_u2),
SEQUENCE(COUNTA(_d1),,1,0)
),
HSTACK(u,m))
```
[](https://i.stack.imgur.com/MDpdR.jpg)
In older Excel you can use the following:
In `D2` use: `=IFERROR(INDEX(A$1:A$12,MATCH(0,COUNTIFS($D$1:$D1,$A$1:$A$12,$E$1:$E1,$B$1:$B$12),0)),"")` drag from `D2` to `E12` (or up to when you see empty values).
In `F2` use `=COUNTIFS($A$1:$A$12,$D2,$B$1:$B$12,$E2)` and drag down.
[](https://i.stack.imgur.com/v75Pw.jpg)
| null | CC BY-SA 4.0 | null | 2022-10-20T17:22:48.003 | 2022-10-20T17:50:42.917 | 2022-10-20T17:50:42.917 | 12,634,230 | 12,634,230 | null |
74,144,222 | 2 | null | 67,667,361 | 0 | null | I had the same problema and fixed it with:
Press Ctrl-Shift-P / Cmd-Shift-P (all keyboard shortcuts in this guide are for macOS) and then search for the command .NET: Generate Assets for Build and Debug.
Then try debugging again
| null | CC BY-SA 4.0 | null | 2022-10-20T17:46:44.020 | 2022-10-20T17:46:44.020 | null | null | 12,081,098 | null |
74,144,723 | 2 | null | 74,140,094 | 1 | null | Adding `LaunchMode` to `launchUrl` solved my issue.
This is the changed code.
```
String chatURL = "https://m.me/nagadhat";
var url = Uri.parse(chatURL);
if (await canLaunchUrl(url)) {
await launchUrl(url, mode: LaunchMode.externalApplication);
} else {
throw 'Could not launch $url';
}
```
| null | CC BY-SA 4.0 | null | 2022-10-20T18:31:23.347 | 2022-10-20T18:31:23.347 | null | null | 13,383,161 | null |
74,144,761 | 2 | null | 5,673,065 | 0 | null | For me (VS 2022, .net 6, C # 10) it worked:
1. Import the "ding.wav" file into the main directory.
2. Change in: Properties (ding.wav) - Copy to Output Directory to: Copy always. Later it was enough to: SoundPlayer player = new SoundPlayer("ding.wav");
player.Load ();
player.Play ();
| null | CC BY-SA 4.0 | null | 2022-10-20T18:33:52.097 | 2022-10-20T18:33:52.097 | null | null | 20,294,416 | null |
74,145,255 | 2 | null | 74,063,456 | 0 | null | The easiest way to sort by string length would be to index a separate field that holds the length of the string. So if for example your field name is `item` you could add another field that is `itemLength` and index that. `itemLength` could be a numeric field or a zero padded string field.
| null | CC BY-SA 4.0 | null | 2022-10-20T19:18:36.143 | 2022-10-20T19:18:36.143 | null | null | 1,415,614 | null |
74,145,670 | 2 | null | 73,974,785 | 0 | null | Did not find why the spi slave configuration doesnt work with the PIC24FJ64GP202. We did try a development board Explorer 16 with a PIC24FJ128GA010 and the SPI slave works perfectly with the same above code (except the pinout).
... Still dont know why the PIC24FJ64GP202 gives this issue...
So,
To save the hardware we have for our product, it was possible to switch and use the spi CS pin as an Rx UART instead. The uart works perfectly for our requirements... We were lucky to have that pin configurable in UART on both the ATSAMD51N19 in TX and the PIC24F64GP202 in RX.
| null | CC BY-SA 4.0 | null | 2022-10-20T19:57:34.833 | 2022-10-20T19:57:34.833 | null | null | 4,019,830 | null |
74,145,734 | 2 | null | 6,006,980 | 0 | null | Using Local server with .Net 6 project, follow these two simple steps.
Check appsettings.json file with this settings
```
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"MvcMovieContext": "Server=(localdb)\\mssqllocaldb;Database=YourDBName;Trusted_Connection=True;MultipleActiveResultSets=true"
}
}
```
In SQL SERVER Management Studio you should use "(localdb)\mssqllocaldb" as Server name.
[](https://i.stack.imgur.com/cHZri.png)
| null | CC BY-SA 4.0 | null | 2022-10-20T20:05:07.477 | 2022-10-20T20:05:07.477 | null | null | 7,186,739 | null |
74,145,865 | 2 | null | 74,140,799 | 0 | null | Candle sizes depend on open/close (body) and high/low (wick) prices. These are calculated and displayed automatically by Tradingview.
If you want to draw your own candles and set their heights to whatever you want, you can use the `plotcandle()` function.
> plotcandle(open, high, low, close, title, color, wickcolor, editable,
show_last, bordercolor, display) → void
| null | CC BY-SA 4.0 | null | 2022-10-20T20:16:50.153 | 2022-10-20T20:16:50.153 | null | null | 7,209,631 | null |
74,145,904 | 2 | null | 74,140,828 | 1 | null | Good question about a subtle issue.
What's happening is that `hv.save` exports the "initial" rendering of a HoloViews object, before any subsequent hooks or streams take effect. The initial rendering includes an RGB image that is the result of HoloViews calling Datashader with initial height and width values determined by arguments to the `datashade` call (`height=400` and `width=400` by default). When you are viewing the plot interactively, the initial call is soon updated and overwritten with the size of the actual frame used in the plot as it gets laid out on your screen. Because your screen is usually much larger than 400x400, you won't normally even see the low-res version unless you save the file.
The other issue is that the default height and width are deliberately set to relatively low values, in order not to waste much time on a plot that most users will never see.
If you want the initial save to use a higher resolution, you can add arguments to the `datashade` call with specific values like `height=400, width=1024` or you can just tell it "scale up by 4X" using `pixel_ratio=4`.
You can also set those parameters globally at the start of your script or notebook, if you always want high-res exports:
```
from holoviews.operation.datashader import ResamplingOperation
ResamplingOperation.width=1000
ResamplingOperation.height=1000
ResamplingOperation.pixel_ratio=2
```
Or if you want higher res, you can put those settings into your `~/.config/holoviews/holoviews.rc` file.
| null | CC BY-SA 4.0 | null | 2022-10-20T20:20:12.217 | 2022-10-20T20:20:12.217 | null | null | 5,909,839 | null |
74,146,314 | 2 | null | 74,146,221 | 0 | null | You can use [BoxShadow](https://api.flutter.dev/flutter/painting/BoxShadow-class.html) on [Container](https://api.flutter.dev/flutter/widgets/Container-class.html),
```
Container(
height: 200,
width: 500,
decoration: BoxDecoration(
color: Colors.blue,
boxShadow: [
///modify the way you like, you can have more
BoxShadow(
color: shadowColor,
blurRadius: 4,
offset: Offset(0, 4),
)
],
),
),
```
As for the look, the UI is similar to [Card](https://api.flutter.dev/flutter/material/Card-class.html) widget
```
Card(
elevation: 4, //use it
child: SizedBox(),
),
```
| null | CC BY-SA 4.0 | null | 2022-10-20T21:06:31.423 | 2022-10-20T21:06:31.423 | null | null | 10,157,127 | null |
74,146,691 | 2 | null | 74,146,559 | 1 | null | This layout is called "masonry". I recommend that you check how to do that one in CSS (or with some vanilla JS/package), it's not specific to React nor Vue per-se.
As of how to implement it exactly, SO is not a coding platform so I recommend that you Google that for further progress.
| null | CC BY-SA 4.0 | null | 2022-10-20T21:54:01.360 | 2022-10-20T21:54:01.360 | null | null | 8,816,585 | null |
74,146,795 | 2 | null | 74,146,587 | 1 | null | Use `merge` to join the matrices and substitute 0's for the `NA`'s.
```
Observed<-matrix(c(1,2,3,4,5,6,7,8,9,249,454,54,22,3,6,2),ncol=2, byrow = F)
Expected<-matrix(c(1,2,3,4,5,6,8,284,358,123,17,4),ncol=2, byrow = F)
merge(Expected, Observed, by = "V1", all = TRUE)[-1] -> res
res[] <- lapply(res, \(x) ifelse(is.na(x), 0, x))
names(res) <- c("Expected", "Observed")
res
#> Expected Observed
#> 1 8 9
#> 2 284 249
#> 3 358 454
#> 4 123 54
#> 5 17 22
#> 6 4 3
#> 7 0 6
#> 8 0 2
```
[reprex v2.0.2](https://reprex.tidyverse.org)
But with expected counts of zero, the divisor in the chi-squared statistic is zero and the statistic is infinity:
```
sum((res$Observed - res$Expected)^2/res$Expected)
#[1] Inf
```
So don't do a full join, a left join is the right one.
The first test is computed by hand following the original Pearson formula, see [here](https://en.wikipedia.org/wiki/Chi-squared_test#Pearson%27s_chi-squared_test). The other two are R's `chisq.test` result without and with simulated p-values.
```
merge(Expected, Observed, by = "V1")[-1] -> res2
names(res2) <- c("Expected", "Observed")
chisq <- sum((res2$Observed - res2$Expected)^2/res2$Expected)
chisq
#> [1] 70.6093
df <- nrow(res2) - 1L
pchisq(chisq, df, lower.tail = FALSE)
#> [1] 7.652696e-14
chisq.test(res2)
#> Warning in chisq.test(res2): Chi-squared approximation may be incorrect
#>
#> Pearson's Chi-squared test
#>
#> data: res2
#> X-squared = 41.384, df = 5, p-value = 7.849e-08
chisq.test(res2, simulate.p.value = TRUE, B = 2000)
#>
#> Pearson's Chi-squared test with simulated p-value (based on 2000
#> replicates)
#>
#> data: res2
#> X-squared = 41.384, df = NA, p-value = 0.0004998
```
[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2022-10-20T22:08:37.903 | 2022-10-20T22:27:04.477 | 2022-10-20T22:27:04.477 | 8,245,406 | 8,245,406 | null |
74,147,283 | 2 | null | 74,142,111 | 0 | null | You'll need to add an `:nth-child()` to the row (`<tr>`) as well as column (`<td>`), presuming the rows all have the same pattern of content.
For example:
```
cy.get('table >tbody >tr:nth-child(1) td:nth-child(1) fa-icon:nth-child(1)')
.should('have.length', 1)
.click()
```
or `.eq()` works
```
cy.get('table tbody')
.find('tr').eq(0)
.find('td').eq(0)
.find('fa-icon').eq(0)
.should('have.length', 1)
.click()
```
| null | CC BY-SA 4.0 | null | 2022-10-20T23:28:54.837 | 2022-10-20T23:28:54.837 | null | null | 16,997,707 | null |
74,147,697 | 2 | null | 74,147,365 | 1 | null | Here is an example using de CIFAR10 dataset from TensorFlow. For this task, you can use [NumPy Indexing on 'ndarrays'](https://numpy.org/doc/stable/user/basics.indexing.html#).
```
import tensorflow as tf
from matplotlib import pyplot as plt
import numpy as np
(images, _), (_, _) = tf.keras.datasets.cifar10.load_data()
grid_image = images
fig, axis = plt.subplots(2,2)
axis[0,0].imshow(images[0])
axis[0,1].imshow(images[1])
axis[1,0].imshow(images[2])
axis[1,1].imshow(images[3])
```
[](https://i.stack.imgur.com/0bq6H.png)
```
print(images[0].shape) #shape(h,w,c)
print(images[0].dtype)
plt.imshow(images[0])
```
[](https://i.stack.imgur.com/jWMHU.png)
And here goes the code you need: First, we calculate the shape of the new grid image with the sub-images, considering their height and width. Then we create a new array, filled with zeros and the same data type, with the resulting shape (including the 3-channel dimension).
```
output_shape = (images[0].shape[0]+images[2].shape[0], images[0].shape[1]+images[1].shape[1], 3)
grid_image = np.zeros(output_shape, dtype='uint8')
#add sub image 0
grid_image[ :images[0].shape[0], :images[0].shape[1], :] = images[0]
#add sub image 1
grid_image[ :images[1].shape[0], images[1].shape[1]:, :] = images[1]
#add sub image 2
grid_image[ images[2].shape[0]:, :images[2].shape[1], :] = images[2]
#add sub image 3
grid_image[ images[3].shape[0]:, images[3].shape[1]:, :] = images[3]
print(grid_image.shape)
print(grid_image.dtype)
plt.imshow(grid_image)
```
[](https://i.stack.imgur.com/VwGIa.png)
I hope this may help you.
| null | CC BY-SA 4.0 | null | 2022-10-21T00:53:35.760 | 2022-10-21T01:03:36.470 | 2022-10-21T01:03:36.470 | 20,285,396 | 20,285,396 | null |
74,147,919 | 2 | null | 74,138,751 | 0 | null | Consider the approach below where I used [date_diff()](https://cloud.google.com/bigquery/docs/reference/standard-sql/date_functions#date_diff) to get the difference in unit DAYS.
```
with sample_data as (
select 989 as us_id, datetime('2019-08-17 13:51:34') as created_at
union all select 989 as us_id, datetime('2020-03-01 08:11:41') as created_at
union all select 989 as us_id, datetime('2020-03-01 10:21:20') as created_at
union all select 989 as us_id, datetime('2020-05-27 14:39:28') as created_at
union all select 990 as us_id, datetime('2019-07-10 20:38:22') as created_at
union all select 990 as us_id, datetime('2019-07-12 08:41:23') as created_at
union all select 990 as us_id, datetime('2019-07-16 19:34:31') as created_at
union all select 990 as us_id, datetime('2019-08-06 07:48:45') as created_at
union all select 990 as us_id, datetime('2019-08-08 10:36:05') as created_at
union all select 990 as us_id, datetime('2019-08-09 13:49:58') as created_at
),
cte as (
select
*,
row_number() over (partition by us_id) as rn,
from sample_data
),
cte2 as (
select
*,
lag(created_at) over (partition by us_id order by rn) as prev_created
from cte
)
select
us_id,
created_at,
prev_created,
date_diff(created_at,prev_created,day) as created_at_diff
from cte2
```
Output:
[](https://i.stack.imgur.com/nFske.png)
| null | CC BY-SA 4.0 | null | 2022-10-21T01:38:33.900 | 2022-10-21T01:38:33.900 | null | null | 14,733,669 | null |
74,147,960 | 2 | null | 74,141,248 | 1 | null | This potential issue is being fixed and tracked on this thread: [https://github.com/dotnet/maui/issues/3877](https://github.com/dotnet/maui/issues/3877)
I tested it using `Visual Studio 17.3.5` and the `label` in the `TitleView` was shown in the contentpage.
In your , change it like below:
```
MainPage = new NavigationPage(new MainPage());
```
| null | CC BY-SA 4.0 | null | 2022-10-21T01:48:38.747 | 2022-10-28T06:38:55.360 | 2022-10-28T06:38:55.360 | 9,644,964 | 9,644,964 | null |
74,148,104 | 2 | null | 18,183,602 | 0 | null | I had the same problem. And I solve it by creating my own marker. I follow the step of this blog [http://cubussapiens.hu/2011/05/custom-markers-and-annotations-the-bright-side-of-eclipse/](http://cubussapiens.hu/2011/05/custom-markers-and-annotations-the-bright-side-of-eclipse/) and create a marker when the lineNumber changed. It will highlight this line.
| null | CC BY-SA 4.0 | null | 2022-10-21T02:17:49.553 | 2022-10-21T02:20:00.063 | 2022-10-21T02:20:00.063 | 19,614,319 | 19,614,319 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.