text
stringlengths
27
775k
@file:Suppress("NOTHING_TO_INLINE") package com.soywiz.kds import java.util.* actual class WeakMap<K : Any, V> { val wm = WeakHashMap<K, V>() actual operator fun contains(key: K): Boolean = wm.containsKey(key) actual operator fun set(key: K, value: V) = run { if (key is String) error("Can't use S...
๏ปฟusing DigitalRune.Geometry; using DigitalRune.Graphics.Scene3D; using DigitalRune.Mathematics; using DigitalRune.Mathematics.Algebra; using NUnit.Framework; namespace DigitalRune.Graphics.Tests { [TestFixture] public class CameraInstanceTest { [Test] public void PoseTest() { CameraInstance ca...
import Sequelize from 'sequelize' import dbConfig from '../config/dbConfig' // TODO: add logger const sequelize = new Sequelize(dbConfig.database, dbConfig.username, dbConfig.password, { host: dbConfig.host, port: dbConfig.port, dialect: dbConfig.dialect, dialectOptions: dbConfig.dialectOptions, operatorsAli...
<?php class SXE extends SimpleXmlElement { public function count() { echo "Called Count!\n"; return parent::count(); } } $str = '<xml><c>asdf</c><c>ghjk</c></xml>'; $sxe = new SXE($str); var_dump(count($sxe)); ?> ==Done==
import 'dart:convert'; import 'package:archive/archive.dart'; import 'package:flutter_trading_volume/models/supported_pairs.dart'; import 'package:flutter_trading_volume/models/trades/binance_trade.dart'; import 'package:flutter_trading_volume/models/trades/bitfinex_trade.dart'; import 'package:flutter_trading_vol...
\ local utils = require("leftry.utils") local function quasiquote_eval(invariant, car, output) if utils.hasmetatable(car, list) then if car:car() == symbol("quasiquote-eval") then local cdr = car:cdr() assert(list.__len(cdr) == 1, "quasiquote_eval only accepts one parameter.") return co...
from django.shortcuts import render from django.db.models import Max, Count from leads.models import Team, Distance from leads.serializers import TeamSerializer, TeamActvSerializer, DistanceSerializer from rest_framework import generics class TeamListAPI(generics.ListAPIView): queryset = Team.objects.all() ser...
unorm = require('unorm'); // Function to display Unicode codepoints of a string. function codepoints(string) { return string.split('').map(function(chr) { var codepoint = chr.charCodeAt(0); return (codepoint >= 33 && codepoint <= 126) ? JSON.stringify(chr) : 'U+' + codepoint.toString(16).toUpperCase(); })....
ActiveDirectory-Password-Change =============================== ![Screenshot](https://raw.github.com/janikvonrotz/ActiveDirectory-Password-Change/master/doc/screenshot.png) * Install dependencies with [bower](https://github.com/bower/bower) * Run a bower update in the project root * Add an ActiveDirectory user which ...
<?php session_start(); error_reporting(0); if(isset($_SESSION['email'])) { $email = $_SESSION['email']; $id=$_GET['id']; $errors = array(); $db = mysqli_connect('localhost:3307', 'root', '', 'foodshala'); $query="INSERT INTO cart(email, dishid) VALUES('$email','$id')"; mysqli_query($db, $query); echo "done"; ech...
# Alignments These directories hold Turtle-based alignments between Brick and other ontologies, as well as the auxiliary files needed to generate those alignments where necessary. Alignments should be distributed as Turtle files with a specific naming schema. For an ontology `X`, the alignment file should be `Brick-X...
/* Copyright ยฉ LiquidWeb 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 writing, software distribu...
package br.com.alura.technews.retrofit.service import br.com.alura.technews.model.Noticia import retrofit2.Call import retrofit2.http.* interface NoticiaService { @GET("noticias") fun buscaTodas(): Call<List<Noticia>> @POST("noticias") fun salva(@Body noticia: Noticia): Call<Noticia> @PUT("noti...
#[macro_use] extern crate c2rust_xcheck_derive; extern crate c2rust_xcheck_runtime; extern crate c2rust_bitfields; use c2rust_bitfields::BitfieldStruct; use c2rust_xcheck_runtime::hash::jodyhash::JodyHasher; use c2rust_xcheck_runtime::hash::simple::SimpleHasher; use c2rust_xcheck_runtime::hash::CrossCheckHash as XCH;...
๏ปฟ// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT license. using System; namespace FASTER.core { /// <summary> /// Configuration settings for serializing objects /// </summary> /// <typeparam name="Key"></typeparam> /// <typeparam name="Value"></typeparam> ...
from datetime import datetime def get_quote() : date = str(datetime.now().date()) quotes = open("quotes.txt",'r',encoding="ISO-8859-1") line = quotes.readline() while line is not "": if line.split(' ', 1)[0] == date: quotation = line.split(' ',1)[1] print_quote(quotation) quotes.close() re...
# frozen_string_literal: true module Resolvers module ErrorTracking class SentryErrorsResolver < BaseResolver def resolve(**args) args[:cursor] = args.delete(:after) project = object.project result = ::ErrorTracking::ListIssuesService.new( project, context[:curr...
// /////////////////////////////////////////////////////////////////// // // class: seg // // /////////////////////////////////////////////////////////////////// #ifndef pniseg_h #define pniseg_h // /////////////////////////////////////////////////////////////////// #include "pnimath.h" #include "pnivec3.h" // ///...
#!/bin/bash sudo apxs -a -i -c mod_waf.c sudo service apache2 restart sudo chown -R www-data.www-data /home/dexter/git_working/waf_apache_module/waf sudo chmod -R 774 /home/dexter/git_working/waf_apache_module/waf sudo chmod 777 /usr/lib/apache2/modules/mod_waf.so
; VL 2014 -- VL Verilog Toolkit, 2014 Edition ; Copyright (C) 2008-2015 Centaur Technology ; ; Contact: ; Centaur Technology Formal Verification Group ; 7600-C N. Capital of Texas Highway, Suite 300, Austin, TX 78731, USA. ; http://www.centtech.com/ ; ; License: (An MIT/X11-style license) ; ; Permission is here...
<?php namespace LAuth\Plugins\UEditor; use Illuminate\Http\Request; class Uploadvideo extends Uploadfile implements Contracts\UEditor { public function __construct(Request $request) { parent::__construct($request); $this->config = [ "path" => config('ueditor.videoPathFormat'), ...
--- title: ComponentCounts searchTitle: Lua Spell ComponentCounts weight: 1 hidden: true menuTitle: ComponentCounts --- ## ComponentCounts ```lua Spell:ComponentCounts(number i); -- number ```
var browserify = require('browserify'), watchify = require('watchify'), gulp = require('gulp'), merge = require('merge-stream'), file = require('gulp-file'), jsonEditor = require("gulp-json-editor"), del = require('del'), source = require('vinyl-source-stream'), fs = require('fs'), s...
๏ปฟusing System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Text; using System.Threading.Tasks; using HtmlAgilityPack; namespace BRUParserTable { public class BRUParser { WebClient webClient = new WebClient(); string Return; public async Task<string...
--- order: 1 title: scala_ๅŸบ็ก€ date: 2021-02-08 09:57:38 permalink: /pages/b8ef2f/ categories: - ่ฏญ่จ€ - scala tags: - null comment: true --- # ็ฌฌไธ€็ซ  ๅŸบ็ก€ ## ๅธธ็”จ็ฑปๅž‹ scalaไธญๅธธ็”จ็ฑปๅž‹ๅฆ‚ไธ‹๏ผš - Byte - Char - Short - Int - Long - Float - Double - Booean ่ฟ™ไบ›็ฑปๅž‹้ƒฝๆ˜ฏ็ฑป๏ผŒๆ‰€ไปฅๅœจscalaไธญไธ้œ€่ฆๅŒ…่ฃ…็ฑปๅž‹๏ผŒๅœจๅŸบๆœฌ็ฑปๅž‹ๅ’ŒๅŒ…่ฃ…็ฑปๅž‹ไน‹้—ด็š„่ฝฌๆขๅทฅไฝœๆ˜ฏscala็ผ–่ฏ‘ๅ™จ็š„ไบ‹ใ€‚ ้™คๆญคไน‹ๅค–๏ผŒ่ฟ˜ๆœ‰ `Null` ็ฑปๅž‹๏ผŒๆŒ‡ไปฃ `...
# GogoKit - viagogo API Client Library for PHP [![Package Version](https://img.shields.io/packagist/v/viagogo/gogokit.svg?style=flat)][version] [![Total Downloads](https://img.shields.io/packagist/dt/viagogo/gogokit.svg?style=flat)][downloads] [![Code Climate](https://img.shields.io/codeclimate/github/viagogo/gogokit.p...
<html> <head> welcome to simplexue </head> <body> <?php if($_POST['user'] && $_POST['pass']) { $conn = mysql_connect("********", "*****", "********"); mysql_select_db("phpformysql") or die("Could not select database"); if ($conn->connect_error) { die("Connection failed: " . mysql_error($conn)); } $user = $...
import { CloudFrontToS3 } from "@aws-solutions-constructs/aws-cloudfront-s3"; import { aws_certificatemanager, aws_route53, aws_route53_targets, aws_s3_deployment, } from "aws-cdk-lib"; import { Construct } from "constructs"; interface Props { hostedZone: aws_route53.IPublicHostedZone; certificate: aws_cer...
package uk.co.appsbystudio.geoshare.friends.manager interface FriendsManagerPresenter { fun friends() fun viewpagerItem(item: Int) fun search() fun invalidSession() fun stop() }
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; class ResultController extends Controller { public function result(Request $request){ exec('cd '.app_path().'..\\public', $output, $ret_code); exec('python script.py'. ' '.$request->input('dep').' '.$request->input('ar...
//Autogenerated by SSDCPortal.EntityGenerator using SSDCPortal.Constants; using System; using System.Collections.Generic; using System.ComponentModel; namespace SSDCPortal.Shared.DataInterfaces { public interface IMessage { Int32 Id { get; set; } String UserName { get; set; } String T...
-- @testpoint:opengaussๅ…ณ้”ฎๅญ—command_function_code(้žไฟ็•™)๏ผŒไฝœไธบ่ง’่‰ฒๅ --ๅ…ณ้”ฎๅญ—ไธๅธฆๅผ•ๅท-ๆˆๅŠŸ drop role if exists command_function_code; create role command_function_code with password 'gauss@123' valid until '2020-12-31'; --ๅ…ณ้”ฎๅญ—ๅธฆๅŒๅผ•ๅท-ๆˆๅŠŸ drop role if exists "command_function_code"; create role "command_function_code" with password 'gauss@...
package ru.otus.otuskotlin.marketplace.backend.repo.dynamo import ru.otus.otuskotlin.marketplace.backend.repo.test.* import java.util.* /* ะะธะบะพะณะดะฐ ั‚ะฐะบ ะฝะต ะดะตะปะฐะนั‚ะต ะบะฐะบ ะฒ ัั‚ะพะผ ั‚ะตัั‚ะต. ะ—ะดะตััŒ ะธัะฟะพะปัŒะทัƒะตั‚ัั ะฑะพะตะฒะฐั ะฑะฐะทะฐ ะดะฐะฝะฝั‹ั… dynamoDB ั ั‚ะตัั‚ะพะฒั‹ะผะธ ั‚ะฐะฑะปะธั†ะฐะผะธ. ะ’ ะธั‚ะพะณะต, ั‚ะฐะฑะปะธั†ั‹ ัะพะทะดะฐัŽั‚ัั ะฟะพัะปะต ะบะฐะถะดะพะน ัะฑะพั€ะบะธ. ะ•ัะปะธ ะธั… ะฝะต ะฟะพะดั‡ะธั‰ะฐ...
package com.foryouandme.data.repository.auth.network.request import com.squareup.moshi.Json data class LoginRequest<T>(@Json(name = "user") val user: T) data class PhoneLoginRequest( @Json(name = "phone_number") val phoneNumber: String, @Json(name = "verification_code") val verificationCode: String ) data c...
package br.charles.repository; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.PagingAndSortingRepository; import org.springframework.data.repository.query.Param; import org.sp...
import 'core/room.dart'; import 'options.dart'; /// Main entry point to connect to a room. /// {@category Room} class LiveKitClient { static const version = '1.0.0'; /// Convenience method for connecting to a LiveKit server. /// Returns a [Room] upon a successful connect or throws when it fails. /// Alternati...
/* * Copyright 2018 Nazmul Idris. All rights reserved. * * 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 appli...
# Data Access ๆ•ฐๆฎ่ฎฟ้—ฎ ๆœฌๅ•ๅ…ƒๅˆ›ๅปบไบŽ2015-10-22๏ผŒ็”จไบŽๅญ˜ๅ‚จC#ไธญไธŽๆ•ฐๆฎๆœ‰ๅ…ณ็š„็ซ ่Š‚ๅ†…ๅฎนใ€‚ ๅ…ถไธญๅฐ†ๆถ‰ๅŠไปฅไธ‹ๅ‡ ไธชๆ–น้ข็š„ๅ†…ๅฎน๏ผš * **ๆ–‡ไปถ็ณป็ปŸๆ•ฐๆฎ** * **XML** * **LINQ็ฎ€ไป‹** * **ๅบ”็”จLINQ**
package org.jim.common.cluster; import java.util.UUID; import org.jim.common.ImPacket; /** * ๆˆๅ‘˜ๅ˜้‡group, userid, ip่ฐๆœ‰ๅ€ผๅฐฑๅ‘็ป™่ฐ๏ผŒtoAllไธบtrueๅˆ™ๅ‘็ป™ๆ‰€ๆœ‰<br> * packetๆ˜ฏไธๅ…่ฎธไธบnull็š„ * @author WChao * 2018ๅนด05ๆœˆ20ๆ—ฅ ไธ‹ๅˆ3:10:29 */ public class ImClusterVo implements java.io.Serializable { private static final long serialVersionUID = 697...
--- title: JPA Relation 2 author: Njade date: 2020-12-16 00:25:00 +0900 categories: [JPA] tags: [JPA] --- ์ด ๊ฒŒ์‹œ๊ธ€์€ ์ธํ”„๋Ÿฐ์˜ [๊น€์˜ํ•œ๋‹˜์˜ ๊ฐ•์˜](https://www.inflearn.com/course/ORM-JPA-Basic)๋ฅผ ๋ณด๊ณ  ์ •๋ฆฌํ•œ ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์‹ค์ „ ์˜ˆ์ œ์˜ ํŒ ๋“ฑ์„ ์ œ์™ธํ•œ ์ฝ”๋“œ๋Š” ์ฒจ๋ถ€ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค. ๊ฐ•์˜๋ฅผ ๋ด์ฃผ์„ธ์š”. --- ## ๋‹ค์–‘ํ•œ ์—ฐ๊ด€๊ด€๊ณ„ ๋งตํ•‘ --- * ์—ฐ๊ด€๊ด€๊ณ„ ๋งตํ•‘์‹œ ๊ณ ๋ ค์‚ฌํ•ญ 3๊ฐ€์ง€ * ๋‹ค๋Œ€์ผ [N:1] * ์ผ๋Œ€๋‹ค [1:N] * ์ผ๋Œ€์ผ [1:1] * ๋‹ค๋Œ€๋‹ค [...
from pyspark.sql.functions import col """Toy join function to showcase spark functions.""" def join_dataframes(left, right, columns_left, columns_right, join_type='inner'): if len(columns_left) == len(columns_right) and len(columns_left) > 0: cond = [col(left_col) == col(right_col) for (left_col, right_co...
--- title: Good News date: 2017-03-11 14:45:00 Z tags: - shopify - e-commerce - design - fashion - clothing - apparel - shoes - trainers image: "/uploads/255-goodnews@2x.jpg" store-link: https://goodnews.london credit: Not credit-link: http://not-studio.com ---
#!ruby start_num = ARGV[0].hex end_num = ARGV[1].hex start_num.upto(end_num) do |n| puts sprintf('0x%04x', n) end
package xyz.gillall.demoapp.ui.pixabay.videogallery import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import androidx.databinding.DataBindingUtil import androidx.fragment.app.Fragment import androidx.navigation.NavController import androidx.navigation.fr...
<?php /** * from php.net. */ /** * Encapsulates a closure. */ final class Delegate { private $_Closure; /** * construct. * * @param Callable $closure */ public function __construct($closure) { // $this->_Closure = \Closure::fromCallable($closure); // $this->_Clo...
class ChangeSpaceObjCol < ActiveRecord::Migration[6.0] def change rename_column :album_space_objs, :object_id, :space_obj_id end end
module OodJob # A class that handles the communication with a resource manager for # submitting/statusing/holding/deleting jobs # @abstract class Adapter # The root exception class that all {Adapter} exceptions inherit from class Error < StandardError; end # The cluster used in submitting, querying...
#!/usr/bin/perl # Copyright (c) 2021 Tom Hancocks # # 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,...
package m54tom55 import ( "testing" "github.com/gogo/protobuf/proto" "github.com/pkg/errors" "github.com/stackrox/rox/generated/storage" "github.com/stackrox/rox/pkg/testutils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" bolt "go.etcd.io/bbolt" ) var ( // Sections are not esse...
package activerecord import ( "context" "fmt" "strings" "github.com/activegraph/activegraph/activesupport" ) type ErrUnknownPrimaryKey struct { PrimaryKey string Description string } func (e *ErrUnknownPrimaryKey) Error() string { return fmt.Sprintf("Primary key is unknown, %s", e.Description) } type R str...
from compas.geometry.primitives.frame import Frame class BeamStorage(object): def __init__(self, frame=None, y_count=5, y_spacing=140, z_spacing=140): # type: (Frame, int, float, float) -> None """Frame should have X pointing along beam length and Z pointing to world Z""" self.frame = fra...
# -*- coding: utf-8 -*- import requests from lxml import etree import SaveData import random class Get_album_and_aongs: ''' ้€š่ฟ‡ไธ“่พ‘ๅท่Žทๅ–ไธ“่พ‘ไฟกๆฏๅ’ŒๆญŒๆ›ฒไฟกๆฏ ''' def __init__(self, album_id, proxy_pool): self.album_id = album_id self.proxy_pool = proxy_pool def get_album_and_songs(self): ...
/** * Copyright 2018 gd Author. All Rights Reserved. * Author: Chuck1024 */ package discovery import ( "github.com/chuck1024/gd/service" ) var ( defaultConf = "conf/conf.ini" ) type DogDiscovery interface { Start() error Close() Watch(key, node string) error WatchMulti(nodes map[string]string) error AddNo...
import { PublicKey } from '@solana/web3.js'; import { getPayer, getRpcUrl} from '../utils'; import { Connection, NodeWallet, programs, actions } from '@metaplex/js'; async function getVaultInfo(vaultAddress) { const rpcUrl = await getRpcUrl(); let connection = new Connection(rpcUrl, 'confirmed'); const ...
package net.apptronic.test.commons_sample_compat_app import android.content.Intent import android.os.Bundle import net.apptronic.test.commons_sample_compat_app.about.AboutActivity import net.apptronic.test.commons_sample_compat_app.data.UserData import net.apptronic.test.commons_sample_compat_app.fragments.dialog.Samp...
import json from enum import Enum, auto from . import profile, oauth class OutputFormat(Enum): json = auto() shell = auto() config = auto() def output(fmt: OutputFormat, tokens: oauth.Tokens, **kwargs: str) -> None: if fmt == OutputFormat.json: print(json.dumps(tokens._asdict(), indent=4)) ...
/* * Copyright (C) 2016-2019 Lightbend Inc. <https://www.lightbend.com> */ package com.lightbend.lagom.javadsl.api import org.scalatest.{ Inside, Matchers, WordSpec } class ScalaSupportSpec extends WordSpec with Matchers with Inside { "scala support" should { "resolve a function" in { val method: Scal...
--- layout: default title: Ferramentas description: Ferramentas utilizadas pela nossa empresa! --- ## Ferramentas [Trello](https://trello.com) [Bug Track](https://www.bugtrack.net) [Git Hub](https://github.com) [BPMN.io](https://demo.bpmn.io/s/start)
// Copyright Luc Yriarte <luc.yriarte@thingagora.org> 2018 // License: Apache-2.0 package main import ( "github.com/hyperledger/fabric/core/chaincode/shim" ) type Storable interface { Put(stub shim.ChaincodeStubInterface, key string) error Get(stub shim.ChaincodeStubInterface, key string) error }
#!/bin/bash cd ../../ brew install boost --with-python brew install boost-python ffmpeg xerces-c mono brew cask install java schemas="$(pwd)/Schemas" echo "export MALMO_XSD_PATH=$schemas" >> ~/.bashrc source ~/.bashrc
package com.quickbirdstudios.surveykit.backend.presenter import com.quickbirdstudios.surveykit.FinishReason import com.quickbirdstudios.surveykit.result.StepResult sealed class NextAction { data class Next(val result: StepResult) : NextAction() data class Back(val result: StepResult) : NextAction() object...
import 'dart:async'; import 'package:academy_app/data/repository/failures/firestore_failure.dart'; import 'package:academy_app/data/repository/user/i_user_repository.dart'; import 'package:academy_app/model/user_data/user_data.dart'; import 'package:bloc/bloc.dart'; import 'package:freezed_annotation/freezed_annotatio...
def coord(path) e = 0 ne = 0 path = path.chars until path.empty? do s = path.shift case s when ?e e += 1 when ?w e -= 1 when ?n t = path.shift case t when ?e ne += 1 when ?w e -= 1 ne += 1 end when ?s t = path.shift ...
๏ปฟ//********************** //Hosting eDrawings control in Windows Forms //Copyright(C) 2019 www.codestack.net //License: https://github.com/codestack-net-dev/solidworks-api-examples/blob/master/LICENSE //Product URL: https://www.codestack.net/edrawings-api/gettings-started/winforms/ //********************** using Syste...
export function lowercaseStaticParts(path: string): string { return path .split('/') .map((part) => { return part.startsWith(':') ? part : part.toLowerCase(); }) .join('/'); }
package com.gowtham.letschat.fragments import android.os.Bundle import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.google.android.material.bottomsheet.BottomSheetDialogFragment import com.gowtham.letschat.databinding.FAttachmentBinding import com.gowtham.letschat.datab...
# Conway's Game of Life A C implementation of Conway's Game of Life using ncurses. ### Getting Started ```sh # Substitute `gmake` if on *BSD $ make $ ./conway ``` Press 'q' or CTRL-C to exit. A full list of keybindings can be displayed by pressing '?'. `conway` can also read a starting position from a cells format...
module ElasticsearchDslBuilder # @abstact Exceptions raised by ElasticsearchDslBuilder inherit from Error class Error < StandardError; end # Exception raised when Queries::Query.to_hash attempts to build invalid query class InvalidQuery < Error; end end
require "alexa_string_tools/version" require "humanize" module AlexaStringTools # we'll lazy load this mapping. @@alexa_string_mapping = nil def email_from_alexa string = convert_from_alexa_string_to_email(self) string.strip end private def convert_from_alexa_string_to_email(string) alexa_...
package com.xaron.equilinoxmodded.framework.blueprintgen.components; import java.io.IOException; import com.xaron.equilinoxmodded.framework.CsvWriter; import com.xaron.equilinoxmodded.framework.blueprintgen.components.deathai.DeathAIGen; import food.FoodSectionType; public class FoodComponentGen extends ComponentGe...
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file // for details. All rights reserved. Use of this source code is governed by a // BSD-style license that can be found in the LICENSE file. library which.test.candidate_paths; import 'package:unittest/unittest.dart'; import 'util.dart'; mai...
package it.sephiroth.android.library.kotlin_extensions.io.reactivex import io.reactivex.disposables.Disposable fun Disposable.addTo(autoDisposable: AutoDisposable): Disposable { autoDisposable.add(this) return this }
#pragma once #ifndef UTILS_HPP #define UTILS_HPP namespace cave { /**Vector de tres componentes. * */ struct caveVec3f { float x; float y; float z; caveVec3f(float x, float y, float z) { this->x = x; this->y = y; this->z = z; } caveVec3f() = default; }; /**Cuaternion. * */ struct caveQ...
## ์›น ์•ˆ๋…•ํ•˜์„ธ์š”. ! MONKEY.D ์ž…๋‹ˆ๋‹ค :-) ์›น ์Šคํฌ๋ž˜ํ•‘ ํ•˜๋Š” ํ”„๋ ˆ์ž„์„ ๊ฐ„๋‹จํ•˜๊ฒŒ ์ ์–ด๋ณผ๊ฑฐ์—์š”. ์š”๋ฒˆ์—๋Š” ์ €๋งŒ์ด ์ฐธ๊ณ ํ•˜๋Š” ์šฉ์œผ๋กœ ์ž‘์„ฑํ•  ๊ฑฐ์—ฌ์„œ ์–‘ํ•ด ๋ถ€ํƒ๋“œ๋ฆฝ๋‹ˆ๋‹ค. ```python #์…€๋ ˆ๋‹ˆ์›€ ๊ธฐ๋ณธ ํ”„๋ ˆ์ž„ from selenium import webdriver browser = webdriver.Chrome() browser.maximize_window() url = "url๋„ฃ์„ ์ฃผ์†Œ" browser.get(url) #์‚ฌ์ดํŠธ๋กœ ์ด๋™. ``` ```python driver.find_element_by_xpath('xpath์ฃผ์†Œ!').click()...
/*global Raphael, d3, $, define */ /*! * Diff็š„ๅ…ผๅฎนๆ€งๅฎšไน‰ */ ;(function (name, definition) { if (typeof define === 'function') { // Module define(definition); } else { // Assign to common namespaces or simply the global object (window) this[name] = definition(function (id) { return this[...
var options = function(type, height, numbers , color){ return { chart: { height: height, width: '100%', type: type, sparkline: { enabled: true }, toolbar: { show: false, }, }, grid: { show: false, padding: { top: 0...
using Random using StaticArrays using Test using CLIMA using CLIMA.Atmos using CLIMA.GenericCallbacks using CLIMA.ODESolvers using CLIMA.Mesh.Filters using CLIMA.MoistThermodynamics using CLIMA.PlanetParameters using CLIMA.VariableTemplates # ------------------------ Description ------------------------- # # 1) Dry R...
๏ปฟnamespace Evolution.Textkernel { using Evolution.Textkernel.Models; using System.Threading.Tasks; /// <summary>Interface for Textkernel's CV Extract parser.</summary> public interface ITextkernelParser { /// <summary>Send the file bytes to the service and get back the deserialised result.<...
(ns metro.components.web.health (:require [clojure.data.json :as json] [metro.components.server.pedestal :as server] [metro.components.db.postgres :as postgres])) (defn health [request] {:status 200 :headers {"Content-Type" "application/json"} :body (json/write-str {:server @serve...
import React, { Component } from 'react' import ConcertList from '../components/ConcertList' import DeleteArtist from '../components/DeleteArtist' class CurrentArtist extends Component { componentDidMount() { this.props.getConcerts(this.props.currentArtist.id) } componentDidUpdate(prevProps) { if(this....
<?php namespace estoque\Http\Controllers; use Illuminate\Http\Request; use estoque\Http\Requests; use Illuminate\Support\Facades\DB; use estoque\Produto; use estoque\Http\Requests\ProdutoRequest; class ProdutoController extends Controller { public function __construct(Request $request) { //$this->mid...
package org.zstack.header.identity; import org.zstack.header.query.ExpandedQueries; import org.zstack.header.query.ExpandedQuery; import org.zstack.header.search.Inventory; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collection; import java.util.List; @Inventory(mappingVOClass ...
rootProject.name = "PortalClosers" include(":core") project(":core").projectDir = File("game/core") include(":android") project(":android").projectDir = File("game/android") include(":desktop") project(":desktop").projectDir = File("game/desktop") include(":headless") project(":headless").projectDir = File("game/he...
package v1 import ( "github.com/Gavazn/Gavazn/internal/category" "github.com/Gavazn/Gavazn/internal/comment" "github.com/Gavazn/Gavazn/internal/post" "github.com/Gavazn/Gavazn/internal/user" "github.com/labstack/echo" "go.mongodb.org/mongo-driver/bson" ) /** * @api {get} /api/v2/dashboard get statistics * @ap...
function addServicesList(name, file) { angular.bootstrap(document.getElementById("divWrap"), ['useApp']); var list = RepeatObj.addList(name, file, function () { showService(name); function showService(name) { console.log(name + ' initialize(); complete'); RepeatObj.useLi...
import React from 'react' import { graphql } from 'gatsby' import Layout from '../components/Layout' import { useSiteMetadata } from '../hooks' import WebmentionReplies from '../components/Webmention/WebmentionFeed' import { Helmet } from 'react-helmet/es/Helmet' const PageTemplate = ({ data }) => { const { title: ...
from rest_framework.permissions import BasePermission class HasValidToken(BasePermission): """Has Valid Token Checks if the request has a valid token, even if the user is not authenticated """ def has_permission(self, request, view): return bool(getattr(request, "auth", False))
package org.example.quiz.service import cats.effect.{ContextShift, IO} import org.example.quiz.dao.QuestionAnswerDao import org.example.quiz.entities._ class QuizService(dao: QuestionAnswerDao, categoryService: CategoryService) (implicit cs: ContextShift[IO]) { private val number...
package aws import ( "fmt" "net/url" "regexp" "strings" "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/iam" "github.com/hashicorp/terraform/helper/schema" ) func resourceAwsIamRolePolicy() *schema.Resource { return &schema.Resource{ // PutRolePol...
function Invoke-AmoebaMLPipeline { [CmdletBinding()] param( [Parameter(Mandatory=$True,ValueFromPipeline=$True)] [ref]$Pipeline, [Parameter(Mandatory)] [Type]$DataSet, [Parameter(Mandatory)] [Type]$Predictor ) Write-Verbose ("{0}: {1}" -f $MyInvoc...
namespace :doc do desc "Generate the documentation" task :yard do puts "Generating YARD documentation" system(File.join("..", "build", "run"), "doc:yardoc") end desc "Create the API.md file" task :api do require 'erb' require 'sinatra' require 'jsonmodel' require_relative '../back...
//index.js //่Žทๅ–ๅบ”็”จๅฎžไพ‹ Page({ onShareAppMessage(): object { return { title: 'Oak Weui Avatar ๅคดๅƒ', path: '/pages/avatar/avatar', } }, })
module model_module use amrex_fort_module, only : rt => amrex_real implicit none contains subroutine get_model_size(ymin, ymax, dy, lo, hi) use amrex_fort_module, only : rt => amrex_real real(rt) , intent(in) :: ymin, ymax, dy integer, intent(out) :: lo, hi integer :: npts ...
export default { control: { opacity: 1, backgroundColor: "#242424" }, button: { backgroundColor: "#332A00" }, buttonLabel: { color: "#FBD89B" }, disabledButtonLabel: { color: "#4F493D", fontSize: 20 }, cancelButton: { backgr...
// JVM_TARGET: 1.8 // KOTLIN_CONFIGURATION_FLAGS: +JVM.JVM8_TARGET_WITH_DEFAULTS interface Test { fun test(): String { return "OK" } fun testAbstract(): String } // TESTED_OBJECT_KIND: function // TESTED_OBJECTS: Test, test // FLAGS: ACC_PUBLIC // TESTED_OBJECT_KIND: function // TESTED_OBJECTS: ...
require "active_support/dependencies" module ActiveMailer # Our host application root path # We set this when the engine is initialized mattr_accessor :app_root # Yield self on setup for nice config blocks def self.setup yield self end end require "active_mailer/engine" ActiveRecord::ConnectionAdapte...
<?php /** * Category */ namespace app\Models; /** * Category */ class Category { /** @var int $id */ public $id = 0; /** @var string $name */ public $name = 'default-name'; }
<?php namespace App\Http\Controllers\Admin; use App\Http\Model\Real; use App\Http\Model\User; use Validator; use Illuminate\Support\Facades\Crypt; //use \Illuminate\Validation\Validator; use Illuminate\Http\Request; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Input; class IndexController exte...
package my.sample class A fun A.check() {} fun test() { val a = A() a.check<caret>() A().check() }
fn = normpath(joinpath(dirname(@__FILE__),"center_sizes.jld2")) d = JLD2.jldopen(fn,"r") tmp = d["ctrs"] ctrs = [SVector(q...) for q in tmp] rads = d["rads"] tree = CD.Octree(ctrs, rads) # extract all the triangles that (potentially) intersect octant (+,+,+) pred(i) = all(ctrs[i].+rads[i] .> 0) bb = SVector(0.5, 0.5...