| id | name |
|---|---|
| 1 | Jane |
| 2 | Max |
| 3 | John |
| 4 | Scott |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using UnityEngine; | |
| using UnityEditor; | |
| using System.Collections; | |
| using System; | |
| public class MeshVisualizeWindow : EditorWindow | |
| { | |
| [MenuItem("Window/Mesh visualizer")] | |
| public static void OpenWindow() | |
| { |
Yes...it's true...redux is smart....smarter than you even know. It really does want to help you. It strives to be sane and easy to reason about. With that being said, redux gives you optimizations for free that you probably were completely unaware of.
connect is the most important thing in redux land IMO. This is where you tie the knot between redux and your underlying
components. You usually take state and propogate it down your component hiearchy in the form of props. From there, presentational
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Utility to only call Redux updates in RequestAnimationFrame's | |
| * Also uses React-dom's batchedUpdates | |
| */ | |
| import raf from 'raf'; | |
| import { unstable_batchedUpdates as batchedUpdates } from 'react-dom'; | |
| let rafID; | |
| let notifyFunc; | |
| function animFrame() { |
I've been following this blog post on how to set up an api-only Rails 5 application. One of the sections talks about creating a subdomain for your api
Rails.application.routes.draw do
constraints subdomain: "api" do
scope module: "api" do
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SEE THE UPDATED, PURE CODE VERSION BELOW! | |
| using UnityEngine; | |
| using System.Collections; | |
| using Com.LuisPedroFonseca.ProCamera2D; | |
| public class ProCamera2DStagingShake : MonoBehaviour { | |
| private ProCamera2DShake shaker; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Talking to Hue from an Arduino | |
| By James Bruce (MakeUseOf.com) | |
| Adapted from code by Gilson Oguime. https://github.com/oguime/Hue_W5100_HT6P20B/blob/master/Hue_W5100_HT6P20B.ino | |
| */ | |
| #include <SPI.h> | |
| #include <Ethernet.h> | |
| // Hue constants |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data = {} | |
| data["extend"] = function (data, t) | |
| for n, recipe in ipairs(t) do | |
| for i, component in ipairs(recipe["ingredients"]) do | |
| cname = component[1] or component["name"] | |
| camt = component[2] or component["amount"] | |
| print('"' .. recipe["name"] .. '","' .. cname .. '",' .. camt) | |
| end | |
| end | |
| end |