text
stringlengths
27
775k
import configureMockStore from 'redux-mock-store'; import thunk from 'redux-thunk'; import moxios from 'moxios'; import { LOGIN_SUCCESS, PASSWORD_RESET_REDIRECT, LOGOUT, REGISTER_SUCCESS, } from '../../auth/redux'; import * as redux from '../redux'; import { SETTINGS_SAVE_SUCCESS, SETTINGS_AVATAR_SUCCESS, ...
--+ holdcas on; set names utf8 collate utf8_en_ci; select SET{'A', 'a'}; set names iso88591 collate iso88591_en_ci; select SET{'A', 'a'}; set names iso88591; commit; --+ holdcas off;
mysql -u root -e "DROP DATABASE IF EXISTS xhprof_stat3;CREATE DATABASE xhprof_stat3;"; php migrate.php
import { Client } from "discord.js"; import { config } from "dotenv"; import "reflect-metadata"; import Container from "typedi"; import { MessageHandler } from "./messageHandler"; import { DiscordBot } from "./utils/client"; /* Setup dotenv */ config(); /* DI the bot */ const bot = Container.get(DiscordBot); /* DI th...
using System; using System.Collections.Generic; using System.Diagnostics; using System.Threading; using Microsoft.VisualStudio.TestTools.UnitTesting; using FluentAssertions; using P3Net.Kraken.ComponentModel; using P3Net.Kraken.UnitTesting; namespace Tests.P3Net.Kraken.ComponentModel { [TestClass] public pa...
-- phpMyAdmin SQL Dump -- version 5.0.1 -- https://www.phpmyadmin.net/ -- -- Host: localhost -- Generation Time: Jun 17, 2020 at 07:07 AM -- Server version: 10.4.11-MariaDB -- PHP Version: 7.2.28 SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET AUTOCOMMIT = 0; START TRANSACTION; SET time_zone = "+00:00"; /*!40101 SET @OL...
#!/bin/bash # Loops #1 While loop 2: The for loop 3: The until loop 4: select loop # Example 1: while loop a=0; while [ $a -lt 10 ]; do b="$a"; while [ $b -ge 0 ] do echo -n "$b "; b=`expr $b - 1`; done; echo a=`expr $a + 1`; done; # Example 2: Until loop c=0; while [ $c -lt 10 ] do echo $c; ...
class C { import b1.b2._ println(/* path: b1.b2.C3 */C3.getClass) println(classOf[/* path: b1.b2.C3 */C3]) }
unit mixed_calc_1; interface implementation function GetStr(const B: string; I, C: Int32): string; begin Result := B + 'VALUE'; end; var A, B: string; procedure Test; var i: Int32; begin i := 0; B := 'NEW'; A := B + GetStr(B, 1 + i, i); end; initialization Test(); finalization Assert(A = 'NE...
#!/bin/bash # Guard clause check if required binaries are installed which wget > /dev/null || { echo "Error: wget not installed." ; exit 1 ; } which egrep > /dev/null || { echo "Error: egrep not installed." ; exit 1 ; } # Recursively traverse directories in repo scraping markdown file for URLs # containing pdfs. Down...
@extends('layouts.app') @section('title', 'Trainers Create') @section('content') <h1> Hellow world, TEXLAVE </h1> @if ($errors -> any()) <div class="alert alert-danger"> @foreach ($errors->all() as $err) <p>{{$err}} </p> @endforeach </div> @endif <div class="container"> @include('trainers.form...
> 写写代码,做做设计, > 离开世界之前,一切都是过程。 hello,我是卫娇,我的[博客](http://www.weijiao.site/)、[微博](weibo.com) ##### Talks - [搭建自己的博客][1] · [CSDN](https://www.csdn.net/) - [Baidu][2] - 我就是我 [1]: //www.weijiao.site/2018/11/08/%E6%90%AD%E5%BB%BA%E8%87%AA%E5%B7%B1%E7%9A%84%E5%8D%9A%E5%AE%A2/ [2]: //www.baidu.com
# Cookify carrot broccoli asparagus cauliflower corn cucumber green pepper lettuce mushrooms onion potato pumpkin red pepper tomato beetroot brussel sprouts peas zucchini radish sweet potato artichoke leek cabbage celery chili garlic basil coriander parsley dill rosemary oregano cinnamon saffron green bean bean chick...
/// <reference types="react" /> import { IDetailsColumnProps } from './DetailsColumn.types'; export { IDetailsColumnProps }; export declare const DetailsColumn: React.StatelessComponent<IDetailsColumnProps>;
import 'package:Covid19_PH/ui/pages/views/facilities_view/facilities_view_model.dart'; import 'package:Covid19_PH/ui/widgets/facilities_widgets/facilities_details_row.dart'; import 'package:Covid19_PH/ui/widgets/facilities_widgets/facilitites_title.dart'; import 'package:Covid19_PH/util/constants.dart'; import 'package...
#!/bin/bash -e export EC2_API_TOOLS_DOWNLOAD_URL='http://s3.amazonaws.com/ec2-downloads/ec2-api-tools.zip' export EC2_API_TOOLS_INSTALL_FOLDER_PATH='/opt/ec2-api-tools'
package day7 import ( "io/ioutil" "regexp" "strconv" "strings" ) func part2() { input, _ := ioutil.ReadFile("day-7/input.txt") rules := strings.Split(string(input), "\n") bagRules := map[string][]string{} for _, rule := range rules { if rule == "" { break } splitRule := strings.Split(rule, " conta...
package fm.force.ui.reducer.state data class AppPreferences( val themeType: String, val appTitle: String, val activeViewDisplayName: String, val responsiveDrawerOpen: Boolean ) { companion object } fun AppPreferences.Companion.of() = AppPreferences( themeType = "light", appTitl...
from pr2modules.netlink import nla class iw_event(nla): nla_map = ((0xB00, 'SIOCSIWCOMMIT', 'hex'), (0xB01, 'SIOCGIWNAME', 'hex'), # Basic operations (0xB02, 'SIOCSIWNWID', 'hex'), (0xB03, 'SIOCGIWNWID', 'hex'), (0xB04, 'SIOCSIWFREQ', 'he...
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\InventoryCache\Model; use Magento\Framework\EntityManager\EventManager; use Magento\Framework\Indexer\CacheContext; /** * Clean cache for given product ids. */ class Fl...
var _qrt = require("quark/quark_runtime.js"); _qrt.plugImports("inheritance/t2"); var quark = require('quark').quark; exports.quark = quark; // CLASS A function A() { this.__init_fields__(); } exports.A = A; function A__init_fields__() {} A.prototype.__init_fields__ = A__init_fields__; _qrt.lazyStatic(function(...
package main type Proposal struct { id int blah int } type Promise struct { id int yes bool } type Acceptance struct { id int yes bool }
--- title: use strict 严格模式 date: 2016-09-10 tag: javaScript --- ## 概述 > 除了正常运行模式,ECMAscript 5添加了第二种运行模式:"严格模式"(strict mode)。顾名思义,这种模式使得Javascript在更严格的条件下运行。 <!-- more --> ### 设立严格模式的目的有以下几个: 1. 消除JavaScript语法的一些不合理,不严谨之处,减少一些怪异行为; 2. 消除代码运行的一些不安全之处,保证代码运行的安全; 3. 提高编译器效率,增加运行速度; 4. 为未来版本的JavaScript做好铺垫 严格模式"体现了Jav...
# MvcSeed [![Build Status](https://travis-ci.org/cpsa3/MvcSeed.svg)](https://travis-ci.org/cpsa3/MvcSeed) Boilerplate for ASP.NET MVC Project. ### 说明: - 支持OAuth2.0登录(Github,Wechart) - 登录支持RSA加密 - 支持Memcached - ORM使用[Dapper](https://github.com/StackExchange/dapper-dot-net) - 依赖注入使用[Unity](https://unity.codeplex.com/) ...
import { createScopedReducer } from '@shoutem/redux-api-sdk'; import { reducer as formReducer } from 'redux-form'; import _ from 'lodash'; import appReducer, { moduleName as app } from './modules/app'; import notificationReducer, { moduleName as notification, } from './modules/notifications'; import groupReducer, { m...
/* Quick and dirty but portable reference implementation of Twofish; Sticking uncomfortably close to the definition. copyright (c) 2014 marc schoolderman permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright noti...
import React from 'react'; const SvgArdr = props => ( <svg width={props.width || 64} height={props.height || 64} {...props}> <path fillRule="evenodd" d="M16 32C7.163 32 0 24.837 0 16S7.163 0 16 0s16 7.163 16 16-7.163 16-16 16zm-.117-14.81L12.5 23l5.152-3.498-1.769-2.312zM16 6L6 23h5.455l7.272-12.526L...
! Single precision function to calculate Julian date FUNCTION julian_date(YYYY,MM,DD) ! IMPLICIT NONE INTEGER, INTENT(IN) :: YYYY,MM,DD ! DATE ROUTINE julian_date(YYYY,MM,DD) CONVERTS CALENDER DATE TO ! JULIAN DATE. SEE CACM 1968 11(10):657, LETTER TO THE ! EDIT...
<?php namespace AC\Helper\Select; interface Value { /** * @param $entity * * @return string */ public function get_value( $entity ); }
/** * Created by lejard_h on 18/10/15. */ library polymer_include_element.behavior; import 'dart:html'; import 'package:polymer/polymer.dart'; @behavior abstract class PolymerIncludeElementBehavior { include(elem, PolymerDom parent) { removeChildren(parent); if (parent != null) { if (elem is Html...
--- title: Working With JSON APIs localeTitle: Trabajar con API de JSON --- ## Trabajar con API de JSON Un uso común de JSON es leer datos de un servidor web y mostrar los datos en una página web. Este capítulo le enseñará cómo intercambiar datos JSON entre el cliente y un servidor PHP. ### El archivo PHP PHP tiene...
const { success3, error2 } = require('../../utils/functions.js'); module.exports = { name: 'invite', description: 'Invites someone to the party.', category: 'party', aliases: ['inv'], usage: '<user>', example: 'Azlxy.', run: async (client, bot, message, args, getCosmetic) => { const user = args.slic...
<?php namespace App\Modules\Conselho\Model; use App\Modules\Upload\Model\Arquivo; use Illuminate\Database\Eloquent\Model; class ConselhoHabilitacaoRecurso extends Model { protected $table = 'tb_conselho_habilitacao_recurso'; protected $primaryKey = 'co_conselho_habilitacao_recurso'; protected $fillable ...
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Parallax : MonoBehaviour { [SerializeField] bool followsVertical = false; private float length, startpos, startYPos; public GameObject cam; public float parallaxEffect; void Start() { startpos = transform.position.x; ...
inherited frmRep9: TfrmRep9 Caption = 'frmRep9' ClientHeight = 606 OnCloseQuery = FormCloseQuery PixelsPerInch = 96 TextHeight = 16 inherited panMain: TPanel Height = 524 object lWhouse: TLabel [0] Left = 20 Top = 116 Width = 21 Height = 16 Caption = #1057#...
from chatrender.celery import publish_slackchat from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Publishes a complete slackchat package, including static files.' def add_arguments(self, parser): parser.add_argument('--type', dest='chat_type') ...
# mangal A tool for exploring data in Ruby ## Description mangal is a simple scripting language to explore data. It currently expects to explore data in a rails project. It works by providing modules that can be chained together to provide a pipeline for the data. Modules wrap short blocks of ruby that take a previo...
#include <Fog/FogIncludeAll.h> static const char* const FogUsageType_texts[FogUsageEnums::INDEXES + 1] = { "interface-finish", "name", "friend", "public typedef", "protected typedef", "private typedef", "public enum", "protected enum", "private enum", "public variable", "protected variable", "private ...
class Transaction < ActiveRecord::Base belongs_to :user belongs_to :seller, class_name: User has_many :deals end
package io.pivotal.cfapp.event; import java.util.List; import org.springframework.context.ApplicationEvent; import io.pivotal.cfapp.domain.Organization; public class OrganizationsRetrievedEvent extends ApplicationEvent { private static final long serialVersionUID = 1L; private List<Organization> organizat...
bash RunTableSimulation.sh convex 0 bash RunTableSimulation.sh convex 0.25 bash RunTableSimulation.sh convex 0.5 bash RunTableSimulation.sh convex 0.75 bash RunTableSimulation.sh convex 1.0 bash RunTableSimulation.sh nonconvex 0 bash RunTableSimulation.sh nonconvex 0.25 bash RunTableSimulation.sh nonconvex 0.5 bash Run...
A <a href="https://twitter.com/AndrewBloch/status/1241324316358332416">chimpanzee</a> using Instagram.
#!/bin/bash cd cmd ./device-camera-go -r consul://localhost:8500 -c res/
import re import sys sys.path.append("..") from text import * import importlib import os import pdb #---------------------------------------------------------------------------------------------------- pd.set_option('display.width', 1000) #--------------------------------------------------------------------------------...
package me.shadaj.scalapy.tensorflow.keras.preprocessing import me.shadaj.scalapy.numpy.NDArray import me.shadaj.scalapy.py @py.native trait Sequence extends py.Object { def pad_sequences( sequences: NDArray[Long], maxlen: py.NoneOr[Int] = py.None, dtype: String = "int32", padding: String = ...
module Gitlab module Geo module LogCursor module Events class RepositoryDeletedEvent include BaseEvent def process job_id = nil unless skippable? job_id = destroy_repository delete_project_registry_entries end ...
export class Person { constructor({ name, ssn }) { this.name = name; this.ssn = ssn; } isEqual(other) { return this.ssn == other.ssn; } } const matchingSSN = '123-45-6789'; export const alice = new Person({ name: 'Alice', ssn: matchingSSN }); export const alice2 = new Person({ name: 'Alice 2', ss...
package com.baeldung.scala.implicitconversions import org.scalatest.{Matchers, WordSpec} class LengthUnitTest extends WordSpec with Matchers { "Implicit conversion" should { import scala.language.implicitConversions "convert meters into centimeters" in { implicit def meters2centimeters(meters: Meters...
# pdoque PDO CRUD library ## Usage Create a class that extends pdoque. Specify the tablename as first argument if model name not the same in database. Specify the primary key field name if it is different from 'id'. ```php class Person extends pdoque{ public function __construct() { parent::__construct($...
/******************************************************************************* * * COPYRIGHT(c) 2020, China Mobile IOT * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * 1. Redistributions of source code must ret...
using System.Collections.Generic; namespace CompositeData { public class ItemRepository : IItemRepository { private List<Item> _list = new List<Item> { new Item {Id = 1}, new Item {Id = 2}, new Item {Id = 3}, }; public IEnumerable<Item> GetAll...
import { Range } from "./range"; export interface IFrequencyBands { [key: string]: Range; }
#!/bin/bash if [ -z $TARGET ]; then echo "ERROR: No TARGET environmental variable set, please set one at runtime, for example \"-e TARGET=http://web\"" exit 1 fi echo " default: extensions: Behat\MinkExtension: base_url: '$TARGET' sessions: default: goutte: ~ " > /code/beh...
<?php namespace DomainDrivenLaravel\Commands\Console\Traits; use Illuminate\Support\Str; trait AppLayerCommandTrait { abstract public function argument($key = null); abstract protected function subdirectoryName(): string; protected function rootNamespace(): string { return config('ddd-comman...
{-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE PartialTypeSignatures #-} module Tracking.Server where import Tracking.Database import Prelude as P import Data.Conduit import Control.Monad.Trans.Resource import Control.Concurrent.STM import Control.Concurre...
import './btn.css' class PrimaryButton extends React.Component { render () { const { children, ...btnProps } = this.props return <button className='btn btn-primary' {...btnProps}>{children}</button> } } class CancelButton extends React.Component { render () { const { children, ...btnProps } = this.p...
using System.Collections.Generic; using System.Linq; using k8s.Models; namespace Extension.k8s { public static class Extension { public static bool IsReady(this IList<V1NodeCondition> conditions) { foreach (var condition in conditions) { if (condition.Typ...
import functools class StreamChecker(object): def __init__(self, words): T = lambda: collections.defaultdict(T) self.trie = T() for w in words: functools.reduce(dict.__getitem__, w, self.trie)['#'] = True self.waiting = [] def query(self, letter): self.waiting = [node[l...
#[derive(Debug)] pub struct Registers { a: u8, b: u8, c: u8, d: u8, e: u8, f: FlagsRegister, h: u8, l: u8, } const ZERO_FLAG_BYTE_POSITION: u8 = 7; const SUBTRACT_FLAG_BYTE_POSITION: u8 = 6; const HALF_CARRY_FLAG_BYTE_POSITION: u8 = 5; const CARRY_FLAG_BYTE_POSITION: u8 = 4; #[derive(D...
require 'spec_helper' describe AmazonEcho::Response do it 'empty response' do response = JSON.parse(File.read(File.dirname(__FILE__) + "/../fixtures/response.json")) expect(subject.response).to eq response end end
//// [typeInferenceTypePredicate.ts] declare function f<T>(predicate: (x: {}) => x is T): T; // 'res' should be of type 'number'. const res = f((n): n is number => true); //// [typeInferenceTypePredicate.js] // 'res' should be of type 'number'. var res = f(function (n) { return true; });
#nullable enable using Cysharp.Threading.Tasks; using Elffy; using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Xunit; namespace UnitTest { public class ParallelAsyncEventTest { [Theory] [InlineData(0, false)] [InlineData(1, fals...
package com.ss.ugc.android.alpha_player.player import android.view.Surface import com.ss.ugc.android.alpha_player.model.VideoInfo import java.io.IOException /** * created by dengzhuoyao on 2020/07/07 */ interface IMediaPlayer { /** * Register a callback to be invoked when the end of a media source has ...
use std::collections::HashMap; use garnish_lang_common::{Result, InstructionSet}; use crate::iterate::IterationData; use crate::utils::insert_if_not_present; #[derive(Clone, PartialOrd, PartialEq)] pub(crate) enum CallType { Normal, Iteration, ExpressionIteration, Conditional, } #[derive(Clone)] pub...
/** * Application. * @author Renata * @version 1.0 * @since 18/04/2020 */ package pithan.renata.exemplocomponentscan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.ApplicationContext; import org.spring...
// Copyright (c) Alium FX. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. namespace Alium.Administration { using Alium.Membership; /// <summary> /// Represents an administration user /// </summary> public class ...
var express = require('express'); var bankService = require('../services/bankService.js'); var helper = require('../utils/helper.js'); var logger = helper.getLogger('bankRouter'); const bankRouter = express.Router(); const requestingBank = helper.whoami() bankRouter.get('/bank/transactions', (req,res) => { bankServic...
program test_io_params use ioparams, only: group1_t, group2_t use ioparams, only: read_nml, write_nml, read_nml_file use ioparams, only: set_param, get_param use ioparams, only: parse_command_args, print_help, join_array use ioparams, only: command_argument_as_array use ioparams, only: has_param, set_param...
<?php /** * Class GetHotAdvance 爆品预告商品合集 * Integer type 时间段1、昨天0点,2、昨天10点,3、今天0点,4、今天10点(默认),5、明天0点,6、明天10点 */ class GetHotAdvance extends DtkClient { protected $type; protected $methodType = 'GET'; protected $requestParams = []; const METHOD = "/api/goods/get-hot-advance"; /** * @return...
--- id: 5e8f2f13c4cdbe86b5c72d9a title: 'Reti neurali convoluzionali: scegliere un modello preaddestrato' challengeType: 11 videoId: h1XUt1AgIOI bilibiliIds: aid: 463063633 bvid: BV1qL411x73q cid: 409132626 dashedName: convolutional-neural-networks-picking-a-pretrained-model --- # --question-- ## --text-- Comp...
import asyncio from scihub import SciHub def search(keywords: str, limit: int): """ 搜索相关论文并下载 Args: keywords (str): 关键词 limit (int): 篇数 """ sh = SciHub() result = sh.search(keywords, limit=limit) print(result) loop = asyncio.get_event_loop() # 获取所有需要下载的scihub直链 ...
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
package io.limb.seabreakr; import reactor.core.Exceptions; import java.lang.reflect.InvocationTargetException; import java.util.concurrent.CompletionException; final class BreakerExceptions { static Throwable unwrapException(Throwable throwable) { Throwable t = throwable; while (true) { ...
mod comparison; pub use self::comparison::*; mod parser; pub use self::parser::*; mod random; pub use self::random::*; mod serializer; pub use self::serializer::*;
package com.hzsoft.lib.base.view import android.content.Context import android.content.Intent import android.os.Bundle import android.text.TextUtils import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import android.view.ViewStub import android.widget.Image...
package no.nav.rekrutteringsbistand.api.config import no.finn.unleash.FakeUnleash import no.finn.unleash.Unleash import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration @Configuration class Unleash { @Bean fun unleashMock(): Unleash { return Fake...
Sequel.migration do up do alter_table(:imports) do add_column :field_names, String, :text => true add_column :primary_key_name, String add_column :has_headers, TrueClass add_column :has_duplicate_keys, TrueClass add_column :occurred_at, DateTime rename_column :fields, :field_ty...
if problem exit(1) end # or if problem abort # equivalent to exit(1) end
namespace CartridgeBuilder2.Lib.Crt { /// <summary> /// Contains constants pertinent to the CRT file format. /// </summary> public static class CrtConstants { /// <summary> /// Header string for a CRT file. /// </summary> public static string FileId => "C64 C...
set echo on set termout off drop table my_all_objects; create table my_all_objects nologging as select * from all_objects union all select * from all_objects union all select * from all_objects / insert /*+ APPEND */ into my_all_objects select * from my_all_objects; commit; insert /*+ APPEND */ into my_all_objec...
namespace HtcSharp.HttpModule.Abstractions.Mvc { public interface IHttpXmlObject : IHttpObject { } }
require File.expand_path(File.join(File.dirname(__FILE__), 'test_helper')) # Tested: [Z op (Z,Z), Z op (Z,Fixnum), Z op (Z,Bignum), # Z op (Fixnum,Z), Z op (Fixnum,Fixnum), Z op (Fixnum,Bignum) # Z op (Bignum,Z), Z op (Bignum,Bignum), Z op (Bignum,Fixnum)] # Things are tested both ways because the im...
from rope.base.change import ChangeSet, Change from rope.base.project import Project from rope.base.resources import Resource __all__ = [ "Change", "ChangeSet", "Project", "Resource", ]
<?php namespace Poolapp\Commands; abstract class Command { // }
angular .module('Neaop') .config(function($translateProvider){ var lang = navigator.language; var langBase = lang.substr(0, 2); var langCountry = lang.substr(3); console.log('Language: '+langBase+'; Country: '+langCountry) switch (langBase) { case 'en': defaultLang = 'en'; break; case 'pt': ...
YoungModulusPerp ================ Elastic modulus, mean value, α=90°.
/* * Copyright 2018 Google Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in w...
Club Api Client =========== PHP Api client for the club directory.
[#]: collector: (lujun9972) [#]: translator: (wxy) [#]: reviewer: (wxy) [#]: publisher: (wxy) [#]: url: (https://linux.cn/article-13137-1.html) [#]: subject: (Navigating your Linux files with ranger) [#]: via: (https://www.networkworld.com/article/3583890/navigating-your-linux-files-with-ranger.html) [#]: author: (Sand...
-- -- The main function is convertToWords. -- Try for instance: convertToWords 1235543222355643 -- -- Instead of a list of words, you can also produce a single string with -- convertToString. -- -- Adapted from Uwe Zimmer's 2012 adaptation of the problem from Introduction -- to Functional Programming, by Richard Bird &...
<?php namespace App\Controllers; use App\Models\Tahun_m; class Tahun extends BaseController { protected $Tahun_m; public function __construct() { $this->Tahun_m = new Tahun_m(); } public function index() { if(session('username') == ''){ return view('Login/index'); ...
package handler import ( "os" "github.com/kataras/iris/v12" ) func Version(ctx iris.Context) { ctx.JSON(iris.Map{"Listen": os.Getenv("SERVER_LISTEN"), "Version": os.Getenv("VERSION"), "Env": os.Getenv("ENV")}) }
// This program demonstrates the use of the indirection operator. #include <iostream> using namespace std; int main() { int x = 25; // int variable int *ptr = nullptr; // Pointer variable, can point to an int ptr = &x; // Store the address of x in ptr // Use both x and ptr to d...
const SurgePaser = (surgeConfig: string) => { const lineArray = surgeConfig.split("\n") const array = {} let name for(const line of lineArray) { //空行 pass if (line.length === 0) continue; //判断用户 if (/^\[*\]$/.test(line)) { name = line.replace(/(\[ | \])/, '') array[name] = [] ...
using Random n = 256 function apply_seed(seed) if seed === missing # should result in different numbers across launches Random.seed!() # XXX: this currently doesn't work, because of the definition in Base, # `seed!(r::MersenneTwister=default_rng())`, which breaks overriding ...
// VQS : Quantum Computing Simulation // Gildas Ménier // 2020 // gildas.menier@univ-ubs.fr import Vqs._ import Vqs.operators.{C, H, Rz} object main { def main(args: Array[String]): Unit = { QReg.setDefaultUseColor() //QReg.setDefaultUseASCII() // QReg.setDefaultDrawAll() ...
<?php error_reporting(E_ALL); ini_set('display_errors',1); if(!class_exists("clase_bd_taller")){ class clase_bd_taller{ protected $mysqli; protected $xml; protected $direccion_bd = "YOUR DB URL HERE"; protected $usuario_bd = "YOUR DB USER HERE"; protected $contrasenya_bd ="YOUR BD PASSWORD HERE"; prot...
class Crypto def initialize(plaintext) @plaintext = plaintext end def normalize_plaintext @plaintext.gsub(/\W+/, '').downcase end def size @size ? @size : @size = calc_size end def plaintext_segments separate(normalize_plaintext, size).map { |segment| segment.join } end def ciphert...
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except * in compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable ...
#include "drake/geometry/proximity_properties.h" #include <gtest/gtest.h> #include "drake/common/test_utilities/expect_throws_message.h" #include "drake/geometry/geometry_roles.h" #include "drake/multibody/plant/coulomb_friction.h" namespace drake { namespace geometry { namespace { using internal::HydroelasticType;...