developer resources
Codebales holds an ever growing number of solutions to problems that we have experienced in our day to day code writing
432
results
Andrew Fletcher
•
In a site I'm working at the moment, we need to download high resolution images for media groups. How do you force a href to download rather than the default display in the browser?
The code I've written to manage the paragraph is
{% block paragraph %}
<div{{attributes.addClass(classes)}}>
{% block content %}
<div class="g-0">
<div class="row align-items-top g-10">
<div class="d-none d-sm-block">
{% set media_image =...
Andrew Fletcher
•
I'm in an environment where the default branch is staging and I'm attempting to...
Andrew Fletcher
•
Whilst attempting to download the latest config.zip file for Solr, I was greeted...
Andrew Fletcher
•
Having a situation where I'm running a sub theme based on Bootstrap Barrio, but...
Andrew Fletcher
•
This guide has been compiled as a reference tool on how to access field values...
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
•
Running Docker, I deleted the images and containers they had been built to date....
Andrew Fletcher
•
I've recently upgraded the server Ubuntu 20.04 updating the PHP version from 7.4...
Andrew Fletcher
•
Installing PHP on OSX and it installed PHP 8.2.x. However, for my...
Andrew Fletcher
•
A recent upgrade to PHP 8.1, has highlighted an error that hadn't been appearing previously.
Deprecated function : explode(): Passing null to parameter #2 ($string) of type string is deprecated in toc_js_node_view()(line 130 of modules/contrib/toc_js/toc_js.module).In the top_js.module file from L124
// lambda function to clean css identifiers
$cleanCssIdentifier = function ($value) {
return Html::cleanCssIdentifier(trim($value));
};
// toc-js class is used to initialize...
Andrew Fletcher
•
Setting up the admin password.
Process:
1. Edit jetty.xml
To begin you...
Andrew Fletcher
•
Looking at composer I first wanted to check the current version, which is...
Andrew Fletcher
•
How do you remove a file from git?
Use the command (rm) to remove files from...
Andrew Fletcher
•
Working in Drupal 9.5 and I'm now getting the following cache tag error
The...