text stringlengths 27 775k |
|---|
import 'dart:math';
import 'package:flutter/material.dart';
/// create by 张风捷特烈 on 2020-04-19
/// contact me by email 1981462002@qq.com
/// 说明:
// {
// "widgetId": 85,
// "name": 'Align其他用法',
// "priority": 2,
// "subtitle":
// "由于Alignment对象可指定在父容器中宽高的分率位置\n"
// "可以使用Align实现一些... |
"""Unit tests for src/utils.py."""
from datetime import date, datetime
import pytest
from utils import chunks, extend_dictionary, json_serial
class TestJsonSerial:
"""Tests the json_serial function."""
def test_json_serial(self) -> None:
"""Tests for correct output."""
assert json_serial(d... |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "blimp/client/core/settings/settings.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "blimp/client/core/settings/settings_obse... |
-module (inets_response_bridge_tests).
-include ("test.hrl").
-export ([
build_response_test/0
]).
build_response_test() ->
B00 = simple_bridge:make_response(inets_response_bridge, undefined),
B01 = B00:status_code(200),
B02 = B01:header("header1", "value1"),
B03 = B02:header("header2", "value2"),... |
use metrics::asana::*;
use metrics::config::*;
use clap::{App, Arg};
use env_logger;
use futures::future::{join, join3, join_all};
use serde_json;
use std::collections::HashSet;
use std::fs;
use std::path::{Path, PathBuf};
use tokio;
fn main() {
/* Logging */
env_logger::init();
/* Command Line */
le... |
#!Source me
. ./.local/bin/activate
export PATH="`echo $PATH|sed 's/\([^\\]\) /\1\\\\ /g'`" #Handle spaces in PATH
export ModelSEEDDatabase="$PWD/sourcedata/ModelSEEDDatabase"
|
<?php
namespace Consilience\Laravel\MessageFlow\Observers;
/**
* This observer watches for "new" outbound messages in the MessageFlowOut
* model, and dispatches jobs to push each through the routing pipeline.
*
* The observer events must not change the message model, for risk
* of an endless loop. Instead, even... |
#!/bin/bash
# Copyright 2020 ETH Zurich and University of Bologna.
# Solderpad Hardware License, Version 0.51, see LICENSE for details.
# SPDX-License-Identifier: SHL-0.51
#
# Fabian Schuiki <fschuiki@iis.ee.ethz.ch>
# Andreas Kurth <akurth@iis.ee.ethz.ch>
set -e
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
... |
import { NextApiRequest, NextApiResponse } from 'next'
import jwt from 'jsonwebtoken'
import { query as q } from 'faunadb'
import bcrypt from 'bcryptjs'
import { fauna } from '../../services/fauna'
import { signUp } from '../../libs/validators'
import { IFaunaResponse } from '../../libs/interfaces/api'
export default ... |
package com.jpa.service;
import com.jpa.entity.User;
import org.springframework.stereotype.Repository;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.transaction.Transactional;
@Repository
@Transactional
public class UserDAOService {
//Has all the DAO functions... |
<?php
class SeleniumTestHTMLLogger {
public function setHeaders() {
global $wgOut;
$wgOut->addHeadItem( 'selenium', '<style type="text/css">
.selenium pre {
overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */
white-space: pre-wrap; /* css-3 */
whit... |
SgInfo - Space Group Info (c) 1994-96 Ralf W. Grosse-Kunstleve
Original SgInfo 1.01 from 1996. The only difference is the
new open source license.
See also:
- http://cci.lbl.gov/sginfo/
- https://github.com/rwgk/sglite # No known bugs but also no documentation.
- http://cctbx.sf.net/ # Look for sgtbx. No know... |
#pragma once
#include <windows.h>
#include <winnt.h>
#include <stdexcept>
#include <string>
#include <vector>
constexpr std::size_t NT_SIGNATURE_SIZE = 4;
class bitness_error : public std::runtime_error
{
public:
bitness_error() : std::runtime_error("Incompatible bitness") { }
};
class PeFile
{
public:
virtual ~P... |
define(['knockout', 'text!./panacea-browser.html', 'appConfig', 'faceted-datatable'], function (ko, view, config) {
function panaceaBrowser(params) {
var self = this;
self.model = params.model;
self.services = params.services;
self.currentService = ko.observable();
self.reference = ko.observableArray();
... |
// Copyright (c) 2020, 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.
// Tests that Win32 API prototypes can be successfully loaded (i.e. that
// lookupFunction works for al... |
'use strict';
var Constants = require('Constants');
var Object3DUtil = require('geo/Object3DUtil');
var Picker = require('controls/Picker');
var _ = require('util/util');
/**
* Utility functions for identifying attachments
* @module Attachments
*/
var Attachments = {};
/**
* Attachment information
* @typedef At... |
import Categories from './routes/categories/Index.vue'
import Posts from './routes/posts/Index.vue'
import PostTags from './routes/post-tags/Index.vue'
import Tags from './routes/tags/Index.vue'
let blogRoutes = [
{
path: 'categories',
name: 'blog-categories',
component: Categories,
},
{
path: 'p... |
package com.outr.lucene4s.query
import com.outr.lucene4s._
import com.outr.lucene4s.facet.FacetField
import org.apache.lucene.search.TopFieldCollector
import org.apache.lucene.search.highlight.{Highlighter, QueryScorer, SimpleHTMLFormatter}
case class QueryBuilder[T] private[lucene4s](lucene: Lucene,
... |
use amiquip::{
Channel, ConfirmSmoother, Connection, Exchange, Publish, QueueDeclareOptions, Result,
};
fn publish_messages_with_confirmation(
channel: &Channel,
// queue to publish to
target_queue: &str,
// number of messages to publish before waiting for confirms
group_size: usize,
// ... |
namespace Kala.Models
{
public enum ScreensaverTypes
{
Clock = 0,
Images = 1,
};
}
|
package nl.jolanrensen.efficientlyDiscoveringTernaryLaggedCorrelations.stampPearson
import nl.jolanrensen.efficientlyDiscoveringTernaryLaggedCorrelations.invoke
import nl.jolanrensen.efficientlyDiscoveringTernaryLaggedCorrelations.nextPowerOf2
import nl.jolanrensen.efficientlyDiscoveringTernaryLaggedCorrelations.slice... |
#!/bin/bash
# Temporary:
sysctl -w vm.max_map_count=262144
sysctl -w net.ipv4.ip_local_port_range="15000 61000"
sysctl -w net.ipv4.tcp_fin_timeout=30
sysctl -w net.core.somaxconn=1024
sysctl -w net.core.netdev_max_backlog=2000
sysctl -w net.ipv4.tcp_max_syn_backlog=2048
sysctl -w vm.overcommit_memory=1
# Definitive:... |
package com.yuchen.howyo.profile
import android.os.Bundle
import android.view.*
import androidx.fragment.app.Fragment
import androidx.fragment.app.viewModels
import androidx.lifecycle.ViewModelProvider
import androidx.navigation.fragment.findNavController
import com.yuchen.howyo.MainViewModel
import com.yuchen.howyo.N... |
package com.snakydesign.livedataextensions
import androidx.arch.core.executor.testing.InstantTaskExecutorRule
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.Observer
import org.junit.After
import org.junit.Assert
import org.junit.Before
import org.junit.Rule
import org.junit.Test
import org.mockit... |
package homework2
import common.io.promptIntArray
fun <T> List<T>.removeDuplicates(): List<T> {
val lastIndices = this.zip(this.indices).toMap()
return this.filterIndexed { index, value -> index == lastIndices[value] }
}
fun main() {
val result = promptIntArray("Enter some integers, each on new line. Lea... |
;;;; duckdb.lisp
(in-package #:duckdb)
(defun get-message (p-string)
(foreign-string-to-lisp (mem-ref p-string '(:pointer :string))))
(define-condition duckdb-error (simple-error)
((database :initarg :database)
(statement :initarg :statement)
(appender :initarg :appender)
(arrow :initarg :arrow)
(err... |
-- | This module contains tests for "FreeC.Pass.LetSortPass".
module FreeC.Pass.LetSortPassTests ( testLetSortPass ) where
import Test.Hspec
import qualified FreeC.IR.Syntax as IR
import FreeC.Monad.Class.Testable
import FreeC.Monad.Reporter
import FreeC.Pass.LetSort... |
/**
* Copyright 2021-2022 Nicola Vitucci
*
* 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 agree... |
import 'package:fluro/fluro.dart';
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_shop/router/application.dart';
class Recommend extends StatelessWidget {
final List recommend;
const Recommend({Key ... |
'use strict';
export default function(sequelize, DataTypes) {
var AuthGithub = sequelize.define(
'AuthGithub',
{
gh_id: { type: DataTypes.STRING, unique: true },
display_name: DataTypes.STRING
},
{ timestamps: true, freezeTableName: true, underscored: true }
);
AuthGithub.associate = ... |
using Microsoft.AspNet.Mvc;
namespace Library.WebApi.Controllers
{
[ApiExplorerSettings(IgnoreApi = true)]
public class RootController : Controller
{
public IActionResult Get()
{
//return Redirect( Request.RequestUri.AbsoluteUri + "swagger/ui/index" );
return Redirect(Request.PathBas... |
import { Lisan } from 'lisan';
import { Loader } from '../../src';
describe('lisan-plugin-loader > on node', () => {
let lisanInstance;
beforeEach(() => {
lisanInstance = new Lisan();
});
it('should require the js file', () => {
lisanInstance.use(
Loader({
dictionaryUrlFn: dictionaryName... |
module Eventuria.Libraries.CQRS.Write.Aggregate.Core where
import Eventuria.Libraries.CQRS.Write.Aggregate.Ids.AggregateId
class AggregateJoinable item where {
getAggregateId :: item -> AggregateId
}
|
import {
workspace,
window,
commands,
extensions,
ExtensionContext,
StatusBarAlignment,
TextEditor,
WorkspaceFolder,
QuickPickItem,
WorkspaceConfiguration,
Uri,
languages,
TextDocument,
Range,
TextEdit
} from "vscode";
import * as path from "path";
import * as nls from "vscode-nls";
impor... |
using Globalmantics.DAL;
using Globalmantics.DAL.Migrations;
using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
using System.Reflection;
namespace Globalmantics.IntegrationTests
{
[SetUpFixture]
publ... |
/*
* Copyright 2011-2017 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the OpenSSL license (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/lice... |
/*
* MIT License
*
* Copyright (c) 2021 akanchi
*
* 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, ... |
<?php
require_once('db_config.php');
require_once('function.php');
$fname = $_POST['fname'];
$lname=$_POST['lname'];
$email =$_POST['email'];
$birthday =$_POST['birthday'];
$gender =$_POST['gender'];
$userid=$_POST['userid'];
$usertype=$_POST['usertype'];
foreach($fname as $key=>$firstname ){
$sqlupdate="UPDATE `use... |
#!/bin/sh
cat <<__EOF__ > PWD
UID=${TDSPWDUID}
PWD=${TDSPWDPWD}
SRV=${TDSPWDSRV}
DB=${TDSPWDDB}
__EOF__
|
<?php
return [
'required_choices' => 5,
'gdpr_anonymise_after' => 365,
'gdpr_contact' => env('GDPR_CONTACT'),
'wlm_api_url' => env('OLD_API_URL'),
];
|
export const getQuicksortAnimations = (array) => {
let animations = [];
let auxArray = array.slice();
quicksort(auxArray, 0, auxArray.length - 1, animations);
return animations;
};
function quicksort(array, start, end, animations) {
if (start < end) {
let pIndex = partition(array, start, end, an... |
/*
* bakufu
*
* Copyright (c) 2016 STNMRSHX
* Licensed under the WTFPL license.
*/
package ssl
import (
"crypto/tls"
"crypto/x509"
"errors"
"io/ioutil"
nethttp "net/http"
"strings"
"github.com/go-martini/martini"
"github.com/stnmrshx/golib/log"
"github.com/stnmrshx/bakufu/go/config"
)
var cipherSuites... |
package com.github.quillraven.commons.ashley.component
import com.badlogic.ashley.core.Component
import com.badlogic.ashley.core.Engine
import com.badlogic.ashley.core.Entity
import com.badlogic.gdx.utils.GdxRuntimeException
import com.badlogic.gdx.utils.Pool
import com.github.quillraven.commons.ashley.system.RemoveSy... |
Future<dynamic> delayed ({int milliseconds = 666}) async {
/// 适当延时,让操作节奏慢下来
return await Future<dynamic>.delayed(Duration(milliseconds: milliseconds));
}
const Duration scrollDuration = Duration(milliseconds: 300); |
import 'package:cvideo_employer_mobile/src/models/models.dart';
import 'package:equatable/equatable.dart';
abstract class LoadListCVApplyState extends Equatable {
@override
List<Object> get props => [];
}
class LoadListCVApplyInitial extends LoadListCVApplyState {}
class LoadListCVApplyLoading extends ... |
/*
* Copyright 2020 Databricks
*
* 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 i... |
# <auto-generated>
# This code was generated by the UnitCodeGenerator tool
#
# Changes to this file will be lost if the code is regenerated
# </auto-generated>
def to_seconds(value):
return value * 86400.0
def to_minutes(value):
return value * 1440.0
def to_hours(value):
return value * 24.0
def to_weeks(value): ... |
(load "fl-interpreter.lisp")
; Basic Tests
(assert (equal nil (fl-interp nil nil)))
(assert (equal '(RANDOM-UNIMPLEMENTED-COMMAND) (fl-interp '(RANDOM-UNIMPLEMENTED-COMMAND) nil)))
; Primitive Addition Tests
(assert (equal 3 (fl-interp '(+ 1 2) nil)))
(assert (equal 6 (fl-interp '(+ 1 (+ 2 3)) nil)))
(assert (equal 1... |
@JS('navigator.contacts')
library picker;
import 'dart:html';
import 'package:contact_picker_web/src/js/promise.js.dart';
import 'package:js/js.dart';
external List<String> getProperties();
@JS('select')
external Promise<List<JSContact>> openPicker(
List<String> props, Options options);
@JS()
@anonymous
class ... |
<?php
namespace Cerad\Bundle\PersonBundle\DataTransformer;
use Symfony\Component\Form\DataTransformerInterface;
class StripTagsTransformer implements DataTransformerInterface
{
public function transform($value)
{
//echo get_class($value); die(' WTF Strip Transform');
return $value;
}
p... |
# User Resources
GET users
## Description
Returns the profile information for the current user.
***
## Requires authentication
**[OAuth][]**
***
## Parameters
None
***
## Return format
Current user's profile information in **[full format][]**.
Additional data:
- **upload_limit** — the number of photos th... |
#include <iostream>
#include "JsonDB.hpp"
#include "SQLiteDB.hpp"
int main(int, char **)
{
// Open local jsonDB (auto parses)
hsc::JsonDB old_db("../../old-system/db.json");
// Open local SQLite database
hsc::SQLiteDB new_db("../../new-system/db.db");
new_db.open();
// Insert each record from... |
/*
* Copyright (C) 2019. Zac Sweers
*
* 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... |
/// <vs SolutionOpened='default' />
// http://andy-carter.com/blog/a-beginners-guide-to-the-task-runner-gulp
// http://www.smashingmagazine.com/2014/06/11/building-with-gulp/
var gulp = require('gulp'),
plumber = require('gulp-plumber'),
watch = require('gulp-watch');
gulp.task('copy_csComp', function () {
... |
use crate::geometry::direction::Direction;
use crate::geometry::vector::Vector4;
#[derive(Copy, Clone, Debug)]
pub struct Ray {
pub start: Vector4,
pub direction: Direction,
}
impl Ray {
pub fn march(&self, t: f64) -> Vector4 {
return self.start + (Vector4::from(self.direction) * t);
}
}
|
#include "./dist_async_sum-inl.h"
int CreateServerNode(int argc, char *argv[]) {
mshadow::ps::MShadowServerNode<float> server(argc, argv);
return 0;
}
int WorkerNodeMain(int argc, char *argv[]) {
return Run<mshadow::cpu>(argc, argv);
}
|
#[cfg(feature = "physics")]
mod physics_bundle;
#[cfg(feature = "physics")]
pub use physics_bundle::PhysicsBundle;
#[cfg(feature = "animation")]
mod animation_bundle;
#[cfg(feature = "animation")]
pub use animation_bundle::AnimationBundle;
#[cfg(feature = "audio")]
mod audio_bundle;
#[cfg(feature = "audio")]
pub use ... |
package com.shopping
import math._
import Shop._
object Offer {
type Discount = BigDecimal
val buyOneGetOneFreeOnApple : ShoppingCart => Discount = shoppingCart => {
val appleList = shoppingCart.items collect { case item @ Apple => item }
floor(appleList.size/2) * 0.60
}
val threeForThe... |
module RootHitFiles
import Base, Tables
using Mmap: mmap
using Parsers
export RootHitFile
"""
RootHitFile(file::Union{IOStream, AbstractString})
represents a `.root.hits` file, which can be iterated or read to yield events, which are
tables of hits.
"""
struct RootHitFile
stream::IOBuffer
end
RootHitFile(... |
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import Card from '@material-ui/core/Card';
import CardActionArea from '@material-ui/core/CardActionArea';
import CardActions from '@material-ui/core/CardActions';
import CardContent from '@material-ui/core/CardContent';
import CardMedia f... |
require 'player'
describe Player do
let(:name){ double :name }
subject { described_class.new(name) }
it 'should return the player name' do
expect(subject.get_name).to eq name
end
end |
// Copyright 2019 Yunion
//
// 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 writi... |
package studio.forface.covid.data
import studio.forface.covid.data.local.localDataModule
import studio.forface.covid.data.remote.remoteDataModule
val dataModule = remoteDataModule + localDataModule
|
import { expect } from "chai";
import { Project } from "../../Project";
describe("tests for issue #1164", () => {
it("should not forget the source file when using `getSymbol()` after it creates a source file", () => {
const project = new Project({ useInMemoryFileSystem: true });
const sourceFile = ... |
Bolt Language Experiments
=========================
Bolt is an experimental programming language that I'm creating. The
design is currently documented in [a gist][bolt-design].
[bolt-design]: https://gist.github.com/NelsonCrosby/bd6906833a567ab006c970d4d8c7da05
By *experimental*, I don't necessarily mean *way out th... |
import 'package:flutter/material.dart';
import 'package:possystem/components/style/hint_text.dart';
class MetaBlock extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
margin: const EdgeInsets.symmetric(horizontal: 4),
child: const Text('•'),
);
}
sta... |
import APIJSON from '../../../../config/api.json'
export default function getAPIBaseURL () {
return APIJSON.api.path
}
|
/* ----------------------------- Segments -------------------------------- */
/*
Each malloc space may include non-contiguous segments, held in a
list headed by an embedded malloc_segment record representing the
top-most space. Segments also include flags holding properties of
the space. Large chunks that are ... |
<?php
namespace App\Http\Livewire;
use Livewire\Component;
use App\Post;
use Livewire\WithPagination;
use Illuminate\Support\Facades\DB;
class SearchPosts extends Component
{
use WithPagination;
public $searchTerm;
public $lang;
protected $posts;
protected $pagination = '9';
// If the langu... |
package com.cattong.sns.impl.facebook;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import com.cattong.commons.LibException;
import com.cattong.commons.LibResultCode;
import com.ca... |
SOS.events.onBattle = function(){
}
SOS.events.offBattle = function(){
}
|
#!/bin/bash
export GOROOT=/Users/devdatta/Downloads/go1.13.9/go
export PATH=$GOROOT/bin:$PATH |
import 'package:flutter/material.dart';
class BaseModel extends ChangeNotifier {
bool _busy = false;
bool get busy => _busy;
void setBusy(bool value) {
_busy = value;
notifyListeners();
}
@override
void dispose() {
print('I have been disposed: ' + this.runtimeType.toString());
super.dispo... |
-module(wnkd_web_item).
-export([init/2]).
init(Req, []) ->
{ok, Body, Req2} = cowboy_req:body(Req, [{length, 100000000}]),
Request = jsx:decode(Body, [return_maps]),
ok = wnkd_item:create(Request),
Req3 = cowboy_req:reply(200, [
{<<"content-type">>, <<"text/json">>}
], jsx:encode(#{ status => ok }), Req2),
{... |
<?php
namespace Drupal\entity_reference_display\Plugin\Field\FieldType;
use Drupal\Core\Field\FieldItemBase;
use Drupal\Core\Field\FieldStorageDefinitionInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Session\AccountInterface;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\T... |
// Copyright (c) 2009 STFC
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef SAGA_PACKAGES_ISN_NAVIGATOR_HPP
#define SAGA_PACKAGES_ISN_NAVIGATOR_HPP
// include dependent spec sections
#include <saga/s... |
import { QueryOptions } from 'apollo-client';
export interface DaffCategoryQueryManagerInterface {
getACategoryQuery(identifier: string | number): QueryOptions;
}
|
class AddEscrowAmountToPuzzles < ActiveRecord::Migration
def change
add_column :puzzles, :escrow_amount, :integer
end
end
|
real = float(input('quanto de dinheiro na sua carteira você tem?'))
a = real / 5.3
print('com',real,'você pode comprar',a,'dolarés')
|
Contribution: 2019-12-01 20:00
Contribution: 2019-12-01 20:01
Contribution: 2019-12-01 20:02
Contribution: 2019-12-01 20:03
Contribution: 2019-12-02 20:00
Contribution: 2019-12-02 20:01
Contribution: 2019-12-03 20:00
Contribution: 2019-12-04 20:00
Contribution: 2019-12-05 20:00
Contribution: 2019-12-08 20:00
... |
package Test::Some;
our $AUTHORITY = 'cpan:YANICK';
# ABSTRACT: test a subset of tests
$Test::Some::VERSION = '0.2.1';
use 5.10.0;
use strict;
use warnings;
use Test::More;
use List::MoreUtils qw/ none any /;
use Package::Stash;
our %filters;
our $BYPASS = 0;
my @init_namespaces;
sub INIT {
# delaying st... |
/*
* Copyright 2018 phData Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in w... |
# MinimalUI
MinimalUI 是一个基于 Vue 的简约UI库,提供了常见的,如:`Button` , `Grid` 等组件。
 |
package com.oliveroneill.wilt.data
import androidx.lifecycle.MutableLiveData
import androidx.paging.PagedList
import com.google.firebase.functions.FirebaseFunctionsException
import com.oliveroneill.wilt.Data
import com.oliveroneill.wilt.Event
import com.oliveroneill.wilt.Message
import com.oliveroneill.wilt.data.dao.A... |
// style dependencies
import '../../../style/core/default'
import '../../../icon/style/themes/default'
import './default.less'
|
```bash
$ cd $HADOOP_HOME
$ ./bin/stop-all.sh
$ ./bin/start-all.sh
```
|
<?php
echo '<div class="user-activity">';
$params['post']->full_view = true;
$user = ossn_user_by_guid($params['post']->poster_guid);
if ($params['post']->type == 'user') {
$vars = ossn_wallpost_to_item($params['post']);
echo ossn_wall_view_template($vars);
}
if ($params['post']->type == 'group') {
$vars = ossn_... |
package com.wire.backups.exports.ios.database
import org.junit.jupiter.api.Disabled
import org.junit.jupiter.api.Test
import java.util.UUID
import kotlin.test.assertEquals
import kotlin.test.assertTrue
@Disabled
class ConversationsConverterKtTest {
@Test
fun `test get conversations`() {
val data = wit... |
#!/usr/bin/env perl
# {no strict; *{p} = sub { print YAML::Dump(@_) }}
use Markapl;
package MyView;
use Markapl;
sub simple1 {
p {
outs "Let's visit my ";
a(href => "http://example.com") { "Homepage" };
};
}
sub simple2 {
p {
a(href => "http://example.com") { "Homepage" };
... |
package com.example.koakptutorial.data
import retrofit2.Call
import retrofit2.http.GET
import retrofit2.http.Query
interface OpenWeatherMapApi {
@GET("weather")
fun geoCoordinate
(@Query("lat") latitude : String,
@Query("lon") longitude : String
) : Call<Open... |
using System.Data.Entity;
using Parser.Common.Constants.Configuration;
using Parser.Common.Logging.Models;
namespace Parser.Common.Logging
{
public class LoggingServiceDbContext : DbContext, ILoggingServiceDbContext
{
public LoggingServiceDbContext()
: base($"name={ConnectionStrings.Parse... |
cookbook_file "/usr/share/elasticsearch/config/logging.yml" do
source "logging.yml"
owner "elasticsearch"
group "elasticsearch"
mode "0755"
end
|
//
// ========================================================================
// Copyright (c) 1995-2021 Mort Bay Consulting Pty Ltd and others.
//
// This program and the accompanying materials are made available under the
// terms of the Eclipse Public License v. 2.0 which is available at
// https://www.eclipse.org/... |
# Welcome to Scoutify!
Scoutify is a simple Python library for [Spotify Web API](https://developer.spotify.com/documentation/web-api/).
Please make an app from Spotify developer's page first before using this library
and keep in mind that Spotify requires authentication before using their API.
## Installation
Insta... |
package logging
import (
"fmt"
"github.com/go-errors/errors"
"io"
"io/ioutil"
"log"
"strings"
)
const (
Fatal = iota
Error
Warn
Info
Debug
)
type loggerSimple struct {
logger *log.Logger
level int
out io.Writer
}
func NewSimpleLogger(out io.Writer, level int) Logger {
return &loggerSimple{
logg... |
package io.apptik.roxy;
import org.reactivestreams.Processor;
import org.reactivestreams.Publisher;
import org.reactivestreams.Subscriber;
import org.reactivestreams.Subscription;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import static io.apptik.roxy.Roxy.TePolicy.PASS;
import static io.a... |
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Carbon\Carbon;
use GuzzleHttp\Client;
use Guzzle\Http\Exception\ClientErrorResponseException;
class ApiServiceController extends Controller
{
public static function postApi($table, $api_url, $method, $params = null, $token = null){
$c... |
import 'dart:async' show Future;
import 'dart:io' show File;
import 'package:cached_network_image/cached_network_image.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:image_picker/image_picker.dart';
import 'package:tailor_made/constants/mk_colors.dart';
import 'p... |
import 'package:meta/meta.dart';
/// Утилиты работы с датами.
///
/// См. также [Utils].
class DateUtils {
/// Check if [a] and [b] are on the same day.
static bool isSameDay(DateTime a, DateTime b) {
return a.year == b.year && a.month == b.month && a.day == b.day;
}
/// Returns [DateTime] for the beginni... |
import requests
import argparse
import sys
aparse = argparse.ArgumentParser(add_help=False)
aparse.add_argument('-u', '--uri', help='the fbopen elasticsearch index uri')
args = vars(aparse.parse_args())
resp = requests.get("{0}{1}".format(args.get('uri'), '/_cluster/health'))
data = resp.json()
#disabling warning ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.