锘??xml version="1.0" encoding="utf-8" standalone="yes"?>国产精品久久久久影院亚瑟,一区二区欧美日韩视频,国产一区二区三区久久 http://www.shnenglu.com/wythern/X presents Y for a better Zzh-cnMon, 08 Dec 2025 06:16:31 GMTMon, 08 Dec 2025 06:16:31 GMT60[杞琞鍦↙inux涓嬪浣曞垱寤簉amdiskhttp://www.shnenglu.com/wythern/archive/2020/02/26/217165.htmlwythernwythernWed, 26 Feb 2020 07:17:00 GMThttp://www.shnenglu.com/wythern/archive/2020/02/26/217165.htmlhttp://www.shnenglu.com/wythern/comments/217165.htmlhttp://www.shnenglu.com/wythern/archive/2020/02/26/217165.html#Feedback0http://www.shnenglu.com/wythern/comments/commentRss/217165.htmlhttp://www.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://www.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://www.shnenglu.com/wythern/archive/2019/11/28/217004.html</guid><wfw:comment>http://www.shnenglu.com/wythern/comments/217004.html</wfw:comment><comments>http://www.shnenglu.com/wythern/archive/2019/11/28/217004.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wythern/comments/commentRss/217004.html</wfw:commentRss><trackback:ping>http://www.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錛岃繖涓敤娉曟湁涓己鐐規槸灝嗗嚱鏁板彉鎴愪簡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://www.shnenglu.com/wythern/aggbug/217004.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wythern/" target="_blank">wythern</a> 2019-11-28 18:13 <a href="http://www.shnenglu.com/wythern/archive/2019/11/28/217004.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>[杞琞CRLF鍜孡F鍦ㄨ法騫沖彴宸ヤ綔鏃跺欏甫鏉ョ殑鐑︽伡浠ュ強瑙e喅鏂規硶http://www.shnenglu.com/wythern/archive/2019/03/27/216318.htmlwythernwythernWed, 27 Mar 2019 05:29:00 GMThttp://www.shnenglu.com/wythern/archive/2019/03/27/216318.htmlhttp://www.shnenglu.com/wythern/comments/216318.htmlhttp://www.shnenglu.com/wythern/archive/2019/03/27/216318.html#Feedback0http://www.shnenglu.com/wythern/comments/commentRss/216318.htmlhttp://www.shnenglu.com/wythern/services/trackbacks/216318.html鍦ㄦ

鍦ㄤ嬌鐢╣it鎻愪氦浠g爜鏃跺欙紝鏈夋椂鍊欎細閬囧埌涓涓棶棰橈紝灝辨槸鑷繁鏄庢槑鍙慨鏀逛簡鍏朵腑鍑犺錛屾彁浜や笂鍘諱互鍚庡彂鐜版暣涓枃浠墮兘琚慨鏀逛簡錛屽湪璁劇疆浜嗘牸寮忛鏍間互鍚庤繕浼氭湁鎻愪氦涓嶄笂鍘葷殑鎯呭喌錛岃繖涓椂鍊欑粡甯歌浜烘懜涓嶅埌澶磋剳錛屽叾瀹炲氨鏄疌RLF鍜孡F鍦ㄤ綔鎬?/p>

CRLF LF CR 閮芥槸浠涔堟剰鎬濓細

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

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

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

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

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

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

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

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

瑙e喅鏂規硶錛?/h2>

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





















璁劇疆鏍煎紡

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

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

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

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

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

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

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

鍏蜂綋浣撶幇涓猴細

  • git config --global core.autocrlf true


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

  • git config --global core.autocrlf input

Linux鎴朚ac緋葷粺浣跨敤LF浣滀負琛岀粨鏉熺錛涘綋涓涓互CRLF涓鴻緇撴潫絎︾殑鏂囦歡涓嶅皬蹇冭寮曞叆鏃朵綘鑲畾鎯寵繘琛屼慨姝o紝鎶奵ore.autocrlf璁劇疆鎴恑nput鏉ュ憡璇?Git 鍦╬ush鏃舵妸CRLF杞崲鎴怢F錛宲ull鏃朵笉杞崲

  • git config --global core.autocrlf false

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

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



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

wythern 2019-03-27 13:29 鍙戣〃璇勮
]]>How to shuffle arrays and slices in Gohttp://www.shnenglu.com/wythern/archive/2019/01/17/216208.htmlwythernwythernThu, 17 Jan 2019 12:27:00 GMThttp://www.shnenglu.com/wythern/archive/2019/01/17/216208.htmlhttp://www.shnenglu.com/wythern/comments/216208.htmlhttp://www.shnenglu.com/wythern/archive/2019/01/17/216208.html#Feedback0http://www.shnenglu.com/wythern/comments/commentRss/216208.htmlhttp://www.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鏈夐偅縐嶆儼鎬ф眰鍊肩殑鐗規э紝鎵浠ヨ繖閲岀殑r.Perm()榪樻槸浜х敓浜嗕竴涓猻lice錛屽鏋淣寰堝ぇ鍙兘鏄釜闂銆?br />




wythern 2019-01-17 20:27 鍙戣〃璇勮
]]>
go test 鐢╝rgs甯﹀弬鏁?/title><link>http://www.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://www.shnenglu.com/wythern/archive/2018/08/14/215845.html</guid><wfw:comment>http://www.shnenglu.com/wythern/comments/215845.html</wfw:comment><comments>http://www.shnenglu.com/wythern/archive/2018/08/14/215845.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wythern/comments/commentRss/215845.html</wfw:commentRss><trackback:ping>http://www.shnenglu.com/wythern/services/trackbacks/215845.html</trackback:ping><description><![CDATA[<div>嫻嬭瘯涓兂閫氳繃鍛戒護琛屼紶閫掍竴浜涘弬鏁扮粰test func錛岀綉涓婃壘浜嗕竴浜涜祫鏂欎絾榪囩▼涓嶆槸寰堥『鍒╋紝榪欓噷璁板綍涓涓嬨?/div> <div></div> <div>棣栧厛go test鏈変竴涓?args鐨勫弬鏁拌鍙互杈懼埌榪欎釜鐩殑錛屼絾瀹炴祴涓嬫潵鍙戠幇鏈夋病鏈夋病鍖哄埆銆傘傘?/div> <div>google鏌ュ埌鐨勫ぇ閮ㄥ垎涔熸槸鐢ㄥ埌浜唂lag綾誨瀷銆?/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://www.shnenglu.com/Images/dot.gif" alt="" /><br /> </span><span style="color: #008000; ">*/</span></div> </div> <div></div> <div>鍥犳闇瑕佸仛鐨勪簨鎯呭氨鏄細</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>鍚庨潰浣跨敤榪欎簺鍙橀噺灝辨病鏈夐棶棰樹簡錛屾瘮濡傝繖鏍?/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闂涓嶅ぇ錛屾墍浠ヨ繖涓敤娉曞彲鑳戒笉鏄緢絎﹀悎go test鐨勮姹傦紝鍏堢敤璧鋒潵鍐嶈浜嗐?/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://www.shnenglu.com/wythern/aggbug/215845.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wythern/" target="_blank">wythern</a> 2018-08-14 17:04 <a href="http://www.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://www.shnenglu.com/wythern/archive/2018/08/14/215844.htmlwythernwythernTue, 14 Aug 2018 08:44:00 GMThttp://www.shnenglu.com/wythern/archive/2018/08/14/215844.htmlhttp://www.shnenglu.com/wythern/comments/215844.htmlhttp://www.shnenglu.com/wythern/archive/2018/08/14/215844.html#Feedback0http://www.shnenglu.com/wythern/comments/commentRss/215844.htmlhttp://www.shnenglu.com/wythern/services/trackbacks/215844.html鍘熸枃鍦ㄦ

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

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

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


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



wythern 2018-08-14 16:44 鍙戣〃璇勮
]]>
涓寮犲浘浜嗚В鍏摼鍜岀閾?/title><link>http://www.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://www.shnenglu.com/wythern/archive/2018/08/01/215813.html</guid><wfw:comment>http://www.shnenglu.com/wythern/comments/215813.html</wfw:comment><comments>http://www.shnenglu.com/wythern/archive/2018/08/01/215813.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.shnenglu.com/wythern/comments/commentRss/215813.html</wfw:commentRss><trackback:ping>http://www.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://www.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://www.shnenglu.com/wythern/aggbug/215813.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.shnenglu.com/wythern/" target="_blank">wythern</a> 2018-08-01 14:05 <a href="http://www.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://www.shnenglu.com/wythern/archive/2018/07/21/215794.htmlwythernwythernSat, 21 Jul 2018 06:09:00 GMThttp://www.shnenglu.com/wythern/archive/2018/07/21/215794.htmlhttp://www.shnenglu.com/wythern/comments/215794.htmlhttp://www.shnenglu.com/wythern/archive/2018/07/21/215794.html#Feedback0http://www.shnenglu.com/wythern/comments/commentRss/215794.htmlhttp://www.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://www.shnenglu.com/wythern/archive/2018/07/14/215784.htmlwythernwythernSat, 14 Jul 2018 09:00:00 GMThttp://www.shnenglu.com/wythern/archive/2018/07/14/215784.htmlhttp://www.shnenglu.com/wythern/comments/215784.htmlhttp://www.shnenglu.com/wythern/archive/2018/07/14/215784.html#Feedback0http://www.shnenglu.com/wythern/comments/commentRss/215784.htmlhttp://www.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://www.shnenglu.com/wythern/archive/2017/06/19/215009.htmlwythernwythernMon, 19 Jun 2017 03:23:00 GMThttp://www.shnenglu.com/wythern/archive/2017/06/19/215009.htmlhttp://www.shnenglu.com/wythern/comments/215009.htmlhttp://www.shnenglu.com/wythern/archive/2017/06/19/215009.html#Feedback0http://www.shnenglu.com/wythern/comments/commentRss/215009.htmlhttp://www.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>
            欧美影院在线| 欧美一级免费视频| 欧美激情综合| 欧美成人久久| 亚洲日韩视频| 亚洲日本欧美| 欧美精品免费视频| 亚洲香蕉网站| 亚洲欧美一区二区三区久久| 亚洲精品综合| 狼人天天伊人久久| 久久综合五月| 亚洲视频视频在线| 亚洲五月六月| 韩国av一区二区三区四区| 女同一区二区| 欧美视频一区二区三区四区 | 亚洲欧美99| 国产亚洲欧洲997久久综合| 免费在线欧美视频| 欧美日韩卡一卡二| 欧美制服丝袜第一页| 久久天天躁狠狠躁夜夜av| 日韩一级免费| 欧美中文字幕在线视频| av成人免费在线| 午夜久久久久久久久久一区二区| 亚洲国内精品| 亚洲欧美卡通另类91av| 亚洲娇小video精品| 亚洲你懂的在线视频| 在线成人激情视频| 亚洲中字在线| 99综合视频| 久久久国产精彩视频美女艺术照福利| 夜夜爽av福利精品导航| 久久精品99无色码中文字幕| 一区二区三区福利| 久久久天天操| 欧美专区在线观看| 欧美日韩视频在线一区二区 | 久久婷婷久久| 国产精品jizz在线观看美国 | 久久午夜精品| 国产精品v日韩精品v欧美精品网站| 久久影视三级福利片| 国产精品久久看| 亚洲啪啪91| 亚洲高清影视| 久久久久国产成人精品亚洲午夜| 亚洲婷婷综合色高清在线 | 亚洲欧美精品| 亚洲五月婷婷| 欧美激情久久久| 欧美激情精品| 在线不卡亚洲| 久久久最新网址| 久久―日本道色综合久久| 国产精品一区久久久| 在线亚洲一区二区| 中文国产成人精品久久一| 欧美成人按摩| 嫩草国产精品入口| 久久人人爽国产| 久久精品亚洲国产奇米99| 欧美日精品一区视频| 91久久嫩草影院一区二区| 亚洲电影欧美电影有声小说| 久久精品国产99国产精品| 久久―日本道色综合久久| 狠狠色狠狠色综合日日小说| 欧美一级网站| 另类激情亚洲| 亚洲狠狠丁香婷婷综合久久久| 久久久午夜精品| 欧美国产成人在线| 亚洲精品乱码久久久久久| 欧美激情综合在线| 99在线热播精品免费99热| 亚洲一区欧美一区| 国产乱码精品一区二区三区忘忧草| 亚洲影院在线| 老司机精品视频网站| 亚洲片在线资源| 欧美日韩网址| 欧美一区视频在线| 欧美大片免费久久精品三p | 国产精品美女久久久久av超清| 一本一本大道香蕉久在线精品| 午夜精品久久久久影视 | 国产精品美女xx| 性欧美办公室18xxxxhd| 欧美成人首页| 亚洲尤物视频网| 国内精品久久久久影院色 | 亚洲免费在线观看视频| 久久午夜精品一区二区| 亚洲狼人综合| 国产手机视频一区二区| 嫩模写真一区二区三区三州| 一本色道88久久加勒比精品| 久久精品毛片| 在线一区二区三区四区| 国产一区视频在线看| 欧美激情一区二区在线| 午夜国产精品影院在线观看| 欧美激情久久久久久| 亚洲网站啪啪| 亚洲电影自拍| 国产欧美二区| 欧美日韩国产色视频| 久久久水蜜桃av免费网站| 一本色道久久88精品综合| 欧美.www| 久久电影一区| 亚洲免费综合| 一区二区免费在线观看| 在线免费观看一区二区三区| 国产精品久久久久久亚洲毛片| 欧美大片第1页| 欧美一区二区三区四区视频| 99在线|亚洲一区二区| 欧美国产欧美综合 | 亚洲影院一区| 91久久久在线| 在线播放一区| 国外精品视频| 国产亚洲第一区| 国产精品日韩欧美一区| 欧美精品一区二区三区四区| 久久综合国产精品| 久久精视频免费在线久久完整在线看 | 国产自产2019最新不卡| 国产精品第2页| 欧美人与性禽动交情品| 另类天堂av| 麻豆国产精品一区二区三区 | 亚洲精品视频免费| 欧美激情一区二区三区高清视频 | 亚洲欧美国产精品va在线观看| 亚洲免费电影在线| 99精品国产在热久久婷婷| 91久久综合亚洲鲁鲁五月天| 亚洲电影网站| 亚洲欧洲综合| 99亚洲一区二区| 亚洲视频一二区| 亚洲午夜精品久久久久久浪潮| 宅男精品导航| 亚洲一区在线看| 欧美一区二区观看视频| 欧美亚洲网站| 久久婷婷av| 亚洲电影免费观看高清完整版在线观看 | 在线电影一区| 亚洲精品三级| 亚洲久久一区二区| 亚洲影院色无极综合| 欧美一级理论片| 久久综合九色综合网站 | 亚洲午夜精品久久| 午夜久久黄色| 久久免费国产精品| 亚洲国产成人久久综合| 日韩一级大片在线| 亚洲欧美中文另类| 久久亚洲春色中文字幕| 欧美高清视频一区| 国产精品国产三级国产专区53 | 99精品欧美一区| 亚洲一区二区视频在线观看| 新狼窝色av性久久久久久| 另类酷文…触手系列精品集v1小说| 美女精品自拍一二三四| 亚洲精品乱码久久久久久久久| 一区二区三区四区国产精品| 久久国产欧美| 欧美精品一区二区三区蜜臀| 国产精品一二| 亚洲日本中文| 欧美在线观看你懂的| 欧美寡妇偷汉性猛交| 在线视频你懂得一区| 久久亚洲精品伦理| 国产精品成人在线| 亚洲国产另类 国产精品国产免费| av72成人在线| 农夫在线精品视频免费观看| 日韩一区二区精品| 看片网站欧美日韩| 国产精品亚发布| 亚洲国产日韩欧美在线动漫| 午夜精品久久久久久久99水蜜桃 | 久久久久久一区二区| 亚洲精品乱码| 久久资源在线| 国产一区二区中文字幕免费看| 夜夜精品视频一区二区| 欧美h视频在线| 性欧美8khd高清极品|