Find every right triangle that fits all of these conditions:
- The lengths of the three sides are all integers.
- The length of each side is less than or equal to a 10.
- The triangle's perimeter (the sum of the side lengths) is equal to 24.
/* | |
* Copyright (C) 2015 Karumi. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
Find every right triangle that fits all of these conditions:
type Text = Option[String] | |
case class ColumnWidth(width: Int) | |
sealed trait WrapError | |
case class InvalidText(text: Text) extends WrapError | |
case class InvalidColumnWidth(width: ColumnWidth) extends WrapError | |
def wrap(text: Text, width: ColumnWidth): Either[WrapError, Text] = ??? |
Llevo unos años trabajando en empresas del sector tecnológico, me dedico al desarrollo de software y creedme cuando os digo que he visto de todo. Empresas, grandes, empresas pequeñas, auto financiadas, con inversión externa, con equipos técnicos brillantes y equipos técnicos como los que puedes encontrar en cualquier otro lugar. Al igual que empresas de todos los colores también he tenido el placer de conocer a todo tipo de programadores y es ahora que ya han pasado unos cuantos años cuando puedo reconocer una serie de patrones que he visto tanto en mi mismo como en la gente que me rodea. En este gist/post voy a intentar plasmar algunos de estos patrones que he me resultan cuanto menos curiosos.
En este post me centraré en los desarrolladores de software porque es el gremio en el que me encuentro, pero seguro que aunque no te dediques a esto podrás encontrar similitudes con tu profesión. Estos son los patrones con los que yo me he econtrado en diferentes empresas y que he podido ver en mi mismo
language: android | |
android: | |
components: | |
- tools | |
- platform-tools | |
- build-tools-27.0.3 | |
- android-28 | |
- extra-android-support | |
- extra-google-m2repository | |
- extra-android-m2repository |
language: objective-c | |
osx_image: xcode9.4 | |
before_install: | |
- gem install cocoapods | |
- pod repo update --silent | |
- gem install xcpretty | |
script: | |
- set -o pipefail && xcodebuild -workspace KataLogInLogOutSwift.xcworkspace -scheme 'KataLogInLogOutSwift' -destination 'platform=iOS Simulator,name=iPhone 6s Plus' build test CODE_SIGN_IDENTITY=- | xcpretty -c |
language: objective-c | |
osx_image: xcode9.4 | |
before_install: | |
- gem install cocoapods | |
- pod repo update --silent | |
- gem install xcpretty | |
script: | |
- set -o pipefail && xcodebuild -workspace KataLogInLogOutSwift.xcworkspace -scheme 'KataLogInLogOutSwift' -destination 'platform=iOS Simulator,name=iPhone 6s Plus' build test CODE_SIGN_IDENTITY=- | xcpretty -c |
Most of our tasks as software engineers are related to forms. Sign up forms, sing in forms, onboarding forms, etc. So today we are going to practice how to validate any form data using accumulative errors so we can now in just one method invocation what are the errors our form contains.
Our task for today's practice is to write a program to be able to validate if the data contained in a form with the following information is valid or not.
import com.facebook.flipper.plugins.network.NetworkFlipperPlugin; | |
import com.facebook.flipper.plugins.network.NetworkReporter; | |
import com.squareup.okhttp.*; | |
import okio.Buffer; | |
import okio.BufferedSource; | |
import javax.annotation.Nullable; | |
import java.io.IOException; | |
import java.util.ArrayList; |