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
    
  
  
    
  | name: CI/CD workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| testing: | 
  
    
      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
    
  
  
    
  | version: '3' | |
| services: | |
| laravel.test: | |
| build: | |
| context: ./docker/8.1 | |
| dockerfile: Dockerfile | |
| args: | |
| WWWGROUP: '${WWWGROUP}' | |
| image: thesolo-8.1/app | |
| extra_hosts: | 
  
    
      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
    
  
  
    
  | # For more information: https://laravel.com/docs/sail | |
| version: '3' | |
| services: | |
| laravel.test: | |
| build: | |
| context: ./docker/8.1 | |
| dockerfile: Dockerfile | |
| args: | |
| WWWGROUP: '${WWWGROUP}' | |
| image: thesolo-8.1/app | 
  
    
      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
    
  
  
    
  | <?php | |
| /* | |
| This function saved my life. | |
| found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
| by: crvandyke | |
| It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
| */ | |
| $array = json_decode(json_encode($object), true); | 
  
    
      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
    
  
  
    
  | android { | |
| ... | |
| flavorDimensions "stage", "mode" | |
| productFlavors { | |
| dev { | |
| dimension "stage" | |
| versionCode 100 | |
| minSdkVersion 21 | |
| aaptOptions.cruncherEnabled = false | 
  
    
      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
    
  
  
    
  | /** | |
| * 위임 프로퍼티가 유용하게 사용되는 몇 가지 기능 | |
| * | |
| * by Lazy() | |
| * | |
| * '지연 초기화(Lazy Initialization)'는 프로퍼티의 초기화를 객체를 생성할 때 하지 않고 | |
| * 필요할 때 초기화하는 패턴이다. | |
| * | |
| * 예를 들어 객체 생성시 서버에 연결하고, 연결이 완료되면 데이터를 수신해서 | |
| * 프로퍼티에 값을 넣는 경우 | 
  
    
      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 kotlin.reflect.KProperty | |
| /** | |
| * 위임 프로퍼티란 | |
| * | |
| * 프로퍼티 필드에 접근하는 접근자 로직을 다른 객체에 맡기는 방식을 말한다. | |
| * 즉, 게터와 세터 메서드를 가지는 다른 객체를 만들어서 그 객채에 프로퍼티의 플드 접근로직을 위임하는 것. | |
| */ | |
| fun main(args: Array<String>) : Unit { | 
  
    
      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
    
  
  
    
  | package my.demo | |
| import java.util.* | |
| /** | |
| * `downTo`, `step`, `until` 등은 모두 일반 메서드이고, `중위 호출(Infix Calls)`이라는 방식을 사용하기 때문에 | |
| * 일반 함수 호출과 달리 키워드 처럼 사용할 수 있다. | |
| * 중위 호출 이란 매개변수가 하나뿐인 메서드를 호출할 때 간단하게 호출 할 수 있게 하기 위한 방법 | |
| * 함수 선언 앞에 `infix`라는 키워드를 붙여 선언하면 사용 할 수 있다. | |
| */ | 
  
    
      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
    
  
  
    
  | package my.demo | |
| fun isLetter(c: Char) = c in 'a'..'z' || c in 'A'..'Z' | |
| fun isNotDigit(c: Char) = c !in '0'..'9' | |
| fun main(args: Array<String>): Unit { | |
| var x = 10 | |
| val oneToTen: IntRange = 1..10 | |
| println(oneToTen) | 
  
    
      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
    
  
  
    
  | package my.demo | |
| fun getMax(a: Int, b: Int): Int { | |
| var max = 0 | |
| if (a < b) max = b else max = a | |
| return max | |
| } | |
| fun getMaxShort(a: Int, b: Int): Int = if (a < b) b else a | 
NewerOlder