锘??xml version="1.0" encoding="utf-8" standalone="yes"?>在线欧美日韩精品,亚洲婷婷综合久久一本伊一区,欧美日韩中文在线http://m.shnenglu.com/wythern/X presents Y for a better Zzh-cnMon, 17 Nov 2025 07:25:16 GMTMon, 17 Nov 2025 07:25:16 GMT60[杞琞鍦↙inux涓嬪浣曞垱寤簉amdiskhttp://m.shnenglu.com/wythern/archive/2020/02/26/217165.htmlwythernwythernWed, 26 Feb 2020 07:17:00 GMThttp://m.shnenglu.com/wythern/archive/2020/02/26/217165.htmlhttp://m.shnenglu.com/wythern/comments/217165.htmlhttp://m.shnenglu.com/wythern/archive/2020/02/26/217165.html#Feedback0http://m.shnenglu.com/wythern/comments/commentRss/217165.htmlhttp://m.shnenglu.com/wythern/services/trackbacks/217165.htmlRefer to How to Easily Create Ramdisk on Linux

This tutorial will show you how to quickly create a RAM disk in any Linux distro (Debian, Ubuntu, Linux, Fedora, Arch Linux, CentOS, etc). Compared to commercial Windows RAM disk software that costs money, Linux can utilize this cool feature 100% free of charge.

What is RAM Disk?

RAM disk is also known as RAM drive. It’s a portion of your RAM that are formated with a file system. You can mount it to a directory on your Linux system and use it as a disk partition.

Why use RAM disk?

RAM is ultra-fast compared to even the fastest solid state drive (SSD). As you may know, the main performance bottleneck in today’s computer is the speed of hard drive, so moving programs and files to the RAM disk yields super fast computing experience.

Pros of RAM disk:

  • Ultra-fast
  • Can sustain countless reads and writes

Cons of RAM disk:

  • RAM is volatile which means all data in RAM disk will be lost when the computer shutdowns or reboots. However, this can be a pro in some situations, if you use it wisely.
  • RAM is expensive so it has limited capacity. You need to make sure not allocate too much space for RAM disk, or the operating system would run out of RAM.

You can do a lot of interesting things with RAM disk.

  • RAM disk is best suited for temporary data or caching directories, such as Nginx FastCGI cache. If you use a SSD and there will be a lot of writes to a particular directory, you can mount that directory as a RAM disk to reduce wear out of SSD.
  • I also use RAM disk to temporary store screenshots when writing articles on this blog, so when my computer shut down, those screenshots will automatically be deleted on my computer.
  • You may not believe it, but I use RAM disk to run virtual machines inside VirtualBox. My SSD is about 250G. I can’t run many VMs directly on the SSD and I’m not happy about the speed of my 2TB mechanical hard drive (HDD). I can move the VM from HDD to RAM disk before starting the VM, so the VM can run much faster.  After shutting down the VM, I move the VM files back to HDD, which takes less than 1 minute. This of course requires your computer to have a large capacity RAM.

How to Create a RAM Disk in Any Linux Distro

First make a directory which can be anywhere in the file system such as

sudo mkdir /tmp/ramdisk

If you want to let every user on your Linux system use the RAM disk, then change its permission to 777.

sudo chmod 777 /tmp/ramdisk

Next, check how much free RAM are left on your system with htop command line utility because we don’t want to use too much RAM.

htop

easily create ram disk linux

Then all left to do is to specify the file system typeRAM disk sizedevice name and mount it to the above directory. You can see from the screenshot above that I have plenty of free RAM, so I can easily allocate 1GB for my RAM disk. This can be done with the following one-liner. It will be using tmpfs file system and its size is set to 1024MB. myramdisk is the device name I gave to it.

sudo mount -t tmpfs -o size=1024m myramdisk /tmp/ramdisk

To allocate 10G for the RAM disk, run this instead.

sudo mount -t tmpfs -o size=10G myramdisk /tmp/ramdisk

If we issue the following command

mount | tail -n 1

We can see it’s successfully mounted.

create linux ramdisk

Now if I copy my VirtualBox machines file (5.8G) into the RAM disk, my RAM usage suddenly goes up to 9.22G.

linux automount ramdisk

If I unmount RAM disk,

sudo umount /tmp/ramdisk/

Everything in that directory will be lost and RAM usage goes down to original.

linux ramdisk file system

This is how you can test if your RAM disk is working.

Test RAM Disk Speed

To test write speed of RAM disk, you can use dd utility.

sudo dd if=/dev/zero of=/tmp/ramdisk/zero bs=4k count=100000

Which gave me 2.8GB/s write speed.

linux ramdisk speed test

To test read speed, run:

sudo dd if=/tmp/ramdisk/zero of=/dev/null bs=4k count=100000

Which gave me 3.1 GB/s read speed.

I also did a speed test on my SSD. The write speed is 534MB/s and read speed 1.6GB/s.

Auto-mount on System Boot

Edit /etc/fstab file.

sudo nano /etc/fstab

Add an entry like this:

myramdisk  /tmp/ramdisk  tmpfs  defaults,size=1G,x-gvfs-show  0  0

x-gvfs-show will let you see your RAM disk in file manager. Save and close the file. Your Linux system will automatically mount the RAM disk when your computer boots up.

To mount it immediately without reboot, run the following command.

sudo mount -a


wythern 2020-02-26 15:17 鍙戣〃璇勮
]]>
鍦╰ruffle鎴栧叾浠栨祴璇曠幆澧冧笅濡備綍寰楀埌contract鐨勮繑鍥炲?/title><link>http://m.shnenglu.com/wythern/archive/2019/11/28/217004.html</link><dc:creator>wythern</dc:creator><author>wythern</author><pubDate>Thu, 28 Nov 2019 10:13:00 GMT</pubDate><guid>http://m.shnenglu.com/wythern/archive/2019/11/28/217004.html</guid><wfw:comment>http://m.shnenglu.com/wythern/comments/217004.html</wfw:comment><comments>http://m.shnenglu.com/wythern/archive/2019/11/28/217004.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/wythern/comments/commentRss/217004.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/wythern/services/trackbacks/217004.html</trackback:ping><description><![CDATA[<p>    1. 浣跨敤pure鎴栬卾iew鍑芥暟錛岀洿鎺ユ嬁鍒拌繑鍥炲鹼紝浣嗕笉鏄墍鏈夌殑鍑芥暟閮借兘澹版槑鎴恜ure/view銆?/p> <p>    2. 浣跨敤event鍖呰榪斿洖鍊鹼紝浣嗘槸鍦╡mit涔嬪墠榪斿洖鐨勫嚱鏁版槸娌℃湁event鐨勶紝濡傛灉闇瑕佹瘡鏉ath閮借繑鍥炴湁鎰忎箟鐨剅eturn value錛屽彲鑳介渶瑕佸畾涔夊緢澶氫釜event銆傦紙涓嶈冭檻require throw鐨勬儏鍐典笅錛?/p> <p>    3. 浣跨敤web3.eth.Contract.call錛岄渶瑕丄BI鍜宒eployed address錛岃繖涓敤娉曟湁涓己鐐規(guī)槸灝嗗嚱鏁板彉鎴愪簡(jiǎn)constant鐨勶紝鍗沖拰1涓鏍鋒棤娉曟敼鍙樺悎綰﹀唴閮ㄧ姸鎬侊紝鍙兘璇村湪鐗瑰畾鐨勫満鏅笅鏈夌敤銆?/p> <p>    4. EIP-758(<a >https://eips.ethereum.org/EIPS/eip-758</a>)錛岃繑鍥瀝eturnData鍦╯ubscribe鐨勯氶亾涓婏紝浣嗘槸鐪嬬洰鍓嶇殑鐘舵佽繕鏄痙raft銆?/p> <p><br /></p><img src ="http://m.shnenglu.com/wythern/aggbug/217004.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/wythern/" target="_blank">wythern</a> 2019-11-28 18:13 <a href="http://m.shnenglu.com/wythern/archive/2019/11/28/217004.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[杞琞CRLF鍜孡F鍦ㄨ法騫沖彴宸ヤ綔鏃跺欏甫鏉ョ殑鐑?chǔ)鎭间互鍙?qiáng)瑙e喅鏂規(guī)硶http://m.shnenglu.com/wythern/archive/2019/03/27/216318.htmlwythernwythernWed, 27 Mar 2019 05:29:00 GMThttp://m.shnenglu.com/wythern/archive/2019/03/27/216318.htmlhttp://m.shnenglu.com/wythern/comments/216318.htmlhttp://m.shnenglu.com/wythern/archive/2019/03/27/216318.html#Feedback0http://m.shnenglu.com/wythern/comments/commentRss/216318.htmlhttp://m.shnenglu.com/wythern/services/trackbacks/216318.html鍦ㄦ

鍦ㄤ嬌鐢╣it鎻愪氦浠g爜鏃跺欙紝鏈夋椂鍊欎細(xì)閬囧埌涓涓棶棰橈紝灝辨槸鑷繁鏄庢槑鍙慨鏀逛簡(jiǎn)鍏朵腑鍑犺錛屾彁浜や笂鍘諱互鍚庡彂鐜版暣涓枃浠墮兘琚慨鏀逛簡(jiǎn)錛屽湪璁劇疆浜?jiǎn)鏍煎紡椋庢犻g互鍚庤繕?shù)細(xì)鏈夋彁浜や笉涓婂幦潥勬儏鍐靛Q岃繖涓椂鍊欑粡甯歌浜烘懜涓嶅埌澶磋剳錛屽叾瀹炲氨鏄疌RLF鍜孡F鍦ㄤ綔鎬?/p>

CRLF LF CR 閮芥槸浠涔堟剰鎬濓細(xì)

  • CRLF: 鏄痗arriagereturnlinefeed鐨勭緝鍐欍備腑鏂囨剰鎬濇槸鍥炶濺鎹㈣銆?/p>

  • LF: 鏄痩ine feed鐨勭緝鍐欙紝涓枃鎰忔濇槸鎹㈣銆?/p>

  • CR: 鏄痗arriagereturn鐨勭緝鍐欍備腑鏂囨剰鎬濇槸鍥炶濺銆?/p>

綆鍗曠殑鎹㈣鍥炶濺涓轟粈涔堜細(xì)寮曞嚭榪欎箞澶氱殑闂鍛紝鍏抽敭鍦ㄤ簬鎿嶄綔緋葷粺涔嬮棿鐨勫垎姝э細(xì)

鏃╂湡鐨刴ac緋葷粺浣跨敤CR褰撳仛鎹㈣錛岀幇鍦ㄤ篃宸茬粡緇熶竴鎴愪簡(jiǎn)LF

Unix(鍖呭惈鐜板湪澶ч噺浣跨敤鐨刲inux)緋葷粺浣跨敤LF

windows緋葷粺浣跨敤LFCR褰撳仛鎹㈣錛堣嚜浣滆仾鏄庣殑鍏煎鎬э紵錛燂級(jí)

涔熸鏄洜涓轟笉鍚岀郴緇熺殑鍒嗘錛屽湪澶氫漢鍗忎綔鍏卞悓寮鍙戠殑鏃跺欙紝鍙兘瀵艱嚧鎻愪氦浠g爜鏃跺欎駭鐢熼棶棰樸?/p>

瑙e喅鏂規(guī)硶錛?/h2>

Android Studio鍐呴儴鍙互璁劇疆涓嶅悓妯″紡錛屽叿浣撲綅緗湪setting-->鎼滅儲(chǔ)code style瑙佷笅鍥撅細(xì)





















璁劇疆鏍煎紡

鍏朵腑鏈夊洓涓夐」System-Dependent LF CR CRLF錛岄粯璁ゆ槸System-Dependent錛屼篃灝辨槸鏍規(guī)嵁浣犳槸浠涔堢郴緇熼夋嫨浠涔堢被鍨嬶紝濡傛灉鎯寵鑷畾涔夌殑璇濆彲浠ュ湪榪欓噷璁劇疆錛屼互鍚庡垱寤虹殑鏂頒唬鐮佷篃榛樿鐢ㄨ緗殑鏂瑰紡

鑰屽鏋滄兂鍗曠嫭淇敼鏌愪釜鏂囦歡鐨勭被鍨嬶紝涔熷彲浠ュ湪鍙充笅瑙掕繘琛屼慨鏀癸紝瑙佷笅鍥撅細(xì)

鍗曠嫭淇敼鏌愪釜鏂囦歡

璺ㄥ鉤鍙板悎浣滄椂鍊欑殑瑙e喅鏂瑰紡錛?/h2>

褰撴垜浠嬌鐢╣it搴撴彁浜や唬鐮佺殑鏃跺欙紝鏈夌殑浜哄彲鑳戒嬌鐢╩ac錛屾湁鐨勪漢浣跨敤linux錛屾湁鐨勪漢浣跨敤windows錛屼笉鍚岀殑寮鍙戠幆澧冨鏋滈兘鏄寜鐓ц嚜宸辯郴緇熺殑鏂瑰紡浠繪剰淇敼鎹㈣綾誨瀷錛岄毦鍏嶄細(xì)璁╀唬鐮佸簱鏁翠綋娣蜂貢鎴栬呬駭鐢熻澶氭病鏈夊繀瑕佺殑浠g爜鏇存柊

閭d箞瑙e喅璇ラ棶棰樼殑鏂瑰紡鏈夛細(xì)core.autocrlf鍛戒護(hù)

git涓轟簡(jiǎn)闃叉浠ヤ笂闂鎵頒貢璺ㄥ鉤鍙板悎浣滃紑鍙戯紝浣跨敤鍛戒護(hù)鍙互杞寲LF鍜孋RLF

鍏蜂綋浣撶幇涓猴細(xì)

  • git config --global core.autocrlf true


Git鍙互鍦ㄤ綘push鏃惰嚜鍔ㄥ湴鎶婅緇撴潫絎RLF杞崲鎴怢F錛岃屽湪pull浠g爜鏃舵妸LF杞崲鎴怌RLF銆傜敤core.autocrlf鏉ユ墦寮姝ら」鍔熻兘錛屽鏋滄槸鍦╓indows緋葷粺涓婏紝鎶婂畠璁劇疆鎴恡rue錛岃繖鏍峰綋絳懼嚭浠g爜鏃訛紝LF浼?xì)琚浆鎹㈡垚CRLF

  • git config --global core.autocrlf input

Linux鎴朚ac緋葷粺浣跨敤LF浣滀負(fù)琛岀粨鏉熺錛涘綋涓涓互CRLF涓鴻緇撴潫絎︾殑鏂囦歡涓嶅皬蹇?jī)琚紩鍏ユ椂浣犺偗瀹氭儗櫩涜淇锛屾妸core.autocrlf璁劇疆鎴恑nput鏉ュ憡璇?Git 鍦╬ush鏃舵妸CRLF杞崲鎴怢F錛宲ull鏃朵笉杞崲

  • git config --global core.autocrlf false

鍦ㄦ湰鍦板拰浠g爜搴撲腑閮戒繚鐣機(jī)RLF錛屾棤璁簆ull榪樻槸push閮戒笉鍙橈紝浠g爜搴撲粈涔堟牱錛屾湰鍦拌繕鏄粈涔堟牱瀛?/p>

褰撶劧鍦ㄥ浜鴻法騫沖彴宸ヤ綔鏃跺欙紝鏈濂借繕鏄害瀹氫嬌鐢↙F錛岃繕鏄疌RLF錛岀劧鍚庝笉鍚岀郴緇熻繘琛屽搴旂殑璁劇疆錛岃繖鏍鋒槸宸ヤ綔瑙勮寖錛屼篃鏈夊埄浜庢彁楂樺伐浣滄晥鐜囷紝甯屾湜浠ヤ笂鍙互甯姪澶у銆?/strong>



浣滆咃細(xì)sososun
閾炬帴錛歨ttps://www.jianshu.com/p/dd7464cf32b5
鏉ユ簮錛氱畝涔?br />綆涔﹁憲浣滄潈褰掍綔鑰呮墍鏈夛紝浠諱綍褰㈠紡鐨勮漿杞介兘璇瘋仈緋諱綔鑰呰幏寰楁巿鏉冨茍娉ㄦ槑鍑哄銆?/div>

wythern 2019-03-27 13:29 鍙戣〃璇勮
]]>How to shuffle arrays and slices in Gohttp://m.shnenglu.com/wythern/archive/2019/01/17/216208.htmlwythernwythernThu, 17 Jan 2019 12:27:00 GMThttp://m.shnenglu.com/wythern/archive/2019/01/17/216208.htmlhttp://m.shnenglu.com/wythern/comments/216208.htmlhttp://m.shnenglu.com/wythern/archive/2019/01/17/216208.html#Feedback0http://m.shnenglu.com/wythern/comments/commentRss/216208.htmlhttp://m.shnenglu.com/wythern/services/trackbacks/216208.html鍦ㄦ

鐢變簬Go娌℃湁涓簊lice鎻愪緵shuffle鍑芥暟錛屾墍浠ラ渶瑕佽嚜宸辨兂鍔炴硶銆傜敱浜庢垜鍙渶瑕侀殢鏈轟竴嬈¢亶鍘? -> N錛屾墍浠ヨ繖孌礳ode鏈鍖歸厤銆?br />
func main() {
  vals := []int{10, 12, 14, 16, 18, 20}
  r := rand.New(rand.NewSource(time.Now().Unix()))
  for _, i := range r.Perm(len(vals)) {
    val := vals[i]
    fmt.Println(val)
  }
}

浼間箮go涓嶅儚scala鏈夐偅縐嶆儼鎬ф眰鍊肩殑鐗規(guī)э紝鎵浠ヨ繖閲岀殑r.Perm()榪樻槸浜х敓浜?jiǎn)涓涓猻lice錛屽鏋淣寰堝ぇ鍙兘鏄釜闂銆?br />




wythern 2019-01-17 20:27 鍙戣〃璇勮
]]>
go test 鐢╝rgs甯﹀弬鏁?/title><link>http://m.shnenglu.com/wythern/archive/2018/08/14/215845.html</link><dc:creator>wythern</dc:creator><author>wythern</author><pubDate>Tue, 14 Aug 2018 09:04:00 GMT</pubDate><guid>http://m.shnenglu.com/wythern/archive/2018/08/14/215845.html</guid><wfw:comment>http://m.shnenglu.com/wythern/comments/215845.html</wfw:comment><comments>http://m.shnenglu.com/wythern/archive/2018/08/14/215845.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/wythern/comments/commentRss/215845.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/wythern/services/trackbacks/215845.html</trackback:ping><description><![CDATA[<div>嫻嬭瘯涓兂閫氳繃鍛戒護(hù)琛屼紶閫掍竴浜涘弬鏁扮粰test func錛岀綉涓婃壘浜?jiǎn)涓浜涜祫鏂欎絾榪囩▼涓嶆槸寰堥『鍒╋紝榪欓噷璁板綍涓涓嬨?/div> <div></div> <div>棣栧厛go test鏈変竴涓?args鐨勫弬鏁拌鍙互杈懼埌榪欎釜鐩殑錛屼絾瀹炴祴涓嬫潵鍙戠幇鏈夋病鏈夋病鍖哄埆銆傘傘?/div> <div>google鏌ュ埌鐨勫ぇ閮ㄥ垎涔熸槸鐢ㄥ埌浜?jiǎn)flag綾誨瀷銆?/div> <div>flag.go鐨勬敞閲婂啓鐨勬瘮杈冩竻妤?/div> <div> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #008000; ">/*</span><span style="color: #008000; "><br />     Package flag implements command-line flag parsing.<br /> <br />     Usage:<br /> <br />     Define flags using flag.String(), Bool(), Int(), etc.<br /> <br />     This declares an integer flag, -flagname, stored in the pointer ip, with type *int.<br />         import "flag"<br />         var ip = flag.Int("flagname", 1234, "help message for flagname")<br />     If you like, you can bind the flag to a variable using the Var() functions.<br />         var flagvar int<br />         func init() {<br />             flag.IntVar(&flagvar, "flagname", 1234, "help message for flagname")<br />         }<br />     Or you can create custom flags that satisfy the Value interface (with<br />     pointer receivers) and couple them to flag parsing by<br />         flag.Var(&flagVal, "name", "help message for flagname")<br />     For such flags, the default value is just the initial value of the variable.<br /> <br />     After all flags are defined, call<br />         flag.Parse()<br />     to parse the command line into the defined flags.<br /> <img src="http://m.shnenglu.com/Images/dot.gif" alt="" /><br /> </span><span style="color: #008000; ">*/</span></div> </div> <div></div> <div>鍥犳闇瑕佸仛鐨勪簨鎯呭氨鏄細(xì)</div> <div>1. 瀹氫箟flag錛岃繖涓渶瑕佸湪main()鎵ц涔嬪墠瀹屾垚錛屾垜榪欓噷鍦╰est鏂囦歡閲岄潰鐢ㄥ叏灞鍙橀噺瀹屾垚錛屼絾a鍙互鏀懼湪鍑芥暟閲岄潰銆?/div> <div> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000; ">var (<br />     </span><span style="color: #008000; ">//</span><span style="color: #008000; "> Define global args flags.</span><span style="color: #008000; "><br /> </span><span style="color: #000000; ">    pA </span><span style="color: #000000; ">=</span><span style="color: #000000; "> flag.Int(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">a</span><span style="color: #000000; ">"</span><span style="color: #000000; ">, </span><span style="color: #000000; ">0</span><span style="color: #000000; ">,  </span><span style="color: #000000; ">"</span><span style="color: #000000; ">a.</span><span style="color: #000000; ">"</span><span style="color: #000000; ">)<br />     a </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">0</span><span style="color: #000000; "><br /> )</span></div> </div> <div>2. parse flag錛岃繖涓鍦╰est func鎵ц涔嬪墠錛屾墍浠ュ彲浠ヨ冭檻鍔犲叆涓涓猧nit()鍦╰est鏂囦歡閲屻?/div> <div> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000; ">func init() {<br />     flag.Parse()<br />     a </span><span style="color: #000000; ">=</span><span style="color: #000000; "> </span><span style="color: #000000; ">*</span><span style="color: #000000; ">pA<br /> }</span></div> </div> <div>鍚庨潰浣跨敤榪欎簺鍙橀噺灝辨病鏈夐棶棰樹(shù)簡(jiǎn)錛屾瘮濡傝繖鏍?/div> <div> <div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000; ">func TestInit(t </span><span style="color: #000000; ">*</span><span style="color: #000000; ">testing.T) {<br />     flag.Parse()<br />     t.Log(</span><span style="color: #000000; ">"</span><span style="color: #000000; ">a = </span><span style="color: #000000; ">"</span><span style="color: #000000; ">, a)<br /> }<br /> </span></div> </div> <div></div> <div>榪欓噷鐢ㄥ埌鐨勪富瑕佹槸flag鐨勫姛鑳斤紝嫻嬭瘯鐢ㄥ彂鐜版湁娌℃湁-args闂?shù)笉澶уQ屾墍浠ヨ繖涓敤娉曞彲鑳戒笉鏄緢絎﹀悎go test鐨勮姹傦紝鍏堢敤璧鋒潵鍐嶈浜?jiǎn)銆?/div> <div></div> <div></div> <div></div><div></div><div>REF</div> <div>1. https://www.golangtc.com/t/584cbd16b09ecc2e1800000b</div> <div>2. https://stackoverflow.com/.../process-command-line-arguments-in-go-test</div><div>3. https://hsulei.com/2017/08/23/gotest濡備綍浣跨敤鑷畾涔夊弬鏁?</div> <div><cite><br /></cite></div> <div></div><img src ="http://m.shnenglu.com/wythern/aggbug/215845.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/wythern/" target="_blank">wythern</a> 2018-08-14 17:04 <a href="http://m.shnenglu.com/wythern/archive/2018/08/14/215845.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[杞琞shell涓璱f鏉′歡瀛楃涓層佹暟瀛楁瘮瀵癸紝[[ ]]鍜孾 ]鍖哄埆http://m.shnenglu.com/wythern/archive/2018/08/14/215844.htmlwythernwythernTue, 14 Aug 2018 08:44:00 GMThttp://m.shnenglu.com/wythern/archive/2018/08/14/215844.htmlhttp://m.shnenglu.com/wythern/comments/215844.htmlhttp://m.shnenglu.com/wythern/archive/2018/08/14/215844.html#Feedback0http://m.shnenglu.com/wythern/comments/commentRss/215844.htmlhttp://m.shnenglu.com/wythern/services/trackbacks/215844.html鍘熸枃鍦ㄦ

瀛︿範(fàn)shell鐨勬椂鍊欐繪槸琚玸hell閲岀殑鏉′歡鍒ゆ柇鏂瑰紡鎼炲緱澶寸柤錛岀粡甯鎬笉鐭ラ亾鏀?鐢╗],[[]],(())榪樻槸test,let錛岃屽緢灝戞湁涔︽妸瀹冧滑鐨勫叧緋昏瑙g殑寰堟竻妤?搴旇鏄垜鎮(zhèn)熸у樊鎴栨槸鐪嬩功澶皯)錛屼粖澶╂葷粨涓涓嬶紝鍩虹鐨勪笢瑗垮瀹冧滑 鐨勪嬌鐢ㄦ柟娉曚笉鍐嶈禈榪幫紝閲嶇偣璇磋瀹冧滑鐨勫尯鍒殑浣跨敤鏃跺簲璇ユ敞鎰忕殑鍦版柟銆?br />
鍏堣[]鍜宼est錛屼袱鑰呮槸涓鏍風(fēng)殑錛屽湪鍛戒護(hù)琛岄噷test expr鍜孾 expr ]鐨勬晥鏋滅浉鍚屻倀est鐨勪笁涓熀鏈綔鐢ㄦ槸鍒ゆ柇鏂囦歡銆佸垽鏂瓧絎︿覆銆佸垽鏂暣鏁般傛敮鎸佷嬌鐢ㄤ笌鎴栭潪灝嗚〃杈懼紡榪炴帴璧鋒潵銆傝娉ㄦ剰鐨勬湁錛?br />
1.test涓彲鐢ㄧ殑姣旇緝榪愮畻絎﹀彧鏈?=鍜?=錛屼袱鑰呴兘鏄敤浜庡瓧絎︿覆姣旇緝鐨勶紝涓嶅彲鐢ㄤ簬鏁存暟姣旇緝錛屾暣鏁版瘮杈冨彧鑳戒嬌鐢?eq, -gt榪欑褰㈠紡銆傛棤璁烘槸瀛楃涓叉瘮杈冭繕鏄暣鏁版瘮杈冮兘鍗冧竾涓嶈浣跨敤澶т簬鍙峰皬浜庡彿銆傚綋鐒?dòng)灱屽鏋滀綘瀹炲湪鎯崇敤涔熸槸鍙互鐨勫Q屽浜庡瓧絎︿覆姣旇緝鍙互浣跨敤灝栨嫭鍙風(fēng)殑杞箟褰㈠紡錛?濡傛灉姣旇緝"ab"鍜?bc"錛歔 ab \< bc ]錛岀粨鏋滀負(fù)鐪燂紝涔熷氨鏄繑鍥炵姸鎬佷負(fù)0.

鐒跺悗鏄痆[ ]]錛岃繖鏄唴緗湪shell涓殑涓涓懡浠わ紝瀹冨氨姣斿垰鎵嶈鐨則est寮哄ぇ鐨勫浜?jiǎn)銆傛敮鎸佸瓧絎︿覆鐨勬ā寮忓尮閰嶏紙浣跨敤=~鎿嶄綔絎︽椂鐢氳嚦鏀寔shell鐨勬鍒欒〃杈?寮忥級(jí)銆傜畝鐩村己澶х殑浠や漢鍙戞寚錛侀昏緫緇勫悎鍙互涓嶄嬌鐢╰est鐨?a,-o鑰屼嬌鐢?amp;&,||榪欐牱鏇翠翰鍒囩殑褰㈠紡(閽堝c銆丣ava紼嬪簭鍛?銆傚綋 鐒?dòng)灱屼篃涓嶇敤鎯崇殑澶鏉傚Q屽熀鏈彧瑕佽浣?br />1.瀛楃涓叉瘮杈冩椂鍙互鎶婂彸杈圭殑浣滀負(fù)涓涓ā寮忥紙榪欐槸鍙寵竟鐨勫瓧絎︿覆涓嶅姞鍙屽紩鍙風(fēng)殑鎯呭喌涓嬨傚鏋滃彸杈圭殑瀛楃涓插姞浜?jiǎn)鍙屽紩鍙峰Q屽垯璁や負(fù)鏄竴涓枃鏈瓧絎︿覆銆傦級(jí)錛岃屼笉浠呬粎鏄竴涓瓧絎︿覆錛屾瘮濡俒[ hello == hell? ]]錛岀粨鏋滀負(fù)鐪熴?/p>

鍙﹀瑕佹敞鎰忕殑鏄紝浣跨敤[]鍜孾[]]鐨勬椂鍊欎笉瑕佸悵鍟┖鏍鹼紝姣忎竴欏逛袱杈歸兘瑕佹湁絀烘牸錛孾[ 1 == 2 ]]鐨勭粨鏋滀負(fù)“鍋?#8221;錛屼絾[[ 1==2 ]]鐨勭粨鏋滀負(fù)“鐪?#8221;錛佸悗涓縐嶆樉鐒舵槸閿欑殑


3.鏈鍚庡氨鏄痩et鍜?())錛屼袱鑰呬篃鏄竴鏍風(fēng)殑(鎴栬呰鍩烘湰涓婃槸涓鏍風(fēng)殑錛屽弻鎷彿姣攍et紼嶅急涓浜?銆備富瑕佽繘琛岀畻鏈繍綆?涓婇潰鐨勪袱涓兘涓嶈)錛屼篃姣旇緝閫傚悎榪?琛屾暣鏁版瘮杈冿紝鍙互鐩存帴浣跨敤鐔熸?zhèn)夌?lt;,>絳夋瘮杈冭繍綆楃銆傚彲浠ョ洿鎺ヤ嬌鐢ㄥ彉閲忓悕濡倂ar鑰屼笉闇瑕?var榪欐牱鐨勫艦寮忋傛敮鎸佸垎鍙烽殧寮鐨勫涓〃杈懼紡



wythern 2018-08-14 16:44 鍙戣〃璇勮
]]>
涓寮犲浘浜?jiǎn)瑙e叕閾惧拰绉侀?/title><link>http://m.shnenglu.com/wythern/archive/2018/08/01/215813.html</link><dc:creator>wythern</dc:creator><author>wythern</author><pubDate>Wed, 01 Aug 2018 06:05:00 GMT</pubDate><guid>http://m.shnenglu.com/wythern/archive/2018/08/01/215813.html</guid><wfw:comment>http://m.shnenglu.com/wythern/comments/215813.html</wfw:comment><comments>http://m.shnenglu.com/wythern/archive/2018/08/01/215813.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.shnenglu.com/wythern/comments/commentRss/215813.html</wfw:commentRss><trackback:ping>http://m.shnenglu.com/wythern/services/trackbacks/215813.html</trackback:ping><description><![CDATA[<div><img src="https://cdn-images-1.medium.com/max/1600/0*s0QUH2j9SAetBKQv." alt="" longdesc="private_and_public_chain" /><img src="http://m.shnenglu.com/images/cppblog_com/wythern/0_x2A_s0QUH2j9SAetBKQv..png" alt="" longdesc="private_and_public_chain" /></div><div>鍥劇墖鏉ユ簮錛歨ttps://blog.slock.it/public-vs-private-chain-7b7ca45044f</div><img src ="http://m.shnenglu.com/wythern/aggbug/215813.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.shnenglu.com/wythern/" target="_blank">wythern</a> 2018-08-01 14:05 <a href="http://m.shnenglu.com/wythern/archive/2018/08/01/215813.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>Full go tool list (keep constructing)http://m.shnenglu.com/wythern/archive/2018/07/21/215794.htmlwythernwythernSat, 21 Jul 2018 06:09:00 GMThttp://m.shnenglu.com/wythern/archive/2018/07/21/215794.htmlhttp://m.shnenglu.com/wythern/comments/215794.htmlhttp://m.shnenglu.com/wythern/archive/2018/07/21/215794.html#Feedback0http://m.shnenglu.com/wythern/comments/commentRss/215794.htmlhttp://m.shnenglu.com/wythern/services/trackbacks/215794.html
go get github.com/golang/lint/golint
go get github.com/kisielk/errcheck
go get golang.org/x/tools/cmd/benchcmp
go get github.com/cespare/prettybench
go get github.com/ajstarks/svgo/benchviz
go get golang.org/x/tools/cmd/stringer
go get github.com/josharian/impl
go get golang.org/x/tools/cmd/goimports
go get sourcegraph.com/sqs/goreturns
go get code.google.com/p/rog-go/exp/cmd/godef
go get github.com/nsf/gocode
go get golang.org/x/tools/cmd/oracle
go get golang.org/x/tools/cmd/gorename
go get github.com/kisielk/godepgraph


wythern 2018-07-21 14:09 鍙戣〃璇勮
]]>
Some materials about RPC transaction call.http://m.shnenglu.com/wythern/archive/2018/07/14/215784.htmlwythernwythernSat, 14 Jul 2018 09:00:00 GMThttp://m.shnenglu.com/wythern/archive/2018/07/14/215784.htmlhttp://m.shnenglu.com/wythern/comments/215784.htmlhttp://m.shnenglu.com/wythern/archive/2018/07/14/215784.html#Feedback0http://m.shnenglu.com/wythern/comments/commentRss/215784.htmlhttp://m.shnenglu.com/wythern/services/trackbacks/215784.html

Introduction

Solidiay doc about ABI and contract access.
https://solidity.readthedocs.io/en/develop/abi-spec.html
https://solidity.readthedocs.io/en/latest/introduction-to-smart-contracts.html?highlight=selfdestruct
http://www.ethdocs.org/en/latest/contracts-and-transactions/accessing-contracts-and-transactions.html
http://ethdocs.org/en/latest/contracts-and-transactions/contracts.html#testing-contracts-and-transactions
https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=suicide [global variables like msg.sender]
ABI intro in Ethereum Wiki.
https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#argument-encoding
https://github.com/ethereum/go-ethereum/wiki/Contract-Tutorial
JAON rpc api of Eth.
https://github.com/ethereum/wiki/wiki/JSON-RPC#json-rpc-api
https://github.com/ethereum/wiki/wiki/JavaScript-API#contract-methods
Deploy a contract using RPC.
https://github.com/rsksmart/rskj/wiki/Deploying-contracts-using-RPC-calls
A tool to generate the grpc server code for a contract
https://github.com/getamis/grpc-contract

How to test.

http://ethereum-tests.readthedocs.io/en/latest/test_types/transaction_tests.html
https://github.com/ethereum/cpp-ethereum/blob/develop/doc/generating_tests.rst
go-ethereum閲岄潰鏈変竴鎵箆m鍜宑ontract鐩稿叧鐨則ests錛岀粨鍚圓BI鍜宑ontract鐨勫畾涔夛紝鍙互寰堝鏄撶殑鍐欎竴鎵硅嚜宸卞畾鍒剁殑嫻嬭瘯錛屼粠web3js鎴栬呯洿鎺ュ湪go project閲岄潰璋冪敤閮藉彲浠ャ?/div>



wythern 2018-07-14 17:00 鍙戣〃璇勮
]]>What is shade jar, and what is its purpose.http://m.shnenglu.com/wythern/archive/2017/06/19/215009.htmlwythernwythernMon, 19 Jun 2017 03:23:00 GMThttp://m.shnenglu.com/wythern/archive/2017/06/19/215009.htmlhttp://m.shnenglu.com/wythern/comments/215009.htmlhttp://m.shnenglu.com/wythern/archive/2017/06/19/215009.html#Feedback0http://m.shnenglu.com/wythern/comments/commentRss/215009.htmlhttp://m.shnenglu.com/wythern/services/trackbacks/215009.html

https://stackoverflow.com/questions/13620281/what-is-the-maven-shade-plugin-used-for-and-why-would-you-want-to-relocate-java


Uber JAR, in short, is a JAR containing everything.

Normally in Maven, we rely on dependency management. An artifact contains only the classes/resources of itself. Maven will be responsible to find out all artifacts (JARs etc) that the project depending on when the project is built.

An uber-jar is something that take all dependencies, and extract the content of the dependencies and put them with the classes/resources of the project itself, in one big JAR. By having such uber-jar, it is easy for execution, because you will need only one big JAR instead of tons of small JARs to run your app. It also ease distribution in some case.

Just a side-note. Avoid using uber-jar as Maven dependency, as it is ruining the dependency resolution feature of Maven. Normally we create uber-jar only for the final artifact for actual deployment or for manual distribution, but not for putting to Maven repository.


Update: I have just discovered I haven't answered one part of the question : "What's the point of renaming the packages of the dependencies?". Here is some brief updates and hopefully will help people having similar question.

Creating uber-jar for ease of deployment is one use case of shade plugin. There are also other common use cases which involve package renaming.

For example, I am developing Foo library, which depends on a specific version (e.g. 1.0) of Bar library. Assuming I cannot make use of other version of Bar lib (because API change, or other technical issues, etc). If I simply declare Bar:1.0 as Foo's dependency in Maven, it is possible to fall into a problem: A Qux project is depending on Foo, and also Bar:2.0 (and it cannot use Bar:1.0 because Qux needs to use new feature in Bar:2.0). Here is the dilemma: should Qux use Bar:1.0 (which Qux's code will not work) or Bar:2.0 (which Foo's code will not work)?

In order to solve this problem, developer of Foo can choose to use shade plugin to rename its usage of Bar, so that all classes in Bar:1.0 jar are embedded in Foo jar, and the package of the embedded Bar classes is changed from com.bar to com.foo.bar. By doing so, Qux can safely depends on Bar:2.0 because now Foo is no longer depending on Bar, and it is using is own copy of "altered" Bar located in another package.



wythern 2017-06-19 11:23 鍙戣〃璇勮
]]>
青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>
            欧美国产专区| 宅男66日本亚洲欧美视频| 亚洲欧美综合一区| 亚洲日本成人网| 亚洲精品国偷自产在线99热| 亚洲美女在线国产| 亚洲视频一区二区在线观看 | 亚洲天堂久久| 亚洲精品少妇30p| 在线一区二区三区做爰视频网站| 影音先锋中文字幕一区| 国产精品视频99| 国产亚洲精久久久久久| 亚洲国产成人精品女人久久久| 久久精品午夜| 久久综合色播五月| 欧美激情在线观看| 国产日韩在线一区| 一区二区三区在线视频观看| 亚洲精品中文字幕女同| 欧美一区二区三区免费观看| 另类av一区二区| 一本大道av伊人久久综合| 欧美一二区视频| 欧美激情综合色综合啪啪| 国产真实乱偷精品视频免| 日韩视频免费观看高清在线视频| 国产精品你懂的在线欣赏| 激情欧美日韩| 亚洲在线一区| 亚洲黄色三级| 性欧美1819性猛交| 欧美视频亚洲视频| 亚洲国产精品电影| 久久久久国色av免费观看性色| 亚洲人成人一区二区在线观看 | 中日韩高清电影网| 久久大逼视频| 国产精品国产| 9色国产精品| 欧美波霸影院| 久久久91精品国产| 国产精品国产三级国产aⅴ9色| 久久午夜电影网| 国产精品亚洲精品| 一本一本久久| 欧美国产欧美亚洲国产日韩mv天天看完整| 亚洲香蕉网站| 欧美福利在线| 狂野欧美一区| 激情小说另类小说亚洲欧美 | 欧美一区二区国产| 亚洲精品视频一区二区三区| 久久gogo国模裸体人体| 国产精品毛片在线看| 日韩视频在线一区二区三区| 免费亚洲一区二区| 欧美在线一级视频| 国产网站欧美日韩免费精品在线观看| 欧美色图麻豆| 日韩小视频在线观看| 久久亚洲不卡| 久久久久久久久久久久久女国产乱 | 9i看片成人免费高清| 久久久最新网址| 国内久久精品| 麻豆成人综合网| 久久网站免费| 亚洲国产小视频在线观看| 老司机免费视频一区二区| 欧美一区二区三区免费在线看 | 欧美日韩一区二区三区高清| 亚洲激情在线播放| 亚洲精品1234| 欧美日韩一级片在线观看| 亚洲一区二区毛片| 亚洲一区二区精品在线| 国产啪精品视频| 老司机67194精品线观看| 久久av最新网址| 亚洲国产欧美日韩精品| 91久久久久| 国产精品久久久一区麻豆最新章节 | 欧美午夜大胆人体| 中文日韩欧美| 欧美一区二区三区在线播放| 国产一区二区成人| 亚洲国产一区二区精品专区| 欧美三级网页| 美女999久久久精品视频| 欧美国产第一页| 午夜免费日韩视频| 久热精品视频在线观看| 在线视频欧美精品| 欧美资源在线| 亚洲一级黄色av| 久久这里只精品最新地址| 亚洲一区二区伦理| 久久久精品免费视频| 正在播放亚洲| 久久福利资源站| 在线视频日韩精品| 久久人人超碰| 校园春色国产精品| 欧美大片在线观看一区| 欧美在线高清| 99精品国产福利在线观看免费| 亚洲欧美色婷婷| 黄色日韩在线| 亚洲图片欧洲图片日韩av| 亚洲国产成人精品女人久久久 | 夜夜爽99久久国产综合精品女不卡| 亚洲视频精品| 在线看日韩av| 午夜精品一区二区三区四区| 亚洲麻豆av| 久热精品视频在线免费观看| 久久精品视频亚洲| 欧美午夜精品伦理| 欧美成人午夜77777| 国产日韩欧美亚洲| 亚洲午夜极品| 亚洲视频网站在线观看| 欧美成人精品不卡视频在线观看| 国产一区二区成人| 日韩视频免费看| 91久久精品国产91久久| 久久精品国语| 久久婷婷影院| 精品不卡一区| 欧美中文在线免费| 久久激情视频久久| 国产精自产拍久久久久久| 亚洲素人一区二区| 亚洲一区二区三区精品在线观看| 亚洲黄色免费网站| 影音先锋久久精品| 欧美一区二区视频97| 久久久久国色av免费观看性色| 一道本一区二区| 亚洲精品影视在线观看| 欧美成人精品在线播放| 亚洲东热激情| 99精品视频免费观看| 欧美日韩国产成人精品| 亚洲福利视频网| 亚洲黄色一区二区三区| 欧美成人免费全部观看天天性色| 亚洲区第一页| 免费看黄裸体一级大秀欧美| 欧美激情91| 日韩午夜精品| 国产精品乱码妇女bbbb| 翔田千里一区二区| 免播放器亚洲一区| 91久久精品网| 欧美日韩国产精品自在自线| 在线中文字幕一区| 久久午夜av| 99综合视频| 国产女人精品视频| 美女免费视频一区| 亚洲美女视频网| 欧美诱惑福利视频| 亚洲国产精品va在线看黑人| 欧美日韩国产不卡在线看| 亚洲欧美中文另类| 亚洲第一精品在线| 亚洲综合国产精品| 久久久国产精彩视频美女艺术照福利| 亚洲电影中文字幕| 免费高清在线视频一区·| 亚洲精品乱码久久久久久黑人 | 在线免费日韩片| 欧美精品免费在线| 欧美一区二区免费| 最新中文字幕一区二区三区| 亚洲一区二区三区精品在线观看| 久久精品视频导航| 亚洲国内自拍| 久久伊人免费视频| 亚洲一区二区3| 亚洲第一网站| 国产欧美婷婷中文| 欧美精品 国产精品| 国产一区二区三区在线观看精品 | 欧美激情在线观看| 亚洲尤物精选| 亚洲国产综合在线| 毛片基地黄久久久久久天堂| 一区二区av在线| 伊人成人在线视频| 国产精品亚洲网站| 欧美精品一卡二卡| 蜜臀av一级做a爰片久久| 午夜视频在线观看一区二区| 一区二区三区鲁丝不卡| 亚洲精品久久久蜜桃| 欧美成人精品影院| 久久久亚洲精品一区二区三区 |