乱码三千 – 分享实用IT技术

乱码三千 – 码出一个新世界


  • 首页

  • 归档

  • 搜索

临时手机号&邮箱大合集

发表于 2023-04-01

前言

最近ChatGPT大火, 很多小伙伴都想尝一尝鲜, 可惜国内账号无法注册, 只能借助国外手机号

考虑到个人的隐私安全, 我们可以使用一些临时的手机号或者邮箱进行使用

其中有收费和免费的 不用多想 收费的肯定要稳定好用一些

临时手机号

  1. sms-activate

    收费接码平台 稳定好用

    image-20230404141409473

    官网: 点击进入

  2. 阿里小号

    阿里推出的虚拟手机号平台, 可绑定真实手机号, 保护个人隐私

临时邮箱

  1. temp-mail

    免费临时邮箱

    有了它, 不用再担心垃圾邮件,广告邮件,黑客和机器人攻击。让您真实的邮箱保持干净和安全。Temp Mail提供临时、安全、匿名、免费的一次性电子邮件地址。

    image-20230404141741513

    网站: 点击进入

  2. 24mail

    国内临时邮箱服务站

    image-20230606102623501

    网站: 点击进入

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

不小心关闭谷歌浏览器怎么恢复(快速恢复所有被关闭的网页)

发表于 2023-03-09

前言

在使用浏览器访问网页的时候,有没有遇到因一时手残关闭所有浏览器网页的情况?

打开的网页有点多还能恢复吗?不要着急,下面就给大家分享四种恢复谷歌浏览器已经关闭的网页的方法。

不小心关闭谷歌浏览器怎么恢复(快速恢复所有被关闭的网页)

第一种方法:快捷键

很多人不知道Chrome浏览器撤销关闭页面的快捷键是什么,其实这是一个组合键,即Crtl+Shift+T。对于习惯使用快捷键的朋友,这是最快的恢复chrome已关闭网页的方法。

第二种方法

从历史浏览记录里选取已关闭网页。打开历史记录的方法是从“菜单”选择“历史记录”,或者使用快捷键Ctrl+H。还有一个快捷方法是,长按或者往下拉“后退键”,即可打开Chrome历史浏览页面。所谓的“后退键”在浏览器页面左上角,找到一个形状为向左的箭头,就是它了。

第三种方法:标签页右键点击

其实这个方法也是属于从历史浏览记录中恢复已关闭网页,不同是的,单手即可操作。在任意标签页上点击右键,可以看到菜单中一个选项“重新打开关闭的标签页”,点击之即可自动在新标签页中打开前面一个刚关闭的页面。

第四种方法:使用插件

对于插件党而言,一切的方法都可以使用万能的插件来解决。恢复已关闭页面的Chrome插件有很多,类似Sexy Undo Close Tab,Simple Undo Close等等,可以直接去Chrome网上应用商店搜索安装即可使用。

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

Android开发之图片取色工具

发表于 2023-01-06

前言

我们在开发过程中经常会遇到需要对图片进行取色的情况

如果你也嫌弃下载取色软件麻烦

那么有一些顺手的工具可以满足我们的取色需求

使用Android Studio自带取色工具

在VCS版本管理关卡页面, 有一个取色工具

image-20230106102842956

image-20230106102709895

使用Chorme浏览器自带取色工具

进入控制台, 随便点击一个色块, 会弹出取色工具

image-20230106103019125

image-20230106103118581

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

Go语言性能为何还无法赶上C语言

发表于 2022-10-01

解答

Go语言也能生成二进制可执行文件, 然而性能之所以还不如C 主要还是因为GC功能拖慢了运行速度, 但凡是带有GC的语音 性能都不可能超过C

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

Godot游戏开发之角色动画

发表于 2022-09-30

介绍

在Godot中角色动画我们通常会使用AnimationPlayer这个节点去实现, 该节点支持关键帧

image-20220930172408017

image-20220930173110937

关于动画的一些注意事项

  1. 通常我们会让动画在运动帧开始, 然后在闲置帧结束,

    如此一来 当玩家按下按钮时 不管时间有多短 都能看到明显的动画, 而不是你已经移动了 然而角色的脚却还没动

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

Godot游戏开发之Node和Node2d节点的区别

发表于 2022-09-30

介绍

Node2D节点继承自Node节点, 功能比Node丰富 这个不必多说, 从Godot右侧面板上可以很清晰地看清它们之间的继承关系, 以及暴露出来可供修改的属性:

image-20220930164400556

在实际开发中我们通常会使用Node2d节点, 从开发角度上它有以下优势:

  • 当我们将子场景拖拽进入Node节点中时, 自场景物体会自定移动到原点位置, 而Node2d则不存在该问题
  • 通过移动Node2d节点位置, 我们可以将整个场景进行移动, 然而Node节点不具备移动属性, 因此无法实现该效果

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

Godot游戏开发之如何将图片铺满整个背景

发表于 2022-09-30

需求

当前素材库中只有一张小草地图片, 如下:

GrassBackground

如何将其铺满整个背景, 得到如下效果:

image-20220930152341903

我们可能第一时间会想到使用Tilemap, 不过手动绘制相对来说有些费时间, 在Godot中我们有更好的方法可以实现

实现方式一

使用Sprite+图片repeat的方式实现

  1. 首先创建一个Sprite节点

  2. 将草地图片添加至该节点的Texture属性上

    image-20220930153243013

  3. 启用Region属性

    image-20220930153318292

  4. 在纹理区域框选需要进行repeat的区域

    image-20220930153401635

  5. 选中草地文件 然后在导入面板开启重复功能, 最后点击重新导入

    image-20220930153526042

  6. 此时我们在纹理区域拉伸选框, 则可以对草地小图片进行重复并铺满整个背景

    image-20220930153638246

实现方式二

使用TextureRect+Tile实现

  1. 创建TextureRect节点

  2. 将图片拖拽至该节点的Texture属性上

    image-20220930154030277

  3. Stretch Mode属性选择Tile

    image-20220930154057353

  4. 此时拉伸图片则自动重复

    image-20220930154121259

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

使用brew安装程序是提示No such file or directory @ rb_sysopen

发表于 2022-09-29

原因一

使用国内镜像而该镜像未完全同步 导致包找不到

解决方法:

临时去除镜像即可:

1
export HOMEBREW_BOTTLE_DOMAIN=''

原因二

依赖程序缺失

解决方法:

需要进行单独安装, 比如报错Error: No such file or directory @ rb_sysopen - xxxxxxxc–jasper, 此时单独安装jasper:

1
brew install jasper

安装完后 再次运行之前的安装之前的指令即可

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

使用xmake交叉编译生成各个平台可执行程序

发表于 2022-09-29

xmake介绍

xmake 是一个基于 Lua 的轻量级跨平台构建工具,使用 xmake.lua维护项目构建, 相当于是cmake的增强版, 其优点如下:

  • 简单易用
  • 能够像 Make/Ninja 那样可以直接编译项目
  • 可以像CMake/Meson 那样生成工程文件
  • 内置的包管理系统来帮助用户解决 C/C++依赖库的集成使用问题
  • 可以实现跟C/C++进行混合编译
  • 编译速度也是非常的快,可以跟Ninja持平
  • 简化了交叉编译

官方文档

GITHUB

环境准备

  • 编译宿主平台: MAC

  • 交叉编译目标平台: Linux, Windows, IOS, Android ….

  1. 下载xmake

    1
    bash <(curl -fsSL https://xmake.io/shget.text -k)
  2. 测试c代码准备 文件取名为main

    1
    2
    3
    4
    5
    6
    #include <stdio.h>
    int main(int argc, char** argv){
    printf("Hello World!\n");

    return 0;
    }
  1. 在源码目录下新建xmake.lua文件

    并加入以下配置

    1
    2
    3
    4
    5
    6
    7
    8
    add_rules("mode.debug", "mode.release")

    -- 编译项目名称
    target("main")
    -- 指定编译形式 可执行文件 还是静态库or动态库
    set_kind("binary")
    -- 指定需要参与编译的源码文件
    add_files("src/main/c/main.c")

编译前的环境准备好了,那接下来 咱们挨个来实现目标平台的可执行文件生成

生成phone平台程序

  1. 下载xcode

    直接应用市场下载

  2. 给xmake指定编译目标平台

    1
    xmake f -p iphoneos
  3. 编译程序

    1
    xmake build main

    编译成功后 可以在build目录中找到对应的可执行文件

    image-20220929172751417

生成Mac平台的程序

  1. 给xmake指定编译目标平台

    1
    xmake f -p macosx
  2. 编译程序

    1
    xmake build main

    编译成功后 可以在build目录中找到对应的可执行文件

    image-20220929173058827

  3. 执行程序

    由于编译宿主平台刚好是Mac 所以我们可以直接执行程序

    1
    xmake run main

    image-20220929173203142

生成Windows平台程序

  1. 下载mingw-w64

    1
    brew install mingw-w64
  2. 给xmake指定编译目标平台

    1
    xmake f -p mingw

    或者使用图形化界面配置

    1
    xmake f --menu

    img

    配置完后 我们查看xmake的配置显示当前平台为mingw:

    image-20220930102409815

  3. 编译程序

    1
    xmake build main

    编译成功后 我们可以在build目录下找到生成的exe可执行文件:image-20220930101946291

  4. 关于mingw内部编译器

    我们打印编译信息会发现mingw内部采用的是gcc编译工具

    image-20220930102723811

生成Android平台程序

  1. 下载NDK

    点击进入下载页面

  2. 给xmake指定编译目标平台

    1
    xmake f -p android --ndk=ndk路径

    此时我们查看xmake配置显示当前编译平台为android:

    image-20220930101224522

  3. 编译程序

    1
    xmake build main

    编译成功后 可以在编译目录查看到生成的可执行文件

    image-20220930101319392

xmake常用指令

  1. 重置配置

    1
    xmake f -c
  2. 指定交叉编译工具

    1
    2
    3
    xmake f --toolchain=clang
    或者
    xmake f --toolchain=gcc
  3. 查看当前工程信息和xmake信息

    1
    xmake show
  4. 编译过程中查看完整的编译选项

    1
    xmake -rv
  5. 查看当前配置

    1
    xmake config -v

    image-20220929181646806

  6. 卸载xmake

    1
    xmake update --uninstall

常见问题汇总

  1. 交叉编译报错 unknown platform for xcode!

    解决方案: 卸载xmake重装

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

C/C++交叉编译各个平台可执行程序

发表于 2022-09-29

前言

目前主流的平台有:

  • Windows
  • Mac
  • Linux
  • Android
  • IOS

当C/C++程序写好后 如何快速在当前平台编译出各个平台的可执行文件

现在比较成熟的方案有:

  • 利用docker容器编译
  • 利用cmake构建交叉编译环境

利用docker容器编译

基于GCC套件, 可实现对Android, Linux, Windows, Web平台的交叉编译, 详细介绍如下:

  • dockcross/base

    Base image for other toolchain images. From Debian Jessie with GCC, make, autotools, CMake, Ninja, Git, and Python.

  • dockcross/android-arm

    The Android NDK standalone toolchain for the arm architecture.

  • dockcross/android-arm64

    The Android NDK standalone toolchain for the arm64 architecture.

  • dockcross/linux-arm64

    Cross compiler for the 64-bit ARM platform on Linux, also known as AArch64.

  • dockcross/linux-armv5

    Linux armv5 cross compiler toolchain for legacy devices like the Parrot AR Drone.

  • dockcross/linux-armv5-musl

    Linux armv5 cross compiler toolchain using musl as base “libc”.

  • dockcross/linux-armv6

    Linux ARMv6 cross compiler toolchain for the Raspberry Pi, etc.

  • dockcross/linux-armv7

    Generic Linux armv7 cross compiler toolchain.

  • dockcross/linux-armv7a

    Toolchain configured for ARMv7-A used in Beaglebone Black single board PC with TI SoC AM3358 on board, Cortex-A8.

  • dockcross/linux-mipsel

    Linux mipsel cross compiler toolchain for little endian MIPS GNU systems.

  • dockcross/linux-mips

    Linux mips cross compiler toolchain for big endian 32-bit hard float MIPS GNU systems.

  • dockcross/linux-s390x

    Linux s390x cross compiler toolchain for S390X GNU systems.

  • dockcross/linux-ppc64le

    Linux PowerPC 64 little endian cross compiler toolchain for the POWER8, etc. Important: Due to Issue #430, automatic build of newer images has been disabled.

  • dockcross/linux-x64

    Linux x86_64 / amd64 compiler. Since the Docker image is natively x86_64, this is not actually a cross compiler.

  • dockcross/linux-x86

    Linux i686 cross compiler.

  • dockcross/manylinux2014-x64

    Docker manylinux2014 image for building Linux x86_64 / amd64 Python wheel packages. It includes Python 3.5, 3.6, 3.7, 3.8, and 3.9. Also has support for the dockcross script, and it has installations of CMake, Ninja, and scikit-build. For CMake, it sets MANYLINUX2014 to “TRUE” in the toolchain.

  • dockcross/manylinux2014-x86

    Docker manylinux2014 image for building Linux i686 Python wheel packages. It includes Python 3.5, 3.6, 3.7, 3.8, and 3.9. Also has support for the dockcross script, and it has installations of CMake, Ninja, and scikit-build. For CMake, it sets MANYLINUX2014 to “TRUE” in the toolchain.

  • dockcross/manylinux2014-aarch64

    Docker manylinux2014 image for building Linux aarch64 / arm64 Python wheel packages. It includes Python 3.5, 3.6, 3.7, 3.8, and 3.9. Also has support for the dockcross script, and it has installations of CMake, Ninja, and scikit-build. For CMake, it sets MANYLINUX2014 to “TRUE” in the toolchain.

  • dockcross/manylinux2010-x64

    Docker manylinux2010 image for building Linux x86_64 / amd64 Python wheel packages. It includes Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. Also has support for the dockcross script, and it has installations of CMake, Ninja, and scikit-build. For CMake, it sets MANYLINUX2010 to “TRUE” in the toolchain.

  • dockcross/manylinux2010-x86

    Docker manylinux2010 image for building Linux i686 Python wheel packages. It includes Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. Also has support for the dockcross script, and it has installations of CMake, Ninja, and scikit-build. For CMake, it sets MANYLINUX2010 to “TRUE” in the toolchain.

  • dockcross/manylinux1-x64

    Docker manylinux1 image for building Linux x86_64 / amd64 Python wheel packages. It includes Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. Also has support for the dockcross script, and it has installations of CMake, Ninja, and scikit-build. For CMake, it sets MANYLINUX1 to “TRUE” in the toolchain.

  • dockcross/manylinux1-x86

    Docker manylinux1 image for building Linux i686 Python wheel packages. It includes Python 2.7, 3.4, 3.5, 3.6, 3.7 and 3.8. Also has support for the dockcross script, and it has installations of CMake, Ninja, and [ scikit-build](http:// scikit-build.org/). For CMake, it sets MANYLINUX1 to “TRUE” in the toolchain.

  • dockcross/web-wasm

    The Emscripten WebAssembly/asm.js/JavaScript cross compiler.

  • dockcross/windows-static-x64

    64-bit Windows cross-compiler based on MXE/MinGW-w64 with win32 threads and static linking.

  • dockcross/windows-static-x64-posix

    64-bit Windows cross-compiler based on MXE/MinGW-w64 with posix threads and static linking.

  • dockcross/windows-static-x86

    32-bit Windows cross-compiler based on MXE/MinGW-w64 with win32 threads and static linking.

  • dockcross/windows-shared-x64

    64-bit Windows cross-compiler based on MXE/MinGW-w64 with win32 threads and dynamic linking.

  • dockcross/windows-shared-x64-posix

    64-bit Windows cross-compiler based on MXE/MinGW-w64 with posix threads and dynamic linking.

  • dockcross/windows-shared-x86

    32-bit Windows cross-compiler based on MXE/MinGW-w64 with win32 threads and dynamic linking.

具体使用可参见Github

使用cmake构建交叉编译环境

首先我们需要下载cmake构建工具

然后下载用于交叉编译的套件

以Mac平台为例, 如果我需要编译各个平台的可执行文件, 那么首先需要下载能在Mac平台运行的目标平台编译包, 比如:

  • android平台:下载 Mac平台可运行的NDK (基于clang)

  • ios平台: 下载iphoneos SDK, xcode自带 我们只需下载xcode即可 (基于clang)

  • windows平台:下载MinGW 或者 MXE/MinGW-w64 (基于GCC)

  • Linux平台:如 arm/x86-Linux-gnueabi套件(基于GCC)

本文为作者原创转载时请注明出处 谢谢

乱码三千 – 点滴积累 ,欢迎来到乱码三千技术博客站

1…8910…48

乱码三千

android程序员一枚,擅长java,kotlin,python,金融投资,欢迎交流~

479 日志
139 标签
RSS
© 2024 乱码三千
本站总访问量次
由 Hexo 强力驱动
|
主题 — NexT.Muse v5.1.4
0%