Python 提供了两个基本的 socket 模块:
Socket
它提供了标准的BSD Socket API。SocketServer
它提供了服务器重心,可以简化网络服务器的开发。
下面讲解下 Socket模块功能。
#!/bin/bash | |
function jsonval { | |
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop` | |
echo ${temp##*|} | |
} | |
json=`curl -s -X GET http://twitter.com/users/show/$1.json` | |
prop='profile_image_url' | |
picurl=`jsonval` |
[TOC]
This is a HOWTO for database record/value version control, not for schema.
With MariaDB, now we can Versioning database records (values) WITH SYSTEM VERSIONING
.
Once we have tables configured correctly, Data Versions will be generated automatically everytime we have new data inserted or values updated.
import * as React from "react"; | |
import styled from "styled-components"; | |
import lottie from "lottie-web"; | |
import { up } from "styled-breakpoints"; | |
import { isServer } from "client/consts/env"; | |
const Container = styled.div` | |
width: 100vw; | |
height: 100vh; |
import React from 'react' | |
import { StyleSheet } from 'react-native' | |
import Animated, { | |
Extrapolate, | |
interpolate, | |
useAnimatedStyle | |
} from 'react-native-reanimated' | |
import { colors, metrics } from 'styles'; | |
function clamp(value, lowerBound, upperBound) { |
const THREE = require('three'); | |
const { createCanvas, loadImage } = require('canvas') | |
const { Blob, FileReader } = require('vblob'); | |
// Patch global scope to imitate browser environment. | |
global.window = global; | |
global.Blob = Blob; | |
global.FileReader = FileReader; | |
global.THREE = THREE; |
import React, { useState, useRef, useContext, useCallback } from 'react'; | |
import { Dimensions, View, Animated } from 'react-native'; | |
import { TabView } from 'react-native-tab-view'; | |
import { TabScreen } from './Tab'; | |
import { CustomTabBar } from './TabBar'; | |
import { ThemeContext } from 'react-native-elements'; | |
import { useHeaderHeight } from '@react-navigation/stack'; | |
const AnimatedHeader = ({ style, content }) => { | |
return <Animated.View style={style}>{content}</Animated.View>; | |
}; |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.9; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; |
// SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.9; | |
import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; | |
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol"; | |
import "@openzeppelin/contracts/access/Ownable.sol"; | |
import "@openzeppelin/contracts/utils/Counters.sol"; |