linux gcc 示例_最好的Linux示例

linux gcc 示例

Linux is a powerful operating system that powers most servers and most mobile devices. In this guide, we will show you examples of how to use some of its most powerful features. This involves using the Bash command line.

Linux是功能強大的操作系統,可為大多數服務器和大多數移動設備提供動力。 在本指南中,我們將向您展示如何使用其一些最強大功能的示例。 這涉及使用Bash命令行。

12個簡單實用的Linux命令 (12 Simple and Useful Linux Commands)

The commands listed here are basic, and will help you get started quickly. But they’re also powerful, and they’ll continue to be useful as your Linux expertise expands.

此處列出的命令是基本命令,可幫助您快速入門。 但是它們也很強大,隨著您的Linux專業知識的擴展,它們將繼續發揮作用。

  1. echo Command: This takes the text you give it and sends it somewhere— back to the screen, to a file, or to another command. Example: echo "hello!"

    echo命令:這會將您提供的文本發送到某個地方-返回屏幕,文件或另一個命令。 示例: echo "hello!"

  2. cat Command: To display the contents of a text file, just type cat myfile.

    cat命令:要顯示文本文件的內容,只需鍵入cat myfile

  3. find Command: It does what it says, and it’s good at it. Use it to locate files by path, size, date, owner and a bunch of other useful filters. Example: find . -type f -mtime -1h # List files in this directory modified in the past hour.

    find Command:它按其說的做,而且很擅長。 使用它可以按路徑,大小,日期,所有者和其他許多有用的過濾器查找文件。 示例: find . -type f -mtime -1h # List files in this directory modified in the past hour find . -type f -mtime -1h # List files in this directory modified in the past hour

  4. date Command: Just type date when you want to know what time it is. Example: date "+It's %l:%m%p on %A". Use it in a script to name files according to the current date.

    date命令:只要想知道現在幾點,就輸入date。 示例: date "+It's %l:%m%p on %A" 。 在腳本中使用它可以根據當前日期命名文件。

  5. ls Command: What’s in this directory? Combine ls with some useful flags to display and sort directory contents by date and size. It also gives you lots of options for formatting the output.

    ls命令:此目錄中有什么? 將ls與一些有用的標志結合使用,以按日期和大小顯示和排序目錄內容。 它還為您提供了許多格式化輸出的選項。

  6. pwd Command: Where am I? Linux can be unforgiving, particularly when you delete something. Make sure you know are before you issue your commands.

    pwd命令:我在哪里? Linux可能會令人寬容,尤其是在刪除某些內容時。 發出命令之前,請確保您已知道。

  7. mail Command: Linux’s mail program isn’t good looking, but it can be really helpful. You can create a message and add text, recipients, and attachments all in one command. Example: echo "We're having a great time." | mail -s "Wish you were here!" -A postcard.png -t mom@example.com

    mail命令:Linux的郵件程序雖然外觀不好,但是確實很有幫助。 您可以創建一條消息,并在一個命令中添加文本,收件人和附件。 示例: echo "We're having a great time." | mail -s "Wish you were here!" -A postcard.png -t mom@example.com echo "We're having a great time." | mail -s "Wish you were here!" -A postcard.png -t mom@example.com

  8. cut Command: When you have a string with separators in it, use cut to filter out certain fields. Example: echo "this, that, and the other" | cut -d, -f2 # "that"

    cut命令:當字符串中包含分隔符時,請使用cut過濾掉某些字段。 示例: echo "this, that, and the other" | cut -d, -f2 # "that" echo "this, that, and the other" | cut -d, -f2 # "that"

  9. grep Command: To find lines of text that contain a certain string, use grep. Example: grep 'root' /etc/passwd # root:x:0:0:root:/root:/bin/bash

    grep命令:要查找包含特定字符串的文本行,請使用grep。 示例: grep 'root' /etc/passwd # root:x:0:0:root:/root:/bin/bash

  10. sed Command: Use sed to find and change a substring in a piece of text. Example: echo "this, that, and the other" | sed 's/that/those/' # "this, those, and the other"

    sed命令:使用sed查找和更改一段文本中的子字符串。 示例: echo "this, that, and the other" | sed 's/that/those/' # "this, those, and the other" echo "this, that, and the other" | sed 's/that/those/' # "this, those, and the other"

  11. shutdown Command: Use this command to shut down the system and turn off the power. Example: shutdown -h now shuts down system immediately. shutdown -h +5 shuts down system after five minutes.

    shutdown命令:使用此命令可關閉系統并關閉電源。 示例: shutdown -h now立即關閉系統。 shutdown -h +5五分鐘后關閉系統。

  12. wget Command: Use wget to download files from the command line.

    wget命令:使用wget下載文件的命令行。

    Example:

    例:

    wget http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz

    wget http://ftp.gnu.org/gnu/wget/wget-1.5.3.tar.gz

Use these commands in scripts and at the command line. They’re all very powerful commands, and Linux’s main page has a lot more information about each one.

在腳本和命令行中使用這些命令。 它們都是非常強大的命令,Linux主頁上有很多有關每個命令的信息。

Linux用戶管理命令示例 (Linux User Management Commands Example)

Also, important commands used for System Administrators are following:

另外,用于系統管理員的重要命令如下:

  1. uptime Command: In Linux, the uptime command shows how long your system has been running and the number of users are currently logged in. It also displays load average for 1,5 and 15 minutes intervals.

    uptime命令:在Linux中,uptime命令顯示系統已運行了多長時間以及當前已登錄的用戶數。它還顯示了1,5和15分鐘間隔的平均負載。

  2. w Command: This will display users currently logged in and their process, along with load averages. Also shows the login name, tty name, remote host, login time, idle time, JCPU, PCPU, command and processes.

    w命令:它將顯示當前登錄的用戶及其進程以及平均負載。 還顯示登錄名,tty名稱,遠程主機,登錄時間,空閑時間,JCPU,PCPU,命令和進程。

  3. users Command: displays currently logged in users. This command don’t have other parameters other than help and version.

    users命令:顯示當前登錄的用戶。 該命令除了help和version之外沒有其他參數。

  4. who Command: the who command simply returns the user name, date, time and host information. The who command is similar to the w command. Unlike the w command, who doesn’t print what users are doing.

    who命令:who命令僅返回用戶名,日期,時間和主機信息。 who命令類似于w命令。 與w命令不同,誰不打印用戶正在做什么。

  5. whoami Command: the whoami command prints the name of the current user. You can also use “who am i” to display the current user. If you are logged in as a root using sudo command, “whoami” returns root as current user. Use “who am i” if you want to know the exact user logged in.

    whoami命令:whoami命令顯示當前用戶的名稱。 您也可以使用“我是誰”來顯示當前用戶。 如果使用sudo命令以root用戶身份登錄,“ whoami”將以root用戶身份返回root。 如果您想知道確切的用戶登錄名,請使用“我是誰”。

  6. ls Command: ls displays a list of files in human readable format.

    ls命令:ls以易于閱讀的格式顯示文件列表。

  7. crontab Command: list schedule jobs for current user with the crontab command and -l option.

    crontab命令:使用crontab命令和-l選項列出當前用戶的調度作業。

  8. less Command: the less command allows you to quickly view a file. You can page up and down. Press ‘q‘ to quit from the less window.

    less命令:less命令可讓您快速查看文件。 您可以上下翻頁。 按“ q”從較少窗口中退出。

  9. more Command: the more command allows you to quickly view a file and shows details in percentage. You can page up and down. Press ‘q‘ to quit out from the more window.

    more命令:more命令可讓您快速查看文件并以百分比顯示詳細信息。 您可以上下翻頁。 按“ q”退出更多窗口。

  10. cp Command: Copy a file from its source to its destination while preserving the same mode.

    cp命令:在保留相同模式的同時,將文件從其源復制到目標。

如何建立使用者 (How to Create a User)

使用adduseruseradd命令將新用戶添加到系統中。 (Use the adduser or useradd command to add a new user to your system.)

$ sudo adduser username

Be sure to replace username with the user that you want to create.

確保將username替換為您要創建的用戶。

使用passwd命令更新新用戶的密碼。 (Use the passwd command to update the new user’s password.)

$ sudo passwd username

A strong password is highly recommended!

強烈建議您使用強密碼!

如何創建一個Sudo用戶 (How to Create a Sudo User)

To create a sudo user, you need to create a regular user first using the command above, then add this user to the group of sudoers using the usermod command.

要創建sudo用戶,您需要首先使用上面的命令創建一個普通用戶,然后使用usermod命令將該用戶添加到sudoers組中。

在Debian系統(Ubuntu / LinuxMint / ElementryOS)上, sudo組的成員具有sudo特權。 (On Debian systems (Ubuntu/LinuxMint/ElementryOS), members of the sudo group have sudo privileges.)
$ sudo usermod -aG sudo username
在基于RHEL的系統(Fedora / CentO)上, wheel組的成員具有sudo特權。 (On RHEL based syatems (Fedora/CentOs), members of the wheel group have sudo privilages.)
$ sudo usermod -aG wheel username

如何刪除用戶 (How to Delete a User)

對于Debian(Ubuntu) (For Debian (Ubuntu))
$ sudo deluser username
對于RHEL(Fedora / CentOS) (For RHEL (Fedora/CentOS))
$ sudo userdel username
創建組并添加用戶 (Creating groups and adding users)
$ sudo groupadd editorial
$ sudo usermod -a -G editorial username

注意:以上所有命令在root模式下無需sudo即可執行 (Note: All the above commands can be executed without sudo in root mode)

To switch to root on ubuntu, run the ?su -i command followed by the password of the user logged in. Prompt changes to # instead of $.

要切換到ubuntu上的root用戶,請運行su -i命令,然后輸入登錄用戶的密碼。提示更改為#而不是$

在Debian系統(Ubuntu / LinuxMint / ElementryOS)上, sudo組的成員具有sudo特權。 (On Debian systems (Ubuntu/LinuxMint/ElementryOS), members of the sudo group have sudo privileges.)
$ sudo usermod -aG sudo username

如何建立群組 (How to Create a Group)

To create a group, use the command groupadd

要創建組,請使用命令groupadd

$ sudo groupadd groupname

如何刪除群組 (How to delete group)

To delete a group, use the command ‘groupdel’

要刪除組,請使用命令“ groupdel”

$ sudo groupdel grouname

Linux查找命令示例 (The Linux Find Command Example)

使用查找命令 (Using the Find Command)

The Linux find command is a powerful tool to help you locate files and directories on your server. With a little practice, you can easily track things down based on name, type, size, or date (when they were created or last updated).

Linux find命令是一個功能強大的工具,可幫助您在服務器上查找文件和目錄。 稍作練習,您就可以輕松地根據名稱,類型,大小或日期(創建或最后更新的時間)來跟蹤內容。

Think of find as your eager helper:

將find視為您急切的幫助者:

You: “I’m looking for something on my server.”

您:“我正在服務器上尋找東西。”

Find: “I can help! What can you tell me about it?”

發現:“我可以幫助您! 你能告訴我什么?”

You: “It was a file, bigger than 2GB, somewhere under my home directory, updated in the last 48 hours.”

您:“它是一個文件,大于2GB,位于我的主目錄下,在過去48小時內已更新。”

Find: “Tada!”

找到:“多田!”

Find is a program, so really you’d have to tell it find ~ -type f -size +2G.

Find是一個程序,所以您真的必須告訴它find ~ -type f -size +2G

Here are some sample commands using find:

以下是一些使用find的示例命令:

  • find ~ -type d # Show me all the subdirectories inside my home directory

    find ~ -type d # Show me all the subdirectories inside my home directory

  • find / -type f -name 'todo.txt' # Show me files named 'todo.txt' anywhere under the root directory (i.e. anywhere)

    find / -type f -name 'todo.txt' # Show me files named 'todo.txt' anywhere under the root directory (ie anywhere)

The first parameter always names the directory in which we’ll look. In our examples above, these are ~ (home directory of the current user) and / (root directory of the filesystem).

第一個參數始終命名我們將在其中查找的目錄。 在上面的示例中,它們是?(當前用戶的主目錄)和/(文件系統的根目錄)。

Other parameters are optional and can be combined in any ways you find useful:

其他參數是可選的,可以以您認為有用的任何方式組合:

  • The type parameter allows you to constrain the search for files only (f), directories only (d) or symbolic links (l). If you omit the type parameter, you’ll be searching for all of these types.

    使用type參數可以限制僅搜索文件(f),僅目錄(d)或符號鏈接(l)的搜索。 如果省略type參數,則將搜索所有這些類型。
  • The name parameter lets you specify what you want to find by name, either with a literal string (‘filename.txt’) or using wildcards (‘file?.*’).

    通過name參數,您可以使用文字字符串('filename.txt')或通配符('file?。*')指定要按名稱查找的內容。

man find will show you many more parameters, and is worth reviewing. Find can locate files by name, user, creation date, size and much more. Next time you’re looking for something, find it!

man find將為您顯示更多參數,并且值得回顧。 查找可以按名稱,用戶,創建日期,大小等查找文件。 下次您要尋找東西時,找到它!

Linux dd命令示例 (Linux dd Command Example)

The “dd” command can be used to create a file of a specific size. This is useful if you would like to test download speeds, or any other tests, and need a file of a specific size.

“ dd”命令可用于創建特定大小的文件。 如果您想測試下載速度或任何其他測試,并且需要特定大小的文件,這將很有用。

dd if=/dev/zero of=file_name.txt bs=1024k count=10

This will create a file of 1MB called file_name.txt.

這將創建一個1MB的文件,名為file_name.txt。

bs is your byte size and count represent the number of blocks. An easy way to look at is 1024K X 10.

bs是您的字節大小,計數表示塊數。 一個簡單的方法是1024K X 10。

Here is an even simpler way to create a 1MB file:

這是創建1MB文件的更簡單方法:

dd if=/dev/zero of=file_name.txt bs=1MB count=1

如何編寫Linux Bash腳本的示例 (Example of how to write a Linux Bash Script)

編寫Bash腳本 (Writing a Bash Script)

By typing commands on the Linux command line, you can give the server instructions to get some simple tasks done. A shell script is a way to put together a series of instructions to make this easier. Shell scripts become even more powerful when you add logic like if and while to automatically control how they behave as circumstances change.

通過在Linux命令行上鍵入命令,您可以為服務器提供指令以完成一些簡單的任務。 Shell腳本是一種將一系列指令組合在一起的方法,可簡化此操作。 當您添加諸如ifwhile類的邏輯以自動控制它們隨環境變化的行為時,Shell腳本將變得更加強大。

什么是Bash? (What’s Bash?)

Bash is the name of a command line interpreter, a program that makes sense of the Linux commands you enter at the command prompt, or in your script.

Bash是命令行解釋器的名稱,該程序可以理解您在命令提示符下或腳本中輸入的Linux命令。

腳本中有什么? (What’s in a Script?)

A script is just a file. A basic script is made up of an introductory line that tells the server what to make of it, and one or more instructions to execute. Here’s an example:

腳本只是一個文件。 一個基本腳本由一個介紹性行和一個或多個要執行的指令組成,該行告訴服務器該怎么做。 這是一個例子:

#!/bin/bash
echo "Hi. I’m your new favorite bash script."

The first line has special meaning, which we’ll discuss below. The second line is just a Linux command, one you could type out on the command line.

第一行具有特殊含義,我們將在下面討論。 第二行只是一個Linux命令,您可以在命令行中鍵入該命令。

有何評論? (What’s a Comment?)

Comments are text you add to your script that you intend bash to ignore. Comments start with a pound sign, and are useful for annotating your code so you and other users can understand it.

注釋是您添加到腳本中希望bash忽略的文本。 注釋以井號開頭,對于注釋您的代碼很有用,以便您和其他用戶可以理解它。

To add a comment, type the # character, followed by any text that’s helpful you. Bash will ignore the # and everything after it.

要添加評論,請鍵入#字符,然后輸入任何對您有幫助的文本。 Bash將忽略#及其后面的所有內容。

Note: the first line of the script is not a comment. This line is always first, always starts with #! and has special meaning to bash.

注意:腳本的第一行不是注釋。 此行始終是第一行,始終以#!開頭#! 對bash有特殊的意義

Here’s the script from before, commented:

這是之前的腳本,評論道:

#!/bin/bash # Designates the path to the bash program. Must start with '#!' (but isn't a comment).
echo "Hi. I’m your new favorite bash script." # 'echo' is a program that sends a string to the screen.

執行腳本 (Executing a Script)

You can open a text editor, paste that example code and save the file, and you’ve got a script. Scripts are conventionally named ending in ‘.sh,’ so you might save that code as myscript.sh.

您可以打開一個文本編輯器,粘貼該示例代碼并保存文件,然后便有了一個腳本。 腳本通常以“ .sh”結尾,因此您可以將該代碼另存為myscript.sh。

The script won’t execute until we do 2 things:

在執行以下兩項操作之前,腳本不會執行:

First, make it executable. (We’ll only have to do this once.) Linux relies extensively on file permissions. They determine a lot about how your server behaves. There’s a lot to know about permissions, but for now we only need to know this: you can’t run your script until you give yourself execute permissions. To do that, type:

首先,使其可執行。 (我們只需要這樣做一次。)Linux廣泛依賴于文件權限。 它們決定了服務器的行為方式。 關于權限有很多要了解的內容,但是現在我們只需要知道這一點:您必須給自己執行權限后才能運行腳本。 為此,請鍵入:

chmod +x my script.sh

chmod +x my script.sh

Second, run it. We execute the script from the command line just like any other command like ls or date. The script name is the command, and you need to precede it with a ‘./’ when you call it:

其次,運行它。 與其他命令(例如lsdate一樣,我們從命令行執行腳本。 腳本名稱是命令,調用時需要在其前面加上“ ./”:

./myscript.sh # Outputs "Hi. I'm your new favorite bash script." (This part is a comment!)

./myscript.sh # Outputs "Hi. I'm your new favorite bash script." (This part is a comment!)

有條件的 (Conditionals)

Sometimes you want your script to do something only if something else is true. For example, print a message only if a value is below a certain limit. Here’s an example of using if to do that:

有時,您希望腳本僅在其他情況正確時才執行某些操作。 例如,僅當值小于某個限制時才打印消息。 這是使用if進行操作的示例:

#!/bin/bashcount=1 # Create a variable named count and set it to 1if [[ $count -lt 11 ]]; then # This is an if block (or conditional). Test to see if $count is 10 or less. If it is, execute the instructions inside the block.echo "$count is 10 or less" # This will print, because count = 1.
fi # Every if ends with fi

Similarly, we can arrange the script so it executes an instruction only while something is true. We’ll change the code so that the value of the count variable changes:

同樣,我們可以安排腳本,以便僅在某些情況正確時才執行指令。 我們將更改代碼,以使count變量的值更改:

#!/bin/bashcount=1 # Create a variable named count and set it to 1while [[ $count -lt 11 ]]; do # This is an if block (or conditional). Test to see if $count is 10 or less. If it is, execute the instructions inside the block.echo "$count is 10 or less" # This will print as long as count <= 10.count=$((count+1)) # Increment count
done # Every while ends with done

The output of this version of myscript.sh will look like this:

此版本的myscript.sh的輸出將如下所示:

"1 is 10 or less"
"2 is 10 or less"
"3 is 10 or less"
"4 is 10 or less"
"5 is 10 or less"
"6 is 10 or less"
"7 is 10 or less"
"8 is 10 or less"
"9 is 10 or less"
"10 is 10 or less"

真實腳本 (Real World Scripts)

These examples aren’t terribly useful, but the principles are. Using while, if, and any command you might otherwise type manually, you can create scripts that do valuable work.

這些示例并不是非常有用,但是原理是有用的。 使用whileif和其他可能手動鍵入的命令,可以創建執行重要工作的腳本。

翻譯自: https://www.freecodecamp.org/news/linux-example-bash-command-line/

linux gcc 示例

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/390906.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/390906.shtml
英文地址,請注明出處:http://en.pswp.cn/news/390906.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

帆軟報表和jeecg的進一步整合--ajax給后臺傳遞map類型的參數

下面是頁面代碼&#xff1a; <% page language"java" contentType"text/html; charsetUTF-8" pageEncoding"UTF-8"%> <%include file"/context/mytags.jsp"%> <% String deptIds (String)request.getAttribute("…

@Nullable 注解的用法

問題&#xff1a;Nullable 注解的用法 我看到java中的一些方法聲明為: void foo(Nullable Object obj){…}在這里Nullable是什么意思?這是不是意味著輸入可以為空? 沒有這個注解&#xff0c;輸入仍然可以是null&#xff0c;所以我猜這不是它的用法? 回答一 它清楚地說明…

WebLogic調用WebService提示Failed to localize、Failed to create WsdlDefinitionFeature

在本地Tomcat環境下調用WebService正常&#xff0c;但是部署到WebLogic環境中&#xff0c;則提示警告&#xff1a;[Failed to localize] MEX0008.PARSING_MDATA_FAILURE<SOAP_1_2 ......警告&#xff1a;[Failed to localize] MEX0008.PARSING_MDATA_FAILURE<SOAP_1_1 ..…

呼吁開放外網_服裝數據集:呼吁采取行動

呼吁開放外網Getting a dataset with images is not easy if you want to use it for a course or a book. Yes, there are many datasets with images, but few of them are suitable for commercial or educational use.如果您想將其用于課程或書籍&#xff0c;則獲取帶有圖像…

git push命令_Git Push命令解釋

git push命令The git push command allows you to send (or push) the commits from your local branch in your local Git repository to the remote repository.git push命令允許您將提交(或推送 )從本地Git存儲庫中的本地分支發送到遠程存儲庫。 To be able to push to you…

在Java里面使用Pairs或者二元組

問題&#xff1a;在Java里面使用Pairs或者二元組 在Java里面&#xff0c;我的Hashtable要用到一個元組結構。在Java里面&#xff0c;我可以使用的什么數據結構呢&#xff1f; Hashtable<Long, Tuple<Set<Long>,Set<Long>>> table ...回答一 我不認…

github 搜索技巧

1、關鍵詞 指定開發語言 bitcoin language:javascript 2、關鍵詞 stars 數量 forks 數量 bitcoin stars:>100 forks:>50

React JS 組件間溝通的一些方法

剛入門React可能會因為React的單向數據流的特性而遇到組件間溝通的麻煩&#xff0c;這篇文章主要就說一說如何解決組件間溝通的問題。 1.組件間的關系 1.1 父子組件 ReactJS中數據的流動是單向的&#xff0c;父組件的數據可以通過設置子組件的props傳遞數據給子組件。如果想讓子…

數據可視化分析票房數據報告_票房收入分析和可視化

數據可視化分析票房數據報告Welcome back to my 100 Days of Data Science Challenge Journey. On day 4 and 5, I work on TMDB Box Office Prediction Dataset available on Kaggle.歡迎回到我的100天數據科學挑戰之旅。 在第4天和第5天&#xff0c;我將研究Kaggle上提供的TM…

sql limit子句_SQL子句解釋的位置:之間,之間,類似和其他示例

sql limit子句什么是SQL Where子句&#xff1f; (What is a SQL Where Clause?) WHERE子句(和/或IN &#xff0c; BETWEEN和LIKE ) (The WHERE Clause (and/or, IN , BETWEEN , and LIKE )) The WHERE clause is used to limit the number of rows returned.WHERE子句用…

在Java里面使用instanceof的性能影響

問題&#xff1a;在Java里面使用instanceof的性能影響 我正在寫一個應用程序&#xff0c;其中一種設計方案包含了instanceof操作的大量使用。雖然我知道面向對象設計通常試圖避免使用instanceof&#xff0c;但那是另一回事了&#xff0c;這個問題純粹只是討論與性能有關。我想…

Soot生成控制流圖

1.將soot.jar文件復制到工程bin目錄下&#xff1b;2.在cmd中執行如下命令java -cp soot-trunck.jar soot.tools.CFGViewer --soot-classpath .;"%JAVA_HOME%"\jre\lib\rt.jar com.wauoen.paper.classes.Activity其中&#xff0c;JAVA_HOME是jdk目錄&#xff1b;com.w…

Centos 6.5安裝MySQL-python

報錯信息&#xff1a;Using cached MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module&g…

react 最佳實踐_最佳React教程

react 最佳實踐React is a JavaScript library for building user interfaces. It was voted the most loved in the “Frameworks, Libraries, and Other Technologies” category of Stack Overflow’s 2017 Developer Survey.React是一個用于構建用戶界面JavaScript庫。 在S…

先知模型 facebook_Facebook先知

先知模型 facebook什么是先知&#xff1f; (What is Prophet?) “Prophet” is an open-sourced library available on R or Python which helps users analyze and forecast time-series values released in 2017. With developers’ great efforts to make the time-series …

Java里面的靜態代碼塊

問題&#xff1a;Java里面的靜態代碼塊 I was looking over some code the other day and I came across: 前幾天我在看一些代碼時發現&#xff1a; static {... }我是c轉來的&#xff0c;我不知道為啥要這樣干。這個代碼也編譯成功了&#xff0c;沒出錯誤。這里的"stat…

搭建Maven私服那點事

摘要&#xff1a;本文主要介紹在CentOS7.1下使用nexus3.6.0搭建maven私服&#xff0c;以及maven私服的使用&#xff08;將自己的Maven項目指定到私服地址、將第三方項目jar上傳到私服供其他項目組使用&#xff09; 一、簡介 Maven是一個采用純Java編寫的開源項目管理工具, Mave…

lee最短路算法_Lee算法的解釋:迷宮運行并找到最短路徑

lee最短路算法Lee算法是什么&#xff1f; (What is the Lee Algorithm?) The Lee algorithm is one possible solution for maze routing problems. It always gives an optimal solution, if one exists, but is slow and requires large memory for dense layout.Lee算法是迷…

gan訓練失敗_我嘗試過(但失敗了)使用GAN來創作藝術品,但這仍然值得。

gan訓練失敗This work borrows heavily from the Pytorch DCGAN Tutorial and the NVIDA paper on progressive GANs.這項工作大量借鑒了Pytorch DCGAN教程 和 有關漸進式GAN 的 NVIDA論文 。 One area of computer vision I’ve been wanting to explore are GANs. So when m…

怎么樣實現對一個對象的深拷貝

問題&#xff1a;怎么樣實現對一個對象的深拷貝 使用深拷貝的方法有點難實現啊。要保證原來的對象和克隆對象不是共享同一個引用的步驟是什么啊&#xff1f; 回答一 一種安全的方法是先序列化對象&#xff0c;然后反序列化。這保證了所有東西都是一個新的引用。 這里有一篇…