text stringlengths 27 775k |
|---|
package com.myworld.cgate.auth.authenticate.service.sms
import com.myworld.cgate.auth.authenticate.service.ValidateCodeGenerator
import com.myworld.cgate.auth.authenticate.vo.SmsCode
import com.myworld.cgate.auth.service.MyUserKeyService
import com.myworld.cgate.common.SecurityConstants
import com.myworld.cgate.commo... |
import React from 'react';
interface CleanupFn {
(): void;
}
type AtomReturn<T> = {
[K in keyof T]: T[K] extends (..._: any[]) => infer R ? R : T[K];
};
export interface CreateFnParam<P = {}> {
props: P;
atom<T>(state: T): AtomReturn<T>;
onMount(fn: () => void): void;
onMount(fn: () => CleanupFn): void... |
//==============================================================
// DPC++ Example
//
// Matrix Multiplication with DPC++
//
// Author: Yan Luo
//
// Copyright © 2020-
//
// MIT License
//
#include <CL/sycl.hpp>
#include <array>
#include <iostream>
#include <cmath>
#include "dpc_common.hpp"
#if FPGA || FPGA_EMULATOR ||... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import os
from mysql_statsd.preprocessors import InnoDBPreprocessor
class InnoDBPreprocessorTest(unittest.TestCase):
def test_values_read_from_vanilla_install(self):
"""
For this mysqld version in default setup::
$ /usr/sbin... |
require 'spec_helper'
describe "fs_files", type: :feature, dbscope: :example do
let!(:site) { gws_site }
let!(:user) { gws_user }
let!(:user1) { create :gws_user, group_ids: user.group_ids }
let!(:user2) { create :gws_user, group_ids: user.group_ids }
let!(:file) do
SS::Sequence.create(id: 'ss_files_id',... |
package com.generalscan.sdkdemo.services
import android.content.ComponentName
import android.content.ServiceConnection
import android.os.IBinder
/**
* ATServiceConnection 实现ServiceConnection接口,用于连接服务
*
* @author Administrator
*/
class MyServiceConnection() : ServiceConnection {
var service: MyService? = null... |
#!/bin/bash
wget https://www.novatel.com/assets/Documents/Downloads/ngpsusbpackage.tar.gz
tar xvfz ngpsubpackage.tar.gz
cd ngpsubpackage
sudo -S dpkg -i ngpsusb.deb
sudo modprobe ngpsusb
sudo apt-get install ros-kinetic-novatel-gps-driver
cd ..
|
package com.gcect.gcectapp.adapters
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.LinearLayout
import android.widget.TextView
import androidx.navigation.NavController
import androidx.recyclerview.widget.RecyclerView
import com.gcect.gcectapp.R
import co... |
<?php
/**
* Routing changed
* User: moyo
* Date: 2018/11/22
* Time: 4:48 PM
*/
namespace Carno\Net\Routing;
use Carno\Net\Endpoint;
class Changed
{
/**
* @var int
*/
private $evs = null;
/**
* @var Endpoint
*/
private $node = null;
/**
* Changed constructor.
*... |
module Legato
class Query
include Enumerable
MONTH = 2592000
REQUEST_FIELDS = 'columnHeaders/name,rows,totalResults,totalsForAllResults,containsSampledData'
BASIC_OPTION_KEYS = [
:sort, :limit, :offset, :start_date, :end_date, :quota_user,
:user_ip, :sampling_level, :segment_id, :trackin... |
<?php
use yii\db\Migration;
/**
* Handles the dropping of table `animals`.
*/
class m171005_154526_drop_unused_tables extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->dropForeignKey('animals_keepers-keeper', 'animals_keepers');
$this->dropForeignKey('anima... |
require 'que/web'
Rails.application.routes.draw do
namespace :api, format: false do
namespace :v1 do
with_options only: :create do
resources :conversions
resources :contacts, path: '/clickfunnels/:api_key/contacts(/:tag)'
end
end
end
devise_for :accounts, skip: :registrations... |
#!/bin/bash
set -e;
if [[ $# -ne 3 ]]; then
exit -1
fi
echo "Testing...."
make clean
make debug
make load
make -C user/ all
CONSUMER=$1
PRODUCER=$2
NUMBER=$3
sudo $CONSUMER &
CONSUMER_PID=$!
sleep 1;
PRODUCERS=()
RETPRODUCERS=0
RETCONSUMERS=0
for ((i=0;i<$NUMBER;i++)); do
sudo $PRODUCER $((i%2)) &
PRODUCERS... |
import traceback
import argparse
import numpy as np
import tensorflow as tf
from tqdm import tqdm
tf.logging.set_verbosity(tf.logging.INFO)
def get_input_fn(feature_ndarray, labels, num_epochs=None, shuffle=True, feature_basename="res"):
"""Returns a tensorflow numpy input function
Arguments:
feature... |
class GamesController < ApplicationController
def index
games = Game.all
render json: games
end
def show
game = Game.find(params[:id])
render json: game
end
def create
game = Game.create(game_params)
if game.valid?
render json: game
else
render json: { errors: game.e... |
Rails.application.routes.draw do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
require 'sidekiq/web'
require 'sidekiq-status/web'
authenticate :user, lambda { |u| u.is_admin? } do
mount Sidekiq::Web => '/sidekiq'
end
devise_for :users, controllers:... |
import 'package:appetiser_app/features/recipes/ui/recipe_list_screen/recipe_list_screen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:material_design_icons_flutter/material_design_icons_flutter.dart';
class HomeScreen extends StatefulWidget {
@override
_Hom... |
'use strict';
export const apiUrl='http://al-server.localhost.com/api/';
export const version: string="1.1.1"; |
// Copyright (c) 2014, 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.
/// @assertion Stream<ProgressEvent> get onLoadStart
/// Stream of loadstart events handled by this Htt... |
## How to Set Policy
### Blockable States
Blockables are created with a score of 0 and in the `UNTRUSTED` state.
<!-- mdformat off(GitHub Table) -->
| State | Default Score Threshold | Blockable Policy |
|-----------------... |
class AddPolymorphicAssociation < ActiveRecord::Migration
def change
remove_column :user_votes, :post_id
add_column :user_votes, :voteable_id, :integer, null: false
add_column :user_votes, :voteable_type, :string, null: false
add_index :user_votes, [:voteable_id, :voteable_type]
add_index :user_... |
import {
CipherKey,
BinaryLike,
CipherGCMTypes,
getCiphers,
createCipheriv,
CipherGCM,
DecipherGCM,
createDecipheriv,
createHash,
} from 'crypto'
import zlib from 'zlib'
export class Encryption {
private cipher: CipherGCM
private decipher: DecipherGCM
private sendCounter: bigint
private recie... |
#!/usr/bin/env bash
### ProductA configuration parameters for tests.
###
### Be sure not to export those variables as they'll override content of configuration files.
### $productA_kit_dir : A directory with kit of productA.
productA_kit_dir="$BUILD_DIR/libs/ProductA"
### $productA_install_root : Root directory wher... |
package br.com.fiap.exemplos;
import java.rmi.RemoteException;
public class PrimeiroClient {
public static void main(String[] args) {
PrimeiroPortTypeProxy ws = new PrimeiroPortTypeProxy();
try {
System.out.println(ws.ola("Maria"));
} catch (RemoteException e) {
e.printStackTrace();
}
}
}
|
var getFileType = (function () {
function getFileType(arrayBuffer) {
var uint8Array = new Uint8Array(arrayBuffer);
var keys = Object.keys(fileType);
for (var i = 0, len = keys.length; i < len; i++) {
var key = keys[i];
var func = fileType[key];
var type = func(uint8Array);
if (type... |
# === IMPORTED FUNCTIONS AND TYPES === #
import Distributions.rand!
import Distributions._rand!
import Distributions.logpdf
import Distributions.ContinuousUnivariateDistribution
import Distributions.ContinuousMultivariateDistribution
# === IMPORTED DISTRIBUTIONS FROM DISTRIBUTIONS.JL === #
import Distributions.Diri... |
#include "src/main/hello_world_message.h"
std::string hello_world_message() { return "Hello World!!!"; }
|
import 'package:flutter_gen/gen_l10n/app_localizations.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:flutter/material.dart' hide Router;
import 'package:language_cards/src/router.dart';
import 'package:language_cards/src/screens/card_list_screen.dart';
import 'package:languag... |
package factoryPattern;
public class CookieTest {
public static void main(String args[]) {
CookieShop cs = new CookieShop(new CookieFactory());
cs.takeOrder("double-choc");
}
}
|
import {execSync} from 'child_process';
import tryCatch from 'try-catch';
import shortdate from 'shortdate';
import {readPackageUpSync} from 'read-pkg-up';
import buildCommand from './build-command.js';
export default (versionNew) => {
const [error, {packageJson} = {}] = tryCatch(readPackageUpSync);
if (e... |
import NonUniformRandomVariateGeneration.sampleMultinomial!
@inline function _iotaParallel!(array::Vector{Int64}, N::Int64, nthreads::Int64,
Nperthread::Int64)
Threads.@threads for i in 1:nthreads
start::Int64 = Nperthread * (i - 1) + 1
finish::Int64 = start + Nperthread - 1
for i = start:finish
... |
---
layout: post
title: Secret解题报告
date: 2016-9-17 01:21
comments: true
reward: true
tags:
- Security
---
题目背景较多,读完题之后,发现其实就是要写一个程序来计算$$2^{year-1} \% 1000000007$$
题目要求一次计算不超过1s才能得满分,而year-1的值非常大。
显然无法使用暴力的pow(2,year-1)%1000000007来计算答案,题目提示结合密码学的相关知识,于是可以判断出有相关的数学方法可以帮助计算。
<!-- more -->
如果学过RSA公钥加密算法,应该对 费马小定理 ... |
unit UfrCfgPredefinedEngines;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, SpTBXControls, SpTBXItem, StdCtrls, Grids,
UfrCfgGameEngines, ExtCtrls, Buttons;
type
TfrCfgPredefinedEngines = class(TFrame)
SpTBXLabel2: TSpTBXLabel;
StringGrid: TString... |
#pragma once
class Ship
{
public:
Ship( int size ) : m_size( size ), m_life( size )
{}
bool IsSunk() const
{
return m_life <= 0;
}
void Hit()
{
--m_life;
}
int Size()
{
return m_size;
}
private:
int m_size;
int m_life;
};
|
# CatCard
一个习惯签到程序,暂时单机,以后可能会慢慢加上服务器
|
New-PSRoleCapabilityFile -Path 'C:\Program Files\WindowsPowerShell\Modules\`
Demo\RoleCapabilities\helpdesk.psrc'
#Just Cmdlets
$CapabilityFile = @{
Path = 'C:\Program Files\WindowsPowerShell\Modules\HelpDesk\RoleCapabilities\`
helpdesk.psrc'
VisibleCmdlets = "get-service"
}
New-PSRoleCapabilityFile @Cap... |
---
title: MySQL Key-Ordered Reads
brief: The number of requests to read the next row in key order.
metric_type: counter
---
### MySQL Key-Ordered Reads
The number of requests to read the next row in key order.
|
using MishMash.Data.Enums;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
namespace MishMash.Data
{
public class Channel
{
[Key]
public int Id { get; set; }
[Required]
[MaxLength(40)]
public string Name { get; set; }
[Required]
... |
# Hello World
## 编写最小化的 Hello World
在上一节完成的代码基础上进行修改:
1. 安装 prop-types
```bash
npm install --save prop-types
```
2. 添加 src/components/hello-world.jsx
```jsx
import React from 'react';
import PropTypes from 'prop-types';
function HelloWorld({
msg,
}) {
return (
<h1>{ msg }</h1>
);
... |
import { Injectable } from '@angular/core'
import { ActivatedRouteSnapshot, CanActivate, RouterStateSnapshot, UrlTree } from '@angular/router'
import { Observable } from 'rxjs'
import { AuthService } from '../../shared/services/auth.service'
@Injectable({
providedIn: 'root'
})
export class GuestGuard implements CanA... |
### Installation
**With git installed:**
```shell
pip install stock-tracker@git+https://github.com/mrnoname1000/stock-tracker
```
**Without git installed:**
```shell
pip install stock-tracker@https://github.com/mrnoname1000/stock-tracker/tarball/master
```
### Usage
Use `stock-tracker --help` for usage
|
package usecase
import (
"context"
"errors"
"reflect"
"testing"
"time"
"go-bank-transfer/domain"
)
type mockTransferRepoStore struct {
domain.TransferRepository
result domain.Transfer
err error
}
func (m mockTransferRepoStore) Create(_ context.Context, _ domain.Transfer) (domain.Transfer, error) {
ret... |
# Array Backprojection
N-array
(1) **travel_times** : travel_times.m, velocity model (similar to velocity.mat).
TTBox : A MatLab Toolbox for the computation of 1D Teleseismic Travel Times https://doi.org/10.1785/gssrl.75.6.726
(2) **backprojection**: backprojection_array.m (modify parameters.m file)
Written in M... |
# Script takes one argument, which should be
# the data.csv file
data=$1
# Calculate the sum of the data, as a proxy
# for a real analysis
sum=$(numsum $data)
# Print out the results!
echo "Result of analysis (sum): $sum" |
package org.vitrivr.cottontail.core.basics
import org.vitrivr.cottontail.core.database.TupleId
/**
* A [Cursor] implementation for Cottontail DB to read data.
*
* @author Ralph Gasser
* @version 1.0.0
*/
interface Cursor<T>: AutoCloseable, Iterator<T> {
/**
* Tries to move this [Cursor]. Returns true on... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
package util
// Message is latest message to be displayed in the web UI.
type Message struct {
Message string `json:"message"`
Sender string `json:"sender"`
Recipient string `json:"recipient"`
Timestamp string `json:"timestamp"`
}
|
--TEST--
G\Introspection\UnionInfo->getDiscriminator();
--SKIPIF--
<?php
include __DIR__ . '/../skipif.inc';
?>
--FILE--
<?php
use G\Introspection\Repository as Gir;
$repo = Gir::getDefault();
// load the repo - we'll do GLib since it SHOULD be around
$repo->require('GLib');
$baseinfo = $repo->findByName('GLib', 'To... |
# frozen_string_literal: true
module Compose
module Hab
# rubocop:disable Style/ClassVars
@@hab_binary ||= ENV["PATH"].split(":")
.map { |path| File.join(path, "hab") }
.find { |path| File.exist?(path) }
# rubocop:enable Style/ClassVars
... |
import React from 'react'
import graphic from "../../../../assets/home/what_is_uthaan/bridging_gap_between_juniors_and_seniors/preview.svg"
import "../../../../styles/home/upper-section/illustration-container/illustration-comp.css"
function ToSeekToFindNotToYield() {
return (
<div className="home-page-illu... |
%include "macros.inc"
global _my_bsfd
global _my_bsrd
global _my_bswapd
global _my_crc32b
global _my_crc32w
global _my_crc32d
global _my_popcntd
global _my_rolb
global _my_rolw
global _my_rold
global _my_rorb
global _my_rorw
global _my_rord
global _my_bsfq
global _my_bsrq
global _my_bswapq
global _my_crc32q
global _my... |
if [ ! -d "sorted/execute" ]; then
echo Directory sorted/execute does not exist.
exit 1
fi
rm -rf passed failed
touch passed
touch failed
cp cerberus.h sorted/execute/
cd sorted/execute
gsed -i '/include/d' *.c
gsed -i '/void abort/d' *.c
gsed -i '/void exit/d' *.c
gsed -i '1i\#include "cerberus.h"' *.c
touch f... |
using System;
using UnityEngine;
namespace Novella.Dialog.Act
{
public enum TransitionMoveType { None, Instant, Linear, Smooth }
// this is for later
//public enum TransitionEffect { FadeIn, FadeOut }
[Serializable]
public class Transition
{
[Header("Actor State")]
[SerializeF... |
# extra queries, unrelated to streams
# road density
psql2csv < sql/12_road_density.sql > ../outputs/road_density.csv
# total land cover alteration
psql2csv "WITH tlca AS
(SELECT
watershed_group_code,
SUM(st_area(geom)) / 10000 as area_tlca_ha
FROM cwf.tlca_union
GROUP BY watershed_group_code
)
SELECT
a.watershe... |
<?php
Route::group(['prefix' => parseLocale()], function() {
Route::get('/', 'HomeController@index')->name('home');
Route::post('/enviar', 'HomeController@enviarEmail')->name('enviar');
});
Route::group(['middleware' => 'auth', 'prefix' => 'sistema'], function() {
Route::get('/', 'Sistema\IndexController@index')->... |
package br.com.bookstore.book.category.builders;
import br.com.bookstore.book.category.Category;
public class CategoryBuilder {
public static Category.Builder createCategory (){
return Category
.builder()
.id(1L)
.name("Romance");
};
}
|
const ancData = require('../data/anc.json');
let commissioners = null;
class Commissioner {
constructor(data) {
Object.assign(this, data);
}
vacant() {
return this.lastName === 'Vacant' && !this.firstName;
}
fullName() {
let name = this.firstName || '';
if (this.l... |
/*
* Copyright 2020 Aaron Barany
*
* 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... |
<#
.SYNOPSIS
Get the file version details
.DESCRIPTION
Get the file version details for any given file
.PARAMETER Path
Path to the file that you want to extract the file version details from
.EXAMPLE
PS C:\> Get-FileVersion -Path "C:\Program F... |
---
title: About
date: 2016-12-04 19:17:00 -05:00
permalink: "/about/"
---
A website by Bryce Zhang. Mandarin Educator. China by birth, America by choice.
[website source code](https://github.com/FHBryceZhang/fhbrycezhang.github.io) |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
*
*/
class Register extends CI_Controller
{
function __construct()
{
parent::__construct();
$this->load->library(array('session', 'form_validation'));
$this->load->helper(array('form', 'string'));
$this-... |
(ns testfunction.core)
(require '[utility.core :as util])
;;----------------------------- Analytical Test Problem Functions
;; x_i in [-100, 100]
(defn h1 [x1 x2]
(def numeratorH1
(+ (util/square (Math/sin (- x1 (util/ddiv x2 8)))) (util/square (Math/sin (+ x2 (util/ddiv x1 8))))))
(def denominatorH1
(+ (u... |
using FluentValidation;
using Identity.API.Contracts.Requests;
namespace Identity.API.Contracts.Validations
{
public class LoginValidator:AbstractValidator<LoginRequest>
{
public LoginValidator()
{
RuleFor(a => a.Email).NotEmpty().WithMessage("The Email is required");
R... |
use text_io::read; // For easy stdin input
use regex::Regex;
fn main() {
// TODO: update urls to handle the repodata metadata
let url_regex = Regex::new(r"[^/]+\.rpm").unwrap();
loop {
let line: String = read!("{}\n");
let parts: Vec<&str> = line.split(" ").collect();
if parts.le... |
# Direction des Transports terrestres (routiers)
Ministère des Infrastructures terrestres et du Désenclavement (MITD)
-----------------------------------------------------------------------
**Adresse**
-----------
Avenue André Peytavin X Corniche - BP 2083 - Dakar
**Téléphone**
-------------
33 826 45 61
PCA :... |
#ifndef SLEEF_BACKEND_U10_H
#define SLEEF_BACKEND_U10_H
#if defined(FASTOR_USE_SLEEF_U10) || defined(FASTOR_USE_SLEEF)
#include <sleef.h>
namespace Fastor {
// exp
//----------------------------------------------------------------------------------------------------------//
#ifdef FASTOR_SSE2_IMPL
template<>
FASTOR... |
<?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Z... |
# encoding: UTF-8
# frozen_string_literal: true
require "yaml"
require "gb_agencies"
module RelatonGb
# Common scrapping methods.
module Scrapper
STAGES = { "即将实施" => "published",
"现行" => "activated",
"废止" => "obsoleted",
"被代替" => "replaced" }.freeze
@prefixes... |
import { assign } from './assign'
export function fireLifeCycleEventProvider (
elm: Node,
type: string,
detail: any = {}
) {
const events = [
new CustomEvent('lifecycle', { detail: assign({ type }, detail) }),
new CustomEvent(type, { detail })
]
return () => events.map((event) => elm.dispatchEvent(... |
//BY DX4D
using UnityEngine;
using UnityEngine.UI;
using OpenMMO.Network;
namespace OpenMMO.UI
{
/// <summary>Close Application Button</summary>
[RequireComponent(typeof(Button))]
public partial class UICloseApplicationButton : MonoBehaviour
{
#pragma warning disable CS0649
[Header("BUTTONS")]
... |
#! /bin/sh
#
# $Id: run_dispatching.sh 44115 2002-03-27 15:54:54Z coryan $
#
. parameters
for n in 2; do
for c in 2 4 6 8 10 12; do
date
echo rtcorba $c $n
./driver -ORBSvcConf ec.dispatching_rtcorba.conf -r -d -h 10000 -l 10000 -i $ITERATIONS -c $c -n $n > ec_dispatching.rtcorba.${c}.${n}.txt 2>&1
date
... |
# frozen_string_literal: true
module Projects
module ApplicationHelper
def project_id_assignment_options(projects)
blank_project_options + options_from_collection_for_select(projects, :id, :name)
end
private
def blank_project_options
options_for_select(
[
[I18n.t("pr... |
h1. Developing the proxy against a running instance of OKD and Cluster logging
* Login as an administrator
* create secrets dir: `sudo mkdir -p /var/run/secrets/kubernetes.io/serviceaccount/`
* Forward traffic to Elasticsearch:
`oc -n openshift-logging port-forward $espod 9200:9200`
* Build `make clean && make`
* `e... |
use lester::ImageSurface;
use std::error::Error;
use std::io;
#[test]
fn round_trip_png() {
static PNG_BYTES: &[u8] = include_bytes!("pattern_4x4.png");
let mut surface = ImageSurface::read_from_png(PNG_BYTES).unwrap();
fn assert_expected_pixels(pixels: lester::Argb32Pixels) {
assert_eq!(pixels.wi... |
module Alf
class Predicate
module And
include NadicBool
def operator_symbol
:'&&'
end
def and_split(attr_list)
sexpr_body.inject([tautology, tautology]) do |(top,down),term|
pair = term.and_split(attr_list)
[top & pair.first, down & pair.last]
... |
---
author: dschaaff
comments: true
date: 2014-03-23 20:42:55+00:00
layout: post
link: http://danielschaaff.com/2014/03/23/at-my-grandpas-house-i-want-this/
slug: at-my-grandpas-house-i-want-this
title: No Content Found
wordpress_id: 102
post_format:
- Image
---

{
var testKey = ConfigurationManager.AppSettings["TestKey"];
var str = $"{Guid.NewGuid().ToString("N")}, te... |
require 'spec_helper'
module Payhub::Schedule
RSpec.describe Weekly do
include_examples 'schedule interval'
let(:json) { load_json_fixture('weekly.json') }
let(:days) { ['sun','WED', :sat] }
let(:args) { Hash.new }
let(:schedule) {
Weekly.new(*days, args)
}
it 'builds valid json' d... |
'use strict';
const browser = require('../../utils/browser');
let defFunc;
let api;
let ctx;
module.exports = {
init: (_defFunc, _api, _ctx) => {
defFunc = _defFunc;
api = _api;
ctx = _ctx;
},
getCtx: () => ctx,
getApi: () => api,
getPull: form => defFunc.get(browser.getU... |
; Initialize the stack pointer
MOV XL, 0xFF
MOV XH, 0xFF
MOV SP, X
MOV F, 1
; Write register F to the Output Port
OUTB F
; Call a subroutine...
CALL :SUB_FUNCTION
MOV F, 4
; Write register F to the Output Port
OUTB F
; Stops program execution
HLT
:SUB_FUNCTION
MOV F, 2
; Write register F to the Output Port
OUTB... |
using System.Globalization;
using Microsoft.Build.Framework;
using Microsoft.Build.Utilities;
namespace MSBuildVersioning.Core
{
public class HgVersionInformation : Task
{
public bool IgnoreToolNotFound { get; set; }
public string ToolPath { get; set; }
[Output]
public string... |
import { Action } from 'redux';
import { IdType } from '../../api/Api';
// The following gives us type-safe redux actions
// see https://medium.com/@dhruvrajvanshi/some-tips-on-type-safety-with-redux-98588a85604c
// Todo: Would be great to make this more generic and factor it out into infrastructure, leaving as is for... |
package com.daop.msc.entities;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @BelongsProject: spring_cloud_learn
* @BelongsPackage: com.daop.msc.payment.entities
* @Description:
* @DATE: 2020-10-20
* @AUTHOR: Administrator
**/
@Data
@A... |
package reseller.steps;
import net.thucydides.core.annotations.Step;
import net.thucydides.core.steps.ScenarioSteps;
import reseller.pages.CustomersPages;
/**
* Created by rusu on 3/24/15.
*/
public class CustomersSteps extends ScenarioSteps {
CustomersPages customersPages;
@Step
public void clickAddB... |
-module(lager_msg).
-export([new/5]).
-export([message/1]).
-export([timestamp/1]).
-export([severity/1]).
-export([severity_as_int/1]).
-export([metadata/1]).
-export([destinations/1]).
-record(lager_msg,{
destinations :: list(),
metadata :: [tuple()],
severity :: lager:log_level(),
t... |
'use strict';
const _ = require('lodash');
const Octokit = require('@octokit/rest');
/**
* Get Github authenticated instance
* @param {String} token GitHub token
* @return {octokit}
*/
module.exports = (token) => {
if (_.isEmpty(token) || !_.isString(token)) {
throw new TypeError('token is empty or invalid ... |
declare module 'phaser3-rex-plugins/plugins/inputtext-plugin' {
import * as Phaser from 'phaser';
export default class InputTextPlugin extends Phaser.Plugins.BasePlugin {}
}
|
package io.bartholomews.scalatestudo.data
import io.bartholomews.fsclient.core.config.UserAgent
import io.bartholomews.fsclient.core.oauth.v1.OAuthV1.{Consumer, Token}
import io.bartholomews.fsclient.core.oauth.v2.OAuthV2.{AccessToken, RefreshToken}
import io.bartholomews.fsclient.core.oauth.v2.{ClientId, ClientPasswo... |
package worker
import (
"fmt"
"runtime/debug"
"time"
"go.avito.ru/DO/moira/checker"
)
func (worker *Checker) perform(triggerIDs []string, cacheTTL time.Duration, isPullType bool) {
for _, triggerID := range triggerIDs {
if worker.needHandleTrigger(triggerID, cacheTTL) {
if isPullType {
worker.pullTrigg... |
CREATE DATABASE aero_solve;
use aero_solve;
CREATE TABLE ciudades
(
id_ciudad INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
nom_ciudad VARCHAR(25) NOT NULL
);
CREATE TABLE vuelos
(
id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT,
id_origen INT UNSIGNED NOT NULL,
nom_origen VARCHAR(25) NOT NULL,
id_dest INT UNSIGNED NOT NULL... |
#!/bin/bash
# Prevent running in case of failures
set -euf -o pipefail
[[ -d "$HOME/.sludge" ]] || mkdir "$HOME/.sludge"
[[ -d typings ]] || mkdir typings
[[ -f typings/deno.d.ts ]] || deno types > typings/deno.d.ts
USER="$(whoami)"
echo "You are $USER"
CURR_PATH=$(pwd)
echo "Your path $CURR_PATH"
[[ -d config ]] ... |
namespace Netopes.Core.Abstraction.Settings
{
public interface IAppSettingsBase
{
bool Debug { get; set; }
string DefaultCulture { get; set; }
int RowsPerPage { get; set; }
string DateFormat { get; set; }
string TimeFormat { get; set; }
string DecimalSeparator { ... |
module Codewars.Kata.Convert where
-- https://www.codewars.com/kata/5583090cbe83f4fd8c000051/train/haskell
digitize :: Int -> [Int]
digitize 0 = [0]
digitize number = digitizeNumber number
digitizeNumber :: Int -> [Int]
digitizeNumber 0 = []
digitizeNumber number = [number `mod` 10] ++ digitizeNumber (number `div` 1... |
<?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiFilter;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\SecretariaRepository;
use App\Util\TimestampableTrait;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Co... |
namespace ThisCouldBeBetter.GameFramework
{
export class VisualSelect implements Visual<VisualSelect>
{
childrenByName: Map<string, VisualBase>;
selectChildNames: (uwpe: UniverseWorldPlaceEntities, d: Display) => string[];
constructor
(
childrenByName: Map<string, VisualBase>,
selectChildNames: (uwpe: Univer... |
package com.cdh.okone.monitor
import okhttp3.Call
import okhttp3.EventListener
/**
* Created by chidehang on 2021/2/18
*/
class GlobalEventListenerFactory(
private val delegate: EventListener.Factory
) : EventListener.Factory {
override fun create(call: Call?): EventListener {
// 全局拦截设置的EventLi... |
package Database
import android.arch.persistence.room.Database
import android.arch.persistence.room.Room
import android.arch.persistence.room.RoomDatabase
import android.content.Context
import com.itesm.cartelera_tec_mty.Event
@Database(entities = arrayOf(Event::class), version = 1, exportSchema = false)
abstract cla... |
---
title: "AI is a Cybersecurity Threat"
date: 2020-09-21
permalink: https://medium.com/@charlesyang_32909/ai-is-a-cybersecurity-threat-516e58e6e4df
tags:
- Artificial Intelligence
- Security
---
|
import {
clock,
tle,
satelliteVector,
satrecToXYZ,
graticule10,
wireframe,
} from "./js/helper.js";
import { MAX_REACHABLE_DIST, calcLogLatDist } from "./js/ReponseParser.js";
// Scene, Camera, Renderer
const TLE_DATA_DATE = new Date(2021, 11, 7).getTime();
var width = window.innerWidth,
height = window.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.