Signup/Sign In

Answers

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

this is a codes on start and on end.
***â<80><98> = ‘
â<80><99> = ’***
3 years ago
**Shift** **z** **z** in command mode saves the file and exits.
3 years ago
Just use PDFtk.
For rotating clockwise:
***pdftk input.pdf cat 1-endeast output output.pdf***

For rotating anti-clockwise:
***pdftk input.pdf cat 1-endwest output output.pdf***
3 years ago
EOF in the context of C is just something that cannot appear in a file. EOT is an ASCII character that historically signalled the end of a message (and is a special character in UNIX terminals that means end of stream when it appears in user input only), but it CAN appear in files, so using it in C to signal the end of a file would be a terrible idea when reading binary files!
3 years ago
***foo () {
local run=$1
fsl5.0-flirt -in $kar"deformed.nii.gz" -ref normtemp.nii.gz -omat $run".norm1.mat" -bins 256 -cost corratio -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 12
fsl5.0-flirt -in $run".poststats.nii.gz" -ref $kar"deformed.nii.gz" -omat $run".norm2.mat" -bins 256 -cost corratio -searchrx -90 90 -searchry -90 90 -searchrz -90 90 -dof 12
fsl5.0-convert_xfm -concat $run".norm1.mat" -omat $run".norm.mat" $run".norm2.mat"
fsl5.0-flirt -in $run".poststats.nii.gz" -ref normtemp.nii.gz -out $PWD/normFunc/$run".norm.nii.gz" -applyxfm -init $run".norm.mat" -interp trilinear
}

for run in $runList; do foo "$run" & done***
In case that's not clear, the significant part is here:

***for run in $runList; do foo "$run" & done
^
***
Causing the function to be executed in a forked shell in the background. That's parallel.
3 years ago
Just use the **-m** option of GNU **grep** which stops reading the file after (in the example) one match.
***find dir -iname '*.ext' -exec grep -m 1 'pattern' {} \;***
3 years ago
you should try this.
***$ date
Wed Mar 20 15:02:23 MST 2021
$ date -d "last-monday"
Mon Mar 18 00:00:00 MST 2021
$ date -d "last-monday - 1 week"
Mon Mar 11 00:00:00 MST 2021***
3 years ago
You can launch the command but it will not work if you are not root. It is easy : imagine a user which can change a software to root user. It can add the setuid bit and, voilà, the guy is root ! So, the use can add the bit with chmod, but no chance to change the owner of files.
3 years ago
Do it this way:
***sudo touch /forcefsck***

Then reboot this machine normally.
3 years ago
Here is one that I quickly hacked together. It needs a little work on the formatting, but basicly it works.
***#!/bin/bash
for y in $(seq 0 524287)
do
for x in $(seq 0 7)
do
a=$(expr $y \* 8 + $x)
echo -ne "$a \\u$a "
done
echo
done***
3 years ago
SOCKS5 is just a transport protocol on top of TCP/UDP but below application layer. Thus it's comparable with TCP and UDP, too. There's no inherent encryption in SOCKS, but you application has to care about this (it's not a VPN technology, but a proxy at last). If you want encryption, the protocol you speak inside of the SOCKS-channel has to provide it.
3 years ago
Could be done with a short **perl** script like:
***#! /usr/bin/perl
system qw(tput sc); # save cursor
$rc = `tput rc; tput ed`; # restore cursor and erase down
sub report {
print $rc;
print "$_: $c{$_}\n" for sort {
($c{$b} <=> $c{$a}) || ($a cmp $b)
} keys %c;
STDOUT->flush;
alarm 1;
}
$SIG{ALRM} = \&report;
alarm 1;
while (<>) {
chomp;
$c{$_}++;
}
report;***
3 years ago