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,245,713
2
null
74,245,422
0
null
I tried to import my model this way `from accounts.models import Account` and now it works, but pycharm says that's not corectly
null
CC BY-SA 4.0
null
2022-10-29T13:28:38.630
2022-10-29T13:28:38.630
null
null
19,459,737
null
74,245,748
2
null
74,245,695
1
null
Using <header_here.h> takes them from some system wide directory (not sure for windows but for linux it is `/usr/include/` that has these header files. For the current path use #include "headername_here.h" instead. ``` #include "cs50.h" ```
null
CC BY-SA 4.0
null
2022-10-29T13:34:09.820
2022-10-29T13:34:09.820
null
null
19,508,355
null
74,245,998
2
null
73,727,448
0
null
I found a solution to this problem: I updated the `.hidden` to this: ``` .hidden::-webkit-scrollbar { display: none; /* Safari and Chrome */ } ``` and apply this style to the `body` instead of the `#main` element.
null
CC BY-SA 4.0
null
2022-10-29T14:09:25.530
2022-10-29T14:09:25.530
null
null
11,584,366
null
74,246,795
2
null
74,246,469
0
null
So using @Nelfeal 's advice, I made a copy of the grid where I made the changes and once that was done I coloned the values back to the main grid. This fixed the problem. ``` #include <stdio.h> #include <windows.h> #include <GL/glut.h> #define sleep(x) Sleep(1000 * (x)) #define sizeX 10 #define sizeY 10 #define wallSize 40 int frame = 0; double grid[sizeY][sizeX]; double newGrid[sizeY][sizeX]; double filter[3][3] = {{1, 1, 1}, {1, 9, 1}, {1, 1, 1}}; int width = 1000; int height = 500; double activation(double x){ if(x == 3 || x == 11 || x == 12){ return 1; } else{ return 0; } } void CVFilter(){ int x,y; double cv; //covolved value for(y=1;y<sizeY-1;y++){ for(x=1;x<sizeX-1;x++){ cv = (grid[y+1][x-1]*filter[0][0]) + (grid[y+1][x]*filter[0][1]) + (grid[y+1][x+1]*filter[2][2])+ (grid[y][x-1]*filter[1][0]) + (grid[y][x]*filter[1][1]) + (grid[y][x+1]*filter[1][2])+ (grid[y-1][x-1]*filter[2][0]) + (grid[y-1][x]*filter[2][1]) + (grid[y-1][x+1]*filter[2][2]); newGrid[y][x] = activation(cv); } } } void drawGrid(){ int x,y; double rgb; glPointSize(wallSize); glBegin(GL_POINTS); for(y=0;y<sizeY;y++){ for(x=0;x<sizeX;x++){ rgb = grid[y][x]; glColor3f(rgb,rgb,rgb); glVertex2i((x*wallSize),(y*wallSize)); } } glEnd(); } void cloneGrids(){ int x,y; for(y=0;y<sizeY;y++){ for(x=0;x<sizeX;x++){ grid[y][x] = newGrid[y][x]; } } } void display(){ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); if(frame == 1){ CVFilter(); cloneGrids(); } if(frame == 2){ sleep(1000); } //-----------------------Draw---------------------- drawGrid(); //------------------------------------------------- glutSwapBuffers(); glutPostRedisplay(); sleep(3); frame++; } void init(){ glClearColor(0.3,0.3,0.3,0); gluOrtho2D(0,width,height,0); } void main(int argc, char** argv){ grid[5][5] = 1; //Draws the glider grid[4][5] = 1; //Draws the glider grid[3][5] = 1; //Draws the glider grid[5][4] = 1; //Draws the glider grid[4][3] = 1; //Draws the glider glutInit(&argc, argv); glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA); glutInitWindowSize(width,height); glutCreateWindow("OpenGL"); init(); glutDisplayFunc(display); glutMainLoop(); } ```
null
CC BY-SA 4.0
null
2022-10-29T16:06:46.247
2022-10-29T16:06:46.247
null
null
16,368,306
null
74,246,832
2
null
54,522,083
0
null
I've just updated the implementation in the `build.gradle(:app)` to ``` implementation 'com.google.firebase:firebase-storage:20.0.1' ```
null
CC BY-SA 4.0
null
2022-10-29T16:11:44.187
2022-11-03T13:14:03.963
2022-11-03T13:14:03.963
8,845,480
20,157,529
null
74,247,536
2
null
74,247,505
1
null
To remove the `body`'s default margin, just add: ``` body { margin: 0; } ``` Your new CSS styles: ``` body { margin: 0; } #top-footer, #bottom-footer { margin: 0; padding: 1rem 2rem; height: 1rem; font-size: medium; } #bottom-footer>a { display: inline; padding-right: 2rem; margin: 0; font-size: medium; } footer { margin-top: 2rem; background-color: grey; width: 100%; } ```
null
CC BY-SA 4.0
null
2022-10-29T17:52:28.340
2022-10-29T17:58:41.323
2022-10-29T17:58:41.323
20,318,366
20,318,366
null
74,247,613
2
null
74,244,322
-1
null
You have the ScrollView in the wrong level and you shouldn't nest a ListView inside a ScrollView, so better leave out the ScrollView entirely since the ListView provides scrolling capabilities on its own: ``` <Grid RowDefinitons="auto, auto, *, auto, auto"> <!-- leaving out irrelevant bits --> <ListView Grid.Row="2"> <!-- leaving out irrelevant bits --> </ListView> <Label /> <Button /> </Grid> ``` [https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/layouts/scrollview](https://learn.microsoft.com/en-us/xamarin/xamarin-forms/user-interface/layouts/scrollview)
null
CC BY-SA 4.0
null
2022-10-29T18:03:29.380
2022-11-03T12:22:24.313
2022-11-03T12:22:24.313
4,308,455
4,308,455
null
74,247,622
2
null
74,247,505
0
null
just add body{margin:0;} ``` #top-footer, #bottom-footer { margin: 0; padding: 1rem 2rem; height: 1rem; font-size: medium; } #bottom-footer>a { display: inline; padding-right: 2rem; margin: 0; font-size: medium; } footer { margin-top: 2rem; background-color: grey; width: 100%; } body{margin:0;padding:0;border:solid 1px red;} ``` ``` <footer> <div id="top-footer"> Hong Kong </div> <div id="bottom-footer"> <a href="https://support.google.com/websearch/?p=ws_results_help&hl=en-HK&fg=1">Help</a> <a href="https://policies.google.com/privacy?hl=en-HK&fg=1">Privacy</a> <a href="https://policies.google.com/terms?hl=en-HK&fg=1">Terms</a> </div> </footer> ```
null
CC BY-SA 4.0
null
2022-10-29T18:04:09.153
2022-10-29T18:04:09.153
null
null
4,398,966
null
74,247,830
2
null
74,135,699
2
null
Randomly found a solution. RMB on line numbers, there will be option "lightbulb margin". off to remove those indents.
null
CC BY-SA 4.0
null
2022-10-29T18:31:45.027
2022-10-29T18:31:45.027
null
null
20,289,013
null
74,248,076
2
null
27,758,800
0
null
Just to provide a little more information for other people that experience the same problem. --- I've taken the following steps: 1. Did M-x toggle-frame-maximized once. results: The window became maximized The gap at the bottom was gone The gap at the right was gone Resizing the window returned the right gap Restarting Emacs made the gaps return 2. put (setq frame-resize-pixelwise t) at the top of my init.el. results: No more visible gap. Restarting Emacs keeps no visible gap. --- There are different versions of Emacs available through homebrew. Both `d12frosted/emacs-plus` and `railwaycat/emacsmacport` require you to manually tap these brews. Formulae - - - - - Casks - - - - - - - --- If you install a `brew` formula, it won't be able to display a GUI. Just don't use this. Make sure you check your `brew list`, because `emacs` often gets added as a formula as a dependency! Make sure it is completely uninstalled from your system, and clean up the cache and symlinks if `brew` didn't do so already. Of all the `cask` versions, only `emacs --cask`, `emacs-nightly` and `emacs-pretest` suffer from the gap problem. --- I still use `emacs --cask` though. The problem is easily solved by adding 1 line to my `init.el` and I no longer get any bugs with double space ligatures `emacs --cask` is the only version that can correctly display glyphs like `\ f (` = ( correctly on my system.
null
CC BY-SA 4.0
null
2022-10-29T19:07:18.220
2022-10-29T19:07:18.220
null
null
8,924,591
null
74,248,283
2
null
25,828,168
0
null
You gonna have to change your `ISDoneInit "$F777"` to `"$1111"` It's something like this ``` if ISDoneInit(ExpandConstant('{src}\records.inf'), $1111, Comps1,Comps2,Comps3, MainForm.Handle, 512, @ProgressCallback) then begin ``` and you don't have to add a another time count function to get this...just remove it...
null
CC BY-SA 4.0
null
2022-10-29T19:39:41.917
2022-11-07T20:33:21.250
2022-11-07T20:33:21.250
14,267,427
20,243,850
null
74,249,028
2
null
22,697,248
0
null
``` import React from "react"; import * as GeoJson from "./data/RUS_simple.json"; function Process180Meredian() { function download(content, fileName, contentType) { var a = document.createElement("a"); var file = new Blob([content], { type: contentType }); a.href = URL.createObjectURL(file); a.download = fileName; a.click(); } function process(obj) { const coordinates = obj.features[0].geometry.coordinates; //loop through all coordinates and add 360 to all negative values for (let i = 0; i < coordinates.length; i++) { for (let j = 0; j < coordinates[i].length; j++) { for (let k = 0; k < coordinates[i][j].length; k++) { if (coordinates[i][j][k][0] < 0) { coordinates[i][j][k][0] += 360; } } } } //download the new file download(JSON.stringify(obj), "RUS_simple_processed.json", "text/plain"); } return ( <div> <button onClick={() => process(GeoJson)}>Process</button> </div> ); } export default Process180Meredian; ``` Before [](https://i.stack.imgur.com/Ag4xg.jpg) After [](https://i.stack.imgur.com/aRWSb.jpg)
null
CC BY-SA 4.0
null
2022-10-29T21:37:10.647
2022-10-29T21:37:10.647
null
null
10,220,374
null
74,249,083
2
null
21,335,142
0
null
In my case, I'm in MacOS and I only needed to add the arguments for pointing to the different setting file's path. [](https://i.stack.imgur.com/7c5Gu.png)
null
CC BY-SA 4.0
null
2022-10-29T21:46:12.613
2022-10-29T21:46:12.613
null
null
3,880,516
null
74,249,172
2
null
71,656,771
5
null
For me, in latest @mui 5, the other solutions weren't working properly. The only solution that worked for me is: ``` <DatePicker dateAdapter={AdapterDateFns} renderInput={(params) => ( <TextField {...params} inputProps={{...params.inputProps, readOnly: true}} /> )} /> ```
null
CC BY-SA 4.0
null
2022-10-29T22:04:05.040
2022-10-29T22:04:05.040
null
null
1,861,047
null
74,249,209
2
null
74,248,718
-3
null
I have come to a conclusion that I should use a Discord bot to monitor my user profile. The bot will update my website automatically.
null
CC BY-SA 4.0
null
2022-10-29T22:11:14.847
2022-10-29T22:23:22.120
2022-10-29T22:23:22.120
1,364,007
16,542,571
null
74,249,805
2
null
74,246,908
0
null
Seeing your problem in a superficial and more complicated way, seeing the code would be easier, but the tip would be for you to encompass the parent widget of the blue elements, `CSE, E&C, MEC, CIV, ELE, CHEM` com or `SingleChildScrollView()` widget, so it scrolling in this part of the screen if overflow occurs, then you can go up and down the screen.
null
CC BY-SA 4.0
null
2022-10-30T00:36:57.863
2022-10-30T12:15:08.943
2022-10-30T12:15:08.943
1,233,251
18,456,797
null
74,250,131
2
null
28,799,892
0
null
``` chrome.action.onClicked.addListener(tab => { chrome.windows.create({ url: chrome.runtime.getURL("index.html"), type: "popup" //No Address bar //In here you can also add constrain for the window //This is for manifest v3 }) }); ```
null
CC BY-SA 4.0
null
2022-10-30T02:32:24.227
2022-10-30T02:32:24.227
null
null
6,027,072
null
74,250,725
2
null
61,787,101
0
null
For someone using Docker and you are sure that the Container contains your static files but still getting 404. Check your Dockerfile if you have WORKDIR directive: ``` FROM mcr.microsoft.com/dotnet/aspnet:6.0 WORKDIR /app # this line ENV ASPNETCORE_URLS=http://+:5000 COPY --from=build /app/out . ENTRYPOINT ["dotnet", "YourApp.dll"] ``` Then in Program.cs (or Startup.cs) make sure the root path starts with "/app": ``` builder.Services.AddSpaStaticFiles(config => config.RootPath = "/app/wwwroot"); ```
null
CC BY-SA 4.0
null
2022-10-30T05:30:56.440
2022-10-30T05:36:13.717
2022-10-30T05:36:13.717
11,309,214
11,309,214
null
74,251,256
2
null
6,842,112
0
null
Within a Kotlin based android app you may search for the file: \app\build.gradle.kts and change: app_name string After changing "app_name" to your needs, you must "Sync" the project (Click in Android Studio on top,right)
null
CC BY-SA 4.0
null
2022-10-30T07:33:04.957
2022-10-30T07:33:04.957
null
null
18,846,474
null
74,251,254
2
null
74,249,468
0
null
Using find: ``` [t.get_text(strip=True) for t in soup.find_all(attrs={'class': 'sorting_1'})] ``` or if you're sure that's the only class for the tags you want: ``` [t.get_text(strip=True) for t in soup.find_all(class_='sorting_1')] ``` or using select ``` [t.get_text(strip=True) for t in soup.select('.sorting_1')] ``` --- Any of the above should work; and if you're going to be working with BeautifulSoup, you should really familiarize yourself with [the documentation](https://www.crummy.com/software/BeautifulSoup/bs4/doc/) and/or go through at least one [tutorial](https://www.dataquest.io/blog/web-scraping-python-using-beautiful-soup/).
null
CC BY-SA 4.0
null
2022-10-30T07:32:49.627
2022-10-30T07:32:49.627
null
null
6,146,136
null
74,251,335
2
null
74,251,276
0
null
This might be an approach: ``` <?php $numberOfBlocks = readline("Enter how many blocks are available for a pyramid? ") . PHP_EOL; $numberOfLayers = 0; do { $numberOfBlocks -= ($numberOfLayers + 1); if ($numberOfBlocks < 0) break; $numberOfLayers++; } while (true); echo "Number of possible layers: $numberOfLayers" . PHP_EOL; ``` The strategy: you decrement the number of blocks required for the next lower layer in each iteration. If the resulting number of blocks is smaller than zero (there were not enough blocks for that layer), then skip and output the layers so far. Otherwise count that full layer and start over again. --- @NigelRen pointed out another approach in his comment below. I had to adjust it slightly, but it leads to a much more compact solution: ``` <?php $numberOfBlocks = readline("Enter how many blocks are available for a pyramid? ") . PHP_EOL; for ($numberOfLayers = 0; $numberOfBlocks >= $numberOfLayers + 1; $numberOfBlocks -= ++$numberOfLayers); echo "Number of possible layers: $numberOfLayers" . PHP_EOL; ``` --- That would be a corresponding unit test class: ``` class unittest extends TestCase { /** * @dataProvider expectedNumberOfLayers */ public function testAdd($numberOfBlocks, $expectedNumberOfLayers) { $this->assertEquals($expectedNumberOfLayers, computeLayersFromBlocks($numberOfBlocks)); } public function expectedNumberOfLayers(): Array { return [ [ 0, 0], [ 1, 1], [ 2, 1], [ 3, 2], [ 4, 2], [ 5, 2], [ 6, 3], [ 7, 3], [ 8, 3], [ 9, 3], [10, 4], [11, 4], [12, 4], [13, 4], [14, 4], [15, 5], [16, 5], [17, 5], [18, 5], [19, 5], [20, 5], [21, 6], [22, 6], [23, 6], [24, 6] ]; } } ```
null
CC BY-SA 4.0
null
2022-10-30T07:48:20.507
2022-10-30T16:01:35.937
2022-10-30T16:01:35.937
1,248,114
1,248,114
null
74,251,461
2
null
74,251,276
0
null
So, the no. of blocks per layer increases consecutively like, ``` 1 2 3 4 5 ... etc ``` You have been given the no. of blocks and you wish to find out the layers. This is like the sum of `n` consecutive numbers where `n` is no. of the layers and `sum` is the total blocks available. The math formula is , ``` sum = n * (n + 1) / 2; ``` In our case, we are given the sum and we need to find the value of `n` that is a nearest match to the sum when substituted in the above formula. We can simplify the equation as: ``` sum = n * (n + 1) / 2; sum * 2 = n * (n + 1); ``` So our code would look like, ``` <?php $blocks = readline("Enter how many blocks are available for a pyramid?") . PHP_EOL; // sum * 2 = n * (n + 1); $blocks = intval($blocks) * 2; $ans = 0; for($layer = 1; ; ++$layer){ if($layer * ($layer + 1) <= $blocks){ $ans = $layer; }else{ break; } } echo $ans; ``` [Online Demo](https://onecompiler.com/php/3ymfftx6a) --- For an efficient approach, you can rewrite the equation as: ``` sum = n * (n + 1) / 2; sum * 2 = n * (n + 1); n * (n + 1) - sum * 2 = 0; n^2 + n - 2 * sum = 0; ``` Using the [quadratic formula](https://en.wikipedia.org/wiki/Quadratic_formula), we can directly get the value of `n` as below, ``` <?php $blocks = readline("Enter how many blocks are available for a pyramid?") . PHP_EOL; echo ((int)sqrt(1 + 4 * 2 * intval($blocks)) - 1) >> 1; ``` [Online Demo](https://onecompiler.com/php/3ymfg9j7w)
null
CC BY-SA 4.0
null
2022-10-30T08:15:30.417
2022-10-30T08:15:30.417
null
null
4,964,822
null
74,251,578
2
null
74,085,317
0
null
The root cause by the code js is not correct. Please try again with the code below: ``` function myFunction() { var x = document.getElementsByClassName("col-sm-5 col-md-4 totals"); if (x[0].style.display === "none") { x[0].style.display = "block"; } else { x[0].style.display = "none"; } } ```
null
CC BY-SA 4.0
null
2022-10-30T08:33:21.000
2022-10-30T08:33:21.000
null
null
5,524,965
null
74,251,761
2
null
67,412,194
0
null
I found a solution for myself in using `strokeAlign:StrokeAlign.center` or `strokeAlign:StrokeAlign.outline`, Maybe it will be useful to someone. ``` OutlinedButton( style: OutlinedButton.styleFrom( shape: CircleBorder(), fixedSize: const Size(60, 60), elevation: 0.0, foregroundColor: Color.fromARGB(255, 255, 255, 255), backgroundColor: Color.fromARGB(255, 17, 17, 17), side: const BorderSide( color: Color.fromARGB(255, 255, 255, 255), strokeAlign: StrokeAlign.center, width: 4), ), onPressed: () {}, child: Container( height: 60, width: 60, child: Icon( Icons.create, ), ), ), ``` ![](https://i.stack.imgur.com/hmJBH.png)
null
CC BY-SA 4.0
null
2022-10-30T09:08:32.977
2022-10-30T09:31:19.327
2022-10-30T09:31:19.327
10,157,127
7,901,678
null
74,252,138
2
null
74,245,422
0
null
Appart from adding the `__init__.py` file you must use the `-m` switch when you run your code from the top directory that includes all your top packages for relative imports to work correctly - for instance ``` $ cd to_do_list/.. $ python -m to_do_list.manage # note no .py ``` However it would be best to stick with the absolute import in that case and run as: ``` $ cd to_do_list $ python -m manage ```
null
CC BY-SA 4.0
null
2022-10-30T10:06:27.870
2022-10-30T10:06:27.870
null
null
281,545
null
74,252,210
2
null
22,573,827
0
null
put SaveChanges() in try catch it captures the SaveChanges() error.
null
CC BY-SA 4.0
null
2022-10-30T10:16:01.943
2022-10-30T10:16:01.943
null
null
6,860,405
null
74,252,284
2
null
74,251,183
2
null
This can be done by using the WORKDAY() function together with the DATE() function. B2 contains year - 2012 B3 contains payment day - 28 A5:A17 contain payment periods (month numbers) - 1..12 D6:D16 contain holidays ``` =WORKDAY(DATE($B$2,A6,$B$3-1),1,$D$6:$D$14) ``` Also see the linked image. (NB: My Excel version uses semi-colon ";" in stead of comma "," to separate arguments in functions.) Best of luck! Xharx [Image of the Excel sheet solution](https://i.stack.imgur.com/N4EkB.jpg)
null
CC BY-SA 4.0
null
2022-10-30T10:28:01.953
2022-10-30T11:21:23.480
2022-10-30T11:21:23.480
10,318,834
10,318,834
null
74,252,650
2
null
74,251,183
2
null
[](https://i.stack.imgur.com/LvrYG.png)Here's How u Do it. First we have to have starting month from where were gonna start counting I made this formula which works great, `=WORKDAY(EDATE($B$15,COUNT($B$15:B17))-1,1,holiday1)` were freezing the starting date and counting how many rows are we from the starting position , then were gonna minus 1 from it , and in days were gonna type 1, if there's holidays that I wanna exclude too I just can enter it and give it a name, (Some of u who doesn't understand this, its just saying that its referring to specified cells which we named holidays) and it works flawlessly. B15 = starting month
null
CC BY-SA 4.0
null
2022-10-30T11:27:52.323
2022-10-30T11:37:49.973
2022-10-30T11:37:49.973
20,370,040
20,370,040
null
74,253,178
2
null
21,646,738
0
null
A one-liner if you only need to handle the simple case (i.e. doesn't handle shortcuts like `#fff`): ``` "aabbcc".split(/(..)/).filter(c=>c).map(c => parseInt(c, 16)) ```
null
CC BY-SA 4.0
null
2022-10-30T12:47:41.103
2022-11-11T21:16:24.297
2022-11-11T21:16:24.297
11,950,764
11,950,764
null
74,253,512
2
null
15,727,912
0
null
A simpler method is to run `./gradlew signingReport` in your project root directory Other methods are explained in this [article](https://medium.com/firebase-tips-tricks/how-to-get-the-sha-1-fingerprint-certificate-for-debug-mode-in-android-studio-c9df7ae2401b)
null
CC BY-SA 4.0
null
2022-10-30T13:36:31.820
2022-10-30T13:36:31.820
null
null
13,938,574
null
74,254,667
2
null
31,255,947
0
null
try this: change your apache xampp port to 8080, or stop apache2 ``` sudo systemctl stop apache2 ```
null
CC BY-SA 4.0
null
2022-10-30T16:11:25.263
2022-10-30T16:11:25.263
null
null
20,336,114
null
74,255,555
2
null
36,712,642
-1
null
You could do something like this: ``` contentStream.beginText(); contentStream.newLineAtOffset(20,750); //This begins the cursor at top right contentStream.setFont(PDType1Font.TIMES_ROMAN,8); for (String readList : resultList) { contentStream.showText(readList); contentStream.newLineAtOffset(0,-12); //This will move cursor down by 12pts on every run of loop } ```
null
CC BY-SA 4.0
null
2022-10-30T18:07:32.363
2022-11-03T09:57:04.797
2022-11-03T09:57:04.797
5,515,287
18,388,883
null
74,255,886
2
null
74,124,975
2
null
In the comments under the question, you have several links to the existing answers that match the question. So that, this question is likely a duplicate question. However, none of the answers offers the zebra-pattern border as shown in the sample plot. I take this opportunity to offer a distinct answer that also plots the map border with zebra pattern line similar to the sample plot. ``` import cartopy.crs as ccrs import cartopy import matplotlib.pyplot as plt import matplotlib.path as mpath import matplotlib.patches as patches # The lat-long projection noProj = ccrs.PlateCarree(central_longitude=0) # The projection of the map: myProj = ccrs.Orthographic(central_longitude=-25, central_latitude=58) myProj._threshold = myProj._threshold/40. #for higher precision plot fig = plt.figure(figsize=(8,12)) ax = fig.add_subplot(1, 1, 1, projection=myProj) # Zebra-border-line segments ... # four edges on separate lines of code # 1: lower edge: Left - Right # 2: Right edge: Bottom - Top # 3: Upper edge: Right - Left # 4: Left edge: Top - Bottom [ax_hdl] = ax.plot( [ -45, -40, -35, -30, -25, -20, -15, -10, -5, -5,-5,-5,-5,-5, -10,-15,-20,-25,-30,-35,-40,-45, -45, -45, -45, -45, -45 ], [ 45, 45, 45, 45, 45, 45, 45, 45, 45, 50, 55, 60, 65, 70, 70,70,70,70,70,70,70,70, 65, 60, 55, 50, 45 ], color='black', linewidth=0.5, transform=noProj) tx_path = ax_hdl._get_transformed_path() path_in_data_coords, _ = tx_path.get_transformed_path_and_affine() polygon1s = mpath.Path( path_in_data_coords.vertices) vcode = [1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1] #Path-code polygon1v = mpath.Path( path_in_data_coords.vertices, vcode) ax.set_boundary(polygon1s) #masks-out unwanted part of the plot # Zebra-pattern creation # The pattern line is created from 2 layers # lower layer: thicker, black solid line # top layer: thinner, dashed white line patch1s = patches.PathPatch(polygon1s, facecolor='none', ec="black", lw=7, zorder=100) patch1v = patches.PathPatch(polygon1v, facecolor='none', ec="white", lw=6, zorder=101) ax.add_patch(patch1s) ax.add_patch(patch1v) ax.gridlines(draw_labels=True, x_inline=False, y_inline=False) ax.add_feature(cartopy.feature.OCEAN, linewidth=.3, color='lightblue') ax.add_feature(cartopy.feature.LAND, zorder=1, edgecolor='black') ax.title.set_text("Map with zebra border line") plt.show() ``` [](https://i.stack.imgur.com/8NDe1.png)
null
CC BY-SA 4.0
null
2022-10-30T18:54:43.300
2022-12-20T02:23:49.530
2022-12-20T02:23:49.530
2,177,413
2,177,413
null
74,256,024
2
null
74,252,299
0
null
Quick solution for Android Only - [https://www.npmjs.com/package/react-native-android-open-settings](https://www.npmjs.com/package/react-native-android-open-settings)
null
CC BY-SA 4.0
null
2022-10-30T19:16:11.393
2022-10-30T19:16:11.393
null
null
12,431,576
null
74,257,086
2
null
56,912,675
0
null
If anyone sees this, i had the same issue and as Divye has suggested, it is indeed the format of the JSON > Object > Arrays. Mine, although numeric values, were actually a string and when i converted them using the below, the chart updated as expected. ``` // set up array let flow = [] // extract the key data from the JSON Object.entries(JSONDATA.OBJECT).forEach(([key, value]) => { // console.log(key) flow.push(value) // console.log(`${key} ${value}`) }) // CONVERT TO INT flow = flow.map(Number) ```
null
CC BY-SA 4.0
null
2022-10-30T22:04:33.537
2022-10-30T22:05:10.223
2022-10-30T22:05:10.223
15,078,971
15,078,971
null
74,257,308
2
null
74,257,168
0
null
Range filters are [allowed on one field](https://firebase.google.com/docs/firestore/query-data/queries#compound_queries:%7E:text=Range%20filters%20on%20only%20one%20field), not multiple fields. For your query, you would need to setup an index since it would be a compound query against more than one value (an array query and a date query). I just ran the query in the query builder on the firestore page and was able to query using something akin to: ``` FirebaseFirestore.instance .collection('Schedule') .where("Schedule_Employees", arrayContains: "$Employee_NAME") .where("timestamp", isLessThan: someFutureTimestamp) .where("timestamp", isGreaterThanOrEqualTo: somePastTimestamp) .snapshots() ``` Have you tried a query like this against your database? If this works, it should save on costs of reads from the database, whereas your workaround looks like it loads all documents and then does client side filtering. Sorry, I just saw your document structure, you are correct that one dimension ranges are supported. I was under the assumption that your time field was in one field only.
null
CC BY-SA 4.0
null
2022-10-30T22:52:57.103
2022-10-30T22:52:57.103
null
null
3,946,096
null
74,258,695
2
null
27,634,242
0
null
Try ``` CONCAT(ED.dependent_name,CONCAT('(',CONCAT(ED.date_of_birth, ')'))) ```
null
CC BY-SA 4.0
null
2022-10-31T04:16:14.083
2022-10-31T04:16:14.083
null
null
18,483,031
null
74,259,278
2
null
74,259,241
0
null
In the element definition of your code (i.e. `<div ...>`), use the following code: ``` style="border: '0px' !important" ``` So, it is gonna be like: ``` <div style="border: '0px' !important" ...> .... </div> ``` Note: do not forget to use `!important`. It is important!
null
CC BY-SA 4.0
null
2022-10-31T06:00:24.733
2022-10-31T06:00:24.733
null
null
11,856,099
null
74,259,307
2
null
74,259,026
0
null
If need subtract maximal dates per customers use [GroupBy.transform](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.core.groupby.DataFrameGroupBy.transform.html) with [Series.sub](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.sub.html), last if necessary convert timedeltas to days by [Series.dt.days](http://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.dt.days.html): ``` df['date'] = pd.to_datetime(df['date']) df['dur'] = df.groupby('customer')['date'].transform('max').sub(df['date']).dt.days ```
null
CC BY-SA 4.0
null
2022-10-31T06:05:04.970
2022-10-31T06:05:04.970
null
null
2,901,002
null
74,259,588
2
null
74,259,241
0
null
It should be possible unless cloudflare uses an i frame - which i am unsure you can style. To style it go to your browser dev tools and find the div or element that has the style associated with it and get the class or id name and style it using css. E.G: div class="captcha" ``` .captcha { border: none !important; } ```
null
CC BY-SA 4.0
null
2022-10-31T06:43:52.647
2022-10-31T06:45:18.980
2022-10-31T06:45:18.980
16,113,187
16,113,187
null
74,259,627
2
null
71,080,518
0
null
Only two steps are required. 1. Install Visual Studio 2022 (Link: https://visualstudio.microsoft.com/downloads/) 2. Install Visual Studio Code (Link: https://code.visualstudio.com/) Your code will run smoothly.
null
CC BY-SA 4.0
null
2022-10-31T06:48:48.737
2022-10-31T06:48:48.737
null
null
7,330,867
null
74,259,820
2
null
73,853,420
0
null
Each Bench has it's own Python `env` which is where Frappe apps & their Python dependencies are installed. This directory can be found under the respective bench's root - `/home/erp/frappe-bench` in your case. You have tell VS Code to use the Python interpreter from that environment. You can do that by either - You may follow the instructions mentioned in [the docs](https://code.visualstudio.com/docs/python/environments#_work-with-python-interpreters) or [this YouTube video](https://www.youtube.com/watch?v=GqTsFOtZiQI&ab_channel=GalvanizeDataScience). - Simply cd into your bench and open VS Ccode from there - `cd /home/erp/frappe-bench && code .` and VS Code detects the env folder automatically and uses it as the active interpreter.
null
CC BY-SA 4.0
null
2022-10-31T07:11:35.833
2022-10-31T07:11:35.833
null
null
10,309,266
null
74,260,114
2
null
27,469,952
7
null
You could use Le Git Graph, a browser extension that does exactly this. [](https://i.stack.imgur.com/PnHGO.png) Install the extension from here : [https://chrome.google.com/webstore/detail/le-git-graph-commits-grap/joggkdfebigddmaagckekihhfncdobff](https://chrome.google.com/webstore/detail/le-git-graph-commits-grap/joggkdfebigddmaagckekihhfncdobff) It will add a new "commits" section to every GitHub repo you open. Open the commits graph and there, all commits across branches will be listed along with the git graph. [](https://i.stack.imgur.com/yJjMj.png) Hope it helps!
null
CC BY-SA 4.0
null
2022-10-31T07:44:06.007
2022-11-03T11:32:22.703
2022-11-03T11:32:22.703
18,636,118
18,636,118
null
74,260,856
2
null
47,901,318
0
null
``` viewController.navigationItem .setValuesForKeys(["__largeTitleTwoLineMode": true]) ``` > WARNING: This method does not work on older OS versions
null
CC BY-SA 4.0
null
2022-10-31T08:58:06.033
2022-10-31T08:58:06.033
null
null
15,692,162
null
74,260,993
2
null
64,072,895
0
null
Here this link leads you to an online embed tool that automatically creates Discord embeds according to your wishes and ideas. this could certainly help you. Just try this: -> [https://autocode.com/tools/discord/embed-builder/](https://autocode.com/tools/discord/embed-builder/)
null
CC BY-SA 4.0
null
2022-10-31T09:09:41.000
2022-11-07T13:49:36.683
2022-11-07T13:49:36.683
19,772,927
19,772,927
null
74,261,581
2
null
63,095,851
3
null
I am afraid most answers here fail to mention that switching from `SecureField` to `TextField` reduces security. `SecureField` is essentially, per Apple documentation, simply a `TextField` where user input is masked [1]. However, `SecureField` also does one other job - it prevents using third-party keyboards (keyboard extensions) and thus protects user's security and privacy. Ideal solution would be to have input field that is both "secure" and has `mask()`/`unmask()` methods. Unfortunately, the only advice I found is when you want to implement unmasking as other answers suggested, at least block third-party keyboards from your application entirely [2]: ``` class AppDelegate: NSObject, UIApplicationDelegate { func application(_ application: UIApplication, shouldAllowExtensionPointIdentifier extensionPointIdentifier: UIApplication.ExtensionPointIdentifier) -> Bool { return extensionPointIdentifier != UIApplication.ExtensionPointIdentifier.keyboard } } @main struct MyApplication: App { @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate var body: some Scene { WindowGroup { ContentView() } } } ``` Should also mention that `UIApplicationDelegate` is part of UIKit, not SwiftUI. There is no "native" SwiftUI for the same purpose as for now, although the above works fine for now. 1. https://developer.apple.com/documentation/swiftui/securefield 2. https://www.securing.pl/en/third-party-iphone-keyboards-vs-your-ios-application-security/
null
CC BY-SA 4.0
null
2022-10-31T09:59:08.507
2022-10-31T09:59:08.507
null
null
13,897,768
null
74,261,761
2
null
74,144,860
0
null
Markdown uses underscores to produce italics, and in systems that don't protect the mathematics from being processed by markdown, that can lead to HTML tags being inserted in the middle of the mathematics. Note that in your screen shot of the un-typeset mathematics, the underscore for `1_n` is missing, and the text following it, up to the missing underscore for `y_{i1}` are in italics. That means Markdown has processed and removed this underscores and inserted tags to produce italics. Since MathJax doesn't process math containing HTML tags, that is why the math isn't being processed. See the [MathJax documentation](https://docs.mathjax.org/en/latest/input/tex/html.html#interactions-with-content-management-systems) for more details. One solution is to use `\_` rather than `_` for the underscores, as that will prevent Markdown from processing them, and they will be sent to MathJax as plain underscores.
null
CC BY-SA 4.0
null
2022-10-31T10:15:04.850
2022-10-31T10:15:04.850
null
null
502,334
null
74,261,866
2
null
74,261,797
0
null
Like this: ``` select count(distinct country) as "Number of Countries" FROM owid_energy_data where len(iso_code) = 3 ```
null
CC BY-SA 4.0
null
2022-10-31T10:24:05.447
2022-10-31T10:24:05.447
null
null
22,194
null
74,262,188
2
null
74,261,797
1
null
if you are looking to extract all the distinct names of countries from a column where you have first three letters always as a country name then use this: ``` select distinct left(country,3) as country from owid_energy_data ``` selecting the countries, where the iso_code (first column) has only three letters: ``` select distinct country as countries from owid_energy_data where length(iso_code) = 3 ``` if you want the count then simply add count to one of the above: ``` select count(distinct country) as total_countries from owid_energy_data ```
null
CC BY-SA 4.0
null
2022-10-31T10:54:18.653
2022-10-31T11:05:28.597
2022-10-31T11:05:28.597
12,513,693
12,513,693
null
74,262,198
2
null
74,261,797
0
null
``` SELECT OED.COUNTRY AS [NUMBER OF COUNTRIES] FROM OWID_ENERGY_DATA OED WHERE LEN(OED.COUNTRY) < 3 ``` Try that!
null
CC BY-SA 4.0
null
2022-10-31T10:55:02.523
2022-10-31T10:55:02.523
null
null
20,167,795
null
74,262,667
2
null
74,262,396
0
null
I think you could use the (stacked100 plugin) [https://github.com/y-takey/chartjs-plugin-stacked100](https://github.com/y-takey/chartjs-plugin-stacked100) in order to the stacks are proportionally calculated on 100% of scale dimension
null
CC BY-SA 4.0
null
2022-10-31T11:35:19.817
2022-10-31T11:35:19.817
null
null
2,057,925
null
74,263,111
2
null
15,571,022
1
null
In my case, I set `validateImageData` to `false`: ``` Image.FromStream(stream, validateImageData: false); ``` solution: ``` Image.FromStream(stream, validateImageData: true); ```
null
CC BY-SA 4.0
null
2022-10-31T12:13:44.723
2022-10-31T12:13:44.723
null
null
14,919,621
null
74,263,423
2
null
74,261,800
0
null
Experimented a bit with scaling the location. Following code seems to work but i still expect some problems. I presumably mixed up x,y height,width somewhere. Just push the e.Location through this everytime you need the location relative to the image . I used Sizemode = Zoom for this. ``` private Point GetScaledImageLocation(Point location) { double imgWidth = pictureBox1.Image.Width; double imgHeight = pictureBox1.Image.Height; double boxWidth = pictureBox1.Size.Width; double boxHeight = pictureBox1.Size.Height; double X = location.X; double Y = location.Y; double scale; if (imgWidth / imgHeight > boxWidth / boxHeight) { scale = boxWidth / imgWidth; double blankPart = (boxHeight - scale * imgHeight) / 2; Y -= blankPart; } else { scale = boxHeight / imgHeight; double blankPart = (boxWidth - scale * imgWidth) / 2; X -= blankPart; } X /= scale; Y /= scale; return new Point((int)Math.Round(X), (int)Math.Round(Y)); } ```
null
CC BY-SA 4.0
null
2022-10-31T12:40:37.630
2022-10-31T12:40:37.630
null
null
777,522
null
74,263,508
2
null
26,303,782
0
null
For me, it's because of the global variables. There is a class which has a global variable like: ``` CGFloat cellHeight = 65; ``` And I build a new class which is not connected to the first class and it get the same variable too. That's say: ``` CGFloat cellHeight = 80; ``` So because of it, the problem came. The solution is to add a `static` to modify it, so it will just work fine. ``` static CGFloat cellHeight = 80; ```
null
CC BY-SA 4.0
null
2022-10-31T12:47:29.323
2022-10-31T12:47:29.323
null
null
12,045,492
null
74,263,760
2
null
74,256,536
1
null
I don't think your code is working but maybe this can guide you a bit: ``` import os from glob import glob from openpyxl import load_workbook def copy_data(src_file: str, dst_file: str) -> None: # open files ws_src = load_workbook(src_file)["Report Data"] wb_dst = load_workbook(dst_file, keep_vba=True) ws_dst = wb_dst["Sheet1"] # configuration start_row_src = 2 # A2 start_row_dst = 10 # A10 rows2copy = 100000 # copy data from src_file to dst_file input_offset = start_row_dst - start_row_src for i in range(start_row_src, rows2copy): ws_dst[f"A{i}"].value = ws_src[f"A{i + input_offset}"].value ws_dst[f"B{i}"].value = ws_src[f"B{i + input_offset}"].value # save the modifications wb_dst.save(dst_file) # files directories src_dir_path = "your/source/files/directory" dst_dir_path = "your/destination/files/directory" # iterate over all excel files found in source path workbooks = glob(f"{src_dir_path}/*.xlsx") for src in workbooks: dst = dst_dir_path + '/' + os.path.basename(src).replace("_Report.", "_2023.") copy_data(src, dst) ``` The idea is to scan for all input files and then call the `copy_data` function for each one. You will have to tweak it a bit to your needs.
null
CC BY-SA 4.0
null
2022-10-31T13:06:57.177
2022-10-31T13:06:57.177
null
null
18,342,123
null
74,264,123
2
null
74,264,081
3
null
application.properties file should be located in the resource directory.
null
CC BY-SA 4.0
null
2022-10-31T13:37:42.953
2022-10-31T13:37:42.953
null
null
3,186,906
null
74,264,220
2
null
72,069,258
0
null
kindly ensure the variables defined are consistent: Compare in your .env.local File and Firebase.init.js File ``` REACT_APPapiKey !== REACT_APP_apiKey ``` Also check how you are importing in the component where it's used
null
CC BY-SA 4.0
null
2022-10-31T13:45:36.837
2022-10-31T13:45:36.837
null
null
14,235,396
null
74,264,384
2
null
12,959,586
0
null
If some is still facing issue here is solution which worked for me ``` right click on project -> build path -> configure build path -> order & export -> check JRE system libraries 1.5 and maven dependancy ```
null
CC BY-SA 4.0
null
2022-10-31T13:56:27.563
2022-10-31T13:56:27.563
null
null
12,403,754
null
74,264,419
2
null
74,264,081
0
null
The problem has been solved. The home directory for the run configuration needs to be set to the folder containing the resources folder. Which it wasn't before. Folder Structure now:[](https://i.stack.imgur.com/vka0C.png)
null
CC BY-SA 4.0
null
2022-10-31T13:59:06.950
2022-11-04T08:44:48.113
2022-11-04T08:44:48.113
20,377,250
20,377,250
null
74,264,851
2
null
74,264,159
1
null
If your data is shaped like this: ``` const data = [ { name: "Customer Service", num: '56', dept:'custserv' }, { name: "Human Resources", num: '21', dept:'hr' }, { name: "Quality Assurance", num: '13', dept:'qa' }, { name: "Marketing", num: '30', dept:'mark' }, { name: "Research and Development", num: '17', dept:'rnd' }, { name: "Operations", num: '49', dept:'ops' }, { name: "Sales", num: '37', dept:'sales' }, { name: "Distribution", num: '26', dept:'dist' }, { name: "IT", num: '12', dept:'it' }, ] ``` Then to produce the table rows you'd just have to do the following: ``` const Button = ({ dept }) => ( <button onClick={() => router.push(`/${dept}`)}>View Department</button> ); const TableRow = ({ item }) => ( <tr> <td>{item.name}</td> <td>{item.num}</td> <td> <Button dept={item.dept} /> </td> </tr> ); const TableHeadItem = ({ item }) => <th>{item.heading}</th>; export default function Table({data, column}) { return ( <table> <thead> <tr> {column.map((item, index) => ( <TableHeadItem item={item} key={index} /> ))} </tr> </thead> <tbody> {data.map((item) => ( <TableRow item={item} key={item.num} /> ))} </tbody> </table> ); } ```
null
CC BY-SA 4.0
null
2022-10-31T14:30:26.927
2022-10-31T14:30:26.927
null
null
3,577,849
null
74,265,535
2
null
74,264,354
1
null
To get you started: You could extract the breaks and apply those to make it at least "semi-automatic": ``` library(ggplot2) p1 <- ggplot(mtcars, aes(x = hp, y = mpg, color = factor(am))) brk <- ggplot_build(p1)$layout$panel_params[[1]]$y$breaks brk <- brk[-c(1, length(brk))] ggplot(mtcars, aes(x = hp, y = mpg, color = factor(am))) + geom_point() + coord_polar() + labs(color = 'am') + theme(axis.ticks.y=element_blank(), axis.text.y=element_blank())+ annotate('text', x = 0, y = brk, label = as.character(brk)) ``` ![](https://i.imgur.com/PwNFqON.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2022-10-31T15:26:51.713
2022-10-31T15:26:51.713
null
null
12,728,748
null
74,266,035
2
null
74,264,081
1
null
Spring has certain order for finding application.properties Reference : [https://docs.spring.io/spring-boot/docs/1.0.1.RELEASE/reference/html/boot-features-external-config.html](https://docs.spring.io/spring-boot/docs/1.0.1.RELEASE/reference/html/boot-features-external-config.html) SpringApplication will load properties from application.properties files in the following locations and add them to the Spring Environment: - - - - The list is ordered by precedence (locations higher in the list override lower items).
null
CC BY-SA 4.0
null
2022-10-31T16:05:14.880
2022-10-31T16:05:14.880
null
null
6,722,664
null
74,266,080
2
null
74,265,952
2
null
Change your label function to ``` label=function(x) { print(x) x } ``` and you will see ``` [1] NA 1970 1980 1990 2000 2010 NA ``` suggesting that ``` df %>% ggplot() + geom_bar(aes(x = seq_year, y=values), stat="identity")+ scale_x_continuous( label=function(x) { y <- str_replace(x, regex("^\\d{2}"), "'") y[2] <- "1970" y } ) ``` Will give you what you want: [](https://i.stack.imgur.com/J600l.png)
null
CC BY-SA 4.0
null
2022-10-31T16:08:24.847
2022-10-31T16:08:24.847
null
null
13,434,871
null
74,266,260
2
null
74,265,952
1
null
Here is a solution in case you do not want to set the first value manually. ``` df %>% ggplot() + geom_bar(aes(x = seq_year, y = values), stat="identity")+ scale_x_continuous(label=function(x) c(x[1:2], str_replace(x[3:length(x)], regex("\\d{2}"), "'"))) ```
null
CC BY-SA 4.0
null
2022-10-31T16:21:39.013
2022-10-31T16:21:39.013
null
null
20,377,411
null
74,266,925
2
null
74,223,524
0
null
For anyone still struggling here is the steps I took to fix this problem: Firstly, I have the field Date_Ran as a Date/Time, formatted to short date. Another form has an on-dbl-click event where it inserts today's date in the field. Turns out when you use =Date() in VBA is assigns it a default Variant type. For whatever reason I believe this was what caused the error. The second I switched to using =Date$() it inserts today's date as a string and the error has stopped. Good luck!
null
CC BY-SA 4.0
null
2022-10-31T17:17:42.000
2022-10-31T17:17:42.000
null
null
19,307,074
null
74,266,968
2
null
74,266,864
0
null
The fact that some library functions are inline is irrelevant, the compiler can evaluate any pure code at compile time and reduce it to its result as constants in the object code. How much of that is performed for a given piece of code depends on optimisation settings and performance with thresholds determined by the compiler implementors. In your case, it seems the compiler can optimise the computation of these initializers when you declare the function as `inline`, probably because you call it with constant or even literal values. The intializers are probably computed at compile time and the resulting values are used in expressions as constants without even getting stored in the local variables.
null
CC BY-SA 4.0
null
2022-10-31T17:21:17.270
2022-10-31T17:21:17.270
null
null
4,593,267
null
74,268,186
2
null
23,359,572
0
null
You have " ' " symbol in your strings or arrays somewhere ... erase it !!! I have LET'S DOI IT , after erasing " ' " and LET'S was LETS , problem disapered
null
CC BY-SA 4.0
null
2022-10-31T19:20:09.630
2022-10-31T19:20:09.630
null
null
7,072,037
null
74,268,347
2
null
23,674,131
0
null
I saw many people giving difficult answers, the to the point answer through which I fixed my issue is just go to the project/android folder/app using terminal, this is where you debug.keystore file is ``` keytool -exportcert -alias androiddebugkey -keystore debug.keystore | openssl sha1 -binary | openssl base64 ``` copy and paste this command, replace the and used the same password which is in your project/android/app/build.gradle ``` debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' <---- alias keyPassword 'android' <---- password } ```
null
CC BY-SA 4.0
null
2022-10-31T19:38:37.513
2022-10-31T19:38:37.513
null
null
8,989,891
null
74,268,492
2
null
74,247,315
0
null
Got it working by passing an object "socket" and a property "domain" in there which has a custom port in it. There should be property "port" too but it doest seem to be used? [This](https://github.com/BrowserSync/browser-sync/blob/a4aa8ebf65abda69c47667573b3be5aaf79b63eb/packages/browser-sync/lib/connect-utils.js#L165) is the relevant method in browser-sync sources ``` mix.browserSync({ proxy: "http://node:3000", // name of the service in docker-compose.yml, running on http cause webservers handels encryption host: "node", // ip of the service container open: false, port: 3000, socket: { domain: 'mycustomdomain:18208', //port : 18208 }, logConnections: true, // not needed, debugging stuff logLevel: "info", // not needed, debugging stuff debug/info/silent // browsersync features to transfer clicks, scroll and form inputs via websocket ghostMode: { clicks: false, forms: false, scroll: false, }, }); ```
null
CC BY-SA 4.0
null
2022-10-31T19:52:53.770
2022-10-31T19:52:53.770
null
null
9,913,009
null
74,269,005
2
null
74,241,618
0
null
For future generations - the problem was with a settings for sending credentials in Apollo's v4 playground. By default, this option is set to "omit" and interestingly it cannot be changed. 1. The solution is to install the package and import in your server's config file: ``` import expressPlayground from "graphql-playground-middleware-express"; ``` 1. Put that somewhere at the bottom of the code: ``` app.get("/playground", expressPlayground({ endpoint: "/graphql" })); ``` 1. Hit the /playground route and find settings button. Change credentials option: ``` "request.credentials": "include", ```
null
CC BY-SA 4.0
null
2022-10-31T20:52:33.800
2022-11-03T16:18:09.850
2022-11-03T16:18:09.850
14,267,427
14,159,338
null
74,269,207
2
null
64,984,549
0
null
Sometimes some files are stucking to me at analazying, I resolve that issue by: 1. Just copy / paste that file with the different name 2. Then remove the original file and rename the copied file with the original name.
null
CC BY-SA 4.0
null
2022-10-31T21:19:59.470
2022-10-31T21:19:59.470
null
null
5,236,016
null
74,269,377
2
null
74,268,822
1
null
find your points like this: ``` im = Image.open('Nkuf9.png') data = np.array(im)[:,:,0] wpoint = np.where(data == 255) points = set((x, y) for x, y in zip(*wpoint) ) ``` and a simple dfs to find each connected region, you could put all in a class. ``` def generate_neighbours(point): neighbours = [ (1, -1), (1, 0),(1, 1), (0, -1), (0, 1), (1, -1), (1, 0),(-1, 1) ] for neigh in neighbours: yield tuple(map(sum, zip(point, neigh))) def find_regions(p , points): reg = [] seen = set() def dfs(point): if point not in seen: seen.add(point) if point in points: reg.append(point) points.remove(point) for n in generate_neighbours(point): dfs(n) dfs(p) return reg region =[] while points: cur = next(iter(points)) reg = find_regions(cur, points) region.append(reg.copy()) areas = {idx: area for idx, area in enumerate(map(len,region))} areas = sorted(areas.items(), key=lambda x: x[1], reverse=True) num = 2 for idx, area in enumerate(areas[:num]): plt.subplot(1,num, idx + 1) im = np.zeros((512, 512)) for x,y in region[area[0]]: im[x,y] = 255 plt.imshow(im) ``` [](https://i.stack.imgur.com/5gzgW.png)
null
CC BY-SA 4.0
null
2022-10-31T21:40:19.667
2022-11-01T11:06:03.133
2022-11-01T11:06:03.133
4,529,589
4,529,589
null
74,270,298
2
null
53,509,911
0
null
One thing I understood from my experience trying to fit auto encoders, is that they are not easy to fit. But I would check these elements: 1. LSTM doesn't do good with non-stationary data. Instead of learning the variability in the data it would try to learn the trend. So de-trending would be a good step to add to your data before hand. Now, to do that, one easy way is to calculate the difference of data with its previous timestamp. Then at each timestep you would have x[i]-x[i-1] instead of x[i]. You can experiment with different orders of de-trending based on your data and its trend/seasonality. For example, if you expect the data has weekly seasonality, another order to check would be 7 days (if each timestep is a day) and your data would be x[i]-x[i-7]. 2. Experiment with the architecture of the auto-encoder. depending on the sequence length 32 hidden units might not be enough to encode the data properly and keep enough information. 3. Use Bidirectional layers. Sometimes I use Conv1D as well. 4. Don't need to be Symmetrical. So be creative.
null
CC BY-SA 4.0
null
2022-11-01T00:22:16.460
2022-11-01T00:22:16.460
null
null
13,528,142
null
74,270,795
2
null
74,260,768
0
null
well I found one way of doing this ``` regex = ( r"[\S+\- ]* +Link States ?[\(Area \S+\)]*\n" r"\n*" r"(Link ID +ADV Router +Age) +Seq# +[\S+ ]*" r"\n*" r"(?:([\d+\.]+ +[\d+\.]+ +[\d+]+)?) *\S+ *\S+ *\S*\n*" r"(?:([\d+\.]+ +[\d+\.]+ +[\d+]+)? +\S+ +\S+ *[\d+]*\n)?" r"(?:([\d+\.]+ +[\d+\.]+ +[\d+]+)? +\S+ +\S+ *[\d+]*\n)?" r"(?:([\d+\.]+ +[\d+\.]+ +[\d+]+)? +\S+ +\S+ *[\d+]*\n)?" r"(?:([\d+\.]+ +[\d+\.]+ +[\d+]+)? +\S+ +\S+ *[\d+]*\n)?" r"(?:([\d+\.]+ +[\d+\.]+ +[\d+]+)? +\S+ +\S+ *[\d+]*\n)?" r"(?:([\d+\.]+ +[\d+\.]+ +[\d+]+)? +\S+ +\S+ *[\d+]*\n)?" ) ``` I am wondering if there's a way to nest the regex into a single line, and to match on 1 or more matches? I'm trying to avoid a match of "None" if the match doesn't exist
null
CC BY-SA 4.0
null
2022-11-01T02:05:33.603
2022-11-01T02:05:33.603
null
null
20,217,852
null
74,270,811
2
null
13,106,121
0
null
``` .grid-container { display: grid; grid-template-columns: 1fr 1fr 1fr; } .left, .right { margin: 30px; } ``` ``` <section class="grid-container"> <div class="left"> <p>Column 1, lorem ipsum dolor bla bla dogs and cats</p> </div> <div></div> <div class="right"> <p>Column 3, lorem blops dolor bla laa cats and dogs</p> </div> <section> ``` This is an old post but I thought of sharing my thoughts for beginners like me... I suggest adding an empty div between the two paragraphs in your html and use display grid in your css. You can adjust the grid size the way you want it.
null
CC BY-SA 4.0
null
2022-11-01T02:09:02.530
2022-11-01T02:11:56.873
2022-11-01T02:11:56.873
20,384,019
20,384,019
null
74,271,338
2
null
74,271,155
1
null
I believe you are looking to right justify the numbers while also enforcing 3 characters of width so your printed board retains its formatting. To do this, you can eliminate the caret character from your print statements, which will allow the printed values to right justify. The caret signifies that you are centering the text, which will cause it to leave trailing character(s). This should eliminate your trailing whitespace: ``` print('{:3d}'.format((len(plane)*w+e)), end="") ```
null
CC BY-SA 4.0
null
2022-11-01T03:48:24.450
2022-11-01T03:48:24.450
null
null
16,856,522
null
74,271,352
2
null
74,271,082
0
null
I have fixed it, the problem was Django was using the serializers imported from the django.core package instead of using rest_framework, which I specified. To fix the problem, I had to override that by giving it an alias, then using the alias instead. [](https://i.stack.imgur.com/OwZiY.png) If you have an easier solution, please share
null
CC BY-SA 4.0
null
2022-11-01T03:51:08.823
2022-11-01T03:51:08.823
null
null
7,949,741
null
74,271,518
2
null
74,271,155
0
null
This will do want you want. Changed `end` to vary if it was the end of a line and used periods(.) to make the spaces visible for demonstration. Refactored a bit to remove redundant code: ``` def printBoard(plane): i=0 for values in plane: for col,value in enumerate(values): text = ' X' if value==1 else ' O' if value==-1 else f'{i:2d}' print(text, end='\n' if col==len(values)-1 else '.') i += 1 plane = [[0]*6 for _ in range(6)] printBoard(plane) plane[1][1] = 1 plane[1][5] = 1 plane[2][2] = -1 plane[2][5] = -1 print() printBoard(plane) ``` Output: ``` 0. 1. 2. 3. 4. 5 6. 7. 8. 9.10.11 12.13.14.15.16.17 18.19.20.21.22.23 24.25.26.27.28.29 30.31.32.33.34.35 0. 1. 2. 3. 4. 5 6. X. 8. 9.10. X 12.13. O.15.16. O 18.19.20.21.22.23 24.25.26.27.28.29 30.31.32.33.34.35 ```
null
CC BY-SA 4.0
null
2022-11-01T04:22:54.150
2022-11-01T04:35:34.127
2022-11-01T04:35:34.127
235,698
235,698
null
74,271,847
2
null
22,743,457
1
null
> Aqui lo que me ayudo a solucionarlo: ``` .checkbox-xl .form-check-input { scale: 2.5; } .checkbox-xl .form-check-label { padding-left: 25px; } ``` ``` <div class="form-check checkbox-xl"> <input class="form-check-input" type="checkbox" value="1" id="checkbox-3" name="check1"/> <label class="form-check-label" for="checkbox-3">Etiqueta</label> </div> ```
null
CC BY-SA 4.0
null
2022-11-01T05:24:50.237
2022-11-01T05:24:50.237
null
null
8,317,703
null
74,272,162
2
null
69,709,251
1
null
In my case, there was something wrong with the latest PyCharm Community Edition of 2022.2.3 version (build ID: 222.4345.23). I tried everything mentioned here with no vain. After spending several hours, just downgraded to version 2021.3.2 version of PyCharm community edition, and it just worked. Hope this helps.
null
CC BY-SA 4.0
null
2022-11-01T06:15:10.533
2022-11-01T06:15:10.533
null
null
20,385,228
null
74,272,594
2
null
73,264,271
0
null
[https://cdmoro.github.io/bootstrap-vue-3/](https://cdmoro.github.io/bootstrap-vue-3/) Use this its not fully released but works well, I'm using it in a several projects cheers
null
CC BY-SA 4.0
null
2022-11-01T07:10:18.870
2022-11-01T07:10:18.870
null
null
1,731,070
null
74,272,951
2
null
15,857,647
1
null
As a reminder, the plt.savefig() should be written before the plt.show(), otherwise, a transparent image will be created (without the actual plot). For high-quality images: ``` plt.savefig('filename.png', format='png', dpi='600', transparent=True) plt.show() ```
null
CC BY-SA 4.0
null
2022-11-01T07:52:44.517
2022-11-11T08:18:32.300
2022-11-11T08:18:32.300
18,609,533
18,609,533
null
74,272,971
2
null
10,588,394
0
null
First of all, you need to add an alpha channel to your texture and save it in a format that supports alpha channel transparency. Here is a quick tutorial on how to do this in GIMP: [](https://i.stack.imgur.com/pqUWy.gif) Note that you can remove the selected background with the -key. In my case, I'm exporting the result as a PNG for alpha transparency support. You can do this from the export menu by renaming the file suffix to : [](https://i.stack.imgur.com/3YoDn.png) I use these settings to export my PNG: [](https://i.stack.imgur.com/cVJ59.png) Then, after importing the image into Unity, Make sure that in the texture's import settings the image's alpha source is set to and that tickbox is checked like so: [](https://i.stack.imgur.com/zXAUR.png) Finally, since you are using this on a mesh, you need to ensure that your mesh has a material applied that has it's render mode set to : [](https://i.stack.imgur.com/cZ8oI.png) Hope this little guide helps.
null
CC BY-SA 4.0
null
2022-11-01T07:55:12.910
2022-11-01T07:55:12.910
null
null
10,035,529
null
74,273,345
2
null
74,272,876
0
null
Quoted from `man acl`: > • For files that have a default ACL or an access ACL that contains more than the three required ACL entries, the ls(1) utility in the long form produced by `ls -l` displays a plus sign (+) after the permission string. i.e. it means Access Control Lists in effect.
null
CC BY-SA 4.0
null
2022-11-01T08:36:56.083
2022-11-01T08:36:56.083
null
null
1,030,675
null
74,273,568
2
null
74,272,579
1
null
This can give you an idea of how to possibly do it: ``` import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatefulWidget { MyApp({super.key}); @override State<MyApp> createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { final List<Map<String, dynamic>> category = [ { "name": "One", "detail": ['11', '12', '13', '14'] }, { "name": "two", "detail": ['21', '22', '23', '24'] }, { "name": "three", "detail": ['31', '32', '33', '34'] }, ]; late final List data; String? selectedItem; @override void initState() { data = [ for (final item in category) for (final value in item.values) if (value is List) for (final listValue in value) {'value': listValue, 'bold': false} else {'value': value, 'bold': true} ]; super.initState(); } @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: Center( child: DropdownButton<String>( value: selectedItem, items: [ for (final item in data) item['bold'] == true ? DropdownMenuItem( enabled: false, child: Text(item['value'], style: const TextStyle( fontWeight: FontWeight.bold))) : DropdownMenuItem( value: item['value'], child: Padding( padding: const EdgeInsets.only(left: 8), child: Text(item['value']), )) ], onChanged: (value) { setState(() { selectedItem = value; }); })))); } } ``` Output: [](https://i.stack.imgur.com/ufuaj.png) In the `initState` I transform the data in a way so you have a list where each item corresponds to a dropdown item. With additional info whether it should be bold or not
null
CC BY-SA 4.0
null
2022-11-01T09:00:02.873
2022-11-01T09:00:02.873
null
null
1,514,861
null
74,273,817
2
null
19,744,120
0
null
``` /** * Add a shape to bitmap. */ fun addShapeToBitmap(originBitmap: Bitmap): Bitmap { val stream = ByteArrayOutputStream() // **create RectF for a rect shape** val rectF = RectF() rectF.top = originBitmap.height / 2f - 100f rectF.bottom = originBitmap.height / 2f + 100f rectF.left = originBitmap.width / 2f - 100f rectF.right = originBitmap.width / 2f + 100f // **create a new bitmap which is an empty bitmap** val newBitmap = Bitmap.createBitmap(originBitmap.width, originBitmap.height, originBitmap.config) // **create a canvas and set the empty bitmap as the base layer** val canvas = Canvas(newBitmap) // **draw the originBitmap on the first laye canvas.drawBitmap(originBitmap, 0f, 0f, null) // **draw the shape on the second layer** // **the second layer cover on the first layer** canvas.drawRect(rectF, paint) newBitmap.compress(Bitmap.CompressFormat.PNG, 100, stream) newBitmap.recycle() return newBitmap } ```
null
CC BY-SA 4.0
null
2022-11-01T09:26:02.937
2022-11-01T09:26:02.937
null
null
4,845,808
null
74,274,376
2
null
74,260,458
0
null
it was a bit tricky as it doesn't work exactly as the web. here's the commit that worked → [https://github.com/deadcoder0904/princexml-playground/commit/b84717e8ddb0ea72761efa15f6c8658cfbaeea73](https://github.com/deadcoder0904/princexml-playground/commit/b84717e8ddb0ea72761efa15f6c8658cfbaeea73) ### index.html ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" href="https://rsms.me/inter/inter.css" /> <link rel="stylesheet" href="./index.css" /> <title>princexml playground</title> </head> <body> <div class="container"> <section class="frontcover"> <h1>princexml playground</h1> <span>akshay kadam (a2k)</span> </section> </div> </body> </html> ``` ### styles/index.css ``` @import 'tailwindcss/base'; /* common base styles */ @import './base.css'; /* use this to style the web */ @import './screen.css'; /* use this only for print */ @import './print.css'; @import 'tailwindcss/components'; @import 'tailwindcss/utilities'; ``` ### styles/base.css ``` @import url('https://fonts.googleapis.com/css?family=Nova+Flat'); .frontcover { @apply mx-auto text-center; /* colors don't work using @apply for some reason... even background below */ color: theme('colors.white'); & > h1 { @apply w-full text-7xl text-white p-4 font-bold font-nova rounded-3xl absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2; background: theme('colors.slate.700'); } & > span { @apply w-full text-4xl text-white p-4 font-semibold font-sans rounded-3xl absolute bottom-0 left-1/2 -translate-x-1/2; background: theme('colors.indigo.700'); &:before { content: 'by '; } } } ``` ### styles/print.css ``` /* style the print */ @media print { @page { size: 6.6in 8.5in; margin: 70pt 60pt 70pt; } @page cover { background: url('./cover.png'); background-size: cover; } .frontcover { page: cover; page-break-after: always; } } ``` ### styles/screen.css ``` /* style the web */ @media screen { body { background: theme('colors.slate.900'); } .container { @apply mx-auto; } .frontcover { @apply max-w-xl relative bg-[url('./cover.png')] bg-cover bg-no-repeat bg-center h-screen; & > h1 { @apply text-5xl; } & > span { @apply text-2xl bottom-20 absolute; } } } ``` the `base.css` contains common styles with print & web. `print.css` is responsible for the pdf cover image. and the `screen.css` is responsible for the web cover image although it can be improved.
null
CC BY-SA 4.0
null
2022-11-01T10:14:10.360
2022-11-01T10:14:10.360
null
null
6,141,587
null
74,274,419
2
null
74,103,959
0
null
``` import java.util.Arrays; class Scratch { public static void main(String[] args) { int[] numbers = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; Arrays.stream(numbers) .filter(number -> number % 2 == 0) .findFirst() .ifPresent(System.out::println); Arrays.stream(numbers) .filter(number -> number % 2 == 11) .findFirst() .ifPresentOrElse(System.out::println, () -> System.err.println("oops")); } } ``` This will log "2" on stdOut and then "oops" on stdErr. Just adapt it to your situation.
null
CC BY-SA 4.0
null
2022-11-01T10:18:08.980
2022-11-01T10:18:08.980
null
null
1,082,681
null
74,274,847
2
null
1,194,352
0
null
Here is a Python implementation of [https://www.microsoft.com/en-us/research/publication/2016/11/Digital-Signal-Processing.pdf](https://www.microsoft.com/en-us/research/publication/2016/11/Digital-Signal-Processing.pdf) ``` import numpy as np def find_rectangle_proportion(K, m1, m2, m3, m4): # Detailed computations # https://www.microsoft.com/en-us/research/publication/2016/11/Digital-Signal-Processing.pdf # m1 = top_left, m2 = top_right, m3 = bottom_left, m4 = bottom_right # Make homeneous coordinates m1 = np.array([m1[0], m1[1], 1]) m2 = np.array([m2[0], m2[1], 1]) m3 = np.array([m3[0], m3[1], 1]) m4 = np.array([m4[0], m4[1], 1]) # (11) k2 = np.dot(np.cross(m1, m4), m3) / np.dot(np.cross(m2, m4), m3) # (12) k3 = np.dot(np.cross(m1, m4), m2) / np.dot(np.cross(m3, m4), m2) # (14) n2 = k2 * m2 - m1 # (16) n3 = k3 * m3 - m1 inv_K = np.linalg.inv(K) KK = np.dot(inv_K.T, inv_K) # ratio width/height (20) ratio = np.sqrt(np.dot(n2, np.dot(KK, n2)) / np.dot(n3, np.dot(KK, n3))) return ratio if __name__ == "__main__": top_left = [269, 25] top_right = [800, 19] bottom_right = [805, 748] bottom_left = [273, 750] # Load intrinsic matrices from calib.py K = np.load("calibration_pixel_6a/intrinsic.npy") ratio = find_rectangle_proportion(K, top_left, top_right, bottom_left, bottom_right) print(f"ratio width/height = {ratio}") ```
null
CC BY-SA 4.0
null
2022-11-01T10:57:26.050
2022-11-01T10:57:26.050
null
null
20,387,190
null
74,275,759
2
null
74,275,591
-1
null
There seems to be a mismatch between the request method (GET,POST...) and the way you are trying to access the returned data.
null
CC BY-SA 4.0
null
2022-11-01T12:12:00.667
2022-11-01T12:12:00.667
null
null
8,724,359
null
74,276,059
2
null
74,191,324
95
null
That is caused by `1.7.0`: ``` implementation 'com.google.android.material:material:1.7.0' ``` You better stick to `1.6.0` till they fix this ``` implementation 'com.google.android.material:material:1.6.0' ```
null
CC BY-SA 4.0
null
2022-11-01T12:35:50.667
2022-11-01T12:35:50.667
null
null
20,388,006
null
74,276,116
2
null
74,275,591
0
null
The issue i had been through was that i had not made setter and getters for the object returned as it was returning multiple ienumerable objects. so setter and getters solved my problem
null
CC BY-SA 4.0
null
2022-11-01T12:41:09.470
2022-11-01T12:41:09.470
null
null
9,019,036
null
74,276,671
2
null
74,223,111
0
null
Actually, I think I've found the answer here. > For example, if you have already voted in the current term, and an incoming RequestVote RPC has a higher term that you, you should first step down and adopt their term (thereby resetting votedFor), and then handle the RPC, which will result in you granting the vote! Namely when receiving a `voteReqest` RPC with higher term, set `voteFor` to `null` and operate later log check, rather than just set `voteFor` to `null` and return false. Link: [Raft Q&A](https://thesquareplanet.com/blog/raft-qa/)
null
CC BY-SA 4.0
null
2022-11-01T13:26:06.773
2022-11-01T13:26:06.773
null
null
20,327,554
null
74,276,849
2
null
74,274,717
0
null
Connect your mobile with your laptop via Cable then it will ask for permission to allow it and you'll be connected. Once it's connected then you're good to go next time without cable using the command.
null
CC BY-SA 4.0
null
2022-11-01T13:41:00.433
2022-11-01T13:41:00.433
null
null
9,725,223
null
74,277,031
2
null
74,191,324
1
null
In build.gradle(:app), Updating, compileSdk and targetSdk to 33 helped me(from 32).
null
CC BY-SA 4.0
null
2022-11-01T13:55:26.903
2022-11-01T13:55:26.903
null
null
20,388,683
null
74,277,886
2
null
59,936,808
0
null
I got this problem and solved cleaning and resolving dependencies again on terminal: ``` $ flutter clean $ flutter pub get ``` Then click on Start with Debugging.
null
CC BY-SA 4.0
null
2022-11-01T15:02:18.450
2022-11-01T15:02:18.450
null
null
128,857
null
74,278,179
2
null
74,271,364
0
null
The problem in the following code ``` data = row.find_all('td') row_data = [td.text.strip() for td in data] length = len(df) df.loc[length] = row_data ``` is that td can have a text element, an img or some other element and you're not checking that. You can do something like ``` for row in table1.find_all('tr')[1:]: data = row.find_all('td') row_data = [] for td in data: if (td.find("img")): row_data.append(td.img.attrs.get('src').split("/")[-1]) else: row_data.append(td.text) length = len(df) df.loc[length] = row_data ``` This will output ``` A,B,C,D,E,F,G ,1.png,John,0.png,1.png,1.png,0.png ,1.png,Steve,1.png,1.png,0.png,0.png ,1.png,Mary,0.png,1.png,1.png,0.png ``` And A column is empty as expected since it only contains input type. But you can probably handle that case as well.
null
CC BY-SA 4.0
null
2022-11-01T15:27:00.870
2022-11-01T15:42:17.020
2022-11-01T15:42:17.020
13,292,382
13,292,382
null
74,278,736
2
null
74,278,564
1
null
There might be different approaches. Here is an elegant one. ``` y = df.Name.values df = pd.DataFrame({'A' : y[::2], 'B' : y[1::2]}) ```
null
CC BY-SA 4.0
null
2022-11-01T16:12:39.357
2022-11-01T16:27:57.307
2022-11-01T16:27:57.307
12,094,184
12,094,184
null
74,279,096
2
null
68,014,681
0
null
restart your Metro Bundler ``` yarn start --reset-cache ```
null
CC BY-SA 4.0
null
2022-11-01T16:41:24.607
2022-11-01T16:41:24.607
null
null
11,643,932
null
74,279,193
2
null
74,278,727
0
null
You don't need to use an image for this, you can use the `box-shadow` properties and negative values - specifically the `y` and `spread` properties. ``` #cookieConsent { width: 100%; background-color: #474540F2; position: fixed; bottom: 50px; left: 0; right: 0; z-index: 9999; box-shadow: 0px -4px 10px -2px rgb(0, 0, 0,0.4); } .cookieContainer { padding: 16px; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 12px; } .cookieConsent-txt { color: #FFFFFF; width: calc (100% - 101px); margin: 0; } #cookieConsent a.cookieConsentOK { width: 85px; height: 56px; background: #FFFFFF; display: inline-block; padding: 0 20px; display: flex; align-items: center; justify-content: center; } ``` ``` <div id="cookieConsent"> <div class="cookieContainer"> <p class="cookieConsent-txt"> This site uses cookies </p> <a class="cookieConsentOK">Aceitar Cookies</a> </div> </div> ``` If you need to use an image, set the image as a background on a pseudo element: ``` #cookieConsent::before { content: ''; display: block; background-image: url(https://via.placeholder.com/10); background-repeat: repeat-x; width: 100%; height: 10px; position: absolute; left: 0; top: -10px; } ``` ``` #cookieConsent { width: 100%; background-color: #474540F2; position: fixed; bottom: 50px; left: 0; right: 0; z-index: 9999; } #cookieConsent::before { content: ''; display: block; background-image: url(https://via.placeholder.com/10); background-repeat: repeat-x; width: 100%; height: 10px; position: absolute; left: 0; top: -10px; } .cookieContainer { padding: 16px; display: flex; align-items: center; justify-content: center; gap: 16px; font-size: 12px; } .cookieConsent-txt { color: #FFFFFF; width: calc (100% - 101px); margin: 0; } #cookieConsent a.cookieConsentOK { width: 85px; height: 56px; background: #FFFFFF; display: inline-block; padding: 0 20px; display: flex; align-items: center; justify-content: center; } ``` ``` <div id="cookieConsent"> <div class="cookieContainer"> <p class="cookieConsent-txt"> This site uses cookies </p> <a class="cookieConsentOK">Aceitar Cookies</a> </div> </div> ```
null
CC BY-SA 4.0
null
2022-11-01T16:49:45.827
2022-11-01T16:49:45.827
null
null
1,172,189
null