A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| import random | |
| import time | |
| from concurrent import futures | |
| def run_parallel_processes(worker_func, job_args, max_workers=None): | |
| """ | |
| 每个进程执行一个 worker_func, | |
| 每个 worker_func 只从 job_args 中取一条任务处理, | |
| 最大并行粒度 max_workers 默认等于 CPU 核心数量。 |
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; |
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Data; | |
| using System.Drawing; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using System.Windows.Forms; |
| private void buttonSyntacParse_Click(object sender, EventArgs e) | |
| { | |
| //依存句法分析 | |
| var dictMode = new Dictionary<string, int>{ | |
| {"web模型", 0}, | |
| {"query模型", 1} | |
| }; | |
| var options = new Dictionary<string, object>{ | |
| {"mode", dictMode[comboBoxSyntacParse.Text.ToString()]}}; | |
| var result = client.DepParser(textBoxLexiAnaly.Text, options); |
| from sqlalchemy.engine import create_engine | |
| from sqlalchemy.orm import sessionmaker | |
| def create_engine_from_django_settings(database='default'): | |
| from django.conf import settings | |
| db = settings.DATABASES[database] | |
| engine = db['ENGINE'].lower() | |
| if 'postgresql' in engine: | |
| sqlalchemy_engine = 'postgresql' |
| # https://editorconfig.org | |
| # https://gist.github.com/ryerh/4c9215a95cc8d8c4872f1ca43d52dbda | |
| root = true | |
| [*] | |
| indent_style = space | |
| indent_size = 2 | |
| end_of_line = lf | |
| charset = utf-8 |
| import * as React from 'react'; | |
| import { withRouter } from 'react-router-dom'; | |
| import { RouteComponentProps, Form } from 'antd'; | |
| import compose from './compose'; | |
| interface DecoratorProps { | |
| id: number; | |
| } |
| import jQuery from 'jquery'; | |
| jQuery.ajax({ | |
| type: 'POST', | |
| url: 'https://api.github.com', | |
| contentType: 'application/json; charset=UTF-8', | |
| processData: false, | |
| data: JSON.stringify({ foo: 'bar' }), |
A list of the most common functionalities in Jekyll (Liquid). You can use Jekyll with GitHub Pages, just make sure you are using the proper version.
Running a local server for testing purposes:
| import React from 'react'; | |
| import PropTypes from 'prop-types'; | |
| class App extends React.Component { | |
| render() { | |
| const { menu } = this.context; | |
| return menu === '????' | |
| ? <h1>???</h1> | |
| : <h1>xxx</h1>; | |
| } |