摘要: /* * 完整的GLFW应用程序示例 * 包含窗口创建、输入处理、渲染循环等所有主要功能 * 每行代码都有详细注释,便于学习GLFW的使用 */ #include <GLFW/glfw3.h> // GLFW主头文件 #include <iostream> // 用于控制台输出 #include < 阅读全文
posted @ 2025-09-28 09:20 华腾智算 阅读(24) 评论(0) 推荐(0)
摘要: #include <GL/glew.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <glm/gtc/matrix_transform.hpp> #include <glm/gtc/type_ptr.hpp> #include < 阅读全文
posted @ 2025-09-24 17:07 华腾智算 阅读(9) 评论(0) 推荐(0)
摘要: 程序基于 Linux,用C++开发,使用 OpenGL 进行渲染,配合 GLFW 做窗口管理,GLM 处理数学运算。编译:g++ -o dam_3d dam_3d.cpp -lglfw -lGLEW -lGL -lm -ldl -pthread 阅读全文
posted @ 2025-09-24 16:52 华腾智算 阅读(4) 评论(0) 推荐(0)
摘要: import * as THREE from 'three'; // 修复:引入轨道控制器和字体加载器(关键新增) import { OrbitControls } from 'three/addons/controls/OrbitControls.js'; import { FontLoader 阅读全文
posted @ 2025-09-24 16:43 华腾智算 阅读(10) 评论(0) 推荐(0)
摘要: #include <iostream> #include <GL/glut.h> // 显示回调函数 void display() { // 清除颜色缓冲区 glClear(GL_COLOR_BUFFER_BIT); // 开始绘制三角形 glBegin(GL_TRIANGLES); // 设置顶点 阅读全文
posted @ 2025-09-15 16:07 华腾智算 阅读(7) 评论(0) 推荐(0)
摘要: #include <iostream> #include <GL/glut.h> // 显示回调函数 void display() { // 清除颜色缓冲区 glClear(GL_COLOR_BUFFER_BIT); // 开始绘制三角形 glBegin(GL_TRIANGLES); // 设置顶点 阅读全文
posted @ 2025-09-15 16:03 华腾智算 阅读(9) 评论(0) 推荐(0)
摘要: 最佳语言:C++。 最佳路径:C++ → 数学 → OpenGL → 自制小型渲染引擎/游戏引擎 → 你的游戏。 工具链: 编译器:MSVC (Windows), GCC/G++ (Linux), Clang (macOS) IDE:Visual Studio (Windows) 或** VS Co 阅读全文
posted @ 2025-09-05 10:59 华腾智算 阅读(11) 评论(0) 推荐(0)
摘要: # -*- coding: utf-8 -*- ''' 程序功能:从文本文件加载指令到模拟内存中,并显示前11个内存单元的内容 文件格式:每行包含内存地址和指令,例如 "0 LOAD 100" ''' # 初始化一个长度为1000的内存空间,每个元素初始为空字符串 men = [''] * 1000 阅读全文
posted @ 2025-08-21 17:05 华腾智算 阅读(7) 评论(0) 推荐(0)
摘要: import pydub import pydub.playback import numpy as np import time import threading def play_audio_and_print_binary(file_path): # 加载音频文件 audio = pydub. 阅读全文
posted @ 2025-08-20 16:30 华腾智算 阅读(22) 评论(0) 推荐(0)
摘要: from pydub import AudioSegment from pydub.playback import play song = AudioSegment.from_file("s.mp3", format="mp3") print(len(song)) print('采样率',song. 阅读全文
posted @ 2025-08-20 11:14 华腾智算 阅读(13) 评论(0) 推荐(0)
摘要: import re firstASCII=ord('a') N=26 def enChar(x,key): xid=ord(x)-firstASCII yid=(xid+key)%N y=chr(firstASCII+yid) return y def Caesar(text,key): retur 阅读全文
posted @ 2025-08-20 08:41 华腾智算 阅读(9) 评论(0) 推荐(0)
摘要: //显示主窗口和另外一个窗口 #if 1 TestWidget*w=new TestWidget; w->show(); #else TestWidget*w=new TestWidget(this); #endif #if 0 //创建对话框窗口 TestDialog*dlg=new TestDi 阅读全文
posted @ 2025-08-15 16:18 华腾智算 阅读(3) 评论(0) 推荐(0)
摘要: 以下是将十进制数213转换为二进制数的完整过程,使用除2取余法(也称为“重复除法法”)。该方法通过反复除以2并记录余数,直到商为0,然后将余数从下到上(即最后一个余数为最高位)读取,得到二进制表示。 计算步骤: 213 ÷ 2: 213 ÷ 2 = 106(商),余数 = 1(因为 2 × 106 阅读全文
posted @ 2025-08-11 11:19 华腾智算 阅读(57) 评论(0) 推荐(0)
摘要: 要将二进制数 ((-1101.101)_2) 转换为十进制数,需要分别处理符号、整数部分和小数部分。以下是详细步骤: 步骤 1: 分离符号、整数部分和小数部分 符号:负(由负号“-”表示) 整数部分:(1101_2)(小数点前的部分) 小数部分:(101_2)(小数点后的部分) 步骤 2: 转换整数 阅读全文
posted @ 2025-08-11 10:31 华腾智算 阅读(63) 评论(0) 推荐(0)
摘要: 给定二进制数: A = 10110101 B = 10010011 C = 01011101 需要求解表达式:(A ∨ B)⊕ ¬(B ∧ C),其中: ∨ 表示按位 OR(或运算) ∧ 表示按位 AND(与运算) ¬ 表示按位 NOT(非运算) ⊕ 表示按位 XOR(异或运算) 计算过程如下(逐位 阅读全文
posted @ 2025-08-11 10:12 华腾智算 阅读(5) 评论(0) 推荐(0)
摘要: from itertools import product def check_conditions(suspects): A, B, C, D, E, F = suspects # 1. A和B至少一人作案 cond1 = (A + B >= 1) # 2. A,E,F中至少两人作案 cond2 阅读全文
posted @ 2025-08-11 09:45 华腾智算 阅读(8) 评论(0) 推荐(0)
摘要: import numpy as np import matplotlib.pyplot as plt def calBomb(h,v0): g=9.8 tmax=(2*h/g)**0.5 t=np.linspace(0,tmax,50) xt=v0*t yt=h-1/2*g*t**2 return 阅读全文
posted @ 2025-08-07 17:10 华腾智算 阅读(20) 评论(0) 推荐(0)
摘要: def sjx(a,b,c): p=(a+b+c)/2 x=(p*(p-a)*(p-b)*(p-c))**0.5 return x s1=sjx(9.8,9.3,6.4) s2=sjx(2.9,4.1,4.7) s3=sjx(2.0,1.4,2.3) print(s1-s2+s3) 阅读全文
posted @ 2025-08-07 16:41 华腾智算 阅读(10) 评论(0) 推荐(0)
摘要: import numpy as np import matplotlib.pyplot as plt q=np.linspace(0,2*np.pi,50) x=16*(np.sin(q)**3) y=13*np.cos(q)-5*np.cos(2*q)-2*np.cos(3*q)-np.cos(4 阅读全文
posted @ 2025-08-07 11:10 华腾智算 阅读(10) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt h,v0,g=3000,200,9.8 t,n=0,30 tmax=(2*h/9)**0.5 delta=tmax/(n-1) xt,yt=[],[] while t<=tmax: xt.append(v0*t) yt.append(h 阅读全文
posted @ 2025-08-07 08:37 华腾智算 阅读(6) 评论(0) 推荐(0)
摘要: l=list(range(1,101)) s=sum(l) print(s) l=list(range(1,101)) s=sum(l) print(s) w=[101,25,38,29,108,121] w.sort() s=w[-1]+w[-2] print(s) w=[101,25,38,29 阅读全文
posted @ 2025-08-06 17:18 华腾智算 阅读(4) 评论(0) 推荐(0)
摘要: l1=list(range(2,101,2)) print(l1) l2=['p','y','t','h','o','n'] print(l2[-1]) print(l2[0:3]) print(l2[4]) 从0开始到列表末端,如果从末端则是-1开始。 l1=list(range(2,101,2) 阅读全文
posted @ 2025-08-06 16:01 华腾智算 阅读(5) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <GLFW/glfw3.h> #include <glm/glm.hpp> #include <GL/gl.h> #include <vector> #include <cmath> // 物理参数 const float h = 3000.0 阅读全文
posted @ 2025-08-06 15:24 华腾智算 阅读(3) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt #导入库 h,v0,g=3000,200,9.8 #设置参数值得 t=eval(input('t时间是')) #读取时刻 xt=v0*t #计算横坐标 yt=h-1/2*g*t**2 #计算纵坐标 plt.plot(xt,yt,'ro' 阅读全文
posted @ 2025-08-05 10:48 华腾智算 阅读(19) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt h,v0,g=3000,200,9.8 t=eval(input('t时间是')) xt=v0*t yt=h-1/2*g*t**2 plt.plot(xt,yt,'ro') plt.grid('on') plt.axis([0,2000 阅读全文
posted @ 2025-08-05 10:32 华腾智算 阅读(8) 评论(0) 推荐(0)
摘要: import matplotlib.pyplot as plt xt,yt=1,2 plt.plot(xt,yt,'ro') plt.grid('on') plt.axis([0,2,1,3]) plt.show() 阅读全文
posted @ 2025-08-05 10:20 华腾智算 阅读(5) 评论(0) 推荐(0)
摘要: import numpy as np import matplotlib.pyplot as plt x = np.linspace(0,2*np.pi) y=np.sin(x) plt.plot(x,y,'r') plt.show() 阅读全文
posted @ 2025-08-04 16:22 华腾智算 阅读(11) 评论(0) 推荐(0)
摘要: 简易的命令行入门教程: Git 全局设置: git config --global user.name "用户名" git config --global user.email "邮箱@126.com" 创建 git 仓库: mkdir 目录 cd 目录 git init touch README. 阅读全文
posted @ 2025-08-01 14:58 华腾智算 阅读(6) 评论(0) 推荐(0)
摘要: 团队前端编码规范 (HTML/CSS) 1. 总则 1.1 目标 提高代码可读性和可维护性 保证跨浏览器兼容性和响应式支持 确保无障碍访问和SEO友好 优化性能与加载速度 1.2 基本原则 语义化优先:使用最合适的HTML元素 移动优先:从小屏幕开始设计 渐进增强:基础功能广泛兼容,高级特性增强体验 阅读全文
posted @ 2025-07-31 11:22 华腾智算 阅读(37) 评论(0) 推荐(0)
摘要: const http = require('http'); const fs = require('fs'); const path = require('path'); const { exec } = require('child_process'); const os = require('o 阅读全文
posted @ 2025-07-31 09:39 华腾智算 阅读(5) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- 自定义网站标签 阅读全文
posted @ 2025-07-30 10:41 华腾智算 阅读(9) 评论(0) 推荐(0)
摘要: # 清除 npm 缓存 npm cache clean --force # 删除 node_modules 目录 rm -rf node_modules # 删除 package-lock.json 文件 rm package-lock.json # 重新安装依赖 npm install 阅读全文
posted @ 2025-07-23 15:28 华腾智算 阅读(25) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> /* 基本类型定义 */ typedef uint32_t gfx_color_t; /* 图形上下文结构体 */ typedef struc 阅读全文
posted @ 2025-07-17 11:14 华腾智算 阅读(14) 评论(0) 推荐(0)
摘要: #include <stdio.h> #include <limits.h> // 用于 CHAR_BIT(每字节的位数) // 函数:打印任意数据的二进制表示 void printBinary(const void *data, size_t size) { const unsigned char 阅读全文
posted @ 2025-07-17 10:51 华腾智算 阅读(6) 评论(0) 推荐(0)
摘要: const todos = [ { id: 1, text: '第一个数组 Buy groceries', completed: false }, { id: 2, text: '第二个数组 Finish homework', completed: false }, { id: 3, text: ' 阅读全文
posted @ 2025-07-11 17:07 华腾智算 阅读(7) 评论(0) 推荐(0)
摘要: const todos = [ { id: 1, text: 'Buy groceries', completed: false }, { id: 2, text: 'Finish homework', completed: false }, { id: 3, text: 'Cook dinner' 阅读全文
posted @ 2025-07-11 17:04 华腾智算 阅读(9) 评论(0) 推荐(0)
摘要: const x = 10; const color = x > 10 ? 'red' : 'blue'; switch (color) { case 'red': console.log('The color is red'); break; case 'blue': console.log('Th 阅读全文
posted @ 2025-07-11 16:39 华腾智算 阅读(6) 评论(0) 推荐(0)
摘要: const x = 10; const color = x > 10 ? 'red' : 'blue'; console.log(color); 阅读全文
posted @ 2025-07-11 16:33 华腾智算 阅读(6) 评论(0) 推荐(0)
摘要: const todos = [ { id: 1, text: 'Buy groceries', iscompleted: true }, { id: 2, text: 'MY Boss', iscompleted: true }, { id: 3, text: '散会', iscompleted: 阅读全文
posted @ 2025-07-11 16:17 华腾智算 阅读(4) 评论(0) 推荐(0)
摘要: 核心语言:C++20 / Rust 图形API:Vulkan (跨平台) + MoltenVK (Apple) UI框架:Qt (专业工具) / Dear ImGui (轻量级) 脚本系统:LuaJIT (游戏逻辑) + Python (工具链) 构建系统:CMake + vcpkg/conan ( 阅读全文
posted @ 2025-07-11 12:35 华腾智算 阅读(10) 评论(0) 推荐(0)
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL