精华内容
下载资源
问答
  •  variables that are available inside your script. Also, the  _editor  variable is available inside the script. This variable is bound to the current editor. JsArrayVariable() ...

    Live Template

    用中文应该叫做热加载模板。它的原理就是配置一些常用代码字母缩写,在输入简写时可以出现你预制的模板内容,使得开发效率大大提高。


    Webstorm js中,自定义js说明注释(文档描述、作者、创建日期等): 
    快捷键 Ctrl + Shift + S 打开Webstorm设置,搜索‘Live Template’,找到JavaScript,如下:

    è¿éåå¾çæè¿°

    点击右上角“+”-> Live Template,添加注释模板,出现以下界面,填写相关的信息: 

    下面我要介绍的是 Edit variables

     

    Predefined Functions to Use in Live Template Variables  的参数如下:

    Item

    Description

    blockCommentEnd

    Returns the characters that indicate the end of a block comment in the current language context.返回指示当前语言上下文中块注释结尾的字符。

    blockCommentStart

    Returns the characters that indicate the start of a block comment in the current language context.返回指示当前语言上下文中块注释开头的字符。

    camelCase(String)

    Converts a string into camelCase. For example, camelCase(my-text-file)camelCase(my text file), and camelCase(my_text_file) all return myTextFile.

    将字符串转换为驼色大小写。例如, camelCase(my-text-file), camelCase(my text file), and camelCase(my_text_file) 这三种都返回 myTextFile.

    capitalize(String)

    Capitalizes the first letter of the parameter.

    将参数的第一个字母大写。

    capitalizeAndUnderscore(sCamelCaseName)

    Capitalizes all the letters of a CamelCase name passed as the parameter, and inserts an underscore between the parts. For example, capitalizeAndUnderscore(FooBar) returnsFOO_BAR.

    将参数所有字母大写,并在各部分之间插入下划线。例如,如capitalizeAndUnderscore(FooBar),返回FOO_BAR

    classNameComplete()

    This expression substitutes for the class name completion at the variable position.

    此表达式在变量位置替换类名完成。

    clipboard()

    Returns the contents of the system clipboard.

    返回系统剪贴板的内容。

    commentEnd()

    Returns the characters that indicate the end of a comment in the current language context. The return value is empty if line comments are defined in the current language.

    返回指示当前语言上下文中注释结尾的字符。如果行注释是用当前语言定义的,则返回值为空。

    commentStart()

    Returns the characters that indicate the start of a comment in the current language context. If line comments are defined in the current language, their start indicator is preferable.

    返回指示当前语言上下文中注释开头的字符。如果行注释是用当前语言定义的,则它们的开始指示符更可取。

    complete()

    Invokes code completion at the position of the variable.

    在变量的位置自动识别代码

    completeSmart()

    Invokes smart type completion at the position of the variable.

    在变量的位置调用智能类型完成。

    concat(expressions...)

    Returns a concatenation of all the strings passed to the function as parameters.

    返回串联的所有参数

    dartIterableVariable()

    Returns the name of a variable that can be iterated.

    返回可迭代的变量的名称。

    dartListVariable()

    Returns a list of elements of an array.

    返回数组元素的列表。

    dartSuggestIndexName()

    Returns a suggested name for an index variable from most commonly used ones: ijk, etc. The names that are not used in the current scope yet are shown first.

    回最常用的索引变量的建议名称:i、j、k等。当前作用域中尚未使用的名称将首先显示。

    dartSuggestVariableName()

    Returns the suggested name for a variable based on its variable type and initializer expression, according to your code style settings that refer to the variable naming rules.
    For example, if it is a variable that holds an element within an iteration, WebStorm makes a guess on the most reasonable name, taking into account the name of the container that is iterated.

    date(sDate)

    Returns the current system date in the specified format.

    Without a parameter, the current date is returned in the default system format.

    以指定格式返回当前系统日期。

    如果没有参数,则以默认系统格式返回当前日期。

    decapitalize(sName)

    Replaces the first letter of the parameter with the corresponding lowercase letter.

    将参数的第一个字母替换为相应的小写字母。

    enum(sCompletionString1,sCompletionString2,...)

    Returns a list of comma-separated strings suggested for completion when the template is expanded.

    返回在扩展模板时建议完成的逗号分隔字符串列表。

    escapeString(sEscapeString)

    Escapes the string specified as the parameter.

    转义指定为参数的字符串。

    expectedType()

    Returns the expected type of the expression into which the template expands. Makes sense if the template expands in the right part of an assignment, after return, etc.

    当模板扩展中返回表达式的预期类型,如果模板在分配的正确部分、返回后等进行扩展,则是有意义的。

    fileName()

    Returns the name of the current file with its extension.

    返回当前文件的名称及其扩展名。

    fileNameWithoutExtension()

    Returns the name of the current file without its extension.

    返回不带扩展名的当前文件的名称。

    firstWord(sFirstWord)

    Returns the first word of the string passed as the parameter.

    返回作为参数传递的字符串的第一个字。

    groovyScript("groovy code", arg1)

    Returns a Groovy script with the specified code.

    You can use the groovyScript() function with multiple arguments. The first argument is the text of the script that is executed or the path to the file that contains the script. The next arguments are bound to the _1_2_3, ..._n variables that are available inside your script. Also, the _editor variable is available inside the script. This variable is bound to the current editor.

    JsArrayVariable()

    Returns the name of the current JavaScript array.

    jsClassName()

    Returns the name of the current JavaScript class.

    返回当前javascript类的名称。

    jsComponentTypeOf()

    Returns the type of the current JavaScript component.

    返回当前javascript组件的类型。

    jsDefineParameter

    Based on the name of the module, returns the parameter fromdefine(["module"], function (<parameter_in_question>>) {}).

    根据模块的名称,返回参数fromdefine([“module”]、function(<parameter_in_question>>))。

    jsMethodName()

    Returns the name of the current JavaScript method.

    返回当前javascript方法的名称。

    jsQualifiedClassName()

    Returns the complete name of the current JavaScript class.

    jsSuggestIndexName()

    Returns a suggested name for an index variable from most commonly used ones: ijk, etc. The names that are not used in the current scope yet are shown first.

    jsSuggestVariableName()

    Returns the suggested name for a variable based on its variable type and initializer expression, according to your code style settings that refer to the variable naming rules.
    For example, if it is a variable that holds an element within an iteration, WebStorm makes a guess on the most reasonable name, taking into account the name of the container that is iterated.

    jsSuggestDefaultVariableKind(Boolean)

    The Boolean parameter determines whether constants are allowed or not in the current context. If no parameter is specified, constants are allowed. When the templates expands, a drop-down list is shown with varletconst options for TypeScript and ES6 and with only one var option for earlier JavaScript versions.

    jsSuggestImportedEntityName()

    Suggests the name for import statements of the type`import * as $ITEM$ from "$MODULE$"` or `import $ITEM$ from "$MODULE$"` based on the file name.

    lineCommentStart

    Returns the characters that indicate the start of a line comment in the current language context.

    返回在当前语言上下文中指示行注释开头的字符。

    lineNumber()

    Returns the current line number.

    返回当前行号。

    lowercaseAndDash(String)

    Converts a camelCase string into lower case and inserts n-dashes as separators. For example, lowercaseAndDash(MyExampleName) returns my-example-name.

    字符串转换为小写,并插入n个-作为分隔符,例如 lowercaseAndDash(MyExampleName) returns my-example-name

    snakeCase(String)

    Converts a string into snake_case. For example, snakeCase(fooBar) returns foo_bar.

    将字符串转换为蛇形命名法。例如,snakecase(foo bar)返回foo_bar。

    spaceSeparated(String)

    Converts a string into lowercase and inserts spaces as separators. For example, spaceSeparated(fooBar) returns foo bar.

    将字符串转换为小写并插入空格作为分隔符。例如,spaceseparated(foo bar)返回foo bar。

    substringBefore(String,Delimiter)

    Removes the extension after the specified delimiter and returns only the file name. This is helpful for test file names (for example, substringBefore($FileName$,".") returns component-test in component-test.js).

    删除指定分隔符后的扩展名,并仅返回文件名。这有助于测试文件名(例如,$filename$,“.”之前的子字符串)返回component test in component test.js。

    time(sSystemTime)

    Returns the current system time in the specified format.

    以指定格式返回当前系统时间。

    underscoresToCamelCase(String)

    Replaces underscores with camelCase letters in the string passed as the parameter. For example, underscoresToCamelCase(foo_bar) returns fooBar.

    替换下划线。例如,underlinestocamelcase(foo_bar)返回foo bar。

    underscoresToSpaces(sParameterWithUnderscores)

    Replaces underscores with spaces in the string passed as the parameter. For example, underscoresToSpaces(foo_bar) returns foo bar.

    将参数中的下划线替换成空格,如underscoresToSpaces(foo_bar)返回foo bar

    user()

    Returns the name of the current user.

    返回当前用户的名称。

    展开全文
  • 上一篇:6....# Get list of categorical variables s = (X_train.dtypes == 'object') object_cols = list(s[s].index) print("Categorical variables:") print(object_cols) 定义一个函数 from sk

    上一篇:6.缺失值
    当有一个人问你吃早餐的频率,可以回答“从不”“经常”“偶尔”等,那么这些怎么转换成数字?这就是分类变量的作用。要处理这些文字信息,有三种方法
    先找到分类变量

    # Get list of categorical variables
    s = (X_train.dtypes == 'object')
    object_cols = list(s[s].index)
    
    print("Categorical variables:")
    print(object_cols)
    

    定义一个函数

    from sklearn.ensemble import RandomForestRegressor
    from sklearn.metrics import mean_absolute_error
    
    # Function for comparing different approaches
    def score_dataset(X_train, X_valid, y_train, y_valid):
        model = RandomForestRegressor(n_estimators=100, random_state=0)
        model.fit(X_train, y_train)
        preds = model.predict(X_valid)
        return mean_absolute_error(y_valid, preds)
    

    1.直接去掉

    drop_X_train = X_train.select_dtypes(exclude=['object'])
    drop_X_valid = X_valid.select_dtypes(exclude=['object'])
    

    用到的函数:
    DataFrame.select_dtypes(include=None, exclude=None)
    2.ordinal encoding 序数编码

    from sklearn.preprocessing import OrdinalEncoder
    
    # Make copy to avoid changing original data 
    label_X_train = X_train.copy()
    label_X_valid = X_valid.copy()
    
    # Apply ordinal encoder to each column with categorical data
    ordinal_encoder = OrdinalEncoder()
    label_X_train[object_cols] = ordinal_encoder.fit_transform(X_train[object_cols])
    label_X_valid[object_cols] = ordinal_encoder.transform(X_valid[object_cols])
    

    3.One-Hot Encoding独热编码
    用0 和1 表示一个属性的有无

    from sklearn.preprocessing import OneHotEncoder
    
    # Apply one-hot encoder to each column with categorical data
    OH_encoder = OneHotEncoder(handle_unknown='ignore', sparse=False)
    OH_cols_train = pd.DataFrame(OH_encoder.fit_transform(X_train[object_cols]))
    OH_cols_valid = pd.DataFrame(OH_encoder.transform(X_valid[object_cols]))
    
    # One-hot encoding removed index; put it back
    OH_cols_train.index = X_train.index
    OH_cols_valid.index = X_valid.index
    
    # Remove categorical columns (will replace with one-hot encoding)
    num_X_train = X_train.drop(object_cols, axis=1)
    num_X_valid = X_valid.drop(object_cols, axis=1)
    
    # Add one-hot encoded columns to numerical features
    OH_X_train = pd.concat([num_X_train, OH_cols_train], axis=1)
    OH_X_valid = pd.concat([num_X_valid, OH_cols_valid], axis=1)
    
    print("MAE from Approach 3 (One-Hot Encoding):") 
    print(score_dataset(OH_X_train, OH_X_valid, y_train, y_valid))
    

    一般情况下,第三种方法效果最好

    展开全文
  • BIOS翻译

    千次阅读 2019-03-02 13:03:00
    BIOS翻译 BIOS(Basic Input/Output System—基本输入输出系统)。BIOS可以视为是一个永久地记录在ROM中的一个软件 Main主要信息 :main 主要信息 advanced 高级设置 security 安全设置 boot 引导设置 exit ...

    BIOS翻译

     

    BIOS(Basic Input/Output System—基本输入输出系统)。BIOS可以视为是一个永久地记录在ROM中的一个软件

    Main主要信息

    :main 主要信息 advanced 高级设置 security 安全设置 boot 引导设置 exit 退出
    system information 系统信息
    system time 系统时间
    system date 系统日期
    bios version bios版本
    ec version ec版本
    build date and time 建立日期和时间
    manufacturer name 品牌名字
    product name 产品型号
    serial number 序列号
    asset tag 资产标签
    uuid number 通用唯一识别码
    ethernet mac address mac网络地址
    processor 处理器
    processor type 处理器类型
    processor speed 处理器速度
    total memory 总内存
    memory frequency 内存频率
    me information 管理引擎 信息
    me fw version 管理引擎版本
    me firmware sku 管理引擎固件sku

     


    advanced 高级设置:


    advanced setting 高级设置
    os support 系统支持
    wake on lan 局域网唤醒
    sata device sata 装置
    sata mode selection sata模式选择
    serial ata port 0 串行ata口0
    serial ata port 1 串行ata口1
    nvme device nvme 装置
    nvme controller nvme 控制器
    intel virtualization technology intel虚拟化技术
    keyboard backlight features 背光键盘特征,效果
    light effect 光效
    disabled 关闭
    breathing 呼吸
    wave 波浪
    rainbow 彩虹
    marquee 滚动
    raindrop 雨滴

    empty 空的
    legacy os 传统模式
    uefi os uefi模式
    if select uefi os,it will support uefi mode compatible os,otherwise ,when select legacy os,it can support legacy mode os
    如果选择uefi模式,那将支持uefi模式兼容系统启动否则,选择传统模式时,那仅支持传统模式系统启动

    enable/disable integratred lan to wake the system
    开启或关闭集成局域网唤醒系统

    determines how sata controllers operate
    确定sata控制器的操作方式

    select screen 选择屏幕,纵向选择的是左右键
    select item 选择项,横向选择上下键
    enter select 回车确认选择
    change opt 更改选择
    general help 常规帮助,通用帮助
    previous values 先前值
    optimized default 默认最佳优化
    save exit 保存退出
    exit 退出

    disabled 关闭
    enabled 开启
    when enabled ,a vmm can utilize the additional hardware capabilities provided by vanderpool technology
    当启用时,虚拟机监控器可以利用硬件虚拟化技术提供附加的硬件功能

     

     


    security 安全设置:


    security setting 安全设置
    access level 访问级别
    administrator password 超管密码
    user password 用户密码
    change administrator password 更改超管密码
    create new password 创建新密码
    change user password 更改用户密码
    password login control 密码登录控制
    secure boot 安全引导
    active 有效的
    system mode 系统模式
    user 用户
    delete all secure boot variables 删除全部安全引导变量
    hdd security configuration 硬盘安全配置

    set setup administrator password 更改或设置超管密码

    secure boot activated when platform key is enrolled system mode is user/deployed,and csm function is disabled
    激活时启动安全引导,平台秘钥注册系统模式为user/部署,csm功能被禁用

     


    Boot


    boot configuration
    launch csm 载入csm
    lan remote boot 局域网远程
    boot option priorities 优先级引导项
    boot option #1 第一引导项
    boot option #2 第二引导项
    boot option #3 第三引导项
    boot option #4 第四引导项
    uefi hard disk drive bbs priorities uefi硬盘驱动器启动优先级设置
    boot option 启动项选择
    windows boot manager Windows启动管理器
    sets the system boot order 设置系统启动顺序

     


    Exit:


    save and exit option 保存和退出选项
    save changes and reset 保存更改并重启
    discard changes and exit 放弃更改并退出
    restore defaults 恢复默认值
    reset the system after saving the changes
    保存更改后重启系统

     

     


    第二种bios翻译:
    main 主要的 advanced 高级 security 安全 boot 启动 exit 出口
    system time 系统时间
    system date 系统日期
    legacy diskette 软磁盘
    legacy diskette 软磁盘
    primary master 主硬盘
    primary slave 从硬盘
    secondary master 第二主硬盘
    secondary slave 第二从硬盘
    keyboard features 键盘功能
    system memory 系统内存
    extended memory 扩展内存
    boot-time diagnostic screen 开机时间屏幕诊断
    setup defaults 设置默认值

    type
    device
    total sectors 总扇区
    maximum capacity 最大容量
    multi-sector transfers 多线程传输
    mode control
    32 bit i/o 32位出入输出
    transfer mode 传输模式
    removable disk drive is installed here
    enabled 已启用
    disabled 已禁用
    auto 自动
    vmware virtual ide cdrom VMware虚拟光驱

    numlock 数字键锁定
    select power-on state for numlock
    item specific help
    auto 自动
    on 打开
    off 关闭
    keyboard auto-repeat rate 键盘自动重复率
    keyboard auto-repeat delay 键盘自动延迟
    ========================
    anvanced 高级设置:
    multiprocessor specification 处理器规格
    installed O/S 选择硬件对主板支持
    reset configuration data 重新配置数据
    cache memory 高速缓冲存储器
    i/o device configuration 输入输出设备配置
    large disk access mode 磁盘存取模式
    local bus ide adapter 本地总线集成开发环境适配器
    advanced chipset control 高级芯片控制

    configures the mp specification revision level, some operaring systems will require for compatibility reasons

    select the operating system installed on your system which you will use most commonly

    note: an incorrect setting can cause some operating systems to display unexpected behavior
    select yes if you want to clear the extended system configuration data area

    sets the state of the memory cache
    uncached
    write protect
    write back
    write through
    control caching of video bios area
    none 没有
    single bit 单位
    multiple bit 多位
    both 两者都
    ============================
    security :
    supervisor password is clear
    user password is clear
    set user password
    set supervisor password 设置管理员密码
    password on boot
    supervisor password controls access to the setup utility
    enter new password 输入新的密码
    confirm new password 确认新的密码
    ==========================
    boot:启动设置
    hard drive 硬盘驱动器
    bootable add-in cards 启动附加卡
    vmeare virtual ide hard pmd-removable devices vmware虚拟技术硬盘PM 可拆卸的装置
    legacy floppy drives 传统的软盘驱动器
    cd-rom drive cd-rom去动器
    network boot from amd
    keys used to view or configure devices
    expands or collapses devices with
    moves the device up or down
    may move removable device between hard disk or removable disk
    remove a device that is not installed
    =====================
    exit:
    exit saving changes 保存修改退出
    exit discarding changes 退出不保存更改
    load setup defaults 加载默认设置
    discard changes 放弃更改
    save changes 保存更改
    load default values for all setup items
    =====================

     

    转载于:https://www.cnblogs.com/GaoNa/p/10460599.html

    展开全文
  • ass2.pl: 49 warning: singleton variables [All] for likes/4 ass2.pl: 50 warning: singleton variables [All] for likes/4 虽然上面的提示不是错误,只是警告,但是为防止程序出现问题,还是需要找到...

    Prolog 代码片段

    % likes characteristic
    likes(paul, classic, adventure, swimming).
    likes(kevin, rocknroll, sciencefiction, tennis).
    likes(doug, jazz, detectivenovel, tennis).
    likes(alice, All, adventure, swimming).
    likes(eva, rocknroll, sciencefiction, All).

    likes(lea, classic, adventure, swimming).

    上述代码经过Prolog编译器编译之后,会出现这样的问题:

    ass2.pl: 49 warning: singleton variables [All] for likes/4

    ass2.pl: 50 warning: singleton variables [All] for likes/4

    虽然上面的提示不是错误,只是警告,但是为防止程序出现问题,还是需要找到修改警告的方法。

    原因:

    因为这个helpfully-named变量All,只是被使用了一次在被标红的部分。

    解决办法:

    用underscore(_)代替All,或者在All之前加下划线。(_All),这样的话,Prolog是不会关心这样的变量的,也不会报告问题。


    展开全文
  • 概率、随机变量与随机过程 [Probability, Random Variables and Stochastic Processes]-帕普里斯,佩莱著,保铮,冯大政等译(2000)
  • 粒子群算法

    2018-10-26 20:50:00
    Number of Unknown (Decision) Variables 11 VarSize = [1 nVar]; % Matrix Size of Decision Variables 12 VarMin = problem.VarMin; % Lower Bound of Decision Variables 13 VarMax = problem.VarMax...
  • SUMS75 Several Real Variables, Shmuel Kantorovitz (2016).zip
  • Blocks and Variables https://developer.apple.com/library/ios/documentation/cocoa/conceptual/Blocks/Articles/bxVariables.html http://stackoverflow.com/questions/16149653/what-is-...
  • GitLab CI/CD Variables 中文文档

    万次阅读 2019-06-27 18:29:00
    官方文档链接(这篇文章也算是翻译自官网文档): GitLab CI/CD environment variables 当GitLab CI 中接受到一个job后,Runner就开始准备构建环境。开始设置预定义的变量(环境变量)和用户自定义的变量。 variables...
  • 题意: 很不好描述的题意...看了Hint再看Description才理解的. You've got a positive integer sequence a1, a2, ..., an.... Let's fix the set of variables b1, b2, ..., bm. Initia
  • tailwindcss CSS变量 翻译文件 语 文档链接 英语 文献资料 土耳其
  • 这是萧荫堂的著作,由陈志华、钟家庆整理,陈志华翻译
  • MPC模型预测控制

    万次阅读 多人点赞 2018-12-17 17:02:00
    // Setting the number of model variables (includes both states and inputs). // N * state vector size + (N - 1) * 2 actuators (For steering & acceleration) size_t n_vars = N * 6 + (N - 1) * 2; // ...
  • 案例1 问题描述: import tensorflow as tf with tf.Session() as sess: var = tf.Variable(42, name='var') sess.run(tf.global_variables_initializer()) tf.train.export_meta_graph('file.meta') with
  • Blocks和Variables

    2012-08-19 23:53:42
    翻译不不到位之处,请指正,建议点击上面链接看苹果官网介绍。 本文描述的是Blocks和Variables之间的交互,包括内存管理部分。 1. 变量类型 在block对象的函数体中,变量可能会以5中不同的方式做处理。 你可以...
  • 一、如图翻译: 图1: 图2: 二、翻译: local Variable = 局部变量 argument = 论点 static Variable = 静态变量 global Variable =  全局变量 register =
  • 翻译Standard CGI Implementation

    千次阅读 2012-02-29 17:33:45
    CGI scripts are written in any language that can read STDIN, write to STDOUT, and read environment variables. This means that virtually any programming language can be used,...
  • 原文地址(翻译练手) 2017年12月14日 Defining and updating JavaScript variables in different scopes 昨天,我们学习了关于JavaScript作用域。今天,我们来学习如何去在不同类型的作用域中更新变量。 用前缀var来...
  • 本文翻译自:Table 'performance_schema.session_variables' doesn't exist After upgrading MySQL to 5.7.8-rc and loging to server I got error: 将MySQL升级到5.7.8-rc并登录到服务器后出现错误: Table '...
  • 翻译变量提取器(Demo项目) 如何测试 见我的PR:
  • 什么是条件变量(condition variables) 引用APUE中的一句话: Condition variables are another synchronization mechanism available to threads. These synchronization objects provide a place for t...
  • table can see all user variables for all sessions.) All variables for a given client session are automatically freed when that client exits. 用户变量仅在当前会话中生效。当前会话中的用户变量不能被...
  • 题解报告 题目翻译 就是给你 5 个数字,分别为 x1, x2, x3, x4 和 x5。请找出哪个位置的数字值为 0。 题目分析 学过循环就可以完成本题。当然没有学习过循环,只要学习了 if 语句,也可以完成。 非常简单的一个题目...
  • translation - Implementing-a-Thread-Safe-Queue-using-Condition-Variables 实现一个线程安全队列 原链接: 翻译: Scott Gu 源代码: 多线程代码需要一次又一次面对的一个问题是,如何把数据从一个线程传到另一...
  • 本篇将会结合Unity3D官方文档对Unity3D内置参数或函数进行讲解及文档翻译。 本篇将会持续更新,更新结束后这一句话将会删除。光照部分本次讲解的内容为光照相关,因为我接下来的篇章将会对Unity3D光照相关的知识...
  • 另,slim.get_model_variables()与tf.model_variables()功能近似。   Summary Summary 被收集在名为 tf.GraphKeys. UMMARIES 的 colletion 中, Summary 是对网络中 Tensor 取值进行监测的一种 Operation ...
  • MySQL - 翻译 - 5.1 Reference Manual参考手册 - 5.1.3 Server System Variables服务器系统变量 - max_heap_table_sizemax_heap_table_sizeOption Sets Variable选项集变量Yes, max_heap_table_size是V

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 32,603
精华内容 13,041
关键字:

variables翻译