juan_gandhi: (Default)
[personal profile] juan_gandhi
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
def retrieveProps(c: Container, file: String) {
  val prop = new {
    def apply(key: String) = c.getPropertyOrFail(key,
      throw new IllegalArgumentException(
         "missing " + key + " in " + file)).getValue
  }

  val name = prop("username")
  val pass = prop("password")
  val db   = prop("database")
}

Date: 2012-05-03 06:09 am (UTC)
From: [identity profile] ivan-gandhi.livejournal.com
Нет, ну в тексте, откуда это приползло, у меня просто функция.

Profile

juan_gandhi: (Default)
Juan-Carlos Gandhi

July 2025

S M T W T F S
  12345
6789 1011 12
13141516171819
20212223242526
2728293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 13th, 2025 04:04 pm
Powered by Dreamwidth Studios