I am working with IDL on MacOS and can't make the defroi procedure work. I can open up the window to define my ROI, but it is unable to mark anything in the image. I tried this exact code on a Windows and it works perfectly fine.
What am I doing wrong?
Seg=fix(Read_Binary(file, data_dims=dataDims, data_type=data, ENDIAN=little))
res=bytarr(512,512)+1
seg_tot=fltarr(512,512,154)
window,xsize=512,ysize=512
TvScl, total(Seg,3)
roi=defroi(512,512)
res[roi]=0
Go to your X11 settings and under window activate ''click through inactive windows''. This should do the work.
Related
I'm using Sublime Text (Build 4126) on a MacBook Pro (running Monterey 12.2.1) with the R-IDE package. I installed it as described at:
https://packagecontrol.io/packages/R-IDE
i.e., in R: install.packages("languageserver"); then in Sublime: install R-IDE, LSP, and LSP-R from Package Control.
Items under the R-IDE menu work as expected, syntax highlighting works, and the hover feature shows references to other occurrences of the item under the cursor. However, signature help doesn't work. This worked (most of the time) under R-Box (both written by randy3k). I've tried playing with settings files, but really don't know what I'm doing. I suspect this is probably a languageserver issue (https://github.com/REditorSupport/languageserver), but I'm just fumbling around.
Any suggestions on how to get signature help working for R in Sublime Text? Is anyone else not able to get it working?
I tried to use Xcos for any basic simulation, but I obtained a blank/black window, instead the graph.
https://drive.google.com/file/d/1AN78dFcH6eYs5ajpmGj4qtqH40smoghc
I was thinking that maybe I use wrong elements, but after running example from help I saw the same - black window.
At the end I tried to use simple "plot([1,2],[1,2]);" - the same.
https://drive.google.com/file/d/1sKexRkM8ZFB2DsqWEpShiFGgKhViXxCk
I tried to restart computer and to install older version (5.5.2 instead of 6.1.0) -> without changes.
System: Windows (I'm sorry) 7, 32 bit (yes, I used 32-bit instalation).
I have so far no idea of what can procude such a behaviour;
Can you try the following sequence of instructions:
f=gcf(); //what is the color of the xindow?
f.background=5;// does the window background changes (red)?
gca().background=5;// does the drawing area background changes(red)?
I have just switched from windows 7 to windows 10 on my pc.
When I was still using windows 7, using the combination CTRL+R or CTRL+ENTER would run the line of code that I was in. Moreover, if the code continued on one or more lines below or started above my current line, it would run the entire section without me having to select it.
After switching to windows 10, the same combinations will only run the line of code that I am currently in, or the piece of code that is selected by me. To give an example:
#Tryout
for(i in 1:3){
print(i)
}
This code would normally run at once without having to select it, even when I would start in the first line (#Tryout). Now, if I don't select, I will need to use CTRL+R or CTRL+ENTER three times to go through this code and I have to start in the correct line. Starting in the line #Tryout will not run any part of the code but will only result in the line #Tryout being shown in the console.
I'm not good with computers (in your answers please pretend to be adressing a five-year-old) so I had one of my colleagues look at it who's our expert on R. Here are the findings:
The problem occurs in both RStudio as the standalone version of R.
I'm using R version 3.3.2, the same as before the windows update. Switching to version 3.5 didn't solve the problem.
I have other colleagues also using R 3.3 in combination with windows 10 for whom this problem does not occur.
Going to Tools-Global Options-Code and checking the box of 'Focus console after executing from source' doesn't help
When we went to 'Modify Keyboard Shortcuts', the name attached to the shortcut (CTRL+R or CTRL+ENTER) was the same as it was for other colleagues for which the function does run all lines in a command: 'Run Current Line or Selection'
The problem is not preventing me from using R, but it is tedious and I hope someone can help me to solve it.
Thanks so much for reading!
Click on header Tools, then Global Options..., then Code, then Ctrl + Enter Executes and choose Multi-line R statement
#M Waz & #Just Burfi: I know I can select the code and then run it, that works fine. But I don't want to have to manually select the code all the time.
#Clemsang: your answer puzzled me for a moment because I didn't have the CTRL + Enter Executes that you were referring to. I went back to my colleague who had the bright idea to check the version of RStudio that I was using.
As it turns out, I was using an old version (0.99.903). Now that I've installed a newer version (1.1.463), running the code works as before! I also have the CTRL + Enter Executes now.
I've got a problem where my Hyper terminal emulator keeps changing my zsh shell text to blue. This doesn't happen on WSL.
WSL:
Hyper.js:
Changing hyper.js 'cyan' to #FFFFFF obviously makes it white but I don't want to fix it that way. For some reason, zsh let's Hyper know that it needs to render cyan/blue.
This happens after I reinstall hyper.js and clear the roaming/local appfolders:
Cleared:
I've been staring at this issue for way too long, tried everything I can and know. I have no idea where to look now, since it doesn't happen in WSL (Bash/Ubuntu for Windows).
Is there any way I can debug zsh or Hyper to tell me why it's turning blue/cyan?
Thanks!
I had the same Issue, you need to reset your CMD colors before using Hyper, check this issue for more information.
Solution:
Go to this link download Console_Defaults_win10.reg, execute it and then open Hyper.
Enjoy.
In R, how to remove all of the typed commands from the command window, so that I can have a clearer working environment.
On windows using RGui, a mac inside the terminal, or on Linux: Ctrl+L will clear the screen for you. You won't be able to scroll up to view what you've done in the session previously though. You can still use the up arrow to scroll through your history though.
On a mac using the gui: Option+Command+L will do the same thing as clearing in the windows gui.
On any system: You could create a function to do something similar to clearing the screen for you:
clr <- function(){cat(rep("\n", 50))}
All this does is prints enough linebreaks to essentially push everything above what is viewable on the console. You can still scroll up to view the previous output but you'll have 50 lines of whitespace. Depending on your monitor size you might need to increase the number of line breaks to clear everything.
As others pointed out its CTRL + L otherwise you may find this helpful if you are using Windows: function to clear screen
The functions that appear in that blog post seem to be copied (without giving attribution) from this r-help post and this r-help post.
EDIT:
Added caveat about Windows and also link to original original source.
In RGui, just press Ctrl+L and you should have a clean command line window.
try this:
cls <- function(){
if (getIdentification() == 'R Console')
cat('\f') # R Console
else{
if (Sys.info()[['sysname']] == 'windows')
system('powershell clear-host') # Windows
else
system('clear') # *Unix
}
}
this function may works both on windows, and *Unix.
i don't have a computer runs *Unix system, if this code works on Mac or Linux, let me know.