terminal

How to install the latest version of Eclipse Classic on Ubuntu 12.04 using the terminal?

浪尽此生 提交于 2019-12-22 04:18:08
问题 Please how to install the latest Eclipse Classic (4.2) on Ubuntu 12.04 using the terminal? if you can direct me step-by-step, I would be grateful. 回答1: See this blog post here, for step-by-step instructions. The process is documented step-by-step and in the comments the author has included a script - #!/bin/sh ECLIPSE=/usr/lib/eclipse/eclipse inject_update_site(){ if [ ! -e "$1" ] ; then echo "W: Cannot find $1" 2>&1 return 1 fi cat - >>"$1" <<EOF repositories/http\:__download.eclipse.org

Keep stdin line at top or bottom of terminal screen

天大地大妈咪最大 提交于 2019-12-22 03:49:12
问题 So I am writing a project where I run a program that constantly receives/sends messages to other computers running the same program. The receiver/sender of data is running on a thread and prints to stdout. I get stuff like this: [INFO] User 'blah' wants to send message to you. [INFO] some other info [MSG REC] Message 'hello' received from blah. Now the issue is that sometimes I wish to input commands into the terminal, the problem is when I try to enter a command and a new info message or MSG

How can I install PyQt5 on Mac?

[亡魂溺海] 提交于 2019-12-22 03:43:18
问题 I am trying to install PyQt5 on my Mac but I do not know how to use it well. I have tried to install sip doing cd ~/Downloads/sip-4.17 python configure.py which worked, and then I tried cd ~/Downloads/PyQt-gpl-5.5.1 python configure.py --qmake /Users/name/Qt/5.5/clang_64/bin/qmake which returns an error that says Make sure you have a working sip on your PATH or use the --sip argument to explicitly specify a working sip. How do I fix this error? Did I not install sip? 回答1: I'm kind of dodging

How to change the terminal prompt to just current directory? [closed]

拟墨画扇 提交于 2019-12-22 03:23:05
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 5 years ago . I am using a Macbook Pro, and I wanted to change it to the current directory and a dollar sign prompt in Terminal. I've already looked at these resources to try and solve this issue. I tried modifying the ~/.bashrc file and saving it but it did not seem to work. PATH=$PATH:$HOME/.rvm/bin # Add RVM to PATH for

Terminal text becomes invisible after terminating subprocess

两盒软妹~` 提交于 2019-12-22 01:43:58
问题 After terminating an ffmpeg subprocess, the terminal gets messed up - typed characters are invisible! The input still works in that commands can be executed, but keyboard input is not echoed to the terminal. Issuing shell command reset puts everything back to normal (or !reset from within ipython), so a workaround the issue is calling os.system('reset') inside the script. Other things I've tried: import curses; curses.initscr() before spawning the subprocess and curses.endwin() after

How, and whether, to colorize text without Ncurses

烈酒焚心 提交于 2019-12-22 01:39:55
问题 Ncurses can colorize text but GNU utilities like ls and diff apparently colorize text without calling Ncurses. Can I, too, portably colorize text without calling Ncurses? For example, in C: printf("the word \033[32mgreen\033[0m is printed in color\n"); This works on my installation but does not look very portable. On the other hand, if ls and diff do it more or less in this way, then who am I to call the technique nonportable? Examining GNU sources, I notice that ls uses dircolors or $LS

keyboard transmit mode in vt100 terminal emulator

夙愿已清 提交于 2019-12-22 00:28:38
问题 I'm implementing a vt100 terminal emulator in javascript and the vt100 spec (from man terminfo and infocmp ) tells me that smkx=\E[?1h\E= is the code to enter key-board transmit mode and rmkx=\E[?1l\E> is the code to leave 'key-board transmit' mode. I couldn't really understand what key-board transmit mode is. From http://vt100.net/dec/ek-vt220-tm-001.pdf, 7.4.4.1 Keyboard Transmit Mode -- The keyboard codes and a few other special codes are transmitted via a serial line output in PORT of the

Run any Linux terminal command from TypeScript?

柔情痞子 提交于 2019-12-22 00:07:03
问题 Is there a way to execute a Linux terminal command directly from within a TypeScript class? The idea is to do something similar to: let myTerminal = new LinuxTerminal(); let terminalResult = myTerminal.run("sudo apt-get update"); EDIT : I run this through Node JS with Angular. 回答1: In node.js you could spawn a child-process const { exec } = require('child_process'); exec('sudo apt-get update', (err, stdout, stderr) => { // your callback }); 来源: https://stackoverflow.com/questions/49700941/run

sqlite insert taking long time

梦想与她 提交于 2019-12-21 22:16:52
问题 I'm inserting just short of 200,000 rows into an sqlite database table. I'm just using a very plain .sql file via sqlite3 in terminal. I'd bet it's been running for at least 30 minutes. Is this normal or should I shut the process down and try something differently? 回答1: Insert speed in sqlite mainly depends on: amount of inserts per transaction (insert without transaction is an atomic insert, each in it's own transaction, which means it's very slow) database mode - WAL or normal journal

MySQL is not found anywhere on computer

元气小坏坏 提交于 2019-12-21 21:58:41
问题 I have recently installed MySQL directly from the website (mysql-5.7.9-osx10.10-x86_64.dmg) and I have run into a great deal of difficulty that started with trying to change the given password. The error that was returned was: [Warning] Using a password on the command line interface can be insecure. mysqladmin: connect to server at 'localhost' failed error: Can't connect to local MySQL server through socket '/tmp/mysql.sock (2)' Check that mysqld is running and that the socket: '/tmp/mysql