要安裝 openssh-client and openssh-server
並執行 ssh
sudo apt-get install openssh-client openssh-server
sudo /etc/init.d/ssh start
port 的預設值是22
如果沒有安裝ssh就連線, 會看到以下錯誤訊息
ssh: connect to host localhost port 22: Connection refused
sudo apt-get install openssh-client openssh-server
sudo /etc/init.d/ssh start
Macro | Description |
---|---|
${InputFileName} | Represents the input file name. |
${InputFileExt} | Represents the extension of the input file. |
${InputFileBaseName} | Represents the base name of the input file. That is the file name with an extension stripped. |
${InputFileRelPath} | Represents the input file path relative to the builder current directory. |
${InputDirRelPath} | Represents the input file directory path relative to the builder current directory. |
${OutputFileName} | Represents the output file name. |
${OutputFileExt} | Represents the output file extension. |
${OutputFileBaseName} | Represents the output file base name. That is the output file name with an extension stripped. |
${OutputFileRelPath} | Represents the output file path relative to the current builder directory. |
${OutputDirRelPath} | Represents the output file directory path relative to the current builder directory. |
${ConfigName} | Represents the name of a given configuration. |
${ConfigDescription} | Represents the description of a given configuration. |
${BuildArtifactFileName} | Represents the name of the build artifact. |
${BuildArtifactFileExt} | Represents the extension of the build artifact. |
${BuildArtifactFileBaseName} | Represents the base name of the build artifact. |
${BuildArtifactFilePrefix} | Represents the prefix of the build artifact. |
${ProjName} | Represents the name of a given project. |
${ProjDirPath} | Represents the absolute path of a given project. |
${WorkspaceDirPath} | Represents the workspace absolute path. |
${DirectoryDelimiter} | Represents the directory delimiter used on the system. That is the “\? for Win32 systems and the “/? for Unix-like systems. This could be useful, e.g. in the case a user needs the absolute path of an input file. The absolute path would be represented in the following way: CWD{DirectoryDelimiter}${InputFileRelPath} |
${PathDelimiter} | Represents the default path delimiter used on the system to separate paths in the path environment variables. That is the “;? for Win32 systems and the “:? for Unix-like systems
This might be used in the environment variable definitions
|
${EclipseVersion} | Represents the current Eclipse version. |
${CDTVersion} | Represents the current CDT version. |
${HostOsName} | Represents the operating system name on which eclipse is running. |
${C2000_CG_ROOT} | Installation folder of the C28x code generation tools. |
${C5500_CG_ROOT} | Installation folder of the C55x code generation tools. |
${C6000_CG_ROOT} | Installation folder of the C6x code generation tools. |
${MSP430_CG_ROOT} | Installation folder of the MSP430 code generation tools. |
${TMS470_CG_ROOT} | Installation folder of the ARM code generation tools. |
${CCS_INSTALL_ROOT} | Root installation directory of CCS. i.e. the directory installed in + /ccsv4 or /ccsv5 |
${CG_TOOL_ROOT} | Installation folder of the currently selected code generation tools. Will be the same value as the matching <ISA>_CG_ROOT macro. |
${CG_TOOL_SUFFIX} | Contains the ISA of the currently selected code generation tools. i.e. 2000 for C2000. |
#!/bin/bash
# Use -gt 1 to consume two arguments per pass in the loop (e.g. each
# argument has a corresponding value to go with it).
# Use -gt 0 to consume one or more arguments per pass in the loop (e.g.
# some arguments don't have a corresponding value to go with it such
# as in the --default example).
# note: if this is set to -gt 0 the /etc/hosts part is not recognized ( may be a bug )
while [[ $# -gt 1 ]]
do
key="$1"
case $key in
-e|--extension)
EXTENSION="$2"
shift # past argument
;;
-s|--searchpath)
SEARCHPATH="$2"
shift # past argument
;;
-l|--lib)
LIBPATH="$2"
shift # past argument
;;
--default)
DEFAULT=YES
;;
*)
# unknown option
;;
esac
shift # past argument or value
done
echo FILE EXTENSION = "${EXTENSION}"
echo SEARCH PATH = "${SEARCHPATH}"
echo LIBRARY PATH = "${LIBPATH}"
echo "Number files in SEARCH PATH with EXTENSION:" $(ls -1 "${SEARCHPATH}"/*."${EXTENSION}" | wc -l)
if [[ -n $1 ]]; then
echo "Last line of file specified as non-opt/last argument:"
tail -1 $1
fi
float rotx, roty, rotz; // set these first
int f = 2; // this is also configurable, f=2 should be about 50mm focal length
int h = img.rows;
int w = img.cols;
float cx = cosf(rotx), sx = sinf(rotx);
float cy = cosf(roty), sy = sinf(roty);
float cz = cosf(rotz), sz = sinf(rotz);
float roto[3][2] = { // last column not needed, our vector has z=0
{ cz * cy, cz * sy * sx - sz * cx },
{ sz * cy, sz * sy * sx + cz * cx },
{ -sy, cy * sx }
};
float pt[4][2] = {{ -w / 2, -h / 2 }, { w / 2, -h / 2 }, { w / 2, h / 2 }, { -w / 2, h / 2 }};
float ptt[4][2];
for (int i = 0; i < 4; i++) {
float pz = pt[i][0] * roto[2][0] + pt[i][1] * roto[2][1];
ptt[i][0] = w / 2 + (pt[i][0] * roto[0][0] + pt[i][1] * roto[0][1]) * f * h / (f * h + pz);
ptt[i][1] = h / 2 + (pt[i][0] * roto[1][0] + pt[i][1] * roto[1][1]) * f * h / (f * h + pz);
}
cv::Mat in_pt = (cv::Mat_<float>(4, 2) << 0, 0, w, 0, w, h, 0, h);
cv::Mat out_pt = (cv::Mat_<float>(4, 2) << ptt[0][0], ptt[0][1],
ptt[1][0], ptt[1][1], ptt[2][0], ptt[2][1], ptt[3][0], ptt[3][1]);
cv::Mat transform = cv::getPerspectiveTransform(in_pt, out_pt);
cv::Mat img_in = img.clone();
cv::warpPerspective(img_in, img, transform, img_in.size());
wget -q -O- https://s3.amazonaws.com/download.fpcomplete.com/ubuntu/fpco.key | sudo apt-key add -
Project -> Properties -> C/C++ General -> Preprocessor Include Paths, Macros, etc. -> Providers -> CDT GCC built-in compiler settings
, deactivate Use global provider shared between projects
and add the command line argument -std=c++11
.Window -> Preferences -> C/C++ -> Build -> Settings -> CDT GCC Built-in Compiler Settings
.