undo

如何在Vim中进行重做(即“撤消撤消”)?

馋奶兔 提交于 2019-12-26 18:37:39
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 在Vim中,我做了太多的撤消。 如何撤消此操作(即重做)? #1楼 奇怪没有人提到 :earlier / :later 。 要重做你需要做的一切 later 9999999d (假设您最初在9999999天前编辑了该文件),或者,如果您还记得当前撤消状态与所需撤消状态之间的差异,请分别使用 Nh , Nm 或 Ns 表示小时,分钟和秒。 + :later N<CR> <=> Ng+ 和 :later Nf 用于文件写入。 #2楼 Ctrl + r #3楼 在命令模式下,使用U键撤消,使用Ctrl + r重做。 请访问 http://www.vim.org/htmldoc/undo.html 。 #4楼 CTRL + r “r”是小写的。 #5楼 Vim文档 <Undo> or *undo* *<Undo>* *u* u Undo [count] changes. {Vi: only one level} *:u* *:un* *:undo* :u[ndo] Undo one change. {Vi: only one level} *CTRL-R* CTRL-R Redo [count] changes which were undone. {Vi: redraw screen} *:red* *:redo*

初识 MySQL 5.6 新功能、参数

青春壹個敷衍的年華 提交于 2019-12-25 10:05:57
背景: 继上次介绍 初识 MySQL 5.6 新功能、参数 完之后,刚好MySQL 5.7又GA了,在 官方测试 里看到,MySQL5.7在功能、性能、可用性、安全和监控上又提升了很高。现在看看和MySQL5.6对比,看多了哪些参数:( 后续不定时更新 ) 参数: 1: binlog_group_commit_sync_delay 全局动态变量,单位微妙,默认0,范围:0~1000000(1秒)。 表示binlog提交后等待延迟多少时间再同步到磁盘,默认0,不延迟。设置延迟可以让多个事务在用一时刻提交,提高binlog组提交的并发数和效率,提高slave的吞吐量。 2: binlog_group_commit_sync_no_delay_count 全局动态变量,单位个数,默认0,范围:0~1000000。 表示等待延迟提交的最大事务数,如果上面参数的时间没到,但事务数到了,则直接同步到磁盘。若 binlog_group_commit_sync_delay 没有开启,则该参数也不会开启。 3: check_proxy_users 全局动态变量,默认关闭。 表示是否开启代理用户的功能,后面会在安全性上面会介绍。 4: default_authentication_plugin 全局变量,默认 mysql_native_password,可选:sha256_password

Action script 3 drawing app undo and redo function

若如初见. 提交于 2019-12-25 05:56:55
问题 Can anyone show me how can I make undo and redo function? so this is my current action script. I cant figure how to do it and i see some example in some web site, the action script is to long to under stand. Pls show a simple way that i can make this work.. sorry for bad grammar... import flash.display.MovieClip; import flash.events.MouseEvent; var pen_mc:MovieClip; var drawing:Boolean = false; var penSize:uint = 1; var penColor:Number = 0x000000; var shapes:Vector.<Shape>=new Vector.<Shape>(

HTML5 Canvas Drawing History

懵懂的女人 提交于 2019-12-25 03:48:21
问题 I'm curious to know how applications such as Adobe Photoshop implement their drawing history with the ability to go back or undo strokes on rasterized graphics without having to redraw each stroke from the beginning... I'm wanting to implement a similar history function on an HTML5 drawing application I'm working on but duplicating the canvas after every stoke seems like it'd use too much memory to be a practical approach, especially on larger canvas'... Any suggestions on how this might be

Making an undo function for a 7x7 board in Python

假装没事ソ 提交于 2019-12-24 21:10:03
问题 I am currently trying to program a game called Pah Tum. The game involves a board that is 7x7. For the board I just created a list with 7 lists containing 7 elements each, basically I just made each row into a list and merged them into a big list: board = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]] The game should have an undo function, which enables the player to go back one

django-reversion undo feature - recovering multiple objects

别等时光非礼了梦想. 提交于 2019-12-23 17:01:39
问题 I'm trying to implement 'undo' feature in django project with django-reversion in a case when user can accidentally modify multiple objects. Using admin panel won't work as one has to revert objects one-by-one. My problem is that I am unable to create revision that holds data about more than one object. Even when I do with reversion.create_revision(): Res.object.all().delete() then I cannot access revision that groups this change. It's splitted in a "one object one revision.models.Version"

Undo git push to Assembla

雨燕双飞 提交于 2019-12-23 12:40:51
问题 So - today I wanted to do a good thing and rearrange files in my repository. Committed and pushed up to my Assembla repository. Since I did not use the git moving command, all files lost their history. I realized my mistake and wanted to get rid of the unneeded changing so I could make the right kind of move afterwards. I tried the approach, showed in here, but instead I got: $ git push -f origin 49bcfdceb30a1e9cfab0f0e7e39bfa04dc726b78:master Total 0 (delta 0), reused 0 (delta 0) remote:

Which commit hash to undo a pushed merge using git-revert?

拈花ヽ惹草 提交于 2019-12-23 08:45:48
问题 I merged the beta branch into the master branch. I pushed to origin. I now want master to be as it was prior to the merger both locally and remotely. A good answer for undoing a merge that was already pushed suggests git revert -m 1 commit_hash If this is indeed the way to go, how can I determine commit_hash ? I unsuccessfully tried the hash returned by merge-base: $ git merge-base --all master beta 1f4b949b7ef97abf913ae672e3acd0907abfac1b $ git revert -m 1

How to undo git rm -rf dirname without a first commit?

十年热恋 提交于 2019-12-23 07:49:36
问题 I did: git init git add . git rm -rf dirname Looking at other answsers, git reset --hard HEAD , git checkout -f and git reflog did not work, apparently because there is no HEAD to go back to, nor a commit to get the files back from. Is there a way to get the files back? 回答1: There is no way. Usually, git rm checks the files have already been committed before deleting them, so you don't lose any of your work. However, using -f overrides this check. In short: Don't use -f . Don't touch anything

Undo changes in an arrayList

落花浮王杯 提交于 2019-12-22 20:14:20
问题 I've an ArrayList of Line Objects called 'lines'. I made my own line class to draw lines with some constraints. It involves selecting two points in a panel and a line is drawn connecting the two points. Everytime a line is created, it is added to the 'lines'. The lines are drawn in a panel. The paint function in my panel looks like this: public void paintComponent(Graphics g){ super.paintComponent(g); for(final Line r:lines){ r.paint((Graphics2D)g); } } And everytime two points are clicked on