prasanth7499's Profile

29
Points

Questions
0

Answers
14

  • val index = ss.sparkContext
        .parallelize(Seq((1,1), (2,0), (3,2), (4,0), (5,1)))
        .toDF("ID", "value")
    
    index.where($"value" === 0).select("ID").show()
    • 13768 views
    • 15 answers
    • 0 votes
  • db.inventory.insertMany([
    { item: “journal”, qty: 25, tags: [“blank”, “red”], dim_cm: [ 14, 21 ] },
    { item: “notebook”, qty: 50, tags: [“red”, “blank”], dim_cm: [ 14, 21 ] },
    { item: “paper”, qty: 100, tags: [“red”, “blank”, “plain”], dim_cm: [ 14, 21 ] },
    { item: “planner”, qty: 75, tags: [“blank”, “red”], dim_cm: [ 22.85, 30 ] },
    { item: “postcard”, qty: 45, tags: [“blue”], dim_cm: [ 10, 15.25 ] }
    ]);

    • 9232 views
    • 13 answers
    • 0 votes
  • if (userId == 'admin')
      userId = {'$regex': '.*.*'};
    User.where('status', 1).where('creator', userId);
    • 10501 views
    • 20 answers
    • 0 votes
  • Asked on January 28, 2019 in C#.
    Abstract Class Interface
    It contains both declaration and definition part. It contains only a declaration part.
    Multiple inheritance is not achieved by abstract class. Multiple inheritance is achieved by interface.
    It contain constructor. It does not contain constructor.
    It can contain static members. It does not contain static members.
    It can contain different types of access modifiers like public, private, protected etc. It only contains public access modifier because everything in the interface is public.
    The performance of an abstract class is fast. The performance of interface is slow because it requires time to search actual method in the corresponding class.
    It is used to implement the core identity of class. It is used to implement peripheral abilities of class.
    A class can only use one abstract class. A class can use multiple interface.
    If many implementations are of the same kind and use common behavior, then it is superior to use abstract class. If many implementations only share methods, then it is superior to use Interface.
    Abstract class can contain methods, fields, constants, etc. Interface can only contain methods .
    It can be fully, partially or not implemented. It should be fully implemented.
    • 10456 views
    • 18 answers
    • 0 votes