Id
int64 1.68k
75.6M
| PostTypeId
int64 1
2
| AcceptedAnswerId
int64 1.7k
75.6M
⌀ | ParentId
int64 1.68k
75.6M
⌀ | Score
int64 -60
3.16k
| ViewCount
int64 8
2.68M
⌀ | Body
stringlengths 1
41.1k
| Title
stringlengths 14
150
⌀ | ContentLicense
stringclasses 3
values | FavoriteCount
int64 0
1
⌀ | CreationDate
stringlengths 23
23
| LastActivityDate
stringlengths 23
23
| LastEditDate
stringlengths 23
23
⌀ | LastEditorUserId
int64 -1
21.3M
⌀ | OwnerUserId
int64 1
21.3M
⌀ | Tags
sequence |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75,021,840 | 2 | null | 74,974,120 | 0 | null | I encountered the same error but it has disappeared after restarting jupyter.
| null | CC BY-SA 4.0 | null | 2023-01-05T16:52:34.767 | 2023-01-05T16:52:34.767 | null | null | 7,555,358 | null |
75,021,847 | 2 | null | 27,710,514 | 2 | null | Ferran Maylinch's answer worked the best for me.
I turned it into an UILabel extension that I thought I'd share.
```
extension UILabel {
func addUnbrokenUnderline() {
let line = UIView()
line.translatesAutoresizingMaskIntoConstraints = false
line.backgroundColor = textColor
addSubview(line)
NSLayoutConstraint.activate([
line.heightAnchor.constraint(equalToConstant: 1.0),
line.leadingAnchor.constraint(equalTo: leadingAnchor),
line.widthAnchor.constraint(equalToConstant: intrinsicContentSize.width),
line.bottomAnchor.constraint(equalTo: bottomAnchor, constant: -5.0)
])
}
```
}
| null | CC BY-SA 4.0 | null | 2023-01-05T16:53:25.877 | 2023-01-05T16:53:25.877 | null | null | 9,755,820 | null |
75,021,996 | 2 | null | 43,627,721 | 0 | null | Wrap the code block with Dialog(child: _your_pop_up_widget());
| null | CC BY-SA 4.0 | null | 2023-01-05T17:07:31.053 | 2023-01-05T17:07:31.053 | null | null | 10,566,576 | null |
75,022,258 | 2 | null | 75,021,935 | 2 | null | The bounding box is present on your plot as the outline of the map. We can see this if we specifically colour it red. If you are looking for a rectangle drawn around the whole plot then use the `colour` argument of `panel.background` inside `theme` (shown below)
I'm not sure what's going on with your equatorial line and latitude lines, since these show up as expected on my machine with the following code:
```
ggplot(data = ww_ini) +
geom_sf( col = "black", lwd = 0.3 )+
xlab(NULL) + ylab(NULL) +
ggtitle("Test title")+
geom_sf(data = bb, col = "red", fill = "transparent") +
theme(plot.background = element_rect(fill = "white"),
panel.background = element_rect(fill = 'white', colour = 'black'),
panel.grid.major = element_line(colour = "grey"),
legend.position="top",
plot.title = element_text(lineheight=.8, size=24, face="bold",
vjust=1),
legend.text = element_text(vjust=.4,lineheight=1,size = 14),
legend.title = element_text(vjust=1,lineheight=1, size=14,
face="bold" ))+
coord_sf( crs = "+proj=eqearth +wktext")
```
[](https://i.stack.imgur.com/BhtRW.png)
| null | CC BY-SA 4.0 | null | 2023-01-05T17:31:37.627 | 2023-01-05T17:31:37.627 | null | null | 12,500,315 | null |
75,022,312 | 2 | null | 75,021,677 | 0 | null | I found out, that it seems to be a problem with firefox.
With chrome the animation is fine.
I don't know what the problem is, though.
| null | CC BY-SA 4.0 | null | 2023-01-05T17:37:11.130 | 2023-01-05T17:37:11.130 | null | null | 10,852,424 | null |
75,022,588 | 2 | null | 75,022,533 | 0 | null | That's Finder (the "Windows Explorer" there) for macOS, which does not have such a feature.
| null | CC BY-SA 4.0 | null | 2023-01-05T18:03:32.253 | 2023-01-05T18:03:32.253 | null | null | 11,182 | null |
75,022,936 | 2 | null | 75,012,854 | -1 | null | Following short and simple code is adapted from [here](https://cs.ccsu.edu/%7Emarkov/ccsu_courses/prolog.txt).
```
cities(1,2).
cities(2,3).
cities(3,4).
cities(3,5).
cities(2,5).
cities(5,6).
cities(2,6).
connected(X,Y,[cities(X,Y)]) :- cities(X,Y).
connected(X,Y,[cities(X,Z)|P]) :- cities(X,Z),connected(Z,Y,P).
```
Then one can search for paths:
```
?- connected(1,6,P).
P = [cities(1, 2), cities(2, 6)] ;
P = [cities(1, 2), cities(2, 3), cities(3, 5), cities(5, 6)] ;
P = [cities(1, 2), cities(2, 5), cities(5, 6)] ;
```
| null | CC BY-SA 4.0 | null | 2023-01-05T18:36:07.627 | 2023-01-08T04:51:23.463 | 2023-01-08T04:51:23.463 | 3,522,130 | 3,522,130 | null |
75,022,962 | 2 | null | 75,022,716 | 1 | null | We can use
```
library(zoo)
fortify.zoo(HCLTECH)
```
| null | CC BY-SA 4.0 | null | 2023-01-05T18:37:54.910 | 2023-01-05T18:37:54.910 | null | null | 3,732,271 | null |
75,023,157 | 2 | null | 27,474,322 | 0 | null | Yes, placing an 'r' at the front works.
Check this line : `plt.xlabel(r'$\rho$'); plt.ylabel('$\sigma_{yy}$(MPa)');`
[without 'r'](https://i.stack.imgur.com/V5W05.png) and [with 'r'](https://i.stack.imgur.com/HfeJA.png)
| null | CC BY-SA 4.0 | null | 2023-01-05T18:55:09.267 | 2023-01-07T20:10:58.927 | 2023-01-07T20:10:58.927 | 2,347,649 | 5,273,736 | null |
75,023,220 | 2 | null | 43,979,449 | 0 | null | I agree with @Anas answer, the situation might be solved after you increase the epoch times.
Everything is ok, but sometimes, it is just a coincidence that the initialized model exhibits a better performance in the validation/test dataset compared to the training dataset.
| null | CC BY-SA 4.0 | null | 2023-01-05T19:00:02.643 | 2023-01-05T19:00:02.643 | null | null | 16,831,682 | null |
75,023,304 | 2 | null | 26,653,883 | 0 | null | If you are setting up a lazy tableView, you may want to change the color to clear, seems like an Apple bug where sometimes the style is replaced on layout cycles.
```
private lazy var tableView: UITableView = {
let table = UITableView(frame: self.view.bounds, style: .insetGrouped)
table.separatorStyle = .none // <- HERE
table.separatorColor = .clear // <- HERE
table.delegate = self
table.dataSource = self
table.estimatedRowHeight = UITableView.automaticDimension
table.register(UITableView.self, forCellReuseIdentifier: "MyCell")
return table
}()
```
| null | CC BY-SA 4.0 | null | 2023-01-05T19:09:59.323 | 2023-01-05T19:09:59.323 | null | null | 3,782,629 | null |
75,023,322 | 2 | null | 11,221,353 | 0 | null | ```
---create user
```
CREATE USER john IDENTIFIED BY Oracle1234;
```
---grant sesssion
```
GRANT CREATE SESSION TO john;
```
---grant read and write
```
grant read , write on directory datapump to john;
-----check coonection
connect john/Oracle1234@TEPDB
```
---grant full export permission
```
SQL> grant EXP_FULL_DATABASE to john;
Grant succeeded.
SQL> alter user john quota unlimited on system;
User altered.
SQL> exit
| null | CC BY-SA 4.0 | null | 2023-01-05T19:12:19.543 | 2023-01-05T19:20:27.003 | 2023-01-05T19:20:27.003 | 1,395,922 | 1,395,922 | null |
75,023,468 | 2 | null | 75,023,199 | 2 | null | If you wanted the same output as the base R hist, you can just extract the values from the object and draw it yourself.
```
set.seed(123)
x <- rnorm(100)
hh <- hist(x, breaks = quantile(x, 0:10 / 10))
data.frame(
left=head(hh$breaks,-1), right=tail(hh$breaks, -1),
height=hh$density
) |>
ggplot() +
aes(xmin=left, xmax=right, ymin=0, ymax=height) +
geom_rect(fill="lightgray", color="black")
```
[](https://i.stack.imgur.com/1rCsn.png)
| null | CC BY-SA 4.0 | null | 2023-01-05T19:29:01.443 | 2023-01-05T19:29:01.443 | null | null | 2,372,064 | null |
75,023,512 | 2 | null | 75,017,017 | 1 | null | I don't think bringing RN 3rd dependencies with your library is a good idea because of possible conflicts. Imagine a situation when your lib user will previously have its own version of device-info? With `peerDependencies` you can control which versions are compatible with your library but with particular dependency, you have to force the user you use your version of `device-info`.
For example this library [https://github.com/rodgomesc/vision-camera-code-scanner](https://github.com/rodgomesc/vision-camera-code-scanner) has a dependency to `vision-camera` but it doesn't bring it and only keeps it in `devDependencies`
| null | CC BY-SA 4.0 | null | 2023-01-05T19:34:25.820 | 2023-01-05T19:34:25.820 | null | null | 2,791,142 | null |
75,023,640 | 2 | null | 69,523,996 | 0 | null | If you intend to work with arcpy and Geopandas along with each other, you would need to clone the arcgis environment first and then you'll get able to install the Geopandas on the cloned environment using conda
```
conda install --channel conda-forge geopandas
```



This way you can even use the environment in an IDE to code your project easier.
| null | CC BY-SA 4.0 | null | 2023-01-05T19:49:29.400 | 2023-01-06T19:31:02.897 | 2023-01-06T19:31:02.897 | 2,347,649 | 19,642,643 | null |
75,023,648 | 2 | null | 75,023,548 | 0 | null | Adjusted the range, and referenced the first cell (b2) and it worked
```
=mod(B2,10) = 0
```
[](https://i.stack.imgur.com/LdNtA.png)
| null | CC BY-SA 4.0 | null | 2023-01-05T19:50:06.103 | 2023-01-05T19:50:06.103 | null | null | 7,292,145 | null |
75,023,647 | 2 | null | 75,023,548 | 1 | null | within conditional formatting, the custom formula would be:
```
=REGEXMATCH(TO_TEXT(B2),"0$")
```
[](https://i.stack.imgur.com/pTaAW.png)
| null | CC BY-SA 4.0 | null | 2023-01-05T19:50:05.260 | 2023-01-05T19:50:05.260 | null | null | 5,479,575 | null |
75,023,797 | 2 | null | 75,022,604 | 0 | null | As pointed out in a comment by the asker, the solution turned out to be
```
with todays_data as (
select vcm.cooperativa, vcm.ativo
from sga_bi.veiculos_coop_mensal as vcm
where data = current_date
)
select coop.nome, COALESCE(vcmm.ativo,0)
from sga.cooperativas as coop
left outer join todays_data as vcmm
on coop.nome = vcmm.cooperativa
```
| null | CC BY-SA 4.0 | null | 2023-01-05T20:06:01.747 | 2023-01-05T20:06:01.747 | null | null | 436,560 | null |
75,023,831 | 2 | null | 75,019,255 | 0 | null | check you completed following steps:
- - - - -
| null | CC BY-SA 4.0 | null | 2023-01-05T20:09:48.263 | 2023-01-05T20:09:48.263 | null | null | 7,350,147 | null |
75,024,064 | 2 | null | 75,019,530 | 0 | null | It's a bit tricky with drawing tests in Cypress, would really need to see the HTML and the exact events that are used by the app to follow the mouse.
Even so, it seems you would need to use shift or ctrl to define the endpoints of the "add a line" action
```
cy.contains('Ut enim ad').click({ctrlKey:true})
cy.contains('quis nostrud').click()
```
| null | CC BY-SA 4.0 | null | 2023-01-05T20:34:09.587 | 2023-01-05T20:34:09.587 | null | null | 16,791,505 | null |
75,024,283 | 2 | null | 75,024,209 | 1 | null | Seems like all you're missing is the new column:
```
SELECT FirstName, LastName, ReportsTo, Position, Age,
CASE
WHEN ReportsTo Is Null THEN 'None'
ElSE 'CEO'
END as 'Boss Title'
```
Etc..
| null | CC BY-SA 4.0 | null | 2023-01-05T20:57:22.827 | 2023-01-05T20:57:22.827 | null | null | 4,036,218 | null |
75,024,372 | 2 | null | 75,012,854 | 0 | null | The first thing you need is a way to generate or test routes. I would do that like this. It will successively find all possible routes via backtracking:
```
cities(a,b).
cities(a,c).
cities(b,d).
cities(b,e).
cities(c,f).
cities(e,g).
cities(f,g).
cities(g,d).
cities(h,g).
% ------------------------------------------
%
% route( Origin, Destination, Route)
%
% Does Route connect Origin and Destination?
%
%-------------------------------------------
route( A , B , R ) :- % find route R between A and B by...
route( A , B , [A] , P ) , % - invoke the helper, seeding the list of visited nodes with the origin
reverse(R,P) % - and reversing the path to get the route.
. % Easy!
% -----------------------------------------------------------
%
% route( Origin, Destination, Visited, Path )
%
% Finds the path from Origin to Destination, using Visited to
% detect cycles in the graph, building out the final route
% in reverse order.
% -----------------------------------------------------------
route( A , B , Vs , [B|Vs] ) :- % We can get from A to B if...
cities(A,B) , % - A is directly connected to B, and
not_yet_visited(B,Vs) % - we've not yet visited B
. % otherwise...
route( A , B , Vs , Rs ) :- % we can get from A to B if...
cities(A,C) , % - A is connected to some city C, and
not_yet_visited(C,Vs) , % - we've not yet visited C, and
route(C,B,[C|Vs],Rs) % - C is [recursively] connected to B
. % Easy!
%----------------------------------------------------------
%
% not_yet_visited( Node, Visited )
%
% succeeds if Node is not found in Visited; false otherwise
%
%----------------------------------------------------------
not_yet_visited( X , Xs ) :- \+ memberchk(X,Xs) .
```
Once you have that, then it's a simple matter of using `findall/3`, `bagof/3` or `setof/3` to collect all solutions in a list of lists. Something like:
```
all_routes( A , B , Rs ) :- findall( route(A,B,R), route(A,B,R), Rs ) .
```
| null | CC BY-SA 4.0 | null | 2023-01-05T21:08:57.277 | 2023-01-05T21:08:57.277 | null | null | 467,473 | null |
75,024,787 | 2 | null | 74,971,374 | 0 | null | Here is an example way how you can do it:
```
julia> using DataFrames
julia> df = DataFrame(Height=[32.0, 35.0, 63.0, 84.0, 72.0], Size=[17.0, 46.0, 18.0, 56.0, 6.0])
5×2 DataFrame
Row │ Height Size
│ Float64 Float64
─────┼──────────────────
1 │ 32.0 17.0
2 │ 35.0 46.0
3 │ 63.0 18.0
4 │ 84.0 56.0
5 │ 72.0 6.0
julia> using ShiftedArrays: lag
julia> df.Result_by_row = df.Height .> lag(df.Height)
5-element Vector{Union{Missing, Bool}}:
missing
true
true
true
false
julia> df.Result_by_column = df.Size .> lag(df.Height)
5-element Vector{Union{Missing, Bool}}:
missing
true
false
false
false
julia> df
5×4 DataFrame
Row │ Height Size Result_by_row Result_by_column
│ Float64 Float64 Bool? Bool?
─────┼───────────────────────────────────────────────────
1 │ 32.0 17.0 missing missing
2 │ 35.0 46.0 true true
3 │ 63.0 18.0 true false
4 │ 84.0 56.0 true false
5 │ 72.0 6.0 false false
```
| null | CC BY-SA 4.0 | null | 2023-01-05T21:58:04.647 | 2023-01-05T21:58:04.647 | null | null | 1,269,567 | null |
75,024,873 | 2 | null | 75,023,791 | 1 | null | Try
```
star[n_]:=Graphics[Line[Table[{Cos[t*(n-1)^2/n*Pi],Sin[t*(n-1)^2/n*Pi]},{t,0,n}]]];
star[5]
star[13]
```
Take it apart, look at what just the `Table[...]` gives you. And exactly why does that use `{t,0,n}` instead of `{t,0,n-1}`. And why does it have `(n-1)^2/n` in it, what does that do? Then look up the documentation for `Line[...]` and see what it accepts for input and how the output of `Table[...]` provides that.
Then the challenging part is that you have to reverse engineer my thought process to figure out what I was thinking and how I got to `t*(n-1)^2/n*Pi`. If you believe you understand all this then see if you can rewrite the calculations in a different way and still get the same result. And then can you find a way to make this much simpler and easier to understand exactly what it is doing and exactly why?
| null | CC BY-SA 4.0 | null | 2023-01-05T22:09:22.460 | 2023-01-05T22:30:51.593 | 2023-01-05T22:30:51.593 | 2,797,269 | 2,797,269 | null |
75,025,489 | 2 | null | 75,022,508 | 1 | null | Given this is for a class I advise you to notify your professor that you received assistance from this post on stack overflow. Neglecting to do this would be considered academic dishonestly at most universities.
Second thing is as [David](https://stackoverflow.com/users/328193/david) suggested this is a good opportunity for you to learn how to use a debugger. This is a skill that will be incredibly valuable in your academic career and in a engineering role.
## Your Code
Now looking at your code it does give the solution "4" for the case you presented which is correct. Problem is if you change the inputs the output may not give the correct answer.
This is because your code as written gives the FIRST path it finds and not the SHORTEST path.
Your logic as far as the recursion is sound and based on this code it looks like you understand the basics of recursion. Your problem is a minor logical flaw with how your are masking your data when you call your function recursively.
You should have everything you need to solve this. If you are still having problems please try to use a debugger and examine the area where you make your recursive calls.
## Solution
I advise you to try to figure this out yourself before looking at the spoilers below.
> In the code where you make your recursive calls you mask by setting `drm[i][j] = Integer.MIN_VALUE`. The problem is after each of your recursive calls return you do not set it back to the previous value with `drm[i][j] = temp` before doing the tests for your next recursive call.
What is happening is when you next call `isValidJump()` it will always return `false` because `drm[i][j]` will always be `Integer.MIN_VALUE` after your have made your first recursive call on this iteration.
How to fix:
> Put `drm[i][j] = temp` immediately after each recursive call to `shortestPath()`.
| null | CC BY-SA 4.0 | null | 2023-01-05T23:33:56.387 | 2023-01-05T23:33:56.387 | null | null | 11,683,534 | null |
75,025,530 | 2 | null | 75,002,607 | 0 | null | in the screenshot, you have `timeperiod` with a lower case p, but in the cost management [API docs for /query](https://learn.microsoft.com/en-us/rest/api/cost-management/query/usage?tabs=HTTP#request-body) it shows it being `timePeriod` with a capital P. its strange that the docs don't explicitly state what the of the string should be?
by default workbooks would format that as JSON dates, but you might need to use `{TimeRange:startISO}` or `{TimeRange:startUnix} or something if it is expecting some other format?
| null | CC BY-SA 4.0 | null | 2023-01-05T23:38:58.713 | 2023-01-05T23:38:58.713 | null | null | 13,687 | null |
75,025,589 | 2 | null | 75,020,738 | 1 | null | You might consider below as well.
```
WITH sample_table AS (
SELECT 123 id_invoice, 5000 amount, DATE '2022-01-01' start, DATE '2022-10-31' `end`
)
SELECT id_invoice,
amount / (DATE_DIFF(`end`, start, MONTH) + 1) AS amount,
start_of_month AS start,
LAST_DAY(start_of_month) AS `end`
FROM sample_table, UNNEST(GENERATE_DATE_ARRAY(start, `end`, INTERVAL 1 MONTH)) start_of_month;
```
| null | CC BY-SA 4.0 | null | 2023-01-05T23:49:58.893 | 2023-01-05T23:49:58.893 | null | null | 19,039,920 | null |
75,025,607 | 2 | null | 75,015,263 | 0 | null | > I understand that ALB allows only ports 80 & 423,
That is incorrect, you can select any port on the ALB as indicated by [the documentation](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-listeners.html)
Listeners support the following protocols and ports:
Protocols: HTTP, HTTPS
Ports: 1-65535
| null | CC BY-SA 4.0 | null | 2023-01-05T23:53:03.010 | 2023-01-05T23:53:03.010 | null | null | 92,837 | null |
75,025,688 | 2 | null | 30,145,404 | 0 | null | While in the standard pentomino , each piece must be used exactly once ; Knuth in [https://arxiv.org/pdf/cs/0011047.pdf](https://arxiv.org/pdf/cs/0011047.pdf) mentions (for a grid of 8x8 minus 4 cells at the center, which would be true for a standard grid of 60 cells):
> [...] Imagine a matrix that has 72 columns, one for each of the 12 pentominoes and one for each of the 60 cells [...].
... and this is because we're looking at an of 60 positions in the grid space, plus 12 positions in the pentomino name space.
But in your problem, the same piece may be used several times.
In this case, you don't need to add "columns" to express the need of covering the universe of pentominoes: in your 5x4 grid configuration, you need 20 columns. So you don't need the extra W column full of 1s you showed in your drawing (or the problem is infeasible).
A cursory look at your other columns didn't shock. But you should generate this stuff programmatically.
Then, given your 5x4 grid configuration, you will need to have a number of rows corresponding to the number of fixed pentomino variants at their possible positions (which typically comes up to 376 rows, or less if you want to consider symmetries of the board).
I set my row names to `{pentomino-name}/{pentomino-variant}@{pentomino-origin-x},{pentomino-origin-y}`.
The code you provide is missing construction of the matrix of 1s, the 2D array of Nodes and its toroidal links according to the matrix of 1s, the column headers, and a way of printing your solutions.
| null | CC BY-SA 4.0 | null | 2023-01-06T00:09:01.070 | 2023-01-06T00:09:01.070 | null | null | 974,730 | null |
75,026,187 | 2 | null | 75,000,032 | 3 | null | It appears that pygame's SVG loading library (nanosvg) can't handle that SVG.
I found a workaround using cairosvg to convert the SVG to a PNG and then using pygame to load that.
I made a new `get_board_image` function that returns a surface directly
```
def get_board_img(brd):
svg = chess.svg.board(board=brd)
png_io = io.BytesIO()
cairosvg.svg2png(bytestring=bytes(svg, "utf8"), write_to=png_io)
png_io.seek(0)
surf = pg.image.load(png_io, "png")
return surf
```
It uses cairosvg to get the svg bytes into a png BytesIO object that pygame can load.
^ To get that snippet working in your code you need to add the imports for `io` and `cairosvg` (and install cairosvg) ofc, as well as changing your main loop a bit:
```
while run:
clock.tick(FPS)
for event in pg.event.get():
if event.type == pg.QUIT:
run = False
WINDOW.blit(get_board_img(board),(0,0))
pg.display.update()
```
| null | CC BY-SA 4.0 | null | 2023-01-06T01:56:19.343 | 2023-01-06T01:56:19.343 | null | null | 13,816,541 | null |
75,026,493 | 2 | null | 75,026,492 | 0 | null | I tried the web_scraper package and it solved the problem.
add web_scraper to dependencies .
Checking the website and getting the pattern of placing the desired information on the website. in my case
for "Titles" , pattern is :
```
'div.e > small'
```
for "Subtitle" , pattern is :
```
'div.e > strong'
```
I created an object of the Webscraper class and defined it by setting the value of the website URL.
In my case , I don't need urlPath and set it empty .
```
final String urlPath = '';
```
In my case , Attributes always null and I don't need them.
```
final List<String> attributeList = [''];
```
I define one method and call them in initState , for get values from website .
```
void fetchData() async {
if (await webScraper.loadWebPage(urlPath)) {
setState(() {
webScrapeResultTitle =
webScraper.getElement(innerAddressTitle, attributeList);
webScrapeResultDescription =
webScraper.getElement(innerAddressDescription, attributeList);
///TODO: By review this prints , I detect structure of recievied data .
// print("webScrapeResultTitle::::${webScrapeResultTitle!.toList()}");
// print(
// "webScrapeResultDescription::::${webScrapeResultDescription!.toList()}");
});
}
}
```
set build method like below for show results .
```
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: webScrapeResultTitle == null || webScrapeResultDescription == null
? Center(
child: LoadingWidget(),
)
: ListView.builder(
itemCount: webScrapeResultDescription!.length,
itemBuilder: (BuildContext context, int index) {
return IpInfoItem(
titleResult: webScrapeResultTitle![index][titleResultKey],
descriptionResult: webScrapeResultDescription![index]
[descriptionResultKey]);
}),
);
}
}
```

Gist full Snippets: [Gist.Github.com](https://gist.github.com/esmaeil-ahmadipour/ed69de5e7f19dfb9ae87bd79c8012008)
Repository : [Github.com](https://github.com/esmaeil-ahmadipour/Flutter_Web_Scraper)
| null | CC BY-SA 4.0 | null | 2023-01-06T02:53:05.957 | 2023-01-06T02:53:05.957 | null | null | 9,854,260 | null |
75,027,529 | 2 | null | 75,027,528 | 1 | null | To replace the navigationTitle with your own (presumably) non-text code:
1. Hide the navigationTitle by setting it to an empty string.
2. Add your own toolbar elements there with the navigation placement.
---
For example, this code...
```
struct ContentView: View {
var body: some View {
Text("ABC")
.navigationTitle("")
.toolbar {
ToolbarItem(placement: .navigation) {
Text("This is my own text!")
}
}
}
}
```
...achieves this result:

| null | CC BY-SA 4.0 | null | 2023-01-06T06:08:21.183 | 2023-01-06T06:08:21.183 | null | null | 9,111,901 | null |
75,027,592 | 2 | null | 75,027,565 | 1 | null | You can use a package like `audio_waveforms` in flutter.
[https://pub.dev/packages/audio_waveforms](https://pub.dev/packages/audio_waveforms)
I haven't tested it. Although it looks like it can do the job.
| null | CC BY-SA 4.0 | null | 2023-01-06T06:17:56.423 | 2023-01-06T06:17:56.423 | null | null | 13,601,941 | null |
75,028,041 | 2 | null | 75,027,284 | 0 | null | Your problem comes from `to_char(p.date_of_sale, 'yyyy "-week" iw')` where
`iw` = week number of ISO 8601 week-numbering year (01–53; the first Thursday of the year is in week 1)
whereas `yyyy` = the year on 4 digits (not the ISO8601 year)
These two parameters are sometimes not consistent for instance for 2023 January the 1st :
```
SELECT to_char('20230101' :: date, 'yyyy') => 2023
SELECT to_char('20230101' :: date, 'iw') => 52
```
If you want to be consistent, you can either :
```
select to_char('20230101' :: date, 'YYYY"-week" w') => 2023-week 1
```
or
```
select to_char('20230101' :: date, 'IYYY"-week" iw') => 2022-week 52 (ISO8601 year and week)
```
see [dbfiddle](https://dbfiddle.uk/y6MlAoBy)
| null | CC BY-SA 4.0 | null | 2023-01-06T07:20:53.130 | 2023-01-06T07:20:53.130 | null | null | 8,060,017 | null |
75,028,105 | 2 | null | 75,028,002 | 0 | null | It's look like your `editUser()` doesn't found `controls` property, So that's why you are getting this error.
Your `editUser()` function should look like below:
```
editUser(data: any) {
this.userValue.controls.name.setValue(this.userInfo?.name);
this.userValue.controls.email.setValue(this.userInfo?.email);
this.userValue.controls.phone.setValue(this.userInfo?.phone);
this.userModelObj.id = this.userInfo.id;
this.showUpdate();
}
```
| null | CC BY-SA 4.0 | null | 2023-01-06T07:29:48.863 | 2023-01-06T08:17:42.553 | 2023-01-06T08:17:42.553 | 1,355,344 | 1,355,344 | null |
75,028,163 | 2 | null | 75,026,092 | 0 | null | Divide the mesh into an X, so the existing four corners and the middle, and then color each wedge (North, East, South, and West) based on neighbor matching. If neighbors on two adjacent sides share a type (like North and East are both grass) then those corresponding wedges get the same texture as the neighbor.
Right now everything looks pixelated because you're drawing everything as squares.
You could make some transitional textures to apply in the wedges to look really good, and then those would only matter based on individual neighbors.
| null | CC BY-SA 4.0 | null | 2023-01-06T07:36:59.647 | 2023-01-06T07:36:59.647 | null | null | 5,171,120 | null |
75,028,203 | 2 | null | 75,028,100 | 0 | null | I have tested your program in Jupyter Notebook and the code is working just fine. Maybe you check for any typos. Hope this help
[Code snippet run on jupyter notebook](https://i.stack.imgur.com/k7o5V.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T07:42:25.103 | 2023-01-06T07:42:25.103 | null | null | 20,942,728 | null |
75,028,212 | 2 | null | 75,027,439 | 1 | null | The "self-extracting" jar contains a main method, so you should be able to just run that JAR file with the "java -jar " command from the command line or double click on it. When it runs, it will extract the STS installation on its own, so there is no need or reason to extract the JAR file manually.
If executing the JAR file via "java -jar ..." doesn't work (you mentioned an error message), then it looks to me like a problem with either the downloaded JAR file or some permissions issue.
There is also another way to get the distribution on your machine if the self-extracting JAR file doesn't work. You can go to [https://github.com/spring-projects/sts4/wiki/Previous-Versions](https://github.com/spring-projects/sts4/wiki/Previous-Versions) and download the ZIP file instead of the self-extracting JAR file. But you need to make sure that you extract the ZIP file using a tool like 7zip or so that is capable of extracting ZIP files with entries with very long paths in it. The default built-in unzip of Windows might fail to extract everything into the right place.
| null | CC BY-SA 4.0 | null | 2023-01-06T07:43:32.520 | 2023-01-06T07:43:32.520 | null | null | 1,854,124 | null |
75,028,291 | 2 | null | 75,028,100 | 0 | null | Yup I can run your code perfectly too. Please try to simplify it like below.
It looks better too.
```
my_dict = {'x':500, 'y':5874, 'z': 560}
key_max = max(my_dict, key = my_dict.get)
key_min = min(my_dict, key = my_dict.get)
print('Maximum Value: ',my_dict[key_max])
print('Minimum Value: ',my_dict[key_min])
```
| null | CC BY-SA 4.0 | null | 2023-01-06T07:50:53.517 | 2023-01-06T07:50:53.517 | null | null | 12,128,167 | null |
75,028,524 | 2 | null | 75,028,288 | 0 | null | As said by @Skin, sharepoint connector is available in Consumption Plan but if you are required to use standard plan make sure while searching you navigate to `Azure` tab where you can find the missing connector.

| null | CC BY-SA 4.0 | null | 2023-01-06T08:21:58.637 | 2023-01-06T08:21:58.637 | null | null | 15,969,981 | null |
75,028,532 | 2 | null | 74,996,557 | 0 | null | Since you are using the classic build pipeline, you can call the [build definition REST API](https://learn.microsoft.com/en-us/rest/api/azure/devops/build/definitions/get?view=azure-devops-rest-7.0) to get the task steps names and then set the task names as pipeline variables using [logging commands - SetVariable](https://learn.microsoft.com/en-us/azure/devops/pipelines/scripts/logging-commands?view=azure-devops&tabs=bash#setvariable-initialize-or-modify-the-value-of-a-variable). After that you can use the defined variables in the subsequent tasks in pipeline.
To do that by following below steps:
1.Enable the option "`Allow scripts to access OAuth token`" in Agent job. (Reference the following screenshot for the task steps involved in this sample)
[](https://i.stack.imgur.com/9b6kD.png)
2.Add a PowerShell task to set task step variables by running the
following script: (In this sample we defined the variable `taskcount` and `TaskStep$i`)
```
$url = "$($env:SYSTEM_TEAMFOUNDATIONCOLLECTIONURI)$env:SYSTEM_TEAMPROJECTID/_apis/build/definitions/$env:SYSTEM_DEFINITIONID"
$result= Invoke-RestMethod -Uri $url -Headers @{Authorization = "Bearer $env:SYSTEM_ACCESSTOKEN"}`
$tasks = $result.process.phases.steps.displayName
$count = $tasks.count
# Set task count variable
Write-Host "##vso[task.setvariable variable=taskcount]$count"
# Set task step variables
For($i=0;$i -lt $tasks.Length; $i++) {
Write-host $($tasks[$i])
Write-Host ("##vso[task.setvariable variable=TaskStep$i]$($tasks[$i])")
}
```
[](https://i.stack.imgur.com/2bVKm.png)
3.Add another PowerShell task and run below command to check the
defined `TaskStep` variables:
```
gci env:* | Where-Object Name -like TaskStep* | sort-object name
```
[](https://i.stack.imgur.com/nY7Ty.png)
[](https://i.stack.imgur.com/SEkCR.png)
4.Use the variables in the subsequent tasks in pipeline. Print variable value for example using PowerShell task:
```
Write-Host "TaskCount:" $(taskcount)
Write-Host "TaskStep0:" $(TASKSTEP0)
Write-Host "TaskStep1:" $(TASKSTEP1)
Write-Host "TaskStep2:" $(TASKSTEP2)
Write-Host "TaskStep3:" $(TaskStep3)
Write-Host "TaskStep4:" $(TaskStep4)
Write-Host "TaskStep5:" $(TaskStep5)
Write-Host "TaskStep6:" $(TaskStep6)
Write-Host "TaskStep7:" $(TaskStep7)
Write-Host "TaskStep8:" $(TaskStep8)
```
[](https://i.stack.imgur.com/WKXbm.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T08:22:26.963 | 2023-01-06T08:22:26.963 | null | null | 7,466,674 | null |
75,028,620 | 2 | null | 75,027,386 | 0 | null | It is highly recommended that you put the codes in text format instead of image so better readability.
I noticed that the issue you are facing is likely due to typo.
`//*[@id='pack-container'']/li[1]/div[2]/button[1]`
You have an additional apostrophe / single quote in the ID. It should be
`//*[@id='pack-container']/li[1]/div[2]/button[1]`
| null | CC BY-SA 4.0 | null | 2023-01-06T08:35:01.887 | 2023-01-06T08:35:01.887 | null | null | 7,738,453 | null |
75,028,818 | 2 | null | 75,005,767 | 0 | null | In your app level Gradle you might be using mavenCentral().
You need to add jcenter() as well in that.
For older plugins you need jcenter.
See this code of the library to make the required changes
[https://github.com/ashik94vc/ElegantNumberButton/blob/master/build.gradle](https://github.com/ashik94vc/ElegantNumberButton/blob/master/build.gradle)
| null | CC BY-SA 4.0 | null | 2023-01-06T08:58:25.487 | 2023-01-06T08:58:25.487 | null | null | 6,060,388 | null |
75,028,843 | 2 | null | 75,013,467 | 0 | null | I ended up merging these two events and separated the colors by using linear-gradient.
| null | CC BY-SA 4.0 | null | 2023-01-06T09:01:04.600 | 2023-01-06T09:01:04.600 | null | null | 20,932,773 | null |
75,029,002 | 2 | null | 75,028,914 | 1 | null | Try below code and use alignment inside Container hope its help to you
```
AppBar(
title: Text('Home'),
actions: [
SizedBox(
width: 20.0,
height: 20.0,
child: Align(
alignment: Alignment.center,
child: Container(
alignment: Alignment.center,
width: 20.0,
height: 20.0,
color: Colors.red,
child: const Text('HI'),
),
),
),
const Icon(Icons.person),
const Icon(Icons.notifications),
],
),
```
Result-> [](https://i.stack.imgur.com/1k1EK.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T09:20:04.723 | 2023-01-06T12:43:12.867 | 2023-01-06T12:43:12.867 | 13,997,210 | 13,997,210 | null |
75,029,248 | 2 | null | 75,016,987 | 1 | null | You need to have `wget` installed in order to use it. Relying on external command might cause issues like one that you have encountered. If you want your code to be portable, then avoid relying on such command if possible.
Python standard library has function [urllib.request.urlretrieve](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlretrieve) which will download file for you and is easy to use, consider following simple example
```
from urllib.request import urlretrieve
urlretrieve("https://www.example.com","example.html")
```
which does download [Example Domain](http://example.com/) page and save it as `example.html` in current working directory
| null | CC BY-SA 4.0 | null | 2023-01-06T09:41:35.847 | 2023-01-06T09:41:35.847 | null | null | 10,785,975 | null |
75,029,299 | 2 | null | 75,026,438 | 1 | null | Your biggest challenge here is rearranging your data into an appropriate format for plotting. Essentially, you should get all your data in a single data frame, with all the grades in a single column, and have a second column indicating which data set the grades came from. Then you can group the data according to this second column and count the number of each grade. This then allows easy plotting:
```
library(tidyverse)
list(Houston_2020 = Houston_2020_sub,
Minneapolis_2020 = Minneapolis_2020_sub,
Houston_1990 = Houston_1990_sub,
Minneapolis_1990 = Minneapolis_1990_sub) %>%
lapply(function(x) setNames(x, 'grade')) %>%
{do.call(bind_rows, c(., .id = 'group'))} %>%
mutate(grade = factor(grade)) %>%
group_by(group) %>%
count(grade, .drop = FALSE) %>%
ggplot(aes(grade, n, colour = group, group = group)) +
geom_line() +
geom_point(color = 'black') +
facet_grid(group~.)
```
[](https://i.stack.imgur.com/eWY3A.png)
If you want all the lines on the same panel, just get rid of that final `facet_grid` line. It looks messy without this at present because your numbers are so small.
---
```
Houston_2020_sub <- data.frame(houston_grade2020 = c(NA, NA, 'B', 'A',
NA, 'C', 'D'))
Minneapolis_2020_sub <- data.frame(minneapolis_grade2020 = c('A', NA, NA, "B",
"C", "C", "D"))
Houston_1990_sub <- data.frame(houston_grade1990 = c('B', 'B', 'B', 'A', 'A',
'C', 'D'))
Minneapolis_1990_sub <- data.frame(minneapolis_grade1990 = c('B', 'A', NA, 'A',
NA, NA, 'D'))
```
| null | CC BY-SA 4.0 | null | 2023-01-06T09:45:57.233 | 2023-01-06T09:45:57.233 | null | null | 12,500,315 | null |
75,029,336 | 2 | null | 75,029,170 | 0 | null | AFAIK, your param name in query and method have to be same, so change the method parameter from tagString to tags.
| null | CC BY-SA 4.0 | null | 2023-01-06T09:50:08.173 | 2023-01-06T09:50:08.173 | null | null | 9,988,199 | null |
75,029,551 | 2 | null | 75,026,676 | 1 | null | I did some tests and eventually when trying unicode characters with Google Chrome I realized that this issue has nothing to do with tkinter or Python. It seems to be a larger problem with unicode characters in general. Here is what happens if you play around with the following unicode characters (⏮▶▶) in google chrome search bar.
[](https://i.stack.imgur.com/J019Y.png)
Edit:
As Mike 'Pomax' Kamermans pointed out, this problem does not appear when using a font that supports all unicode characters that are used. For example GNU Unifont, [http://unifoundry.com/unifont/](http://unifoundry.com/unifont/), supports the unicode characters mentioned in the question and the shape for those characters are always the same when using that font.
The most probable reason this happens is depending on which unicode character is first used then different fallback fonts are used and therefore the shape may differ.
| null | CC BY-SA 4.0 | null | 2023-01-06T10:10:54.893 | 2023-01-12T05:22:41.207 | 2023-01-12T05:22:41.207 | 4,332,183 | 4,332,183 | null |
75,030,011 | 2 | null | 74,937,233 | 0 | null | The issue on Google Search Console can happen for several issues. I strongly suggest you to visit the below URL to see if that resolves this issue for you:
[https://rankmath.com/kb/couldnt-fetch-error-google-search-console/](https://rankmath.com/kb/couldnt-fetch-error-google-search-console/)
For `noindex' detected in 'X-Robots-Tag' http header` you're seeing on URL Inspection tool is logically correct and you shouldn't be bothered in this case as the sitemap URL(s) are set to `noindex` intentionally. This is because the sitemap URLs are not built to be indexed on Google or shown on SERPs, rather, they should be used as a backup mechanism to tell Google to crawl your site URLs. Thus, you should ignore that error on the URL Inspection Tool.
Please be aware that you should not submit your sitemap URLs to the URL Inspection tool, but rather to the sitemap section of Google Search Console.
| null | CC BY-SA 4.0 | null | 2023-01-06T10:53:36.983 | 2023-01-06T10:53:36.983 | null | null | 9,243,652 | null |
75,030,084 | 2 | null | 74,929,542 | 0 | null | Finally i get to know that the error was for key store so I removed all the steps that was done to create build and finally it started normally
| null | CC BY-SA 4.0 | null | 2023-01-06T11:00:42.180 | 2023-01-06T11:00:42.180 | null | null | 18,972,705 | null |
75,030,505 | 2 | null | 75,030,081 | 0 | null | try adding it after a comma,
```
=> 'start_date, start_time',
```
| null | CC BY-SA 4.0 | null | 2023-01-06T11:45:18.850 | 2023-01-06T11:45:18.850 | null | null | 19,223,128 | null |
75,030,568 | 2 | null | 75,030,436 | 0 | null | Just from the name, without knowing exactly, where `filteredButtonList` comes from, it looks to me that you call this function too early. Accessing DOM elements should take place when everything is actually in the DOM. Try moving the call into `beforeMount()` or even `mounted()`. [https://vuejs.org/guide/essentials/lifecycle.html](https://vuejs.org/guide/essentials/lifecycle.html)
| null | CC BY-SA 4.0 | null | 2023-01-06T11:50:37.087 | 2023-01-06T11:50:37.087 | null | null | 20,775,391 | null |
75,030,824 | 2 | null | 75,027,386 | 0 | null | ```
driver.find_element_by_xpath(
"//*[@id='pack-container']/li[1]/div[2]/button[1]").click()
```
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='pack-container']/li[1]/div[2]/button[1]"}
(Session info: chrome=108.0.5359.125)
| null | CC BY-SA 4.0 | null | 2023-01-06T12:15:21.483 | 2023-01-06T12:15:21.483 | null | null | 15,596,341 | null |
75,030,978 | 2 | null | 71,555,593 | 0 | null | I was having this issue and tried everything and nothing was working.
Then i realised that the `pubspec.yaml` was not there. So i restored it with git and poof everything was working again.
It was deleted (but not committed) and restored I it with `git checkout HEAD pubspec.yaml` in my case
| null | CC BY-SA 4.0 | null | 2023-01-06T12:30:57.863 | 2023-01-06T12:30:57.863 | null | null | 1,842,694 | null |
75,031,036 | 2 | null | 75,020,799 | 1 | null | I created three Reality Composer actions for box scene: they are `Play Sound`, `Spin` and [Notify](https://stackoverflow.com/questions/71115018/receiving-xcode-notification-on-reality-composer-animation-end). As you can see is turned ON.
[](https://i.stack.imgur.com/Xp7C2.png)
## SwiftUI
My code is as simple as that. Primary `stop()` methods are for immediate stop of audio and animation. Secondary `stop()` methods are the content of completion handler for `onAction` property.
```
import SwiftUI
import RealityKit
struct ContentView : View {
@State var completion: ((Entity?) -> ()) = { _ in }
@State var arView = ARView(frame: .zero)
@State var boxScene = try! Experience.loadBox()
var body: some View {
ZStack {
ARViewContainer(arView: $arView, boxScene: $boxScene)
.ignoresSafeArea()
VStack {
Button("Stop") {
boxScene.steelBox?.stopAllAudio() // 1
boxScene.steelBox?.stopAllAnimations() // 1
print("Actions are stopped.")
completion = {
$0?.stopAllAudio() // 2
$0?.stopAllAnimations() // 2
$0?.scale = [1,15,1]
print("Both actions were completely stopped.")
}
boxScene.actions.occured.onAction = completion
}
Spacer()
}
}
}
}
```
And here's an ordinary binding.
```
struct ARViewContainer : UIViewRepresentable {
@Binding var arView: ARView
@Binding var boxScene: Experience.Box
func makeUIView(context: Context) -> ARView {
arView.scene.anchors.append(boxScene)
return arView
}
func updateUIView(_ view: ARView, context: Context) { }
}
```
Note that `Notify` action is the last one in the sequence. After what time the secondary `stop()` methods will be applied (I mean the content of the completion handler), depends on the duration of the audio file or animation (my audio's duration is 14 sec).
[](https://i.stack.imgur.com/Xp7C2.png)
## UIKit
UIKit solution is somehow different and slightly simpler.
```
import UIKit
import RealityKit
class ViewController : UIViewController {
@IBOutlet var arView: ARView!
let boxScene = try! Experience.loadBox()
var completion: ((Entity?) -> Void)? = { _ in }
override func viewDidLoad() {
super.viewDidLoad()
let rect = CGRect(x: 50, y: 50, width: 100, height: 50)
let stopButton = UIButton(frame: rect)
stopButton.setTitle("Stop", for: .normal)
stopButton.addTarget(self,
action: #selector(stopPlayingAudioAndAnime),
for: .touchUpInside)
arView.addSubview(stopButton)
arView.scene.anchors.append(boxScene)
}
@objc private func stopPlayingAudioAndAnime() {
boxScene.steelBox?.stopAllAudio() // 1
boxScene.steelBox?.stopAllAnimations() // 1
completion = { entity in
entity?.stopAllAudio() // 2
entity?.stopAllAnimations() // 2
print("Completely Stopped")
}
boxScene.actions.occured.onAction = completion
}
}
```
## P. S.
However, if you'll be using `Play Music` action (in other words, on the scene basis, not on the object basis, like `Play Sound` action), you can implement your idea this way:
```
arView.scene.anchors[0].children[0].stopAllAudio()
completion = { entity in
entity?.scene?.anchors[0].children[0].stopAllAudio()
}
```
| null | CC BY-SA 4.0 | null | 2023-01-06T12:37:31.267 | 2023-01-06T15:42:11.460 | 2023-01-06T15:42:11.460 | 6,599,590 | 6,599,590 | null |
75,031,146 | 2 | null | 74,453,154 | 0 | null | AWS IoT Core now supports decoding protocol buffer directly within AWS IoT Rule Engine. Please have a look at the announcement here: [https://aws.amazon.com/about-aws/whats-new/2022/12/aws-iot-core-rules-engine-google-protocol-buffer-messaging-format/](https://aws.amazon.com/about-aws/whats-new/2022/12/aws-iot-core-rules-engine-google-protocol-buffer-messaging-format/)
| null | CC BY-SA 4.0 | null | 2023-01-06T12:49:04.717 | 2023-01-06T12:49:04.717 | null | null | 19,408,037 | null |
75,031,286 | 2 | null | 75,031,058 | 1 | null | I suggest you to do one plot per line and put them into a plt subplot:
```
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
d = {'jan': [44, 2, 3, 4], 'feb': [33, 4, 6, 8], 'mar': [50, 10, 15, 20], 'abr': [11, 12, 13, 14], 'mai': [3, 40, 6, 60], 'jun': [40, 8, 12, 16]}
idx = ['A', 'B', 'C', 'D']
df = pd.DataFrame(d, index = idx)
cm = ['Blues', 'Reds', 'Greens', 'Purples']
f, axs = plt.subplots(4, 1, gridspec_kw={'hspace': 0})
counter = 0
for index, row in df.iterrows():
sns.heatmap(np.array([row.values]), yticklabels=[idx[counter]], xticklabels=df.columns, annot=True, fmt='.2f', ax=axs[counter], cmap=cm[counter], cbar=False)
counter += 1
plt.show()
```
[](https://i.stack.imgur.com/SsPXy.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T13:02:47.723 | 2023-01-06T13:09:08.597 | 2023-01-06T13:09:08.597 | 19,931,710 | 19,931,710 | null |
75,031,412 | 2 | null | 75,030,880 | 0 | null | You need to try below:
```
function payWithCard(stripe: any, card: any, clientSecret: any,step:any) {
return stripe.confirmCardPayment(clientSecret, {
payment_method: { card: card, billing_details: { name: bookingForm.value.Card_name, address: { postal_code: bookingForm.value.PostCodePayment } } },
}).then(function (result: any) {
if (result.error) {
showError(result.error.message);
} else {
orderComplete(result.paymentIntent.id);
step = 3;
}
this.tnk = step;
});
};
payWithCard(GetStripeValue, getCardValue, getSplicedData,a);
console.log(this.tnk);
```
| null | CC BY-SA 4.0 | null | 2023-01-06T13:13:39.253 | 2023-01-06T13:13:39.253 | null | null | 1,355,344 | null |
75,031,554 | 2 | null | 75,015,407 | 0 | null | There is no way to hide 3-dots menu in Teams mobile custom app.
If you wish you can suggest this feature here:
[Microsoft Teams Community](https://feedbackportal.microsoft.com/feedback/forum/ad198462-1c1c-ec11-b6e7-0022481f8472)
| null | CC BY-SA 4.0 | null | 2023-01-06T13:26:48.067 | 2023-01-06T13:26:48.067 | null | null | 17,139,956 | null |
75,032,011 | 2 | null | 74,890,082 | 0 | null | After some research, I couldn't find a direct way for selecting text from separate textViews.
But there may be a workaround:
1. The long-click gesture (which starts the text selection) is listened with a UILongPressGestureRecognizer and the beginning of the selected text is defined by this way.
2. The word at the point of tap is highlighted via NSAttributedString.
3. Two UIImageViews with cursor images are added as subviews and settled at the beginning and end points of highlighted text.
4. TapRecognizers are added to the both cursor views.
5. When a cursor view is tapped and dragged, the highlighted text is renewed accordingly.
This method is probably an expensive way, but it may offer an idea for the future.
| null | CC BY-SA 4.0 | null | 2023-01-06T14:10:27.163 | 2023-01-06T14:10:27.163 | null | null | 17,454,384 | null |
75,032,058 | 2 | null | 75,024,174 | 1 | null | Try changing the "Line Number (Current)" property in the same window (Tools → Options → Environment → Fonts and Colors):
[](https://i.stack.imgur.com/R210U.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T14:14:58.623 | 2023-01-06T14:14:58.623 | null | null | 6,530,134 | null |
75,032,653 | 2 | null | 75,032,343 | 0 | null | `ListTile` provides `onTap` method, you can use it.
```
return ListTile(
onTap: () {
},
iconColor: Colors.white,
```
More about [ListTile](https://api.flutter.dev/flutter/material/ListTile-class.html)
| null | CC BY-SA 4.0 | null | 2023-01-06T15:06:35.993 | 2023-01-06T15:06:35.993 | null | null | 10,157,127 | null |
75,032,776 | 2 | null | 75,027,543 | 0 | null | When you call `PostAsync`, Firebase creates a new child node with its own unique ID for that data. The IDs always have the form that you see in your first screenshot, and there's no way to change that.
To specify your own ID, generate that ID in your client-side application code, pass it to the API as an additional `Child()` call, and use `Put` instead of `Post`. For example:
```
firebaseClient.Child(nameof(CUSTOMER)).Child("4815").PutAsync(JsonConvert.SerializeObject(customer));
```
If the number you want to use is based on the existing keys in the database, you'll need to use a transaction to perform the necessary read-then-write sequence.
---
Since you're considering using numeric keys, I recommend checking out [Best Practices: Arrays in Firebase](https://firebase.googleblog.com/2014/04/best-practices-arrays-in-firebase.html).
| null | CC BY-SA 4.0 | null | 2023-01-06T15:18:30.323 | 2023-01-06T15:18:30.323 | null | null | 209,103 | null |
75,032,793 | 2 | null | 75,032,525 | 0 | null | There are many options, for example:
```
=
SUMX(
VALUES( 'Table'[Month] ),
CALCULATE(
MIN( 'Table'[Price] )
)
)
```
| null | CC BY-SA 4.0 | null | 2023-01-06T15:19:36.343 | 2023-01-06T15:19:36.343 | null | null | 17,007,704 | null |
75,032,845 | 2 | null | 75,032,762 | 2 | null | If you don't care about the order, you can push the results into another array:
```
let allResults = [];
for (let i=1; i<=150;i++){
fetch(`A valid URL ${i}`)
.then(result => result.json())
.then(result =>
allResults.push(...result.data.results))
}
```
However, you'd need to wait until all the `fetch` requests are finished, which you can do using async/await and Promise.all:
```
let allResults = [];
const promises = []
for (let i=1; i<=150;i++){
promises.push(fetch(`A valid URL ${i}`)
.then(result => result.json())
.then(result =>
allResults.push(...result.data.results)))
}
await Promise.all(promises)
```
If you do care about the order, then you need to return an array from the fetch request like so:
```
const promises = []
for (let i=1; i<=150;i++){
promises.push(fetch(`A valid URL ${i}`)
.then(result => result.json())
.then(result => result.data.results))
}
const allResults = (await Promise.all(promises)).flat()
```
| null | CC BY-SA 4.0 | null | 2023-01-06T15:23:49.510 | 2023-01-06T15:23:49.510 | null | null | 19,461,620 | null |
75,032,871 | 2 | null | 75,032,762 | -1 | null | You can do it in one line like this:
```
const items = Promise.all([...Array(150).keys()].map(i => fetch(`A valid URL ${i}`))).flat()
```
| null | CC BY-SA 4.0 | null | 2023-01-06T15:25:48.147 | 2023-01-06T15:25:48.147 | null | null | 5,089,567 | null |
75,033,154 | 2 | null | 75,030,355 | 0 | null | You're using a class variable. If you need the variable C for each object to have its own value, you should use this:
```
class a:
def __init__(self):
self.c = {} # create instance variable
def addC(self, key, error):
self.c[key] = error
...
```
| null | CC BY-SA 4.0 | null | 2023-01-06T15:51:30.823 | 2023-01-06T15:51:30.823 | null | null | 19,932,266 | null |
75,033,169 | 2 | null | 71,696,035 | 0 | null | [](https://i.stack.imgur.com/ZY7XZ.png)
You want to change the `xmin` and `ymin` properties of the axis.
Note the the function is almost invisible near the origin.
```
import numpy as np
import matplotlib.pyplot as plt
# oh yes, y is quite flat about the origin
t = np.linspace(0, 1.57, 158)
y = t**5*np.cos(t)
fig, ax = plt.subplots(layout='constrained')
# change the colors of the graph and of the figure
fig.set_facecolor('k')
ax.set_facecolor('C3')
# change the colors of the text elements
plt.rc('axes', labelcolor='w')
plt.rc('xtick', color='w')
plt.rc('ytick', color='w')
plt.rc('text', color='w')
# plot y and label it properly
ax.plot(t, y, color='xkcd:pink', lw=2)
plt.xlabel('X', size='xx-large')
plt.ylabel('Y', size='x-large')
plt.title('As You Like It', color='xkcd:pink', size='xx-large')
###############################################################
# remove the despised space ###################################
plt.axis(xmin=0, ymin=0) ######################################
###############################################################
plt.show()
```
I'd suggest to remove `plt.axis(...)` and use `plt.grid(1)`, obtaining the figure below.
[](https://i.stack.imgur.com/OT84s.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T15:53:14.153 | 2023-01-06T16:09:08.083 | 2023-01-06T16:09:08.083 | 2,749,397 | 2,749,397 | null |
75,033,224 | 2 | null | 71,962,876 | 0 | null | I don't think I entirely understand your question, but it looks like you're using vue, in which case it's recommended to use `eslint-plugin-prettier-vue` ([https://www.npmjs.com/package/eslint-plugin-prettier-vue](https://www.npmjs.com/package/eslint-plugin-prettier-vue)), which might format the inline JavaScript in your HTML better.
Also, in your specific example, it looks like you have either an extra or missing `"` character; this code should format properly:
```
@update:value="
search.page = 1
getPigFileList()
actions=['confirm']" // not actions="['confirm']"
```
| null | CC BY-SA 4.0 | null | 2023-01-06T15:57:34.543 | 2023-01-06T15:57:34.543 | null | null | 19,461,620 | null |
75,033,222 | 2 | null | 75,032,348 | 0 | null | You could use [net.IP](https://pkg.go.dev/net#IP.String) rather than `netip.Addr`, as per the docs:
[Addr.String()](https://pkg.go.dev/net#IP.String):
> Note that unlike package net's IP.String method, IPv4-mapped IPv6 addresses format with a "::ffff:" prefix before the dotted quad.
| null | CC BY-SA 4.0 | null | 2023-01-06T15:57:25.000 | 2023-01-06T15:57:25.000 | null | null | 7,426 | null |
75,033,243 | 2 | null | 75,032,348 | 1 | null | First, remember that IPv4-Mapped IPv6 addresses are not allowed to be used on a network, as explained in the [IANA IPv6 Special-Purpose Address Registry](https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml), Notice that they cannot be used as source or destination addresses, cannot be forwarded or globally routable, and they are reserved by IP itself They are not actual IPv6 addresses, only a representation of IPv4 addresses in the IPv6 format in order to have a common address store, e.g. database. They work in your browser.
| null | CC BY-SA 4.0 | null | 2023-01-06T15:59:05.567 | 2023-01-06T15:59:05.567 | null | null | 3,745,413 | null |
75,033,362 | 2 | null | 30,385,940 | 0 | null | My case was that I have missed that your container at `Info.plist` should be wrapped to `NSUbiquitousContainers` dictionary.
I have fixed and increase `build version`, the folder did appear.
```
<key>NSUbiquitousContainers</key>
<dict>
<key>iCloud.com....</key>
<dict>
<key>NSUbiquitousContainerIsDocumentScopePublic</key>
<true/>
<key>NSUbiquitousContainerName</key>
<string>The name at iCloud folder</string>
<key>NSUbiquitousContainerSupportedFolderLevels</key>
<string>Any</string>
</dict>
</dict>
```
| null | CC BY-SA 4.0 | null | 2023-01-06T16:11:04.237 | 2023-01-06T16:11:04.237 | null | null | 3,300,148 | null |
75,033,663 | 2 | null | 58,664,994 | 0 | null | It looks like you are sampling every 10 seconds. If that is pretty solid, you can just count how many records are above 50 during a selected interval, and multiply by 10 seconds, that will be the duration that exceeds 50.
| null | CC BY-SA 4.0 | null | 2023-01-06T16:37:20.373 | 2023-01-06T16:37:20.373 | null | null | 4,503,847 | null |
75,033,801 | 2 | null | 31,472,962 | 0 | null | Best results for me with [mpv](https://mpv.io/):
```
adb shell screenrecord --bit-rate=16m --size 540x1140 --output-format=h264 - | mpv --profile=low-latency --no-correct-pts --fps=60 -
```
| null | CC BY-SA 4.0 | null | 2023-01-06T16:50:04.807 | 2023-01-06T16:50:04.807 | null | null | 520,129 | null |
75,034,509 | 2 | null | 75,032,343 | 0 | null | You could just set `canTapOnHeader: false` in the `CustomExpansionPanel` widget. That way taps on your `IconButton` in the header are registered correctly, and you can expand/collapse the body of the `CustomExpansionPanel` by tapping on the little arrow icon to the right of your `IconButton`
```
const MyHomePage({super.key, required this.title});
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
List<bool> panelIsExpanded = [true];
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(widget.title),
),
body: SingleChildScrollView(
child: ExpansionPanelList(
elevation: 0,
expandedHeaderPadding: EdgeInsets.zero,
expansionCallback: (panelIndex, isExpanded) => setState(() {
panelIsExpanded[panelIndex] = !panelIsExpanded[panelIndex];
}),
children: [
ExpansionPanel(
canTapOnHeader: false,
isExpanded: panelIsExpanded[0],
body: const Text('This is the body of the expansion panel'),
headerBuilder: (context, isOpen) {
return ListTile(
iconColor: Colors.black,
contentPadding: const EdgeInsets.symmetric(horizontal: 20.0),
title: const Text(
'some text',
),
trailing: Transform.translate(
offset: const Offset(30, 0),
child: Container(
margin: const EdgeInsets.all(8),
child: IconButton(
icon: const Icon(Icons.edit_outlined),
onPressed: () =>
ScaffoldMessenger.of(context).showSnackBar(
const SnackBar(
content: Text(
'You tapped the edit icon on the header of the expansion panel'),
),
),
),
),
),
);
},
),
],
),
),
);
}
}
```
| null | CC BY-SA 4.0 | null | 2023-01-06T17:59:00.950 | 2023-01-06T18:13:29.113 | 2023-01-06T18:13:29.113 | 13,799,978 | 13,799,978 | null |
75,034,521 | 2 | null | 66,421,460 | 0 | null | Completing @SATYA's answer, you can do the following:
```
# admin.py
from django.contrib import admin
from django.contrib.auth.models import User
class CustomUserAdmin(admin.ModelAdmin):
exclude = ('user_permissions',)
admin.site.register(User, CustomUserAdmin)
```
You could also extend Django's UserAdmin (from django.contrib.auth.admin), but this could mess up if you use a custom User model.
| null | CC BY-SA 4.0 | null | 2023-01-06T18:00:34.707 | 2023-01-06T18:00:34.707 | null | null | 9,847,548 | null |
75,034,704 | 2 | null | 22,833,404 | 0 | null | Another way to do this is plotting each column individually:
```
df = pd.DataFrame(np.random.randint(3, 10, size=(5, 4)), columns=['a', 'b', 'c', 'd'])
hatches = list('-*/o')
fig, ax = plt.subplots()
for i, c in enumerate(df.columns):
ax.bar(x=df.index - 0.3 + 0.2*i, height=df[c], width=0.2, hatch=hatches[i], label=c)
ax.legend()
plt.show()
```
[](https://i.stack.imgur.com/rKIcy.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T18:16:32.293 | 2023-01-06T18:21:52.433 | 2023-01-06T18:21:52.433 | 552,563 | 552,563 | null |
75,034,828 | 2 | null | 75,028,002 | 0 | null | In the template use `userValue?.controls` instead of `userValue.controls`.
Hope this will help you.
| null | CC BY-SA 4.0 | null | 2023-01-06T18:28:08.977 | 2023-01-06T18:28:08.977 | null | null | 3,292,176 | null |
75,034,861 | 2 | null | 38,779,718 | 0 | null | In my (and probably a typical/common case): I looked through (and compare with other .bak files) in the windows permission and see nothing wrong.
However - This may be due to that one . Even you store the .bak in the right path, it is initially [](https://i.stack.imgur.com/1db0D.png) from the [Source]->[Database] check box, until you follow the steps to restore via the [device] option
(In my case the second AdventureWorksDW2020-DAX-Docs was not available until I go thru extra steps to restore it via the [Device] option first.)
The SQLserver need to do internal access right grants to users... etc..(even all the needed Windows properties are in place) –
Reference [https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver16&tabs=ssms](https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver16&tabs=ssms)
| null | CC BY-SA 4.0 | null | 2023-01-06T18:31:51.537 | 2023-01-06T18:31:51.537 | null | null | 9,292,516 | null |
75,035,168 | 2 | null | 74,953,698 | 0 | null | Levi's should be accepted as the answer but I just wanted to point out another option, which is to use the [CrossTable() prefix](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/crosstable.htm), which can be used to "pivot" the values of 2 or more columns into a single column. This method can be useful if the columns you need to combine are already in a single table.
The script you can use in the Data Load Editor may look like this:
```
[Table 1]:
Load * Inline [
Activity , Activity Code
A , A01
B , A03
C , A05
D , B02
E , B06
, B03
, C01
, C03
, C08
, D24
, D21
, D30
, E11
, E15
, E22
];
[Pivoted table]:
CrossTable ([throwaway 1], [Combined], 1)
Load
1 as [throwaway 2]
, [Activity]
, [Activity Code]
Resident [Table 1];
Drop Fields [throwaway 1], [throwaway 2];
```
`[Table 1]` is just the data as it appears in your screenshot. Below that, the `[Pivoted table]` is a table that loads three fields:
- `1 as [throwaway 2]`[Qlik Help page on the CrossTable prefix](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptPrefixes/crosstable.htm)`[throwaway 2]`- `[Activity]`- `[Activity Code]`
The `CrossTable()` is going to result in an attribute field called `[throwaway 1]` (so named because we won't need it after this) and a data field called `[Combined]`, which will be our new combined field!
After we load this, our results are just what we'd expect:
[](https://i.stack.imgur.com/EqtJh.png)
| null | CC BY-SA 4.0 | null | 2023-01-06T19:06:49.337 | 2023-01-06T19:06:49.337 | null | null | 11,486,874 | null |
75,035,233 | 2 | null | 74,951,747 | 0 | null | The problem was the batch normalization. When tried on model without batch normalization layers like vgg16, the results were as expected on training data - values of the confusion matrix build from prediction on training data were mostly on the diagonal (when the training accuracy was high).
More detailed discussion here: [https://github.com/keras-team/keras/issues/6977](https://github.com/keras-team/keras/issues/6977)
A possible solution here: [fit() works as expected but then during evaluate() model performs at chance](https://stackoverflow.com/questions/65415799/fit-works-as-expected-but-then-during-evaluate-model-performs-at-chance?noredirect=1#comment116131855_65415799)
| null | CC BY-SA 4.0 | null | 2023-01-06T19:15:52.917 | 2023-01-06T19:15:52.917 | null | null | 2,039,339 | null |
75,035,303 | 2 | null | 75,034,514 | 1 | null | `itertools` can help to assemble the terms in the sum. Care must be taken in implementing a 1-based mathematical formula using 0-based Python:
```
import itertools
def p(i,N):
'''computes P(C_3 = i). N is a list of 12 nums summing to 100'''
total = 0
s = set(range(1,13)) - set([i])
for j,k in itertools.product(s,repeat = 2):
if j != k:
term = N[i-1]/(100 - N[j-1] - N[k-1])*N[j-1]/(100 - N[k-1])*N[k-1]/100
total += term
return total
#test:
N = [5,10,10,5,20,10,5,5,5,5,5,15]
for i in range(1,13):
print(f'P(C_3 = {i}) = {p(i,N)}')
'''
P(C_3 = 1) = 0.058068956327470306
P(C_3 = 2) = 0.10283873333408944
P(C_3 = 3) = 0.10283873333408944
P(C_3 = 4) = 0.05806895632747032
P(C_3 = 5) = 0.15139318885448905
P(C_3 = 6) = 0.10283873333408945
P(C_3 = 7) = 0.0580689563274703
P(C_3 = 8) = 0.0580689563274703
P(C_3 = 9) = 0.0580689563274703
P(C_3 = 10) = 0.0580689563274703
P(C_3 = 11) = 0.0580689563274703
P(C_3 = 12) = 0.1336079168509509
'''
```
| null | CC BY-SA 4.0 | null | 2023-01-06T19:25:12.017 | 2023-01-06T19:25:12.017 | null | null | 4,996,248 | null |
75,035,336 | 2 | null | 58,293,187 | 0 | null | I would suggest double checking the compatible video stream codecs with the hardware. I ran into the same issue, frame rate dropped to 5 fps only during streaming, because it was defaulting to a format that is not being streamed so it would convert it then display very lagged (~1s) with lower fps as well.
use `Self.capture.set(cv2.CAP_PROP_FOURCC ,cv2.VideoWriter_fourcc('M', 'J', 'P', 'G') )` with the proper codec in place of MJPG and with your cv2.VideoCapture and see if that helps.
| null | CC BY-SA 4.0 | null | 2023-01-06T19:28:30.953 | 2023-01-06T19:28:30.953 | null | null | 20,947,815 | null |
75,035,509 | 2 | null | 27,877,741 | 0 | null | If anyone needs a react solution I created this child component:
```
export default function Map(props) {
const address = `${props.winery.address} ${props.winery.city}, ${props.winery.state} ${props.winery.zip}`;
const src = `https://maps.google.com/maps?&q="+${address}"&output=embed`;
const Embed = () => {
return(
<div>
<iframe
width="100%"
height="450"
allowFullScreen=""
loading="lazy"
referrerPolicy="no-referrer-when-downgrade"
src={src}
>
</iframe>
</div>
);
}
return(
<>
<Embed />
</>
)
}
```
You may need to adjust the props, the object I passed had all the necessary data.
| null | CC BY-SA 4.0 | null | 2023-01-06T19:52:40.517 | 2023-01-06T19:52:40.517 | null | null | 3,330,820 | null |
75,036,131 | 2 | null | 75,031,341 | 1 | null | The HTML table is set out in rows and cells, exactly as you see it on the screen.
Your test is searching for the containing the text, but really you want to search for the containing the text, then get the `select` button of that row.
The basic test would be
```
cy.contains('tr', 'STB002')
.within(() => {
// now inside the row
cy.contains('span', 'select').click()
})
```
The next problem is the car `STB002` isn't on the first page, so you won't find it straight after loading.
Maybe use the search box to load that row (as you have in one screen-shot). I can't say what that code is, because the DOM picture doesn't include the search box.
| null | CC BY-SA 4.0 | null | 2023-01-06T21:14:31.773 | 2023-01-06T21:14:31.773 | null | null | 16,791,505 | null |
75,036,731 | 2 | null | 21,381,097 | -1 | null | I assume that you are importing the d3 from online.
In your HTML, make sure that you are importing the d3 before connecting your JavaScript file.
```
// Importing D3.js
<script src="https://d3js.org/d3.v5.min.js" charset="utf-8" defer></script>
// Importing D3-Scale
<script src="https://d3js.org/d3-scale.v3.min.js"></script>
// Connecting my JS file
<script src="app.js" defer></script>
```
| null | CC BY-SA 4.0 | null | 2023-01-06T22:38:03.270 | 2023-01-06T22:43:26.087 | 2023-01-06T22:43:26.087 | 20,948,719 | 20,948,719 | null |
75,036,843 | 2 | null | 68,315,228 | -1 | null | It looks like you posted binary data to a controller that takes a String. If that isn't the case then this error can also be cause by the controller receiving a partial payload due to timeout or network loss.
| null | CC BY-SA 4.0 | null | 2023-01-06T22:56:15.107 | 2023-01-06T22:56:15.107 | null | null | 392,061 | null |
75,036,928 | 2 | null | 75,030,827 | 1 | null |
I think you bascially have two options if you want to get rid of `::ng-deep`:
- `styles.css`- `encapsulation: ViewEncapsulation.None`
: Be aware that for both options your custom css will no longer be scoped, instead it will be applied globally to the entire application.
---
First of all: By adding `:host` in front of "::ng-deep", the styles are applied only to the styles of the elements that are deep in the corresponding component. So thanks to `:host` the styles will not be global.
What's more, `::ng-deep` has no alternative in Angular so far. Even though it is deprecated for two years, there is no clear information when (and if) it will be removed. As a consequence it is still possible to use it. ([Source](https://tomaszs2.medium.com/there-is-no-alternative-to-ng-deep-620496f1c8c9))
| null | CC BY-SA 4.0 | null | 2023-01-06T23:09:27.420 | 2023-01-07T12:42:50.880 | 2023-01-07T12:42:50.880 | 20,035,486 | 20,035,486 | null |
75,037,091 | 2 | null | 75,037,055 | -1 | null | Have you tried changing the color theme? Just go to VSCode settings and click color theme. Im not sure if it will help, I don't recall ever encountering the error myself, but its worth a try ig.
| null | CC BY-SA 4.0 | null | 2023-01-06T23:44:23.747 | 2023-01-06T23:44:23.747 | null | null | 20,948,949 | null |
75,037,130 | 2 | null | 75,037,053 | 0 | null | You didn't post any code (= not good...), but in general, if you mean that there should not be any space above and below the text in the cells of the last row, this should work:
```
tr:last-child > td {
padding-top:0;
padding-bottom: 0;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-06T23:52:38.220 | 2023-01-06T23:52:38.220 | null | null | 5,641,669 | null |
75,037,165 | 2 | null | 75,037,053 | 0 | null | Not shure how your code looks but you propably should play with line-height of your text, for example:
```
table, td {
text-align: center;
border:1px solid black;
line-height:12px;
}
```
Or remove padding from if there is any:
```
td {
padding: 0;
}
```
| null | CC BY-SA 4.0 | null | 2023-01-07T00:00:05.770 | 2023-01-07T00:03:24.993 | 2023-01-07T00:03:24.993 | 20,945,596 | 20,945,596 | null |
75,037,228 | 2 | null | 37,010,163 | 0 | null | For anyone else struggling with actually implementing this, expand the documentation for requests a bit (and/or open a support case!) and you'll find "on_right_yaxis". So, the JSON looks something like
```
"requests": [
{
"formulas": [....],
"queries": [....],
"response_format": "timeseries",
"style": {...},
"display_type": "line"
},
{
"on_right_yaxis": true,
"formulas": [....],
"queries": [....],
"response_format": "timeseries",
"style": {...},
"display_type": "line"
}
]
```
| null | CC BY-SA 4.0 | null | 2023-01-07T00:16:13.733 | 2023-01-07T00:16:13.733 | null | null | 4,405,685 | null |
75,037,278 | 2 | null | 75,026,092 | 0 | null | Okay I learned how to use shader graphs and that fixed it for me.
| null | CC BY-SA 4.0 | null | 2023-01-07T00:26:41.787 | 2023-01-07T00:26:41.787 | null | null | 20,933,240 | null |
75,037,729 | 2 | null | 75,037,540 | 0 | null |
#### Notes
It might be better to not use `list` as a variable name since it already means something in python....
Also, I can't test any of the suggestions below without having access to your HTML. It would be helpful if you include how you fetched the HTML to parse with BeautifulSoup. (Did you use some form of requests? Or something like selenium? Or do you just have the HTML file?) With requests or even selenium, sometimes the HTML fetched is not what you expected, so that's another issue...
---
#### The Reason behind the Issue
You can't apply `.text`/`.get_text` to the ResultSets (lists), which are what `.find_all` and `.select` return. You apply `.text`/`.get_text` to Tags like the ones returned by `.find` or `.select_one` (but you should check first `None` was not returned - which happens when nothing is found).
So `date[0].get_text()` might have returned something, but since you probably want all the dates and flags, that's not the solution.
---
#### Solution Part 1 Option A: Getting the Rows with .find... chain
Instead of iterating through tables directly, you need to get the rows first (`tr` tags) before trying to get at the cells (`td` tags); if you have only one `table` with `class= "report"`, you could just do something like:
```
rows = soup.find('table', class_= "report").find_all('tr', {'onmouseover': True})
```
But it's risky to chain multiple `.find...`s like that, because an error will be raised if any of them return `None` before reaching the last one.
---
#### Solution Part 1 Option B: Getting the Rows More Safely with .find...
It would be safer to do something like
```
table = soup.find('table', class_= "report")
rows = table.find_all('tr', {'onmouseover': True}) if table else []
```
or, if there might be more than one `table` with `class= "report"`,
```
rows = []
for table in soup.find_all('table', class_= "report"):
rows += table.find_all('tr', {'onmouseover': True})
```
---
#### Solution Part 1 Option C: Getting the Rows with .select
However, I think the most convenient way is to use [.select](https://www.crummy.com/software/BeautifulSoup/bs4/doc/#css-selectors) with [CSS selectors](https://www.w3schools.com/cssref/css_selectors.php)
```
# if there might be other tables with report AND other classes that you don't want:
# rows = soup.select('table[class="report"] tr[onmouseover]')
rows = soup.select('table.report tr[onmouseover]')
```
this method is only unsuitable if there might be more than one `table` with `class= "report"`, but you only want rows from the first one; in that case, you might prefer the `table.find_....if table else []` approach.
---
#### Solution Part 2 Option A: Iterating Over rows to Print Cell Contents
Once you have `rows`, you can iterate over them to print the date and flag cell contents:
```
for r in rows:
date, flag = r.find('td', class_= "time"), r.find('td', class_= "flag")
info = [i.get_text() if i else i for i in [date, flag]]
if any([i is not None for i in info]): print(info)
# [ only prints if there are any non-null values ]
```
---
#### Solution Part 2 Option B: Iterating Over rows with a Fucntion
Btw, if you're going to be extracting multiple tag attributes/texts repeatedly, you might find my [selectForList](https://pastebin.com/ZnZ7xM6u) function useful - it could have been used like
```
for r in rows:
info = selectForList(r, ['td.time', 'td.flag'], printList=True)
if any([i is not None for i in info]): print(info)
```
or, to get a list of dictionaries like `[{'time': time_1, 'flag': flag_1}, {'time': time_2, 'flag': flag_2}, ...]`,
```
infList = [selectForList(r, {
'time': 'td.time', 'flag': 'td.flag', ## add selectors for any info you want
}) for r in soup.select('table.report tr[onmouseover]')]
infList = [d for d in infoList if [v for v in d.values() if v is not None]]
```
---
#### Added EDIT:
To get all displayed cell contents:
```
for r in rows:
info = [(td.get_text(),''.join(td.get('style','').split())) for td in r.select('td')]
info = [txt.strip() for txt, styl in r.select('td') if 'display:none' not in styl]
# info = [i if i else 0 for i in info] # fill blanks with zeroes intead of ''
if any(info): print(info) ## or write to CSV
```
| null | CC BY-SA 4.0 | null | 2023-01-07T02:31:02.080 | 2023-01-07T20:01:52.997 | 2023-01-07T20:01:52.997 | 6,146,136 | 6,146,136 | null |
75,037,856 | 2 | null | 75,037,759 | 0 | null | You can use `isin` function for this.
Here is an example.
```
arr = {'col1': ['?',2,'?',4], 'col2': [6,7,8,9]}
df = pd.DataFrame(arr)
df.isin(['?']).sum()
```
```
output:
col1 2
col2 0
```
| null | CC BY-SA 4.0 | null | 2023-01-07T03:09:03.563 | 2023-01-07T03:09:03.563 | null | null | 5,146,848 | null |
75,037,865 | 2 | null | 75,037,378 | 1 | null | Unfortunately, your code has some problems. For one you have an empty forloop in the generate method. However, I can help you get the count by doing it a different way and printing the results. Forgetting about the loop that goes from `2 to 20`, here is what is going on. And this may not be most efficient way of finding the matches but for short runs it exposes the counts as a recognizable pattern (which could also be determined by mathematical analysis).
- `IntPredicate`- `n`- `1`
```
IntPredicate NoAdjacentOneBits = (n)-> {
while (n > 0) {
if ((n & 3) == 3) {
return false;
}
n>>=1;
}
return true;
};
for (int n = 1; n <= 20; n++) {
long count = IntStream.range(0, (int) Math.pow(2, n))
.filter(NoAdjacentOneBits).count();
System.out.println("For n = " + n + " -> " + count);
}
```
prints (with annotated comments on first three lines)
```
For n = 1 -> 2 // not printed but would be 0 and 1
For n = 2 -> 3 // 00, 01, 10
For n = 3 -> 5 // 000, 001, 010, 100, 101
For n = 4 -> 8
For n = 5 -> 13
For n = 6 -> 21
For n = 7 -> 34
For n = 8 -> 55
For n = 9 -> 89
For n = 10 -> 144
For n = 11 -> 233
For n = 12 -> 377
For n = 13 -> 610
For n = 14 -> 987
For n = 15 -> 1597
For n = 16 -> 2584
For n = 17 -> 4181
For n = 18 -> 6765
For n = 19 -> 10946
For n = 20 -> 17711
```
The counts are directly related to the th term of the [Fibonacci Series](https://en.wikipedia.org/wiki/Fibonacci_numbers) that starts with 2 3 5 8 . . .
So you really don't even need to inspect the values for adjacent bits. Just compute the related term of the series.
| null | CC BY-SA 4.0 | null | 2023-01-07T03:11:40.340 | 2023-01-07T16:36:25.730 | 2023-01-07T16:36:25.730 | 1,552,534 | 1,552,534 | null |
75,038,231 | 2 | null | 75,037,759 | 0 | null | Your first task should be to replace all columns with `?` to `NaN` or `None` so that you can use built-in Pandas functions to easily count them.
```
import pandas as pd
import numpy as np
data = {'number': [1, 2, 3, 4, '?', 5],
'string': ['a', 'b', 'c', 'd', '?', 'e']
}
df = pd.DataFrame(data)
df['number'] = df['number'].replace('?', np.NaN)
df['string'] = df['string'].replace('?', None)
```
Now you can count the number of missing values.
```
df.isna().sum()
```
Output:
```
number 1
string 1
dtype: int64
```
| null | CC BY-SA 4.0 | null | 2023-01-07T05:06:11.413 | 2023-01-07T05:29:37.057 | 2023-01-07T05:29:37.057 | 5,342,700 | 5,342,700 | null |
75,038,345 | 2 | null | 69,306,536 | 0 | null | Here is an example.
```
playerNotificationManager = new PlayerNotificationManager.Builder(this, 151, "1234")
.setMediaDescriptionAdapter(new PlayerNotificationManager.MediaDescriptionAdapter() {
@Override
public CharSequence getCurrentContentTitle(Player player) {
return videoTitle;
}
@Nullable
@Override
public PendingIntent createCurrentContentIntent(Player player) {
return null;
}
@Nullable
@Override
public CharSequence getCurrentContentText(Player player) {
return null;
}
@Nullable
@Override
public Bitmap getCurrentLargeIcon(Player player, PlayerNotificationManager.BitmapCallback callback) {
if (!VideoPlayerActivity.this.isDestroyed()) {
Glide.with(VideoPlayerActivity.this)
.asBitmap()
.load(new File(mVideoFiles.get(position).getPath()))
.into(new CustomTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
}
@Override
public void onLoadCleared(@Nullable Drawable placeholder) {
}
});
}
return null;
}
}).build();
```
| null | CC BY-SA 4.0 | null | 2023-01-07T05:41:47.403 | 2023-01-08T03:01:30.133 | 2023-01-08T03:01:30.133 | 10,366,774 | 10,366,774 | null |
75,038,380 | 2 | null | 27,092,164 | 0 | null | For those who are using `pyqtgraph.jupyter.GraphicsLayoutWidget`, the layout object is a variable named `gfxLayout`
```
from pyqtgraph.jupyter import GraphicsLayoutWidget
win = GraphicsLayoutWidget()
win.gfxLayout.setContentsMargins(10,10,10,10)
win.gfxLayout.setSpacing(0)
```
| null | CC BY-SA 4.0 | null | 2023-01-07T05:52:15.447 | 2023-01-07T05:52:15.447 | null | null | 5,560,028 | null |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.