終端打開后-bash_如何爵士化Bash終端-帶有圖片的分步指南

終端打開后-bash

by rajaraodv

通過rajaraodv

In this blog I’ll go over the steps to add Themes, Powerline, fonts, and powerline-gitstatus to make your regular Bash Terminal look beautiful and useful as shown in the picture above.

在此博客中,我將介紹添加主題,電源線,字體和電源線-gitstatus的步驟,以使您的常規Bash Terminal看起來美觀且有用,如上圖所示。

It turns out, if you are using Mac, you’ll need to jump through a lot of hoops to get this working as many instructions are for linux, or are out of date. So I thought I'd blog about it - hopefully it'll help you.

事實證明,如果您使用的是Mac,則需要跳很多步才能使它正常工作,因為許多指令是針對Linux的,或者已經過時。 所以我以為我會寫博客-希望它能對您有所幫助。

Notes:

筆記:

Notes:

筆記:

1. Follow the steps carefully as any mistake will cause a lot of headaches.

1.認真執行以下步驟,因為任何錯誤都會引起很多頭痛。

1. Follow the steps carefully as any mistake will cause a lot of headaches.

1.認真執行以下步驟,因為任何錯誤都會引起很多頭痛。

2. This is for MacOS and for regular bash in the Terminal.app. I’m not using ZSH or Hyper in this blog — I plan to write different blogs for them.

2.這適用于MacOS和Terminal.app中的常規bash。 我不在此博客中使用ZSH或Hyper-我計劃為他們編寫不同的博客。

2. This is for MacOS and for regular bash in the Terminal.app. I’m not using ZSH or Hyper in this blog — I plan to write different blogs for them.

2.這適用于MacOS和Terminal.app中的常規bash。 我不在此博客中使用ZSH或Hyper-我計劃為他們編寫不同的博客。

OK, by default, when you have a new mac, your Terminal.app will look something like below. Let’s go ahead and add Themes, fonts, and so on.

好的,默認情況下,當您有新的Mac時,Terminal.app將如下所示。 讓我們繼續添加主題,字體等。

第1步-添加新主題 (Step 1 — Add A New Theme)

The first obvious step is to enhance the Theme. Terminal doesn’t provide all the cool and fancy themes that you see other developers use. Let’s download a Theme and add it to the Terminal.

顯而易見的第一步是增強主題。 終端無法提供您看到其他開發人員使用的所有酷炫主題。 讓我們下載一個主題并將其添加到終端中。

In this blog, I’ll add Solarized-Dark theme to our Terminal.

在此博客中,我將向我們的終端添加Solarized-Dark主題。

Note: You can download various Themes (.terminal files) from this git repo. Simply open the *.terminal file to install it, i.e. right-click on the *.terminal file > “open with" > Terminal

注意:您可以從此git repo下載各種主題(.terminal文件)。 只需打開*.terminal文件以進行安裝,即right-click on the *.terminal file > “open with" > Te終端”

  1. Go to http://ethanschoonover.com/solarized

    前往http://ethanschoonover.com/solarized

  2. Scroll down and download the Theme (solarized.zip)

    向下滾動并下載主題(solarized.zip)
  3. Extract the solarized.zip file

    提取solarized.zip文件
  4. Open the osx-terminal.app-colors-solarized folder. This folder contains Theme for the terminal.

    打開osx-terminal.app-colors-solarized文件夾。 該文件夾包含終端的主題。

  5. Double click “Solarized Dark ansi.terminal” fileThis is the specific Theme file for Terminal.app. Note: If you get a warning that this is from an unidentified developer, Right-click on the file and select “Open with” > Terminal option.

    雙擊“ Solarized Dark ansi.terminal”文件-這是Terminal.app的特定主題文件。 注意:如果收到來自未知開發人員的警告,請右鍵單擊該文件,然后選擇“打開方式”>“終端 ”。

  6. At this point, you have the Theme installed into your Terminal. We just need to make it a default Theme.

    此時,您已將主題安裝到終端中。 我們只需要使其成為默認主題即可。
  7. Open Terminal > Preferences > Text and select the “Solarized Dark …” theme and click on “Default”.

    打開終端>首選項>文本,然后選擇“ Solarized Dark…”主題,然后單擊“ Default”。

From now on, your Terminal should like below.

從現在開始,您的終端應如下所示。

步驟2 —安裝電力線 (Step 2 — Install Powerline)

Powerline is a Python app and is a status line plugin for vim, and provides status lines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.

Powerline是一個Python應用程序,并且是vim的狀態行插件,并為其他幾個應用程序提供狀態行和提示,包括zsh,bash,tmux,IPython,Awesome和Qtile。

It makes the Terminal prompt look like below.

它使終端提示如下所示。

2.1安裝Python (2.1 Install Python)

Because Powerline is a Python app, we need to have Python and that too a proper version of Python.

因為Powerline是一個Python應用程序,所以我們需要擁有Python以及適當的Python版本。

  • MacOS comes with Python installed already. Ensure Python’s version is 2.7.x by typing python -V in the Terminal.

    MacOS已經安裝了Python。 通過在終端中鍵入 python -V 來確保Python的版本為2.7.x。

  • If it’s not 2.7, install Homebrew that allows us to install various software from the CLI, by running:/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

    如果不是2.7,請通過運行以下命令來安裝Homebrew ,它允許我們從CLI安裝各種軟件: /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

  • Run brew install python to install the latest Python via Homebrew

    運行brew install python通過Homebrew安裝最新的Python

2.2 Install pip — Python的軟件包管理器(類似于npm) (2.2 Install pip — A package manager for Python (similar to npm))

Install pip by running the following command

通過運行以下命令來安裝pip

$ sudo easy_install pip

$ sudo easy_install pip

2.3安裝XCode Developer CLI工具 (2.3 Install XCode Developer CLI tools)

XCode Developer CLI tools are used by Powerline and other apps that manipulate core OSX features. So make sure to install the XCode CLI tools by running the following command.

Powerline和其他操縱OSX核心功能的應用程序使用XCode Developer CLI工具。 因此,請確保通過運行以下命令來安裝XCode CLI工具。

$ xcode-select —-install

$ xcode-select —-install

Note: The above command opens up Mac’s installer and installs the XCode Developer CLI tools. If it doesn’t work, try xcode-select -r to reset.

注意:上面的命令將打開Mac的安裝程序并安裝XCode Developer CLI工具。 如果不起作用,請嘗試使用xcode-select -r進行重置。

2.4安裝電力線 (2.4 Install Powerline)

Finally, install the Powerline (stable version) via pip by running the following command.

最后,通過運行以下命令,通過pip安裝Powerline(穩定版)。

$ pip install --user powerline-status

If you want to install the latest development branch, then use:

如果要安裝最新的開發分支,請使用:

$ pip install --user git+git://github.com/powerline/powerline  //dev

2.5將Powerline守護程序添加到bash (2.5 Add the Powerline daemon to bash)

We now need to add the Powerline daemon to bash so that it can monitor the Terminal prompt and make changes.

現在,我們需要將Powerline守護程序添加到bash中,以便它可以監視終端提示并進行更改。

2.5.1 Copy the Powerline’s installation location

2.5.1復制電力線的安裝位置

You can figure out the location of Powerline by running the following: pip show powerline-status Copy the value from the Location field.

您可以通過運行以下命令確定pip show powerline-status的位置: pip show powerline-status從“ Location字段復制值。

2.5.2 Add the daemon with a proper location to .bash_profile

2.5.2將具有正確位置的守護程序添加到.bash_profile

  1. Make sure you have .bash_profile file in your root directory. If not following create one by doing: cd ~ && touch ~/.bash_profile

    確保您的根目錄中有.bash_profile文件。 如果不遵循,則執行以下操作來創建一個: cd ~ && touch ~/.bash_profile

2. Open .bash_profile and add the following:

2.打開.bash_profile并添加以下內容:

export PATH=$PATH:$HOME/Library/Python/2.7/bin
powerline-daemon -q
POWERLINE_BASH_CONTINUATION=1
POWERLINE_BASH_SELECT=1
. /Users/rupa/Library/Python/2.7/lib/python/site-packages/powerline/bindings/bash/powerline.sh

Note: The location /Users/rupa/Library/Python/2.7/lib/python/site-packages/ is from the previous step (2.5.1). Change it to match your computer’s location.

注意:位置/Users/rupa/Library/Python/2.7/lib/python/site-packages/來自上一步(2.5.1)。 更改它以匹配您計算機的位置。

2.5.3. Restart the Terminal

2.5.3。 重新啟動終端

Completely quit the Terminal if it’s open (Terminal > Quit Terminal). And open it again.

如果終端打開,請完全退出終端(終端>退出終端)。 并再次打開它。

You should be able to simply use $ source ~/.bash_profile to update the settings. But I got some odd powerline-config file is missing! Typically you get this error if you don’t have $HOME/Library/Python/2.7/bin in your PATH.

您應該可以簡單地使用$ source ~/.bash_profile來更新設置。 但是我缺少一些奇怪的powerline-config文件! 通常,如果您的PATH中沒有$ HOME / Library / Python / 2.7 / bin,則會出現此錯誤。

2.5.4 Your new Terminal

2.5.4您的新終端

Your new Terminal should look like below. It should be using “Solarized Dark ansi” theme and should show Powerline in the command prompt. But also notice that there are “?” characters! This is because Powerline uses various icons and fonts that are not available by default. So we need to install the fonts.

您的新終端應如下所示。 它應使用“ Solarized Dark ansi”主題,并在命令提示符下顯示Powerline。 但也請注意,這里有“?” 人物! 這是因為Powerline使用默認情況下不可用的各種圖標和字體。 因此,我們需要安裝字體。

步驟3 —安裝電力線字體 (Step 3 — Install Powerline fonts)

To install Powerline fonts, simply go to https://github.com/powerline/fonts. There you’ll see a whole bunch of folders. Each one is a font, aka “Patched fonts”.

要安裝Powerline字體,只需轉到https://github.com/powerline/fonts 。 在那里,您會看到一堆文件夾。 每個字體都是一種字體,也稱為“修補字體”。

It is called “Patched fonts” because people have taken regular fonts and have added/patched additional Powerline specific icons and fonts to them.
之所以稱其為“修補字體”,是因為人們采用了常規字體,并為其添加/修補了其他特定于Powerline的圖標和字體。

3.1下載整個倉庫并解壓縮 (3.1 Download the whole repo and unzip it)

  • Click on the “Clone or download” button and download the whole repo so you try various fonts.

    單擊“克隆或下載”按鈕,然后下載整個存儲庫,以便嘗試各種字體。
  • Unzip the fonts-master.zip

    解壓縮fonts-master.zip

3.2安裝一些字體 (3.2 Install some fonts)

Let’s open Meslo dotted fonts folder. It will look like below. You’ll see a whole bunch of .ttf file. Each one of them is a font but some are “bold” version of the font, some are “regular” version and so on.

打開Meslo點劃線字體 夾。 如下圖所示。 您會看到一大堆.ttf文件。 每個字體都是一種字體,但有些是字體的“粗體”版本,有些是“常規”版本,依此類推。

Simply double-click on the .ttf file and press “Install font” to install the font on your computer.

只需雙擊.ttf文件,然后按“安裝字體”即可在計算機上安裝字體。

For our case, let’s install “Meslo LG L DZ Regular for Powerline.ttf” and “Meslo LG L DZ Italic for Powerline.ttf”. This will add a regular and an Italic version of the Meslo font.

對于我們的情況,讓我們安裝“ Powerline.ttf的Meslo LG L DZ Regular”和“ Powerline.ttf的Meslo LG L DZ Italic”。 這將添加Meslo字體的常規斜體版本。

3.3在終端主題中選擇字體 (3.3 Select the font in the Terminal’s Theme)

Remember we added “Solarized Dark” theme in Step 1? That didn’t have any fonts in it and MacOS had some default font. All we need to do is to set our Meslo dotted font for this theme and we are done!

還記得我們在步驟1中添加了“ Solarized Dark”主題嗎? 那沒有任何字體,MacOS有一些默認字體。 我們需要做的就是為此主題設置Meslo點綴字體,我們完成了!

  1. Open Terminal > Preferences > Text

    打開終端>首選項>文本
  2. Select Solarized Dark ansi Theme

    選擇日光化深色ansi主題

  3. Click on the “Font” button — This opens up “Fonts” dialog

    單擊“字體”按鈕-這將打開“字體”對話框
  4. In the “Fonts” dialog, select “Meslo LG L DZ for Powerline” in the Family and also select font size 14 (so it’s easier to read).

    在“字體”對話框中,選擇“系列”中的“ Meslo LG L DZ for Powerline”,然后選擇字體大小14(這樣更易于閱讀)。

3.4重啟終端 (3.4 Restart Terminal)

Completely quit the Terminal (Terminal > Quit Terminal) and then reopen it.

完全退出終端(終端>退出終端),然后重新打開。

步驟4 —將Git信息添加到提示 (Step 4 — Adding Git information to the prompt)

In order to display various Git status at the prompt, we need to install powerline-gitstatus. It is a simple add-on to Powerline and adds multiple colors and Themes to display various git status information.

為了在提示符下顯示各種Git狀態,我們需要安裝powerline-gitstatus 。 它是Powerline的一個簡單附件,添加了多種顏色和主題以顯示各種git狀態信息。

4.1安裝powerline-gitstatus (4.1 Install powerline-gitstatus)

pip install --user powerline-gitstatus
Note: “ — user” command is required to install it in the user’s profile.
注意:需要“ —用戶”命令才能將其安裝在用戶的配置文件中。

4.2向Powerline添加powerline-gitstatus配色方案 (4.2 Add powerline-gitstatus color schemes to Powerline)

4.2.1 Open the following colorschemes/shell/default.json folder

4.2.1打開以下colorschemes/shell/default.json文件夾

${powerline-install-directory}/powerline/config_files/colorschemes/shell/default.json//For example:
/Users/rupa/Library/Python/2.7/lib/python/site-packages/powerline/config_files/colorschemes/shell/default.json

4.2.2 Add the following colors:

4.2.2添加以下顏色:

As mentioned in the powerline-gitstatus readme. PS: Just copy the colors inside “groups” and then append it to the default.json as shown below.

如powerline-gitstatus 自述文件中所述 。 PS:只需復制“組”內的顏色,然后將其添加到default.json,如下所示。

Here is my color schemes default.json (you may copy and paste this instead):

這是我的配色方案default.json(您可以復制并粘貼它):

{"name": "Default color scheme for shell prompts","groups": {"hostname": {"fg": "brightyellow","bg": "mediumorange","attrs": []},"environment": {"fg": "white","bg": "darkestgreen","attrs": []},"mode": {"fg": "darkestgreen","bg": "brightgreen","attrs": ["bold"]},"attached_clients": {"fg": "white","bg": "darkestgreen","attrs": []},"gitstatus": {"fg": "gray8","bg": "gray2","attrs": []},"gitstatus_branch": {"fg": "gray8","bg": "gray2","attrs": []},"gitstatus_branch_clean": {"fg": "green","bg": "gray2","attrs": []},"gitstatus_branch_dirty": {"fg": "gray8","bg": "gray2","attrs": []},"gitstatus_branch_detached": {"fg": "mediumpurple","bg": "gray2","attrs": []},"gitstatus_tag": {"fg": "darkcyan","bg": "gray2","attrs": []},"gitstatus_behind": {"fg": "gray10","bg": "gray2","attrs": []},"gitstatus_ahead": {"fg": "gray10","bg": "gray2","attrs": []},"gitstatus_staged": {"fg": "green","bg": "gray2","attrs": []},"gitstatus_unmerged": {"fg": "brightred","bg": "gray2","attrs": []},"gitstatus_changed": {"fg": "mediumorange","bg": "gray2","attrs": []},"gitstatus_untracked": {"fg": "brightestorange","bg": "gray2","attrs": []},"gitstatus_stashed": {"fg": "darkblue","bg": "gray2","attrs": []},"gitstatus:divider": {"fg": "gray8","bg": "gray2","attrs": []}},"mode_translations": {"vicmd": {"groups": {"mode": {"fg": "darkestcyan","bg": "white","attrs": ["bold"]}}}}
}

4.3激活主題 (4.3 Activate The Theme)

4.3.1 Open Theme’s default.json file

4.3.1打開主題的default.json文件

${powerline-install-directory}/powerline/config_files/themes/shell/default.json//For example:
/Users/rupa/Library/Python/2.7/lib/python/site-packages/powerline/config_files/themes/shell/default.json

4.3.2 Add the following to the default.json

4.3.2將以下內容添加到default.json

{"function": "powerline_gitstatus.gitstatus","priority": 40
}

Below is my Powerline’s Theme default.json(you may copy and paste this instead):

下面是我的電力線主題default.json(您可以復制并粘貼該主題):

Note: I have removed everything from the “right” section and also removed “job number” (“jobnum”) to keep things clean. Otherwise, you’ll see a little artifact on the right-hand side edge of the prompt.
注意:我從“右側”部分中刪除了所有內容,還刪除了“作業號”(“ jobnum”)以保持環境清潔。 否則,您會在提示的右側邊緣看到一些小瑕疵。
{"segments": {"left": [{"function": "powerline.segments.shell.mode"},{"function": "powerline.segments.common.net.hostname","priority": 10},{"function": "powerline.segments.common.env.user","priority": 30},{"function": "powerline.segments.shell.cwd","priority": 10}, {"function": "powerline_gitstatus.gitstatus","priority": 40}],"right": []}
}

4.4重新啟動守護程序 (4.4 Restart the Daemon)

Save the file and run the following: powerline-daemon —-replace in the Terminal.

保存文件并運行以下命令: powerline-daemon —-replace 在終端中 powerline-daemon —-replace

Important Note: Every time you make changes to Powerline’s config, in addition to restarting the Terminal, you’ll also need to restart the daemon to see the changes reflected by running: powerline-daemon —-replace.

重要說明:每次更改Powerline的配置時,除了重新啟動Terminal之外,還需要重新啟動 守護程序以查看運行所反映的更改powerline-daemon —-replace

4.5重啟終端 (4.5 Restart The Terminal)

Quit the Terminal (Terminal > Quit Terminal) and open it again.

退出終端(終端>退出終端),然后再次打開。

At this point, we are all done! whew! If you open the Terminal, and navigate to any git repo, and play around, it should look like the following.

至此,我們都完成了! ! 如果您打開終端,并導航至任何git repo,然后進行播放,則其外觀應如下所示。

Here is how it looks in Solarized-Light Theme:

這是Solarized-Light主題的外觀:

Here is how it looks in Cobalt2 Theme:

這是Cobalt2主題的外觀:

?? Thank you!

?? 謝謝!

If you have questions, please feel free to ask me on Twitter: https://twitter.com/rajaraodv

如果您有任何疑問,請隨時在Twitter上問我: https : //twitter.com/rajaraodv

如果這有用,請單擊拍手? 請點擊以下幾次以顯示您的支持! ???? (If this was useful, please click the clap ? button down below a few times to show your support! ??? ??)

https://medium.com/@rajaraodv/latest

https://medium.com/@rajaraodv/latest

ECMAScript 2015+ (ECMAScript 2015+)

  1. Check out these useful ECMAScript 2015 (ES6) tips and tricks

    查看這些有用的ECMAScript 2015(ES6)提示和技巧

  2. 5 JavaScript “Bad” Parts That Are Fixed In ES6

    ES6中修復的5個JavaScript“不良”部分

  3. Is “Class” In ES6 The New “Bad” Part?

    ES6中的“類”是新的“不良”部分嗎?

終端改進 (Terminal Improvements)

  1. How to Jazz Up Your Terminal — A Step By Step Guide With Pictures

    如何使您的終端更加爵士樂-帶圖片的分步指南

  2. Jazz Up Your “ZSH” Terminal In Seven Steps — A Visual Guide

    通過七個步驟使您的“ ZSH”終端變得爵士樂—視覺指南

萬維網 (WWW)

  1. A Fascinating And Messy History Of The Web And JavaScript

    Web和JavaScript的迷人歷史

虛擬DOM (Virtual DOM)

  1. Inner Workings Of The Virtual DOM

    虛擬DOM的內部運作

React表現 (React Performance)

  1. Two Quick Ways To Reduce React App’s Size In Production

    兩種減少React App生產規模的快速方法

  2. Using Preact Instead Of React

    使用Preact代替React

功能編程 (Functional Programming)

  1. JavaScript Is Turing Complete — Explained

    JavaScript正在完善–解釋

  2. Functional Programming In JS — With Practical Examples (Part 1)

    JS中的函數式編程—結合實際示例(第1部分)

  3. Functional Programming In JS — With Practical Examples (Part 2)

    JS中的函數式編程—結合實際示例(第2部分)

  4. Why Redux Need Reducers To Be “Pure Functions”

    為什么Redux需要Reducer成為“純功能”

Web包裝 (WebPack)

  1. Webpack — The Confusing Parts

    Webpack —令人困惑的部分

  2. Webpack & Hot Module Replacement [HMR] (under-the-hood)

    Webpack和熱模塊更換[HMR] ( 后臺 )

  3. Webpack’s HMR And React-Hot-Loader — The Missing Manual

    Webpack的HMR和React-Hot-Loader —缺少的手冊

Draft.js (Draft.js)

  1. Why Draft.js And Why You Should Contribute

    為什么選擇Draft.js,為什么要貢獻力量

  2. How Draft.js Represents Rich Text Data

    Draft.js如何表示富文本數據

React And Redux: (React And Redux :)

  1. Step by Step Guide To Building React Redux Apps

    構建React Redux應用程序的逐步指南

  2. A Guide For Building A React Redux CRUD App (3-page app)

    構建React Redux CRUD應用程序指南 (3頁應用程序)

  3. Using Middlewares In React Redux Apps

    在React Redux應用程序中使用中間件

  4. Adding A Robust Form Validation To React Redux Apps

    向React Redux應用添加強大的表單驗證

  5. Securing React Redux Apps With JWT Tokens

    使用JWT令牌保護React Redux應用程序

  6. Handling Transactional Emails In React Redux Apps

    在React Redux應用程序中處理交易電子郵件

  7. The Anatomy Of A React Redux App

    React Redux應用程序剖析

  8. Why Redux Need Reducers To Be “Pure Functions”

    為什么Redux需要Reducer成為“純功能”

  9. Two Quick Ways To Reduce React App’s Size In Production

    兩種減少React App生產規模的快速方法

如果有用,請分享! 謝謝! ?? (If this was useful, please share it! Thank you! ??)

翻譯自: https://www.freecodecamp.org/news/jazz-up-your-bash-terminal-a-step-by-step-guide-with-pictures-80267554cb22/

終端打開后-bash

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

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

相關文章

如何獲取元素在父級div里的位置_關于元素的浮動你了解多少

首先,在介紹什么是浮動之前我們先介紹一下html中元素的普通流布局方式。在普通流中,元素是按照它在 HTML 中的出現的先后順序自上而下依次排列布局的,在排列過程中所有的行內元素水平排列,直到當行被占滿然后換行,塊級…

獲取iOS頂部狀態欄和Navigation的高度

狀態欄的高度 20 [[UIApplication sharedApplication] statusBarFrame].size.height Navigation的高度 44 self.navigationController.navigationBar.frame.size.height 加起來一共是64 轉載于:https://www.cnblogs.com/Free-Thinker/p/6478715.html

Java電商項目-5.內容管理cms系統

目錄 實現加載內容分類樹功能實現內容分類動態添加刪除內容分類節點實現內容分類節點的分頁顯示實現廣告內容的添加實現廣告內容刪除實現廣告內容編輯到Github獲取源碼請點擊此處實現加載內容分類樹功能 注: 往后將不在說編寫遠程服務方法和編寫web模塊等重復語句, 直接用"…

leetcode738. 單調遞增的數字(貪心)

給定一個非負整數 N&#xff0c;找出小于或等于 N 的最大的整數&#xff0c;同時這個整數需要滿足其各個位數上的數字是單調遞增。 &#xff08;當且僅當每個相鄰位數上的數字 x 和 y 滿足 x < y 時&#xff0c;我們稱這個整數是單調遞增的。&#xff09; 示例 1: 輸入: …

MySQL purge 線程

MySQL中purge線程知識&#xff1a;https://dev.mysql.com/doc/refman/5.7/en/innodb-improved-purge-scheduling.htmlInnoDB中delete所做刪除只是標記為刪除的狀態&#xff0c;實際上并沒有刪除掉&#xff0c;因為MVCC機制的存在&#xff0c;要保留之前的版本為并發所使用。最終…

安裝inde.html使用babel,reactjs – 使用Babel Standalone進行單個React組件渲染,僅使用index.html和Component...

Noob與React在這里.我正在玩React.我有一個簡單的組件在我的component.js中呈現.它包含在我的index.html文件中.我在頭部包含了React,ReactDOM和babel的腳本.我只想看到一個div正確渲染.我還沒有使用Node,只是使用React和Babel(使用babel-standalone).我正在使用一個簡單的http…

軟件工程師轉正申請_這是申請軟件工程師工作的4種最佳方法-以及如何使用它們。...

軟件工程師轉正申請by YK Sugi由YK Sugi 這是適用于軟件工程師工作的最佳方法&#xff0c;以及確切的使用方法。 (Here are the best methods for applying to software engineer jobs — and exactly how to use them.) When people think of applying for jobs, they often …

【JS新手教程】LODOP打印復選框選中的任務或頁數

之前的博文&#xff1a;【JS新手教程】LODOP打印復選框選中的內容關于任務&#xff1a;Lodop打印語句最基本結構介紹&#xff08;什么是一個任務&#xff09;關于本文用到的JS的eval方法&#xff1a;JS-JAVASCRIPT的eval()方法該文用的是不同checkbox&#xff0c;對應不同的val…

查詢范圍_企二哥:查詢企業經營范圍的三種方法

一、查詢企業經營范圍的三種方法1. 進經營地的工商局網站,有個“全國企業信用信息公示系統”進去后輸入公司名稱搜索就出來了。2. 有個軟件叫做天眼查&#xff0c;打開天眼查輸入要查詢的公司名稱&#xff0c;就可以搜出來了。不光是經營范圍&#xff0c;還有許多和企業相關的資…

C#用DataTable實現Group by數據統計

http://www.cnblogs.com/sydeveloper/archive/2013/03/29/2988669.html 1、用兩層循環計算&#xff0c;前提條件是數據已經按分組的列排好序的。 DataTable dt new DataTable();dt.Columns.AddRange(new DataColumn[] { new DataColumn("name", typeof(string)), …

CI框架取消index.php

首先看文檔&#xff1a; http://codeigniter.org.cn/user_guide/general/urls.html#url-index-php 大致意思是&#xff0c;先Apache開啟rewrite&#xff0c;再index.php同級目錄下創建一個.htaccess文件 設置好后還是不起作用&#xff01;&#xff01;&#xff01;&#xff01;…

電子工程師自學成才pdf_給新開發人員的最佳建議:自學成才的軟件工程師的建議...

電子工程師自學成才pdfby Ali Spittel通過Ali Spittel 給新開發人員的最佳建議&#xff1a;自學成才的軟件工程師的建議 (My best tips for new developers: advice from a (mostly) self-taught software engineer) The most common question I get from blog readers is “W…

leetcode1090. 受標簽影響的最大值(貪心算法)

我們有一個項的集合&#xff0c;其中第 i 項的值為 values[i]&#xff0c;標簽為 labels[i]。 我們從這些項中選出一個子集 S&#xff0c;這樣一來&#xff1a; |S| < num_wanted 對于任意的標簽 L&#xff0c;子集 S 中標簽為 L 的項的數目總滿足 < use_limit。 返回子…

html顯示hdf5文件,python讀取hdf5文件

python怎樣讀取hdf5文件python 中h5py讀文件,提示錯誤File "h5py\_objects完整代碼和完整錯誤信息的圖片。Windows環境下給Python安裝h5py失敗&#xff0c;HDF5已經安裝使用pip install h5py命令安裝已經安裝了HDF5-1.10.0-win64.msi3第一張圖上說的是,“不能打開頭文件hd…

課后練習----實現窗口的切換

1、運用事件處理相關知識&#xff0c;完成兩個窗口之間的切換&#xff0c;例如&#xff1a;登陸窗口------》注冊窗口 package Date; import java.awt.Color;import java.awt.Font;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing…

Hello 云棲

這是第一篇博客

ai物聯網工業_人工智能和物聯網將如何改變行業

ai物聯網工業by Mariya Yao姚iya(Mariya Yao) 人工智能和物聯網將如何改變行業 (How Artificial Intelligence & the Internet of Things will transform industries) 微軟首席技術官凱文斯科特(Kevin Scott)訪談 (An interview with Microsoft CTO Kevin Scott) As part …

20145206鄒京儒《網絡對抗》逆向及Bof基礎實踐

20145206鄒京儒《網絡對抗》逆向及Bof基礎實踐 1 逆向及Bof基礎實踐說明 1.1 實踐目標 本次實踐的對象是一個名為pwn1的linux可執行文件。 該程序正常執行流程是&#xff1a;main調用foo函數,foo函數會簡單回顯任何用戶輸入的字符串。 該程序同時包含另一個代碼片段&#xff0c…

計算機專業考研過關率高么,考研過國家線的幾率有多大?被刷的有多少?

考研每年究竟有多少人可以過國家線&#xff0c;可能很多同學都對很奇心&#xff0c;很想知道這個數據。很多人應該都知道&#xff0c;教育部在劃定國家線時&#xff0c;會統計考生的總體情況&#xff0c;然后再分別統計13個大類學科&#xff0c;產生一個大致的數據的&#xff0…

復工復產三個一內容_節后復產復工,彭聰恩強調“三個一”

彭聰恩查看大良永旺購物商場監控室順德城市網消息 (記者張瓊)春節已過&#xff0c;元宵將至&#xff0c;安全生產工作時刻不可放松。為確保全區市民過上一個安全祥和的元宵節&#xff0c;昨日(2月21日)上午&#xff0c;順德區委副書記、區長彭聰恩&#xff0c;副區長賴雪暉帶隊…