Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

If you need pip3 to install packages for python3, you can use pip to install packages for specific versions of python. You could try:
***python3.6 get-pip.py***
and then:
**python3.6 -m pip install **
replacing for your version of python and the package.
3 years ago
In the installation of Gentoo, you'll be much more encouraged to compile your own kernel, an experience that any power user of Linux should go through. :)

Arch by default uses systemd for its initialisation. systemd is growing much more popular, and most distributions are moving over to it in place of the old System-V style init system. Gentoo uses this older init system by default, but is aided by OpenRC. Gentoo however does have systemd available in Portage.

There's one similarity that I'd like to mention though: you can learn a lot about Linux just from installing either distribution!
3 years ago
I don't believe **youtube-dl** alone will do what you want. However you can combine it with a command line utility like ffmpeg.

First acquire the actual URL using youtube-dl:
***youtube-dl -g " ://www.youtube.com/watch?v=V_f2QkBdbRI"***
Copy the output of the command and paste it as part of the **-i** parameter of the next command:
***ffmpeg -ss 00:00:15.00 -i "OUTPUT-OF-FIRST URL" -t 00:00:10.00 -c copy out.mp4***
The **-ss** parameter in this position states to discard all input up until 15 seconds into the video. The **-t** option states to capture for 10 seconds. The rest of the command tells it to store as an mp4.

ffmpeg is a popular tool and should be in any of the popular OS repositories/package managers.
3 years ago
One thing I don't see mentioned here, the "send HUP on terminal exit" event is configurable - it may or may not happen. This may be confusing some peoples' perception of how **nohup** is working. If sending HUP on terminal exit has been disabled, they will come to the conclusion **nohup** is not needed. Sending HUP on terminal exit is a shell option in bash.

Try
***shopt | grep huponexit***
This will tell you if HUP is even being sent on terminal exit. If it is, you will need to use nohup. If it is not, you won't.
3 years ago
You may want to read from **cin** to get a poor man’s **pause** – it will wait for you to type an **Enter**, rather than resuming while you’re getting coffee (as **sleep()** will).
3 years ago
Create a function:
***gclonecd() {
git clone "$1" && cd "$(basename "$1" .git)"
}***
(Works for links both with and without ".git")
3 years ago
**convert** is a handy command line tool to do that. cd to the folder containing your png-files and run this command:
***convert -delay 10 -loop 0 *.png animation.gif***
3 years ago
Using **tr** ard **wc**:
***function countchar()
{
while IFS= read -r i; do printf "%s" "$i" | tr -dc "$1" | wc -m; done
}***
Usage:
***$ countchar '"' 1
3
0

$ countchar ')' #will count parenthesis from stdin
$ countchar '0123456789' #will count numbers from stdin***
3 years ago
If your epoch time is in milliseconds instead of seconds, remove the last three digits before passing it to **date -d**:
***$ date -d @1455086371603
Tue Nov 7 02:46:43 PST 48079 #Incorrect***

This gives incorrect data. Remove the last three digits.
***$ date -d @1455086371
Tue Feb 9 22:39:31 PST 2016 #Correct after removing the last three digits. You may remove and round off the last digit too.***
3 years ago
On the off chance that you as of now have a reference to a radio catch bunch, for instance:
***var myRadio = $("input[name=myRadio]");***
Utilize the **filter()** fucntion, not **find()**. **(find()** is for finding kid/relative components, while **filter()** look through high level components in your determination.)
***var checkedValue = myRadio.filter(":checked").val();***
This answer was initially remedying another answer that suggested utilizing **find()**, which appears to have since been changed. **find()** could, in any case, be valuable for the circumstance where you previously had a reference to a compartment component, however not to the radio catches, e.g.:
***var form = $("#mainForm");
...
var checkedValue = form.find("input[name=myRadio]:checked").val();***
3 years ago
***
autocomplete="off" action=" //www.example.com/form.cgi">***
This will work in Internet Explorer and Mozilla Firefox. The disadvantage is that it isn't XHTML standard.
3 years ago
If you are running the **Maven** command from **cmd**, make sure you set the jdk path before running the command. In my case, I have created a **.bat** file containing the following:

***set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_60
start cmd.exe /k "cd c:\aem_proj\sis\aau"***
3 years ago