18 Matching Annotations
  1. Jan 2018
    1. git pushecho '// Now super fast' >> vendor/plugins/demo/lib/index.jsgit ci -am "[To backport] Faster plugin"date >> main-file-1git ci -am "Container-only work"date >> vendor/plugins/demo/fake-workdate >> main-file-2git ci -am "[To backport] Timestamping (requires container tweaks)"echo '// Container-specific' >> vendor/plugins/demo/lib/index.jsgit ci -am "Container-specific plugin update"

      In case you don't have the ci alias set:

      git push
      echo '// Now super fast' >> vendor/plugins/demo/lib/index.js
      git commit -am "[To backport] Faster plugin"
      date >> main-file-1
      git commit -am "Container-only work"
      date >> vendor/plugins/demo/fake-work
      date >> main-file-2
      git commit -am "[To backport] Timestamping (requires container tweaks)"
      echo '// Container-specific' >> vendor/plugins/demo/lib/index.js
      git commit -am "Container-specific plugin update"
      
    2. git push

      This didn't work. This did work:

      git push plugin master
      
    3. git merge -s subtree --squash \ plugin/master

      Needs to be:

      git merge -s subtree --squash plugin/master --allow-unrelated-histories
      

      to avoid

      fatal: refusing to merge unrelated histories
      

      git version 2.10.1

  2. Dec 2017
    1. “Faith requires the possibility of rejection, or it is not faith.”

      Actually, science requires the possibility of rejection, or it is not science.

    1. In general the way to get the best of both worlds is to rebase local changes you’ve made but haven’t shared yet before you push them in order to clean up your story, but never rebase anything you’ve pushed somewhere.

      Great summary

  3. Aug 2017
    1. The distinction between the binding environment and the enclosing environment is important for package namespaces.

      Um, gonna have to digest this package stuff.

    2. The enclosing environment determines how the function finds values; the binding environments determine how we find the function.

      Great summary.

    3. Each time you load a new package with library() it is inserted between the global environment and the package that was previously at the top of the search path.

      Boom, there's the stack!

    4. The parent of the global environment is the last package that you attached with library() or require().

      So library() or require() commands create a stack of environments, with globalenv() on top?

      In my head this helps explain why and how masking occurs.

    5. e$b <- e$d

      I think this is a misprint as the image that follows does not match. Should be

      e$a <- e$d
      
    6. e$b <- 1:3

      Same misprint as above (i.e. should be

      e$a <- 1:3
      

      unless the figure is modified.

  4. Jul 2017
    1. Subsequently, we store the chart on el, so we can access it later.

      Is it necessary to store the chart in el to access later? Wouldn't the chart variable already be accessible through the closure? See Tip 4 in Dean Attali's blog post.

    2. Note that we added a reference to underscore.

      If you're doing this by hand rather than from downloading their scripts, note that they changed convention here a bit from the gauge example - there are now subdirectories in lib for each javascript library.

    1. type: 'output'

      Would like to know what options there are for 'type'. I've only seen 'output'.

    2. Example 1

      Important for my brain to know that this example does not use htmlwidgets. This is built-in to Shiny through the session variable.

    1. You will also see things that you don’t like, either because its virtues are not obvious or it offends your sensibilities. Such code is nonetheless valuable, because it helps make concrete your opinions on good and bad code.

      Yep. All models are useful models - even "bad" ones.

  5. Jun 2017
    1. Of note, the yaml file is sensitive to the way you indent it, so make sure you use the correct number of spaces.

      Be careful! More specifically, the YAML file needs an empty line at the end with no indentation. RStudio automatically indents on carriage return. If you have this extra indentation in the last line, you may get the following warning message:

      Warning message:
      In readLines(input, encoding = "UTF-8") :
        incomplete final line found on '<home>/Library/R/3.3/library/C3/htmlwidgets/C3Gauge.yaml'
      
  6. May 2017
    1. The exports helps you avoid conflicts with other packages by specifying which functions are available outside of your package (internal functions are available only within your package and can’t easily be used by another package). Generally, you want to export a minimal set of functions; the fewer you export, the smaller the chance of a conflict.

      This reminds me of private functions and members of classes in OOP. An export in the case of a function in a package is making it public in the OOP sense.