zoukankan      html  css  js  c++  java
  • xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

    Async Programming All in One

    Async & Await

    Frontend

    (async () => {
    	const url = "https://cdn.xgqfrms.xyz/json/awesome-developer.json"
    	const result = await fetch(url).json()
    
    	if(result.name == `xgqfrms`) {
    		alert('You are awesome!')
    	} else {
    		alert('You are awesome too!')
    	}
    })();
    
    

    Backend

    #!/usr/bin/env python
    import asyncio as io
    import websockets as ws
    
    async def hello(websocket, path):
    		name = await websocket.recv()
    		greeting = f"Hello {name}!"
    		await websocket.send(greeting)
    
    server = ws.serve(hello, 'localhost', 1337)
    io.get_event_loop().run_until_complete(server)
    io.get_event_loop().run_forever()
    
    
    

    Mobile APP

    import 'package:flutter/widgets.dart';
    void main() {
     runApp(
      const Center(
       child: Text(
        'Hello, world!',
        textDirection: TextDirection.ltr
       )
      )
     );
    }
    
    

    DevOps

    version: 2
    jobs:
      build:
        docker:
          - image: circleci/node:8.11.2
        working_directory: ~/codedamn
    
        steps:
          - checkout
          - run: 
              name: Install Dependencies
              command: npm install
          - run: npm run test
    
    

    refs

    https://codedamn.com/

    vim


    Flag Counter

    ©xgqfrms 2012-2020

    www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!


  • 相关阅读:
    哈希表(hash)
    并查集
    trie树(字典树)
    单调队列(滑动窗口)
    单调栈
    用数组实现栈与队列
    数组实现双链表
    数组实现单链表
    区间合并
    离散化
  • 原文地址:https://www.cnblogs.com/xgqfrms/p/13344603.html
Copyright © 2011-2022 走看看