25 Matching Annotations
  1. Mar 2020
    1. #define

      https://gcc.gnu.org/onlinedocs/gcc-2.95.3/cpp_1.html#SEC10

      Section 1.4.1 Simple Macros

      A simple macro is a kind of abbreviation. It is a name which stands for a fragment of code. Some people refer to these as manifest constants.

      Before you can use a macro, you must define it explicitly with the #define directive. #define is followed by the name of the macro and then the code it should be an abbreviation for. For example,

      #define BUFFER_SIZE 1020

      defines a macro named BUFFER_SIZE as an abbreviation for the text 1020. If somewhere after this #define directive there comes a C statement of the form <br> foo = (char *) xmalloc (BUFFER_SIZE);

      then the C preprocessor will recognize and expand the macro BUFFER_SIZE, resulting in

      foo = (char *) xmalloc (1020);

  2. Jan 2019
    1. Canvas

      "The Canvas API provides a means for drawing graphics via JavaScript and the HTML <canvas> element. Among other things, it can be used for animation, game graphics, data visualization, photo manipulation, and real-time video processing. The Canvas API focuses on 2D graphics."

  3. Oct 2018
  4. Jun 2018
  5. Dec 2017
    1. The following code
      function wrapValue(n) { // function 'wrapValue is declared. Parameter is the variable 'n'.
        var localVariable = n; // variable 'localVariable' is declared. Value of 'localVariable' equal to variable 'n'.
        return function() { return localVariable; }; // the function and parameter becomes wrapValue(wrapValue(n)).
      }
      
      var wrap1 = wrapValue(1); // function call in parameter, so local variable recreated.
      var wrap2 = wrapValue(2); // same as above.
      console.log(wrap1()); // variable 'wrap1' is called as a function.
      // → 1
      console.log(wrap2()); // same as above.
      // → 2
      
    2. this rather nonsensical function

      Comments added, with one parameter value changed.

      var landscape = function() {
        /*the variable 'landscape' has been defined
        as a function()*/
        var result = "";
        /*the variable 'result' has been defined
        with an empty string "", presumably to be
        filled later.*/
        var flat = function(size) {
          /*the variable 'flat has been defined
          as a function(size), where 'size' is the
          function's parameter.*/
          for (var count = 0; count < size; count++)
            result += "_";
          /*this 'for' loop continues as long as the
          variable 'count' is less than the function
          parameter 'size'. The variable 'result'
          adds the string "_" in every loop.
      
          The function parameter 'size' is decided
          below where variables 'flat' and 'mountain'
          are called multiple times, each time with
          a different value for parameter 'size'.*/
        };
        var mountain = function(size) {
          result += "/";
          /*this function starts the same way each
          time by representing the left side of the
          mountain with "/".*/
          for (var count = 0; count < size; count++)
            result += "'";
          /*This 'for' loop for function 'mountain'
          behaves the same as function 'flat', only
          attaching a different string to variable
          'result'.*/
          result += "\\";
          /*this function ends the same way each time
          by representing the right side of the
          mountain with "\". For this string to be
          visible, it must be entered as "\\".*/
        };
      
        flat(3);
        mountain(0);
        flat(6);
        mountain(1);
        flat(1);
        return result;
        /*This return statement stops the execution
        of function 'landscape' and returns values
        from the functions called above.
      
        It is not totally clear to me why the two
        sub-functions have no return statements.*/
      };
      
      console.log(landscape());
      /*Though no parameters are defined for
      function 'landscape', empty parantheses ()
      are still required.*/
      
  6. Nov 2017
    1. If producing budget surpluses becomes the economic goal enshrined by law to be achieved, come what may, actions taken to achieve that could dampen economic activities within the system (the country) to the extent that government revenues would drop by more than the money it saves through cutting its spending, consequently increasing government debt rather than reducing it.

      Any examples of this happening?

  7. Oct 2017
    1. they don’t know if what they’re turning in is good, not so good, or what they were supposed to do.

      You know, if I'm taking student's work -- be it an assessment, answers to questions or a piece of writing -- I would like to know how confident students feel about their work.

    1. “Montessori materials are designed so that the child receives instant feedback as he works, allowing him to recognize, correct, and learn from his mistakes without adult assistance. Putting control of the activity in the child’s hands strengthens his self-esteem and self-motivation as well as his learning.”

      This explains why so much emphasis is put on the (expensive) materials.

    1. Materials are not manufactured in a factory (or shouldn't be) and are made with enormous quality of care. Materials avoid plastic, thereby often defaulting to wood.

      I can see why this is ideal, but I'm not sure why it would be absolutely critical.

  8. Sep 2017
    1. This requires the teacher getting to know his or her students well and becoming proficient at the process of both formal and informal functional behavioral assessment and analysis which is discussed in detail in another section of Special Connections.

      How does this apply to me, as a teacher with 600 students and infrequent interaction with them?

    1. showing students the real value of their education

      A challenge. Young people are not particularly adept at recognizing long-term benefits, or overcoming the allure of impulsivity. Can we appeal to the real, and immediate, value of what we're doing in class?

    1. they need guidance but not sternness or punishment.

      For students who know nothing but punishment to this point... can we expect them to respond based on 'love, trust, and clear but kind leadership' alone?

    2. a chief reason why so many schools achieve so little education of value is that they already rely too much on coercion.

      I'm reading this with the definition of 'persuading someone to do something by using threats.'