terminal

Docker number of lines in terminal changing inside docker

落花浮王杯 提交于 2019-12-17 22:33:50
问题 I would like to know how to change the following behavior. Let's say my terminal has 28 lines. Then I use the following commands: $ tput lines # my terminal 28 $ docker run --rm -it ubuntu:16.04 tput lines # docker container 24 ## WHY?? $ docker run --rm -it ubuntu:16.04 bash # docker container inside command root@810effa2777c:/# tput lines 28 As you can see, even when all the results should be 28 , when I'm calling the container as docker run --rm -it ubuntu:16.04 tput lines it always gives

Terminal issue with virtualenvwrapper after Mavericks Upgrade

随声附和 提交于 2019-12-17 22:09:01
问题 After upgrading to OSX Mavericks, I am getting this message in the terminal: /usr/bin/python: No module named virtualenvwrapper virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly. 回答1: Try reinstalling pip and then reinstalling virtualenvwrapper (I had to go through these steps after

VT100 Terminal Emulation in Windows WPF or Silverlight

北战南征 提交于 2019-12-17 21:57:10
问题 I'm pondering creating a WPF or Silverlight app that acts just like a terminal window. Except, since it is in WPF/Silverlight, it will be able to 'enhance' the terminal experience with effects, images, etc. I'm trying to figure out the best way to emulate a terminal. I know how to handle the VT100 emulation as far as parsing, etc. But how to display it? I considered using a RichTextBox and essentially converting the VT100 escape codes into RTF. The problem I see with that is performance. The

Terminal - command not found

泄露秘密 提交于 2019-12-17 21:23:14
问题 I'm trying to learn to write shell scripts and use the Terminal. In Users/user/Development/linux I've got a script called sysinfo_page. So I'm in the linux folder in the terminal and I can see the sysinfo_page when I type the ls command. However, when I enter the following command: sysinfo_page > sysinfo_page.html I receive the following message: -bash: sysinfo_page: command not found How do I resolve this? 回答1: If you want to run a script file form the current directory, you have to write ./

What Does the python -v Command Do

别说谁变了你拦得住时间么 提交于 2019-12-17 20:59:30
问题 I recently reinstalled my macOS and I wanted to check the version of Python. I typed python -v into the terminal and I am not sure what this did? I am new to the terminal and python programming. Did I install new software on accident? Last login: Sun May 14 15:02:37 on ttys000 Matthews-MacBook-Pro:~ matthewkol$ python -v # installing zipimport hook import zipimport # builtin # installed zipimport hook # /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.pyc matches

Stuck with Access Denied for user 'root'@'localhost' - Terminal, Mac

若如初见. 提交于 2019-12-17 20:47:38
问题 I am stuck when trying to access mysql. It's my first time so please be patient with me. Initially I was try to set up Ruby and Rails and everything worked perfrectly expect access denied when connecting to the server, SO I ran this command. mysql -uroot -p I've tried various passwords including leaving it blank and get this error. ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO) I am assuming I need to reset the password for root user but I just can't seem

How to call method in jar file with terminal?

霸气de小男生 提交于 2019-12-17 20:45:31
问题 I have a compiled project in a jar file and I need to call a method from it.How can I do that in ubuntu terminal? 回答1: You can not call any method from terminal or cmd of any class. You can execute class through terminal. If your jar is executable try: java -jar "Name of your Jar" Or set the class path of your jar: java -classpath path-to-jar <package>.<classname> 回答2: java -cp path/to/jar <package>.<classname> example: java -cp test.jar org.dekz.HelloWorld 回答3: I need to call a method from

How to fix Composer error: “could not scan for classes inside dir”?

社会主义新天地 提交于 2019-12-17 19:08:10
问题 I'm trying to install composer in terminal by entering this command: php composer.phar install it starts to install required packages but I'm getting this error type: [RuntimeException] Could not scan for classes inside "app/commands" which does not appear to be a file nor a folder How can I overcome this issue? 回答1: Usually this happens when you have some corrupted files or any composer update has crashed or interrupted. To solve, just delete the vendor folders and run composer install 回答2:

E185: Cannot find color scheme solarized

穿精又带淫゛_ 提交于 2019-12-17 18:33:28
问题 I have Solarized installed via pathogen and it's been working fine in both terminal and MacVim on my Mac. Today, I tried setting up an Ubuntu box on Linode. I just cloned my dotfiles and symlinked to my .vim and .vimrc folders (this is the same setup as I use on my local machine. Whenever I try to run vim on the Ubuntu box I get an error Error detected while processing /root/.vimrc: line 43: E185: Cannot find color scheme solarized Press ENTER or type command to continue I can tell my .vimrc

How can I get position of cursor in terminal?

a 夏天 提交于 2019-12-17 18:29:11
问题 I know I may save position using tput sc , but how can I read it's position to the variable? I need the number of row. I don't want to use curses/ncurses. 回答1: At ANSI compatible terminals, printing the sequence ESC[6n will report the cursor position to the application as (as though typed at the keyboard) ESC[n;mR , where n is the row and m is the column. Example: ~$ echo -e "\033[6n" EDITED: You should make sure you are reading the keyboard input. The terminal will "type" just the ESC[n;mR