Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75,446,474 | 2 | null | 75,446,385 | 0 | null | First of all [UNet and the HLAPI are deprecated](https://support.unity.com/hc/en-us/articles/360001252086-UNet-Deprecation-FAQ) .. there is now [Netcode for GameObject](https://docs-multiplayer.unity3d.com/netcode/current/installation/upgrade_from_UNet).
And then you are looking at the packages that already are installed in the project.
To view all available packages change the [Packages drop-down](https://docs.unity3d.com/Manual/upm-ui-filter.html) from `In Project` to `Unity Registry`
| null | CC BY-SA 4.0 | null | 2023-02-14T10:25:48.873 | 2023-02-14T10:25:48.873 | null | null | 7,111,561 | null |
75,446,489 | 2 | null | 75,432,853 | 1 | null | I have tried to update your code with few html and css changes. Check will this work for you.
```
.image-container {
overflow-y: hidden;
width: 100%;
}
.wrapper {
width: 100%;
display: flex;
flex-direction: row;
}
.container {
margin: 10px;
width: 33%;
border: 1px solid black;
position: relative;
display: flex;
flex-direction: column;
}
.caption {
position: relative;
text-align: center;
border-top: 1px solid black;
}
.image{
position: relative;
}
img {
position: relative;
}
.ellipsis {
display: block;
position: relative;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
padding: .5rem 1rem;
}
.tooltiptext {
visibility: hidden;
display: none;
opacity: 0;
transition: opacity 0.5s ease;
}
.ellipsis:hover {
cursor: pointer;
}
.ellipsis:hover+.tooltiptext {
visibility: visible;
display: block;
opacity: 1;
position: absolute;
bottom: 0;
background-color: #000;
border-radius: 7px;
color: #fff;
font-size: 15px;
line-height: 20px;
width: 90%;
padding: 10px;
pointer-events: none;
}
```
```
<div class="image-container">
<div class="wrapper">
<div class='container p-1'>
<div class="image">
<img style='width: 100%; height: 200px;' src="http://ecx.images-amazon.com/images/I/518Se4188mL.jpg">
<div class="caption">Product Title</div>
<small class='ellipsis'>Electrolux EENB54EB Ultraenergica Classic Aspirapolvere</small>
<span class="tooltiptext">Electrolux EENB54EB Ultraenergica Classic Aspirapolvere</span>
</div>
</div>
<div class='container p-1'>
<div class="image">
<img style='width: 100%; height: 200px;' src="http://ecx.images-amazon.com/images/I/518Se4188mL.jpg">
<div class="caption">Left Product Title</div>
<small class='ellipsis'>Amore Legno Sforza segnalibro, segnalibro particolare, segnalibro legno, segnalibro laurea, idea regalo, segnalibri regali, regali originali per amiche, portafortuna da regalare, made in Italy</small>
<span class="tooltiptext">Amore Legno Sforza segnalibro, segnalibro particolare, segnalibro legno, segnalibro laurea, idea regalo, segnalibri regali, regali originali per amiche, portafortuna da regalare, made in Italy</span>
</div>
</div>
<div class='container p-1'>
<div class="image">
<img style='width: 100%; height: 200px;' src="http://ecx.images-amazon.com/images/I/518Se4188mL.jpg">
<div class="caption">Right Product Title</div>
<small class='ellipsis'>Amore Legno Sforza segnalibro, segnalibro particolare, segnalibro legno, segnalibro laurea, idea regalo, segnalibri regali, regali originali per amiche, portafortuna da regalare, made in Italy</small>
<span class="tooltiptext">Third Legno Sforza segnalibro, segnalibro particolare, segnalibro legno, segnalibro laurea, idea regalo, segnalibri regali, regali originali per amiche, portafortuna da regalare, made in Italy</span>
</div>
</div>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-14T10:27:17.273 | 2023-02-14T10:27:17.273 | null | null | 20,830,935 | null |
75,446,519 | 2 | null | 71,690,222 | 0 | null | ```
Box(
modifier = Modifier
.size(100.dp)
.clip(RoundedCornerShape(25))
.background(Color.Blue)
```
In Modifier order metters so we have to add background at last.
| null | CC BY-SA 4.0 | null | 2023-02-14T10:29:03.913 | 2023-02-14T10:29:03.913 | null | null | 5,726,273 | null |
75,446,553 | 2 | null | 75,446,209 | 0 | null | Try this :
```
ggplot(df, aes(x=time, y=CO, color = regime,size=regime)) +
geom_point(alpha=.5) +
theme(legend.position = "bottom") +
scale_size_manual(values=c("LA"=5,"PAn"=1,"So"=5))
```
Tinker with the values as needed
warning; be consistent as to whether your 3rd regime is So or SoL as you've shown us both ...
| null | CC BY-SA 4.0 | null | 2023-02-14T10:31:26.623 | 2023-02-14T10:31:26.623 | null | null | 11,726,436 | null |
75,447,104 | 2 | null | 13,668,871 | 0 | null | I tried this and it's working by my side:
```
jdbc:mysql://localhost:3306/wso2_test?useUnicode=true&characterEncoding=UTF-8
```
| null | CC BY-SA 4.0 | null | 2023-02-14T11:22:35.810 | 2023-02-14T11:22:35.810 | null | null | 8,370,334 | null |
75,447,137 | 2 | null | 75,283,390 | 0 | null | Just edit the code with three functions:: To show it like below image:[](https://i.stack.imgur.com/aPAqx.jpg)[](https://i.stack.imgur.com/3uiMb.jpg)
```
@objc func onMinusClick(_ sender: UIButton) {
let section = (sender.tag / 10) - 10
let row = sender.tag % 10
var value = Int(self.itemValue[section][row]) ?? 0
value -= 1
if value < 0 {
value = 0
}
self.itemValue[section][row] = "\(value)"
let indexPath = IndexPath(row: row, section: section)
if let cell = self.tableView.cellForRow(at: indexPath) as? AdditionalGuestInforTVCell {
cell.lblValue.text = self.itemValue[section][row]
}
calculateTotal()
}
@objc func onPlusClick(_ sender: UIButton) {
let section = (sender.tag / 10) - 10
let row = sender.tag % 10
var value = Int(self.itemValue[section][row]) ?? 0
value += 1
self.itemValue[section][row] = "\(value)"
let indexPath = IndexPath(row: row, section: section)
if let cell = self.tableView.cellForRow(at: indexPath) as? AdditionalGuestInforTVCell {
cell.lblValue.text = self.itemValue[section][row]
}
calculateTotal()
}
func calculateTotal() {
var total = 0
for i in 0..<itemValue.count {
for j in 0..<itemValue[i].count {
total += Int(itemValue[i][j]) ?? 0
}
}
let totalMembers = dicMember.count
let totalMembersLabel = UILabel(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 80))
totalMembersLabel.text = "Sankhya: \(totalMembers)\nGuest Sankhya: \(total) \nTotal Sankhya: \(totalMembers + total)"
totalMembersLabel.numberOfLines = 5
totalMembersLabel.textAlignment = .center
totalMembersLabel.font = UIFont.boldSystemFont(ofSize: 18)
tableView.tableHeaderView = totalMembersLabel
let label = UILabel(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 80))
label.text = " Guest Sankhya: \(total)"
label.textAlignment = .right
label.font = UIFont.systemFont(ofSize: 12)
tableView.tableFooterView = label
let combinedLabel = UILabel(frame: CGRect(x: 0, y: 0, width: tableView.frame.width, height: 80))
combinedLabel.text = "Guest Sankhya: \(total) "
combinedLabel.textAlignment = .center
combinedLabel.font = UIFont.boldSystemFont(ofSize: 18)
tableView.tableFooterView = combinedLabel
}
```
call calculateTotal() inside tableView for viewForHeaderInSection
```
//existing code
calculateTotal()
}
```
| null | CC BY-SA 4.0 | null | 2023-02-14T11:25:34.423 | 2023-02-14T11:32:16.453 | 2023-02-14T11:32:16.453 | 20,925,367 | 20,925,367 | null |
75,447,185 | 2 | null | 5,667,454 | 0 | null |
## How to play MP3 from Java without plugin
If you must use Java Sound API you will need to get an MP3 plugin.
However, if you want to play MP3 from Java without any plugin then you can use Runtime and Process to get a OS command line utility to play the MP3 file. For example, here is how to do it in macOS:
```
public class Play {
public static void main(String[] args) throws Exception {
Runtime rt = Runtime.getRuntime();
Process p=rt.exec(new String[] {
"afplay",
"/some/path/tester.mp3"
});
p.waitFor();
}
}
```
This example uses macOS command-line utility "afplay". I guess there are similar command-line utilities in Windows, Linux etc.
The above code uses "p.waitFor()" to wait until the MP3 file finishes playing. That way you can play lots of MP3 files one-after-the-other with a Java loop.
| null | CC BY-SA 4.0 | null | 2023-02-14T11:28:43.553 | 2023-02-14T11:28:43.553 | null | null | 1,432,734 | null |
75,447,289 | 2 | null | 75,446,948 | 0 | null | Try to add parent div for lines and use `Flex` property for that. So, you get equal distance in all the responsive windows. Below is the sample code for your image.
```
<!DOCTYPE html>
<html>
<head>
<style>
.container{
width: 100%;
position: relative;
display: flex;
box-sizing: border-box;
}
.inner-container {
display: flex;
flex:1;
position: relative;
}
.bar {
flex-grow: .8;
display: flex;
height: 20px;
background-color: lightblue;
}
.blackline {
width: 10px;
height: 20px;
background-color: black;
position: absolute;
z-index: 1;
right: 0;
}
.line-container {
display: flex;
justify-content: space-between;
width: 100%;
position: absolute;
height: 100%;
top: 100%;
}
.line {
width: 1px;
height: 100%;
background-color: #000000;
}
</style>
</head>
<body>
<div class="container">
<div class="inner-container">
<div class="line-container">
<div class="line line1"></div>
<div class="line line2"></div>
<div class="line line3"></div>
<div class="line line4"></div>
</div>
<div class="bar"></div>
<div class="blackline"></div>
</div>
</div>
</body>
</html>
```
| null | CC BY-SA 4.0 | null | 2023-02-14T11:39:15.273 | 2023-02-14T11:39:15.273 | null | null | 10,759,423 | null |
75,447,420 | 2 | null | 63,209,126 | 0 | null | Adding FLUTTER PPATH to terminal permanently
TYPE: `echo $SHELL`
-
TYPE: `$HOME/.bashrc`
-
(Only if the above error accours) TYPE: `touch ~/.zshrc` // this will create a new zshrc file
TYPE: `open $HOME/.zshrc` //to open the file
-
TYPE: `export PATH="$PATH:$HOME/development/flutter/bin"`
TYPE: `source $HOME/.zshrc` //to refresh current terminal window
Now u can run flutter cmds without adding path all times
| null | CC BY-SA 4.0 | null | 2023-02-14T11:50:09.427 | 2023-02-14T11:50:09.427 | null | null | 10,579,969 | null |
75,447,580 | 2 | null | 67,868,703 | 0 | null | Another method is to use the tbody-tr-class to pass a function (e.g. :tbody-tr-class="rowClass", you can then make a decision based on the data to apply a class. I use this to remove borders, add bold to totals and increase the border between rows.
```
<style lang="scss">
.tbl-big-border {
border-top-color: black;
border-top-style: solid;
}
.tbl-noborder {
&>td:nth-child(1) {
border-top: none;
}
}
.tbl-totnoborder {
font-weight: bold;
&>td:nth-child(1) {
border-top: none;
}
}
</style>
```
Then in the row class function you can do this sort of thing:
```
rowClass (item, type) {
if (!item || type !== 'row') return
if (item.id) return 'tbl-border'
return (item.isTot) ? 'totnoborder' : 'tbl-noborder'
}
```
This method allows for application of classes based on the data.
| null | CC BY-SA 4.0 | null | 2023-02-14T12:03:42.603 | 2023-02-14T12:03:42.603 | null | null | 3,208,100 | null |
75,447,650 | 2 | null | 75,446,948 | 0 | null | Here my attempt which utilizing the advantage of flex without `position`. The usage of `position:absolute` is actually breaking the flex position. So I restructure your container and css to have as minimal as it can for the syntax to achieve your desired result.
The magic for the equal sizing of each `.line` is the following:
```
flex-grow: 1;
```
Here a very good reference for understanding flex better: [https://css-tricks.com/snippets/css/a-guide-to-flexbox/](https://css-tricks.com/snippets/css/a-guide-to-flexbox/)
Not sure is it what you want but hope it helps~
```
.container {
width: 100%;
display: flex;
flex-wrap: wrap;
}
.inner-container {
display: flex;
justify-content: space-between;
width: 100%;
}
.bar {
flex-grow: .8;
background-color: lightblue;
}
.blackline {
width: 10px;
height: 20px;
background-color: black;
}
.line {
height: 20px;
border-left: 1px solid black;
flex-grow: 1;
}
.line:last-child {
border-right: 1px solid black;
}
```
```
<div class="container">
<div class="inner-container">
<div class="bar"></div>
<div class="blackline"></div>
</div>
<div class="line line1"></div>
<div class="line line2"></div>
<div class="line line3"></div>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-14T12:10:46.240 | 2023-02-14T12:21:06.003 | 2023-02-14T12:21:06.003 | 4,679,429 | 4,679,429 | null |
75,447,714 | 2 | null | 75,447,175 | 0 | null | I did not understand your question properly, however I assume the below.
- -
So, here you can use the hook, useEffect having the dependency on isSuccess, like below.
```
useEffect(()=>{
if(isSuccess === true){
//set of code to do something on change of isSuccess
}
},[isSuccess])
```
Also inside the component if you want to render something only when isSuccess is true then you can add like below.
```
<>
{isSuccess && <div> this displays only when isSuccess is true!! </div> }
</>
```
Let me know if I have misunderstood, if I need to clarify something else
| null | CC BY-SA 4.0 | null | 2023-02-14T12:16:52.097 | 2023-02-14T12:16:52.097 | null | null | 20,212,948 | null |
75,447,760 | 2 | null | 75,398,665 | 1 | null | Go to :
[](https://i.stack.imgur.com/rhs8K.png)
In the following dialog, you can choose the build configuration:
[](https://i.stack.imgur.com/7aE9j.png)
You can also click to bring it back to the toolbar.
| null | CC BY-SA 4.0 | null | 2023-02-14T12:21:36.300 | 2023-02-14T12:21:36.300 | null | null | 4,919,526 | null |
75,447,824 | 2 | null | 75,447,515 | 0 | null | you need to nest your Navbar inside the BrowseerRouter tag.
Example:
```
<Header/>
<BrowserRouter>
<NavigationBar />
<Routes>
<Route path={"/"}></Route>
<Route path={"/example"}></Route>
</Routes>
</BrowserRouter>
```
| null | CC BY-SA 4.0 | null | 2023-02-14T12:27:16.097 | 2023-02-14T12:27:16.097 | null | null | 21,210,817 | null |
75,447,874 | 2 | null | 75,446,948 | 0 | null | I would use margin on your container instead of padding and use space between on your inner container flex (instead of absolute positioning), then you can absolutely position your lines 1/3rd apart and use right 0 for your last line
```
.container {
width: calc(100% - 100px);
position: relative;
display: flex;
margin-right: 100px;
box-sizing: border-box;
}
.inner-container {
display: flex;
flex-grow: 1;
position: relative;
justify-content: space-between;
}
.bar {
flex-grow: 0.8;
display: flex;
height: 20px;
background-color: lightblue;
}
.blackline {
width: 10px;
height: 20px;
background-color: black;
}
.line {
width: 1px;
height: 100%;
position: absolute;
background-color: #000000;
margin-top: 2%;
}
.line1 {
left: 0;
}
.line2 {
left: 33.3333%;
}
.line3 {
left: 66.6667%;
}
.line4 {
right: 0;
}
```
```
<div class="container">
<div class="line line1"></div>
<div class="line line2"></div>
<div class="line line3"></div>
<div class="line line4"></div>
<div class="inner-container">
<div class="bar"></div>
<div class="blackline"></div>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-14T12:31:38.013 | 2023-02-14T12:31:38.013 | null | null | 1,790,982 | null |
75,448,132 | 2 | null | 75,433,987 | 0 | null | Your application runs on posts (http) and (https).
In your docker compose file you need to forward the proper ports for http/https
```
ports:
- "8001:5201"
- "8002:7201"
```
And also set keycloack in the same port in docker or adapt your connection strings to use new port (5436)
| null | CC BY-SA 4.0 | null | 2023-02-14T12:54:15.267 | 2023-02-14T12:54:15.267 | null | null | 5,015,766 | null |
75,448,432 | 2 | null | 44,667,916 | 1 | null | using [@Wimukthi Rajapaksha](https://stackoverflow.com/users/10505343/wimukthi-rajapaksha) answer:
```
Snackbar.make(
getDialog().getWindow().getDecorView(),
"your-string",
Snackbar.LENGTH_SHORT
).show();
```
you can use the following code line to show it above a certain view, make sure to show the snack bar after setting anchor view not before.
`snackBar.anchorView = -Your view-`
| null | CC BY-SA 4.0 | null | 2023-02-14T13:18:54.950 | 2023-02-14T13:18:54.950 | null | null | 15,332,207 | null |
75,448,492 | 2 | null | 75,448,383 | 0 | null | You need to reverse line 16 with line 17 in your first image for the pattern matching to works.
| null | CC BY-SA 4.0 | null | 2023-02-14T13:25:11.350 | 2023-02-14T13:25:11.350 | null | null | 20,700,690 | null |
75,448,720 | 2 | null | 75,448,038 | 2 | null | Well, there are too little code to analyze. I suspect that
```
DictionaryWords += ss;
```
is the felon: appending string `130000` times which means quite long string can well put the system on the knees, but I have not rigorous proof (I've asked about `DictionaryWords` in the comment). Another possible candidate to be blamed is the unknown for me your .
That's why let me try to solve the problem from scratch.
- `SI-utf8.Txt`- -
I have got something like this:
```
using System.IO;
using System.Linq;
using System.Threading.Tasks;
...
// Loading dictionary (async, since dictionary can be quite long)
// static: we want just one dictionary for all the instances
private static readonly Task<IReadOnlyDictionary<string, string>> s_Dictionary =
Task<IReadOnlyDictionary<string, string>>.Run(() => {
char[] delimiters = { ' ', '\t' };
IReadOnlyDictionary<string, string> result = File
.ReadLines(@"SI-utf8.Txt")
.Where(line => !string.IsNullOrWhiteSpace(line))
.Select(line => line.Split(delimiters, StringSplitOptions.RemoveEmptyEntries))
.Where(items => items.Length == 2)
.ToDictionary(items => items[0],
items => items[1],
StringComparer.OrdinalIgnoreCase);
return result;
});
```
Then we need a translation part:
```
// Let it be the simplest regex: English letters and apostrophes;
// you can improve it if you like
private static readonly Regex s_EnglishWords = new Regex("[A-Za-z']+");
// Tanslation is async, since we have to wait for dictionary to be loaded
private static async Task<string> Translate(string englishText) {
if (string.IsNullOrWhiteSpace(englishText))
return englishText;
var dictionary = await s_Dictionary;
return s_EnglishWords.Replace(englishText,
match => dictionary.TryGetValue(match.Value, out var translation)
? translation // if we know the translation
: match.Value); // if we don't know the translation
}
```
Usage:
```
// Note, that button event should be async as well
private async void button1_Click(object sender, EventArgs e) {
TranslationTextBox.Text = await Translate(OriginalTextBox.Text);
}
```
So, `DictionaryWords` is a `string` and thus
```
DictionaryWords += ss;
```
is a . Please, don't append `string` in a (deep) loop: each append the string which is slow. If you insist on the looping, use `StringBuilder`:
```
// Let's pre-allocate a buffer for 6 million chars
StringBuilder sb = new StringBuilder(6 * 1024 * 1024);
using (StreamReader sr = File.OpenText(fileName))
{
while ((ss = sr.ReadLine()) != null)
{
sb.Append(ss);
}
}
DictionaryWords = sb.ToString();
```
Or, why should you loop at all? Let .net do the work for you:
```
DictionaryWords = File.ReadAllText(@"SI-utf8.Txt");
```
If actual file size is not (it is `DictionaryWords += ss;` who spoils the fun) you can stick to a simple synchronous solution:
```
private static readonly Regex s_EnglishWords = new Regex("[A-Za-z']+");
private static readonly IReadOnlyDictionary<string, string> s_Dictionary = File
.ReadLines(@"SI-utf8.Txt")
.Where(line => !string.IsNullOrWhiteSpace(line))
.Select(line => line.Split(new char[] { ' ', '\t' },
StringSplitOptions.RemoveEmptyEntries))
.Where(items => items.Length == 2)
.ToDictionary(items => items[0],
items => items[1],
StringComparer.OrdinalIgnoreCase);
private static string Translate(string englishText) {
if (string.IsNullOrWhiteSpace(englishText))
return englishText;
return s_EnglishWords.Replace(englishText,
match => s_Dictionary.TryGetValue(match.Value, out var translation)
? translation
: match.Value);
}
```
An then the usage is quite simple:
```
// Note, that button event should be async as well
private void button1_Click(object sender, EventArgs e) {
TranslationTextBox.Text = Translate(OriginalTextBox.Text);
}
```
| null | CC BY-SA 4.0 | null | 2023-02-14T13:43:46.303 | 2023-02-14T15:34:26.710 | 2023-02-14T15:34:26.710 | 2,319,407 | 2,319,407 | null |
75,448,769 | 2 | null | 75,446,498 | 0 | null | You can do this, using this macro (there might be some errors in it):
```
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 1 Then
Sheets(2).Range("A1").End(xlDown).Offset(1, 0).Value = Target.Value
End If
End Sub
```
For your information, this macro needs to "belong" to your first sheet:
[](https://i.stack.imgur.com/e1gNW.png)
| null | CC BY-SA 4.0 | null | 2023-02-14T13:48:00.387 | 2023-02-14T13:48:00.387 | null | null | 4,279,155 | null |
75,448,894 | 2 | null | 75,447,391 | 0 | null | You will definitely need to clean up your data to fit this solution, but your basic way about this is pivoting from wide to long form.
Then you need to ensure that your dates are the propper POSIXct format.
Then it is just a matter of grouping by your relevant variables and plotting with `geom_line()`
I added the `facet_grid` to separate by `Sample.Id`.
```
library(tidyverse)
#> Warning: pakke 'ggplot2' blev bygget under R version 4.2.2
#> Warning: pakke 'tidyr' blev bygget under R version 4.2.2
#> Warning: pakke 'purrr' blev bygget under R version 4.2.2
#> Warning: pakke 'dplyr' blev bygget under R version 4.2.2
#> Warning: pakke 'stringr' blev bygget under R version 4.2.2
#> Warning: pakke 'forcats' blev bygget under R version 4.2.2
df <- structure(list(Sample.Id = c("2", "2", "2", "2", "2", "2", "2",
"2", "2", "2", "3", "3", "3", "3", "3", "3", "3", "3", "3"),
Sampling..Date = c("08-Sep-14", "14-Oct-14", "02-Nov-14",
"21-Nov-14", "03-Dec-14", "15-Dec-14", "11-Jan-15", "08-Feb-15",
"01-Mar-15", "06-Apr-15", "03-Sep-14", "08-Sep-14", "14-Oct-14",
"02-Nov-14", "21-Nov-14", "03-Dec-14", "15-Dec-14", "11-Jan-15",
"26-Jan-15"), Tot.P = c("0.002", "0.017", "0.035", "0.04",
"0.059", "0.155", "0.021", "0.022", "0.025", "<0.009", "0.021",
"0.003", "0.036", "0.141", "0.041", "0.044", "0.01", "0.023",
"0.016"), DOC = c(NA, "12.3", "13.4", "12.5", "9.9", "14.7",
"8.8", "8.3", "0.026", "7.5", "13.4", NA, "14.6", "16.6",
"14.7", "12.6", "12.6", "10.6", "11.4"), Tot.N = c(NA, "3.63",
"4.12", "3.98", "4.08", "3.38", "3.63", "4.88", "8.3", "2.74",
"2.48", NA, "3.07", "3.38", "3.3", "3.43", "2.19", "2.77",
"4.25"), DOC.1 = c("13.6", NA, NA, NA, NA, NA, NA, NA, NA,
NA, "14.44", "16.85", NA, NA, NA, NA, NA, NA, NA)), row.names = 2:20, class = "data.frame")
df |>
mutate(Tot.P = str_replace(Tot.P, "<", ""),
across(Tot.P:DOC.1, as.numeric),
Sampling..Date = as.POSIXct(Sampling..Date, format = "%d-%b-%y")) |>
select(-c(DOC.1)) |>
pivot_longer(cols = c(Tot.P, DOC, Tot.N)) |>
ggplot(aes(x = Sampling..Date, y = value, group = name, col = name)) +
geom_line() +
facet_grid(~Sample.Id)
#> Warning: Removed 5 rows containing missing values (`geom_line()`).
```

[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2023-02-14T13:59:29.713 | 2023-02-14T13:59:29.713 | null | null | 13,044,702 | null |
75,449,177 | 2 | null | 75,436,358 | 0 | null | You can try CSS pseudo class for that. Below I'm giving one blog read from Gleb which highlight different techniques for HTML form validation:
Your code will be look more or less similar to this after that:
```
cy.get('#form-validation').within(() => {
cy.get('#email').invoke('prop', 'validationMessage')
.should('equal', 'YOUR TEXT IN THE ERROR MESSAGE...')
}
```
Gleb's Blog: [https://glebbahmutov.com/blog/form-validation-in-cypress/](https://glebbahmutov.com/blog/form-validation-in-cypress/)
| null | CC BY-SA 4.0 | null | 2023-02-14T14:21:34.220 | 2023-02-14T14:21:34.220 | null | null | 17,601,619 | null |
75,449,785 | 2 | null | 75,449,643 | 0 | null | You could use `$push`
```
User.updateOne({_id: userId}, { $push: { vitalSigns: data } })
```
| null | CC BY-SA 4.0 | null | 2023-02-14T15:09:57.483 | 2023-02-14T15:09:57.483 | null | null | 10,990,737 | null |
75,449,959 | 2 | null | 75,449,643 | 0 | null | Use `$` to access the array element matched.
```
db.collection.update({
"vitalSigns._id": "vs1"
},
{
$set: {
"vitalSigns.$.modified": true
}
})
```
[Mongo Playground](https://mongoplayground.net/p/GfsDIGvJW0C)
| null | CC BY-SA 4.0 | null | 2023-02-14T15:24:47.330 | 2023-02-14T15:24:47.330 | null | null | 14,732,669 | null |
75,450,492 | 2 | null | 75,450,228 | 1 | null | `cy.contains('button', 'Ano').should('be.visible').click();` should work.
| null | CC BY-SA 4.0 | null | 2023-02-14T16:13:01.967 | 2023-02-14T16:13:01.967 | null | null | 9,923,709 | null |
75,450,689 | 2 | null | 26,432,479 | 0 | null | In my case setting default encoding is not enough, have to create properties files in UTF-8 format also.
For more details please refer [SpringBoot - UTF-8 Doesnt work in messages.properties](https://stackoverflow.com/questions/28112852/springboot-utf-8-doesnt-work-in-messages-properties)
| null | CC BY-SA 4.0 | null | 2023-02-14T16:29:48.040 | 2023-02-14T16:29:48.040 | null | null | 9,869,394 | null |
75,450,759 | 2 | null | 75,396,294 | 2 | null | I have faced the similar problem and i got to know that this is because of settings.
check your JWT default authentication class and AUTH_USER_MODEL. you are working on 3 models. hence u need to override some functions that uses default user model. all the best
| null | CC BY-SA 4.0 | null | 2023-02-14T16:37:10.393 | 2023-02-14T16:51:51.390 | 2023-02-14T16:51:51.390 | 21,213,092 | 21,213,092 | null |
75,450,962 | 2 | null | 75,255,858 | 0 | null | You are getting this error message due to not having the kernel headers installed so the eBPF driver can be compiled.
Before compiling the eBPF driver, the loader script tries to download it from [https://download.falco.org](https://download.falco.org), but it doesn't find it because the Oracle Linux distribution is not officially supported (it is not offered as a prebuilt driver, to be more precise).
The quickest solution would be to on each Kubernetes node, so Falco can compile the driver the next time it tries to start.
It is also possible to use the project Driverkit to build Falco drivers on your own (as the Falco project does) and make them available somewhere else, but then you'd need to pass the URL for the driver to the Helm Chart. This avoids polluting the system with packages you'd need only once.
You are also welcome to contribute to the project by adding support for the Oracle Linux distribution, which is relatively simple since it is quite similar to the Red Hat distribution. Once it is supported, the drivers will be available to anyone using the same kernel/distribution.
For further information, you can visit the [Falco Slack channel](https://kubernetes.slack.com/archives/CMWH3EH32) and ask for help there, or ping anyone in the community
| null | CC BY-SA 4.0 | null | 2023-02-14T16:54:39.273 | 2023-02-14T16:54:39.273 | null | null | 5,203,859 | null |
75,451,208 | 2 | null | 75,450,843 | 1 | null | You can use Align widget for this case, else provide width or `left` and `right` value.
```
final index = widget.children.indexOf(element);
return Positioned(
top: 200 + (index * 10),
left: 0,
right: 0,
child: Transform.scale(
scale: 1,
child: element,
),
);
```
| null | CC BY-SA 4.0 | null | 2023-02-14T17:19:55.083 | 2023-02-14T17:19:55.083 | null | null | 10,157,127 | null |
75,451,191 | 2 | null | 22,041,699 | 0 | null | For anyone using [Emgu.CV](https://github.com/emgucv/emgucv) or [OpenCvSharp](https://github.com/shimat/opencvsharp) wrapper in .NET, there's a C# implement of [Lars Schillingmann's answer](https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c/24352524#24352524):
## Emgu.CV:
```
using Emgu.CV;
using Emgu.CV.CvEnum;
using Emgu.CV.Structure;
public static class MatExtension
{
/// <summary>
/// <see>https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c/75451191#75451191</see>
/// </summary>
public static Mat Rotate(this Mat src, float degrees)
{
degrees = -degrees; // counter-clockwise to clockwise
var center = new PointF((src.Width - 1) / 2f, (src.Height - 1) / 2f);
var rotationMat = new Mat();
CvInvoke.GetRotationMatrix2D(center, degrees, 1, rotationMat);
var boundingRect = new RotatedRect(new(), src.Size, degrees).MinAreaRect();
rotationMat.Set(0, 2, rotationMat.Get<double>(0, 2) + (boundingRect.Width / 2f) - (src.Width / 2f));
rotationMat.Set(1, 2, rotationMat.Get<double>(1, 2) + (boundingRect.Height / 2f) - (src.Height / 2f));
var rotatedSrc = new Mat();
CvInvoke.WarpAffine(src, rotatedSrc, rotationMat, boundingRect.Size);
return rotatedSrc;
}
/// <summary>
/// <see>https://stackoverflow.com/questions/32255440/how-can-i-get-and-set-pixel-values-of-an-emgucv-mat-image/69537504#69537504</see>
/// </summary>
public static unsafe void Set<T>(this Mat mat, int row, int col, T value) where T : struct =>
_ = new Span<T>(mat.DataPointer.ToPointer(), mat.Rows * mat.Cols * mat.ElementSize)
{
[(row * mat.Cols) + col] = value
};
public static unsafe T Get<T>(this Mat mat, int row, int col) where T : struct =>
new ReadOnlySpan<T>(mat.DataPointer.ToPointer(), mat.Rows * mat.Cols * mat.ElementSize)
[(row * mat.Cols) + col];
}
```
## OpenCvSharp:
OpenCvSharp already has [Mat.Set<>](https://github.com/shimat/opencvsharp/blob/02e66002ab2037a2237a6292d4ad8c31dd695b6f/src/OpenCvSharp/Modules/core/Mat/Mat.cs#L3336) method that functions same as [mat.at<>](https://docs.opencv.org/4.7.0/d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726) in the original OpenCV, so we don't have to copy these methods from [How can I get and set pixel values of an EmguCV Mat image?](https://stackoverflow.com/questions/32255440/how-can-i-get-and-set-pixel-values-of-an-emgucv-mat-image/69537504#69537504)
```
using OpenCvSharp;
public static class MatExtension
{
/// <summary>
/// <see>https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c/75451191#75451191</see>
/// </summary>
public static Mat Rotate(this Mat src, float degrees)
{
degrees = -degrees; // counter-clockwise to clockwise
var center = new Point2f((src.Width - 1) / 2f, (src.Height - 1) / 2f);
var rotationMat = Cv2.GetRotationMatrix2D(center, degrees, 1);
var boundingRect = new RotatedRect(new(), new Size2f(src.Width, src.Height), degrees).BoundingRect();
rotationMat.Set(0, 2, rotationMat.Get<double>(0, 2) + (boundingRect.Width / 2f) - (src.Width / 2f));
rotationMat.Set(1, 2, rotationMat.Get<double>(1, 2) + (boundingRect.Height / 2f) - (src.Height / 2f));
var rotatedSrc = new Mat();
Cv2.WarpAffine(src, rotatedSrc, rotationMat, boundingRect.Size);
return rotatedSrc;
}
}
```
Also, you may want to mutate the `src` param instead of returning a new clone of it during rotation, for that you can just set the `det` param of `WrapAffine()` as the same with `src`: [c++, opencv: Is it safe to use the same Mat for both source and destination images in filtering operation?](https://stackoverflow.com/questions/22669884/c-opencv-is-it-safe-to-use-the-same-mat-for-both-source-and-destination-imag)
```
CvInvoke.WarpAffine(src, src, rotationMat, boundingRect.Size);
```
This is being called as `in-place mode`: [https://answers.opencv.org/question/24/do-all-opencv-functions-support-in-place-mode-for-their-arguments/](https://answers.opencv.org/question/24/do-all-opencv-functions-support-in-place-mode-for-their-arguments/)
[Can the OpenCV function cvtColor be used to convert a matrix in place?](https://stackoverflow.com/questions/15343791/can-the-opencv-function-cvtcolor-be-used-to-convert-a-matrix-in-place)
| null | CC BY-SA 4.0 | null | 2023-02-14T17:18:03.887 | 2023-02-15T03:39:38.833 | 2023-02-15T03:39:38.833 | 12,576,620 | 12,576,620 | null |
75,451,292 | 2 | null | 75,450,179 | 0 | null | INNER JOINs are commutative operations. that's :
```
A INNER JOIN B <=> B INNER JOIN A
```
So there is no importance of the precendence of tables involved in the INNER JOINs...
The only part that is a little bit different from the report tool is the interval on the date that sould be write with the BETWEEN operator, like this :
```
AND t.ToDate BETWEEN :startDate AND :endDate
```
Some procedural languages use `:anystring` for variables...
| null | CC BY-SA 4.0 | null | 2023-02-14T17:27:25.620 | 2023-02-15T15:27:49.557 | 2023-02-15T15:27:49.557 | 3,043 | 12,659,872 | null |
75,451,471 | 2 | null | 75,449,507 | 0 | null | create a function to check the permission status and request permission if the status is `denied`
```
function getLocation() {
if (navigator.geolocation) {
navigator.permissions.query({name:'geolocation'}).then(permissionStatus => {
if (permissionStatus.state === 'denied') {
alert('Please allow location access.');
window.location.href = "app-settings:location";
} else {
navigator.geolocation.getCurrentPosition(success, error);
}
});
} else {
alert('Geolocation is not supported in your browser.');
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-14T17:46:35.657 | 2023-02-14T17:46:35.657 | null | null | 21,157,729 | null |
75,451,715 | 2 | null | 74,913,801 | 0 | null | There are common things that are often encountered in PHP and Memcache(D) related issues:
1. Do you need the MEMCACHED or the MEMCACHE extension?
2. Is the MEMCACHED server already running? (in your case, that's not the problem yet)
3. Is the installed PHP extension x64 and Threadsafe compatible (as your system requires by looking at your phpinfo).
Personally, I use another PHP extension which works perfectly under PHP7 and PHP8:
[https://pecl.php.net/package/memcached/3.2.0/windows](https://pecl.php.net/package/memcached/3.2.0/windows)
Note: in addition to the usual DLL extension that you will copy to php/ext/ (and enable in your php.ini), you will also need to to a directory belonging to your system path.
| null | CC BY-SA 4.0 | null | 2023-02-14T18:14:01.693 | 2023-02-14T18:14:01.693 | null | null | 10,512,014 | null |
75,452,006 | 2 | null | 30,259,861 | 0 | null | In Xcode 14, if you are editing a XIB file that is inside of a SPM package and you get "Not Applicable" for selection - what fixes it for me is to select the file in the primary folder navigation in the project. If the xib is open via another means (such as Search), it will show as Not Applicable for any properties you want to edit.
| null | CC BY-SA 4.0 | null | 2023-02-14T18:40:37.543 | 2023-02-14T18:40:37.543 | null | null | 5,067,402 | null |
75,452,635 | 2 | null | 75,352,414 | 0 | null | Based on that error message, seems like you don't have `pycaret` properly installed. Do `conda list` to see what packages are installed.
| null | CC BY-SA 4.0 | null | 2023-02-14T19:49:04.187 | 2023-02-14T19:49:04.187 | null | null | 19,787,626 | null |
75,452,638 | 2 | null | 75,452,489 | 0 | null | I fixed it. I used to have the Adobe "Source Code Variable" configured as a custom font on Windows, and synced my settings to Ubuntu.
I didn't have the font installed but installed it a bit ago.
After changing to another font it is normal again. Seems like this specific font makes it look low in contrast.
Setting variable: `editor.fontFamily`
| null | CC BY-SA 4.0 | null | 2023-02-14T19:49:30.123 | 2023-02-14T22:48:27.073 | 2023-02-14T22:48:27.073 | 5,865,844 | 5,865,844 | null |
75,453,116 | 2 | null | 75,453,068 | 1 | null | Assuming your business rules are to round everything up to the nearest 1000th then the following might be what you want:
```
SELECT CEILING(0.0003*1000)/1000;
```
Returns `0.001`
Since `CEILING` only works on whole numbers you need to multiple by 1000 first then divide by 1000 afterwards.
| null | CC BY-SA 4.0 | null | 2023-02-14T20:46:05.123 | 2023-02-15T01:01:56.777 | 2023-02-15T01:01:56.777 | 1,127,428 | 1,127,428 | null |
75,453,132 | 2 | null | 75,188,284 | 0 | null | Yes, you can add a `and/or` clause like below
[](https://i.stack.imgur.com/Jc9Pr.png)
I have a second drop-down list as we have different Teams, so it wants me to tell it which Team I want to bring back items for, from the `@CurrentIteration`.
| null | CC BY-SA 4.0 | null | 2023-02-14T20:48:52.390 | 2023-02-14T20:48:52.390 | null | null | 2,497,152 | null |
75,453,399 | 2 | null | 75,453,211 | 1 | null | Create an array of colors for each animal. Then you can get the next value from the appropriate animal's array.
```
const colors = {
Dog: {
colors: ['white', 'black', 'red', 'grey'],
index: 0
},
Cat: {
colors: ['brown', 'black', 'white', 'gray'],
index: 0
},
Bird: {
colors: ['yellow', 'red', 'blue', 'purple'],
index: 0
}
};
for (var i = 5; i <= lastRow; i++) { // Start from row 5
var pos = sheet.getRange([i], 1); // 1 == column A, A=1,B=2,C=3 etc.
var posValue = (pos.isPartOfMerge() ? pos.getMergedRanges()[0].getCell(1, 1) : pos).getValue(); // get value of marged cell
var animalColor = sheet.getRange([i], 9); // 9 == column I
if (posValue in colors) {
animalColor.setValue(colors[posValue].colors[colors[posValue].index++]);
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-14T21:22:43.847 | 2023-02-15T15:27:55.947 | 2023-02-15T15:27:55.947 | 1,491,895 | 1,491,895 | null |
75,453,531 | 2 | null | 75,401,714 | 2 | null | Great question. That certainly is possible. While rendering multiple Bar elements, they will be put on a single axis next to each other.
The trick is to use multiple x-axes. To show how this works, I added a new story to the Recharts storybook.
You can find the code for it in this [PR](https://github.com/recharts/recharts/pull/3371) and soon in the repo itself.
For the sake of a complete answer, I am duplicating the code here.
```
<ResponsiveContainer width="100%" height={400}>
<BarChart data={data}>
<Bar dataKey="uv" fill="green" xAxisId="one" barSize={50} />
<XAxis xAxisId="one" />
{/* The smaller bar must be rendered in front of the larger one to be visible. */}
<Bar dataKey="pv" fill="red" xAxisId="two" barSize={30} />
<XAxis xAxisId="two" hide />
</BarChart>
</ResponsiveContainer>
```
[](https://i.stack.imgur.com/BRKWn.png)
| null | CC BY-SA 4.0 | null | 2023-02-14T21:41:44.413 | 2023-02-14T21:41:44.413 | null | null | 2,721,160 | null |
75,453,649 | 2 | null | 75,453,598 | 0 | null | On a 64 bits windows its location is:
```
C:\Program Files\Microsoft SQL Server\MSSQL14.MSSQLSERVER
```
Note: You don't need to put a .bak file to the backup folder in order to be able to restore it.
| null | CC BY-SA 4.0 | null | 2023-02-14T21:59:35.533 | 2023-02-14T22:18:51.027 | 2023-02-14T22:18:51.027 | 3,043 | 894,977 | null |
75,454,541 | 2 | null | 75,452,807 | 0 | null | Here is the fixed code.
CODE
```
import matplotlib.pyplot as plt
labels = ['Book 1', 'Book 2', 'Book 3']
values = [20, 35, 5]
fig, ax = plt.subplots()
y_pos = range(len(labels))
ax.barh(y_pos, values, align='center', color='blue')
for i, v in enumerate(values):
ax.text(v, i, "TESTSTETSTSTS", color='grey', va='center', ha='right', clip_on=True) #HERE IS THE FIX
ax.set_yticks(y_pos)
ax.set_yticklabels(labels)
ax.invert_yaxis()
ax.set_xlabel('Number')
ax.set_title('Number of sold books')
plt.show()
```
[evidence](https://i.stack.imgur.com/IWlKR.png)
| null | CC BY-SA 4.0 | null | 2023-02-15T00:38:52.303 | 2023-02-15T00:39:43.780 | 2023-02-15T00:39:43.780 | 4,954,993 | 4,954,993 | null |
75,455,127 | 2 | null | 72,602,002 | 0 | null | you can add this parameter to reduce that gap when being scrolled while using bouncing scroll physics.
```
BouncingScrollPhysics(decelerationRate: ScrollDecelerationRate.fast)
```
if you want to customize it more complex you can create custom scroll widget
| null | CC BY-SA 4.0 | null | 2023-02-15T02:58:41.940 | 2023-02-15T02:58:41.940 | null | null | 16,363,643 | null |
75,455,163 | 2 | null | 56,905,592 | 0 | null | This is a C# transpilation(performed via [https://github.com/uxmal/pytocs](https://github.com/uxmal/pytocs)) for [nathancy's answer](https://stackoverflow.com/questions/56905592/automatic-contrast-and-brightness-adjustment-of-a-color-photo-of-a-sheet-of-pape/56909036#56909036) for [Emgu.CV](https://github.com/emgucv/emgucv) wrapper library:
```
/// <summary>
/// <see>https://stackoverflow.com/questions/56905592/automatic-contrast-and-brightness-adjustment-of-a-color-photo-of-a-sheet-of-pape/75455163#75455163</see>
/// </summary>
public static (Mat autoResult, int alpha, int beta) AutomaticBrightnessAndContrast(Mat image, double clipHistPercent = 1)
{
var gray = new Mat();
CvInvoke.CvtColor(image, gray, ColorConversion.Bgr2Gray);
// Calculate grayscale histogram
var hist = new Mat();
var grayVector = new VectorOfMat(gray);
CvInvoke.CalcHist(grayVector, new[] {0}, null, hist, new[] {256}, new[] {0f, 256}, false);
var histSize = hist.Rows;
// Calculate cumulative distribution from the histogram
var accumulator = new List<float> {hist.Get<float>(0, 0)};
foreach (var index in Enumerable.Range(1, histSize - 1))
accumulator.Add(accumulator[index - 1] + hist.Get<float>(index, 0));
// Locate points to clip
var maximum = accumulator[255];
clipHistPercent *= maximum / 100.0;
clipHistPercent /= 2.0;
// Locate left cut
var minimumGray = 0;
while (accumulator[minimumGray] < clipHistPercent)
minimumGray += 1;
// Locate right cut
var maximumGray = histSize - 1;
while (accumulator[maximumGray] >= maximum - clipHistPercent)
maximumGray -= 1;
// Calculate alpha and beta values
var alpha = 255 / (maximumGray - minimumGray);
var beta = -minimumGray * alpha;
var autoResult = new Mat();
CvInvoke.ConvertScaleAbs(image, autoResult, alpha, beta);
return (autoResult, alpha, beta);
}
public static class MatExtension
{
/// <summary>
/// <see>https://stackoverflow.com/questions/32255440/how-can-i-get-and-set-pixel-values-of-an-emgucv-mat-image/69537504#69537504</see>
/// </summary>
public static unsafe T Get<T>(this Mat mat, int row, int col) =>
new ReadOnlySpan<T>(mat.DataPointer.ToPointer(), mat.Rows * mat.Cols * mat.ElementSize)
[(row * mat.Cols) + col];
}
```
If you are using [OpenCvSharp](https://github.com/shimat/opencvsharp), just modify all invokes to OpenCV with updated parameters like [Rotate an image without cropping in OpenCV in C++](https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c/75451191#75451191)
Also note that OpenCvSharp already has [Mat.Set<>](https://github.com/shimat/opencvsharp/blob/02e66002ab2037a2237a6292d4ad8c31dd695b6f/src/OpenCvSharp/Modules/core/Mat/Mat.cs#L3336) method that functions same as [mat.at<>](https://docs.opencv.org/4.7.0/d3/d63/classcv_1_1Mat.html#aa5d20fc86d41d59e4d71ae93daee9726) in the original OpenCV, so we don't have to copy these methods from [How can I get and set pixel values of an EmguCV Mat image?](https://stackoverflow.com/questions/32255440/how-can-i-get-and-set-pixel-values-of-an-emgucv-mat-image/69537504#69537504)
| null | CC BY-SA 4.0 | null | 2023-02-15T03:09:19.747 | 2023-02-15T03:09:19.747 | null | null | 12,576,620 | null |
75,455,243 | 2 | null | 75,454,487 | 2 | null | Fascinating problem. I can't see the solution myself but have tried to simplify what you've done into a very simple demo by removing rounded decimals and reducing your paths down to the bare minimum.
It appears that the path off the viewbox is causing the problem, i.e. these two:
```
-3877882,100C-1067490,-4122,-1063946,192,-1060402,2893C-1056858,5594,-1053314,11344,-1049770,11344
```
but it shouldn't render poorly like that. Would be interested to see the solution. Chrome can be so fussy with SVG.
[https://codepen.io/PotatoTrade_/pen/eYLYbLe](https://codepen.io/PotatoTrade_/pen/eYLYbLe)
[](https://i.stack.imgur.com/DVlqc.png)
| null | CC BY-SA 4.0 | null | 2023-02-15T03:28:34.097 | 2023-02-15T03:28:34.097 | null | null | 345,086 | null |
75,455,839 | 2 | null | 75,455,740 | 0 | null | PokeAPI expects the input to be the name or ID of the Pokemon,try this code please
```
const pokemonInput = document.getElementById("pokemon-input");
const pokemonButton = document.getElementById("pokemon-button");
const pokemonImage = document.getElementById("pokemon-image");
pokemonButton.addEventListener("click", function() {
const pokemonName = pokemonInput.value.toLowerCase();
const apiUrl = `https://pokeapi.co/api/v2/pokemon/${pokemonName}/`;
fetch(apiUrl)
.then(response => response.json())
.then(data => {
const imageUrl = data.sprites.front_default;
pokemonImage.setAttribute("src", imageUrl);
})
.catch(error => {
console.error(error);
pokemonImage.setAttribute("src", "");
});
});
```
| null | CC BY-SA 4.0 | null | 2023-02-15T05:34:49.540 | 2023-02-15T05:34:49.540 | null | null | 21,157,729 | null |
75,455,945 | 2 | null | 75,455,807 | 1 | null | You may try:
```
=IF($B6=2.5,transpose(map(Opponent3STARS,Opponent2STARS,lambda(a,b,a&char(10)&b))))
```
[](https://i.stack.imgur.com/0BP2L.png)
```
=index(if(B2:B21=3,torow(Opponent3STARS),
if(B2:B21=2.5,torow(map(Opponent3STARS,Opponent2STARS,lambda(a,b,a&char(10)&b))),
if(B2:B21=2,torow(Opponent2STARS),
if(B2:B21=1.5,torow(map(Opponent2STARS,Opponent1STARS,lambda(a,b,a&char(10)&b))),
if(B2:B21=1,torow(Opponent1STARS),
if(B2:B21=0.5,torow(map(Opponent1STARS,Opponent0STARS,lambda(a,b,a&char(10)&b))),
if(B2:B21=0,torow(Opponent0STARS)))))))))
```
- `E3:E21`
[](https://i.stack.imgur.com/8ZcKo.png)
| null | CC BY-SA 4.0 | null | 2023-02-15T05:52:01.130 | 2023-02-15T14:55:24.657 | 2023-02-15T14:55:24.657 | 5,479,575 | 5,479,575 | null |
75,455,965 | 2 | null | 75,453,211 | 1 | null |
## Alternate solution
You can use the `includes`,`map` and `setValues` methods in getting the desired output. You may use the script below as a guide.
## Script:
```
const colors = {
"Cat": ["brown", "black", "white", "gray"],
"Dog": ["white", "black", "red", "gray"],
"Bird": ["yellow", "red", "blue", "purple"]
};
function transformTable() {
var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); // Get the active sheet
var range = sheet.getRange("A1:A"); // Get the range of the data
var values = range.getValues().flat().filter(x => x); // Get the values of the data
var animalsInData = Object.keys(colors);
var output = [];
values.map(x => (animalsInData.includes(x))? colors[x].map(y=>output.push([y])) : output.push([""]));
sheet.getRange(1,3,output.length,1).setValues(output); // edit the range accordingly
}
```
## Output:
[](https://i.stack.imgur.com/FtzZg.png)
Please note that I have added `snake` as a test case to see if the script will run even if there is an additional animal outside the `colors` object.
## References:
[setValues method](https://developers.google.com/apps-script/reference/spreadsheet/range#setvaluesvalues)
[JavaScript Array map](https://www.w3schools.com/jsref/jsref_map.asp)
[JavaScript String includes](https://www.w3schools.com/jsref/jsref_includes.asp)
| null | CC BY-SA 4.0 | null | 2023-02-15T05:55:39.083 | 2023-02-21T11:28:36.237 | 2023-02-21T11:28:36.237 | 16,254,265 | 20,345,563 | null |
75,456,058 | 2 | null | 75,453,602 | 0 | null | The issue is most likely related to how the Knob plugin is initialized and rendered. When using setInterval() to refresh the div, the plugin's initialization code may not be executed correctly, which could cause the Knob to not be shown.
To solve this issue, one possible solution is to reinitialize the Knob plugin every time the div is refreshed.
```
function refreshDiv() {
$.ajax({
url: '/some/url',
success: function(data) {
$('#myDiv').html(data);
$('#myKnob').knob(); // reinitialize the Knob plugin
}
});
}
setInterval(refreshDiv, 1000);
```
| null | CC BY-SA 4.0 | null | 2023-02-15T06:08:58.600 | 2023-02-15T06:08:58.600 | null | null | 1,858,684 | null |
75,456,132 | 2 | null | 75,455,765 | 2 | null | Just add `border: {display: false}`, to the `scales` configuration. [here is the link to the documentation](https://www.chartjs.org/docs/latest/axes/styling.html)

```
...
scales: {
x: {
border: {
display: false,
},
...
},
...
}
...
```
```
const d0 = moment.duration('07:00:00').asMinutes();
const d1 = moment.duration('09:00:00').asMinutes();
const d2 = moment.duration('10:45:00').asMinutes();
const d3 = moment.duration('17:35:00').asMinutes();
const d4 = moment.duration('19:00:00').asMinutes();
let values = [d0, d1, d2, d3, d4];
let data = {
labels: [''],
datasets: [{
label: 'up',
axis: 'y',
data: [d1],
backgroundColor: 'red',
},{
label: 'down',
axis: 'y',
data: [d2],
backgroundColor: 'yellow',
},{
label: 'out',
axis: 'y',
data: [d3],
backgroundColor: 'green',
},{
label: 'up',
axis: 'y',
data: [d4],
backgroundColor: 'red',
}
]
};
const config = {
data,
type: 'bar',
options:{
plugins: {
tooltip: {
mode: 'dataset',
callbacks: {
label: function(item){
return moment().startOf('day').add({ minute: item.raw}).format('HH:mm');
}
}
},
legend: {
display: false,
},
title: {
display: false,
},
},
indexAxis: 'y',
responsive: true,
maintainAspectRatio: false,
scales: {
x: {
min: d0,
border: { display: false },
ticks: {
callback: function(value, index, ticks) {
return moment().startOf('day').add({ minute: value}).format('HH:mm');
}
},
afterBuildTicks: axis => axis.ticks = values.map(v => ({ value: v }))
},
y: {
stacked: true,
grid: { display: false },
},
}
}};
new Chart(document.getElementById("chart"), config);
```
```
<script src="//cdn.jsdelivr.net/npm/chart.js"></script>
<script src="//cdn.jsdelivr.net/npm/moment@^2"></script>
<script src="//cdn.jsdelivr.net/npm/chartjs-adapter-moment@^1"></script>
<div class="chart" style="height:84px; width:350px;">
<canvas id="chart" ></canvas>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-15T06:20:55.007 | 2023-02-15T08:34:02.410 | 2023-02-15T08:34:02.410 | 1,679,286 | 1,679,286 | null |
75,456,253 | 2 | null | 75,445,913 | 0 | null | Just add width: MediaQuery.of(context).size.width in Container
| null | CC BY-SA 4.0 | null | 2023-02-15T06:36:08.007 | 2023-02-15T06:36:08.007 | null | null | 21,155,681 | null |
75,456,332 | 2 | null | 6,590,842 | 0 | null | None of the other solutions here helped me.
Ended up checking out the entire repository again, copied all the sub folders over to the newly checked out folder and submitted the changes.
Deleted the old folder and renamed the new folder to the old folders name.
| null | CC BY-SA 4.0 | null | 2023-02-15T06:48:18.257 | 2023-02-15T06:48:18.257 | null | null | 1,876,355 | null |
75,456,490 | 2 | null | 75,455,765 | 1 | null | use tickColor (see below config) for v 3.8.2
```
scales: {
x: {
...
grid: {
display: true,
drawTicks: true, //show ticks
borderColor: "transparent", //horizontal line color above ticks (x-axis)
color: "transparent", //grid lines color
tickColor: "#868e96" //ticks color (little line above points)
},
},
...
}
```
| null | CC BY-SA 4.0 | null | 2023-02-15T07:08:24.293 | 2023-02-15T07:36:28.700 | 2023-02-15T07:36:28.700 | 17,033,432 | 17,033,432 | null |
75,456,964 | 2 | null | 57,128,090 | 1 | null | Another option could be using `after_stat` on your y `aes` with an `ifelse` to check if the mapped value is higher than 0 otherwise replace the value with NA which will make it possible to remove the baseline color like this:
```
library(tidyverse)
ggplot(data, aes(x = value, y = ifelse(after_stat(count) > 0, after_stat(count), NA))) +
geom_histogram(color = "red") +
facet_wrap(~ key, ncol = 1)
```

[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2023-02-15T08:06:02.360 | 2023-02-15T08:06:02.360 | null | null | 14,282,714 | null |
75,457,004 | 2 | null | 75,456,886 | 0 | null | You can use the `placement` prop on the `Menu` component with a value of `top`.
```
<Menu placement="top">
...
</Menu>
```
| null | CC BY-SA 4.0 | null | 2023-02-15T08:10:52.647 | 2023-02-15T08:10:52.647 | null | null | 20,088,324 | null |
75,457,015 | 2 | null | 75,402,980 | 0 | null | The origin of this issue is unknow. You can go to , find Cloud Functions Admin and create a custom role out of it. Then you can add this role instead.
[](https://i.stack.imgur.com/LTvFP.png)
| null | CC BY-SA 4.0 | null | 2023-02-15T08:12:38.767 | 2023-02-15T08:12:38.767 | null | null | 3,188,355 | null |
75,457,025 | 2 | null | 75,456,824 | 0 | null | Sometimes it helps to have private empty constructors in your entity classes to help entity framework to map the properties of the entities. Because of it being private, your entities will still be protected from being constructed without parameters by outside classes.
| null | CC BY-SA 4.0 | null | 2023-02-15T08:13:49.410 | 2023-02-15T08:13:49.410 | null | null | 18,031,027 | null |
75,457,072 | 2 | null | 75,167,487 | 0 | null | I am dealing with the same issue after the update. The cw snippet is just random. Sometimes it works correctly and other times it will type out things like "cw.WriteLine" or "cw=ReadLine".
I didn't think of rolling back the update and ended up doing an uninstall and reinstall which did not fix the problem.
I went into Tools > Options > Text Editor > C# > IntelliSense and selected 'Always include snippets' but it didn't help.
I recommend reporting the problem through Visual Studio if you haven't. I've reported the problem through Visual Studio to the dev community. The report has been "triaged" but there has been no contact from the dev team yet. If I hear from them I will report back here.
| null | CC BY-SA 4.0 | null | 2023-02-15T08:19:13.217 | 2023-02-18T10:46:19.700 | 2023-02-18T10:46:19.700 | 21,217,467 | 21,217,467 | null |
75,457,168 | 2 | null | 75,438,804 | 0 | null | This is not a super difficult problem to solve.
Instead of talking about jobs (which may repeat during the week), it may be easier to talk about individual . The first thing to do is to find out if two sub-jobs k and k' overlap. If this is the case, they cannot run on the same machine. The data structure to hold the overlap information can be calculated in advance (before the model runs).
The best thing is to first write down on a piece of paper the mathematical model of the problem. I propose something like:
[](https://i.stack.imgur.com/Ln2mc.png)
The objective is to minimize the number of machines we use (i.e. to which we assign sub-jobs to). The first constraint says: assign each sub-job to exactly one machine. The second constraint: if sub-jobs k and k' overlap, they can't run on the same machine. The third constraint: if a machine is not used, we can't assign any sub-jobs to it. The whole model is expressed in terms of individual sub-jobs instead of (job,day) combinations.
This model can be implemented using any reasonable MIP solver. It is not very difficult to implement (it is rather simple: most of the work is to get the data in shape and calculate the overlap data) and not very difficult to solve (at least for the data set I used). The mathematical model above is sufficiently detailed and precise that you are advised to follow it as closely as possible.
I tried it out with the following random data:
```
---- 24 PARAMETER start start time
job1 206.000, job2 1012.000, job3 661.000, job4 361.000, job5 350.000, job6 269.000, job7 420.000
job8 1028.000, job9 80.000, job10 600.000, job11 1198.000, job12 695.000, job13 1190.000, job14 915.000
job15 156.000, job16 768.000, job17 191.000, job18 300.000, job19 803.000, job20 522.000, job21 432.000
job22 422.000, job23 157.000, job24 180.000, job25 707.000, job26 997.000, job27 277.000, job28 799.000
job29 931.000, job30 364.000, job31 132.000, job32 603.000, job33 192.000, job34 1047.000, job35 318.000
job36 343.000, job37 713.000, job38 867.000, job39 754.000, job40 557.000, job41 496.000, job42 141.000
job43 377.000, job44 55.000, job45 406.000, job46 218.000, job47 775.000, job48 673.000, job49 924.000
job50 357.000
---- 24 PARAMETER end finish time
job1 841.663, job2 1721.541, job3 1270.409, job4 702.414, job5 537.411, job6 468.961, job7 1040.176
job8 1573.341, job9 224.589, job10 1338.041, job11 1374.758, job12 952.016, job13 1719.993, job14 1620.162
job15 414.936, job16 914.630, job17 767.402, job18 904.559, job19 1226.702, job20 921.797, job21 741.567
job22 734.209, job23 378.792, job24 1028.091, job25 1123.352, job26 1728.052, job27 631.027, job28 1016.877
job29 1635.122, job30 538.001, job31 409.572, job32 726.951, job33 522.298, job34 1556.884, job35 556.003
job36 598.852, job37 1090.897, job38 1234.187, job39 1125.228, job40 1428.902, job41 1391.010, job42 549.524
job43 787.853, job44 777.143, job45 835.414, job46 1050.215, job47 988.271, job48 1366.674, job49 1087.226
job50 926.514
---- 24 PARAMETER length length of job (minutes)
job1 635.663, job2 709.541, job3 609.409, job4 341.414, job5 187.411, job6 199.961, job7 620.176
job8 545.341, job9 144.589, job10 738.041, job11 176.758, job12 257.016, job13 529.993, job14 705.162
job15 258.936, job16 146.630, job17 576.402, job18 604.559, job19 423.702, job20 399.797, job21 309.567
job22 312.209, job23 221.792, job24 848.091, job25 416.352, job26 731.052, job27 354.027, job28 217.877
job29 704.122, job30 174.001, job31 277.572, job32 123.951, job33 330.298, job34 509.884, job35 238.003
job36 255.852, job37 377.897, job38 367.187, job39 371.228, job40 871.902, job41 895.010, job42 408.524
job43 410.853, job44 722.143, job45 429.414, job46 832.215, job47 213.271, job48 693.674, job49 163.226
job50 569.514
---- 24 SET jd jobs need to run on certain days
day1 day2 day3 day4 day5 day6 day7
job1 YES YES YES
job2 YES YES
job3 YES YES YES
job4 YES YES YES
job6 YES YES YES
job7 YES YES YES
job8 YES YES YES
job9 YES
job10 YES YES YES YES YES
job11 YES
job12 YES YES YES YES YES YES
job13 YES YES
job14 YES
job15 YES
job16 YES YES
job17 YES
job18 YES
job19 YES YES
job21 YES YES YES
job22 YES YES
job23 YES YES
job24 YES YES
job25 YES
job26 YES YES
job27 YES YES
job28 YES YES
job30 YES YES
job31 YES
job32 YES YES
job33 YES YES YES
job34 YES YES YES
job35 YES YES
job36 YES YES
job37 YES YES
job38 YES YES YES
job39 YES YES
job40 YES YES
job42 YES YES YES
job44 YES
job45 YES
job46 YES
job48 YES YES
job49 YES YES
---- 29 PARAMETER counts
jobs 43.000, subjobs 93.000
---- 49 SET k subjobs
subjob1 , subjob2 , subjob3 , subjob4 , subjob5 , subjob6 , subjob7 , subjob8 , subjob9 , subjob10
subjob11, subjob12, subjob13, subjob14, subjob15, subjob16, subjob17, subjob18, subjob19, subjob20
subjob21, subjob22, subjob23, subjob24, subjob25, subjob26, subjob27, subjob28, subjob29, subjob30
subjob31, subjob32, subjob33, subjob34, subjob35, subjob36, subjob37, subjob38, subjob39, subjob40
subjob41, subjob42, subjob43, subjob44, subjob45, subjob46, subjob47, subjob48, subjob49, subjob50
subjob51, subjob52, subjob53, subjob54, subjob55, subjob56, subjob57, subjob58, subjob59, subjob60
subjob61, subjob62, subjob63, subjob64, subjob65, subjob66, subjob67, subjob68, subjob69, subjob70
subjob71, subjob72, subjob73, subjob74, subjob75, subjob76, subjob77, subjob78, subjob79, subjob80
subjob81, subjob82, subjob83, subjob84, subjob85, subjob86, subjob87, subjob88, subjob89, subjob90
subjob91, subjob92, subjob93
---- 49 SET map mapping between jobs/days and subjobs
job1 .day1.subjob1 , job1 .day2.subjob2 , job1 .day6.subjob3 , job2 .day2.subjob4 , job2 .day5.subjob5
job3 .day3.subjob6 , job3 .day5.subjob7 , job3 .day7.subjob8 , job4 .day3.subjob9 , job4 .day4.subjob10
job4 .day7.subjob11, job6 .day2.subjob12, job6 .day5.subjob13, job6 .day7.subjob14, job7 .day4.subjob15
job7 .day6.subjob16, job7 .day7.subjob17, job8 .day3.subjob18, job8 .day4.subjob19, job8 .day6.subjob20
job9 .day2.subjob21, job10.day1.subjob22, job10.day2.subjob23, job10.day3.subjob24, job10.day5.subjob25
job10.day7.subjob26, job11.day5.subjob27, job12.day2.subjob28, job12.day3.subjob29, job12.day4.subjob30
job12.day5.subjob31, job12.day6.subjob32, job12.day7.subjob33, job13.day3.subjob34, job13.day4.subjob35
job14.day3.subjob36, job15.day5.subjob37, job16.day4.subjob38, job16.day7.subjob39, job17.day5.subjob40
job18.day2.subjob41, job19.day1.subjob42, job19.day7.subjob43, job21.day3.subjob44, job21.day5.subjob45
job21.day7.subjob46, job22.day1.subjob47, job22.day6.subjob48, job23.day4.subjob49, job23.day6.subjob50
job24.day3.subjob51, job24.day6.subjob52, job25.day3.subjob53, job26.day3.subjob54, job26.day5.subjob55
job27.day1.subjob56, job27.day5.subjob57, job28.day1.subjob58, job28.day5.subjob59, job30.day1.subjob60
job30.day5.subjob61, job31.day3.subjob62, job32.day2.subjob63, job32.day5.subjob64, job33.day1.subjob65
job33.day6.subjob66, job33.day7.subjob67, job34.day1.subjob68, job34.day6.subjob69, job34.day7.subjob70
job35.day2.subjob71, job35.day6.subjob72, job36.day2.subjob73, job36.day7.subjob74, job37.day1.subjob75
job37.day5.subjob76, job38.day1.subjob77, job38.day3.subjob78, job38.day5.subjob79, job39.day4.subjob80
job39.day5.subjob81, job40.day2.subjob82, job40.day7.subjob83, job42.day1.subjob84, job42.day4.subjob85
job42.day6.subjob86, job44.day1.subjob87, job45.day5.subjob88, job46.day2.subjob89, job48.day4.subjob90
job48.day5.subjob91, job49.day5.subjob92, job49.day7.subjob93
---- 64 PARAMETER start2 start time of subjob
subjob1 206.000, subjob2 1646.000, subjob3 7406.000, subjob4 2452.000, subjob5 6772.000, subjob6 3541.000
subjob7 6421.000, subjob8 9301.000, subjob9 3241.000, subjob10 4681.000, subjob11 9001.000, subjob12 1709.000
subjob13 6029.000, subjob14 8909.000, subjob15 4740.000, subjob16 7620.000, subjob17 9060.000, subjob18 3908.000
subjob19 5348.000, subjob20 8228.000, subjob21 1520.000, subjob22 600.000, subjob23 2040.000, subjob24 3480.000
subjob25 6360.000, subjob26 9240.000, subjob27 6958.000, subjob28 2135.000, subjob29 3575.000, subjob30 5015.000
subjob31 6455.000, subjob32 7895.000, subjob33 9335.000, subjob34 4070.000, subjob35 5510.000, subjob36 3795.000
subjob37 5916.000, subjob38 5088.000, subjob39 9408.000, subjob40 5951.000, subjob41 1740.000, subjob42 803.000
subjob43 9443.000, subjob44 3312.000, subjob45 6192.000, subjob46 9072.000, subjob47 422.000, subjob48 7622.000
subjob49 4477.000, subjob50 7357.000, subjob51 3060.000, subjob52 7380.000, subjob53 3587.000, subjob54 3877.000
subjob55 6757.000, subjob56 277.000, subjob57 6037.000, subjob58 799.000, subjob59 6559.000, subjob60 364.000
subjob61 6124.000, subjob62 3012.000, subjob63 2043.000, subjob64 6363.000, subjob65 192.000, subjob66 7392.000
subjob67 8832.000, subjob68 1047.000, subjob69 8247.000, subjob70 9687.000, subjob71 1758.000, subjob72 7518.000
subjob73 1783.000, subjob74 8983.000, subjob75 713.000, subjob76 6473.000, subjob77 867.000, subjob78 3747.000
subjob79 6627.000, subjob80 5074.000, subjob81 6514.000, subjob82 1997.000, subjob83 9197.000, subjob84 141.000
subjob85 4461.000, subjob86 7341.000, subjob87 55.000, subjob88 6166.000, subjob89 1658.000, subjob90 4993.000
subjob91 6433.000, subjob92 6684.000, subjob93 9564.000
---- 64 PARAMETER end2 end time of subjob
subjob1 841.663, subjob2 2281.663, subjob3 8041.663, subjob4 3161.541, subjob5 7481.541
subjob6 4150.409, subjob7 7030.409, subjob8 9910.409, subjob9 3582.414, subjob10 5022.414
subjob11 9342.414, subjob12 1908.961, subjob13 6228.961, subjob14 9108.961, subjob15 5360.176
subjob16 8240.176, subjob17 9680.176, subjob18 4453.341, subjob19 5893.341, subjob20 8773.341
subjob21 1664.589, subjob22 1338.041, subjob23 2778.041, subjob24 4218.041, subjob25 7098.041
subjob26 9978.041, subjob27 7134.758, subjob28 2392.016, subjob29 3832.016, subjob30 5272.016
subjob31 6712.016, subjob32 8152.016, subjob33 9592.016, subjob34 4599.993, subjob35 6039.993
subjob36 4500.162, subjob37 6174.936, subjob38 5234.630, subjob39 9554.630, subjob40 6527.402
subjob41 2344.559, subjob42 1226.702, subjob43 9866.702, subjob44 3621.567, subjob45 6501.567
subjob46 9381.567, subjob47 734.209, subjob48 7934.209, subjob49 4698.792, subjob50 7578.792
subjob51 3908.091, subjob52 8228.091, subjob53 4003.352, subjob54 4608.052, subjob55 7488.052
subjob56 631.027, subjob57 6391.027, subjob58 1016.877, subjob59 6776.877, subjob60 538.001
subjob61 6298.001, subjob62 3289.572, subjob63 2166.951, subjob64 6486.951, subjob65 522.298
subjob66 7722.298, subjob67 9162.298, subjob68 1556.884, subjob69 8756.884, subjob70 10196.884
subjob71 1996.003, subjob72 7756.003, subjob73 2038.852, subjob74 9238.852, subjob75 1090.897
subjob76 6850.897, subjob77 1234.187, subjob78 4114.187, subjob79 6994.187, subjob80 5445.228
subjob81 6885.228, subjob82 2868.902, subjob83 10068.902, subjob84 549.524, subjob85 4869.524
subjob86 7749.524, subjob87 777.143, subjob88 6595.414, subjob89 2490.215, subjob90 5686.674
subjob91 7126.674, subjob92 6847.226, subjob93 9727.226
```
Some jobs, due to my random data, don't appear in any of the days. So we don't have 50 jobs here, but just 43. The number of subjobs is 93.
This model solves very fast: 0.06 seconds. Here is the solution:
```
---- 106 VARIABLE x.L assign job to machine
machine1 machine2 machine3 machine4 machine5 machine6 machine7 machine8 machine9 machine10
subjob1 1.000
subjob2 1.000
subjob3 1.000
subjob4 1.000
subjob5 1.000
subjob6 1.000
subjob7 1.000
subjob8 1.000
subjob9 1.000
subjob10 1.000
subjob11 1.000
subjob12 1.000
subjob13 1.000
subjob14 1.000
subjob15 1.000
subjob16 1.000
subjob17 1.000
subjob18 1.000
subjob19 1.000
subjob20 1.000
subjob21 1.000
subjob22 1.000
subjob23 1.000
subjob24 1.000
subjob25 1.000
subjob26 1.000
subjob27 1.000
subjob28 1.000
subjob29 1.000
subjob30 1.000
subjob31 1.000
subjob32 1.000
subjob33 1.000
subjob34 1.000
subjob35 1.000
subjob36 1.000
subjob37 1.000
subjob38 1.000
subjob39 1.000
subjob40 1.000
subjob41 1.000
subjob42 1.000
subjob43 1.000
subjob44 1.000
subjob45 1.000
subjob46 1.000
subjob47 1.000
subjob48 1.000
subjob49 1.000
subjob50 1.000
subjob51 1.000
subjob52 1.000
subjob53 1.000
subjob54 1.000
subjob55 1.000
subjob56 1.000
subjob57 1.000
subjob58 1.000
subjob59 1.000
subjob60 1.000
subjob61 1.000
subjob62 1.000
subjob63 1.000
subjob64 1.000
subjob65 1.000
subjob66 1.000
subjob67 1.000
subjob68 1.000
subjob69 1.000
subjob70 1.000
subjob71 1.000
subjob72 1.000
subjob73 1.000
subjob74 1.000
subjob75 1.000
subjob76 1.000
subjob77 1.000
subjob78 1.000
subjob79 1.000
subjob80 1.000
subjob81 1.000
subjob82 1.000
subjob83 1.000
subjob84 1.000
subjob85 1.000
subjob86 1.000
subjob87 1.000
subjob88 1.000
subjob89 1.000
subjob90 1.000
subjob91 1.000
subjob92 1.000
subjob93 1.000
---- 106 VARIABLE used.L
machine1 1.000, machine2 1.000, machine3 1.000, machine4 1.000, machine5 1.000, machine6 1.000
machine7 1.000, machine8 1.000, machine9 1.000, machine10 1.000
---- 106 VARIABLE num.L = 10.000 number of machines needed
---- 110 PARAMETER assignments
machine1 machine2 machine3 machine4 machine5 machine6 machine7 machine8 machine9 machine10
job1 .day1 1.000
job1 .day2 1.000
job1 .day6 1.000
job2 .day2 1.000
job2 .day5 1.000
job3 .day3 1.000
job3 .day5 1.000
job3 .day7 1.000
job4 .day3 1.000
job4 .day4 1.000
job4 .day7 1.000
job6 .day2 1.000
job6 .day5 1.000
job6 .day7 1.000
job7 .day4 1.000
job7 .day6 1.000
job7 .day7 1.000
job8 .day3 1.000
job8 .day4 1.000
job8 .day6 1.000
job9 .day2 1.000
job10.day1 1.000
job10.day2 1.000
job10.day3 1.000
job10.day5 1.000
job10.day7 1.000
job11.day5 1.000
job12.day2 1.000
job12.day3 1.000
job12.day4 1.000
job12.day5 1.000
job12.day6 1.000
job12.day7 1.000
job13.day3 1.000
job13.day4 1.000
job14.day3 1.000
job15.day5 1.000
job16.day4 1.000
job16.day7 1.000
job17.day5 1.000
job18.day2 1.000
job19.day1 1.000
job19.day7 1.000
job21.day3 1.000
job21.day5 1.000
job21.day7 1.000
job22.day1 1.000
job22.day6 1.000
job23.day4 1.000
job23.day6 1.000
job24.day3 1.000
job24.day6 1.000
job25.day3 1.000
job26.day3 1.000
job26.day5 1.000
job27.day1 1.000
job27.day5 1.000
job28.day1 1.000
job28.day5 1.000
job30.day1 1.000
job30.day5 1.000
job31.day3 1.000
job32.day2 1.000
job32.day5 1.000
job33.day1 1.000
job33.day6 1.000
job33.day7 1.000
job34.day1 1.000
job34.day6 1.000
job34.day7 1.000
job35.day2 1.000
job35.day6 1.000
job36.day2 1.000
job36.day7 1.000
job37.day1 1.000
job37.day5 1.000
job38.day1 1.000
job38.day3 1.000
job38.day5 1.000
job39.day4 1.000
job39.day5 1.000
job40.day2 1.000
job40.day7 1.000
job42.day1 1.000
job42.day4 1.000
job42.day6 1.000
job44.day1 1.000
job45.day5 1.000
job46.day2 1.000
job48.day4 1.000
job48.day5 1.000
job49.day5 1.000
job49.day7 1.000
```
We need 10 machines for the assignments to be non-overlapping. The number of sub-jobs for some of the machines is very small. Machine 10 has only one sub-job. The results look fine at first sight:
[](https://i.stack.imgur.com/eXLH1.png)
The numbers are the job numbers. E.g. job 1 appears in day 1, 2 and 6 all on machine 1.
| null | CC BY-SA 4.0 | null | 2023-02-15T08:33:22.510 | 2023-02-15T15:30:22.323 | 2023-02-15T15:30:22.323 | 5,625,534 | 5,625,534 | null |
75,457,370 | 2 | null | 75,457,083 | 0 | null | This piece of your code could look like this:
```
days = days.toString().padStart(1, "0");
```
Your complete code is on CodeSandbox:
[https://codesandbox.io/s/reverent-pond-c9m38x?file=/index.html](https://codesandbox.io/s/reverent-pond-c9m38x?file=/index.html)
Hope this helps you.
| null | CC BY-SA 4.0 | null | 2023-02-15T08:55:28.387 | 2023-02-15T08:55:28.387 | null | null | 19,073,447 | null |
75,457,459 | 2 | null | 75,457,083 | 0 | null | I did some modification to your code and also added colon between div as per design you gave.
```
// Set the date we're counting down to
var countDownDate = new Date("Feb 21, 2023 00:00:00").getTime();
// Update the count down every 1 second
var x = setInterval(function() {
// Get today's date and time
var now = new Date().getTime();
// Find the distance between now and the count down date
var distance = countDownDate - now;
// Time calculations for days, hours, minutes, and seconds
var days = Math.floor(distance / (1000 * 60 * 60 * 24));
var hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
var minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
var seconds = Math.floor((distance % (1000 * 60)) / 1000);
// Add leading zeros to values less than 10
days = days.toString().padStart(2, "0");
hours = hours.toString().padStart(2, "0");
minutes = minutes.toString().padStart(2, "0");
seconds = seconds.toString().padStart(2, "0");
// Display the result in the element with id="demo"
document.getElementById("days").innerHTML = days;
document.getElementById("hours").innerHTML = hours;
document.getElementById("minutes").innerHTML = minutes;
document.getElementById("seconds").innerHTML = seconds;
// If the count down is finished, write some text
if (distance < 0) {
clearInterval(x);
document.getElementById("countdownText").innerHTML = "EXPIRED";
} else {
document.getElementById("countdownText").innerHTML = "<h2 style='margin:0px 25px;'>days</h2><h2 style='margin:0px 25px;'>hours</h2><h2 style='margin:0px 20px;'>minutes</h2><h2 style='margin:0px 20px;'>seconds</h2>";
}
}, 1000);
```
```
<div style="display: inline-block; background-color: black; padding: 10px; border-radius: 10px;">
<div style="display: inline-block; background-color: brown; padding: 10px; border-radius: 10px;">
<div style="font-size: 50px; color: white; font-family: monospace;" id="days"></div>
</div>
<span style="color:white; font-size:4rem;">:</span>
<div style="display: inline-block; background-color: brown; padding: 10px; border-radius: 10px;">
<div style="font-size: 50px; color: white; font-family: monospace;" id="hours"></div>
</div>
<span style="color:white; font-size:4rem;">:</span>
<div style="display: inline-block; background-color: brown; padding: 10px; border-radius: 10px;">
<div style="font-size: 50px; color: white; font-family: monospace;" id="minutes"></div>
</div>
<span style="color:white; font-size:4rem;">:</span>
<div style="display: inline-block; background-color: brown; padding: 10px; border-radius: 10px;">
<div style="font-size: 50px; color: white; font-family: monospace;" id="seconds"></div>
</div>
</div>
<span style="color:white; font-size:4rem;">:</span>
<div style="color: black; font-weight: bold; text-align: center; border:2px solid yellow">
<span id="countdownText" style="display:flex; gap:5; color:black">
</span>
</div>
```
| null | CC BY-SA 4.0 | null | 2023-02-15T09:03:11.423 | 2023-02-15T09:03:11.423 | null | null | 15,533,250 | null |
75,457,489 | 2 | null | 75,457,128 | 0 | null | I think that you should write separate unit tests for that method to keep everything as simple as possible.
So if you have `numberSort` function you need to create at least 3 unit tests that will cover all the paths in your's function
1. n1 > n2
2. n1 < n2
3. n1 = n2
If you create such 3 test cases you will cover the function in 100%
How ever beware of code line coverage it is not always a good metric
| null | CC BY-SA 4.0 | null | 2023-02-15T09:05:52.807 | 2023-02-15T09:05:52.807 | null | null | 3,883,369 | null |
75,457,592 | 2 | null | 37,758,256 | 1 | null | Another option could be using `after_stat` in your y `aes` to check if the plotted value is higher than 0 otherwise it will be replaced by NA to make sure it is removed from the histogram. This makes it possible to see differences between small values and zeros in a histogram like this (data from @eipi10):
```
set.seed(4958)
dat = data.frame(value=c(rnorm(5000, 10, 1), rep(15:20,1:6)))
library(ggplot2)
ggplot(dat, aes(x = value,
y = ifelse(after_stat(count) > 0, after_stat(count), NA))) +
geom_histogram(binwidth=0.5, color="black", fill="grey") +
theme_bw() +
scale_x_continuous(limits=c(5,25), breaks=5:25)
```

[reprex v2.0.2](https://reprex.tidyverse.org)
---
As you can see there is a difference between the smaller values and 0.
| null | CC BY-SA 4.0 | null | 2023-02-15T09:14:32.627 | 2023-02-15T09:14:32.627 | null | null | 14,282,714 | null |
75,457,600 | 2 | null | 38,986,910 | 0 | null | Even if we don't have admin access, use the below command to kill the port
➜ lsof -i :9096
```
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 49455 test 171u IPv6 0xccea5af095aca7d1 0t0 TCP
*:9096 (LISTEN)
```
kill 49455 (PID)
| null | CC BY-SA 4.0 | null | 2023-02-15T09:14:49.353 | 2023-02-15T09:14:49.353 | null | null | 11,050,168 | null |
75,457,610 | 2 | null | 21,323,421 | 0 | null | for Android Studio Electric Eel version
tested on mac os only [setting in android studio](https://i.stack.imgur.com/r7Jvb.png)
make sure that svn is configured(~/.subversion/config) in terminal and ssh key file is mentioned
[tunnels]
ssh = $SVN_SSH ssh -i /path-to-ssh-file/
go to android preference->version control -->Subversion -->Enbale interactive mode
| null | CC BY-SA 4.0 | null | 2023-02-15T09:15:30.430 | 2023-02-15T09:15:30.430 | null | null | 21,217,839 | null |
75,457,749 | 2 | null | 74,842,042 | 0 | null | As [@ferdy](https://stackoverflow.com/questions/74842042/google-auth-credentials-error-requires-a-json-file-provided-a-toml-file#comment132081328_74842042) suggested, go read the [Connect Streamlit to Google Cloud Storage](https://docs.streamlit.io/knowledge-base/tutorials/databases/gcs).
The steps you are probably missing:
- [Copy your app secrets to the cloud](https://docs.streamlit.io/knowledge-base/tutorials/databases/gcs#copy-your-app-secrets-to-the-cloud).> As the `secrets.toml` file above is not committed to GitHub, you need to
pass its content to your deployed app (on Streamlit Community Cloud)
separately.This avoids storing them on GitHub as you stated you don't want to do (and rightfully so).- [Use the newly stored credentials](https://docs.streamlit.io/knowledge-base/tutorials/databases/gcs#write-your-streamlit-app):```
import streamlit as st
from google.oauth2 import service_account
from google.cloud import storage
# Create API client.
credentials = service_account.Credentials.from_service_account_info(
st.secrets["gcp_service_account"]
)
client = storage.Client(credentials=credentials)
```
| null | CC BY-SA 4.0 | null | 2023-02-15T09:27:58.373 | 2023-02-15T09:27:58.373 | null | null | 5,446,749 | null |
75,457,790 | 2 | null | 63,261,150 | 0 | null | I have got an . The above methodologies were not working for me.
However, this worked: Run XCode Rosetta
> Finder -> Xcode in applications folder -> Get Info -> set Open with
Rosetta to true
Xcode is now under Rosetta.
[](https://i.stack.imgur.com/fWaBt.png)
| null | CC BY-SA 4.0 | null | 2023-02-15T09:31:34.300 | 2023-02-15T09:31:34.300 | null | null | 7,697,425 | null |
75,458,118 | 2 | null | 75,458,082 | 0 | null | add properties to the empty object
```
const { message, data } = response?.data || {data:[], message:''};
```
| null | CC BY-SA 4.0 | null | 2023-02-15T10:01:20.893 | 2023-02-15T10:01:20.893 | null | null | 6,428,638 | null |
75,458,350 | 2 | null | 75,442,239 | 0 | null | Solved the problem.
When an Application blocks dylib you can try this:
```
sudo spctl --master-disable
```
on Terminal.
Then go to settings->Privacy and click on allow apps downloaded from any site.
Then restart the STM32CubeIDE and it works on Debug mode.
Does STM32CubeIDE keep working if you reenable Gatekeeper afterwards?
Answering this question: Once you close the IDE, the Gatekeeper reenables automatically.
If not, the command is
```
sudo spctl --master-enable
```
| null | CC BY-SA 4.0 | null | 2023-02-15T10:22:31.677 | 2023-02-23T15:18:15.563 | 2023-02-23T15:18:15.563 | 20,529,648 | 20,529,648 | null |
75,458,468 | 2 | null | 75,378,580 | 1 | null | If anyone else is encountering this issue when updating their vue version. Please note that this error started to appear on version 3.2.45.
For the implementation pattern, as noted on the documentation, props should be considered readonly within the component. Vue did not enforce it enough prior to version 3.2.45.
Documentation with links to good implementation patterns : [https://vuejs.org/guide/components/props.html#one-way-data-flow](https://vuejs.org/guide/components/props.html#one-way-data-flow)
| null | CC BY-SA 4.0 | null | 2023-02-15T10:32:06.847 | 2023-02-15T10:32:06.847 | null | null | 1,934,749 | null |
75,459,164 | 2 | null | 53,158,836 | 0 | null | Check that nothing changed in the folder or folder structure your queries are using for source.
I had a similar problem with a big file with multiple queries. Nothing loaded anymore, even though in query editor everything was perfect.
Turns out that someone has created a new folder and added a file that didn't match the rest of the files in the source folder. All the queries that had something to do with the query reading from that folder stopped working.
Everything went back to normal once that extra folder/file were moved somewhere else.
| null | CC BY-SA 4.0 | null | 2023-02-15T11:32:48.313 | 2023-02-15T11:32:48.313 | null | null | 21,218,865 | null |
75,459,393 | 2 | null | 75,458,978 | 0 | null |
```
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvReasonText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@font/space_grotesk_bold"
android:gravity="center"
android:text="@string/cancel_booking"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
```
| null | CC BY-SA 4.0 | null | 2023-02-15T11:50:45.203 | 2023-02-15T11:50:45.203 | null | null | 7,931,023 | null |
75,459,631 | 2 | null | 75,455,161 | 0 | null | Start with parametrized spiral:
```
H = max height
R = max radius
n = number of screws
t = <0,1> input parameter
a = 2.0*M_PI*n*t;
r = R*t;
h = H*(1.0-t);
x = r*cos(a);
y = r*sin(a);
z = h;
```
Now just as you want to parametrize the spiral by `r` just compute `t` form `r`:
```
t = r/R;
```
so:
```
t = r/R;
h = H*(1.0-t);
a = 2.0*M_PI*n*t;
x = r*cos(a);
y = r*sin(a);
z = h;
```
so simply do a for loop where `r` goes from `0` to `R` with some small step and render lines between the computed points ...
Also the dependence between `H,R` is:
```
tan(Beta) = R/H
---------------
R = H*tan(Beta)
H = R/tan(Beta)
Beta = atan(R/H)
```
| null | CC BY-SA 4.0 | null | 2023-02-15T12:11:19.097 | 2023-02-15T12:16:55.173 | 2023-02-15T12:16:55.173 | 2,521,214 | 2,521,214 | null |
75,459,666 | 2 | null | 75,424,498 | 0 | null | [](https://i.stack.imgur.com/RTnC6.png)
```
.dropdown-item.active, .dropdown-item:active {
background-color: green;
color: white;
}
```
| null | CC BY-SA 4.0 | null | 2023-02-15T12:14:10.390 | 2023-02-15T12:14:10.390 | null | null | 14,314,096 | null |
75,459,866 | 2 | null | 54,262,245 | 0 | null | Also is likely that you have a rebase or cherry-pick not resolved in the branch, you have to --abort any of those process
| null | CC BY-SA 4.0 | null | 2023-02-15T12:33:56.517 | 2023-02-15T12:33:56.517 | null | null | 3,931,348 | null |
75,459,880 | 2 | null | 10,535,799 | 0 | null | In Eclipse 2022-09 using m2e 2.0.5 this is the Checkbox "Resolve Workspace artifacts" in maven run dialog.
| null | CC BY-SA 4.0 | null | 2023-02-15T12:34:54.270 | 2023-02-15T12:34:54.270 | null | null | 8,153,798 | null |
75,460,199 | 2 | null | 26,664,417 | 0 | null | Professional isometric styled games are actually 3D based with an orthographic camera. This way you dont have the complex problem of 2D sprite sorting in an isometric context and can rely on the hardware pixel-based z-Buffering.
Nevertheless, if you want to realize an isometric game without the comfort of a 3d-game engine, like in Java 2D, the approach of different sorted layers doesn't work. Same with the , cause both are actually intended for pure 2D top-down view based games.
So how to cope with this dilemma?
Well an approach would be to imitate the [Z-Buffering](https://en.wikipedia.org/wiki/Z-buffering) technique on a higher granular level, i.e. instead of considering each single pixel of each object in the scene, you consider tiles as a sorting base.
Like z-Buffering, pixels/tiles are rendered in the order of their individual distance to the camera:
The distance-formula of a tile-based object with coordinates (x, y, z) is proportional to:
```
d=y-x-z
```
Negative values are allowed, so d(A)=-1 as distance of an object A is closer to the camera and will be hence rendered after object B with distance d(B) = 1 which is farther away ...
The render steps for each render-cycle would therefore be:
1. Determine all objects which are visible (we don't wanna render all objects in a huge world, if we only see a small part of it)
2. Calculate the individual distances of each tile-based object in the scene with the given formula
3. Sort all visible objects by distance
4. Render all visible objects in descending order
I myself tested this strategy in JavaFX 2D and the result looks like this, i.e. it is a simple working technique for tile-based isometric rendering:
[](https://i.stack.imgur.com/rXsHb.jpg)
| null | CC BY-SA 4.0 | null | 2023-02-15T13:02:15.857 | 2023-02-15T13:02:15.857 | null | null | 4,469,165 | null |
75,460,729 | 2 | null | 75,448,383 | 0 | null | I discovered the problem. In my template had this code:
```
<div class="d-flex flex-row justify-content-end gap-3">
<a href="#" class="btn btn-primary" (click)="editPhrase()">Edit</a>
<a href="#" class="btn btn-primary">Detail</a>
</div>
```
I changed to this:
```
<div class="d-flex flex-row justify-content-end gap-3">
<a class="btn btn-primary" (click)="editPhrase()">Edit</a>
<a class="btn btn-primary">Detail</a>
</div>
```
I did not realized the "href" before.
Thanks everybody for help.
| null | CC BY-SA 4.0 | null | 2023-02-15T13:44:56.803 | 2023-02-15T13:44:56.803 | null | null | 12,894,533 | null |
75,461,196 | 2 | null | 38,161,295 | 0 | null | This "Clear All Nuget Cache(s)" will clear all the packages from the default.
You can change the path using NUGET_PACKAGES environment variable
[](https://i.stack.imgur.com/PGxO9.png)
| null | CC BY-SA 4.0 | null | 2023-02-15T14:22:39.780 | 2023-02-15T14:22:39.780 | null | null | 4,150,153 | null |
75,461,284 | 2 | null | 75,461,256 | 0 | null | `fill_diagonal` function is inplace, meaning the output of the method is None, so you shouldn't assign back to `lamb_diag`.
```
lamb_diag = np.zeros((N,N), float)
np.fill_diagonal(lamb_diag, self.lamb) # *
sigma = lamb_diag + sigma
```
| null | CC BY-SA 4.0 | null | 2023-02-15T14:30:21.717 | 2023-02-15T14:30:21.717 | null | null | 3,216,980 | null |
75,461,493 | 2 | null | 75,461,105 | 0 | null | You can achieve this first you need to calculate the Text widget to draw that blue underline with that same width of the text using `TextPainter` and `LayoutBuilder`:
```
class TextPainterWidget extends StatelessWidget {
final TextPainter textPainter;
const TextPainterWidget({
Key? key,
required this.textPainter,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return CustomPaint(
painter: _TextPainterWidget(textPainter),
);
}
}
class _TextPainterWidget extends CustomPainter {
final TextPainter textPainter;
_TextPainterWidget(this.textPainter);
@override
void paint(Canvas canvas, Size size) {
textPainter.layout();
textPainter.paint(canvas, Offset.zero);
}
@override
bool shouldRepaint(_TextPainterWidget oldDelegate) {
return oldDelegate.textPainter.text != textPainter.text ||
oldDelegate.textPainter.text?.style != textPainter.text?.style;
}
}
```
Then Your main widget should be like that:
```
LayoutBuilder(
builder: (BuildContext context, BoxConstraints constraints) {
final TextPainter textPainter = TextPainter(
text: const TextSpan(
text: 'Grab The Best Deal On ',
style: TextStyle(
color: Colors.black,
fontWeight: FontWeight.bold,
),
children: <TextSpan>[
TextSpan(
text: 'Smartphones',
style: TextStyle(
color: Colors.blue,
fontWeight: FontWeight.bold,
),
),
],
),
textDirection: TextDirection.ltr,
)..layout(maxWidth: constraints.maxWidth);
final double textWidth = textPainter.width;
return Column(
children: <Widget>[
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: <Widget>[
TextPainterWidget(textPainter: textPainter),
Row(
children: <Widget>[
const Text('View All'),
const SizedBox(width: 8),
InkWell(
onTap: () {},
child: const Icon(
Icons.arrow_forward_ios,
size: 15,
color: Colors.blue,
),
),
],
),
],
),
Row(
children: <Widget>[
SizedBox(
width: textWidth,
child: const Divider(
color: Colors.blue,
thickness: 2,
),
),
const Expanded(
child: Divider(
color: Colors.grey,
thickness: 1,
),
),
],
),
],
);
},
),
```
Here's the [code on Zapp](https://zapp.run/edit/flutter-zb2y06c6b2z0?entry=lib/main.dart&file=lib/main.dart)
| null | CC BY-SA 4.0 | null | 2023-02-15T14:46:30.600 | 2023-02-15T15:02:32.913 | 2023-02-15T15:02:32.913 | 6,694,858 | 6,694,858 | null |
75,461,524 | 2 | null | 75,458,978 | 0 | null | With this code you can maximize the width.
> android:layout_width="match_parent"
or
android:layout_width="0dp"
this code will help you to center the text
> android:textAlignment="center"
```
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvReasonText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAlignment="center"
android:fontFamily="@font/space_grotesk_bold"
android:gravity="center"
android:text="@string/cancel_booking"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
```
| null | CC BY-SA 4.0 | null | 2023-02-15T14:48:36.560 | 2023-02-15T14:48:36.560 | null | null | 13,629,974 | null |
75,461,761 | 2 | null | 75,402,980 | 0 | null | Check if functions is enabled for your project
[https://console.firebase.google.com/u/0/project/](https://console.firebase.google.com/u/0/project/)/functions
I even had to press the 'Get Started' button.
Before that I had to upgrade my project plan from Spark (free plan) to Blaze (Pay as you go)
Then 'Cloud Functions Admin' appeared in the list.
I hope this helps
| null | CC BY-SA 4.0 | null | 2023-02-15T15:05:50.283 | 2023-02-15T15:05:50.283 | null | null | 3,648,651 | null |
75,461,837 | 2 | null | 75,454,969 | 0 | null | It's not entirely clear what you are trying to do...
- `progressIndicator``progressIndicator`- - - `overlayView`
Note that it helps to include comments in your code, telling yourself what you to happen.
And, a tip: during development, give your UI elements contrasting background colors to make it easy to see the framing.
So, let's simplify this and start with a single image view and label:
```
class PVProgressIndicator: UIView {
let progressText: UILabel = {
let progressText = UILabel()
progressText.font = UIFont.systemFont(ofSize: 11)
progressText.text = ""
progressText.numberOfLines = 0
progressText.textAlignment = .right
progressText.translatesAutoresizingMaskIntoConstraints = false
// no need for any of this
//progressText.sizeToFit()
//progressText.layoutIfNeeded()
return progressText
}()
let iconView: UIImageView = {
let iconView = UIImageView()
iconView.translatesAutoresizingMaskIntoConstraints = false
if let image = UIImage(named: "feedback_success") {
iconView.image = image
} else {
// could not load image, so set background color
iconView.backgroundColor = .systemRed
}
// no need for any of this
//let renderer = UIGraphicsImageRenderer(size: CGSize(width: 16, height: 16))
//let resizedImage = renderer.image { _ in
// image.draw(in: CGRect(origin: .zero, size: CGSize(width: 16, height: 16)))
//}
//iconView.image = resizedImage
//iconView.sizeToFit()
//iconView.layoutIfNeeded()
return iconView
}()
private func setupView() {
// no need for this... add subviews to self
//let overlayView = UIView()
//overlayView.translatesAutoresizingMaskIntoConstraints = false
//addSubview(overlayView)
self.addSubview(iconView)
self.addSubview(progressText)
NSLayoutConstraint.activate([
// 20-points on top and bottom of iconView
iconView.topAnchor.constraint(equalTo: self.topAnchor, constant: 20.0),
iconView.bottomAnchor.constraint(equalTo: self.bottomAnchor, constant: -20.0),
// align iconView to leading-edge of self
iconView.leadingAnchor.constraint(equalTo: self.leadingAnchor, constant: 0.0),
// iconView 16 x 16
iconView.widthAnchor.constraint(equalToConstant: 16),
iconView.heightAnchor.constraint(equalToConstant: 16),
// progressText centered vertically
progressText.centerYAnchor.constraint(equalTo: self.centerYAnchor),
// progressText 15-points from iconView trailing edge
progressText.leadingAnchor.constraint(equalTo: iconView.trailingAnchor, constant: 15.0),
// align progressText to trailing-edge of self
progressText.trailingAnchor.constraint(equalTo: self.trailingAnchor, constant: 0.0),
])
// during development, use some background colors so we can see the framing
progressText.backgroundColor = .cyan
self.backgroundColor = .systemGreen
}
override init(frame: CGRect) {
super.init(frame: frame)
self.setupView()
}
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.setupView()
}
}
```
And an example view controller showing it. Each tap anywhere in the view will cycle through several "example" progress strings:
```
class PVTestViewController: UIViewController {
let progressBar = PVProgressIndicator()
let sampleStrings: [String] = [
"Short",
"Medium Length",
"A Longer Sample String",
"This one should be long enough that it will word wrap onto more than one line.",
"Let's make this sample string\nuse\n4 lines\nof text.",
"If the progress text might be very, very long... so long that it could wrap onto more than four lines (like this), then some additional constraints will need to be set on the elements in the progressBar view.",
]
var sampleIDX: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
progressBar.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(progressBar)
// respect safe-area
let g = view.safeAreaLayoutGuide
NSLayoutConstraint.activate([
// constrain progressBar Top 20-points from top of safe area
progressBar.topAnchor.constraint(equalTo: g.topAnchor, constant: 20.0),
// centered horizontally
progressBar.centerXAnchor.constraint(equalTo: g.centerXAnchor),
// let's set the max width to 75% of safe area width
progressBar.widthAnchor.constraint(lessThanOrEqualTo: g.widthAnchor, multiplier: 0.75),
// progressBar sets it's own height
])
updateProgress()
// instruction label
let v = UILabel()
v.text = "Tap anywhere to cycle through the sample progress strings."
v.numberOfLines = 0
v.textAlignment = .center
v.translatesAutoresizingMaskIntoConstraints = false
view.addSubview(v)
NSLayoutConstraint.activate([
v.leadingAnchor.constraint(equalTo: g.leadingAnchor, constant: 40.0),
v.trailingAnchor.constraint(equalTo: g.trailingAnchor, constant: -40.0),
v.centerYAnchor.constraint(equalTo: g.centerYAnchor),
])
}
func updateProgress() {
progressBar.progressText.text = sampleStrings[sampleIDX % sampleStrings.count]
}
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
sampleIDX += 1
updateProgress()
}
}
```
When you start, it will look like this:
[](https://i.stack.imgur.com/2SMux.png)
Each tap cycles to the next sample string...
[](https://i.stack.imgur.com/Sp4xt.png)
| null | CC BY-SA 4.0 | null | 2023-02-15T15:12:45.453 | 2023-02-15T15:12:45.453 | null | null | 6,257,435 | null |
75,462,082 | 2 | null | 17,590,886 | 0 | null | I had the same issue with `display:none;` breaking my layout. I ended up just removing the style and using jQuery's:
```
$(".element").show();
$(".element").hide();
```
| null | CC BY-SA 4.0 | null | 2023-02-15T15:35:15.467 | 2023-02-15T15:42:22.670 | 2023-02-15T15:42:22.670 | 6,045,800 | 3,298,156 | null |
75,462,255 | 2 | null | 59,366,833 | 0 | null | I don't think so we need to involve git for this issue.
Just restart the vs-code and things will work like a rocket
| null | CC BY-SA 4.0 | null | 2023-02-15T15:49:39.503 | 2023-02-15T15:49:39.503 | null | null | 6,927,983 | null |
75,462,364 | 2 | null | 75,462,176 | 0 | null | This can be caused because your database schema is not in synced with your Entity class. My advice is to inspect your database schema to see if your table has all the columns you expected. Might be more helpful if you show us your database table ;)
| null | CC BY-SA 4.0 | null | 2023-02-15T15:59:17.840 | 2023-02-15T15:59:17.840 | null | null | 14,304,860 | null |
75,462,448 | 2 | null | 75,462,008 | 0 | null | to block horizontally scrolling you can use css property.add this code into your css file:
```
.body{
overflow-y: hidden;
overflow-x: auto;
}
```
this code automaticly removes horizontal scrool bar.
| null | CC BY-SA 4.0 | null | 2023-02-15T16:05:34.173 | 2023-02-15T16:10:47.447 | 2023-02-15T16:10:47.447 | 21,171,901 | 21,171,901 | null |
75,462,510 | 2 | null | 14,785,679 | 0 | null | WordPress Dashboard (admin world) items cannot be updated using CSS in the Customizer. That only affects front-end CSS. You must use functions, or a plugin/functions combination.
See this article for a solution that doesn't involve hacking functions in WP:
[https://chriseller.com/how-to-remove-items-from-the-wordpress-admin-top-bar/](https://chriseller.com/how-to-remove-items-from-the-wordpress-admin-top-bar/)
| null | CC BY-SA 4.0 | null | 2023-02-15T16:11:01.000 | 2023-02-15T16:11:01.000 | null | null | 21,220,820 | null |
75,462,536 | 2 | null | 75,462,461 | 1 | null | Just use `.*` instead of `[^\]]*`, so the match won't stop at the first `]`.
```
let string = '[Abc ](https://quiz.com?/quiz_id=2/quiz_name=15/level=null)';
let result = string.replace(/\[.*\]/, '');
console.log(result);
```
| null | CC BY-SA 4.0 | null | 2023-02-15T16:13:08.633 | 2023-02-15T16:13:08.633 | null | null | 1,491,895 | null |
75,462,578 | 2 | null | 38,104,560 | 0 | null | If you're using the Brave browser, just turn off your shields for that page.
| null | CC BY-SA 4.0 | null | 2023-02-15T16:17:05.103 | 2023-02-15T16:17:05.103 | null | null | 9,075,248 | null |
75,462,576 | 2 | null | 75,462,461 | 0 | null | You can use `match` method with `/\[.*?\]\((.*)\)/` regex. to get the `text` after opening and closing the square bracket and between parenthesis.
```
const str = '[Abc ](https://quiz.com?/quiz_id=2/quiz_name=15/level=null)'
const [_, value] = str.match(/\[.*\]\((.*)\)/);
console.log(value)
```
| null | CC BY-SA 4.0 | null | 2023-02-15T16:16:54.560 | 2023-02-15T16:22:03.457 | 2023-02-15T16:22:03.457 | 11,887,902 | 11,887,902 | null |
75,462,666 | 2 | null | 75,460,472 | 0 | null | A View Model based solution may look as following:
```
double _MyValidNumber;
string _MyNumber;
public string MyNumber
{
get
{
return _MyNumber;
}
set
{
_MyNumber = value;
double _temp;
string toBexamined = value;
if (!toBexamined.Contains("."))
{
toBexamined += ".0";
}
if (toBexamined.EndsWith("."))
{
toBexamined += "0";
}
if (!double.TryParse(toBexamined, out _temp))
{
_MyNumber = _MyValidNumber.ToString();
}
else
{
_MyValidNumber = _temp;
}
NotifyPropertyChanged(nameof(MyNumber)); }
}
```
| null | CC BY-SA 4.0 | null | 2023-02-15T16:24:02.307 | 2023-02-15T16:24:02.307 | null | null | 20,904,815 | null |
75,462,714 | 2 | null | 75,462,461 | 0 | null | The regular expression you were using was using only up to the first ']'. This regular expression should do it:
[.*]
```
let sentence = "[Abc ](https://quiz.com?/quiz_id=2/quiz_name=15/level=null)";
let extractedSentence = sentence.replace(/\[.*\]/, "");
```
| null | CC BY-SA 4.0 | null | 2023-02-15T16:28:21.040 | 2023-02-15T16:28:21.040 | null | null | 19,112,258 | null |
75,463,322 | 2 | null | 74,936,302 | 0 | null | Try to use
```
import * as FaceMesh from '@mediapipe/face_mesh';
```
instead of what you have as import for you have for face_mesh currently.
Also, when you create the object instance, use:
```
const faceMesh:FaceMesh.FaceMesh = new FaceMesh.FaceMesh (...)
```
| null | CC BY-SA 4.0 | null | 2023-02-15T17:19:12.370 | 2023-02-15T17:19:12.370 | null | null | 14,888,491 | null |
75,464,022 | 2 | null | 75,463,987 | 0 | null | Try using Align widget like
```
Align(
alignment: Alignment.centerRight,
child: ElevatedButton(
```
| null | CC BY-SA 4.0 | null | 2023-02-15T18:27:45.310 | 2023-02-15T18:27:45.310 | null | null | 10,157,127 | null |
75,464,024 | 2 | null | 75,463,987 | 0 | null | Wrap the ElevatedButton in Row and add Expanded(child: SizedBox.expand()) as first child to this row and ElevatedButton as 2nd child.
| null | CC BY-SA 4.0 | null | 2023-02-15T18:27:57.287 | 2023-02-15T18:27:57.287 | null | null | 16,569,443 | null |
75,464,023 | 2 | null | 75,460,472 | 0 | null | I would like to present a solution that is based on using a User Control - TextBoxDouble.
How we use it :
```
<local:TextBoxDouble Number="{Binding SimpleNumber,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
```
the TextBoxDouble XAML is as following:
```
<UserControl x:Class="Problem19_ValidateANumber.TextBoxDouble"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Problem19_ValidateANumber"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800" Name="Parent">
<Grid>
<TextBox Text="{Binding ElementName=Parent,Path=Text,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}" />
</Grid>
</UserControl>
```
In the Code Behind we have defined 2 dependency properties: Text and Number.
The 2 properties exchange the data. The Text Property is for the UI side and the Number is for the View Model property side.
```
public partial class TextBoxDouble : UserControl
{
public TextBoxDouble()
{
InitializeComponent();
}
public string Text
{
get { return (string)GetValue(TextProperty); }
set {
SetValue(TextProperty, value);
SetValue(TextProperty, value);
}
}
public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text", typeof(string), typeof(TextBoxDouble),
new PropertyMetadata(string.Empty, new PropertyChangedCallback(TextPropertyChanged)));
public double Number
{
get { return (double)GetValue(NumberProperty); }
set
{
SetValue(NumberProperty, value);
}
}
public static readonly DependencyProperty NumberProperty =
DependencyProperty.Register("Number", typeof(double), typeof(TextBoxDouble),
new PropertyMetadata(double.NaN, new PropertyChangedCallback(NumberPropertyChanged)));
private static void TextPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
{
TextBoxDouble ours = (TextBoxDouble)obj;
if (e.NewValue == e.OldValue) return;
double _temp;
string toBexamined = (string)e.NewValue;
if (!toBexamined.Contains("."))
{
toBexamined += ".0";
}
if (toBexamined.EndsWith("."))
{
toBexamined += "0";
}
if (!double.TryParse(toBexamined, out _temp))
{
ours.SetValue(TextProperty, ours.Number.ToString());
}
else
{
ours.SetValue(NumberProperty, _temp);
}
}
private static void NumberPropertyChanged(DependencyObject obj, DependencyPropertyChangedEventArgs e)
{
TextBoxDouble ours = (TextBoxDouble)obj;
if (e.NewValue == e.OldValue) return;
ours.SetValue(TextProperty, ours.Number.ToString());
}
}
```
| null | CC BY-SA 4.0 | null | 2023-02-15T18:27:56.463 | 2023-02-15T18:27:56.463 | null | null | 20,904,815 | null |
75,464,061 | 2 | null | 20,915,266 | 0 | null | I solved this issue with the new Android Studio electric eel optional flags when invalidate cache and restart
Go to `file - invalidate caches...`
Check all boxes, android studio will restart
[](https://i.stack.imgur.com/6ANU7.png)
This worked for me.
If still does not work
- `<activity>``com.yourpackage.YourActivity`- -
| null | CC BY-SA 4.0 | null | 2023-02-15T18:30:47.307 | 2023-02-15T18:30:47.307 | null | null | 9,164,141 | null |
75,464,084 | 2 | null | 43,379,971 | 0 | null | its always better to specify full address for css file like
```
href="http://localhost/public/css/yee.css"
```
and make sure you use correct protocol http:// or https for your server.
ps you can save your site directory as a constant, in order to not check links during deployment
| null | CC BY-SA 4.0 | null | 2023-02-15T18:32:37.453 | 2023-02-15T18:32:37.453 | null | null | 13,495,528 | null |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.