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
1111 идеальный прямоугольник = IdealRect{sideType=A, widthInCells=4, heightInSmallRacks=1, isGumBags=false, planGum=29, lowestRackPositionYInMm=1690, sectionList=[Section{width=CELLS_4, height=H_1800, racks=[], toperAbsent=false, carcass=null, startOffset=0}], smallRacksAboveThreadmill=9, squareIndex=0.6, aboveThreadmillIndex=1.0, rationalIndex=1.0, planAccordanceIndex=1.8620689655172413} | |
1111 индекс = 4.462068965517242 | |
1111 идеальный прямоугольник = IdealRect{sideType=A, widthInCells=4, heightInSmallRacks=2, isGumBags=false, planGum=29, lowestRackPositionYInMm=1581, sectionList=[Section{width=CELLS_4, height=H_1800, racks=[], toperAbsent=false, carcass=null, startOffset=0}], smallRacksAboveThreadmill=9, squareIndex=0.2, aboveThreadmillIndex=1.0, rationalIndex=1.0, planAccordanceIndex=1.7241379310344827} | |
1111 индекс = 3.924137931034483 | |
1111 идеальный прямоугольник = IdealRect{sideType=A, widthInCells=4, heightInSmallRacks=3, isGumBags=false, planGum=29, lowestRackPositionYInMm=1471, sectionList=[Section{width |
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
@Data | |
@NoArgsConstructor | |
public class ToolbarConfig { | |
private | |
@IdRes | |
int toolbarId = R.id.toolbar; | |
private boolean setDisplayHomeAsUpEnabled = true; |
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
/** Возвращает описание про благотворительность в информации о заказе */ | |
- (NSString *)orderInfoCharityDescription:(LABCharity *)charity { | |
NSString *resultString = [NSString stringWithFormat:@"%@\u00a0р.", [LABUtils priceSeparateBySpace:charity.sum]]; | |
NSString *location = nil; | |
NSArray<LABOrphanage *> *orphanages = [charity.orphanage allObjects]; | |
if (orphanages && orphanages.count > 0) { | |
location = [orphanages firstObject].orphanageName; | |
resultString = [resultString stringByAppendingString:[NSString stringWithFormat:@" в %@", location]]; | |
} | |
return resultString; |
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
if (order.deliveryMethod.deliveryType.deliveryTypeName) { | |
NSString *deliveryValue = order.deliveryMethod.deliveryType.deliveryTypeName; // Курьер: Пермь | |
NSString *deliveryAddress = order.deliveryMethod.address; // Улица, дом | |
NSString *deliveryPrice = NSLocalizedString(@"ORDER_PARAMETER_FREE_DELIVERY_COST", nil); // "Бесплатно" | |
if ([order.deliveryMethod.price integerValue] > 0) { | |
deliveryPrice = [NSString stringWithFormat:@"%@\u00a0р.", [LABUtils priceSeparateBySpace:order.deliveryMethod.price]]; // 200 р. | |
} | |
//НЕ НУЖНО ДОБАВЛЯТЬ В СТРОКУ NSString *title = NSLocalizedString(@"ORDER_PARAMETER_DELIVERY_TITLE", nil); // "Доставка", слово, которое слева серым | |
NSString *value = [NSString stringWithFormat:@"%@, %@", deliveryPrice, deliveryValue]; // Сборная строка "200 р., Курьер: Пермь" | |
if ([LABUtils notEmptyString:deliveryAddress]) { |
This file has been truncated, but you can view the full file.
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
surf@vladUbuntu:~/AndroidStudioProjects/wrigley/WrigleyLayout$ ./gradlew clean build --debug | |
11:57:13.645 [INFO] [org.gradle.BuildLogger] Starting Build | |
11:57:13.653 [DEBUG] [org.gradle.BuildLogger] Gradle user home: /home/surf/.gradle | |
11:57:13.654 [DEBUG] [org.gradle.BuildLogger] Current dir: /home/surf/AndroidStudioProjects/wrigley/WrigleyLayout | |
11:57:13.655 [DEBUG] [org.gradle.BuildLogger] Settings file: null | |
11:57:13.656 [DEBUG] [org.gradle.BuildLogger] Build file: null | |
11:57:13.669 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Starting to build the build sources. | |
11:57:13.672 [DEBUG] [org.gradle.initialization.buildsrc.BuildSourceBuilder] Gradle source dir does not exist. We leave. | |
11:57:13.676 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found env project properties: [] | |
11:57:13.677 [DEBUG] [org.gradle.initialization.DefaultGradlePropertiesLoader] Found system project properties: [] |
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
fun eval(expr: Expr): Double = when(expr) { | |
is Expr.Const -> expr.number | |
is Expr.Sum -> eval(expr.e1) + eval(expr.e2) | |
Expr.NotANumber -> Double.NaN | |
// ветка else не требуется, так как покрыты все возможные сценарии | |
} |
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
sealed class Expr { | |
class Const(val number: Double) : Expr() | |
class Sum(val e1: Expr, val e2: Expr) : Expr() | |
object NotANumber : Expr() | |
} |
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
open class Base { | |
open fun f() {} | |
} | |
abstract class Derived : Base() { | |
override abstract fun f() | |
} |
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
open class A { | |
open fun f() { print("A") } | |
fun a() { print("a") } | |
} | |
interface B { | |
fun f() { print("B") } // члены интерфейса открыты по-умолчанию | |
fun b() { print("b") } | |
} |
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
open class AnotherDerived() : Base() { | |
final override fun v() {} | |
} |