Issue Tracking, Github, Javascript




CS174

Chris Pollett

Oct 31, 2022

Outline

Issue Tracking

GitHub

Getting started with GitHub

GitHub Work Flows

GitHub Work Details -- Getting a copy

  • In details what happens is that clicking fork gives you a copy in your user account space of that repository. For example, the original repository might have been:
    https://github.com/ORIGINAL_USERNAME/PROJECT.git
    your fork will be
    https://github.com/YOUR_USERNAME/PROJECT.git
  • To get a copy on your laptop of your fork, you just clone that address:
    git clone https://github.com/YOUR_USERNAME/PROJECT.git
    
  • To make sure you can stay in sync with the original repository we need to add an upstream source for our clone:
    git remote add upstream https://github.com/ORIGINAL_USERNAME/PROJECT.git
    
  • For git push and other commands that affect the code on GitHub to work, since about 2020, you need to configure a GitHub token. Under you account settings, scroll down to developer settings, then go to personal access tokens to generate a token. The token is then used in the urls connected with the project we showed before in the format:
    https://GITHUB_ACCESS_TOKEN@github.com/YOUR_USERNAME/PROJECT.git
    
    I.e., this is what you should set your remote.origin.url equal to.
  • GitHub Work Details -- Working locally, Synchronization, Pull Requests

    Quiz

    Which of the following statements is true?

    1. PHP Traits are similar to Java Threads.
    2. composer is a software tool to do issue tracking for PHP libraries.
    3. To get changes from one git repository into another we might use the command git pull.

    Javascript

    We now want to consider adding dynamic behaviors to our websites as they are interacted with on the client-side. To do this, we will use the Javascript language.

    Uses of Javascript

    General Overview

    Lexicon

    Example Javascript and HTML document

    <html>
    <head><title>test</title>
    <meta name="description" value="this example illustrates how Javascripts are 
        executed both when the document is loaded and on the occurrence of events" />
    <script type="text/javascript" >
       function sayHello()
       {
          alert("hi there");
       } 
    </script>
    </head><body><form><input type="button" value="test" onclick="return sayHello();" 
    /><!-- responds to events --></form>
    <script type="text/javascript" >
    for( i = 0; i<100; i++) { 
        document.writeln("<p>hi"+i+"</p>");
    } // run when document loads
    </script></body>
    </html>
    
    

    Primitives

    Variables and Constants

    Numeric Operators and Objects

    Strings and Type Conversion