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
.item{:id => "item#{item.id}"}= item.body |
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
<div class='item' id='item<%= item.id %>'> | |
<%= item.body %> | |
</div> |
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
%strong{class: "code", id: "message"} Hello, World! |
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
<strong class="code" id="message">Hello, World!</strong> |
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
%strong= item.title |
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
<strong><%= item.title %></strong> |
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
= form_for @product, url: {action: "create"}, html: {multipart: true} do |f| | |
%table | |
%tr | |
%td | |
%label{:for => "product_name"}> Name | |
%td | |
= f.text_field :name | |
%tr | |
%td | |
%label{:for => "product_price"}> Price |
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
<%= form_for @product, url: {action: "create"}, html: {multipart: true} do |f| %> | |
<table> | |
<tr> | |
<td> | |
<label for = "product_name">Name</label>: | |
</td> | |
<td> | |
<%= f.text_field :name %> | |
</td> | |
</tr> |
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
//Set the SVM parameters | |
CvSVMParams params; | |
params.svm_type = CvSVM::C_SVC; | |
params.kernel_type = CvSVM::LINEAR; | |
params.term_crit = cvTermCriteria(CV_TERMCRIT_ITER, 100, 1e-6); | |
// Train the SVM | |
CvSVM SVM; | |
SVM.train(trainingSet, labelsMat, Mat(), Mat(), params); |
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
Mat grayMat; | |
cvtColor(colorMat, grayMat, CV_RGB2GRAY); |
NewerOlder