JetBrains Space: Using the same file in multiple repositories, in the same project - repository

I have a JetBrains Space project and it contains two repositories (lets call them repository A and repository B).
Basically there is a JSON file in A, that I would like to access in B. Is such a thing possible?
In the main method in repository B I need to call: writeFile(String filePath).
How can I build the path for the JSON file in order for it to actually find the file from A?

Related

Is there an easy way to move a file to a different folder in dbt Cloud?

Is there an easy way to move a file to a different folder in dbt Cloud, without having to create a new file of the same name in the new folder, copy/paste from the old file, and delete the old file, which is a pain.
Is there a good reason I should NOT do this? I assume my refs still work as long as the filename remains the same, and I don't have any specific folder logic tied to this file.
For example, say I have my_model.sql in my 'staging' folder and I want to simply move it to my 'mart' folder instead. In this example I'd like to do this to reflect that my file is really a more 'stable' mart-type table file vs a staging view. I realize I can just change the materialization type, but I'm doing this more to organize things clearly. Thanks!
The way to move a file in the cloud IDE for dbt is not 100% obvious. You can use the rename function to move a file to another location.
Click on the drop down next to the file name, then select "Rename." That will open a file path and you can change where the file lives from there by typing in the new folder's name.
The easiest way I have found to do this is...not using DBT Cloud, but using github desktop (no command line needed).
Create a new branch
Open repository in github
View files in your file explorer
Move files or directory locally
Upload to github
Push to origin for the branch you created
Open a pull request
Merge
Depending on what the file or directory is you may find the creating a new branch and opening PR to be overkill. For my specific project there is a lot of legacy organization and models that we aren't totally sure don't have downstream dependencies, so creating a new branch for this allowed me to test run all of our models.
Hope this helps!

Is there a way to specify the NuGet package ID when running 'kpm build'?

When running kpm build against a project folder, the project.json metadata for the following fields is transferred to the output .nupkg file:
Version
Authors
Description
However, there does not seem to be a way to override the package ID or title (which defaults to the name of the containing folder).
Is this possible or is it necessary to produce a nuspec file through some other means in order to achieve this?
Sorry, it is not possible to specify a different name.
What's the scenario in which you need a different name?

How to use the latest file in a folder for source

I have an SSIS package which pulls in a CSV file for processing which pulls one file for the source \\server\dash\LABORDERS.CSV and is working fine.
We wanted to keep older files for historic purposes so everyday there will be new files instead of just overwriting the old one and it looks like this:
I know I am suppose to add a script task but I am not sure where to add it and how to invoke it so that the source file is always looking in the folder for the latest file and using that file to transfer data to it's sql destination.
How can I achieve it?
What have you tried? You can could create a script task at the start of your control flow that uses the .NET framework filesystem objects to search a directory and get the file with the most recent timestamp. You could then assign that file name to a SSIS Variable, then use that variable in your file connection manager.

Java - project dependency and current\relative working directory

I have two project where one is depended on the other, i.e. project A depends on project B, and the two projects reside in different directories.
In the independent project, i.e. project B, there is a class which holds a code that tries to access directories and files with respect to independent project directory. Since the depended project, i.e. project A, instantiate an object from the independent project, when the object execute System.getProperty("user.dir") it returns the execution directory, i.e. the directory of the dependent project; the same holds for new File(".").getAbsolutePath().
I would like to solve the issue in generic way, i.e. I wish to avoid the need to pass as an argument the path, rather, I wish the use relative directories programatically.
Any guidance\clues?
P.S. not sure if it is relevant, but I am using Eclipse as my IDE.
UPDATE
This should hold...
final String clsName = getClass().getName() + ".class";
System.out.println(getClass().getResource(clsName));
I'd use the class-loader instead of using paths directly. In eclipse, and in an deployment situation both projects resources should be in the classpath.
ProjectA
example.png
ProjectB
foo.txt
Something like this should be able to load a resource from either project A or B.
URL url = getClass().getResource("/example.png"); // get URL
InputStream stream = getClass().getResource("/foo.txt").openStream(); // open a stream

Using multiple Source control folders in a single build definition TFS 2010

In the Workspace tab
Source Control Folder: I am picking only two locations from my entire team project. I do not want to pick the entire team project because it has 20 projects.
I only need two project locations for the build.
$/TeamProject/ABCProj.SVC
$/TeamProject/ABCProj.UI
Build Agent Folder, If i specify the same $(SourceDir) for both the Source control folder locations($/TeamProject/ABCProj.SVC, $/TeamProject/ABCProj.UI)
above, I am unable to save the build definition.
I am getting an error when saving the Build definition
"$(SourceDir) can only be mapped one time in a given workspace"
Can any one please suggest a solution.
You'll have to map your version control folders to different source directories, for example:
$/TeamProject/ABCProj.SVC -> $(SourceDir)/ABCProj.SVC
$/TeamProject/ABCProj.UI -> $(SourceDir)/ABCProj.UI
Alternatively, you can just map $/TeamProject to $(SourceDir) and cloak all subprojects you don't want to get the sources for.