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
// Make this a type to override ReadableStream's async iterator type in case | |
// the popular web-streams-polyfill is imported - the supplied types | |
// in that case don't quite match. | |
export type IterableReadableStreamInterface<T> = ReadableStream<T> & | |
AsyncIterable<T> | |
/* | |
* Support async iterator syntax for ReadableStreams in all environments. | |
* Source: https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 | |
*/ |
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 autocannon from "autocannon"; | |
import * as xlsx from "xlsx"; | |
const connections = [10, 50, 100]; | |
const url = "http://localhost:9999/getList"; | |
const method = "POST"; | |
const body = { topWeight: "1", pageNum: "1", pageSize: 5 }; | |
const headers = { "Content-Type": "application/json" }; | |
const duration = 10; | |
const xlsxName = "test.xlsx"; |
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 { useState } from 'react' | |
function Square({ value, onSquareClick, hightline }) { | |
return ( | |
<button className="square" onClick={onSquareClick}> | |
<span style={{ color: hightline ? 'red' : 'black' }}>{value}</span> | |
</button> | |
) | |
} |
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> | |
<html> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<title>双层波浪动画特效</title> | |
<style> | |
.header { |
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 'package:flutter/material.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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 res = await axios.get('xxx', { | |
responseType: 'blob' | |
}) | |
const filename = decodeURIComponent( | |
res.headers['content-disposition'].split('filename=')[1].split('.xlsx')[0] + ".xlsx" | |
) | |
const dom = document.createElement("a") | |
dom.style.display = "none" | |
dom.download = filename | |
dom.href = URL.createObjectURL(res.data); |
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
<div class="container"> | |
<svg xmlns="http://www.w3.org/2000/svg"> | |
<path d="M 400 160 A 2 2 90 0 0 260 160 A 2 2 90 0 0 120 160 C 120 230 260 270 260 350 C 260 270 400 230 400 160" class="line" /> | |
</svg> | |
<svg xmlns="http://www.w3.org/2000/svg"> | |
<path d="M 400 160 A 2 2 90 0 0 260 160 A 2 2 90 0 0 120 160 C 120 230 260 270 260 350 C 260 270 400 230 400 160" class="line line2" /> | |
</svg> | |
</div> | |
<style> |
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
package main | |
import ( | |
"bufio" | |
"bytes" | |
"fmt" | |
"os" | |
"runtime/pprof" | |
"strconv" | |
"sync" |
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
<div class="container mx-auto my-4"> | |
<img src="https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fwww.websurfmedia.com%2Fwp-content%2Fuploads%2F2017%2F10%2F45.Simply-Apple.jpg&refer=http%3A%2F%2Fwww.websurfmedia.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1637759018&t=811575800155c93c3c831f896d8a5c50" class="rounded shadow-lg w-full" /> | |
<div class="my-8 border rounded shadow-lg sm:flex sm:flex-wrap overflow-hidden"> | |
<div class="p-6 border-b sm:w-1/2 sm:border-r md:w-1/4 md:border-b-0 hover:bg-gray-800 group"> | |
<h2 class="title">Lorem, ipsum dolor sit amet consectetur.</h2> | |
<p class="text-gray-500 group-hover:text-white">Totam nobis consectetur sequi praesentium. Et rem labore sed optio ea id dolorem doloribus, modi perspiciatis voluptatibus ullam delectus quidem ratione debitis? Id pariatur veniam facilis voluptates.</p> | |
</div> | |
<div class="p-6 border-b sm:w-1/2 md:w-1/4 md:border-b-0 md:border-r hover:bg-gray-800 group"> |