Notes, summaries, assignments, exams, and exercises for Computer science for Other courses

TD MyAdvantage: Trip Management and Activation Steps

Computer science3.61 KB

Trip Details

  • On the Trip Details screen, you can view the specifics of your trip.
  • After reviewing the star rating, click View map and 3 events to see specific trip events.
  • The yellow icon on the map indicates a medium-severity event that impacted your trip score.
  • Click on an event to see more details.

Declining a Trip

  • Select Trips to Review.
  • Select Review for the trip you wish to address.
  • If you were not the driver for this trip, select No.
  • You have successfully declined the trip.

Accepting a Trip

  • From the TD MyAdvantage Dashboard, click Trips to Review.
  • Select Review for the trip you would like to process.
  • If you were the driver for this trip, select Yes.
  • You have successfully accepted the trip.

Activating on an iOS Device

  • To begin, select Activate from the
...
Continue reading "TD MyAdvantage: Trip Management and Activation Steps" »

Mastering Constructors and Java Access Specifiers

Computer science3 KB

What is a Constructor?

A constructor is a special member function of a class that is automatically invoked when an object of the class is created. Its main purpose is to initialize the data members of the class. In C#, a constructor has the same name as the class and does not have any return type, not even void.

Characteristics of a Constructor

  • Same name as class: The constructor name must be exactly the same as the class name.
  • No return type: Constructors do not return any value.
  • Automatically called: It is invoked automatically when an object of the class is created.
  • Used for initialization: Constructors initialize data members and allocate resources.
  • Can be overloaded: Multiple constructors can exist in a class with different parameters.
  • Default
...
Continue reading "Mastering Constructors and Java Access Specifiers" »

Python String Methods and Iteration Techniques

Computer science4.56 KB

Essential Python String Manipulation Methods

1. strip()

  • Purpose: Removes any leading (start) and trailing (end) whitespace or specified characters from a string.
  • Example: " hello ".strip() → "hello"
  • Use Case: Useful for cleaning input data.

2. ljust(width)

  • Purpose: Left-justifies the string in a field of given width, padding with spaces on the right.
  • Example: "Hi".ljust(5) → "Hi "
  • Use Case: Formatting output neatly.

3. rindex(substring)

  • Purpose: Returns the last occurrence index of the given substring in the string. Raises an error if the substring is not found.
  • Example: "hello world".rindex("o") → 7
  • Use Case: Finding positions of characters or words starting from the end of the string.

4. isspace()

  • Purpose: Returns True if the string contains
...
Continue reading "Python String Methods and Iteration Techniques" »

Managing Uncertainty in AI and Cognitive Computing

Computer science273.79 KB

Understanding Uncertainty in Artificial Intelligence

Uncertainty arises when we are not 100% sure about the outcome of decisions. It appears in cases where conditions are neither completely true nor completely false.

Sources of Uncertainty in AI

  • Uncertain Data: Occurs when data is missing, noisy, inconsistent, ambiguous, or based on expert guesses.
  • Uncertain Knowledge: Occurs when knowledge has multiple causes/effects or causality is incomplete.

Reasons for Uncertainty

  • Partially observable environments: For example, hidden cards in a game.
  • Dynamic environments: Such as rapidly changing technology.
  • Incomplete agent knowledge: For example, unpredictable consequences.
  • Inaccessible environments: Such as unseen global events.

Ways to Handle Uncertainty

Uncertainty...

Continue reading "Managing Uncertainty in AI and Cognitive Computing" »

Core Web Development Concepts: Languages, Protocols, and Frameworks

Computer science332.62 KB

JavaScript: The Heart of Interactive Web Development

JavaScript is a powerful and widely used programming language mainly used for making websites interactive and dynamic. It works on the client-side, which means it runs inside the user's web browser. JavaScript allows web pages to respond to user actions like clicking buttons, typing in text boxes, hovering over images, and more. It works together with HTML (for structure) and CSS (for design) to build modern and user-friendly websites. It is easy to learn and used by almost every website today.

Apart from the client-side, JavaScript is also used on the server-side using platforms like Node.js, which allows building full web applications using JavaScript alone. It is a platform-independent language,...

Continue reading "Core Web Development Concepts: Languages, Protocols, and Frameworks" »

Understanding Servlet Architecture for Java Web Apps

Computer science3.4 KB

Understanding Servlet Architecture for Java Web Applications

Servlet architecture is a core component of Java EE (Enterprise Edition) used for building dynamic web applications. A Servlet is a Java class that runs on a web server and acts as a middle layer between client requests (typically from a browser) and server responses (usually from a database or application logic).

What is a Servlet?

A Servlet is a Java class used to handle HTTP requests and responses in web applications. It runs on a server, receives requests from a client (usually a browser), processes them (e.g., reads form data, interacts with a database), and sends back a dynamic response (like HTML or JSON).

Key Components of Servlet Architecture

  • Client (Browser): Sends an HTTP request
...
Continue reading "Understanding Servlet Architecture for Java Web Apps" »

Ethereum Technical Deep Dive: Accounts, Smart Contracts, and PoS Consensus

Computer science5.4 KB

This educational resource details Ethereum, a decentralized blockchain platform launched in 2015, focusing on its key features, accounts, smart contracts, transactions, and consensus mechanisms.

Ethereum Fundamentals

Ethereum is a blockchain platform that supports smart contracts—immutable computer programs executed on the Ethereum Virtual Machine (EVM). It uses Ether (ETH) as its native cryptocurrency to pay for transaction processing and smart contract execution.

Ethereum Accounts and Wallets

Account Types

  • Externally-Owned Accounts (EOAs): Controlled by private keys, used primarily for transactions like ETH transfers. Public keys are derived using Elliptic Curve Cryptography (ECC).
  • Contract Accounts: Controlled by smart contract code, deployed
...
Continue reading "Ethereum Technical Deep Dive: Accounts, Smart Contracts, and PoS Consensus" »

Programming Language Fundamentals: Core Concepts

Computer science7.28 KB


1. Why Study Programming Language Concepts?

  • Expressiveness: Leverage diverse language features

  • Selection: Match language to task (e.g., LISP for AI, PHP for web)

  • Learning: Foundations ease uptake of new languages

  • Efficiency: Choose constructs (recursion vs. iteration) for performance

  • Maintenance: Better code reuse and understanding


2. Programming Domains and Typical Languages

DomainFocusLanguage Example
ScientificFloating-point computationsFortran
BusinessReports, decimals, textCOBOL
Artificial IntelligenceSymbolic processing, linked listsLISP/Prolog
SystemsEfficiency, low-level controlC
WebMarkup, scripting, general-purposeHTML/JS/PHP/Java

3. Language Categories

  • Imperative: Variables + assignment + iteration (C, Java, Python, Perl)

  • Functional: Computation

...

Continue reading "Programming Language Fundamentals: Core Concepts" »

Soft Computing Fundamentals: Algorithms and Networks

Computer science20.54 KB

Characteristics of Soft Computing

  • Biological Inspiration: Soft computing often draws inspiration from natural processes, such as the human brain (neural networks) and evolution (genetic algorithms).
  • Human Expertise: It can incorporate human knowledge and expertise in the form of fuzzy rules or initial model structures.
  • Model-Free Learning: Many soft computing methods, like neural networks, can build models directly from data without requiring explicit mathematical formulations.
  • Fault Tolerance: Some soft computing systems, like neural networks and fuzzy systems, can continue to function even if parts of the system fail.
  • Goal-Driven: Soft computing aims to achieve specific goals, and the path to the solution is less critical than reaching a satisfactory
...
Continue reading "Soft Computing Fundamentals: Algorithms and Networks" »

Operating System Principles and Process Scheduling

Computer science810.17 KB

Core Objectives of an Operating System

  • Convenience: The OS makes the computer more convenient to use by providing an interface between the user and the hardware. It allows users to execute programs easily without knowing low-level hardware details.
  • Efficiency: The OS manages resources like CPU, memory, and I/O efficiently to optimize performance. It ensures that resources are utilized effectively, reducing idle time and maximizing throughput.
  • Ability to Evolve: The OS is designed to allow the development, testing, and introduction of new system functions without interfering with existing services. This allows the OS to adapt to changing user needs and hardware advancements.

Process Definition and Memory Structure

A process is a program in execution....

Continue reading "Operating System Principles and Process Scheduling" »