background picture of the home page

Hi,Friend

rust学习记录2 - hello world

本文介绍了如何使用 Cargo 创建一个名为 "hello_world" 的 Rust 项目。首先,在指定目录下使用 `cargo new hello_world` 命令创建项目。该命令会生成包含 `Cargo.toml` 和 `main.rs` 文件的项目目录结构。 `Cargo.toml` 是 Cargo 包管理工具的配置文件,`main.rs` 文件包含 Rust 代码。 最后,运行 `cargo run` 命令即可在终端上看到 "Hello, world!" 的输出。

thumbnail of the cover of the post

rust学习记录1 - rust环境安装

Windows下Rust环境安装推荐使用Visual Studio Code。方案一:先安装Microsoft C++ Build Tools,并手动添加环境变量;再使用rustup-init安装Rust。方案二:使用RustRover,在其中新建项目自动安装Rust环境。安装完成后,使用`rustc -V`和`cargo -V`命令验证安装是否成功。

thumbnail of the cover of the post

完整指南:使用 iStoreOS 和 1Panel 设置 FRP 内网穿透服务

本文介绍了使用 iStoreOS 和 1Panel 搭建 FRP 内网穿透服务的完整步骤。首先,需要一台公网 IP 的服务器和安装有 iStoreOS 的软路由。在公网服务器上安装 1Panel,然后安装 frp server,并记录用户名、密码和秘钥。接着,在 iStoreOS 上安装 frpc client,配置公网 IP 和端口,填入 frp server 的秘钥。最后,连接公网 IP 和远程端口即可访问 iStoreOS。

thumbnail of the cover of the post

软路由系统怎么选择:我的 iStoreOS 之路

作者在尝试了 OpenWrt 和爱快等软路由系统后,最终选择了 iStoreOS。 爱快系统功能有限,OpenWrt 虽然强大但配置复杂且出现网络问题。iStoreOS 的简洁界面、易用性以及丰富的插件支持,特别是包含 1panel,吸引了作者。作者认为 iStoreOS 对新手和进阶用户都非常友好,易于安装和配置,功能全面,是值得推荐的软路由系统选择。

thumbnail of the cover of the post

软路由系统 iStoreOS 安装OpenClash

本文介绍了在iStoreOS软路由系统上安装OpenClash的步骤。首先,需要安装依赖包,例如coreutils-nohup、bash等。然后下载OpenClash的*.ipk包,并通过iStoreOS的“手动安装”功能进行安装。安装完成后,需要安装OpenClash内核,这可能涉及下载、解压内核文件,并将其上传到软路由系统。文章还包含了安装过程中可能遇到的问题及解决方案,例如依赖安装失败、OpenClash安装失败和内核下载失败等情况的处理方法。

thumbnail of the cover of the post

Linux 配置虚拟内存

This bash script creates and activates a swap file on a Linux system. It defaults to a 4GB swap file (/usr/swap/swapfile), but this size can be adjusted via a command-line argument. The script uses `dd` to create the file, `mkswap` to format it, and `swapon` to activate it. While the script includes commented-out lines for setting the swap file to activate on boot via `/etc/fstab`, this feature is not enabled by default. The script also displays the size of the created swap file using `du`.

thumbnail of the cover of the post

tomcat 配置https 双向认证

This article details setting up HTTPS with two-way authentication for Tomcat using Java. It provides Linux and Windows scripts for generating server and client certificates using keytool. The process involves creating a server keystore, a client keystore and certificate, and importing the client certificate into the server keystore. Tomcat configuration involves modifying `server.xml` to enable HTTPS with `clientAuth="true"` and optionally configuring `web.xml` for HTTP to HTTPS redirection. Finally, the article explains client-side certificate installation and troubleshooting, specifically addressing "Invalid keystore format" errors by ensuring consistent Java versions between certificate generation and Tomcat.

thumbnail of the cover of the post

java游戏开发入门(十) -粒子特效

本文介绍了使用JavaFX和FXGL库在游戏中创建粒子特效的方法。代码示例展示了如何创建粒子发射器,并将其添加到实体对象。示例代码包括设置粒子数量、发射率、大小、缩放、过期时间、加速度、初始速度和初始位置等参数。还演示了如何使用颜色渐变和图像资源。文章还提供了效果图和完整的项目链接。

thumbnail of the cover of the post

java游戏开发入门(九) -音效

本文介绍了如何在Java游戏开发中添加背景音乐和音效。文章首先介绍了音频资源的存放路径(assets/music和assets/sounds),并说明了使用MP3和WAV格式。然后,重点讲解了如何在游戏启动后循环播放背景音乐,以及在玩家与目标碰撞时播放音效。代码示例展示了如何在FXGL引擎中实现这些功能,包括重写onPreInit方法和利用CollisionHandler处理碰撞事件。文章还包含了项目目录结构图和完整代码,方便读者参考。最后,文章提供了其他相关文章链接,方便读者进一步学习。

thumbnail of the cover of the post