Skip to content

Instantly share code, notes, and snippets.

@MikeCheng1208
MikeCheng1208 / gist:2ba530f5312da8663ba94eef6df133f6
Created March 2, 2022 06:05 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
const express = require('express');
const app = express();
const photoItem = require('./src/assets/photoItem.json');
const apiRoutes = express.Router();
module.exports = {
// 其他 webpack 設定
devServer: {
class creEle{
constructor(tag = "div"){
this.el = document.createElement(tag);
}
setText(context = ''){
const textNode = document.createTextNode(context);
if (context === "") {
this.el.innerText = "";
return;
}
import appWebviewFn from "./lib/appWebviewFn.js";
const getData = async () => {
const domain = await appWebviewFn("getDomain");
const token = await appWebviewFn("getUserToken");
/*
拿到 domain 跟 token 之後的處理需求
*/
}
import device from 'current-device';
function iosCallback(callback) {
if (window.WebViewJavascriptBridge) {
return callback(WebViewJavascriptBridge);
}
if (window.WVJBCallbacks) {
return window.WVJBCallbacks.push(callback);
}
window.WVJBCallbacks = [callback];
var WVJBIframe = document.createElement('iframe');
/**
* @param {number[]} A
* @return {number[]}
*/
const sortArrayByParityII = function(arr) {
const sortArr = [];
sortArr.length = arr.length;
let evenidx = 0;
let oddidx = 1;
for(let i = 0; i < arr.length; i++){
/**
* @param {number[]} A
* @return {number[]}
*/
const sortArrayByParityII = function(arr) {
const even = [];
const odd = [];
const sortArr = [];
arr.forEach((item, idx)=> item % 2 === 1 ? odd.push(item) : even.push(item))
for(let i = 0; i < arr.length; i++){
/**
* @param {string} moves
* @return {boolean}
*/
const judgeCircle = function(moves) {
let x = 0;
let y = 0;
for(let i = 0; i < moves.length; i++) {
if (moves[i] === "R") {
x++;
/**
* @param {string} str
* @return {boolean}
*/
const isValid = function(str) {
const arr = [];
const map = {
"}": 1,
")": 2,
"]": 3,
/**
* @param {string} str
* @return {boolean}
*/
const isValid = function(str) {
const arr = [];
const map = {
"}": "{",
")": "(",
"]": "[",