text stringlengths 27 775k |
|---|
<?php
namespace common\models;
use Yii;
use yii\base\NotSupportedException;
use yii\web\IdentityInterface;
class AdUser implements IdentityInterface
{
public $id;
public $username;
public $email;
public $phone;
public $fullname;
public $authKey;
public $tabelNumber;
public $permission;... |
export function swapBytes(data: Uint8Array, bytes: number): Uint8Array {
const out = new Uint8Array(data.length);
for (let i = 0; i < data.length; i++) {
const byte = i % bytes;
out[i] = data[i + bytes - byte - byte - 1];
}
return out;
}
|
# Trouble shooting in the apache server
## apache が停止した場合のTrouble調査手順
**今回利用する道具**
* browser
* ping
* tracert
* teraterm (connect into the apache server)
## before trouble occurrence
**正常な稼動状況で動作を確認**
- browser - URL: http://192.168.1.101/
- ping - ping 192.168.1.101
- tracert - tracert 192.168.1.101
- browser... |
#!/bin/bash
build:functions() {
printf "/* @{ */\nstatic std::vector<std::array<std::string,3> > functions = {\n" >>functions.hh
for name in $(perl /usr/share/perl5/core_perl/Pod/Functions.pm \
| sed '/^[A-Z].*\|^$/d' \
| sed 's%\s*%%' \
| sed 's%,\s*%\n%g' \
| sed 's%__.*\|^[a-z].*[/]*[A-Z]*[/]%%'... |
"""Main module."""
from functools import wraps
from typing import Any, Dict, Tuple
from inspect import getfullargspec, signature
class ObjectConversionError(Exception):
pass
class takes:
def __init__(self, klass, name=None):
self.klass = klass
self.name = name
def __call__(self, func):
... |
require 'test/unit'
require File.dirname(__FILE__) + '/../init.rb'
require 'YAML'
class GettextToI18nTest < Test::Unit::TestCase
def setup
#@c = GettextToI18n::Convertor.new(nil,nil,nil,nil)
end
def test_all_files
files = GettextToI18n::Files.all_files
assert_not_nil files, "no files available"
... |
using System.Collections.Generic;
namespace Adliance.QmDoc.AfterConversionToHtml
{
internal interface IAfterConversionToHtmlStep
{
Result Apply(string html);
}
public class Result
{
public Result(string resultingHtml)
{
ResultingHtml = resultingHtml;
}
... |
cd $(dirname $0)
tar cf stuff.tar *.py
tar rf stuff.tar nlp
tar rf stuff.tar ../geocode/*.py
cp ~/ark-tweet-nlp-0.3.1/ark-tweet-nlp-0.3.1.jar . && tar rf stuff.tar ark-tweet-nlp-0.3.1.jar
cp ~/profile . && tar rf stuff.tar profile && rm profile
|
package com.example.palmdigital.imagebutton01;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TextView;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity implements View.OnClic... |
<?php
/**
* Created by PhpStorm.
* User: Hash
* Date: 19-07-2015
* Time: 21:45
*/
namespace App\Exceptions;
use Illuminate\Http\Response;
abstract class ErrorCodes {
/*HTTP Status Code Reason Response Model
400 Bad Request - Request does not have a valid format, all required parameters, etc.
401 U... |
import IKeyValue from "../../helpers/models/key-value.model";
/* spell-checker: disable */
class Symbols implements IKeyValue {
[prop: string]: string;
abs = "Abs";
accountdata = "AccountData";
action = "Action";
active = "Active";
add = "Add";
addaction = "AddAction";
addafterself = "AddAfterSelf";
... |
class ContactNumber < ActiveRecord::Base
belongs_to :contact
validates :label, :number, presence: true
include TranslatableModel
translates :label, :number
end
|
package parsables
// AWSVPCParsable is the concept that holds the method for determining the
// shape and data that should be collected from tfstate to produce a HCL entry
type AWSVPCParsable struct{}
// HCLShape returns the address of a new struct for the parser to use when manipulating
// the json from the tfstate.... |
describe Veritrans::Client do
before do
hide_const("Rails")
Midtrans.logger = Logger.new("/dev/null")
Midtrans.setup do
config.load_config "./spec/configs/real_key.yml"
end
end
it "should create alias constant for Midtrans" do
Midtrans.should == Veritrans
end
it "should work with ... |
import { Model } from 'mongoose';
import { Chapter } from 'src/database/chapter.model';
import { Manga } from 'src/database/manga.model';
import { FcmPushService } from 'src/shared/services/push.service';
export declare class NotificationService {
private readonly fcmPushService;
private readonly mangaModel;
... |
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs/Observable';
import { HttpClient, HttpResponse, HttpHeaders, HttpParams } from '@angular/common/http';
import { Utilities } from './utils.service';
import 'rxjs/add/operator/map';
import { API } from './constants';
@Injectable()
export cla... |
class BaseError:
__slots__ = ('code', 'message')
def __init__(self, code, message):
self.code = code
self.message = message
BAD_REQUEST = BaseError('BAD_REQUEST', '无效的请求')
UNAUTHORIZED = BaseError('UNAUTHORIZED', '未登录')
PERMISSION_FORBIDDEN = BaseError('PERMISSION_FORBIDDEN', '没有权限')
NOT_FOUN... |
require 'spec_helper'
describe Fias::Import::Copy do
let(:name) { 'actual_statuses' }
let(:files) { Fias::Import::Dbf.new('spec/fixtures').only(name) }
let(:table_name) { "fias_#{name}".to_sym }
let(:db) { double('db') }
let(:raw_connection) { double('raw_connection') }
subject { Fias::Import::Tables.new(... |
import 'dart:collection';
import 'calendar.dart';
/// Method signature used by calendar iterators to advance the date
typedef TCal CalendarIteratorIncrementer<TCal extends Calendar>(
TCal current, int increment);
/// Base class for calendar iterables
abstract class CalendarIterableBase<TCal extends Calendar>
... |
source("src/0a_setup.r")
source("src/1_functions.r")
system.time(indata[, risk_grade_to := apply_transition(risk_grade, transition_table)])
indata[order(risk_grade),.N,risk_grade]
indata[order(risk_grade),.N,risk_grade_to]
set.seed(1)
indata[order(risk_grade),.N, risk_grade]
indata[,mean(value)]
indata[,sum(curr_ba... |
#!/usr/bin/env perl
# Copyright 2012 Johns Hopkins University (Author: Guoguo Chen, Jan Trmal)
# Apache 2.0.
#
use strict;
use warnings;
use Getopt::Long;
use XML::Simple;
use Data::Dumper;
use File::Basename;
sub mysort {
if ($a->{kwid} =~ m/[0-9]+$/ and $b->{kwid} =~ m/[0-9]+$/) {
($a->{kwid} =~ /([0-9]*)$/... |
<div><p>In a string <code><font face="monospace">s</font></code> of lowercase letters, these letters form consecutive groups of the same character.</p>
<p>For example, a string like <code>s = "abbxxxxzyy"</code> has the groups <code>"a"</code>, <code>"bb"</code>, <code>"xxxx"</code>, <code>"z"</code>, and <c... |
import React from "react";
import { connect } from "react-redux";
import SpotifyWebApi from "spotify-web-api-js";
import io from "socket.io-client";
import Logo from "./Logo";
import SearchBar from "./SearchBar";
import NewPlaylist from "./NewPlaylist";
import SongQueue from "./SongQueue";
import NavBar from "./NavBar"... |
---
layout: post
title: Go Projects
---
## ldhdns
[virtualstaticvoid/ldhdns][ldhdns]
A developer tool for providing DNS for Docker containers running on a local development host.
## Eventinator
[virtualstaticvoid/eventinator][eventinator]
A prototype project to try out NATS Streaming via a gRPC service, using str... |
# Copyright (c) 2018 Danil Pismenny <danil@brandymint.ru>
# frozen_string_literal: true
# HTTP library to connect to remote nodes
#
class HttpClient
READ_TIMEOUT = 2
private_constant :READ_TIMEOUT
# Connect timeout in seconds
CONNECT_TIMEOUT = 0.8
private_constant :CONNECT_TIMEOUT
MIN_SCORE_VALUE = 3
... |
---
title: 익스텐션(Extensions)
id: Extensions
date: 2019-02-01
full_link: /docs/concepts/extend-kubernetes/extend-cluster/#extensions
short_description: >
익스텐션은 새로운 타입의 하드웨어를 지원하기 위해 쿠버네티스를 확장하고 깊게 통합시키는 소프트웨어 컴포넌트이다.
aka:
tags:
- fundamental
- extension
---
익스텐션은 새로운 타입의 하드웨어를 지원하기 위해 쿠버네티스를 확장하고 깊게 통합시키는 소프트웨어 컴포넌트이... |
package com.scudderapps.moviesup.repository.discover
import androidx.lifecycle.MutableLiveData
import androidx.paging.DataSource
import com.scudderapps.moviesup.api.TmdbApiInterface
import com.scudderapps.moviesup.models.main.People
import io.reactivex.disposables.CompositeDisposable
class PeopleDataSourceFactory(
... |
package com.emarte.regurgitator.core;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import static com.emarte.regurgitator.core.Log.getLog;
import static com.emarte.regurgitator.core.StringType.stringify;
import static java.lang.Integer.parseInt;
public class RemoveAtIndexProcessor e... |
require 'rspec/core'
require 'ropen_pi/specs/example_group_helpers'
require 'ropen_pi/specs/example_helpers'
require 'ropen_pi/specs/configuration'
require 'ropen_pi/specs/railtie' if defined?(Rails::Railtie)
module RopenPi
module Specs
# Extend RSpec with a swagger-based DSL
::RSpec.configure do |config|
... |
---
title: |-
Jak se
fotografuje štěně
contentType: prose
---

|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Ztop.Todo.Model
{
public class ParameterBase
{
/// <summary>
/// 开票单位
/// </summary>
public ZtopCompany? ZtopCompany { get; set; }
/// <summary>... |
/* The below code is licensed under MIT. */
/* https://github.com/Cumcord/Cumcord/blob/stable/src/api/ui/components/ErrorBoundary.jsx */
import Logger from '../../modules/Logger';
import { findByProps } from '@cumcord/modules/webpack';
const classes = findByProps('emptyResultsWrap');
import { pjoin } from '../../m... |
import * as React from "react";
import Entity from "../game/entity";
import HealthBar from "./healthBar";
export interface IEnemyInfoProps {
enemy?: Entity;
}
export default class EnemyInfo extends React.Component<IEnemyInfoProps> {
public render(): React.ReactElement<any> {
if (this.props... |
module Network.CryptoNote.P2P.Command.Chain.Response where
import Data.Word (Word64)
import Network.CryptoNote.Crypto.Hash (Hash, Id)
-- cryptonote_protocol_handler.h
-- cryptonote_protocol_defs.h
-- #define BC_COMMANDS_POOL_BASE 2000
-- const static int ID = BC_COMMANDS_POOL_BASE + 7;
data ResponseChainEntry = Res... |
#! /bin/bash
# ==============================================================================
# -- Parse arguments -----------------------------------------------------------
# ==============================================================================
DOC_STRING="Unpack and copy over CarlaUE4's Exported Maps"
US... |
#!/usr/bin/env bash
set -e
# If current directory has file changes then we exit the release script
CHANGES=$(git status --porcelain)
if [ -n "${CHANGES}" ]; then
echo 'You have uncommitted changes in you files. Please commit them before you use the release script!'
exit 0
fi
VERSION=${1:?"You have to specify... |
class DropStandardsAndInstructionGroupsAndInstructions < ActiveRecord::Migration
def change
if ActiveRecord::Base.connection.table_exists? :standards
drop_table :standards
end
if ActiveRecord::Base.connection.table_exists? :instruction_groups
drop_table :instruction_groups
end
if Act... |
const Anonymous = require('./Anonymous');
const anonymous = new Anonymous();
const configurationValid = {};
beforeEach(() => {
jest.resetAllMocks();
});
test('validateConfiguration should return validated configuration when valid', () => {
const validatedConfiguration = anonymous.validateConfiguration(confi... |
package eu.bcvsolutions.idm.core.rest.impl;
import java.util.List;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import eu.bcvsolutions.idm.core.api.dto.IdmIncompatibleRoleDto;
import eu.bcvsolutions.idm.core.api.dto.IdmRoleDto;
import eu.bcvsolutions.... |
/*
* Copyright (C) 2017 The SyPet Authors
*
* 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 agre... |
from enum import Enum
class Error:
def __init__(self, TIPO, LEXEMA, FIL ,COL):
self.TIPO = TIPO
self.LEXEMA = LEXEMA
self.COL = COL
self.FIL =FIL
class TipoOptimizacion(Enum):
REGLA1 = 1
REGLA2 = 2
REGLA3 = 3
REGLA4 = 4
REGLA5 = 5
REGLA6 = 6
REGLA7 = 7
... |
package com.scottcrossen42.stringprocessor.common.command;
import com.scottcrossen42.stringprocessor.common.util.StringProcessor;
import com.scottcrossen42.stringprocessor.common.structures.Result;
import java.io.Serializable;
/**
* @author Scott Leland Crossen
* @Copyright 2017 Scott Leland Crossen
*/
public class T... |
<?php
use frontend\models\TipoCombustivel;
use yii\helpers\Html;
use yii\widgets\DetailView;
/* @var $this yii\web\View */
/* @var $model frontend\models\CombustivelMes */
$this->title = 'Visualizar preço para o mês de '.$model->mes;
$this->params['breadcrumbs'][] = ['label' => 'Combustível', 'url' => ['tipo-combust... |
/*
* Copyright 2017 Lightbend
*
* 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... |
using Microsoft.EntityFrameworkCore;
using PFSoftware.FinancesApi.Data;
using PFSoftware.FinancesApi.Models.Api.Requests;
using PFSoftware.FinancesApi.Models.Domain;
using System;
using System.Collections.Generic;
using System.Linq;
namespace PFSoftware.FinancesApi.Services
{
public class MinorCategoryService
... |
using System;
using System.Collections.Generic;
namespace EdnaExcelConfigUtils
{
public class EdnaFetchConfig
{
// folder location at which chunks need to be dumped
public string DumpFolder { get; set; }
public List<EdnaPnt> Pnts { get; set; } = new List<EdnaPnt>();
public Vari... |
import sbt._
object Dependencies {
// versions
lazy val sparkVersion = "2.4.5"
lazy val hadoopVersion = "2.9.2"
lazy val awsSdkVersion = "2.9.20"
// testing
val scalaTest = "org.scalatest" %% "scalatest" % "3.0.7" % "test,it"
// arc
val arc = "ai.tripl" %% "arc" % "2.11.0" % "provided"
// spark
... |
# Rangops
Rangops is a simple Ruby extension library that aims to treat Ranges as sets.
It provides methods for elementary set related operations and predicates.
class Range
include Rangops::Set
end
Union:
(1..5).union(3..10)
=> 1..10
(11..19) | (16..23)
=... |
#!/usr/bin/env bash
set -Eumo pipefail
SELF_DIR="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
mkdir -p $SELF_DIR/data/caddy/config \
$SELF_DIR/data/caddy/data \
$SELF_DIR/data/navidrome/data
cat << EOF > "$SELF_DIR/.env"
GROUP_ID=$(id -g)
TZ=$(timedatectl | awk '/Time zone:/ {print $... |
## warning! don't delete or change anything inside this folder otherwise miner will get punishment
### 1.you can stop the miner and move the storage folder to any disk place you want
### 2.reset the storage_folder by type:
```
./peer-node set storage_folder='your_storage_folder_path'
```
### 3.restart the node by type... |
--PART A #1 Union Operation
SELECT CUSTOMER_NUM, CUSTOMER_NAME, REP_NUM
FROM CUSTOMER
WHERE REP_NUM = 65
UNION
SELECT CUSTOMER.CUSTOMER_NUM, CUSTOMER_NAME, REP_NUM
FROM CUSTOMER, ORDERS
WHERE ORDERS.CUSTOMER_NUM = CUSTOMER.CUSTOMER_NUM;
--PART A #2 Intersect Operation
SELECT CUSTOMER_NUM, CUSTOMER_NAME, REP_NUM
FROM C... |
<?php
namespace standard_xml\admin\controllers;
use standard_xml\admin\controllers\file_interface;
class fileXml implements file_interface
{
protected $dom;
/**
* Evento construtor da classe
*
* @param string $path
*/
public function __construct(string $path = null)
{
$th... |
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Category extends CI_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model('CategoryModel');
$this->load->library("Common");
}
public function index()
{
$me... |
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'Erikmysql';
CREATE DATABASE employeeDB;
USE employeeDB;
-- DEPARTMENT TABLE
CREATE TABLE department (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
name TEXT NOT NULL,
);
-- CREATING ROLE TABLE
CREATE TABLE role (
id INT NOT NULL... |
#!/usr/bin/env python2
# -*- coding: utf8 -*-
import uuid
from typing import List, Any
from functools import wraps
def auth(func):
"""验证"""
@wraps(func)
def wapper(who: User, what: Target, check: bool = False):
user_roles = who.get_roles()
work_roles = []
# 获取可用的 role
f... |
module GoCardlessPro
# Thrown when the API returns an invalid state error
class InvalidStateError < Error
IDEMPOTENT_CREATION_CONFLICT = 'idempotent_creation_conflict'.freeze
CONFLICTING_RESOURCE_ID = 'conflicting_resource_id'.freeze
def idempotent_creation_conflict?
!idempotent_creation_conflict... |
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _keys = require('babel-runtime/core-js/object/keys');
var _keys2 = _interopRequireDefault(_keys);
exports.default = cleanNode;
var _lodash = require('lodash');
var _lodash2 = _interopRequireDefault(_lodash);
function _interopRequi... |
/*
* Copyright 2021 Regents of the University of Michigan
*
* 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 requi... |
module Awestruct::Extensions
# this could be made extensible, for now we are just adding the non-release
# tag to entries that don't have the release tag
class AutoTag
def initialize(entries_name)
@entries_name = entries_name
end
def execute(site)
entries = site.send(@entries_name) || []
... |
#!/bin/sh
#
# Create an OSEv3.yml file with user values
#
OCP3_BASE_DOMAIN=${OCP3_BASE_DOMAIN:-ocp3.example.com}
OCP3_INVENTORY_TEMPLATE=${OCP3_INVENTORY_TEMPLATE:-inventory.template}
OCP3_INVENTORY_FILE=${OCP3_INVENTORY_FILE:-inventory}
OCP3_OSEV3_TEMPLATE=${OCP3_OSEV3_TEMPLATE:-OSEv3.yml.template}
OCP3_OSEV3_YML_FI... |
import * as React from 'react';
import { Nav, NavProps, NavList, PageSidebar } from '@patternfly/react-core';
import PerspectiveNav from './perspective-nav';
import NavHeader from './nav-header';
type NavigationProps = {
onNavSelect: NavProps['onSelect'];
onPerspectiveSelected: () => void;
isNavOpen: boolean;
};... |
var map = {};
map._GMAP_;
map.parkingMarkers = [];
map.infoWindows = [];
map.meter2latdeg = 0.000008983148616; // 日本における1mを緯度経度換算(およその値)
map.meter2lngdeg = 0.000010966382364; // 日本における1mを緯度経度換算(およその値)
map.init = function(){
map._GMAP_ = new google.maps.Map(document.getElementById('map'), {
center: { // ... |
require 'spec_helper'
require 'stringio'
require 'logger'
describe JsonLoggerFormatter::Formatter do
it 'formats log messages as json' do
s = StringIO.new
l = Logger.new(s)
l.formatter = JsonLoggerFormatter::Formatter
l.info({a: 'foo', b: 'bar'})
l.error({c: 'baz', d: 'quux'})
expected = [{"... |
/**
* Copyright (c) 2011 panStamp <contact@panstamp.com>
*
* This file is part of the panStamp project.
*
* panStamp is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 3 of the Lic... |
// This file is auto-generated, don't edit it. Thanks.
using System;
using System.Collections.Generic;
using System.IO;
using Tea;
namespace AntChain.SDK.CAS.Models
{
public class QueryResourceComputerRequest : TeaModel {
// OAuth模式下的授权token
[NameInMap("auth_token")]
[Validation(Required=... |
require 'thor'
module Terminitor
class Cli < Thor
include Thor::Actions
include Terminitor::Runner
def self.source_root; File.expand_path('../../',__FILE__); end
desc "start PROJECT_NAME", "runs the terminitor script"
method_option :root, :type => :string, :default => '.', :aliases => '-r... |
## Promises top-level
_Async_ functions return promises at the top level. This means
- Promises can be awaited on
+ the `.then` result is returned if successful
+ error is thrown with error from `.catch`
- Non Async/Await scripts can call a library that uses them
```javascript
const callApi = async (url) => ... |
{-# LANGUAGE TemplateHaskell #-}
-- |
-- Copyright : (C) 2013,2014 Seagate Technology LLC and/or its Affiliates.
-- License : Apache License, Version 2.0.
--
-- * Recovery coordinator definitions
module HA.RecoveryCoordinator.Definitions
( HA.RecoveryCoordinator.Definitions.__remoteTable
, recoveryCoordinator... |
import React, { Component } from 'react';
import {
AccessibilityRole,
Animated,
LayoutChangeEvent,
StyleProp,
StyleSheet,
TouchableWithoutFeedback,
View,
ViewStyle
} from 'react-native';
import { palette } from '../styles/variables';
export interface SerializableToggleButtonProps {
accessible?: boole... |
# DB 테이블에서 변경된 데이터 추출
1. DB에서 변경된 데이터만 가져오고 싶다.
2. 쿼리를 작성해본다.
```SQL
SELECT *
FROM A
,B
WHERE A.C <> B.C;
```
시간이 너무 오래걸린다. INNER JOIN을 걸어야 할 것 같다.
4,077,165개의 데이터가 나온다...
3. 다시 쿼리를 작성했다.
```SQL
SELECT *
FROM A
INNER JOIN B
ON A.C = B.C
AND A.D = B.D
... |
module Problem7Spec (spec) where
import Test.Hspec
import Problem7
spec = describe "10001st prime" $ do
it ("finds the 5th prime number") $ do
solve 5 `shouldBe` 11
it ("finds the 6th prime number") $ do
solve 6 `shouldBe` 13
|
# The project for use [Dbrain.io](https://dbrain.io/) Api and [Handl.ai](https://handl.ai/).
For install use the [nuget package](https://www.nuget.org/packages/DbrainApi) .
```
dotnet add package DbrainApi
```
Basic methods
- classify
- recognize
- result
For example:
```
void Execute()
{
Console.W... |
package ru.bilchuk.dictionary.domain.models
data class DictionaryItem (
var keyword: String = "",
var translation: String = "",
var imageUri: String = "R.drawable.ic_baseline_photo_library_100"
) |
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
namespace Microsoft.AspNetCore.Cors.Infrastructure
{
/// <summary>
/// A type wh... |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
namespace TextEditor.Document
{
public class VXmlDmRefNode : VXmlNode
{
#region Property
#endregion
public VXmlDmRefNode(VXmlDocument doc)
: base(doc)
{
}
public static VXmlDmRefNode Crea... |
; RUN: llc < %s -march=avr -mattr=movw -no-integrated-as | FileCheck %s
; XFAIL: *
; CHECK-LABEL: no_operands:
define void @no_operands() {
; CHECK: add {{r[0-9]+}}, {{r[0-9]+}}
call void asm sideeffect "add r24, r22", ""() nounwind
ret void
}
; CHECK-LABEL: input_operand:
define void @input_operand(i8 %a) {
... |
export * from './find-random-stories.model';
export * from './story-with-performance-statistics.model';
export * from './story.model';
|
module Optimizer.FcOptimizer where
import Utils.AssocList
-- | Data constructor environment, listing type variables for type and data constructors
type DCEnv = (AssocList FcTyCon FcTyConInfo, AssocList FcDataCon FcDataConInfo)
type FcOptM = UniqueSupplyT
type FcOptPass = DCEnv -> UniqueSupply -> FcOptProgram -> |
import { Divider } from '@rocket.chat/fuselage';
import React, { ReactElement } from 'react';
import MessagesPerChannelSection from './MessagesPerChannelSection';
import MessagesSentSection from './MessagesSentSection';
const MessagesTab = (): ReactElement => (
<>
<MessagesSentSection />
<Divider />
<MessagesP... |
INSERT INTO dbo.nyc_taxi_models(model, name)
SELECT BulkColumn, '$(ModelId)'
FROM OPENROWSET(
BULK '$(Container)/$(ModelId)',
DATA_SOURCE = 'AzureModels',
SINGLE_BLOB
) AS DATA;
|
package govapid
import (
"encoding/base64"
"fmt"
"testing"
"time"
)
const succeed = "\u2705"
const failed = "\u274C"
//TestGenerateVAPID will test VAPID Keys generation
func TestGenerateVAPID(t *testing.T) {
t.Log("Make sure correct Public and Private VAPID keys are generated")
{
VAPIDKeys, err := GenerateVA... |
<article class="gj-main-layout gj-skill">
<h2 data-aos="fade-up">나의 기술</h2>
<ul class="gj-grid-wrap">
@foreach($skills['skill'] as $key=>$skills)
<li data-aos="fade-up" data-aos-delay="150">
<span class="gj-grid-list">
<img src="{{$skills['src']}}" alt="언어... |
---
layout: post
title: "Angular 프로젝트 구조"
date: 2017-10-25 09:10:00
categories: angular
highlight: false
image: https://image.prntscr.com/image/6LsJBjUKQHG95U_qBit3nA.jpeg
description: Angular의 폴더구조 및 중요파일의 간단한 설명
---
#### 프로젝트 생성
```bash
ng new hello-world
```
 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 may ... |
using System;
using System.Linq;
using ConsoleMultiplayer.Shared;
namespace ConsoleMultiplayer.Client {
static class Canvas {
static void Draw(string[] template, (int, int) pos, ConsoleColor color) {
var (x, y) = pos;
Console.ForegroundColor = color;
foreach (var line in template) {
Con... |
import { createStackNavigator, createSwitchNavigator } from 'react-navigation';
import AuthLoadingNavigator from './AuthLoadingNavigator';
import LoggedInStackNavigator from './LoggedInStackNavigator';
import NotLoggedInStackNavigator from './NotLoggedInStackNavigator';
import PopupStackNavigator from './PopupStackNavi... |
#!/usr/bin/ruby
# encoding: ASCII
$: << File.dirname($0) + '/lib'
require 'run_env'
class Env < RunEnv
def config
super + <<EOD
object_space[0].enabled = 1
object_space[0].index[0].type = "HASH"
object_space[0].index[0].unique = 1
object_space[0].index[0].key_field[0].fieldno = 0
object_space[0].index[0].key_fi... |
# Hacktiv8Shimbun_App
Mobile app client for hacktiv8 Shimbun
To run the code:
`react-native run-android` |
module Uber
class Price < Base
attr_accessor :product_id, :currency_code, :display_name, :estimate, :low_estimate, :high_estimate, :surge_multiplier, :duration, :distance
end
end
|
require 'pageflow/widget_type'
module Scrollytelling
module Navigation
class WidgetType < ::Pageflow::WidgetType
def name
'scrollytelling_navigation'
end
def roles
['navigation']
end
def render(template, entry)
template.render(
partial: 'scrollyte... |
#!/bin/bash
curl -X POST \
http://localhost:8000/todos \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d "{
\"title\": \"hello\",
\"order\": 1
}" && curl -X POST \
http://localhost:8000/todos \
-H 'cache-control: no-cache' \
-H 'content-type: application/json' \
-d "{
\"title... |
extern crate the_ray_tracer_challenge_rust as tracer;
use tracer::canvas::Canvas;
use tracer::color;
use tracer::ppm;
use tracer::transform;
use tracer::tuple::Tuple;
use std::f64;
fn main() {
const CANVAS_SIZE: usize = 200;
let mut canvas = Canvas::new(CANVAS_SIZE, CANVAS_SIZE);
let p0 = Tuple::point(0.... |
# Changelog for node-ddns
The format is based on [Keep a Changelog][keep-a-changelog]
<!-- and this project adheres to [Semantic Versioning][semantic-versioning]. -->
## [Unreleased]
- Nothing
## [1.0.1] (2021-01-02)
### New
- Implemented query timeout in all clients
- Implemented a short-quick-type quiers directly ... |
<?php
final class PhabricatorFlagListController extends PhabricatorFlagController
implements PhabricatorApplicationSearchResultsControllerInterface {
private $queryKey;
public function shouldAllowPublic() {
return true;
}
public function willProcessRequest(array $data) {
$this->queryKey = idx($dat... |
# frozen_string_literal: true
module BenefitMarkets
module Validators
module Products
class HealthProductContract < BenefitMarkets::Validators::Products::ProductContract
params do
required(:hios_id).filled(:string)
required(:hios_base_id).filled(:string)
optional(:csr_... |
package com.axway.apim.lib;
public class StandardExportParams extends CoreParameters {
public static enum Wide {
standard,
wide,
ultra
}
public static enum OutputFormat {
console,
json,
csv,
dat;
public static OutputFormat getFormat(String name) {
if(name==null || valueOf(name)==null) ... |
package rdns
import (
"time"
"github.com/miekg/dns"
)
type lruCache struct {
maxItems int
items map[dns.Question]*cacheItem
head, tail *cacheItem
}
type cacheItem struct {
*cacheAnswer
prev, next *cacheItem
}
type cacheAnswer struct {
timestamp time.Time // Time the record was cached. Needed to adju... |
/* eslint-env mocha */
import { expect } from 'aegir/chai'
import { DefaultAddressManager } from '../../src/address-manager/index.js'
import { DefaultTransportManager, FaultTolerance } from '../../src/transport-manager.js'
import { TCP } from '@libp2p/tcp'
import { mockUpgrader } from '@libp2p/interface-mocks'
import ... |
echo Go
../xtime.rb ./matmul_go 1500
echo GccGo
../xtime.rb ./matmul_go_gccgo 1500
echo Nim Gcc
../xtime.rb ./matmul_nim_gcc 1500
echo Nim Clang
../xtime.rb ./matmul_nim_clang 1500
|
<?php
class LogszStatus extends Eloquent {
protected $table = 'Logs_z_Status';
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.