Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
74,006,626 | 2 | null | 74,005,528 | 0 | null |
1. You have to add mix-blend-mode: difference; to .cursor and delete it from .cursor__ball.
2. In style of .cursor__ball circle change fill:black to fill:white
3. Set background-color:white; to body (without setting this it doesn't work), because mix-blend-mode: difference; changes colors so if body background is white then mix-blend-mode will change fill of .cursor__ball circle to opposite color so it must have fill:white. Like that. codepen: https://codepen.io/Lukas249/pen/zYjMxRb
```
const $bigBall = document.querySelector('.cursor__ball--big');
const $smallBall = document.querySelector('.cursor__ball--small');
const $hoverables = document.querySelectorAll('a');
// Listeners
document.body.addEventListener('mousemove', onMouseMove);
for (let i = 0; i < $hoverables.length; i++) {
$hoverables[i].addEventListener('mouseenter', onMouseHover);
$hoverables[i].addEventListener('mouseleave', onMouseHoverOut);
}
// Move the cursor
function onMouseMove(e) {
TweenMax.to($bigBall, .4, {
x: e.clientX - 15,
y: e.clientY - 15
});
TweenMax.to($smallBall, .1, {
x: e.clientX - 5,
y: e.clientY - 7
});
}
// Hover an element
function onMouseHover() {
TweenMax.to($bigBall, .3, {
scale: 1.7
});
}
function onMouseHoverOut() {
TweenMax.to($bigBall, .3, {
scale: 1
});
}
```
```
html {
background-color: white;
}
body {
background-color: white;
}
body .cursor {
pointer-events: none;
}
body .cursor__ball {
position: fixed;
top: 0;
left: 0;
z-index: 1000;
}
body .cursor {
mix-blend-mode: difference;
}
body .cursor__ball circle {
fill: white;
}
a {
font-size:1.5rem;
}
```
```
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script>
</head>
<body>
<a>text text text text text text text text text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text texttext text text text text text text</a>
<!-- Custom Cursor -->
<div class="cursor">
<div class="cursor__ball cursor__ball--big ">
<svg height="30" width="30">
<circle cx="15" cy="15" r="12" stroke-width="0"></circle>
</svg>
</div>
<div class="cursor__ball cursor__ball--small">
<svg height="10" width="10">
<circle cx="5" cy="5" r="4" stroke-width="0"></circle>
</svg>
</div>
</div>
</body>
</html>
```
```
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<a>text text text text text text text text text text text text text texttext text text text text text texttext text text
text text text texttext text text text text text texttext text text text text text texttext text text text text text
texttext text text text text text texttext text text text text text texttext text text text text text texttext text
text text text text texttext text text text text text texttext text text text text text texttext text text text text
text texttext text text text text text texttext text text text text text texttext text text text text text texttext
text text text text text texttext text text text text text texttext text text text text text texttext text text text
text text text</a>
<div class="cursor">
<div class="cursor__ball cursor__ball--big ">
<svg height="30" width="30">
<circle cx="15" cy="15" r="12" stroke-width="0"></circle>
</svg>
</div>
<div class="cursor__ball cursor__ball--small">
<svg height="10" width="10">
<circle cx="5" cy="5" r="4" stroke-width="0"></circle>
</svg>
</div>
</div>
<style>
html {
background-color: white;
}
body {
background-color: white;
}
body .cursor {
pointer-events: none;
}
body .cursor__ball {
position: fixed;
top: 0;
left: 0;
z-index: 1000;
}
body .cursor {
mix-blend-mode: difference;
}
body .cursor__ball circle {
fill: white;
}
a {
font-size: 1.5rem;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/1.20.3/TweenMax.min.js"></script>
<script>
const $bigBall = document.querySelector('.cursor__ball--big');
const $smallBall = document.querySelector('.cursor__ball--small');
const $hoverables = document.querySelectorAll('a');
// Listeners
document.body.addEventListener('mousemove', onMouseMove);
for (let i = 0; i < $hoverables.length; i++) {
$hoverables[i].addEventListener('mouseenter', onMouseHover);
$hoverables[i].addEventListener('mouseleave', onMouseHoverOut);
}
// Move the cursor
window.CP.exitedLoop(0); function onMouseMove(e) {
TweenMax.to($bigBall, .4, {
x: e.clientX - 15,
y: e.clientY - 15
});
TweenMax.to($smallBall, .1, {
x: e.clientX - 5,
y: e.clientY - 7
});
}
// Hover an element
function onMouseHover() {
TweenMax.to($bigBall, .3, {
scale: 1.7
});
}
function onMouseHoverOut() {
TweenMax.to($bigBall, .3, {
scale: 1
});
}
</script>
</body>
</html>
```
| null | CC BY-SA 4.0 | null | 2022-10-09T16:45:09.673 | 2022-10-09T20:23:35.903 | 2022-10-09T20:23:35.903 | 17,322,895 | 17,322,895 | null |
74,006,686 | 2 | null | 73,968,706 | 0 | null | Do not delete the file on disk. That will cause corruption in your database; even if you don't intend to use that specific table it's likely that MySQL will try to refer to that table and will not start correctly or will have data errors.
In most default installations, MySQL generally doesn't give back disk space that it has previously used; even if you delete the table from within MySQL. However, it seems to me like your installation is configured differently and you might automatically get that disk space back if you delete that table. However, you risk causing data reference integrity problems. I don't know anything about that plugin so you could check with the plugin authors for information about how to remove the plugin and that table without causing issues with the rest of your data. It could be that dropping that table is all that's needed, but I'm not sure.
You can sometimes reclaim space by using the OPTIMIZE TABLE command, which is available graphically from the Operations tab of each table within phpMyAdmin. That will only bring back space that isn't being used (for example, if you delete a lot of rows); so it is not very useful by itself if you haven't removed any data from the table inside MySQL, but if you restructure your database, remove some rows, or truncate the table this can help get some disk space back.
| null | CC BY-SA 4.0 | null | 2022-10-09T16:51:30.100 | 2022-10-09T16:51:30.100 | null | null | 2,385,479 | null |
74,006,747 | 2 | null | 74,006,389 | 3 | null | Use `map_dfr` and just pass the name of the new column to argument `.id`. From the documentation, my emphasis:
> .id
Either a string or NULL. If a string, the output will contain or the index (if .x is unnamed) of the input. If NULL, the default, no variable will be created.
Only applies to _dfr variant.
```
library(datasets)
library(tidyverse)
ans_long = anscombe %>%
pivot_longer(
everything(),
names_to = c(".value", "set"),
names_pattern = "(.)(.)"
)
ans_long %>%
split(.$set) %>%
lapply(\(k) lm(y ~ x, k)) %>%
map_dfr(broom::augment, .id = "set") %>%
ggplot(aes(.fitted, .resid, color = set)) +
geom_point() +
labs(title = "Anscombe's Quartet",
x = "Fitted Values", y = "Residuals") +
facet_wrap(~ set)
```

[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2022-10-09T16:58:57.960 | 2022-10-09T17:07:00.607 | 2022-10-09T17:07:00.607 | 8,245,406 | 8,245,406 | null |
74,007,018 | 2 | null | 74,006,620 | 0 | null | I would filter for the month, sort the list and take the first entry:
```
void main() {
List<DateTime> list = [DateTime(2000,06,23), DateTime(2000,06,21),DateTime(2000,06,22)];
list = list.where((date) => (date.month == 6)).toList();
list.sort((a,b) => b.day.compareTo(a.day));
print(list[0]);
}
```
| null | CC BY-SA 4.0 | null | 2022-10-09T17:34:57.780 | 2022-10-09T17:34:57.780 | null | null | 18,400,847 | null |
74,007,110 | 2 | null | 59,892,170 | 0 | null | Using the Operator [https://www.keycloak.org/guides#operator](https://www.keycloak.org/guides#operator), I had the same issue.
The username and password provided by this step
```
kubectl get secret example-kc-initial-admin -o jsonpath='{.data.username}' | base64 --decode
kubectl get secret example-kc-initial-admin -o jsonpath='{.data.password}' | base64 --decode
```
[https://www.keycloak.org/operator/basic-deployment#_accessing_the_keycloak_deployment](https://www.keycloak.org/operator/basic-deployment#_accessing_the_keycloak_deployment)
did not work.
What apparently solved it for me was deleting all Keycloak CRs, deployments, services, etc. and starting the tutorial from the beginning. Then, I omitted this optional step:
> We suggest you to first store the Database credentials in a separate Secret, you can do it for example by running:
```
kubectl create secret generic keycloak-db-secret \
--from-literal=username=[your_database_username] \
--from-literal=password=[your_database_password]
```
(with made up Postgres username and password filling in the brackets)
I am not sure how the Database secret relates to the Admin User secret, but now the username and password in `example-kc-initial-admin` work. Perhaps Postgres was inaccessible to Keycloak. This was not indicated in the Keycloak logs.
I don't believe starting fresh was the solution, because I already tried that. Omitting `keycloak-db-secret` seems to have been important. I will need to fully understand where the DB secret is set, now; it may be insecure.
| null | CC BY-SA 4.0 | null | 2022-10-09T17:45:03.430 | 2022-10-09T17:45:03.430 | null | null | 1,007,926 | null |
74,007,137 | 2 | null | 74,006,620 | 1 | null | Just add one to the date, and see if it's in the next month:
```
void main(List<String> arguments) {
for (final w
in '2022-01-01 2022-01-30 2022-01-31' ' 2022-02-01 2022-02-28 2024-02-28'
.split(' ')) {
// print(w);
final wd = DateTime.parse(w);
final isLastDay = isLastDayOfMonth(wd);
print('$w is last day of month? $isLastDay');
}
}
bool isLastDayOfMonth(DateTime when) {
return DateTime(when.year, when.month, when.day + 1).day == 1;
}
### output:
2022-01-01 is last day of month? false
2022-01-30 is last day of month? false
2022-01-31 is last day of month? true
2022-02-01 is last day of month? false
2022-02-28 is last day of month? true
2024-02-28 is last day of month? false
```
| null | CC BY-SA 4.0 | null | 2022-10-09T17:48:10.773 | 2022-10-09T17:55:33.047 | 2022-10-09T17:55:33.047 | 22,483 | 22,483 | null |
74,007,444 | 2 | null | 73,998,231 | 0 | null | Use the built in `NumericUpDown` control and set the number of decimal places in it as shown below. This control is designed to handle numeric values with or without decimal point, it will handle the decimal point for you so that you don't have to worry about it
[](https://i.stack.imgur.com/NyMSK.png)
| null | CC BY-SA 4.0 | null | 2022-10-09T18:28:50.347 | 2022-10-09T18:28:50.347 | null | null | 1,540,415 | null |
74,007,875 | 2 | null | 53,582,150 | 1 | null | I had a custom control, pretty much completely self-drawn, that was dynamically getting added to a Form in the dropdown mechanism in `PropertyGrid`.
If I read your problem right, it's basically the same overall issue.
I had BackColor set and was fine. But with DoubleBuffer set, it seems to just ignore it for a bit.
Taking in all of the existing comments on the question, I was able to have this solution, and hope the details help someone else make their own.
My control flickered unless I repainted whole control every `OnPaint`.
If did proper painting only attempting to paint things that intersected the `e.ClipRectangle`, then it would flicker in real-time, like effects from invalidates that had to do when the mouse was moved. Attempt to Paint whole thing, no problem.
I watched trace output real-time and watched all of my draws and invalidates print, and never a time where should be introducing flicker myself, on myself directly.
If I turn on `DoubleBuffered`, then instead it flickered badly as the control was shown every time opening the dropdown. From white background only for 100-200 ms, at least, then to black and rendered foreground suddenly in one step.
I never actually needed double buffer. Both the problem 1 and 2 were always related to `WM_ERASEBKGND`.
The actual original flicker seems to be caused by `WM_ERASEBKGND` very briefly visibly whacking my already painted thing, right before I painted it again. Did not really need actual double buffering in my case. For some reason when I was blindly painting the whole list maybe the timing was different and was painting over the erase before could see it.
All that said, if I turn `DoubleBuffered` on which removes `WM_ERASEBKGND` via turning on `AllPaintingInWmPaint`, then initial background won't be painted until I suppose the double buffer and paint process works its way, all the way through the first time.
If I let the `WM_ERASEBKGND` "just happen", then it's still double painting, and I don't know if or when it might end up flicking anyway for someone else.
If I only turn on `SetStyle(OptimizedDoubleBuffer`, then I now know I'll be letting the initial background paint and not flicker on show. But I also know I'm using double buffer to mask the `WM_ERASEBKGND` for the entirety of the life of the control after it is shown.
So....
I did something like this:
if the user of the control sees a need to double buffer doing something that might flicker, create a way for them to easily enable it, without forcing `AllPaintingInWmPaint`. Like if they want to use Paint or a DrawXXX event and doing something that animates or something related to mouse movement.
```
bool _isDoubleBuffer;
[Category("Behavior")]
public virtual bool DoubleBuffer
{
get { return _isDoubleBuffer; } // dont care about real SetStyle state
set
{
if (value != DoubleBuffer)
{
_isDoubleBuffer = value;
SetStyle(ControlStyles.OptimizedDoubleBuffer, value);
}
}
}
```
Manage `WM_ERASEBKGND` yourself, as the choice is otherwise 1) always off with AllPaintingInWmPaint, and no background paint on show, or 2) violating what double buffer expects where it would be always masking the WM_ERASEBKGND.
```
protected override void WndProc(ref Message m)
{
switch (m.Msg)
{
case WM_ERASEBKGND:
if (_hasPaintForeground && _isDoubleBuffer)
return;
}
base.WndProc(ref m);
}
```
You are now your own decider of what AllPaintingInWmPaint means.
In this case would want the initial messages to process like normal. When we knew for sure the .Net and DoubleBuffer side was finally kicking it, by seeing our first real paint happen, then turn WM_ERASEBKGND off for the duration.
```
bool _hasPaintForeground;
protected override void OnPaint(PaintEventArgs e)
{
// your paint code here, if any
base.OnPaint(e);
if (!_hasPaintForeground) // read cheaper than write every time
{
_hasPaintForeground = true;
}
}
```
In my case, I also had originally gimped the OnBackground draw, which works if you are opaque drawing each element yourself in OnPaint. This allowed me to not have double buffer on for so long until I started following the clip and changed the timing so that I started also seeing the other WM_ERASEBKGND side effects and issues.
```
protected override void OnPaintBackground(PaintEventArgs e)
{ // Paint default background until first time paint foreground.
if (!_hasPaintForeground) // This will kill background image but stop background flicker
{ // and eliminate a lot of code, and need for double buffer.
base.OnPaintBackground(e);
} // PaintBackground is needed on first show so no white background
}
```
I may not need this part anymore, but if my `DoubleBuffer` is off then I would. So long as I'm always painting opaque in OnPaint covering the whole draw Clip area.
---
In addition to all of that....
Separate issue with text render.
It looks like if I render only 250 x 42, like two rows and two text renders, which all occur in one OnPaint, verified with `Diagnostics.Trace.WriteLine`, then the text renders at least one monitor frame later, every single time. Making it look like the text is flashing. Is just 2x paint background single color then 2x paint text each for rows.
However, if I attempt to paint the whole client area of like 250 x 512 or whatever, like 17 rows, even though the e.Clip is exactly those two rows, because I'm the one that invalidated it, then no flicker of the text, 0 flicker.
There is either some timing issue or other side effect. But that's 17 chances instead of two, for at least one row to flicker text where the whole background is shown before the text renders, and it never happens. If I try to only render rows that are in the clip area it happens every time.
There is def something going with .Net or Windows. I tried with both `g.DrawString` and `TextRenderer.DrawText` and they both do it. Flicker if draw 2, not flicker if attempt to draw 17. Every time.
- `OnPaint`-
So....
It's a good thing I went through this exercise with the original question.
I may choose to just render the whole client every time, but I'll never be able to do it the "right way" without something like my example code above.
| null | CC BY-SA 4.0 | null | 2022-10-09T19:40:56.927 | 2022-10-09T22:57:48.617 | 2022-10-09T22:57:48.617 | 714,557 | 714,557 | null |
74,008,050 | 2 | null | 73,990,660 | 0 | null | You can try getting a specific row and then iterating over cells in this row skipping the first N cells:
```
row = sheet.row(2) # get the third row
row.each_with_index do |cell, index|
next if index < 3 # skip first three cells
# do something with the data specified in cell variable
end
```
| null | CC BY-SA 4.0 | null | 2022-10-09T20:09:46.327 | 2022-10-09T20:09:46.327 | null | null | 1,692,419 | null |
74,008,274 | 2 | null | 74,006,892 | 0 | null | To get all rows that match the unique ID whose checkbox was ticked, use [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), like this:
```
/**
* Simple trigger that runs each time the user hand edits the spreadsheet.
*
* @param {Object} e The onEdit() event object.
*/
function onEdit(e) {
if (!e) {
throw new Error(
'Please do not run the onEdit(e) function in the script editor window. '
+ 'It runs automatically when you hand edit the spreadsheet.'
+ 'See https://stackoverflow.com/a/63851123/13045193.'
);
}
moveRowsByUniqueId_(e);
}
/**
* Triggers on a checkbox click and moves rows that match a unique ID.
*
* @param {Object} e The onEdit() event object.
*/
function moveRowsByUniqueId_(e) {
let sheet;
if (e.value !== 'TRUE'
|| e.range.rowStart <= 1
|| e.range.columnStart !== 8
|| (sheet = e.range.getSheet()).getName() !== 'Reference') {
return;
}
e.source.toast('Moving rows...');
const uniqueId = e.range.offset(0, -1).getValue();
const range = sheet.getRange('A2:E');
const values = range.getValues();
const targetSheet = e.source.getSheetByName('Processing');
const _matchWithId = (row) => row[4] === uniqueId;
const valuesToAppend = values.filter(_matchWithId);
if (uniqueId && valuesToAppend.length) {
appendRows_(targetSheet, valuesToAppend);
range.clearContent();
const remainingValues = values.filter((row) => !_matchWithId(row));
range.offset(0, 0, remainingValues.length, remainingValues[0].length)
.setValues(remainingValues);
e.source.toast(`Done. Moved ${valuesToAppend.length} rows.`);
} else {
e.source.toast('Done. Found no rows to move.');
}
e.range.setValue(false);
}
```
For that to work, you will need to paste the [appendRows_()](https://webapps.stackexchange.com/a/159426/269219) and getLastRow_() utility functions in your script project.
| null | CC BY-SA 4.0 | null | 2022-10-09T20:53:57.550 | 2022-10-09T20:53:57.550 | null | null | 13,045,193 | null |
74,008,682 | 2 | null | 74,008,572 | 0 | null | The problem is the line:
```
df_merged = df1.join(df2, lsuffix="_left", rsuffix="_right", how='left')
```
where `df_merged` will be set in the loop always to the join of `df1` with current `df2`.
The result after the loop is therefore a join of `df1` with the last `df2` and the `Donald` gets lost in this process.
To fix this problem first join empty `df_merged` with `df1` and then in the loop join `df_merged` with `df2`.
Here the full code with the changes (not tested):
```
# Identify names that are in the dataset
names = df['name'].unique().tolist()
# Define dataframe with first name
df1 = pd.DataFrame()
df1 = df[(df == names[0]).any(axis=1)]
df1 = df1.drop(['name'], axis=1)
df1 = df1.rename({'color':'color_'+str(names[0]), 'number':'number_'+str(names[0])}, axis=1)
# Make dataframes with other names and their corresponding color and number, add them to df1
df_merged = pd.DataFrame()
df_merged = df_merged.join(df1) # <- add options if necessary
for i in range(1, len(names)):
df2 = pd.DataFrame()
df2 = df[(df == names[i]).any(axis=1)]
df2 = df2.drop(['name'], axis=1)
df2 = df2.rename({'color':'color_'+str(names[i]), 'number':'number_'+str(names[i])}, axis=1)
# join the current df2 to df_merged:
df_merged = df_merged.join(df2, lsuffix="_left", rsuffix="_right", how='left')
```
| null | CC BY-SA 4.0 | null | 2022-10-09T22:07:01.977 | 2022-10-09T22:22:38.773 | 2022-10-09T22:22:38.773 | 7,711,283 | 7,711,283 | null |
74,008,688 | 2 | null | 74,008,572 | 0 | null | sample df
```
import pandas as pd
data = {'name': {'2020-01-01 00:00:00': 'Justin', '2020-01-02 00:00:00': 'Justin', '2020-01-03 00:00:00': 'Donald'}, 'color': {'2020-01-01 00:00:00': 'blue', '2020-01-02 00:00:00': 'red', '2020-01-03 00:00:00': 'green'}, 'number': {'2020-01-01 00:00:00': 1, '2020-01-02 00:00:00': 2, '2020-01-03 00:00:00': 9}}
df = pd.DataFrame(data)
print(f"{df}\n")
name color number
2020-01-01 00:00:00 Justin blue 1
2020-01-02 00:00:00 Justin red 2
2020-01-03 00:00:00 Donald green 9
```
final df
```
df = (
df
.reset_index(names="date")
.pivot(index="date", columns="name", values=["color", "number"])
.fillna("")
)
df.columns = ["_".join(x) for x in df.columns.values]
print(df)
color_Donald color_Justin number_Donald number_Justin
date
2020-01-01 00:00:00 blue 1
2020-01-02 00:00:00 red 2
2020-01-03 00:00:00 green 9
```
| null | CC BY-SA 4.0 | null | 2022-10-09T22:08:07.817 | 2022-10-09T22:08:07.817 | null | null | 3,249,641 | null |
74,009,305 | 2 | null | 74,006,892 | 0 | null | It work almost like asked but :
- - `-`- -
```
function onEdit(e){
console.log(SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Reference").getRange("H3").getValue())
var tableReference = new TableWithHeaderHelper(SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Reference").getRange("A1").getDataRegion());
var tableReferenceId = new TableWithHeaderHelper(SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Reference").getRange("G11").getDataRegion());
var tableProcessing = new TableWithHeaderHelper(SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Processing").getRange("A1").getDataRegion());
// get value
var id = tableReferenceId.getTableWhereColumn("Move to Sheet").matchValue(1).getWithinColumn("Unique Filter").cellAtRow(0).getValue();
var tableWithinId = tableReference.getTableWhereColumn("Shipment ID").matchValue(id)
for(var i=0 ; i < tableWithinId.length() ; i++){
var rangeRowWithinId = tableWithinId.getRow(i);
tableProcessing.addNewEntry(rangeRowWithinId);
for(var cell in rangeRowWithinId.getRange()) cell.setValue("-");
}
//reset value
tableReferenceId.getTableWhereColumn("Move to Sheet").matchValue(1).getWithinColumn("Move to Sheet").cellAtRow(0).setValue(0)
}
```
See below the app script file you need to create in order to use this utils function:
[https://github.com/SolannP/UtilsAppSsript/blob/main/UtilsGSheetTableHelper.gs](https://github.com/SolannP/UtilsAppSsript/blob/main/UtilsGSheetTableHelper.gs)
[](https://i.stack.imgur.com/FuEAe.gif)
| null | CC BY-SA 4.0 | null | 2022-10-10T00:35:22.430 | 2022-10-10T00:35:22.430 | null | null | 9,578,551 | null |
74,009,554 | 2 | null | 17,169,873 | 0 | null | Hi I have tried using geom_path() instead of geom_polygon() and the connecting lines are still there. I am plotting the US map.
```
ggplot(US, aes(x=long, y=lat)) +
borders("state") +
geom_polygon(alpha = 0.2, fill = NA, color = 'grey60')+
```
Produces ( I added coord_map() later after other stuff plot over the map):
[enter image description here](https://i.stack.imgur.com/DkL4m.png)
| null | CC BY-SA 4.0 | null | 2022-10-10T01:42:18.090 | 2022-10-10T01:42:18.090 | null | null | 20,201,065 | null |
74,010,616 | 2 | null | 74,010,183 | 0 | null | The desired results shown in the screenshot suggest that you want the matching data without inserting blank rows in between. To get that, use `filter()`, like this:
`=filter(Sheet1!A5:A, isblank(Sheet1!B5:B)`
To add another criterion, and combine the criteria with `OR`, use the `+` operator, like this:
`=filter(Sheet1!A5:A, isblank(Sheet1!B5:B) + isblank(Sheet1!C5:C))`
To get an `AND` condition, simply add criteria as their own parameters, or use the `*` operator. See [Boolean arithmetic](https://en.wikipedia.org/wiki/Two-element_Boolean_algebra).
| null | CC BY-SA 4.0 | null | 2022-10-10T05:41:59.747 | 2022-10-10T05:41:59.747 | null | null | 13,045,193 | null |
74,010,895 | 2 | null | 21,607,317 | 0 | null | This might be late, but I will still post it for future readers.
If you're dual booting between linux and windows, this problem normally happens when windows goes into hibernate mode or if fast startup is enabled on windows.
Just switch to windows and perform a restart, or in the later go to the power options (in windows) and uncheck fast startup option.
Hope this helps someone :)
| null | CC BY-SA 4.0 | null | 2022-10-10T06:23:07.000 | 2022-10-10T06:23:07.000 | null | null | 11,944,222 | null |
74,010,941 | 2 | null | 74,010,183 | 0 | null | `FILTER()` with `MMULT()` may give you desired result.
```
=FILTER(Sheet1!A4:A,MMULT(INDEX(--(Sheet1!B4:C="x")),{1;1})<2)
```
- `MMULT(INDEX(--(Sheet1!B4:C="x")),{1;1})``x``x``MMULT()``2``x``1``x``0``2`
[MMULT()](https://support.google.com/docs/answer/3094292?hl=en#:%7E:text=Calculates%20the%20matrix%20product%20of%20two%20matrices%20specified%20as%20arrays%20or%20ranges.) reference.
[](https://i.stack.imgur.com/d7CDd.png)
| null | CC BY-SA 4.0 | null | 2022-10-10T06:28:01.260 | 2022-10-10T06:28:01.260 | null | null | 5,514,747 | null |
74,011,042 | 2 | null | 72,987,553 | -1 | null | This is not an answer..
Just information about a similar problem
[](https://i.stack.imgur.com/osd3k.png)
| null | CC BY-SA 4.0 | null | 2022-10-10T06:40:28.527 | 2022-10-10T06:40:28.527 | null | null | 1,592,821 | null |
74,011,255 | 2 | null | 40,574,892 | 1 | null |
# Problem with the Response!
I had a similar issue when I was sending the request of media type `application/x-www-form-urlencoded` from Postman I was receiving a correct response.
However, when sending the request using code, I was receiving jargon somewhat like:
```
�-�YO�`:ur���g�
.n��l���u)�i�h3J%Gl�?����k
```
---
#### What I tried:
Out of frustration for multiple days tried all the possible solutions from changing character sets to changing header values to code changes and whatnot.
---
# Solution lies in Postman.
[](https://i.stack.imgur.com/03ohB.png)
## Select Java-OkHttp
[](https://i.stack.imgur.com/7yx4Y.png)
Copy the code and paste it into IDE.
That's it.
Reference for HttpOk:
[https://www.vogella.com/tutorials/JavaLibrary-OkHttp/article.html](https://www.vogella.com/tutorials/JavaLibrary-OkHttp/article.html)
| null | CC BY-SA 4.0 | null | 2022-10-10T07:06:39.280 | 2022-10-10T07:06:39.280 | null | null | 6,073,148 | null |
74,011,766 | 2 | null | 74,007,586 | 1 | null | You could set `margin-top:auto;`. Here I use a flex container so the contents have the same height.
```
.container {
display: flex;
}
.content {
width: 20%;
padding: 5px;
border: 1px solid black;
margin: 20px;
display: flex;
flex-wrap: wrap;
}
.button {
background-color: orange;
height: 20px;
margin-top: auto;
}
#blue,#grey,#red,.button {
width: 100%;
}
#blue {
background-color: blue;
height: 50px;
}
#grey {
background-color: grey;
height: 75px;
}
#red {
background-color: red;
height: 100px;
}
```
```
<div class="container">
<div class="content">
<div id="blue"></div>
<div class="button"></div>
</div>
<div class="content">
<div id="grey"></div>
<div class="button"></div>
</div>
<div class="content">
<div id="red"></div>
<div class="button"></div>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-10T08:00:10.983 | 2022-10-10T09:20:43.493 | 2022-10-10T09:20:43.493 | 17,684,809 | 17,684,809 | null |
74,011,804 | 2 | null | 74,011,153 | 0 | null | You can't just put `paragraphs` there and expect them to create columns automatically.
there are no columns because you didn't add any `style` to the text `container` and its default `display` is block.
anyway, I suggest using `display flex` because it's suitable for responsive design.
here I styled your `text container` to make columns, then I added `media query` to style it vertically for mobile view.
```
body {
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
width: auto;
height: 3000px;
font-size: 100%;
overflow-x: hidden;
margin: auto;
box-sizing: border-box;
background: linear-gradient(45deg, #30cfd0, #330867, #C4E0E5);
background-size: 200%;
animation: gradient 10s ease infinite;
}
@keyframes gradient {
0% {
background-position: 0 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
.block {
border: 1px solid red;
display: flex;
justify-content: center;
}
.block p {
border: 1px solid yellow;
min-width: 33.3%;
}
@media only screen and ( max-width: 700px) {
.block {
flex-direction: column;
}
}
```
```
<canvas id="canvas"></canvas>
<div class="full-page-width">
<div class="center-content-container">
<div class="content-container">
<div class="content"></div>
</div>
<div class="extended-content-container">
<div class="extended-content"></div>
</div>
</div>
</div>
<div class="container-flex">
<div class="container">
<a href="htmlcode.html">
<iconify-icon class="dollar" icon="fa:dollar" style="color: #83bf4f;" width="50" height="50">
</a>
</iconify-icon>
<a href="htmlcode.html">
<iconify-icon class="hand" icon="fa-solid:hand-holding" style="color: white;" width="70" height="70">
</a>
</iconify-icon>
</div>
</div>
<script src="https://code.iconify.design/iconify-icon/1.0.0-beta.3/iconify-icon.min.js"></script>
<div class="hero">
<nav>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Work</a></li>
<li><a href="#">Skill</a></li>
</ul>
</nav>
</div>
<div class="container">
<div class="block">
<p> text </p>
<p> text </p>
<p> text </p>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-10T08:03:44.433 | 2022-10-10T12:56:32.417 | 2022-10-10T12:56:32.417 | 6,467,902 | 6,467,902 | null |
74,011,872 | 2 | null | 3,006,792 | 1 | null | Instead of the `label` attribute, you can use the attributes [xlabel](https://graphviz.org/docs/attrs/xlabel/) or [headlbel](https://graphviz.org/docs/attrs/headlabel/) or [taillabel](https://graphviz.org/docs/attrs/taillabel/).
- Result with `xlabel`:

Script:```
digraph {
subgraph clusterX { A B }
subgraph clusterY { C D }
A -> B
B -> C [constraint=false]
C -> D [xlabel=yadda]
}
```
- Result with `headlabel`:

Script:```
digraph {
subgraph clusterX { A B }
subgraph clusterY { C D }
A -> B
B -> C [constraint=false]
C -> D [headlabel=yadda]
}
```
- Result with `taillabel`:

Script:```
digraph {
subgraph clusterX { A B }
subgraph clusterY { C D }
A -> B
B -> C [constraint=false]
C -> D [taillabel=yadda]
}
```
| null | CC BY-SA 4.0 | null | 2022-10-10T08:09:36.600 | 2022-10-12T00:43:23.800 | 2022-10-12T00:43:23.800 | 14,928,633 | 14,928,633 | null |
74,011,945 | 2 | null | 74,011,153 | 0 | null | Your have a problem with the 'relative' keyword.
Try to use it when you want an element to be positionned relatively to an absolute positionned element.
For your case, just remove the `position: relative` from your `p` rule and everything will be fine
| null | CC BY-SA 4.0 | null | 2022-10-10T08:15:38.507 | 2022-10-10T08:15:38.507 | null | null | 2,127,354 | null |
74,012,311 | 2 | null | 68,932,360 | 1 | null | Go to the Editor Preference Dialog for VS-Code in winSCP and uncheck the line "External editor opens each file in separate window (process)"
| null | CC BY-SA 4.0 | null | 2022-10-10T08:49:28.480 | 2022-10-10T08:49:28.480 | null | null | 20,203,176 | null |
74,012,654 | 2 | null | 74,012,581 | 0 | null | [enter link description here](https://github.com/microsoft/pylance-release/issues/236)
you may got your answer here.check and read carefully.
Import "[module]" could not be resolvedPylance (reportMissingImports)
| null | CC BY-SA 4.0 | null | 2022-10-10T09:19:32.363 | 2022-10-10T09:19:32.363 | null | null | 20,050,541 | null |
74,013,058 | 2 | null | 73,995,846 | 1 | null | With `[email protected]`, the already deprecated `MessageTeam` component was removed from the SDK. Unfortunately, there isn't a drop-in replacement offered by the SDK as we believe MessageUI customizations would be best if handled by the integration projects.
As a starting point, you can take the `MessageTeam` implementation from the latest v9.x release and maintain it in your project. You can find it here:
- [https://github.com/GetStream/stream-chat-react/blob/v9.5.2/src/components/Message/MessageTeam.tsx](https://github.com/GetStream/stream-chat-react/blob/v9.5.2/src/components/Message/MessageTeam.tsx)
You can follow this guide in order to instruct the SDK to use your own MessageUI implementation:
- [https://getstream.io/chat/docs/sdk/react/message-components/message_ui/](https://getstream.io/chat/docs/sdk/react/message-components/message_ui/)
| null | CC BY-SA 4.0 | null | 2022-10-10T09:52:32.273 | 2022-10-10T09:52:32.273 | null | null | 1,270,325 | null |
74,013,129 | 2 | null | 74,012,700 | 1 | null | Try once with following code:
```
const ref = db.collection('Price List').doc('Dry Clean').collection('Kids');
const doc = await ref.get();
```
| null | CC BY-SA 4.0 | null | 2022-10-10T09:58:50.667 | 2022-10-10T09:58:50.667 | null | null | 10,535,718 | null |
74,013,324 | 2 | null | 21,758,052 | 0 | null | Just append text:
```
svg.append("text")
.attr("text-anchor", "middle")
.attr('font-size', '20px')
.attr('y', '5')
.text(dataset.hddrives + "%");
```
| null | CC BY-SA 4.0 | null | 2022-10-10T10:16:22.713 | 2022-10-10T10:17:17.580 | 2022-10-10T10:17:17.580 | 20,001,281 | 20,001,281 | null |
74,013,795 | 2 | null | 18,419,144 | 1 | null | In my case, I was running a Node JS application in another CMD, and that application was listening to port `8088`.
So when I was executing any command related to npm it was throwing the above error.
: Stopping ANY Running Node JS applications and retrying to execute the npm command again. the installation should be completed successfully, without any errors.
| null | CC BY-SA 4.0 | null | 2022-10-10T10:54:53.373 | 2022-10-10T10:54:53.373 | null | null | 4,876,639 | null |
74,014,034 | 2 | null | 74,012,700 | 0 | null | ```
var docRef = doc(
db,
'Price List',
'Dry Clean',
'Kids',
'Kids Shirt'
);
const docSnap = await getDoc(docRef);
if (docSnap.exists()) {
console.log('Document data:', docSnap.data());
} else {
// doc.data() will be undefined in this case
console.log('No such document!');
}
```
Actually the correct solution is this after firebase 9
| null | CC BY-SA 4.0 | null | 2022-10-10T11:14:42.613 | 2022-10-10T11:14:42.613 | null | null | 19,648,946 | null |
74,015,124 | 2 | null | 21,236,824 | 0 | null | I encountered an import problem when installing aiogram. At the same time, the bot worked, but pyCharm highlighted the import in red and did not give hints. I've tried all of the above many times.As a result, the following helped me: I found the folder at the following path
and copied it to the folder
After that, I reset pyCharm and that's it!
| null | CC BY-SA 4.0 | null | 2022-10-10T12:40:49.660 | 2022-10-10T12:41:16.787 | 2022-10-10T12:41:16.787 | 20,204,912 | 20,204,912 | null |
74,015,187 | 2 | null | 73,823,502 | 0 | null | • You can surely . As `when through the powershell, you connect to the Azure subscription account by specifying the correct details in the context of your Azure tenant and subscription, the device based login is done successfully and when you connect through the SSMS, the SQL servers and databases are shown that are created in the specified tenant`.
Thus, in this way, .
[](https://i.stack.imgur.com/tBMrS.png)
[](https://i.stack.imgur.com/mOX3j.png)
[](https://i.stack.imgur.com/m8fwX.png)
[](https://i.stack.imgur.com/FNvY9.png)
• `Therefore, in this way, you can select the Azure AD tenant from which you want to authenticate to the SQL server. Also, please remember that each subscription can only trust a single directory/Azure AD instance, whereas multiple subscriptions can trust the same Azure AD instance. As a result, in the same Azure AD tenant, you can associate multiple subscriptions but the vice versa is not possible. Hence, please check accordingly`.
Please check the below given link for more details: -
[https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-subscriptions-associated-directory](https://learn.microsoft.com/en-us/azure/active-directory/fundamentals/active-directory-how-subscriptions-associated-directory)
| null | CC BY-SA 4.0 | null | 2022-10-10T12:45:10.047 | 2022-10-10T12:45:10.047 | null | null | 16,526,895 | null |
74,015,397 | 2 | null | 74,015,270 | -1 | null | try:
```
=INDEX(LAMBDA(x; SORT(x; INDEX(x;; 4)*1; 0))
(QUERY(Robocze!A2:D; "where A is not null and NOT D contains 'b/d'"; 0));; 4)
```
| null | CC BY-SA 4.0 | null | 2022-10-10T13:01:31.767 | 2022-10-10T13:46:42.743 | 2022-10-10T13:46:42.743 | 5,632,629 | 5,632,629 | null |
74,015,633 | 2 | null | 73,985,522 | 0 | null | @Allan Cameron
```
score$group <- factor(score$group, levels=c("All_BrM", "Sync","Meta","Poly" ))
score$stain <- factor(score$stain, levels=c("none", "<10%","10-40%",">40%" ))
ggplot(score, aes(group, IT, fill = stain)) +
geom_bar(stat="identity", position = "fill")+
scale_fill_manual(values = c("#ded9e2", "#c0b9dd", "#80a1d4", "#75c9c8"))+
theme_prism(base_size = 9)+
scale_y_continuous(labels = scales::percent_format()) +
theme(legend.position = "none")+
theme(axis.text.x = element_text(size = 10, angle=50))+
ggplot(score, aes(group, PT, fill = stain)) +
geom_bar(stat="identity", position = "fill")+
scale_fill_manual(values = c("#ded9e2", "#c0b9dd", "#80a1d4", "#75c9c8"))+
scale_y_continuous(labels = scales::percent_format()) +
theme_prism(base_size = 9)+
theme(axis.text.x = element_text(size = 10, angle=50))
```
| null | CC BY-SA 4.0 | null | 2022-10-10T13:22:14.257 | 2022-10-10T14:53:52.043 | 2022-10-10T14:53:52.043 | 20,168,147 | 20,168,147 | null |
74,015,747 | 2 | null | 53,100,108 | 0 | null | Gradle 7.5.1
In my case, that cause by the fork GitHub project not default contains upstream tags
with error `fatal: No names found, cannot describe anything.` is a git prompt
so I simply add try-catch surround with `exec` codes
| null | CC BY-SA 4.0 | null | 2022-10-10T13:31:22.650 | 2022-10-10T13:31:22.650 | null | null | 6,699,096 | null |
74,015,780 | 2 | null | 74,015,330 | 0 | null | It appears as though you want to alternate colors for the rows, but only if the date is different than the previous row (so consecutive dates that are the same will appear the same color).
You could do something like this by comparing the date in your loop with the previous date and then applying a color from an array based on whether or not they are the same.
```
$backgrounds = ["#FFFFFF", "#EEEEEE"];
$currentBackground = 0;
for ($i = 0; $i < count($id_array); $i++) {
$id = $id_array[$i];
$Fltnum = $Fltnum_array[$i];
$Date = $Date_array[$i];
$Name = $Name_array[$i];
$Lesson = $Lesson_array[$i];
$Vnum = $Vnum_array[$i];
$Phone = $Phone_array[$i];
$Email = $Email_array[$i];
$Ten = $Ten_array[$i];
$Ten1 = $Ten1_array[$i];
$Eleven = $Eleven_array[$i];
$Twelve = $Twelve_array[$i];
$Thirteen = $Thirteen_array[$i];
$Fourteen = $Fourteen_array[$i];
$Fithteen = $Fithteen_array[$i];
$Sixteen = $Sixteen_array[$i];
$set_checked = ($Ten < 1) ? 'checked="checked"' : '';
$set_checked0 = ($Ten1 < 1) ? 'checked="checked"' : '';
$set_checked1 = ($Eleven < 1) ? 'checked="checked"' : '';
$set_checked2 = ($Twelve < 1) ? 'checked="checked"' : '';
$set_checked3 = ($Thirteen < 1) ? 'checked="checked"' : '';
$set_checked4 = ($Fourteen < 1) ? 'checked="checked"' : '';
$set_checked5 = ($Fithteen < 1) ? 'checked="checked"' : '';
$set_checked6 = ($Sixteen < 1) ? 'checked="checked"' : '';
$newDate = date("d-m-Y", strtotime($Date));
// Only check previous value if we are not on the first row
if($i > 0) {
// If the date is the same, do not change backgrounds
// Otherwise, toggle between backgrounds
$currentBackground = ($Date_array[$i] == $Date_array[$i-1]) ? $currentBackground : ($currentBackground == 0) ? 1 : 0;
}
// This just sets the color from our backgrounds array
$background = $backgrounds[$currentBackground];
echo "
<tr style='background: $background;'>
<td><input type='hidden' name='id[]' value='$id'></td>
<td><input type='hidden' name='Fltnum-$id' value='$Fltnum'></td>
<td><input input type='text' name='Name-$id' value='$Name'></td>
<td><input input type='text' name='Lesson-$id' value='$Lesson'></td>
<td><input type='text' name='Date-$id' value='$newDate'> </td>
<td><input type='hidden' name='vnum-$id' value='$Vnum'></td>
<td><input type='hidden' name='Phone-$id' value='$Phone'></td>
<td><input type='hidden' name='Email-$id' value='$Email'></td>
</tr>";
}
```
| null | CC BY-SA 4.0 | null | 2022-10-10T13:34:08.103 | 2022-10-10T13:34:08.103 | null | null | 19,729,216 | null |
74,015,889 | 2 | null | 58,934,003 | 0 | null | pyinstaller file.py --collect-all "pygubu" --hidden-import pygubu.builder.tkstdwidgets
| null | CC BY-SA 4.0 | null | 2022-10-10T13:44:55.340 | 2022-10-10T13:45:14.283 | 2022-10-10T13:45:14.283 | 19,235,932 | 19,235,932 | null |
74,016,195 | 2 | null | 27,890,153 | 1 | null | Here is a `ggcorrplot` method in case you haven't considered it before:
```
#### Load Additional Libraries ####
library(dplyr)
library(correlation)
library(ggcorrplot)
#### Create Correlation Matrix ####
cor.att <- attitude %>%
correlation()
#### Plot It ####
ggcorrplot(cor.att,
type = "upper",
lab = T,
show.diag = F)
```
Which produces this without the diagonals using the upper triangle you wanted:
[](https://i.stack.imgur.com/V30Fv.png)
| null | CC BY-SA 4.0 | null | 2022-10-10T14:07:52.093 | 2022-10-10T14:07:52.093 | null | null | 16,631,565 | null |
74,016,260 | 2 | null | 74,015,721 | 2 | null | Yes, this is certainly possible. Without your data set it is difficult to give you specific code, but here is an example using the built-in `mtcars` data set. We plot a best-fitting line for `mpg` against an x axis of `wt`.
```
p <- ggplot(mtcars, aes(wt, mpg)) + geom_smooth(aes(color = 'mpg'))
p
```
[](https://i.stack.imgur.com/5CgMS.png)
Suppose we want to draw the value of `disp` according to a log scale which we will show on the y axis. We need to carry out the log transform of our data to do this, but also multiply it by 10 to get it on a similar visual scale to the `mpg` line:
```
p <- p + geom_smooth(aes(y = 10 * log10(disp), color = 'disp'))
p
```
[](https://i.stack.imgur.com/bszdk.png)
To draw the secondary axis in, we need to supply it with the reverse transformation of `10 * log10(x)`, which is `10^(x/10)`, and we will supply appropriately logarithmic breaks at 10, 100 and 1000
```
p + scale_y_continuous(
sec.axis = sec_axis(~ 10^(.x/10), breaks = c(10, 100, 1000), name = 'disp'))
```
[](https://i.stack.imgur.com/X17u3.png)
It seems that you are generating the values of your line by using `od / coeff`, and reversing that transform with `.*coeff`, which seems appropriate, but to get a log10 axis, you will need to do something like `log10(od) * constant` and reverse it with `10^(od/constant)`. Without your data, it's impossible to know what this `constant` should be, but you can play around with different values until it looks right visually.
| null | CC BY-SA 4.0 | null | 2022-10-10T14:12:48.853 | 2022-10-10T14:12:48.853 | null | null | 12,500,315 | null |
74,016,394 | 2 | null | 74,016,043 | 0 | null | There is no API to create (or delete) a collection in Firestore. Instead, a collection is automatically created when you write the first document, and conversely automatically removed when you remove the last document from it.
So if you want to create multiple subcollections under the user document, you'll have to write a document to each of them similar to what you already do for `userData`.
| null | CC BY-SA 4.0 | null | 2022-10-10T14:21:56.523 | 2022-10-10T14:34:51.060 | 2022-10-10T14:34:51.060 | 5,246,885 | 209,103 | null |
74,016,810 | 2 | null | 74,015,542 | 1 | null | You could try with `annotate`.
In the absence of a reproducible data I've mocked up a dataset.
I'm assuming you are OK with the labelling of the axis and title as the question is specifically about the shaded triangle.
updated to reflect @KSkoczek's suggestion to place the shaded triangle in an earlier layer so labels are placed on top of the shading.
```
library(ggplot2)
library(ggrepel)
set.seed(123)
df <- data.frame(CAB = runif(10, 0, 15),
gvtbal = runif(10, -3, 1),
year = 2001:2010)
df |>
ggplot(aes(CAB, gvtbal, xmin=-15, xmax=15, ymin=-15, ymax=15, colour=year)) +
geom_point() +
annotate(geom = "polygon", x = c(-Inf, Inf, Inf), y = c(-Inf, Inf, -Inf), fill = "blue", alpha = 0.1 )+
geom_label_repel(aes(label= year),
box.padding = 0.35,
point.padding = 0.5,
segment.color = 'grey50',
max.overlaps = 50,
force= 85) +
# Add lines 45° line for private sector, add x and y axis for CAB and gvtbal
geom_abline(color='grey') +
geom_vline(xintercept = 0, color='grey')+
geom_hline(yintercept = 0, color='grey')+
theme(legend.position = "none")+
coord_fixed()
```

[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2022-10-10T14:53:39.197 | 2022-10-10T16:48:38.633 | 2022-10-10T16:48:38.633 | 6,936,545 | 6,936,545 | null |
74,018,258 | 2 | null | 61,013,353 | 0 | null | All of these answers are focused on a single column rather than an entire Dataframe. If you have multiple columns, where every entry at index `ij` is a list you can do this:
```
df = pd.DataFrame({"A": [[1, 2], [3, 4]], "B": [[5, 6], [7, 8]]})
print(df)
A B
0 [1, 2] [5, 6]
1 [3, 4] [7, 8]
```
```
arrays = df.applymap(lambda x: np.array(x, dtype=np.float32)).to_numpy()
result = np.array(np.stack([np.stack(a) for a in array]))
print(result, result.shape)
array([[[1., 2.],
[5., 6.]],
[[3., 4.],
[7., 8.]]], dtype=float32)
```
I cannot speak to the speed of this, as I use it on very small amounts of data.
| null | CC BY-SA 4.0 | null | 2022-10-10T16:51:42.820 | 2022-10-10T16:51:42.820 | null | null | 3,696,204 | null |
74,018,340 | 2 | null | 73,991,615 | 0 | null | By default, the m2ee program tries to load configuration from the locations
# /etc/m2ee/m2ee.yaml and ~/.m2ee/m2ee.yaml
| null | CC BY-SA 4.0 | null | 2022-10-10T16:58:57.997 | 2022-10-10T16:58:57.997 | null | null | 17,204,784 | null |
74,018,707 | 2 | null | 74,016,657 | 1 | null | MSVC doesn't optimize intrinsics (much), `vdivpd``2.0``0.5`. That's a worse bottleneck than scalar, less than one element per clock cycle on most CPUs. (e.g. Skylake / Ice Lake / Alder Lake-P: 4 cycle throughput for `vdivpd xmm`, or 8 cycles for `vdivpd ymm`, either way 2 cycles per element. [https://uops.info](https://uops.info))
From [Godbolt, with MSVC 19.33 -O2 -arch:AVX2](https://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAMzwBtMA7AQwFtMQByARg9KtQYEAysib0QXACx8BBAKoBnTAAUAHpwAMvAFYTStJg1DIApACYAQuYukl9ZATwDKjdAGFUtAK4sGISdKuADJ4DJgAcj4ARpjEIGYAzKQADqgKhE4MHt6%2B/tKp6Y4CIWGRLDFxibaY9kUMQgRMxATZPn4B1bWZDU0EJRHRsfFJCo3Nrbkdo739ZRXDAJS2qF7EyOwcAG6oeOgA1AAqxEz4dWIAggBqAOIA%2BnIMyAhNB6gAIitR9BBoDKN7Xj%2BeGAYX2TyaewAVJtMMguKQ9r9/oD0iDMGDnsQoTDkGYEehPvRIXsCV4vphzsRjgBPBFIggAoFo/ahBn0IwEBALPYmADsVg05z2wr2rL2Ch8rwZJgSbz2GhlAqFItJ5OJyQIxA%2BZPoPNlJMJFKpTGpipMgpFe34WIgKOBoNFgj2ySYyAA1gBJdCqPVyhUJCzO12e716tx7dnATmKnmWawu91e1TcvlKy2WyEarWG317KCq%2BgLCCQiA4rixwMJkPJitQ0uwsy1qtJhatgD0eYgBcwCzMCzNFvTwqz2vJ1nHAfNyuFfLeU/nvLngvniVCyG8WDDeBYLFZxFCADoEDLsFPtrs9lc7oDwcRXqP6JSaT8BMimQ7b9jYfDEa%2BGXbmURTEv1xfFDWJbsnxNOk/0ZVEHTFSNORTfkp0tNs23pTBVGSLEAIQp02BYEhqXOWh7TYQQLGpAhMAUXMEjMAdp1/P5aJwvD33RR0GSiGi6OUWJlGDXMzAAVgANj2DsuAk5jLXw7ixSrDxAWlfUkIQaS9j42iFEE4hhPdZi0JVcDnU1B9MFzSDjVNSdl0HYVbluFguDMAAOfZ8E2XZYhlN5XJYW4lAILhbmSdAID7EynKtEg80UlknWbUMAvlGNUp9GVwxUlZBBjcdLCy/s4tTUyhyYLwiD2VRy3SoLbloVATi8EK8HcjyoHpPYXLczy8EhBYy37ByWMtKqatURsGp3JqWvQNr0k67rYL6zrBuGhtRqVCr0ySoCIVCLBsv1f1driy0AHcEDoTAIGO7Cwz2DyULTId00e1QiqsMaPvTDDJtQWquGa3NGuQTZaOSLwPNuTBkjwCTJAgOqdr2/7Aeq4HprB2bgsh6HYfhxHkdRmK/v%2BkUMPWzz9jqiL9nS1lkduIhbm7W4qC8WhaFR0HUHRy6Ppp1zOvpsxGdzFnJDZ1AOcNLmeb53HBfkqnhSBkG8f1CGoYR4mEbwRj%2BaF8aPq11XwbmwmDbho2Tems2NecsW6ZBqX8duW3EcYxn%2Bea52XdprzaslyLrYJ/XffDqLVbN%2BdhaHRrRhITB/ZHQ0EUanz/cak50H9hnIoRabGaWEk8F8rBiFbdWNcznVrPSxvyVrJjKY1urI5C4hyPala6oRCn3q7mbdbmhQ%2B7wAfPPJ4eg6HWcMZFMsK3S3SBKE4N6/THEZrjfVN/07fjM7nlF0TljrUSrjkoZPA8FzDQ9UDR/ns02MxKDd1VIKgN16WEfqVFi5Uk51lbrqawoo8Apn1F2Q0RYSxr2gcA2syCGy1mAQsDsCCm69l3svRy5wiHnA4EsWgnAxK8D8BwLQpBUCcDcD9cUKw1jN0SDwUgBBNDkKWG6EACQEgHiEaIsR4iJL6E4JIGhvCGGcF4AoEAGhuG8KWHAWASA0AsERvQMgFAXw6LunEdchhgBcDEhoFRNBaC0WIEoiAUQ5FRFCE0aknAuHaMogQAA8gwWg7i6G8CwCwMx4ggmkHwMQWEjgYRKIidhWE1UNhcNZDUOR5EojHGINSDwWA5Gam3B48hfADDAAUJcPAmAro%2BOSIwYpMhBAiDEOwKQjT5BKDUHI3Q8IDBGBQD9fQeAohKMgEsVAGpMjxIALQ%2BISHsaZoS1jHllAoN01IDBumsoomoMTMguAYO4TwbQ9DBFCAMcoQx4QFAyAICYfhrlpFuQwWYgw4jwjsHsgQPRxjHNyB83ZDhuhjD6OcuYVzbAgvuXoaYzRXmXPeUsBQbD1h6E1JgFJJTKEcGoaQWh9DGEcFUB5CS0zkaIj6cAPYFiDwaFpXmZhcZLAIlwIQBK5gEg/g8EYvRsZOULF4DwoJrZSACKESI8RkqhGSOxTIvFcjCWKOUao4VpANGIBQKgHlsRyCUG0booYmxkDJGSLcTYXAACctwhG3FUMjPgdA7EOKcRElxzAckNK8YwXx/jAn0JCWEjY/q8DRKBXEuRiTkDJIaWk7F9DMnZNyRgINgr9wsGKUsKgZSKlVJqXU2hXD%2BBNNEOINpRaOkqHUBE3QeJKUDKZTYTJoyIDjMma%2BTgszGzTKaE8EAVwAAaZgdldGcBAVw0L4RnNKG8iQjEUhPLqBO%2BdhRMjwvmFwOdnygXfKhX8h5nQvn1BBWuq5lrIW9CXbC0F06EUSEtUilFrTuHRMxRQqhsiImErtZIPYLAFBGr2Oai1EqGWDL2KyogWIOVcq1QaqDiQ%2ByCrUfwwRwipVSqkRwOV%2BLeCKtsMqoVWgRXYqHfKz9CiVVEaWDCex%2BzJBAA%3D), with a version that compiles (replacing your undefined `int64_to_double_full` with efficient 32-bit conversion). Your version is probably even worse.
```
$LL5@AVG_unchar:
vpmovzxbd xmm0, xmm5
vpmovzxbd xmm1, xmm4
vcvtdq2pd xmm3, xmm0
vcvtdq2pd xmm2, xmm1
vaddpd xmm0, xmm3, xmm2
vdivpd xmm3, xmm0, xmm6 ;; performance disaster
vmovupd XMMWORD PTR [r8], xmm3
add r8, 16
vpsrldq xmm4, xmm4, 2
vpsrldq xmm5, xmm5, 2
sub rax, 1
jne SHORT $LL5@AVG_unchar
```
Also, AVX2 implies support for 256-bit integer as well as FP vectors, so you can use `__m256i`. Although with this shift strategy for using the chars of a vector, you wouldn't want to. You'd just want to use `__m256d`.
Look at how clang vectorizes the scalar C++: [https://godbolt.org/z/Yzze98qnY](https://godbolt.org/z/Yzze98qnY) 2x `vpmovzxbd`-load of __m128i / `vpaddd` __m128i / `vcvtdq2pd` to __m256d / `vmulpd` __m256d (by 0.5) / `vmovupd`. (Narrow loads as a memory source for `vpmovzxbd` are good, especially with an XMM destination so they can micro-fuse on Intel CPUs. Writing this with intrinsics relies on compilers optimizing `_mm_loadu_si32` into a memory source for `_mm_cvtepu8_epi32`. Looping to use all bytes of a wider load isn't crazy, but costs more shuffles. clang unrolls that loop, replacing later `vpsrldq` / `vpmovzxbd` with `vpshufb` shuffles to move bytes directly to where they're needed, at the cost of needing more constants.)
IDK what wrong with MSVC, why it failed to auto-vectorize with `-O2 -arch:AVX2`, but at least it optimized `/2.0` to `*0.5`. When the reciprocal is exactly representable as a `double`, that's a well-known safe and valuable optimization.
With a good compiler, there'd be no need for intrinsics. But "good" seems to only include clang; GCC makes a bit of a mess with converting vector widths.
---
Your scalar C is strangely obfuscated as `*ptrDouble = ((double)(*(vec1 + packIdx) + *(vec2 + packIdx)))/ ((double)2);` instead of
`(vec1[packIdx] + vec2[packIdx]) / 2.0`.
Doing like this scalar code before conversion to FP is a good idea, especially for a vectorized version, so there's only one conversion. Each input already needs to get widened separately to 32-bit elements.
---
IDK what `int64_to_double_full` is, but if it's manual emulation of AVX-512 `vcvtqq2pd`, it makes no sense to use use it on values zero-extended from `char`. That value-range fits comfortably in `int32_t`, so you can widen only to 32-bit elements, and let hardware int->FP packed conversion with [_mm256_cvtepi32_pd](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html#techs=SSE,SSE2,SSE3,SSSE3,SSE4_1,SSE4_2,AVX,AVX2,Other&ig_expand=1369,833,6404,660,6942&text=cvtdq2pd) (`vcvtdq2pd`) widen the elements.
| null | CC BY-SA 4.0 | null | 2022-10-10T17:34:18.843 | 2022-10-10T21:06:41.107 | 2022-10-10T21:06:41.107 | 224,132 | 224,132 | null |
74,018,867 | 2 | null | 60,218,902 | 0 | null | I think the new version of `ggforce` fixes this problem
Just install the new version with `devtools::install_github("thomasp85/ggforce")`
Release text:
[https://github.com/thomasp85/ggforce/releases/tag/v0.4.0](https://github.com/thomasp85/ggforce/releases/tag/v0.4.0)
| null | CC BY-SA 4.0 | null | 2022-10-10T17:48:06.037 | 2022-10-10T17:48:06.037 | null | null | 15,611,828 | null |
74,019,385 | 2 | null | 74,018,771 | 0 | null | To have users along with topics you need to use both models `UserTopic` and `Topic` and you used only `Topic`. You don't have a direct association between `User` and `Topic` and only have it through `UserTopic`:
```
return User.findOne({
where: { email },
include: [{
model: UserTopic,
include: [{ model: Topic }]
}]
})
```
| null | CC BY-SA 4.0 | null | 2022-10-10T18:38:26.630 | 2022-10-10T18:38:26.630 | null | null | 1,376,618 | null |
74,020,549 | 2 | null | 60,885,105 | 0 | null | You can accomplish this via a COUNTIF function
```
=IF(COUNTIF(A1:C3,A3)>0,"Yes!")
```
| null | CC BY-SA 4.0 | null | 2022-10-10T20:50:17.693 | 2022-10-15T20:57:17.720 | 2022-10-15T20:57:17.720 | 5,632,629 | 20,208,288 | null |
74,021,593 | 2 | null | 67,956,112 | 0 | null | It changed from a boolean to a string.
`"editor.matchBrackets":` options are now: "always", "near", or "never"
| null | CC BY-SA 4.0 | null | 2022-10-10T23:30:27.707 | 2022-10-10T23:30:27.707 | null | null | 5,815,520 | null |
74,022,105 | 2 | null | 74,022,032 | 0 | null | you just need to put the elements correctly, so that the layout is as expected
```
.location-text{
font-family: 'Inter';
display: inline-block;
word-break: break-word;
font-style: normal;
font-weight: 700;
font-size: 16px;
line-height: 26px;
align-items: center;
color: #13233A;
}
.list-contact{
display: flex;
}
.icon-address{
width: 22px;
height: 22px;
background: #EAA9A9;
border-radius: 8px;
align-items: center;
display: flex;
justify-content: center;
}
.content-address{
width: 200px
}
```
```
<div class="col-md-3 col-sm-6 col-xs-12 bootCols">
<div class="title location">
<i class="bx bx-location-plus localst"></i>
<span class="location-text">Trụ sở (TP. Vinh)</span>
</div>
<div class="icon-address">
<img src="./image/home/address.png" alt="">
</div>
<div class="list-contact">
<div class="content-address">
<span>Do Something Do Something Do Something Do Something Do Something Do Something Do Something</span>
</div>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-11T01:37:34.537 | 2022-10-11T01:37:34.537 | null | null | 19,520,749 | null |
74,022,123 | 2 | null | 74,022,032 | 0 | null | By default, every flex child has `flex-shrink: 1` assigned, which cause them to shrink to its minimum content width when there are no enough space.
To counter that, you just need to manually assign it to `0` so it will keep its assigned size which is `22px`.
See more about [flex-shrink](https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink).
```
.icon-address {
flex-shrink: 0;
}
```
```
.location-text {
font-family: 'Inter';
display: inline-block;
word-break: break-word;
font-style: normal;
font-weight: 700;
font-size: 16px;
line-height: 26px;
align-items: center;
color: #13233A;
}
.list-contact {
display: flex;
}
.icon-address {
width: 22px;
height: 22px;
flex-shrink: 0;
background: #EAA9A9;
border-radius: 8px;
align-items: center;
display: flex;
justify-content: center;
}
```
```
<div class="col-md-3 col-sm-6 col-xs-12 bootCols">
<div class="title location">
<i class="bx bx-location-plus localst"></i>
<span class="location-text">Trụ sở (TP. Vinh)</span>
</div>
<div class="list-contact">
<div class="icon-address">
<img src="./image/home/address.png" alt="">
</div>
<div class="content-address">
<span>Do Something Do Something Do Something Do Something Do Something Do Something Do Something</span>
</div>
</div>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-11T01:40:54.963 | 2022-10-11T01:40:54.963 | null | null | 10,289,265 | null |
74,022,501 | 2 | null | 74,021,296 | 0 | null | I think state management like [Vuex](https://vuex.vuejs.org/) or [Pinia](https://pinia.vuejs.org/) may resolve your problem. Store product list in `data`, when you navigate to detail page, using `getters` to get product detail by `product id`
| null | CC BY-SA 4.0 | null | 2022-10-11T03:04:13.430 | 2022-10-11T03:04:13.430 | null | null | 10,476,818 | null |
74,022,539 | 2 | null | 73,328,712 | 0 | null | [make sure did you change the language in bottom of your vscode (in My case I choose Python.) you have to choose javascript](https://i.stack.imgur.com/Px4X6.png)
| null | CC BY-SA 4.0 | null | 2022-10-11T03:09:56.207 | 2022-10-11T03:09:56.207 | null | null | 17,184,060 | null |
74,022,683 | 2 | null | 27,895,504 | 0 | null | If package `restore` dosn't automatically happen while building an application from visual studio or by trying to `restore` it from visual studio UI or from `package manager console` try it from `command line`.
Check if `nuget` is installed in your machine, if not, try installing it from [here](https://dist.nuget.org/win-x86-commandline/latest/nuget.exe), or you can just download the `nuget.exe` and place it in root directory of your project/solution.
once done, `cd` to the path where the projects/solutions `package.config` file exists, and run the below command.
```
nuget.exe restore <projectname>\packages.config -PackagesDirectory .\Packages
```
here, `-PackagesDirectory .\Packages` together implies that the `output` of the restore will be saved in the new folder called `Packages` at projects root level.
for more read have a look at [microsoft doc reference](https://learn.microsoft.com/en-us/nuget/reference/cli-reference/cli-ref-restore)
| null | CC BY-SA 4.0 | null | 2022-10-11T03:36:06.610 | 2022-11-16T17:00:42.387 | 2022-11-16T17:00:42.387 | 6,271,132 | 6,271,132 | null |
74,023,083 | 2 | null | 74,022,762 | 0 | null | Once you call the data from WDI, could you sum it within R and plot from there?
Rough example (haven't checked for accuracy):
```
# Import libraries.
library(WDI)
library(tidyverse)
# Call data from WDI package.
global_gdp <- WDI(
country = "all",
indicator = "NY.GDP.PCAP.KD",
start = 1990,
end = 2019,
)
# Add together the country data by year.
global_gdp2 <- global_gdp %>%
group_by(year) %>%
summarise((count = sum(NY.GDP.PCAP.KD, na.rm = TRUE))) %>%
rename(count = c(2))
# Plot the resulting data.
ggplot(data = global_gdp2, mapping = aes(x = year, y = count)) +
geom_line() +
geom_point()
```
| null | CC BY-SA 4.0 | null | 2022-10-11T04:45:57.480 | 2022-10-11T04:45:57.480 | null | null | 19,399,290 | null |
74,023,604 | 2 | null | 74,011,847 | 0 | null | What you call the header bar is the section header in the sidebar sections. This is controlled by VS Code and does not depend on what you have in a section. The only thing you can do to change the appearance is to leave the name of the view empty in your package.json:
```
"contributes": {
"views": {
"myView": {
"id": "your.view.id",
"name": "",
}
}
}
```
but this will not prevent the section header to show up. It's just empty instead.
| null | CC BY-SA 4.0 | null | 2022-10-11T06:04:09.623 | 2022-10-11T06:04:09.623 | null | null | 1,137,174 | null |
74,023,856 | 2 | null | 74,023,512 | 0 | null | Yes, it´s a c++ header. You can mix obj-c and c++ if you need to (such source files need to have .mm extension, so that the compiler recognizes them), but probably you can choose another (obj-c) framework for what you need.
| null | CC BY-SA 4.0 | null | 2022-10-11T06:30:33.033 | 2022-10-11T06:30:33.033 | null | null | 2,816,604 | null |
74,024,515 | 2 | null | 74,013,840 | 0 | null | "Xamarin.iOS" is contained in "Xamarin.Forms", so try to uninstall the "Xamarin.Forms" Nuget Package and install the latest version.
Then delete the "bin" and "obj" folder under project path, and clean&rebuild the project.
| null | CC BY-SA 4.0 | null | 2022-10-11T07:34:13.093 | 2022-10-11T07:34:13.093 | null | null | 19,335,715 | null |
74,024,618 | 2 | null | 53,434,849 | 0 | null | Following Commands worked for me: sudo apt-get install wget ca-certificates
wget --quiet -O - [https://www.postgresql.org/media/keys/ACCC4CF8.asc](https://www.postgresql.org/media/keys/ACCC4CF8.asc) | sudo apt-key add -
sudo sh -c 'echo "deb [http://apt.postgresql.org/pub/repos/apt/](http://apt.postgresql.org/pub/repos/apt/) lsb_release -cs-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
sudo apt-get update
sudo apt install postgresql-11 libpq-dev
| null | CC BY-SA 4.0 | null | 2022-10-11T07:43:29.183 | 2022-10-11T07:43:29.183 | null | null | 12,143,329 | null |
74,024,907 | 2 | null | 30,011,741 | 0 | null | That formula just come from the transformation of [Spherical coordinates](https://en.wikipedia.org/wiki/Spherical_coordinate_system) (r, theta, phi) -> (x, y, z) to Cartesian coordinates.
| null | CC BY-SA 4.0 | null | 2022-10-11T08:07:27.533 | 2022-10-11T08:07:27.533 | null | null | 7,680,214 | null |
74,024,985 | 2 | null | 74,024,470 | 0 | null | You can keep track of your sheets and only include headers for the first one. Something like:
```
first = True
for i in fname:
try:
if first:
df1 = pd.read_excel(i,sheet_name = "Test1", skiprows=0, header=0)
first = False
else:
df1 = pd.read_excel(i,sheet_name = "Test1", skiprows=1, header=None)
result_DFs1 = pd.concat([result_DFs1, df1])
except:
pass
```
| null | CC BY-SA 4.0 | null | 2022-10-11T08:13:24.350 | 2022-10-11T08:13:24.350 | null | null | 13,525,512 | null |
74,024,997 | 2 | null | 74,024,926 | -2 | null | in your code you have written: `document.getElementById("header")` this is OK but sometimes you have to use the parent element called "window"
Your code should be like below:
```
window.document.getElementById("header")
```
| null | CC BY-SA 4.0 | null | 2022-10-11T08:14:23.297 | 2022-10-14T14:12:01.780 | 2022-10-14T14:12:01.780 | 4,349,415 | 14,842,820 | null |
74,025,030 | 2 | null | 74,017,714 | 1 | null | I have created code to add the composition ratios as labels assuming the bar chart you have created. Convert the presented data frame from wide format to long format. It then calculates the composition ratios for each group. Next, with the data frame extracted to only the regions you need, use the graph object to create a stacked bar chart, extracted by region. Labels are created from a dedicated list of the number of copies and composition ratios. The labels are specified in the loop process.
```
df = df.melt(id_vars='Name', value_vars=df.columns[1:], var_name='Region', value_name='Volume')
df['percentage'] = df.groupby(['Name'])['Volume'].apply(lambda x: 100 * x / float(x.head(1))).values
df = df[(df['Region'] != 'Total circ') & (df['Region'] != 'US circ')]
new_labels = ['{}k({}%)'.format(int(v/1000),p) for v, p in zip(df.Volume,df.percentage)]
import plotly.graph_objects as go
fig = go.Figure()
for i,r in enumerate(df['Region'].unique()):
dff = df.query('Region == @r')
#print(dff)
fig.add_trace(go.Bar(x=dff['Name'], y=dff['Volume'], text=[new_labels[i+i*1],new_labels[1+i*2]], name=r))
fig.update_layout(barmode='stack', autosize=True, height=450)
fig.show()
```
[](https://i.stack.imgur.com/AZvFU.png)
| null | CC BY-SA 4.0 | null | 2022-10-11T08:16:59.467 | 2022-10-11T08:16:59.467 | null | null | 13,107,804 | null |
74,025,421 | 2 | null | 74,024,454 | 0 | null | What you need to do is place two copies of the background image in your SVG, with a blur filter and a text mask applied to the one on top. To get a white outline around the text, you'll need to add the text again. The `<use>` element allows you to add multiple instances of the same item, so you only need to enter the text and background URL once.
Here's an example. It should be fairly self-explanatory.
```
<svg width="600" height="273" viewBox="0 0 600 273" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<!-- Background image: -->
<image id="my_background" width="600" height="273" xlink:href="https://upload.wikimedia.org/wikipedia/commons/thumb/5/5e/Forêt_de_Craiva.jpg/600px-Forêt_de_Craiva.jpg"/>
<!-- Foreground text: -->
<text id="my_text" x="300" y="205" text-anchor="middle" font-family="sans-serif" font-weight="bold" font-size="200">BLUR</text>
<!-- Create a mask from the text -->
<mask id="text_mask" x="0" y="0" width="600" height="273">
<use href="#my_text" fill="#fff"/>
</mask>
<!-- Define a Gaussian blur filter: -->
<filter id="blur" x="0" y="0">
<feGaussianBlur in="SourceGraphic" stdDeviation="2" />
</filter>
</defs>
<!-- Place the background image: -->
<use href="#my_background"/>
<!-- Place the blurred image on top, using the text as a mask: -->
<use href="#my_background" mask="url(#text_mask)" filter="url(#blur)"/>
<!-- Add the text again with a white border around each letter: -->
<use href="#my_text" fill="none" stroke="#fff" stroke-width="2"/>
</svg>
```
| null | CC BY-SA 4.0 | null | 2022-10-11T08:50:07.520 | 2022-10-11T08:50:07.520 | null | null | 1,679,849 | null |
74,025,532 | 2 | null | 71,040,313 | 1 | null | I had to set Gpu Acceleration for the integrated terminal from default `auto` to either `off` or `canvas`.
In the settings.json that is achieved with:
```
{
"terminal.integrated.gpuAcceleration": "canvas",
}
```
| null | CC BY-SA 4.0 | null | 2022-10-11T09:00:00.590 | 2022-10-11T09:00:00.590 | null | null | 10,367,381 | null |
74,025,541 | 2 | null | 74,025,017 | 1 | null | The error says
> No such user (line 0).
Notice that the error is on line 0. It means the function you're showing in your question is NOT the problem. The problem is because of other code in other files, which are invoked before running this function. Common culprits are
- -
| null | CC BY-SA 4.0 | null | 2022-10-11T09:00:22.687 | 2022-10-11T09:00:22.687 | null | null | 8,404,453 | null |
74,025,848 | 2 | null | 74,022,762 | 0 | null | I found a solution from R studio community:
```
global_gdp <- WDI(
country = "1W",
indicator = "NY.GDP.PCAP.KD",
start = 1990,
end = 2019,
)
```
| null | CC BY-SA 4.0 | null | 2022-10-11T09:25:05.457 | 2022-10-20T12:41:23.213 | 2022-10-20T12:41:23.213 | 5,211,833 | 19,938,327 | null |
74,025,902 | 2 | null | 16,200,627 | 0 | null | This type of diagram is called nested pie chart, or multilevel pie chart.
It is done by creating two ChartArea - pie chart and donut chart,
which are correctly placed one relative to the other.Here is code below.
[](https://i.stack.imgur.com/4J7KK.png)
```
public partial class Form1 : Form
{
public class DataInt {
public string Label { get; set; }
public int Value { get; set; } }
public Form1()
{
InitializeComponent();
pieChart.Series.Clear();
pieChart.Legends.Clear();
float baseDoughnutWidth = 25;
float outerSize = 80;
ChartArea outerArea = new ChartArea("OUTER_AREA");
outerArea.Position = new ElementPosition(0, 10, 100, 100);
outerArea.InnerPlotPosition = new ElementPosition((100 - outerSize) / 2, (100 - outerSize) / 2, outerSize, outerSize);
outerArea.BackColor = Color.Transparent;
pieChart.ChartAreas.Add(outerArea);
float innerSize = 53;
ChartArea innerArea = new ChartArea("INNER_AREA");
innerArea.Position = new ElementPosition(0, 5, 100, 100);
ElementPosition innerPos = new ElementPosition((100 - innerSize) / 2, ((100 - innerSize) / 2), innerSize, innerSize+5);
innerArea.InnerPlotPosition = innerPos;
innerArea.BackColor = Color.Transparent;
pieChart.ChartAreas.Add(innerArea);
Series outerSeries = new Series("OUTER_SERIES");
outerSeries.ChartArea = "OUTER_AREA";
outerSeries.ChartType = SeriesChartType.Doughnut;
outerSeries["DoughnutRadius"] = Math.Min(baseDoughnutWidth * (100 / outerSize), 99).ToString().Replace(",", ".");
Series innerSeries = new Series("INNER_SERIES");
innerSeries.ChartArea = "INNER_AREA";
innerSeries.ChartType = SeriesChartType.Pie;
var innerData = new List<DataInt> { new DataInt { Label = "A", Value = 7 },
new DataInt { Label = "B", Value = 14 }, new DataInt{Label="C",Value=19},
new DataInt{Label="D",Value=12}, new DataInt{Label="E",Value=20},
new DataInt{Label="F",Value=28} };
var outerData = new List<DataInt> { new DataInt { Label = "Gold", Value = 21 },
new DataInt{Label="Red",Value=31}, new DataInt { Label = "Blue", Value = 48 } };
innerSeries.Points.DataBindXY(innerData, "Label", innerData, "Value");
outerSeries.Points.DataBindXY(outerData, "Label", outerData, "Value");
pieChart.Series.Add(innerSeries);
pieChart.Series.Add(outerSeries);
Legend legend = new Legend("pieChartLegend")
{
Font=new System.Drawing.Font("Arial",14.0f),
Alignment = StringAlignment.Center,
Docking = Docking.Top,
Enabled = true,
IsDockedInsideChartArea = false,
TableStyle = LegendTableStyle.Wide,
};
pieChart.Legends.Add(legend);
foreach (Series sr in pieChart.Series)
{
sr.Legend = "pieChartLegend";
}
var outerAreaColors = new List<Color>(){Color.Gold,Color.Red, Color.DeepSkyBlue };
var innerAreaColors = new List<Color>() {Color.Goldenrod,Color.DarkGoldenrod, Color.DarkRed, Color.Firebrick,Color.DodgerBlue, Color.SteelBlue };
for (int i = 0; i < outerSeries.Points.Count; i++)
{
outerSeries.Points[i].Color = outerAreaColors[i];
}
for (int i = 0; i < innerSeries.Points.Count; i++)
{
innerSeries.Points[i].Color = ChartColorPallets.Inner[i];
}
int inclination = 20;
int rotation = 45;
bool enable3d = true;
pieChart.ChartAreas["OUTER_AREA"].Area3DStyle.Enable3D = enable3d;
pieChart.ChartAreas["OUTER_AREA"].Area3DStyle.Inclination = inclination;
pieChart.ChartAreas["OUTER_AREA"].Area3DStyle.Rotation = rotation;
pieChart.ChartAreas["INNER_AREA"].Area3DStyle.Enable3D = enable3d;
pieChart.ChartAreas["INNER_AREA"].Area3DStyle.Inclination = inclination;
pieChart.ChartAreas["INNER_AREA"].Area3DStyle.Rotation = rotation;
}
}
```
| null | CC BY-SA 4.0 | null | 2022-10-11T09:29:38.337 | 2022-10-11T11:37:07.867 | 2022-10-11T11:37:07.867 | 1,798,586 | 1,798,586 | null |
74,026,308 | 2 | null | 74,024,568 | 0 | null | I recommend you to use to specify the rows and columns and then use `grid-row` property on the the item you want to span to other row it will make your task easier. Make sure you have enough rows available in your table to span one row item to other line.
| null | CC BY-SA 4.0 | null | 2022-10-11T10:00:33.357 | 2022-10-11T10:00:33.357 | null | null | 20,148,668 | null |
74,026,474 | 2 | null | 73,216,132 | 0 | null | Add `UILaunchStoryboardName` key
[](https://i.stack.imgur.com/r7kuz.png)
| null | CC BY-SA 4.0 | null | 2022-10-11T10:15:07.167 | 2022-10-11T10:15:07.167 | null | null | 3,543,955 | null |
74,026,504 | 2 | null | 74,024,568 | 1 | null | Better to use `grid` but if you really wan to use `table`, you will need to fix a height to your `tr`, otherwise you wont see any difference:
```
tr{
height: 25px;
}
```
And if you really want to that the height fit with your image, you can double height on the fourth row:
```
tr:nth-child(4){
height: 50px;
}
```
## DEMO
```
table, td {
border:2px solid black;
border-collapse: collapse;
}
tr{
height: 25px;
}
tr:nth-child(4){
height: 50px;
}
td{
height: 10px;
width: 200px;
vertical-align: top;
line-height: 25px;
}
td.a{
text-align: center;
vertical-align: top;
}
td.b{
text-align: left;
vertical-align: bottom;
}
td.c{
text-align: left;
vertical-align: middle
}
```
```
<html>
<head>
<title>Table</title>
<style> </style>
</head>
<body>
<table align="center">
<tbody>
<tr>
<td>a</td>
<td class="a" rowspan="3">b</td>
<td>c</td>
</tr>
<tr>
<td>d</td>
<td class="c" rowspan="3">e</td>
</tr>
<tr>
<td class="b" rowspan="2">f</td>
</tr>
<tr>
<td class="a" rowspan="2">g</td>
</tr>
<tr>
<td>h</td>
<td>i</td>
</tr>
<tbody>
</table>
</body>
</html>
```
| null | CC BY-SA 4.0 | null | 2022-10-11T10:17:39.513 | 2022-10-11T10:25:00.410 | 2022-10-11T10:25:00.410 | 11,044,542 | 11,044,542 | null |
74,026,869 | 2 | null | 74,025,372 | 1 | null | Please, test the next updated code. It uses a dictionary to extract the unique mail accounts and all the necessary data to behave as you need. The code has a `Stop` line, after `.Display` to let you see how the new mail looks in its window. Do what is written in the respective line comment. Otherwise, it will create so many new mail window as many UNIQUE records are in Q:Q:
```
Sub sendMailCond()
Dim sh As Worksheet, lastRQ As Long, arr, arrUs, i As Long
Dim mail As Object, strUsers As String, dict As Object
Set sh = ActiveSheet
lastRQ = sh.Range("Q" & sh.rows.count).End(xlUp).row 'last row on Q:Q
arr = sh.Range("A2:Q" & lastRQ).Value 'place the range in an array for faster processing
'Place the necessary data in the dictionary:
Set dict = CreateObject("Scripting.Dictionary") 'set the dictionary
For i = 1 To UBound(arr)
If arr(i, 14) Like "OK" Then
If Not dict.exists(arr(i, 17)) Then
dict.Add arr(i, 17), arr(i, 9) & "|" & arr(i, 1)
Else
dict(arr(i, 17)) = dict(arr(i, 17)) & "::" & arr(i, 1)
End If
End If
Next i
Set mail = CreateObject("Outlook.Application") 'create an outlook object
'extract the necessary data:
For i = 0 To dict.count - 1
arr = Split(dict.Items()(i), "|") 'split the item by "|" to extract value from I:I and a concatenation by "::" separator if more then one key exists
arrUs = Split(arr(1), "::")
If UBound(arrUs) > 0 Then
strUsers = Join(arrUs, " / ")
Else
strUsers = arr(1)
End If
With mail.CreateItem(olMailItem) ' informs the program that we want to send a mail.
.Subject = "Test"
.To = dict.Keys()(i)
.cc = "[email protected]"
.body = "Hi number " & arr(0) & " You are owner of users : " & strUsers
.SendUsingAccount = "[email protected]"
.Display: Stop 'See the New mail in Outlook and check its contents
'press F5 to continue!
End With
Next i
End Sub
```
If it returns as you want, you can replace the line starting with `Disply` with `.Send`.
:
The new version extracting from M:M, too and placing at the end of body:
```
Sub sendMailCond2()
Dim sh As Worksheet, lastRQ As Long, arr, arrUs, i As Long
Dim mail As Object, strUsers As String, dict As Object
Set sh = ActiveSheet
lastRQ = sh.Range("Q" & sh.rows.count).End(xlUp).row
arr = sh.Range("A2:Q" & lastRQ).Value
'Place the necessary data in the dictionary:
Set dict = CreateObject("Scripting.Dictionary") 'set the dictionary
For i = 1 To UBound(arr)
If arr(i, 14) Like "OK" Then
If Not dict.exists(arr(i, 17)) Then
dict.Add arr(i, 17), arr(i, 9) & "|" & arr(i, 13) & "|" & arr(i, 1)
Else
dict(arr(i, 17)) = dict(arr(i, 17)) & "::" & arr(i, 1)
End If
End If
Next i
Set mail = CreateObject("Outlook.Application") 'create an outlook object
'extract the necessary data:
For i = 0 To dict.count - 1
arr = Split(dict.Items()(i), "|")
arrUs = Split(arr(2), "::")
If UBound(arrUs) > 0 Then
strUsers = Join(arrUs, " / ") & ". Your last connection was " & arr(1)
Else
strUsers = arr(2) & ". Your last connection was " & arr(1)
End If
With mail.CreateItem(olMailItem) ' informs the program that we want to send a mail.
.Subject = "Test"
.To = dict.Keys()(i)
.cc = "[email protected]"
.body = "Hi number " & arr(0) & " You are owner of users : " & strUsers
.SendUsingAccount = "[email protected]"
.Display: Stop 'See the New mail in Outlook and check its contents
'press F5 to continue!
End With
Next i
End Sub
```
| null | CC BY-SA 4.0 | null | 2022-10-11T10:48:32.350 | 2022-10-11T11:58:52.157 | 2022-10-11T11:58:52.157 | 2,233,308 | 2,233,308 | null |
74,026,914 | 2 | null | 74,025,372 | 1 | null | At first you need to make summarized table and then send from that table. In this code it adds new sheet, makes summarized table in it and sends from that table
```
Private Sub CommandButton1_Click()
Dim mail As Variant, Owner As Variant, user As Variant
Dim ligne As Integer, x As Integer, i As Integer, j As Integer, RowNum As Integer
Dim ws As Worksheet, ws2 As Worksheet
Dim found As Boolean
Set ws = ActiveSheet
Set ws2 = Sheets.Add
ws2.Cells(1, "A") = "Value"
ws2.Cells(1, "B") = "email"
ws2.Cells(1, "C") = "Usernames"
x = ws.Cells(1, "I").End(xlDown).Row 'get last row with data
If x > 1 Then
For i = 2 To x
If ws.Range("n" & i) = "OK" Then
Owner = ws.Cells(i, "I").Value
user = ws.Cells(i, "G").Value
mail = ws.Cells(i, "Q").Value
RowNum = ws2.Cells(65536, 1).End(xlUp).Row 'get last row with summarized data, asuming that there will not be more than 65536 owners
If RowNum = 1 Then
ws2.Cells(2, 1) = Owner
ws2.Cells(2, 2) = mail
ws2.Cells(2, 3) = user
Else
found = False
For j = 2 To RowNum 'check if there already is such owner
If ws2.Cells(j, 1) = Owner Then
found = True
ws2.Cells(j, 3) = ws2.Cells(j, 3).Value & ", " & user 'adds new Username to existing, delimiting by comma and space
Exit For
End If
Next j
If found = False Then
ws2.Cells(RowNum + 1, 1) = Owner
ws2.Cells(RowNum + 1, 2) = mail
ws2.Cells(RowNum + 1, 3) = user
End If
End If 'Rownum>1
End If '=OK
Next i
RowNum = ws2.Cells(65536, 1).End(xlUp).Row
If RowNum > 1 Then ' if there is at least 1 OK user
Set mail = CreateObject("Outlook.Application") 'create an outlook object
For ligne = 2 To RowNum
With mail.CreateItem(olMailItem) ' informs the program that we want to send a mail.
.Subject = test
.To = ws2.Range("b" & ligne)
.CC = "[email protected]"
.Body = "Hi number " & ws2.Range("A" & ligne) & " You are owner of users :" & ws2.Range("C" & ligne) 'users
.SendUsingAccount = "[email protected]"
.Display 'display the mail before sending it if not place send to send
End With
End If
Next ligne
End If 'Rownum >1
End If 'x>1
End Sub
```
| null | CC BY-SA 4.0 | null | 2022-10-11T10:51:41.847 | 2022-10-11T11:41:10.763 | 2022-10-11T11:41:10.763 | 10,623,481 | 10,623,481 | null |
74,026,997 | 2 | null | 74,019,716 | 0 | null | You can use the `ceph-objectstore-tool` to query offline OSDs and see which OSD contains which data chunk:
```
[ceph: root@pacific /]# ceph-objectstore-tool --data-path /var/lib/ceph/osd/ceph-1/ --op list
["11.2s2",{"oid":"file","key":"","snapid":-2,"hash":779072666,"max":0,"pool":11,"namespace":"","shard_id":2,"max":0}]
```
The first entry contains the shard ID: "11.2s2". So the PG is 11.2 and shard ID is 2. To query a cephadm deployed OSD you need to stop it via cephadm and then enter the container:
```
pacific:~ # cephadm unit stop --name osd.1
Inferring fsid 0a8034bc-15f4-11ec-8330-fa163eed040c
pacific:~ # cephadm shell --name osd.1
```
| null | CC BY-SA 4.0 | null | 2022-10-11T10:58:05.300 | 2022-10-11T10:58:05.300 | null | null | 14,129,908 | null |
74,027,034 | 2 | null | 74,025,831 | 1 | null | SMBIOS processor id in processor information (4) is documented as the values of registers EAX and EDX for CPUID leaf 1 on x86. If you actually care about the CPU features then call `IsProcessorFeaturePresent` or CPUID yourself.
I don't know why the value is not reported. Most likely because the BIOS is not setting the values for it or Microsoft removed the support in WMI.
| null | CC BY-SA 4.0 | null | 2022-10-11T11:00:48.487 | 2022-10-11T11:00:48.487 | null | null | 3,501 | null |
74,027,294 | 2 | null | 73,917,347 | 1 | null | The `-x` argument takes the path to the basename of the index. That means, if the index called `miniReference1.{suffix}` is inside a folder also called `miniReference1` then it must be `-x path/to/miniReference1/miniReference1`. There is no need to use this variable, just use the plain path.
| null | CC BY-SA 4.0 | null | 2022-10-11T11:21:30.563 | 2022-10-11T11:21:30.563 | null | null | 5,074,060 | null |
74,027,374 | 2 | null | 73,984,294 | 2 | null | Well i think this way let you scroll, hope this works for you too,
I set `scrollDirection` of builder to `Axis.vertical` and wrap the Html with `SingleChildScrollView`:
```
ListView.builder(
shrinkWrap: true,
itemCount: 10,
scrollDirection: Axis.vertical,
itemBuilder: (context, index) {
return SingleChildScrollView(
scrollDirection: Axis.horizontal,
physics: const NeverScrollableScrollPhysics(),
child: Html(
data:
"""<p><iframe title="The rise and fall of cryptocurrency" aria-label="Interactive line chart" id="datawrapper-chart-acQ2e" src="https://datawrapper.dwcdn.net/acQ2e/4/" scrolling="no" frameborder="0" style="width: 0; min-width: 100% !important; border: none;" height="450"></iframe><script type="text/javascript">!function(){"use strict";window.addEventListener("message",(function(e){if(void 0!==e.data["datawrapper-height"]){var t=document.querySelectorAll("iframe");for(var a in e.data["datawrapper-height"])for(var r=0;r<t.length;r++){if(t[r].contentWindow===e.source)t[r].style.height=e.data["datawrapper-height"][a]+"px"}}}))}();
</script></p>""",
navigationDelegateForIframe: (request) {
return NavigationDecision.navigate;
},
),
);
},
),
```
this result is by your iframe example and worked well for me, the result be like:
[](https://i.stack.imgur.com/QIIoZ.gif)
look in this result i scroll with tapping on iframe, try it and let me know the result
| null | CC BY-SA 4.0 | null | 2022-10-11T11:28:24.753 | 2022-10-11T11:28:24.753 | null | null | 14,642,553 | null |
74,027,414 | 2 | null | 74,027,287 | 0 | null | Is such a formula helpful for you:
```
=MINIFS(B$2:B$10,A$2:A$10,"Ramsay street")
```
As you see, I take the minimum value of the "B" column, based on a criterion on the "A" column.
Hereby a screenshot of an example:
[](https://i.stack.imgur.com/g5vef.png)
| null | CC BY-SA 4.0 | null | 2022-10-11T11:31:20.423 | 2022-10-11T11:31:20.423 | null | null | 4,279,155 | null |
74,027,514 | 2 | null | 74,026,810 | 0 | null | It's a shame trying to do this in Powershell, if UNIX/Linux commandline gets this done very easily:
```
awk '{print $2}' test.csv | sort | uniq -c
```
| null | CC BY-SA 4.0 | null | 2022-10-11T11:40:34.057 | 2022-10-11T11:40:34.057 | null | null | 4,279,155 | null |
74,027,548 | 2 | null | 28,062,478 | 0 | null | ```
` <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<ImageView
android:id="@+id/imageclose"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_gravity="end|top"
android:src="@drawable/close"
android:background="@drawable/close"
app:layout_constraintBottom_toTopOf="@+id/cardview"
app:layout_constraintEnd_toEndOf="parent">
</ImageView>
```
<----Your Layout------->`enter code here`
</androidx.constraintlayout.widget.ConstraintLayout>`
| null | CC BY-SA 4.0 | null | 2022-10-11T11:43:26.310 | 2022-10-11T11:47:47.963 | 2022-10-11T11:47:47.963 | 20,018,691 | 20,018,691 | null |
74,027,615 | 2 | null | 28,062,478 | 0 | null | ```
`AlertDialog.Builder builder = new
AlertDialog.Builder(MainActivity.this);
builder.setCancelable(false);
builder.setView(R.layout.custom);
AlertDialog Dialog = builder.create();
Dialog.show();
imageview=Dialog.findViewById(R.id.imageclose);
Dialog.getWindow().setBackgroundDrawable( new
ColorDrawable(android.graphics.Color.TRANSPARENT));
imageview.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Dialog.dismiss();
}
});
```
| null | CC BY-SA 4.0 | null | 2022-10-11T11:48:07.767 | 2022-10-11T11:48:07.767 | null | null | 20,018,691 | null |
74,027,890 | 2 | null | 74,027,287 | 0 | null | If you are on Excel 365 - current channel you can use this formula:
```
=LET(streetnamesUnique,UNIQUE(data[StreetName]),
minNumber,BYROW(streetnamesUnique,LAMBDA(s, MINIFS(data[Number],data[StreetName],s))),
maxNumber,BYROW(streetnamesUnique,LAMBDA(s, MAXIFS(data[Number],data[StreetName],s))),
HSTACK(streetnamesUnique,minNumber,maxNumber))
```
If on Excel 365 semi annual channel:
```
=LET(streetnamesUnique,UNIQUE(data[StreetName]),
minNumber,BYROW(streetnamesUnique,LAMBDA(s, MINIFS(data[Number],data[StreetName],s))),
maxNumber,BYROW(streetnamesUnique,LAMBDA(s, MAXIFS(data[Number],data[StreetName],s))),
MAKEARRAY(ROWS(streetnamesUnique),3,LAMBDA(r,c,
IF(c=1,INDEX(streetnamesUnique,r),
IF(c=2,INDEX(minNumber,r),
INDEX(maxNumber,r))))))
```
Both formulas first retrieve the unique streetnames - then retrieves, per each streetname min and max number.
In the end the new range is built from these values - either by HSTACK or MAKEARRAY.
[](https://i.stack.imgur.com/TN2Ks.png)
| null | CC BY-SA 4.0 | null | 2022-10-11T12:07:26.447 | 2022-10-11T12:07:26.447 | null | null | 16,578,424 | null |
74,028,317 | 2 | null | 74,020,049 | 0 | null | this can be done by combining the methods where, sort_values and iloc of pandas
```
import pandas as pd
# reproduce your data
city = ['milan', 'barcelona', 'madrid', 'palermo']
country = ['italy', 'spain', 'spain', 'italy']
value = [-2, 5, 8, -1.5]
date = pd.to_datetime(['2020-02-04', '2020-02-04', '2020-02-04', '2020-02-05'])
df = pd.DataFrame(
zip(city, country, value, date),
columns=['city', 'country', 'value', 'date']
)
# define target date
tdate = pd.to_datetime('2020-02-04')
# sort according to value column -> highest on top
df = df.sort_values('value', ascending=False)
# filter for date
df = df.where(df.date == tdate)
# print 2 highest values (after sorting this means the first 2)
print(df.iloc[:2][['city', 'country']])
# or as single command
print(
df
.where(df.date == tdate)
.sort_values('value', ascending=False)
.iloc[:2][['city', 'country']]
)
```
output:
```
city country
2 madrid spain
1 barcelona spain
```
| null | CC BY-SA 4.0 | null | 2022-10-11T12:40:19.677 | 2022-10-11T12:40:19.677 | null | null | 14,569,281 | null |
74,028,618 | 2 | null | 27,244,511 | 1 | null | Check if it is excluded from the yum source:
1. Use vi /etc/yum.conf
2. Check the exclude option
| null | CC BY-SA 4.0 | null | 2022-10-11T13:02:00.403 | 2022-10-16T12:54:34.930 | 2022-10-16T12:54:34.930 | 8,864,226 | 16,898,140 | null |
74,028,784 | 2 | null | 74,025,017 | 0 | null | At runtime Google Apps Script, loads all the files before actually running the invoked function, automatically assigning an authorization mode. When running a custom function the authorization mode is "CUSTOM_FUNCTION" that impose several limitations. Because of this:
1. On projects having custom functions (and also when having simple triggers), avoid calling any method that requires authorization on the global scope. As a general rule of thumb for people starting with Google Apps Script, avoid making variable declarations using Google Apps Script methods. It's safe to assign literals primitives (i.e. numbers, strings, etc.) and object literals.
2. Avoid calling functions in the global scope, i.e. avoid writing myFunction() and (() => something )().
3. When creating a "mcve" start from scratch, meaning create a new spreadsheet, create the bound project, then only add the custom function code. If necessary add the other code lines starting by the global variables.
NOTE: Bound projects are some sort of . If you will be working complex bound projects, checkout the Editor add-on documentation, like the article "Editor add-on authorization" (link included in the references section). The main functional difference with is that the bound project simple triggers only works with the bounded document.
References
- [https://developers.google.com/apps-script/guides/sheets/functions](https://developers.google.com/apps-script/guides/sheets/functions)- [https://developers.google.com/apps-script/add-ons/concepts/editor-auth-lifecycle](https://developers.google.com/apps-script/add-ons/concepts/editor-auth-lifecycle)
| null | CC BY-SA 4.0 | null | 2022-10-11T13:15:17.837 | 2022-10-11T13:21:38.430 | 2022-10-11T13:21:38.430 | 1,595,451 | 1,595,451 | null |
74,029,483 | 2 | null | 67,056,597 | 2 | null | I also spent a lot of time to figure out.
But when I used Crc32 calculation from [here](https://github.com/paypal/PayPal-NET-SDK/blob/ec14d73c35b319f2072f65b755a802d653b8133a/Source/SDK/Util/Crc32.cs) it verified request!
This Crc32 looks strange but it works!
| null | CC BY-SA 4.0 | null | 2022-10-11T14:05:37.420 | 2022-10-11T14:05:37.420 | null | null | 3,060,421 | null |
74,029,494 | 2 | null | 58,613,492 | 0 | null | Don't know why and how but how I solved the problem was really interesting.
Just add `__mocks__` folder in your src folder and create an empty file inside `__mocks__` named `axios.js`
| null | CC BY-SA 4.0 | null | 2022-10-11T14:06:19.397 | 2022-10-11T14:06:19.397 | null | null | 17,040,927 | null |
74,030,108 | 2 | null | 74,029,932 | 1 | null | `dd()` is a Symfony function to dump data to the screen. If you look at the code for the function (`vendor/symfony/var-dumper/Resources/functions/dump.php`):
```
if (!function_exists('dd')) {
/**
* @return never
*/
function dd(...$vars): void
{
if (!in_array(\PHP_SAPI, ['cli', 'phpdbg'], true) && !headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
foreach ($vars as $v) {
VarDumper::dump($v);
}
exit(1);
}
}
```
You'll see that if PHP_SAPI does not contain `cli` or `phpdbg`, as test packages do, it will return a 500 Internal Server Error status.
| null | CC BY-SA 4.0 | null | 2022-10-11T14:50:22.060 | 2022-10-11T14:50:22.060 | null | null | 1,007,220 | null |
74,030,424 | 2 | null | 74,028,734 | 0 | null | First of all, please make sure you provide the full code that anyone can compile and test. It's usually not even possible to help without it!
---
Your table is simply too wide. The only sensible way to fit it within a page is to change wording; sometimes breaking into multiple lines can be enough. For the latter, inner `tabular` is OK but I would suggest [makecell](https://www.ctan.org/pkg/makecell) package.
The culprits are headings and repeated information (horizontal, vertical or diagonal). I'd change long headings to acronyms and add annotations at the bottom unless a particular heading name is already short or takes similar space as most of the cell content.
Here's the proposed example:
[](https://i.stack.imgur.com/GlneB.png)
and the code:
```
\documentclass{article}
\usepackage{tabularx}
\usepackage{rotating}
\usepackage{booktabs}
\usepackage{makecell}
\renewcommand{\tabularxcolumn}[1]{m{#1}}
\NewDocumentCommand\xtnote{sm}{\def\tss{\textsuperscript{#2}}\IfBooleanTF{#1}{\tss}{\rlap{\tss}}}
\newcommand\emspace{\hspace{0.75em}}
\renewcommand\theadfont{\bfseries}
\renewcommand\cellalign{cc}
\renewcommand\theadalign{cc}
\begin{document}
\begin{sidewaystable}
\setlength\tabcolsep{4pt}
\begin{tabularx}{\textwidth}{l *8{c} X}
\toprule
\thead[l]{Name} &
\thead{XR\\type} &
\thead{ST\,\xtnote{1}} & % Standalone
\thead{Jahr} &
\thead{Preis} &
\thead[l]{Display} &
\thead{SE\,\xtnote{2}} & % Sehwinkel
\thead{Auflösung\\Auge} &
\thead{Bildrate} &
\thead{Sonstiges} \\\midrule
Oculus Quest 2 &
VR &
ja &
2020 &
\$299 &
\makecell{Single Fast\\switch LCD} &
\makecell{97° \xtnote{h}\\93° \xtnote{v}} &
1832x1920 &
120 Hz & \\
Pico Neo 3 Link &
VR &
ja &
2022 &
\$449 &
Single LCD &
\makecell{98° \xtnote{h}\\90° \xtnote{v}} &
1832x1920 &
90 Hz & \\
\makecell[l]{VRgineers XTAL 3\\Mixed Reality} &
MR &
nein &
2022 &
\$11500 &
2 x LCD &
\makecell{180° \xtnote{h}\\90° \xtnote{v}} &
3840x2160 &
120 Hz &
6 DoF Inside-out \\
VRgineers XTAL 3 &
VR &
nein &
&
\$8900 &
2 x LCD &
\makecell{180° \xtnote{h}\\90° \xtnote{v}} &
3840x2160 &
120 Hz & \\
Dream Glass Lead Pro &
AR &
ja &
2022 &
\$1199 & &
90° \xtnote{d} &
1920x1080 & & \\
Tilt Five &
AR &
nein &
2021 &
\$359 &
2 x LCoS &
110° \xtnote{d} &
1280x720 & & \\
Lenovo ThinkReality A3 &
AR &
nein &
2021 &
\$1499 & & &
1920x1080 & & \\
HTC Vive Flow &
VR &
ja &
2021 &
\$499 &
2 x LCD &
100° \xtnote{d} &
1600x1600 &
75 Hz & \\
Huawei VR Glass 6DoF &
MR &
nein &
2021 &
\$620 &
2 x LCD &
90° \xtnote{d} &
1600x1600 &
90 Hz &
6 DoF Inside-out via 2 Kameras \\\midrule
\multicolumn{10}{l}{%
\xtnote*{1} Standalone,\qquad\xtnote*{2} Sehwinkel,\qquad
\xtnote*{h} horizontal,\qquad\xtnote*{v} vertical,\qquad\xtnote*{d} diagonal}
\end{tabularx}
\end{sidewaystable}
\end{document}
```
| null | CC BY-SA 4.0 | null | 2022-10-11T15:17:41.247 | 2022-10-11T15:17:41.247 | null | null | 1,612,369 | null |
74,030,693 | 2 | null | 29,837,479 | 0 | null | If you are using Bootstrap 3 you can always use `table-responsive` class like so;
```
<div class="table-responsive">
<?= GridView::widget(); ?>
</div>
```
| null | CC BY-SA 4.0 | null | 2022-10-11T15:39:15.167 | 2022-10-11T15:39:15.167 | null | null | 1,288,189 | null |
74,030,845 | 2 | null | 73,951,742 | 0 | null | Set saveEnabled to "false" for the MaterialAutoCompleteTextView in XML
```
<com.google.android.material.textfield.MaterialAutoCompleteTextView
android:id="@+id/auto_complete_text_view"
android:inputType="none"
android:saveEnabled="false" />
```
| null | CC BY-SA 4.0 | null | 2022-10-11T15:50:06.027 | 2022-10-11T15:50:06.027 | null | null | 6,925,031 | null |
74,031,082 | 2 | null | 74,031,048 | 1 | null | `http.get` requires a `Uri`, not a `String`. Use `Uri.parse` method to create a `Uri`.
```
await http.get(Uri.parse(apiUrl));
```
| null | CC BY-SA 4.0 | null | 2022-10-11T16:08:18.793 | 2022-10-11T16:08:18.793 | null | null | 4,593,315 | null |
74,031,099 | 2 | null | 74,031,048 | 2 | null | You are facing that error because `http.get` requires a Uri and not a String.
Try pass `Uri.parse(apiUrl)` instead of `apiUrl`
| null | CC BY-SA 4.0 | null | 2022-10-11T16:09:32.567 | 2022-10-11T16:09:32.567 | null | null | 20,215,289 | null |
74,031,718 | 2 | null | 74,027,069 | 0 | null |
You could use the `add_segments` function from `plotly`. You could also add multiple lines by specifying vectors like this:
```
library(xts)
library(TSstudio)
library(dplyr)
library(plotly)
#Create xts object
df.xts <- xts(df[, 2:3], order.by = df$week)
# plot
ts_plot(df.xts) %>%
add_segments(y = c(0, 0, 0),
x = as.Date(c("2020-03-01", "2020-06-01", "2020-08-01")),
yend = c(1500, 1500, 1500),
xend = as.Date(c("2020-03-01", "2020-06-01", "2020-08-01")),
color = c('red', 'green', 'purple'),
showlegend = FALSE)
```

[reprex v2.0.2](https://reprex.tidyverse.org)
---
Because you are using `xts` data format, you can use the function [addEventLines](https://jangorecki.gitlab.io/data.table/library/xts/html/addEventLines.html) to add some vertical lines. Here is a reproducible example:
```
library(xts)
library(rtweet)
#Create xts object
df.xts <- xts(df[, 2:3], order.by = df$week)
# plot
plot(df.xts)
addEventLines(xts('', as.Date("2020-03-01")), pos = 2, srt = 90, col = 'blue')
```
[](https://i.stack.imgur.com/ACOu5.png)
[reprex v2.0.2](https://reprex.tidyverse.org)
| null | CC BY-SA 4.0 | null | 2022-10-11T17:06:07.663 | 2022-10-12T12:20:27.800 | 2022-10-12T12:20:27.800 | 14,282,714 | 14,282,714 | null |
74,031,841 | 2 | null | 74,031,533 | 1 | null | Something like this is probably what you want:
```
Stack(children: [
Positioned(
top: 16,
left: 0,
right: 0,
bottom: 0,
child: YourDialogWidget(),
),
Positioned(
top: 0,
left: 0,
right: 0,
child: YourCheckMarkWidget(size: 32),
),
]),
```
Customize as you see fit.
| null | CC BY-SA 4.0 | null | 2022-10-11T17:18:03.123 | 2022-10-11T17:18:03.123 | null | null | 10,003,008 | null |
74,032,714 | 2 | null | 74,032,108 | 0 | null | The image itself is the answer.
Git log shows your previous commits, author info and timestamp of the commits
| null | CC BY-SA 4.0 | null | 2022-10-11T18:41:21.497 | 2022-10-11T18:41:21.497 | null | null | 19,059,099 | null |
74,032,978 | 2 | null | 73,949,848 | 0 | null | > tried to use versions of ConsumeKafka_1_0, ConsumeKafka_2_0 and ConsumeKafka_2_6
Depends what Kafka version you are using. If you are using Kafka broker later than 2.6, then use that. If you are newer than 2.0 broker, but less than 2.6, use 2.0... and so on.
> set Offset Reset to Latest or Earliest
Depends if you care about existing data. If so, use earliest.
> modified the Group ID on each request
That's a good debugging step, but not necessary all the time. You can use `kafka-consumer-groups.sh` command to further debug if the group was actually created in the Kafka cluster.
> Honor Transactions to True or False
Depends if your producer uses transactions. Not sure what NiFi will do if you have this set to true, and your producer doesn't use them... Probably safe to leave set to True, though.
---
### Example w/ latest Kafka
For PLAINTEXT Kafka protocol
- - - -
For simple Kafka consumer debugging
- [GrokReader](https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-record-serialization-services-nar/1.8.0/org.apache.nifi.grok.GrokReader/additionalDetails.html)- `%{GREEDYDATA:message}`
For internal Nifi FlowFile output (could use any format, but JSON is good to validate your steps have worked)
- `JSONRecordSetWriter`
Add new processors for `parse.failure` (or terminate it under the Relationships tab) and setup `success` relationship with click-drag from Consume Processor. You can disable next processor to simply queue up FlowFiles within NiFi.
Then, start the Consume processor, and inspect data in the queue.
Producer command:
```
echo 'Hello, World' | kcat -P -b localhost:9092 -t foobar
```
[](https://i.stack.imgur.com/rOPf0.png)
[](https://i.stack.imgur.com/MxK6w.png)
| null | CC BY-SA 4.0 | null | 2022-10-11T19:07:43.153 | 2022-10-11T19:12:58.737 | 2022-10-11T19:12:58.737 | 2,308,683 | 2,308,683 | null |
74,033,012 | 2 | null | 62,152,057 | 0 | null | 5 - Check that your color isn't transparent.
I had the same problem seconds ago.
| null | CC BY-SA 4.0 | null | 2022-10-11T19:11:10.460 | 2022-10-11T19:11:10.460 | null | null | 20,216,486 | null |
74,033,030 | 2 | null | 74,033,000 | 0 | null | I think for decoding, you can try something like this,
```
String delims="[,]";
String[] parts = base64ImageString.split(delims);
String imageString = parts[1];
byte[] imageByteArray = Base64.decode(imageString );
InputStream is = new ByteArrayInputStream(imageByteArray);
//Find out image type
String mimeType = null;
String fileExtension = null;
try {
mimeType = URLConnection.guessContentTypeFromStream(is); //mimeType is something like "image/jpeg"
String delimiter="[/]";
String[] tokens = mimeType.split(delimiter);
fileExtension = tokens[1];
} catch (IOException ioException){
}
```
| null | CC BY-SA 4.0 | null | 2022-10-11T19:13:01.407 | 2022-10-11T19:13:01.407 | null | null | 10,441,871 | null |
74,033,310 | 2 | null | 66,746,771 | 1 | null | This is achievable in AppSync. I think what you are looking for is a way to use different authentication mode for different API. So some API like query can be done by any unauthenticated users(i.e open to public) while others ike mutation is guarded behind the authentication.
One simple approach would be to enable authentication via `Cogntito Identity Pool`
[Identity pool](https://docs.aws.amazon.com/cognito/latest/developerguide/identity-pools.html) can be configured with two roles, one authorized role and another unauthorized role. Unauthorized role policy can be updated to, default ALLOW permission on AppSync query endpoint.
---
Here is a sample guide by Daniel Bayerlein which you can follow to achieve this: [https://dev.to/danielbayerlein/aws-appsync-without-authentication-3fnm](https://dev.to/danielbayerlein/aws-appsync-without-authentication-3fnm)
It has detailed step and configuration change that is needed.
---
One more references for your help, in case if you just want to manually update the Cognito identity pool permission manually from AWS console: [https://dev.to/sedkis/setting-up-aws-appsync-for-unauthenticated-users-1879](https://dev.to/sedkis/setting-up-aws-appsync-for-unauthenticated-users-1879)
---
I hope this would be useful. Please feel free to reach out in case if you get stuck. Would be more then happy to assist in your configuration.
---
| null | CC BY-SA 4.0 | null | 2022-10-11T19:40:08.873 | 2022-10-11T19:40:08.873 | null | null | 3,549,742 | null |
74,033,378 | 2 | null | 74,033,203 | 0 | null | You should add a grouping argument.
see further info here:
[https://ggplot2.tidyverse.org/reference/aes_group_order.html](https://ggplot2.tidyverse.org/reference/aes_group_order.html)
```
# Multiple groups with one aesthetic
p <- ggplot(nlme::Oxboys, aes(age, height))
# The default is not sufficient here. A single line tries to connect all
# the observations.
p + geom_line()
# To fix this, use the group aesthetic to map a different line for each
# subject.
p + geom_line(aes(group = Subject))
```
| null | CC BY-SA 4.0 | null | 2022-10-11T19:47:39.467 | 2022-10-11T19:47:39.467 | null | null | 19,110,927 | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.