Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Backbone.js Todos</title>
<link rel="stylesheet" href="todos.css"/>
</head>
<body>
<script src="../../test/vendor/json2.js"></script>
import '@testing-library/jest-dom/extend-expect'
import React from 'react'
import { render, RenderResult, fireEvent, wait, createEvent } from '@testing-library/react'
import axios from "axios"
import { Upload, UploadProps } from './upload'
jest.mock('axios')
const mockedAxios = axios as jest.Mocked<typeof axios>
jest.mock('../Icon/icon', () => {
@vikingmute
vikingmute / gist:67a2168f0a67f6b70defe4fb3cff1e5c
Created March 14, 2017 09:15
how to render two components based on one url
// hey, I wanna show Home Component & Modal Component when url is /edit-profile
// method one
<Route path="/" component={HomePage} />
<Route path="/edit-profile" component={EditModal} />
// this will work, but when I adding another route&component like below
// when go to '/about', both Home and About will show up, I assume these are two different pages
<Route path="/" component={HomePage} />
<Route path="/about" component={AboutPage} />
COME WIT IT NOW! 燥起来吧!
COME WIT IT NOW! 燥起来吧!
[Verse One]
The microphone explodes, shatterin the molds 麦克风在我手中爆裂, 声音撕碎虚伪的模式。
Either droppin hits like De La O or get the fuck off the commode 如果不像De La O(墨西哥革命领导者)那样勇敢发声 那我还不如现在就滚蛋
With the sure shot, sure to make the bodies drop 弹无虚发的瞄准 又一具横尸
Drop and don't copy yo, don't call this a co-opt 别想复制我的声音 还冠以团结之名
Terror rains drenchin, quenchin the thirst Of the power dons -that five sided Fist-agon 恐怖之雨浸透人民,只有这样五角大楼里面的“人物”才能够为自己的欲望止渴。
The rotten sore on the face of Mother Earth gets bigger 地球腐烂的伤口蔓延
kindOptions: [
{kind: "cosmetic"},
{kind: "dimensional"}
],
{
path: 'kind',
label: 'Kind',
optionLabelPath: 'content.kind',
choices: 'table.kindOptions',
<div class="agent-status status-light status-{{status}}"></div>
{{#if navToIndex}}
{{#link-to 'agents' class="agent-item-link"}}
<aid class="agent-item-header">{{agent.id}}</aid>
<component class={{if component.name 'agent-tag'}}>{{component.name}}</component>
<project class={{if project.name 'agent-tag'}}>{{project.name}}</project>
<address class={{if agent.addr 'agent-tag'}}>{{agent.addr}}</address>
<kind class={{if agent.kind 'agent-tag'}}>{{agent.kind}}</kind>
<model class={{if agent.model 'agent-tag'}}>{{agent.model}}</model>
<version class={{if agent.firmware 'agent-tag'}}>{{agent.firmware}}</version>
statusAgents: computed('search', 'isLoaded', 'agents', {
get() {
let agents = this.get('agents');
return agents.map(function(agent) {
if (agent.get('connected')) {
if (agent.get('currentJob')) {
agent.set('stauts', 'online');
} else {
agent.set('status', 'ready');
}
希望:
这不是一本贴大量代码的书,这是一本让你了解现在前端开发新的技术和发展的书,希望看完这些内容以后会对当前最新的前端技术有所了解,并能运用到自己的实际项目中。
前端这个行业,发展非常迅速,新的技术风起云涌,在这本书里面我们会了解其中的两个翘楚,一个是一个出色的构建工具Webpack,另外一个是注重于用户界面构建的框架React,他们两个配合的非常完美,像Sid & Nancy一样。
在开始正式学习着两个部分之前,我们非常有必要了解当今前端开发领域一些新的标准和趋势。
目录
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
var Stack = function() {