const express = require('express');
const next = require('next');
const { parse } = require('url');
const { createProxyMiddleware } = require('http-proxy-middleware');
const devProxy = module.exports = {
'/web': {
target: 'https://api.xxx.com',
pathRewrite: { '/web/': '/' },
changeOrigin: true
}
};
const rewriteRules = {
flexstarProduct: {
re: /^(\/..)?\/xxx-([\w-]+)?-yyy(.*)$/,
replacement: '/product/$2$3'
},
};
const nextServer = asy
# Upgrading to PHP 8
// Install PHP 8
// This will install the latest PHP version
`brew install php`
// To install a specific version, run this command:
`brew install php@8.0`
Now if we check the current PHP version, we will still see 7.1 or another one, which means we have to make the system consider PHP 8 as the default version, to do that we have to run this command:
`brew link --force php@8.0`
Restart the services:
`brew services start php@8.0`
we still cannot see PHP 8.0 when we run
`php -
const swiperFv = document.querySelector(".swiper-fv");
if (swiperFv) {
new Swiper(swiperFv, {
effect: "fade",
fadeEffect: {
crossFade: false,
},
speed: 2000,
loop: true,
autoplay: {
delay: 4000,
disableOnInteraction: false,
},
pagination: {
el: ".swiper-pagination",
clickable: true,
},
});
}
jQuery(".swiper-pagination-bullet").each(function () {
jQuery(this).append(
'<svg height="30" width="30">\n' +
' <circle c
-- Temporarily make the recover mode simple.
ALTER DATABASE QISPackaging_LIVE_V11
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB. (This is the logical name. Right click DB > Properties > files )
DBCC SHRINKFILE ('k7Website632_log', 1);
GO
-- Reset the database recovery model.
ALTER DATABASE QISPackaging_LIVE_V11
SET RECOVERY FULL;
GO
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_safe_redirect(admin_url());
exit;
}
// Remove comments metabox from dashboard
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
// Disable support for comments and trackbacks in post types
foreach (get_post_types() as $post_type) {
if (post_type_supports($post_type,
// TypeScript for JS Programmers https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html
// TypeScript для продвинутых за 2 часа https://www.youtube.com/watch?v=7NU6K4170As
// +TypeScript - Быстрый Курс за 70 минут https://www.youtube.com/watch?v=nyIpDs2DJ_c&t=3661s
// ?40 минута не понял концепт
// ?enum не понял на кой...
let age: number
// Переменной можно назначать тип встроенных класcов js
let data: Data
function func():void
function func():never
type strOrNum
PART 1:
" esc in insert & visual mode
inoremap kj <esc>
vnoremap kj <esc>
" esc in command mode
cnoremap kj <C-C>
" Note: In command mode mappings to esc run the command for some odd
" historical vi compatibility reason. We use the alternate method of
" existing which is Ctrl-C
PART 2:
Note: If you do need to type a literal kj (or whatever your mapping is) just type them with 2 seconds in between. (You'll see the cursor hesitate to move after the 1st char. Wait for it to move before typing t
public class OnFiledChangedTest : MonoBehaviour
{
[SerializeField]
[OnChangedCall("onSerializedPropertyChange")]
private int _size;
public void onSerializedPropertyChange()
{
transform.localScale = new Vector3(_size,_size,_size);
}
}
BaOPErG
-------
A [Pen](https://codepen.io/code-polaris044/pen/BaOPErG) by [code-polaris044](https://codepen.io/code-polaris044) on [CodePen](https://codepen.io).
[License](https://codepen.io/license/pen/BaOPErG).
class SerializeProperty : MonoBehaviour
{
[field: SerializeField]
int MyProperty { get; set; } = 10;
void Start()
{
Debug.Log(MyProperty);
}
}
<div class="wrapper">
<header class="header">
<div class="header__logo">Logo</div>
<nav class="header__nav">
<ul class="header__nav-list">
<li class="header__nav-list__item">
<a href="#" class="header__nav-list__item--link">Home</a>
</li>
<li class="header__nav-list__item">
<a href="#" class="header__nav-list__item--link">About</a>
</li>
<li class="header__nav-list__item">
<a href="#" class="header__nav-list__i
import { inertiaScroll } from "../common/inertiaScroll";
import { isTouch } from "../global";
/*===============================================
スクロール量に合わせてheaderのclass付替
===============================================*/
export const scrollClassSwitch = {
header: document.getElementById("js_header"),
classVal: "is_scrolled",
add: function () {
let scrollVol = 0;
let threshold;
if (isTouch()) {
threshold = 8;
let beforePos = 0;
let nowVal = 0;
/*===============================================
背景に合わせてclassをつけ替え
===============================================*/
export const bgClassSwitch = {
header: document.getElementById("js_header"),
blackClass: "is_bgblack",
add: function () {
const blackSection = [...document.getElementsByClassName("js_bgblack")];
const headerHeight = this.header.clientHeight;
const rootMarginBottom = (window.innerHeight - headerHeight * 0.53) * -1;
const rootMarignTop = headerHeigh
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
func main() {
sc := bufio.NewScanner(os.Stdin)
writer := bufio.NewWriter(os.Stdout)
defer writer.Flush()
sc.Scan()
n, _ := strconv.Atoi(sc.Text())
sc.Scan()
a := strings.Split(sc.Text(), " ")
ad := make([]int, n)
minus := 0
var total int
min := 1000000000
for i := 0; i < n; i++ {
ad[i], _ = strconv.Atoi(a[i])
if ad[i] < 0 {
minus += 1
}
m := Abs(ad[i])
total += m
if m < m
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
sc := bufio.NewScanner(os.Stdin)
writer := bufio.NewWriter(os.Stdout)
defer writer.Flush()
sc.Scan()
x, _ := strconv.Atoi(sc.Text())
sc.Scan()
a, _ := strconv.Atoi(sc.Text())
sc.Scan()
b, _ := strconv.Atoi(sc.Text())
z := x - a
fmt.Fprintln(writer, z-(z/b)*b)
}
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
sc := bufio.NewScanner(os.Stdin)
writer := bufio.NewWriter(os.Stdout)
defer writer.Flush()
sc.Scan()
s := sc.Text()
n, _ := strconv.Atoi(s)
fmt.Fprintln(writer, n)
}