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
/* | |
* Тестовое задание: | |
N студентов стоят в очереди за стипендией. Каждый студент имеет учебный рейтинг. Деканат должен выдать стипендию таким образом, чтобы: | |
* каждый студент получил хотя бы 1 рубль, | |
* студенты с более высоким рейтингом получили больше рублей, чем их соседи в очереди. | |
Копеек в деканате нет. Какое минимальное количество рублей должно быть у деканата? | |
На вход подаётся массив из N элементов, содержащий рейтинги для каждого студента. | |
На выходе ожидается число, обозначающее минимальное количество рублей, которых должно хватить студентам. |
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
<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"> | |
<title>Dr. Norman Borlaug</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"> | |
<style> | |
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
<body data-spy="scroll" data-target=".navbar" data-offset="50"> | |
<!-- Navigation Part --> | |
<nav class="navbar navbar-inverse navbar-fixed-top"> | |
<div class="container-fluid"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".myNavbar"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> |
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
<body data-spy="scroll" data-target=".navbar" data-offset="50"> | |
<!-- Navigation Part --> | |
<nav class="navbar navbar-inverse navbar-fixed-top"> | |
<div class="container-fluid"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".myNavbar"> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> |
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
public class UiAutomatorCheck { | |
public static void main(String[] args) throws MalformedURLException { | |
DesiredCapabilities caps = new DesiredCapabilities(); | |
caps.setCapability("deviceName", "192.168.191.101:5555"); | |
caps.setCapability("platformName", "Android"); | |
caps.setCapability("app", "C:\\cygwin64\\unlock_apk-debug.apk"); | |
AndroidDriver driver = new AndroidDriver(new URL("http://127.0.0.1:4723/wd/hub"), caps); |
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 os | |
from flask import Flask, request, redirect, url_for, send_from_directory | |
from flask_cors import CORS | |
from werkzeug.utils import secure_filename | |
UPLOAD_FOLDER = 'files' | |
ALLOWED_EXTENSIONS = {'pcap'} | |
app = Flask(__name__) | |
CORS(app) |
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 java.util.Iterator; | |
import java.util.NoSuchElementException; | |
public class Converter { | |
Iterator<Integer> convert(Iterator<Iterator<Integer>> it) { | |
return new Iterator<Integer>() { | |
/** | |
* Current step of iterator |
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
org.openqa.selenium.NoSuchSessionException: A session is either terminated or not started | |
Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T14:04:26.12Z' | |
System info: host: 'iMac-Maksim.local', ip: 'fe80:0:0:0:18ac:14fb:349f:a1c0%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '1.8.0_192' | |
Driver info: io.appium.java_client.ios.IOSDriver | |
Capabilities {app: /Users/maksim/IdeaProjects/..., autoWebview: true, automationName: XCUITest, browserName: , clearSystemFiles: true, databaseEnabled: false, deviceName: iPhone XS Max, fullReset: false, javascriptEnabled: true, launchTimeout: 90, locationContextEnabled: false, networkConnectionEnabled: false, newCommandTimeout: 90, noReset: false, platform: MAC, platformName: iOS, platformVersion: 12.1, printPageSourceOnFindFailure: true, takesScreenshot: true, udid: B5810411-7BBD-4688-A211-982..., version: 12.1, webStorageEnabled: false, webviewConnectRetries: 20} | |
Session ID: 083ca92c-902e-41bb-adae-19802017f73c | |
at sun |
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
[HTTP] <-- POST /wd/hub/session/083ca92c-902e-41bb-adae-19802017f73c/appium/device/terminate_app 200 1075 ms - 14 | |
[HTTP] | |
[HTTP] --> POST /wd/hub/session/083ca92c-902e-41bb-adae-19802017f73c/execute/sync | |
[HTTP] {"script":"mobile: activateApp","args":[{"bundleId":"com."}]} | |
[debug] [W3C] Calling AppiumDriver.execute() with args: ["mobile: activateApp",[{"bundleId":"com."}],"083ca92c-902e-41bb-adae-19802017f73c"] | |
[debug] [XCUITest] Executing command 'execute' | |
[debug] [JSONWP Proxy] Proxying [POST /wda/apps/activate] to [POST http://localhost:8100/session/8711B371-B9D8-4446-B241-81D97BF6E4ED/wda/apps/activate] with body: {"bundleId":"com."} | |
[debug] [RemoteDebugger] Notified that new application 'PID:4412' has connected | |
[debug] [RemoteDebugger] Found app id key 'PID:4412' for bundle 'com.' | |
[debug] [RemoteDebugger] Page changed: {} |
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
@Configuration | |
@Order(1) | |
public static class BasicAuthenticationAdapter extends WebSecurityConfigurerAdapter { | |
private final AuthenticationEntryPoint authEntryPoint; | |
@Autowired | |
public BasicAuthenticationAdapter(AuthenticationEntryPoint authEntryPoint) { | |
this.authEntryPoint = authEntryPoint; | |
} |
OlderNewer