# example

Published articles for example.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Track LLM API Costs with genai-prices

DevFeed: [Track LLM API Costs with genai-prices](<https://devfeed.tech/articles/track-llm-api-costs-with-genai-prices-30863.md>)

Original publisher: [Read original article](<https://www.packetcoders.io/track-llm-api-costs-with-genai-prices/>)

Author: Rick Donato

Published: 2026-09-01T11:16:32Z

Content type: tutorial

Language: en

Sources: [Packet Coders - Learn Network Automation](<https://devfeed.tech/sources/packet-coders-learn-network-automation.md>)

Topics: [Large Language Model](<https://devfeed.tech/topics/llm.md>), [API](<https://devfeed.tech/topics/api.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [Library](<https://devfeed.tech/topics/library.md>), [Python](<https://devfeed.tech/topics/python.md>), [Binance](<https://devfeed.tech/topics/binance.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [cost](<https://devfeed.tech/tags/cost.md>), [example](<https://devfeed.tech/tags/example.md>), [genai](<https://devfeed.tech/tags/genai.md>), [inference](<https://devfeed.tech/tags/inference.md>), [install](<https://devfeed.tech/tags/install.md>), [library](<https://devfeed.tech/tags/library.md>), [llm](<https://devfeed.tech/tags/llm.md>), [openai](<https://devfeed.tech/tags/openai.md>), [pricing](<https://devfeed.tech/tags/pricing.md>), [python](<https://devfeed.tech/tags/python.md>), [report](<https://devfeed.tech/tags/report.md>), [request](<https://devfeed.tech/tags/request.md>), [tips](<https://devfeed.tech/tags/tips.md>), [token](<https://devfeed.tech/tags/token.md>), [uv](<https://devfeed.tech/tags/uv.md>)

### AI overview

A tutorial introducing the genai-prices Python library for estimating the cost of calling LLM inference APIs. It explains that the library can avoid maintaining a custom pricing table and can report token counts and cost for each request, with an OpenAI installation and usage example.

### Source excerpt

Tip: Use the genai-prices Python library to calculate the estimated cost of calling LLM inference APIs. This avoids maintaining your own pricing table and lets you report token counts and cost for each request. Below is an example: # Install: uv add openai genai-prices from openai import OpenAI from

## NetBox: How to Prevent Direct Changes to the Main Branch

DevFeed: [NetBox: How to Prevent Direct Changes to the Main Branch](<https://devfeed.tech/articles/netbox-how-to-prevent-direct-changes-to-the-main-branch-30859.md>)

Original publisher: [Read original article](<https://www.packetcoders.io/netbox-how-to-prevent-direct-changes-to-main/>)

Author: Rick Donato

Published: 2026-07-17T12:51:04Z

Content type: tutorial

Language: en

Sources: [Packet Coders - Learn Network Automation](<https://devfeed.tech/sources/packet-coders-learn-network-automation.md>)

Topics: [NetBox](<https://devfeed.tech/topics/netbox.md>), [configuration](<https://devfeed.tech/topics/configuration.md>)

Tags: [configuration](<https://devfeed.tech/tags/configuration.md>), [example](<https://devfeed.tech/tags/example.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [netbox](<https://devfeed.tech/tags/netbox.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [tips](<https://devfeed.tech/tags/tips.md>)

### AI overview

This tutorial explains how to use the NetBox Changes plugin to prevent direct changes to the main branch. It describes enabling protect_main so changes use branches and an approval workflow, and provides a configuration example.

### Source excerpt

NetBox Tip! Prevent direct changes to the main branch when using the NetBox Changes plugin. Enable protect_main to ensure all changes are made through branches and follow an approval workflow. Here's an example configuration: # ./configuration.py PLUGINS_CONFIG = { "netbox_changes": { "protect_main": True,

## How to Get Structured Responses back from OpenAI

DevFeed: [How to Get Structured Responses back from OpenAI](<https://devfeed.tech/articles/how-to-get-structured-responses-back-from-openai-30854.md>)

Original publisher: [Read original article](<https://www.packetcoders.io/how-to-get-structured-responses-back-from-openai/>)

Author: Rick Donato

Published: 2026-01-28T08:00:56Z

Content type: tutorial

Language: en

Sources: [Packet Coders - Learn Network Automation](<https://devfeed.tech/sources/packet-coders-learn-network-automation.md>)

Topics: [JSON Schema](<https://devfeed.tech/topics/json-schema.md>), [OpenAI](<https://devfeed.tech/topics/openai.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>)

Tags: [example](<https://devfeed.tech/tags/example.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [json](<https://devfeed.tech/tags/json.md>), [json-schema](<https://devfeed.tech/tags/json-schema.md>), [llm](<https://devfeed.tech/tags/llm.md>), [openai](<https://devfeed.tech/tags/openai.md>), [responses](<https://devfeed.tech/tags/responses.md>), [schema](<https://devfeed.tech/tags/schema.md>), [structured](<https://devfeed.tech/tags/structured.md>), [structured-output](<https://devfeed.tech/tags/structured-output.md>), [tips](<https://devfeed.tech/tags/tips.md>)

### AI overview

This tutorial explains that structured responses from OpenAI can be obtained by defining the expected output format with JSON Schema. It includes a Python example using the OpenAI client.

### Source excerpt

OpenAI Tip: If you need structured output from the LLM, use structured responses and define the expected format with JSON Schema. Here's an example: from openai import OpenAI import os client = OpenAI(api_key=os.getenv("OPENAI_API_KEY")) # Define the exact shape you want back.

## Analytical Skills for Data Professionals: Estimation, Baselines, Root Cause Analysis, and Metrics

DevFeed: [Analytical Skills for Data Professionals: Estimation, Baselines, Root Cause Analysis, and Metrics](<https://devfeed.tech/articles/the-analytical-skills-no-one-teaches-you-37150.md>)

Original publisher: [Read original article](<https://seattledataguy.substack.com/p/the-analytical-skills-no-one-teaches>)

Author: SeattleDataGuy

Published: 2026-01-23T16:49:29Z

Content type: tutorial

Language: en

Sources: [SeattleDataGuy's Newsletter](<https://devfeed.tech/sources/seattledataguy-s-newsletter.md>)

Topics: [Data Science](<https://devfeed.tech/topics/data-science.md>), [Math and Logic](<https://devfeed.tech/topics/math-and-logic.md>), [data](<https://devfeed.tech/topics/data.md>), [dataset](<https://devfeed.tech/topics/dataset.md>)

Tags: [analysis](<https://devfeed.tech/tags/analysis.md>), [critical-thinking](<https://devfeed.tech/tags/critical-thinking.md>), [example](<https://devfeed.tech/tags/example.md>), [framework](<https://devfeed.tech/tags/framework.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [metrics](<https://devfeed.tech/tags/metrics.md>), [root-cause-analysis](<https://devfeed.tech/tags/root-cause-analysis.md>)

### AI overview

This article discusses analytical skills that data professionals often develop on the job, including analytical intuition, estimation with limited information, baseline reasoning, critical thinking, root cause analysis, and selecting meaningful metrics.

### Source excerpt

Estimation, Baselines, Root Cause Analysis, and Metrics That Actually Matter

## How to Inject Host and Group Vars from Ansible into NetBox Config Templates

DevFeed: [How to Inject Host and Group Vars from Ansible into NetBox Config Templates](<https://devfeed.tech/articles/how-to-inject-host-and-group-vars-from-ansible-into-netbox-config-templates-30855.md>)

Original publisher: [Read original article](<https://www.packetcoders.io/how-to-inject-host-and-group-vars-from-ansible-into-netbox-config-templates/>)

Author: Rick Donato

Published: 2025-12-18T09:00:32Z

Content type: tutorial

Language: en

Sources: [Packet Coders - Learn Network Automation](<https://devfeed.tech/sources/packet-coders-learn-network-automation.md>)

Topics: [Ansible](<https://devfeed.tech/topics/ansible.md>), [NetBox](<https://devfeed.tech/topics/netbox.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [ansible](<https://devfeed.tech/tags/ansible.md>), [api](<https://devfeed.tech/tags/api.md>), [config](<https://devfeed.tech/tags/config.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [example](<https://devfeed.tech/tags/example.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [netbox](<https://devfeed.tech/tags/netbox.md>), [templates](<https://devfeed.tech/tags/templates.md>), [tips](<https://devfeed.tech/tags/tips.md>)

### AI overview

A tutorial showing how to pass Ansible group_vars and host_vars into NetBox Config Templates so the variables can be used when rendering configuration.

### Source excerpt

Ansible and NetBox Tip: Pass Ansible group_vars and host_vars into NetBox Config Templates by sending your Ansible vars, making them available directly within your Config Templates. Here is an example: # Ansible Playbook - name: Trigger NetBox to return rendered configuration ansible.builtin.uri: url: "{{ NETBOX_ENDPOINT }}/api/dcim/

## Range Syntax for Style Queries

DevFeed: [Range Syntax for Style Queries](<https://devfeed.tech/articles/range-syntax-for-style-queries-28832.md>)

Original publisher: [Read original article](<https://una.im/range-style-queries/>)

Published: 2025-11-12T00:00:00Z

Content type: tutorial

Language: en

Sources: [Una Kravets](<https://devfeed.tech/sources/una-kravets.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [demo](<https://devfeed.tech/tags/demo.md>), [example](<https://devfeed.tech/tags/example.md>), [function](<https://devfeed.tech/tags/function.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [learn](<https://devfeed.tech/tags/learn.md>), [properties](<https://devfeed.tech/tags/properties.md>), [range](<https://devfeed.tech/tags/range.md>), [syntax](<https://devfeed.tech/tags/syntax.md>)

### AI overview

A tutorial on using range syntax in CSS style queries and the if() function. It explains comparisons involving custom properties, literal values, and function results, with examples for responsive components, weather cards, grid placement, and styling effects.

### Source excerpt

Learn how to use the new range syntax for CSS style queries and the if() function.

## Make regular expressions easier to read

DevFeed: [Make regular expressions easier to read](<https://devfeed.tech/articles/make-regular-expressions-easier-to-read-37309.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/make-regular-expressions-easier-to-read/>)

Author: Stanko

Published: 2025-03-31T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [formatting](<https://devfeed.tech/topics/formatting.md>), [Maintainability](<https://devfeed.tech/topics/maintainability.md>)

Tags: [example](<https://devfeed.tech/tags/example.md>), [extra](<https://devfeed.tech/tags/extra.md>), [join](<https://devfeed.tech/tags/join.md>), [maintainability](<https://devfeed.tech/tags/maintainability.md>), [readability](<https://devfeed.tech/tags/readability.md>), [regular-expressions](<https://devfeed.tech/tags/regular-expressions.md>), [value](<https://devfeed.tech/tags/value.md>)

### AI overview

The article presents a formatting technique for making complex regular expressions easier to read: split the expression into multiple string components, join them, and construct the final regex. The approach adds code and requires escaping backslashes, but enables scanning and comments that can improve readability and maintainability.

### Source excerpt

This is a simple formatting trick I use to make regular expressions more readable. The secret? Break them into multiple lines. To achieve this, format the regex as an array of strings and then concatenate the array into a single regex string. Example # Compare this example, written in a single line: const FILTER_REGEXP = /(?<name>blur|brightness|contrast|grayscale|hue-rotate|invert|opacity|saturate|sepia)\((?<value>-?\d*(?:\.\d*)?)(?<unit>\w*?)\)/g; with the multi-line version: const SUPPORTED_FILTERS = [ 'blur', 'brightness', 'contrast', 'grayscale', 'hue-rotate', 'invert', 'opacity', 'saturate', 'sepia', ].join('|'); const FILTER_REGEXP = new RegExp( [ `(?<name>${SUPPORTED_FILTERS})`, // filter name `\\(`, `(?<value>\-?\\d*(?:\\.\\d*)?)`, // value `(?<unit>\\w*?)`, // unit if any `\\)`, ].join(''), 'g' ); The multi-line version has a bit more code, but it's easier to scan and read. It also allows us to write comments for each section, clarifying the purpose of each part of the regex. I've found that complex expressions are much easier to write this way. I believe it greatly reduces the cognitive load for both the writer and the reader. Caveats # You'll need to escape the backslashes in regex strings. While this is a minor inconvenience, the readability benefits easily outweigh it. Conclusion # It boils down to personal preference, but I believe the extra code is worth it, as it improves readability and maintainability. This is especially true when dealing with notoriously difficult-to-parse complex regular expressions.

## HTML Tables with Horizontal Scroll and Sticky Headers

DevFeed: [HTML Tables with Horizontal Scroll and Sticky Headers](<https://devfeed.tech/articles/html-tables-with-horizontal-scroll-and-sticky-headers-37593.md>)

Original publisher: [Read original article](<https://www.taniarascia.com/horizontal-scroll-fixed-headers-table/>)

Author: hello@taniarascia.com

Published: 2024-10-09T00:00:00Z

Content type: tutorial

Language: en

Sources: [Tania Rascia](<https://devfeed.tech/sources/tania-rascia.md>)

Topics: [HTML](<https://devfeed.tech/topics/html.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [modern web development](<https://devfeed.tech/topics/modern-web-development.md>)

Tags: [container](<https://devfeed.tech/tags/container.md>), [css](<https://devfeed.tech/tags/css.md>), [design](<https://devfeed.tech/tags/design.md>), [dockerignore-usage](<https://devfeed.tech/tags/dockerignore-usage.md>), [example](<https://devfeed.tech/tags/example.md>), [headers](<https://devfeed.tech/tags/headers.md>), [helps](<https://devfeed.tech/tags/helps.md>), [html](<https://devfeed.tech/tags/html.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [table](<https://devfeed.tech/tags/table.md>), [tables](<https://devfeed.tech/tags/tables.md>)

### AI overview

A tutorial on building HTML tables that support horizontal scrolling and sticky headers. It explains why sticky positioning can fail inside an overflow container and presents a table-wrapper height as the solution, producing a vertically and horizontally scrollable datagrid-style view.

### Source excerpt

Turns out, creating an HTML table that has both horizontal scroll and fixed headers can be a tricky problem. As another developer said about...

## Binary search finds things fast

DevFeed: [Binary search finds things fast](<https://devfeed.tech/articles/binary-search-finds-things-fast-39066.md>)

Original publisher: [Read original article](<https://blog.devdetails.com/p/binary-search-finds-things-fast>)

Author: Mike

Published: 2024-08-13T07:55:55Z

Content type: tutorial

Language: en

Sources: [Dev Details](<https://devfeed.tech/sources/dev-details.md>)

Topics: [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [Programming](<https://devfeed.tech/topics/programming.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [array](<https://devfeed.tech/tags/array.md>), [binary-search](<https://devfeed.tech/tags/binary-search.md>), [book](<https://devfeed.tech/tags/book.md>), [example](<https://devfeed.tech/tags/example.md>), [interactive](<https://devfeed.tech/tags/interactive.md>)

### AI overview

A tutorial explaining binary search, an efficient algorithm for finding an item's position in a sorted array by repeatedly halving the search range. It covers the requirement that the array be sorted, the search steps, and use cases including checking values, finding occurrences, and determining insertion points.

### Source excerpt

I wrote a small interactive book to teach binary search.

## Deeplink to specific PDF pages

DevFeed: [Deeplink to specific PDF pages](<https://devfeed.tech/articles/deeplink-to-specific-pdf-pages-31137.md>)

Original publisher: [Read original article](<https://technicalwriting.dev/2024/08/pdf/index.html>)

Published: 2024-07-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [technicalwriting.dev](<https://devfeed.tech/sources/technicalwriting-dev.md>)

Topics: [pdf](<https://devfeed.tech/topics/pdf.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [example](<https://devfeed.tech/tags/example.md>), [guide](<https://devfeed.tech/tags/guide.md>), [links](<https://devfeed.tech/tags/links.md>), [pages](<https://devfeed.tech/tags/pages.md>), [pdf](<https://devfeed.tech/tags/pdf.md>)

### AI overview

This article explains how to link directly to a specific page in a PDF by appending #page=X to the URL. It notes that browsers count the PDF's first page as page 1, which may differ from the page numbering used by the document's authors.

### Source excerpt

Append #page=X to your URL, where X is the page to link to.

## Using the Gemini app with Material Design 3

DevFeed: [Using the Gemini app with Material Design 3](<https://devfeed.tech/articles/using-the-gemini-app-with-material-design-3-29265.md>)

Original publisher: [Read original article](<https://material.io/blog/how-to-gemini-app-compose-material-design-3>)

Published: 2024-05-07T13:00:00Z

Content type: tutorial

Language: en

Sources: [Material.io - Material Design](<https://devfeed.tech/sources/material-io-material-design.md>)

Topics: [Material Design for Bootstrap](<https://devfeed.tech/topics/material-design-for-bootstrap.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [design](<https://devfeed.tech/tags/design.md>), [developers](<https://devfeed.tech/tags/developers.md>), [example](<https://devfeed.tech/tags/example.md>), [gemini](<https://devfeed.tech/tags/gemini.md>), [material-design-3](<https://devfeed.tech/tags/material-design-3.md>)

### AI overview

The article presents example prompts for designers and developers using the Gemini app with Material Design 3.

### Source excerpt

Example prompts for designers and developers

## Kotlin Reflection: Type references

DevFeed: [Kotlin Reflection: Type references](<https://devfeed.tech/articles/kotlin-reflection-type-references-39216.md>)

Original publisher: [Read original article](<https://kt.academy/article/ak-reflection-type>)

Published: 2023-10-30T00:15:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Code](<https://devfeed.tech/topics/code.md>), [class](<https://devfeed.tech/topics/class.md>), [function](<https://devfeed.tech/topics/function.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [example](<https://devfeed.tech/tags/example.md>), [generator](<https://devfeed.tech/tags/generator.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [practical](<https://devfeed.tech/tags/practical.md>), [type-argument](<https://devfeed.tech/tags/type-argument.md>), [type-parameter](<https://devfeed.tech/tags/type-parameter.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A tutorial on Kotlin reflection type references. It explains how types differ from classes, how type references expose nullability, type arguments, and classifiers, and how to use them in a random-value generator.

### Source excerpt

Using type references, with practical example of random value generator.

## Kotlin Reflection: Class references

DevFeed: [Kotlin Reflection: Class references](<https://devfeed.tech/articles/kotlin-reflection-class-references-39215.md>)

Original publisher: [Read original article](<https://kt.academy/article/ak-reflection-class>)

Published: 2023-10-23T00:15:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [class](<https://devfeed.tech/topics/class.md>)

Tags: [class](<https://devfeed.tech/tags/class.md>), [example](<https://devfeed.tech/tags/example.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [object](<https://devfeed.tech/tags/object.md>), [practical](<https://devfeed.tech/tags/practical.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A tutorial on Kotlin class references, covering class names, type characteristics, visibility, members, and declared members, with a practical object serialization example.

### Source excerpt

All the essential aspects of class references, and a practical object serialization example.

## Scrollbar width custom event

DevFeed: [Scrollbar width custom event](<https://devfeed.tech/articles/scrollbar-width-custom-event-37346.md>)

Original publisher: [Read original article](<https://muffinman.io/blog/scrollbar-size-observer/>)

Author: Stanko

Published: 2023-06-19T00:00:00Z

Content type: tutorial

Language: en

Sources: [Stanko Tadić](<https://devfeed.tech/sources/stanko-tadic.md>)

Topics: [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [browser](<https://devfeed.tech/topics/browser.md>), [CSS](<https://devfeed.tech/topics/css.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [code](<https://devfeed.tech/tags/code.md>), [css](<https://devfeed.tech/tags/css.md>), [demo](<https://devfeed.tech/tags/demo.md>), [developers](<https://devfeed.tech/tags/developers.md>), [example](<https://devfeed.tech/tags/example.md>), [examples](<https://devfeed.tech/tags/examples.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [layout](<https://devfeed.tech/tags/layout.md>), [live](<https://devfeed.tech/tags/live.md>), [load](<https://devfeed.tech/tags/load.md>), [prevent](<https://devfeed.tech/tags/prevent.md>), [stack-overflow](<https://devfeed.tech/tags/stack-overflow.md>), [value](<https://devfeed.tech/tags/value.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

This tutorial explains scrollbar-related layout issues and shows how to create a custom JavaScript event that detects changes in scrollbar width using ResizeObserver. It also covers initializing a CSS variable early to reduce layout shift and briefly mentions a CSS alternative.

### Source excerpt

Some operating systems and browsers are not showing scrollbars by default. That often results in developers forgetting about these pesky gray bars and the issues they can cause. I'll give you two quick examples: When setting overflow: hidden on the body element, if there was a scrollbar visible, content will jump a little as it now has more space. If you ever implemented scroll locking for modals, you've probably encountered this issue. Another thing is that width: 100vw and width: 100% on the body element don't match if there is a scrollbar visible: 100vw is the width of the viewport including the scrollbar. 100% is the width of the viewport excluding the scrollbar. This becomes obvious if you have a fixed element like a header. It will be a little bit wider than the rest of the content when scrollbar is visible. I'm sure there are more issues, but these are the two I remembered on top of my head. Anyhow, let's see how to solve this. JavaScript solution # Ideally we would like to have a scrollbar-width event. It doesn't exist, so we'll have to create a custom event ourselves, and trigger it when scrollbar width changes. To catch the width changing, we can't use the resize event because viewport size don't change when scrollbar is toggled. However, if we set the ResizeObserver on the html element, it will trigger when the scrollbar is toggled. Code # After setting the observer we need to fire our custom event when width has changed. Code looks something like this: const initScrollbarWidthEvent = () => { // Custom event const scrollbarEvent = new Event("scrollbar-width"); // Initial state let currentWidth = window.innerWidth - document.documentElement.clientWidth; const observer = new ResizeObserver(() => { const newWidth = window.innerWidth - document.documentElement.clientWidth; // Check if the scrollbar width has changed and trigger the custom event if (newWidth !== currentWidth) { // Update event data // We are passing both previous and current width, // because

## Diagrams and API design with AI

DevFeed: [Diagrams and API design with AI](<https://devfeed.tech/articles/diagrams-and-api-design-with-ai-39071.md>)

Original publisher: [Read original article](<https://blog.devdetails.com/p/diagrams-and-api-design-with-ai>)

Author: Mike

Published: 2023-06-14T03:37:00Z

Content type: tutorial

Language: en

Sources: [Dev Details](<https://devfeed.tech/sources/dev-details.md>)

Topics: [coding](<https://devfeed.tech/topics/coding.md>), [OpenAPI Specification](<https://devfeed.tech/topics/openapi.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [ChatGPT](<https://devfeed.tech/topics/chatgpt.md>), [plantuml](<https://devfeed.tech/topics/plantuml.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [api-design](<https://devfeed.tech/tags/api-design.md>), [best-practices](<https://devfeed.tech/tags/best-practices.md>), [coding](<https://devfeed.tech/tags/coding.md>), [example](<https://devfeed.tech/tags/example.md>), [openapi](<https://devfeed.tech/tags/openapi.md>), [plantuml](<https://devfeed.tech/tags/plantuml.md>)

### AI overview

Part 3 of a practical series demonstrates using ChatGPT to visualize a URL shortening service design with a PlantUML sequence diagram and generate an OpenAPI specification. It compares ChatGPT 3.5 and ChatGPT 4 for these tasks and explains how an API-first specification supports parallel UI and server development.

### Source excerpt

Part 3 of a practical example of using AI for coding

## A practical example of using AI for coding

DevFeed: [A practical example of using AI for coding](<https://devfeed.tech/articles/a-practical-example-of-using-ai-for-coding-39060.md>)

Original publisher: [Read original article](<https://blog.devdetails.com/p/a-practical-example-of-using-ai-for>)

Author: Mike

Published: 2023-06-14T03:34:57Z

Content type: tutorial

Language: en

Sources: [Dev Details](<https://devfeed.tech/sources/dev-details.md>)

Topics: [ai-coding](<https://devfeed.tech/topics/ai-coding.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [Development](<https://devfeed.tech/topics/development.md>), [coding](<https://devfeed.tech/topics/coding.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [pair\_programming](<https://devfeed.tech/topics/pair-programming.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [ai-coding](<https://devfeed.tech/tags/ai-coding.md>), [coding](<https://devfeed.tech/tags/coding.md>), [developing](<https://devfeed.tech/tags/developing.md>), [example](<https://devfeed.tech/tags/example.md>), [pair-programming](<https://devfeed.tech/tags/pair-programming.md>), [practical](<https://devfeed.tech/tags/practical.md>), [programming](<https://devfeed.tech/tags/programming.md>)

### AI overview

A practical tutorial on using ChatGPT and other large language models in software development. It presents an end-to-end application walkthrough and recommends treating AI as a coding companion while remaining engaged, precise, and able to review the generated code.

### Source excerpt

An end-to-end walkthrough of designing, developing, and testing a simple application with the help of AI.

## Lambda expressions

DevFeed: [Lambda expressions](<https://devfeed.tech/articles/lambda-expressions-39305.md>)

Original publisher: [Read original article](<https://kt.academy/article/fk-lambda-expressions>)

Published: 2022-08-26T00:03:00Z

Content type: tutorial

Language: en

Sources: [Kt. Academy](<https://devfeed.tech/sources/kt-academy.md>)

Topics: [Kotlin](<https://devfeed.tech/topics/kotlin.md>), [Functional programming](<https://devfeed.tech/topics/functional-programming.md>), [Programming](<https://devfeed.tech/topics/programming.md>), [function](<https://devfeed.tech/topics/function.md>), [destructuring](<https://devfeed.tech/topics/destructuring.md>)

Tags: [destructuring](<https://devfeed.tech/tags/destructuring.md>), [example](<https://devfeed.tech/tags/example.md>), [functional-programming](<https://devfeed.tech/tags/functional-programming.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [intellij](<https://devfeed.tech/tags/intellij.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [learn](<https://devfeed.tech/tags/learn.md>), [workshop-learning-programming](<https://devfeed.tech/tags/workshop-learning-programming.md>)

### AI overview

A Kotlin tutorial explaining lambda expressions as function literals, including their syntax, parameters, trailing-lambda convention, destructuring, and common problems caused by braces or uninvoked lambdas.

### Source excerpt

Let's learn how to use lambda expressions, what special support they have, and what traps they generate.

## Stochastic Systems, Fokker-Planck and the Heat Equation via Haskell

DevFeed: [Stochastic Systems, Fokker-Planck and the Heat Equation via Haskell](<https://devfeed.tech/articles/stochastic-systems-fokker-planck-and-the-heat-equation-via-haskell-36145.md>)

Original publisher: [Read original article](<https://idontgetoutmuch.wordpress.com/2020/04/26/stochastic-systems-fokker-planck-and-the-heat-equation-via-haskell/>)

Author: Dominic Steinitz

Published: 2020-04-26T14:20:10Z

Content type: tutorial

Language: en

Sources: [Maths, Stats & Functional Programming](<https://devfeed.tech/sources/maths-stats-functional-programming.md>)

Topics: [systems](<https://devfeed.tech/topics/systems.md>), [Haskell](<https://devfeed.tech/topics/haskell.md>), [Library](<https://devfeed.tech/topics/library.md>), [C](<https://devfeed.tech/topics/c.md>)

Tags: [c](<https://devfeed.tech/tags/c.md>), [example](<https://devfeed.tech/tags/example.md>), [examples](<https://devfeed.tech/tags/examples.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [library](<https://devfeed.tech/tags/library.md>), [numerical-methods](<https://devfeed.tech/tags/numerical-methods.md>), [numerics](<https://devfeed.tech/tags/numerics.md>), [partial-differential-equations](<https://devfeed.tech/tags/partial-differential-equations.md>), [source](<https://devfeed.tech/tags/source.md>), [system](<https://devfeed.tech/tags/system.md>), [systems](<https://devfeed.tech/tags/systems.md>), [using](<https://devfeed.tech/tags/using.md>), [with](<https://devfeed.tech/tags/with.md>)

### AI overview

A short Haskell example models a stochastic system with the Fokker-Planck method, converts it to a partial differential equation, and solves a two-dimensional equation using SUNDIALS through the hmatrix-sundials library. The example is based on C examples included with the SUNDIALS source.

### Source excerpt

This is a short example of taking a stochastic system, using Fokker-Planck to convert it to a PDES and using SUNDIALS to solve a 2D partial differential equation in Haskell via the hmatrix-sundials library. The example is taken from the C examples that come with the SUNDIALS source. Here's the full blog.

## EOF is not a character

DevFeed: [EOF is not a character](<https://devfeed.tech/articles/eof-is-not-a-character-33311.md>)

Original publisher: [Read original article](<https://ruslanspivak.com/eofnotchar/>)

Author: Ruslan Spivak

Published: 2020-03-01T16:53:00Z

Content type: tutorial

Language: en

Sources: [Ruslan Spivak](<https://devfeed.tech/sources/ruslan-spivak.md>)

Topics: [C](<https://devfeed.tech/topics/c.md>), [IO](<https://devfeed.tech/topics/io.md>), [Unix](<https://devfeed.tech/topics/unix.md>), [ASCII](<https://devfeed.tech/topics/ascii.md>), [Streams](<https://devfeed.tech/topics/streams.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [ascii](<https://devfeed.tech/tags/ascii.md>), [blog](<https://devfeed.tech/tags/blog.md>), [c](<https://devfeed.tech/tags/c.md>), [code](<https://devfeed.tech/tags/code.md>), [computer](<https://devfeed.tech/tags/computer.md>), [example](<https://devfeed.tech/tags/example.md>), [file](<https://devfeed.tech/tags/file.md>), [function](<https://devfeed.tech/tags/function.md>), [library](<https://devfeed.tech/tags/library.md>), [linux](<https://devfeed.tech/tags/linux.md>), [mac-os](<https://devfeed.tech/tags/mac-os.md>), [python](<https://devfeed.tech/tags/python.md>), [standard-library](<https://devfeed.tech/tags/standard-library.md>), [stream](<https://devfeed.tech/tags/stream.md>), [systems](<https://devfeed.tech/tags/systems.md>), [text](<https://devfeed.tech/tags/text.md>), [unix](<https://devfeed.tech/tags/unix.md>), [value](<https://devfeed.tech/tags/value.md>)

### AI overview

This tutorial explains that EOF in C is not a character and is not stored at the end of a file. It examines EOF in Unix I/O, its usual value of -1, and why that value cannot represent a character.

### Source excerpt

I was reading Computer Systems: A Programmer's Perspective the other day and in the chapter on Unix I/O the authors mention that there is no explicit "EOF character" at the end of a file.

## Git Bisect

DevFeed: [Git Bisect](<https://devfeed.tech/articles/git-bisect-34118.md>)

Original publisher: [Read original article](<https://artandscienceofcoding.com/devrecipes/git/bisect/>)

Author: Derek Lee

Published: 2020-01-01T00:00:00Z

Content type: tutorial

Language: en

Sources: [art and science of coding](<https://devfeed.tech/sources/art-and-science-of-coding.md>)

Topics: [Git](<https://devfeed.tech/topics/git.md>), [bug](<https://devfeed.tech/topics/bug.md>), [test](<https://devfeed.tech/topics/test.md>)

Tags: [behavior](<https://devfeed.tech/tags/behavior.md>), [bug](<https://devfeed.tech/tags/bug.md>), [commit](<https://devfeed.tech/tags/commit.md>), [dev-recipes](<https://devfeed.tech/tags/dev-recipes.md>), [example](<https://devfeed.tech/tags/example.md>), [git](<https://devfeed.tech/tags/git.md>), [test](<https://devfeed.tech/tags/test.md>)

### AI overview

A reference guide to using Git Bisect to identify the commit that introduced a bug. It explains how to start the bisect process, mark known good and bad commits, test intermediate commits, repeat the process, and finish after finding the problematic commit.

### Source excerpt

Reference Documentation

## One Dimensional Heat Equation via SUNDIALS and Haskell

DevFeed: [One Dimensional Heat Equation via SUNDIALS and Haskell](<https://devfeed.tech/articles/one-dimensional-heat-equation-via-sundials-and-haskell-36144.md>)

Original publisher: [Read original article](<https://idontgetoutmuch.wordpress.com/2019/10/22/one-dimensional-heat-equation-via-sundials-and-haskell/>)

Author: Dominic Steinitz

Published: 2019-10-22T09:45:32Z

Content type: tutorial

Language: en

Sources: [Maths, Stats & Functional Programming](<https://devfeed.tech/sources/maths-stats-functional-programming.md>)

Topics: [Haskell](<https://devfeed.tech/topics/haskell.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [example](<https://devfeed.tech/tags/example.md>), [haskell](<https://devfeed.tech/tags/haskell.md>), [library](<https://devfeed.tech/tags/library.md>), [uncategorized](<https://devfeed.tech/tags/uncategorized.md>)

### AI overview

A short Haskell example showing how to use SUNDIALS through the hmatrix-sundials library to solve a simple one-dimensional heat-equation partial differential equation. The example is based on C examples included with the SUNDIALS source.

### Source excerpt

This is a short example of how to use SUNDIALS to solve a simple partial differential equation in Haskell via the hmatrix-sundials library. The example is taken from the C examples that come with the SUNDIALS source. Here's the full blog. I'll give a better URL soonish.

## Multi-column manipulation

DevFeed: [Multi-column manipulation](<https://devfeed.tech/articles/multi-column-manipulation-31225.md>)

Original publisher: [Read original article](<https://every-layout.dev/blog/multi-column-manipulation/>)

Author: Heydon Pickering

Published: 2019-07-20T00:00:00Z

Content type: tutorial

Language: en

Sources: [The Every Layout Blog](<https://devfeed.tech/sources/the-every-layout-blog.md>)

Topics: [CSS](<https://devfeed.tech/topics/css.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [modern web development](<https://devfeed.tech/topics/modern-web-development.md>)

Tags: [css](<https://devfeed.tech/tags/css.md>), [developer-tools](<https://devfeed.tech/tags/developer-tools.md>), [example](<https://devfeed.tech/tags/example.md>), [interaction](<https://devfeed.tech/tags/interaction.md>), [layout](<https://devfeed.tech/tags/layout.md>)

### AI overview

An exploration of CSS Multi-column Layout, focusing on its unusual horizontal or vertical overflow behavior and the interaction challenges of horizontal scrolling. It also demonstrates quantity-dependent columns that split long bullet lists into two columns when they contain at least five items.

### Source excerpt

Despite predating both Grid and Flexbox, Multi-column Layout represents--at least to me--an even more radical departure from the way we normally do and think about CSS layout. Dividing just one element into a multi-column representation of its contents feels weird, heretical even. Setting a multi-column context means asking (flow) content to progress, by column, in a horizontal direction. This invokes one of two issues, depending on whether you set a height on the element. With no set height, there's no limit to the height of the columns. This will result in vertical overflow, and the necessity to scroll down and up the page to read each successive column. Many are likely to find this arduous. With a set height, columns are forced to spawn in the inline (horizontal) direction, creating horizontal overflow. Setting overflow: auto frames this correctly. .columns { height: 25vh; /* ↓ columns defined by width */ columns: 30ch; overflow: auto; } However, despite the increasing popularity of scrolling menus and other such patterns harnessing horizontal scrolling, it is still an unconventional interaction paradigm -- and unconventional patterns are liable to be misapprehended by users. There are ways to increase perceived affordance, of course--perhaps by adding some custom styling to the scrollbar (-webkit-scrollbar), or providing some overflow-dependent shadows. But this may not be enough. Quantity-dependent columns One thing I have been experimenting with is the application of multiple columns in response to content quantity. Let's say I have a bullet list, and let's assume each bullet point is likely to be relatively short; no more than a sentence. There's no benefit to dividing the list into columns when there are only a few points. But the overall height of the list is shortened (and the chance of the reader being able to see the whole list without scrolling is increased) when a long list is divided into two. In the following example, the list is split into two columns w

## Using Goss to validate Packer builds

DevFeed: [Using Goss to validate Packer builds](<https://devfeed.tech/articles/using-goss-to-validate-packer-builds-37820.md>)

Original publisher: [Read original article](<https://carlosbecker.com/posts/packer-goss/>)

Author: Carlos Alexandro Becker

Published: 2018-12-06T00:00:00Z

Content type: tutorial

Language: en

Sources: [Carlos Becker](<https://devfeed.tech/sources/carlos-becker.md>)

Topics: [test](<https://devfeed.tech/topics/test.md>), [Tool](<https://devfeed.tech/topics/tool.md>), [builds](<https://devfeed.tech/topics/builds.md>), [Server](<https://devfeed.tech/topics/server.md>), [Cloud](<https://devfeed.tech/topics/cloud.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [cloud](<https://devfeed.tech/tags/cloud.md>), [download](<https://devfeed.tech/tags/download.md>), [example](<https://devfeed.tech/tags/example.md>), [file](<https://devfeed.tech/tags/file.md>), [fork](<https://devfeed.tech/tags/fork.md>), [git-tags](<https://devfeed.tech/tags/git-tags.md>), [permissions](<https://devfeed.tech/tags/permissions.md>), [plugin](<https://devfeed.tech/tags/plugin.md>), [releases](<https://devfeed.tech/tags/releases.md>), [run](<https://devfeed.tech/tags/run.md>), [simple](<https://devfeed.tech/tags/simple.md>), [test](<https://devfeed.tech/tags/test.md>), [tool](<https://devfeed.tech/tags/tool.md>), [useful](<https://devfeed.tech/tags/useful.md>), [using](<https://devfeed.tech/tags/using.md>)

### AI overview

A practical tip for validating Packer-built images with Goss. The article describes using a Packer plugin and a Goss test suite to check an image before pushing it to Google Cloud.

### Source excerpt

Ever wanted to validate your Packer image with Goss? Well, you can!

## An Annotated webpack 4 Config for Frontend Web Development

DevFeed: [An Annotated webpack 4 Config for Frontend Web Development](<https://devfeed.tech/articles/an-annotated-webpack-4-config-for-frontend-web-development-31240.md>)

Original publisher: [Read original article](<https://nystudio107.com/blog/an-annotated-webpack-4-config-for-frontend-web-development>)

Author: andrew@nystudio107.com (Andrew Welch)

Published: 2018-10-23T13:40:00Z

Content type: tutorial

Language: en

Sources: [nystudio107 | Articles on modern web development.](<https://devfeed.tech/sources/nystudio107-articles-on-modern-web-development.md>)

Topics: [Webpack](<https://devfeed.tech/topics/webpack.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [Front end](<https://devfeed.tech/topics/frontend.md>), [Tooling](<https://devfeed.tech/topics/tooling.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [complete](<https://devfeed.tech/tags/complete.md>), [complex](<https://devfeed.tech/tags/complex.md>), [development](<https://devfeed.tech/tags/development.md>), [example](<https://devfeed.tech/tags/example.md>), [frontend](<https://devfeed.tech/tags/frontend.md>), [help](<https://devfeed.tech/tags/help.md>), [here-s](<https://devfeed.tech/tags/here-s.md>), [insights](<https://devfeed.tech/tags/insights.md>), [modern](<https://devfeed.tech/tags/modern.md>), [need](<https://devfeed.tech/tags/need.md>), [production](<https://devfeed.tech/tags/production.md>), [real-world](<https://devfeed.tech/tags/real-world.md>), [sophisticated](<https://devfeed.tech/tags/sophisticated.md>), [tooling](<https://devfeed.tech/tags/tooling.md>), [web-development](<https://devfeed.tech/tags/web-development.md>), [webpack](<https://devfeed.tech/tags/webpack.md>), [websites](<https://devfeed.tech/tags/websites.md>)

### AI overview

A tutorial presenting an annotated, real-world production webpack 4 configuration for modern frontend web development. It explains why the author adopted webpack and compares it with alternatives such as Laravel Mix, vue-cli, and Neutrino.

### Source excerpt

As web development becomes more complex, we need tooling to help us build modern websites. Here's a complete real-world production example of a sophisticated webpack 4 config

[Next page](<https://devfeed.tech/tags/example.md?cursor=WyIyMDE4LTEwLTIzVDEzOjQwOjAwKzAwOjAwIiwgImNiZjZlMGQ4LWRhOTgtNGFiNy04OGE1LWNhOWNmZmI0MGFkZiJd>)