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
<template> | |
<swiper | |
:slides-per-view="4" | |
:space-between="30" | |
@swiper="onSwiper" | |
@slideChange="onSlideChange" | |
class="default-slider" | |
> | |
<swiper-slide v-for="n in 7" :key="n"> {{ n }} </swiper-slide> | |
</swiper> |
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
<template> | |
<div class="swiper-pagination"></div> | |
<swiper | |
:slides-per-view="1" | |
:pagination="pagination" | |
class="pagination-slider" | |
> | |
<swiper-slide v-for="n in 7" :key="n"> {{ n }} </swiper-slide> | |
</swiper> | |
</template> |
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
<template> | |
<swiper :effect="'cards'" :grabCursor="true"> | |
<swiper-slide v-for="n in 7" :key="n"> {{ n }} </swiper-slide> | |
</swiper> | |
</template> | |
<script> | |
// Import Swiper Vue.js components | |
import { Swiper } from "swiper/vue/swiper"; |
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
<template> | |
<swiper | |
:effect="'coverflow'" | |
:grabCursor="true" | |
:centeredSlides="true" | |
:slidesPerView="'auto'" | |
:coverflowEffect="{ | |
rotate: 50, | |
stretch: 0, | |
depth: 100, |
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
<template> | |
<swiper | |
:direction="'vertical'" | |
:slidesPerView="1" | |
:spaceBetween="50" | |
:mousewheel="true" | |
:pagination="{ | |
clickable: true, | |
}" | |
class="mousewheel-slider" |
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
<template> | |
<div> | |
<swiper | |
@swiper="setSwiperRef" | |
:slidesPerView="5" | |
:spaceBetween="30" | |
:centeredSlides="true" | |
:pagination="{ | |
type: 'fraction', | |
}" |
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 main | |
import ( | |
"fmt" | |
"math/rand" | |
"regexp" | |
"strconv" | |
"strings" | |
"time" | |
) |
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
import "fmt" | |
func main() { | |
// create an array of strings | |
slice := []string{"apple", "grapes", "mango"} | |
// You can check by changing element to "orange" | |
if Contains(slice, "mango") { | |
fmt.Println("Slice contains element") | |
} else { | |
fmt.Println("Slice doesn't contain element") |
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
import ( | |
"time" | |
"fmt" | |
) | |
func main() { | |
currentTime := time.Now() | |
// Time after 18 hours of currentTime | |
futureTime := time.Now().Add(time.Hour * 18) | |
// Time after 10 hours of currentTime |
OlderNewer