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,548,325
2
null
73,166,901
0
null
You need to use the SlidableAction Widget this fixed it for me
null
CC BY-SA 4.0
null
2023-02-23T17:32:09.963
2023-02-23T17:32:09.963
null
null
16,475,837
null
75,548,883
2
null
75,548,710
1
null
``` Select * from users where length(user_id::text) = 4; ```
null
CC BY-SA 4.0
null
2023-02-23T18:27:08.330
2023-02-23T18:33:17.403
2023-02-23T18:33:17.403
13,508
1,715,331
null
75,548,899
2
null
75,548,710
1
null
The `LENGTH()` function is used to get the length of a string in Postgres. It works in the first case because the `user_fullname` is a string. In the second case you are trying to use an integer type. Type cast it by using `LENGTH(user_id::text)` to get all IDs that are 4 digits in length.
null
CC BY-SA 4.0
null
2023-02-23T18:28:50.800
2023-02-23T18:28:50.800
null
null
21,061,573
null
75,549,004
2
null
75,548,710
2
null
According to the [PostgreSQL Docs](https://www.postgresql.org/docs/9.1/functions-string.html), the function is used to find the length of a string. However, you are trying to use that function on an value, thus the error. Try casting your userID to a string. Try ``` SELECT * FROM users WHERE LENGTH(user_id::text) = 4 ```
null
CC BY-SA 4.0
null
2023-02-23T18:39:06.667
2023-02-23T18:39:06.667
null
null
17,086,459
null
75,549,097
2
null
75,548,710
1
null
The Length Function in Postgres is used to get the length of a string , and it does not work with Integer data types because integers are not strings. You can use following query to execute: ``` Select * from users where length(user_id::text)= enter_your_id_here e.g 10 Select * from users where length(user_id::text)= 10 ``` for more information of datatypes in postgres [here](https://www.postgresql.org/docs/8.1/datatype.html)
null
CC BY-SA 4.0
null
2023-02-23T18:47:50.933
2023-02-23T18:47:50.933
null
null
11,724,982
null
75,549,714
2
null
75,549,619
1
null
target the .image-list and display flex along with other desired attribute like so; ``` .image-list a { display:flex; justify-content: center; align-items:center; } ``` You will also want to use flex-direction:column; on the .image-list
null
CC BY-SA 4.0
null
2023-02-23T19:55:29.593
2023-02-23T20:03:02.870
2023-02-23T20:03:02.870
15,215,008
15,215,008
null
75,549,785
2
null
53,586,265
0
null
Agree with @Pratik that the message definitely leans towards the property not being an array. However, I'll post our little bit different scenario that produced this exception for others stumbling to this post. Our columnDefs was a private property of type `any[]` and we had a malformed getter method with only the method name as a signature. Was able to resolve by declaring the method as a public getter. i.e. This produces the exception: ``` private columnDefs: any[]; getColumnDefinitions() { return columnDefs; } ``` This works correctly: ``` private columnDefs: any[]; public get ColumnDefinitions() { return columnDefs; } ```
null
CC BY-SA 4.0
null
2023-02-23T20:03:56.910
2023-02-23T20:03:56.910
null
null
3,417,242
null
75,550,107
2
null
72,139,453
0
null
I had the same problem and spent a lot of time on it. But the solution was not in the code. On my Xiaomi device, the "MIUI optimisation" setting was disabled. It is located at the bottom of the developer's options. After I enabled it, file sharing started to work perfectly.
null
CC BY-SA 4.0
null
2023-02-23T20:40:55.853
2023-02-23T20:40:55.853
null
null
9,374,040
null
75,550,135
2
null
18,392,584
0
null
I think you are looking for this. ``` <p style="margin:0">test</p> <p style="margin:0">test</p> ```
null
CC BY-SA 4.0
null
2023-02-23T20:44:00.463
2023-02-23T20:48:28.060
2023-02-23T20:48:28.060
21,275,945
21,275,945
null
75,550,205
2
null
75,541,718
0
null
Try to enable debugging ``` ./configure --enable-debug --enable-cassert --prefix=$(pwd) CFLAGS="-ggdb -Og -fno-omit-frame-pointer" ```
null
CC BY-SA 4.0
null
2023-02-23T20:52:06.883
2023-02-23T20:52:06.883
null
null
20,975,473
null
75,550,238
2
null
26,715,813
0
null
In the case of Gmail users, it is required to generate an "App Password" from their google account. Here's the official Google link: [https://support.google.com/accounts/answer/185833?visit_id=638127803263092494-135774243&p=InvalidSecondFactor&rd=1](https://support.google.com/accounts/answer/185833?visit_id=638127803263092494-135774243&p=InvalidSecondFactor&rd=1) Then just use that generated password in your auth as: ``` auth: { user: '***@gmail.com', pass: 'Put your generated app password' } ```
null
CC BY-SA 4.0
null
2023-02-23T20:54:54.953
2023-02-23T20:56:30.040
2023-02-23T20:56:30.040
15,597,493
15,597,493
null
75,550,451
2
null
17,131,678
0
null
If you find yourself wanting to search for folders/packages often, you can use the `Go to File` command ( + + ) and set a on `Directories` so that you can quickly search for directories and packages. The filter will be you use `Go to File`. As a demonstration: - `Go to File``filter``Directories`- - `Go to File` : While using 'Search Everywhere'( + ), you will be forced to use the filter you set earlier on `Go to File`.
null
CC BY-SA 4.0
null
2023-02-23T21:23:57.033
2023-02-25T21:36:05.283
2023-02-25T21:36:05.283
3,646,014
3,646,014
null
75,550,745
2
null
75,544,212
0
null
You can calculate the information of `ax.hist2d` via `np.histogram2d` and then use these values to color a mesh which you can position in 3D. Here is some code to demonstrate the idea. This code also inverts the x-axis and uses the order `X, -Z, Y` for the scatter plot, as in the original question. As the plot looks quite busy, the scatter plot might be left out. ``` import numpy as np import matplotlib.pyplot as plt np.random.seed(20230223) M, N = 2000, 6 X = np.random.normal(0, 2, size=(M, N)).cumsum(axis=0).ravel() + 5 Y = np.random.normal(0, 2, size=(M, N)).cumsum(axis=0).ravel() + 5 Z = np.random.normal(0, 2, size=(M, N)).cumsum(axis=0).ravel() + 5 fig = plt.figure(figsize=(12, 12)) ax = fig.add_subplot(1, 1, 1, projection='3d') ax.scatter(X, -Z, Y, alpha=0.9, s=2) ax.invert_xaxis() ax.set_xlabel('x (cm)') ax.set_ylabel('z (cm)') ax.set_zlabel('y (cm)') cmap = plt.cm.YlOrRd counts, xbins, ybins = np.histogram2d(-Z, Y, bins=(50, 50)) yg, xg = np.meshgrid(ybins, xbins) norm = plt.Normalize(vmin=1, vmax=counts.max()) counts[counts == 0] = np.nan ax.plot_surface(np.full_like(xg, X.max()), xg, yg, facecolors=cmap(norm(counts)), rstride=1, cstride=1, shade=False) counts, xbins, ybins = np.histogram2d(X, Y, bins=(50, 50)) yg, xg = np.meshgrid(ybins, xbins) norm = plt.Normalize(vmin=1, vmax=counts.max()) counts[counts == 0] = np.nan ax.plot_surface(xg, np.full_like(xg, -Z.min()), yg, facecolors=cmap(norm(counts)), rstride=1, cstride=1, shade=False) counts, xbins, ybins = np.histogram2d(X, -Z, bins=(50, 50)) yg, xg = np.meshgrid(ybins, xbins) # bins as a 2D grid norm = plt.Normalize(vmin=1, vmax=counts.max()) counts[counts == 0] = np.nan # make 0 transparent ax.plot_surface(xg, yg, np.full_like(xg, Y.min()), facecolors=cmap(norm(counts)), rstride=1, cstride=1, shade=False) plt.show() ``` [](https://i.stack.imgur.com/R9yTP.png)
null
CC BY-SA 4.0
null
2023-02-23T21:58:49.607
2023-02-23T21:58:49.607
null
null
12,046,409
null
75,551,126
2
null
75,551,046
0
null
You don't need the `data` list. Just generate the data in the loops that write to the files. You can use one loop for the first 6 rows. This loop writes the same data to both files. Then another loop for the 2 added rows. This generates the same data in the first 8 columns, and different data in the last 2 columns. ``` # Write the data to two separate CSV files header = ["key1", "key2"] + ["val" + str(j+1) for j in range(8)] with open("file1.csv", "w", newline="") as file1, open("file2.csv", "w", newline="") as file2: writer1 = csv.DictWriter(file1, fieldnames=header) writer1.writeheader() writer2 = csv.DictWriter(file2, fieldnames=header) writer2.writeheader() # first 6 rows are the same in both files for _ in range(6): row = {} for j in range(1, 3): row[f"key{j}"] = ''.join(random.choices('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', k=20)) for j in range(1, 9): row[f"val{j}"] = round(random.uniform(-1000, 1000), 2) writer1.writerow(row) writer2.writerow(row) # next 2 rows have the same keys and vals1-6, different vals7-8 for _ in range(2): row1 = {} row2 = {} for j in range(1, 3): row1[f"key{j}"] = row2[f"key{j}"] = ''.join(random.choices('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', k=20)) for j in range(1, 7): row1[f"val{j}"] = row2[f"val{j}"] = round(random.uniform(-1000, 1000), 2) for j in range(7, 9): row1[f"val{j}"] = round(random.uniform(-1000, 1000), 2) row2[f"val{j}"] = round(random.uniform(-1000, 1000), 2) writer1.writerow(row1) writer2.writerow(row2) ``` Notice also that instead of all those `{j+1}` values in the f-strings, I simply changed the starting points of the ranges so `j` will be what you want.
null
CC BY-SA 4.0
null
2023-02-23T22:53:10.900
2023-02-23T23:13:31.417
2023-02-23T23:13:31.417
1,491,895
1,491,895
null
75,551,177
2
null
75,551,112
0
null
I don't know if there's a way in that exists in `gtsummary`, but you could make a little function that would do it for you: ``` library(gtsummary) library(dplyr) add_n_name <- function(.data, ...){ nv <- apply(.data, 2, function(x)sum(!is.na(x))) newnames <- paste(colnames(.data), " (N=", nv, ")", sep="") setNames(.data, newnames) } ``` The function `add_n_name()`, takes the data, calculates the number of non-missing observations for each variable, creates new names by pasting `(N={N})` to the variable name and then sets the names of the dataset to these new names that contain N. Stick this in your pipeline after you select the variables you are going to use: ``` mtcars %>% select(mpg, disp, vs) %>% add_n_name() %>% tbl_summary() ``` ![](https://i.stack.imgur.com/zzPPG.png) [reprex v2.0.2](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-02-23T23:00:25.073
2023-02-23T23:00:25.073
null
null
8,206,434
null
75,551,700
2
null
75,481,358
0
null
I think during creation of an instance the process involves specifying a username within that instance. Use `ssh -v -l that-username ip-address`. Also provide the exact command that is used, and the exact error message.
null
CC BY-SA 4.0
null
2023-02-24T00:50:00.070
2023-02-24T00:50:00.070
null
null
5,177,326
null
75,551,828
2
null
16,981,763
0
null
I've seen that this is quite an old question, but having found myself with the same problem I came up with a solution that uses only CSS but requires using the same text 3 times in 3 separate divs. ``` <!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"> <title>Document</title> <style> .container { width: fit-content; padding: 1rem; font-size: 4rem; overflow: hidden; border: 1px solid black; position: relative; color: white; /* Hide the first text */ } .container .bellow, .container .above { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } .container .bellow span, .container .above span { position: relative; top: 1rem; /* Same as padding */ left: 1rem; /* Same as padding */ } .container .bellow { color: black; /* The text as seen normally */ } .container .above { color: white; /* Text color when background slides in*/ overflow: hidden; white-space: nowrap; background-color: red; width: 0; /* width: 50%; --> See the effect*/ transition: width 5s; } .container:hover .above { width: 100%; } </style> </head> <body> <div class="container"> Input text (hover) <div class="bellow"> <span>Input text (hover)</span> </div> <div class="above"> <span>Input text (hover)</span> </div> </div> </body> </html> ```
null
CC BY-SA 4.0
null
2023-02-24T01:20:26.710
2023-02-26T00:00:55.970
2023-02-26T00:00:55.970
19,541,945
19,541,945
null
75,552,392
2
null
71,918,905
0
null
1 For windows, open `C:\Users\yourusername\.gitconfig` 2 Add your project path in the [safe] section, example: ``` [safe] directory = D:/path/to/your-project ``` 3 Restart VSCode
null
CC BY-SA 4.0
null
2023-02-24T03:34:47.120
2023-02-24T03:34:47.120
null
null
111,277
null
75,552,802
2
null
75,548,710
2
null
For Integer data types, you can use the `LENGTH()` function, but you must type cast Integer to String. I believe the following query should work: ``` SELECT * FROM users WHERE LENGTH(user_id :: TEXT) <= 4; ```
null
CC BY-SA 4.0
null
2023-02-24T05:05:08.537
2023-03-01T10:39:36.870
2023-03-01T10:39:36.870
9,239,267
13,875,541
null
75,553,060
2
null
75,551,462
1
null
Well there are many way's to do this, this is one way: 1. get object layer, with the name from Tiled (link to the documentation): // let map = this.make.tilemap( {...} ); let objectLayer = map.getObjectLayer( 'Trees' ); 2. iterate over all objects from that layer (link to the documentation): for( let obj in objectLayer.objects ){ // ... } 3. For each object from the layer: Depending on your object type (point, rectangle, ellipse, ...) you create the physics-body for the collision (for this example I will use a ellipse): let ellipse = this.add.ellipse( obj.x, obj.y, obj.width, obj.height ); // you might need to set the "origin" this.physics.add.existing( ellipse, true ); ellipse.body.setCircle(obj.width / 2); Info/Tipp: if you are using arcade physics the "hitbox" will be a rectangle, doesn't matter which gameObject you use. If you want round physics body with arcade you could use the setCircle method on the body (link to documentation). For complex shapes I would recommend using the matter.js engine. 4. Setup collision with: player, ai, ... this.physics.add.collider( player, ellipse ); ``` document.body.style = 'margin:0;'; let json_map = {"compressionlevel":-1,"height":5,"infinite":false,"layers":[{"compression":"","data":"AQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAAEAAAABAAAAAQAAAA==","encoding":"base64","height":5,"id":1,"name":"TileLayer1","opacity":1,"type":"tilelayer","visible":true,"width":8,"x":0,"y":0},{"draworder":"topdown","id":2,"name":"ObjectLayer1","objects":[{"class":"","ellipse":true,"height":10,"id":1,"name":"","rotation":0,"visible":true,"width":10,"x":8,"y":8},{"class":"","height":5,"id":2,"name":"","rotation":0,"visible":true,"width":15,"x":19.2,"y":25.6},{"class":"","height":0,"id":3,"name":"","point":true,"rotation":0,"visible":true,"width":0,"x":48,"y":4.8}],"opacity":1,"type":"objectgroup","visible":true,"x":0,"y":0}],"nextlayerid":3,"nextobjectid":4,"orientation":"orthogonal","renderorder":"right-down","tiledversion":"1.9.2","tileheight":8,"tilesets":[{"columns":1,"firstgid":1,"image":"tiles.png","imageheight":8,"imagewidth":8,"margin":0,"name":"tiles","spacing":0,"tilecount":1,"tileheight":8,"tilewidth":8}],"tilewidth":8,"type":"map","version":"1.9","width":8}; let config = { type: Phaser.AUTO, width: 8 * 8, height: 5 * 8, zoom: 4, physics: { default: 'arcade', arcade: { debug: true } }, scene: { preload, create }, }; function preload () { this.load.tilemapTiledJSON('map', json_map); } function create () { let graphics = this.make.graphics(); graphics.fillStyle(0x933AFF); graphics.fillRect(0, 0, 10, 10); graphics.generateTexture('tiles', 10, 10); let player = this.add.rectangle(50, 10, 5, 5, 0xffffff); this.physics.add.existing(player); player.setDepth(100); player.body.setVelocityX(-10); let map = this.make.tilemap({ key: 'map', tileWidth: 8, tileHeight: 8 }); let tiles = map.addTilesetImage('tiles', 'tiles'); let layer = map.createLayer(0, tiles, 0, 0); let objectLayer = map.getObjectLayer( 'ObjectLayer1' ); for( let obj of objectLayer.objects ){ // since you are not displaying the object the shape doesn't matter, only the collision body let gameObject = this.add.rectangle( obj.x, obj.y, obj.width, obj.height ) .setOrigin(0); this.physics.add.existing( gameObject, true ); if(obj.ellipse){ // For the ellipse version you would need to change the body gameObject.body.setCircle( obj.width / 2 ); } else if(obj.point){ // For the point we need no set an width and height gameObject.body.setSize( 4, 4 ); } this.physics.add.collider( player, gameObject ); } } new Phaser.Game(config); ``` ``` <script src="//cdn.jsdelivr.net/npm/phaser/dist/phaser.min.js"></script> ``` > In my Tiled version even, when I create the the `width` and `height`, I had to set does properties manualy. So check them if they are set.![screenshot of Tiled](https://i.stack.imgur.com/ZFcPm.png)
null
CC BY-SA 4.0
null
2023-02-24T05:54:55.983
2023-02-27T06:42:15.887
2023-02-27T06:42:15.887
1,679,286
1,679,286
null
75,553,291
2
null
11,059,181
0
null
I had similar problem. File *.pubxml in PublishProfiles folder had saved properties for publish method. There was WebPublishMethod FileSystem and publishUrl tag was some non-existing folder on my computer (it exist's on my other computer). ``` <?xml version="1.0" encoding="utf-8"?> <!-- This file is used by the publish/package process of your Web project. You can customize the behavior of this process by editing this MSBuild file. In order to learn more about this please visit http://go.microsoft.com/fwlink/?LinkID=208121. --> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <WebPublishMethod>FileSystem</WebPublishMethod> <LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration> <LastUsedPlatform>Any CPU</LastUsedPlatform> <SiteUrlToLaunchAfterPublish /> <ExcludeApp_Data>False</ExcludeApp_Data> <publishUrl>c:\temp\someFolder</publishUrl> // this folder didn't exist on my computer <DeleteExistingFiles>True</DeleteExistingFiles> <LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> </PropertyGroup> </Project> ```
null
CC BY-SA 4.0
null
2023-02-24T06:37:05.193
2023-02-24T06:37:05.193
null
null
2,068,040
null
75,553,574
2
null
11,915,826
0
null
Make sure you check the case of the file extension. They have to match (either capital or lowercase). If you have `my_image.PNG` in your root directory and you add `![screenshot](/my_image.png)` to your README file, it will not work. For some reason, Windows likes to capitalize file extensions sometimes. Unfortunately, Git does not recognize extension case so if you try to fix it by just changing the file name, you won't be able to commit the changes to the repo since Git will think everything is up to date. So you either have to update README.md or do some workaround like moving the file out of the directory, making a commit, then editing the file name then moving it back and doing another commit.
null
CC BY-SA 4.0
null
2023-02-24T07:16:53.780
2023-02-24T07:16:53.780
null
null
2,886,813
null
75,553,648
2
null
75,552,375
0
null
Define the maze data so that the 2 destinations(left and right) can be determined from the current position. e.g. very simply... ``` //Here, the special value 0 is used to indicate goal. const int Goal = 0; //Here, negative values indicate dead end. //e.g. -1 is "X1". const int Data[][2] = { 0,0, // dummy 2,3, // Left and Right destinations from Position 1 are Position 2 and 3. -2,-1, // From Position 2, both destinations are dead ends ("X2" and "X1"). -3,4, // From Position 3, ... 7,5, // From Position 4, ... 6,-4, // From Position 5, ... -6,-5, // From Position 6, ... 8,-7, // From Position 7, ... 9,-8, // From Position 8, ... -9,Goal // Right destination from Position 9 is the Goal. }; ``` With this data, code can be written as: ``` int main(int argc, char *argv[]) { //Here, the special value 0 is used to indicate goal. const int Goal = 0; //Here, negative values indicate dead end. //e.g. -1 is "X1". const int Data[][2] = { 0,0, // dummy 2,3, // Left and Right destinations from Position 1 are Position 2 and 3. -2,-1, // From Position 2, both destinations are dead ends ("X2" and "X1"). -3,4, // From Position 3, ... 7,5, // From Position 4, ... 6,-4, // From Position 5, ... -6,-5, // From Position 6, ... 8,-7, // From Position 7, ... 9,-8, // From Position 8, ... -9,Goal // Right destination from Position 9 is the Goal. }; std::cout << "Welcome to the Maze Challenge!" << std::endl; int CurrPos = 1; //Start is Position 1. while( true ) { std::cout << std::endl; //Check if current position is goal or dead end... if( CurrPos == Goal ) { std::cout << "** Goal! **" << std::endl; break; } if( CurrPos < 0 ) { std::cout << "You have landed in dead end X" << -CurrPos << std::endl; break; } //Show current position std::cout << "You are now at position " << CurrPos << std::endl; //Input int choice = -1; while( choice!=0 && choice!=1 ) { std::cout << "0=Left, 1=Right > "; std::cin >> choice; } //Move to choiced direction CurrPos = Data[CurrPos][choice]; } std::cout << "(END)" << std::endl; return 0; } ```
null
CC BY-SA 4.0
null
2023-02-24T07:26:44.370
2023-02-24T07:26:44.370
null
null
18,362,054
null
75,553,725
2
null
75,550,272
1
null
Don't forget this is auto completion, which means it completes what the user already typed. If you have single letter suggestions and one letter was also typed, which doesn't match any of the suggestions, then no suggestion is shown. You have to show the values which the user can type, not the values you want to insert instead.
null
CC BY-SA 4.0
null
2023-02-24T07:36:16.410
2023-02-24T07:36:16.410
null
null
1,137,174
null
75,553,895
2
null
75,551,345
0
null
You need to create a `var label` and pass it to your function. In there, you should call `label.set*()` functions to modify the existing label. ``` GetLabels(lbl) => int size = array.size(print_stack_absciss) // print(str.format("size is {0}", size)) if size > 0 for j = array.get(print_stack_range, 0) to array.get(print_stack_range, 1) int time_j = indexToTime(j) // print(str.format("j is {0}", j)) strings = array.new_string(0, "") color color_i = na for i = 0 to size - 1 // print(str.format("i is {0}", i)) int absciss_i = array.get(print_stack_absciss, i) // print(str.format("absciss_i is {0}", absciss_i)) if absciss_i == time_j string string_i = array.get(print_stack_string, i) strings.push(string_i) color_i := array.get(print_stack_color, i) if array.size(strings) // printB(str.format("{0}", indexToTime(j))) label.set_xy(lbl, time_j, high[(j<0)?0:j]) label.set_text(lbl, array.join(strings, "\n")) label.set_textcolor(lbl, color_i) var label lbl = label.new(na, na, na, style = label.style_label_down, color = color.new(color.white, 100), xloc=xloc.bar_time) GetLabels(lbl) ```
null
CC BY-SA 4.0
null
2023-02-24T07:55:40.033
2023-02-24T07:55:40.033
null
null
7,209,631
null
75,554,096
2
null
75,552,087
0
null
There is no way to change this color directly without using a theme plugin. That color is controlled by the `Label.infoForeground` attribute in the theme plugin. See here for details: [https://plugins.jetbrains.com/docs/intellij/themes-customize.html](https://plugins.jetbrains.com/docs/intellij/themes-customize.html) You only can report this issue to this theme plugin author to improve the color here or fork that theme plugin, change the `Label.infoForeground` for it.
null
CC BY-SA 4.0
null
2023-02-24T08:18:24.333
2023-02-24T08:18:24.333
null
null
21,033,369
null
75,554,159
2
null
75,533,629
0
null
Actually i found solution, from project root there wasn't ANROID_SDK_ROOT direction and i just added it there. You can check this using command `echo $ANDROID_SDK_ROOT` on Ubuntu
null
CC BY-SA 4.0
null
2023-02-24T08:25:23.767
2023-02-24T08:25:23.767
null
null
20,228,520
null
75,554,155
2
null
75,553,956
0
null
In my opinion, you are stuck into the loop "Do Until". An alternative could be to use this intead ``` lstData.Items.Add(clickCount) picClick.Visible = (clickCount >= 100) ``` (Thanks to @jmcilhinney)
null
CC BY-SA 4.0
null
2023-02-24T08:24:23.713
2023-02-24T09:59:53.290
2023-02-24T09:59:53.290
19,385,903
19,385,903
null
75,554,169
2
null
75,553,900
1
null
If we only focus on the [aquasecurity/trivy-action](https://github.com/aquasecurity/trivy-action) here (which seems to be the logs in question) then it already provides a configuration option `output` to specify an output file to store its output. According to its [inputs](https://github.com/aquasecurity/trivy-action#inputs), you can use `output`: > `output` | Save results to a file and, also configure a `format` according to your requirements (default: `table`): > `format` | Output format (`table`, `json`, `sarif`, `github`) With `format: json`, you can then use [jq](https://stedolan.github.io/jq/) for easy manipulation. --- Apart from that, to get the logs, you can use the [GitHub CLI](https://cli.github.com/) i.e. `gh run view`. See [Viewing logs with GitHub CLI](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/using-workflow-run-logs#viewing-logs-with-github-cli) and [About GitHub CLI](https://docs.github.com/en/github-cli/github-cli/about-github-cli) for more details. You can also use the GitHub API. See [Download workflow run attempt logs](https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#download-workflow-run-attempt-logs).
null
CC BY-SA 4.0
null
2023-02-24T08:26:31.800
2023-02-24T08:53:59.310
2023-02-24T08:53:59.310
7,670,262
7,670,262
null
75,554,248
2
null
4,668,266
0
null
If you use Better Exposed Filters module, go into Exposed Form > Exposed form style: Better Exposed Filters | Settings > look for your field > Advanced Filter Options > put "- Any -|All" in the "Rewrite the text displayed" field.
null
CC BY-SA 4.0
null
2023-02-24T08:34:45.437
2023-02-24T08:34:45.437
null
null
21,278,778
null
75,554,254
2
null
75,277,020
0
null
You can use `android:orientation="vertical"` within linearlayout to get elements in different lines. You need to use to do that, You can try adding five elements in Linearlayout that has and then create multiple layout like this and add it in Layout which has .
null
CC BY-SA 4.0
null
2023-02-24T08:35:27.093
2023-02-24T08:35:27.093
null
null
21,248,085
null
75,554,322
2
null
75,553,372
0
null
I have found one solution. There are probably better ways to do this, so I'm still open to other answers. But here's what has worked for me: The following works because I have the option to skip frames when rendering. So I can set the frame step to 4 before rendering, set the output to `/a/Image` It will give me `Image0001.png`, `Image0005.png`, etc within folder `a` Increment the start frame by `1`, and change the output path to `/b/Image` It will produce `Image0002.png`, `Image0006.png`, etc within folder `b` After that, I was able to use an app called [NameChanger](https://mrrsoftware.com/namechanger/) to rename the files in sequence. (This app allows control over the file order, unlike Automator.) [](https://i.stack.imgur.com/ohmQS.png) The file extensions get stripped in that step, but can easily be appended in a subsequent step: [](https://i.stack.imgur.com/6r2Af.png) I have since discovered that there is a setting in NameChanger's Preferences to hide extensions. With this enabled, extensions are left untouched by any renaming operations. ![](https://i.stack.imgur.com/IfDd6.png)
null
CC BY-SA 4.0
null
2023-02-24T08:42:03.163
2023-03-02T16:00:13.960
2023-03-02T16:00:13.960
2,454,914
2,454,914
null
75,554,832
2
null
67,644,111
0
null
You should import material style to your style.scss: ``` @import '~@angular/material/prebuilt-themes/indigo-pink.css'; ```
null
CC BY-SA 4.0
null
2023-02-24T09:33:53.093
2023-02-24T09:33:53.093
null
null
11,355,537
null
75,554,859
2
null
75,548,710
0
null
For completeness, a positive integer number that has 4 or less characters is literally a number between 0 and 9999. So we can skip string manipulation and check that directly: ``` select * from users where user_id < 10000 ``` If we had to handle negative numbers, we'd need to ask Business whether `-` sign adds to character count, but logic could be easily extended. However it's very unusual to have negative autoincremented IDs.
null
CC BY-SA 4.0
null
2023-02-24T09:35:49.757
2023-02-24T09:35:49.757
null
null
13,508
null
75,555,263
2
null
75,554,571
0
null
When you try to "unbold" your text, you're setting default font to attributed string as font from your textfield ``` UIFont.boldSystemFont(ofSize: textField.font!.pointSize) as Any ``` which was previously set as So, change your code to ``` var isBoldEnabled = false let defaultFont = UIFont.systemFont(ofSize: 16) override func viewDidLoad() { super.viewDidLoad() // Set the initial font for the text field textField.font = defaultFont } @IBAction func boldButtonTapped(_ sender: Any) { // Toggle the isBoldEnabled variable isBoldEnabled = !isBoldEnabled // Create a new attributed string with the existing text and the current font let attributedString = NSMutableAttributedString(string: textField.text ?? "") let attributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.font: defaultFont as Any] attributedString.addAttributes(attributes, range: NSRange(location: 0, length: attributedString.length)) ... } ```
null
CC BY-SA 4.0
null
2023-02-24T10:14:43.753
2023-02-24T10:14:43.753
null
null
3,819,509
null
75,555,636
2
null
75,553,460
1
null
If you want to add a new child in a structure that looks like this: ``` db | --- Teachers | --- Accounts | --- 0000-123455 | --- Sections | --- BSIT201A | --- Students | | | --- studentName: "Joseph" | --- pSectionName: "BSIT201A" | --- subject: "Subject Name" // Newly added. ``` Then you have to create a reference that points to the `BSIT201A` node and call [updateChildren()](https://firebase.google.com/docs/reference/android/com/google/firebase/database/DatabaseReference#updateChildren(java.util.Map%3Cjava.lang.String,java.lang.Object%3E)), like in the following lines of code: ``` DatabaseReference db = FirebaseDatabase.getInstance().getReference(); DatabaseReference secNameRef = db.child("Teachers/Accounts/0000-123455/Sections/BSIT201A"); Map<String, Object> update = new HashMap<>(); update.put("subject", "Subject Name"); secNameRef.updateChildren(update); ``` I also recommend you attach a complete listener to the updateChildren() operation, to see if something goes wrong.
null
CC BY-SA 4.0
null
2023-02-24T10:50:26.500
2023-02-24T10:50:26.500
null
null
5,246,885
null
75,555,983
2
null
75,552,479
0
null
The problem with this issue is that is the browser who manage how credentials are put into the fields. Maybe you can workaround it by waiting 0.5 secs and setting the focus on the input or something like this to trigger the validations. ``` @ViewChild('myInput', {static:true}) myInput: IonInput; -------- setTimeout(function(){ this.myInput.setFocus(); }, 500); ```
null
CC BY-SA 4.0
null
2023-02-24T11:25:11.197
2023-02-24T11:25:11.197
null
null
10,500,723
null
75,556,093
2
null
75,555,984
0
null
The desired element is within an [<iframe>](https://stackoverflow.com/a/53276478/7429447) so you have to: - Induce [WebDriverWait](https://stackoverflow.com/a/59130336/7429447) for the desired .- Then you need to [scrollIntoView()](https://stackoverflow.com/a/45581830/7429447) the elements as follows:``` WebDriverWait(driver, 20).until(EC.frame_to_be_available_and_switch_to_it((By.CSS_SELECTOR,"iframe.zoid-component-frame.zoid-visible"))) element = driver.find_element(By.CSS_SELECTOR, "div.paypal-button-label-container img.paypal-button-logo.paypal-button-logo-paypal.paypal-button-logo-gold[aria-label='paypal']") driver.execute_script("return arguments[0].scrollIntoView(true);", element) element.click() ``` - : You have to add the following imports :``` from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC ```
null
CC BY-SA 4.0
null
2023-02-24T11:35:40.317
2023-02-24T12:16:18.093
2023-02-24T12:16:18.093
7,429,447
7,429,447
null
75,556,226
2
null
31,506,426
0
null
I think we can create a checkout session and add the card to the customer. This will trigger a checkout path to the Stripe API, and you can take the card token from there by passing the customer. After you can create charge. ``` session = Stripe::Checkout::Session.create( customer: customer, payment_method_types: ['card'], line_items: [{ name: product.product_name, amount: product.price.to_i, currency: 'usd', quantity: 1 }], mode: 'payment', success_url: product_url(product), cancel_url: product_url(product) ) redirect_to session.url ``` Hope this can help anyone with this issue.
null
CC BY-SA 4.0
null
2023-02-24T11:48:42.780
2023-02-24T11:48:42.780
null
null
19,287,556
null
75,556,513
2
null
21,058,333
1
null
## Simple oneliner ``` df['rol_dd_10'] = df['s'].rolling(10).apply(lambda s: ((s - s.cummax()) / s.cummax()).min()) ``` Which gives you a rolling window of maximum drawdown in percent. If you don't want percentages but rather only want the absolute value instead: ``` df['rol_dd_10'] = df['s'].rolling(10).apply(lambda s: (s - s.cummax()).min()) ```
null
CC BY-SA 4.0
null
2023-02-24T12:21:16.773
2023-02-24T12:21:16.773
null
null
7,012,917
null
75,556,564
2
null
23,688,889
0
null
This worked for me : 1. Right click the java folder (myproject/src/main/java) 2. Click "Mark Directory as" 3. Click "Source Root" 4. Right click the myproject folder (myproject/src/main/java) 5. Click "Mark Directory as" 6. Click "Source Root" So basically had to mark some inner folder as Source project and alter mark parent project again as Source project.. Hacky way but this worked for me.
null
CC BY-SA 4.0
null
2023-02-24T12:26:16.470
2023-02-24T12:40:19.443
2023-02-24T12:40:19.443
2,035,841
2,035,841
null
75,556,726
2
null
75,555,967
0
null
The problem is in your code in your Maven configuration, but it is your IDE (Spring Tool Suite in your case) which is not "Lombok-aware". Lombok works in the way that it generates the code for you in the compile-time, so the code does not exist in your source code files. Hence the IDE cannot suggest you the generated methods, unless it becomes "Lombok-aware" and pre-generates the Lombok-generated code for the suggestion tips. For this you need to install a . Each IDE has its own Lombok plugin, some IDE distributions come with the Lombok plugin bundled. Search for STS if the plugin is pre-installed and if not, how to install it.
null
CC BY-SA 4.0
null
2023-02-24T12:44:41.080
2023-02-24T12:50:34.073
2023-02-24T12:50:34.073
2,886,891
2,886,891
null
75,556,758
2
null
75,555,887
0
null
I have a similar database scheme and when i want to retrive the data i use the following method: ``` Future<List<String>> getRecepieIngredients(FirebaseFirestore db,String recipeId)async{ List<String> recepieIngredients= []; QuerySnapshot<Map<String,dynamic>> query = await db.collection("recipies").where("id", isEqualTo: recipeId).get(); if(query.docs.isNotEmpty){ LinkedHashMap<String,dynamic> map = query.docs[0].data()['recepie_ingredients']; for(var rec in map.values){ recepieIngredients.add(rec); } } return recepieIngredients; } ```
null
CC BY-SA 4.0
null
2023-02-24T12:48:43.120
2023-02-24T14:30:39.840
2023-02-24T14:30:39.840
209,103
8,021,633
null
75,556,967
2
null
75,556,820
0
null
jacoco doesn't support encoding not in `UTF-8`. I recreate my archive in test resource folder with new name without spaces and cyrillic symbols. And it's works fine. Update (2023-02-26). Also I removed my `chcp1251` files from build in `build.gradle` via: ``` sourceSets { main { resources { exclude '**/*.edt' // file extension of my `chcp1251` archives } } } ```
null
CC BY-SA 4.0
null
2023-02-24T13:10:00.863
2023-02-26T06:04:16.007
2023-02-26T06:04:16.007
9,222,952
9,222,952
null
75,556,997
2
null
13,778,034
0
null
## Paths Cannot Be Changed in SQL Server LocalDB "Automatic Instance" Types In case anyone in 2023 finds out they cannot change their default database file storage paths, this article is for you! This error applies to Microsoft SQL Server not being able to allow you to change the default file folder location on your PC where the are saved (database and logs files, `.mdf` and `.ldf`). Most developers often need control over where local database files are saved. Most prefer to store them in a central location, another drive, or simply the inside the `C:\Program Files\Microsoft SQL Server\{sql version name}\MSSQL\DATA`, since that is where system data storage goes. One example of the problem of not being able to customize database file storage might be using , which runs "" scripts that create databases in SQL Server. When it does so, where those scripted databases get stored is heavily dependent on SQL Server's default file path settings. When the location of those EF code-first database files using LocalDB is locked down, developers are stuck with SQL files in on their PC's. THE PROBLEM Apparently, when installs on your device, it attempts to install a default instance of the server as a specialized type called a `"LocalDB Automatic Instance"`. They do this to get the user up and running with a "LocalDB" sql server instance, which is a one-time, "light", custom created server running as a public instance, complete with default settings which are `customized for the user` (or developer) so he can get up and running fast. The automatic type has the advantage that its granted permissions to the user as administrator in SQL, as well as granting all applications on the user's device public access to the server instance. (You will notice that IIsExpress works this way using ApplicationPools as dummy Windows User Accounts, creating default accounts next to your User Account in Windows to run app pools in IIS.) These SQL Server LocalDB binaries do not run as a service but on-demand. But only one of the "automatic" types may be installed per version per device. The other SQL Server LocalDB is the `named instance` and is not as restricted as the one, apparently. The problem is, when they create this , it locks down certain settings and applies certain permissions and settings that are unique just for this instance. This then limits what the user can do as far as , one of which is the in the dialog box that appears when you right-click your sql server instance and choose properties. Anyone using the full SQL Server version, or who has created a new instance of LocalDB, deleting the old one, , so most of those people are scratching their heads. But for local developers, what this means is your Sql Server LocalDB databases running under this instance of the server will typically store their databases under a locked down path...either the path you chose on install or default to the user-friendly account paths under `C:\Users\{YourName}`. When users attempt to change the path in the properties box for the instance, many users online the past 5-6 years have noticed a nasty `RegCreateKeyEx() returned error 5 Access is denied` that would appear when saving a default path. Microsoft doesn't bother to tell you, but that is intentional. They don't expect to allow you to save paths to the registry for the instance, and assume everyone is ok with the default path. You can fix the key error by going into your registry and changing permission on the Microsoft SQL Server registry keys, assigning the "Everyone" group account to the registry node managing these keys. then try and save a new default path in the properties box for your sql server localdb instance: ``` HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server ``` The location of the default database file path keys (2019) in the Registry in Windows for an instance of the localdb server of are located here: ``` HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL15E.LOCALDB\MSSQLServer ``` You are then able to save the new default paths in SQL, and the error goes away. Saving your default path in the Properties box works now, and the new values appear in the registry. Even though you can change these paths, they will not stick, however, and reset back to the User Account Path, by default. Again, this applies ONLY for users who are running under the default "Automatic" LocalDB instance created on install of SQL Express. So even after restarting SQL, restarting your PC, or restarting the SQL Service, those . . The first one returns the actual SQL Server stores internally. The second script returns what is stored in your registry for the . If you saved new default path registry keys, they should be the same and shown in SQL Server instance properties, but they are different! That means Microsoft has decided not to allow you to change them for those running the "" instance type of LocalDB on install. Below is the T-SQL to run to test this: ``` -- GETS THE PATH STORED IN SQL SERVER FOR "DefaultData" path SELECT [Value] = 'DefaultData', [Data] = SERVERPROPERTY('InstanceDefaultDataPath') -- DefaultData C:\Users\YourAccountName\ -- GETS WHATS IN THE REGISTRY FOR "DefaultData" path EXECUTE [master].dbo.xp_instance_regread N'HKEY_LOCAL_MACHINE', N'SOFTWARE\Microsoft\Microsoft SQL Server\MSSQLServer', N'DefaultData' -- DefaultData C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\DATA -- Note: If the second one returns `NULL` it just means you -- have not yet tried or succeeded in saving a new file path -- to your registry. ``` What this means again, is . Your best bet is to simple "detach" your databases, copy the `.mdf` and `.ldf` files to your new prefered folder, then reattach. When you create new databases, the console allows you to change the database file path there, as well. There are also some elaborate SQL scripts you can run to set paths before saving files. But just know this is by design.
null
CC BY-SA 4.0
null
2023-02-24T13:12:58.220
2023-02-25T17:52:52.570
2023-02-25T17:52:52.570
5,555,938
5,555,938
null
75,557,140
2
null
19,956,691
0
null
For Android/Java there is no need to start inventing an algorithm yourself, JTS is the package for such functionality. ``` // use jts to get suitable coordinate for label inside polygon // convert google maps latlong to jts coordinates List<Coordinate> jtsCoordinateList = new ArrayList<>(); for (LatLng gMapLatLng : polygon.getPoints()) jtsCoordinateList.add(new Coordinate(gMapLatLng.latitude, gMapLatLng.longitude)); Coordinate[] jtsCoordinateArray = jtsCoordinateList.toArray(new Coordinate[0]); // create jts polygon Geometry jtsGeometry = new GeometryFactory().createPolygon(jtsCoordinateArray); // initiate InteriorPointArea InteriorPointArea interiorPointArea = new InteriorPointArea(jtsGeometry); // use InteriorPointArea to get the coordinate Coordinate jtsInteriorPoint = interiorPointArea.getInteriorPoint(); // convert jts coordinate to google maps coordinate LatLng polygonPoint = new LatLng(jtsInteriorPoint.getX(), jtsInteriorPoint.getY()); // use the calculated coordinate to place a marker marker = createViewMarker(context, map, polygonPoint, legend); ```
null
CC BY-SA 4.0
null
2023-02-24T13:28:29.550
2023-02-24T13:28:29.550
null
null
5,167,545
null
75,557,539
2
null
75,557,089
0
null
The image is blurry because you are drawing a very small, 50x50 image. You just need to draw a bigger image. A simple solution would be to not hard code the frame of the label, and instead give a large font size, and then use `sizeToFit` to figure the frame out. ``` let nameLabel = UILabel() ... nameLabel.font = UIFont.boldSystemFont(ofSize: 200) // make this even larger for an larger image ... nameLabel.text = initials nameLabel.sizeToFit() UIGraphicsBeginImageContext(nameLabel.frame.size) ... // you seem to have forgotten to call UIGraphicsEndImageContext() in your code ``` Alternatively, draw the name manually. This allows for more finer-grained control over what is drawn. You can e.g. add some padding around the text. ``` // I've omitted the code for getting the initials. // this is just a function that produces an image from a string func image(for string: String) -> UIImage { let font = UIFont.systemFont(ofSize: 300) // choose your font let paraStyle = NSMutableParagraphStyle() paraStyle.alignment = .center let attrs: [NSAttributedString.Key: _] = [ .font: font, .foregroundColor: UIColor.white, // choose your text color .paragraphStyle: paraStyle ] let textSize = string.boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: .greatestFiniteMagnitude), attributes: attrs, context: nil).size let imageWidth = max(textSize.width, textSize.height) + 100 // padding let imageSize = CGSize(width: imageWidth, height: imageWidth) UIGraphicsBeginImageContext(imageSize) UIColor.systemGreen.setFill() // choose your background color UIRectFill(CGRect(origin: .zero, size: imageSize)) let textRect = CGRect(origin: .zero, size: imageSize) .insetBy(dx: (imageSize.width - textSize.width) / 2, dy: (imageSize.height - textSize.height) / 2) (string as NSString).draw(in: textRect, withAttributes: attrs) let context = UIGraphicsGetCurrentContext()! let image = UIGraphicsGetImageFromCurrentImageContext()! UIGraphicsEndImageContext() return image } ```
null
CC BY-SA 4.0
null
2023-02-24T14:08:56.897
2023-02-24T14:08:56.897
null
null
5,133,585
null
75,557,841
2
null
29,134,771
0
null
I had the same issue and found setting the margins to be the easiest solution. For those that encounter the same, read more here: [https://bookdown.org/ndphillips/YaRrr/plot-margins.html](https://bookdown.org/ndphillips/YaRrr/plot-margins.html)
null
CC BY-SA 4.0
null
2023-02-24T14:38:30.163
2023-02-24T14:38:59.963
2023-02-24T14:38:59.963
21,280,938
21,280,938
null
75,557,855
2
null
75,557,458
2
null
So, had some fun with this, used extra columns but does work: [](https://i.stack.imgur.com/meEJ1.png) Must be a method to reduce the two extra columns needed. But have to go shopping :) But I will come back to this as it seems challenging.
null
CC BY-SA 4.0
null
2023-02-24T14:39:45.570
2023-02-24T14:39:45.570
null
null
4,961,700
null
75,557,894
2
null
75,557,089
0
null
``` ... let frame = CGRect(x: 0, y: 0, width: 500, height: 500) ... nameLabel.font = UIFont.boldSystemFont(ofSize: 250) ... ```
null
CC BY-SA 4.0
null
2023-02-24T14:42:57.913
2023-02-24T14:42:57.913
null
null
653,122
null
75,557,924
2
null
66,374,503
0
null
## Github Status show in any markdown | | | | | | | Github Stats | | | | | | [![Top Langs](https://github-readme-stats.vercel.app/api?username=saifurrahman1193&theme=algolia&show_icons=true)](https://github.com/saifurrahman1193) | [![Mohammad Saifur Rahman's GitHub stats](https://github-readme-stats.vercel.app/api/top-langs?username=saifurrahman1193&hide=html,scss,stylus,blade,jupyter%20notebook,python,css,shell,batchfile,dockerfile,typescript&theme=algolia&show_icons=true)](https://github.com/saifurrahman1193) |
null
CC BY-SA 4.0
null
2023-02-24T14:46:44.517
2023-02-24T14:46:44.517
null
null
14,350,717
null
75,557,978
2
null
23,207,878
3
null
To pile on an alternative, there is also `ggh4x::guide_axis_nested()`, which solves a similar issue. Disclaimer: I'm the author of ggh4x. ``` library(ggplot2) df <- data.frame( x = LETTERS[1:16], group = rep(c("Group 1", "Group 2", "Group 3"), c(5, 3, 8)), value = rpois(16, 10) ) ggplot(df, aes(paste0(x, "&", group), value)) + geom_col() + guides(x = ggh4x::guide_axis_nested(delim = "&")) ``` ![](https://i.imgur.com/tjD7498.png) [reprex package](https://reprex.tidyverse.org)
null
CC BY-SA 4.0
null
2023-02-24T14:51:30.337
2023-02-24T14:51:30.337
null
null
11,374,827
null
75,558,037
2
null
75,157,538
0
null
A little bit late but I think this is what you were looking for: ``` SELECT `r`.`id_voorspel`, `r`.`id_user`, `r`.`id_race`, IF (`r`.`Pole_position` = `p`.`pole_position`, 5, 0) AS `pole_position`, IF(`r`.`1e` = `p`.`1e`, 25, 0) AS `1e`, IF(`r`.`2e` = `p`.`2e`, 18, 0) AS `2e`, IF(`r`.`3e` = `p`.`3e`, 15, 0) AS `3e`, IF(`r`.`sr` = `p`.`snelste_ronde`, 10, 0) AS `snelste_ronde`, ( IF (`r`.`Pole_position` = `p`.`pole_position`, 5, 0) + IF(`r`.`1e` = `p`.`1e`, 25, 0) + IF(`r`.`2e` = `p`.`2e`, 18, 0) + IF(`r`.`3e` = `p`.`3e`, 15, 0) + IF(`r`.`sr` = `p`.`snelste_ronde`, 10, 0) ) AS `total` FROM `race` `r` JOIN `uitslag` `p` ON `r`.`id_race` = `p`.`race_id`; ```
null
CC BY-SA 4.0
null
2023-02-24T14:56:24.470
2023-02-24T14:56:24.470
null
null
1,191,247
null
75,558,055
2
null
75,558,054
0
null
One option is using bookmarks in pyCharm. They can be added like break points: [](https://i.stack.imgur.com/kkKrk.png) This is more flexible, as the `####` style in R/RStudio, but also more circumstancial, and it has a major drawback: These bookmarks (most likely, not tested) don't "carry" over with the code. If someone else opens the file in his own pyCharm, he'll has to set the bookmarks manually again.
null
CC BY-SA 4.0
null
2023-02-24T14:58:21.460
2023-02-24T14:58:21.460
null
null
6,409,572
null
75,558,081
2
null
75,557,584
1
null
You can specify a `min` and `max` on your scale options: ``` let data = [ { x: 1677246631553, y: 31 }, { x: 1677246631840, y: 17 }, { x: 1677246632077, y: 31 }, { x: 1677246632329, y: 42 }, { x: 1677246632552, y: 38 }, { x: 1677246632792, y: 7 }, { x: 1677246633017, y: 13 }, { x: 1677246633237, y: 17 }, { x: 1677246633472, y: 35 }, { x: 1677246633705, y: 4 } ] let ctx = document.getElementById("myChart"); let myChart = new Chart(ctx, { type: "scatter", data: { datasets: [ { label: "ds1", data: data, backgroundColor: "#009900", borderColor: "#009900", } ] }, options: { animation: false, scales: { x: { min: data[0].x, max: data[data.length - 1].x, } } } }); ``` ``` <script src="https://npmcdn.com/chart.js@4.2.1/dist/chart.umd.js"></script> <div class="myChartDiv"> <canvas id="myChart" width="600" height="400"></canvas> </div> ```
null
CC BY-SA 4.0
null
2023-02-24T15:00:41.067
2023-02-24T15:00:41.067
null
null
8,682,983
null
75,558,111
2
null
917,610
0
null
In case, if you have `<i class=''></i>` with imported fonts, `background: ... (some png)` implementation will not be suited for you. So try this one: ``` <div class="parent"> <form action='' method='post'> <i class="fa-solid fa-paperclip"></i> <input type="text" name="message" placeholder="Type..."> </form> </div> ``` ``` .parent > form > i { position: absolute; } .parent > form > input { text-indent: 40px } ``` then, use `margin` to set Icon inside and `text-indent` to move placeholder's text. ... ... Here is full example of my code ``` .parent { width: 100%; height: 70px; display: flex; flex-direction: column; justify-content: center; } .parent > form > i { margin-left: 24px; margin-top: 13px; position: absolute; } .parent > form > input { width: 70%; height: 40px; margin-left: 8px; text-indent: 40px; } ```
null
CC BY-SA 4.0
null
2023-02-24T15:03:09.263
2023-02-24T15:03:09.263
null
null
12,624,729
null
75,558,191
2
null
4,497,671
0
null
After also spending too many hour on reading about smart cards, I've managed to retrieve UID of HID Seos iCLASS card, using [PC/SC wrapper classes for .NET](https://github.com/danm-de/pcsc-sharp)
null
CC BY-SA 4.0
null
2023-02-24T15:10:13.307
2023-02-24T15:10:13.307
null
null
936,930
null
75,558,512
2
null
29,675,332
0
null
I can confirm that I use nothing but they still charge, even though it is less. Now is 0.36 USD so far.
null
CC BY-SA 4.0
null
2023-02-24T15:41:04.627
2023-02-24T15:41:04.627
null
null
6,532,658
null
75,558,718
2
null
73,264,271
-1
null
npm i bootstrap bootstrap-vue-3 main.js .... import BootstrapVue3 from 'bootstrap-vue-3' import 'bootstrap/dist/css/bootstrap.css' import 'bootstrap-vue-3/dist/bootstrap-vue-3.css' ... app.use (BootstrapVue3) ... Excuse for my English gave the specified error for vue - 3 1)[https://bootstrap-vue.github.io/bootstrap-vue-next](https://bootstrap-vue.github.io/bootstrap-vue-next) / incomplete for vue 3 2)[https://bootstrap-vue.org](https://bootstrap-vue.org) / for vue 2 but works at vue 3 3)[https://getbootstrap.com](https://getbootstrap.com) / simple bootstrap use all three sources
null
CC BY-SA 4.0
null
2023-02-24T16:00:02.647
2023-02-25T06:55:02.267
2023-02-25T06:55:02.267
21,281,376
21,281,376
null
75,558,849
2
null
75,558,409
0
null
Lucas, the Syntax for `AVERAGE()` is ``` AVERAGE(<column>) ``` see [https://learn.microsoft.com/en-us/dax/average-function-dax](https://learn.microsoft.com/en-us/dax/average-function-dax), so it doesn't accept an `<expression>`. But you can transform your "simple calculation" into ``` 6 - AVERAGE( CALCULATE_DATA_PI[Einheitsvalue] ) ``` which is mathematically the same thing. Of cause this works inside `SUMMARIZE()` too. Was this your question?
null
CC BY-SA 4.0
null
2023-02-24T16:12:07.997
2023-02-24T21:05:02.643
2023-02-24T21:05:02.643
7,108,589
7,108,589
null
75,558,891
2
null
75,558,806
0
null
you should use [Tab Navigation](https://reactnavigation.org/docs/tab-based-navigation/) for your footer and [Stack Navigation](https://reactnavigation.org/docs/stack-navigator/) for your screens. ``` import * as React from 'react'; import { Text, View } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'; import StackNavigator from './StackNavigator' function HomeScreen() { return ( <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> <Text>Home!</Text> </View> ); } function SettingsScreen() { return ( <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}> <Text>Settings!</Text> </View> ); } const Tab = createBottomTabNavigator(); export default function App() { return ( <NavigationContainer> <Tab.Navigator> <Tab.Screen name="Entries" component={HomeScreen} /> <Tab.Screen name="State" component={HomeScreen} /> <Tab.Screen name="Plus" component={HomeScreen} /> <Tab.Screen name="Calender" component={SettingsScreen} /> <Tab.Screen name="More" component={StackNavigator} /> </Tab.Navigator> </NavigationContainer> ); } ``` and in `StackNavigator.js` file you have to create Stack Navigator which will have multiple screens as you want. ``` import { createStackNavigator } from '@react-navigation/stack'; const Stack = createStackNavigator(); function StackNavigator() { return ( <Stack.Navigator> <Stack.Screen name="Home" component={Home} /> <Stack.Screen name="Notifications" component={Notifications} /> <Stack.Screen name="Profile" component={Profile} /> <Stack.Screen name="Settings" component={Settings} /> </Stack.Navigator> ); } export default StackNavigator; ``` if you want to hide Tabs when inner screen of more tab is visible you will have to change the structure of navigation. ``` <Stack.Navigator {...props}> <Stack.Screen component={()=> <Tab.Navigator> <Tab.screen /> <Tab.screen /> <Tab.screen /> <Tab.screen /> </Tab.Navigator> }/> <Stack.Screen name='ScreenName1' component={Component1}/> <Stack.Screen name='ScreenName2' component={Component2}/> <Stack.Screen name='ScreenName3' component={Component3}/> ..... .... ... </Stack.Navigator> ```
null
CC BY-SA 4.0
null
2023-02-24T16:16:27.290
2023-02-24T16:30:39.993
2023-02-24T16:30:39.993
20,587,701
20,587,701
null
75,558,940
2
null
75,558,879
0
null
Although it's probably not such a good idea (this will make an CSV with missing data) you can use: ``` cols = ['Object'] # list of columns for which to "hide" the duplicates (df.assign(**{c: df[c].mask(df[c].duplicated(), '') for c in cols}) .to_csv('file.csv', index=False) ) ``` Output CSV: ``` Object,Size,Color,Ornament A,1,red,yes ,3,red,yes ,4,red,no B,1,yellow,yes ,3,yellow,yes ,4,yellow,no C,1,green,no ,3,green,no ,4,green,yes ```
null
CC BY-SA 4.0
null
2023-02-24T16:20:45.163
2023-02-24T16:20:45.163
null
null
16,343,464
null
75,559,293
2
null
28,080,494
0
null
For this issue I believe it is because you are using the `navigationIcon` as the attribute to set the icon on the `toolbar`. ``` <item name="navigationIcon">@drawable/tool_bar_title_logo</item> ``` When using `navigationIcon` as an attribute to set the `toolbar` icon: ``` supportActionBar?.setDisplayHomeAsUpEnabled(false) // won't work ``` It will not be able to turn off the for the icon. --- , use `setIcon(R.drawable.tool_bar_title_icon)` to set icon for the `toolbar`: ``` supportActionBar?.setIcon(R.drawable.tool_bar_title_logo) // to set the toolbar icon ``` Then disable it using: ``` supportActionBar?.setDisplayHomeAsUpEnabled(false) ```
null
CC BY-SA 4.0
null
2023-02-24T16:52:34.747
2023-02-24T16:52:34.747
null
null
4,099,295
null
75,559,396
2
null
75,554,571
2
null
Depending on how much you want to do... For complex, full-featured "rich-text editing" I'd suggest searching for already build solutions - lot's of open-source out there. If you can't find one to do exactly what you need, I'm sure you could find one close enough that you could go through the code and edit it to suit your needs. For a fairly simple implementation, you can set the text field's `.typingAttributes` - see Apple's [docs](https://developer.apple.com/documentation/uikit/uitextfield/1619632-typingattributes). Here's a very quick example: ``` class ViewController: UIViewController { let textField = UITextField() let normalFont: UIFont = .systemFont(ofSize: 17, weight: .regular) let boldFont: UIFont = .systemFont(ofSize: 17, weight: .bold) override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor(white: 0.95, alpha: 1.0) textField.borderStyle = .roundedRect textField.font = normalFont let v = UILabel() v.text = "Bold on/off" let sw = UISwitch() let ctrlStack = UIStackView(arrangedSubviews: [v, sw]) ctrlStack.spacing = 8 ctrlStack.translatesAutoresizingMaskIntoConstraints = false view.addSubview(ctrlStack) textField.translatesAutoresizingMaskIntoConstraints = false view.addSubview(textField) let g = view.safeAreaLayoutGuide NSLayoutConstraint.activate([ ctrlStack.topAnchor.constraint(equalTo: g.topAnchor, constant: 20.0), ctrlStack.centerXAnchor.constraint(equalTo: g.centerXAnchor), textField.topAnchor.constraint(equalTo: ctrlStack.bottomAnchor, constant: 20.0), textField.leadingAnchor.constraint(equalTo: g.leadingAnchor, constant: 40.0), textField.trailingAnchor.constraint(equalTo: g.trailingAnchor, constant: -40.0), ]) sw.addTarget(self, action: #selector(swChanged(_:)), for: .valueChanged) } @objc func swChanged(_ sender: UISwitch) { textField.typingAttributes?[NSAttributedString.Key.font] = sender.isOn ? boldFont : normalFont } } ``` Looks like this: [](https://i.stack.imgur.com/vEiu7.png) tap the switch to turn bold "On" and type a little more: [](https://i.stack.imgur.com/e8Y87.png) turn bold "Off" and type some more: [](https://i.stack.imgur.com/6uKZF.png)
null
CC BY-SA 4.0
null
2023-02-24T17:02:32.940
2023-02-24T17:02:32.940
null
null
6,257,435
null
75,559,530
2
null
75,552,987
1
null
# <Select> is a native component. ## What is a native component? A native component is an HTML element that uses shadow containers to add native OS components to an HTML site. Rather than the browser drawing the entire element, it relies on the operating system to do this. Elements like `<button>`, `<a>`, `<div>`, `<span>`, any many more will have their own drawing process. A `<select>` element, however, uses whatever the operating system provides. Any styling capabilities are very limited. Technically, a web browser could implement their own "drawing" of a `<select>` element, but this is not worth the effort because most people create their own dropdown components. The `<select>` element really just exists to provide for developers to use – think a quick small micro-application. Although you may be able to add most CSS styles to the "button" part of the select element, you cannot to the dropdown. The dropdown is not the `<option>` tags, but rather still a part of the `<select>` element. This is because the option tags just provide information to the select component about which options to show (they are just data containers). The dropdown is 100% native and cannot be styled. ## Can you force all devices to use the same dropdown? . This is impossible. Each web browser has their own implementation on how to handle the `<select>` element. Firefox draws their own dropdowns. Safari and Chrome use the native macOS/Windows/Linux/iOS/Android dropdowns. These are not configurable and you are at the mercy of the OS/firefox. ## Should you force all devices to use the same dropdown? . The way you would accomplish this, is by using the custom component method. You will have to implement your own dropdown. Most sites do this to provide a uniform user interface and experience.
null
CC BY-SA 4.0
null
2023-02-24T17:17:31.783
2023-02-24T17:17:31.783
null
null
2,468,417
null
75,559,561
2
null
75,559,492
1
null
This kind of question does not belong on StackOverflow. It is simply called a dropdown, popoup, popover, date range selector, etc.
null
CC BY-SA 4.0
null
2023-02-24T17:20:33.300
2023-02-24T17:20:33.300
null
null
2,468,417
null
75,559,613
2
null
75,288,175
0
null
``` await characteristic.setNotifyValue(true); characteristic.value.listen((value) { // do something with new value print(value) // this value have all data from device }); ``` this code provides values from the device the main problem in my case was I wasn't able to figure out which one provide me with that callback, lol it was so easy.
null
CC BY-SA 4.0
null
2023-02-24T17:25:48.447
2023-02-24T17:25:48.447
null
null
19,151,638
null
75,559,752
2
null
75,559,708
-1
null
I don't see what the problem is. User cache is invalidated after a very short period of time. As long as you set up your site to redirect the user to the correct page, that is what they will see. A user cannot manually go into their caches and navigate to an old URL
null
CC BY-SA 4.0
null
2023-02-24T17:40:35.833
2023-02-24T17:40:35.833
null
null
2,468,417
null
75,559,814
2
null
75,553,372
1
null
This should do both parts of what you need. The script makes some basic assumptions, e.g. that input files are names as in the question, e.g. "0001.png", but this is straightforward enough to change as required. First, it creates output sorting folders on the desktop, inside a 'frames' folder. It looks in a folder named 'inputs' on the desktop for your source files. It asks for a count of how many to process but it could be set to just grab every file in the folder. Next, it creates some lists: of frames (e.g. 0001, 0002), of frame file names (0001.png, 0002.png) and of prefixes (a, b, c, d). It then cycles through each frame and determines which letter should be prepended to its file name, builds the new file name and renames the file (using System Events). Finally, it cycles through the prefixes and moves all matching files to the appropriate sorting folder (based on the first letter). ``` -- create frames destination folders do shell script "cd ~/Desktop ; /bin/mkdir -p frames/{a,b,c,d}" -- specify input and destination folders set inputDir to (path to desktop) & "inputs:" as text set frameDir to (path to desktop) & "frames:" as text set padX to {"000", "00", "0"} -- pads out to 3 zeroes, e.g. 0001 set frameList to {} set nameList to {} set inputFrameCt to 4 set inpFr to display dialog "Enter number of input frames" default answer 4 set inputFrameCt to text returned of inpFr as integer repeat with x from 1 to inputFrameCt set y to x as string -- 1 to frame count set zx to item (length of y) of padX & y -- 4 characters, e.g. 0005 set end of frameList to zx set end of nameList to zx & ".png" end repeat frameList -- list of frame numbers, does not include extension nameList -- list of frame file names, includes extension set preList to {"d", "a", "b", "c"} -- letter to prepend to file name set fNameList to {} -- list of resulting file names tell application "System Events" repeat with f in frameList -- cycle through frame numbers set inFile to inputDir & item f of nameList -- frame's path and name set pre to item (f mod 4 + 1) of preList -- get appropriate prefix set preName to pre & item f of nameList -- frame's resulting file name set end of fNameList to (pre & item f of nameList) set name of file inFile to preName -- rename file, e.g. 0001.png > a0001.png end repeat set letterList to {"a", "b", "c", "d"} repeat with l in letterList set lFiles to (disk items of folder inputDir whose name begins with l) move lFiles to folder l of folder frameDir -- move files based on prefix end repeat end tell ``` NB The script uses `x mod 4` to determine which of the letters to use as the prefix. Since every fourth number will result in 0, it adds 1 and moves 'd' to the beginning of the list. Should you want to change the script in the future to account for a different ratio of frames, you could simply alter the various letter lists and change the `mod` value to match. It's easy enough to automate this so that you could just enter a single number and everything else would follow.
null
CC BY-SA 4.0
null
2023-02-24T17:47:59.267
2023-02-24T17:47:59.267
null
null
7,410,243
null
75,559,963
2
null
75,558,607
0
null
> I can't seem to find that one comma. It's probably coming from your data. If you have a query like this: ``` "INSERT INTO NAMES (LastName, FirstName) VALUES ('" + TextBox1.Text + "', '" + TextBox2.Text "')" ``` And the text boxes have values like this: ``` O'Brien Patty ``` You end up with SQL like this: ``` INSERT INTO NAMES (LastName, FirstName) VALUES ('O'Brien', 'Patty') ``` And suddenly the extra `'` character from the last name throws the whole query off. The error message will complain about a missing comma after the `'O'` literal. Worse, attackers can take advantage of this kind of issue to do to your database... effectively run any arbitrary SQL they want. This is the kind of thing where you find out a year later you were hacked six months ago and attackers are holding your data for ransom before selling it on the dark web. There are several ways to address this, but some of them are : they only push the issue to the next level. Worse, they might to work, but still leave you with subtle openings. The solution involves something called parameterized queries. Unfortunately, using them means you need to go back to the drawing board on `CRUDConnection` module and re-think how that works. In a nutshell, this module . Instead, every query you want to run will get it's own method, with function arguments for the inputs. We end up with an something more like this, to show you what one method might look like ``` Module DB ' Note this is PRIVATE! ' Also note we only keep the string, and not the connection ' More info on why: https://softwareengineering.stackexchange.com/a/398790/8057 Private connectionString As String = " connection string here " Public Sub ClockIn(EmployeeID As Integer, ClockTime As DateTime) Dim SQL As String = "INSERT INTO tbl_attendance(EMPLOYEEID,LOGDATE,TIMEIN,AM_STATUS)VALUES(@EmployeeID,@LogDate,@TimeOfDay,'Time In')" Using cn As New MySqlConnection(connectionString), cmd As New MySqlCommand(SQL, cn) cmd.Parameters.AddWithValue("@EmployeeID", EmployeeID) cmd.Parameters.AddWithValue("@LogDate", ClockTime.Date) cmd.Parameters.AddWithValue("@TimeOfDay", ClockTime.ToString("HH:mm:ss")) cn.Open() cmd.ExecuteNonQuery() End Using End Sub ' Note this is also PRIVATE! ' It exists to make it easier to write the other methods in the module Private Function GetRecords(SQL As String, addParams As Func(Of MySqlParameterCollection)) As DataTable Dim result As New DataTable Using cn As New MySqlConnection(connectionString), _ da As New MySqlDataAdapter(SQL, cn) If addParams IsNot Nothing Then addParams(da.SelectCommand.Parameters) End If da.Fill(result) End Using Return result End Function End Module ``` Note I was able to use a basic literal for the `Time In` string in the `ClockIn()` method, but everything else was a query parameter. You need to have it's own method like this.
null
CC BY-SA 4.0
null
2023-02-24T18:04:33.780
2023-02-24T18:23:24.723
2023-02-24T18:23:24.723
3,043
3,043
null
75,560,101
2
null
75,559,708
0
null
Isn't it because you use permanent redirect (301) instead of a temporary one (302)?
null
CC BY-SA 4.0
null
2023-02-24T18:21:24.787
2023-02-24T18:21:24.787
null
null
8,019,153
null
75,560,324
2
null
75,554,603
1
null
Here is one way in Python/OpenCV. - - - - - - Input 1: [](https://i.stack.imgur.com/ETa9x.png) Input 2: [](https://i.stack.imgur.com/KvkXD.jpg) ``` import cv2 import numpy as np # read image 1 img1 = cv2.imread('white_circle.png') h1, w1 = img1.shape[:2] # read image 2 img2 = cv2.imread('bear_heart.jpg') h2, w2 = img2.shape[:2] # convert img1 to grayscale gray = cv2.cvtColor(img1, cv2.COLOR_BGR2GRAY) # threshold to binary thresh = cv2.threshold(gray, 254, 255, cv2.THRESH_BINARY)[1] thresh = cv2.cvtColor(thresh, cv2.COLOR_GRAY2BGR) # crop second image to size of first image img2_crop = img2[0:h1, 0:w1] # combine img1, img2_crop with threshold as mask result = np.where(thresh==255, img2_crop, img1) # save results cv2.imwrite('white_circle_thresh.jpg', thresh) cv2.imwrite('white_circle_bear_heart.jpg', result) cv2.imshow("thresh", thresh) cv2.imshow("result", result) cv2.waitKey(0) cv2.destroyAllWindows() ``` Threshold Image: [](https://i.stack.imgur.com/asWy0.jpg) Result Image: [](https://i.stack.imgur.com/zWrzf.jpg)
null
CC BY-SA 4.0
null
2023-02-24T18:52:10.493
2023-02-24T18:52:10.493
null
null
7,355,741
null
75,560,371
2
null
21,892,570
0
null
If you look at the table in the inspector, you'll see that the cause of the issue is the fact that the [margin-left](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left) and [margin-right](https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right) CSS properties on the table are set to `auto`, making it centered. You can make it left-aligned by doing something like this in your `custom.css`: ``` .rendered_html table { margin-left: 0px; } ``` That should only left-align those specific tables and not affect anything else.
null
CC BY-SA 4.0
null
2023-02-24T18:55:53.150
2023-02-24T18:55:53.150
null
null
7,077,511
null
75,560,631
2
null
75,560,471
0
null
In views.py, you need to import the template renderer: ``` from django.template import loader from django.http import HttpResponse ``` And then, in each of your view functions, you return something like: ``` def view_name(request) -> HttpResponse: template = loader.get_template('module_name/Brewtopia.html') context = {} # variables you use in your template go here- read the reference at the end for more info return HttpResponse(template.render(context, request)) ``` Don't forget to substitute "module_name" for the name of the app. This is a pretty decent example using templates: [https://docs.djangoproject.com/en/4.1/intro/tutorial03](https://docs.djangoproject.com/en/4.1/intro/tutorial03) And this has some more in-depth info: [https://docs.djangoproject.com/en/4.1/topics/templates/](https://docs.djangoproject.com/en/4.1/topics/templates/)
null
CC BY-SA 4.0
null
2023-02-24T19:27:27.847
2023-02-24T19:27:27.847
null
null
21,053,371
null
75,560,662
2
null
75,560,327
0
null
From where are you trying to connect? If you’re trying from a local machine, the DB must be deployed in a public subnet, and must have a public IP.
null
CC BY-SA 4.0
null
2023-02-24T19:30:48.387
2023-02-24T19:30:48.387
null
null
21,250,520
null
75,560,753
2
null
75,560,241
0
null
Sorry to waste everyone's time. I found the solution. I created a subroutine in the module that would enter specific information into the Add Details box when the user changed the status using the combobox (Me.cmb_Stat.Value) as a precursor to additional information in the code above. This subroutine is separate from the Find subroutine, and explains why I couldn't figure this out. ``` Private Sub cmb_Stat_Change() If Me.cmb_Stat.Value = "Leak Check" Then Me.txt_Detail.Value = "Accomplished Wheel build-up, awaiting 24hr leak check and final paperwork. - " ElseIf Me.cmb_Stat.Value = "In Work" Then Me.txt_Detail.Value = "Begin Work - " ElseIf Me.cmb_Stat.Value = "Parts" Then Me.txt_Detail.Value = "Work placed on hold. Waiting for ordered parts/materials - " End If End Sub ``` Because I incorrectly set the firing event to the "Change" event, the event fired every time the user clicked "Find." When I changed the event from "Change" to "AfterUpdate", the problem corrected itself. I apologize for posting a question that I found the solution to myself, but I thought it might be helpful to others to post what I found.
null
CC BY-SA 4.0
null
2023-02-24T19:44:14.060
2023-02-24T19:44:14.060
null
null
21,282,003
null
75,560,874
2
null
75,560,831
0
null
Not sure if this is what you had in mind, but what you're trying to do is to create a 2D array, so effectively an array of arrays: ``` let arrayOfArrays = [ [1, 3, 7, 13], [2, 8, 16, 26], [5, 15, 27 ,41], [10, 24, 40, 58] ]; console.log(arrayOfArrays); ```
null
CC BY-SA 4.0
null
2023-02-24T19:59:14.947
2023-02-24T19:59:35.627
2023-02-24T19:59:35.627
18,244,921
15,786,898
null
75,560,905
2
null
75,560,831
0
null
My Answer: ``` let num_arr = []; for (let i = 0; i < 4; i++) { let inner_arr = []; for (let j = 0; j < 4; j++) { inner_arr.push(i * i + j * j + 4 * i * j + j + 1); } num_arr.push(inner_arr) } console.log(num_arr) ``` I'm not sure if the solution I found is the most optimal. I figured out this formula with pen and paper. Based on your purpose, you can modify the values of `i` and `j`.
null
CC BY-SA 4.0
null
2023-02-24T20:03:51.523
2023-02-24T20:03:51.523
null
null
19,992,928
null
75,560,903
2
null
75,560,831
0
null
You can use something like: ``` function create2dArray(rows,columns) { var x = new Array(rows); for (var i = 0; i < rows; i++) { x[i] = new Array(columns); } return x; } ``` to generate the array and then you can fill accordingly with your values. ``` var myArray = create2dArray(4,4); ``` will create a 4x4 array and you can fill it accordingly with your values having in mind that myArray[0][0] is the to left box. As per the image you can assign the values: ``` myArray[0][0] = 1; myArray[0][1] = 3; ... ```
null
CC BY-SA 4.0
null
2023-02-24T20:03:49.033
2023-02-24T20:03:49.033
null
null
17,048,604
null
75,561,243
2
null
73,870,471
0
null
Move all the values in "devDependencies" to "dependencies". Then try deleting the "node_modules" that other questioners mentioned. I solved it with her method. I'm Japanese, so I used Google Translate to create the document. The sentences may be strange. ``` { "name": "server", "version": "1.0.0", "main": "index.js", "private": true, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "run": "nodemon server.js", "start": "node server.js" }, "license": "UNLICENSED", "dependencies": { "@aws-sdk/client-sagemaker-runtime": "^3.56.0", "async": "^3.2.0", "aws-sdk": "^2.1019.0", "connect-mongo": "^3.2.0", "cookie-parser": "^1.4.5", "dotenv": "^8.2.0", "express": "^4.17.1", "express-session": "^1.17.1", "jsonwebtoken": "^8.5.1", "mongodb": "^4.8.1", "mongoose": "^6.5.2", "morgan": "^1.10.0", "node-fetch": "^3.1.1", "node-schedule": "^2.0.0", "passport": "^0.6.0", "passport-jwt": "^4.0.0", "passport-local": "^1.0.0", "serverless-http": "^2.7.0", "xmlhttprequest": "^1.8.0", "nodemon": "^2.0.15", "serverless-offline": "^6.8.0" } ```
null
CC BY-SA 4.0
null
2023-02-24T20:47:54.950
2023-02-24T20:47:54.950
null
null
21,282,848
null
75,561,445
2
null
75,561,370
0
null
Since you are using `display: flex` for `.authorizationHolder__textHolder`, you can use `flex-grow: 1` to take the available place. For this to work, the parent also needs to use `flex`. So be sure to add `display: flex;` and `flex-direction: column;` to `.authorizationHolder`. Here is your updated snippet! ``` .authorizationHolder { display: flex; flex-direction: column; width: 60%; min-height: 90vh; position: relative; background-color: white; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); border-radius: 12px; margin: 5vh auto; box-sizing: border-box; padding: 50px 30px 30px 10px; } .authorizationHolder__content { width: 40%; min-width: 300px; margin: 0 auto; } .authorizationHolder__textHolder { background-color: whitesmoke; display: flex; flex-grow: 1; flex-direction: column; justify-content: center; align-items: center; } ``` ``` <div class="authorizationHolder"> <div class="registration__titleBlock"> <div class="titleText">{{ title }}</div> </div> <div class="authorizationHolder__textHolder"> <div class="baseText">{{ text }}</div> </div> </div> ```
null
CC BY-SA 4.0
null
2023-02-24T21:14:56.540
2023-02-24T21:14:56.540
null
null
2,774,496
null
75,561,534
2
null
75,560,327
2
null
Some things to check: - `Publicly Available = Yes`- `0.0.0.0/0`- - - I tried connecting from my computer and it timed-out too, and I know that my "network permits" such traffic. Therefore, it seems likely that the database was launched with a subnet group that contained only , which are not reachable from the Internet. It appears that the database has been launched with a Subnet Group that contains private subnets rather than public subnets. If you have not yet connected to the database / stored any data, it would be easiest to: - - - For security, you should adjust the Security Group to only allow access from your IP address (removing the entries for `0.0.0.0/0`).
null
CC BY-SA 4.0
null
2023-02-24T21:28:26.903
2023-02-24T22:14:04.137
2023-02-24T22:14:04.137
174,777
174,777
null
75,561,891
2
null
75,538,338
1
null
For this specific problem, a good solution might be to choose `commonmark` instead of pandoc's default Markdown as output format: ``` $ pandoc -t commonmark input.md <img src="/src/guides/administrator-guide/media/button_dataset.png" style="height:0.8cm" /> ``` However, if you prefer to use a filter, then use `RawInline` elements to avoid escaping: ``` function Image (elem) return pandoc.RawInline( 'html', string.format('<img src="%s" height="%s" />', img.src, img.attributes.height) ) end ```
null
CC BY-SA 4.0
null
2023-02-24T22:23:46.263
2023-02-24T22:23:46.263
null
null
2,425,163
null
75,561,993
2
null
75,561,731
0
null
So, you created an array of lists ``` img = np.array([[255, 255, 255],[127, 255, 127],[239, 255, 15],[127 , 0, 0]]) ``` But nothing tells python to treat this as and RGB image, so instead it created an array with four rows and three columns. Then when you plotted it here: ``` plt.imshow(img) ``` It simply applied colors from the viridis color pallet and displayed it as a visual array where each value got a color from that pallet. As mentioned in the comments, you need to expressly tell python to treat this array as an image: ``` imshow(img, origin='upper', interpolation='nearest') ``` For a straight pixel-by-pixel translation
null
CC BY-SA 4.0
null
2023-02-24T22:41:12.587
2023-02-24T22:41:12.587
null
null
6,258,859
null
75,562,023
2
null
75,560,313
0
null
I don't understand exactly what you're trying to do here. Given this set of data, do you expect to see CDF, CVG, HJI, and IKL give a value of 4 AM and RED give a value of 6 PM? Or does the presence of RED mean all the previous data get a value of 6 PM as well? In English, is CDF an order that came in early, so it will be picked at 4 AM, or is CDF part of a five-item order, and because it's a larger order, it needs to be picked at 6 PM? If the latter, try this: ``` Sub Test() i = 1 pos = Cells(Rows.Count, 4).End(xlUp).Row Do While i <= pos If pos <= 4 Then Range("E" & i).Value = "4AM" Else If pos <= 10 Then Range("E" & i).Value = "6PM" Else Range("E" & i).Value = "12PM" End If End If i = i + 1 Loop End Sub ```
null
CC BY-SA 4.0
null
2023-02-24T22:45:21.213
2023-02-24T22:45:21.213
null
null
5,175,468
null
75,562,127
2
null
75,560,376
-2
null
Have u checked if the fields are fillable in the model? If not make it fillable and check again.
null
CC BY-SA 4.0
null
2023-02-24T23:01:43.343
2023-02-24T23:01:43.343
null
null
10,784,883
null
75,562,180
2
null
75,561,731
0
null
A 2D array will be interpreted as values to be color mapped. That's why you see 4 rows of 3 colors. To interpret the array as 4 rgb values, you can plot a 3D array: ``` import matplotlib.pyplot as plt import numpy as np img = np.array([[255, 255, 255], [127, 255, 127], [239, 255, 15], [127, 0, 0]]) plt.imshow([img]) # note the extra brackets plt.show() ``` [](https://i.stack.imgur.com/xynqk.png) To illustrate what was happening with the original plot, seaborn's heatmap can automatically add some annotations and a colorbar. ``` import seaborn as sns sns.heatmap(img, annot=True, fmt='d', cmap='viridis') plt.imshow([img]) ``` [](https://i.stack.imgur.com/7G2UA.png) PS: To display RGB values as an `NxM` array of pixels, the values should form a 3D `NxMx3` array: ``` img = np.array([[[255, 255, 255], [127, 255, 127]], [[239, 255, 15], [127, 0, 0]]]) plt.imshow(img) ``` [](https://i.stack.imgur.com/ZskrH.png)
null
CC BY-SA 4.0
null
2023-02-24T23:11:16.287
2023-02-27T19:37:44.090
2023-02-27T19:37:44.090
12,046,409
12,046,409
null
75,562,612
2
null
62,650,216
0
null
You can also use the second suggestion of hiding LocationAccuracy by adding this after importing 'package:geolocator/geolocator.dart' like this: ``` import 'package:geolocator/geolocator.dart' hide LocationAccuracy; ```
null
CC BY-SA 4.0
null
2023-02-25T00:47:40.670
2023-02-25T00:47:40.670
null
null
4,032,717
null
75,562,647
2
null
75,562,287
0
null
I have successfully written to a bucket with the following code: ``` import json import boto3 s3 = boto3.resource('s3') def lambda_handler(event, context): json_data = ['1', '2', '3'] json_output = '\n'.join(json.dumps(i) for i in json_data) response = s3.Object('chadyuk-technologies','year=2023/month=03/day=24/json_result_23-02:12.03.json').put(Body=json_output) print(response) return { 'statusCode': 200, 'body': json.dumps(json_output) } ```
null
CC BY-SA 4.0
null
2023-02-25T00:55:51.020
2023-02-25T14:24:51.747
2023-02-25T14:24:51.747
17,464,257
17,464,257
null
75,562,681
2
null
75,546,011
0
null
It is unclear whether the `Weekday` column is part your input or just part of your output. But you did say so I will assume it is output (Why id needs repeating I do not know). You can get the day name from the [to_char()](https://www.postgresql.org/docs/current/functions-formatting.html) function. Then use that in the Window function `row_number() over()`. (see [here](https://www.postgresql.org/docs/current/tutorial-window.html), [here](https://www.postgresql.org/docs/current/functions-window.html) and [here](https://www.postgresql.org/docs/current/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS)) ``` with test(dt) as ( select dt::date from generate_series( date '2020-01-01' , date '2020-01-22' , interval '1 day' ) gs(dt) ) -- your query starts here. select dt "Date" , wd "Weekday" , (row_number(*) over(partition by wd order by dt))::text || '.' || wd "Expected" from (select dt, to_char(dt, 'Day') wd from test ) sq order by dt; ``` The CTE is used strictly as a data generator. See [demo](https://dbfiddle.uk/btGcOH30) FYI. It is best with an international audience to use the ISO 8601 date format yyyy-mm-dd. It is unambiguous regardless of local conventions. If your days had not exceeded 12 we could not know which format (mm-dd-yyyy or dd-mm-yyyy) you used.
null
CC BY-SA 4.0
null
2023-02-25T01:04:16.350
2023-02-25T01:04:16.350
null
null
7,623,856
null
75,562,691
2
null
75,562,588
0
null
The `exitonclick` method starts the GUI's mainloop, which means all the lines that come after will not be executed until the GUI is closed. The solution would be to simply move the `exitonclick` line to the last line of your script: ``` from turtle import Turtle, Screen aubree = Turtle() my_screen = Screen() aubree.shape("turtle") aubree.color("coral") my_screen.exitonclick() ```
null
CC BY-SA 4.0
null
2023-02-25T01:06:50.270
2023-02-25T01:06:50.270
null
null
17,829,451
null
75,562,890
2
null
59,598,646
0
null
This is the latest solution for the categorical_feature error. ``` from sklearn.preprocessing import LabelEncoder, OneHotEncoder Label_x = LabelEncoder() x[:,0] = Label_x.fit_transform(x[:,0]) onehotencoder = OneHotEncoder.categorical_features =[0] OneHotEncoder().fit_transform(x).toarray() x = x[:, 1:] ```
null
CC BY-SA 4.0
null
2023-02-25T02:12:28.600
2023-02-25T05:35:20.127
2023-02-25T05:35:20.127
8,372,853
13,050,205
null
75,562,949
2
null
75,546,011
0
null
You can calculate how many full weeks has been passed since the start of the month and add 1 to the result. This is the index number of day of week. ``` (extract(day from dt)::int - 1) / 7 + 1 ``` Full example: ``` with test(dt) as (select dt::date from generate_series(date '2020-01-01' , date '2020-01-22' , interval '1 day' ) gs(dt)) select dt, (extract(day from dt)::int - 1) / 7 + 1 || '. ' || to_char(dt, 'Day') from test order by dt ```
null
CC BY-SA 4.0
null
2023-02-25T02:30:22.583
2023-02-26T14:01:40.130
2023-02-26T14:01:40.130
1,771,556
1,771,556
null
75,562,948
2
null
75,562,852
0
null
There are 3 branches for this: ``` {b?: { a?: number }} ``` [](https://i.stack.imgur.com/0Zb8M.png) Which are: - `b``return input`- `b``a``return input.b``{ b: {} }`- `b``return input.b.a``{ b: { a: SOME_NUMBER} }` Edit: Here are my test cases: ``` describe('My group', () => { test('empty object', () => { example({}); expect(1).toBe(1); }); test('only with b', () => { example({ b: {} }); expect(1).toBe(1); }); test('all keys', () => { example({ b: { a: 5 } }); expect(1).toBe(1); }); }); ```
null
CC BY-SA 4.0
null
2023-02-25T02:30:04.060
2023-02-25T03:12:07.227
2023-02-25T03:12:07.227
5,078,746
5,078,746
null
75,563,048
2
null
75,553,372
1
null
It is possible with Transnomino using "Reset every 4" in the numbering renaming action. You can set it to hexadecimal and start at 10 to let it create A, B, C, D for every 4 files. - - - - This will rename: ``` 00001.png 00002.png 00003.png 00004.png 00005.png 00006.png 00007.png 00008.png ``` to: ``` A00001.png B00002.png C00003.png D00004.png A00005.png B00006.png C00007.png D00008.png ``` If it is important that you get for example: A00001.png, A00002.png, A00003.png, A00004.png instead of A00001.png, A00005.png, A00009.png, A00013.png you could trim the last digits of and add an additional numbering step using "Repeat 4": - - - - This would end up in something like this: ``` A00001.png B00001.png C00001.png D00001.png A00002.png B00002.png C00002.png D00002.png ```
null
CC BY-SA 4.0
null
2023-02-25T03:06:42.640
2023-02-25T03:06:42.640
null
null
18,444,168
null
75,563,554
2
null
75,383,645
0
null
There are mechanism that lets you modify `applicationhost.config` in arbitrary ways. Check [this document](https://github.com/projectkudu/kudu/wiki/Azure-Site-Extensions#private-extensions) on using a 'Top level private extension' might be helpful.
null
CC BY-SA 4.0
null
2023-02-25T05:52:58.233
2023-02-25T05:52:58.233
null
null
10,893,879
null
75,563,641
2
null
75,558,070
0
null
I resolved it by refreshing my windows and then creating a new Dart variable in the User variables . Then I specified the dart\bin part that is contained in the flutter\bin . And updated the flutter\bin in the Path variable. After running flutter doctor, it worked , but because I was use android Electric eel version, I got an error couldn't find bundled Java version. Then I went to \Application\Android\android studio\jre file and deleted it because it contained a single empty file . Then I duplicated the jbr file in it, and renamed it to jre. That solved my issue
null
CC BY-SA 4.0
null
2023-02-25T06:19:02.530
2023-02-25T06:19:02.530
null
null
20,067,533
null
75,563,929
2
null
75,557,921
0
null
You could do something like this ``` <div class="relative flex h-20 w-full items-center justify-between overflow-hidden border-2 border-gray-500"> <!-- manually set height --> <div class="flex h-full flex-grow items-center">content 1</div> <div class="h-24 rotate-[30deg] transform border-2 border-gray-500"></div> <!-- manually set divider height --> <div class="flex h-full flex-grow items-center">content 2</div> </div> ``` [](https://i.stack.imgur.com/cnZU1.png) You could change the `flex-grow` class and give `w-1/2`, `w-1/3`&`2/3` to classes if you want to control the ratios. Additionally `pl-10`, `pr-10` etc could be given to the content divs if the slanted line is crossing into actual content.
null
CC BY-SA 4.0
null
2023-02-25T07:30:39.200
2023-02-25T07:30:39.200
null
null
10,232,739
null
75,563,976
2
null
75,563,903
1
null
Using `setTimeout` is very likely not the best way to stage a sequence of promises. Here is a different approach involving an `async` function to help clarifying the execution order: ``` // helper function to create a promise: function prom(name,delay){ return new Promise((res,rej)=>{ setTimeout(()=>{ console.log(`promise ${name}: ${delay}ms`); res(name)}, delay); }); } async function main(){ let [d,a]=await Promise.all([prom("D",400),prom("A",200)]); let [c,b]=await Promise.all([prom("C",300),prom("B",100)]); console.log(`all done: ${[a,b,c,d].join(", ")}`) } main() ``` At first the promises D and A are awaited in parallel. Once they are fulfilled the promises C and B are awaited in parallel. Admittedly, the promise B could have started a tiny bit earlier as it does not depend on the fulfillment of D, but this will not really make a significant difference in the end. And, in the interest of an easy to read and understand code, I consider this solution to be adequate. Ok, here is another version - slightly more difficult to read - that will allow D and B to partly run in parallel (B can start after A was resolved): ``` // helper function to create a promise: function prom(name,delay,...args){ console.log(`starting ${name}, using arguments: [${args.join(", ")}].`); return new Promise((res,rej)=>{ setTimeout(()=>{ console.log(`resolved ${name} after ${delay}ms`); res(name)}, delay); }); } async function main(){ const [D,A] = [prom("D",2000),prom("A",1000)]; // define the promises D and A immediatey const [c,b] = await Promise.all([ // await promises C and B ... Promise.all([D,A]).then(args=>prom("C",2000,...args)), // define promise C after D and A are resolved A.then(args=>prom("B",2000,...args)) ]);// define promise B after A is resolved console.log(`All promises resolved, here is the data: ${await A}, ${b}, ${c}, ${await D}.`); } main() ``` ``` .as-console-wrapper {min-height:100%} ``` Don't be fooled by the `await A` and `await D` at the end of the script: As both promises are already resolved, no extra time is spent in "waiting" here. The `await` is necessary to access the returned data from the promises `a` and `d`.
null
CC BY-SA 4.0
null
2023-02-25T07:42:06.273
2023-02-25T11:46:59.273
2023-02-25T11:46:59.273
2,610,061
2,610,061
null
75,564,077
2
null
75,563,986
0
null
You can use this function for this: ``` Function SheetByCodeName(wb As Workbook, cn As String) As Worksheet Dim ws As Worksheet: For Each ws In wb.Worksheets If ws.CodeName = cn Then Set SheetByCodeName = ws Exit Function End If Next Set SheetByCodeName = Nothing End Function ``` Call it like this: ``` Debug.Print SheetByCodeName( ThisWorkbook, "Sheet1" ).Name ```
null
CC BY-SA 4.0
null
2023-02-25T08:03:04.650
2023-02-25T08:03:04.650
null
null
6,306,782
null