ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 05 Sep 2023 22:08:29 +0200enabling middle-button paste in sagemath's jupyterhttps://ask.sagemath.org/question/73170/enabling-middle-button-paste-in-sagemaths-jupyter/I am running sagemath 9.8 with jupyter_core 4.11.2 and jupyter_client 7.4.4. I access the sagemath notebook in firefox 116.0.2 on an Ubuntu 22.04 machine. I would like to enable middle-button paste in the jupyter notebook. My understanding from [stack overflow](https://stackoverflow.com/questions/42550138/highlight-to-select-and-middle-button-to-paste-in-jupyter-notebook) is that this requires that sagemath's jupyter use codemirror 5.44.0. The file ```$SAGE_ROOT/local/var/lib/sage/venv-python3.10.8/lib/python3.10/site-packages/notebook/static/components/codemirror/src/edit/main.js``` reports that the codemirror version is 5.56.0 so I am not sure why middle button paste is not working. In firefox ```about:config```, I do have ```middlemouse.paste = True```. Is there another firefox setting that I need to change?brettpimTue, 05 Sep 2023 22:08:29 +0200https://ask.sagemath.org/question/73170/Writing code in Notepad and copy pasting to SageMathhttps://ask.sagemath.org/question/46512/writing-code-in-notepad-and-copy-pasting-to-sagemath/So I'm trying my best to get the indent right everywhere, but sometimes I get the error that the indent is not right somewhere and also I get the error that I use some undefined name `n_points`; I have even tried typing the whole code into Sage myself, but then if I copy it from there and paste it in the notepad, it still includes all the dots. Even if I delete those dots, Sage still does not get happy when I copy and paste the code after **only** removing the dots via the notepad.... This is my code
def ell_geom_animation(E,init_points,n_points=10):
var('x,y')
#E = EllipticCurve(y^2==x^3-82*x);
p = init_points
j = len(p)
ell_frames = [plot(E)]*(n_points+j)
point_plots = []
line_plots = []
point_frames = []
line_frames = []
for i in srange(0,j-1):
point_plots += point(p[i][0:2],color='black',size=10)
for i in srange(0,n_points):
p += [E(p[i]+p[i+1])]
point_plots += point(p[j+i][0:2],color='black',size=10)
point_frames.append(point_plots)
line_plots += line([p[i][0:2],p[i+1][0:2]],color='black',size=10)
line_frames.append(line_plots)
A1 = animate(ell_frames)
A2 = animate(point_frames)
A3 = animate(line_frames)
return show(A1+A2+A3) # superimpose frame
Does anyone have some idea what is wrong with the alignments and maybe have a suggestion where I can write my code better such that I can simply copy and paste it in SageMath and press enter? I would very much appreciate suggestions and help.AlgebearMon, 13 May 2019 22:20:06 +0200https://ask.sagemath.org/question/46512/how to find the syntax errorhttps://ask.sagemath.org/question/41435/how-to-find-the-syntax-error/ Hi
Here's a short code (copy-paste) that gets me syntax error
i=3
while i>0 :
print i, 'looping'
i=i-1
"<ipython-input-7-8e7eba3f21a0>", line 4
i=i-Integer(1)
I retyped it a second time; now it works, but I don't see any difference.
i=3
while i>0 :
print i, 'looping'
i=i-1
Retyping only the line 4 with the error won't help, retyping the previous lines or restarting the kernel won't help either.
It's like a phantom error florinThu, 08 Mar 2018 12:58:58 +0100https://ask.sagemath.org/question/41435/%paste leads to dyld: Symbol not found: _sqlite3_intarray_bindhttps://ask.sagemath.org/question/34468/paste-leads-to-dyld-symbol-not-found-_sqlite3_intarray_bind/ I'm trying to paste Python code into Sage-5.12-OSX-64bit-10.8 and I'm getting the following error:
sage: %paste
dyld: Symbol not found: _sqlite3_intarray_bind
Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
Expected in: /Applications/Sage-5.12-OSX-64bit-10.8.app/Contents/Resources/sage/local/lib/libsqlite3.dylib
in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
## -- End pasted text --
What's wrong?
%cpaste works.mavaviljSun, 14 Aug 2016 11:29:45 +0200https://ask.sagemath.org/question/34468/copy-paste from host machine to sage command linehttps://ask.sagemath.org/question/9784/copy-paste-from-host-machine-to-sage-command-line/Hi,
I'm running Sage on the Oracle VM VirtualBox, in command line mode (black background). How can I copy and paste text from my host machine?
Thanks,
ValentinaValentinaFri, 08 Feb 2013 06:32:18 +0100https://ask.sagemath.org/question/9784/