developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
Selected filter
131
results
Andrew Fletcher
•
Creating a foreach loop such as
var maxDigits: Int = 5
private var pinDots: some View {
HStack {
ForEach(0..<maxDigits) { index in
ZStack {
Image(systemName: self.getImageName(at: index))
.font(.system(size: 50.0, weight: .thin, design: .rounded))
.foregroundColor(.white)
.background(
index < pin.count ?
Color.black.opacity(0.8) :
.clear).cornerRadius(35.0)
}
...
Andrew Fletcher
•
How to count the number of files in a directory. At some point you'll have...
Andrew Fletcher
•
I've recently upgraded the server Ubuntu 20.04 updating the PHP version from 7.4...
Andrew Fletcher
•
Looking at composer I first wanted to check the current version, which is...
Andrew Fletcher
•
Build the PHP base image with apache-buster using the Dockerfile.base
Since JN...
Andrew Fletcher
•
Find by file name
To perform a find command in terminal use
find / -name php.ini -type f
find / -name {filename} {type parameters}Note there are many parameters in the commands, so I'll cover a couple regular expressions here. Such as,
-name
matches the string being searched and is case sensitive
-iname
matches the string being searched and is case insensitive
-type f
means to find a file with the name being searched. In this instance php.ini
-type d
find a...
Andrew Fletcher
•
This article works through the steps to update dependencies in the...
Andrew Fletcher
•
The challenge I was facing, I had written a script to scan barcodes and use...
Andrew Fletcher
•
I had generated a backup of key directories on the server - see Create a...
Andrew Fletcher
•
An approach to generating a backup server is using a shell script. A...
Andrew Fletcher
•
In Xcode and executing a run command, the response error was:
{
"name": "NullInjectorError",
"ngTempTokenPath": null,
"ngTokenPath": ["Ee", "fe", "Ne", "Ne", "Ne"]
}This was a result of me attempting to incorrectly import the AppComponent from inside a service.
import { AppComponent } from './app.component';
Solution
Remove from the service files any requests made for the...
Andrew Fletcher
•
Creating a bash script
Bash scripts are files containing code that tell your...
Andrew Fletcher
•
Working hard developing your app and now it's time to let others begin testing...
Andrew Fletcher
•
ERROR Error: Uncaught (in promise): TypeError: undefined is not an object...
Andrew Fletcher
•
How do you generate a .pem file from an existing .ppk key?
Is putty on your...