description: the difference between .text, .value and .value2
.text
The present of cell. May get ####
.value
Get the cell value formatted. May get truncate decimal number.
.value2
Get the underlying value. Actual store value.
description: make a snippet with current datetime
File -> preference –> user snippets
${CURRENT_DATE}/${CURRENT_MONTH}/${CURRENT_YEAR} ${CURRENT_HOUR}:${CURRENT_MINUTE}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24{
"post": {
"prefix": ".post",
"body": [
"---\r",
"title: ${1}\r",
"date: ${CURRENT_DATE}/${CURRENT_MONTH}/${CURRENT_YEAR} ${CURRENT_HOUR}:${CURRENT_MINUTE}\r",
"tags: \r",
"keywords:\r",
"categories: \r",
"---\r",
"description:\r",
"\r",
"\r",
"\r",
"\r",
"---------------------------------------------\r",
"more on [search4fan.github.io](https://search4fan.github.io/)\r",
"\r",
""
],
"description": "post template"
}
}
TM_SELECTED_TEXT
The currently selected text or the empty stringTM_LINE_NUMBER
The one-index based line numberTM_FILENAME
The filename of the current documentTM_FILENAME_BASE
The filename of the current document without its extensionsTM_LINE_INDEX
The zero-index based line numberTM_DIRECTORY
The directory of the current documentTM_FILEPATH
The full file path of the current documentCLIPBOARD
The contents of your clipboardTM_CURRENT_LINE
The contents of the current lineTM_CURRENT_WORD
The contents of the word under cursor or the empty string
CURRENT_DAY_NAME
The name of day (example ‘Monday’)CURRENT_DAY_NAME_SHORT
The short name of the day (example ‘Mon’)CURRENT_HOUR
The current hour in 24-hour clock formatCURRENT_MINUTE
The current minuteCURRENT_SECOND
The current second
CURRENT_YEAR
The current yearCURRENT_YEAR_SHORT
The current year’s last two digitsCURRENT_MONTH
The month as two digits (example ‘02’)CURRENT_MONTH_NAME
The full name of the month (example ‘July’)CURRENT_MONTH_NAME_SHORT
The short name of the month (example ‘Jul’)CURRENT_DATE
The day of the month
more on search4fan.github.io
description: vba to get list of modules name
1 | Private Sub getAllModuleNames() |
more on search4fan.github.io
description: difference between .text .value .value2 in Excel
get the screen displayed text1
2cells(1,1).text
'get ##### if the cell width too short
can get formatted Currency and date1
2cells(1,1).value
'get 13/02/2016 12:52 if it is a date
get underlying value (include empty, string, error, number and boolean)1
2cells(1,1).value2
'get 2342432.12 if it is a date
description: Sql Server ‘Saving changes is not permitted’
1 | Saving changes is not permitted. The changes that you have made require the following tables to be dropped and re-created. You have either made changes to a table that can't be re-created or enabled the option Prevent saving changes that require the table to be re-created. |
more on search4fan.github.io
description: display line number in mssql editor
more on search4fan.github.io
description: sql comments for basic query
1 | -- use |
more on search4fan.github.io
description: build Decision Tree for wine dataset in R language
1 | wine<-read.table("E:\\wine.data", |
1 | wine.scale <- cbind(wine[1], scale(wine[-1])) |
1 | wine_dt=J48(Type~.,data=data.tr) |
1 | library(rpart) |
1 | update.packages() |
1 | p_ctree <- ctree(Type ~., data=data.tr) |
description: cluster iris data set by hierarchical clustering and k-means
1 | library(RWeka) |
1 | datairis<-iris |
1 | kcluster<-kmeans(datairis,3) # k as 3, divide into 3 species |
1 | plot(datairis[c("Sepal.Width","Petal.Width")],col=kcluster$cluster) |
1 | plot(datairis[c("Sepal.Length","Petal.Length")],col=kcluster$cluster) |
1 | plot(datairis[c("Petal.Length","Petal.Length")],col=kcluster$cluster) |
1 | iris$Species |
1 | dim(iris)[1] # dim: It retrieve or set the dimension of an object |
1 | hcluster<-hclust(dist(datairis),method="ave") |
1 | iris$Species |