This file contains hidden or 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
void InitApp() | |
{ | |
// Initialize dialogs | |
g_SettingsDlg.Init( &g_DialogResourceManager ); | |
g_HUD.Init( &g_DialogResourceManager ); | |
g_SampleUI.Init( &g_DialogResourceManager ); | |
g_HUD.SetCallback( OnGUIEvent ); int iY = 10; | |
g_HUD.AddButton( IDC_TOGGLEFULLSCREEN, L"Toggle full screen", 35, iY, 125, 22 ); | |
g_HUD.AddButton( IDC_TOGGLEREF, L"Toggle REF (F3)", 35, iY += 24, 125, 22 ); |
This file contains hidden or 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
vtkSmartPointer<vtkSTLReader> stlReader = vtkSmartPointer<vtkSTLReader>::New(); | |
vtkSmartPointer<vtkTriangleFilter> triangle = vtkSmartPointer<vtkTriangleFilter>::New(); | |
vtkSmartPointer<vtkPolyData> mesh; | |
try { | |
stlReader->SetFileName(fileName); | |
triangle->SetInputConnection(stlReader->GetOutputPort()); | |
triangle->Update(); | |
mesh = triangle->GetOutput(); |
This file contains hidden or 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
using namespace cv; | |
typedef pcl::PointXYZRGBA PointT; | |
typedef pcl::PointCloud<PointT> PointCloudT; | |
// PCL viewer // | |
pcl::visualization::PCLVisualizer viewer("PCL Viewer" , false); | |
vtkRenderer* ren1; | |
vtkRenderWindow* renwin; | |
vtkRenderWindowInteractor* iren; |
This file contains hidden or 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
// Segment planes | |
pcl::OrganizedMultiPlaneSegmentation< PointT, pcl::Normal, pcl::Label > mps; | |
mps.setMinInliers (10000); | |
mps.setAngularThreshold (0.017453 * 2.0); // 2 degrees | |
mps.setDistanceThreshold (0.02); // 2cm | |
mps.setInputNormals (normal_cloud); | |
mps.setInputCloud (cloud); | |
std::vector< pcl::PlanarRegion< PointT > > regions; | |
mps.segmentAndRefine (regions); |
This file contains hidden or 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
#include <amp.h> | |
#include <iostream> | |
using namespace concurrency; | |
const int size = 5; | |
void CppAmpMethod() { | |
int aCPP[] = {1, 2, 3, 4, 5}; | |
int bCPP[] = {6, 7, 8, 9, 10}; | |
int sumCPP[size]; |
This file contains hidden or 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
#include <vtkSphereSource.h> | |
#include <vtkProperty.h> | |
#include <vtkPolyData.h> | |
#include <vtkSmartPointer.h> | |
#include <vtkPolyDataMapper.h> | |
#include <vtkActor.h> | |
#include <vtkRenderWindow.h> | |
#include <vtkRenderer.h> | |
#include <vtkRenderWindowInteractor.h> |
This file contains hidden or 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
wget https://github.com/bitcoin/bitcoin/commit/018ec85ff7ab422846f1d8b0bfb27a8d6c70eada.patch && mv 018ec85ff7ab422846f1d8b0bfb27a8d6c70eada.patch macdockiconhandler.patch && patch src/qt/macdockiconhandler.h < macdockiconhandler.patch |
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
config.vm.box = 'precise64' | |
config.vm.host_name = 'canvas-dev' | |
config.vm.customize [ | |
"modifyvm", :id, | |
"--memory", 4096, |
This file contains hidden or 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
wget -O init-deb.sh http://library.linode.com/assets/1139-init-deb.sh | |
mv init-deb.sh /etc/init.d/nginx | |
chmod +x /etc/init.d/nginx | |
/usr/sbin/update-rc.d -f nginx defaults | |
sudo service nginx start or sudo /etc/init.d/nginx start | |
sudo service nginx restart or sudo /etc/init.d/nginx restart | |
sudo service nginx reload or sudo /etc/init.d/nginx reload | |
sudo service nginx stop or sudo /etc/init.d/nginx stop |
This file contains hidden or 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
cat ~/.ssh/id_rsa.pub | ssh user@server_name "cat >> ~/.ssh/authorized_keys" |
OlderNewer