Are you ready to make something truly beautiful with p5.js? Forget about boring bar charts and sales data—let’s create art that moves, breathes, and responds to your touch. We’re going to explore generative art, where code becomes your paintbrush and algorithms become your muse.

Generative art is all about creating beauty through systems and rules. Instead of drawing each line by hand, you write code that follows patterns, and those patterns create something unexpected and often stunning. It’s like planting a garden and watching it grow—you set the conditions, but nature (or in this case, your code) does the rest.

Let’s start with something simple but mesmerizing: a field of flowers that sway in the wind. Each flower will be unique, with its own color, size, and movement pattern. We’ll use mathematical functions to create organic, natural-looking motion.

let flowers = [];
let wind = 0;function setup() {createCanvas(800, 600);colorMode(HSB, 360, 100, 100, 1);// Create a field of flowersfor (let i = 0; i < 50; i++) {flowers.push(new Flower(random(width),random(height),random(20, 60),random(360)));}
}function draw() {background(200, 30, 95, 0.1); // Soft sky blue with fade effect// Update windwind = sin(frameCount * 0.02) * 0.5;// Draw and update flowersfor (let flower of flowers) {flower.update();flower.display();}
}class Flower {constructor(x, y, size, hue) {this.x = x;this.y = y;this.size = size;this.hue = hue;this.angle = 0;this.stemLength = size * 2;this.petals = floor(random(5, 12));}update() {this.angle += wind + sin(frameCount * 0.05 + this.x * 0.01) * 0.1;}display() {push();translate(this.x, this.y);rotate(this.angle);// Draw stemstroke(120, 80, 40);strokeWeight(3);line(0, 0, 0, this.stemLength);// Draw flower headtranslate(0, this.stemLength);// Draw petalsfor (let i = 0; i < this.petals; i++) {let angle = (i / this.petals) * TWO_PI;let petalX = cos(angle) * this.size * 0.8;let petalY = sin(angle) * this.size * 0.8;fill(this.hue, 80, 90, 0.8);noStroke();ellipse(petalX, petalY, this.size * 0.6, this.size * 0.3);}// Draw centerfill(60, 90, 90);ellipse(0, 0, this.size * 0.3);pop();}
}

This creates a gentle field of flowers that sway in a simulated breeze. Each flower is unique, with different colors, sizes, and numbers of petals. The HSB color mode gives us more intuitive control over colors—hue (the color), saturation (how vivid), and brightness (how light or dark).

But let’s make it more interactive. What if the flowers respond to your mouse, growing taller when you’re near them?

let flowers = [];
let wind = 0;function setup() {createCanvas(800, 600);colorMode(HSB, 360, 100, 100, 1);for (let i = 0; i < 50; i++) {flowers.push(new Flower(random(width),random(height),random(20, 60),random(360)));}
}function draw() {background(200, 30, 95, 0.1);wind = sin(frameCount * 0.02) * 0.5;for (let flower of flowers) {flower.update();flower.display();}
}class Flower {constructor(x, y, size, hue) {this.x = x;this.y = y;this.size = size;this.hue = hue;this.angle = 0;this.stemLength = size * 2;this.petals = floor(random(5, 12));this.targetStemLength = this.stemLength;}update() {this.angle += wind + sin(frameCount * 0.05 + this.x * 0.01) * 0.1;// Respond to mouse proximitylet distance = dist(mouseX, mouseY, this.x, this.y);let mouseInfluence = map(distance, 0, 100, 1.5, 1);this.targetStemLength = this.size * 2 * mouseInfluence;// Smooth animationthis.stemLength += (this.targetStemLength - this.stemLength) * 0.1;}display() {push();translate(this.x, this.y);rotate(this.angle);// Draw stem with gradientfor (let i = 0; i < this.stemLength; i += 5) {let alpha = map(i, 0, this.stemLength, 1, 0.3);stroke(120, 80, 40, alpha);strokeWeight(3);line(0, i, 0, i + 5);}translate(0, this.stemLength);// Draw petals with variationfor (let i = 0; i < this.petals; i++) {let angle = (i / this.petals) * TWO_PI;let petalX = cos(angle) * this.size * 0.8;let petalY = sin(angle) * this.size * 0.8;// Vary petal color slightlylet petalHue = this.hue + sin(i * 0.5) * 20;fill(petalHue, 80, 90, 0.8);noStroke();ellipse(petalX, petalY, this.size * 0.6, this.size * 0.3);}fill(60, 90, 90);ellipse(0, 0, this.size * 0.3);pop();}
}

Now the flowers grow taller when you move your mouse near them! The map() function is crucial here—it takes a value from one range (distance from 0 to 100 pixels) and converts it to another range (stem length multiplier from 1.5 to 1).

Let’s take this further and create something more abstract and mesmerizing. How about a flowing particle system that creates organic, living patterns?

let particles = [];
let flowField = [];function setup() {createCanvas(800, 600);colorMode(HSB, 360, 100, 100, 1);// Create flow fieldlet cols = 20;let rows = 15;let fieldWidth = width / cols;let fieldHeight = height / rows;for (let x = 0; x < cols; x++) {flowField[x] = [];for (let y = 0; y < rows; y++) {let angle = noise(x * 0.1, y * 0.1, 0) * TWO_PI * 2;flowField[x][y] = angle;}}// Create particlesfor (let i = 0; i < 100; i++) {particles.push(new Particle(random(width), random(height)));}
}function draw() {background(0, 0, 0, 0.1);// Update flow fieldlet cols = 20;let rows = 15;for (let x = 0; x < cols; x++) {for (let y = 0; y < rows; y++) {let angle = noise(x * 0.1, y * 0.1, frameCount * 0.01) * TWO_PI * 2;flowField[x][y] = angle;}}// Update and display particlesfor (let particle of particles) {particle.follow(flowField);particle.update();particle.display();}
}class Particle {constructor(x, y) {this.pos = createVector(x, y);this.vel = createVector(0, 0);this.acc = createVector(0, 0);this.maxSpeed = 2;this.hue = random(360);this.life = 255;}follow(field) {let x = floor(this.pos.x / (width / 20));let y = floor(this.pos.y / (height / 15));x = constrain(x, 0, 19);y = constrain(y, 0, 14);let angle = field[x][y];let force = p5.Vector.fromAngle(angle);force.setMag(0.1);this.acc.add(force);}update() {this.vel.add(this.acc);this.vel.limit(this.maxSpeed);this.pos.add(this.vel);this.acc.mult(0);// Wrap around edgesif (this.pos.x > width) this.pos.x = 0;if (this.pos.x < 0) this.pos.x = width;if (this.pos.y > height) this.pos.y = 0;if (this.pos.y < 0) this.pos.y = height;// Gradually fadethis.life -= 0.5;if (this.life <= 0) {this.pos = createVector(random(width), random(height));this.life = 255;this.hue = (this.hue + 30) % 360;}}display() {stroke(this.hue, 80, 90, this.life / 255);strokeWeight(2);point(this.pos.x, this.pos.y);}
}

This creates a mesmerizing flow field where particles follow invisible currents that change over time. The noise() function creates smooth, organic randomness that feels natural and flowing. Each particle leaves a trail as it moves, creating beautiful, ever-changing patterns.

But let’s make it even more interactive. What if you could paint with these particles, creating your own flow field with your mouse?

let particles = [];
let flowField = [];
let painting = false;function setup() {createCanvas(800, 600);colorMode(HSB, 360, 100, 100, 1);// Initialize flow fieldlet cols = 40;let rows = 30;for (let x = 0; x < cols; x++) {flowField[x] = [];for (let y = 0; y < rows; y++) {flowField[x][y] = 0;}}for (let i = 0; i < 200; i++) {particles.push(new Particle(random(width), random(height)));}
}function draw() {background(0, 0, 0, 0.1);// Paint with mouseif (painting) {let cols = 40;let rows = 30;let x = floor(mouseX / (width / cols));let y = floor(mouseY / (height / rows));x = constrain(x, 0, cols - 1);y = constrain(y, 0, rows - 1);// Create a circular brushfor (let i = -2; i <= 2; i++) {for (let j = -2; j <= 2; j++) {let nx = x + i;let ny = y + j;if (nx >= 0 && nx < cols && ny >= 0 && ny < rows) {let angle = atan2(mouseY - pmouseY, mouseX - pmouseX);flowField[nx][ny] = angle;}}}}for (let particle of particles) {particle.follow(flowField);particle.update();particle.display();}
}function mousePressed() {painting = true;
}function mouseReleased() {painting = false;
}class Particle {constructor(x, y) {this.pos = createVector(x, y);this.vel = createVector(0, 0);this.acc = createVector(0, 0);this.maxSpeed = 3;this.hue = random(360);this.life = 255;}follow(field) {let cols = 40;let rows = 30;let x = floor(this.pos.x / (width / cols));let y = floor(this.pos.y / (height / rows));x = constrain(x, 0, cols - 1);y = constrain(y, 0, rows - 1);let angle = field[x][y];let force = p5.Vector.fromAngle(angle);force.setMag(0.2);this.acc.add(force);}update() {this.vel.add(this.acc);this.vel.limit(this.maxSpeed);this.pos.add(this.vel);this.acc.mult(0);if (this.pos.x > width) this.pos.x = 0;if (this.pos.x < 0) this.pos.x = width;if (this.pos.y > height) this.pos.y = 0;if (this.pos.y < 0) this.pos.y = height;this.life -= 1;if (this.life <= 0) {this.pos = createVector(random(width), random(height));this.life = 255;this.hue = (this.hue + 45) % 360;}}display() {stroke(this.hue, 90, 90, this.life / 255);strokeWeight(3);point(this.pos.x, this.pos.y);}
}

Now you can paint with particles! Click and drag to create flow currents that the particles will follow. It’s like digital finger painting with living, breathing particles.

Let’s create something completely different—a generative landscape that grows and evolves like a living organism. This will use cellular automata principles to create organic, natural-looking patterns.

let landscape = [];
let cols, rows;
let cellSize = 10;function setup() {createCanvas(800, 600);colorMode(HSB, 360, 100, 100, 1);cols = width / cellSize;rows = height / cellSize;// Initialize landscape randomlyfor (let x = 0; x < cols; x++) {landscape[x] = [];for (let y = 0; y < rows; y++) {landscape[x][y] = random(1);}}
}function draw() {background(200, 30, 95);// Update landscapelet newLandscape = [];for (let x = 0; x < cols; x++) {newLandscape[x] = [];for (let y = 0; y < rows; y++) {let neighbors = countNeighbors(x, y);let current = landscape[x][y];// Conway's Game of Life rules with variationif (current > 0.5) {if (neighbors < 2 || neighbors > 3) {newLandscape[x][y] = max(0, current - 0.1);} else {newLandscape[x][y] = min(1, current + 0.05);}} else {if (neighbors === 3) {newLandscape[x][y] = min(1, current + 0.2);} else {newLandscape[x][y] = max(0, current - 0.02);}}}}landscape = newLandscape;// Draw landscapefor (let x = 0; x < cols; x++) {for (let y = 0; y < rows; y++) {let value = landscape[x][y];let hue = map(value, 0, 1, 120, 200); // Green to bluelet brightness = map(value, 0, 1, 30, 90);fill(hue, 80, brightness);noStroke();rect(x * cellSize, y * cellSize, cellSize, cellSize);}}// Add some organic growthif (random() < 0.1) {let x = floor(random(cols));let y = floor(random(rows));landscape[x][y] = min(1, landscape[x][y] + 0.3);}
}function countNeighbors(x, y) {let sum = 0;for (let i = -1; i < 2; i++) {for (let j = -1; j < 2; j++) {let nx = (x + i + cols) % cols;let ny = (y + j + rows) % rows;if (landscape[nx][ny] > 0.5) sum++;}}if (landscape[x][y] > 0.5) sum--;return sum;
}function mousePressed() {// Add life where you clicklet x = floor(mouseX / cellSize);let y = floor(mouseY / cellSize);if (x >= 0 && x < cols && y >= 0 && y < rows) {landscape[x][y] = 1;}
}

This creates a living landscape that grows, dies, and evolves according to simple rules. Click anywhere to add life, and watch as patterns emerge and change over time. It’s like watching a digital ecosystem grow and evolve.

Now let’s create something truly spectacular—a generative music visualizer that responds to sound. We’ll create a system that generates visual patterns based on frequency analysis, even without real audio input.

let particles = [];
let frequencies = [];
let time = 0;function setup() {createCanvas(800, 600);colorMode(HSB, 360, 100, 100, 1);// Initialize frequency data (simulated)for (let i = 0; i < 64; i++) {frequencies[i] = 0;}// Create particle systemfor (let i = 0; i < 100; i++) {particles.push(new AudioParticle());}
}function draw() {background(0, 0, 0, 0.1);// Generate simulated frequency datafor (let i = 0; i < frequencies.length; i++) {let baseFreq = sin(time + i * 0.1) * 0.5 + 0.5;let mouseInfluence = map(dist(mouseX, mouseY, i * 10, height/2), 0, 200, 1, 0);frequencies[i] = baseFreq * mouseInfluence;}// Draw frequency barslet barWidth = width / frequencies.length;for (let i = 0; i < frequencies.length; i++) {let barHeight = frequencies[i] * height * 0.8;let hue = map(i, 0, frequencies.length, 0, 360);fill(hue, 80, 90, 0.6);noStroke();rect(i * barWidth, height - barHeight, barWidth - 1, barHeight);// Add glow effectdrawingContext.shadowBlur = 20;drawingContext.shadowColor = color(hue, 80, 90);rect(i * barWidth, height - barHeight, barWidth - 1, barHeight);drawingContext.shadowBlur = 0;}// Update and display particlesfor (let particle of particles) {particle.update(frequencies);particle.display();}time += 0.05;
}class AudioParticle {constructor() {this.pos = createVector(random(width), random(height));this.vel = createVector(0, 0);this.size = random(2, 8);this.hue = random(360);}update(freqs) {// Respond to frequency datalet freqIndex = floor(map(this.pos.x, 0, width, 0, freqs.length));freqIndex = constrain(freqIndex, 0, freqs.length - 1);let amplitude = freqs[freqIndex];this.vel.y = -amplitude * 5;this.pos.add(this.vel);this.vel.mult(0.95); // Damping// Wrap aroundif (this.pos.y < 0) this.pos.y = height;if (this.pos.x < 0) this.pos.x = width;if (this.pos.x > width) this.pos.x = 0;// Change color based on frequencythis.hue = (this.hue + amplitude * 10) % 360;}display() {fill(this.hue, 90, 90, 0.8);noStroke();ellipse(this.pos.x, this.pos.y, this.size, this.size);// Add trailfor (let i = 1; i < 5; i++) {let alpha = map(i, 1, 5, 0.8, 0);fill(this.hue, 90, 90, alpha);ellipse(this.pos.x - this.vel.x * i * 0.1, this.pos.y - this.vel.y * i * 0.1, this.size * 0.5, this.size * 0.5);}}
}

This creates a stunning audio visualizer that responds to your mouse position. The frequency bars represent different audio frequencies, and the particles float upward based on the intensity of each frequency. Move your mouse around to create different “sound” patterns.

The beauty of generative art is that you can combine these techniques in infinite ways. Want to create a galaxy that responds to music? Or a forest that grows based on your mouse movements? The possibilities are endless.

Here’s one more example that combines everything we’ve learned—a generative mandala that grows and evolves:

let mandala = [];
let angle = 0;
let growth = 0;function setup() {createCanvas(800, 600);colorMode(HSB, 360, 100, 100, 1);background(0);
}function draw() {translate(width/2, height/2);// Create rotating mandalafor (let i = 0; i < 12; i++) {push();rotate(angle + i * TWO_PI / 12);// Draw petalsfor (let j = 0; j < 8; j++) {let petalAngle = j * TWO_PI / 8;let x = cos(petalAngle) * (100 + growth);let y = sin(petalAngle) * (100 + growth);let hue = (angle * 10 + i * 30 + j * 45) % 360;fill(hue, 80, 90, 0.6);noStroke();push();translate(x, y);rotate(petalAngle);ellipse(0, 0, 30 + growth * 0.2, 60 + growth * 0.3);pop();}// Draw connecting linesstroke(angle * 5 % 360, 70, 80, 0.3);strokeWeight(2);for (let j = 0; j < 8; j++) {let angle1 = j * TWO_PI / 8;let angle2 = (j + 1) * TWO_PI / 8;let x1 = cos(angle1) * (100 + growth);let y1 = sin(angle1) * (100 + growth);let x2 = cos(angle2) * (100 + growth);let y2 = sin(angle2) * (100 + growth);line(x1, y1, x2, y2);}pop();}// Add floating particlesfor (let i = 0; i < 5; i++) {let particleAngle = angle * 0.5 + i * TWO_PI / 5;let particleRadius = 150 + sin(angle + i) * 50;let x = cos(particleAngle) * particleRadius;let y = sin(particleAngle) * particleRadius;fill((angle * 20 + i * 72) % 360, 90, 90, 0.8);noStroke();ellipse(x, y, 8, 8);}angle += 0.02;growth += 0.1;// Reset growth periodicallyif (growth > 100) {growth = 0;}
}function mousePressed() {// Add explosion effectfor (let i = 0; i < 20; i++) {let angle = random(TWO_PI);let radius = random(50, 200);let x = cos(angle) * radius;let y = sin(angle) * radius;fill(random(360), 90, 90, 0.8);noStroke();ellipse(x, y, random(5, 15), random(5, 15));}
}

This creates a living mandala that continuously grows, rotates, and evolves. Click anywhere to add explosion effects. The mandala uses mathematical symmetry to create beautiful, hypnotic patterns that feel both organic and geometric.

The key to creating compelling generative art is to start with simple rules and let complexity emerge naturally. Use mathematical functions like sin(), cos(), and noise() to create organic movement. Experiment with color theory and transparency to create depth and atmosphere. And most importantly, make it interactive—let your audience become part of the artwork.

Remember, generative art isn’t about creating perfect, static images. It’s about creating living systems that surprise and delight you. Sometimes the most beautiful moments come from unexpected interactions between simple rules. So go ahead and experiment—let your code paint, let your algorithms dance, and see what beautiful patterns emerge from the chaos.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.pswp.cn/diannao/97658.shtml
繁体地址,请注明出处:http://hk.pswp.cn/diannao/97658.shtml
英文地址,请注明出处:http://en.pswp.cn/diannao/97658.shtml

如若内容造成侵权/违法违规/事实不符,请联系英文站点网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

Wi-Fi技术——网络安全

一、数据帧的安全 1、无线网络安全的发展 理论上无线电波范围内的任何一个站点都可以监听并登录无线网络&#xff0c;所有发送或接收的数据&#xff0c;都有可能被截取&#xff0c;因此无线网络安全十分重要。 原始802.11的安全策略为WEP&#xff0c;其存在根本性的漏洞&#x…

Java提供高效后端支撑,Vue呈现直观交互界面,共同打造的MES管理系统,含完整可运行源码,实现生产计划、执行、追溯一站式管理,提升制造执行效率

前言在当今竞争激烈的制造业环境中&#xff0c;企业面临着提高生产效率、降低成本、保证产品质量以及快速响应市场变化等多重挑战。制造执行系统&#xff08;MES&#xff0c;Manufacturing Execution System&#xff09;作为连接企业上层计划管理系统&#xff08;如ERP&#xf…

【macOS】垃圾箱中文件无法清理的常规方法

【macOS】垃圾箱中文件无法清理的方法如果外接 SSD 移动盘上的垃圾文件无法删除&#xff0c; 可能是由于文件系统格式不兼容、文件被占用、权限不足等原因导致的&#xff0c; 以下是一些常见的解决方法&#xff1a;检查移动硬盘文件系统格式&#xff1a;如果移动硬盘是 NTFS 格…

鸿蒙ArkTS 核心篇-15-条件渲染(组件)

目录 根据逻辑条件结果&#xff0c;渲染不同的 UI 内容 DevEco Studio代码实战 预览效果 总结 根据逻辑条件结果&#xff0c;渲染不同的 UI 内容 DevEco Studio代码实战 let num: number 20Entry Component struct Index {build() {Column() {if (num 1) {Text(文本 1)} …

大模型微调显存内存节约方法

大模型微调时节约显存和内存是一个至关重要的话题&#xff0c;尤其是在消费级GPU&#xff08;如RTX 3090/4090&#xff09;或资源有限的云实例上。下面我将从显存&#xff08;GPU Memory&#xff09; 和内存&#xff08;CPU Memory&#xff09; 两个方面&#xff0c;为你系统地…

Linux笔记12——shell编程基础-6

字符截取命令一、cut命令功能&#xff1a;用于从文件或标准输入中提取指定字段或列语法&#xff1a;cut [选项] 文件名-f&#xff1a;列号&#xff0c;提取第几列&#xff0c;默认识别制表符分割出来的列&#xff08;列号之间用,隔开&#xff09;-d&#xff1a;分隔符&#xff…

高效浏览器标签页管理:Chrome扩展开发完全指南

Hi&#xff0c;我是前端人类学&#xff08;之前叫布兰妮甜&#xff09;&#xff01; 在信息过载的时代&#xff0c;浏览器标签页管理已成为提高工作效率的关键技能。本文将介绍如何开发一个功能完整的Chrome扩展&#xff0c;帮助用户高效管理浏览器标签页&#xff0c;并探讨其实…

从 WPF 到 Avalonia 的迁移系列实战篇3:ResourceDictionary资源与样式的差异与迁移技巧

从 WPF 到 Avalonia 的迁移系列实战篇3:ResourceDictionary资源与样式的差异与迁移技巧 我的GitHub仓库Avalonia学习项目包含完整的Avalonia实践案例与代码对比。 我的gitcode仓库是Avalonia学习项目。 文中主要示例代码均可在仓库中查看&#xff0c;涵盖核心功能实现与优化方案…

基于Springboot的音乐媒体播放及周边产品运营平台(有报告)。Javaee项目,springboot项目。

演示视频&#xff1a; 基于Springboot的音乐媒体播放及周边产品运营平台&#xff08;有报告&#xff09;。Javaee项目&#xff0c;springboot项目。项目介绍&#xff1a; 采用M&#xff08;model&#xff09;V&#xff08;view&#xff09;C&#xff08;controller&#xff09…

【项目思维】嵌入式产业链与技术生态

这篇文章深入解析嵌入式产业链与技术生态上下游关系&#xff0c;辅助建立嵌入式工程师职业发展认知。嵌入式行业并不是“写单片机程序”那么简单&#xff0c;而是一个 从芯片设计到系统集成再到最终产品落地 的复杂生态链。理解上下游价值链&#xff0c;有助于你成为系统型工程…

机器学习(讲解)

一、引言&#xff1a;什么是监督学习&#xff1f;监督学习&#xff08;Supervised Learning&#xff09;是机器学习中最基础且应用最广泛的范式之一。其核心思想是利用已标记的数据&#xff08;即输入-输出对&#xff09;训练模型&#xff0c;使其能够对新的、未标记的数据进行…

使用 Bright Data Web Scraper API + Python 高效抓取 Glassdoor 数据:从配置到结构化输出全流程实战

使用 Bright Data Web Scraper API Python 高效抓取 Glassdoor 数据&#xff1a;从配置到结构化输出全流程实战 摘要 本文详细介绍了如何使用 Bright Data 的 Web Scraper API 搭配 Python&#xff0c;实现对 Glassdoor 平台信息的高效抓取。通过 API 请求构建器、反爬机制集成…

Burgan Bank Türkiye 如何借助 Elastic 改造可观测性和安全性

作者&#xff1a;来自 Elastic Jon Ashley, Ido Friedman, Burak Dz Burgan Bank Trkiye Burgan Bank K.P.S.C. 是科威特项目公司 (KIPCO) 集团的子公司&#xff0c;成立于 1977 年&#xff0c;是中东和北非 (MENA) 地区最大的控股集团和重要银行集团之一。 该银行作为客户的解…

LeetCode 165. 比较版本号 - 优雅Java解决方案

文章目录LeetCode 165. 比较版本号 - 优雅Java解决方案题目描述示例分析示例 1示例 2示例 3算法思路Java实现方案方案一&#xff1a;双指针法&#xff08;推荐&#xff09;方案二&#xff1a;优化的单次遍历法可视化执行过程示例&#xff1a;compareVersion("1.2", &…

基于Kubernetes StatefulSet的有状态微服务部署与持久化存储实践经验分享

基于Kubernetes StatefulSet的有状态微服务部署与持久化存储实践经验分享 在传统微服务架构中&#xff0c;大多数服务都是无状态的&#xff08;Stateless&#xff09;&#xff0c;可以通过 Deployment、ReplicaSet 等控制器实现水平自动扩缩容。但在生产环境中&#xff0c;仍有…

MySQL编程开发

变量系统变量&#xff1a;MySQL内置变量#查看所有系统变量show variables \G;#通过模糊查询筛选变量show variables like “%path%”;全局变量&#xff1a;在所有终端中都生效&#xff1b;会话变量&#xff1a;在当前会话&#xff08;本次登录&#xff09;&#xff1b;#可以通过…

20250830_Oracle 19c CDB+PDB(QMS)默认表空间、临时表空间、归档日志、闪回恢复区巡检手册

PDB 关业务,CDB 管底层;每天紧盯 PDB,必要时看 CDB。 一、CDB 与 PDB 的关系 Oracle 12c 以后引入 多租户架构(Multitenant),分成两类容器: 层级 名称 作用 存储内容 典型操作 CDB CDB$ROOT(容器数据库) 数据库实例的根容器 Oracle 元数据、系统表字典、公共用户、PDB…

什么是MIPS架构?RISC-V架构?有什么区别?【超详细初学者教程】

什么是MIPS架构&#xff1f;RISC-V架构&#xff1f;有什么区别&#xff1f;【超详细初学者教程】 关键词&#xff1a;MIPS架构&#xff0c;RISC-V架构&#xff0c;精简指令集RISC&#xff0c;嵌入式系统&#xff0c;CPU架构对比&#xff0c;指令集架构&#xff0c;开源处理器&…

IDEA Spring属性注解依赖注入的警告 Field injection is not recommended 异常解决方案

一、异常错误 在使用 IntelliJ IDEA 进行 Spring 开发时&#xff0c;当使用 Autowired 注解直接在字段上进行依赖注入时&#xff0c;IDE 会显示黄色警告&#xff1a; Field injection is not recommended这个警告出现在以下代码模式中&#xff1a; Service public class UserSe…

智能核心:机器人芯片的科技革新与未来挑战

在人工智能与机器人技术深度融合的今天&#xff0c;机器人芯片作为驱动智能机器的“大脑”&#xff0c;正成为科技竞争的战略制高点。这一微小却至关重要的硬件&#xff0c;决定了机器人的计算能力、响应速度与智能水平&#xff0c;是机器人从“自动化”迈向“自主化”的关键所…