Jupyter notebook auto indentation doesn't work for scala - scala

I have being using jupyter notebook from the anaconda distribution for quite awhile, and I have installed both Python 2 and 3, and R kernels. They all work fine.
Recently, however, after I installed scala kernel, everything works fine except for the auto indentation, i.e. the cursor always sits at the beginning of a line after the enter is hit, and this problem only occurs in scala notebook.
I have tried jupyter-scala and Apache toree. They both have this issue. This issue is troublesome, for example, when you write nested loops as you have to tab the mouse cursor to the right position on every new line.
I have tried the conventional methods such as modifying the custom.js file, and issuing the mirrorcode commands on the browser console to set the indentUnit. It has effect on Python and R notebooks but Scala notebook just won't change.
Highly appreciate your help! I have been bothered by this issue for awhile now. Thank you very much in advance!

Related

How to make terminal minimal Vs Code?

I am trying to make terminal interference minimal by removing element I don't need. I am beginner in programming.
I want to remove the highlighted part.:
I am using coderunner and C/C++ Compile Run. I lloked for this on google and but Code-runner: Clear previous output, it does not work for me. Also is there any way I can clear terminal automatically when running the code using ctrl+alt+N instead doing it manually?
If I can't do this in powershell is there any other shell which give this functionality?

How to setup Julia in VS code?

I'm coming from a pure Windows Visual Studio programming background with little Linux experience. It seems possible to use VS Code to program in Julia, but I can't figure out how to get things set up correctly.
Does anybody have good example launch.json, tasks.json, or other files that can serve as an example to build from?
This would be a great thing to see in a detailed tutorial.
Here is how things work if you are using the Julia extension for VisualStudio Code.
The extension adds a bunch of new commands. They all start with "julia", so filtering by that string should show you everything you can do with the extension.
In terms of running Julia code, the extension offers only two options right now. First, you can execute a command to start a REPL. This will just show a default Julia prompt, and you can interact with it like you would with any other Julia REPL. The second is that there is also a command, triggered by Ctrl + Enter, to send either the current editor selection or the current editor line to this REPL.
There is currently no further integration offered by the Julia extension. We do plan to add debugger support in the future, at which point I would expect F5 to start the current file in the debugger, or something like that. But that functionality is probably a couple of months away.

IPython's partial up-arrow search not working; Ctrl-P is fine

Our sysadmin recently updated us to OpenSUSE Leap 42.1. I immediately noticed that IPython's history search behaviour changed. Previously, if I typed part of a command then pressed Up, I could scroll through those commands in the history matching the part that I'd entered. This no longer works: Up just scrolls through the history one line at a time.
Using Ctrl-P to do the same thing still works perfectly but I'd like to restore that behaviour to Up if possible.
I didn't have a ~/.inputrc file, and I tried creating one with the contents
# arrow up
"\e[A":history-search-backward
# arrow down
"\e[B":history-search-forward
but that only added similar behavior to bash. Also, it means the ~/.inputrc suggested here doesn't work.
I'm using IPython version 3.2.2 and Python 2.7.9, if relevant. The Python readline package appears to be installed but I don't know what the install order was.

How to activate the code assistance in IPython Notebook / Jupyter

I'm not 100% this is what it is called. I'm taking an online course on pandas. The 'syntax assistance box' keeps popping up for him. Although he is using Notebook and I'm using the latest version of Jupyter.
Just press <Shift>+<Tab> at the same time when the cursor is right after the object you information about.
For example:
pd.DataFrame
^
cursor
or with parenthesis:
pd.DataFrame()
^
cursor
Now press <Shift>+<Tab>.
Works in Firefox and Chrome. Need to test with other browsers.

QUTIP output displayed as image in iPython console within Spyder

I have been having this issue for a while:
Using iPython console in Spyder 2.3.8, and installed QUTIP 3.1.0,
I tried to run a simple code:
qt.coherent(3,1)
where I was expecting the output to be displayed as an array.
However, doing so in iPython in Spyder it shows an image:
It seems for some reasons it rendered the array as image, and this is awkward to read in most cases, which I prefer to have the array displayed, which actually works if I use the Python3 console in Spyder.
May I know if you have any idea what the cause maybe?
The weird thing is that, this happens only to my Fedora Scientific 23, to the Spyder3 running Python3.4.
Another computer running Windows and WinPython didn't share the same problem, which the array got displayed correctly.
Thanks for your attention.
It seems that the ipython in spyder is calling the latex_repr method rather than just repr. Seems to be a bug somewhere in spyder as the standard ipython terminal has no such error.
The image printing problem appears when I automatically loaded SymPy which is done by: go to spyder Tools>>Prefeneces>>Ipython console>> Advance setting>> check or uncheck symbolic mathematic
When I check the symbolic mathematic, I generally get the result as an image, so I uncheck it and restart spyder, now it works well.
However, if you want to calculate something from symbolic math, it is better to check the "symbolic math" box again. I try to load sympy to ipython but I constantly get a typeerror.