This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package my.app.android | |
import androidx.compose.ui.text.AnnotatedString | |
import androidx.compose.ui.text.input.OffsetMapping | |
import androidx.compose.ui.text.input.TransformedText | |
import androidx.compose.ui.text.input.VisualTransformation | |
import kotlin.math.absoluteValue | |
class MaskVisualTransformation(private val mask: String): VisualTransformation { | |
private val specialSymbolsIndices = mask.indices.filter { mask[it] != '#' } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "3.3" | |
# Указываем раздел со связанными сервисами | |
services: | |
nginx: | |
depends_on: | |
- nuxt | |
image: nginx:latest | |
labels: | |
proxy_nginx: "Для SSL" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import nodemailer from 'nodemailer' | |
const transporter = nodemailer.createTransport({ | |
service: 'gmail', | |
auth: { | |
user: '[email protected]', | |
pass: 'pass' | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
import token from '~/bot/token' | |
import { parse } from 'node-html-parser' | |
export default eventHandler(async () => { | |
const reqResult = await axios | |
.get('https://baneks.ru/random') | |
.then((res) => { | |
if (!res.data) { return null } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import axios from 'axios' | |
export default eventHandler(async () => { | |
const reqResult = await axios | |
.get(`https://api.telegram.org/bot@token@/getUpdates`) | |
.then((res) => { | |
if (!res.data) { return [] } | |
return res.data.result | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:18.16.0 | |
ENV APP_ROOT /web | |
WORKDIR ${APP_ROOT} | |
ADD . ${APP_ROOT} | |
RUN npm ci | |
RUN npm run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension String { | |
func formatUserInput(pattern: String) -> String { | |
var inputCollection = Array(self) | |
var resultCollection: Array<Character> = [] | |
for i in 0 ..< pattern.count { | |
let patternCharIndex = String.Index(utf16Offset: i, in: pattern) | |
let patternChar = pattern[patternCharIndex] | |
guard let nextInputChar = inputCollection.first else { break } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<style> | |
header { | |
display: flex; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Document</title> | |
<script type="text/javascript" src="qrcode.min.js"></script> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
const cheerio = require('cheerio') | |
async function start() { | |
const url = 'https://example.com/' | |
const result = await axios.get(url) | |
const $ = cheerio.load(result.data) | |
const title = $.html($('h1')) | |
console.log(title) |
NewerOlder