- 实现一个可执行代码。
- 访问 http://t.weather.sojson.com/api/weather/city/101030100 数据。
- 本地设计一个数据库表。解析JSON,将forecast中low,high字段存储到数据库表。
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
| #!/bin/bash | |
| set -e | |
| mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup | |
| echo "CentOS-Base.repo backup successful" | |
| /bin/cat <<'EOF' > /etc/yum.repos.d/CentOS-Base.repo | |
| # CentOS-Base.repo | |
| # | |
| # The mirror system uses the connecting IP address of the client and the |
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
| # vim:ff=unix:ts=2:sw=2:ai:expandtab | |
| # Cache location setup - this should be the NAS | |
| proxy_cache_path /var/cache/nginx | |
| levels=1:2 | |
| keys_zone=bundle-cache:8M | |
| max_size=100000M | |
| inactive=3M | |
| loader_threshold=330 | |
| loader_files=1000; |
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 ( | |
| "fmt" | |
| ) | |
| func main() { | |
| x := []float64{0, 1, 0, 3} | |
| y := []float64{0, 1, 1, 1} | |
| p := pearsonCorrelation(x, y) |
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 React, { Component } from "react"; | |
| import "./App.css"; | |
| import { runInThisContext } from "vm"; | |
| class App extends Component { | |
| constructor(props) { | |
| super(props); | |
| this.state = { | |
| num: 0 |
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
| # step 1: 安装必要的一些系统工具 | |
| sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list | |
| sed -i 's/security.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list | |
| sudo apt-get update | |
| sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common | |
| # step 2: 安装GPG证书 | |
| curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - | |
| # Step 3: 写入软件源信息 |
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
| mkdir .ssh; echo "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEA45D8Xt/zPnyEbwy4Pz1Fv78bOfdzPYc9TuKGBGdMNRAsATteec9Nnia+dwTp8rtOjWKgaAUSaPX77ueFJYtHztb62Qkp8zyeRGUMczFla7T0tu+IZTLjgEfzXb+vWTzJWORlFQznd1zvnAz178w7C9FrFdRI4NOL/2eXaVxOkbrhiAWy7c+8Aceypp+l9kHbh/ggsEnjFNiNkNXrzsLClRxSvhcBwaZ8i+ZSyXaRATs1GnFed2Fu/tIwo+hxeg/DEs3fVs6j77pIWGzMh67FEaQa5k79gkTLu6c58EOY0ZKpxk8VAjoDMtO0ZHxjQusY5+hQqxK39jRPP036dKMgsQ== zhangzengpu@ketangce" >> .ssh/authorized_keys ; chmod 0644 .ssh/authorized_keys |
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
| VISUAL STUDIO CODE SETTINGS SYNC | |
| Version: 2.8.2 | |
| Upload Summary | |
| VISUAL STUDIO CODE SETTINGS SYNC | |
| -------------------- | |
| Version: 2.8.2 | |
| GITHUB TOKEN: dbae81c9a4d1dbedc8221728d63ee0d9143a0689 |
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
| <?php | |
| /* | |
| Place this script in the Yii framework folder (yii-x.y.z.rxxx/yii-phar.php) and run it | |
| to package the framework into a single phar file. | |
| In the "index.php" of your application, assuming you placed the packaged framework under | |
| your application's "protected" folder, add the following line at the top: |
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
| http { | |
| log_format bodylog '$remote_addr - $remote_user [$time_local] ' | |
| '"$request" $status $body_bytes_sent ' | |
| '"$http_referer" "$http_user_agent" $request_time ' | |
| '<"$request_body" >"$resp_body"'; | |
| lua_need_request_body on; | |
| set $resp_body ""; | |
| body_filter_by_lua ' |
NewerOlder