| CONTENTS |
The prompt displayed by your shell is contained in a shell variable (Section 35.9) called prompt in C-type shells and PS1 in Bourne-type shells. As such, it can be set like any other shell variable.
There are two or three ways to set a prompt. One is a static prompt (Section 4.2) that doesn't change during your login session (as you change directories, as the time of day changes, etc.). Some shells let you set a dynamic prompt (Section 4.3) string that is interpreted by the shell before each prompt is printed. Even on shells that don't interpret prompt strings dynamically, you can simulate a dynamic prompt (Section 4.4) by changing the prompt string automatically.[1]
Depending on your shell's capabilties, you can use or combine those three techniques and those found in the rest of this chapter to do a lot. But, of course, you don't want to type that prompt-setting command every time you log in. So after you've perfected your prompt on the command line, store it in the correct shell setup file (Section 3.3): use the file that's read by interactive shells or add an interactive shell test to your setup file. (Setting the prompt in noninteractive shells is pointless and it can even cause problems (Section 4.5).)
JP, TOR, and SJC
As Section 4.1 explains, the simplest prompts which I call static prompts are prompts whose value are set once. The prompt doesn't change (until you reset the prompt variable, of course).
The default bash prompt is a good example of a static prompt. It's "bash$ " (with a space at the end, to make the command you type stand out from the rest of the prompt). You could set that prompt with the simple command:
PS1='bash$ '.
Notice the single quotes (Section 11.3) around the value; this is a good idea unless you want special characters in the prompt value to be interpreted before it's set. You can try it now: type that command on a command line, just as you would to set any other shell variable. Experiment a bit. The same prompt works on ksh and sh.
If you use csh or tcsh, try one of these, then experiment:
set prompt='csh% ' set prompt='tcsh> '
(zsh users: you can use any of the previous styles, but omit the set from the set prompt style.) Those prompts are fairly useless, right? If you log in to more than one machine, on more than one account, it's nice to have your hostname and username in the prompt. So try one of the following prompts. (From here on, I won't show a separate tcsh version with a > instead of a %. You can do that yourself, though, if you like.) If your system doesn't have uname, try hostname instead:
PS1="$USER@`uname -n`$ " set prompt="$user@`uname -n`% "
Notice that I've used double quotes (Section 12.3) around the values, which lets the shell expand the values inside the prompt string before the prompt is stored. The shell interprets the variable $USER or $user and it runs the command substitution (Section 28.14) that gives the hostname once, before the prompt is set. Using double quotes is more efficient if your prompt won't change as you move around the system.
JP and SJC
Many shells can interpret the stored prompt string as each prompt is printed. As Section 4.1 explains, I call these dynamic prompts.
Special character sequences in the prompt let you include the current directory, date and time, username, hostname, and much more. Your shell's manual page should list these at the PS1 or prompt variable. (If you use the Korn shell or the original C shell, you don't have these special sequences. Section 4.4 has a technique that should work for you.)
It's simplest to put single quotes around the prompt string to prevent interpretation (Section 27.1) as the prompt is stored. For example, the following prompt shows the date and time, separated by spaces. It also has a special sequence at the end (\$ in bash, %# in tcsh and zsh) that's printed as a hash mark (#) if you're the superuser, or the usual prompt character for that shell otherwise. The first command in the following code listing works only in bash; the second only in tcsh:
PS1='\d \t \$ ' ...bash set prompt='%w %D %Y %P %# ' ...tcsh PS1='%W %* %# ' ...zsh
Having the history number in your prompt, as Section 4.14 shows, makes it easy to use history (Section 30.8) to repeat or modify a previous command. You can glance up your screen to the prompt where you ran the command, spot the history number (for example, 27), and type !27 to repeat it, !27:$ to grab the filename off the end of the line, and much more. In csh, tcsh, and bash prompts, use \! to get the history number. In zsh, use %! instead.
JP, TOR, and SJC
Some shells don't have the special "dynamic" prompt-setting sequences shown in Section 4.3. If you still want a dynamic prompt, you probably can simulate one. Both ksh and bash will expand variables (like $PWD), do command substitution (to run a command like 'date'), and do arithmetic as they print the prompt. So, for example, you can put single quotes around the prompt string to prevent interpretation of these items as the prompt is stored. When the prompt string is interpreted, the current values will be put into each prompt. (zsh gives control over whether this happens as a prompt is printed. If you want it to happen, put the command setopt prompt_subst (Section 28.14) in your .zshrc file (Section 3.3).)
The following prompt stores the $PWD parameter to give the current directory, followed by a backquoted date command. The argument to date is a format string; because the format string is inside single quotes, I've used nested double quotes around it. Because it's in single quotes, it's stored verbatim and the shell gets the latest values from date and $PWD each time a prompt is printed. Try this prompt, then cd around the filesystem a bit:
PS1='`date "+%D %T"` $PWD $ '
That prompt prints a lot of text. If you want all of it, think about a multiline prompt (Section 4.7). Or you could write a simple shell function (Section 29.11) named, say, do_prompt:
# for bash function do_prompt { date=`date '+%D %T'` dir=`echo $PWD | sed "s@$HOME@~@"` echo "$date $dir" unset date dir } # for ksh do_prompt( ) { date=`date '+%D %T'` dir=`echo $PWD | sed "s@$HOME@~@"` echo "$date $dir" unset date dir }
and use its output in your prompt:
PS1='`do_prompt` $ ' ...for sh-type shells
The original C shell does almost no interpretation inside its prompt variable. You can work around this by writing a shell alias (Section 29.2) named something like setprompt (Section 4.14) that resets the prompt variable after you do something like changing your current directory. Then, every time csh needs to print a prompt, it uses the latest value of prompt, as stored by the most recent run of setprompt. (Original Bourne shell users, see Section 4.15 for a similar trick.)
JP, TOR, and SJC
Stray prompts can cause trouble for many commands that start a noninteractive shell. This problem may have (and probably has) been fixed in your C shell, but some of the following tricks will speed up your .cshrc, so keep reading.
If you set prompt in your .cshrc file without carefully checking first whether prompt was already set (Section 4.1), many older versions of the C shell will cheerfully print prompts into the pipe vi uses to expand glob characters, such as filename wildcards (*, ?, [ ]) (Section 1.13) and the tilde (~) (Section 31.11).
When you type :r abc*, vi opens a pipe to the C shell, writes the command echo abc* down the pipe, then reads the response. If the response contains spaces or newlines, vi gets confused. If you set your prompt to (n) in your .cshrc [i.e., if you show the history number in parentheses as the prompt TOR], vi tends to get:
(1) abc.file (2)
back from the C shell, instead of just abc.file.
The solution is to kludge your .cshrc like this:
if ($?prompt) then # things to do for an interactive shell, like: set prompt='(\!) ' endif
This works because a noninteractive shell has no initial prompt, while an interactive shell has it set to % .
If you have a large .cshrc, this can speed things up quite a bit when programs run other programs with csh -c 'command', if you put all of it inside that test.
CT
To set your prompt, you execute a command (on most shells, that command sets a shell variable). Before setting the prompt, you may run other commands to get information for it: the current directory name, for example. A shell can run two kinds of commands: built-in and external (Section 1.9). Built-in commands usually run faster than external commands. On a slow computer, the difference may be important waiting a few seconds for your prompt to reset can get irritating (though the computer would have to be quite slow nowadays for it to matter that much). Creative use of your shell's built-in commands might pay off there, and they are still quite useful for those trying to squeeze the most performance out of their system. Let's look at some examples:
Section 4.3 has examples of some shells' special characters, such as %D to give the current date. Check your shell's manual page; if it has these features, using them won't slow you down the way an external command in backquotes (Section 28.14), like 'date', might.
If you're putting your current directory in your prompt, you may only want the tail of the pathname (the name past the last slash). How can you edit a pathname? You might think of using basename (Section 36.13) or sed (Section 34.1) with the current directory from $cwd as in the first command in the following code listing, and probably in an alias like setprompt (Section 4.7) to make sure the prompt is updated whenever you change directories. The faster way is with the second command, using the C shell's built-in "tail" operator, :t:
set prompt="`basename $cwd`% "
{} Section 35.9
set prompt="${cwd:t}% "
If your current directory is /usr/users/hanna/projects, either of those prompts would look like "projects% " (with a space after the percent sign).
The C shell has several of these built-in string operators (Section 28.5) like :t; the Korn Shell, zsh, and bash have more-powerful string operators (Section 28.5).
If your prompt gets complex, you can use a shell function (Section 29.11) to access other built-in commands and edit the prompt. This can be faster than using an external shell or Perl script because functions run within the shell instead of in an external process. Here's an example from my .zshrc file:
${+} Section 36.7, $(...) Section 28.14
# Change "script" prompt automatically so I remember I'm in one. alias script='SCRIPT=yes /usr/bin/script' # # Functions: # setprompt( ) { case "${TTY##*/}" in tty[1-9]) xpi=':tty%l' ;; # Virtual console *) xpi= ;; esac PS1=" $USER@%m$xpi $(dirs) %* \$(folder -list) ${SCRIPT+SCRIPT-}%!%# " }
Before the function, I set an alias that temporarily sets an environment variable named SCRIPT while the script (Section 37.7) program is running. The setprompt function, running in the child shell under script, sees that this environment variable has been set and adds the string SCRIPT- before the prompt. This reminds me that I'm logging to a script file. (If this is hard to visualize, Section 24.3 and Section 35.3 have some background.)
The setprompt function itself has two parts. The first is a case statement (Section 35.11) that tests $TTY, the name of the tty (Section 2.7) I'm currently using. If the name ends in tty1, tty2, etc., it's one of my Linux virtual consoles (Section 23.12). In that case, I want to add the console name (tty1, etc.) to my prompt so I store the name in the xpi (extra prompt info) shell variable. This variable's value if it's been set is expanded when the prompt is printed. The second part sets the prompt variable PS1. The whole prompt looks like this:
jpeek@kludge:tty1 ~/pt/art 15:38:30 inbox pt 501%
The first line shows my username, hostname, the virtual console name (if any), and the current directory (in this example, there was nothing else on the directory stack (Section 31.7)). The second line has the time and my email folder stack, from the MH folder -list command, which is the only nonbuilt-in command used in the prompt. And here's a subtle point that's worth perusing. The whole prompt string is inside double quotes (Section 27.12) so that variable and command substitution will happen whenever setprompt is run. But, the way my prompt is set, the MH folder stack may change between the times that setprompt resets the prompt. So I escape the $ in \$(folder -list). This stores the command substitution without executing folder! So, when every prompt is about to be printed, the shell will evaulate the prompt string and expand the $(...) operators into the current folder stack. The third line sets the end of the prompt string: the zsh prompt substitution at %m, %*, %! and %#.
On a slow machine, I'd try hard to find a way to eliminate the external folder -list command. But my Linux box is fast enough so that I don't notice any delay before a prompt. To make this work, I needed a good understanding of what's evaluated when. It's this sort of subtlety that makes prompt setting a challenge and a pleasure, too, when you get it working just right.
As another example, Section 4.14 shows more about using dirs in a shell prompt.
JP and SJC
Lots of people like lots of information in their prompts: hostname, directory name, history number, and maybe username. Lots of people have spent lots of time trying to make their prompts short enough to fit across the screen and still leave room for typing a command longer than ls:
<elaineq@applefarm> [/usr/elaineq/projects/april/week4] 23 % ls
Even with fairly short prompts, if you look back at a screen after running a few commands, telling the data from the prompts can be a little tough (real terminals don't show user input in boldface, so I won't do it here either):
+<elaineq@applefarm> [~] 56% cd beta <elaineq@applefarm> [~/beta] 57% which prog /usr/tst/applefarm/bin/beta/prog <elaineq@applefarm> [~/beta] 58% prog 61,102 units inventoried; 3142 to do <elaineq@applefarm> [~/beta] 59%
Go to http://examples.oreilly.com/upt3 for more information on: mlprompt.cshmlprompt.sh
One nice answer is to make a prompt that has more than one line. Here's part of a .cshrc file that sets a three-line prompt: one blank line, one line with the hostname and current directory, and a third line with the history number and a percent sign. (If this were a tcsh, I could have gotten the hostname with %m.)  Section 35.9
set hostname=`uname -n` alias setprompt 'set prompt="\\ ${hostname}:${cwd}\\ \! % "' alias cd 'chdir \!* && setprompt' alias pushd 'pushd \!* && setprompt' alias popd 'popd \!* && setprompt' setprompt # to set the initial prompt
(There's a version on the Web for Bourne-type shells.) The prompts look like this:
applefarm:/usr/elaineq/projects/april/week4 23 % prog | tee /dev/tty | mail -s "prog results" bigboss@corpoffice 61,102 units inventoried; 3142 to do applefarm:/usr/elaineq/projects/april/week4 24 % cd ~/beta applefarm:/usr/elaineq/beta 25 % prog | mail joanne
The blank lines separate each command though you may want to save space by omitting them. For example, Mike Sierra of O'Reilly & Associates has used a row of asterisks:
***** 23 *** <mike@mymac> *** ~/calendar ***** % cd Sep* ***** 24 *** <mike@mymac> *** ~/calendar/September ***** %
Other shells have different syntax, but the idea is the same: embed newlines to get multiline prompts. In Bourne-type shells you'll need zero or one backslash before each newline; Section 27.12 explains. In bash, put a \n (which stands for a newline character) anywhere you want the prompt to break to a new line.
What I like best about multiline prompts is that you get a lot of information but have the whole screen width for typing. Of course, you can put different information in the prompt than I've shown here. The important idea is that if you want more information and need room to type, try a multiline prompt.
JP and SJC
Some people don't like to put the current directory, hostname, etc. into their prompts because it makes the screen look cluttered to them. Here's another idea. If your terminal or window system has a status line or titlebar, you might be able to put the information there.  The down side is that the information can get out of date if you use a command that takes you to another host or directory without updating the status line. The latest bash and zsh shells do this by default when you're using an xterm window. For the rest of you, here's how to do it yourself. Because neither csh or tcsh do this by default, I'll show C-shell-type syntax. But you can do the same thing in Bourne-type shells with a shell function and case (Section 35.10) statement; there's a ready-to-use version on the web site.
When you use cd, pushd, or popd, an alias uses the echo command to write special escape sequences to the terminal or window.
Here are cd aliases and other commands for your .cshrc or .tcshrc file. If I were logged in to www.jpeek.com in the directory /home/jpeek, this alias would put:
www:/home/jpeek
in the status area or window title, depending on which terminal type I'm using. Of course, you can change the format of the status line. Change the following command string, ${host:h}:${cwd}, to do what you need; see your shell's manual page for a list of variables, or create your own custom information.
:h Section 28.5, && Section 35.14
Go to http://examples.oreilly.com/upt3 for more information on: stattitle.cshstattitle.sh
set e=`echo x | tr x '\033'` # Make an ESCape character set g=`echo x | tr x '\07'` # And a Ctrl-g set host=`uname -n` # Puts $host and $cwd in VT102 status line. Escape sequences are: # ${e}7 = save cursor position, ${e}[25;1f = go to start of status # line (line 25), ${e}[0K = erase line, ${e}8 = restore cursor alias setstatline 'echo -n "${e}7${e}[25;1f${e}[0K ${host:h}:${cwd}${e}8"' alias settitle 'echo -n "${e}]2;${host:h}:${cwd}${g}"' switch ($TERM) case vt10?: alias cd 'cd \!* && setstatline' alias pushd 'pushd \!* && setstatline' alias popd 'popd \!* && setstatline' breaksw case xterm*: alias cd 'cd \!* && settitle' alias pushd 'pushd \!* && settitle' alias popd 'popd \!* && settitle' breaksw endsw
(Section 5.15 has more about how this works in xterms.)
The ESC and CTRL-g characters are stored with a trick that should work on all Unix shells. Most modern echos will let you make a nonprintable character directly, like this: g='echo '\07''.
If you always use a VT102-type terminal (and many people do), the setstatline alias will work fine. If you use a different terminal, try it anyway! Otherwise, read the terminal manual or its termcap/terminfo entry and find the escape sequences that work for it; then add a new case to the switch statement.
Note that you might have some trouble here: if this code is in your .cshrc file but your terminal type is set in your .login file, the terminal type may not be set until after the alias has been read. There are workarounds (Section 3.8).
The status line or titlebar can also get out of sync with reality if you use remote logins (Section 1.21), subshells (Section 24.4), etc. These might make a new status line or titlebar but not reset the original one when needed. To fix this, just type setstatline or settitle at a shell prompt. Or, if you don't want to bother to think of the name of the alias, use the following command to change to the current directory (.), which will use the correct alias and reset the status or title:
% cd .
If you're using tcsh, its special alias cwdcmd will be run every time you change the shell's current directory. So, in tcsh, you can replace the three aliases for cd, pushd, and popd with something like this:
alias cwdcmd settitle
JP and SJC
Some people don't want to be faced with a Unix % or $ shell prompt.  Here's a simple one-line Bourne-shell prompt for a .profile:
PS1='Type "rn", "mailx", "wp", or "logout": '
Next, a multiline prompt (Section 4.7) for the C shell .cshrc or .tcshrc file:
if ($?prompt) then set prompt='\\ Type "pine" to read the news,\\ type "mutt" to read and send mail,\\ type "wp" for word processing, or\\ type "logout" to log out.\\ YES, MASTER? ' endif
You get the idea.
JP and SJC
If your prompt has some information that you want to stand out or if you want your whole prompt to stand out from the rest of the text on the screen you might be able to make it in enhanced characters or colors. If your terminal has special escape sequences for enhancing the characters (and most do), you can use them to make part or all of your prompt stand out. Newer versions of xterm also have color capability, as does the Mac OS X Terminal program, though Terminal may not properly support the escape sequences we discuss later. (The GNU dircolors (Section 8.6) command sets up a color-capable terminal.)
Go to http://examples.oreilly.com/upt3 for more information on: blinkprompt.cshblinkprompt.sh
Let's say that you want to make sure people notice that they're logged in as root (the superuser) by making part of the root prompt flash. Here are lines for the root .cshrc:
# Put ESCape character in $e. Use to start blinking mode (${e}[5m) # and go back to normal mode (${e}[0m) on VT100-series terminals: set e="`echo x | tr x '\033'`"
uname -n Section 2.5
set prompt="${e}[5mroot${e}[0m@`uname -n`# "
That prompt might look like this, with the word root flashing:
<EMAIL_ADDRESS>|
The prompt is set inside double quotes ("), so the uname' -n command is run once, when the PS1 string is first stored. In some shells, like bash and pdksh, you can put single quotes (') around the PS1 string; this stores the backquotes (`) in the string, and the shell will interpret them before it prints each prompt. (In this case, that's useless because the output of uname -n will always be the same in a particular invocation of a shell. But if you want constantly updated information in your prompt, it's very handy.) Section 4.6 and Section 27.12 have more info.
Because the same escape sequences won't work on all terminals, it's probably a good idea to add an if test that only sets the prompt if the terminal type $TERM is in the Digital Equipment Corporation VT100 series (or one that emulates it). Table 4-1 shows a few escape sequences for VT100 and compatible terminals. (The ESC in each sequence stands for an ESCape character. )
|
Sequence |
What it does |
|---|---|
|
ESC[1m |
Bold, intensify foreground |
|
ESC[4m |
Underscore |
|
ESC[5m |
Blink |
|
ESC[7m |
Reverse video |
|
ESC[0m |
All attributes off |
Of course, you can use different escape sequences if your terminal needs them. Better, read your terminal's terminfo or termcap database with a program like tput or tcap to get the correct escape sequences for your terminal. Store the escape sequences in shell variables (Section 35.9).
bash interprets octal character codes (like \033) in the prompt. It also has special-backslashed special-prompt characters for instance, bash Version 2 has \e, which outputs an ESCape character, and \H, which gives the complete hostname. The string \$ is replaced by a dollar sign ($) on non-root shells and a hash mark (#) if you're currently root. So, on bash, you can make the previous csh prompt this way:
PS1='\[\e[5m\]root\[\e[0m\]@\H\$ '
(The delimiters for nonprinting characters, \[ and \], might make it look complicated. Try spotting them first, as you look at the prompt string, so you can see what's left.)
Eight-bit-clean versions of tcsh can put standout, boldface, and underline and any other terminal escape sequence, too into your shell prompt. For instance, %S starts standout mode and %s ends it; the tcsh manpage has details for your version. The next example shows how to make the same prompt as earlier with the word root in standout mode. (tcsh puts the hostname into %m.) Because tcsh "knows" the width of its special %S and %s formatting sequences, they don't need to be delimited with %{ or %}:
set prompt = '%Sroot%s@%m# '
You also can add color to your prompt! For instance, make the previous prompt for bash using bright red (1;31) on a blue background (44):
PS1='\[\e[1;31;44m\]root\[\e[0m\]@\H# '
JP and SJC
Both zsh and tcsh have an optional prompt at the right side of the screen. Unlike the normal left-side prompt, the cursor doesn't sit next to the right-side prompt (though the right prompt disappears if you type a long command line and the cursor passes over it). It's stored in the zsh RPROMPT variable and in tcsh rprompt.
What can you do with a right-hand prompt? Anything you want to! (You'll probably want to keep it fairly short, though.) Put the time of day on the right-hand side, for instance; on tcsh, it's this easy:
[jpeek@ruby ~]% set rprompt='%t' [jpeek@ruby ~]% users 3:44pm jpeek ollie [jpeek@ruby ~]% 3:45pm
As another idea, you could use sched to remind you of an important meeting by setting the right-hand prompt. Here's a shell function for zsh that sets the right prompt to "LEAVE NOW" at a particular time. You can give it one argument to set the time to remind you. Or, with no argument, it removes the right-hand prompt:
leave( ) { case "$#" in 0) unset RPROMPT ;; 1) sched "$1" "RPROMPT='LEAVE NOW'" ;; *) echo "Usage: leave [time]" 1>&2 ;; esac }
Here's an example:
jpeek$ date Fri May 12 15:48:49 MST 2000 jpeek$ leave 15:55 ...do some work... jpeek$ pwd /u/jpeek/pt jpeek$ date LEAVE NOW Fri May 12 15:55:22 MST 2000 jpeek$ lpr report LEAVE NOW jpeek$ leave LEAVE NOW jpeek$
JP and SJC
If you're like me, when you start a shell escape (Section 17.21) or any subshell (Section 24.4), you can forget that you aren't in your login shell. Your shell history (Section 30.1) might get confused, shell variables (Section 35.9) may not be set, and other problems may come up. zsh and bash have a built-in SHLVL environment variable (Section 35.3) that lets you track how many subshells deep your current shell is. tcsh has a shlvl shell variable that's automatically set from (and sets) SHLVL. So, all three shells cooperate with each other to set the right value, even if you start one shell from another. (For other shells that don't have SHLVL ksh and csh you can set up something similar with a bit of arithmetic in the ENV (Section 35.5) file or the .cshrc file, respectively.)
In your top-level shell, the value of $shlvl is 1 (one). In the first subshell, it's 2; in a sub-subshell, it's 3; and so on. You can use this to control your shell startup files for example, have some commands in your .cshrc that run when you first log in (and $shlvl is 1), but don't run in subshells. You can also put $shlvl in your prompt (but only during subshells, if you'd like as a reminder that you aren't in your top-level shell). You can set your prompt to mike% in top-level shells, (1) mike% in a first-level subshell, (2) mike% in a second-level subshell, and so on. Here's some sample prompt-setting code for your .tcshrc:
# If this is a subshell, put shell level in prompt: if ($shlvl == 1) then set prompt="${USER}% " else set prompt="($SHLVL) ${USER}% " endif
bash doesn't need an if because login shells read your .bash_profile (or .profile) and subshells read your .bashrc. Here are commands to set the prompts I mentioned earlier:
PS1='\u\$ ' ...for the .bash_profile PS1='($SHLVL) \u\$ ' ...for the .bashrc
Does your account run a windowing system that's started from your top-level shell startup file (like .login)? If it does, lines like the following examples (these are for .login) will reset SHLVL so that the shell in the window will start at a SHLVL of 1 and act like a top-level shell. This code assumes that your first login shell starts on a tty named /dev/tty1 through /dev/tty6 (which are the Linux virtual consoles (Section 23.12)) and that the windows that open won't have a tty with the same name (which is true on Linux). (If you aren't sure, check who (Section 2.8).) You may need to adapt this. The trick is to make SHLVL 0 (zero) before you start the windowing system. When the windows' shells start, they'll raise SHLVL to 1:
# If on a virtual console, bury this shell and start X right away: if ("`tty`" =~ /dev/tty[1-6]) then setenv SHLVL 0 startx endif
Getting this to work right in every situation (rsh (Section 1.21), ssh, su, shell escapes (Section 17.21) both interactive and noninteractive (Section 3.4) subshells, window systems, at jobs (Section 25.5), and so on) can be a challenge (Section 3.8)! It takes a little planning. Sit down and think about all the ways you start subshells which subshells are interactive and which aren't and whether they'll get SHLVL passed from their parent process. (If you aren't sure, test that with an env or printenv command (Section 35.3).) Then plan which kind of shell needs which SHLVL settings. If it gets too complicated, make it work in most cases! If you use many subshells, this system can be too handy to ignore.
JP and SJC
|
Some terminals I've used (like old Hewlett-Packard and Tektronix terminals) had local editing. You could move your cursor up the screen to a previous command line, maybe make some edits to it, then press a SEND LINE key to resend that line to the host. This didn't have anything to do with sophisticated command-line editing (Section 30.14) that modern Unix shells have, though. Maybe your terminal can do that, too. Depending on how your emacs editor is configured, shell-mode may work that way, as well.
The problem was that unless I erased the shell prompt (%) on my screen, it would be sent back to the shell and give the error "%: Command not found." So I set my shell prompt to this:
set prompt=' '
That's right: four spaces. Most Unix commands start their output at column 1, so my command lines were easy to find because they were indented. The shell didn't care if I sent four spaces before the command line. So everything was fine until I got my new terminal without a SEND LINE key . . .
If you want some information in your prompt, too, make a multiline prompt (Section 4.7) with four spaces in the last line.
JP and SJC
Many people use the current directory in their prompts. If you use the pushd and popd (Section 30.7) commands, you may not always remember exactly what's in your directory stack (I don't, at least). Here's how: run the dirs command, and use its output in your prompt. A simple csh and tcsh alias looks like this:
alias cd 'chdir \!* && set prompt="`dirs`% "'
and the prompts look like:
/work/project % cd ~ % cd bin ~/bin %
Here's what to put in .cshrc or .tcshrc to make a multiline prompt (Section 4.7) that shows the directory stack:
uname -n Section 2.5, expr Section 36.21
# PUT hostname.domain.name IN $hostname AND hostname IN $HOST: set hostname=`uname -n` setenv HOST `expr $hostname : '\([^.]*\).*'` alias setprompt 'set prompt="\\
Go to http://examples.oreilly.com/upt3 for more information on: dirs-prompt.cshdirs-prompt.sh
${USER}@${HOST} `dirs`\\ \! % "' alias cd 'chdir \!* && setprompt' alias pushd 'pushd \!* && setprompt' alias popd 'popd \!* && setprompt' setprompt # SET THE INITIAL PROMPT
Because bash can run a command each time it sets its prompt, and because it has built-in prompt operators (Section 4.3) like \u, the bash version of all the previous stuff fits on one line:
$(...) Section 28.14
PS1='\n\u@\h $(dirs)\n\! \$ '
That makes a blank line before each prompt; if you don't want that, join the first and second lines of the setprompt alias or remove the first \n. Let's push a couple of directories and watch the prompt:
jerry@ora ~ 1 % pushd /work/src/perl /work/src/perl ~ jerry@ora /work/src/perl ~ 2 % cd ../cnews jerry@ora /work/src/cnews ~ 3 % pushd ~/bin ~/bin /work/src/cnews ~ jerry@ora ~/bin /work/src/cnews ~ 4 %
Of course, the prompt looks a little redundant here because each pushd command also shows the dirs output. A few commands later, though, having your directory stack in the prompt will be handy. If your directory stack has a lot of entries, the first line of the prompt can get wider than the screen. In that case, store the dirs output in a shell array, and edit it with a command like sed or with the built-in csh string editing (Section 28.5).
For example, to show just the tail of each path in the dirs output, use the following alias; the C shell operator :gt globally edits all words, to the tail of each pathname:
Go to http://examples.oreilly.com/upt3 for more information on: dirstail-prompt.csh
alias setprompt 'set dirs=(`dirs`); set prompt="\\ ${USER}@${HOST} $dirs:gt\\ \! % "'
Watch the prompt. If you forget what the names in the prompt mean, just type dirs:
jerry@ora bin cnews jerry 5 % pushd ~/tmp/test ~/tmp/test ~/bin /work/src/cnews ~ ... jerry@ora test bin cnews jerry 12 % dirs ~/tmp/test ~/bin /work/src/cnews ~
JP and SJC
The Bourne shell's trap (Section 35.17) will run one or more commands when the shell gets a signal (Section 24.10) (usually, from the kill command). The shell will run any command, including commands that set shell variables. For instance, the shell could reread a configuration file; Section 24.13 shows that. Or it could set a new PS1 prompt variable that's updated any time an external command (like another shell script or a cron job (Section 25.2)) sends the shell a signal. There are lots of possibilities.
This trick takes over signal 5 (SIGTRAP), which usually isn't used. When the shell gets signal 5, a trap runs a command to get the date and time, then resets the prompt. A background (Section 23.2) job springs this trap once a minute. So, every minute, after you type any command, your prompt will change.
You can use any command's output in your prompt (possibly with some editing, probably with sed (Section 34.1) or expr (Section 36.21)): count the number of users, show the load average (Section 26.4), whatever. Newer shells, like bash, can run a command in backquotes (Section 28.14) each time the prompt is displayed Section 4.10 has an example. But, to have an external command update a shell variable at any random time, this trap trick is still the best.
Go to http://examples.oreilly.com/upt3 for more information on: date- prompt.sh
Now on to the specific example of putting date and time in the old Bourne shell's prompt. If your system's date command doesn't understand date formats (like +%a), get one that does. Put these lines in your .profile file (or just type them in at a Bourne shell prompt):
# Put date and time in prompt; update every 60 seconds: trap 'PS1=`date "+%a %D %H:%M%n"`\ $\ ' 5 while :
do sleep 60 kill -5 $$ done & promptpid=$!
Now, every minute after you type a command, your prompt will change:
Thu 06/20/02 02:33 $ cc bigprog.c undefined symbol first referenced in file xputc bigprog.o ld fatal: Symbol referencing errors. Thu 06/20/02 02:34 $ ls bigprog.c bigprog.o Thu 06/20/02 02:35 $
The prompt format is up to you. This example makes a two-line prompt (Section 3.7) with backslashes (\) to protect the newline and space from the trap; a single-line prompt might be easier to design. The manual page for date lists what you can put in the prompt.
This setup starts a while loop (Section 35.15) in the background. The promptpid variable holds the process ID number (Section 24.3) of the background shell.  You can type the command:
kill $promptpid
at a prompt or put it in a file that's executed when you log out (Section 4.18).
JP and SJC
bash, tcsh, and zsh can run a Unix command, or multiple commands, before printing each prompt. tcsh and zsh also can do something you specify before executing the command you've typed at a prompt. Finally, tcsh and zsh can do something periodically (every n seconds) before whatever prompt comes next. (Section 4.15 shows how to execute commands periodically in the original Bourne shell.) These commands don't have anything to do with setting the prompt itself, though they can. The command could do some system checking, reset shell variables, or almost anything that you could type at a shell prompt. If the commands run slowly, they'll delay whatever else you're doing, so keep that in mind.
Let's start with precmd, the tcsh alias that's run after your command line is read and before the command is executed. In zsh, the same thing is done by the shell function named preexec. Shell history is available, so you can use history substitution (Section 30.8) inside the alias or function. Here's a nice example adapted from the tcsh manual page: showing the command line you're running in your xterm window titlebar. It's ugly because it has ESC and CTRL-g characters embedded directly in the alias; I'd rather store the escape sequences in shell variables, as shown in the xterm titlebar article (Section 4.8). The if sets the alias only if you're using an xterm terminal:
# Show each command line in xterm title bar: if ($TERM == xterm) alias postcmd 'echo -n "^[ ]2;\!#^G"'
Next, let's look at running a command periodically. You'd like to watch the load average by running uptime (Section 26.4) every minute, before a prompt. Here's how to do it in zsh: put code like this in your .zshrc file (Section 3.3) (or just type it at a prompt to try it). The PERIOD shell variable is the interval, in seconds, between runs of the periodic function as shown in the following code:
# Run "uptime" every 60 seconds; put blank line before: periodic( ) {echo "\n==> $(uptime) <==";} PERIOD=60
Here's how it looks:
jpeek@ruby$ pwd /u/jpeek/pt ==> 5:16pm up 4:07, 6 users, load average: 0.22, 0.15, 0.08 <== jpeek@ruby$ lpr xrefs jpeek@ruby$ mail -s "xrefs list" jan < xrefs ==> 5:17pm up 4:08, 7 users, load average: 1.29, 0.55, 0.23 <== jpeek@ruby$
Finally, here's how to set preprompt commands. These are run before each shell prompt is printed. In tcsh, define a precmd alias. In zsh, define a precmd function. In bash, store the command(s) in the PROMPT_COMMAND shell variable. Let's look at bash this time. Here's a silly example that I used to have in my bash setup file (Section 3.3):
IFS Section 36.23, set Section 35.25, shift $# Section 36.10
PROMPT_COMMAND=' # Save old $IFS; set IFS to tab: OIFS="$IFS"; IFS=" " # Put x in $1, face in $2, explanation[s] in $3[, $4, ...]: set x `smiley` # Put face into $face and explanation(s) into $explan: face="$2"; shift 2; explan="$*" # Restore shell environment: shift $#; IFS="$OIFS"' # Prompt I use (includes the latest $face): PS1='\u@\h $face '
The first part is a series of shell commands that are stored in the PROMPT_COMMAND variable; they're surrounded by a pair of single quotes ('' '), one on the first line (after the =) and the other after IFS is reset. That series of commands is executed before every prompt. It sets two shell variables, $face and $explan, with new values before each prompt is set. The prompt is set on the last line; it includes the value of $face.
Here's what my screen looked like with this ridiculous setup. Notice that the prompt keeps changing as the PROMPT_COMMAND resets $face and $explan.
(It was even more useless than psychoanalyze-pinhead (Section 19.13), but it was fun while it lasted.) Seriously now, I'll say again: preprompt commands do not have to be used to set a prompt. You can use them to do anything. If the commands in PROMPT_COMMAND or any of the other functions or aliases we've covered write to standard output or standard error, you'll see that text on your screen, before or after the prompt, at the point where the commands are executed.
 If you use the C shell, make a file named .logout (Section 3.3) in your home directory and put the commands there. Before a login C shell exits, it will read that file. A login bash reads .bash_logout, and zsh reads .zlogout. But not all shells are login shells; you might want these shells to read your logout-type file, too. Section 3.18 shows a fix for the Bourne and Korn shells; Section 3.8 and Section 3.4 have background information.
Some ideas for your logout file are:
A command like fortune to give you something fun to think about when you log out.
A command to list a "reminder" file for example, work to take home.
A script that prompts you for the hours you've worked on projects so you can make a timesheet later.
The command clear to erase your screen. This keeps the next user from reading what you did.[2] In the Mac OS X Terminal application, command-k will delete the scrollback buffer. It also helps to stop "burn-in" damage to old, monochrome monitors caused by characters left over from your login session (though this is hardly a concern nowadays; most of us have moved on to color screens that are not subject to burn-in). (Some Unixes clear the screen before printing the login: prompt. Of course, this won't help users who connect with a data switch or port manager because the connection will be broken before the next login prompt.)
If you connect to this host over a network, with a slow modem or on a data switch and you don't see all the logout commands run before your connection closes try putting the command sleep 2 (Section 25.9) at the end of the file. That makes the shell wait two seconds before it exits, which gives output more time to get to your screen.
JP and SJC
Section 4.17 describes logout files. Commands in those files are run when you log out. The Bourne and Korn shells don't have a logout file, though. Here's how to make one:
In your .profile file, add the line:
trap Section 35.17, . Section 35.29
trap '. $HOME/.sh_logout; exit' 0
(Some systems may need $LOGDIR instead of $HOME.)
Make a file in your home directory named .sh_logout. Put in the commands you want to be run when you log out. For example:
ifSection 35.13, [ -f Section 35.26
clear if [ -f $HOME/todo.tomorrow ] then echo "=========== STUFF TO DO TOMORROW: ============" cat $HOME/todo.tomorrow fi
The trap will read the .sh_logout file when the shell exits.
JP and SJC
It's pretty easy to type one too many CTRL-d characters and log out of a Bourne shell without meaning to. The C shell has an ignoreeof shell variable that won't let you log out with CTRL-d. So do the Korn shell and bash; use set -o ignoreeof.
Here's a different sort of solution for the Bourne shell. When you end the shell, it asks if you're sure. If you don't answer yes, a new shell is started to replace your old one.
First, make a file like the C shell's .logout that will be read when your Bourne shell exits (Section 4.18). Save your tty (Section 2.7) name in an environment variable (Section 35.3), too you'll need it later:
trap Section 35.17
TTY=`tty`; export TTY trap '. $HOME/.sh_logout; exit' 0
(Your system may need $LOGDIR instead of $HOME.) Put the following lines in your new .sh_logout file:
exec < Section 36.15, case Section 35.11, exec Section 24.2, -sh Section 3.19
exec < $TTY echo "Do you really want to log out? \c" read ans case "$ans" in [Yy]*) ;; *) exec $HOME/bin/-sh ;; esac
The last line uses some trickery to start a new login shell (Section 3.19). The shell closes your tty (Section 36.15) before reading your .sh_logout file; the exec < $TTY reconnects the shell's standard input to your terminal.
Note that if your system is very slow, you may not get the reminder message for a couple of seconds consequently, you might forget that it's coming and walk away. That hasn't been a problem where I've tested this. If it is for you, though, replace the read ans with a program like grabchars that times out and gives a default answer after a while. There may be some Bourne shells that need other tricks and others that don't need these tricks but this should give you an idea of what to do.
JP and SJC
[1] I haven't seen prompts described this way before. I invented the terms static prompt and dynamic prompt to make them easier to talk about.
[2] Some terminals and windows have "scroll back" memory of previous screens. clear usually doesn't erase all of that. To set scrollback in xterm, use the -sb and -sl options. Most other terminal emulators have similar mechanisms to set the number of lines to keep in the scrollback buffer.
| CONTENTS |


What's new?
Thank you for upgrading. We are constantly working to improve this app and add new features.
Here are some new features that have been added in this release.
Features in release 2.2.0
Switching to HTTPS based protocols for secure communication
Performance and Stability improvements
Age appropriate ads
Support for Notification Channels
Features in release 2.0.1
Bug Fixes
Using latest version of Google Services
Features in release 1.7
Bug Fixes
Removed unnecessary permissions required by Google services old version
Features in release 1.5
Bug Fixes
Added splash screen
Features in release 1.0
This is the first release


public final class LogCatcher
extends java.lang.Object
Notes:
LogCatcher
instance. If you need to capture the output from all your processes, you will have to instantiate one LogCatcher instance per process and capture the logs separately.LogCatcher.OnLogLinesListener.onLogLine(String)
. If it's not there, it's not captured yet.| Modifier and Type | Class and Description |
|---|---|
static interface |
LogCatcher.OnLogLinesListener
receive log lines and updates on the capture state
|
| Constructor and Description |
|---|
LogCatcher()
Default constructor.
|
LogCatcher(boolean clear)
Constructor.
|
LogCatcher(boolean clear,
boolean self)
Constructor.
|
LogCatcher(boolean clear,
boolean self,
java.util.concurrent.Executor executor)
Constructor.
|
LogCatcher(boolean clear,
int processId,
java.util.concurrent.Executor executor)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Best effort log eraser.
|
static void |
clearLog()
Best effort log eraser.
|
void |
dump(LogCatcher.OnLogLinesListener listener)
Capture the current log lines.
|
void |
endCapture()
Stop capturing log output
|
void |
startCapture(LogCatcher.OnLogLinesListener listener)
Starts to capture the log lines until
endCapture() is called. |
public LogCatcher(boolean clear, int processId, java.util.concurrent.Executor executor)
clear
- specify true
to clear the log, or false
to leave the log untouched.processId
- Specify a process id on which to filter the log.executor
- An Executor
on which to execute background tasks on. If null
is provided, the default background executor is obtained via Executors.newSingleThreadExecutor()
public LogCatcher(boolean clear, boolean self, java.util.concurrent.Executor executor)
clear
- specify true
to clear the log, or false
to leave the log untouched.self
- specify true
to capture only the log lines from your own application, or false
to capture the entire log.executor
- An Executor
on which to execute background tasks onpublic LogCatcher(boolean clear, boolean self)
clear
- specify true
to clear the log, or false
to leave the log untouched.self
- specify true
to capture only the log lines from your own application, or false
to capture the entire log.public LogCatcher()
public LogCatcher(boolean clear)
clear
- specify true
to clear the log, or false
to leave the log untouched.public void dump(LogCatcher.OnLogLinesListener listener)
adb logcat -d
listener
- a listener to receive log lines on the same thread that is executing the capture (e.g. your provided executor. If you didn't provide one, this is a background thread).public void startCapture(LogCatcher.OnLogLinesListener listener)
endCapture()
is called.listener
- A listener to receive log lines as they are logged.public void endCapture()
public static void clearLog()
public void clear()


Software Development, Product, Traction - Home
A Framework of Getting Traction
Spread the Words via mailto:
Profile of an Entrepreneur
Simple Database Challenge
Memento Design Pattern Example
Software Engineer Interview Preparation
Java Collection Framework
Fill Out a 4xN Wall with 4x1 and 1x4 Bricks
Protect SSH Server from Brute Force Attack
Digital Ocean Experience


#Kogi/BayelsaDecide: INEC winds down Situation Room
by Adesola Ayo-AdereleChairman, Independent National Electoral Commission, Prof. Mahmood Yakubu, formally wound down the Situation Room at the Commission’s headquarters, after two days of intensive monitoring of the Kogi and Bayelsa governorship elections; and Kogi West Senatorial and Brass 1 state constituencies elections.
This was made known via the commission’s verified Twitter handle @inecnigeria on Sunday evening
Yakubu thanked national commissioners, the technical team, directors and other staff members for their dedication and overall efforts.


|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object uchicago.src.sim.network.NetUtilities
public class NetUtilities
Performs various common operations on passed networks and returns them, and/or returns a statistic on a passed network and returns the result. Please note that these may be fairly "naive" algorithm implementations, and no guarantees are made about the accuracy of the statistics. The intention is that these may be used for "on the fly" qualitative evaluation of a model, but real network statistics should be done with more serious software such as UCINET or Pajek.
ALL THE METHODS CAN BE CONSIDERED BETA AND SHOULD ONLY BE USED FOR "ON THE FLY" CALCULATIONS. ACTUAL NETWORK STATISTICS SHOULD BE DONE WITH DEDICATED NETWORK ANALYSIS SOFTWARE, SUCH AS PAJEK OR UCINET.
| Constructor Summary | |
|---|---|
NetUtilities()
No-Argument constructor for convenience / aliasing. |
| Method Summary | |
|---|---|
static double |
calcAvgPathLength(java.util.List nodes)
Returns a double equal to the average or "characteristic" path length of the graph. |
static double |
calcClustCoef(java.util.List nodes)
Calculates the clustering coefficient (avg. density of "ego networks") in graph. |
static double |
calcDensity(java.util.List nodes)
calculates density (ratio of arcs in network to maximum possible number of arcs) of passed network. |
static double |
calcDensity(java.util.List nodes,
boolean collapseMulti)
Calculates density of the network, but if collapseMulti is true, it first collapses any multiplex ties. |
static double |
calcDiameter(java.util.List nodes)
Returns a double equal to the graph-theoretic diameter of the passed network (the length of the longest shortest path). |
static double |
calcSymmetry(java.util.List nodes)
Returns a double indicating the amount of symmetry in the network: fraction of existing i -> j ties for which there is a j -> i tie. |
static int |
countIJTies(Node iNode,
Node jNode)
Returns the number of ties from i to j. |
static int |
getAllDegree(Node iNode)
Returns the number of arcs node is involved in. |
static cern.colt.matrix.impl.DenseDoubleMatrix2D |
getAllShortPathMatrix(java.util.List nodes)
Returns a DenseDoubleMatrix2D in which the i,j th entry gives the length of the shortest path between i and j. i and j indexes refer to the position of the node in the ArrayList parameter. |
static java.util.ArrayList |
getComponents(java.util.List nodes)
Returns an ArrayList of length equal to the number of components in the graph, each entry of which is an ArrayList of the nodes in that component. |
static double |
getIJShortPathLength(java.util.List nodes,
Node iNode,
Node jNode)
Returns a double with a value equal to the length of the shortest path between i and j. |
static int |
getIJTie(Node iNode,
Node jNode)
Returns 1 if a tie from i to j exists, 0 otherwise. |
static double |
getIJTieStrength(Node iNode,
Node jNode)
Returns double value from getStrength() if tie from i to j exists, returns 0.0 if none exists. |
static int |
getInDegree(Node iNode)
Returns the in degree (number of in edges) of the node. |
static int |
getNumDirectTriads(Node iNode,
Node jNode)
Finds and returns the number of "parents" (nodes with links TO both i and j) |
static int |
getOutDegree(Node iNode)
Returns the out degree (number of out edges) of the node. |
static java.lang.String |
getStatsString(java.util.List nodes)
Returns a string, each line of which consists of the name of a graph statistic and its value. |
static boolean |
hasSelfLoops(java.util.List nodes)
Returns a boolean indicating whether the network contains self-loops (links from i -> i) |
static boolean |
isMultiplexNet(java.util.List nodes)
Checks if there are any nodes i j for which there is more than one tie i -> j (almost all network statistics assume that the network is NOT multiplex) |
static java.util.List |
randomRewire(java.util.List nodes,
double rewireProb)
Returns a network of the same size and density as the passed network, but randomly "rewires" a fraction of the edges to randomly chosen target nodes. |
static java.util.List |
randomRewireSymmetric(java.util.List nodes,
double rewireProb)
Returns a network of the same size and density as the passed network, but randomly "rewires" a fraction of the edges to randomly chosen target nodes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NetUtilities()
| Method Detail |
|---|
public static double calcClustCoef(java.util.List nodes)
nodes
- the network for which the ClustCoef will be calculatedpublic static double calcDensity(java.util.List nodes)
public static double calcDensity(java.util.List nodes, boolean collapseMulti)
nodes
- the ArrayList of nodes to examinepublic static boolean isMultiplexNet(java.util.List nodes)
public static boolean hasSelfLoops(java.util.List nodes)
nodes
- the ArrayList of nodes to examine for loopspublic static int getIJTie(Node iNode, Node jNode)
iNode
- the node the tie is fromjNode
- the node the tie is topublic static double getIJTieStrength(Node iNode, Node jNode)
iNode
- the node the tie is fromjNode
- the node the tie is topublic static int countIJTies(Node iNode, Node jNode)
iNode
- the node ties are fromjNode
- the node ties are topublic static int getOutDegree(Node iNode)
iNode
- the node the degree will be returned forpublic static int getInDegree(Node iNode)
iNode
- the node the degree will be returned forpublic static int getAllDegree(Node iNode)
iNode
- the node the degree will be returned forpublic static int getNumDirectTriads(Node iNode, Node jNode)
iNode
- one node of triadjNode
- the second node of the triadpublic static double getIJShortPathLength(java.util.List nodes, Node iNode, Node jNode)
nodes
- the complete network of nodesiNode
- the originating node for the pathjNode
- the destination node for the pathpublic static cern.colt.matrix.impl.DenseDoubleMatrix2D getAllShortPathMatrix(java.util.List nodes)
nodes
- the network which the matrix will be returned forpublic static double calcDiameter(java.util.List nodes)
nodes
- the network for which the diameter will be calculatedpublic static double calcAvgPathLength(java.util.List nodes)
nodes
- the network to evaluatepublic static double calcSymmetry(java.util.List nodes)
nodes
- the network to evaluate for symmetrypublic static java.util.ArrayList getComponents(java.util.List nodes)
nodes
- the network in which components will be countedpublic static java.util.List randomRewire(java.util.List nodes, double rewireProb)
rewireProb
- the fraction of edges to rewirepublic static java.util.List randomRewireSymmetric(java.util.List nodes, double rewireProb)
rewireProb
- the fraction of edges to rewirepublic static java.lang.String getStatsString(java.util.List nodes)
nodes
- the network for which the statistics will be calculated
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


| AdminBookmarkedPage | ||
| deleteAllVisibleCookies | ||
| open | /vivo/ | |
| click | link=People | |
| pause | 5000 | |
| assertTitle | People | |
| verifyElementPresent | link=Faculty Member (1) | |
| verifyElementPresent | link=Librarian (1) | |
| verifyElementPresent | link=Person (2) | |
| verifyTextPresent | Find By | |
| verifyElementPresent | link=Subject Area | |
| verifyElementPresent | link=Department | |
| verifyElementPresent | link=Courses | |
| click | link=Faculty Member (1) | |
| pause | 5000 | |
| verifyElementPresent | link=Jane Faculty | |
| verifyTextPresent | Assistant Professor | |
| click | link=F | |
| pause | 5000 | |
| verifyElementPresent | link=Jane Faculty | |
| verifyTextPresent | Assistant Professor | |
| click | link=All | |
| pause | 5000 | |
| verifyElementPresent | link=Jane Faculty | |
| verifyTextPresent | Assistant Professor | |
| click | link=Librarian (1) | |
| pause | 5000 | |
| verifyElementPresent | link=Lily Librarian | |
| verifyTextPresent | Assistant Librarian | |
| click | link=L | |
| pause | 5000 | |
| verifyElementPresent | link=Lily Librarian | |
| verifyTextPresent | Assistant Librarian | |
| click | link=All | |
| pause | 5000 | |
| verifyElementPresent | link=Lily Librarian | |
| verifyTextPresent | Assistant Librarian | |
| click | link=Person (2) | |
| pause | 5000 | |
| verifyElementPresent | link=Jane Faculty | |
| verifyTextPresent | Assistant Professor | |
| verifyElementPresent | link=Lily Librarian | |
| verifyTextPresent | Assistant Librarian | |
| click | link=F | |
| pause | 5000 | |
| verifyElementPresent | link=Jane Faculty | |
| verifyTextPresent | Assistant Professor | |
| verifyElementNotPresent | link=Lily Librarian | |
| verifyTextNotPresent | Assistant Librarian | |
| click | link=L | |
| pause | 5000 | |
| verifyElementPresent | link=Lily Librarian | |
| verifyTextPresent | Assistant Librarian | |
| verifyElementNotPresent | link=Jane Faculty | |
| verifyTextNotPresent | Assistant Professor | |
| click | link=All | |
| pause | 5000 | |
| verifyElementPresent | link=Jane Faculty | |
| verifyTextPresent | Assistant Professor | |
| verifyElementPresent | link=Lily Librarian | |
| verifyTextPresent | Assistant Librarian | |
| clickAndWait | link=Home | |
| assertTitle | VIVO |


Support for blacklisting signed jar files has been added to 6u14. A blacklist is a
list of signed jars that contain serious security vulnerabilities that can be
exploited by untrusted applets or applications. A system-wide blacklist will be
distributed with each JRE release. Java Plugin and Web Start will consult this
blacklist and refuse to load any class or resource contained in a jar file that's
on the blacklist. By default, blacklist checking is enabled. The
deployment.security.blacklist.check
deployment configuration property
can be used to toggle this behavior. The blacklist is updated using the property
deployment.blacklist.url which defaults to https://javadl-esd-secure.oracle.com/update/blacklist.
The blacklist entries are the union of the blacklist files pointed to by the
deployment.system.security.blacklist
and
deployment.user.security.blacklist
properties. By default,
deployment.system.security.blacklist
points to the
blacklist
file in the jre/lib/security
directory,
and deployment.user.security.blacklist
points to a blacklist file
that contains additional entries added by a user.
The blacklist is a text file with the following format:
attribute : value
Each jar file on the blacklist is identified by the
x-Digest-Manifest
attribute where
x
is the name of the
MessageDigest
algorithm, and the value is the base64 encoded
hash value of the Manifest. Comments are denoted by lines starting with
the # (number) symbol.
Here is an example:
# Buggy Utilities, version 1.0 SHA1-Digest-Manifest : QONXbQg+EtNOguIOAgpUUOadhv8= # Malware Inc., version 99.99 SHA-256-Digest-Manifest : SewaudBCZ3iXt1KX0BeFHpQiiM1xYLtvLw3Ow2RJfcs=


The Rename refactoring can be used to rename all names defined in a Scala program. This includes for example: methods, classes, objects, local variables, method parameters, type parameters. To perform the refactoring, the name has to be selected -- placing the cursor on the name also suffices -- and then the refactoring can be invoked.
If the name that is renamed is only accessible in the source file -- for example, a local variable, or a method inside another method -- then the refactoring is invoked in the inline mode, which links all occurrences in the source file and changes them as you type:
If the name is accessible from other source files, the renaming is done in the wizard and the changes can be previewed:
When the new name is entered in the wizard, it is checked if the name is valid and not already in use.
When renaming a top-level type in a file where the source file has the same name as the type, the file is currently not renamed.
Scala 2.8 introduced named parameters, but because of how they are represented internally, they are not being renamed at the moment, leading to compile errors.


new Meld(hand)
Parameters:
| Name |
Type |
Description |
hand |
Array
|
20 Integers between 1 and 80 |
- Source:
Methods
calculateMeld()
Runs all the meld calculations
- Source:
recordArounds(meldObj, hand)
Parameters:
| Name |
Type |
Description |
meldObj |
Object
|
Destination |
hand |
Array
|
20 Integers between 1 and 80 |
- Source:
recordPinochles(jacks, queens, pinochles)
Records the points for pinochles
Parameters:
| Name |
Type |
Description |
jacks |
Array
|
|
queens |
Array
|
|
pinochles |
Object
|
|
- Source:
recordRunsAndMarriages(jacks, queens, kings, tens, aces, runs, marriages, roundRobin)
Records the meld and and sorts cards for runs marriages and round robins
Parameters:
| Name |
Type |
Description |
jacks |
Array
|
integers representing jacks |
queens |
Array
|
integers representing queens |
kings |
Array
|
integers representing kings |
tens |
Array
|
integers representing tens |
aces |
Array
|
integers representing aces |
runs |
Object
|
|
marriages |
Object
|
|
roundRobin |
Object
|
|
- Source:
runAndMarriagesBySuite(jacks, queens, kings, tens, aces, runBasePoints, marriageBasePoints) → {Object}
Performs the recording of meld for runs and marriages
Parameters:
| Name |
Type |
Description |
jacks |
Array
|
integers representing jacks |
queens |
Array
|
integers representing queens |
kings |
Array
|
integers representing kings |
tens |
Array
|
integers representing tens |
aces |
Array
|
integers representing aces |
runBasePoints |
int
|
|
marriageBasePoints |
int
|
|
- Source:
Returns:
-
Type
-
Object


{:navgoco} is a simple JQuery plugin which turns a nested unordered
list of links into a beautiful vertical multi-level slide navigation,
with ability to preserve expanded submenus between sessions by using
cookies and optionally act as an accordion menu.


Dean Rather Software Developer, Beard Enthusiast. git.io/deanrather twitter.com/deanrather 500px.com/deanrather fb.com/deanrather deanrather.com/cv deanrather.com/blog au.linkedin.com/in/deanrather


Up: Logic of the Design
Next: Examples
Previous: Logic of the Design
There is a clear requirement for the user code to be able to control
the profiler dynamically at run time. This is normally used for (at
least) the purposes of
- Enabling and disabling profiling depending on the state of the
calculation.
- Flushing trace buffers at non-critical points in the calculation
- Adding user events to a trace file.
These requirements are met by use of the MPI_PCONTROL.
| MPI_PCONTROL(level, ...) |
| IN level | Profiling level |
int MPI_Pcontrol(const int level, ...)
MPI_PCONTROL(LEVEL)
INTEGER LEVEL, ...
void MPI::Pcontrol(const int level, ...)
MPI libraries themselves make no use of this routine, and simply
return immediately to the user code. However the presence of calls to
this routine allows a profiling package to be explicitly called by the
user.
Since MPI has no control of the implementation of the profiling code,
we are unable to specify precisely the semantics
that
will be
provided by calls to MPI_PCONTROL. This vagueness extends to the
number of arguments to the function, and their datatypes.
However to provide some level of portability of user codes to different
profiling libraries, we request the following meanings for certain
values of level.
- level==0
Profiling is disabled.
- level==1
Profiling is enabled at a normal default level of detail.
- level==2
Profile buffers are flushed. (This may be a no-op in some profilers).
- All other values of level
have profile library defined effects and additional arguments.
We also request that the default state after MPI_INIT has been
called is for profiling to be enabled at the normal default level.
(i.e. as if MPI_PCONTROL had just been called with the
argument 1). This allows users to link with a profiling library and
obtain profile output without having to modify their source code at
all.
The provision of MPI_PCONTROL as a no-op in the standard MPI
library allows them to modify their source code to obtain more
detailed profiling information, but still be able to link exactly the
same code against the standard MPI library.
Up: Logic of the Design
Next: Examples
Previous: Logic of the Design
Return to MPI-2.1 Standard Index
Return to MPI Forum Home Page
MPI-2.0 of July 1, 2008
HTML Generated on July 6, 2008


|
cds
2.3.1
|
Dynamically allocated uninitialized buffer. More...
#include <cds/opt/buffer.h>
Data Structures | |
| struct | rebind |
| Rebind buffer for other template parameters. More... | |
Public Types | |
| typedef T | value_type |
| Value type. | |
| typedef Alloc | allocator |
| Allocator type;. | |
Public Member Functions | |
| uninitialized_dynamic_buffer (size_t nCapacity) | |
Allocates dynamic buffer of given nCapacity . More... | |
| ~uninitialized_dynamic_buffer () | |
| Destroys dynamically allocated buffer. | |
| uninitialized_dynamic_buffer (const uninitialized_dynamic_buffer &)=delete | |
| uninitialized_dynamic_buffer & | operator= (const uninitialized_dynamic_buffer &)=delete |
| value_type & | operator[] (size_t i) |
Get item i . | |
| const value_type & | operator[] (size_t i) const |
Get item i , const version. | |
| size_t | capacity () const noexcept() |
| Returns buffer capacity. | |
| void | zeroize () |
| Zeroize the buffer. | |
| value_type * | buffer () noexcept() |
| Returns pointer to buffer array. | |
| value_type * | buffer () const noexcept() |
| Returns pointer to buffer array. | |
| size_t | mod (size_t idx) |
Returns idx % capacity() More... | |
Static Public Attributes | |
| static constexpr const bool | c_bExp2 = Exp2 |
Exp2 flag | |
Dynamically allocated uninitialized buffer.
One of available type for opt::buffer
option.
This buffer maintains dynamically allocated array of uninitialized elements. You should manually construct each element when needed. Allocation is performed at construction time.
T
- item type storing in the bufferAlloc
- an allocator used for allocating internal buffer (std::allocator
interface)Exp2
- a boolean flag. If it is true
the buffer capacity must be power of two. Otherwise it can be any positive number. Usually, it is required that the buffer has size of a power of two.
|
inline |
Allocates dynamic buffer of given nCapacity
.
If Exp2
class template parameter is true
then actual capacity of allocating buffer is nearest upper to nCapacity
power of two.
|
inline |
Returns idx % capacity()
If the buffer size is a power of two, binary arithmethics is used instead of modulo arithmetics


pybilt.diffusion package¶
Submodules¶
pybilt.diffusion.diffusion_coefficients module¶
Estimate self diffusion coefficients from MSD(t) data.
This module provides a set of functions to estimate self diffusion coefficients from mean squared displacement (MSD) time trajectories.
-
pybilt.diffusion.diffusion_coefficients.
diffusion_coefficient_Einstein
(times, msd_vals, dim=2, time_range=None)[source]¶ Estimate diffusion coefficient from MSD(t) via Einstein relation.
A function to estimate the diffusion constant from a mean squared displacement time series. This function uses the long time mean squared displacement approximation (Einstein relation):
MSD = lim_(t->inf) <||r_i(t) - r_i(0)||**2>_(nsels) = 2*dim*D*twhere D is the diffusion coefficient.
Parameters: - times (numpy.array) – Array of the simulation times of each MSD point.
- msd_vals (numpy.array) – Array of the MSD values.
- dim (Optional[int]) – Set the dimension of the data and fit function: 1 for 1-dimensional , 2 for 2-dimensional, or 3 for 3-dimensional. Defaults to 2.
- time_range (Optional[list]) – Specify a time range via a list with format [time_start, time_end]; the range should be given in the same units as the time data in the Arg times. Defaults to None, which uses the whole time range in Args times.
Returns: The value of the diffusion coefficient.
Return type: float
References
- Preston B. Moore, Carlos F. Lopez, Michael L. Klein, Dynamical
- Properties of a Hydrated Lipid Bilayer from a Multinanosecond Molecular Dynamics Simulation, Biophysical Journal, Volume 81, Issue 5, 2001, Pages 2484-2494, ISSN 0006-3495, http://dx.doi.org/10.1016/S0006-3495(01)75894-8. (http://www.sciencedirect.com/science/article/pii/S0006349501758948)
-
pybilt.diffusion.diffusion_coefficients.
diffusion_coefficient_anomalous_fit
(times, msd_vals, dim=2, time_range=None)[source]¶ Fit MSD time series data to an anomalous diffusion model.
- The anomalous diffusion function has the form:
- MSD(t) = 2 * dim * D_alpha * t**alpha
For alpha values 0 < alpha < 1 corresponds to subdiffusion, while 1 < alpha < 2 corresponds to superdiffusion.
Parameters: - times (numpy.array) – Array of the simulation times of each MSD point.
- msd_vals (numpy.array) – Array of the MSD values.
- dim (Optional[int]) – Set the dimension of the data and fit function: 1 for 1-dimensional , 2 for 2-dimensional, or 3 for 3-dimensional. Defaults to 2.
- time_range (Optional[list]) – Specify a time range via a list with format [time_start, time_end]; the range should be given in the same units as the time data in the Arg times. Defaults to None, which uses the whole time range in Args times.
Returns: The return is a tuple with values (D_alpha, alpha) where D_alpha is the anomalous diffusion coefficent and alpha is the anomalous diffusion power.
Return type: tuple
References
- Gerald R. Kneller, Krzysztof Baczynski, and Marta
- Pasenkiewicz-Gierula, Consistent picture of lateral subdiffusion in lipid bilayers: Molecular dynamics simulation and exact results, The Journal of Chemical Physics 135, 141105 (2011); doi: http://dx.doi.org/10.1063/1.3651800
-
pybilt.diffusion.diffusion_coefficients.
diffusion_coefficient_linear_fit
(times, msd_vals, dim=2, time_range=None)[source]¶ Estimate the diffusion coefficent via linear least squares fit of MSD(t) data.
- Assumes the MSD data has the linear form,
- MSD(t) = 2*dim*D*t ,
and uses a linear least squares fit to estimate the diffusion coefficent D.
Parameters: - times (numpy.array) – Array of the simulation times of each MSD point.
- msd_vals (numpy.array) – Array of the MSD values.
- dim (Optional[int]) – Set the dimension of the data and fit function: 1 for 1-dimensional , 2 for 2-dimensional, or 3 for 3-dimensional. Defaults to 2.
- time_range (Optional[list]) – Specify a time range via a list with format [time_start, time_end]; the range should be given in the same units as the time data in the Arg times. Defaults to None, which uses the whole time range in Args times.
Returns: Returns a tuple with format (D, Error_D), where D is the estimated diffusion coefficent and Error_D is the estimated error for D.
Return type: tuple
References
- Preston B. Moore, Carlos F. Lopez, Michael L. Klein, Dynamical
- Properties of a Hydrated Lipid Bilayer from a Multinanosecond Molecular Dynamics Simulation, Biophysical Journal, Volume 81, Issue 5, 2001, Pages 2484-2494, ISSN 0006-3495; http://dx.doi.org/10.1016/S0006-3495(01)75894-8 (http://www.sciencedirect.com/science/article/pii/S0006349501758948)


Bug summary:
"Add previous comment" crashes app if previous comments exist.
Observed Behavior (a description of what happened with the app):
On the main screen, if a comment has been made on any weight entry, after long pressing on a weight entry and selecting "Add previous comment," the app crashes.
Expected Behavior (a description of what you expected to happen):
An interface should have opened to add to previous comments to the selected entry.
Steps to Reproduce (the steps to reproduce the problem):
1. Open the app.
2. Specify a weight in the Weight field and press "Set Current Weight in kg" to create an entry.
3. Click on the entry to open the "Edit Weight" menu and type something in the Comment field. Close the "Edit Weight" menu.
4. Long press on an entry, then select "Add previous comment." The app crashes.
Additional information:
The nature of what "Add previous comment" should do is unclear: I am unsure of exactly what the expected behavior should be. When the option is selected before any comments have been added to any entries, an interface appears but states that there are no comments yet. I presume that this means that the option is meant to allow users to copy the text of comments made on previous entries to new ones, but I am unsure of this.
Attachments:


System Architect Symbol details for "Subject Responsibility"
Activity Type (Class)
- Description:
"Descriptive Category" capable of being used as a category for "Activities".
classifier (Association)
- From Class:
"Activity Type"
- To Class:
"Subject Responsibility"
- From Class:
"Activity Type"
- To Class:
"Subject Responsibility"
creator (Association)
- From Class:
"Subject Responsibility Act"
- To Class:
"Subject Responsibility"
- From Class:
"Subject Responsibility Act"
- To Class:
"Subject Responsibility"
Subject Responsibility (Class)
- Description:
Responsibility of an "Agent" to provide an "Activity Type" for a "Subject".
- Comment:
The Subject is inherited from the Subject Responsibility Act.
Subject Responsibility Act (Class)
- Description:
An "Activity for Subject" that establishes the responsibility that an "Agent" has for some "Subject"
to perform some "Activity Type" or for when some "Activity Type" is being performed.
- Comment:
-
Examples:
The responsibility that a GP has for a patient to perform 'general medical duties'.
The responsibility of a 'named nurse' to a patient to be the central reference point within a
hospital.


In what must be one of the most potentially exciting developments for independent machinima creators in a long time, we’ve just heard that Winch Gate Properties Ltd., the creators of the online MMORPG Ryzom, will be releasing the entire game as an open-source project. It sounds like the developers are keen to work with the community, and will be accepting the best 3rd-party developments into the main Ryzom codebase. Projects already underway include ports of the game to both Mac OSX and Linux.
This is fabulous news for machinima and anymation. An open-source licence like this gives the double benefit of a game that’s easy to modify (because the entire source code can be studied and adapted) and a game without the usual copyright restrictions on use.
The code for both the game client and server, as well as several content creation tools, will be released under the GNU Affero GPL licence. The assets (textures, sounds, etc) will be under a Creative Commons Attribution Share-Alike licence.
I’ll have to be honest now and say that I wasn’t familiar with Ryzom before this announcement, but I’ll definitely be taking a look now! Open-sourcing a game like this is an incredibly bold move, which deserves the highest praise. It’s crucial that we take advantage of the opportunity, and use this resource to create things which Winch Gate could never have imagined. In doing so, we validate their decision to release the code, we provide exciting tools and assets for the rest of the community to use, and we’ll have yet another tool in our anymation library. Although Ryzom is not the most graphically sophisticated game on the market, the flexibility of an open-source codebase more than make up for that. So, here’s a challenge to the community: go make something cool.


{% extends "layout.html" %} {% block page_title %} GOV.UK prototype kit {% endblock %} {% block content %} My Worklist There are currently no cases in your worklist Obtain {% endblock %}
There are currently no cases in your worklist
Obtain


Frequently Asked Questions
- Does it cost anything to use Kitchen World?
No. Anyone may access unlimited recipes, collections and videos on the website. To save or rate recipes, you will need to register an account on kitchenworld.com
Please note that articles in the Food section that are not part of New York Times Cooking will count toward your monthly limit.
-
Do I need to log in to my kitchenworld.com account to use the app or website?
No. You can browse the website without logging in. However, you will need to log in to rate recipes or save them to your recipe box.
How do I download the Cooking app?
- Are there Android, Blackberry or Kindle apps for Cooking?
The Cooking app is currently under construction and will be available sooner. However, the website may be accessed through any smartphone or tablet.
Home |
About us |
Contact us
New Updates |
Support |
FAQ
Products |
Order


Flute
This is a standard silver coated flute. Other colors such as gold, green, and red are also available for the festive season.
- Price: 290,000฿
Harp
This is a wooden, 36-string celtic harp. It's tone is brighter than a standard harp and is slightly smaller in size.
- Price: 7,000,000฿
Piano
The grand piano we sell is large in size and is perfect for public concerts. It is made of fine materials and needs to be handled with extra care.
- price: 300,000฿
Saxophone
This is a standard alto saxophone. There are two colors available: gold and silver. For every purchase, you get one pack of mouth piece for free!
- Price: 10,000฿
Violin
Our violin has a unique, mellow sound. For every purchase, you get one piece of rosin, and a shoulder rest for free! White violins are also available.
- price: 18,000฿


I'm Maksad Donayorov - a graduate student of software engineering at American University of Central Asia.
Currently, I work as a full-stack developer at Fast Monkeys, Helsinki, Finland.
I am a very simple card. I am good at containing small bits of information.


Git/GitHub Workshop
A session on Introducing Git and GitHub as a Version Control System for better code management among organizations and individuals
Read More
Producing 2D images of a 3D world is inherently a lossy process, i.e. the entire geometric richness of 3D gets projected onto a single flat 2D image. We aim to create an API in Python which primarily reconstructs 3D volumes from 2D X-Ray Images.
We see this project as the first step towards a diagnostic tool in conditions where either no CT equipment or the education to interpret x-ray imagery is available, such as for mobile x-ray devices, lay users, or medical diagnostics in developing countries. The project is primarily divided into 2 parts:
Implementation of various CNN architectures for 3D reconstruction from 2D images(3 people would be working on this part)
Development of API(back-end framework for the above task).1 mentee would be working on this part.
Part 1 has some hard pre-requisites while anyone who has an interest in python or has done some basic programming in python or java-script can apply for part 2.
Pre-requisites for part 1: Must be familiar with any one of the following deep learning frameworks: Pytorch/Tensorflow/Theano/Keras. A basic idea of neural networks and machine learning is required. Previous experience in image processing is desired although is not a hard pre-requisite.
Interested people in this part should go through the following paper while applying.
Note: If you are new to deep learning, it is recommended that you should go through the first 5 chapters of the book before applying.
| Week | Work |
|---|---|
| Week 1 and 2 | Reading of related material and learning relevant applications of the framework that would be used(mostly Keras and PyTorch) |
| Week 3 | Testing and implementing Simple CNN architectures |
| Week 4 and 5 | Working on Designing and implementation of 3D reconstruction from multiple images along with data pre-processing |
| Week 6 and 7 | Programming and testing of various models for 3D reconstruction from single 2D image |
| Week 8 | Further improvements on the models that have been created above. |
A session on Introducing Git and GitHub as a Version Control System for better code management among organizations and individuals
Read MoreKalpesh Krishna, ex-WnCC Manager gives a talk on CS opportunities for Non-CS students, and how one can get into Computer Science Research from a different field
Read MoreDuring the COVID-19 Pandemic, some professors and students of IIT Bombay were working on novel ways to tackle the problems due to the pandemic. Prof. Manoj Gopalakrishnan gives a talk on his project
Read More


Simple template
My default text
Let's have some different text!
Let's have some different text!
In a list!


wiki / software / openssh Edit this page
Edited (8a55f77) at 2021-07-02 by Dilyn Corner
OPENSSH [0]
________________________________________________________________________________
OpenSSH (also known as OpenBSD Secure Shell) is a suite of secure networking
utilities based on the Secure Shell (SSH) protocol, which provides a secure
channel over an unsecured network in a client-server architecture.
Remote Server Configuration
________________________________________________________________________________
Begin by first verifying that you have openssh installed on the remote server:
+------------------------------------------------------------------------------+
| |
| $ kiss b openssh && kiss i openssh |
| |
+------------------------------------------------------------------------------+
Using busybox's runsv, create a new managed service for the ssh daemon:
+------------------------------------------------------------------------------+
| |
| $ ln -s /etc/sv/sshd /var/service |
| |
+------------------------------------------------------------------------------+
At this point, you can either restart the remote server or manually start the
SSH daemon:
+------------------------------------------------------------------------------+
| |
| $ sv up sshd |
| |
+------------------------------------------------------------------------------+
Client Authentication
________________________________________________________________________________
From an SSH client, use the following command to connect to the remote SSH
server:
+------------------------------------------------------------------------------+
| |
| $ ssh USERNAME@SERVER |
| |
+------------------------------------------------------------------------------+
Replace USERNAME with the name of a regular user and SERVER with the hostname or
IP address of the SSH remote server. Upon pressing return, you will also be
prompted to enter the password of the regular user specified.
Passwordless Authentication (Optional)
________________________________________________________________________________
Passwordless login to a remove server can be achieved by creating a key pair.
From the SSH client, use the following command to generate the key:
+------------------------------------------------------------------------------+
| |
| $ ssh-keygen -t rsa |
| |
+------------------------------------------------------------------------------+
Copy the id_rsa.pub file generated from the previous step into the remote
server's ~/.ssh/authorized_keys with the following command:
+------------------------------------------------------------------------------+
| |
| $ ssh-copy-id USERNAME@SERVER |
| |
+------------------------------------------------------------------------------+
Replace USERNAME with the name of a regular user and SERVER with the hostname or
IP address of the SSH remote server. Upon pressing return, you will also be
prompted to enter the password of the regular user specified.
Verify that the key was copied to the remote server and passwordless login works
by entering the following command from the previous section:
+------------------------------------------------------------------------------+
| |
| $ ssh USERNAME@SERVER |
| |
+------------------------------------------------------------------------------+
Once passwordless login has been verified, disable password authentication on
the remote server:
+------------------------------------------------------------------------------+
| |
| $ echo "PasswordAuthentication no" >> /etc/ssh/sshd_config |
| |
+------------------------------------------------------------------------------+
Tips and Tricks
________________________________________________________________________________
* When connecting to an SSH server, there are three different levels of debug
modes that can help with troubleshooting issues. Use the "-v" switch when
connecting to print the debugging messages:
+------------------------------------------------------------------------------+
| |
| $ ssh USERNAME@SERVER -v |
| $ ssh USERNAME@SERVER -vv |
| $ ssh USERNAME@SERVER -vvv |
| |
+------------------------------------------------------------------------------+
* If you are looking to forward GUI-based applications through an SSH tunnel,
refer to the #/wiki/xorg/x11-forwarding article.
troubleshooting
________________________________________________________________________________
* you can fix errors such as this one
+------------------------------------------------------------------------------+
| |
| top error: Error opening terminal: xterm-256color |
| |
+------------------------------------------------------------------------------+
By running this command in your ssh session
+------------------------------------------------------------------------------+
| |
| $ export TERM=xterm |
| |
+------------------------------------------------------------------------------+
References
________________________________________________________________________________
[0] https://www.openssh.com/openbsd.html
[1] https://wiki.gentoo.org/wiki/SSH
________________________________________________________________________________
Dylan Araps (C) 2019-2020
kiss-community (C) 2020-2021
Dilyn Corner (C) 2021
Linux(R) is the registered trademark of Linus Torvalds in the U.S. and
other countries.


MEET JOE BLACK RATING: 6.5 / 10 --> So-so
For more reviews and trivia, go to http://surf.to/joblo
>From MALLRATS (6/10) to this!?! Claire Forlani breaks into the "show" with her first big romantic lead opposite one of the "sexiest men in the world", Brad Pitt. Director Martin Brest follows up his greatest critical success from 1992, SCENT OF A WOMAN (7.5/10), with a semi-remake of the 1934 film, DEATH TAKES A HOLIDAY, a 3-hour long fantastical romance starring Death.
PLOT: Death comes to Earth and injects itself into the form of a human body (Pitt) in order to learn more about human beings and life in general. He chooses an extremely successful and rich man, William Parrish (Hopkins) to be his guide through this journey, up until the time he chooses to end it, at which point, he will take the 65-year old Parrish with him. What's the quirk in his plans? Mr. Parrish also has a gorgeous daughter, to which Death gradually takes a liking.
CRITIQUE: Despite it being too long, too slow, and not all together believable, this film still manages to whip up a kernel of cinematic magic with the wonderful performances by its leads, the beautiful scenery and a touching father-daughter subplot. Folks, before you read any more of this review, please appreciate the fact that this film truly feeeeels like three hours! Most of the scenes seem to go on for too long, the dialogue between the actors is constantly interrupted by long spurts of silence and ambiguous gazes, and the overall feel of the film is slow, slow and slow. Having said that, I might recommend this film for video-watchers, who have the prerogative to watch the film at their own leisure, and even forward the boring parts, or rewind the whispering parts (Most of which were too low to comprehend.)
 They basically just make Death feel like a "fish out of water" character which we've already seen done to death (no pun intended) in many a better film. As Death, Brad Pitt is good, but his character is really quite annoying and slow. His counterpart, the mousy Claire Forlani is also quite decent in her role, but their romance never really grabbed me by the throat (They might have wanted to pursue the "coffee shop" scene's ambience further in this script...). Her boyfriend in the film is also played well by actor Jake Weber, but for some reason, he downshifts into a completely one-dimensional character about halfway through this voyage. Anthony Hopkins is also great as the patriarch of this super-rich family, while managing to authenticate true feelings of his power and humanity. Jeffrey Tambor is also funny in the role of the comic-relief loser.
I must say that the conclusion of this film also left me dry in the enthusiasm department, as Death's departure from Earth was somewhat anticlimactic.  All in all, the film does not succeed on most fronts. It's too long, waaaaay too slow, and kind of flaky as a romance. On the other hand, if you don't mind long or slow movies, like staring at beautiful people and images for 3 hours, and are interested in the father-daughter relationship angle, which is quite well done in this film, then by all means, check this movie out...on video! And oh yeah, I never like to reveal plot points in my reviews, but just this once I'll tell you a little something that might juice this film up for you..........................are you ready?...........................Death gets laid!!
Little Known Facts about this film and its stars: Brad Pitt's favorite snack is pizza. His favorite cereal is Frosted Flakes. His favorite movie of all time is ONE FLEW OVER THE CUCKOO'S NEST (7.5/10) (one of his favorites). His favorite TV show of all time is "All in the Family". He likes the music of Neil Young, Bob Marley, Soundgarden and Eric Clapton. (The Oprah Winfrey Show, November 13, 1998) Brad Pitt received $17,500,000 for his role in this film. He dated fellow actresses Juliette Lewis and Gwyneth Paltrow for three and two years respectively, and dropped out of the University of Missouri School of Journalism when he was only two credits short of (and two weeks prior to) graduating to move to California. He was majoring in journalism with a focus in advertising. He told his parents and friends that he was off to attend the Art Center College of Design in Pasadena, because he was afraid to tell them that, in fact, he planned to relegate himself to the status of a table-waiting, limo-driving, chicken-suit-wearing, LA type, all in the hope that someday he would be famous. Pitt was the third choice for the role of J.D. in THELMA & LOUISE (8/10). William Baldwin, the first choice, left to star in BACKDRAFT (7.5/10). In 1992, director Martin Brest was nominated for an Oscar as Best Director for SCENT OF A WOMAN. He also directed the original BEVERLY HILLS COP (7.5/10) starring Eddie Murphy. Claire Forlani is British, and played the long-lost daughter of Sean Connery in THE ROCK (7/10). This film was originally titled DEATH TAKES A VACATION. Singer Melissa Etheridge once provided this Brad Pitt testimonial: "One night a few of us, shall we say, lesbians, were in the hot tub watching the guys play basketball in the pool. We were staring at Brad and we all agreed he could change a woman's mind."
Review Date: November 18, 1998 Director: Martin Brest Writers: Ron Osborn, Jeff Reno, Kevin Wade and Bo Goldman Producer: Martin Brest Actors: Brad Pitt as Joe Black/ Death Anthony Hopkins as William Parrish Claire Forlani as Susan Parrish Genre: Comedy/ Romance Year of Release: 1998
Visit JoBlo's Movie Emporium http://surf.to/joblo
(c) 1998 Berge Garabedian
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


An Angular library to create shopping carts for your e-commerce applications
Star Fork
Get started
Search the API
Demo


GTFS-Realtime Validator
About
Help
Contact Us
Monitoring Feed(s)
Overview
GTFS Validation Results:
Status:
Running
Running Time:
00h 00m 00s
Total HTTP requests:
0
Total Unique responses:
0


{% extends "base.html" %} {% load static %} {% block more_headers %} {% endblock %} {% block title %} Detail for {{ bot.name }} {% endblock %} {% block main_content %}
{{ bot.name }} is not authorized to post to twitter.
Follow the steps in the section marked "Authorization"
{% endif %}This bot doesn't have any mashups attached yet.
{% else %}{{ bot.name }} has {{ bot.mashup.all|length }} mashups attached
To choose mashups, click here
| Mashup Created Tweeted |
|---|
| {{ mashup.title }} {{ mashup.outputs.count }} {{ mashup.tweets.count }} |
It looks like you haven't configured this bot to post on twitter yet.
To get started, create a new Twitter account for this bot and log in to it.
After that, click here
{% else %}This bot appears to be authorized for twitter. If it's not working, reauthorize by clicking here
{% endif %}{{ bot.name }} has tweeted {{ bot.tweets.all|length }} times total
This bot was created on {{ bot.created|date }}{% if most_recent_tweet.created_twitter is None %} This bot hasn't tweeted yet. {% else %} The most recent tweet was created at {{ most_recent_tweet.created_twitter }} {% endif %}
{% if most_recent_tweet.screen_name is None %} The latest screen name for this bot will appear here. {% else %} Most recently tweeting as {{ most_recent_tweet.screen_name }} {% endif %}
{% if most_recent_tweet.screen_name is not None %} Tweets by {{ most_recent_tweet.screen_name }} {% endif %}


Uses of Reflection
Reflection is commonly used by programs which require the ability to
examine or modify the runtime behavior of applications running in the Java
virtual machine. This is a relatively advanced feature and should be used only
by developers who have a strong grasp of the fundamentals of the language.
With that caveat in mind, reflection is a powerful technique and can enable
applications to perform operations which would otherwise be impossible.
- Extensibility Features
- An application may make use of external, user-defined classes by creating
instances of extensibility objects using their fully-qualified names.
- Class Browsers and Visual Development Environments
- A class browser needs to be able to enumerate the members of classes.
Visual development environments can benefit from making use of type information
available in reflection to aid the developer in writing correct code.
- Debuggers and Test Tools
- Debuggers need to be able to examine private members on classes. Test
harnesses can make use of reflection to systematically call a discoverable set
APIs defined on a class, to insure a high level of code coverage in a test
suite.
Drawbacks of Reflection
Reflection is powerful, but should not be used indiscriminately. If it is
possible to perform an operation without using reflection, then it is
preferable to avoid using it. The following concerns should be kept in mind
when accessing code via reflection.
- Performance Overhead
- Because reflection involves types that are dynamically resolved, certain
Java virtual machine optimizations can not be performed. Consequently,
reflective operations have slower performance than their non-reflective
counterparts, and should be avoided in sections of code which are called
frequently in performance-sensitive applications.
- Security Restrictions
- Reflection requires a runtime permission which may not be present when
running under a security manager. This is in an important consideration for
code which has to run in a restricted security context, such as in an Applet.
- Exposure of Internals
- Since reflection allows code to perform operations that would be illegal
in non-reflective code, such as accessing
private
fields and
methods, the use of reflection can result in unexpected side-effects, which may
render code dysfunctional and may destroy portability. Reflective code breaks
abstractions and therefore may change behavior with upgrades of the platform.
Trail Lessons
This trail covers common uses of reflection for accessing and manipulating
classes, fields, methods, and constructors. Each lesson contains code
examples, tips, and troubleshooting information.
-
Classes
- This lesson shows the various ways to obtain a
Class
object and use it to examine properties of a class, including its
declaration and contents.
-
Members
- This lesson describes how to use the Reflection APIs to find the fields,
methods, and constructors of a class. Examples are provided for setting
and getting field values, invoking methods, and creating new instances of
objects using specific constructors.
-
Arrays and Enumerated Types
- This lesson introduces two special types of classes: arrays, which are
generated at runtime, and
enum
types, which define unique
named object instances. Sample code shows how to retrieve the component
type for an array and how to set and get fields with array or
enum
types.
Note: The examples in this trail are designed for experimenting with the Reflection
APIs. The handling of exceptions therefore is not the same as would be used in
production code. In particular, in production code it is not recommended to
dump stack traces that are visible to the user.


| W3C Validation Report
|
| src/main/resources/public/index.html | Error Count : 5
|
| Error Number
|
Error Type
|
Line Number
|
Error Message
|
Error Source Code Reference
|
| 0 |
warning
|
6 |
Comments seen before doctype. Internet Explorer will go into the quirks mode. |

<!DOC |
| 1 |
error
|
44 |
Bad value “ ” for attribute “required” on element “input”. |
top">
<input type="text" placeholder="Search Here" required=" ">
</ |
| 2 |
error
|
209 |
End tag for “body” seen, but there were unclosed elements. |
icon -->

</htm |
| 3 |
error
|
137 |
Unclosed element “div”. |
r-bdy">

<di |


Welcome to My Calculator
CALCULATOR
Enjoy Doing The Math!
Operation
Num1
Num2
Result
Click on RESET to start again
RESET
THANK YOU!


new Arc()
Handler for arc devices
Methods
-
addListeners()
-
Add prefix-based listeners
Called when the prefix is changed -
all(n, l)
-
Set all leds on encoder n to level l
Parameters:
Name Type Description n
Number encoder
l
Number level
-
map(n, levels)
-
Set leds on encoder n to levels array
Parameters:
Name Type Description n
Number encoder
levels
Number array of 64 led levels
-
range(n, x1, x2, l)
-
Sets leds x1 through x2 to level l on encoder n
Parameters:
Name Type Description n
Number encoder
x1
Number start led
x2
Number end led
l
Number level
-
removeListeners()
-
Remove existing prefix-based listeners
Called when the prefix is changed -
set(data)
-
Set one led, data format is:
{n: encoder number, x: led number, l: led level}Parameters:
Name Type Description data
Object {n: encoder, x: led, l: level}