text stringlengths 184 4.48M |
|---|
import { createRouter, createWebHistory } from 'vue-router'
import { useAuthStore } from '../stores/auth';
import Home from '../views/Home.vue'
import Login from "../views/Login.vue";
import Register from "../views/Register.vue";
import DefaultLayout from "../layouts/DefaultLayout.vue";
import GuestLayout from "../layo... |
////Handles the movements for our character "Harry" based on the keycodes generated from the USB PIO
//-------------------------------------------------------------------------
// Ball.sv --
// Viral Mehta ... |
//
// ServiceCell.swift
// Intervk
//
// Created by Andrei Kovryzhenko on 28.03.2024.
//
import UIKit
class ServiceCell: UITableViewCell {
let titleServiceLabel = UILabel()
let descriptionServiceLabel = UILabel()
let imageService = UIImageView()
let chevronImage = UIImageView(image: UIImage(sy... |
const {
is,
data: { bson: BSON }
} = ateos;
const {BinaryParser} = require("./binary_parser");
const ObjectId = BSON.ObjectId;
const Binary = BSON.Binary;
const BSONRegExp = BSON.BSONRegExp;
describe("Full BSON", () => {
/**
* @ignore
*/
it("Should Correctly Deserialize object", (done) => {
... |
### :sparkles: Message Queue Dashboard
This project was created w/ to learning more about React using the Next.JS framework.
### :eyes: __Overview__

### :hammer: Build w/

return instance
}()
private override init() {
super.i... |
<?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\DB;
class NotifyService extends Mailable
{
use Queueable, SerializesModels;
/**
* Create a new message ... |
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css"
rel="stylesheet"
in... |
"use client";
import { CarProps } from "@/types";
import { calculateCarRent, generateCarImageUrl } from "@/utils";
import Image from "next/image";
import React, { useState } from "react";
import Button from "./Button";
import CarDetails from "./CarDetails";
interface CarCardProps {
car: CarProps;
}
const CarCard = ... |
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/renderer_host/offline_resource_handler.h"
#include <vector>
#include "base/logging.h"
#include "base/memory/singleton.h"
#i... |
<template>
<div class="task-performance | d-flex justify-space-between pa-4 rounded">
<div v-if="task.startedBy">
<h4 v-if="task.started" class="sub-title | mb-1">
{{ $t('startedBy') }}
</h4>
<div v-if="task.started" class="task-performance_info">
<v-icon small color="green">mdi... |
<?php
namespace frontend\models;
use yii\base\InvalidArgumentException;
use yii\base\Model;
use common\models\User;
/**
* Password reset form
*/
class ResetPasswordForm extends Model
{
public $password;
/**
* @var \common\models\User
*/
private $_user;
/**
* Creates a form model gi... |
from django.views import generic as views
from .models import Accessories
from .forms import AccessoryCategoryForm
class AccessoriesListView(views.ListView):
model = Accessories
template_name = "accessories/accessories_list.html"
context_object_name = "accessories"
paginate_by = 6
def get_queryse... |
package leetcode_categories.stack;
import java.util.Arrays;
import java.util.Stack;
public class L_853_CarFleet {
public static int carFleet(int target, int[] position, int[] speed) {
Integer[] indices = new Integer[position.length];
for (int i = 0; i < indices.length; i++) {
indices[i... |
package mini.chatting;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.util.Scanner;
public class TCPServerChatting {
public static void main(String[] args) {
// 서버용 프로그램... |
from pathlib import Path
from fpdf import FPDF
FILE_NAME_PDF = "feed.pdf"
class PDF(FPDF):
"""
Class that generates the PDF file
"""
def _get_item(self, news):
"""
the method that generates the news.
:param news: dict
"""
if news["title"]:
self.m... |
import { Router } from "express";
import { userModel } from "../daos/models/user.model.js";
const router = Router();
router.post("/register", async (req, res) => {
try {
const { first_name, last_name, email, password } = req.body;
console.log("Registrando usuario:");
console.log(req.body);
const ex... |
const mongoose = require('mongoose');
// Task schema
const taskSchema = mongoose.Schema({
id: {
type: String,
unique: true,
required: true
},
name: {
type: String,
required: true
},
description: {
type: String
},
createdAt: {
type: Dat... |
import { supabase } from "@/lib/supabase/browser-client"
import { TablesInsert, TablesUpdate } from "@/supabase/types"
export const getChatById = async (chatId: string) => {
const { data: chat } = await supabase
.from("chats")
.select("*")
.eq("id", chatId)
.maybeSingle()
return chat
}
export con... |
import {ColumnsType} from "antd/es/table";
import useSWR from "swr";
import {fetch, product} from "../services/Service";
import { Space, Table, Button, Typography } from 'antd';
import React, {useState} from "react";
import { PlusOutlined } from '@ant-design/icons';
import {AntDrawer} from "../components/AntDrawer";
... |
import express from "express";
import { QueryTypes } from "sequelize";
import User from "../Models/UserModels.js";
const router = express.Router();
router.post("/users", async (req, res) => {
try {
await User.create(req.body);
res.status(201).json({ msg: "Member ditambahkan" });
} catch (error) {
res.... |
package flow;
import org.apache.hadoop.io.WritableComparable;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
/**
* @author TaoQingYang
* @date 2022/10/25
*/
public class FlowWritable implements WritableComparable<FlowWritable> {
private String phoneNum;
private Integer ... |
import React from 'react';
import { Moon, Sun } from 'react-feather';
import { useDarkMode } from '../context/Dark';
import { useLocation, Link } from 'react-router-dom';
const Header: React.FC = () => {
const {isDarkMode, toggleMode} = useDarkMode();
const location = useLocation();
const activeClass = 'b... |
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
<div th:object="${list}" th:remove="tag">
<div th:replace="partials :: headFragment(*{name})"></div>
</div>
<link rel="stylesheet" th:href="@{/css/carousel.c... |
import Title from "./Title";
import TextBox from "./TextBox";
import Pizza from "./Pizza";
import PizzaOven from "./PizzaOven";
// With props you can pass any data to them: Strings, numbers, booleans
// Functions, objects, arrays
// When this function is called, it will send a popup containing the passed in text
cons... |
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\BookController;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application.... |
package net.minecraft.core;
import com.google.common.collect.Iterators;
import com.mojang.serialization.Codec;
import com.mojang.serialization.DataResult;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.Iterator;
import java.util.List;
import java.util.function.Predi... |
package alan.pkg;
import java.util.ArrayList;
import java.util.Collection;
public class collec {
public static void main(String[] args) {
int [] a = new int[1000];
// Limitations of array
//1. Arrays are fixed in size
//2. Only homogenous data elements
//3. Does not provide... |
/*
Copyright (c) 2014 Ken Koch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublic... |
import { z } from 'zod'
// Definir el esquema para validar el tipo de valor
const stringSchema = z.string()
/**
* Checks if a value is a string.
*
* @param {unknown} value - The value to check.
* @returns {value is string} - True if the value is a string, false otherwise.
*
* @example
* // Example usage:
* co... |
import re
import nltk
from nltk.corpus import stopwords as nltk_stopwords
from nltk.stem.porter import PorterStemmer
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.model_selection import train_test_split
class ModelTraining:
"""
A class used for training machine learning models for sp... |
import React, { useState } from 'react';
import styles from './Layout.module.css';
import Slideshow from './Slideshow';
const Layout = () => {
const [isPlaying, setIsPlaying] = useState(false);
const togglePlay = () => {
setIsPlaying(!isPlaying);
};
const rectangleSlides = [
<div className={styles.re... |
import React, { Component } from 'react';
import { Table } from 'antd';
import { connect } from 'react-redux';
import { getCategories } from '../../redux/Categories/categories.actions';
const columns = [
{
title: 'Category',
dataIndex: 'category_name',
key: 'category_name',
},
{
title: 'Descripti... |
package eu.excitementproject.eop.transformations.utilities;
/**
*
* Used to acknowledge threads that they should abort their current work.
* When a task is divided into several threads, and is done in a multi-thread manner,
* if one of the threads fails to accomplish its work, than it means that the task will
* ... |
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="chrome://global/skin"?>
<?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?>
<!--
https://bugzilla.mozilla.org/show_bug.cgi?id=1034730
-->
<window title="Mozilla Bug 1034730"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.... |
import type { Preset } from "unocss"
export interface GridOptions {
gridTemplateAreas: {
[key: string]: string[];
};
}
export function presetGridAreas(options: GridOptions): Preset {
const gridTemplateAreas = (name) => options?.gridTemplateAreas?.[name] ? options?.gridTemplateAreas?.[name].map((row) => (`"... |
"""A tool used to search content of PFD files with steel construction General Arrangement drawings to find if all steel asseblies
have corresponding assembly marks. The tool reads all text from GA drawings, searches for assembly marks and compares the results
with list of given assembly drawings"""
from PyPDF2 import... |
import { Injectable } from '@nestjs/common';
import { InjectRepository } from "@nestjs/typeorm";
import { Repository } from "typeorm";
import { CreateCommentDto } from './dto/create-comment.dto';
import { UpdateCommentDto } from './dto/update-comment.dto';
import { Comment } from "./entities/comme... |
package franxx.code.spring.core;
import franxx.code.spring.core.data.Bar;
import franxx.code.spring.core.data.Foo;
import franxx.code.spring.core.scope.DoubleScope;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.config.CustomScopeConfigurer;
import org.springframework.context.annotation.Bea... |
import type { ViteDevServer } from 'vite';
import lt from 'localtunnel';
import type { AddressInfo } from 'node:net';
type PluginOptions = lt.TunnelConfig & { timeout?: number };
export default (opts: PluginOptions) => ({
name: 'localtunnel-server',
enforce: 'post',
apply: 'serve',
configureServer(server: Vit... |
[toc]
Design a HashMap without using any built-in hash table libraries.
To be specific, your design should include these functions:
* `put(key, value)` : Insert a `(key, value)` pair into the HashMap. If the value already exists in the HashMap, update the value.
* `get(key)`: Returns the value to which the specified... |
import Layout from '@/components/Layout';
import { useSession } from 'next-auth/react';
import { Inter, Plus_Jakarta_Sans } from 'next/font/google';
import Head from 'next/head';
import { SubmitHandler, useForm } from 'react-hook-form';
import axios from 'axios';
import { useRouter } from 'next/router';
import { GetSer... |
# Phirehose #
A PHP interface to the Twitter Streaming API (firehose, etc). This library makes it easy to connect to and consume the Twitter stream via the Streaming API.
See:
* https://github.com/fennb/phirehose/wiki/Introduction and
* http://dev.twitter.com/pages/streaming_api
## Goals ##
* Provide a simple ... |
/*
* Copyright (c) 2008,
* Commissariat a l'Energie Atomique (CEA)
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyrig... |
# [SPRING: GPT-4 Out-performs RL Algorithms by Studying Papers and Reasoning](https://arxiv.org/abs/2305.15486)
## What is the central research question or hypothesis that this paper addresses?
Based on my reading of the paper, the central research question is:
How can we develop reinforcement learning agents th... |
alias Yagg.Unit
alias Yagg.Event
alias Yagg.Board
alias Yagg.Board.Grid
alias Yagg.Unit.Ability
defmodule Unit.Antente do
@behaviour Unit
@impl Unit
def new(position) do
Unit.new(
name: :antente,
attack: 5,
defense: 4,
triggers: %{
attack: Unit.Antente.Visible,
},
... |
---
title: Demo Elements Page
description: A demo page for the various markup elements in the Dot Org theme.
images: ["https://via.placeholder.com/250x200/d9d9d9/000000"]
---
This is a demo page, designed to show you the various elements of the theme and how they sit together.
It has a custom social image, which can ... |
using System;
using Medidata.RWS.NET.Standard.Core.Requests.Datasets;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace Medidata.RWS.NET.Standard.Tests.Core.Requests.Datasets
{
[TestClass]
public class VersionDatasetRequestTests
{
[TestMethod]
public void VersionDatasetRequest_... |
# Default Game Commands
The following commands can be called at any time and are built into the game:
Autosaves the game and live-reloads all active scripts and mission locations to allow for live debugging and editing of missions
```lua
?reload_scripts
```
Kicks the associated player from the game.
```lua
?kick ... |
package com.gnetop.letui.sleep.base.fg
import android.os.Bundle
import android.view.View
import androidx.databinding.ViewDataBinding
import androidx.lifecycle.Observer
import androidx.lifecycle.ViewModelProvider
import com.gnetop.letui.sleep.base.vm.BaseViewModel
import com.gnetop.letui.sleep.common.ActivityManager
im... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Todo extends Model
{
use HasFactory;
protected $fillable = ['title'... |
import { type ReactElement } from 'react'
import { Link, usePage } from '@inertiajs/react'
import classNames from '@/Utils/classNames'
export default function AdminNavigation (): ReactElement {
const { component } = usePage()
const { canManageEditors, currentUserRole: role } = usePage().props
const dashboardLin... |
import type {Options} from 'plyr'
import Plyr from 'plyr'
import {Socket} from 'socket.io-client'
import i18n from '@nuxtjs/i18n/dist/runtime/plugins/i18n.mjs'
import {getImageLink, hasScope} from '@vesp/frontend'
import {getFileLink} from '~/utils/vesp'
declare global {
type VespUserRole = {
id: number
titl... |
// Copyright 2023-Present Couchbase, Inc.
//
// Use of this software is governed by the Business Source License included
// in the file licenses/BSL-Couchbase.txt. As of the Change Date specified
// in that file, in accordance with the Business Source License, use of this
// software will be governed by the Apach... |
import React, { useState, useEffect } from 'react';
import { View, StyleSheet, Text, ScrollView, Alert } from 'react-native';
import { Picker } from '@react-native-picker/picker';
import firestore from '@react-native-firebase/firestore';
const ViewStudent = ({ navigation }) => {
const [admissionClass, setAdmission... |
import './index.css'
import {Component} from 'react'
import EventItem from '../EventItem'
import ActiveEventRegistrationDetails from '../ActiveEventRegistrationDetails'
const eventsList = [
{
id: 'f9bb2373-b80e-46b8-8219-f07217b9f3ce',
imageUrl:
'https://assets.ccbp.in/frontend/react-js/event-canada... |
package com.cakefactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.config.annotation.authenticati... |
import hashlib
import pickle
import nltk
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import plotly.express as px
import spacy
from nltk.corpus import stopwords
from nltk.stem import PorterStemmer
from preprocess import *
# added stop words
#gist_file = open("data/gist_stopwords.txt", "r")
... |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Treemap Visualization</title>
<script src="https://d3js.org/d3.v6.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/d3-sankey@0.12.3/dist/d3-sankey.min.js"></script>
<style>
body {
font-family: Arial,... |
//
// ArticleView.swift
// newsfeed
//
// Created by Jordan Yee on 3/10/22.
//
import SwiftUI
import UIKit
import URLImage
struct ArticleView: View {
let article: Article
var body: some View {
HStack {
// TODO: Add image view
if let image = article.image,
... |
/**
************************************************************************************************************************
* @file HelloWall.pde
* @author
* @version V0.1.0
* @date 4-April-2017
* @brief Test example for creating a virtual wall using the hAPI
***************************... |
import React from 'react';
import {
Card, CardActions, CardContent,
Button, Typography
} from '@mui/material';
import { ThemeProvider } from '@mui/material/styles';
import posts from '../../themes/posts'
export default function AllPostCard({
viewFunction,
name = '',
author = '',
publication_da... |
package com.example.tgeorge.temajoc;
import android.graphics.Color;
import java.util.Random;
/**
* Created by TGeorge (TODOSI GEORGE VASILE GRUPA 3131B AN 3 CALCULATOARE) on 04-Jan-18.
* Clasa ce reprezinta modelul matricei 4x4
*/
public class GameModel {
Field tablajoc[][] = new Field[4][4]; //matrice 4x4... |
module Flipper
# Builds an adapter from a stack of adapters.
#
# adapter = Flipper::AdapterBuilder.new do
# use Flipper::Adapters::Strict
# use Flipper::Adapters::Memoizable
# store Flipper::Adapters::Memory
# end.to_adapter
#
class AdapterBuilder
def initialize(&block)
@stac... |
from nicegrill import Message, run, startup
from config import GOOGLE_DEV_API, GOOGLE_CX_ID
from telethon import TelegramClient as Client
from google_images_search import GoogleImagesSearch
from pytube import YouTube
from googlesearch import search
from youtube_search import YoutubeSearch
from requests.exceptions impor... |
# PIC12F675 and 74HC4067 MULTIPLEXER
This folder showcases the processing of analog readings from various sensors using the PIC12F675 and the 74HC4067 analog multiplexer.
## Content
1. [Overview](#overview)
2. [About this project](#about-this-project)
3. [Schematic - PIC12F675 and 74HC4067 monitoring 8 sensors](#p... |
/*
* Copyright (C) 2011 Keijiro Takahashi
* Copyright (C) 2012 GREE, Inc.
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages
* arising from the use of this software.
*
* Permission is granted to anyone to use this soft... |
package leetcode;
public class SqrtX {
/**
* Leetcode 69
* Given a non-negative integer x, return the square root of x rounded down to the nearest integer. The returned
* integer should be non-negative as well.
* You must not use any built-in exponent function or operator.
*/
static in... |
package code {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
public class EnergyCube extends Sprite {
const FRONT_TOP_Y_POSITION:int = 45;
const EFFICIENCY_HEIGHT:int = 52;
const ELECTRICITY_HEIGHT:int = 116;
const HEAT_HEIGHT:int = 116;
const VEHICLE_HEIGHT:int = 116;
... |
#!/usr/bin/Rscript
########################################################
# #
# Script to get an overview of finances within self- #
# employed buissnes and to create tables which can be #
# load with latex to automatically create a bill. #
# ... |
#pragma once
#include <SDL2/SDL.h>
#include <SDL2/SDL_mixer.h>
#include "ProjectState.h"
#include "settings/EngineSettings.h"
#include "settings/Project.h"
#include "GUIImage.h"
enum SoundState { SS_STOPPED, SS_PLAYING, SS_PAUSED };
struct EngineVersion {
int major;
int minor;
int fix;
bool is_pre_release;
st... |
# Matter Telink Shell Example Application
You can use this example as a reference for creating your own application.

## Build and flash
1. Run the Docker container:
```bash
$ dock... |
const expect = require('expect');
const request = require('supertest');
const {ObjectID} = require('mongodb');
const {app} = require('./../server');
const {Todo} = require('./../models/todo');
const todos = [{
_id: new ObjectID(),
text: 'First test todo'
}, {
_id: new ObjectID(),
text: 'Second test ... |
#!/usr/bin/perl
# vim: set filetype=perl :
use strict;
use warnings;
use 5.010;
use English qw( -no_match_vars);
use autodie;
use File::stat;
use Cwd;
main() unless caller(0);
sub main {
use Pod::Usage;
use Getopt::Long qw( :config auto_help pass_through );
use File::Path qw( make_path );
use Git;
... |
mod commands;
mod config;
mod server;
use std::cell::OnceCell;
use std::collections::VecDeque;
use std::env;
use std::net::SocketAddr;
use std::sync::{Arc, Mutex};
use std::time::Duration;
use color_eyre::Result;
use dashmap::DashMap;
use enum_map::enum_map;
use log::{error, info};
use serenity::async_trait;
use sere... |
<div class="add-container py-5">
<div class="card-body my-5 py-0">
<h1 class="text-center mt-2">Add User</h1>
<form [formGroup]="registerForm" (ngSubmit)="onSubmit()">
<div class="form-group">
<label for="userName" class="mb-1" [ngStyle]="{'font-size': '16px', 'font-weigh... |
import Server from '../model/server';
import config from '@kaetram/common/config';
import type { SerializedServer } from '@kaetram/common/types/api';
type AddCallback = (id: number) => void;
type RemoveCallback = (key: string) => void;
// Raw server data received from the server itself.
export interface ServerData ... |
shared_examples_for 'a filterable DataFrame' do
describe '#uniq' do
let(:df) { DaruLite::DataFrame.from_csv 'spec/fixtures/duplicates.csv' }
context 'with no args' do
subject { df.uniq }
it 'returns the correct result' do
expect(subject.shape.first).to eq 30
end
end
contex... |
########################################################################
## Script to generate assortativity distribution plots.
## Chromosomal assortativity per tissue and condition, expression
## assortativity in cancer and enriched vs not enriched communities
## in cancer with chromosomal and expression assortati... |
// Caffeine Script (7Kyu)
/*
Complete the function caffeineBuzz, which takes a non-zero integer as its argument.
If the integer is divisible by 3, return the string "Java".
If the integer is divisible by 3 and divisible by 4, return the string "Coffee"
If one of the condition above is true and the integer is even, ... |
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StorecompanyRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*/
public function authorize(): bool
{
return true;
}
/**
* Get the validation rul... |
import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:islami/core/provider/app_provider.dart';
import 'package:islami/moduls/settings/widget/selected_option.dart';
import 'package:islami/moduls/settings/widget/unselected_option.dart';
import 'package:provi... |
/* -*- c++ -*- */
/*
* Copyright 2008-2014 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef SPECTRUM_UPDATE_EVENTS_H
#define SPECTRUM_UPDATE_EVENTS_H
#include <gnuradio/high_res_timer.h>
#include <gnuradio/qtgui/api.h>
#include <gnurad... |
"use client";
import { motion } from "framer-motion";
const SectionTransition = () => {
return (
<>
<motion.div
initial={{ opacity: 0, x: -100 }} // Mulai dengan opacity 0 dan diposisikan di luar layar sebelah kiri
animate={{
opacity: 1,
x: [null, -20, 20, -10, 10, 0],
... |
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { CapaComponent } from './capa/capa.component';
import { PrincipalComponent } from './capa/principal/principal.component';
import { FormsModule } from '@angular/forms';
import... |
import React, { useState } from "react";
import { useSelector, useDispatch } from "react-redux";
import {
increment,
decrement,
incrementByAmount,
} from "../features/counterSlice";
export default function Counter() {
const count = useSelector(state => state.counter.value);
const dispatch = useDispatch();
... |
import { GuildQueue, Track, useQueue } from 'discord-player';
import { EmbedBuilder, MessageComponentInteraction } from 'discord.js';
import { BaseComponentInteraction } from '../../classes/interactions';
import { BaseComponentParams, BaseComponentReturnType } from '../../types/interactionTypes';
import { checkQueueCur... |
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Desafio - Aula 06</title>
<link rel="stylesheet" href="estilo.css">
</head>
<body>
<h1 class="alinhamento">h1 - Título de Nível 01</h1>
<h2 class="ali... |
// 频道信息
export type Channel = {
// 频道名,如"1+1 Hello"
name: string
// logo 地址,可能为空
logo: string | undefined
// 直播源地址,如"https://example.com/playlist.m3u8"
url: string
// 分类,如"Movies"、"Music"
category: string | undefined
// 频道语言,[ { "code": "eng", "name": "English" } ]
languages: Array<{ code: string, n... |
function refreshWeather(response) {
let temperatureElement = document.querySelector("#temperature");
let temperature = response.data.temperature.current;
let cityElement = document.querySelector("#city");
let descriptionElement = document.querySelector("#description");
let humidityElement = document.querySele... |
import { UserModel } from './UserModel'
describe('UserModel', () => {
it('should not be able create a new ID and new encrypted password', () => {
const hash_id = 'HASH_ID'
const hash_password = 'HASH_PASS'
const user = new UserModel(
{
name: 'Maycon Silva',
email: 'a@g.com',
password: hash_passw... |
import { useDispatch } from 'react-redux';
import { cartActions } from '../../store/cart';
import classes from './CartItem.module.css';
const CartItem = (props) => {
const { id, title, quantity, total, price } = props.item;
const dispatch = useDispatch()
const handleAddProductToCart = () => {
dispatch(cart... |
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
part 'counter_event.dart';
part 'counter_state.dart';
class CounterBloc extends Bloc<CounterEvent, CounterState> {
CounterBloc() : super(const CounterState(0)) {
on<IncrementEvent>((event, emit) {
emit(CounterState(st... |
// ACross cross-compile development toolkit
// Author: Javier Peletier <jm@friendev.com>
// Summary: ACross allows you to build your Arduino projects using Visual Studio.
// Your Arduino code is cross - compiled and runs in your PC, which enables
// step - by - step debugging
//
// Copyright (c) 2015 All Rights Reserve... |
import { LensHubProxy } from '@abis/LensHubProxy';
import { gql, useMutation } from '@apollo/client';
import { GridItemEight, GridItemFour, GridLayout } from '@components/GridLayout';
import UserProfile from '@components/Shared/UserProfile';
import { Button } from '@components/UI/Button';
import { Card, CardBody } from... |
import React, { useState } from 'react';
const ForgotPassword = () => {
const [email, setEmail] = useState('');
const [message, setMessage] = useState('');
const handleEmailChange = (e) => {
setEmail(e.target.value);
};
const handleSubmit = (e) => {
e.preventDefault();
// Here you can implement... |
import { ReactElement, createContext, useMemo, useReducer } from "react";
export type CartItemType = {
sku: string;
name: string;
price: number;
qty: number;
};
type CartStateType = { cart: CartItemType[] };
const initCartState: CartStateType = { cart: [] };
const REDUCER_ACTION_TYPE = {
ADD: "ADD",
REMOVE: "... |
# Opens a new tab in the current Terminal window and optionally executes a command.
# When invoked via a function named 'newwin', opens a new Terminal *window* instead.
function newtab_internal {
# If this function was invoked directly by a function named 'newwin', we open a new *window* instead
# of a new tab... |
import { BrowserModule } from '@angular/platform-browser';
import { NgModule, APP_INITIALIZER } from '@angular/core';
import { AppComponent } from './app.component';
import { CoreModule } from './core/core.module';
import { CoreRoutingModule } from './core/core-routing.module';
import { HttpClientModule } from '@angul... |
from typing import Optional
from pydantic import BaseModel, EmailStr, Field, constr, conint, create_model
class SchemaUser(BaseModel):
nombre: constr(strict=True) = Field(...)
apellido: constr(strict=True) = Field(...)
dni: conint(strict=True) = Field(...)
email: EmailStr = Field(...)
telefon... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.