line

解决zsh中无法正常使用home和end等键的问题

巧了我就是萌 提交于 2019-12-16 00:52:58
在.zshrc中添加: # key bindings bindkey "\e[1~" beginning-of-line bindkey "\e[4~" end-of-line bindkey "\e[5~" beginning-of-history bindkey "\e[6~" end-of-history bindkey "\e[3~" delete-char bindkey "\e[2~" quoted-insert bindkey "\e[5C" forward-word bindkey "\eOc" emacs-forward-word bindkey "\e[5D" backward-word bindkey "\eOd" emacs-backward-word bindkey "\ee[C" forward-word bindkey "\ee[D" backward-word bindkey "^H" backward-delete-word # for rxvt bindkey "\e[8~" end-of-line bindkey "\e[7~" beginning-of-line # for non RH/Debian xterm, can't hurt for RH/DEbian xterm bindkey "\eOH" beginning-of-line

mac:ElastAlert 安装

此生再无相见时 提交于 2019-12-15 11:11:37
一 Python安装过程 初次使用Python。记录下操作过程,还不如jdk那样简单明了。 安装Python:python setup.py install python setup.py install running install Checking .pth file support in /Library/Python/2.7/site-packages/ error: can't create or remove files in install directory The following error occurred while trying to add or remove files in the installation directory: [Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-17697.pth' The installation directory you specified (via --install-dir, --prefix, or the distutils default setting) was: /Library/Python/2.7/site-packages/ Perhaps your account

一致性专题之cpu缓存一致性(二)

空扰寡人 提交于 2019-12-14 17:10:36
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 在 一致性专题之cpu缓存一致性(一) 中主要描述了缓存与内存的映射方式,该篇主要描述cache line的状态: 1、状态M表示该缓存行中数据有修改,并且与内存中的数据不一致; 2、状态E表示该缓存行中数据有修改,并且与内存中的数据一致; 3、状态S表示该缓存行中数据与内存中的数据一致,并且与其它内核中的cache line一致; 4、状态I表示该缓存行无效; 每个cache控制器除了监听自己cache的读写操作还监听其它cache的 读写操作与状态 ,因此每个缓存行根据当前所处的状态与监听的动作进行状态转换,简称MESI一致性协议。读写操作具体可分成4种类型(LR-本内核读取本cache,LW-本内核写本cache,RR-其它内核读其对应的cache,RW-其它内核写其对应的cache)状态转换过程如下: 1、当数据所在cache line处于I状态并发生LR时,如果其它内核cache line中没有该数据则从内存加载,然后该cache line状态变成E;如果其它内核cache line中有该数据并处于状态M时,令其写入到内存后然后本内核从内存中加载,两个cache line都处于S状态;如果其它内核cache line中有该数据且已处于状态S或者E时,本cache line从内存中加载然后都变成S状态。

Draw cube vertices with fewest number of steps

依然范特西╮ 提交于 2019-12-14 04:22:23
问题 What's the fewest number of steps needed to draw all of the cube's vertices, without picking up the pen from the paper? So far I have reduced it to 16 steps: 0, 0, 0 0, 0, 1 0, 1, 1 1, 1, 1 1, 1, 0 0, 1, 0 0, 0, 0 1, 0, 0 1, 0, 1 0, 0, 1 0, 1, 1 0, 1, 0 1, 1, 0 1, 0, 0 1, 0, 1 1, 1, 1 I presume it can be reduced less than 16 steps as there are only 12 vertices to be drawn You can view a working example in three.js javascript here: http://jsfiddle.net/kmturley/5aeucehf/show/ 回答1: Well I

Line plot legend does not appear

≡放荡痞女 提交于 2019-12-14 04:02:14
问题 I am trying to plot a line plot in r by using ggplot. Unfortunately, the legend does not show up. Can anyone help me? My code looks like the following: dfdatavgsM=data.frame(datum, avgsätzegespMT, avgsätzegespML) ggplot(data = dfdatavgsM, aes(x=datum, color=Wettbewerbsart)) + geom_line(data=dfdatavgsM, aes(y = avgsätzegespML),color="red") + geom_line(data=dfdatavgsM, aes(y = avgsätzegespMT), color="blue") + geom_vline(xintercept=2011, size = 0.6) + scale_y_continuous(name="Anzahl an Sätzen")

Line Drawing In landscape mode using iText

落爺英雄遲暮 提交于 2019-12-14 03:09:06
问题 This is the code I use to draw a line. double[] lineArray = annotation.getAsArray(PdfName.L).asDoubleArray(); double x1 = lineArray[0] - rect.getAsNumber(0).doubleValue(); double y1 = lineArray[1] - rect.getAsNumber(1).doubleValue(); double x2 = lineArray[2] - rect.getAsNumber(0).doubleValue(); double y2 = lineArray[3] - rect.getAsNumber(1).doubleValue(); cs.moveTo(x1, y1); cs.lineTo(x2, y2); Where cs is PdfAppearance, annotation is PdfAnnotation and rect is PdfArray rect = annotation

How to handle file with different line separator in java?

邮差的信 提交于 2019-12-14 02:27:29
问题 I have a huge file (more than 3GB) that contains a single long line in the following format. "1243@818@9287@543" Then the data I want to analyze is separated with "@". My idea is to change the default end of line character used by Java ans set "@". I'm trying with the following code using "System.setProperty("line.separator", "@");" but is not working, since is printing the complete line and for this test I'd like as output. 1243 818 9287 543 How can I change the default line separator to "@"

C - Trying to go back to previous line in the file

与世无争的帅哥 提交于 2019-12-13 22:19:58
问题 I have to read a text file which can begin with optional comments. In practice I have to skip any line at the beginning of the file that doesn't begin with '@' or '>'. In my test case the file looks like: # Sun Jul 12 22:04:52 2009 /share/apps/corona/bin/filter_fasta.pl --output=/data/results/solid0065/primary.20090712170542775 # Cwd: /state/partition1/home/pipeline # Title: solid0065_20090629_FC1_Tomate_Heinz_4_5_Kb_Tomate_Heinz_4_5_Kb_01 >125_963_316_F3 T1230330231223011323010013 So I have

Smooth update to x axis in a D3 line chart?

一笑奈何 提交于 2019-12-13 21:19:58
问题 I have an example animated line chart located here: http://www.animatedcreations.net/d3/animatedLineChart.html Everything is working as I would like it to, except that the redraw on the graph line is not smooth as in the example at the bottom of this page: http://bost.ocks.org/mike/path/. Another problem is that the line and x axis are slightly out of sync. I am pretty sure the problem with code lies in how .attr("d", line) is updated. Any help would be very much appreciated - I've been stuck

Drawing lines by dragging the mouse in matlab

二次信任 提交于 2019-12-13 18:22:01
问题 I want to draw a set of disconnected lines on top of an image by dragging the mouse while pressing the left button. However, if I click on a previously drawn line to specify the starting point of the next line, the callback function is not being called and I don't get the point. Here is my code: function main_test S.fH = figure('menubar','none'); im = imread( 'image.jpg' ); S.aH = axes; S.iH = imshow( im ); hold on axis image; X = []; Y = []; set(S.aH,'ButtonDownFcn',@startDragFcn) set(S.iH,