摘要 程序员总是会不断的重复写一些简单的代码片段,为了提高编码效率,我们可以把经常用到的代码保存起来再调用. 平时用sublime安装各种插件,使用Tab键快速补全,便是snippets(可译为代码片段)的一种. Sublime编辑器还提供了自定义代码片段的功能(当然不止Sublime有此功能),其官方文档中定义如下: Whether you are coding or writing the next vampire best-seller, you're likely to need cer…
Useful code snippets with C++ boost Is Punctuation It’s very straight forward to use boost.regex as a solution. We can match the input string with a regex like if (boost::regex_match(",", boost::regex("[[:punct:]]"))) { std::cout <&…
Import and export Trigger Content imp→ imports entire module import fs from 'fs'; imn→ imports entire module without module name import 'animate.css' imd→ imports only a portion of the module using destructing import {rename} from 'fs'; ime→ imports…
MollyPages.org"You were wrong case.To live here is to live." Home Pages / Database / Forms / Servlet / Javadocs / License & Download / Tutorials / Cookbook / Contact Return to Tutorials index Random collection of misc. code and snippets Pr…
源地址:http://www.catswhocode.com/blog/10-handy-and-reusable-jquery-code-snippets Smooth scrolling to top of page Let’s start this list by a very popular and useful snippet: Those 4 lines will allow your visitors to smooth scrool to the top of the page…
new a gameobject & overloaded methds var go1 = new UnityEngine.GameObject.ctor(); var go2 = new UnityEngine.GameObject.ctor$$String("Hello"); add/get c# component (UnityEngine.Transform.ctor); (UnityEngine.UI.Image.ctor); image.set_color(/,…
本文转自:https://marketplace.visualstudio.com/items?itemName=Mikael.Angular-BeastCode VSCode Angular TypeScript & Html Snippets Visual Studio Code TypeScript and Html snippets and code examples for Angular 2,4,5 & 6. All code snippets are based on and…
一.背景 使用Visual Studio Code写了一个简单的Html页面,想调试下其中script标签里的javascript代码,网上查了一通,基本都是复制粘贴或者大同小异的文章,就是要安装Debugger for Chrome插件,修改launch.json配置信息,F5启动,这些都照做了,但是仍有两个问题,一个是Html文件里不能打断点,只能在js文件里面打,二是chrome打开后说连接不到localhost,下面分别讲讲是怎么解决. 二.Html文件中不能打断点问题 默认情况下,VS…
Node.js is a platform for building fast and scalable server applications using JavaScript. Node.js is the runtime and NPM is the Package Manager for Node.js modules. VS Code has support for the JavaScript and TypeScript languages out-of-the-box as we…
VS Code 的常用快捷键和插件 一.vs code 的常用快捷键 1.注释: a) 单行注释:[ctrl+k,ctrl+c] 或 ctrl+/ b) 取消单行注释:[ctrl+k,ctrl+u] (按下ctrl不放,再按k + u) c) 多行注释:[alt+shift+A] d) 多行注释:/** 2.移动行:alt+up/down 3.显示/隐藏左侧目录栏 ctrl + b 4.复制当前行:shift + alt +up/down 5.删除当前行:shift + ctrl + k 6.…