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
| {-# LANGUAGE LambdaCase #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| module Lib where | |
| import Control.Applicative | |
| import Data.Aeson | |
| import Data.ByteString.Lazy (ByteString) | |
| import Data.Vector (Vector) |
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 | |
| $withTrans = function($trans, $work): bool { | |
| if ($work()) { | |
| $trans->commit(); | |
| return true; | |
| } else { | |
| $trans->rollback(); | |
| return false; | |
| } |
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
| #!/usr/bin/env stack | |
| -- stack --resolver lts-14.2 script | |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| module Main (main) where | |
| import RIO | |
| import Control.Monad.Trans.Maybe | |
| newtype App = App {appLogFunc :: LogFunc} |
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] | |
| name = "actix_play" | |
| version = "0.1.0" | |
| edition = "2018" | |
| [dependencies] | |
| actix = "0.7" | |
| actix-web = { version = "0.7.8", features = ["tls"] } | |
| futures = "0.1" | |
| serde = "1.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
| <?php | |
| if (!function_exists("GetIBlockIDByCode")) { | |
| function GetIBlockIDByCode($ibCode, $ibType) { | |
| global $stackCacheManager; | |
| if (!CModule::IncludeModule("iblock")) { | |
| return false; | |
| } |
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
| extern crate hyper; | |
| extern crate futures; | |
| extern crate tokio; | |
| use hyper::rt::{Future, Stream}; | |
| use futures::future::select_all; | |
| use futures::future::join_all; | |
| use futures::future::select_ok; | |
| use std::thread; | |
| use std::error::Error; |
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
| extern crate hyper; | |
| extern crate futures; | |
| extern crate tokio; | |
| use hyper::{Client, Response, Body}; | |
| use hyper::rt::{Future, Stream}; | |
| use futures::future::join_all; | |
| fn main() { | |
| let client = Client::new(); |