Как насчет удаления всего остального?
data <- c("Demand = 001 979", "Demand = -08 976 (154)", "Demand = -01 975 (359)")
data <- gsub("Demand = ", "", x = data)
data <- trimws(gsub("\\(.*\\)", "", x = data))
out <- list()
out[[1]] <- sapply(data, "[", 1)
out[[2]] <- sapply(data, "[", 2)
out
[[1]]
[1] "001" "-08" "-01"
[[2]]
[1] "979" "976" "975"
You can create a project on a remote machine using RSE. To do so you must have the RSE server component installed on the remote machine. Create a connection to the machine using the RSE Remote Systems view. Create a new C/C++ project and on the first page of the wizard uncheck the checkbox that says "use default location". This enables a dropdown of file system providers, choose RSE. Then when you click Browse you will get a dialog that lets you browse the remote system for the folder where you want your project to live.
There are a few issues with this approach. First of all when the CDT indexer wants to build the index it needs to parse all the files in your project, which means downloading all the files to your local machine. This can be slow if you have a large project or a slow connection.
Another issue is that when you restart eclipse the remote projects will be closed. This is because you don't have a connection to the remote machine yet so eclipse can't read the .project file. You will have to reopen your remote projects every time you start eclipse.
There is currently a project in the works called RDT (Remote Development Tools) which adds remote indexing capabilities to CDT. That means the indexer will live on the remote machine with your code, so the files don't have to be downloaded for the indexer. Its still in "alpha" status, but if you are adventurous and want to try it out go here.
Пробовали ли вы инструменты удаленного рабочего стола, такие как, например, nx , для локального запуска eclipse на машине, которая также содержит исходный код?
Это могло бы быть более простым решением. Кроме того, у вас есть такая же среда с любого ПК, на котором работает этот инструмент.
Have you tried running Eclipse from the Linux machine with X11 forwarding ? You should have Eclipse installed on the Linux machine first.
Haven't tried it myself.
Like Liran Orevi said you can use x windows.
ssh can automate the forwarding, removing the need for xhost + and the DISPLAY env.
I was in a similar situation, developing in a windows workstation, compiling in a linux server. This is what I ended doing:
plink.exe -load "saved_session" make -C /remote/path/project
(This setting is in Project/Properties/C++Build/Builder Settings/Build command). You can automate this with a batch/shell file if you have to pass more parameters and/or your setup is more complex.If you have stored a passphrase with your private key then you can use pageant.exe to load your key only once, so you dont have to type your passphrase every time.