
[
  {
    "id": 213,
    "question": "Words ORDER BY in the SQL operator",
    "description": null,
    "answers": {
      "answer_a": "eliminates all repeated rows from the result set",
      "answer_b": "allows you to combine the results of individual queries across multiple tables into a single result table",
      "answer_c": "converts the value of a column or function to a different type",
      "answer_d": "changes the order of output rows",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "true",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": "answer_a",
    "explanation": null,
    "tip": null,
    "tags": [
      {
        "name": "MySQL"
      }
    ],
    "category": "SQL",
    "difficulty": "Easy"
  },
  {
    "id": 7697,
    "question": "Which syntax extracts the first 5 characters of a string stored in `str`?",
    "description": "Understanding substring extraction in Bash.",
    "answers": {
      "answer_a": "${str:0:5}",
      "answer_b": "substr($str, 0, 5)",
      "answer_c": "cut -c 1-5 $str",
      "answer_d": "echo $str | head -c5",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "The `${variable:start:length}` syntax extracts substrings in Bash.",
    "tip": null,
    "tags": [
      {
        "name": "BASH"
      }
    ],
    "category": "bash",
    "difficulty": "Easy"
  },
  {
    "id": 3104,
    "question": "Which command is used to list all files and directories in the current directory?",
    "description": "Listing files and directories helps to see the contents of the current location in the file system.",
    "answers": {
      "answer_a": "Run 'ls'",
      "answer_b": "Use 'dirlist'",
      "answer_c": "Type 'showfiles'",
      "answer_d": "Run 'files_list'",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "To list all files and directories in the current directory, use the 'ls' command.",
    "tip": null,
    "tags": [
      {
        "name": "Ubuntu"
      }
    ],
    "category": "Linux",
    "difficulty": "Easy"
  },
  {
    "id": 9869,
    "question": "Your team is developing a React component library to be used across multiple projects. Which development approach would ensure the most consistent and reusable components?",
    "description": "Establishing effective patterns for building reusable React component libraries.",
    "answers": {
      "answer_a": "Let each developer create components in their own style",
      "answer_b": "Implement a component-driven development approach with design tokens and composition patterns",
      "answer_c": "Copy components from popular libraries and modify them",
      "answer_d": "Create one large component per page",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "A component-driven development approach with design tokens and composition patterns ensures consistent, reusable components. Design tokens (variables for colors, spacing, etc.) maintain visual consistency. Composition patterns (like Compound Components or Render Props) create flexible, reusable interfaces. This methodology encourages building small, focused components that can be combined in various ways, testing components in isolation, and documenting usage patterns clearly, resulting in a more maintainable and consistent component library across projects.",
    "tip": null,
    "tags": [
      {
        "name": "React"
      }
    ],
    "category": "React",
    "difficulty": "Medium"
  },
  {
    "id": 6475,
    "question": "Which lifecycle hook is ideal for setting up non-reactive data in Vue?",
    "description": "Learning when to set up non-reactive data in Vue components.",
    "answers": {
      "answer_a": "beforeCreate()",
      "answer_b": "mounted()",
      "answer_c": "updated()",
      "answer_d": "destroyed()",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "'beforeCreate()' is the ideal lifecycle hook to set up non-reactive data before Vue has fully initialized reactivity.",
    "tip": null,
    "tags": [
      {
        "name": "VueJS"
      }
    ],
    "category": "VueJS",
    "difficulty": "Easy"
  },
  {
    "id": 1921,
    "question": "What does the 'active_count()' function in the threading module return?",
    "description": "The 'active_count()' function is used to find the number of threads currently running.",
    "answers": {
      "answer_a": "The number of active locks",
      "answer_b": "The number of threads currently alive",
      "answer_c": "The number of terminated threads",
      "answer_d": "The number of daemons",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "The 'active_count()' function in the threading module returns the number of threads currently alive, which is useful for monitoring thread activity.",
    "tip": null,
    "tags": [
      {
        "name": "Python"
      }
    ],
    "category": "Code",
    "difficulty": "Medium"
  },
  {
    "id": 9483,
    "question": "How can you define a one-to-one relationship in Laravel Eloquent?",
    "description": "Test understanding of defining one-to-one relationships between Eloquent models.",
    "answers": {
      "answer_a": "hasOne",
      "answer_b": "belongsTo",
      "answer_c": "hasMany",
      "answer_d": "hasOneOrMany",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "In Laravel Eloquent, a one-to-one relationship is defined using the 'hasOne' method.",
    "tip": "Use one-to-one relationships to establish connections where each record in the table is associated with only one record in another table.",
    "tags": [
      {
        "name": "Undefined"
      }
    ],
    "category": "Laravel",
    "difficulty": "Easy"
  },
  {
    "id": 1694,
    "question": "What is the return value of the '__enter__' method typically used for?",
    "description": "The value returned by '__enter__' can be assigned to a variable in the 'with' statement.",
    "answers": {
      "answer_a": "It must always return 'None'",
      "answer_b": "It is used to pass an object to the 'as' clause of the 'with' statement",
      "answer_c": "It returns the exception encountered",
      "answer_d": "It initializes the '__exit__' method",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "The '__enter__' method can return an object, which will be assigned to the variable in the 'as' clause of the 'with' statement.",
    "tip": null,
    "tags": [
      {
        "name": "Python"
      }
    ],
    "category": "Code",
    "difficulty": "Medium"
  },
  {
    "id": 2709,
    "question": "How do you handle nested writable relationships in a DRF serializer?",
    "description": "Nested writable relationships allow you to create or update related objects in a single request.",
    "answers": {
      "answer_a": "Use the NestedSerializer and override the create() and update() methods",
      "answer_b": "Use the ForeignKeySerializer",
      "answer_c": "Set the writable=True attribute in the field",
      "answer_d": "Use the @writable_nested decorator",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "To handle nested writable relationships, use a serializer for the related object and override the create() and update() methods to properly handle the nested data.",
    "tip": null,
    "tags": [
      {
        "name": "Django"
      }
    ],
    "category": "Django",
    "difficulty": "Medium"
  },
  {
    "id": 2016,
    "question": "What is the purpose of the 'defaultdict' class in the 'collections' module?",
    "description": "'defaultdict' is a subclass of Python's standard dictionary.",
    "answers": {
      "answer_a": "It allows for keys to be automatically sorted",
      "answer_b": "It provides a default value for non-existent keys",
      "answer_c": "It prevents duplicate keys from being added",
      "answer_d": "It enables the dictionary to be immutable",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "The 'defaultdict' class provides a default value for keys that do not exist, eliminating the need to handle 'KeyError' exceptions.",
    "tip": null,
    "tags": [
      {
        "name": "Python"
      }
    ],
    "category": "Code",
    "difficulty": "Medium"
  },
  {
    "id": 7690,
    "question": "Which method correctly allows handling function failures with retry logic?",
    "description": "Understanding how to implement retry mechanisms in Bash.",
    "answers": {
      "answer_a": "for i in {1..5}; do my_function && break || sleep 2; done",
      "answer_b": "repeat my_function 5",
      "answer_c": "retry my_function 5",
      "answer_d": "while ! my_function; do sleep 2; done",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "Using a loop with retry logic ensures the function is reattempted on failure.",
    "tip": null,
    "tags": [
      {
        "name": "BASH"
      }
    ],
    "category": "bash",
    "difficulty": "Hard"
  },
  {
    "id": 1461,
    "question": "What does the 'functools.lru_cache' decorator do?",
    "description": "The 'lru_cache' decorator is used to cache function results for improved performance.",
    "answers": {
      "answer_a": "It limits the number of arguments a function can accept",
      "answer_b": "It stores the results of expensive function calls",
      "answer_c": "It adds logging to a function",
      "answer_d": "It makes the function asynchronous",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "The 'functools.lru_cache' decorator caches the results of function calls to speed up subsequent calls with the same arguments.",
    "tip": null,
    "tags": [
      {
        "name": "Python"
      }
    ],
    "category": "Code",
    "difficulty": "Medium"
  },
  {
    "id": 9786,
    "question": "When should you use Django's signals?",
    "description": "Understanding the scenarios where Django signals are beneficial.",
    "answers": {
      "answer_a": "To handle asynchronous tasks",
      "answer_b": "For decoupling components within an application",
      "answer_c": "To define URL patterns",
      "answer_d": "For managing database migrations",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "Django signals are used for decoupling components and allowing loosely-coupled applications.",
    "tip": "Signals are useful for triggering actions based on certain events without directly coupling components.",
    "tags": [
      {
        "name": "Undefined"
      }
    ],
    "category": "Django",
    "difficulty": "Easy"
  },
  {
    "id": 9846,
    "question": "In a React application using Context API, child components are re-rendering excessively when context values change. Which approach would best solve this problem?",
    "description": "Understanding Context API performance optimization in React.",
    "answers": {
      "answer_a": "Replace Context API with Redux",
      "answer_b": "Split context into smaller, more focused contexts and use memoization",
      "answer_c": "Wrap the entire application in React.memo",
      "answer_d": "Use class components instead of functional components",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "Splitting context into smaller, more focused contexts prevents unnecessary re-renders by ensuring components only subscribe to the specific data they need. This approach follows the principle of separation of concerns and minimizes the impact of context changes. Combined with memoization techniques like React.memo and useMemo, this strategy ensures components only re-render when their specific context values change, not when any part of a large context object is updated.",
    "tip": null,
    "tags": [
      {
        "name": "React"
      }
    ],
    "category": "React",
    "difficulty": "Hard"
  },
  {
    "id": 9935,
    "question": "A JavaScript application needs to implement complex asynchronous operations with proper error handling. Which pattern would be most maintainable?",
    "description": "Implementing robust asynchronous patterns in JavaScript.",
    "answers": {
      "answer_a": "Nest multiple callbacks with try/catch blocks",
      "answer_b": "Use async/await with try/catch in properly scoped functions",
      "answer_c": "Use setTimeout for all asynchronous operations",
      "answer_d": "Create a global error handler function",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "Async/await with properly scoped try/catch blocks provides the most maintainable approach to complex asynchronous operations. This pattern combines the readability of synchronous code with proper error handling boundaries. By creating appropriately scoped async functions, errors are contained and handled close to their source. This approach avoids callback hell, makes error flows explicit, enables proper stack traces for debugging, and allows for clean resource cleanup in finally blocks - all while maintaining code that reads like synchronous operations.",
    "tip": null,
    "tags": [
      {
        "name": "JavaScript"
      }
    ],
    "category": "Code",
    "difficulty": "Hard"
  },
  {
    "id": 1872,
    "question": "What is the main benefit of using the 'gc.unfreeze()' function?",
    "description": "Unfreezing previously frozen objects can restore normal garbage collection behavior.",
    "answers": {
      "answer_a": "It allows the garbage collector to resume collecting frozen objects",
      "answer_b": "It deletes all tracked objects",
      "answer_c": "It resets the garbage collection thresholds",
      "answer_d": "It stops all future garbage collection",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "The 'gc.unfreeze()' function allows the garbage collector to resume collecting objects that were previously frozen, restoring the normal behavior of the garbage collector.",
    "tip": null,
    "tags": [
      {
        "name": "Python"
      }
    ],
    "category": "Code",
    "difficulty": "Hard"
  },
  {
    "id": 7468,
    "question": "Which operator is used to check if a file descriptor is open?",
    "description": "Understanding how to verify open file descriptors in Bash.",
    "answers": {
      "answer_a": "[ -t 1 ]",
      "answer_b": "[ -open 1 ]",
      "answer_c": "[ -fd 1 ]",
      "answer_d": "[ -file 1 ]",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "`-t` checks if a file descriptor (e.g., stdout) is open.",
    "tip": null,
    "tags": [
      {
        "name": "BASH"
      }
    ],
    "category": "bash",
    "difficulty": "Medium"
  },
  {
    "id": 9101,
    "question": "Which PHP function allows implementing a custom session storage mechanism?",
    "description": "Understanding how to override PHP's default session storage.",
    "answers": {
      "answer_a": "session_register_handler()",
      "answer_b": "session_set_save_handler()",
      "answer_c": "session_store()",
      "answer_d": "set_session_storage()",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "false",
      "answer_b_correct": "true",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "The `session_set_save_handler()` function allows defining custom handlers for storing session data.",
    "tip": null,
    "tags": [
      {
        "name": "PHP"
      }
    ],
    "category": "Code",
    "difficulty": "Hard"
  },
  {
    "id": 568,
    "question": "Which of the following function returns a text in title case from a variable?",
    "description": null,
    "answers": {
      "answer_a": "ucwords($var)",
      "answer_b": ".ucword($var)",
      "answer_c": "toupper($var)",
      "answer_d": ".upper($var)",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": "answer_a",
    "explanation": null,
    "tip": null,
    "tags": [
      {
        "name": "PHP"
      }
    ],
    "category": "Code",
    "difficulty": "Medium"
  },
  {
    "id": 7767,
    "question": "How do you extract text between two words dynamically?",
    "description": "Understanding dynamic substring extraction in Bash.",
    "answers": {
      "answer_a": "echo \"$str\" | sed -n 's/.*start\\(.*\\)end.*/\\1/p'",
      "answer_b": "awk -F'start|end' '{print $2}' <<< \"$str\"",
      "answer_c": "cut -d'start' -f2 | cut -d'end' -f1",
      "answer_d": "extract_between($str, 'start', 'end')",
      "answer_e": null,
      "answer_f": null
    },
    "multiple_correct_answers": "false",
    "correct_answers": {
      "answer_a_correct": "true",
      "answer_b_correct": "false",
      "answer_c_correct": "false",
      "answer_d_correct": "false",
      "answer_e_correct": "false",
      "answer_f_correct": "false"
    },
    "correct_answer": null,
    "explanation": "Using `sed -n 's/.*start\\(.*\\)end.*/\\1/p'` extracts text between `start` and `end`.",
    "tip": null,
    "tags": [
      {
        "name": "BASH"
      }
    ],
    "category": "bash",
    "difficulty": "Hard"
  }
]