This file contains hidden or 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 java.util.*; | |
| class Main | |
| { | |
| public static void main(String args[]) | |
| { | |
| Scanner scanner = new Scanner(System.in); | |
| System.out.println("Введите текст"); | |
| String text = scanner.nextLine(); | |
| System.out.println("Какой символ нужно найти? Введите один символ."); |
This file contains hidden or 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 java.util.*; | |
| // Compiler version JDK 11.0.2 | |
| class Main | |
| { | |
| public static void main(String args[]) | |
| { | |
| int[] arr = new int[10]; //последовательность из 10 чисел от 0 до 9 | |
| int countOfEven = 0; |
This file contains hidden or 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
| public class GoodDog { | |
| private String name = "Default"; | |
| private byte count = 0; | |
| private byte weight = 0; | |
| void play () { | |
| System.out.println(name + " с радостью, виляя хвостом: "); | |
| if (weight > 30) { |
This file contains hidden or 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 java.util.Random; | |
| public class QuickSortExample { | |
| public static int ARRAY_LENGTH = 30; | |
| private static int[] array = new int[ARRAY_LENGTH]; | |
| private static Random generator = new Random(); | |
| public static void initArray() { | |
| for (int i=0; i<ARRAY_LENGTH; i++) { | |
| array[i] = generator.nextInt(100); |
This file contains hidden or 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
| { | |
| "set" : "Cluster0-shard-0", | |
| "date" : ISODate("2019-08-18T17:12:34.914Z"), | |
| "myState" : 1, | |
| "term" : NumberLong(12), | |
| "syncingTo" : "", | |
| "syncSourceHost" : "", | |
| "syncSourceId" : -1, | |
| "heartbeatIntervalMillis" : NumberLong(2000), | |
| "optimes" : { |
This file contains hidden or 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
| bot.hears('...', async (ctx) => { | |
| const buttons = await db.collection('anything').find({type: 'buttons}).toArray() | |
| const keyboardArray = [] | |
| for (let key of buttons) { | |
| keyboardArray.push(Markup.urlButton(key.name, key.link)) | |
| } | |
| ctx.reply( | |
| 'text', |
This file contains hidden or 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
| [Unit] | |
| Description=OpenVPN connection to %i | |
| PartOf=openvpn.service | |
| ReloadPropagatedFrom=openvpn.service | |
| Before=systemd-user-sessions.service | |
| After=network-online.target | |
| Wants=network-online.target | |
| Documentation=man:openvpn(8) | |
| Documentation=https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage | |
| Documentation=https://community.openvpn.net/openvpn/wiki/HOWTO |
This file contains hidden or 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 WizardScene = require('telegraf/scenes/wizard') | |
| const Markup = require('telegraf/markup') | |
| const Extra = require('telegraf/extra') | |
| const superWizard = new WizardScene('super-wizard', | |
| (ctx) => { | |
| ctx.reply('Как Вас зовут?') | |
| return ctx.wizard.next() | |
| }, | |
| (ctx) => { |
This file contains hidden or 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 Telegraf = require('telegraf') | |
| const Composer = require('telegraf/composer') | |
| const session = require('telegraf/session') | |
| const Stage = require('telegraf/stage') | |
| const Extra = require('telegraf/extra') | |
| const Markup = require('telegraf/markup') | |
| const WizardScene = require('telegraf/scenes/wizard') | |
| const data = require('./data') | |
This file contains hidden or 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
| axios({ | |
| method: 'post', | |
| url: '/user/12345', | |
| headers: [{ 'content-type': 'application/x-www-form-urlencoded' }, ...], | |
| data: { | |
| firstName: 'Fred', | |
| lastName: 'Flintstone' | |
| } | |
| }) | |