Git 撤销未提交更改
git checkout . // 撤销所有未提交更改
Java环境
这似乎是一个不错的Java版本:https://bell-sw.com/pages/downloads/#downloads
reprint-在 python 中运行命令行命令的四种方案
简介毫无疑问,使用 python 运行命令行是最方便的将模型测试自动化的途径,下面详细介绍几种方案并作对比。 方案一:os.system仅仅在一个子终端运行系统命令,而不能获取命令执行后的返回信息 如果在命令行下执行,结果直接打印出来。 1234os.system('ls')# 04101419778.CHM bash document media py-django video# 11.wmv books downloads Pictures python# all-20061022 Desktop Examples project tools 复制 方案二:os.popen该方法不但执行命令还返回执行后的信息对象 12345678910111213141516import ostmp = os.popen('ls *.py').readlines()# ['dump_db_pickle.py ',#...
VSCode - 15 Great VS Code Keyboard Shortcuts
本文由 简悦 SimpRead 转码, 原文地址 www.wearedevelopers.com Maximize your efficiency with Visual Studio Code using these six VS code shortcuts. Explore now and l…… VS Code ShortcutsVisual Studio Code is a leading code editor that has been widely adopted by software developers worldwide. Developed by Microsoft, this IDE supports cross-platform coding on Linux, Mac, and Windows, making it an excellent choice for modern-day developers. However, with so many features and options, it can be challenging...
VSCode快捷键 - 02
from:https://gist.github.com/cleary/d168e301429c0305c49d97907796c72d VSCode Shortcuts List of helpful shortcuts for faster coding For mac, replace “Ctrl” with “cmd” and “Alt” with “option” Official List of all commands Windows Mac General & FileOpen Command Pallete 1Ctrl+Shift+P Open New Window 1Ctrl+Shift+N Close Window 1Ctrl+W Quick File Open 1Ctrl+P Access Settings 1Ctrl+, New File 1Ctrl+N Open File 1Ctrl+O Save 12Ctrl+SCtrl+Shift+S # Save As Close File 1Ctrl+F4 Change...
VScode - 插件 02
Ctrl + P -> 系 键入 @: 查看所有函数/功能/区块 同类型: Ctrl + Shift + . 键入 #: 查找类之类的东西,长类名 仅 驼峰首字母 即可 AnimalClass => AC/ANC 均可~ mySuperClass -> msc 键入 :: 跳转到指定行 高亮查询后 ctrl + D, 同时编辑多个匹配代码(多次按,选中多个)使用鼠标: 按住 alt, 用鼠标在多个位置点击 ctrl + 左右键: 快速移动鼠标(按照单词跳过) Use ALT, followed by the up or down arrows, to move the line somewhere else quickly.使用 Alt,然后使用向上或向下箭头,将线快速移动到其他位置。favoriteplay_circleAnd if you want to copy that line as you move it, use ALT SHIFT, followed by the...
主分支强制覆盖
在Git中,要将dev分支的更改覆盖到master分支并保留dev分支,可以使用以下步骤: 注意:在执行这些操作之前,请确保没有未提交的更改,否则可能会丢失工作。 切换到master分支: 1git checkout master 将master分支重置到dev分支的状态: 1git reset --hard dev 这会使master分支指向与dev相同的提交。 强制推送到远程仓库: 1git push origin master --force 这会将本地的master分支的更改强制推送到远程仓库。请注意,强制推送可能会覆盖远程仓库中的master分支,因此请确保你的操作是安全的。 现在,master分支将包含与dev分支相同的内容,并且dev分支保持不变。 Summarize123git fetch --allgit reset --hard origin/master git pull
SOLID原则
让类具有单一职责。在面向对象理论中,这是SOLID设计的原则之一(SOLID是指Single responsibility principle(单一职责原则)、Open/Closed principle(开闭原则)、Liskov substitutionprinciple(里氏替换原则)、Interface segregation principle(接口分离原则)和Dependency inversionprinciple(依赖倒置原则))SOLID代表一组相互补充的开发技术,可以用来创建更加健壮的代码。dfdffdSOLID指导我们如何决定类的结构。其中最重要的原则是单一职责原则,即一个类只应该做一件事。建议阅读了解SOLID这个主题,SOLID设计最重要的部分是类只负责一件工作,其他原则源自这个原则。当类只做一件事时,就更容易测试和理解。这并不是说它们只应该有一个方法。方法可以有许多,只要与类的目的有关即可。From TypeScript项目开发实战_【英】彼得·欧汉龙(Peter O’ Hanlon)
基于模式开发
基于模式的开发,即通过对复杂问题应用众所周知的软件开发模式,让解决方案变得更加简单。 访问者模式是所谓的行为模式。术语“行为模式”是对模式的一种分类,指的是关注类和对象的通信方式的一组模式。访问者模式使我们能够将算法与算法操作的对象分离开。 责任链模式。通过让创建的类接受类链中的下一个类和一个处理请求的方法,这种模式允许我们将一系列类链接到一起。取决于请求处理程序的内部逻辑,类可以将请求处理传递给类链中的下一个类。 关于如何使用设计模式的更多信息,推荐阅读由Vilic Vane撰写、Packt出版的TypeScript Design Patterns一书(https://www.packtpub.com/applicationdevelopment/typescript-design-patterns)。