- We've got some components
A
,B
andC
which provide different slots.const A = { template: `<div><slot name="a">Default A Content</slot></div>` }
const B = {
{ | |
"aa": { | |
"name": "Afar", | |
"nativeName": "Afaraf" | |
}, | |
"ab": { | |
"name": "Abkhaz", | |
"nativeName": "аҧсуа бызшәа" | |
}, | |
"ae": { |
<template> | |
<div class> | |
<div class="bg-grey-light h-1"></div> | |
<div class="flex"> | |
<div class="flex-1" v-for="s in steps" :key="s"> | |
<div | |
v-if="step >= s" | |
class="bg-blue -mt-1 h-1" | |
:class="{ 'w-1/2': step == s, 'w-full': step < s }" | |
></div> |
function ShowAutocompletion(obj) { | |
// Disable default autocompletion for javascript | |
monaco.languages.typescript.javascriptDefaults.setCompilerOptions({ noLib: true }); | |
// Helper function to return the monaco completion item type of a thing | |
function getType(thing, isMember) { | |
isMember = (isMember == undefined) ? (typeof isMember == "boolean") ? isMember : false : false; // Give isMember a default value of false | |
switch ((typeof thing).toLowerCase()) { | |
case "object": |
import discord | |
import asyncio | |
client = discord.Client() | |
@client.event | |
async def on_ready(): | |
print('Logged in as') | |
print(client.user.name) | |
print(client.user.id) |
'use strict'; | |
var mysqlBackup = require('./mysql-backup'); | |
var schedule = require('node-schedule'); | |
schedule.scheduleJob({ hour: 22, minute: 0 }, mysqlBackup); |
Visit the new improved script here! Smooth scroll to top of page (Improved!)
If you need a plain JavaScript function to add a smooth scrolling back to the top of the page, you can use this script.
<body>
tag. Like this: <body id="top">
onclick
function to the link. Like this: <a href="#top" onclick="scrollToTop(); return false">Back to Top ↑</a>
server { | |
listen 127.0.0.1:9000; | |
location / { | |
proxy_pass http://unix:/var/run/docker.sock:/; | |
} | |
} |