text
stringlengths
184
4.48M
package studip.app.view.util; import java.util.ArrayList; import studip.app.R; import studip.app.db.User; import studip.app.net.ServerItem; import studip.app.view.activities.ActivitiesItem; import studip.app.view.courses.CoursesItem; import studip.app.view.news.NewsItem; import studip.app.view.slideout.MenuItem; impo...
package ShadowSiren.relics; import ShadowSiren.ShadowSirenMod; import ShadowSiren.powers.ChargePower; import ShadowSiren.util.TextureLoader; import basemod.abstracts.CustomRelic; import com.badlogic.gdx.graphics.Texture; import com.google.gson.Gson; import com.google.gson.JsonArray; import com.google.gson.JsonElement;...
# Chapter3 유니언과 리터럴 ## 유니언 (union) 타입을 두 가지 이상으로 확장하는 것 ## 유니언 타입 - 타입의 값이 정확히 어떤 타입인지 모르지만 두개 이상 옵션 중 하나라는 것을 알고있는 경우 코드를 처리하는 개념을 **유니언**이라고 한다. - **예제 코드**를 보면 **mathematician** 변수의 값은 **undefined** 혹은 **string**가 될 수 있는 것을 알수 있고 변수에 마우스를 가져가면 `let mathematician : string | undefined`로 타입이 간주되는 것을 알수 있다. ```tsx...
// SPDX-License-Identifier: Apache-2.0 and MIT // Copyright 2015-2023 Christoph Zengler // Copyright 2023-20xx BooleWorks GmbH package com.booleworks.logicng.datastructures; import com.booleworks.logicng.formulas.FormulaFactory; import com.booleworks.logicng.formulas.Literal; import com.booleworks.logicng.formulas.im...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> .header { text-align: center; } </style> </head>...
// // MovieUtilTest.swift // MovieManiaTests // // Created by Ahmad Ubaidillah on 13/07/21. // import XCTest @testable import MovieMania class MovieUtilTest: XCTestCase { var movieUtil: MovieUtil! var realmRepo : RealmRepo! override func setUp() { super.setUp() movieUtil = Mov...
// const inquirer = require('inquirer'); let inquirer; // Use dynamic import to resolve the ES Module issue try { inquirer = require('inquirer'); } catch (error) { console.error( 'Error loading inquirer module. Try running "npm install inquirer" to install it.' ); process.exit(1); } const fs = require('fs...
from django.db import transaction from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth.models import AnonymousUser from rest_framework import serializers from ..models import BlogPost from permission.models import PostPermission, Category, Permission, CategoryName class BlogPostSerializer(s...
<template> <div class="footer-collapse"> <header> <h6 @click="toggle"> {{ title }} </h6> </header> <div v-if="isExpanded" class="footer-collapse__content"> <slot /> </div> </div> </template> <script lang="ts"> import { defineComponent, ref } from '@nuxtjs/composition-api' ...
#include <iostream> #include <boost/asio.hpp> #include <boost/version.hpp> #include <tbb/concurrent_queue.h> #include <thread> #include <chrono> namespace asio = boost::asio; using asio::ip::tcp; using namespace std::chrono_literals; class Session; tbb::concurrent_bounded_queue<std::shared_ptr<Session>> queue{}; c...
import React, { useState, useEffect } from 'react'; import axios from 'axios'; import Match from '../home/Match'; import { mdiCardsHeartOutline, mdiChevronRight, mdiMessageReplyOutline, } from '@mdi/js'; import Icon from '@mdi/react'; import ExploreNavbar from './ExploreNavbar'; import MatchDetail from '../home/O...
import API_KEY from "./apikey.js"; import weatherConditions from "./assets/weather_conditions.json" assert { type: "json" }; const search = document.getElementById("search"); const suggestions = document.querySelector(".suggestions"); search.addEventListener("input", async () => { const value = search.value; sugg...
import OpenAI from 'openai'; import { NextRequest, NextResponse } from 'next/server'; import { Stream } from 'openai/streaming'; import { ulid } from 'ulidx'; import { createMessage } from '@/app/api/utils/messages'; import { getOpenAIObjectForAssistant } from '@/app/api/openai/util'; import prisma from '@/app/api/util...
# Standard Library Imports from datetime import datetime # 3rd Party Imports # Local Imports from PokeAlarm.Utils import get_time_as_str, get_gmaps_link, \ get_applemaps_link, get_dist_as_str from . import Event from PokeAlarm import Unknown class Egg(Event): """ Event representing the change occurred in a Gy...
<?php namespace Database\Factories; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; /** * @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\Expense> */ class ExpenseFactory extends Factory { /** * Define the model's default state. * * @return array<str...
[![GymGPT](https://flow-prompt-covers.s3.us-west-1.amazonaws.com/icon/minimalist/mini_4.png)](https://gptcall.net/chat.html?data=%7B%22contact%22%3A%7B%22id%22%3A%2245kpKz5BpHuRK6l_4XWV8%22%2C%22flow%22%3Atrue%7D%7D) # GymGPT | [Start Chat](https://gptcall.net/chat.html?data=%7B%22contact%22%3A%7B%22id%22%3A%2245kpKz5B...
import "dart:math"; import "package:flutter/material.dart"; import 'package:random_avatar/random_avatar.dart'; // import "package:get/get.dart"; import "package:go_router/go_router.dart"; // import 'package:tripmating/Controller/SignupController.dart'; import "package:tripmating/model/login-model/SignupDTO.dart"; im...
package scalatagame import ( "github.com/alarmfox/game-repository/api" "github.com/alarmfox/game-repository/model" "gorm.io/gorm" ) type Repository struct { db *gorm.DB } func NewRepository(db *gorm.DB) *Repository { return &Repository{ db: db, } } func (gs *Repository) Create(r *CreateRequest) (ScalataGame...
import { nanoid } from "nanoid"; import { z } from "zod"; import { createTRPCRouter, publicProcedure, protectedProcedure, } from "~/server/api/trpc"; import { messageArrayValidator, messageValidator } from "~/utils/utils"; export const ChatRouter = createTRPCRouter({ ChatMessages: protectedProcedure .input...
import {Field, ID, ObjectType, registerEnumType} from "type-graphql"; import {Role} from "@prisma/client"; import {Member} from "./Member"; @ObjectType() export class Student { @Field(type => ID) id: number; @Field() name: string; @Field() surname: string; @Field() uid: string; ...
<p align="center"> <img width="900px" src="https://github.com/beatriz-lafuente/AirplaneDetection/blob/main/images/plane1.jpg" align="center" alt="Computer Vision: Airplane Detection" /> <h2 align="center">Computer Vision: Airplane Detection</h2> <p align="center">The goal of this project is to use a CNN that can ide...
import { Component, OnDestroy, OnInit } from "@angular/core"; import { DocumentData, DocumentSnapshot, QueryDocumentSnapshot, QuerySnapshot } from "@angular/fire/firestore"; import { FormControl, FormGroup, Validators } from "@angular/forms"; import { MatDialog, MatDialogConfig } from "@angular/material/dialog"; import...
import { useState, useEffect } from "react"; import React from "react"; import IconBtn from "../../../../components/common/IconBtn"; import { useNavigate } from "react-router-dom"; import { useDispatch, useSelector } from "react-redux"; import { addJobPost } from "../../../../services/operations/jobPostAPI"; import { ...
// // CryptoListPresentableItem.swift // CoinGekoiOS // // Created by Carlos Caraccia on 6/17/24. // import Foundation // Type that we'll use to display inside the view model struct CryptocurrencyListPresentableItem: Identifiable { let id: String let name: String let symbol: String let price: Strin...
import React from "react"; import SquarebagelDesktop from "./SquarebagelDesktop"; import SquarebagelMobile from "./SquarebagelMobile"; export const App = () => { const [isMobile, setIsMobile] = React.useState(window.innerWidth <= 768); React.useEffect(() => { const handleResize = () => { s...
export const colorSchemePipe:Record<string, Function> = { 'red': function () { return '#ef4b44'; }, 'orange': function () { return '#ff9900'; }, 'green': function () { return '#01d092'; }, 'blue': function () { return '#57c0ff'; }, 'cap-coc': function (value:number) { if (value < 0) return colorSchemePip...
# This code is importing necessary modules and functions for the Flask web application. from flask import Flask, render_template, request, jsonify from text_sentiment_prediction import * # `app = Flask(__name__)` creates an instance of the Flask class and assigns it to the variable `app`. # The `__name__` argument is ...
// SPDX-License-Identifier: GPL-3.0-only /* * Prism Launcher - Minecraft Launcher * Copyright (c) 2022 flowln <flowlnlnln@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, ...
import "dotenv/config"; import { typeDefs, resolvers } from "./grapqhl"; import { ApolloServer, CorsOptions } from "apollo-server-express"; import express, { Application, CookieOptions } from "express"; import { connectDatabase } from "./database"; import bodyParser from "body-parser"; import multer from "multer"; i...
import React, { useState, useEffect } from "react"; import axios from "axios"; import "./Storage.css"; function Storage({ userName }) { const [images, setImages] = useState([]); useEffect(() => { fetchImages(); }, [userName]); const fetchImages = () => { axios .post(`http:...
const sequelize = require('sequelize'); class AnimalsService { constructor(db) { this.sequelize = db.sequelize; this.Animal = db.Animal; this.Specie = db.Specie; this.Size = db.Size; this.Temperament = db.Temperament; } async getAnimals() { const animals = await this.sequelize.query( ...
<?php /** * Tatoeba Project, free collaborative creation of multilingual corpuses project * Copyright (C) 2009 BEN YAALA Salem <salem.benyaala@gmail.com> * Copyright (C) 2011 HO Ngoc Phuong Trang <tranglich@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms ...
import { Bike } from "./bike"; import { Rent } from "./rent"; import { User } from "./user"; import crypto from 'crypto' export class App { users: User[] = [] bikes: Bike[] = [] rents: Rent[] = [] findUser(email: string): User | undefined { return this.users.find(user => { return user.email ==...
""" Lambda function Lambda function merupakan bentuk sintaks penyederhanaan terhadap suatu fungsi spesifik. Lambda function secara implisit sudah menghasilkan return value dari expressionnya sehingga tidak perli mendeklarasikan return value. Struktur fungsi lambda dibentuk sebagai berikut. variabel_output = lambda arg...
import React from "react"; import { useState } from 'react'; import Row from 'react-bootstrap/Row'; import Col from 'react-bootstrap/Col'; import Container from "react-bootstrap/Container"; import Button from 'react-bootstrap/Button'; import Form from 'react-bootstrap/Form'; import styles from "./languageEditModal.modu...
<?php namespace App\Http\Controllers\Api\admin; use App\Http\Controllers\Controller; use App\Http\Requests\StorePostRequest; use App\Models\Category; use App\Models\Post; use App\Models\Tag; use Illuminate\Http\Request; use Intervention\Image\Facades\Image; class PostController extends Controller { public functi...
import { useId } from 'react' import { breakpoints, CSSPropertyValue, CSSProperties, CustomCSSProps } from '@common/utils' import { Breakpoint } from '@hooks/useBreakpoints' const ROOT_SELECTOR = '.root' const stylePropMap = { p: ['padding'], pt: ['padding-top'], pb: ['padding-bottom'], pl: ['padding...
"use client" import { useState, useEffect } from 'react' import { IPitchMap } from "@/common/types" import { chromaticPitches, getMajorTriadPitchMaps, pitchMapsAreSimilar, PITCH_MAP_DISPLAY_MODE } from "@/common/utils/pitch-map" import PitchMapPicker from "@/frontend/components/PitchMapPicker" import PitchMapResults fr...
Assignment 12 Prompt the user for a number of coin flips (x) and then simulate (x) number of coin flips and print the results to the terminal. Hint: Look up the srand() function. Example Output ``` tokyo:~/LearningC/ # ./assignment12 How many times would you like to flip the coin? 50...
"use client" import { useAppStore } from "@/store/store"; import { useUser } from "@clerk/nextjs" import { useState } from "react"; import { Button } from "@/components/ui/button" import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, } f...
1. Linux系统简介 - Unix与Linux发展史 - 开源软件简介 - Linux应用领域 - Linux学习方法 2. Linux系统安装 - VMware虚拟机安装与使用 - 系统分区 - Linux系统安装 - 远程登录管理工具 3. 初学者建议 4. Linux常用命令 - 文件处理命令 - 命令格式与目录处理命令ls - 命令格式:命令 [-选项] [参数]。 例:ls -la -/etc - 说明:1. 个别命令使用不遵守此格式。2.当有多个选项时,可以写在一起。3.简化选项与完整选项,-a 等于 --all ...
using Microsoft.AspNetCore.Mvc.RazorPages; using System; using System.Collections.Generic; using System.Linq; namespace Projeto.Pages { public class CriarPedidoModel : PageModel { public string Mensagem { get; set; } public void OnGet() { // Lógica para processar a solicita...
import { Catch, ExceptionFilter, ArgumentsHost, HttpException, } from '@nestjs/common'; import { I18nContext } from 'nestjs-i18n'; import { I18nTranslations } from 'src/generated'; @Catch(HttpException) export class HttpExceptionFilter implements ExceptionFilter { catch(exception: HttpException, host: Argume...
# Collections Examples, Kristopher Cooper v0.2a # LIST -- ORDERED,CHANGEABLE, ALLOWS DUPLICATE VALUES breakfastFoods = ["Bacon", "Waffles", "Pancakes","Ceral", "Milk"] # Each item on the list is known as an ELEMENT. # The position in the list for each is the INDEX. # The element "Bacon" is at index 0. # Python Only: in...
/*---------------------------------------------------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | www.openfoam.com \\/ M anipulation | -----------------------------------...
interface Person{ name:string; age: number; dob: Date; gender: "Male"|"Female"; //literal type address?:{ building: string, area:string, zip: number, province: string, } } const Man:Person = { name: "Qasim", age: 223, dob: new Date(), gender:"Male...
# # (C) Tenable Network Security, Inc. # # The descriptive text and package checks in this plugin were # extracted from Amazon Linux AMI Security Advisory ALAS-2013-163. # include("compat.inc"); if (description) { script_id(69722); script_version("$Revision: 1.7 $"); script_cvs_date("$Date: 2015/01/30 14:43:53 ...
const STORAGE_NAME = "qb41tc90zEkiDiOh6UcjD0ChhuSmRyfh"; const SPELL_NAMES = get_spell_names(); let undo = () => {}; function get_spell_names() { let spells = Object.values(all_spells).sort(compare_spells); return spells.map((spell) => spell.name); } function get_card_names() { let state = Array.from( docum...
""" SQL-style merge routines """ from __future__ import annotations import copy import datetime from functools import partial import hashlib import string from typing import ( TYPE_CHECKING, Hashable, cast, ) import warnings import numpy as np from pandas._libs import ( Timedelta, hashtable as li...
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Caesar Cipher</title> <style> body { font-famil...
<!-- ~ This program is part of the OpenLMIS logistics management information system platform software. ~ Copyright © 2013 VillageReach ~ ~ This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation...
# Nested Lists Given the names and grades for each student in a class of **N** students, store them in a nested list and print the name(s) of any student(s) having the second lowest grade. **Note:** If there are multiple students with the second lowest grade, order their names alphabetically and print each name on a...
--- layout: article title: Vagrantで開発環境構築 tags: aside: toc: true --- [Vagrant公式サイトのQuick Start](https://learn.hashicorp.com/tutorials/vagrant/getting-started-index?in=vagrant/getting-started)を読みながら進めます ## Vagrantをインストール - 公式サイトからVagrantをインストール https://www.vagrantup.com/downloads - 公式サイトからVirtualBoxをインストール https...
/** Instructions: Make use of .map(), .filter() and .find() methods. You can make use of basic methods such as .length, toLowerCase(), toUpperCase() if needed. Do NOT use for-loops. */ /** 1. Given an array of objects representing people, write an ES6 function to return a new array containing on...
import 'package:flutter/material.dart'; import 'package:peliculas/models/models.dart'; import 'package:peliculas/widgets/widgets.dart'; //El key es una manera de identificar el widget en el arbol de widgets class DetailsScreen extends StatelessWidget { const DetailsScreen({Key? key}) : super(key: key); @override ...
import React, { useContext } from "react"; import { ThemeContext } from "../App"; import Frame1 from "../Img/Group 9.svg"; import style from "../styles/style.module.css"; import { motion } from "framer-motion"; const Experience = () => { const theme = useContext(ThemeContext); return ( <motion.main clas...
import PropTypes from 'prop-types'; import { Button, ButtonItem, ButtonList } from './FeedbackOptions.module'; export const FeedbackOptions = ({ options, onLeaveFeedback }) => { return ( <ButtonList> {options.map(option => ( <ButtonItem key={option}> <Button name={option} type="button" on...
package com.github.hoseinzare67.training.telegram.bot.game; import com.github.hoseinzare67.training.telegram.bot.game.exception.InternalBotException; import com.github.hoseinzare67.training.telegram.bot.game.exception.PlayerHistoryStoreDataException; import com.github.hoseinzare67.training.telegram.bot.game.handler.Re...
<?php namespace App\Http\Requests\User; use Illuminate\Foundation\Http\FormRequest; class LoginRequest extends FormRequest { /* * @return boolean */ public function authorize() { return true; } /* * @return array */ public function rules() { return [ ...
package info.ilong.oms.pojo; import java.util.ArrayList; import java.util.List; public class ProductRelExample { protected String orderByClause; protected boolean distinct; protected List<Criteria> oredCriteria; public ProductRelExample() { oredCriteria = new ArrayList<Criteria>(); } ...
import React, {useState} from 'react'; import Box from '@mui/material/Box'; import {DataGrid} from '@mui/x-data-grid'; import {randomStatusOptions, randomPrice} from '@mui/x-data-grid-generator'; import {styled} from "@mui/material"; const usdPrice = { type: 'number', width: 130, valueFormatter: ({value}) ...
// @(#)root/unix:$Id: 887c618d89c4ed436e4034fc133f468fecad651b $ // Author: Fons Rademakers 15/09/95 /************************************************************************* * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * * All rights reserved. ...
using Promptlet.Infrastructure.Models; using System.Diagnostics.CodeAnalysis; namespace Promptlet.Infrastructure.Data { [ExcludeFromCodeCoverage] public static class DbInit { public static void Init(PromptletDbContext dbContext) { if (dbContext.PromptletCollections.Any()) { ret...
import express from "express"; import handlebars from "express-handlebars"; import morgan from "morgan"; import session from "express-session"; import passport from "passport"; import { errorHandler } from "./middlewares/errorHandler.js"; import userSession from "./middlewares/userSession.js"; import { __dirname, mongo...
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WsClient = exports.subprotocolsV3 = exports.subprotocolsV2 = void 0; const client_js_1 = require("../client.js"); const index_js_1 = require("../encoding/index.js"); const errors_js_1 = require("../errors.js"); const id_alloc_js_1 = re...
import { Button, Form, Input, Spin, Card } from 'antd'; import { useNavigate } from 'react-router-dom'; import { useMutation, useQuery } from '@apollo/client'; import { EDIT_USER } from '../utils/mutations'; import { QUERY_ME } from '../utils/queries'; import { LoadingOutlined } from '@ant-design/icons'; import { toast...
README qmail SMTP Authentication Scope: ------ This patch supports RFC 2554 "SMTP Service Extension for Authentication" and RFC 4409 "Message Submission for Mail" for * qmail-smtpd and * qmail-remote and supports commonly the AUTH methods - CRAM-MD5 - LOGIN (unsecure) - PLAIN (unsecure) Additionally, RFC 1870...
{% extends 'base.html.twig' %} {% block title %}Nouveau Medecin {% endblock %} {% block content %} <div class="page-wrapper"> <div class="content"> <div class="row"> <div class="col-sm-12"> <div class="card"> <div class="card-body"> {{ form_start(form, {'attr': {'novalidate': 'novalidate'}...
// 这题的关键在于,要知道,当手上拿到不同的key的情况下,是不同的state。我想到了一个例子,如下。这种情况要走三步,而不是BFS简单的1步。看了答案才知道用如下的解法。有人用bit 方法来存state,会更快。但是我不知道怎么做。我这里用TreeSet,最主要的是在visited, equals的时候,需要是有序的。也有人用StringBuilder来存,因为拿到锁的顺序永远是固定的,用BFS的话。锁只会更多,不会更少。如果确定每一把锁只有一个,则可以有优化的解法。不要太纠结,我觉得能写出来这样,已经不错了。 class Solution { public int shortestPathAllKeys(Strin...
import { Injectable } from '@angular/core'; import { Http, Response, RequestOptions, Headers, Request, RequestMethod } from '@angular/http'; import { Observable } from 'rxjs/Observable'; import 'rxjs/add/operator/map'; import 'rxjs/add/operator/do'; import 'rxjs/add/operator/publishReplay'; let sending; let sent; let...
import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:the_helper/src/common/extension/build_context.dart'; import 'package:the_helper/src/common/widget/search_bar/river_debounce_search_bar.dart'; import 'package:the_helper/src/features/news/domain/news_query.da...
package com.yedam.java.ch0605; public class Car { // 필드 public String model; public int speed; // 정적 필드 - 생산 수량 public static int count; // 생성자 // 생성자 만들었기 때문에 자바는 기본 생성자 만들지 않음 public Car(String model) { this.model = model; // car라는 생성자를 호출한다는 것은 이미 인스턴스를 만들겠다고 자바한테 예고한것 => 자바는 this를 생성할 객체로 인식한다 Ca...
# -*- coding: utf-8 -*- # Example code for telegrambot.py module from telegram.ext import CommandHandler, MessageHandler, Filters from django_telegrambot.apps import DjangoTelegramBot from django.contrib.auth.models import User from loginsys.models import Link_with_email import logging logger = logging.getLogger(__nam...
 using System.Data.Entity; using LinqKit; using System.Linq.Dynamic.Core; using System.Linq.Expressions; using System.Reflection; using System.Text.RegularExpressions; using Domain.Common.PagedList; using Mapster; using Domain.Common.Queries.Interface; namespace Persistence.Common { internal static class EntityFr...
/* * CS 315 Programming Assignment 3: Graphs * Description: Implements Dijkstra's algorithm, along with Graph and minheap implementation * Jacob Schuetter * Created 3 Nov 2023 * History: * 3-Nov: Implemented testHeap function to ensure functionality * 6-Nov: Implemented testGraph function with BFS functionality to tes...
import { Component, OnInit, ViewChild } from '@angular/core'; import { MatDialog, MatDialogRef, MAT_DIALOG_DATA, } from '@angular/material/dialog'; import { MatPaginator } from '@angular/material/paginator'; import { MatSort } from '@angular/material/sort'; import { MatTableDataSource } from '@angular/material/ta...
/* * Copyright (C) 2004 * Swiss Federal Institute of Technology, Lausanne. All rights reserved. * * Developed at the Autonomous Systems Lab. * Visit our homepage at http://asl.epfl.ch/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public Lice...
<script setup> import { InformationCircleIcon, PlayIcon } from "@heroicons/vue/24/outline"; import DesktopLayout from "../../layouts/desktop/DesktopLayout.vue"; import List from "@/components/core/list/List.vue"; import ListItem from "@/components/core/list/ListItem.vue"; import Modal from "@/components/core/modal/moda...
/* * Copyright (c) 2008-2012, Matthias Mann * * 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 copyright notice, * thi...
#include <fstream> #include <iostream> #include <sstream> #include <chrono> #include "condition_record.hpp" bool cConditionRecord::foldingEnabled = false; void cConditionRecord::GlobalEnableFolding(const bool arg_enableFolding) { foldingEnabled = arg_enableFolding; } std::list<cConditionRecord> cConditionRecord::P...
<?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:cc="http://xmlns.jcp.org/jsf/composite" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="ht...
#+author: conao #+date: <2018-12-14 Fri> *DEPRECATED*: This package is deprecated. Please use package.el. Technical Notes: Package maintainers assume that the packages they develop will be installed at run-time with package.el. Therefore, they may ask the user for interactive input during installation. I conclude th...
// // CategoriesDataSource.swift // News // // Created by Tomas Pecuch on 09/11/2018. // Copyright © 2018 Tomas Pecuch. All rights reserved. // import Foundation import UIKit //structure that represents single category struct CategoryData { let key: String let name: String } class CategoryDataSource: NSO...
<!DOCTYPE html> <html xmlns:th="http://www.thymeleaf.org"> <head> <title>Digital Hub_about</title> <!-- Meta --> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="description" content="Blog T...
import { Column, CreateDateColumn, Entity, ManyToOne, PrimaryGeneratedColumn, UpdateDateColumn, } from 'typeorm'; import { User } from '../user/user.entity'; @Entity({ name: 'reports' }) export class Report { @PrimaryGeneratedColumn('uuid') id: string; @Column() price: number; @Column() make:...
import React from 'react'; import axios from 'axios'; import { Text, View, TextInput, Button as TextButton, Image, ScrollView } from 'react-native'; import Styles from '../Styles.js'; import { Button, RadioButton, Searchbar, Menu } from 'react-native-paper'; import TopicLink from './TopicLink.jsx'; class Level extends...
// // ContentView-ViewModel.swift // Faces // // Created by Giorgio Latour on 5/21/23. // import Foundation import UIKit extension ContentView { @MainActor class ViewModel: ObservableObject { @Published var inputImage: UIImage? @Published var showingImagePicker: Bool = false @P...
import Moralis from "moralis/dist/moralis.js"; import { NftMetadata, NftOwnerModel, ListedNftModel, MumbaiDepositLPModel } from "../../interfaces/models/NftOwnerModel"; import axios from "axios"; import { useContract } from "./contract"; import { useMoralis } from "./moralis"; import { useAlert } from "../layout/alert"...
# Data config for ConvNet experiments import os import torch import pandas as pd import numpy as np from torchvision import datasets, transforms from torch.utils.data import Dataset, DataLoader, Sampler from sklearn.model_selection import RepeatedKFold from os import path as osp import forge from forge import flags ...
## Elasticsearch的Java客户端 es官方支持的客户端列表 https://www.elastic.co/guide/en/elasticsearch/client/index.html java客户端: https://www.elastic.co/guide/en/elasticsearch/client/java-api-client/current/index.html spring-data-elasticsearch https://spring.io/projects/spring-data-elasticsearch/ ### 1. 引入依赖 gradle ```groovy ...
import * as React from 'react'; import Paper from '@mui/material/Paper'; import Table from '@mui/material/Table'; import TableBody from '@mui/material/TableBody'; import TableCell from '@mui/material/TableCell'; import TableContainer from '@mui/material/TableContainer'; import TableHead from '@mui/material/TableHead'; ...
<script setup> const format = (percentage) => (percentage / 10) import { ref } from "vue"; const isShow = ref(false); const showMore = () =>{ isShow.value =! isShow.value; } </script> <template> <div class="flex flex-col items-center justify-center space-y-5"> <div class="flex items-center jus...
import request from "supertest"; import { Connection } from "typeorm"; import { v4 as uuidV4 } from "uuid"; import { app } from "../../../../app"; import createConnection from "../../../../database/index"; import { hash } from "bcryptjs"; let connection: Connection; describe("Show User Profile Controller", () => { ...
load(file = "./data/spain_geodata_temperature_1989_spring.RData") ## librerias básicas library(dplyr) library(ggplot2) library(ggpubr) library(readr) library(reshape2) ## Librerias de geo estadística library(geoR) library(gstat) library(rgdal) library(sp) library(spdep) library(MASS) powerTransform <- function(y, ...
//Generics - Reusable Types. // We use this technique to create customizable classes. // Syntax class KeyValuePair<K, V>{ constructor( public key: K, public value: V ) { } } let pair = new KeyValuePair<number, string>(1, 'Alfredo') //Generic Functions class ArrayUtils { wrapInArray<...
<?php /** * Created by IntelliJ IDEA. * User: gayan * Date: 7/10/18 * Time: 10:23 AM */ ?> @extends('admin_template') @section('content') <div class="container-fluid" ng-controller="poCtrl" ng-app="poApp"> <div class="card" id="main"> <div class="card-header"> @if($grn_detai...
#!/bin/bash # Calculate address range from given ip address with mask # @ Version 1.0 # © 2018 Leonardo Ziviani all rights reserved # Text color and style DEFAULT='\e[0m' RED='\e[0;31m' GREEN='\e[0;32m' YELLOW='\e[0;33m' # Global variables MASK="32" MASK_BIT="8" MASK_MAX_DEC="255" MASK_MAX_BIN="11111111" MASK_MIN_DE...
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* Bureaucrat.cpp :+: :+: :+: ...
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:p="http://primefaces.org/ui" template="/templates/templateContenido.xhtml" xmlns:a="http://xmlns.jcp.org/jsf/passthrough"> <ui:defi...
-- Revisão de edição de tabelas CREATE TABLE TABELA( COLUNA1 VARCHAR(30), COLUNA2 VARCHAR(30), COLUNA3 VARCHAR(30) ); -- Podemos adicionar uma propriedade com ADD ALTER TABLE TABELA ADD PRIMARY KEY (COLUNA1); -- Também podemos adicionar uma nova coluna ALTER TABLE TABELA ADD COLUNA4 VARCHAR(30); -- Podem...