terminal

Can't install Ruby 2.0.0 with rvm

不想你离开。 提交于 2019-12-13 12:22:07
问题 I tried to install Ruby 2.0.0 with rvm install 2.0.0 this was my output: Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.8/x86_64/ruby-1.9.3-p392. Continuing with compilation. Please read 'rvm mount' to get more information on binary rubies. Installing requirements for osx/10.8/x86_64, might require sudo password Password: DEBUG: Copying /Users/Family/Library/Preferences/com.apple.dt.Xcode.plist to /opt/local/var/macports/home/Library/Preferences

bs4: “soup.title.string” doesn't work on IDLE but Terminal

假装没事ソ 提交于 2019-12-13 11:54:15
问题 Mac OS X 10.9 Python 2.7 IDLE BeautifulSoup 4 installed (successfully) I followed BS4 documentation and was practicing some of the functions on IDLE . The following code works and was able to print out title & title.name. from bs4 import BeautifulSoup html = """ <html><head><title>The Dormouse's story</title></head> <body> <p class="title"><b>The Dormouse's story</b></p> <p class="story">Once upon a time there were three little sisters; and their names were <a href="http://example.com/elsie"

How to access a file on Amazon S3 from the Command Line?

非 Y 不嫁゛ 提交于 2019-12-13 11:41:32
问题 Question: Is there a simple way to access a data file stored on Amazon S3 directly from the command line? Motivation: I'm loosely following an online tutorial where the author links to the following URL: s3://bml-data/churn-bigml-80.csv It is a simple csv file, but I can't open it using my web browser, or with curl . The tutorial opens it with BigML, but I want to download the data for myself. Some googling tells me that there are a number of python and Scala libraries designed for S3 access

About basic commands in bash (cp, cd,..) [closed]

梦想与她 提交于 2019-12-13 11:21:57
问题 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 trying to learn basic commands in the terminal. I have a couple of quick questions. I know that to make a file and place it in a specific folder, one needs to create the directory and then use touch to create an empty file and place it there by mv : mkdir folder/sub touch file.txt mv file.txt folder/sub

Utilizing the “say” command in terminal

為{幸葍}努か 提交于 2019-12-13 09:47:12
问题 Is there any way to make terminal execute the "say" command when I login to my laptop? I want it to have a greeting when I log in. Is that possible at all? 回答1: Sure, paste the following into a file called greet in your HOME directory: #!/bin/bash say "Hello" Then start the Terminal, and type chmod +x greet to make it executable. Then go to the Apple menu at top-left of the screen, and click System Preferences->Users & Groups , then select your username, and on the right click Login Items .

Cannot run Maven command

血红的双手。 提交于 2019-12-13 09:34:30
问题 I am not a professional programmer.i am getting this error when running "mvn clean install". If anyone can explain me to correct this error that would be great. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building erp-web Maven Webapp [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting file

My codes work well In Dev c++ IDE, but in linux terminal, it doesn't. (especially in the part of 'while' loop.) [closed]

只谈情不闲聊 提交于 2019-12-13 09:23:37
问题 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 3 years ago . while(true) { getline(myfile, a[i]); if (a[i]=="")//or if(a[i].empty()) break; i++; n = i; } In this while loop, when getline function gets a blank line from myfile object (there is a blank line between a series of binary numbers). Example: 101010 000 11 1 00 <- when getline meets this line, by "if" break; has

Not able to print in color on terminal

旧城冷巷雨未停 提交于 2019-12-13 08:55:34
问题 As given in an answer on Print in terminal with colors using Python? , I am trying to print in color on console/terminal using following code: RED = "\e[31m" NORMAL = "\e[0m" print("TESTING") print(RED+"TESTING"+NORMAL) print("TESTING") However, it is not working and only giving following output: TESTING \e[31mTESTING\e[0m # IN BLACK, THOUGH IT IS SHOWING COLOR HERE. TESTING Where is the problem and how can it be solved? I am using Python version 3.5.3 on Debian Stable Linux. 回答1: You have

Linux operating system ( Ubuntu)

会有一股神秘感。 提交于 2019-12-13 08:38:27
问题 I am tying sudo apt-get install gparted command on terminal but it is not working properly and showing this error. What could be the problem? E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? 回答1: Restarting the system should solve the problem. If the restarting doesn't help, try this link You can delete the lock file with the following command: sudo rm /var/lib

gem-install of mongoid throws an uninitialized constant in Ruby, works in irb

你说的曾经没有我的故事 提交于 2019-12-13 08:37:21
问题 I am writing a script with Ruby/MongoDB that stores Tweets. After I gem-installed mongoid , this first-steps code throws an error: require 'rubygems' require 'mongo' require 'mongoid' Mongoid.database = Mongo::Connection.new('localhost').db('db') # snippet from http://rujmah.posterous.com/using-mongoid-without-rails NB. This is no Rails app , but a Terminal script. The error I get is: ./mongoid.rb:10: uninitialized constant Mongoid (NameError) from /Library/Ruby/Site/1.8/rubygems/custom