We are moving from the Basic.md
import Basic
const INCREMENT = "INCREMENT"; // define a constant for increment action types | |
const DECREMENT = "DECREMENT"; // define a constant for decrement action types | |
// define the counter reducer which will increment or decrement the state based on the action it receives | |
const counterReducer = (state = 0, action) => { | |
switch (action.type) { | |
case INCREMENT: | |
return state + 1; | |
case DECREMENT: |
const express = require("express"); | |
const app = express(); | |
const swaggerJsDoc = require("swagger-jsdoc"); | |
const swaggerUi = require("swagger-ui-express"); | |
const port = process.env.PORT || 5000; | |
// Extended: https://swagger.io/specification/#infoObject | |
const swaggerOptions = { | |
swaggerDefinition: { |
package main | |
import ( | |
"fmt" | |
"math" | |
) | |
func Sqrt(x float64) float64 { | |
z := float64(1) | |
for i := 1; i <= 10; i++ { |
Start-Process powershell -Verb runAs | |
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy Unrestricted |
--- | |
title: "" | |
author: "" | |
date: "DD/MM/YYYY" | |
header-includes: | | |
\usepackage{mathtools, amssymb , amsthm, amsfonts} | |
output: | |
pdf_document: | |
keep_tex: yes | |
latex_engine: xelatex |
const express = require("express"); | |
const app = express(); | |
const data = require("./mock.json"); | |
const Joi = require("joi"); | |
// middleware | |
app.use(express.json()); | |
// get | |
app.get("/api", (req, res) => { | |
res.send(data.api); |
// npm init | |
// npm i http -S | |
// npm i http-status-codes -S | |
const port = 9000; | |
http = require('http'); | |
httpStatus = require('http-status-codes'); | |
app = http.createServer(); |
// npm init | |
// npm i http -S | |
// npm i http-status-codes -S | |
const port = 9000; | |
const http = require('http'); | |
const httpStatus = require('http-status-codes'); |