Last Updated: 2018-01-23
Status: Draft
// 检测浏览器的 User Agent 应该是非常简单的事情 | |
// 微信在 Android 下的 User Agent | |
mozilla/5.0 (linux; u; android 4.1.2; zh-cn; mi-one plus build/jzo54k) applewebkit/534.30 (khtml, like gecko) version/4.0 mobile safari/534.30 micromessenger/5.0.1.352 | |
// 微信在 iPhone 下的 User Agent | |
mozilla/5.0 (iphone; cpu iphone os 5_1_1 like mac os x) applewebkit/534.46 (khtml, like gecko) mobile/9b206 micromessenger/5.0 | |
// 通过javascript判断 | |
// 很容易看出来,微信的 User Agent 都有‘micromessenger’字符串标示,我们判断是否含有这些字符串就OK了 | |
function isWeixinBrowser(){ |
<?php | |
/** | |
* Get font awesome file icon class for specific MIME Type | |
* @see https://gist.github.com/guedressel/0daa170c0fde65ce5551 | |
* | |
*/ | |
function ($mime_type) { | |
// List of official MIME Types: http://www.iana.org/assignments/media-types/media-types.xhtml | |
$icon_classes = array( |
package main | |
import ( | |
"fmt" | |
"image" | |
"image/color" | |
) | |
func ColorFormat(color color.Color) string { | |
thisR, thisG, thisB, _ := color.RGBA() |
#!/bin/bash | |
# Your StuNo. & Password | |
username='00000000' | |
password='00000000' | |
curl --retry 3 --data "DDDDD=${username}&upass=${password}&0MKKey=123456789" http://202.204.48.66 --silent -o LOGIN_STATUS.out | |
echo "Login Success!!" |
Last Updated: 2018-01-23
Status: Draft
import { useCount, useIncrement, useDecrement } from './store.Count' | |
export default function Counter () { | |
const count = useCount() | |
const increment = useIncrement() | |
const decrement = useDecrement() | |
return ( | |
<div> | |
<div>Count: {count}</div> |
ta12.app |
The package that linked you here is now pure ESM. It cannot be require()
'd from CommonJS.
This means you have the following choices:
import foo from 'foo'
instead of const foo = require('foo')
to import the package. You also need to put "type": "module"
in your package.json and more. Follow the below guide.await import(…)
from CommonJS instead of require(…)
.// Website you intended to retrieve for users. | |
const upstream = 'api.openai.com' | |
// Custom pathname for the upstream website. | |
const upstream_path = '/' | |
// Website you intended to retrieve for users using mobile devices. | |
const upstream_mobile = upstream | |
// Countries and regions where you wish to suspend your service. |
// 切换到 Scroll Mainnet (0x82750) | |
// 或者是 Scroll Sepolia Testnet(0x8274f) | |
await ethereum.request({ | |
method: 'wallet_switchEthereumChain', | |
params: [{ chainId: '0x82750' }], | |
}); | |
// 连接钱包(选择有余额的账户) | |
const [address] = await ethereum.request({ method: 'eth_requestAccounts' }); |