text stringlengths 27 775k |
|---|
/*
* Copyright (c) 2016 Samsung Electronics Co., Ltd 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 a... |
<?php
namespace App\Http\Controllers;
use App\Models\BlogModels;
use Illuminate\Http\Request;
class BlogController extends Controller
{
//
private $model;
public function __construct()
{
$this->model= new BlogModels();
// parent::__call($method, $parameters); // TODO: Change the au... |
; RUN: llvm-as < %s >%t.bc
; RUN: llvm-lto -debug-pass-manager -exported-symbol=_f -o /dev/null %t.bc 2>&1 -disable-verify | FileCheck %s
; RUN: llvm-lto -debug-pass-manager -exported-symbol=_f -o /dev/null %t.bc 2>&1 | FileCheck %s -check-prefix=VERIFY
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:6... |
__author__ = 'Shyue Ping Ong'
__copyright__ = 'Copyright 2014, The Materials Virtual Lab'
__version__ = '0.1'
__maintainer__ = 'Shyue Ping Ong'
__email__ = 'ongsp@ucsd.edu'
__date__ = '1/24/14'
import unittest
import os
from monty.collections import frozendict, Namespace, AttrDict, FrozenAttrDict
test_dir = os.path... |
import { IconSizes } from '@medly-components/theme';
import { HTMLProps, Omit } from '@medly-components/utils';
export type SVGProp = Omit<HTMLProps<HTMLOrSVGElement>, 'size' | 'sizes'>;
export interface SvgIconProps extends SVGProp {
/** Icon Size */
size?: IconSizes;
/** Icon variants */
variant?: '... |
import org.junit.runner._
import org.specs2.mutable._
import org.specs2.runner._
import services.json.JsonMarshaller
/**
* Add your spec here.
* You can mock out a whole application including requests, plugins etc.
* For more information, consult the wiki.
*/
@RunWith(classOf[JUnitRunner])
class JsonMarshallerSpec... |
# dbcc
dbcc can translate `data base CAN` files into Rust code.
## Features
- [x] Generate message, signal decoder code
- [x] Geneate message id constants
- [x] Generate enums for matching against signal values
- [ ] Generate message, signal encoders
## Install
```
cargo install dbcc
```
## Run
```
dbcc j1939.dbc > ... |
#!/bin/sh -x
cd `dirname $0`
manage=../manage.py
# Page structure
$manage dumpdata --natural --indent=2 simpleshop.ProductCategory simpleshop.Product > _simpleshop.json
$manage dumpdata --natural --indent=2 fluent_pages > _pages_base.json
$manage dumpdata --natural --indent=2 fluentpage simpleshop.ProductCategoryPage... |
import 'package:climify/models/beaconModel.dart';
import 'package:climify/widgets/listButton.dart';
import 'package:flutter/material.dart';
class ScannedDevices extends StatelessWidget {
final List<BeaconModel> _beacons;
final List<String> _blacklist;
final String Function(int) _getSignalStrengthString;
final ... |
---
layout: post
microblog: true
date: 2016-09-28 14:14 +1300
guid: http://JacksonOfTrades.micro.blog/2016/09/28/t780938673483161600.html
---
@laureninspace Minimalism and good typography. A good focus on the content.
|
var express = require('express');
var serveStatic = require('serve-static');
var app = express();
var argv = require('yargs')
.default('port', 8000)
.argv;
app.use(serveStatic('dist'));
app.get('*', function (req, res) {
res.sendFile('index.html', {
root: __dirname + '/../dist'
});
});
app.listen(argv.p... |
use std::convert::TryInto;
use std::convert::TryFrom;
use std::fmt;
use crate::SystemExclusiveData;
use num_enum::TryFromPrimitive;
#[derive(Debug, Eq, PartialEq, Copy, Clone, TryFromPrimitive)]
#[repr(u8)]
pub enum Shape {
Triangle,
Sawtooth,
Square,
Random,
}
impl fmt::Display for Shape {
fn fmt... |
use bellman::pairing::ff::{Field, PrimeField, PrimeFieldRepr, BitIterator};
// TODO: replace Vec with Iterator?
pub trait GetBits {
fn get_bits_le(&self) -> Vec<bool>;
}
pub trait GetBitsFixed {
/// Get exactly `n` bits from the value in little endian order
/// If `n` is larger than value bit length, it... |
import * as TMInfra from '../../../tm_infra/node_lib/TMInfra'
import * as TMBasic from '../../../tm_basic/node_lib/TMBasic'
import * as TMTransport from '../../../tm_transport/node_lib/TMTransport'
import * as yargs from 'yargs'
yargs
.scriptName("relayer")
.usage("$0 <options>")
.option('incomingAddress',... |
package com.osacky.doctor
import com.osacky.doctor.internal.PillBoxPrinter
import org.gradle.api.GradleException
import java.lang.management.ManagementFactory
/**
* Starting with Java 9, G1 is the new GC. For building software such as with Gradle, the parallel GC is faster.
*/
class JavaGCFlagChecker(
private v... |
package com.rhm.pwn.model
import android.util.Log
import java.util.Observable
/**
* Created by sambo on 8/29/2017.
*/
class URLCheckJobCompletedNotifier : Observable() {
fun update() {
setChanged()
notifyObservers()
Log.d("SAMB", this.javaClass.name + " - Completed chec... |
var streams = require('./streams');
var promise = require('rsvp');
var Streamed = require('./streamed').Streamed;
var Listed = require('./listed').Listed;
function Repos( user ){
// expected by Streamed mixin
this._config = { user: user };
this._repos = undefined;
}
Repos.supported = {
list: true
};
// Mixi... |
# React In Angular
React(v.17) in Angular(v.12) demo, for progressive migration.
|
require 'spec_helper'
describe Listen::DependencyManager do
let(:dependency) { Listen::DependencyManager::Dependency.new('listen', '~> 0.0.1') }
subject { Class.new { extend Listen::DependencyManager } }
before { described_class.clear_loaded }
describe '.add_loaded' do
it 'adds a dependency to the list ... |
/**
* @file operationReturnValues.cpp
* @brief Enumeration of values returned by operations within libSBML.
* @author Sarah Keating
*
* <!--------------------------------------------------------------------------
* This file is part of libSBML. Please visit http://sbml.org for more
* information about SB... |
/* Controle de página */
function nextPage(){
window.location.href='selecionar_img.html';
}
function previousPage(){
window.location.href='cadastro.html';
}
function getUrlParameter(sParam){
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i<vars.length;i++) {
... |
{-Test program for basic Anubis functions, (c) we Aug.2008}
program t_an_bs1;
{$i STD.INC}
{$ifdef win32}
{$ifndef FPC}
{$J+}
{$endif}
{$ifndef VirtualPascal}
{$apptype console}
{$endif}
{$endif}
uses
{$ifdef WINCRT}
wincrt,
{$endif}
mem_util,anu_base;
{$ifdef StrictLong}
{$warnings of... |
<?php
// GENERATED CODE -- DO NOT EDIT!
// Original file comments:
// Copyright 2020 Google LLC
//
// 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/L... |
---
title: "Java(11) - 조건문(if, ifelse)"
excerpt: "Java Conditional If, Else"
toc: true
toc_sticky: true
categories:
- Java
tags:
- Java
date: "2021-09-24 17:10:00"
last_modified_at: "2021-09-24 17:25:00"
---
특정 조건이 만족될 때에만 실행하게 하고 싶다면 if문을 사용하면 됩니다.
## 1. if문, if~else문
우선 예제를 하나 보겠습니다.
```java
class IfTest{
... |
/*
* 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 ouhk.comps380f.dao;
/**
*
* @author Ronaldtsai
*/
import java.util.List;
import org.springframework.data.jpa.repository.Jpa... |
import {Injectable} from '@angular/core';
import {LogService} from '../../services/common/LogService';
import {ErrorHandler} from "@angular/core";
@Injectable()
export class NestErrorHandler implements ErrorHandler {
constructor(private logger: LogService) {
}
/**
* Override default error handler to send er... |
#!perl
# https://github.com/xslate/p5-Text-Xslate/issues/88
use strict;
use warnings;
use Test::More;
use utf8;
use Text::Xslate 'mark_raw';
my $xslate = Text::Xslate->new();
is $xslate->render_string('<: $string :>', {string => "Ä"}) => 'Ä';
is $xslate->render_string('<: $string :>', {string => "\x{c4}"}) => 'Ä... |
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Member extends Model
{
protected $table = 'members';
protected $fillable = [
'first_name',
'last_name',
'email',
'telephone',
'country',
'post_code',
'address',
'look_up',
... |
import {Directive} from '@angular/core'
import {ChoiceComponent} from './choice.component'
@Directive({
selector: '[lrnCorrect]'
})
export class CorrectDirective {
constructor(choice: ChoiceComponent) {
choice.setAsCorrect()
}
}
|
rm "bin\release\" -Recurse -Force
dotnet pack --configuration Release
#dotnet nuget push "bin\Release\" --source "https://api.nuget.org/v3/index.json"
#$ver = ((ls .\bin\release\*.nupkg)[0].Name -replace 'NBitpayClient\.(\d+(\.\d+){1,3}).*', '$1')
#git tag -a "v$ver" -m "$ver"
#git push --tags |
<?php
namespace App\Http\Controllers;
use App\Models\Office;
use Illuminate\Http\Request;
class AdminOfficeController extends Controller
{
public function index() {
$offices = Office::all();
return view('admin.offices.office_index', compact('offices'));
}
public function show($id)
... |
import {createConnection} from 'typeorm'
// Método que cria a conexão com o banco sqlLite
createConnection() |
#!/usr/bin/env python
"""
NMDA synapses
"""
from brian2 import *
brian_prefs.codegen.target = 'weave'
a=1/(10*ms)
b=1/(10*ms)
c=1/(10*ms)
input=NeuronGroup(2, 'dv/dt=1/(10*ms):1', threshold='v>1', reset='v=0')
neurons = NeuronGroup(1, """dv/dt=(g-v)/(10*ms) : 1
g : 1""")
S=Synapses(input,... |
# TODO
This is just a basic implementation<br>
- [x] stdio.h
- [x] string.h
- [x] stdint.h
- [x] stdarg.h
- [ ] kmalloc |
package main
import (
"encoding/json"
"io/ioutil"
"net/http"
"strconv"
"github.com/gorilla/mux"
)
func Index(w http.ResponseWriter, r *http.Request) {
output := JSON{ErrorCode: 0, Success: true, Result: nil}
token := r.Header.Get("Authorization")
if !isUserExists(token) {
output.ErrorCode = 1
output.Succ... |
package egovframework.rte.psl.dataaccess.mybatis.mapper;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import java.math.BigDecimal;
import javax.annotation.Resource;
import org.junit.Before;
import org.junit.Test;
im... |
section .bss
align 16
stack_bottom:
resb 8192
stack_top:
section .stivale2hdr
align 4
stivale_hdr:
dq 0
dq stack_top
dq (1 << 1) | (1 << 2) | (1 << 3) | (1 << 4)
dq 0
|
use std::collections::{BTreeMap, BTreeSet};
use std::convert::TryFrom;
use crate::error::{GrufError, Result};
use crate::grf::reader::{GrfArchive, GrfFileEntry, GRF_HEADER_SIZE};
#[derive(Debug)]
pub struct AvailableChunk {
pub size: usize,
}
#[derive(Debug)]
pub struct AvailableChunkList {
end_offset: u64,
... |
import { LogLevel, TNSLogBase, TNSLogRedirectionStrategy, TNSMediaInformationBase, TNSMediaStreamBase, TNSReturnCodeBase, TNSSessionBase, TNSSessionState, TNSStatisticsBase } from './common';
export { LogLevel };
export class TNSSession extends TNSSessionBase {
native: Session;
readonly android: any;
get ios()... |
package oidc
import (
"context"
"fmt"
"github.com/coreos/go-oidc/v3/oidc"
"github.com/gofrs/uuid"
"github.com/h44z/wg-portal/internal/oauth/oauthproviders"
"github.com/h44z/wg-portal/internal/oauth/userprofile"
"github.com/pkg/errors"
"golang.org/x/oauth2"
)
type oidcProvider struct {
oauth2.Config
oidcPro... |
extern crate kusuo_lib;
#[macro_use]
extern crate clap;
use clap::{Arg, App};
use std::fs::File;
use std::path::Path;
use kusuo_lib::lexer::Lexer;
use std::io::Read;
fn main() {
let version = "0.0.1";
let matches = App::new("kusuo compiler")
.version(version)
.author("ariwaranosai <nkssai@outl... |
package space.kscience.visionforge.react
import kotlinx.css.*
import kotlinx.css.properties.TextDecoration
import kotlinx.html.js.onClickFunction
import org.w3c.dom.Element
import org.w3c.dom.events.Event
import react.*
import react.dom.attrs
import react.dom.render
import space.kscience.dataforge.meta.*
import space.... |
/**
* Universal Binary Format
* @module ubf
*/
import {LEN} from "../info";
import * as MARKER from "../markers";
export function parseControlDirective(): ?boolean {
switch (this._readMarker()) {
case MARKER.CTRL_HEADER: {
this._consume(LEN.MARKER);
// TODO
return true;
}
}
}
export f... |
CREATE TABLE migrertesaker_logg (
id UUID NOT NULL,
person_ident VARCHAR,
migreringsdato TIMESTAMP(3) DEFAULT LOCALTIMESTAMP,
status VARCHAR,
aarsak VARCHAR,
call_id VARCHAR,
feiltype VARCHAR
); |
<?php
/**
* Created by PhpStorm.
* User: brunekninja
* Date: 02/04/2017
* Time: 21:46
*/
class Model {
function __construct($db)
{
try {
$this->db = $db;
} catch (PDOException $e) {
exit('Database connection could not be established.');
}
}
public function getProducts()
{
... |
---
layout: page
title: Membership Benefits
sidebar_link: true
---
## What PSB Has to Offer
Members of PSB enjoy hosted events, brew sessions, a club bus trip, a new
member t-shirt and taster glass, and area discounts!
### Club Parties
Every year PSB hosts a Spring Party and Fall Party. Typically the spring party
is... |
using System;
using System.ComponentModel;
using Xpand.Persistent.Base.General;
using Xpand.Persistent.Base.MemberLevelSecurity;
namespace Xpand.ExpressApp.MemberLevelSecurity {
[ToolboxItem(false)]
public sealed class MemberLevelSecurityModule : XpandModuleBase, IMemberLevelSecurityModule {
}
} |
# YeelightController
Simple shell utility to discover and control Yeelight Wifi Smart bulb
Original author — https://github.com/shyamvalsan/YeelightController
## Install
Just copy the files in this repo to your linux machine, the utilities used by the code
are shell, awk, netcat, arp - all of which should be bundled ... |
<?php
/**
* This file is part of Totara Learn
*
* Copyright (C) 2020 onwards Totara Learning Solutions LTD
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the Licens... |
package org.kotlinacademy.respositories
import org.kotlinacademy.Endpoints
import org.kotlinacademy.Endpoints.info
import org.kotlinacademy.Endpoints.propose
import org.kotlinacademy.Endpoints.snippet
import org.kotlinacademy.data.Info
import org.kotlinacademy.data.InfoData
import org.kotlinacademy.data.Snippet
import... |
Function Remove-HashtableNullValue
{
[cmdletbinding()]
Param(
[Parameter(ValueFromPipeline)]
[Alias("InputObject")]
[hashtable]$Hash
)
BEGIN
{
$F = $MyInvocation.InvocationName
Write-Verbose -Message "$f - START"
[int]$CountNonNull = 0
}
PROCESS
{
fo... |
package codeforces.round586
fun main() {
readLn()
val s = readLn()
println(List(s.count { it == 'n' }) {1}.plus(List(s.count { it == 'z' }) {0}).joinToString(" "))
}
private fun readLn() = readLine()!!
|
---
name: Bug report
about: Create a report to help us improve
title: Crash
labels: bug
assignees: mosemister
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Minecraft version (eg. 1.12.2)
2. Platform (version if known) (Eg. Sponge For... |
require 'formula'
class Mktorrent < Formula
desc "Create BitTorrent metainfo files"
homepage 'http://mktorrent.sourceforge.net/'
url 'https://downloads.sourceforge.net/mktorrent/mktorrent-1.0.tar.gz'
sha1 'f9b1bbf9d19911b6c8994dbec6208530c7d929ad'
def install
system "make USE_PTHREADS=1 USE_OPENSSL=1 US... |
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
import type { NextApiRequest, NextApiResponse } from 'next';
import {
Telegram,
verifyToken
} from '../../../../../backend';
const api = async (req: NextApiRequest, res: NextApiResponse) => {
if (req.method === 'POST') {
... |
import {Component, Input, OnInit, ViewChild} from '@angular/core';
import {ItemDisplayer} from '../item-displayer';
import {Container} from './container';
import { DesignService} from '../design.service';
import { PurchaseOrderService} from '../purchase-order.service';
import {CustomerService} from '../app.customer.ser... |
import LayoutMain from 'components/layout/layout-main'
import { GetServerSideProps, NextPage } from 'next'
import withTree from 'libs/server/middlewares/tree'
import withUA from 'libs/server/middlewares/ua'
import { TreeModel } from 'libs/shared/tree'
import { withSession } from 'libs/server/middlewares/session'
import... |
package com.javayh.factory.service.impl;
import com.javayh.constant.Constant;
import com.javayh.dto.PhoneDTO;
import com.javayh.factory.service.PhoneService;
import com.javayh.vo.PhoneVO;
import org.springframework.stereotype.Service;
/**
* @author Dylan Yang
* @Description: 苹果手机
* @ProjectName design-pattern
* @... |
// DRUNKWATER TEMPLATE(add description and prototypes)
// Question Title and Description on leetcode.com
// Function Declaration and Function Prototypes on leetcode.com
//384. Shuffle an Array
//Shuffle a set of numbers without duplicates.
//Example:
//// Init an array with set 1, 2, and 3.
//int[] nums = {1,2,3};
//So... |
from app.models.base.base import BaseModel
from app.models.account.user_access_token import UserAccessTokenModel
from app.models.account.user_account import UserAccountModel
from app.models.account.user_info import UserInfoModel
account_data_cache_key = "AccountDataModel:Initialize:Token:"
class AccountDataModel(Bas... |
package svc
import (
"context"
"go-bc/app/payment/cmd/api/internal/config"
"go-bc/common/xerr"
"github.com/pkg/errors"
"github.com/wechatpay-apiv3/wechatpay-go/core"
"github.com/wechatpay-apiv3/wechatpay-go/core/option"
"github.com/wechatpay-apiv3/wechatpay-go/utils"
)
func NewWxPayClientV3(c config.Config) (... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import pdb
import numpy as np
import network.resnet38d
class Net(network.resnet38d.Net):
def __init__(self, k_cluster, from_round_nb):
super().__init__()
self.k = k_cluster
self.from_round_nb = from_round_nb
print... |
// Copyright © 2018 Inanc Gumus
// Learn Go Programming Course
// License: https://creativecommons.org/licenses/by-nc-sa/4.0/
//
// For more tutorials : https://learngoprogramming.com
// In-person training : https://www.linkedin.com/in/inancgumus/
// Follow me on twitter: https://twitter.com/inancgumus
package pipe
... |
#!/bin/bash
# coding: utf-8
cd -- "$(dirname "$BASH_SOURCE")"
python pdfannots_scriven.py
|
. ./.secrets/set-external-resources-environment-variables.sh
export AUTH0__DOMAIN=$AUTH0_DOMAIN
export AUTH0__CLIENTID=$AUTH0_CLIENTID
export AUTH0__CLIENTSECRET=$AUTH0_CLIENTSECRET
export SANDBOXAPP__ENVIRONMENTNAME=localdev
export SANDBOXAPP__EXTERNALDNSNAME=localhost:5000
dotnet run |
use nom::{
branch::permutation,
bytes::complete::tag,
character::complete::{line_ending, space1},
error::{context, ParseError},
multi::{count, separated_list},
number::complete::float,
sequence::tuple,
IResult,
};
use crate::helpers::{indent, integer, resource_path, string};
use crate::... |
# coding=utf-8
#
# Licensed under the MIT License
"""MongoDB client for ChatQL."""
import mongoengine
import datetime
import json
import functools
class Scenario(mongoengine.Document):
"""Scenario Collection Class."""
attributes = mongoengine.DictField()
conditions = mongoengine.StringField()
respons... |
<?php
class ListNode {
public $val = 0;
public $next = null;
function __construct($val = 0, $next = null) {
$this->val = $val;
$this->next = $next;
}
}
/**
* 给定一个头结点为 head 的非空单链表,返回链表的中间结点。如果有两个中间结点,则返回第二个中间结点。
* @param ListNode $head
* @return ListNode
*/
function middleNode($head... |
libraryDependencies += "org.scalaj" %% "scalaj-http" % "2.3.0"
libraryDependencies += "org.json4s" %% "json4s-native" % "3.4.0"
|
const customerValidation = require("../customer/customer.validation");
const merchantValidation = require("../merchant/merchant.validation");
const transactionValidation = require("../transaction/transaction.validation");
module.exports = {
"/customer/*": customerValidation,
"/merchantService/*": merchantValidatio... |
using System;
using System.Collections.Generic;
using System.Linq;
using AutoMapper;
using NoMoreSusi.Models;
using NoMoreSusi.Web.Mapping;
namespace NoMoreSusi.Web.ViewModels.Rooms
{
public class AddRoomViewModel:IMapFrom<Room>,IHaveCustomMappings
{
public AddRoomViewModel()
{
Facultities = Enum.GetValues(t... |
const nunjucks = require('nunjucks');
const fs = require('fs');
const GithubApi = require('./utils/githubApi');
async function build() {
const githubApi = new GithubApi({
owner: 'buxuku',
repo: 'buxuku.github.io',
auth: process.env.GH_TOKEN,
});
githubApi.init();
console.log('fe... |
package typingsSlinky.googleapis.v41Mod.adsensehostV41
import typingsSlinky.gaxios.commonMod.GaxiosPromise
import typingsSlinky.googleapisCommon.apiMod.APIRequestContext
import typingsSlinky.googleapisCommon.apiMod.BodyResponseCallback
import typingsSlinky.googleapisCommon.apiMod.MethodOptions
import org.scalablytyped... |
// a:endParaRPr
use super::SolidFill;
use writer::driver::*;
use reader::driver::*;
use quick_xml::Reader;
use quick_xml::events::{Event, BytesStart};
use quick_xml::Writer;
use std::io::Cursor;
#[derive(Default, Debug)]
pub struct EndParagraphRunProperties {
text: String,
kumimoji: Option<String>,
lang: O... |
package by.godevelopment.kroksample.data.datasources.network
import by.godevelopment.kroksample.common.InternetException
import by.godevelopment.kroksample.data.datasources.network.entity.KrokCity
import by.godevelopment.kroksample.data.datasources.network.entity.KrokView
import kotlinx.coroutines.CoroutineDispatcher
... |
package kalah
import org.amshove.kluent.shouldEqual
import org.amshove.kluent.shouldNotEqual
import org.amshove.kluent.shouldThrow
import org.jetbrains.spek.api.Spek
import org.jetbrains.spek.api.dsl.describe
import org.jetbrains.spek.api.dsl.it
import org.jetbrains.spek.api.dsl.on
object PositionSpek : Spek({
de... |
object frmViewCliente: TfrmViewCliente
Left = 0
Top = 0
Caption = 'frmViewCliente'
ClientHeight = 498
ClientWidth = 1118
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -11
Font.Name = 'Tahoma'
Font.Style = []
OldCreateOrder = False
PixelsPerInch = 96
... |
"use strict";
/*
* examples/servo.ts
* https://github.com/101100/pca9685
*
* Example to turn a servo motor in a loop.
* Typescript version.
*
* Copyright (c) 2015-2016 Jason Heard
* Licensed under the MIT license.
*/
Object.defineProperty(exports, "__esModule", { value: true });
var i2cBus = require("i2c-bus")... |
#!/usr/bin/perl -w
# $Id$
use strict;
use warnings;
use Test::More tests => 1;
use Class::Business::DK::CVR;
my $cvr = Class::Business::DK::CVR->new(27355021);
is($cvr->get_number(), 27355021);
|
#ifndef FOGACTUALDECLARATION_HXX
#define FOGACTUALDECLARATION_HXX
class FogActualDeclaration : public PrimPrint {
typedef PrimPrint Super;
typedef FogActualDeclaration This;
TYPEDECL_SINGLE(This, Super)
private:
enum IsValid {}; // Useless type for pointer return.
private:
FogSpecifierRefToConst... |
Some of my _awesome_ attributes are **brave** and **kind** or **_both_**
|
import { getEnumerables } from '../__test-utilities__/utilities';
describe.each([...getEnumerables()])('append', (src, enumerable) => {
it.each([[], new Set([1, 2]), [1, 2]])('should append a new element', collection => {
const last = 3;
const res = enumerable(src(collection)).append(last).toArray();
e... |
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use App\Models\EstadoPedido;
use App\Models\DetallesPedido;
use App\Models\Usuario;
class Pedido extends Model
{
protected $table = "pedidos";
public $timestamps = false;
public function estado() {
return $this->hasOne(EstadoPedido::c... |
package cgr
import (
"context"
"fmt"
"net/http"
)
type Router struct {
Routes *Tree
}
type key int
// Key for url parameters in context
const ParamsKey = key(iota)
func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) {
defer internalError(w)
method := req.Method
path := req.URL.Path
resul... |
import ApolloClient, { gql, ApolloQueryResult } from 'apollo-boost'
import { getSettings } from '../configuration/configuration'
import { Branch, Repository } from './branch'
import { QueryAllBranchesResponse } from './model'
let githubClient: ApolloClient<{}> | null = null
const createGithubClient = (token: string, ... |
export const result = {
level1: ["one", true]
};
|
---
parent: attribute.ce
source: fate-grand-order
id: cafe-camelot
language: en
weight: 0
---
“Welcome to Café Camelot.
A special experience awaits you…”
The café run by a gentle-mannered owner is a famous gem of a shop located at the outskirts of town.
It’s said that even world-famous VIPs visit this shop in disgui... |
require_relative 'util/setup_dll'
if __FILE__ == $PROGRAM_NAME
screenWidth = 800
screenHeight = 450
InitWindow(screenWidth, screenHeight, "Yet Another Ruby-raylib bindings - basic shapes drawing")
SetTargetFPS(60)
until WindowShouldClose()
BeginDrawing()
ClearBackground(RAYWHITE)
DrawText("some ... |
package zio.intellij.utils.types
trait Type {
def name: String
def fqName: String
}
trait TypeCompanion[T <: Type] {
def values: List[T]
def defaultValue: T
def fromNameOpt(name: String): Option[T] = values.find(_.name == name)
def fromName(name: String): T = fromNameOpt(name).getOrElse(defaul... |
#!perl
use lib '.';
use t::Helper ();
use Mojo::Base -strict;
use Test::More;
plan skip_all => 'CONVOS_HOME=$HOME/.local/share/convos' unless $ENV{CONVOS_HOME};
$ENV{MOJO_MODE} = 'production';
my $t = t::Helper->t;
my (@url, %uniq) = ($ENV{TEST_CMS_START_PAGE} || '/');
while (@url) {
$t->get_ok(shift @url)->status... |
importall Base
using Base.LinAlg.Givens
# This needs to be executed once
# Pkg.clone("https://github.com/jiahao/DoublelengthFloat.jl.git")
# using DoublelengthFloat # by Jiahao Chen or use other by Simon Byrne
# Pkg.clone("https://github.com/simonbyrne/DoubleDouble.jl.git")
using DoubleDouble # Jiahao's has error, t... |
using System;
using System.Collections.Generic;
using System.Linq;
namespace JetBlack.MessageBus.Common.Collections
{
/// <summary>
/// An n-dimensional array indexer
/// </summary>
public class ArrayIndexer
{
private readonly int[] _sum;
/// <summary>
/// Co... |
import Pkg
import UUIDs
@inline function add_caps(strategy::CapStrategy,
option::LatestVersionOption,
registry_path::AbstractString)
_registry_paths = Any[registry_path]
add_caps(strategy, option, _registry_paths)
return nothing
end
@inline function add_... |
package main
import "fmt"
func main() {
if x := 3; x < 5 {
fmt.Println("El valor de x es inferior a 5")
} else if x > 5 {
fmt.Println("El valor de x es superior a 5")
} else {
fmt.Println("El valor de x es 5")
}
}
|
package com.yngvark.netcom;
import com.rabbitmq.client.Channel;
public class RabbitMqChannel implements Topic {
private Channel channel;
public RabbitMqChannel(Channel channel) {
this.channel = channel;
}
@Override
public String consume() {
return null;
channel.basicGet()... |
#! /bin/bash
convert -size $1 canvas:gray -draw "gravity Center text 0,0 '$1'" $2
|
using System;
namespace VeraDemoNet.Models
{
public class BlabSearchResultViewModel
{
public string Content { get; set; }
public string Blabber { get; set; }
public DateTime BlabDate { get; set; }
public string BlabDateString => BlabDate.ToString("MMM d, yyyy");
}
} |
package commands
import (
"fmt"
neuron "github.com/nikhilsbhat/neuron/app"
config "github.com/nikhilsbhat/neuron/app/config"
"github.com/nikhilsbhat/neuron/cli/ui"
"os"
)
type cliMeta struct {
*config.CliMeta
*ui.NeuronUi
}
var (
cc = &cliMeta{}
)
func init() {
meta, clierr := neuron.CliMeta()
if clierr ... |
---
layout: single
title: "Machine Learning"
permalink: /ml_table/
author_profile: false
sidebar:
title: "Analytics"
nav: sidebar-Analytics
---
temp |
import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Scanner;
public class MyClient {
public static void main(String[] args) {
System.setProperty("java.security.policy","file:///home/yggdralisk/Documents/RSI/Lab2/cz2/srv.policy");
System.out.println("Start");
Resul... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.