#Hadoop安装过程
##Java Jdk的安装
- 根据Ubuntu下载对应的Jdk.看清Linux是64位还是32位
- 设置Jdk环境变量。
sudo vi /etc/profile
在profile文件里添加如下代码设置环境变量
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Template typename<T> | |
struct quaternion{ | |
T w,x,y,z; | |
}; | |
struct _vec3{ | |
T x,y,z; | |
}; | |
typedef quaternion quat ; | |
typedef _vec3 vec3; |
在描述命令行参数的时候, 对其格式有些约定俗成的写法, 各系统之间也有差别. 一般采用的格式如下:
命令 <必选参数1|必选参数2> [-option {必选参数1|必选参数2|必选参数3}] [可选参数...] {(默认参数)|参数|参数}
命令格式中常用的几个符号含义如下:
- 尖括号
< >
:必选参数, 实际使用时应将其替换为所需要的参数. - 大括号
{ }
:必选参数, 内部使用, 包含此处允许使用的参数. - 方括号
[ ]
:可选参数, 在命令中根据需要加以取舍. - 小括号
( )
:指明参数的默认值, 只用于{ }中
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool PositionBasedCosseratRods::solve_StretchShearConstraint( | |
const glm::vec3& p0, float invMass0, | |
const glm::vec3& p1, float invMass1, | |
const glm::quat& q0, float invMassq0, | |
const glm::vec3& stretchingAndShearingKs, | |
const float restLength, | |
glm::vec3& corr0, glm::vec3& corr1, glm::quat& corrq0) | |
{ | |
glm::vec3 d3; //third director d3 = q0 * e_3 * q0_conjugate | |
d3[0] = 2.0 * (q0.x * q0.z + q0.w * q0.y); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
``` | |
@echo off | |
call :treeProcess | |
goto :eof | |
:treeProcess | |
rem Do whatever you want here over the files of this subdir, for example: | |
for %%f in (*.mp4) do echo %%f | |
for /D %%d in (*) do ( | |
cd %%d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Eqations are in paper: Direct Position-Based Solver for Stiff Rods, Crispin Deul et.al. 2018 | |
Real m_rodYoungModulus; //in Equation 5 | |
Real m_rodRadius; //in Equation 6 | |
Real m_rodInvZeroStretchStiffness;//in Equation 24: zero-stretch compliance \sigma^{-1} | |
Real m_rodDensity; //in Equation 28 | |
Vector6r m_complianceVector; //Equation 24: Diagonal compliance matrix \alpha is representd as a 6x1 vector | |
Real timestep = 0.005; | |
void init() | |
{ | |
m_rodYoungModulus = 1.0e3; |
OlderNewer