CMake finding directory of proper name - directory

So as in the question.
I have structure of folders lets say like this:
|-root
| |
| |-someFolder
| | |
| | |-someSubFolder
| |
| |-someAnotherFolder
etc. in general I don't know far folder can be nested, but I need sometimes to
find path to a folder, that I don't know it's location (only name).
How can I do this using CMake? The only thing i found was find_path, but as I am looking for another CMakeLists.txt file in whole project, that is in the specific folder I cannot effectively use it.
So what is the way to find path to folder of given name provided I know path to the root folder?

Related

How do I iterate over subfolders for SCSS files to compile?

I need to iterate over a subfolder for SCSS files in a variety of locations to compile in CSS (obviously). However, I have no idea how to do this, not being skilled in that area. I am also hampered by the fact I have to try to do this using NPM, and SASS (not node-sass).
Could someone give me a whistle-stop tour on how to achieve what I want?
It might also be worth pointing out that the SCSS files may reside in the SRC folder on the odd occasion, and I need to create the CSS files in the folder the SCSS was found in :(
As an example my folder structure looks a little like this;
Root
|
|- Components
| |- src
| |- styles
| |- buttons.scss
|
|- package.json
The end result would look like this
Root
|
|- Components
| |- src
| |- styles
| |- buttons.scss
| |- buttons.css
|
|- package.json
Any help would be greatly appreciated as I would like to learn how to do this once and for all ;)

Hydra - Specifying config group with a keyword other than the directory

Say I have the following file structure:
|--configs
| |--config.yaml
| |--A
| |--conf1.yaml
| |--conf2.yaml
| |--conf3.yaml
|--main_app.py
and my base config.yaml looks like
defaults:
A: conf1
If I want to run some other config like conf2 or conf3, I can simply run
python main_app.py A=conf2
What I am trying to do is to somehow use a different keyword from the directory name to specify this config above. For example,
python main_app.py B=conf2
For reasons I can't explain, it is not possible for me to change the directory name from A to B. However, I would find the behavior I described above desirable since B is a way more descriptive keyword than the directory name A. Is something like this possible? Thank you!
If you are using Linux you can create a symbolic link.
Hydra itself does not support this.

Go relative path up and down in R

This is my folder structure:
projectFolder
| |
| subFolder2
|
subFolder1
I have an R-script in subFolder1. How can I source a script in subFolder2 using a relative path?
OK, I got the answer:
source("../subFolder2/myScript.R")

Include local image in shiny

I'm trying to include a picture from my ubuntu machine into a gvisTable.
The path is specified as
<img src="google_logo.jpg"/>
And the folder structure looks like this:
+---/srv/shiny-server
| +---shinyApp
| +---server.R
| +---ui.R
| +---wwww
| +---google_logo.jpg
Pictures with an url do work, I played around with different placements of google_logo.jpg and the permission of google_logo.jpg, but I can't make it work.
In my css file I can access local images in the same directory with url("image.png")
Any suggestions?

How to show dockWidget at specific position in Qt?

I want to open my Qt application like as shown below. I have four dockwidgets, one is fixed and others are dockable.
___________________
| |mov. |
| Fixed |dock |
| dockWidget |widget|
|____________|______|
| Mov. |Movable |
|dockwid.|dockwidget|
|________|__________|
How can I create some settings or code to achieve this?
Can I use .ini file for default settings and user can also save its settings in .ini file? And how?
Here is the screenshot.

Resources