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
puts "start convert file names to hyphen style...." | |
def traverse_dir(fileType) | |
folder_path = File.absolute_path("./") + "/" | |
scheme = folder_path + "*.#{fileType}" | |
puts "find #{Dir.glob(scheme).length} #{fileType} files, start convert...." | |
puts '-' * 50 | |
Dir.glob(scheme).each do |f| | |
filename = File.basename(f, File.extname(f)) | |
File.rename(f, folder_path + filename.downcase.tr(' ', '-') + File.extname(f)) |
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
import { QueryDefinition } from "@reduxjs/toolkit/dist/query"; | |
import { | |
LazyQueryTrigger, | |
QueryHooks, | |
} from "@reduxjs/toolkit/dist/query/react/buildHooks"; | |
import { useEffect, useState } from "react"; | |
type GetResultTypeFromEndpoint<Endpoint> = Endpoint extends QueryHooks< | |
QueryDefinition<any, any, string, infer ResultType, string> | |
> |
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
<!DOCTYPE html> | |
<!--Copyright (c) Brock Allen & Dominick Baier. All rights reserved.--> | |
<!--Licensed under the Apache License, Version 2.0. See LICENSE in the project root for license information.--> | |
<html> | |
<head> | |
<meta http-equiv='X-UA-Compatible' content='IE=edge' /> | |
<title>Check Session IFrame</title> | |
</head> | |
<body> |
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 {PNG} = require('bundle.js'); | |
const {Button, ImageView, ui} = require('tabris'); | |
const base64 = require('base-64'); | |
function _arrayBufferToBase64( buffer ) { | |
var binary = ''; | |
var bytes = new Uint8Array( buffer ); | |
var len = bytes.byteLength; | |
for (var i = 0; i < len; i++) { | |
binary += String.fromCharCode( bytes[ i ] ); |
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
import * as React from 'react'; | |
export default function useControlledState<T, R = T>( | |
defaultStateValue: T | (() => T), | |
option?: { | |
defaultValue?: T | (() => T); | |
value?: T; | |
onChange?: (value: T, prevValue: T) => void; | |
postState?: (value: T) => T; | |
} |
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
<!DOCTYPE html> <!-- 使用 HTML5 doctype,不区分大小写 --> | |
<html lang="zh-cmn-Hans"> <!-- 更加标准的 lang 属性写法 http://zhi.hu/XyIa --> | |
<head> | |
<!-- 声明文档使用的字符编码 --> | |
<meta charset='utf-8'> | |
<!-- 优先使用 IE 最新版本和 Chrome --> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> | |
<!-- 页面描述 --> | |
<meta name="description" content="不超过150个字符"/> | |
<!-- 页面关键词 --> |
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
import * as React from 'react'; | |
import configureMockStore from 'redux-mock-store' | |
import thunk from 'redux-thunk' | |
import { shallow, mount, render } from 'enzyme'; | |
import {Home} from '../src/common/components/home/Home'; | |
import {AxiosApi} from 'some-package' | |
import { Provider } from 'react-redux'; | |
import MockAdapter from 'axios-mock-adapter'; |
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
{ | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
// Add custom actions and keybindings to this array. | |
// To unbind a key combination from your defaults.json, set the command to "unbound". | |
// To learn more about actions and keybindings, visit https://aka.ms/terminal-keybindings | |
"actions": | |
[ | |
// Copy and paste are bound to Ctrl+Shift+C and Ctrl+Shift+V in your defaults.json. | |
// These two lines additionally bind them to Ctrl+C and Ctrl+V. | |
// To learn more about selection, visit https://aka.ms/terminal-selection |
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
recordVideoPlayHistory('testVideo', { | |
"EmailOrUserName": "[email protected]", | |
"WatchTokenOrPwd":"ayr1", | |
"LoginToken": "C52AC508-8778-E5FC-95F3-35DDDB21BBC1", | |
"UserType": 1 | |
}, guid(), 7); |