Edited, memorised or added to reading queue

on 18-Oct-2018 (Thu)

Do you want BuboFlash to help you learning these things? Click here to log in or create user.

Flashcard 3415977889036

Question
In regular expressions, using grep, search for all lines that begin with the word "The", in file test.txt
Answer
grep '^The' test.txt
^^ note the use of "^", also accaptable is: grep ' *^The' test.txt, this is to cover leading whitespace

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
5. Regular Expressions
and sometimes you would like to match a line that begins or ends with a certain string. The ^ character specifies the beginning of a line, and the $ character the end of the line. For example, <span>^The matches all lines that start with a The , and hack$ matches all lines that end with hack , and '^ *The.*hack *$' matches all lines that begin with The and end with hack , even if there







Flashcard 3419976371468

Question
In Linux, write a simple bash script that print the numbers from 1 to 4 out to the stdout in a loop (to demonstrate your knowledge of while loop).
Answer
#!/bin/bash
n=1
while [ $n -le 4 ]
do
​​​​​​​    echo $n
    n = $[n+1]
done
​​​​​​​

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
7. Shell Scripting
ere is an example ( -le stands for less than or equal): 5 N=1 while test "$N" -le "10" do echo "Number $N" N=$[N+1] done The N=1 creates a variable called N and places the number 1 into it. The <span>while command executes all the commands between the do and the done repetitively until the test condition is no longer true (i.e., until N is greater than 10 ). The -le stands for less than o







#has-images

“光”跑的这么快,它的速度是如何测量的?



  想必大家在日常生活中都有这样的经验,在雷雨天气,我们总是先看到闪电的光,然后过了好久才听到轰隆隆的雷声。这其中的原因也不难理解,那就是因为光的速度比声音的速度快多了。




  空气中声音的速度大概是340m/s,一马赫的速度,就是指的是声音在空气中的速度。对于光,它的速度似乎是无限的,在日常生活中,光似乎能瞬间从一个地点到另一个地点,例如我们打开手电筒,几乎就在同时我们就看到了手电筒发出的光传播的很远。其实光的速度也是有限的,只不过非常大。

  光在空气中的速度约为3*10^8 m/s。这个速度有多快呢?光在一秒钟内前进的距离大约就可以绕地球赤道7圈半,也就是说,几乎一眨眼的时间光就可以毫不费力的环游世界。从地球到月球的距离约为38万公里,光打个来回也仅仅需要两秒多(事实上,地球和月球之间的准确距离就是计算激光来回所花费时间得到的)。而人类在1969年第一次登上月球,花费了三天多的时间才到达月球,由此可见光速有多快。光速是目前人类已知速度的上限,没有什么东西能运动的比光速还快。既然光速这么快,那科学家们是如何知道光速的准确数值的呢?


激光测距



  光速测量史

  人类历史上首次测量光速是在1676年。当时丹麦天文学家奥勒·罗默通过研究木星的卫星木卫一发现光速是有限的,并不是无限的,并由此估计出了光速的值。他估算的过程如下图所示:


光速的估量



  其中的大环是地球绕太阳的轨道,小环是木卫一绕木星的轨道。当地球远离木星(从L到K)和接近木星(从F到G)时,木卫一从木星的阴影里(C到D)出来的时间会产生变化,从这个变化可以就知道光速是有限的,再加上木卫一绕木星的公转周期和地球的公转周期以及公转速度,就可以估算出光速了。从这中方法估计出的光速误差很大,约为2.2x10^8m/s, 比实际值小26%。

  在1728年,英国天文学家詹姆斯·布拉德利进一步提高了光速的准确度。他所使用的是恒星的光行差。光行差如下图所示


光行差示意图



  光行差,简单的来说就是地球的运动,会使恒星的方位产生变化。举例来说就是,假设在无风的天气里下雨,雨滴会垂直下落到你的身上,当你以一定的速度奔跑是,雨滴就会以另外一个角度落到你身上,不再垂直。结合这个角度的改变和你的速度,就可以估计出雨滴下落的速度。同样使用恒星光行差,结合地球的公转速度和恒星角度的变化,就可以估算出光速。使用这种方法估算出的光速约为3.01*10^8 m/s,误差仅仅为0.4%。

  提升光速测量精度

  首次准确在地球上,而不是依靠天体运动来测量光速的实验是在1849年由法国物理学家阿曼德·斐索实行的,他使用的方法叫做齿轮测速法。


齿轮法测光速



  这个方法的关键在于齿轮的转速,齿轮从很低的转速开始逐渐提速,在转速提升到某一关键速度的时候,齿轮转过两个齿的角度时,光线刚好从远处的镜子里折回。这样根据两齿之间的角度以及齿轮的转速,镜子的距离就可以计算出光速的大小。假设齿轮的转速刚好是,齿轮一共有N个齿,远处的镜子距离观察者L。那么光速。




  1849年阿曼德·斐索用这种装置测出的光速是3.15*10^8m/s,误差为5%,但是随后,法国科学家莱昂·傅科(就是用傅科摆演示地球自转的那个科学家),提高了这个装置的精确度,用旋转镜面代替了旋转的之轮,测出了2.98*10^8m/s的光速值,误差缩小到了0.5%。 旋转齿轮法和旋转镜面法对于光速的准确测量产生了很深远的影响,这种方法简单易行,结果很有说服力。直到1926年,这种方法都一直被当做测量光速的首选,精度一直提高到了0.001%左右。

  齿轮测速法较为精确并且可信地测出了光速的值。之后不久(1861-1862年)就出现了伟大的麦克斯韦(1831-1879,苏格兰物理学家),给出了麦克斯韦方程组,完美的描述了电磁波的运动,他从方程组中得出电磁波的速度约为




  非常接近当时光速的值,于是他大胆的猜测光就是一种特殊频率的电磁波。后来的实验确实证明了他的猜测。


史上最伟大的物理学家之一—詹姆斯·克拉克·麦克斯韦



  当知道光是电磁波之后,我们就可以从另外一种方式得到准确的光速,那就是通过测量(真空磁导率)和(真空介电常数)来计算光速,也就是上面提到的




  在1907年,美国科学家爱德华(Edward Bennett Rosa)和多尔西(N.E。 Dorsey)通过这种方法给出了当时最精确的光速值2.99788*10^8m/s,误差仅仅为0.003%。。

  20世纪50年代以后,随着电子工业技术的发展, 各种测量光速的新技术相继出现,例如谐振腔法(1950年),无线电干涉法(1958年),激光干涉法(1972年)等。下面我们一一介绍。

  谐振腔法主要依据的物理原理就是光也是电磁波,因为任意波长的电磁波具有相同

...
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

[Ò»ÄÉÌìÎÄ]¡°¹â¡±ÅܵÄÕâô¿ì£¬ËüµÄËÙ¶ÈÊÇÈçºÎ²âÁ¿µÄ£¿ - ¼¼ÐgӑՓ…^ | ²ÝÁñÉç…^ - t66y.com
最高、出款速度最快、体验效果最好、千万彩民、购彩首选!首冲有豪礼、1元存款、提现1分钟到账、多种玩法、超高赔率! yilecai.cc [凤凰娱乐:1156.COM] 十年凤凰 一如既往! 老品牌,值得信赖!1元即可存取款,美女荷官在线发牌,百家乐,牛牛,AV捕鱼王,上万款老虎机游戏任你玩。下载APP送18元,赢到100可以直接提现。FHYL.COM fhyl.com 一纳 全都收纳 <span>“光”跑的这么快,它的速度是如何测量的? 想必大家在日常生活中都有这样的经验,在雷雨天气,我们总是先看到闪电的光,然后过了好久才听到轰隆隆的雷声。这其中的原因也不难理解,那就是因为光的速度比声音的速度快多了。 空气中声音的速度大概是340m/s,一马赫的速度,就是指的是声音在空气中的速度。对于光,它的速度似乎是无限的,在日常生活中,光似乎能瞬间从一个地点到另一个地点,例如我们打开手电筒,几乎就在同时我们就看到了手电筒发出的光传播的很远。其实光的速度也是有限的,只不过非常大。 光在空气中的速度约为3*10^8 m/s。这个速度有多快呢?光在一秒钟内前进的距离大约就可以绕地球赤道7圈半,也就是说,几乎一眨眼的时间光就可以毫不费力的环游世界。从地球到月球的距离约为38万公里,光打个来回也仅仅需要两秒多(事实上,地球和月球之间的准确距离就是计算激光来回所花费时间得到的)。而人类在1969年第一次登上月球,花费了三天多的时间才到达月球,由此可见光速有多快。光速是目前人类已知速度的上限,没有什么东西能运动的比光速还快。既然光速这么快,那科学家们是如何知道光速的准确数值的呢? 激光测距 光速测量史 人类历史上首次测量光速是在1676年。当时丹麦天文学家奥勒·罗默通过研究木星的卫星木卫一发现光速是有限的,并不是无限的,并由此估计出了光速的值。他估算的过程如下图所示: 光速的估量 其中的大环是地球绕太阳的轨道,小环是木卫一绕木星的轨道。当地球远离木星(从L到K)和接近木星(从F到G)时,木卫一从木星的阴影里(C到D)出来的时间会产生变化,从这个变化可以就知道光速是有限的,再加上木卫一绕木星的公转周期和地球的公转周期以及公转速度,就可以估算出光速了。从这中方法估计出的光速误差很大,约为2.2x10^8m/s, 比实际值小26%。 在1728年,英国天文学家詹姆斯·布拉德利进一步提高了光速的准确度。他所使用的是恒星的光行差。光行差如下图所示 光行差示意图 光行差,简单的来说就是地球的运动,会使恒星的方位产生变化。举例来说就是,假设在无风的天气里下雨,雨滴会垂直下落到你的身上,当你以一定的速度奔跑是,雨滴就会以另外一个角度落到你身上,不再垂直。结合这个角度的改变和你的速度,就可以估计出雨滴下落的速度。同样使用恒星光行差,结合地球的公转速度和恒星角度的变化,就可以估算出光速。使用这种方法估算出的光速约为3.01*10^8 m/s,误差仅仅为0.4%。 提升光速测量精度 首次准确在地球上,而不是依靠天体运动来测量光速的实验是在1849年由法国物理学家阿曼德·斐索实行的,他使用的方法叫做齿轮测速法。 齿轮法测光速 这个方法的关键在于齿轮的转速,齿轮从很低的转速开始逐渐提速,在转速提升到某一关键速度的时候,齿轮转过两个齿的角度时,光线刚好从远处的镜子里折回。这样根据两齿之间的角度以及齿轮的转速,镜子的距离就可以计算出光速的大小。假设齿轮的转速刚好是,齿轮一共有N个齿,远处的镜子距离观察者L。那么光速。 1849年阿曼德·斐索用这种装置测出的光速是3.15*10^8m/s,误差为5%,但是随后,法国科学家莱昂·傅科(就是用傅科摆演示地球自转的那个科学家),提高了这个装置的精确度,用旋转镜面代替了旋转的之轮,测出了2.98*10^8m/s的光速值,误差缩小到了0.5%。 旋转齿轮法和旋转镜面法对于光速的准确测量产生了很深远的影响,这种方法简单易行,结果很有说服力。直到1926年,这种方法都一直被当做测量光速的首选,精度一直提高到了0.001%左右。 齿轮测速法较为精确并且可信地测出了光速的值。之后不久(1861-1862年)就出现了伟大的麦克斯韦(1831-1879,苏格兰物理学家),给出了麦克斯韦方程组,完美的描述了电磁波的运动,他从方程组中得出电磁波的速度约为 非常接近当时光速的值,于是他大胆的猜测光就是一种特殊频率的电磁波。后来的实验确实证明了他的猜测。 史上最伟大的物理学家之一—詹姆斯·克拉克·麦克斯韦 当知道光是电磁波之后,我们就可以从另外一种方式得到准确的光速,那就是通过测量(真空磁导率)和(真空介电常数)来计算光速,也就是上面提到的 在1907年,美国科学家爱德华(Edward Bennett Rosa)和多尔西(N.E。 Dorsey)通过这种方法给出了当时最精确的光速值2.99788*10^8m/s,误差仅仅为0.003%。。 20世纪50年代以后,随着电子工业技术的发展, 各种测量光速的新技术相继出现,例如谐振腔法(1950年),无线电干涉法(1958年),激光干涉法(1972年)等。下面我们一一介绍。 谐振腔法主要依据的物理原理就是光也是电磁波,因为任意波长的电磁波具有相同的速度,而电磁波的速度和它的波长和频率之间存在如下的关系: 速度=波长*频率。谐振腔法通过腔的尺寸可以很准确计算出里面电磁波的波长,而电磁波的频率又是已知的,因此,可以直接用上述公式计算出光的速度(或者说电磁波的速度)。 最后一种要说的就是激光干涉法了。目前各种资料查到的光速的值 299792458m/s,是通过激光干涉法测量出来的。无线电干涉和激光干涉本质上是一样的,因为它们都使用的是电磁波,只是波长不相同而已。因此我们只介绍激光干涉法。 想象一下水波,如下图所示,当两个水波相遇时,会产生干涉。当波峰和波峰(或波谷和波谷)相遇时,产生相加干涉,当波峰和波谷相遇时,会产生相消干涉。同样的道理对于光或者激光也是成立的。 水波干涉和波峰波谷示意图 激光干涉条纹 激光是一种高度相干的光,因此很适合用于进行干涉。从激光器发出的光的频率是已知的,精度可以达到10^-9赫兹 左右,波长的测量是通过法布里-珀罗干涉仪测量并和基准波长86-氪605nm的光谱线进行比较得到的,精度也可以达到10^-9m左右。由于激光干涉对于波长的要求非常的高,产生的干涉条纹和激光的波长密切相关,因此通过干涉条纹可以十分准确的计算出激光的波长。有了激光的频率和波长,就可以计算出光速了:光速=频率*波长。 1972年通过激光干涉法测出的光速值是299792.4562±0.0011m/s, 这时当时能达到的最高的精度了,因为当时米的定义是通过86-氪605nm的光谱线给出的,它的精度限制了光速精度的进一步提高。 不久后的1983年,国际计量大会直接规定光速的值为299792458m/s, 并且反过来用光速重新定义了米。也就是说现在的光速值是给定的,不会再改变了,精度也不会再继续提高了,因为它已经成了“米”这个基本单位的基准。所谓的基准,就是指“米”这个单位的最高精度是由光速的值给出的,因为光速值具有很好的稳定性和重复性。 从光速测量的历史可以看出,科学的进步并不是一蹴而就的,有时候需要好几代科学家的不懈努力才能实现。光速测量精度的不断提高,到现在成了一个确定的值,这对于物理学的发展来说十分重要。因为光速是物理中一个重要的常数,著名的质能方程 E=mc^2, 狭义相对论中的“尺缩钟慢”效应,广义相对论中的引力波,时空弯曲等等,都和光速密切相关。 每日天文一图 NGC 1672:哈勃望远镜拍摄的棒旋星系 许多旋涡星系都有个横跨其中央的棒状核心。甚至我们的银河系也被认为拥有一个不大的中央棒。以上这幅由轨道上的哈勃太空望远镜所拍摄的壮观细致特征影像呈现了显著的棒旋星系NGC 1672。在这幅影像中,还可见黑暗的丝状尘埃带,明亮蓝色恒星聚成的年轻星团,炽热氢气构成的红色发射星云,一个横跨星系中心、由恒星组成的明亮长棒




Flashcard 3433773534476

Question
In linux, sed [...] 's/e/E/g' test.txt, will replace all occurences of e with E in file test.txt and print results to stdout (i.e. not changing original test.txt file).
Answer
-e

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
rence in the same line (usually sed just replaces the first occurrence of the regular expression in each line). (There are other <option> ; see the sed info page.) For demonstration, type <span>sed -e 's/e/E/g' and type out a few lines of English text. 8.7 Regular Expression Subexpressions The section explains how to do the apparently complex task of moving text around within lines. Consider,







Flashcard 3433776680204

Question
In linux, command [...] -e 's/e/E/g' test.txt, will replace all occurences of e with E in file test.txt
Answer
sed

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
the same line (usually sed just replaces the first occurrence of the regular expression in each line). (There are other <option> ; see the sed info page.) For demonstration, type sed -e '<span>s/e/E/g' and type out a few lines of English text. 8.7 Regular Expression Subexpressions The section explains how to do the apparently complex task of moving text around within lines. Con







Flashcard 3433779825932

Question
In linux, sed -e 's/e/E/ [...] ' test.txt, will replace all occurences of e with E in file test.txt
Answer
g
^^ to generally apply the replacement to all found instances of the regex, not just the first!

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
he same line (usually sed just replaces the first occurrence of the regular expression in each line). (There are other <option> ; see the sed info page.) For demonstration, type sed -e 's/<span>e/E/g' and type out a few lines of English text. 8.7 Regular Expression Subexpressions The section explains how to do the apparently complex task of moving text around within lines. Consi







Flashcard 3433782971660

Question
In linux, you have a file called test.txt, how do you replace all occurences of "GNU" in that file with "NGU", you can have this output just go to prompt/stdout (no need to capture it in new file).
Answer
sed -e 's/GNU/NGU/g' test.txt
^^ note you have to use the -e flag (e for expression), and you have to use the last /g in the find/replace clause to indicate replace all instances of GNU not just the first one.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
rence in the same line (usually sed just replaces the first occurrence of the regular expression in each line). (There are other <option> ; see the sed info page.) For demonstration, type <span>sed -e 's/e/E/g' and type out a few lines of English text. 8.7 Regular Expression Subexpressions The section explains how to do the apparently complex task of moving text around within lines. Consider,







Flashcard 3433786117388

Question
In linux, you have a file called test.txt, how do you replace only the first occurence of "GNU", on each line in that file, with "NGU"? You can have this output just go to prompt/stdout (no need to capture it in new file).
Answer
sed -e 's/GNU/NGU/' test.txt
^^ note the -e is needed (e for expression)
^^ note that the last / in the 's/regex/replace/' is not followed by anything, i.e. not followed by g, to indicate replacing only the first instance found, not all instances

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
\ > <resultfile> where <search-regexp> is a regular expression, <replace-text> is the text you would like to replace each occurrence with, and <option> is nothing or <span>g , which means to replace every occurrence in the same line (usually sed just replaces the first occurrence of the regular expression in each line). (There are other <option> ; see







The packet filtering mechanism provided by iptables is organized into three different kinds of structures: tables, chains and targets. Simply put, a table is something that allows you to process packets in specific ways. The default table is the filter table, although there are other tables too.

Again, these tables have chains attached to them. These chains allow you to inspect traffic at various points, such as when they just arrive on the network interface or just before they’re handed over to a process. You can add rules to them match specific packets — such as TCP packets going to port 80 — and associate it with a target. A target decides the fate of a packet, such as allowing or rejecting it.

When a packet arrives (or leaves, depending on the chain), iptables matches it against rules in these chains one-by-one. When it finds a match, it jumps onto the target and performs the action associated with it. If it doesn’t find a match with any of the rules, it simply does what the default policy of the chain tells it to. The default policy is also a target. By default, all chains have a default policy of allowing packets.

statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

An In-Depth Guide to iptables, the Linux Firewall - Boolean World
functionality in netfilter. However, to keep this article simple, we won’t make a distinction between iptables and netfilter in this article, and simply refer to the entire thing as “iptables”. <span>The packet filtering mechanism provided by iptables is organized into three different kinds of structures: tables, chains and targets. Simply put, a table is something that allows you to process packets in specific ways. The default table is the filter table, although there are other tables too. Again, these tables have chains attached to them. These chains allow you to inspect traffic at various points, such as when they just arrive on the network interface or just before they’re handed over to a process. You can add rules to them match specific packets — such as TCP packets going to port 80 — and associate it with a target. A target decides the fate of a packet, such as allowing or rejecting it. When a packet arrives (or leaves, depending on the chain), iptables matches it against rules in these chains one-by-one. When it finds a match, it jumps onto the target and performs the action associated with it. If it doesn’t find a match with any of the rules, it simply does what the default policy of the chain tells it to. The default policy is also a target. By default, all chains have a default policy of allowing packets. Now, we’re going to take a deeper look into each of these structures. Tables As we’ve mentioned previously, tables allow you to do very specific things with packets. On a modern Linux d




Lookups occur on the local computer, not on the remote computer. They are executed with in the directory containing the role or play, as opposed to local tasks which are executed with the directory of the executed script. You can pass wantlist=True to lookups to use in jinja2 template “for” loops. Lookups are an advanced feature. You should have a good working knowledge of Ansible plays before incorporating them.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

Lookups — Ansible Documentation
ol machine, and can include reading the filesystem as well as contacting external datastores and services. This data is then made available using the standard templating system in Ansible. Note <span>Lookups occur on the local computer, not on the remote computer. They are executed with in the directory containing the role or play, as opposed to local tasks which are executed with the directory of the executed script. You can pass wantlist=True to lookups to use in jinja2 template “for” loops. Lookups are an advanced feature. You should have a good working knowledge of Ansible plays before incorporating them. Warning Some lookups pass arguments to a shell. When using variables from a remote/untrusted source, use the |quote filter to ensure safe usage. Topics Lookups Lookups and loops Lookups




Flashcard 3442055712012

Question
In linux, similar to sed, [...] is another stream editor, for searching/replacing and editing text, but it is more powerful and has more programming features (like loops, conditionals, functinos, etc).
Answer
awk

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
rence in the same line (usually sed just replaces the first occurrence of the regular expression in each line). (There are other <option> ; see the sed info page.) For demonstration, type <span>sed -e 's/e/E/g' and type out a few lines of English text. 8.7 Regular Expression Subexpressions The section explains how to do the apparently complex task of moving text around within line







Flashcard 3442059906316

Question
In linux, regular expression [...] are used, via sed, for example, to move chuncks of text around within lines, or to just display one (or more) chunck of a line.
Answer
subexpressions

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
in each line). (There are other <option> ; see the sed info page.) For demonstration, type sed -e 's/e/E/g' and type out a few lines of English text. 8.7 Regular Expression Subexpressions <span>The section explains how to do the apparently complex task of moving text around within lines. Consider, for example, the output of ls : say you want to automatically strip out only the size column-- sed can do this sort of editing if you use the special \( \) notation to group







Add Behavior Adds the provided value to the end of the linked list. Performance O(1) Adding an item to a linked list involves three steps: 1. Allocate the new LinkedListNode instance. 2. Find the last node of the existing list. 3. Point the Next property of the last node to the new node.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




The first thing we need to do is add two private fields to the LinkedList class: references to the first (head) and last (tail) nodes. { get { throw new System.NotImplementedException(); } } public bool Remove(T item) { throw new System.NotImplementedException(); } public System.Collections.Generic.IEnumerator GetEnumerator() { throw new System.NotImplementedException(); } System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() { throw new System.NotImplementedException(); } } private LinkedListNode _head; private LinkedListNode _tail;
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




The basic algorithm for node removal is: 1. Find the node to remove. 2. Update the Next property of the node that precedes the node being removed to point to the node that follows the node being removed.
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Definition Die Zelle ist der Grundbaustein des menschlichen Körpers sowie aller Tiere und Pflanzen. Sie ist die kleinste selbst- ständig lebende Einheit. Man unterschei- det zwei Kategorien von Zellen: ● prokaryote Zellen: unter dem Mikro- skop ist kein Zellkern zu sehen und ● eukaryote Zellen: unter dem Mikro - skop ist ein Zellkern zu sehen (▶ Abb. 1.1). Außer den Bakterien sind alle tierischen und pflanzlichen Organismen sog. Euka- ryoten
statusnot read reprioritisations
last reprioritisation on suggested re-reading day
started reading on finished reading on

pdf

cannot see any pdfs




Flashcard 3442072227084

Question
In linux, regular expression [...] , marked via the enclosing escaped-round-bracket syntax, group parts of a regular expression together, so they can be swapped or just displayed in chuncks via sed, for example.
Answer
subexpressions

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
g text around within lines. Consider, for example, the output of ls : say you want to automatically strip out only the size column-- sed can do this sort of editing if you use the special \( \) <span>notation to group parts of the regular expression together. Consider the following example: sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g' Here sed is searching for the expression \<.*\>[ ]*\<.*\> . From the chapter







Flashcard 3442075372812

Question
In linux, regular expression subexpressions, marked via the enclosing [...] syntax, group parts of a regular expression together, so they can be swapped or just displayed in chuncks via sed, for example.
Answer
\(\)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
moving text around within lines. Consider, for example, the output of ls : say you want to automatically strip out only the size column-- sed can do this sort of editing if you use the special <span>\( \) notation to group parts of the regular expression together. Consider the following example: sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g' Here sed is searching for the







Flashcard 3442079304972

Question
In linux, regular expression subexpressions, group parts of a regular expression together, so they can be [...] or trimmed (i.e. displayed in just one or more chuncks) via sed, for example.
Answer
swapped
^^ or re-arranged, etc.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
to automatically strip out only the size column-- sed can do this sort of editing if you use the special \( \) notation to group parts of the regular expression together. Consider the following <span>example: sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g' Here sed is searching for the expression \<.*\>[ ]*\<.*\> . From the chapter on regular expressions, we can s







Flashcard 3442082974988

Question
In linux, regular expression subexpressions, group parts of a regular expression together, so they can be swapped or [...] via sed, for example.
Answer
trimmed (i.e. displayed in just one or more chuncks)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
to see what happens when you run this: sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g' GNU Linux is cool Linux GNU cool is To return to our ls example (note that this is just an <span>example, to count file sizes you should instead use the du command), think about how we could sum the bytes sizes of all the files in a directory: expr 0 `ls -l | grep '^-' | \ sed 's/^\([^ ]*[







Flashcard 3442091625740

Question
In linux, running the command: du -h test.sh , for example, produces the following output:
4.0K test.h
Run a command from the shell such that the above output is printed in reverse, i.e. :
test.h 4.0K
** note: in du output is seperated by tabs (so use \t in your regex not spaces)
Answer
du -h test.sh | sed -e 's/\(\<.*\>\)\(\t*\)\(\<.*\>\)/\3 \1/g'
^^ note: the use of chuncking the regex in to 3 regex subexpressions via the backslash-paranthesis syntax
^^ note: the use of the \<\> syntax to signify whole words
^^ note the use of \3 \1 in the replacement clause to do the actual swapping.

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
't yet figured it out, we are trying to get that column of byte sizes into a format like + 438 + 1525 + 76 + 92146 so that expr can understand it. Hence, we replace each line with subexpression <span>\2 and a leading + sign. Backquotes give the output of this to expr , which studiously sums them, ignoring any newline characters as though the summation were typed in on a single line. There is one minor







Flashcard 3442095557900

Question
In linux, if you are doing a very simple find/replace or some very simple text swapping, use sed, but for anything even remotely complicated it is much better to use [...] , as sed is a pain in the ass to use.
Answer
awk

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
ting if you use the special \( \) notation to group parts of the regular expression together. Consider the following example: sed -e 's/\(<[^ ]*>\)\([ ]*\)\(<[^ ]*>\)/\3\2\1/g' Here <span>sed is searching for the expression \<.*\>[ ]*\<.*\> . From the chapter on regular expressions, we can see that it matches a whole word, an arbitrary amount of whitespace, and t







Flashcard 3442100014348

Question
In linux, you use the [...] charactor to safely split a very long command into multiple lines. For example:
sed -e '7a [...]
inserting this line after line 7' test.txt
Answer
\
^^ backslash

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
8.8 Inserting and Deleting Lines sed can perform a few operations that make it easy to write scripts that edit configuration files for you. For instance, sed -e '7a\ an extra line.\ another one.<span>\ one more.' a ppends three lines after line 7, whereas sed -e '7i\ an extra line.\ another one.\ one more.' i nserts three lines before line 7. Then sed -e '3,5D' D eletes lines 3 throug







Flashcard 3442103684364

Question
In linux, in bash scripts, the ";" charactor is used to signify end of line (in place of new line) to combine lines together, while the [...] charactor is used to split a long command into multiple lines
Answer
\
^^ backslash

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
ipts that edit configuration files for you. For instance, sed -e '7a\ an extra line.\ another one.\ one more.' a ppends three lines after line 7, whereas sed -e '7i\ an extra line.\ another one.<span>\ one more.' i nserts three lines before line 7. Then sed -e '3,5D' D eletes lines 3 through 5. In sed terminology, the numbers here are called addresses, which can also be regular expres







Flashcard 3442107354380

Question
In linux, while [...] is not easy to use for complicated text swapping and selective trimming (by columns, for example), it is easy to use for wholesale inserting and deleting of lines by simple pattern matching or by line numbers.
Answer
sed

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
r problem here: the first line contains a + with nothing before it, which will cause expr to complain. To get around this, we can just add a 0 to the expression, so that it becomes 0 + .... 8.8 <span>Inserting and Deleting Lines sed can perform a few operations that make it easy to write scripts that edit configuration files for you. For instance, sed -e '7a\ an extra line.\ another one.\ one more.' a ppends th







Flashcard 3442112597260

Question
In linux, while sed is not easy to use for complicated text swapping and selective trimming (by columns, for example), it is easy to use for wholesale [...] and deleting of lines by simple pattern matching or by line numbers.
Answer
inserting

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
r problem here: the first line contains a + with nothing before it, which will cause expr to complain. To get around this, we can just add a 0 to the expression, so that it becomes 0 + .... 8.8 <span>Inserting and Deleting Lines sed can perform a few operations that make it easy to write scripts that edit configuration files for you. For instance, sed -e '7a\ an extra line.\ another one.\ one more.' a ppe







Flashcard 3442117577996

Question
In linux, while sed is not easy to use for complicated text swapping and selective trimming (by columns, for example), it is easy to use for wholesale inserting and deleting of lines by [...] or by line numbers.
Answer
simple pattern matching

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
contains a + with nothing before it, which will cause expr to complain. To get around this, we can just add a 0 to the expression, so that it becomes 0 + .... 8.8 Inserting and Deleting Lines s<span>ed can perform a few operations that make it easy to write scripts that edit configuration files for you. For instance, sed -e '7a\ an extra line.\ another one.\ one more.' a ppends three







Flashcard 3442122034444

Question
In linux, you have file called test.txt, how do you insert line "hello kevin" before line 7 of this file (note: do it so that the output will just be sent to stdout, i.e. the file itself will not be changed)
Answer
sed -e '7i \
hello kevin' test.txt

^^ note: the syntax of using 7i, to insert BEFORE line 7
^^ also note the use of '\' to break the line up properly, although following is totally correct too: sed -e '7i hello kevin' test.txt


statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
expression, so that it becomes 0 + .... 8.8 Inserting and Deleting Lines sed can perform a few operations that make it easy to write scripts that edit configuration files for you. For instance, <span>sed -e '7a\ an extra line.\ another one.\ one more.' a ppends three lines after line 7, whereas sed -e '7i\ an extra line.\ another one.\ one more.' i nserts three lines before line 7. Then sed -e







Flashcard 3442125704460

Question
sed -e '7i
Answer
[default - edit me]

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
perations that make it easy to write scripts that edit configuration files for you. For instance, sed -e '7a\ an extra line.\ another one.\ one more.' a ppends three lines after line 7, whereas <span>sed -e '7i\ an extra line.\ another one.\ one more.' i nserts three lines before line 7. Then sed -e '3,5D' D eletes lines 3 through 5. In sed terminology, the numbers here are called addresses, w







Flashcard 3442127277324

Question
In linux, what does the below code do?
sed -e '7a\
an extra line' test.txt
Answer
It adds the line "an extra line" after line 7 of test.txt, but note that this output is only sent to stdout, the file itself is not changed!!!

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
perations that make it easy to write scripts that edit configuration files for you. For instance, sed -e '7a\ an extra line.\ another one.\ one more.' a ppends three lines after line 7, whereas <span>sed -e '7i\ an extra line.\ another one.\ one more.' i nserts three lines before line 7. Then sed -e '3,5D' D eletes lines 3 through 5. In sed terminology, the numbers here are called addresses, which can also be regular expressions match







Flashcard 3442130947340

Question
In linux, you have file, test.txt, how do you delete lines 3 to 5 from this file (where the new output is sent only to stdout, i.e. the file itself is not changed)?
Answer
sed -e '3,5D' test.txt 
^^ note the use of the 3,5D syntax, capital D!

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
ce, sed -e '7a\ an extra line.\ another one.\ one more.' a ppends three lines after line 7, whereas sed -e '7i\ an extra line.\ another one.\ one more.' i nserts three lines before line 7. Then <span>sed -e '3,5D' D eletes lines 3 through 5. In sed terminology, the numbers here are called addresses, which can also be regular expressions matches. To demonstrate: sed -e '/Dear Henry/,/Love Jane/D'







Flashcard 3442133830924

Question
In linux, you have file, test.txt, how do you delete all lines except lines 3 to 5 from this file (where the new output is sent only to stdout, i.e. the file itself is not changed)?
Answer
sed -e '3,5!D' test.txt
^^ Note the use of the 3,5!D syntax

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
hat the $ symbol indicates the last line: sed -e '$i\ The new second last line\ The new last line.' and finally, the negation symbol, ! , is used to match all lines not specified; for instance, <span>sed -e '7,11!D' deletes all lines except lines 7 through 11. Next: 9. Processes, Environment Variables Up: rute Previous: 7. Shell Scripting Contents <span>







Flashcard 3442138287372

Question
In linux, you have file, test.txt, how do you delete all the lines between the line containing "hello" and the line containing "kevin" (where the new output is sent only to stdout, i.e. the file itself is not changed)?
Answer
sed -e '/hello/,/kevin/D' test.txt

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
ree lines before line 7. Then sed -e '3,5D' D eletes lines 3 through 5. In sed terminology, the numbers here are called addresses, which can also be regular expressions matches. To demonstrate: <span>sed -e '/Dear Henry/,/Love Jane/D' deletes all the lines starting from a line matching the regular expression Dear Henry up to a line matching Love Jane (or the end of the file if one does not exist). This behavior appli







Flashcard 3442141957388

Question
In linux, you have file, test.txt, how do you insert "hello there" before every line that has the string "test" in it (where the new output is sent only to stdout, i.e. the file itself is not changed)?
Answer
sed -e '/test/i \
hello there' test.txt
^^ note the /regex/i syntx, the \ line seperator and all else:)

statusnot learnedmeasured difficulty37% [default]last interval [days]               
repetition number in this series0memorised on               scheduled repetition               
scheduled repetition interval               last repetition or drill
8. Streams and sed -- The Stream Editor
rting from a line matching the regular expression Dear Henry up to a line matching Love Jane (or the end of the file if one does not exist). This behavior applies just as well to to insertions: <span>sed -e '/Love Jane/i\ Love Carol\ Love Beth' Note that the $ symbol indicates the last line: sed -e '$i\ The new second last line\ The new last line.' and finally, the negation symbol, ! , is used to match