JavaScript
- 3 ответа
- 0 вопросов
3
Вклад в тег
const numb = 1234567;
const numbFmt = new Intl.NumberFormat('ru-RU').format(numb);
console.log('Отформатированное число: ' + numbFmt); // 1 234 567
const numb = 1234567;
const numbFmt = numb.toLocaleString('ru-RU');
console.log('Отформатированное число: ' + numbFmt); // 1 234 567
User::find()->andWhere(['like', 'username', '89'])->all();
// SQL: `username` LIKE '89'
User::find()->andWhere(['like', 'username', '%89', false])->all();
User::find()->andWhere(['like', 'username', '89%', false])->all();
User::find()->andWhere(['like', 'username', '%89%', false])->all();
User::find()->andWhere([new \yii\db\Expression('username LIKE :param', [':param' => '%' . $str]),])->all();
User::find()->andWhere([new \yii\db\Expression('username LIKE :param', [':param' => $str . '%']),])->all();
User::find()->andWhere([new \yii\db\Expression('username LIKE :param', [':param' => '%' . $str . '%']),])->all();
$defaultConfig = (new \Mpdf\Config\ConfigVariables())->getDefaults();
$fontDirs = $defaultConfig['fontDir'];
$defaultFontConfig = (new \Mpdf\Config\FontVariables())->getDefaults();
$fontData = $defaultFontConfig['fontdata'];
$pdf = new Pdf([
...
'options' => [
...
'fontDir' => array_merge($fontDirs, [
Yii::getAlias('@webroot/fonts/'),
]),
'fontdata' => array_merge($fontData, [
"roboto" => [
'R' => "Roboto-Regular.ttf",
'I' => "Roboto-Regular.ttf",
'B' => "Roboto-Bold.ttf",
],
]),
'default_font' => 'roboto'
],
...
]);