1. 程式人生 > >You can you up,No can no bb !

You can you up,No can no bb !

1、在Windows 系統下,很多軟體安裝都需要配置環境變數,比如 安裝 jdk ,如果不配置環境變數,在非軟體安裝的目錄下執行javac 命令,將會報告找不到檔案,類似的錯誤。

2、那麼什麼是環境變數?簡單說,就是指定一個目錄,執行軟體的時候,相關的程式將會按照該目錄尋找相關檔案。 設定變數對於一般人最實用的功能就是: 不用拷貝某些dll檔案到系統目錄中了,而path 這一系統變數就是系統搜尋dll檔案的一系列路徑

在Linux系統下,如果你下載並安裝應用程式,很有可能在鍵入它的名稱的時候出現 “command not found ” 的提示內容。 如果每次都到安裝目錄資料夾內,找到可執行檔案來進行操作就太繁瑣了。 這涉及到環境變數path的設定問題,而Path 的設定也是在Linux下定製環境變數的一個組成部分

Linux下環境變數設定的三種方法:

如想將一個路徑加入到$PATH中,可以像下面這樣做:

1、控制檯中設定,不贊成這種方式,因為他只對當前的shell 起作用,換一個shell設定就無效了:

$PATH="$PATH":/NEW_PATH  (關閉shell Path會還原為原來的path)

2、修改 /etc/profile 檔案,如果你的計算機僅僅作為開發使用時推存使用這種方法,因為所有使用者的shell都有權使用這個環境變數,可能會給系統帶來安全性問題。這裡是針對所有的使用者的,所有的shell

在/etc/profile的最下面新增:

 export  PATH="$PATH
:/NEW_PATH"

3、修改bashrc檔案,這種方法更為安全,它可以把使用這些環境變數的許可權控制到使用者級別,這裡是針對某一特定的使用者,如果你需要給某個使用者許可權使用這些環境變數,你只需要修改其個人使用者主目錄下的 .bashrc檔案就可以了。

在下面新增:

Export  PATH="$PATH:/NEW_PATH"

相關推薦

You can you up,No can no bb !

1、在Windows 系統下,很多軟體安裝都需要配置環境變數,比如 安裝 jdk ,如果不配置環境變數,在非軟體安裝的目錄下執行javac 命令,將會報告找不到檔案,類似的錯誤。 2、那麼什麼是環境變數?簡單說,就是指定一個目錄,執行軟體的時候,相關的程式將會

c#使用Npoi 提示 Excel匯出報錯 The maximum number of cell styles was exceeded. You can define up to 4000

在使用NPOI 匯出EXCEL的時候 提示 The maximum number of cell styles was exceeded. You can define up to 4000 styles in a .xls workbook 出現此問題 原因如下: private stat

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using e

        不得不說在leetcode上面刷題真的收穫很大,一些在學校老師根本不會教給你的知識點在這裡可以學到。 然後這題其實自己只是想到遍歷元素然後就是判斷是不是又重新遍歷到頭節點而已,但效率太低。無奈找了提示,看了別人的程式碼就心領神會了。 p

Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using e

        不得不說在leetcode上面刷題真的收穫很大,一些在學校老師根本不會教給你的知識點在這裡可以學到。 然後這題其實自己只是想到遍歷元素然後就是判斷是不是又重新遍歷到頭節點而已,但效率太低。無奈找了提示,看了別人的程式碼就心領神會了。 public clas

Black holes ruled out as universe's missing dark matter: Statistical analysis shows black holes can make up no more than 40 perc

University of California, Berkeley, physicists have dashed those hopes. Based on a statistical analysis of 740 of the brightest supernovas discovered as o

HDU 2141 Can you find it?(二分)

clas i++ clu div cpp style [] href ++ 題目鏈接:clicl here~~ 【題目大意】: Give you three sequences of numbers A, B, C, then we give you a number

HDOJ1796 How many integers can you find(dfs+容斥)

article nor man small 接下來 long long line cas example How many integers can you find Time Limit: 12000/5000 MS (Java/Others) Memory

HDU 4027 Can you answer these queries?(線段樹區間開方)

sizeof sqrt .cn swap %d nes nts following clr Can you answer these queries? Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 6576

[容斥原理] hdu 1796 How many integers can you find

pos lcm 一個 每一個 fin memset 而不是 std != 題意: 給一個N。然後給M個數,問1~N-1裏面有多少個數能被這M個數中一個或多個數整除。 思路: 首先要N-- 然後對於每一個數M 事實上1~N-1內能被其整除的 就是有(N-1)/

HDU 1796 How many integers can you find (容斥)

ace return algo 整除 ctype hdu scanf ++ main 題意:給定一個數 n,和一個集合 m,問你小於的 n的所有正數能整除 m的任意一個的數目。 析:簡單容斥,就是 1 個數的倍數 - 2個數的最小公倍數 + 3個數的最小公倍數 + ...(

HDU - 2141 : Can you find it?

sizeof sin case uniq utf first ted 整數 代碼 Give you three sequences of numbers A, B, C, then we give you a number X. Now you need to calcul

HDU 2141 can you find it 二分

cnblogs algorithm main 依次 樸素 合數 ret void style 1.題意:給出三組數,給出一個數X,試問是否能從三個數組中各選一個數,A,B,C使得X=A+B+C 2.分析:題設的輸入數據為先是依次給出三組數的長度L、N、M,下面三行給出三組數

HDU 4027 Can you answer these queries?

date 全部 swe shanghai man nts less mina query 題目鏈接:http://acm.hdu.edu.cn/showproblem.php?pid=4027 解題思路:線段樹區間更新,查詢。主要問題在於如何解決快速對一個區間所有數據開根號

HDU 4027 Can you answer these queries?(線段樹/區間不等更新)

push battle mark put action light blog acc lang 傳送門 Can you answer these queries? Time Limit: 4000/2000 MS (Java/Others) Memory Limi

hdoj-2141-Can you find it?

style spa sin ble AS ace () href binary 題目鏈接 1 /* 2 Name:HDU-2141-Can you find it? 3 Copyright: 4 Author: 5 D

HDU 2141 Can you find it? (二分)

input int you time chm source tis 去掉 註意 題目鏈接: Can you find it? Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/10000 K (Ja

GSS3 - Can you answer these queries III

#define RM () lse eset gin ++ hup tps 題意翻譯 nnn 個數, qqq 次操作 操作0 x y把 AxA_xAx? 修改為 yyy 操作1 l r詢問區間 [l,r][l, r][l,r] 的最大子段和 感謝 @Edgra

Can you answer these queries? HDU - 4027(線段樹+技巧)

fin 題意 ios fff PE sqrt += 長度 scan 題意:給一個數組序列, 數組長度為100000 兩種操作: 一種操作是將某一個固定區間所有數開方(向下取整) 另一種操作是詢問某個區間的所有數字之和。 由於數不超過263,因此開個七八次就變成1,由於只有

[SP1043]GSS1 - Can you answer these queries I

struct answer str == 線段 return shu lib n) 求區間內最大非空子段和,沒什麽可說的吧。 線段樹,每個區間維護從左端開始的最大非空子段和,區間內的最大非空子段和,以右端結束的最大非空子段和,還有區間和。 pushup()的寫法要註意,不要

[SP1557]GSS2 - Can you answer these queries II

常用 最大子段和 bool 修改 == 意義 一次 合並 ans 題意不過只是比GSS1多了幾個字而已,難度卻把GSS1甩得望塵莫及。 給出n個數,q次詢問,求最大子段和(可為空),相同的數只算一次。 說到相同的只算一次這一條件,有點像[SDOI2009]HH的項鏈,但是本