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
{"config":{"codeTheme":"AtomOneDark","pageThemeSyncCodeTheme":true,"openAlmightyConsole":false,"autoRun":true,"layout":"default","keepPreviousLogs":true,"codeFontSize":16},"title":"未命名","code":{"HTML":{"language":"html","content":"<div id=\"hello-vue\" class=\"demo\">\n{{ message }}\n</div>","resources":[]},"CSS":{"language":"css","content":".demo {\n font-family: sans-serif;\n border: 1px solid #eee;\n border-radius: 2px;\n padding: 30px 30px;\n margin-top: 1em;\n margin-bottom: 40px;\n user-select: none;\n overflow-x: auto;\n}\n","resources":[]},"JS":{"language":"javascript","content":"const HelloVueApp = {\n data() {\n return {\n message: \"Hello Vue!!!\",\n };\n },\n};\n\nVue.createApp(HelloVueApp).mount(\"#hello-vue\");\n","resources":[{"name":"Vue 3","url":"https://cdn.bootcdn.net/ajax/libs/vue/3.2.0-beta.7/vue.global.js"}]},"VUE":{"language":"vue2","content":"","resources":[]}}} |
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
function bubbleSort(arr) { | |
for (var j = 0; j < arr.length - 1; j++) { | |
// 这里要根据外层for循环的 j,逐渐减少内层 for循环的次数 | |
for (var i = 0; i < arr.length - 1 - j; i++) { | |
if (arr[i] > arr[i + 1]) { | |
var temp = arr[i] | |
arr[i] = arr[i + 1] | |
arr[i + 1] = temp | |
} | |
} |
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
const createStore = function (initState, reducer) { | |
let state = initState; | |
const listeners = []; | |
/** | |
* 订阅 | |
* @param {func} listener 订阅者,为一个回调函数 | |
*/ | |
function subscribe(listener) { | |
listeners.push(listener); |
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
const createStore = function (initState, reducer) { | |
let state = initState; | |
const listeners = []; | |
/** | |
* 订阅 | |
* @param {func} listener 订阅者,为一个回调函数 | |
*/ | |
function subscribe(listener) { | |
listeners.push(listener); |
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
const createStore = function (initState, reducer) { | |
let state = initState; | |
const listeners = []; | |
/** | |
* 订阅 | |
* @param {func} listener 订阅者,为一个回调函数 | |
*/ | |
function subscribe(listener) { | |
listeners.push(listener); |
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
const createStore = function (initState, reducer) { | |
let state = initState; | |
const listeners = []; | |
/** | |
* 订阅 | |
* @param {func} listener 订阅者,为一个回调函数 | |
*/ | |
function subscribe(listener) { | |
listeners.push(listener); |
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
atom |