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 Foundation | |
public final class RegexGroup: CustomDebugStringConvertible { | |
public internal(set) var subgroups = [RegexGroup]() | |
public internal(set) var value = Substring() | |
func contains(range: Range<String.Index>) -> Bool { | |
return range.lowerBound >= value.startIndex && range.upperBound <= value.endIndex | |
} |
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 SwiftUI | |
import Combine | |
// Protocol 'NonConstrainedViewModel' can only be used as a generic constraint | |
// because it has Self or associated type requirements | |
protocol NonConstrainedViewModel: ObservableObject { | |
var state: Int { get set } | |
var statePublished: Published<Int> { get } | |
var statePublisher: Published<Int>.Publisher { get } | |
func increase() |
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
// swift-tools-version:5.5 | |
import PackageDescription | |
var package = Package( | |
name: "App", | |
defaultLocalization: "en", | |
platforms: [.iOS(.v14)] | |
) | |
// MARK: - Dependencies |
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>kgg</title> | |
<style> | |
body { | |
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Penrose P3</title> | |
<style> | |
body { | |
padding: 0; |
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>3D Cube rotate animation</title> | |
<style> | |
.global { | |
background: yellow; |
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 name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Centering text</title> | |
<style> | |
.outer { | |
width: 300px; |
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
<!-- | |
Minimal example of payment page with input masking and native form validation | |
https://jsfiddle.net/pu57Lns8/1/ | |
One of the caveats in this example maybe using "minlength" attribute while changing input value programmatically: | |
this won't check real validity. | |
From html5 spec (minlength attribute): If an element has a minimum allowed value length, its dirty value flag is true, | |
VALUE WAS LAST CHANGED BY A USER EDIT (AS OPPOSED TO A CHANGE MADE BY A SCRIPT), |
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 sys import * | |
def main(cin, cout): | |
a, b = map(int, cin.readline().split()) | |
cout.write(str(a + b)) | |
def get_main_output(input_str): | |
from io import StringIO |
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
""" | |
> python logmorpher.py 1Cv8.lgd 14 | |
Для запуска необходим python3.6+ | |
Скрипт для изменения .lgd логов 1С: | |
* смещает даты на указанное количество дней и случайное количество секунд | |
* заменяет все компьютеры и пользователей на текущих | |
* изменяет идентикаторы сессий и транзакций на случайные | |
Перед отправкой изменненой базы преподавателю рекомендуется стереть временные файлы 1C (пустые папки и файлы), |