text
stringlengths
27
775k
import { Injectable } from '@angular/core'; import { AuthService } from '@shared/authentication/auth.service'; import { Company, CompanyFlag, ECompanies, ECompanyFlag } from '@shared/shared.interfaces'; import { ICompanySpecs } from './company.model'; import { EcompanyASpecs } from './companyA/company-A.constants'; imp...
# TodoMVC backend to Office 365 TodoMVC backend that demonstrates how to store data in SharePoint Online (Office 365) **TodoMVC backend** ![alt tag](https://vgrem.files.wordpress.com/2016/01/todomvc_backend.png) **Office 365 storage** All the TodoMVC data is stored in SharePoint List ![alt tag](https://vgrem...
<?php namespace Mufin\ComgateBundle\Service; use GuzzleHttp\Client; use Mufin\ComgateBundle\Helper\CreatePaymentResponse; use Mufin\ComgateBundle\Helper\RequestInterface; class ComgateConnector { private $params; /** * @var Client */ private $client; public function __construct(array $p...
import baseProperty from './.internal/baseProperty.js' import basePropertyDeep from './.internal/basePropertyDeep.js' import isKey from './.internal/isKey.js' import toKey from './.internal/toKey.js' /** * Creates a function that returns the value at `path` of a given object. * * @since 2.4.0 * @category Util * @...
// // Created by Громов Андрей on 04.01.16. // Copyright (c) 2016 motoDTP. All rights reserved. // #import <Foundation/Foundation.h> #import "HistoryStatus.h" @class HistoryStatus; @interface History : NSObject @property(nonatomic) int idHistory; @property(nonatomic) int ownerId; @property(nonatomic, copy) NSStri...
#!/usr/bin/env bash killall -q polybar polybar example & echo "Bars launched..."
# Trend Keywords Small script to ask google for the latest trend keywords, and convert the news to a simple text file that you can send by mail or SMS. Just launch `python3 main.py` and it should work. ![Sample of ](./screen_shot.png)
use super::sealed::IsSession; use super::*; use crate::unary::{self, Compare, Number, ToConstant, ToUnary}; /// Repeat a [`Loop`]. The type-level index points to the loop to be repeated, counted from the /// innermost starting at `0`. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] pub str...
package com.cyb3rko.m3okotlin.services import com.cyb3rko.m3okotlin.M3O import com.cyb3rko.m3okotlin.data.NewsRequest import com.cyb3rko.m3okotlin.data.NewsResponse import io.ktor.client.request.* private const val SERVICE = "news" /** * **Get the latest news** * * Get the latest news headlines from anywhere in t...
#!/usr/bin/env bash # vim: ts=8 sw=2 smarttab # # run_seed_to.sh - Run ceph_test_filestore_idempotent_sequence up until an # injection point, generating a sequence of operations based on a # provided seed. # # We also perform three additional tests, focused on assessing if # replaying a larger chunck of the journal a...
# encoding: utf-8 # frozen_string_literal: true # # Cookbook Name:: openvpn_server # Library:: helpers_config # # Copyright 2016, Socrata, 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...
# Terraform ![Uses Terraform](https://img.shields.io/badge/uses-terraform-5956e3.svg) Terraform basic case study with GCP, AWS, Docker and DO
import sys import os import random from time import sleep sys.path.append(os.getcwd()) from environments import minidora from architecture import SeedWBA BASE_ACTION = { "armleft": 0.0, "armright": 0.0, "headroll": 0.0, "headpitch": 0.0, "headyaw": 0.0, "wheelleft": 0.0, "wheelright": 0.0...
import { TextInput, ButtonInput } from './Inputs'; export interface Config { width?: string; height?: string; sendCallback?(textInput: TextInput): void; buttonCallback?(buttonInput: ButtonInput): void; inputBox?: boolean; }
import ViewLicenseContent from '@components/modals/viewLicense/viewLicenseContent' import { LicenseProvider } from '@components/modals/viewLicense/viewLicenseContext' import ViewLicenseNav from '@components/modals/viewLicense/viewLicenseNav' import { IModal } from '@et/types/Modal' import { ButtonReg, CenterButton } fr...
use bevy::{prelude::*, app::PluginGroupBuilder}; use self::{speed_game::SpeedGamePlugin, gameplay::GameplayPlugin}; pub mod gameplay; pub mod speed_game; #[derive(Default)] pub struct GamemodePlugins; impl PluginGroup for GamemodePlugins { fn build(&mut self, group: &mut PluginGroupBuilder) { group ...
# Changelog ## [Unreleased] ## [2.0.5] -- 2021-10-26 * Add and correct some dictionary entries. ## [2.0.4] -- 2021-08-31 * Add and correct some dictionary entries. ## [2.0.3] -- 2021-05-11 * Add some dictionary entries. ## [2.0.2] -- 2021-04-11 * Add and correct some dictionary entries. ## [2.0.1] -- 202...
<?php /** * 商品详情模块 * @author auto create */ class ItemDescModule { /** * 描述具体内容 **/ public $content; /** * 一个List<String>的Json串,里面是模块引导提示,不超过3条(isv提交时可忽略不传) **/ public $intros; /** * 模块id ,(注意:用户自定义模块不用填此项。) **/ public $module_id; /** * 模块名称 **/ public $module_...
package ke.co.ipandasoft.futaasoccerlivestreams.data.requestpayload data class CountryDataPayload( val country_restriction: String )
<?php namespace AVN\Authorize\Models; use AVN\Authorize\Models\BillTo; use AVN\Authorize\Models\Payment; use AVN\Authorize\Models\AbstractModel; class PaymentProfile extends AbstractModel { protected $customerPaymentProfileId = null; protected $paymentProfileId = null; protected $customerType = null; ...
package us.dot.its.jpo.ode.plugin.j2735.builders; import org.json.JSONObject; import com.fasterxml.jackson.databind.JsonNode; import us.dot.its.jpo.ode.plugin.j2735.J2735LayerType; import us.dot.its.jpo.ode.plugin.j2735.J2735MAP; import us.dot.its.jpo.ode.plugin.j2735.J2735DataParameters; public class MAPBuilder { ...
<div class="nav"> <h3 class="nav-title">Menu</h3> <a href="#" class="nav-close"> <span class="hidden">Close</span> </a> <ul> @foreach(setting('navigation') as $item) <li class="nav-{{$item->slug}}" role="presentation"><a href="{{$item->url}}">{{$item->label}}</a></li> @en...
### 调整箭头 添加 `arrow-type` 属性的值可以改变面板箭头的位置或者隐藏箭头。
package com.kine.executor import java.util.concurrent.* class DefaultPriorityExecutorSupplier():ExecutorSupplier { /* * Number of cores to decide the number of threads */ private val NUMBER_OF_CORES = Runtime.getRuntime().availableProcessors() /* * thread pool executor for background tasks ...
class TagsController < ApplicationController before_filter :authenticate_user! def index @tags = case params[:mode] when "popular" most_popular else match_tag end if @tags.blank? && params[:q].present? @tags = [ ActsAsTaggableOn::Tag.new(name: params[:q]) ] ...
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import glob def usage(): print("Usage: _conv.py [gmadv.py] [define_functions.h] [define_consts.txt] [input_dir] [output_dir]") def main(tool, fFuncDef, fDefines, inputDir, outDir): print("--------------------------------------") print("tool: %s...
package org.example import io.dinject.SystemContext import org.junit.Test import org.junit.Assert.* class CoffeeMakerTest { @Test fun makeCoffee() { val coffeeMaker = SystemContext.getBean(CoffeeMaker::class.java) coffeeMaker.makeCoffee() } }
import Data.List import Data.Digits import Data.Numbers.Primes import qualified Data.Map as Map import qualified Data.Set as Set below _ [] = [] below max (x:xs) = if (x < max) then [x] ++ (below max xs) else (below max xs) -- get content of list below max and stop (when list is growing) belowStop :: Integral a => a ...
package android.rezkyauliapratama.id.robusta.database.entity; import android.os.Parcel; import android.os.Parcelable; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import org.greenrobot.greendao.annotation.Entity; import org.greenrobot.greendao.annotation.Id; import o...
/* @flow */ import type { BucketState, SessionState, CollectionState } from "../../types"; import type { SignoffState, SourceInfo, PreviewInfo, DestinationInfo, } from "./types"; import { PureComponent } from "react"; import * as React from "react"; import { canEditCollection } from "../../permission"; import...
object Presentation: TPresentation Left = 0 Top = 0 BorderStyle = bsToolWindow Caption = 'Presentation' ClientHeight = 693 ClientWidth = 817 Color = clWhite Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'Tahoma' Font.Style = [] OldCreateOrder = False ...
// Copyright (c) 2013 Aubrey Barnard. This is free software. See // LICENSE.txt for details. // C wrapper for Fortran gradient descent implementation. This is // needed solely to pass the addresses of the exported Go callbacks to C // because Go and C function pointers are not interoperable. (Otherwise // this wou...
{-# LANGUAGE UndecidableInstances #-} module Prologue ( module X , eitherM , maybeM , maybeLast , fromMaybeLast ) where import Data.Bifunctor.Join as X import Data.Bits as X import Data.ByteString as X (ByteString) import Data.Coerce as X import Data.Either as X (fromLeft, fromRight) import Data.Int as X ...
using System; using System.Windows.Media; using Farba.Common.ColorDifference.Base; using Farba.Extension; namespace Farba.Common.ColorDifference { public class CIE94 : BaseColorDifference { private double Kl = 1; private double K1 = 0.045; private double K2 = 0.015; public C...
module VCAP::CloudController class AppPresenter attr_reader :app def initialize(app) @app = app end def present_json app_hash = { guid: app.guid, _links: { self: { href: "/v3/apps/#{app.guid}" }, processes: { href: "/v3/apps/#{app.guid}/process...
# CommunityUI A react component library and UI kit, built by the community, for the community.
CREATE OR REPLACE FUNCTION f_test_shadow( p1 int DEFAULT 1, p2 text DEFAULT 'Hello' ) RETURNS void AS $code$ DECLARE p1 char(2) := 'P1'; -- masks function argument! p3 int := 10; BEGIN RAISE DEBUG 'p1 is %', p1; DECLARE p3 text := 'Gosh!'; -- masks outer block variable! BEGIN R...
function townsToJSON(townData) { let result = []; let keys = townData[0].split(/\s*\|\s*/).filter(x => x !== ''); for (let str of townData.slice(1)) { let [town, lat, long] = str.split(/\s*\|\s*/).filter(x => x !== ''); let obj = {}; obj[keys[0]] = town; obj[keys[1]] = Numb...
var noteObj = require("../../../db/db.json"); const fs = require("fs"); module.exports = function (app) { app.get("/api/notes", function (req, res) { res.json(noteObj); console.log(noteObj); return }); app.post("/api/notes", function (req, res) { var newNote = req.body; ...
Widowmaker Invitational ======================= This is the website for a fun race that some friends and I are going to put on. My personal goal for this project is to build a beautiful, functional website as quickly as possible. To that end, I'm using a bootstrap template (Grayscale) and will only support registrat...
namespace KD.Dova.Generator.Definitions.FunctionCleaners { internal class NewStringCleaner : FunctionCleaner { public NewStringCleaner(string wantedFunctionName) : base(wantedFunctionName) { } protected override void StartCleaning(FunctionDefinition funcDef) { ...
#### #get ```javascript utils.get(obj, path, [defaultValue]); ``` 根据 obj 对象的 path 路径获取值。 如果解析 value 是 undefined 会以 defaultValue 取代。 - **引入版本** 1.0.0 - **参数** 1. obj (object): 要检索的对象。 2. path (Array|string): 要获取属性的路径。 3. [defaultValue] (any): 如果解析值是 undefined ,这值会被返回。 - **返回** (any): 返回解析的值。 - **例子** `...
require 'spec_helper' describe StationsController do share_examples_for "should render to template 'stations/operator_index'" do it { response.should be_success response.should render_template("stations/operator_index") } end share_examples_for "should render to template 'stations/ladder_ind...
# workaround for https://github.com/rails/rails/issues/14472 require_relative '../../config/initializers/inflections' module Quotas class Engine < ::Rails::Engine isolate_namespace Quotas config.to_prepare do Decorators.register! Engine.root, Rails.root end end end
using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Linq; using Tensorflow; using static Tensorflow.Binding; namespace TensorFlowNET.UnitTest.Basics { [TestClass] public class VariableTest : GraphModeTestBase { [TestMethod] public void InitVariable() { var ...
import 'package:flutter/material.dart'; import 'package:pets/view/users/profile.dart'; import 'package:pets/view/pets/pet-list.dart'; class SecondScreen extends StatefulWidget { @override _SecondScreenState createState() => _SecondScreenState(); } class _SecondScreenState extends State<SecondScreen> { int selec...
<?php namespace Ornament\Core; use DomainException; class PropertyNotDefinedException extends DomainException { public function __construct(string $class, string $property) { parent::__construct("Class $class does not define $property"); } }
# The password has been hashed already, ask Silver for the pass. SET PASSWORD FOR 'AttendanceTracker'@'localhost' = ''; # If need be, rename clumsy names using RENAME USER 'AttendanceTracker'@'localhost' TO ar; /*To rename a database under the root user you need to dump the contents of it somewhere and drop table, I d...
# Google Cloud Storage Read ![GCS Read](images/gcs_read_node.png) This node reads the content of a Google Cloud Store (GCS) object and returns the content in the `msg.payload` field. It has an additional option to list the objects in a bucket. At runtime, the value of msg.filename contains describes the file to rea...
use criterion::{black_box, criterion_group, criterion_main, Bencher, BenchmarkId, Criterion}; use std::{ io::Read, sync::Arc, thread::{self, JoinHandle}, time::Duration, }; use streamcatcher::{Catcher, Config, Finaliser, ReadSkipExt}; use synchronoise::SignalEvent; use utils::NaiveSharedRead; fn prep_threads<T>(so...
package com.wavesplatform.dex.api.ws.protocol import play.api.libs.json._ trait WsServerMessage extends WsMessage { val timestamp: Long } object WsServerMessage { // Will be never propagated to a client case object Complete extends WsServerMessage { override val tpe: String = "unused" override val ...
""" Create a job submission script using values from a workflow configuration file and a template job submission script. """ import os import os.path import re import yaml from riboviz import params TOKEN_TAG = "%%" """ Default tag marking up tokens in template job submission script to be replaced by configuration va...
import React from 'react'; import PropTypes from 'prop-types'; import { BrowserRouter } from 'react-router-dom'; import { Provider } from 'react-redux'; import { createStore } from 'app-store'; import { App as DesktopApp } from './App@desktop'; import { EnsureResources } from 'components/EnsureResources/EnsureResourc...
/** \file * Rain drops (or Matrix effect) */ #include "Demo.h" class Rain : public Demo { private: static const int num_drops = 32; float drops[num_drops][2]; uint32_t colors[num_drops]; void new_drop(int i, float angle); public: virtual void begin(); virtual void tapped(); virtual bool step(float ax, ...
package phal.front.example.ecsite.site.webapi; import java.io.IOException; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import javax.enterprise.context.RequestScoped; import javax.inject.Inject; import javax.servlet.http.HttpServletResponse; import javax.ws.rs.Consumes; import javax...
package main import "github.com/olehan/marker/examples/many_symbols/tree" var ( Private = false Depth = 11 Date = 11.11 Version = "v1.10.1" Name = "ebin" Author = "spurdo sparde" Repo = "https://github.com/olehan" Tree = tree.NewTree("root dep", tree.NewTree("left d...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package FXMLS.FINANCIAL.CLASSFILES; import javafx.beans.property.SimpleStringProperty; /** * * @author Gilbert */ public class Ann...
/* * Copyright 2020 ABSA Group Limited * * 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 agr...
<!--<div class="row"> <div class="col-lg-12 text-center"> <hr> <div style="padding: 10px;"> &copy; 2017 CLAIMA | Terms and Condition | Support | Developer by WebTrace </di...
package jat.core.coordinates; public class HourAngle { public int hours; public int minutes; public double seconds; public HourAngle( ) { } /** * @param hours between 0 and 24 * @param minutes between 0 and 59 * @param seconds between 0 and 59.9999 */ public HourAngle( int hours, int minutes, doub...
export default function registration(userInfo: any) { require('@/loaders/mongoose'); const User = require('@/models/User'); const user = new User(userInfo.userInfo); user.save((err) => { if(err) { const response = "Ya estas registrado en los libros de las profundidades. ❌"; ...
package com.mathymath.equationgenerator.Model.Selection; import com.mathymath.equationgenerator.Model.EquationType; import java.util.LinkedHashMap; public class SequenceTypeSelection extends SelectionList { public enum Equation implements EquationType { ARITHMETIC, GEOMETRIC, BOTH } ...
; Computational Object Inference ; Copyright (C) 2005-2014 Kookamara LLC ; ; Contact: ; ; Kookamara LLC ; 11410 Windermere Meadows ; Austin, TX 78759, USA ; http://www.kookamara.com/ ; ; License: (An MIT/X11-style license) ; ; Permission is hereby granted, free of charge, to any person obtaining a ; copy of...
package com.jinyframework.examples.scalacrud import com.jinyframework.HttpProxy object Main extends App { new Thread(ServerBootstrap).start() // Port 1234 new Thread(ServerBootstrapNIO).start() // Port 1235 val proxy = HttpProxy.port(1111) proxy.use("/server1", "localhost:1234") proxy.use("/server2", "loca...
# GDBstub example This example shows how to use gdbstub and it's functionality at runtime to debug an application with GDB. With the gdbstub component it is possible to run GDB from IDF Monitor by pressing Ctrl+C and debug the application using GDB. It is also possible to read/modify memory values, interrupt and co...
import 'package:flutter/material.dart'; import 'package:flutter_custom_ui/flutter_custom_ui.dart'; main() { runApp(const ExampleCutomUIApp()); } class ExampleCutomUIApp extends StatelessWidget { const ExampleCutomUIApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return M...
""" Write a Python program to remove the characters which have odd index values of a given string. """ org_str = input("Enter a string: ") result = "" for i in range(len(org_str)): if i % 2 != 0: result = result + org_str[i] print(result)
using System.Collections; using System.Collections.Generic; using UnityEngine; namespace caveFog { //Settings for creating a Path [CreateAssetMenu(menuName = "Chunk/Main Path Settings")] public class MainPathSettings : PathSettings { public NoiseCurveSettings _secondaryCurve = null; pu...
package katas.java.newton; import org.junit.Test; import static java.lang.Math.abs; import static junit.framework.Assert.assertTrue; public class Newton { private static final double THRESHOLD = 0.00001; @Test public void shouldFindSquareRootOfANumber() { assertTrue(squareRootOf(1) - 1.0 < THRESHOL...
package licensedb import ( "errors" paths "path" "gopkg.in/snyk/go-license-detector.v3/licensedb/api" "gopkg.in/snyk/go-license-detector.v3/licensedb/filer" "gopkg.in/snyk/go-license-detector.v3/licensedb/internal" ) var ( // ErrNoLicenseFound is raised if no license files were found. ErrNoLicenseFound = erro...
// @ts-check module.exports = validateLinks; async function validateLinks(outputs = {}) { const validate = outputs?.prepare?.validate; if (validate && validate.links === false) { return; } const build = outputs?.build?.w3c || {}; const outputDir = build.dir || "."; return await require("../src/validate-links...
import * as React from 'react'; import { Form, Button, Input, Row, Col, Icon } from 'antd'; import { FormComponentProps } from 'antd/lib/form'; import { Link } from '../../../models/Manage'; import { linkLayout } from '../constants'; import { Colors } from '../../../components'; export interface Props extends FormComp...
#!/bin/bash for port in {} do /root/masscan -p $ip 192.168.1.1/16 --open --banner --rate 5000 sleep 5 done
'use strict'; export default function LoadingInterceptor($q, $rootScope, $timeout) { return { request: function (config) { $rootScope.isLoading = true; return config; }, requestError: function (rejection) { $rootScope.isLoading = false; return $q.reject(rejection); }, res...
""" Tests for scalar Timedelta arithmetic ops """ from datetime import datetime, timedelta import operator import numpy as np import pytest import pandas as pd from pandas import NaT, Timedelta, Timestamp, offsets import pandas._testing as tm from pandas.core import ops class TestTimedeltaAdditionSubtraction: "...
class TravelDestination < Entity attr_accessor :id, :place_id, :long_name, :short_name, :types, :updated_at, :created_at def import end end
<?php namespace YiZan\Services\System; use YiZan\Models\System\Seller; use YiZan\Models\System\SellerCertificate; use YiZan\Utils\String; use DB; class SellerCertificateService extends \YiZan\Services\SellerCertificateService { /** * 获取认证列表 * @param int $type 机构类型 * @param string $mobileName 服务人员...
import { Node } from "prosemirror-model"; import { EditorState } from "prosemirror-state"; export default function getParentListItem( state: EditorState ): [Node, number] | void { const $head = state.selection.$head; for (let d = $head.depth; d > 0; d--) { const node = $head.node(d); if (["list_item", "c...
# Sample plugin controller class ExampleController < ApplicationController layout 'base' before_action :find_project, :authorize menu_item :sample_plugin def say_hello @value = Setting.plugin_sample_plugin['sample_setting'] end def say_goodbye end private def find_project @project = Project.find(params...
class AddUsers < ActiveRecord::Migration def up execute %{ CREATE TABLE `users` ( `id` INT UNSIGNED NOT NULL AUTO_INCREMENT, `first_name` VARCHAR(255) DEFAULT NULL, `last_name` VARCHAR(255) DEFAULT NULL, `email` VARCHAR(255) DEFAULT NULL, `phone` BIGINT DEFAULT NULL,...
using System.Linq; using System.Reflection; using Xunit; namespace dnex2winjs.Test { public class DNEXTest { [Fact] public void GetAllExceptionsTest() { // Arrange var assembly = Assembly.Load("mscorlib"); var allExceptions = assembly.GetTypes().Wher...
use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use crate::Binary; use super::{Attribute, CosmosMsg, Empty, Event, SubMsg}; /// A response of a contract entry point, such as `instantiate`, `execute` or `migrate`. /// /// This type can be constructed directly at the end of the call. Alternatively a ///...
# Piano Booster Beginner Music Course This is the beginner piano music course for the **Piano Booster** open source teaching system.
# grit-ocr **grit_ocr** is OCR tool for grid & table images Powered by *Tesseract*, recognize contents in grid * By detecting lines, read grids one by one * Table lines should be straight & clear * Screenshot images are super welcomed * As a disappointment, real images would hardly recognized ![sample](img/detec...
function ListBusiness() {// 'closure|module'-iso. const urlSpec = {root:'http://127.0.0.1:9081', selectList: '/page/list/dummy.json'} var SiteListDao = BDS.extend({}) var SimpleBusiness = BLX.extend({ list: function(listId, templateId) { sb.siteListDao.selectList().then(function(values) { //http://www...
touch code 講座用 Vagrant box ============================= これは touch code 講座用 Vagrant box です。 box のつかいかた ---------------- 1. VirtualBox, Vagrant のインストール 2. このリポジトリを clone 3. `vagrant up` ansible でプロビジョニング -------------------------- `setup` ディレクトリにある `./provision_local.sh` を実行します。詳細は `site.xml` や `roles` ディレクトリを参照してく...
using Perfor.Lib.Extension; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.Routing; using System.Web.Security; namespace Perfor.Lib.Web.Routes { public class WebRoute : RouteBase { #region identity private Type routeType...
(ns euler.problem-007 (:require [euler.util :refer [gen-primes]])) (defn solution [] (nth (gen-primes) 10000))
# frozen_string_literal: true require 'rails_helper' describe 'bulk uploads', type: :request do context 'POST' do context 'upload spreadsheet' do let(:test_user) { create(:user) } before do login_as(test_user, scope: :user) end include Shoulda::Matchers::ActionController ...
<?php $con=mysqli_connect("localhost","root","","art_galllery"); // GETTINFG THE USER IP ADDRESS function getIp() { $ip = $_SERVER['REMOTE_ADDR']; if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { ...
#!/bin/bash #SBATCH --ntasks=2 #SBATCH --time=10:00:00 # walltime set -euo pipefail # kill the job if anything fails set -x # echo script module purge module load julia/1.7.2 hdf5/1.10.1 netcdf-c/4.6.1 openmpi/4.0.1 export JULIA_NUM_THREADS=${SLURM_CPUS_PER_TASK:=1} export JULIA_MPI_BINARY=system exp...
#!/usr/bin/perl -w use strict; use Time::Local; my ($rday,$rmonth,$ryear); my $day = 60*60*24; my $easter; my @all; ########### sub options ########### { my ($day,$month,$year); if (@ARGV>=2) { print "\nUsage: $0 [[[dd.]mm.]yyyy]\n\n"; exit 1; } if (@ARGV==1) { ($day,$month,$year) = split(/\./,$ARGV[0]); ...
/* * Generated by asn1c-0.9.22 (http://lionet.info/asn1c) * From ASN.1 module "RRLP-Components" * found in "../rrlp-components.asn" */ #ifndef _MsrPosition_Rsp_H_ #define _MsrPosition_Rsp_H_ #include <asn_application.h> /* Including external dependencies */ #include "ExtensionContainer.h" #include <constr_SEQU...
package gnf /* Copyright 2019 NFSB Research Team & Developers 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 a...
import { v4 as uuidv4 } from "uuid"; export function loadJsonFromDisk(obj) { return shifterMappingToStateMapping(obj, {}, {}, ""); } export function getDataSourceFieldId( stateMapping, objectName, fieldName, dataSourceFieldId ) { let ids = []; if (objectName in stateMapping) { ids = Object.keys(stat...
<?php return [ 'lol' => 'salut toi"blablabla"', 'hey' => 'bonjour"yahi"', 'slt' => 'je m appelle thierry"yep"' ];
package tests import io.kotlintest.matchers.* import io.kotlintest.specs.StringSpec import it.ipzs.cieidsdk.common.CieIDSdk class Pin : StringSpec({ val rightPin = "12345678" CieIDSdk.pin = rightPin "pint should not empty or null" { CieIDSdk.pin shouldNotBe "" } "length should be 8" { ...
package TestApp::Controller::Engine::Request::Uploads; use strict; use base 'Catalyst::Controller'; sub slurp : Relative { my ( $self, $c ) = @_; $c->response->content_type('text/plain; charset=utf-8'); $c->response->output( $c->request->upload('slurp')->slurp ); } 1;
module InstaScraper class JSON def raw_json @raw_json ||= response.body end def data @data ||= Hashie::Mash.new(::JSON.parse(raw_json)) .extend(Hashie::Extensions::DeepFetch) .extend(Hashie::Extensions::DeepFind) end attr_writer :respon...
package log import ( "bytes" "distributed/registry" "fmt" stlog "log" "net/http" ) func SetClientLogger(serviceURL string, clientService registry.ServiceName) { stlog.SetPrefix(fmt.Sprintf("[%v] - ", clientService)) stlog.SetFlags(0) stlog.SetOutput(&clientLogger{url: serviceURL}) } type clientLogger struct ...