Below is an example to populate a view with rectangular shapes navigation link items in the grid with SwiftUI: Output:More
The best programming blog.
Covering a wide array of programming topics.
SwiftUI Focus specific NavigationLink item in Grid
Below is an example to create a grid filled with colored rectangles in NavigationLink. The goal is to focus on specific NavigationLink item in the grid. Let’s say we want to focus on the orange color navigation item link in the grid. Follow the below code to do the same: With the help of the…More
SwiftUI Argument passed to call that takes no arguments
Error while calling a view and getting this error: Let’s say the error is coming at following line: The reason for that error could be that the UserDetailView has no property defined in its View and the View is like this: The solution is to add the property to the view so that it can…More
SwiftUI error build: Extra argument in call
Let’s say your view is like this: Code while calling the view: If you build your SwiftUI project with the above code wit will give you this error: Extra argument ‘…’ in call. The solution is to replace the let with var in the property for which the error is coming, i.e replace the following…More
TinyMCE This type parameter might need an extends DialogData constraint
Error on buling the project using TinyMCE: Solution: The solution to fix the above issue is to add “skipLibCheck”: true in your tsconfig.json of your project: Example:More
Check for GPU access with PyTorch
We can use torch.cuda.is_available to check whether we access for GPU or not with PyTorch. Output will be either true if the access is there; false otherwise.More
How to find Pytorch version installed on your machine
Run the following command to enter into the python console Enter the following two lines in the console: The terminal will return the torch version installed on yoru machine. The output will be like this:More
How to find pip version installed through terminal
In order to find the version of pip installed on your machine you need to run the following command: The terminal will return the pip version installed on your machine: Above 22.2.2 is the version of pip installed on the machine.More
You are using pip version however, version is available
Warning when building the python project: The solution is to update pip package manager on your system, you can follow the following blog to do the same: After you have upgraded the pip package the warning will no longer come.More
How to update pip version on your machine
Run the following command to upgrade the pip version on your machine: Output wi;; be like: You have successfully updated pip on your machine.More