set specital termimal(https://wiki.archlinux.org/index.php/Color_Bash_Prompt#List_of_colors_for_pro)

Applying changes

To apply changes made in ~/.bashrc without restarting your shell, source the script.

Basic prompts

The following settings are useful for distinguishing the root prompt from non-root users.

Regular user

A green prompt for regular users:

[chiri@zetsubou ~]$ _
~/.bashrc
#PS1='[\u@\h \W]\$ '  # Default
PS1='\[\e[1;32m\][\u@\h \W]\$\[\e[0m\] '

Root

A red prompt for root (copy from /etc/skel/, if not already):

[root@zetsubou ~]# _
/root/.bashrc
#PS1='[\u@\h \W]\$ '  # Default
PS1='\[\e[1;31m\][\u@\h \W]\$\[\e[0m\] '

Professional prompts

The following settings provides more professional prompts.

Regular user

A green/blue prompt for regular users:

chiri ~/docs $ echo "sample output text"
sample output text
chiri ~/docs $ _
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'

This will give a very pleasing, colorful prompt and theme for the console with bright white text.

The string above contains color-set escape sequences (start coloring: \[\e[color\], end coloring: \[\e[m\]) and information placeholders:

  • \u - Username. The original prompt also has \h, which prints the host name.
  • \w - Current absolute path. Use \W for current relative path.
  • \$ - The prompt character (eg. # for root, $ for regular users).
  • \[ and \] - These tags should be placed around color codes so bash knows how to properly place the cursor.

The last color-set sequence, \[\e[1;37m\], is not closed, so the remaining text (everything typed into the terminal, program output and so on) will be in that (bright white) color. It may be desirable to change this color, or to delete the last escape sequence in order to leave the actual output in unaltered color.

Root

A red/blue prompt for root:

root ~/docs # echo "sample output text"
sample output text
root ~/docs # _
PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[0;31m\]\$ \[\e[m\]\[\e[0;32m\]'

This will give you a red designation and green console text.

Ultimate prompts

Load/Mem Status for 256colors

This is not even pushing the limits. Other than using sed to parse the memory and load average (using the -u option for non-buffering), and the builtin history to save your history to your HISTFILE after every command, which you may find incredibly useful when dealing with crashing shells or subshells, this is essentially just making BASH print variables it already knows, making this extremely fast compared to prompts with non-builtin commands.

This prompt is from AskApache.com's BASH Power Prompt article, which goes into greater detail. It is especially helpful for those wanting to understand 256 color terminals, ncurses, termcap, and terminfo.

This is for 256 color terminals, which is where the \033[38;5;22m terminal escapes come from.

802/1024MB      1.28 1.20 1.13 3/94 18563
[5416:17880 0:70] 05:35:50 Wed Apr 21 [[email protected]:/dev/pts/0 +1] ~

(1:70)$ _
PROMPT_COMMAND='history -a;echo -en "\033[m\033[38;5;2m"$(( $(sed -nu "s/MemFree:[\t ]\+\([0-9]\+\) kB/\1/p" /proc/meminfo)/1024))"\033[38;5;22m/"$(($(sed -nu "s/MemTotal:[\t ]\+\([0-9]\+\) kB/\1/Ip" /proc/meminfo)/1024 ))MB"\t\033[m\033[38;5;55m$(< /proc/loadavg)\033[m"'
PS1='\[\e[m\n\e[1;30m\][$$:$PPID \j:\!\[\e[1;30m\]]\[\e[0;36m\] \T \d \[\e[1;30m\][\[\e[1;34m\]\u@\H\[\e[1;30m\]:\[\e[0;37m\]${SSH_TTY} \[\e[0;32m\]+${SHLVL}\[\e[1;30m\]] \[\e[1;37m\]\w\[\e[0;37m\] \n($SHLVL:\!)\$ '

List of colors for prompt and Bash

Add this to your Bash file(s) to define colors for prompt and commands:

txtblk='\e[0;30m' # Black - Regular
txtred='\e[0;31m' # Red
txtgrn='\e[0;32m' # Green
txtylw='\e[0;33m' # Yellow
txtblu='\e[0;34m' # Blue
txtpur='\e[0;35m' # Purple
txtcyn='\e[0;36m' # Cyan
txtwht='\e[0;37m' # White
bldblk='\e[1;30m' # Black - Bold
bldred='\e[1;31m' # Red
bldgrn='\e[1;32m' # Green
bldylw='\e[1;33m' # Yellow
bldblu='\e[1;34m' # Blue
bldpur='\e[1;35m' # Purple
bldcyn='\e[1;36m' # Cyan
bldwht='\e[1;37m' # White
unkblk='\e[4;30m' # Black - Underline
undred='\e[4;31m' # Red
undgrn='\e[4;32m' # Green
undylw='\e[4;33m' # Yellow
undblu='\e[4;34m' # Blue
undpur='\e[4;35m' # Purple
undcyn='\e[4;36m' # Cyan
undwht='\e[4;37m' # White
bakblk='\e[40m'   # Black - Background
bakred='\e[41m'   # Red
bakgrn='\e[42m'   # Green
bakylw='\e[43m'   # Yellow
bakblu='\e[44m'   # Blue
bakpur='\e[45m'   # Purple
bakcyn='\e[46m'   # Cyan
bakwht='\e[47m'   # White
txtrst='\e[0m'    # Text Reset

Or if you prefer color names you will know how to spell without a special decoder ring and want high intensity colors:

# Reset
Color_Off='\e[0m'       # Text Reset

# Regular Colors
Black='\e[0;30m'        # Black
Red='\e[0;31m'          # Red
Green='\e[0;32m'        # Green
Yellow='\e[0;33m'       # Yellow
Blue='\e[0;34m'         # Blue
Purple='\e[0;35m'       # Purple
Cyan='\e[0;36m'         # Cyan
White='\e[0;37m'        # White

# Bold
BBlack='\e[1;30m'       # Black
BRed='\e[1;31m'         # Red
BGreen='\e[1;32m'       # Green
BYellow='\e[1;33m'      # Yellow
BBlue='\e[1;34m'        # Blue
BPurple='\e[1;35m'      # Purple
BCyan='\e[1;36m'        # Cyan
BWhite='\e[1;37m'       # White

# Underline
UBlack='\e[4;30m'       # Black
URed='\e[4;31m'         # Red
UGreen='\e[4;32m'       # Green
UYellow='\e[4;33m'      # Yellow
UBlue='\e[4;34m'        # Blue
UPurple='\e[4;35m'      # Purple
UCyan='\e[4;36m'        # Cyan
UWhite='\e[4;37m'       # White

# Background
On_Black='\e[40m'       # Black
On_Red='\e[41m'         # Red
On_Green='\e[42m'       # Green
On_Yellow='\e[43m'      # Yellow
On_Blue='\e[44m'        # Blue
On_Purple='\e[45m'      # Purple
On_Cyan='\e[46m'        # Cyan
On_White='\e[47m'       # White

# High Intensity
IBlack='\e[0;90m'       # Black
IRed='\e[0;91m'         # Red
IGreen='\e[0;92m'       # Green
IYellow='\e[0;93m'      # Yellow
IBlue='\e[0;94m'        # Blue
IPurple='\e[0;95m'      # Purple
ICyan='\e[0;96m'        # Cyan
IWhite='\e[0;97m'       # White

# Bold High Intensity
BIBlack='\e[1;90m'      # Black
BIRed='\e[1;91m'        # Red
BIGreen='\e[1;92m'      # Green
BIYellow='\e[1;93m'     # Yellow
BIBlue='\e[1;94m'       # Blue
BIPurple='\e[1;95m'     # Purple
BICyan='\e[1;96m'       # Cyan
BIWhite='\e[1;97m'      # White

# High Intensity backgrounds
On_IBlack='\e[0;100m'   # Black
On_IRed='\e[0;101m'     # Red
On_IGreen='\e[0;102m'   # Green
On_IYellow='\e[0;103m'  # Yellow
On_IBlue='\e[0;104m'    # Blue
On_IPurple='\e[0;105m'  # Purple
On_ICyan='\e[0;106m'    # Cyan
On_IWhite='\e[0;107m'   # White

To use in commands from your shell environment:

$ echo -e "${txtblu}test"
test
$ echo -e "${bldblu}test"
test
$ echo -e "${undblu}test"
test
$ echo -e "${bakblu}test"
test
$ _
PS1="\[$txtblu\]foo\[$txtred\] bar\[$txtrst\] baz : "

Double quotes enable $color variable expansion and the \[ \] escapes around them make them not count as character positions and the cursor position is not wrong.

Note: If experiencing premature line wrapping when entering commands, then missing escapes ( \[ \]) is most likely the reason.

Prompt escapes

The various Bash prompt escapes listed in the manpage:

Bash allows these prompt strings to be customized by inserting a
number of backslash-escaped special characters that are
decoded as follows:

	\a		an ASCII bell character (07)
	\d		the date in "Weekday Month Date" format (e.g., "Tue May 26")
	\D{format}	the format is passed to strftime(3) and the result
			  is inserted into the prompt string an empty format
			  results in a locale-specific time representation.
			  The braces are required
	\e		an ASCII escape character (033)
	\h		the hostname up to the first `.'
	\H		the hostname
	\j		the number of jobs currently managed by the shell
	\l		the basename of the shell's terminal device name
	\n		newline
	\r		carriage return
	\s		the name of the shell, the basename of $0 (the portion following
			  the final slash)
	\t		the current time in 24-hour HH:MM:SS format
	\T		the current time in 12-hour HH:MM:SS format
	\@		the current time in 12-hour am/pm format
	\A		the current time in 24-hour HH:MM format
	\u		the username of the current user
	\v		the version of bash (e.g., 2.00)
	\V		the release of bash, version + patch level (e.g., 2.00.0)
	\w		the current working directory, with $HOME abbreviated with a tilde
	\W		the basename of the current working directory, with $HOME
			 abbreviated with a tilde
	\!		the history number of this command
	\#		the command number of this command
	\$		if the effective UID is 0, a #, otherwise a $
	\nnn		the character corresponding to the octal number nnn
	\\		a backslash
	\[		begin a sequence of non-printing characters, which could be used
			  to embed a terminal control sequence into the prompt
	\]		end a sequence of non-printing characters

	The command number and the history number are usually different:
	the history number of a command is its position in the history
	list, which may include commands restored from the history file
	(see HISTORY below), while the command number is the position in
	the sequence of commands executed during the current shell session.
	After the string is decoded, it is expanded via parameter
	expansion, command substitution, arithmetic expansion, and quote
	removal, subject to the value of the promptvars shell option (see
	the description of the shopt command under SHELL BUILTIN COMMANDS
	below).

Positioning the cursor

The following sequence sets the cursor position:

\[\033[;f\]

The current cursor position can be saved using:

\[\033[s\]

To restore a position, use the following sequence:

\[\033[u\]


The following example uses these sequences to display the time in the upper right corner:

PS1=">\[\033[s\]\[\033[1;\$((COLUMNS-5))f\]\$(date +%H:%M)\[\033[u\]"

The environment variable COLUMNS contains the number of columns of the terminal. The above example substracts 5 from its value in order to justify the five-character wide output of date at the right border.

Return value visualisation

Use the following prompt to see the return value of last command:

0 ;) : true
0 ;) : false
1 ;( :
#return value visualisation
PS1="\$? \$(if [[ \$? == 0 ]]; then echo \"\[\033[0;32m\];)\"; else echo \"\[\033[0;31m\];(\"; fi)\[\033[00m\] : "

Zero is a green smiley and non-zero a red one. So your prompt will smile if the last operation was successful.

But you will probably want to include the username and hostname as well, like this:

0 ;) andy@alba ~ $ true
0 ;) andy@alba ~ $ false
1 ;( andy@alba ~ $ _
#return value visualisation
PS1="\[\033[01;37m\]\$? \$(if [[ \$? == 0 ]]; then echo \"\[\033[01;32m\];)\"; else echo \"\[\033[01;31m\];(\"; fi) $(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$\[\033[00m\] "

Or, if you want, you can build your prompt using the unicode symbol for a zero status and the unicode symbol for a nonzero status:

0 ✓ andy@alba ~ $ true
0 ✓ andy@alba ~ $ false
1 andy@alba ~ $ I\ will\ try\ to\ type\ a\ wrong\ command...
bash: I will try to type a wrong command...: command not found
127 andy@alba ~ $ _
#return value visualisation
PS1="\[\033[01;37m\]\$? \$(if [[ \$? == 0 ]]; then echo \"\[\033[01;32m\]\342\234\223\"; else echo \"\[\033[01;31m\]\342\234\227\"; fi) $(if [[ ${EUID} == 0 ]]; then echo '\[\033[01;31m\]\h'; else echo '\[\033[01;32m\]\u@\h'; fi)\[\033[01;34m\] \w \$\[\033[00m\] "

Alternatively, this can be made more readable with PROMPT_COMMAND:

set_prompt () {
    Last_Command=$? # Must come first!
    Blue='\[\e[01;34m\]'
    White='\[\e[01;37m\]'
    Red='\[\e[01;31m\]'
    Green='\[\e[01;32m\]'
    Reset='\[\e[00m\]'
    FancyX='\342\234\227'
    Checkmark='\342\234\223'

    # Add a bright white exit status for the last command
    PS1="$White\$? "
    # If it was successful, print a green check mark. Otherwise, print
    # a red X.
    if [[ $Last_Command == 0 ]]; then
        PS1+="$Green$Checkmark "
    else
        PS1+="$Red$FancyX "
    fi
    # If root, just print the host in red. Otherwise, print the current user
    # and host in green.
    if [[ $EUID == 0 ]]; then
        PS1+="$Red\\h "
    else
        PS1+="$Green\\u@\\h "
    fi
    # Print the working directory and prompt marker in blue, and reset
    # the text color to the default.
    PS1+="$Blue\\w \\\$$Reset "
}
PROMPT_COMMAND='set_prompt'

Here is an alternative that only includes the error status, if non-zero:

PROMPT_COMMAND='es=$?; [[ $es -eq 0 ]] && unset error || error=$(echo -e "\e[1;41m $es \e[40m")'
PS1="${error} ${PS1}"

Tips and tricks

Different colors for text entry and console output

If you do not reset the text color at the end of your prompt, both the text you enter and the console text will simply stay in that color. If you want to edit text in a special color but still use the default color for command output, you will need to reset the color after you press Enter, but still before any commands get run. You can do this by installing a DEBUG trap, like this:

~/.bashrc
trap 'printf "\e[0m" "$_"' DEBUG

Random quotations at logon

For a brown Fortune prompt, add:

~/.bashrc
[[ "$PS1" ]] && echo -e "\e[00;33m$(/usr/bin/fortune)\e[00m"

Colorized Arch latest news at logon

To read 10 latest news items from the Arch official website, user grufo has written a small and coloured RSS escaping script (scrollable):

   :: Arch Linux: Recent news updates ::
  [ https://www.archlinux.org/news/ ]

The latest and greatest news from the Arch Linux distribution.

  en-us Sun, 04 Nov 2012 16:09:46 +0000


   :: End of initscripts support ::
  [ https://www.archlinux.org/news/end-of-initscripts-support/ ]


Tom Gundersen wrote:
As systemd is now the default init system, Arch Linux is receiving minimal testing on initscripts systems. Due to a lack of resources and interest, we are unlikely to work on fixing initscripts-specific bugs, and may close them as WONTFIX.
We therefore strongly encourage all users to migrate to systemd as soon as possible. See the systemd migration guide [ https://wiki.archlinux.org/index.php/Systemd ].
To ease the transition, initscripts support will remain in the official repositories for the time being, unless otherwise stated. As of January 2013, we will start removing initscripts support (e.g., rc scripts) from individual packages without further notice.

  Tom Gundersen Sun, 04 Nov 2012 16:09:46 +0000 tag:www.archlinux.org,2012-11-04:/news/end-of-initscripts-support/


   :: November release of install media available ::
  [ https://www.archlinux.org/news/november-release-of-install-media-available/ ]


Pierre Schmitz wrote:
The latest snapshot of our install and rescue media can be found on our Download [ https://www.archlinux.org/download/ ] page. The 2012.11.01 ISO image mainly contains minor bug fixes, cleanups and new packages compared to the previous one:
  * First media with Linux 3.6
  * copytoram=n can be used to not copy the image to RAM on network boot. This is probably unreliable but an option for systems with very low memory.
  * cowfile_size boot parameter mainly for persistent COW on VFAT. See the README [ https://projects.archlinux.org/archiso.git/plain/docs/README.bootparams?id=v4 ] file for details.

  Pierre Schmitz Fri, 02 Nov 2012 17:54:15 +0000 tag:www.archlinux.org,2012-11-02:/news/november-release-of-install-media-available/


   :: Bug Squashing Day: Saturday 17th November ::
  [ https://www.archlinux.org/news/bug-squashing-day-saturday-17th-november/ ]


Allan McRae wrote:
The number of bugs in the Arch Linux bug tracker is creeping up so it is time for some extermination.
This is a great way for the community to get involved and help the Arch Linux team. The process is simple. First look at a bug for your favorite piece of software in the bug tracker and check if it still occurs. If it does, check the upstream project for a fix and test it to confirm it works. If there is no fix available, make sure the bug has been filed in the upstream tracker.
Join us on the #archlinux-bugs IRC channel. We are spread across timezones, so people should be around all day.

  Allan McRae Thu, 01 Nov 2012 12:28:51 +0000 tag:www.archlinux.org,2012-11-01:/news/bug-squashing-day-saturday-17th-november/


   :: ConsoleKit replaced by logind ::
  [ https://www.archlinux.org/news/consolekit-replaced-by-logind/ ]


Allan McRae wrote:
With GNOME 3.6, polkit and networkmanager moving to [extra], ConsoleKit has now been removed from the repositories. Any package that previously depended on it now relies on systemd-logind instead. That means that the system must be booted with systemd to be fully functional.
In addition to GNOME, both KDE and XFCE are also affected by this change.

  Allan McRae Tue, 30 Oct 2012 22:17:39 +0000 tag:www.archlinux.org,2012-10-30:/news/consolekit-replaced-by-logind/


   :: systemd is now the default on new installations ::
  [ https://www.archlinux.org/news/systemd-is-now-the-default-on-new-installations/ ]


Thomas Bächler wrote:
The base group now contains the systemd-sysvcompat package. This means that all new installations will boot with systemd by default.
As some packages still lack native systemd units, users can install the initscripts package and use the DAEMONS array in /etc/rc.conf to start services using the legacy rc.d scripts.
This change does not affect existing installations. For the time being, the initscripts and sysvinit packages remain available from our repositories. However, individual packages may now start relying on the system being booted with systemd.
Please refer to the wiki [ https://wiki.archlinux.org/index.php/Systemd ] for how to transition an existing installation to systemd.

  Thomas Bächler Sat, 13 Oct 2012 09:29:38 +0000 tag:www.archlinux.org,2012-10-13:/news/systemd-is-now-the-default-on-new-installations/


   :: Install medium 2012.10.06 introduces systemd ::
  [ https://www.archlinux.org/news/install-medium-20121006-introduces-systemd/ ]


Pierre Schmitz wrote:
The October release of the Arch Linux install medium is available for Download [ https://www.archlinux.org/download/ ] and can be used for new installs or as a rescue system. It contains a set of updated packages and the following notable changes:
  * systemd is used to boot up the live system.
  * initscripts are no longer available on the live system but are still installed by default on the target system. This is likely to change in the near future.
  * EFI boot and setup has been simplified.
  * gummiboot is used to display a menu on EFI systems.
  * The following new packages are available on the live system: ethtool, fsarchiver, gummiboot-efi, mc, partclone, partimage, refind-efi, rfkill, sudo, testdisk, wget, xd

  Pierre Schmitz Sun, 07 Oct 2012 16:58:03 +0000 tag:www.archlinux.org,2012-10-07:/news/install-medium-20121006-introduces-systemd/


   :: New install medium 2012.09.07 ::
  [ https://www.archlinux.org/news/new-install-medium-20120907/ ]


Pierre Schmitz wrote:
As is customary by now there is a new install medium available at the beginning of this month. The live system can be downloaded from Download [ https://www.archlinux.org/download/ ] and be used for new installs or as a rescue system.
In addition to a couple of updated packages and bug fixes the following changes stand out:
  * First medium with Linux 3.5 (3.5.3)
  * The script boot parameter works again ( FS#31022 [ https://bugs.archlinux.org/task/31022 ])
  * When booting via PXE and NFS or NBD the ISO will be copied to RAM to ensure a more stable usage.
  * The live medium contains usb_modeswitch and wvdial which e.g. allows to establish a network connection using an UMTS USB dongle
  * Furthermore the newest versions of initscripts, systemd and netcfg are included.

  Pierre Schmitz Sat, 08 Sep 2012 09:48:52 +0000 tag:www.archlinux.org,2012-09-08:/news/new-install-medium-20120907/


   :: Fontconfig 2.10.1 update - manual intervention required ::
  [ https://www.archlinux.org/news/fontconfig-2101-update-manual-intervention-required/ ]


Andreas Radke wrote:
The fontconfig 2.10.1 update overwrites symlinks created by the former package version. These symlinks need to be removed before the update:

rm /etc/fonts/conf.d/20-unhint-small-vera.conf
rm /etc/fonts/conf.d/20-fix-globaladvance.conf
rm /etc/fonts/conf.d/29-replace-bitmap-fonts.conf
rm /etc/fonts/conf.d/30-metric-aliases.conf
rm /etc/fonts/conf.d/30-urw-aliases.conf
rm /etc/fonts/conf.d/40-nonlatin.conf
rm /etc/fonts/conf.d/45-latin.conf
rm /etc/fonts/conf.d/49-sansserif.conf
rm /etc/fonts/conf.d/50-user.conf
rm /etc/fonts/conf.d/51-local.conf
rm /etc/fonts/conf.d/60-latin.conf
rm /etc/fonts/conf.d/65-fonts-persian.conf
rm /etc/fonts/conf.d/65-nonlatin.conf
rm /etc/fonts/conf.d/69-unifont.conf
rm /etc/fonts/conf.d/80-delicious.conf
rm /etc/fonts/conf.d/90-synthetic.conf
pacman -Syu fontconfig

Main systemwide configuration should be done by symlinks (especially for autohinting, sub-pixel and lcdfilter):

cd /etc/fonts/conf.d
ln -s ../conf.avail/XX-foo.conf

Also check Font Configuration [ https://wiki.archlinux.org/index.php/Font_Configuration ] and Fonts [ https://wiki.archlinux.org/index.php/Fonts ].

  Andreas Radke Thu, 06 Sep 2012 13:54:23 +0000 tag:www.archlinux.org,2012-09-06:/news/fontconfig-2101-update-manual-intervention-required/


   :: netcfg-2.8.9 drops deprecated rc.conf compatibility ::
  [ https://www.archlinux.org/news/netcfg-289-drops-initscripts-compatibility/ ]


Florian Pritz wrote:
Users of netcfg should configure all interfaces in /etc/conf.d/netcfg rather than /etc/rc.conf.

 Florian Pritz Sat, 11 Aug 2012 20:00:02 +0000 tag:www.archlinux.org,2012-08-11:/news/netcfg-289-drops-initscripts-compatibility/


   :: Install media 2012.08.04 available ::
  [ https://www.archlinux.org/news/install-media-20120804-available/ ]


Pierre Schmitz wrote:
The August snapshot of our live and install media comes with updated packages and the following changes on top of the previous ISO image [ /news/install-media-20120715-released/ ]:
  * GRUB 2.0 instead of the legacy 0.9 version is available.
  * The Installation Guide [ https://wiki.archlinux.org/index.php/Installation_Guide ] can be found at /root/install.txt.
  * ZSH with Grml's configuration [ http://grml.org/zsh/ ] is used as interactive shell to provide a user friendly and more convenient environment. This includes completion support for pacstrap, arch-chroot, pacman and most other tools.
  * The network daemon is started by default which will automatically setup your network if DHCP is available.
Note that all these changes only affect the live system and not the base system you install using pacstrap. The ISO image can be downloaded from our download page [ /download/ ]. The next snapshot is scheduled for September.

  Pierre Schmitz Sat, 04 Aug 2012 17:24:30 +0000 tag:www.archlinux.org,2012-08-04:/news/install-media-20120804-available/


andy@alba _
~/.bashrc
# Arch latest news
if [ "$PS1" ] && [[ $(ping -c1 www.google.com 2>&-) ]]; then
	# The characters "£, §" are used as metacharacters. They should not be encountered in a feed...
	echo -e "$(echo $(curl --silent https://www.archlinux.org/feeds/news/ | sed -e ':a;N;$!ba;s/\n/ /g') | \
		sed -e 's/&/\&/g
		s/<\|<//g
		s/<\/a>/£/g
		s/href\=\"/§/g
		s//\\n\\n\\n   :: \\e[01;31m/g; s/<\/title>/\\e[00m ::\\n/g
		s/<link>/ [ \\e[01;36m/g; s/<\/link>/\\e[00m ]/g
		s/<description>/\\n\\n\\e[00;37m/g; s/<\/description>/\\e[00m\\n\\n/g
		s/<p\( [^>]*\)\?>\|<br\s*\/\?>/\n/g
		s/<b\( [^>]*\)\?>\|<strong\( [^>]*\)\?>/\\e[01;30m/g; s/<\/b>\|<\/strong>/\\e[00;37m/g
		s/<i\( [^>]*\)\?>\|<em\( [^>]*\)\?>/\\e[41;37m/g; s/<\/i>\|<\/em>/\\e[00;37m/g
		s/<u\( [^>]*\)\?>/\\e[4;37m/g; s/<\/u>/\\e[00;37m/g
		s/<code\( [^>]*\)\?>/\\e[00m/g; s/<\/code>/\\e[00;37m/g
		s/<a[^§|t]*§\([^\"]*\)\"[^>]*>\([^£]*\)[^£]*£/\\e[01;31m\2\\e[00;37m \\e[01;34m[\\e[00;37m \\e[04m\1\\e[00;37m\\e[01;34m ]\\e[00;37m/g
		s/<li\( [^>]*\)\?>/\n \\e[01;34m*\\e[00;37m /g
		s/<!\[CDATA\[\|\]\]>//g
		s/\|>\s*<//g
		s/ *<[^>]\+> */ /g
		s/[<>£§]//g')\n\n";
fi</pre> 
  <p>To only get the absolute latest item, use this:</p> 
  <pre># Arch latest news
if [ "$PS1" ] && [[ $(ping -c1 www.google.com 2>&-) ]]; then
	# The characters "£, §" are used as metacharacters. They should not be encountered in a feed...
	echo -e "$(echo $(curl --silent https://www.archlinux.org/feeds/news/ | awk ' NR == 1 {while ($0 !~ /<\/item>/) {print;getline} sub(/<\/item>.*/,"</item>") ;print}' | sed -e ':a;N;$!ba;s/\n/ /g') | \
		sed -e 's/&/\&/g
		s/<\|</</g
		s/>\|>/>/g
		s/<\/a>/£/g
		s/href\=\"/§/g
		s/<title>/\\n\\n\\n   :: \\e[01;31m/g; s/<\/title>/\\e[00m ::\\n/g
		s/<link>/ [ \\e[01;36m/g; s/<\/link>/\\e[00m ]/g
		s/<description>/\\n\\n\\e[00;37m/g; s/<\/description>/\\e[00m\\n\\n/g
		s/<p\( [^>]*\)\?>\|<br\s*\/\?>/\n/g
		s/<b\( [^>]*\)\?>\|<strong\( [^>]*\)\?>/\\e[01;30m/g; s/<\/b>\|<\/strong>/\\e[00;37m/g
		s/<i\( [^>]*\)\?>\|<em\( [^>]*\)\?>/\\e[41;37m/g; s/<\/i>\|<\/em>/\\e[00;37m/g
		s/<u\( [^>]*\)\?>/\\e[4;37m/g; s/<\/u>/\\e[00;37m/g
		s/<code\( [^>]*\)\?>/\\e[00m/g; s/<\/code>/\\e[00;37m/g
		s/<a[^§|t]*§\([^\"]*\)\"[^>]*>\([^£]*\)[^£]*£/\\e[01;31m\2\\e[00;37m \\e[01;34m[\\e[00;37m \\e[04m\1\\e[00;37m\\e[01;34m ]\\e[00;37m/g
		s/<li\( [^>]*\)\?>/\n \\e[01;34m*\\e[00;37m /g
		s/<!\[CDATA\[\|\]\]>//g
		s/\|>\s*<//g
		s/ *<[^>]\+> */ /g
		s/[<>£§]//g')\n\n";
fi</pre> 
  <h3><span class="mw-headline" id="Colors_overview">Colors overview</span></h3> 
  <p>The page at http://ascii-table.com/ansi-escape-sequences.php describes the various available color escapes. The following Bash function displays a table with ready-to-copy escape codes.</p> 
  <pre style="border-bottom:none;">~/.bashrc</pre> 
  <pre style="border-top-style:dashed;">colors() {
	local fgc bgc vals seq0

	printf "Color escapes are %s\n" '\e[${value};...;${value}m'
	printf "Values 30..37 are \e[33mforeground colors\e[m\n"
	printf "Values 40..47 are \e[43mbackground colors\e[m\n"
	printf "Value  1 gives a  \e[1mbold-faced look\e[m\n\n"

	# foreground colors
	for fgc in {30..37}; do
		# background colors
		for bgc in {40..47}; do
			fgc=${fgc#37} # white
			bgc=${bgc#40} # black

			vals="${fgc:+$fgc;}${bgc}"
			vals=${vals%%;}

			seq0="${vals:+\e[${vals}m}"
			printf "  %-9s" "${seq0:-(default)}"
			printf " ${seq0}TEXT\e[m"
			printf " \e[${vals:+${vals+$vals;}}1mBOLD\e[m"
		done
		echo; echo
	done
}
</pre> 
  <h3><span class="mw-headline" id="Colorized_git_prompt">Colorized git prompt</span></h3> 
  <p>Source <code>/usr/share/git/completion/git-prompt.sh</code> for your shell:</p> 
  <pre style="border-bottom:none;">~/.bashrc</pre> 
  <pre style="border-top-style:dashed;">source /usr/share/git/completion/git-prompt.sh
</pre> 
  <p>and use <code>__git_ps1</code> inside <code>PS1</code> or <code>PROMPT_COMMAND</code>. See Don't Reinvent the Wheel for details.</p> 
  <h2><span class="mw-headline" id="See_also">See also</span></h2> 
  <ul> 
   <li>Community examples and screenshots in the Forum thread: What's your PS1?</li> 
   <li>The original <em>not modified</em> Gentoo's <code>/etc/bash.bashrc</code> file can be found here<sup>[dead link 2014-08-05]</sup>. See also the <span class="plainlinks archwiki-template-pkg">gentoo-bashrc</span><sup><small>AUR</small></sup> package from AUR.</li> 
   <li>tput(1) 
    <ul> 
     <li>tput reference on bash-hackers.org</li> 
     <li>Colours and Cursor Movement With tput</li> 
    </ul></li> 
   <li>Nice Xresources color schemes collection</li> 
   <li>Bash Prompt HOWTO</li> 
   <li>Giles Orr's collection of sample prompts</li> 
   <li>Bash tips: Colors and formatting</li> 
  </ul> 
 </div> 
</div>
                            </div>
                        </div>
                    </div>
                    <!--PC和WAP自适应版-->
                    <div id="SOHUCS" sid="1283295867800928256"></div>
                    <script type="text/javascript" src="/views/front/js/chanyan.js"></script>
                    <!-- 文章页-底部 动态广告位 -->
                    <div class="youdao-fixed-ad" id="detail_ad_bottom"></div>
                </div>
                <div class="col-md-3">
                    <div class="row" id="ad">
                        <!-- 文章页-右侧1 动态广告位 -->
                        <div id="right-1" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_1"> </div>
                        </div>
                        <!-- 文章页-右侧2 动态广告位 -->
                        <div id="right-2" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_2"></div>
                        </div>
                        <!-- 文章页-右侧3 动态广告位 -->
                        <div id="right-3" class="col-lg-12 col-md-12 col-sm-4 col-xs-4 ad">
                            <div class="youdao-fixed-ad" id="detail_ad_3"></div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="container">
        <h4 class="pt20 mb15 mt0 border-top">你可能感兴趣的:(terminal,setting)</h4>
        <div id="paradigm-article-related">
            <div class="recommend-post mb30">
                <ul class="widget-links">
                    <li><a href="/article/1835466921470947328.htm"
                           title="Some jenkins settings" target="_blank">Some jenkins settings</a>
                        <span class="text-muted">SnC_</span>

                        <div>Jenkins连接到特定gitlabproject的特定branch我采用的方法是在pipeline的script中使用git命令来指定branch。如下:stage('Clonerepository'){steps{gitbranch:'develop',credentialsId:'gitlab-credential-id',url:'http://gitlab.com/repo.git'}}</div>
                    </li>
                    <li><a href="/article/1835393400380157952.htm"
                           title="VUE3 + xterm + nestjs实现web远程终端 或 连接开启SSH登录的路由器和交换机。" target="_blank">VUE3 + xterm + nestjs实现web远程终端 或 连接开启SSH登录的路由器和交换机。</a>
                        <span class="text-muted">焚木灵</span>
<a class="tag" taget="_blank" href="/search/node.js/1.htm">node.js</a><a class="tag" taget="_blank" href="/search/vue/1.htm">vue</a>
                        <div>可远程连接系统终端或开启SSH登录的路由器和交换机。相关资料:xtermjs/xterm.js:Aterminalfortheweb(github.com)后端实现(NestJS):1、安装依赖:npminstallnode-ssh@nestjs/websockets@nestjs/platform-socket.io2、我们将创建一个名为RemoteControlModule的NestJS模块,</div>
                    </li>
                    <li><a href="/article/1835057218454646784.htm"
                           title="Unity 热更 之 【YooAsset 热更】几分钟快速了解 YooAsset [功能面板]、以及 [基础代码] 说明" target="_blank">Unity 热更 之 【YooAsset 热更】几分钟快速了解 YooAsset [功能面板]、以及 [基础代码] 说明</a>
                        <span class="text-muted">仙魁XAN</span>
<a class="tag" taget="_blank" href="/search/Unity/1.htm">Unity</a><a class="tag" taget="_blank" href="/search/%E8%BF%9B%E9%98%B6/1.htm">进阶</a><a class="tag" taget="_blank" href="/search/unity/1.htm">unity</a><a class="tag" taget="_blank" href="/search/Yoo/1.htm">Yoo</a><a class="tag" taget="_blank" href="/search/Asset/1.htm">Asset</a><a class="tag" taget="_blank" href="/search/yoo/1.htm">yoo</a><a class="tag" taget="_blank" href="/search/%E7%83%AD%E6%9B%B4/1.htm">热更</a><a class="tag" taget="_blank" href="/search/Hot/1.htm">Hot</a><a class="tag" taget="_blank" href="/search/Update/1.htm">Update</a>
                        <div>Unity热更之【YooAsset热更】几分钟快速了解YooAsset[功能面板]、以及[基础代码]说明目录Unity热更之【YooAsset热更】几分钟快速了解YooAsset[功能面板]、以及[基础代码]说明一、简单介绍二、系统需求三、快速引入工程中四、功能面板全局配置YooAsset->CreateSetting五、功能面板资源配置AssetBundleCollector六、功能面板资源构建</div>
                    </li>
                    <li><a href="/article/1835057092260622336.htm"
                           title="【Unity基础】如何选择脚本编译方式Mono和IL2CPP?" target="_blank">【Unity基础】如何选择脚本编译方式Mono和IL2CPP?</a>
                        <span class="text-muted">tealcwu</span>
<a class="tag" taget="_blank" href="/search/Unity%E5%9F%BA%E7%A1%80/1.htm">Unity基础</a><a class="tag" taget="_blank" href="/search/unity/1.htm">unity</a><a class="tag" taget="_blank" href="/search/%E6%B8%B8%E6%88%8F%E5%BC%95%E6%93%8E/1.htm">游戏引擎</a>
                        <div>Edit->ProjectSettings->Player在Unity中,ScriptingBackend决定了项目的脚本编译方式,即如何将C#代码转换为可执行代码。Unity提供了两种主要的ScriptingBackend选项:Mono和IL2CPP。它们之间的区别影响了项目的性能、平台支持、编译时间和调试体验。以下是两者的详细对比:1.Mono简介:Mono是Unity最早使用的脚本后端,基于</div>
                    </li>
                    <li><a href="/article/1834986238004785152.htm"
                           title="Python库之PyAutoGUI的简介、安装、使用方法详细攻略" target="_blank">Python库之PyAutoGUI的简介、安装、使用方法详细攻略</a>
                        <span class="text-muted">shadowtalon</span>
<a class="tag" taget="_blank" href="/search/%E7%88%AC%E8%99%AB/1.htm">爬虫</a><a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/%E7%88%AC%E8%99%AB/1.htm">爬虫</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a>
                        <div>Python库之PyAutoGUI的简介、安装、使用方法详细攻略简介PyAutoGUI是一个Python模块,它可以用来控制鼠标和键盘,实现自动化操作用户界面的功能。它适用于Windows、macOS和Linux操作系统。PyAutoGUI可以用于自动化测试、数据录入、自动化演示等场景。安装PyAutoGUI可以通过pip命令轻松安装。打开你的命令行工具(例如CMD、Terminal或者shell</div>
                    </li>
                    <li><a href="/article/1834911469565734912.htm"
                           title="深入学习-Gradle-自动化构建技术(五)Gradle-插件架构实现原理剖析-" target="_blank">深入学习-Gradle-自动化构建技术(五)Gradle-插件架构实现原理剖析-</a>
                        <span class="text-muted">2401_84002294</span>
<a class="tag" taget="_blank" href="/search/2024%E5%B9%B4%E7%A8%8B%E5%BA%8F%E5%91%98%E5%AD%A6%E4%B9%A0/1.htm">2024年程序员学习</a><a class="tag" taget="_blank" href="/search/%E5%AD%A6%E4%B9%A0/1.htm">学习</a><a class="tag" taget="_blank" href="/search/%E8%87%AA%E5%8A%A8%E5%8C%96/1.htm">自动化</a><a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a>
                        <div>6、AndroidGradlePluginV3.0.0(2017年10月)7、AndroidGradlePluginV2.3.0(2017年2月)三、Gradle构建核心流程解析1、LoadSettings2、Configure3、TaskGraph4、RunTasks5、Finished四、关于Gradle中依赖实现的原理1、通过MethodMissing机制,间接地调用DefaultDepen</div>
                    </li>
                    <li><a href="/article/1834895338121555968.htm"
                           title="【Gradle】(一)在IDEA中初始化gradle项目及其核心概念解释" target="_blank">【Gradle】(一)在IDEA中初始化gradle项目及其核心概念解释</a>
                        <span class="text-muted">挥之以墨</span>
<a class="tag" taget="_blank" href="/search/%23/1.htm">#</a><a class="tag" taget="_blank" href="/search/Gradle/1.htm">Gradle</a><a class="tag" taget="_blank" href="/search/DevOps/1.htm">DevOps</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/gradle/1.htm">gradle</a>
                        <div>这里写目录标题1.前言2.项目初始化及核心概念2.1.在IDEA中创建gradle项目2.2.gradle-wrapper2.2.1.gradle-wrapper的作用2.2.2.gradle-wrapper的初始化与配置2.3.setting.gradle2.4.build.gradle2.4.1.plugins2.4.2.版本定义2.4.3.仓库配置2.4.4.依赖管理3.总结1.前言本系列主</div>
                    </li>
                    <li><a href="/article/1834883984941740032.htm"
                           title="Android 屏幕亮度调节" target="_blank">Android 屏幕亮度调节</a>
                        <span class="text-muted">oh嘉嘉加加加</span>

                        <div>屏幕亮度调节模式:Settings.System.SCREEN_BRIGHTNESS_MODE_AUTOMATIC:值为1,自动调节亮度。Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL:值为0,手动模式。设置屏幕亮度调节模式为手动模式ContentResolvercontentResolver=getActivity().getContentResolv</div>
                    </li>
                    <li><a href="/article/1834855125110321152.htm"
                           title="IDEA测试类启动报 “java: 常量字符串过长” 解决办法" target="_blank">IDEA测试类启动报 “java: 常量字符串过长” 解决办法</a>
                        <span class="text-muted">无休居士</span>
<a class="tag" taget="_blank" href="/search/Java%E5%B7%A5%E7%A8%8B%E5%B8%B8%E8%A7%81%E5%BC%82%E5%B8%B8/1.htm">Java工程常见异常</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/intellij-idea/1.htm">intellij-idea</a><a class="tag" taget="_blank" href="/search/ide/1.htm">ide</a>
                        <div>目录标题问题描述问题分析解决办法其他办法问题描述问题分析字符串长度过长,导致idea默认使用的javac编译器编译不了。查询资料发现,原因是javac在编译期间,常量字符串最大长度为65534。解决办法Javac编译器改为Eclipse编译器。File->Settings->Build,Execution,Deployment->Compiler->JavaCompiler其他办法如果不是新建pr</div>
                    </li>
                    <li><a href="/article/1834697545679466496.htm"
                           title="docker_快速部署flask架构下的web容器" target="_blank">docker_快速部署flask架构下的web容器</a>
                        <span class="text-muted">打败404</span>
<a class="tag" taget="_blank" href="/search/docker/1.htm">docker</a><a class="tag" taget="_blank" href="/search/flask/1.htm">flask</a><a class="tag" taget="_blank" href="/search/%E6%9E%B6%E6%9E%84/1.htm">架构</a>
                        <div>保证你的机器上安装了docker并正常启动可参考阿里镜像站dockerflask项目结构如下:my-flask-app/├──Dockerfile├──app.py├──requirements.txt└──config/└──settings.pymy-flask-app/这是你的项目根目录,包含了所有与Flask应用相关的文件和配置。Dockerfile这个文件包含了构建Docker镜像所需的</div>
                    </li>
                    <li><a href="/article/1834658350663561216.htm"
                           title="请假代码java web_学生请假管理系统" target="_blank">请假代码java web_学生请假管理系统</a>
                        <span class="text-muted">喵灵魂</span>
<a class="tag" taget="_blank" href="/search/%E8%AF%B7%E5%81%87%E4%BB%A3%E7%A0%81java/1.htm">请假代码java</a><a class="tag" taget="_blank" href="/search/web/1.htm">web</a>
                        <div>文件名大小更新时间学生请假管理系统02019-05-31学生请假管理系统\Leave_System02019-05-31学生请假管理系统\Leave_System\.classpath9092019-05-01学生请假管理系统\Leave_System\.project9122019-04-29学生请假管理系统\Leave_System\.settings02019-05-31学生请假管理系统\L</div>
                    </li>
                    <li><a href="/article/1834572763470327808.htm"
                           title="Selenium自动化测试框架常见异常分析及解决方法" target="_blank">Selenium自动化测试框架常见异常分析及解决方法</a>
                        <span class="text-muted">程序员筱筱</span>
<a class="tag" taget="_blank" href="/search/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95/1.htm">软件测试</a><a class="tag" taget="_blank" href="/search/selenium/1.htm">selenium</a><a class="tag" taget="_blank" href="/search/%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7/1.htm">测试工具</a><a class="tag" taget="_blank" href="/search/%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95/1.htm">自动化测试</a><a class="tag" taget="_blank" href="/search/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95/1.htm">软件测试</a><a class="tag" taget="_blank" href="/search/%E5%8A%9F%E8%83%BD%E6%B5%8B%E8%AF%95/1.htm">功能测试</a><a class="tag" taget="_blank" href="/search/%E7%A8%8B%E5%BA%8F%E4%BA%BA%E7%94%9F/1.htm">程序人生</a><a class="tag" taget="_blank" href="/search/%E8%81%8C%E5%9C%BA%E5%92%8C%E5%8F%91%E5%B1%95/1.htm">职场和发展</a>
                        <div>01pycharm中导入selenium报错现象:pycharm中输入fromseleniumimportwebdriver,selenium标红原因1:pycharm使用的虚拟环境中没有安装selenium,解决方法:在pycharm中通过设置或terminal面板重新安装selenium原因2:当前项目下有selenium.py,和系统包名冲突导致,解决方法:重命名这个文件02驱动及本地服务类</div>
                    </li>
                    <li><a href="/article/1834475207692218368.htm"
                           title="综述论文“A Survey of Zero-Shot Learning: Settings, Methods, and Applications”" target="_blank">综述论文“A Survey of Zero-Shot Learning: Settings, Methods, and Applications”</a>
                        <span class="text-muted">硅谷秋水</span>
<a class="tag" taget="_blank" href="/search/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/1.htm">机器学习</a><a class="tag" taget="_blank" href="/search/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/1.htm">机器学习</a><a class="tag" taget="_blank" href="/search/%E7%A5%9E%E7%BB%8F%E7%BD%91%E7%BB%9C/1.htm">神经网络</a><a class="tag" taget="_blank" href="/search/%E6%B7%B1%E5%BA%A6%E5%AD%A6%E4%B9%A0/1.htm">深度学习</a>
                        <div>该零样本学习综述,发表于ACMTrans.Intell.Syst.Technol.10,2,Article13(January2019)摘要:大多数机器学习方法着重于对已经在训练中看到其类别的实例进行分类。实际上,许多应用程序需要对实例进行分类,而这些实例的类以前没有见过。零样本学习(Zero-ShotLearning)是一种强大而有前途的学习范例,其中训练实例涵盖的类别与想分类的类别是不相交的。</div>
                    </li>
                    <li><a href="/article/1834458942755926016.htm"
                           title="nvm下载node报错: Error retrieving “http://npm.taobao.org/mirrors/node/latest/SHASUMS256.txt“: HTTP Statu" target="_blank">nvm下载node报错: Error retrieving “http://npm.taobao.org/mirrors/node/latest/SHASUMS256.txt“: HTTP Statu</a>
                        <span class="text-muted">你不讲 wood</span>
<a class="tag" taget="_blank" href="/search/javascript/1.htm">javascript</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/%E5%89%8D%E7%AB%AF/1.htm">前端</a><a class="tag" taget="_blank" href="/search/node.js/1.htm">node.js</a>
                        <div>nvm下载node报错:Errorretrieving“http://npm.taobao.org/mirrors/node/latest/SHASUMS256.txt”:HTTPStatus404使用nvm下载node出现以下报错:原因是淘宝镜像源已经下架,所以访问资源报404错误找到nvm安装的路径:修改setting.txt配置文件为以下内容:root:D:\NVM_node\nvmpath</div>
                    </li>
                    <li><a href="/article/1834394168949043200.htm"
                           title="ubuntu启动 no such device grub rescue 与开机出现一横杠闪烁却进不了系统" target="_blank">ubuntu启动 no such device grub rescue 与开机出现一横杠闪烁却进不了系统</a>
                        <span class="text-muted">自动驾驶实战(AIFighting)</span>
<a class="tag" taget="_blank" href="/search/%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE/1.htm">环境配置</a>
                        <div>安装完Ubuntu系统有时候会出现开不了机的问题,一般都是由于找不到引导盘,1、nosuchdevicegrubrescue利用ubuntu安装盘启动,试用ubuntu·直接启动ubuntu,打开terminal。输入如下命令行sudoapt-getinstalllilosudolilo-M/dev/sdambr 5.关机,拔掉U盘,重启,一般就可以启动了!注意:(如果开机出现了下面的情况(2的情</div>
                    </li>
                    <li><a href="/article/1834354202432860160.htm"
                           title="android10 Settings源码解析" target="_blank">android10 Settings源码解析</a>
                        <span class="text-muted">@OuYang</span>
<a class="tag" taget="_blank" href="/search/android/1.htm">android</a>
                        <div>/packages/apps/Settings/AndroidManifest.xml.................................................................................activity-alias是Android里为了重复使用Activity而设计的。对于activity-alias标签,它有一个属性叫android:</div>
                    </li>
                    <li><a href="/article/1834193765770817536.htm"
                           title="第十四章 使用SQL Shell界面(一)" target="_blank">第十四章 使用SQL Shell界面(一)</a>
                        <span class="text-muted">Cache技术分享</span>

                        <div>第十四章使用SQLShell界面(一)执行SQL的其他方式可以使用$SYSTEM.SQL.Execute()方法从Terminal命令行执行一行SQL代码,而无需调用SQLShell。以下示例显示如何在终端提示下使用此方法:DHC-APP>SETresult=$SYSTEM.SQL.Execute("SELECTTOP5name,dob,ssnFROMSample.Person")DHC-APP></div>
                    </li>
                    <li><a href="/article/1834108385390325760.htm"
                           title="qt执行终端命令_Qt模拟Linux终端Terminal与系统交互(QProcess)" target="_blank">qt执行终端命令_Qt模拟Linux终端Terminal与系统交互(QProcess)</a>
                        <span class="text-muted">知乎视频</span>
<a class="tag" taget="_blank" href="/search/qt%E6%89%A7%E8%A1%8C%E7%BB%88%E7%AB%AF%E5%91%BD%E4%BB%A4/1.htm">qt执行终端命令</a>
                        <div>最近在搞一个数据库备份和恢复的工具,想在自己的程序里显示过程,即将gnome-ternimal的打印信息输出到我的程序里。因为要和ternimal交互,自然就想到用QProcess启用终端然后互相开始对话交互。但其中遇到的一些问题网上查了很久才最后解决,由于网上的答案并不是现成的,需要自己理解后才能有思路解决,所以在这里把我的思路过程分享出来,避免后人再踩坑。认识真实的gnome-ternimal</div>
                    </li>
                    <li><a href="/article/1834077753620656128.htm"
                           title="【C++】CLion配置cout打印语句快捷键" target="_blank">【C++】CLion配置cout打印语句快捷键</a>
                        <span class="text-muted">全真王重阳</span>
<a class="tag" taget="_blank" href="/search/C%2B%2B/1.htm">C++</a><a class="tag" taget="_blank" href="/search/c%2B%2B/1.htm">c++</a><a class="tag" taget="_blank" href="/search/%E5%BC%80%E5%8F%91%E8%AF%AD%E8%A8%80/1.htm">开发语言</a><a class="tag" taget="_blank" href="/search/clion/1.htm">clion</a><a class="tag" taget="_blank" href="/search/cout/1.htm">cout</a><a class="tag" taget="_blank" href="/search/%E6%89%93%E5%8D%B0%E8%AF%AD%E5%8F%A5/1.htm">打印语句</a><a class="tag" taget="_blank" href="/search/%E5%BF%AB%E6%8D%B7%E9%94%AE/1.htm">快捷键</a>
                        <div>点击菜单栏的File->Settings->Editor->LiveTemplates点击Define,选择C++。点击Apply和OK保存。当我们sout时,自动出现打印语句。</div>
                    </li>
                    <li><a href="/article/1833968223385645056.htm"
                           title="OLT的tag报文怎么看" target="_blank">OLT的tag报文怎么看</a>
                        <span class="text-muted">weixin_45544617</span>
<a class="tag" taget="_blank" href="/search/%E7%BD%91%E7%BB%9C/1.htm">网络</a><a class="tag" taget="_blank" href="/search/%E6%B5%8B%E8%AF%95%E7%94%A8%E4%BE%8B/1.htm">测试用例</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4%E5%BC%80%E5%8F%91/1.htm">运维开发</a><a class="tag" taget="_blank" href="/search/%E4%BA%91%E8%AE%A1%E7%AE%97/1.htm">云计算</a><a class="tag" taget="_blank" href="/search/%E5%8D%8E%E4%B8%BA/1.htm">华为</a><a class="tag" taget="_blank" href="/search/%E7%89%A9%E8%81%94%E7%BD%91/1.htm">物联网</a>
                        <div>在查看OLT(OpticalLineTerminal,光线路终端)的Tag报文时,主要涉及到对VLAN(VirtualLocalAreaNetwork,虚拟局域网)标签的处理和识别。OLT作为PON(PassiveOpticalNetwork,无源光网络)系统的核心设备,负责将光信号转换为电信号,并进行数据的转发和处理。在这个过程中,VLAN标签(Tag)起到了关键的作用,用于区分不同的用户和业务</div>
                    </li>
                    <li><a href="/article/1833946405534789632.htm"
                           title="WebStorm 配置 PlantUML" target="_blank">WebStorm 配置 PlantUML</a>
                        <span class="text-muted">weijia_kmys</span>
<a class="tag" taget="_blank" href="/search/%E5%85%B6%E4%BB%96/1.htm">其他</a><a class="tag" taget="_blank" href="/search/webstorm/1.htm">webstorm</a><a class="tag" taget="_blank" href="/search/ide/1.htm">ide</a><a class="tag" taget="_blank" href="/search/uml/1.htm">uml</a>
                        <div>1.安装PlantUML插件在WebStorm插件市场搜索PlantUMLIntegration并安装,重启WebStorm使插件生效。2.安装GraphvizPlantUML需要Graphviz来生成图形。使用Homebrew安装Graphviz:打开终端(Terminal)。确保你已经安装了Homebrew。如果没有,请先安装Homebrew,可以在Homebrew官网获取安装命令。在终端中输</div>
                    </li>
                    <li><a href="/article/1833774813726994432.htm"
                           title="Python中requirement 的使用" target="_blank">Python中requirement 的使用</a>
                        <span class="text-muted">傻乎乎的胖鱼</span>
<a class="tag" taget="_blank" href="/search/Python/1.htm">Python</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a>
                        <div>Python中requirements.txt的生成requirements.txt是Python项目中包含的一个文件,作用:用于记录所有依赖包及其精确的版本号,以便新环境使用。在原来项目中生成requirements.txt文件Terminal中执行pipfreeze>requirements.txt则项目中生成该新文件在新项目中安装requirements.txt文件Terminal中执行pi</div>
                    </li>
                    <li><a href="/article/1833712526546792448.htm"
                           title="【MacOS】mac定位服务中删除已经卸载的软件" target="_blank">【MacOS】mac定位服务中删除已经卸载的软件</a>
                        <span class="text-muted">GaoJamie</span>
<a class="tag" taget="_blank" href="/search/MacOS/1.htm">MacOS</a><a class="tag" taget="_blank" href="/search/macos/1.htm">macos</a>
                        <div>mac定位服务中删除已经卸载的软件网上的帖子真不靠谱直接右键WeTypeSettings,查找位置,丢废纸篓即可!会提示你卸载的!</div>
                    </li>
                    <li><a href="/article/1833697773283799040.htm"
                           title="Django 如何全局捕获异常和DEBUG" target="_blank">Django 如何全局捕获异常和DEBUG</a>
                        <span class="text-muted">部长y</span>
<a class="tag" taget="_blank" href="/search/django/1.htm">django</a><a class="tag" taget="_blank" href="/search/orm/1.htm">orm</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/django/1.htm">django</a><a class="tag" taget="_blank" href="/search/sqlite/1.htm">sqlite</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E6%8D%AE%E5%BA%93/1.htm">数据库</a><a class="tag" taget="_blank" href="/search/python/1.htm">python</a><a class="tag" taget="_blank" href="/search/drf/1.htm">drf</a><a class="tag" taget="_blank" href="/search/%E5%90%8E%E7%AB%AF/1.htm">后端</a><a class="tag" taget="_blank" href="/search/%E6%9D%83%E9%99%90/1.htm">权限</a>
                        <div>DEBUG默认:False一个开启、关闭调试模式的布尔值。永远不要在DEBUG开启的情况下将网站部署到生产中。调试模式的主要功能之一是显示详细的错误页面。如果你的应用程序在DEBUG为True时引发了异常,Django会显示一个详细的回溯,包括很多关于你的环境的元数据,比如所有当前定义的Django配置(来自settings.py)。视图抛出异常Django和Django-rest-framewo</div>
                    </li>
                    <li><a href="/article/1833626964674572288.htm"
                           title="如何设置es最大搜索量" target="_blank">如何设置es最大搜索量</a>
                        <span class="text-muted">有梦想永远年轻</span>

                        <div>通过kibana发起请求修改配置即可:put库名(index)/_settings?preserve_existing=true{"max_result_window":"200000000"}</div>
                    </li>
                    <li><a href="/article/1833610150515142656.htm"
                           title="vscode 使用git bash,路径分隔符缺少问题" target="_blank">vscode 使用git bash,路径分隔符缺少问题</a>
                        <span class="text-muted">huoxingwen</span>
<a class="tag" taget="_blank" href="/search/vscode/1.htm">vscode</a><a class="tag" taget="_blank" href="/search/vscode/1.htm">vscode</a>
                        <div>window使用bash--login-i使用bash时候,在系统自带的terminal里面进入,测试conda可以正常输出,但是在vscode里面输入conda发现有问题bash:C:\Users\marswennaconda3\Scripts:Nosuchfileordirectory实际路径应该要为C:\Users\marswen\anaconda3\Scripts少了\a,很明显\a在vs</div>
                    </li>
                    <li><a href="/article/1833592248206454784.htm"
                           title="如何处理软件卸载不干净的情况?" target="_blank">如何处理软件卸载不干净的情况?</a>
                        <span class="text-muted">Byyyi耀</span>
<a class="tag" taget="_blank" href="/search/%E8%BD%AF%E4%BB%B6%E5%8D%B8%E8%BD%BD/1.htm">软件卸载</a>
                        <div>如何处理软件卸载不干净的情况?一、清理注册表下载CCleaner,下载之后,点击settings,将语言改为中文。点击注册表,点击扫描问题-修复选定的问题,最好将之前的注册表完整备份。反复这一过程,直到再也扫描不出问题。二、清除C盘相关文件通过快速搜索等磁盘索引软件,定位到在C盘中的相关软件的所有文件,并全部进行删除,至此软件卸载干净。</div>
                    </li>
                    <li><a href="/article/1833591492124438528.htm"
                           title="idea中 google-java-format 插件的使用" target="_blank">idea中 google-java-format 插件的使用</a>
                        <span class="text-muted">用户昵称23</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/intellij-idea/1.htm">intellij-idea</a><a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/ide/1.htm">ide</a><a class="tag" taget="_blank" href="/search/%E5%85%A8%E6%96%87%E6%A3%80%E7%B4%A2/1.htm">全文检索</a><a class="tag" taget="_blank" href="/search/%E8%BF%90%E7%BB%B4/1.htm">运维</a>
                        <div>google-java-format是一个重新格式化Java源代码以符合GoogleJavaStyle的插件。一个google-java-format可从插件库下载也可以在IDE的File→Settings–>Plugins中下载。单击Marketplace选项卡,搜索google-java-format插件,然后单击Install按钮。默认情况下,该插件将被禁用。要在当前项目中启用它,请转到Fi</div>
                    </li>
                    <li><a href="/article/1833486662898905088.htm"
                           title="maven工程使用sonar" target="_blank">maven工程使用sonar</a>
                        <span class="text-muted">tommyhxh</span>

                        <div>maven项目配置maven的setting.xml文件Maven插件会自动把所需数据(如单元测试结果、静态检测结果等)上传到Sonar服务器上,Sonar的配置并不在每个工程的pom.xml文件里,而是在Maven的配置文件settings.xml里。在标签添加:sonartruejdbc:mysql://10.16.8.96:3306/sonar?useUnicode=true&cha</div>
                    </li>
                    <li><a href="/article/1833460001084108800.htm"
                           title="Flutter的升级和降级步骤" target="_blank">Flutter的升级和降级步骤</a>
                        <span class="text-muted">AiFlutter</span>
<a class="tag" taget="_blank" href="/search/flutter/1.htm">flutter</a>
                        <div>升级1.版本升级//升级到指定版本flutterupgrade版本号//升级到最新版本flutterupgrade2.更新开发配置启动AndroidStudio。打开Settings对话框,查看SDKManager。如果你已经打开了一个项目,请打开Tools>SDKManager。如果显示WelcometoAndroidStudio的对话框,请单击Open按钮后面的MoreOptions图标,然后</div>
                    </li>
                                <li><a href="/article/125.htm"
                                       title="apache 安装linux windows" target="_blank">apache 安装linux windows</a>
                                    <span class="text-muted">墙头上一根草</span>
<a class="tag" taget="_blank" href="/search/apache/1.htm">apache</a><a class="tag" taget="_blank" href="/search/inux/1.htm">inux</a><a class="tag" taget="_blank" href="/search/windows/1.htm">windows</a>
                                    <div>linux安装Apache 有两种方式一种是手动安装通过二进制的文件进行安装,另外一种就是通过yum 安装,此中安装方式,需要物理机联网。以下分别介绍两种的安装方式 
  
  
通过二进制文件安装Apache需要的软件有apr,apr-util,pcre 
 1,安装 apr        下载地址:htt</div>
                                </li>
                                <li><a href="/article/252.htm"
                                       title="fill_parent、wrap_content和match_parent的区别" target="_blank">fill_parent、wrap_content和match_parent的区别</a>
                                    <span class="text-muted">Cb123456</span>
<a class="tag" taget="_blank" href="/search/match_parent/1.htm">match_parent</a><a class="tag" taget="_blank" href="/search/fill_parent/1.htm">fill_parent</a>
                                    <div>fill_parent、wrap_content和match_parent的区别: 
  
1)fill_parent 
  设置一个构件的布局为fill_parent将强制性地使构件扩展,以填充布局单元内尽可能多的空间。这跟Windows控件的dockstyle属性大体一致。设置一个顶部布局或控件为fill_parent将强制性让它布满整个屏幕。 
2) wrap_conte</div>
                                </li>
                                <li><a href="/article/379.htm"
                                       title="网页自适应设计" target="_blank">网页自适应设计</a>
                                    <span class="text-muted">天子之骄</span>
<a class="tag" taget="_blank" href="/search/html/1.htm">html</a><a class="tag" taget="_blank" href="/search/css/1.htm">css</a><a class="tag" taget="_blank" href="/search/%E5%93%8D%E5%BA%94%E5%BC%8F%E8%AE%BE%E8%AE%A1/1.htm">响应式设计</a><a class="tag" taget="_blank" href="/search/%E9%A1%B5%E9%9D%A2%E8%87%AA%E9%80%82%E5%BA%94/1.htm">页面自适应</a>
                                    <div>网页自适应设计 
       网页对浏览器窗口的自适应支持变得越来越重要了。自适应响应设计更是异常火爆。再加上移动端的崛起,更是如日中天。以前为了适应不同屏幕分布率和浏览器窗口的扩大和缩小,需要设计几套css样式,用js脚本判断窗口大小,选择加载。结构臃肿,加载负担较大。现笔者经过一定时间的学习,有所心得,故分享于此,加强交流,共同进步。同时希望对大家有所</div>
                                </li>
                                <li><a href="/article/506.htm"
                                       title="[sql server] 分组取最大最小常用sql" target="_blank">[sql server] 分组取最大最小常用sql</a>
                                    <span class="text-muted">一炮送你回车库</span>
<a class="tag" taget="_blank" href="/search/SQL+Server/1.htm">SQL Server</a>
                                    <div>--分组取最大最小常用sql--测试环境if OBJECT_ID('tb') is not null drop table tb;gocreate table tb( col1 int, col2 int, Fcount int)insert into tbselect 11,20,1 union allselect 11,22,1 union allselect 1</div>
                                </li>
                                <li><a href="/article/633.htm"
                                       title="ImageIO写图片输出到硬盘" target="_blank">ImageIO写图片输出到硬盘</a>
                                    <span class="text-muted">3213213333332132</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/image/1.htm">image</a>
                                    <div>package awt; 
 
import java.awt.Color; 
import java.awt.Font; 
import java.awt.Graphics; 
import java.awt.image.BufferedImage; 
import java.io.File; 
import java.io.IOException; 
 
import javax.imagei</div>
                                </li>
                                <li><a href="/article/760.htm"
                                       title="自己的String动态数组" target="_blank">自己的String动态数组</a>
                                    <span class="text-muted">宝剑锋梅花香</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E5%8A%A8%E6%80%81%E6%95%B0%E7%BB%84/1.htm">动态数组</a><a class="tag" taget="_blank" href="/search/%E6%95%B0%E7%BB%84/1.htm">数组</a>
                                    <div>数组还是好说,学过一两门编程语言的就知道,需要注意的是数组声明时需要把大小给它定下来,比如声明一个字符串类型的数组:String str[]=new String[10];    但是问题就来了,每次都是大小确定的数组,我需要数组大小不固定随时变化怎么办呢?  动态数组就这样应运而生,龙哥给我们讲的是自己用代码写动态数组,并非用的ArrayList 看看字符</div>
                                </li>
                                <li><a href="/article/887.htm"
                                       title="pinyin4j工具类" target="_blank">pinyin4j工具类</a>
                                    <span class="text-muted">darkranger</span>
<a class="tag" taget="_blank" href="/search/.net/1.htm">.net</a>
                                    <div>pinyin4j工具类Java工具类 2010-04-24 00:47:00 阅读69 评论0 字号:大中小 
引入pinyin4j-2.5.0.jar包: 
pinyin4j是一个功能强悍的汉语拼音工具包,主要是从汉语获取各种格式和需求的拼音,功能强悍,下面看看如何使用pinyin4j。 
 
本人以前用AscII编码提取工具,效果不理想,现在用pinyin4j简单实现了一个。功能还不是很完美,</div>
                                </li>
                                <li><a href="/article/1014.htm"
                                       title="StarUML学习笔记----基本概念" target="_blank">StarUML学习笔记----基本概念</a>
                                    <span class="text-muted">aijuans</span>
<a class="tag" taget="_blank" href="/search/UML%E5%BB%BA%E6%A8%A1/1.htm">UML建模</a>
                                    <div>介绍StarUML的基本概念,这些都是有效运用StarUML?所需要的。包括对模型、视图、图、项目、单元、方法、框架、模型块及其差异以及UML轮廓。 
        模型、视与图(Model, View and Diagram) 
       &</div>
                                </li>
                                <li><a href="/article/1141.htm"
                                       title="Activiti最终总结" target="_blank">Activiti最终总结</a>
                                    <span class="text-muted">avords</span>
<a class="tag" taget="_blank" href="/search/Activiti+id+%E5%B7%A5%E4%BD%9C%E6%B5%81/1.htm">Activiti id 工作流</a>
                                    <div>1、流程定义ID:ProcessDefinitionId,当定义一个流程就会产生。 
2、流程实例ID:ProcessInstanceId,当开始一个具体的流程时就会产生,也就是不同的流程实例ID可能有相同的流程定义ID。 
3、TaskId,每一个userTask都会有一个Id这个是存在于流程实例上的。 
4、TaskDefinitionKey和(ActivityImpl activityId </div>
                                </li>
                                <li><a href="/article/1268.htm"
                                       title="从省市区多重级联想到的,react和jquery的差别" target="_blank">从省市区多重级联想到的,react和jquery的差别</a>
                                    <span class="text-muted">bee1314</span>
<a class="tag" taget="_blank" href="/search/jquery/1.htm">jquery</a><a class="tag" taget="_blank" href="/search/UI/1.htm">UI</a><a class="tag" taget="_blank" href="/search/react/1.htm">react</a>
                                    <div>在我们的前端项目里经常会用到级联的select,比如省市区这样。通常这种级联大多是动态的。比如先加载了省,点击省加载市,点击市加载区。然后数据通常ajax返回。如果没有数据则说明到了叶子节点。       针对这种场景,如果我们使用jquery来实现,要考虑很多的问题,数据部分,以及大量的dom操作。比如这个页面上显示了某个区,这时候我切换省,要把市重新初始化数据,然后区域的部分要从页面</div>
                                </li>
                                <li><a href="/article/1395.htm"
                                       title="Eclipse快捷键大全" target="_blank">Eclipse快捷键大全</a>
                                    <span class="text-muted">bijian1013</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/eclipse/1.htm">eclipse</a><a class="tag" taget="_blank" href="/search/%E5%BF%AB%E6%8D%B7%E9%94%AE/1.htm">快捷键</a>
                                    <div>Ctrl+1 快速修复(最经典的快捷键,就不用多说了)Ctrl+D: 删除当前行 Ctrl+Alt+↓ 复制当前行到下一行(复制增加)Ctrl+Alt+↑ 复制当前行到上一行(复制增加)Alt+↓ 当前行和下面一行交互位置(特别实用,可以省去先剪切,再粘贴了)Alt+↑ 当前行和上面一行交互位置(同上)Alt+← 前一个编辑的页面Alt+→ 下一个编辑的页面(当然是针对上面那条来说了)Alt+En</div>
                                </li>
                                <li><a href="/article/1522.htm"
                                       title="js 笔记 函数" target="_blank">js 笔记 函数</a>
                                    <span class="text-muted">征客丶</span>
<a class="tag" taget="_blank" href="/search/JavaScript/1.htm">JavaScript</a>
                                    <div>一、函数的使用 
1.1、定义函数变量 
var vName = funcation(params){ 
} 
 
1.2、函数的调用 
函数变量的调用:      vName(params); 
函数定义时自发调用:(function(params){})(params); 
 
1.3、函数中变量赋值 
var a = 'a'; 
var ff</div>
                                </li>
                                <li><a href="/article/1649.htm"
                                       title="【Scala四】分析Spark源代码总结的Scala语法二" target="_blank">【Scala四】分析Spark源代码总结的Scala语法二</a>
                                    <span class="text-muted">bit1129</span>
<a class="tag" taget="_blank" href="/search/scala/1.htm">scala</a>
                                    <div>1. Some操作 
  
在下面的代码中,使用了Some操作:if (self.partitioner == Some(partitioner)),那么Some(partitioner)表示什么含义?首先partitioner是方法combineByKey传入的变量, 
Some的文档说明: 
  
/** Class `Some[A]` represents existin</div>
                                </li>
                                <li><a href="/article/1776.htm"
                                       title="java 匿名内部类" target="_blank">java 匿名内部类</a>
                                    <span class="text-muted">BlueSkator</span>
<a class="tag" taget="_blank" href="/search/java%E5%8C%BF%E5%90%8D%E5%86%85%E9%83%A8%E7%B1%BB/1.htm">java匿名内部类</a>
                                    <div>组合优先于继承 
Java的匿名类,就是提供了一个快捷方便的手段,令继承关系可以方便地变成组合关系 
继承只有一个时候才能用,当你要求子类的实例可以替代父类实例的位置时才可以用继承。 
  
在Java中内部类主要分为成员内部类、局部内部类、匿名内部类、静态内部类。 
内部类不是很好理解,但说白了其实也就是一个类中还包含着另外一个类如同一个人是由大脑、肢体、器官等身体结果组成,而内部类相</div>
                                </li>
                                <li><a href="/article/1903.htm"
                                       title="盗版win装在MAC有害发热,苹果的东西不值得买,win应该不用" target="_blank">盗版win装在MAC有害发热,苹果的东西不值得买,win应该不用</a>
                                    <span class="text-muted">ljy325</span>
<a class="tag" taget="_blank" href="/search/%E6%B8%B8%E6%88%8F/1.htm">游戏</a><a class="tag" taget="_blank" href="/search/apple/1.htm">apple</a><a class="tag" taget="_blank" href="/search/windows/1.htm">windows</a><a class="tag" taget="_blank" href="/search/XP/1.htm">XP</a><a class="tag" taget="_blank" href="/search/OS/1.htm">OS</a>
                                    <div>Mac mini 型号: MC270CH-A RMB:5,688 
  
Apple 对windows的产品支持不好,有以下问题: 
  
1.装完了xp,发现机身很热虽然没有运行任何程序!貌似显卡跑游戏发热一样,按照那样的发热量,那部机子损耗很大,使用寿命受到严重的影响! 
  
2.反观安装了Mac os的展示机,发热量很小,运行了1天温度也没有那么高 
&nbs</div>
                                </li>
                                <li><a href="/article/2030.htm"
                                       title="读《研磨设计模式》-代码笔记-生成器模式-Builder" target="_blank">读《研磨设计模式》-代码笔记-生成器模式-Builder</a>
                                    <span class="text-muted">bylijinnan</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/%E8%AE%BE%E8%AE%A1%E6%A8%A1%E5%BC%8F/1.htm">设计模式</a>
                                    <div>声明: 本文只为方便我个人查阅和理解,详细的分析以及源代码请移步 原作者的博客http://chjavach.iteye.com/ 
 
 



/**
 * 生成器模式的意图在于将一个复杂的构建与其表示相分离,使得同样的构建过程可以创建不同的表示(GoF)
 * 个人理解:
 * 构建一个复杂的对象,对于创建者(Builder)来说,一是要有数据来源(rawData),二是要返回构</div>
                                </li>
                                <li><a href="/article/2157.htm"
                                       title="JIRA与SVN插件安装" target="_blank">JIRA与SVN插件安装</a>
                                    <span class="text-muted">chenyu19891124</span>
<a class="tag" taget="_blank" href="/search/SVN/1.htm">SVN</a><a class="tag" taget="_blank" href="/search/jira/1.htm">jira</a>
                                    <div>JIRA安装好后提交代码并要显示在JIRA上,这得需要用SVN的插件才能看见开发人员提交的代码。 
1.下载svn与jira插件安装包,解压后在安装包(atlassian-jira-subversion-plugin-0.10.1) 
2.解压出来的包里下的lib文件夹下的jar拷贝到(C:\Program Files\Atlassian\JIRA 4.3.4\atlassian-jira\WEB</div>
                                </li>
                                <li><a href="/article/2284.htm"
                                       title="常用数学思想方法" target="_blank">常用数学思想方法</a>
                                    <span class="text-muted">comsci</span>
<a class="tag" taget="_blank" href="/search/%E5%B7%A5%E4%BD%9C/1.htm">工作</a>
                                    <div>  对于搞工程和技术的朋友来讲,在工作中常常遇到一些实际问题,而采用常规的思维方式无法很好的解决这些问题,那么这个时候我们就需要用数学语言和数学工具,而使用数学工具的前提却是用数学思想的方法来描述问题。。下面转帖几种常用的数学思想方法,仅供学习和参考 
 
 
 
  函数思想 
  把某一数学问题用函数表示出来,并且利用函数探究这个问题的一般规律。这是最基本、最常用的数学方法</div>
                                </li>
                                <li><a href="/article/2411.htm"
                                       title="pl/sql集合类型" target="_blank">pl/sql集合类型</a>
                                    <span class="text-muted">daizj</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a><a class="tag" taget="_blank" href="/search/%E9%9B%86%E5%90%88/1.htm">集合</a><a class="tag" taget="_blank" href="/search/type/1.htm">type</a><a class="tag" taget="_blank" href="/search/pl%2Fsql/1.htm">pl/sql</a>
                                    <div>--集合类型 
/* 
  单行单列的数据,使用标量变量 
  单行多列数据,使用记录 
  单列多行数据,使用集合(。。。) 
  *集合:类似于数组也就是。pl/sql集合类型包括索引表(pl/sql table)、嵌套表(Nested Table)、变长数组(VARRAY)等 
*/ 
/* 
    --集合方法 
&n</div>
                                </li>
                                <li><a href="/article/2538.htm"
                                       title="[Ofbiz]ofbiz初用" target="_blank">[Ofbiz]ofbiz初用</a>
                                    <span class="text-muted">dinguangx</span>
<a class="tag" taget="_blank" href="/search/%E7%94%B5%E5%95%86/1.htm">电商</a><a class="tag" taget="_blank" href="/search/ofbiz/1.htm">ofbiz</a>
                                    <div>从github下载最新的ofbiz(截止2015-7-13),从源码进行ofbiz的试用 
1. 加载测试库 
ofbiz内置derby,通过下面的命令初始化测试库 
./ant load-demo (与load-seed有一些区别) 
  
2. 启动内置tomcat 
./ant start 
或 
./startofbiz.sh 
或 
java -jar ofbiz.jar 
&</div>
                                </li>
                                <li><a href="/article/2665.htm"
                                       title="结构体中最后一个元素是长度为0的数组" target="_blank">结构体中最后一个元素是长度为0的数组</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/c/1.htm">c</a><a class="tag" taget="_blank" href="/search/gcc/1.htm">gcc</a>
                                    <div>在Linux源代码中,有很多的结构体最后都定义了一个元素个数为0个的数组,如/usr/include/linux/if_pppox.h中有这样一个结构体: struct pppoe_tag {     __u16 tag_type;     __u16 tag_len;   &n</div>
                                </li>
                                <li><a href="/article/2792.htm"
                                       title="Linux cp 实现强行覆盖" target="_blank">Linux cp 实现强行覆盖</a>
                                    <span class="text-muted">dcj3sjt126com</span>
<a class="tag" taget="_blank" href="/search/linux/1.htm">linux</a>
                                    <div>发现在Fedora 10 /ubutun 里面用cp -fr src dest,即使加了-f也是不能强行覆盖的,这时怎么回事的呢?一两个文件还好说,就输几个yes吧,但是要是n多文件怎么办,那还不输死人呢?下面提供三种解决办法。 方法一 
 
 我们输入alias命令,看看系统给cp起了一个什么别名。 
  
  [root@localhost ~]# aliasalias cp=’cp -i’a</div>
                                </li>
                                <li><a href="/article/2919.htm"
                                       title="Memcached(一)、HelloWorld" target="_blank">Memcached(一)、HelloWorld</a>
                                    <span class="text-muted">frank1234</span>
<a class="tag" taget="_blank" href="/search/memcached/1.htm">memcached</a>
                                    <div>一、简介 
高性能的架构离不开缓存,分布式缓存中的佼佼者当属memcached,它通过客户端将不同的key hash到不同的memcached服务器中,而获取的时候也到相同的服务器中获取,由于不需要做集群同步,也就省去了集群间同步的开销和延迟,所以它相对于ehcache等缓存来说能更好的支持分布式应用,具有更强的横向伸缩能力。 
二、客户端 
选择一个memcached客户端,我这里用的是memc</div>
                                </li>
                                <li><a href="/article/3046.htm"
                                       title="Search in Rotated Sorted Array II" target="_blank">Search in Rotated Sorted Array II</a>
                                    <span class="text-muted">hcx2013</span>
<a class="tag" taget="_blank" href="/search/search/1.htm">search</a>
                                    <div>Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? 
Would this affect the run-time complexity? How and why? 
Write a function to determine if a given ta</div>
                                </li>
                                <li><a href="/article/3173.htm"
                                       title="Spring4新特性——更好的Java泛型操作API" target="_blank">Spring4新特性——更好的Java泛型操作API</a>
                                    <span class="text-muted">jinnianshilongnian</span>
<a class="tag" taget="_blank" href="/search/spring4/1.htm">spring4</a><a class="tag" taget="_blank" href="/search/generic+type/1.htm">generic type</a>
                                    <div>Spring4新特性——泛型限定式依赖注入 
Spring4新特性——核心容器的其他改进 
Spring4新特性——Web开发的增强 
Spring4新特性——集成Bean Validation 1.1(JSR-349)到SpringMVC  
Spring4新特性——Groovy Bean定义DSL 
Spring4新特性——更好的Java泛型操作API  
Spring4新</div>
                                </li>
                                <li><a href="/article/3300.htm"
                                       title="CentOS安装JDK" target="_blank">CentOS安装JDK</a>
                                    <span class="text-muted">liuxingguome</span>
<a class="tag" taget="_blank" href="/search/centos/1.htm">centos</a>
                                    <div>1、行卸载原来的: 
[root@localhost opt]# rpm -qa | grep java 
tzdata-java-2014g-1.el6.noarch 
java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el6_5.x86_64 
java-1.6.0-openjdk-1.6.0.0-11.1.13.4.el6.x86_64 
[root@localhost</div>
                                </li>
                                <li><a href="/article/3427.htm"
                                       title="二分搜索专题2-在有序二维数组中搜索一个元素" target="_blank">二分搜索专题2-在有序二维数组中搜索一个元素</a>
                                    <span class="text-muted">OpenMind</span>
<a class="tag" taget="_blank" href="/search/%E4%BA%8C%E7%BB%B4%E6%95%B0%E7%BB%84/1.htm">二维数组</a><a class="tag" taget="_blank" href="/search/%E7%AE%97%E6%B3%95/1.htm">算法</a><a class="tag" taget="_blank" href="/search/%E4%BA%8C%E5%88%86%E6%90%9C%E7%B4%A2/1.htm">二分搜索</a>
                                    <div>1,设二维数组p的每行每列都按照下标递增的顺序递增。 
用数学语言描述如下:p满足 
(1),对任意的x1,x2,y,如果x1<x2,则p(x1,y)<p(x2,y); 
(2),对任意的x,y1,y2, 如果y1<y2,则p(x,y1)<p(x,y2); 
2,问题: 
给定满足1的数组p和一个整数k,求是否存在x0,y0使得p(x0,y0)=k? 
3,算法分析: 
(</div>
                                </li>
                                <li><a href="/article/3554.htm"
                                       title="java 随机数 Math与Random" target="_blank">java 随机数 Math与Random</a>
                                    <span class="text-muted">SaraWon</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/Math/1.htm">Math</a><a class="tag" taget="_blank" href="/search/Random/1.htm">Random</a>
                                    <div>今天需要在程序中产生随机数,知道有两种方法可以使用,但是使用Math和Random的区别还不是特别清楚,看到一篇文章是关于的,觉得写的还挺不错的,原文地址是 
http://www.oschina.net/question/157182_45274?sort=default&p=1#answers 
 
产生1到10之间的随机数的两种实现方式: 
 

//Math
Math.roun</div>
                                </li>
                                <li><a href="/article/3681.htm"
                                       title="oracle创建表空间" target="_blank">oracle创建表空间</a>
                                    <span class="text-muted">tugn</span>
<a class="tag" taget="_blank" href="/search/oracle/1.htm">oracle</a>
                                    <div>create temporary tablespace TXSJ_TEMP   
tempfile 'E:\Oracle\oradata\TXSJ_TEMP.dbf'   
size 32m   
autoextend on   
next 32m maxsize 2048m   
extent m</div>
                                </li>
                                <li><a href="/article/3808.htm"
                                       title="使用Java8实现自己的个性化搜索引擎" target="_blank">使用Java8实现自己的个性化搜索引擎</a>
                                    <span class="text-muted">yangshangchuan</span>
<a class="tag" taget="_blank" href="/search/java/1.htm">java</a><a class="tag" taget="_blank" href="/search/superword/1.htm">superword</a><a class="tag" taget="_blank" href="/search/%E6%90%9C%E7%B4%A2%E5%BC%95%E6%93%8E/1.htm">搜索引擎</a><a class="tag" taget="_blank" href="/search/java8/1.htm">java8</a><a class="tag" taget="_blank" href="/search/%E5%85%A8%E6%96%87%E6%A3%80%E7%B4%A2/1.htm">全文检索</a>
                                    <div>需要对249本软件著作实现句子级别全文检索,这些著作均为PDF文件,不使用现有的框架如lucene,自己实现的方法如下: 
1、从PDF文件中提取文本,这里的重点是如何最大可能地还原文本。提取之后的文本,一个句子一行保存为文本文件。 
2、将所有文本文件合并为一个单一的文本文件,这样,每一个句子就有一个唯一行号。 
3、对每一行文本进行分词,建立倒排表,倒排表的格式为:词=包含该词的总行数N=行号</div>
                                </li>
                </ul>
            </div>
        </div>
    </div>

<div>
    <div class="container">
        <div class="indexes">
            <strong>按字母分类:</strong>
            <a href="/tags/A/1.htm" target="_blank">A</a><a href="/tags/B/1.htm" target="_blank">B</a><a href="/tags/C/1.htm" target="_blank">C</a><a
                href="/tags/D/1.htm" target="_blank">D</a><a href="/tags/E/1.htm" target="_blank">E</a><a href="/tags/F/1.htm" target="_blank">F</a><a
                href="/tags/G/1.htm" target="_blank">G</a><a href="/tags/H/1.htm" target="_blank">H</a><a href="/tags/I/1.htm" target="_blank">I</a><a
                href="/tags/J/1.htm" target="_blank">J</a><a href="/tags/K/1.htm" target="_blank">K</a><a href="/tags/L/1.htm" target="_blank">L</a><a
                href="/tags/M/1.htm" target="_blank">M</a><a href="/tags/N/1.htm" target="_blank">N</a><a href="/tags/O/1.htm" target="_blank">O</a><a
                href="/tags/P/1.htm" target="_blank">P</a><a href="/tags/Q/1.htm" target="_blank">Q</a><a href="/tags/R/1.htm" target="_blank">R</a><a
                href="/tags/S/1.htm" target="_blank">S</a><a href="/tags/T/1.htm" target="_blank">T</a><a href="/tags/U/1.htm" target="_blank">U</a><a
                href="/tags/V/1.htm" target="_blank">V</a><a href="/tags/W/1.htm" target="_blank">W</a><a href="/tags/X/1.htm" target="_blank">X</a><a
                href="/tags/Y/1.htm" target="_blank">Y</a><a href="/tags/Z/1.htm" target="_blank">Z</a><a href="/tags/0/1.htm" target="_blank">其他</a>
        </div>
    </div>
</div>
<footer id="footer" class="mb30 mt30">
    <div class="container">
        <div class="footBglm">
            <a target="_blank" href="/">首页</a> -
            <a target="_blank" href="/custom/about.htm">关于我们</a> -
            <a target="_blank" href="/search/Java/1.htm">站内搜索</a> -
            <a target="_blank" href="/sitemap.txt">Sitemap</a> -
            <a target="_blank" href="/custom/delete.htm">侵权投诉</a>
        </div>
        <div class="copyright">版权所有 IT知识库 CopyRight © 2000-2050 E-COM-NET.COM , All Rights Reserved.
<!--            <a href="https://beian.miit.gov.cn/" rel="nofollow" target="_blank">京ICP备09083238号</a><br>-->
        </div>
    </div>
</footer>
<!-- 代码高亮 -->
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shLegacy.js"></script>
<script type="text/javascript" src="/static/syntaxhighlighter/scripts/shAutoloader.js"></script>
<link type="text/css" rel="stylesheet" href="/static/syntaxhighlighter/styles/shCoreDefault.css"/>
<script type="text/javascript" src="/static/syntaxhighlighter/src/my_start_1.js"></script>





</body>

</html><script data-cfasync="false" src="/cdn-cgi/scripts/5c5dd728/cloudflare-static/email-decode.min.js"></script>