Skip to content

Instantly share code, notes, and snippets.

// Chạy một HTTP Server, prefixes example: new string[] { "http://*:8080/" }
class MyHttpServer
{
private HttpListener listener;
public MyHttpServer(params string[] prefixes)
{
if (!HttpListener.IsSupported)
throw new Exception ("Máy không hỗ trợ HttpListener.");
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const postcssPresetEnv = require('postcss-preset-env');
const CopyPlugin = require('copy-webpack-plugin');
const devMode = false;
module.exports = {
mode: devMode ? 'development' : 'production',
<table class="table table-sm table-hover table-striped">
<tbody>
<tr>
<th>Loại thức ăn</th>
<th>Khẩu phần</th>
<th>Calories</th>
</tr>
<tr>
<td>
apiVersion: v1
kind: Secret
metadata:
name: ssl_domain1
namespace: your-namespace
type: Opaque
data:
tls.crt: LS0tLS1CRUdJTiBDRVJUSU ... # public key
tls.key: LS0tLS1CRUdJTiBSU0EgU ... # private key
---
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at
version: "3.7"
# KHAI BÁO CÁC DỊCH VỤ
services:
# TÊN DỊCH VỤ
web:
# TÊN IMAGE TẠO TẠO CONTAINER
image: busybox
## DÙNG IMAGE BUILD TỪ DOCKERFILE
# build:
{
"name": "WebApp",
"version": "1.0.0",
"description": "",
"main": "index.js",
"watch": {
"build": "src/scss/site.scss"
},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const postcssPresetEnv = require('postcss-preset-env');
const CopyPlugin = require('copy-webpack-plugin');
const devMode = false;
module.exports = {
mode: devMode ? 'development' : 'production',
entry: [
package net.xuanthulab;
/***
* Gọi TestComplex.Test() trong hàm Main để kiểm tra
*/
public class TestComplex {
public static void Test() {
Complex a = new Complex(5.0, 6.0);
Complex b = new Complex(-3.0, 4.0);
package net.xuanthulab;
public class Complex {
private double re; // phần thực
private double im; // phần ảo
//Thiết lập phần thực vào ảo
private void Init(double re, double im) {
this.re = re;
this.im = im;