docker rm $( awk '{ print
docker rmi $( awk '{ print
| # Here is script curl to create new site in cloudflare | |
| curl -X POST "https://api.cloudflare.com/client/v4/zones" \ | |
| -H "X-Auth-Email: email" \ | |
| -H "X-Auth-Key: api_key_token" \ | |
| -H "Content-Type: application/json" \ | |
| --data '{"name":"new_site_url","account":{"id":"account_id"},"type":"full"}' | |
| # api_key_token = api key from your cloudflare account, you can go to https://dash.cloudflare.com/profile/api-tokens and click global api key |
| SELECT | |
| t.id, | |
| t.name, | |
| parent_trial.name AS parent_name | |
| FROM | |
| trial AS t | |
| LEFT JOIN trial AS parent_trial ON t.parent_id = parent_trial.id | |
| order by id |
| <?php | |
| class Node | |
| { | |
| public $data; | |
| public $parent; | |
| public $children; | |
| public function __construct($parent, $data) | |
| { |
| # question 1 | |
| -- test case 1 | |
| $array = [23,34,1,5,1,33]; | |
| echo solve($array); | |
| output 34 |
| const express = require('express'); | |
| const TelegramBot = require('node-telegram-bot-api'); | |
| const bodyParser = require('body-parser'); | |
| const dotenv = require('dotenv'); | |
| // read .env file | |
| dotenv.config(); | |
| // env | |
| const port = process.env.PORT || 3000; |
| ## main.py | |
| ############## | |
| from google.cloud import storage | |
| import urllib.request | |
| @app.route('/upload', methods=['GET']) | |
| def upload(): |
| <?php | |
| namespace App\Http\Controllers; | |
| use Illuminate\Http\Request; | |
| use App\Http\Controllers\Controller; | |
| use App\Models\News; | |
| class HomeController extends Controller | |
| { |
| <?php | |
| ... | |
| 'mongodb' => [ | |
| 'driver' => 'mongodb', | |
| 'host' => env('DB_HOST', 'localhost'), | |
| 'port' => env('DB_PORT', 27017), | |
| 'database' => env('DB_DATABASE'), | |
| 'username' => env('DB_USERNAME'), | |
| 'password' => env('DB_PASSWORD'), |
| <?php | |
| namespace App\Models; | |
| use Jenssegers\Mongodb\Eloquent\Model as Eloquent; | |
| use Jenssegers\Mongodb\Eloquent\HybridRelations; | |
| class News extends Eloquent | |
| { | |