import React, { Suspense, useState } from "react"; | |
import { unstable_createResource as createResource } from "react-cache"; | |
import { | |
Combobox, | |
ComboboxInput, | |
ComboboxList, | |
ComboboxOption | |
} from "./Combobox2.js"; | |
function App({ tabIndex, navigate }) { |
export type DeepPartial<T> = T extends Function ? T : (T extends object ? { [P in keyof T]?: DeepPartial<T[P]>; } : T);
Before [email protected]
type DeepPartial = {
Here's a more in depth explanation of Angular's DI, RequireJS, and what's coming up in Angular 2.0 and ES6 modules.
Angular DI is not a module loader! It injects objects that have already been loaded using script tags. It does not do lazy-loading. Angular 2.0 will use ES6 import
for module loading. Angular 2.0 will also add a DI layer that runs after the modules load.
I need to go over Java's import
vs. JavaScript's require
/import
and Java singletons to further explain what Angular's DI is doing.
Java's import
allows you to access another package's types without fully qualifying the package name. JavaScript's import
loads a module and creates references to the module's exported objects. These are very different operations. JavaScript's import
is powerful stuff! You have the objects, not just aliases to a package's types.
Singleton is a pattern, not the object itself. In Java you start with a type and have to create an instance. The singleton pattern ensures you have only 1 instance of that t
alias gh="open \`git remote -v | grep [email protected] | grep fetch | head -1 | cut -f2 | cut -d' ' -f1 | sed -e's/:/\//' -e 's/git@/http:\/\//'\`" |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
"use strict"; | |
// Domenic needs a Tweeter | |
function Domenic(tweeter) { | |
this.tweeter = tweeter; | |
} | |
Domenic.inject = ["tweeter"]; | |
Domenic.prototype.doSomethingCool = function () { | |
return this.tweeter.tweet("Did something cool!"); |
(function( app ) { | |
'use strict'; | |
var ApplicationView = Ember.ContainerView.extend({ | |
childViews: [ 'headerView', 'mainView', 'footerView' ], | |
headerView: Ember.ContainerView.create({ | |
childViews: [ 'titleView', 'createTodoView' ], | |
elementId: 'header', | |
tagName: 'header', | |
titleView: Ember.View.create({ |
sudo rm -rf /usr/local/mysql* | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
sudo rm -rf /Library/Receipts/mysql* | |
sudo rm -rf /Library/Receipts/MySQL* | |
sudo rm -rf /var/db/receipts/com.mysql.* | |
sudo rm /etc/my.cnf | |
sudo sed '/MYSQLCOM=-YES-/d' /etc/hostconfig # remove line MYSQLCOM=-YES- from /etc/hostconfig |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.