Skip to content

Instantly share code, notes, and snippets.

object Main{
def main(args: Array[String]){
val sc = new java.util.Scanner(System.in)
val num = sc.nextInt
val board = List.fill(num)(sc.nextInt)
val count = 0
println(operate(board, count))
}
def operate(board: List[Int], count: Int):Int = {
if(board.forall(_ % 2 == 0)){
return diffval.`val`(0)
[error] /home/satoru/work/scala_test/animecut/src/main/scala/animecut.scala:44:20: identifier expected but 'val' found.
[error] return diffval.val(0)
[error] ^
val diffval:Scalar = Core.mean(diff)
return diffval.val(0)
const actions = {
update: (e) => state => {
state = {...state, oneProperty: e.target.value}
return {...state, anotherProperty: state.oneProperty.length}
}
}
const actions = {
update: (e) => state => {
updateInput(e)
return reCalculate()
},
updateInput: (e) => state => ({...state, oneProperty: e.target.value}),
reCalculate: () => state => ({...state, anotherProperty: state.oneProperty.length})
}
const actions = {
update: (e) => state => {
updateInput(e, state)
return reCalculate(state)
},
updateInput: (e, state) => ({...state, oneProperty: e.target.value}),
reCalculate: state => ({...state, anotherProperty: state.oneProperty.length})
}
class Chao:
r = "resources"
imgs = [os.path.join(r, "img{0:02}.jpg".format(x)) for x in range(10)]
NameError: name 'r' is not defined
othersMovement.append(list(map(int, map(float, row)))) # that's why I hate Python.