Getting compass blueprint and sass to work in ruby on rails - ruby-on-rails

I have setup a new project and used compass to generate the blueprint style sheets. I now have the following code in my screen.scss
body.bp {
#include blueprint-typography(true);
#include blueprint-utilities;
#include blueprint-debug;
#include blueprint-interaction;
$font-color: #C6C6C6;
}
The font in my document does not change however. Using just color:#C6C6C6; works fine. What am I missing here

$font-color is a variable, not the color specification itself, so it should be something like this:
$font-color: #C6C6C6;
body.bp {
#include blueprint-typography(true);
#include blueprint-utilities;
#include blueprint-debug;
#include blueprint-interaction;
color: $font-color;
}

Related

Visual Studio 2017 Error - language feature 'nested-namespace-definition' requires compiler flag '/std:c++17'

Using MS Visual studio I created a solution containing 2 projects called MainProject and CalcProject
MainProject is a console app that references CalcProject and only contains main() in a .cpp file
CalProject is a library and contains a few header files with the following:
Nml.h contains the following:
#include <cstdint>
#include " Ftr.h"
#include " Mtr.h"
namespace CalcProject::measure
{
class Mtr;
class Ftr;
class Nml
{
public:
...
Ftr.h contains the following:
#include <cstdint>
#include " Mtr.h"
#include " Nml.h"
namespace CalcProject::measure
{
class Mtr;
class Nml;
class Ftr
{
...
Mtr.h contains the following:
#include " Ftr.h"
#include " Nml.h"
namespace CalcProject::measure
{
class Ftr;
class Nml;
class Mtr
{
...
MainProject.cpp contains the following:
#include "pch.h"
#include "Ftr.h"
#include <iostream>
#include <string>
using namespace CalcProject::measure;
int main()
{
When I build the solution I receive the following error
Error C2429 language feature 'nested-namespace-definition' requires compiler flag '/std:c++17' MainProject
I tried to resolve this by specifying /std:c++17 in the C++ Language standard in the project properties but the error persists.
How can I fix this? Please advise on a possible solution. I am a beginner and this is my first C++ project using multiple header and cpp files to create a library.

Clang format to recognize main include with prefixed path

I've been trying to get clang format to recognize an include with prefixed path as a main include.
Project/B/Test.cpp file has an following include block:
#include "Project/A/SomeInclude.h"
#include "Project/C/Other.h"
#include <libs/somelib.h>
#include <string>
#include "Project/Project.h"
#include "Project/B/Test.h"
I want to sort it using this rules:
IncludeCategories:
- Regex: 'Project\/Project\.h'
Priority: 0
- Regex: '".*"'
Priority: 2
- Regex: '^<.*\.(h)>'
Priority: 3
- Regex: '^<.*>'
Priority: 4
Which should result with this:
(1)
#include "Project/Project.h"
#include "Project/A/SomeInclude.h"
#include "Project/B/Test.h"
#include "Project/C/Other.h"
#include <libs/somelib.h>
#include <string>
I also want the main include to be at priority 1, which is what this line should do, provided it matches the main include:
IncludeIsMainRegex: '()$?'
Main include will always have format #include "path/to/include/from/Project/folder/name.h" This should be the end result:
(2)
#include "Project/Project.h"
#include "Project/B/Test.h"
#include "Project/A/SomeInclude.h"
#include "Project/C/Other.h"
#include <libs/somelib.h>
#include <string>
I've tried many version of IncludeIsMainRegex, and none work. The interesting thing about the one above is that the first time I run the tool, it sorts everything the way I want (2), but if I then run it again on the same file, it puts the main include in the category 2, and messes up the sort (1).
I'm guessing that the prefixed path is the problem. Short of removing the path from the main include, is there any way to make clang format to recognize the file? The documentation on the feature isn't all that clear on how the matching is done and I hope I can tell it that the file might have a path prefixed to it.
The question is quite similar to this one, however, the asker didn't provide the clang format it was using, so it's of limited help.
It seems that simple IncludeIsMainRegex: '$?' does the trick. Just make sure you place this line above IncludeCategories: to make sure that the main file doesn't get picked up before it reaches that line.

opencv imread not working but other functions are

#include "stdafx.h"
#include <windows.h>
#include <stdio.h>
#include <string>
#include <iostream>
#include <stdlib.h>
#include "opencv2\highgui.hpp"
#include "opencv2\imgproc.hpp"
#include "opencv2\features2d.hpp"
#include "opencv2\core.hpp"
using namespace std;
using namespace cv;
int main()
{
Mat img = Mat::zeros(Size(60,60),CV_8UC1);
imwrite("test.bmp", img);
Mat img2 = imread("Screw.png");
namedWindow("image", WINDOW_NORMAL);
imshow("image", img);
imshow("img", img2);
waitKey(0);
return 0;
}
I am using Opencv 3.4.6 with visual studio 2015.
I am unable to read any image from system, have tried png and jpg image format.To make sure that image is in the right location I have also used imwrite function to save an blank image, which is working fine.
I have tried opencv 4.0.1 as well giving the same issue.
I think there might be some issue in configuration part. There are so many tutorials available for the configuration procedure. Try below link for the configuration and also
as #mark suggested replace your header file
https://www.youtube.com/watch?v=M-VHaLHC4XI

opencv class "cvKalman" not recognised

I have a problem, in ROS I process a camera feed with openCv.
Now i try to implement the cvKalman, but this type is not recognized, however the opencv example works well.
What am i missing, why is not recognized this type?
here is my include to the ROS node:
#include <ros/ros.h>
#include <math.h>
#include <image_transport/image_transport.h>
#include <cv_bridge/cv_bridge.h>
#include <sensor_msgs/image_encodings.h>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
// for img processing
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv/cv.h>
Try including with "s not <s such as:
#include "ros/ros.h"
I solves the problem by using the KalmanFilter wrapper class, but still I dont understand why I cant use the simple Kalman class.

Error with matchTemplate function in OpenCV

These are includes which I am using
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc_c.h>
This is namespace
using namespace cv;
But when I am using matchTemplate function, I am catching the following problem
error C3861: 'matchTemplate': identifier not found
Can anyone help me to solve this problem?
Additional information:
I am using OpenCV2.3
thank you for spending time to view and comment my problem
Best Regards
Hayk
You need imgproc.hpp included, the one that you included has the C version only : cvMatchTemplate

Resources