编译安装tree命令
查看当前的tree
[12:33:33 root@C8[ ~]#rpm -qi tree
Name : tree
Version : 1.7.0
Release : 15.el8
Architecture: x86_64
Install Date: Mon 16 Mar 2020 01:53:13 AM EDT
Group : Unspecified
Size : 111603
License : GPLv2+
Signature : RSA/SHA256, Mon 01 Jul 2019 09:53:45 PM EDT, Key ID 05b555b38483c65d
Source RPM : tree-1.7.0-15.el8.src.rpm
Build Date : Sat 11 May 2019 11:54:52 AM EDT
Build Host : x86-01.mbox.centos.org
Relocations : (not relocatable)
Packager : CentOS Buildsys <bugs@centos.org>
Vendor : CentOS
URL : http://mama.indstate.edu/users/ice/tree/
Summary : File system tree viewer
Description :
The tree utility recursively displays the contents of directories in a
tree-like format. Tree is basically a UNIX port of the DOS tree
utility.
发现版本是 Version : 1.7.0
通过官网找到最新版本为1.8
URL : http://mama.indstate.edu/users/ice/tree/
[12:33:45 root@C8[ ~]#wget http://mama.indstate.edu/users/ice/tree/src/tree-1.8.0.tgz
--2020-04-08 12:34:46-- http://mama.indstate.edu/users/ice/tree/src/tree-1.8.0.tgz
Resolving mama.indstate.edu (mama.indstate.edu)... 139.102.70.201
Connecting to mama.indstate.edu (mama.indstate.edu)|139.102.70.201|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 50286 (49K) [application/x-gzip]
Saving to: ‘tree-1.8.0.tgz’
tree-1.8.0.tgz 100%[===============================>] 49.11K 6.86KB/s in 7.2s
2020-04-08 12:34:56 (6.86 KB/s) - ‘tree-1.8.0.tgz’ saved [50286/50286]
下载好以后原地解压文件
[12:34:58 root@C8[ ~]#tar -zxf tree-1.8.0.tgz
[12:35:24 root@C8[ ~]#ll
total 64
-rw-------. 1 root root 1184 Mar 16 01:56 anaconda-ks.cfg
-rw-r--r--. 1 root root 64 Mar 27 06:15 a.txt
-rw-r--r--. 1 root root 19 Mar 31 10:37 hello.o
drwxr-xr-x. 3 root root 250 Apr 8 12:35 tree-1.8.0
-rw-r--r--. 1 root root 50286 Nov 16 2018 tree-1.8.0.tgz
查看文件夹内容
[12:35:26 root@C8[ ~]#ll ./tree-1.8.0
total 184
-rw-r--r--. 1 4437 users 12024 Nov 16 2018 CHANGES
-rw-r--r--. 1 4437 users 16408 Nov 16 2018 color.c
drwxr-xr-x. 2 root root 52 Apr 8 12:35 doc
-rw-r--r--. 1 4437 users 7497 Jan 9 2018 file.c
-rw-r--r--. 1 4437 users 3151 Jan 10 2018 hash.c
-rw-r--r--. 1 4437 users 14404 Jan 10 2018 html.c
-rw-r--r--. 1 4437 users 597 Jan 3 2018 INSTALL
-rw-r--r--. 1 4437 users 9813 Jan 10 2018 json.c
-rw-r--r--. 1 4437 users 18009 Aug 12 2004 LICENSE
-rw-r--r--. 1 4437 users 2973 Jan 18 2018 Makefile
-rw-r--r--. 1 4437 users 5740 Jun 22 2015 README
-rw-r--r--. 1 4437 users 5322 Aug 27 2008 strverscmp.c
-rw-r--r--. 1 4437 users 2403 Feb 11 2015 TODO
-rw-r--r--. 1 4437 users 36839 Jan 10 2018 tree.c
-rw-r--r--. 1 4437 users 5593 Jan 10 2018 tree.h
-rw-r--r--. 1 4437 users 7651 Jan 10 2018 unix.c
-rw-r--r--. 1 4437 users 9029 Nov 16 2018 xml.c
查看README
[12:39:55 root@C8[ ~]#cat ./tree-1.8.0/README
Please read the INSTALL file for installation instructions, particularly if
you are installing on a non-Linux machine.
This is a handy little utility to display a tree view of directories that
I wrote some time ago and just added color support to. I've decided that
since no one else has done something similar I would go ahead and release
it, even though it's barely a 1st year CS student hack. I've found it damn
handy to peruse a directory tree though, especially when someone is trying to
hide something from you.
The main distribution site for tree is here:
http://mama.indstate.edu/users/ice/tree/
ftp://mama.indstate.edu/linux/tree/
If you don't like the way it looks let me know how you think it should be
formatted. Feel free to suggest modifications and additions.
Thanks go out so the following people who have helped bring tree to the
pinnacle of perfection that it is: ;)
Francesc Rocher
- Added HTML output (-H).
- Added options -o, -L and -R.
Gerald Scheidl
- Added -S option to print ASCII graphics lines for use under linux
console when an alternate console font has been selected (might also
work under DOS telnet).
Guido Socher (and others)
- Made tree more portable. Should compile under solaris.
Mitja Lacen
- Discovered bug where tree will segmentation fault on long pathnames.
- Discovered in -L argument processing.
Nathaniel Delage
- Discovered problem with recursive symlink detection
A. Karthik
- Suggested option to remove file and directory report at end of tree
listing.
Roger Luethi
- Spotted memory over-allocation bug in read_dir().
- Submitted several patches to fix various memory leaks.
Daniel Lee
- Reported that Tru64 defines TRUE/FALSE in sys/types.h (OSF1 standard?)
Paolo Violini
- Found bug in tree that caused it to seg-fault if 50 file arguments where
given and directory coloring was turned on.
Mitsuaki Masuhara
- Discovered tree crashed on missing arguments.
- Discovered that tree did not properly encode characters in filenames
when used as URLs when using the -H option.
- Fixed issue with --charset option processing.
Johan Fredrik
- Pointed out that tree did not list large files.
Ted Tiberio
- Submitted patch which fixed a compiler issue and cleaned up HTML and CSS
code, applied CSS to all output, and fixed up HTML to 4.01 strict
standards.
David MacMahon
- Added '|' support to the pattern matching routines.
Dan Jacobson
- Pointed out that -t did not sort properly for files with the same
timestamp.
- Suggested option to change HTML title and H1 string.
- Suggested -r option for reversed alphanumeric sort ala 'ls -r'.
Kyosuke Tokoro
- Provided patch to support OS/2, fix HTML encoding, provide charset
support. Added to authors list.
Florian Ernst
- Debian maintainer who pointed out problems and applied fire to feet to fix
stuff.
Jack Cuyler
- Suggested -h option for human readable output for -s, ala ls -lh.
Jonathon Cranford
- Supplied patch to make tree under cygwin.
Richard Houser
- Provided patch to fix a colorization bug when dealing with special
files and directories that seem to have an extension.
Zurd (?)
- Suggested removing trailing slash on user supplied directory names if -f
option is used.
John Nintendud
- Pointed out broken HTML output in 1.5.1.
Mark Braker
- Suggested --filelimit option.
Michael Vogt
- Suggested -v option (version sort).
Wang Quanhong
- Provided build options for Solaris.
Craig McDaniel
- Provided build options and source mods for HP NonStop support.
Christian Grigis
- Noted that setlocale() should come before MB_CUR_MAX check.
Kamaraju Kusumanchi
- Submitted patch to remove compiler warnings for Solaris.
Martin Nagy
- Provided patch which fixes issue where indent may output more than it
should when dirs[*] is not properly cleared before use.
William C. Lathan III
- Showed that tree was not properly quoting arguments to recursively called
tree instances when using -R.
Ulrich Eckhardt
- Submitted patch for --si option.
Tim Waugh (redhat)
- Pointed out a potential memory leak in listdir().
Markus Schnalke
- Tracked down bug where tree would print "argetm" before the filename of a
symbolic link when the "target" option was specified for LINK in dircolors.
Ujjwal Kumar
- Suggested that tree backslash spaces like ls does for script use. Made
output more like ls.
Ivan Shmakov
- Pointed out multiple CLI defenciencies (via Debian)
Mantas Mikulnas
- Provided patch to make tree more reliably detect the UTF-8 locale.
Tim Mooney
- Noticed S_ISDOOR/S_IFDOOR spelling mistake for under Solaris.
Han Hui
- Pointed out possible memory overflow in read_dir (path/lbuf not equal in size
to pathsize/lbufsize.)
Ryan Hollis
- Pointed out problems with the Makefile w/ respect to OSX.
Philipp M?ller
- Provided patch for filesize sorting.
Sascha Zorn
- Pointed out that the HTML output was broken when -L 1 option was used.
Alexandre Wendling
- Pointed out that modern systems may use 32 bit uid/gids which could lead
to a potential buffer overflow in the uid/gid to name mapping functions.
Florian Sesser
- Provided patch to add JSON support.
Brian Mattern & Jason A. Donenfeld
- Provided patch to add --matchdirs functionality.
Jason A. Donenfeld
- Added --caseinsentive, renamed --ignore-case option.
- Bugged me a lot.
Stephan Gabert
- Found a bug where the wrong inode (and device) information would be printed
for symbolic links.
And many others whom I've failed to keep track of. I should have started
this list years ago.
- Steve Baker
ice@mama.indstate.edu
查看INSTALL帮助文件
[12:46:38 root@C8[ ~]#cat ./tree-1.8.0/INSTALL
Installation instructions:
1. Edit the Makefile for your OS. Comment out the Linux options and un-comment
the options for your OS.
2. Type: make
3. Type: make install
4. Enjoy colorful directory trees.
I cannot test on non-Linux machines, so please feel free to contribute
porting information, bug reports, compile options, patches, etc for porting to
other OS's to ice@mama.indstate.edu.
I would also welcome any localization efforts, particularly translating the
man page to other languages. And of course feel free to suggest options and
improvements you would like to see in tree.
查看Makefile
[12:45:11 root@C8[ ~]#cat ./tree-1.8.0/Makefile
# $Copyright: $
# Copyright (c) 1996 - 2018 by Steve Baker
# All Rights reserved
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
prefix = /usr
CC=gcc
VERSION=1.8.0
TREE_DEST=tree
BINDIR=${prefix}/bin
MAN=tree.1
MANDIR=${prefix}/man/man1
OBJS=tree.o unix.o html.o xml.o json.o hash.o color.o file.o
# Uncomment options below for your particular OS:
# Linux defaults:
CFLAGS=-ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
#CFLAGS=-O4 -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
#LDFLAGS=-s
# Uncomment for FreeBSD:
#CFLAGS=-O2 -Wall -fomit-frame-pointer
#LDFLAGS=-s
#OBJS+=strverscmp.o
# Uncomment for OpenBSD:
#TREE_DEST=colortree
#MAN=colortree.1
#CFLAGS=-O2 -Wall -fomit-frame-pointer
#LDFLAGS=-s
#OBJS+=strverscmp.o
# Uncomment for Solaris:
#CC=cc
#CFLAGS=-xO0 -v
#LDFLAGS=
#OBJS+=strverscmp.o
#MANDIR=${prefix}/share/man/man1
# Uncomment for Cygwin:
#CFLAGS=-O2 -Wall -fomit-frame-pointer -DCYGWIN
#LDFLAGS=-s
#TREE_DEST=tree.exe
#OBJS+=strverscmp.o
# Uncomment for OS X:
# It is not allowed to install to /usr/bin on OS X any longer (SIP):
#prefix = /usr/local
#CC=cc
#CFLAGS=-O2 -Wall -fomit-frame-pointer -no-cpp-precomp
#LDFLAGS=
#MANDIR=/usr/share/man/man1
#OBJS+=strverscmp.o
# Uncomment for HP/UX:
#CC=cc
#CFLAGS=-O2 -DAportable -Wall
#LDFLAGS=
#OBJS+=strverscmp.o
# Uncomment for OS/2:
#CFLAGS=-02 -Wall -fomit-frame-pointer -Zomf -Zsmall-conv
#LDFLAGS=-s -Zomf -Zsmall-conv
#OBJS+=strverscmp.o
# Uncomment for HP NonStop:
#prefix = /opt
#CC=c89
#CFLAGS=-Wextensions -WIEEE_float -g -Wnowarn=1506 -D_XOPEN_SOURCE_EXTENDED=1 \
# -Wallow_cplusplus_comments
#LDFLAGS=
#OBJS+=strverscmp.o
# AIX
#CC=cc_r -q64
#LD=ld -d64
#LDFLAGS=-lc
#OBJS+=strverscmp.o
#------------------------------------------------------------
all: tree
tree: $(OBJS)
$(CC) $(LDFLAGS) -o $(TREE_DEST) $(OBJS)
$(OBJS): %.o: %.c tree.h
$(CC) $(CFLAGS) -c -o $@ $<
clean:
if [ -x $(TREE_DEST) ]; then rm $(TREE_DEST); fi
if [ -f tree.o ]; then rm *.o; fi
rm -f *~
install: tree
install -d $(BINDIR)
install -d $(MANDIR)
if [ -e $(TREE_DEST) ]; then \
install $(TREE_DEST) $(BINDIR)/$(TREE_DEST); \
fi
install doc/$(MAN) $(MANDIR)/$(MAN)
distclean:
if [ -f tree.o ]; then rm *.o; fi
rm -f *~
dist: distclean
tar zcf ../tree-$(VERSION).tgz -C .. `cat .tarball`
修改Makefile中的安装地址
[12:48:39 root@C8[ ~]#vim ./tree-1.8.0/Makefile
prefix = /Apps
确保gss和make已安装
[12:56:21 root@C8[ ~]#type gcc
-bash: type: gcc: not found
[12:56:57 root@C8[ ~]#type make
-bash: type: make: not found
[12:58:03 root@C8[ ~]#yum -y install gcc make
CentOS-8 - AppStream 2.7 kB/s | 4.3 kB 00:01
CentOS-8 - Base 122 B/s | 3.8 kB 00:31
CentOS-8 - Extras 2.7 kB/s | 1.5 kB 00:00
Dependencies resolved.
===================================================================================================
Package Architecture Version Repository Size
===================================================================================================
Installing:
gcc x86_64 8.3.1-4.5.el8 AppStream 23 M
make x86_64 1:4.2.1-9.el8 BaseOS 498 k
Installing dependencies:
cpp x86_64 8.3.1-4.5.el8 AppStream 10 M
isl x86_64 0.16.1-6.el8 AppStream 841 k
libmpc x86_64 1.0.2-9.el8 AppStream 59 k
glibc-devel x86_64 2.28-72.el8 BaseOS 1.0 M
glibc-headers x86_64 2.28-72.el8 BaseOS 469 k
kernel-headers x86_64 4.18.0-147.5.1.el8_1 BaseOS 2.7 M
libxcrypt-devel x86_64 4.1.1-4.el8 BaseOS 25 k
Transaction Summary
===================================================================================================
Install 9 Packages
Total download size: 39 M
Installed size: 100 M
Downloading Packages:
CentOS-8 - Base 193% [=======================================================-] 1.3 k(1/9): isl-0.16.1-6.el8.x86_64.rpm 1.4 MB/s | 841 kB 00:00
(2/9): libmpc-1.0.2-9.el8.x86_64.rpm 802 kB/s | 59 kB 00:00
(3/9): glibc-devel-2.28-72.el8.x86_64.rpm 941 kB/s | 1.0 MB 00:01
(4/9): glibc-headers-2.28-72.el8.x86_64.rpm 282 kB/s | 469 kB 00:01
(5/9): cpp-8.3.1-4.5.el8.x86_64.rpm 2.9 MB/s | 10 MB 00:03
(6/9): libxcrypt-devel-4.1.1-4.el8.x86_64.rpm 118 kB/s | 25 kB 00:00
(7/9): make-4.2.1-9.el8.x86_64.rpm 839 kB/s | 498 kB 00:00
(8/9): kernel-headers-4.18.0-147.5.1.el8_1.x86_64.rpm 1.1 MB/s | 2.7 MB 00:02
(9/9): gcc-8.3.1-4.5.el8.x86_64.rpm 629 kB/s | 23 MB 00:38
---------------------------------------------------------------------------------------------------
Total 1.0 MB/s | 39 MB 00:39
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : libmpc-1.0.2-9.el8.x86_64 1/9
Running scriptlet: libmpc-1.0.2-9.el8.x86_64 1/9
Installing : cpp-8.3.1-4.5.el8.x86_64 2/9
Running scriptlet: cpp-8.3.1-4.5.el8.x86_64 2/9
Installing : kernel-headers-4.18.0-147.5.1.el8_1.x86_64 3/9
Running scriptlet: glibc-headers-2.28-72.el8.x86_64 4/9
Installing : glibc-headers-2.28-72.el8.x86_64 4/9
Installing : libxcrypt-devel-4.1.1-4.el8.x86_64 5/9
Installing : glibc-devel-2.28-72.el8.x86_64 6/9
Running scriptlet: glibc-devel-2.28-72.el8.x86_64 6/9
Installing : isl-0.16.1-6.el8.x86_64 7/9
Running scriptlet: isl-0.16.1-6.el8.x86_64 7/9
Installing : gcc-8.3.1-4.5.el8.x86_64 8/9
Running scriptlet: gcc-8.3.1-4.5.el8.x86_64 8/9
Installing : make-1:4.2.1-9.el8.x86_64 9/9
Running scriptlet: make-1:4.2.1-9.el8.x86_64 9/9
Verifying : cpp-8.3.1-4.5.el8.x86_64 1/9
Verifying : gcc-8.3.1-4.5.el8.x86_64 2/9
Verifying : isl-0.16.1-6.el8.x86_64 3/9
Verifying : libmpc-1.0.2-9.el8.x86_64 4/9
Verifying : glibc-devel-2.28-72.el8.x86_64 5/9
Verifying : glibc-headers-2.28-72.el8.x86_64 6/9
Verifying : kernel-headers-4.18.0-147.5.1.el8_1.x86_64 7/9
Verifying : libxcrypt-devel-4.1.1-4.el8.x86_64 8/9
Verifying : make-1:4.2.1-9.el8.x86_64 9/9
Installed:
gcc-8.3.1-4.5.el8.x86_64 make-1:4.2.1-9.el8.x86_64
cpp-8.3.1-4.5.el8.x86_64 isl-0.16.1-6.el8.x86_64
libmpc-1.0.2-9.el8.x86_64 glibc-devel-2.28-72.el8.x86_64
glibc-headers-2.28-72.el8.x86_64 kernel-headers-4.18.0-147.5.1.el8_1.x86_64
libxcrypt-devel-4.1.1-4.el8.x86_64
进入源代码目录后make
[13:02:48 root@C8[ tree-1.8.0]#make -j 4
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o tree.o tree.c
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o unix.o unix.c
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o html.o html.c
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o xml.o xml.c
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o json.o json.c
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o hash.o hash.c
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o color.o color.c
gcc -ggdb -pedantic -Wall -DLINUX -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -c -o file.o file.c
gcc -o tree tree.o unix.o html.o xml.o json.o hash.o color.o file.o
进行编译安装
[13:03:13 root@C8[ tree-1.8.0]#make install
install -d /Apps/bin
install -d /Apps/man/man1
if [ -e tree ]; then \
install tree /Apps/bin/tree; \
fi
install doc/tree.1 /Apps/man/man1/tree.1
编译安装完成,按路径执行程序
[13:04:22 root@C8[ tree-1.8.0]#/Apps/bin/tree
.
├── CHANGES
├── color.c
├── color.o
├── doc
│ ├── tree.1
│ ├── tree.1.fr
│ └── xml.dtd
├── file.c
├── file.o
├── hash.c
├── hash.o
至此,编译安装完成!
新旧tree同在!
编译安装tree命令的更多相关文章
- 编译安装 tree 命令
文章目录 下载源码包 编译源码包 tree下载地址:http://mama.indstate.edu/users/ice/tree/ Centos发行版,可以直接使用命令 yum -y install ...
- Linux源代码编译安装tree命令
wget ftp://mama.indstate.edu/linux/tree/tree-1.6.0.tgz .tgz cd tree- make && make install
- centos安装tree命令
centos安装tree命令 sudo yum -y install tree windows安装tree命令 我的另一篇
- mac 上面安装 tree 命令
相信很多使用过Linux的用户都用过tree命令,它可以像windows的文件管理器一样清楚明了的显示目录结构. 但是mac下默认是没有 tree命令的. 1.我们可以使用find命令模拟出tree命 ...
- day04 - linux常用命令、目录说明以及ubuntu解锁root用户,安装tree命令
echo abcdefg >> aa.txt //向aa.txt文件末尾追加 abcdefg 字符串 1 基础命令: clear //清屏 whoami //查看当前所登录的用户 who ...
- ubantu 安装tree命令
前提:必须安装好VMware tools 在linux系统中找不到tree这个命令时,需要安装,如ubuntu用下面的命令就可以安装tree这个命令工具,其他linux系统类似. 1 sudo apt ...
- Linux 安装 tree命令
通过yum在线安装tree包 yum install tree -y
- Linux编译安装相关命令
1. configuer configure 是一个shell脚本,用来检测安装平台是否符合要求,并通过配置参数生成makefile文件 2. make (make all 的简写) 编译命令, ...
- Linux 下编译安装xCache命令速记
注意要先确保/path-to-php/bin/php-config存在下载链接: http://pan.baidu.com/s/1hqh5pDM #解压xcache源代码tar -zvxf xcach ...
随机推荐
- [计算机网络]图解HTTP阅读笔记
总述 书的定位:一本十分浅显的HTTP书籍,主要介绍了HTTP与HTTPS.适合入门了解,很多地方都是蜻蜓点水,但稍微深入的地方能让人了解重点在哪,后面应该有针对性地阅读深入书籍. 主要内容:介绍了T ...
- 云计算openstack核心组件——nova计算服务(7)
一.nova介绍: Nova 是 OpenStack 最核心的服务,负责维护和管理云环境的计算资源.OpenStack 作为 IaaS 的云操作系统,虚拟机生命周期管理也就是通过 Nova ...
- netty全局分析1
这个系列都是别人的分析文 https://www.jianshu.com/p/ac7fb5c2640f 一丶 Netty基础入门 Netty是一个高性能.异步事件驱动的NIO框架,它提供了对TCP.U ...
- 解Bug之路-记一次对端机器宕机后的tcp行为
解Bug之路-记一次对端机器宕机后的tcp行为 前言 机器一般过质保之后,就会因为各种各样的问题而宕机.而这一次的宕机,让笔者观察到了平常观察不到的tcp在对端宕机情况下的行为.经过详细跟踪分析原因之 ...
- PHP代码审计学习(1)
全局变量与超全局变量 $GLOBALS $GLOBALS 是PHP的一个超级全局变量组,在一个PHP脚本的全部作用域中都可以访问,$GLOBALS 是一个包含了全部变量的全局组合数组.变量的名字就是数 ...
- jpeg编解码概述
本博文为概览性介绍.后面有空了再分几篇博文分别介绍所用到的技术细节. 1.编解码目标 编码和解码是个逆过程.jpeg编码的目的在于图形去冗余,进行数据压缩,解码的目的在于还原图像,使能够进行预览. 2 ...
- leetcode1558题解【贪心】
leetcode1558.得到目标数组的最少函数调用次数 题目链接 算法 贪心 时间复杂度O(nlogN),N为数组中最大的那个数. 1.题意就是给定一个函数,该函数有两种功能,一种就是将数组中的所有 ...
- 中秋礼物!开源即时通信GGTalk安卓版全新源码!
经过连续两个多月的努力(开发.调试.测试.改bug),我们终于赶在中秋国庆之前能把全新的GGTalk Android版本献给大家. 4年之前我们就推出了GGTalk Android的第一个版本,但是功 ...
- Python练习题 017:三支乒乓球队出赛名单
[Python练习题 017] 两个乒乓球队进行比赛,各出三人.甲队为a,b,c三人,乙队为x,y,z三人.已抽签决定比赛名单.有人向队员打听比赛的名单.a说他不和x比,c说他不和x,z比.请编程序找 ...
- unity 3d 三、空间与运动
3D游戏编程第三次作业 简答并用程序验证[建议做] 游戏对象运动的本质是什么? 游戏对象运动的本质是游戏对象Position.Rotate.Scale属性数值的变化. 请用三种方法以上方法,实现物体的 ...