sceptor
  • NEW!
    NEW!  Connect Ideas Across Notes
    Save time and share insights. With Paragraph Citation, you can quote others’ work with source info built in. If someone cites your note, you’ll see a card showing where it’s used—bringing notes closer together.
    Got it
      • Create new note
      • Create a note from template
        • Sharing URL Link copied
        • /edit
        • View mode
          • Edit mode
          • View mode
          • Book mode
          • Slide mode
          Edit mode View mode Book mode Slide mode
        • Customize slides
        • Note Permission
        • Read
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Write
          • Only me
          • Signed-in users
          • Everyone
          Only me Signed-in users Everyone
        • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invite by email
        Invitee

        This note has no invitees

      • Publish Note

        Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

        Your note will be visible on your profile and discoverable by anyone.
        Your note is now live.
        This note is visible on your profile and discoverable online.
        Everyone on the web can find and read all notes of this public team.

        Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

        Explore these features while you wait
        Complete general settings
        Bookmark and like published notes
        Write a few more notes
        Complete general settings
        Write a few more notes
        See published notes
        Unpublish note
        Please check the box to agree to the Community Guidelines.
        View profile
      • Commenting
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
        • Everyone
      • Suggest edit
        Permission
        Disabled Forbidden Owners Signed-in users Everyone
      • Enable
      • Permission
        • Forbidden
        • Owners
        • Signed-in users
      • Emoji Reply
      • Enable
      • Versions and GitHub Sync
      • Note settings
      • Note Insights New
      • Engagement control
      • Make a copy
      • Transfer ownership
      • Delete this note
      • Save as template
      • Insert from template
      • Import from
        • Dropbox
        • Google Drive
        • Gist
        • Clipboard
      • Export to
        • Dropbox
        • Google Drive
        • Gist
      • Download
        • Markdown
        • HTML
        • Raw HTML
    Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
    Create Create new note Create a note from template
    Menu
    Options
    Engagement control Make a copy Transfer ownership Delete this note
    Import from
    Dropbox Google Drive Gist Clipboard
    Export to
    Dropbox Google Drive Gist
    Download
    Markdown HTML Raw HTML
    Back
    Sharing URL Link copied
    /edit
    View mode
    • Edit mode
    • View mode
    • Book mode
    • Slide mode
    Edit mode View mode Book mode Slide mode
    Customize slides
    Note Permission
    Read
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Write
    Only me
    • Only me
    • Signed-in users
    • Everyone
    Only me Signed-in users Everyone
    Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    #### What is the difference between a value and a variable in programming? - [ ] A value is immutable, while a variable can be changed. - [ ] A value is a concrete instance of a data type, while a variable is a reference to a value. - [ ] A value is stored on the heap, while a variable is stored on the stack. - [ ] A value is a literal, while a variable is a name given to a value. - [ ] There is no difference between a value and a variable. #### What are the three main forms of version control? - [ ] Git, SVN, Mercurial - [ ] Local, Centralized, Distributed - [ ] RCS, CVS, Git - [ ] Branching, Merging, Committing - [ ] None of the above #### What is the primary purpose of coroutines in Kotlin? - [ ] To replace threads for concurrent programming - [ ] To simplify asynchronous programming - [ ] To create complex data structures - [ ] To optimize code performance - [ ] To define domain-specific languages #### What is the purpose of the @JvmName annotation in Kotlin? - [ ] To specify the name of a Java class generated from Kotlin code - [ ] To mark a Kotlin function as a Java static method - [ ] To enable Java interoperability with Kotlin default parameters - [ ] To indicate that a Kotlin class should be treated as a Java interface - [ ] To suppress warnings about potential compatibility issues with Java #### Which inline function in Kotlin returns the original object and uses the object as the receiver (this)? - [ ] run - [ ] apply - [ ] with - [ ] let - [ ] also #### Which inline function in Kotlin returns the last expression of the block and uses the object as the receiver (this)? - [ ] run - [ ] apply - [ ] with - [ ] let - [ ] also #### Which inline function in Kotlin returns the last expression of the block and uses the object as a parameter? - [ ] run - [ ] apply - [ ] with - [ ] let - [ ] also #### Which inline function in Kotlin returns the original object and uses the object as a parameter? - [ ] run - [ ] apply - [ ] with - [ ] let - [ ] also #### Which data structure is most suitable for storing key-value pairs and provides efficient lookups based on keys? - [ ] Array List - [ ] Linked List - [ ] Hash Map - [ ] Tree - [ ] Stack #### Which data structure is ideal for maintaining a sorted collection of elements? - [ ] Array List - [ ] Linked List - [ ] Hash Map - [ ] Tree - [ ] Stack #### Which data structure uses a hash function to determine the storage location of elements? - [ ] Array List - [ ] Linked List - [ ] Hash Map - [ ] Tree - [ ] Stack #### Which data structure is best suited for implementing a Last-In-First-Out (LIFO) behavior? - [ ] Array List - [ ] Linked List - [ ] Hash Map - [ ] Tree - [ ] Stack #### What is the primary difference between a reference and a pointer in programming? - [ ] References are used for primitive types, while pointers are used for objects. - [ ] References are pass-by-value, while pointers are pass-by-reference. - [ ] References cannot be null, while pointers can. - [ ] References are more efficient than pointers. - [ ] There is no difference between references and pointers. #### In C++, what does the `*` operator do when applied to a pointer? - [ ] It gets the address of the pointer variable itself. - [ ] It accesses the value stored at the memory location pointed to by the pointer. - [ ] It creates a new pointer variable. - [ ] It compares two pointers for equality. - [ ] It performs arithmetic operations on pointers. #### What is the purpose of the `&` operator in C++ when used with variables? - [ ] It dereferences a pointer to access the value it points to. - [ ] It gets the address of a variable in memory. - [ ] It creates a reference to a variable. - [ ] It performs a bitwise AND operation on two integers. - [ ] It declares a reference variable. #### Which of the following is NOT a valid reason to use a pointer in C++? - [ ] To create dynamic data structures - [ ] To pass large objects efficiently by reference - [ ] To directly manipulate memory addresses - [ ] To implement polymorphism - [ ] To access elements in an array #### Which Gradle file is responsible for configuring which modules are included in your project? - [ ] settings.gradle - [ ] build.gradle - [ ] app/build.gradle - [ ] gradle.properties - [ ] None of the above #### What is the main purpose of the build.gradle file in a Gradle project? - [ ] To define the project's dependencies - [ ] To configure the project's build tasks - [ ] To specify the project's version - [ ] To declare the project's plugins - [ ] All of the above #### Which of the following is NOT a typical task performed by a build system like Gradle? - [ ] Compiling source code - [ ] Running unit tests - [ ] Packaging the application - [ ] Deploying the application to a server - [ ] Generating documentation #### What is the primary advantage of using the Gradle wrapper in a project? - [ ] It simplifies the process of installing and managing Gradle versions. - [ ] It speeds up the build process by caching dependencies. - [ ] It allows you to use different Gradle versions for different projects. - [ ] It provides a graphical user interface for configuring Gradle builds. - [ ] It automatically generates build scripts for your project. #### Which of the following statements about nested classes in Kotlin is true? - [ ] Nested classes cannot access private members of the outer class. - [ ] Nested classes are always inner classes. - [ ] Nested classes can be declared outside of the outer class. - [ ] Nested classes are static by default. - [ ] Nested classes can access private members of the outer class. #### What is the key difference between an inner class and a nested class in Kotlin? - [ ] Inner classes can access private members of the outer class, while nested classes cannot. - [ ] Inner classes require an instance of the outer class to be created, while nested classes do not. - [ ] Inner classes are static by default, while nested classes are not. - [ ] Inner classes can be inherited from, while nested classes cannot. - [ ] There is no difference between inner classes and nested classes. #### What is the purpose of the `sealed` keyword when applied to a class in Kotlin? - [ ] To prevent the class from being inherited from outside the current file. - [ ] To make the class abstract. - [ ] To create a singleton object. - [ ] To define an interface. - [ ] To mark the class as deprecated. #### Which of the following is NOT a valid type of class in Kotlin? - [ ] Data class - [ ] Enum class - [ ] Sealed class - [ ] Abstract class - [ ] Friend class #### In the Observer pattern, what is the responsibility of the observer? - [ ] To register for events from the observable. - [ ] To notify the observable of changes. - [ ] To maintain a list of observers. - [ ] To update its state based on events from the observable. - [ ] To create and manage the observable object. #### What is the main benefit of using the Observer pattern in software design? - [ ] It promotes loose coupling between objects. - [ ] It simplifies the implementation of complex algorithms. - [ ] It improves code reusability. - [ ] It reduces memory usage. - [ ] It enhances code readability. #### What is the difference between static and dynamic typing in programming languages? - [ ] Static typing checks types at compile time, while dynamic typing checks types at runtime. - [ ] Static typing is more flexible, while dynamic typing is more strict. - [ ] Static typing is used in interpreted languages, while dynamic typing is used in compiled languages. - [ ] Static typing allows for implicit type conversions, while dynamic typing does not. - [ ] There is no difference between static and dynamic typing. #### What is the purpose of the companion object in Kotlin classes? - [ ] To create a singleton instance of the class. - [ ] To define extension functions for the class. - [ ] To group static members of the class. - [ ] To implement interfaces for the class. - [ ] To provide default values for class properties. #### What is the main advantage of using the Model-View-ViewModel (MVVM) architectural pattern in Android development? - [ ] It simplifies the implementation of complex UI interactions. - [ ] It improves the performance of the application. - [ ] It reduces the amount of boilerplate code needed for UI updates. - [ ] It enhances the testability of the UI logic. - [ ] It eliminates the need for data binding. #### What is the purpose of the suspend keyword in Kotlin coroutines? - [ ] To mark a function as asynchronous and allow it to be paused and resumed. - [ ] To indicate that a function should run on a background thread. - [ ] To create a new coroutine scope. - [ ] To handle exceptions thrown by coroutines. - [ ] To define a lambda function that can be executed as a coroutine. # Answers <details> <summary>Click here to see the answers</summary> What is the difference between a value and a variable in programming? [x] A value is immutable, while a variable can be changed. What are the three main forms of version control? [x] Local, Centralized, Distributed What is the primary purpose of coroutines in Kotlin? [x] To simplify asynchronous programming What is the purpose of the @JvmName annotation in Kotlin? [x] To specify the name of a Java class generated from Kotlin code Which inline function in Kotlin returns the original object and uses the object as the receiver (this)? [x] apply Which inline function in Kotlin returns the last expression of the block and uses the object as the receiver (this)? [x] run Which inline function in Kotlin returns the last expression of the block and uses the object as a parameter? [x] let Which inline function in Kotlin returns the original object and uses the object as a parameter? [x] also Which data structure is most suitable for storing key-value pairs and provides efficient lookups based on keys? [x] Hash Map Which data structure is ideal for maintaining a sorted collection of elements? [x] Tree Which data structure uses a hash function to determine the storage location of elements? [x] Hash Map Which data structure is best suited for implementing a Last-In-First-Out (LIFO) behavior? [x] Stack What is the primary difference between a reference and a pointer in programming? [x] References cannot be null, while pointers can. In C++, what does the * operator do when applied to a pointer? [x] It accesses the value stored at the memory location pointed to by the pointer. What is the purpose of the & operator in C++ when used with variables? [x] It gets the address of a variable in memory. Which of the following is NOT a valid reason to use a pointer in C++? [x] To implement polymorphism Which Gradle file is responsible for configuring which modules are included in your project? [x] settings.gradle What is the main purpose of the build.gradle file in a Gradle project? [x] All of the above Which of the following is NOT a typical task performed by a build system like Gradle? [x] Deploying the application to a server What is the primary advantage of using the Gradle wrapper in a project? [x] It simplifies the process of installing and managing Gradle versions. Which of the following statements about nested classes in Kotlin is true? [x] Nested classes can access private members of the outer class. What is the key difference between an inner class and a nested class in Kotlin? [x] Inner classes require an instance of the outer class to be created, while nested classes do not. What is the purpose of the sealed keyword when applied to a class in Kotlin? [x] To prevent the class from being inherited from outside the current file. Which of the following is NOT a valid type of class in Kotlin? [x] Friend class In the Observer pattern, what is the responsibility of the observer? [x] To update its state based on events from the observable. What is the main benefit of using the Observer pattern in software design? [x] It promotes loose coupling between objects. What is the difference between static and dynamic typing in programming languages? [x] Static typing checks types at compile time, while dynamic typing checks types at runtime. What is the purpose of the companion object in Kotlin classes? [x] To group static members of the class. What is the main advantage of using the Model-View-ViewModel (MVVM) architectural pattern in Android development? [x] It enhances the testability of the UI logic. What is the purpose of the suspend keyword in Kotlin coroutines? [x] To mark a function as asynchronous and allow it to be paused and resumed. </details>

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully