Die Suche ergab 72 Treffer

von ManuelWeiel
6. Feb 2017 14:29
Forum: Archiv
Thema: Exercise 10, Task 6.2 Motion-controlled Lights
Antworten: 3
Zugriffe: 609

Re: Exercise 10, Task 6.2 Motion-controlled Lights

andiderp hat geschrieben:Should the lights turn off after a specific amount of time?
create a timer with a delay of 100ms
von ManuelWeiel
6. Feb 2017 13:36
Forum: Archiv
Thema: Ex10 Task 6: "Overriding" traits does not work
Antworten: 5
Zugriffe: 708

Re: Ex10 Task 6: "Overriding" traits does not work

I will try to give a hint without spoiling the solution:

Try to think about what the

Code: Alles auswählen

abstract override def put(x: Int)
method from the stackable traits example would be in your case.
When do you want to run your code in e.g. FireAlarm? Probably after "constructing" your house...
von ManuelWeiel
6. Feb 2017 10:49
Forum: Archiv
Thema: Exercise 10, Task 6.2 Motion-controlled Lights
Antworten: 3
Zugriffe: 609

Re: Exercise 10, Task 6.2 Motion-controlled Lights

Our motion detectors only report the position where they have sensed any motion last. This means, that the motion detectors don't report the time, when motion was detected, but only where motion was detected (the position). In this task you are supposed to turn on the lights when there was movement...
von ManuelWeiel
7. Dez 2016 11:07
Forum: Archiv
Thema: : vs : =>
Antworten: 1
Zugriffe: 416

Re: : vs : =>

=> String means that this parameter is passed by name . The following quote nicely summarises the difference: A parameter of type A acts like a val (its body is evaluated once, when bound) and one of type => A acts like a def (its body is evaluated whenever it is used). More details on this topic ca...
von ManuelWeiel
21. Nov 2016 16:55
Forum: Archiv
Thema: Exercise 2 2.6
Antworten: 7
Zugriffe: 332

Re: Exercise 2 2.6

Also these errors suggest, that something in the compiler got seriously messed up. Also it seems that you are using IntelliJ and there might be a problem with its incremental compiler. To be on the safe side run sbt clean and then sbt compile on the commandline to check that its not a problem with i...
von ManuelWeiel
21. Nov 2016 16:51
Forum: Archiv
Thema: Exercise 2 2.6
Antworten: 7
Zugriffe: 332

Re: Exercise 2 2.6

OK. So the Scala compiler does continue to compile even after errors, but errors might still "chain", so one error might cause others until the Scala compiler stops.

Fix the first error that appears first, and the other errors might "fix" themselves.
von ManuelWeiel
21. Nov 2016 16:21
Forum: Archiv
Thema: Exercise 2 2.6
Antworten: 7
Zugriffe: 332

Re: Exercise 2 2.6

Are there any other errors (especially might there be some in PerfSpec.scala)? Without seeing the code, I can otherwise not really tell what the problem might be. If you fail to determine the cause, you might DM me your current implementation and I can take a look.
von ManuelWeiel
21. Nov 2016 16:11
Forum: Archiv
Thema: Exercise 2 2.6
Antworten: 7
Zugriffe: 332

Re: Exercise 2 2.6

Can you supply me with the complete sbt compile error message?
von ManuelWeiel
21. Nov 2016 15:14
Forum: Archiv
Thema: SerializationMock
Antworten: 5
Zugriffe: 434

Re: SerializationMock

Looking at your current implementation, the issue is really the type signature of the serialize and deserialize methods. In your case the problem is more subtle though. You import import java.lang.Long . Without importing this, Long will default to the Scala version of a long. By using your import, ...
von ManuelWeiel
21. Nov 2016 14:37
Forum: Archiv
Thema: SerializationMock
Antworten: 5
Zugriffe: 434

Re: SerializationMock

Please DM me your implementation of your trait Serializer.
von ManuelWeiel
21. Nov 2016 14:29
Forum: Archiv
Thema: Ex 02 - Task 2.5 Runnable Test
Antworten: 6
Zugriffe: 602

Re: Ex 02 - Task 2.5 Runnable Test

The purpose of this task is not clear to me. Just writing some test objects with some combination of traits and a dummy call to measure are not that enlightening. In fact this only shows that objects with some combinations of the stackable traits are runable. To really use the framework one would n...
von ManuelWeiel
21. Nov 2016 14:21
Forum: Archiv
Thema: SerializationMock
Antworten: 5
Zugriffe: 434

Re: SerializationMock

On a first look, I would say, that you changed the signatures of serialize and deserialize in the Serializer trait, which you should avoid.
von ManuelWeiel
21. Nov 2016 12:22
Forum: Archiv
Thema: No exercise tomorrow
Antworten: 0
Zugriffe: 96

No exercise tomorrow

There will be no exercise on 22.11.
von ManuelWeiel
20. Nov 2016 17:54
Forum: Archiv
Thema: Exercise2 - Task2
Antworten: 1
Zugriffe: 327

Re: Exercise2 - Task2

That should depend on which traits are mixed in. The user should be able to decide...

Zur erweiterten Suche