Skip to content
Menu
Open World News Open World News
  • Privacy Policy
Open World News Open World News

Author: Michael G

Reminder: Submit your abstract by 14th May for MoodleMoot Global 2024!

Posted on May 9, 2024 by Michael G
by Sandra Matz.  

This is a friendly reminder that the deadline for abstract submissions for MoodleMoot Global 2024 is coming up! The abstract submission deadline is Tuesday 14th May (UTC-6).

With the focus on this year’s theme “Unlocking Human Potential“, we invite Moodlers from any educational, training or learning field to come together as educators, developers, administrators, and learners to learn from each other, share findings and explore best practices to adapt, innovate, and make learning accessible to all.

This year’s MoodleMoot Global conference will address different topics, which align with our Moodle Product vision and the main areas we will focus on when developing our future versions of Moodle. We invite you to review the Moodle Products Roadmap to find out more about each one of the topics and to help you think about how you might address them with your abstract submission.

At Moodle, we’re excited to share and explore the vast possibilities of education in an open and diverse community and we are looking forward to hearing your ideas!

Submit your abstract proposal now for the opportunity to be part of the program.

Visit the event website to find out more about the event and register.

Reminder: Submit your abstract by 14th May for MoodleMoot Global 2024!

AWA Anglophone Bi-Weekly Webinar 3.0:  Adding Images to Wikipedia articles

Posted on May 9, 2024 by Michael G
On March 13, 2024, the Code for Africa’s Wikipedia Alliance (AWA) hosted its 4th edition of the WiR bi-weekly webinar series titled “Adding Images to…

PreviousNext: Creating a cards section with Layout Builder

Posted on May 9, 2024 by Michael G

In this post, we explore building a cards section with Layout Builder.

 

by
lee.rowlands
/ 9 May 2024

The component will look something like the ‘Services’ section on our homepage*. If you’ve built websites over the last decade, you’ve probably built a component like this many times.

PreviousNext: Creating a cards section with Layout Builder

The key aspects of the component are

  • A title
  • Some intro text
  • A series of cards. Each card has a URL, title, image and teaser text

If you’ve previously used paragraphs for modelling landing pages, you may immediately be thinking that your content model will be made up of paragraph type ‘cards’ with three fields as follows:

  • A title
  • A teaser field for the intro text
  • A multi-value cards field, which is itself another paragraph type ‘card’.

Or rather, because this is Layout Builder, you might be thinking of a block-content type called cards with those fields on it — leaning on paragraphs for the multi-value cards field.

Whilst that approach works well for paragraphs, it isn’t the best approach for Layout Builder:

  • There are some gnarly bugs with Layout Builder + Block Content + Paragraphs + Content moderation
  • It requires content-editors to fumble in the off-canvas editor to rearrange each card using drag-and-drop. We want a nice re-order experience like this:
Gif showing cards being dragged and drop with live preview

Making the most of layout plugins

Let’s instead pivot to a layout plugin for the cards component and think of it in terms of regions.

We have:

  • A layout title
  • An introduction region
  • A cards region

We probably already have a block-content type that consists of a WYSIWYG field — e.g., something like the Basic block content type in core. We can use that for the intro text.

So we need a card block content-type. But we probably want two. A lot of our cards will just point to other pages on the site — and it makes sense for the card to be built from fields on that page. If we put a teaser image and teaser text field on all our node-types, we can make use of them when creating a card for that page. We can also use these for meta-tags like the OpenGraph image. And all our node-types already have a title and URL. The second block-type is if we need to link to pages outside the site. So, the content models for those two block types are as follows:

  • For the internal card block-type, we need an entity-reference field to allow the content-editor to select the content to generate the card for
  • For the external card block-type, we need all the fields — title, image, teaser, URL

Defining layout plugins

Next, we need to define our layout plugin. We start with a layouts.yml file in our theme or module.

cards:
  label: Card grid
  category: Layouts
  template: layouts/cards
  icon_map:
    - [intro, intro, intro]
    - [c1, c2, c3]
    - [c4, c5, c6]
    - [c7, c8, c9]
    - [c10, c11, c12]
  regions:
    content:
      label: Cards
    intro:
      label: Introduction
  library: 'your_theme/card'

Note: the icon_map isn’t needed here, but it gives us a nice icon in the ‘Add section’ form.

With those pieces in place, we can use Layout builder restrictions to ensure only the right block-types can be placed in each region. The introduction region can be limited to the basic WYSIWYG block-type. The cards region can be limited to the internal and external card block-type.

This layout will use the default layout plugin, but we want a custom layout plugin with a title field in the configuration form. You can read more about creating a custom layout plugin from our previous post about creating a dynamic layout with flexible regions. This one will be much simpler. We just need a title field in the configuration form and a preprocess hook to expose that to our template. 

The first step of this is to add a ‘class’ entry to our layout definition.

cards:
  // ...
  class: Drupalyour_themeLayoutsCards
  // ...

Then, we need to create that class. 

<?php
namespace Drupalyour_themeLayouts;
use DrupalCoreFormFormStateInterface;
use DrupalCoreLayoutLayoutDefault;
/**
 * Defines a class for a layout that has a title option.
 */
class LayoutWithTitle extends LayoutDefault {
  /**
   * {@inheritdoc}
   */
  public function defaultConfiguration() {
    return parent::defaultConfiguration() + ['title' => ''];
  }
  /**
   * {@inheritdoc}
   */
  public function buildConfigurationForm(array $form, FormStateInterface $form_state): array {
    $build = parent::buildConfigurationForm($form, $form_state);
    $build['title'] = [
      '#weight' => -10,
      '#type' => 'textfield',
      '#default_value' => $this->configuration['title'],
      '#title' => $this->t('Title'),
      '#description' => $this->t('Provide an optional title for this section'),
    ];
    return $build;
  }
  /**
   * {@inheritdoc}
   */
  public function submitConfigurationForm(array &$form, FormStateInterface $form_state): void {
    parent::submitConfigurationForm($form, $form_state);
    $this->configuration['title'] = $form_state->getValue('title');
  }
}

Then, in your theme you can preprocess to make this variable available to the template.

/**
 * Implements hook_preprocess_HOOK().
 */
function your_theme_preprocess_layout(array &$variables): void {
  // Add the title from LayoutWithTitle.
  $variables['title'] = $variables['content']['#settings']['title'] ?? NULL;
}

For optimum UX, we’d probably want to make Layout Builder Browser blocks, too. You can read more in our previous post about our approach to Layout Builder UX.

All that remains then is to theme the block-content types to match the design. For more on that, see our previous post on theming block-content types with Layout Builder.

As an extra enhancement, you could add integration with Layout Section Classes module to give content editors additional options like the number of cards shown across the page in the card grid.

Note: this component on our website is automated and built with Views, but there is often a need to build out curated equivalents.

Tagged

Layout Builder

validate_foreign_key reduces the impact of adding foreign keys on high-traffic tables

Posted on May 9, 2024 by Michael G
https://blog.saeloun.com/2024/05/08/rails-validate_foreign_key/

Python 3.13.0 beta 1 released

Posted on May 9, 2024 by Michael G

I’m pleased to announce the release of Python 3.13 beta 1 (and feature freeze for Python 3.13).

https://www.python.org/downloads/release/python-3130b1/

 

This is a beta preview of Python 3.13

Python 3.13 is still in development. This release, 3.13.0b1, is the first of four beta release previews of 3.13.

Beta release previews are intended to give the wider community the
opportunity to test new features and bug fixes and to prepare their
projects to support the new feature release.

We strongly encourage maintainers of third-party Python projects to test with 3.13 during the beta phase and report issues found to the Python bug tracker
as soon as possible. While the release is planned to be feature
complete entering the beta phase, it is possible that features may be
modified or, in rare cases, deleted up until the start of the release
candidate phase (Tuesday 2024-07-30). Our goal is to have no ABI changes
after beta 4 and as few code changes as possible after 3.13.0rc1, the
first release candidate. To achieve that, it will be extremely important to get as much exposure for 3.13 as possible during the beta phase.

Please keep in mind that this is a preview release and its use is not recommended for production environments.

Major new features of the 3.13 series, compared to 3.12

Some of the new major new features and changes in Python 3.13 are:

New features

  • A new and improved interactive interpreter, based on PyPy’s, featuring multi-line editing and color support, as well as colorized exception tracebacks.
  • An experimental free-threaded build mode, which disables the Global Interpreter Lock, allowing threads to run more concurrently.
  • A preliminary, experimental JIT, providing the ground work for significant performance improvements.
  • The (cyclic) garbage collector is now incremental, which should mean shorter pauses for collection in programs with a lot of objects.
  • A modified version of mimalloc is now included, optional but enabled by default if supported by the platform, and required for the free-threaded build mode.
  • Docstrings now have their leading indentation stripped, reducing memory use and the size of .pyc files. (Most tools handling docstrings already strip leading indentation.)
  • The dbm module has a new dbm.sqlite3 backend that is used by default when creating new files.

Typing

  • Support for type defaults in type parameters.
  • A new type narrowing annotation, typing.TypeIs.
  • A new annotation for read-only items in TypeDicts.

Removals and new deprecations

  • PEP 594 (Removing dead batteries from the standard library) scheduled removals of many deprecated modules: aifc, audioop, chunk, cgi, cgitb, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, xdrlib, lib2to3.
  • Many other removals of deprecated classes, functions and methods in various standard library modules.
  • C API removals and deprecations. (Some removals present in alpha 1 were reverted in alpha 2, as the removals were deemed too disruptive at this time.)
  • New deprecations, most of which are scheduled for removal from Python 3.15 or 3.16.

(Hey, fellow core developer, if a feature you find important is missing from this list, let Thomas know.)

For more details on the changes to Python 3.13, see What’s new in Python 3.13. The next pre-release of Python 3.13 will be 3.13.0b2, currently scheduled for 2024-05-28.

 

More resources

  • Online Documentation
  • PEP 719, 3.13 Release Schedule
  • Report bugs at Issues · python/cpython · GitHub.
  • Help fund Python directly (or via GitHub Sponsors), and support the Python community.

 

Enjoy the new releases

Thanks to all of the many volunteers who help make Python Development
and these releases possible! Please consider supporting our efforts by
volunteering yourself or through organization contributions to the
Python Software Foundation.

Your release team,
Thomas Wouters
Łukasz Langa
Ned Deily
Steve Dower 

 

Did GitHub Copilot really increase my productivity?

Posted on May 9, 2024 by Michael G
Yuxuan Shui, the developer behind the X11 compositor picom (a fork of Compton) published a blog post detailing their experiences with using GitHub Copilot for a year. I had free access to GitHub Copilot for about a year, I used it, got used to it, and slowly started to take it for granted, until one day it was taken away. I had to re-adapt to a life without Copilot, but it also gave me a chance to look back at how I used Copilot, and reflect – had Copilot actually been helpful to me? Copilot definitely feels a little bit magical when it works. It’s like it plucked code straight from my brain and put it on the screen for me to accept. Without it, I find myself getting grumpy a lot more often when I need to write boilerplate code – “Ugh, Copilot would have done it for me!”, and now I have to type it all out myself. That being said, the answer to my question above is a very definite “no, I am more productive without it”. Let me explain. ↫ Yuxuan Shui The two main reasons why Shui eventually realised Copilot was slowing them down were its unpredictability, and its slowness. It’s very difficult to understand when, exactly, Copilot will get things right, which is not a great thing to have to deal with when you’re writing code. They also found Copilot incredibly slow, with its suggestions often taking 2-3 seconds or longer to appear – much slower than the suggestions from the clangd language server they use. Of course, everybody’s situation will be different, and I have a suspicion that if you’re writing code in incredibly popular languages, say, Python or JavaScript, you’re going to get more accurate and possibly faster suggestions from Copilot. As Shui notes, it probably also doesn’t help that they’re writing an independent X11 compositor, something very few people are doing, meaning Copilot hasn’t been trained on it, which in turn means the tool probably has no clue what’s going on when Shui is writing their code. As an aside, my opinion on GitHub Copilot is clear – it’s quite possibly the largest case of copyright infringement in human history, and in its current incarnation it should not be allowed to continue to operate. As I wrote over a year ago: If Microsoft or whoever else wants to train a coding “AI” or whatever, they should either be using code they own the copyright to, get explicit permission from the rightsholders for “AI” training use (difficult for code from larger projects), or properly comply with the terms of the licenses and automatically add the terms and copyright notices during autocomplete and/or properly apply copyleft to the newly generated code. Anything else is a massive copyright violation and a direct assault on open source. Let me put it this way – the code to various versions of Windows has leaked numerous times. What if we train an “AI” on that leaked code and let everyone use it? Do you honestly think Microsoft would not sue you into the stone age? ↫ Thom Holwerda It’s curious that as far as I know, Copilot has not been trained on Microsoft’s own closed-source code, say, to Windows or Office, while at the same time the company claims Copilot is not copyright infringement or a massive open source license violation machine. If what Copilot does is truly fair use, as Microsoft claims, why won’t Microsoft use its own closed-source code for training? We all know the answer. Deeply questionable legality aside, do any of you use Copilot? Has it had any material impact on your programming work? Is its use allowed by your employer, or do you only use it for personal projects at home?

Domaćice sa Bosfora – 66 Epizoda

Posted on May 8, 2024 by Michael G

Video by via Dailymotion Source Glumac/GlumicaSerhat TutumluerCeyda DüvenciÖzge ÖzderHale AkınlıBennu YıldırımlarBatuhan KaracakayaSongül ÖdenMelda AratCenk Ertanİlker Kurtİncilay ŞahinMetin BüktelEvrim SolmazServer MutluEce HakimDevrim ÖzderErdal BilingenFurkan Andıç Go to Source

Aliran dana Hamas, Saifuddin kemuka pendirian Malaysia kepada AS esok

Posted on May 8, 2024 by Michael G

Video by via Dailymotion Source Menteri Dalam Negeri Saifuddin Nasution Ismail akan menjelaskan pendirian rasmi Malaysia berkait pendanaan Iran dan proksinya, seperti dibangkitkan Pegawai Kanan Jabatan Perbendaharaan Amerika Syarikat (AS), Brian Nelson. Laporan Lanjut: https://www.freemalaysiatoday.com/category/bahasa/tempatan/2024/05/08/aliran-dana-hamas-saifuddin-kemuka-pendirian-malaysia-kepada-as-esok/ Free Malaysia Today is an independent, bi-lingual news portal with a focus on Malaysian current affairs. Subscribe to our channel…

Easy Aurora Painting Ideas ART Asmr

Posted on May 8, 2024 by Michael G

Video by via Dailymotion Source Aurora PaintingsSubscribe if you like the video Go to Source

Analisis Saham Pilihan: BRPT, BBRI Hingga BBCA

Posted on May 8, 2024 by Michael G

Video by via Dailymotion Source “Saksikan tayangan kami Official Youtube IDX Channel di Program 2nd Session Closing, Rabu (08/05/2024) dengan Tema Analisis Saham Pilihan: BRPT, BBRI Hingga BBCA”. Go to Source

  • Previous
  • 1
  • …
  • 459
  • 460
  • 461
  • 462
  • 463
  • 464
  • 465
  • …
  • 1,531
  • Next

Recent Posts

  • Open Source email Clients
  • When and how to use benchmarking
  • How Plotly AI revolutionizes the dashboard development process
  • [TUT] LoRa & LoRaWAN – MikroTik wAP LR8 kit mit The Things Network verbinden [4K | DE]
  • Mercado aguarda Powell e olha Trump, dados e Haddad | MINUTO TOURO DE OURO – 11/02/25

Categories

  • Android
  • Linux
  • News
  • Open Source
©2025 Open World News | Powered by Superb Themes
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept All”, you consent to the use of ALL the cookies. However, you may visit "Cookie Settings" to provide a controlled consent.
Cookie SettingsAccept All
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT