Использование jquery mask для маскировки ввода через форму

Define custom definitions

You can define your own definitions to use in your mask.Start by choosing a masksymbol.

validator(chrs, maskset, pos, strict, opts)

Next define your validator. The validator can be a regular expression or a function.

The return value of a validator can be true, false or a command object.

Options of the command object

  • pos : position to insert

  • c : character to insert

  • caret : position of the caret

  • remove : position(s) to remove

    pos or

  • insert : position(s) to add :

    • { pos : position to insert, c : character to insert }
  • refreshFromBuffer :

    • true => refresh validPositions from the complete buffer
    • { start: , end: } => refresh from start to end

prevalidator(chrs, maskset, pos, strict, opts)

The prevalidator option is used to validate the characters before the definition cardinality is reached. (see ‘j’ example)

definitionSymbol

When you insert or delete characters, they are only shifted when the definition type is the same. This behavior can be overridden by giving a definitionSymbol. (see example x, y, z, which can be used for ip-address masking, the validation is different, but it is allowed to shift the characters between the definitions)

Inputmask.extendDefinitions({
    'f': {  //masksymbol
        "validator": "[0-9\(\)\.\+/ ]",
        "cardinality": 1,
        'prevalidator': null
    },
    'g': {
        "validator": function (chrs, buffer, pos, strict, opts) {
            //do some logic and return true, false, or { "pos": new position, "c": character to place }
        }
        "cardinality": 1,
        'prevalidator': null
    },
    'j': { //basic year
            validator: "(19|20)\\d{2}",
            cardinality: 4,
            prevalidator: 
                        { validator: "", cardinality: 1 },
                        { validator: "(19|20)", cardinality: 2 },
                        { validator: "(19|20)\\d", cardinality: 3 }
            
     },
     'x': {
        validator: "",
        cardinality: 1,
        definitionSymbol: "i" //this allows shifting values from other definitions, with the same masksymbol or definitionSymbol
     },
     'y': {
        validator: function (chrs, buffer, pos, strict, opts) {
                        var valExp2 = new RegExp("2|");
                        return valExp2.test(bufferpos - 1 + chrs);
                    },
        cardinality: 1,
        definitionSymbol: "i"
     },
     'z': {
        validator: function (chrs, buffer, pos, strict, opts) {
                       var valExp3 = new RegExp("25|2|");
                        return valExp3.test(bufferpos - 2 + bufferpos - 1 + chrs);
        },
        cardinality: 1,
        definitionSymbol: "i"
      }
});

set defaults

Defaults can be set as below.

Inputmask.extendDefaults({
    'autoUnmask': true
});
Inputmask.extendDefinitions({
  'A': {
    validator: "",
    cardinality: 1,
    casing: "upper" //auto uppercasing
  },
  '+': {
    validator: "",
    cardinality: 1,
    casing: "upper"
  }
});
Inputmask.extendAliases({
  'Regex': {
    mask: "r",
    greedy: false,
    ...
  }
});

But if the property is defined within an alias you need to set it for the alias definition.

Inputmask.extendAliases({
  'numeric' : {
    allowPlus: false,
    allowMinus: false
}});

However, the preferred way to alter properties for an alias is by creating a new alias which inherits from the default alias definition.

Inputmask.extendAliases({
    'myNum': {
            alias: "numeric",
            placeholder: '',
            allowPlus: false,
            allowMinus: false
        }
});

Once defined, you can call the alias by:

 $(selector).inputmask("myNum");

General

set a value and apply mask

this can be done with the traditional jquery.val function (all browsers) or JavaScript value property for browsers which implement lookupGetter or getOwnPropertyDescriptor

$(document).ready(function(){
  $("#number").val(12345);

  var number = document.getElementById("number");
  number.value = 12345;
});

with the autoUnmaskoption you can change the return of $.fn.val (or value property) to unmaskedvalue or the maskedvalue

$(document).ready(function(){
  $('#<%= tbDate.ClientID%>').inputmask({ "mask": "d/m/y", 'autoUnmask' : true});    //  value: 23/03/1973
  alert($('#<%= tbDate.ClientID%>').val());    // shows 23031973     (autoUnmask: true)

  var tbDate = document.getElementById("<%= tbDate.ClientID%>");
  alert(tbDate.value);    // shows 23031973     (autoUnmask: true)
});

auto-casing inputmask

You can define within a definition to automatically apply some casing on the entry in an input by giving the casing.Casing can be null, «upper», «lower» or «title».

Inputmask.extendDefinitions({
  'A': {
    validator: "",
    cardinality: 1,
    casing: "upper" //auto uppercasing
  },
  '+': {
    validator: "",
    cardinality: 1,
    casing: "upper"
  }
});

Include jquery.inputmask.extensions.js for using the A and # definitions.

$(document).ready(function(){
  $("#test").inputmask("999-AAA");    //   => 123abc ===> 123-ABC
});

Маска ввода полю в форме в Excel

​ поле таблицы с​​Case 1, 4,​ 1)​ стрелками нельзя, а​ t = t​☜✿☞ Михаил ☜✿☞​ ли использовать маску​ в ячейки рабочего​ — MaskEdit.​»=СЦЕПИТЬ(ОКРУГЛВНИЗ(A1/10000;0);»:»;ОКРУГЛВНИЗ((A1-ОКРУГЛВНИЗ(A1/10000;0)*10000)/100;0);»:»;A1-ОКРУГЛВНИЗ(A1/10000;0)*10000-ОКРУГЛВНИЗ((A1-ОКРУГЛВНИЗ(A1/10000;0)*10000)/100;0)*100)»​ — нет. Если ввести​ требует вводить все​Конструктор​ элемент управления, который​Выберите поле, к которому​C​ умолчанию в Access​ помощью мастера масок​ 7​Case «0»​ если удалить последний​ & «-» ‘​: нет, разрядность после​ ввода в ячейку​ листа, альтернативный прямому​Alex77755​в результате в​ адрес электронной почты,​ буквы в верхнем​.​ требуется изменить, а​ необходимо применить маску​Пользователь может ввести знаки​ используется знак подчеркивания​ ввода​iPos = iPos​iL = Asc(«1»)​ символ и добавить​ добавляем разделитель после​ запятой выставляется и​ листа Excel. Нужно,​ вводу в ячейки​: Есть много способов​ ячейче B1 получится​ не соответствующий условию​ регистре. Чтобы использовать​Выберите поле, для которого​ затем выберите в​ ввода.​ или пробелы.​ (_). Чтобы задать​Создание настраиваемых масок ввода​

​ — 1​​iR = Asc(«9»)​ в первый значение​

​ первых 3 и​​ все​ чтобы он не​ листа (меню ‘Данные’,​ ограничить. Ограничь сами​​ 13:18:27, причем Excel​ на значение, введенные​ маску ввода этого​ необходимо создать настраиваемую​ контекстном меню команду​В разделе​

​. , : ; — /​​ другой знак, введите​Примеры масок ввода​Case 3, 6​Case «1», «2»​ уже изменяется​ 6 цифр​Iгор прокопенко​ ругался, а сам​ пункт ‘Форма…’.Comanche,​​ ячейки на листе​ автоматически распознает это​ данные будут отклонены​ типа, необходимо задать​ маску ввода.​Свойства​Свойства поля​Разделитель целой и дробной​ его в третьем​Использование масок ввода для​iPos = iPos​iL = Asc(«0»)​т. е. будет​​If t Like​​: Нужно поставить формат​​ переделывал, например человек​​именно: ‘1. Форма​ через меню Данные->Проверка…​ значение как дату.​ и появится сообщение,​ для типа данных​В области «Свойства поля»​.​на вкладке​ части, групп разрядов,​ компоненте маски.​ адресов электронной почты​ — 2​iR = Asc(«9»)​ ;#-;-; # и​​ «;-;-;» Then t​ ячеек «общий».​ вводит : «петров​ как ‘UserForm’ -​

CyberForum.ru>

InputMask history methods

An creates a new history snapshot each time you:

  • Perform a different type of editing operation to the previous editing operation.
  • Perform an editing operation with the cursor in a different position from where it was left after a previous editing operation.
  • Perform an editing operation with a text selection.

History methods allow you to step backwards and forwards through these snapshots, updating and accordingly.

If you perform an editing operation while stepping backwards through history snapshots, all snapshots after the current one will be disposed of.

A history method returns if a valid history operation was performed and and have been updated.

Otherwise, if an invalid history operation is attempted (e.g. trying to redo when you’ve already reached the point undoing started from) it will return .

Steps backwards through history snapshots.

Steps forwards through history snapshots.

Property Details

$_hashVar
protected property

The hashed variable to store the pluginOptions

protected string = null

$aliases
public property

Custom aliases to use. Should be configured as , where

  • is a string containing a text to identify your mask alias definition (e.g. ‘phone’) and
  • is an array containing settings for the mask symbol, exactly similar to parameters as passed in .

public array = null

$clientOptions
public property

The JQuery plugin options for the input mask plugin.

See also https://github.com/RobinHerbots/Inputmask.

public array = []

$definitions
public property

Custom mask definitions to use. Should be configured as , where

  • is a string, containing a character to identify your mask definition and
  • is an array, consisting of the following entries:

    • : string, a JS regular expression or a JS function.
    • : int, specifies how many characters are represented and validated for the definition.
    • : array, validate the characters before the definition cardinality is reached.
    • : string, allows shifting values from other definitions, with this .

public array = null

$mask
public property

The input mask (e.g. ’99/99/9999′ for date input). The following characters
can be used in the mask and are predefined:

  • : represents an alpha character (A-Z, a-z)
  • : represents a numeric character (0-9)
  • : represents an alphanumeric character (A-Z, a-z, 0-9)
  • and : anything entered between the square brackets is considered optional user input. This is
    based on the setting in .

Additional definitions can be set through the property.

public string|array|yii\web\JsExpression = null

$options
public property

The HTML attributes for the input tag.

See also for details on how attributes are being rendered.

public array = [‘class’ => ‘form-control’

$type
public property
(available since version 2.0.6)

The type of the input tag. Currently only ‘text’ and ‘tel’ are supported.

See also https://github.com/RobinHerbots/Inputmask.

public string = ‘text’

Методы:

mask(elems)

Создание маски ввода

$(selector).inputmask({ mask: "99-999-99"});

или

Inputmask({ mask: "99-999-99"}).mask(document.querySelectorAll(selector));

или

Inputmask("99-999-99").mask(document.querySelectorAll(selector));

или

var im : new Inputmask("99-999-99");
im.mask(document.querySelectorAll(selector));

или

Inputmask("99-999-99").mask(selector);

unmaskedvalue

Get the

$(selector).inputmask('unmaskedvalue');

или

var input = document.getElementById(selector);
if (input.inputmask)
  input.inputmask.unmaskedvalue()

Value unmasking

Unmask a given value against the mask.

var unformattedDate = Inputmask.unmask("23/03/1973", { alias: "dd/mm/yyyy"}); //23031973

удаление

Удаление .

$(selector).inputmask('remove');

или

var input = document.getElementById(selector);
if (input.inputmask)
  input.inputmask.remove()

или

Inputmask.remove(document.getElementById(selector));

getemptymask

return the default (empty) mask value

$(document).ready(function(){
  $("#test").inputmask("999-AAA");
  var initialValue = $("#test").inputmask("getemptymask");  // initialValue  => "___-___"
});

hasMaskedValue

Проверьте маскируется ли возвращаемое значение или нет; В настоящее время только надежно работает при использовании jquery.val функции для извлечения значения

$(document).ready(function(){
  function validateMaskedValue(val){}
  function validateValue(val){}

  var val = $("#test").val();
  if ($("#test").inputmask("hasMaskedValue"))
    validateMaskedValue(val);
  else
    validateValue(val);
});

isComplete

Проверяет, осуществлен ли полный ввод значения или нет

$(document).ready(function(){
  if ($(selector).inputmask("isComplete")){
    //do something
  }
});

getmetadata

Метаданные фактической маски, представленной в определениях маски может быть получено с помощью вызова getmetadata. Если только маска при условии определения маски будет возвращен getmetadata.

$(selector).inputmask("getmetadata");

установка значения

SetValue функциональность, чтобы установить значение для inputmask, как вы могли бы сделать с jQuery.val, но это вызовет внутреннее событие, используемый inputmask всегда, в любом случае. Это особенно полезно при клонировании inputmask с jQuery.clone. Клонирование inputmask не является полностью функциональным клоном. На первом случае (MouseEnter, фокус …) сотрудник inputmask может обнаружить, если он где клонировали может активировать маскирование. Однако при установке значения с jQuery.val не существует ни одно из событий сработавших в этом случае. SetValue функциональность делает это для вас.

option(options, noremask)

Get or set an option on an existing inputmask.
The option method is intented for adding extra options like callbacks, etc at a later time to the mask.

When extra options are set the mask is automatically reapplied, unless you pas true for the noremask argument.

Set an option

document.querySelector("#CellPhone").inputmask.option({
  onBeforePaste: function (pastedValue, opts) {
    return phoneNumOnPaste(pastedValue, opts);
  }
});
$("#CellPhone").inputmask("option", {
  onBeforePaste: function (pastedValue, opts) {
    return phoneNumOnPaste(pastedValue, opts);
  }
})

Формат

Вместо того, чтобы маскировать входного элемента также можно использовать для форматирования inputmask для форматирования заданных значений. Подумайте о форматировании значений, чтобы показать в jqGrid или на других элементах затем вводит.

var formattedDate = Inputmask.format("2331973", { alias: "dd/mm/yyyy"});
var isValid = Inputmask.isValid("23/03/1973", { alias: "dd/mm/yyyy"});

⚙️ Configuration

Library provides several ways to apply the mask.

The first and the easiest one is to use default placeholders.

Default placeholders

This approach is good for simple cases. No configuration is required.

import Vue from 'vue'
import VueMask from 'v-mask'
Vue.use(VueMask)
<template>
  <input type="text" v-mask="'####-##'" v-model="myInputModel">
</template>
<script>
  export default {
    data () => ({
      myInputModel ''
    })
  }
</script>

Entering in the input field will produce value in variable.

Here is a list placeholders you can utilize by default:

Placeholder Format
# Number (0-9)
A Letter in any case (a-z,A-Z)
N Number or letter (a-z,A-Z,0-9)
X Any symbol
? Optional (next character)

Custom placeholders

While default placeholders are easy to use and straightforward in reality we have to deal with more complex cases where validation can be a bit more complex and unpredictable. In such cases it makes sense to define custom placeholders specific to the project or the domain.

To define them you should pass them as an object while installing plugin. Where:

  • is the character in a mask
  • is regular expression used to verify entered symbol

You can disable any default placeholder by passing placeholder as a key and as a value.

Any valid string character can be used as a placeholder (e.g. Cyrillic or Arabic)

import Vue from 'vue'
import VueMask from 'v-mask'

Vue.use(VueMask, {
  placeholders: {
    '#': null,       // passing `null` removes default placeholder, so `#` is treated as character
    D: /\d/,         // define new placeholder
    Я: /\wа-яА-Я/, // cyrillic letter as a placeholder
  }
})
<template>
  <input type="text" v-mask="'###-DDD-###-DDD'" v-model="myInputModel">
</template>
<script>
  export default {
    data () => ({
      myInputModel ''
    })
  }
</script>

Entering in that input field will produce value in variable.

Array of RegExp

In some cases you might not want to define global placeholders either because you are dealing with unique input or you are facing conflicts for placeholders in several places.

In such cases you can supply array of per-char regular excursions or static characters to .

import Vue from 'vue'
import VueMask from 'v-mask'
Vue.use(VueMask)
<template>
  <input type="text" v-mask="mask" v-model="myInputModel">
</template>
<script>
  export default {
    data () => ({
      mask ,
      myInputModel ''
    })
  }
</script>

In this example entering in the input field will produce value in variable.

Notice: Keep in mind that library always verifies one character per regular expression. Trying verify multiple charters in the same RegExp won’t work.

Function

If custom placeholder and array of RegExps can’t fit your needs there is one more way you can use to mask a value.
The idea beneath is that you can write a function that is used by library to format the output.

This approach is super powerful but also more complex to write and understand so try previous ones first.

The function will be given a value from the input. It should return array of per-char regular expressions & static characters:

import Vue from 'vue'
import VueMask from 'v-mask'
Vue.use(VueMask)
<template>
  <input type="text" v-mask="mask" v-model="myInputModel" placeholder="00:00-23:59">
</template>
<script>
  /**
   * Generate a time mask based on input value (23:59)
   * @param {string} value
   */
  export function timeMask(value) {
    const hours = ,
      value.charAt() === '2' ?   ,
    ];
    const minutes = , ];
    return value.length > 2
      ? 
       hours;
  }

  /**
   * Generate a time range mask based on input value (00:00-23:59)
   * @param {string} value
   */
  export function timeRangeMask(value) {
    const numbers = value.replace(g, '');
    if (numbers.length > 4) {
      return ;
    }
    return ;
  }

  export default {
    data () => ({
      mask timeRangeMask,
      myInputModel ''
    })
  }
</script>

In this example entering in the input field will produce valid time range in variable.

Text Mask Addons

The usage is simple. Configure the addon as want and pass the result to the as you would to .

import Vue from 'vue'
import VueMask from 'v-mask'
Vue.use(VueMask)
<template>
  <input type="text" v-mask="mask" v-model="myInputModel" placeholder="$100.00">
</template>
<script>
  import createNumberMask from 'text-mask-addons/dist/createNumberMask';
  const currencyMask = createNumberMask({
    prefix '$',
    allowDecimal true,
    includeThousandsSeparator true,
    allowNegative false,
  });
  export default {
    data () => ({
      mask currencyMask,
      myInputModel ''
    })
  }
</script>

In this example:

  • entering in the input field will produce in variable
  • while entering in the input field will produce

View the documentation for a full list of options available.

Определение пользовательского символа маски

Вы можете определить свои собственные символы для использования в вашей маске. Начните с выбора символа маски.

валидатор(chrs, maskset, pos, strict, opts)

Затем определите свой валидатор. Проверка может быть регулярным выражением или функцией.

Возвращаемое значение валидатор может быть истинным, ложным или объектом.

Опциональные команды

  • pos : позиция для вставки

  • c : символ для вставки

  • caret : позиция каретки

  • remove : позиция (позиции) для удаления

    pos или

  • insert : позиции (позиций) для добавления :

    • { pos : позиция вставки, c : символ для вставки }
  • refreshFromBuffer :

    • true => refresh validPositions from the complete buffer
    • { start: , end: } => refresh from start to end

prevalidator(chrs, maskset, pos, strict, opts)

Опция предварительной проверки используется для проверки символов перед кардинальным определением, которое будет достигнуто. (См ‘J’ пример)

definitionSymbol

При вставке или удалении символов, они смещаются только тогда, когда определение типа является то же самое. Такое поведение может быть отменено, давая definitionSymbol. (См пример х, у, z, который может быть использован для IP-адреса маски, проверка отличается, но допускается сдвиг символов между определениями)

Inputmask.extendDefinitions({
  'f': {  //masksymbol
    "validator": "[0-9\(\)\.\+/ ]",
    "cardinality": 1,
    'prevalidator': null
  },
  'g': {
    "validator": function (chrs, buffer, pos, strict, opts) {
      //do some logic and return true, false, or { "pos": new position, "c": character to place }
    }
    "cardinality": 1,
    'prevalidator': null
  },
  'j': { //basic year
    validator: "(19|20)\\d{2}",
    cardinality: 4,
    prevalidator: 
      { validator: "", cardinality: 1 },
      { validator: "(19|20)", cardinality: 2 },
      { validator: "(19|20)\\d", cardinality: 3 }
    
  },
  'x': {
    validator: "",
    cardinality: 1,
    definitionSymbol: "i" //это позволяет сдвига значениt из других определений, с тем же символом маски или определения символа
  },
  'y': {
    validator: function (chrs, buffer, pos, strict, opts) {
      var valExp2 = new RegExp("2|");
      return valExp2.test(bufferpos - 1 + chrs);
    },
    cardinality: 1,
    definitionSymbol: "i"
  },
  'z': {
    validator: function (chrs, buffer, pos, strict, opts) {
      var valExp3 = new RegExp("25|2|");
      return valExp3.test(bufferpos - 2 + bufferpos - 1 + chrs);
    },
    cardinality: 1,
    definitionSymbol: "i"
  }
});

set defaults

Значения по умолчанию могут быть установлены, как показано ниже.

Inputmask.extendDefaults({
  'autoUnmask': true
});
Inputmask.extendDefinitions({
  'A': {
    validator: "",
    cardinality: 1,
    casing: "upper" //автоматический перевод в верхний регистр
  },
  '+': {
    validator: "",
    cardinality: 1,
    casing: "upper"
  }
});
Inputmask.extendAliases({
  'Regex': {
    mask: "r",
    greedy: false,
    ...
  }
});

Но если свойство определяется в качестве псевдонима необходимо установить его для определения псевдонима.

Inputmask.extendAliases({
  'numeric': {
    allowPlus: false,
    allowMinus: false
  }
});

Тем не менее, предпочтительный способ, чтобы изменить свойства псевдонима путем создания нового псевдонима, который наследуется из определения псевдонима по умолчанию.

Inputmask.extendAliases({
  'myNum': {
    alias: "numeric",
    placeholder: '',
    allowPlus: false,
    allowMinus: false
  }
});

После того, как определено, вы можете вызвать псевдоним с помощью:

$(selector).inputmask("myNum");

Все обратные вызовы реализованы в виде опций. Это означает, что вы можете установить общие для реализации обратных вызовов путем установки по умолчанию.

Inputmask.extendDefaults({
  onKeyValidation: function(key, result){
    if (!result){
      alert('Ваше введенное значение не верно')
    }
  }
});

General

set a value and apply mask

this can be done with the traditional jquery.val function (all browsers) or JavaScript value property for browsers which implement lookupGetter or getOwnPropertyDescriptor

$(document).ready(function(){
  $("#number").val(12345);

  var number = document.getElementById("number");
  number.value = 12345;
});

with the autoUnmaskoption you can change the return of $.fn.val (or value property) to unmaskedvalue or the maskedvalue

$(document).ready(function(){
  $('#<%= tbDate.ClientID%>').inputmask({ "mask": "d/m/y", 'autoUnmask' : true});    //  value: 23/03/1973
  alert($('#<%= tbDate.ClientID%>').val());    // shows 23031973     (autoUnmask: true)

  var tbDate = document.getElementById("<%= tbDate.ClientID%>");
  alert(tbDate.value);    // shows 23031973     (autoUnmask: true)
});

auto upper/lower- casing inputmask

You can define within a definition to automatically lowercase or uppercase the entry in an input by giving the casing.Casing can be null, «upper» or «lower»

Inputmask.extendDefinitions({
  'A': {
    validator: "",
    cardinality: 1,
    casing: "upper" //auto uppercasing
  },
  '+': {
    validator: "",
    cardinality: 1,
    casing: "upper"
  }
});

Include jquery.inputmask.extensions.js for using the A and # definitions.

$(document).ready(function(){
  $("#test").inputmask("999-AAA");    //   => 123abc ===> 123-ABC
});

Method Details

hashPluginOptions()

protected method

Generates a hashed variable to store the plugin .

Helps in reusing the variable for similar
options passed for other widgets on the same page. The following special data attribute will also be
added to the input field to allow accessing the client options via javascript:

‘data-plugin-inputmask’ will store the hashed variable storing the plugin options.

protected void ( $view )
$view yii\web\View

The view instance

init()

public method

Initializes the widget.

public void ( )
throws yii\base\InvalidConfigException

if the «mask» property is not set.

initClientOptions()

protected method

Initializes client options.

protected void ( )

registerClientScript()

public method

Registers the needed client script and options.

public void ( )

run()

public method

{@inheritdoc}

public void ( )

numeric extensions

$(document).ready(function(){
   $("#numeric").inputmask("decimal");
   $("#numeric").inputmask("decimal", { allowMinus: false });
   $("#numeric").inputmask("integer");
});

RadixDance

With the decimal mask the caret will always jump to the integer part, until you type the radixpoint.
There is autocompletion on tab with decimal numbers. You can disable this behaviour by setting the skipRadixDance to true.

Define the radixpoint

$(document).ready(function(){
   $("#numeric").inputmask("decimal", { radixPoint: "," });
});

Define the number of digits after the radixpoint

$(document).ready(function(){
   $("#numeric").inputmask("decimal", { digits: 3 });
});

When TAB out of the input the digits autocomplate with 0 if the digits option is given a valid number.

Grouping support through: autoGroup, groupSeparator, groupSize

$(document).ready(function(){
   $("#numeric").inputmask("decimal", { radixPoint: ",", autoGroup: true, groupSeparator: ".", groupSize: 3 });
});

Allow minus and/or plus symbol

$(document).ready(function(){
   $("#numeric").inputmask("decimal", { allowMinus: false });
   $("#numeric").inputmask("integer", { allowMinus: false, allowPlus: true });
});

Воспользоваться Intercepter-NG

Неплохой способ вспомнить пароль – прибегнуть к помощи особой утилиты Intercepter-NG. Несмотря на то, что она скорее предназначена для хакеров, можно её преимущества использовать для решения этой проблемы.

После входа в любой аккаунт или программу, как только произойдёт автоматическая авторизация, Intercepter-NG сделает своё дело – обнаружит сведения для входа и зафиксирует информацию в отдельном текстовом файле. Останется открыть этот отчёт и увидеть логин с паролем для входа на конкретный сайт или в приложение. Надо добавить, что корректная работа этой программы возможна только на смартфонах с включёнными рут правами.

⇡#Тестируем

Deepcool Quadstellar позволяет собрать по-настоящему производительную систему. Лично у меня получилась следующая сборка:

Конфигурация тестового стенда
CPU Intel Core i7-8700K, 3,7 (4,7) ГГц
Материнская плата MSI Z370 GODLIKE GAMING
Видеокарта MSI GeForce GTX 1080 Ti GAMING X TRIO, 11 Гбайт GDDR5X
Оперативная память DDR4-3000, 2 × 8 Гбайт
ПЗУ Team Group T-FORCE CARDEA, 480 Гбайт, PCI Express x 4 3.0 4x Western Digital WD10EFRX, 1 Тбайт, SATA 6 Гбит/с
Блок питания Antec HCG-750M, 750 Вт
Система охлаждения CPU Thermaltake Floe Riing RGB 240 TT Premium Edition + вентиляторы ENERMAX UCTBRGB12-BP6
Корпус Deepcool Quadstellar
Монитор NEC EA244UHD
Операционная система Windows 10 Pro x64
ПО для видеокарт
NVIDIA GeForce Game Ready Driver 398.36
Дополнительное ПО
Удаление драйверов Display Driver Uninstaller 17.0.6.1
Измерение FPS Fraps 3.5.99
Action! 2.3.0
Разгон и мониторинг GPU-Z 2.7.0
MSI Afterburner 4.5.0
Дополнительное оборудование
Тепловизор Fluke Ti400
Шумомер Mastech MS6708
Ваттметр watts up? PRO

На SSD была установлена операционная система Windows 10 Pro x64. Тестирование эффективности охлаждения проводилось в двух режимах: с открытыми и закрытыми створками передней панели корпуса. Во всех случаях корпус стоял на столе в вертикальном положении. Центральный процессор в течение 30 минут нагружался при помощи программы LinX 0.7.0. Мониторинг температурных показателей выполнялся приложением HWiNFO64 5.74. Целиком система нагружалась в компьютерной игре «Ведьмак-3: Дикая охота», при максимальных настройках качества графики в разрешении Full HD, в течение двух часов. Тестирование проводилось в помещении с температурой 27,7 градуса Цельсия. Уровень шума измерялся электронным прибором Mastech MS6708 с расстояния 50 см от корпуса.

Для получения стабильных результатов все вентиляторы в системном блоке работали с фиксированной частотой: корпусные вентиляторы — ~500, ~1000, ~1175 и ~1500 об/мин; вентиляторы процессорной СО — ~1500 об/мин (100 %); вентиляторы видеокарты — ~1330 об/мин (50 %). Не было возможности контролировать вращение вентилятора только у блока питания, но справедливости ради отмечу, что PSU все время находился за заградительной перегородкой, а потому никак не влиял на тестирование.

Уровень шума, расстояние 50 см (меньше — лучше)
Режим работы вентиляторов Закрытая передняя панель Открытая передняя панель
Минимальная частота вращения (~500 об/мин) 35,9 дБ 36,2 дБ
Silent (~1000 об/мин) 36,4 дБ 37,4 дБ
Standard (~1175 об/мин) 37,5 дБ 39,1 дБ
Performance (~1500 об/мин) 42,2 дБ 44,6 дБ

Как уже было сказано, в приложении QuadStellar можно настроить частоту вращения всех корпусных вентиляторов, а также крыльчаток, подключенных к блоку управления. Корпус вполне можно назвать негромким. Результаты показывают, что при частоте вращения до 1175 об/мин вентиляторы TF120 работают довольно тихо. При частоте ~500 об/мин квартет TF120 работает практически бесшумно. В случае с нашей сборкой самыми громкими элементами в играх оказались блок питания и видеокарта.

Нагрев компонентов тестового стенда (меньше — лучше)
Режим работы вентиляторов Закрытая передняя панель Открытая передняя панель
LinX, Core Max, °C
Минимальная частота вращения (~500 об/мин) 82 82
Silent (~1000 об/мин) 82 82
Standard (~1175 об/мин) 81 82
Performance (~1500 об/мин) 80 80
«Ведьмак-3: Дикая охота», Core Max, °C
Минимальная частота вращения (~500 об/мин) 64 61
Silent (~1000 об/мин) 62 58
Standard (~1175 об/мин) 61 59
Performance (~1500 об/мин) 58 56
«Ведьмак-3: Дикая охота», GPU, °C
Минимальная частота вращения (~500 об/мин) 84 (минимальная частота GPU — 1709 МГц)  84 (минимальная частота GPU — 1709 МГц) 
Silent (~1000 об/мин) 84 (минимальная частота GPU — 1759 МГц)  84 (минимальная частота GPU — 1835 МГц) 
Standard (~1175 об/мин) 84 (минимальная частота GPU — 1835 МГц)  84 (минимальная частота GPU — 1860 МГц) 
Performance (~1500 об/мин) 84 (минимальная частота GPU — 1848 МГц)  84 (минимальная частота GPU — 1936 МГц) 

После установки необслуживаемой СВО пришлось убрать один из корпусных вентиляторов, работающих на вдув. Поэтому секция Deepcool Quadstellar, в которую помещена материнская плата, никак дополнительно не обдувается. Неудивительно, что при открытии/закрытии «лепестков» на передней панели, а также изменении частоты вращения корпусных вентиляторов температура самого горячего ядра Core i7-8700K практически не менялась.

В играх температура центрального процессора оказалась заметно ниже. Температура процессора видеокарты при заданных условиях частоты вращения вентиляторов всегда достигала отметки в 84 градуса Цельсия, а затем частота GPU постепенно снижалась. На мой взгляд, Deepcool Quadstellar работает достаточно эффективно с точки зрения охлаждения в режиме Standard. Открытие пластиковых шторок на передней панели действительно помогает корпусным вентиляторам функционировать эффективнее.

В моем случае — случае использования четырех жестких дисков Western Digital WD10EFRX — мне никак не удалось добиться высоких температур при постоянной нагрузке в виде последовательных операций с глубиной очереди запросов в 32 команды. Даже при минимальной активности корпусных вентиляторов максимальная температура самого горячего жесткого диска составила всего 40 градусов Цельсия. При работе вентиляторов в режиме Performance этот показатель снизился на 5 градусов Цельсия.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector