Sublime Text 3: Ignores some "goto definition" candidates by file/folder patterns filter
Open Project
-> Edit Project
{
"folders": [
{
"path": "hoge-project",
"follow_symlinks": true,
/* | |
* Below example converts from "1hoge2foo3bar456" to "1<b>hoge</b>2<b>foo</b>3<b>bar</b>456". | |
*/ | |
const tag = "b"; // <b> tag. | |
// sample message | |
let msg = "1hoge2foo3bar456"; | |
/* insert point indice */ |
const path = require("path"); | |
const os = require("os"); | |
console.log("/foo/bar/file.txt", "=>", getAbsolutePath("/foo/bar/file.txt")); | |
console.log("foo/bar/file.txt", "=>", getAbsolutePath("foo/bar/file.txt")); | |
console.log("../../foo/bar/file.txt", "=>", getAbsolutePath("../../foo/bar/file.txt")); | |
console.log("~/file.txt", "=>", getAbsolutePath("~/file.txt")); | |
console.log("/~/file.txt", "=>", getAbsolutePath("/~/file.txt")); | |
console.log("/../../file.txt", "=>", getAbsolutePath("/../../file.txt")); |
function isNumeric(s) { | |
return !isNaN(parseFloat(n)) && isFinite(n); | |
} | |
function isURL(s) { | |
return (/^https?\:\/\/(.+)/.test(s)); | |
} | |
function isJSON(s) { | |
let o; |
const spawn = require('child_process').spawn; | |
// a command you want to execute. | |
const command = "node cli/hoge.js --aaa --bbb=123"; | |
const parts = command.split(" "); | |
const cmd = parts[0]; | |
const args = parts.splice(1); | |
// a background process is running! |
/* | |
* A logger module, which is a simple `winston`(v3) wrapper. | |
* @version 1.0.1 | |
* lastUpdated: 2019-02-13 | |
* | |
* # Usage: | |
* ```js | |
* const logCfg = { | |
* // Label name. It's up to you: | |
* "label": "server", |
/** | |
Barcode Scanner library | |
@author: Akira TANAKA <tanaka.akira.2006@gmail.com> (http://mint.pepper.jp) | |
@dependencies: | |
+ jquery | |
+ quagga (https://serratus.github.io/quaggaJS/) | |
## Usage example: |
const Big = require("big.js"); | |
/** | |
* Validator base class. | |
* Create your validator subclass derived from this class. | |
* Assuming that it's used to validate a browser's posting data on server-side. | |
* | |
* ## NOTE: `check*()` methods: | |
* | |
* If validation failed in a checking method named `check*()`, | |
* some errors are set to `errors` which is passed as a parameter, and also returned as a method's result. |
-- | |
-- How to re-index the auto_increment id. | |
-- | |
-- 0) Create an original table: | |
CREATE TABLE `hoge` ( | |
`id` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT, | |
`name` VARCHAR(255) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
// Define the transform rule | |
const transformRules = [ | |
upperCase, // col idx 0: To uppercase. ``upperCase` is function. | |
{ "1":"1st", "2":"2nd", "3":"3rd" }, // col idx 1: 1=>"1st", 2=>"2nd", ... | |
{ "A":"PlanA", "B":"PlanB", "C":"PlanC" },// col idx 2: "A"=>"PlanA", ... | |
]; | |
const fs = require("fs"); | |
const readStream = fs.createReadStream(__dirname + "/input.csv" ); | |
const writeStream = fs.createWriteStream(__dirname + "/output.csv", { encoding: "utf8" } ); |
Sublime Text 3: Ignores some "goto definition" candidates by file/folder patterns filter
Open Project
-> Edit Project
{
"folders": [
{
"path": "hoge-project",
"follow_symlinks": true,