ποΈ
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
object StructuringInformation{ | |
sealed trait Calendar | |
case object months extends Calendar | |
case object weeks extends Calendar | |
case object days extends Calendar | |
def getme(calendar:Calendar): Any={ | |
calendar match { |
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
object loops { | |
def isEven(number: Int) = number % 2 == 0 | |
def main(args: Array[String]): Unit = { | |
val list = List(1, 2, 3, 4, 5) | |
list.foreach(x => if(isEven(x)) println(x) ) | |
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
object Main extends App { | |
AvoidLosingGenericType.run() | |
AvoidMatchingOnGenericTypeParams.run() | |
TypeableExample.run() | |
TypeTagExample.run() | |
} | |
class Funky[A, B](val foo: A, val bar: B) { | |
override def toString: String = s"Funky($foo, $bar)" | |
} |
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
object CalcExample extends App{ | |
trait calculate[T]{ | |
def calc(a:T,b:T)(c:String):T | |
} |
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 part1Recap | |
import akka.actor.typed.{ActorSystem, Behavior} | |
import akka.actor.typed.scaladsl.Behaviors | |
object ActorCalcApp { | |
sealed trait calculator | |
case class calc[T](a:T,b:T,action:String) extends calculator |
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
#include <stdio.h> | |
int main(){ | |
int x = 10; | |
int y =x++; | |
//int arra[] ={1,-29,8,5,-29,6};s | |
int arra[] ={1,2,3,4,7}; | |
printf("belong %d",hasStringMode(arra)); | |
return 1; |
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 kodeinc | |
import akka.actor.typed.{ActorRef, ActorSystem, Behavior} | |
import akka.actor.typed.scaladsl.Behaviors | |
import java.util | |
object akkaCalc { | |
sealed trait Response | |
case class error(errorCode:String,msg:String) extends Response |
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
#include <stdio.h> | |
int main(){ | |
printf("Get the Result"); | |
int record[] = {7,6,10}; | |
//int record[] = {3,7,0,8,0,5}; | |
int result = isMera(record,3); | |
printf("......%d",result); | |
return 1; | |
} |
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
#include <stdio.h> | |
int main(){ | |
//int n[]={100,19,131,140}; | |
//int n[]={200,1,151,160}; | |
int n[]={200,10,151,160}; | |
printf("Blessed \n "); | |
int value = evenSpaced(n,4); | |
printf("result : %d \n",value); |
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 kodeinc | |
import akka.NotUsed | |
import akka.actor.typed.{ActorRef, ActorSystem, Behavior, Terminated} | |
import akka.actor.typed.scaladsl.Behaviors | |
import java.net.URLEncoder | |
import java.nio.charset.StandardCharsets |
OlderNewer