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
21
results
Andrew Fletcher
•
Updating to PHP 8.1, I found this interesting code stop...
Deprecated function: trim(): Passing null to parameter #1 ($string) of type string is deprecated in bales_preprocess() (line 162 of /var/www/{path/to/file})
What is trim(). Very simply, it removes whitespaces (if they exist) at the start or end of a string.
Andrew Fletcher
•
Running Docker
Dangerous word... I'm assuming that Docker is installed....
Andrew Fletcher
•
A bug bear that I have had for a while with Drupal content is how come the...
Andrew Fletcher
•
Well for me it is very slow. Recently, I upgraded from CentOS 6 to Centos...
Andrew Fletcher
•
To connect to your CPanel hosted server via SSH OSX, please follow...
Andrew Fletcher
•
I had an instance where I needed to move content from a plist to the server database. To achieve this step, I added a few lines of code where the plist was called and added a call to the API so the data would be on the server.
The original code appeared as:
class ContactsSource {
static var contacts: [Contact] {
let data = try! PlistLoader.array(fromFile: "ContactsDB", ofType: "plist")
return data.compactMap { Contact(dictionary: $0) }
}
}I needed to access...