32 Matching Annotations
  1. Jan 2019
    1. Modifying Sequences With Functions Tidal comes into its own when you start building things up with functions which transform the patterns in various ways.

      Very important!

  2. Jun 2017
    1. npm install eslint-loader --save-dev

      Note, if you haven't already, you must install eslint,and babel-eslint alongside eslint-loader. Otherwise, you'll get an error from your npm start script.

      npm install eslint babel-eslint eslint-loader

    1. devServer.contentBase - Assuming you don't generate index.html dynamically and prefer to maintain it yourself in a specific directory, you need to point WDS to it. contentBase accepts either a path (e.g., 'build') or an array of paths (e.g., ['build', 'images']). This defaults to the project root.

      For situations where you don't want to generate index.html

    2. To get it to work, you have to install it first through npm install nodemon --save-dev. After that, you can make it watch webpack config and restart WDS on change. Here's the script if you want to give it a go:

      Force your dev environment to watch updates to your webpack config!

    3. If you access through http://localhost:8080/webpack-dev-server/, WDS provides status information at the top. If your application relies on WebSockets and you use WDS proxying, you need to use this particular url as otherwise WDS logic interferes.

      IMPORTANT CAVEAT - If using Websockets and WDS proxying take note!

    4. HMR allows patching the browser state without a full refresh making it particularly handy with libraries like React where a refresh blows away the application state. The Hot Module Replacement appendix covers the feature in detail.

      Why you should prefer hot module replacement in a React development context: a full refresh, the kind your standard webpack-dev-server defaults to, will obliterate application state in React!

    1. Hot Module Replacement (HMR) builds on top of the WDS. It enables an interface that makes it possible to swap modules live. For example, style-loader can update your CSS without forcing a refresh. As CSS is stateless by design, implementing HMR for it's ideal.

      Hot module replacement (HMR) and CSS (or LESS/SASS)

    1. Trailing commas are used in the book examples on purpose as it gives cleaner diffs for the code examples. You'll learn to enforce this rule in the Linting JavaScript chapter.

      Trailing commas in recent ES6 code has a purpose, and this is it. JS has supported trailing commas in array literals from the outset but with recent versions of the language, it has expanded support for them, in object literals (ECMAScript 5) and function parameters (ES 2017). The main use here, it seems, is cleaner diffs for code. There are caveats and gotchas. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Trailing_commas

    1. npm start

      If you've followed the tutorial thusfar you will note that there is no 'start' script. npm run dev should work here!

  3. May 2017
    1. <Route path="/" component={ List } /> <Route path="/react" component={ Detail } />

      Note, in newer versions of the router, this won't work because a route can only contain one child. Try wrapping the two routes in a <switch>:</switch>

        <Switch>
          <Route exact path="/" component={ List } />
          <Route path="/react" component={Detail}  />
        </Switch>
      
    1. const appHistory = useRouterHistory(createHashHistory)({ queryKey: false })

      In recent versions, useRouterHistory() throws an error. Assuming you imported createHashHistory as follows:

      import { createHashHistory } from 'history';
      

      Try this:

      const appHistory = createHashHistory()
      
    2. <Router> <Route path="/" component={ Detail } /> </Router>,

      In newer versions of React, this won't work without a history prop and hashHistory. Depending on how you import hashHistory, the code will look something like this:

      let hashHistory = createHashHistory();
      
      <Router history={hashHistory}>
          <Route path="/" component={ Detail } />
      </Router>,
      
    1. npm install --save-dev webpack webpack-dev-server react-hot-loader

      You may run into problems if you don't install webpack-dev-server globally. If you must, as you will have to on many Linux systems, the command is as follows:

      sudo npm install --save-dev webpack-dev-server -g
      
    2. var webpack = require('webpack');

      Note you should also add:

      const path = require('path'); 
      

      See following comments for rationale.

    3. path: 'dist'

      Again, this will throw errors. The solution utilises 'path' (see comment above). The code should look like this in new versions of webpack:

      path: path.resolve(__dirname, 'dist')
      
    4. loader: 'react-hot!babel'

      In newer versions of Webpack, this is disallowed. It should be:

      loader: 'react-hot-loader!babel-loader'
      
  4. Mar 2017
    1. webpack ./entry.js bundle.js --module-bind 'css=style!css'

      This approach has been deprecated. Here is how it works now:

      webpack ./entry.js bundle.js --module-bind 'css=style-loader!css-loader'

    1. You may have been wondering where the concept of “controllers” lives in the Vue world and the answer is: there are no controllers. Your custom logic for a component would be split among these lifecycle hooks.

      Lifecycle hooks, not controllers.

    2. It should be noted that only these proxied properties are reactive. If you attach a new property to the instance after it has been created, it will not trigger any view updates. We will discuss the reactivity system in detail later.

      VERY IMPORTANT CAVEAT!

  5. Feb 2017
    1. foundation-apps

      If foundation-apps new command doesn't work try the following:

      foundation new

  6. Jan 2017
    1. var jq = document.createElement('script'); jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; document.getElementsByTagName('head')[0].appendChild(jq); // ... give time for script to load, then type (or see below for non wait option) jQuery.noConflict();

      Add jQuery in the console!

  7. Dec 2016
    1. This issue with primitives can be easily avoided by following the "best practice" of always have a '.' in your ng-models – watch 3 minutes worth. Misko demonstrates the primitive binding issue with ng-switch.

      Here's the solution to the problem of binding an input and a title in the context of an Ionic view. It boils down to scope!

  8. Nov 2016
    1. Note: We do not recommend using resolve of AngularUI Router. The recommended approach is to execute any logic needed before beginning the state transition.

      Re: APOD, note that Ionic doesn't recommend the use of resolve. This is the best argument not to!

  9. Sep 2016
    1. I don't know what then, I just remember somehow. Around the same time I install renoise, I also install vim. Then in renoise I go to Help>Show Preferences Folder.... Then I right click on Config.xml, then edit in VIM. Then I /search for showscr or something like that. Change false into true, done. On windows sometimes I'm lazy and I just modify the one shortcut that I use to have --scripting-terminal or something as an argument. Also: if you really do a lot of (re)installs I would advise to back up your Config.xml anyway, just like the KeyBindings.xml, TemplateSong.xrns, etc, it'll save you a lot of time right?

      How to enable Scripting Tools in Renoise Tools menu

  10. Aug 2016
    1. Upload the files

      If you are using WampServer locally, copy the Wordpress directory to the www directory of your WampServer installation. To find out where that is, click on the WampServer icon in the system tray (notification area in Windows 7), and then click on the 'www directory' listing in the menu. Once where you know where that is, you can copy and paste it to that location. There are other options, but this is the most convenient to get up and running with WordPress quickly.

    1. 1. Install the TidalCycles pattern engine

      For Windows users: if you get errors during this process it is likely because you tried to execute cabal install tidal from the standard Windows command line. Some of the tools in the Linux toolchain are required. Download and install MingW64 or git for Windows which comes with a bash-like shell that should have everything you need built in! Enjoy!

  11. May 2016
    1. sudo dpkg-reconfigure keyboard-configuration

      This worked well for me with a Dell Vostro 3550 and Ubuntu Server 14.04.4 virtualised inside VirtualBox (Version 5.0.16 r105871). When you run this command, the shell will present the configurator and the choices this user recommends are valid mostly. By contrast, I chose the Dell SK-8125 as a reasonably close match to the Vostro 3550. I also set the left Alt key to function as the AltGr key and this solved the problem. Now, if I want to type the pipe ( | ) character, I use the key combination

      ALT+~
      

      This is not the most intuitive solution; but it works!

    1. bower_components

      Ionic installs bower components (bower packages) into the project's lib folder:

      www/lib 
      

      This behaviour is defined in the projects .bowerrc file, which looks like this:

      {
        "directory": "www/lib"
      }
      

      The project .bowerrc file may be found at the same level as the www folder.

      Note that if you install angular-chart this way, you don't need to install Chart.js separately; it is one of the dependencies that bower will install for you. Of course, you must include the script tag that references the Chart.js file as usual!

      Finally, if you want to link angular-chart.css you must follow the same procedure.

    1. \hypersetup{hidelinks=true}

      [Lyx ver.2.1.4/Win7 Pro] To use this: go to Document > Settings > LaTeX Preamble and paste just this line into the corresponding text box. Lyx will add this to the underlying document preamble and this removes those ugly borders around clickable hyperlinks, and citation indices.

  12. Apr 2016
    1. When .git/HEAD is gone, git doesn't even think your repository is a repository. So really, we must fix this first or else we will not be able to use any git commands to salvage the rest.

      After a recent power outage, a call to 'git status' returned this:

      fatal: Not a git repository (or any of the parent directories): .git

      When I inspected .git/HEAD, it was filled with what looked like binary code, rather than a string like:

      ref: refs/heads/master

      or

      ref: refs/heads/develop

      This:

      echo 'ref: refs/heads/develop' > ./git/HEAD

      did the trick!