线和平面碰撞调用: IntersectedPlane(vTriangle, vLine);传入参数:线(起点,终点),平面(三个顶点)
1234567891011121314151617bool IntersectedPlane(CVector3 vTriangle[], CVector3 vLine[]) { float distance1=0, distance2=0; CVector3 vNormal = Normal(vTriangle); // 三角形法向量 // originDistance 为 Ax+By+Cz+D=0中的D (A,B,C为法向量...
环境
OS: Darwin Kernel Version 21.4.0GO: go version go1.18 darwin/arm64
背景Go1.18 最 “实用“ 的功能,应该是 Go 工作区模式,它使得开发者在多个模块中的开发工作变得更加简单。
使用在同一个目录下创建两个空的 go 包 demo 和 util。
1mkdir -p workspace_mode_example/{demo,util}
然后分别使用 go mod init 来初始化。
1234cd workspace_mode_example/demogo mod init workspa...
问题最近在mac上升级golang到1.18版本,新建gin服务执行go run时报错:
123456789101112# golang.org/x/sys/unix../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-20200116001909-b77594299b42/unix/syscall_darwin.1_13.go:25:3: //go:linkname must refer to declared function or variable../../../../go/pkg/mod/golang.org/x/sys@v0.0.0-2...
问题换了M1芯片的MBP, 最近在原有Vue项目中执行命令编译打包:
1npm run build:prod
遇到了以下报错:
12345error in ./src/styles/index.scssError: Node Sass does not yet support your current environment: OS X Unsupported architecture (arm64) with Unsupported runtime (93)For more information on which environments are supported please ...
背景最近尝试在Brave Rewards注册,并把自己的网站添加到频道上。其中有个步骤是要求将一个txt校验文件添加到网站,并能通过https://myblog.com/.well-known/brave-rewards-verification.txt访问。
问题创建目录在hexo/source目录下建立.well-known目录并把下载好的brave-rewards-verification.txt文件拷贝进去。
1234567.├── 404├── about├── ads.txt├── _posts├── robots.txt└── .well-known
配置修改_confi...
背景为了避免在 mac 上执行 rm -rf something 把重要文件删掉,可以使用 trash 替代 rm,这样文件就不会直接被删除,而是进入废纸篓,给自己增加一次反悔的机会。
安装 trashtrash–CLI tool that moves files or folder to the trash
使用 homebrew 安装 trash:
1brew install trash
配置命令行安装完之后在 .zshrc 或者 .bashrc 添加以下配置,.Trash 是Mac下的废纸篓目录。
123456789# trashalias rm=trashalias r=tra...
问题在python脚本中连接postgres时遇到以下问题:
12345678Traceback (most recent call last): File "/Users/shenshijie/Documents/app/postgres/connect.py", line 2, in <module> import psycopg2 File "/opt/homebrew/lib/python3.9/site-packages/psycopg2/__init__.py", line 51, in <module>...
One of the biggest benefits of using docker for me has been the fact that it makes developing code with databases much simpler.
每当我想构建一个项目的时,倾向于使用postgres作为数据库。在Docker还没出现前,需要手动安装postgres到我本地机器,拉起服务,创建数据库表,创建指定的用户和对应的权限,最后在本地拉起项目来测试和开发。整个流程下来几个小时就过去了。
Docker出现后,事情变得异常简单。特别是在配合docker-compose使用后,...
坏境
OS 版本: Mac OS Monterey 12.1nodejs 版本:v17.3.1npm 版本:8.1.0nvm 版本:0.39.1
问题Hello Guys, How are you all? Hope You all Are Fine.今天心血来潮把node更新到了最新版本,当我用vue create demo-vue 命令创建了个新工程,运行npm run serve时出现报错:
1opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error'...
环境系统:MacOS Big Sur 11.6.1
ct-ng:GNU Make 4.3 / Built for x86_64-apple-darwin20.1.0
前言在Mac下面使用HomeBrew安装了crosstool-ng来编译aarch64上的代码,结果在执行的时候报告如下错误:
12345ct-ng source[INFO ] Performing some trivial sanity checks[WARN ] Number of open files 256 may not be sufficient to build the toolchain; increa...