text
stringlengths
2
14k
meta
dict
from cqlengine import operators from cqlengine.named import NamedKeyspace from cqlengine.operators import EqualsOperator, GreaterThanOrEqualOperator from cqlengine.query import ResultObject from cqlengine.tests.query.test_queryset import BaseQuerySetUsage from cqlengine.tests.base import BaseCassEngTestCase class TestQuerySetOperation(BaseCassEngTestCase): @classmethod def setUpClass(cls): super(TestQuerySetOperation, cls).setUpClass() cls.keyspace = NamedKeyspace('cqlengine_test') cls.table = cls.keyspace.table('test_model') def test_query_filter_parsing(self): """ Tests the queryset filter method parses it's kwargs properly """ query1 = self.table.objects(test_id=5) assert len(query1._where) == 1 op = query1._where[0] assert isinstance(op.operator, operators.EqualsOperator) assert op.value == 5 query2 = query1.filter(expected_result__gte=1) assert len(query2._where) == 2 op = query2._where[1] assert isinstance(op.operator, operators.GreaterThanOrEqualOperator) assert op.value == 1 def test_query_expression_parsing(self): """ Tests that query experessions are evaluated properly """ query1 = self.table.filter(self.table.column('test_id') == 5) assert len(query1._where) == 1 op = query1._where[0] assert isinstance(op.operator, operators.EqualsOperator) assert op.value == 5 query2 = query1.filter(self.table.column('expected_result') >= 1) assert len(query2._where) == 2 op = query2._where[1] assert isinstance(op.operator, operators.GreaterThanOrEqualOperator) assert op.value == 1 def test_filter_method_where_clause_generation(self): """ Tests the where clause creation """ query1 = self.table.objects(test_id=5) self.assertEqual(len(query1._where), 1) where = query1._where[0] self.assertEqual(where.field, 'test_id') self.assertEqual(where.value, 5) query2 = query1.filter(expected_result__gte=1) self.assertEqual(len(query2._where), 2) where = query2._where[0] self.assertEqual(where.field, 'test_id') self.assertIsInstance(where.operator, EqualsOperator) self.assertEqual(where.value, 5) where = query2._where[1] self.assertEqual(where.field, 'expected_result') self.assertIsInstance(where.operator, GreaterThanOrEqualOperator) self.assertEqual(where.value, 1) def test_query_expression_where_clause_generation(self): """ Tests the where clause creation """ query1 = self.table.objects(self.table.column('test_id') == 5) self.assertEqual(len(query1._where), 1) where = query1._where[0] self.assertEqual(where.field, 'test_id') self.assertEqual(where.value, 5) query2 = query1.filter(self.table.column('expected_result') >= 1) self.assertEqual(len(query2._where), 2) where = query2._where[0] self.assertEqual(where.field, 'test_id') self.assertIsInstance(where.operator, EqualsOperator) self.assertEqual(where.value, 5) where = query2._where[1] self.assertEqual(where.field, 'expected_result') self.assertIsInstance(where.operator, GreaterThanOrEqualOperator) self.assertEqual(where.value, 1) class TestQuerySetCountSelectionAndIteration(BaseQuerySetUsage): @classmethod def setUpClass(cls): super(TestQuerySetCountSelectionAndIteration, cls).setUpClass() from cqlengine.tests.query.test_queryset import TestModel ks,tn = TestModel.column_family_name().split('.') cls.keyspace = NamedKeyspace(ks) cls.table = cls.keyspace.table(tn) def test_count(self): """ Tests that adding filtering statements affects the count query as expected """ assert self.table.objects.count() == 12 q = self.table.objects(test_id=0) assert q.count() == 4 def test_query_expression_count(self): """ Tests that adding query statements affects the count query as expected """ assert self.table.objects.count() == 12 q = self.table.objects(self.table.column('test_id') == 0) assert q.count() == 4 def test_iteration(self): """ Tests that iterating over a query set pulls back all of the expected results """ q = self.table.objects(test_id=0) #tuple of expected attempt_id, expected_result values compare_set = set([(0,5), (1,10), (2,15), (3,20)]) for t in q: val = t.attempt_id, t.expected_result assert val in compare_set compare_set.remove(val) assert len(compare_set) == 0 # test with regular filtering q = self.table.objects(attempt_id=3).allow_filtering() assert len(q) == 3 #tuple of expected test_id, expected_result values compare_set = set([(0,20), (1,20), (2,75)]) for t in q: val = t.test_id, t.expected_result assert val in compare_set compare_set.remove(val) assert len(compare_set) == 0 # test with query method q = self.table.objects(self.table.column('attempt_id') == 3).allow_filtering() assert len(q) == 3 #tuple of expected test_id, expected_result values compare_set = set([(0,20), (1,20), (2,75)]) for t in q: val = t.test_id, t.expected_result assert val in compare_set compare_set.remove(val) assert len(compare_set) == 0 def test_multiple_iterations_work_properly(self): """ Tests that iterating over a query set more than once works """ # test with both the filtering method and the query method for q in (self.table.objects(test_id=0), self.table.objects(self.table.column('test_id') == 0)): #tuple of expected attempt_id, expected_result values compare_set = set([(0,5), (1,10), (2,15), (3,20)]) for t in q: val = t.attempt_id, t.expected_result assert val in compare_set compare_set.remove(val) assert len(compare_set) == 0 #try it again compare_set = set([(0,5), (1,10), (2,15), (3,20)]) for t in q: val = t.attempt_id, t.expected_result assert val in compare_set compare_set.remove(val) assert len(compare_set) == 0 def test_multiple_iterators_are_isolated(self): """ tests that the use of one iterator does not affect the behavior of another """ for q in (self.table.objects(test_id=0), self.table.objects(self.table.column('test_id') == 0)): q = q.order_by('attempt_id') expected_order = [0,1,2,3] iter1 = iter(q) iter2 = iter(q) for attempt_id in expected_order: assert next(iter1).
{ "pile_set_name": "Github" }
import {get,post} from './request'; //登陆 export const login= (login)=>post('/api/post/user/login',login) //上传 export const upload=(upload)=>get('/api/get/upload',upload)
{ "pile_set_name": "Github" }
<template> <div class="celebrity-list"> <ul> <li class="celebrity-item" v-for="item in celebrities" @click="selectItem(item.id,$event)"> <div class="image"> <img v-lazy="item.image" class="" height="100" width="70"> </div> <div class="desc"> <p class="title">{{item.name}}</p> <div class="works">代表作: {{item.works}}</div> </div> </li> </ul> </div> </template> <script type="text/ecmascript-6"> export default { props: { celebrities: { type: Array, default: [] } }, methods: { selectItem(id) { this.$emit('select', id); } } }; </script> <style scoped lang="stylus" rel="stylesheet/stylus"> @import "../../common/stylus/variable.styl" @import "../../common/stylus/mixin.styl" .celebrity-item display: flex align-items: top box-sizing: border-box height: 130px padding: 15px border-bottom-1px($color-line) background: $color-background .image flex: 70px 0 0 margin-right: 10px .desc flex: 1 box-sizing: border-box .title font-size: $font-size-medium-x color: $color-text-f .works margin-top: 10px font-size: $font-size-medium line-height: 20px </style>
{ "pile_set_name": "Github" }
# Blender MTL File: 'None' # Material Count: 1 newmtl Standard Ns 96.078431 Ka 0.000000 0.000000 0.000000 Kd 0.690196 0.690196 0.690196 Ks 0.012549 0.012549 0.012549 Ni 1.000000 d 1.000000 illum 2 map_Kd grid_fabric.jpg
{ "pile_set_name": "Github" }
activeContentFilterList=*.makefile,makefile,*.Makefile,Makefile,Makefile.*,*.mk,MANIFEST.MF addNewLine=true convertActionOnSaave=AnyEdit.CnvrtSpacesToTabs eclipse.preferences.version=1 ignoreBlankLinesWhenTrimming=false inActiveContentFilterList= javaTabWidthForJava=true org.eclipse.jdt.ui.editor.tab.width=2 projectPropsEnabled=true removeTrailingSpaces=true replaceAllSpaces=false replaceAllTabs=false saveAndAddLine=false saveAndConvert=true saveAndTrim=true useModulo4Tabs=false
{ "pile_set_name": "Github" }
/* Soot - a J*va Optimization Framework * Copyright (C) 1997-1999 Raja Vallee-Rai * * This library 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 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ /* * Modified by the Sable Research Group and others 1997-1999. * See the 'credits' file distributed with Soot for the complete list of * contributors. (Soot is distributed at http://www.sable.mcgill.ca/soot) */ package soot.jimple; import soot.*; import soot.util.*; public interface CastExpr extends Expr { public Value getOp(); public void setOp(Value op); public ValueBox getOpBox(); public Type getCastType(); public void setCastType(Type castType); public Type getType(); public void apply(Switch sw); }
{ "pile_set_name": "Github" }
/* This file is part of the OWL API. * The contents of this file are subject to the LGPL License, Version 3.0. * Copyright 2014, The University of Manchester * * 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 License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. * * Alternatively, the contents of this file may be used under the terms of the Apache License, Version 2.0 in which case, the provisions of the Apache License Version 2.0 are applicable instead of those above. * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package org.semanticweb.owlapi.io; import static org.semanticweb.owlapi.util.OWLAPIPreconditions.checkNotNull; import static org.semanticweb.owlapi.util.OWLAPIPreconditions.emptyOptional; import static org.semanticweb.owlapi.util.OWLAPIPreconditions.optional; import java.io.BufferedOutputStream; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStream; import java.io.Writer; import java.util.Optional; import org.semanticweb.owlapi.model.IRI; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * An {@code OWLOntologyDocumentTarget} that supports writing out to a * {@code File}. * * @author Matthew Horridge, The University of Manchester, Bio-Health Informatics Group * @since 3.2.0 */ public class FileDocumentTarget implements OWLOntologyDocumentTarget { private static final Logger LOGGER = LoggerFactory.getLogger(FileDocumentTarget.class); private final File file; /** * Constructs the document target, with the target being the specified file. * * @param file The file that is the target. */ public FileDocumentTarget(File file) { this.file = checkNotNull(file, "file cannot be null"); } @Override public Optional<Writer> getWriter() { try { return optional(new BufferedWriter(new FileWriter(file))); } catch (IOException e) { LOGGER.error("Writer cannot be created", e); return emptyOptional(); } } @Override public Optional<OutputStream> getOutputStream() { try { return optional(new BufferedOutputStream(new FileOutputStream(file))); } catch (IOException e) { LOGGER.error("Input stream cannot be created", e); return emptyOptional(); } } @Override public Optional<IRI> getDocumentIRI() { return optional(IRI.create(file)); } }
{ "pile_set_name": "Github" }
// Learn more about F# at http://fsharp.net // See the 'F# Tutorial' project for more help. open ServiceStack.Common open ServiceStack.WebHost.Endpoints open ServiceStack.Logging open ServiceStack.Logging.Support.Logging open HelloService open System type AppHost() = inherit AppHostHttpListenerBase("Hello F# Service", typeof<HelloService>.Assembly) override this.Configure container = ignore() [<EntryPoint>] let main argv = LogManager.LogFactory <- new ConsoleLogFactory() printfn "%A" argv let host = "http://localhost:8080/" printfn "listening on %s ..." host let appHost = new AppHost() appHost.Init() appHost.Start host while true do Console.ReadLine() |> ignore 0 // return an integer exit code
{ "pile_set_name": "Github" }
export interface Size { width: number; height: number; };
{ "pile_set_name": "Github" }
'use strict'; module.exports = function(Chart) { Chart.Radar = function(context, config) { config.type = 'radar'; return new Chart(context, config); }; };
{ "pile_set_name": "Github" }
$NetBSD: patch-Rakefile,v 1.3 2017/06/05 16:06:57 taca Exp $ * Require modern task rule from rdoc. * Drop task for release. --- Rakefile.orig 2007-03-23 11:32:09.000000000 +0000 +++ Rakefile @@ -1,13 +1,11 @@ require "rbconfig" require "rake/clean" require "rake/testtask" -require "rake/rdoctask" +require "rdoc/task" require "rake/packagetask" -require "rake/contrib/compositepublisher" -require "rake/contrib/sshpublisher" -require "rake/configuretask" -require "rake/extensiontask" +require_relative "rake/configuretask" +require_relative "rake/extensiontask" PKG_NAME = "ruby-eet" PKG_VERSION = File.read("lib/eet.rb"). @@ -43,6 +41,9 @@ task :pre_ext => [:configure] do cflags = [ ext.env[:cflags], + "-I#{RbConfig::CONFIG["rubyhdrdir"]}", + "-I#{RbConfig::CONFIG["rubyhdrdir"]}/ruby", + "-I#{RbConfig::CONFIG["rubyhdrdir"]}/#{RbConfig::CONFIG["arch"]}", config.eet.cflags ] @@ -52,11 +53,11 @@ end task :install => [:ext] do |t| destdir = ENV["DESTDIR"] || "" - ddir = destdir + Config::CONFIG["sitearchdir"] + ddir = destdir + RbConfig::CONFIG["sitearchdir"] FileUtils::Verbose.mkdir_p(ddir) unless File.directory?(ddir) FileUtils::Verbose.install(ext.lib_name, ddir, :mode => 0755) - ddir = destdir + Config::CONFIG["sitelibdir"] + ddir = destdir + RbConfig::CONFIG["sitelibdir"] FileUtils::Verbose.mkdir_p(ddir) unless File.directory?(ddir) FileUtils::Verbose.install("lib/eet.rb", ddir, :mode => 0644) end @@ -87,14 +88,3 @@ Rake::PackageTask.new(PKG_NAME, PKG_VERS t.need_tar_gz = true t.package_files = PKG_FILES end - -task :publish => [:rdoc, :package] do - p = Rake::CompositePublisher.new - p.add(Rake::SshFreshDirPublisher.new("code-monkey.de", - "public_docs/" + - PKG_NAME, "doc")) - p.add(Rake::SshFilePublisher.new("code-monkey.de", - ".", "pkg", - "#{PKG_NAME}-#{PKG_VERSION}.tar.gz")) - p.upload -end
{ "pile_set_name": "Github" }
#Updated at Fri Sep 21 12:24:06 EDT 2012 #Fri Sep 21 12:24:06 EDT 2012 application_version=1.0 com.jd.survey.domain.settings.department_label=Dipartimento com.jd.survey.domain.settings.department_label_short=Dipartimento com.jd.survey.domain.settings.department_label_plural=Dipartimenti com.jd.survey.domain.settings.department.id_label=ID com.jd.survey.domain.settings.department.version_label=Versione com.jd.survey.domain.settings.department.name_label=Nome com.jd.survey.domain.settings.department.description_label=Descrizione com.jd.survey.domain.settings.department.surveys_label=Nome sondaggio com.jd.survey.domain.settings.department_menu=Dipartimenti com.jd.survey.domain.settings.department_list_menu=Dipartimenti com.jd.survey.domain.settings.department_new_menu=Dipartimento com.jd.survey.domain.settings.department.surveydefinition.name_label=Nome della definizione di sondaggio com.jd.survey.domain.settings.department.surveydefinition.file_label=File di definizione di sondaggio #-------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------- com.jd.survey.domain.settings.surveydefinition_label=Sondaggio com.jd.survey.domain.settings.surveydefinition_label_short=Sondaggio com.jd.survey.domain.settings.surveydefinition_label_plural=Sondaggi com.jd.survey.domain.settings.surveydefinition.id_label=ID com.jd.survey.domain.settings.surveydefinition.version_label=Versione com.jd.survey.domain.settings.surveydefinition.name_label=Nome com.jd.survey.domain.settings.surveydefinition.logo_label=Immagine del logo com.jd.survey.domain.settings.surveydefinition.description_label=Descrizione com.jd.survey.domain.settings.surveydefinition.department_label=Nome del reparto com.jd.survey.domain.settings.surveydefinition.pages_label=Pagine com.jd.survey.domain.settings.surveydefinition_menu=Sondaggi com.jd.survey.domain.settings.surveydefinition_list_menu=Sondaggi com.jd.survey.domain.settings.surveydefinition_new_menu=Sondaggio com.jd.survey.domain.settings.surveydefinition.ispublic_label=Disponibile al pubblico com.jd.survey.domain.settings.surveydefinition.status_label=Status com.jd.survey.domain.settings.surveydefinition.allowmultiplesubmissions_label=Permettono molte osservazioni com.jd.survey.domain.settings.surveydefinition.isavailabletopublic_label=Public com.jd.survey.domain.settings.surveydefinition.surveytheme_label=Tema com.jd.survey.domain.settings.surveydefinition.emailinvitationtemplate_label=Modello invito e-mail com.jd.survey.domain.settings.surveydefinition.completedsurveytemplate_label=Sondaggio completato template\t\t #-------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------- com.jd.survey.domain.settings.questionoption_label=Opzione di domanda com.jd.survey.domain.settings.questionoption_label_short=Opzione di domanda com.jd.survey.domain.settings.questionoption_label_plural=Opzioni di interrogazione com.jd.survey.domain.settings.questionoption.id_label=ID com.jd.survey.domain.settings.questionoption.version_label=Versione com.jd.survey.domain.settings.questionoption.order_label=Elemento ordine com.jd.survey.domain.settings.questionoption.value_label=Valore dell'elemento com.jd.survey.domain.settings.questionoption.value_tip=Immettere un massimo di 3 personaggi qui com.jd.survey.domain.settings.questionoption.text_label=Testo di un elemento com.jd.survey.domain.settings.questionoption.question_label=Domanda com.jd.survey.domain.settings.questionoption_menu=Opzioni di interrogazione com.jd.survey.domain.settings.questionoption_list_menu=Opzioni di interrogazione com.jd.survey.domain.settings.questionoption_new_menu=Opzione di domanda #-------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------- com.jd.survey.domain.settings.questionrowlabel_label=Etichetta di riga com.jd.survey.domain.settings.questionrowlabel_label_short=Etichetta di riga com.jd.survey.domain.settings.questionrowlabel_label_plural=Etichette di riga com.jd.survey.domain.settings.questionrowlabel.id_label=ID com.jd.survey.domain.settings.questionrowlabel.version_label=Versione com.jd.survey.domain.settings.questionrowlabel.order_label=Ordine delle righe com.jd.survey.domain.settings.questionrowlabel.label_tip=Immettere un massimo di 75 caratteri qui com.jd.survey.domain.settings.questionrowlabel.label_label=Etichetta di riga com.jd.survey.domain.settings.questionrowlabel.question_label=Domanda #-------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------- com.jd.survey.domain.settings.questioncolumnlabel_label=Etichetta di colonna com.jd.survey.domain.settings.questioncolumnlabel_label_short=Etichetta di colonna com.jd.survey.domain.settings.questioncolumnlabel_label_plural=Etichette di colonna com.jd.survey.domain.settings.questioncolumnlabel.id_label=ID com.jd.survey.domain.settings.questioncolumnlabel.version_label=Versione com.jd.survey.domain.settings.questioncolumnlabel.order_label=Ordine delle colonne com.jd.survey.domain.settings.questioncolumnlabel.label_tip=Immettere un massimo di 75 caratteri qui com.jd.survey.domain.settings.questioncolumnlabel.label_label=Etichetta di colonna com.jd.survey.domain.settings.questioncolumnlabel.question_label=Domanda #-------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------- com.jd.survey.domain.settings.surveydefinitionpage_label=Pagina sondaggio com.jd.survey.domain.settings.surveydefinitionpage_label_short=Pagina com.jd.survey.domain.settings.surveydefinitionpage_label_plural=Pagine di indagine com.jd.survey.domain.settings.surveydefinitionpage.id_label=ID com.jd.survey.domain.settings.surveydefinitionpage.version_label=Versione com.jd.survey.domain.settings.surveydefinitionpage.instructions_label=Istruzioni com.jd.survey.domain.settings.surveydefinitionpage.order_label=Ordine com.jd.survey.domain.settings.surveydefinitionpage.title_label=Titolo com.jd.survey.domain.settings.surveydefinitionpage.department.name_label=Nome del reparto com.jd.survey.domain.settings.surveydefinitionpage.surveydefinition.name_label=Nome sondaggio com.jd.survey.domain.settings.surveydefinitionpage.surveydefinition.description_label=Sondaggio Descrizione com.jd.survey.domain.settings.surveydefinitionpage.questions_label=Domande com.jd.survey.domain.settings.surveydefinitionpage.visibilityexpression_tip=MVEL espressione che restituisce true o false. utilizzare questo per ramificazione avanzato e che si biforcano. com.jd.survey.domain.settings.surveydefinitionpage.visibilityexpression_label=Espressione di visibilità
{ "pile_set_name": "Github" }
# normalize-url [![Build Status](https://travis-ci.org/sindresorhus/normalize-url.svg?branch=master)](https://travis-ci.org/sindresorhus/normalize-url) > [Normalize](http://en.wikipedia.org/wiki/URL_normalization) a URL Useful when you need to display, store, deduplicate, sort, compare, etc, URLs. ## Install ``` $ npm install --save normalize-url ``` ## Usage ```js const normalizeUrl = require('normalize-url'); normalizeUrl('sindresorhus.com'); //=> 'http://sindresorhus.com' normalizeUrl('HTTP://xn--xample-hva.com:80/?b=bar&a=foo'); //=> 'http://êxample.com/?a=foo&b=bar' ``` ## API ### normalizeUrl(url, [options]) #### url Type: `String` URL to normalize. #### options ##### normalizeProtocol Type: `Boolean`<br> Default: `true` Prepend `http:` to the URL if it's protocol-relative. ```js normalizeUrl('//sindresorhus.com:80/'); //=> 'http://sindresorhus.com' normalizeUrl('//sindresorhus.com:80/', {normalizeProtocol: false}); //=> '//sindresorhus.com' ``` ##### stripFragment Type: `Boolean`<br> Default: `true` Remove the fragment at the end of the URL. ```js normalizeUrl('sindresorhus.com/about.html#contact'); //=> 'http://sindresorhus.com/about.html' normalizeUrl('sindresorhus.com/about.html#contact', {stripFragment: false}); //=> 'http://sindresorhus.com/about.html#contact' ``` ##### stripWWW Type: `Boolean`<br> Default: `true` Remove `www.` from the URL. ```js normalizeUrl('http://www.sindresorhus.com/about.html#contact'); //=> 'http://sindresorhus.com/about.html#contact' normalizeUrl('http://www.sindresorhus.com/about.html#contact', {stripWWW: false}); //=> 'http://www.sindresorhus.com/about.html#contact' ``` ##### removeQueryParameters Type: `Array<RegExp|String>`<br> Default: `[/^utm_\w+/i]` Remove query parameters that matches any of the provided strings or regexes. ```js normalizeUrl('www.sindresorhus.com?foo=bar&ref=test_ref', { ignoredQueryParameters: ['ref'] }); //=> 'http://sindresorhus.com/?foo=bar' ``` ## Related - [compare-urls](https://github.com/sindresorhus/compare-urls) - Compare URLs by first normalizing them ## License MIT © [Sindre Sorhus](https://sindresorhus.com)
{ "pile_set_name": "Github" }
# Lines starting with '#' and sections without content # are not displayed by a call to 'details' # [Website] http://news.inews24.com/php/news_view.php?g_menu=020800&g_serial=659627 [filters] http://news.inews24.com/php/ad/rolling/ifr_right_jshopbox_k123.php http://news.inews24.com/php/ad/rolling/news/news_260_1th.html http://news.inews24.com/php/ad/rolling/news/news_260_2nd.html http://www.inews24.com/images/adpresso/446.gif [other] # Any other details [comments] fanboy
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <!-- * Scicos * * Copyright (C) INRIA - METALAU Project <scicos@inria.fr> (HTML version) * Copyright (C) DIGITEO - Scilab Consortium (XML Docbook version) * * 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 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * See the file ./license.txt --> <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="GENERAL_f" xml:lang="en_US"> <refnamediv> <refname>GENERAL_f</refname> <refpurpose>GENERAL_f title</refpurpose> </refnamediv> <refsection> <title>Block Screenshot</title> <inlinemediaobject> <imageobject> <imagedata fileref="../../../../images/palettes/GENERAL_f.png" align="center"/> </imageobject> </inlinemediaobject> </refsection> <refsection id="Contents_GENERAL_f"> <title>Contents</title> <itemizedlist> <listitem> <xref linkend="Description_GENERAL_f">Description</xref> </listitem> <listitem> <xref linkend="Dialogbox_GENERAL_f">Parameters</xref> </listitem> <listitem> <xref linkend="Defaultproperties_GENERAL_f">Default properties</xref> </listitem> <listitem> <xref linkend="Interfacingfunction_GENERAL_f">Interfacing function</xref> </listitem> <listitem> <xref linkend="Computationalfunction_GENERAL_f">Computational function</xref> </listitem> </itemizedlist> </refsection> <refsection id="Description_GENERAL_f"> <title>Description</title> <para> Add here a paragraph of the function description </para> </refsection> <refsection id="Dialogbox_GENERAL_f"> <title>Parameters</title> <inlinemediaobject> <imageobject> <imagedata fileref="../../../../images/gui/GENERAL_f_gui.gif" align="center" style="float:right"/> <!-- align => Javahelp, style => Online -->/> </imageobject> </inlinemediaobject> <itemizedlist> <listitem> <para> <emphasis role="bold">Input size</emphasis> </para> <para> The parameter description 1.</para> <para> Properties : Type 'vec' of size 1. </para> </listitem> <listitem> <para> <emphasis role="bold">Number of event output</emphasis> </para> <para> The parameter description 2.</para> <para> Properties : Type 'vec' of size 1.</para> </listitem> </itemizedlist> </refsection> <refsection id="Defaultproperties_GENERAL_f"> <title>Default properties</title> <itemizedlist> <listitem> <para> <emphasis role="bold">always active:</emphasis> no </para> </listitem> <listitem> <para> <emphasis role="bold">direct-feedthrough:</emphasis> yes </para> </listitem> <listitem> <para> <emphasis role="bold">zero-crossing:</emphasis> yes </para> </listitem> <listitem> <para> <emphasis role="bold">mode:</emphasis> no </para> </listitem> <listitem> <para> <emphasis role="bold">regular inputs:</emphasis> </para> <para> <emphasis role="bold">- port 1 : size [1,1] / type 1</emphasis> </para> </listitem> <listitem> <para> <emphasis role="bold">number/sizes of activation inputs:</emphasis> 0 </para> </listitem> <listitem> <para> <emphasis role="bold">number/sizes of activation outputs:</emphasis> 1 </para> </listitem> <listitem> <para> <emphasis role="bold">continuous-time state:</emphasis> no </para> </listitem> <listitem> <para> <emphasis role="bold">discrete-time state:</emphasis> no </para> </listitem> <listitem> <para> <emphasis role="bold">object discrete-time state:</emphasis> no </para> </listitem> <listitem> <para> <emphasis role="bold">name of computational function:</emphasis> <emphasis role="italic">zcross</emphasis> </para> </listitem> </itemizedlist> <para/> </refsection> <refsection id="Interfacingfunction_GENERAL_f"> <title>Interfacing function</title> <itemizedlist> <listitem> <para> SCI/modules/scicos_blocks/macros/Threshold/GENERAL_f.sci</para> </listitem> </itemizedlist> </refsection> <refsection id="Computationalfunction_GENERAL_f"> <title>Computational function</title> <itemizedlist> <listitem> <para> SCI/modules/scicos_blocks/src/fortran/zcross.f (Type 1)</para> </listitem> </itemizedlist> </refsection> </refentry>
{ "pile_set_name": "Github" }
// Copyright 2010 Todd Ditchendorf // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #import "TDJsonParserTest.h" #import "TDJsonParser.h" #import "TDFastJsonParser.h" @implementation TDJsonParserTest - (void)setUp { p = (TDJsonParser *)[TDJsonParser parser]; } - (void)testForAppleBossResultTokenization { NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"apple-boss" ofType:@"json"]; s = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; PKTokenizer *t = [[[PKTokenizer alloc] initWithString:s] autorelease]; PKToken *eof = [PKToken EOFToken]; PKToken *tok = nil; while (eof != (tok = [t nextToken])) { //NSLog(@"tok: %@", tok); } } - (void)testForAppleBossResult { NSString *path = [[NSBundle bundleForClass:[self class]] pathForResource:@"apple-boss" ofType:@"json"]; s = [NSString stringWithContentsOfFile:path encoding:NSUTF8StringEncoding error:nil]; @try { result = [p parse:s]; } @catch (NSException *e) { //NSLog(@"\n\n\nexception:\n\n %@", [e reason]); } //NSLog(@"result %@", result); } - (void)testEmptyString { s = @""; a = [PKTokenAssembly assemblyWithString:s]; result = [p bestMatchFor:a]; TDNil(result); } - (void)testNum { s = @"456"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p numberParser] bestMatchFor:a]; TDNotNil(result); TDEqualObjects(@"[456]456^", [result description]); id obj = [result pop]; TDNotNil(obj); TDEqualObjects([NSNumber numberWithFloat:456], obj); s = @"-3.47"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p numberParser] bestMatchFor:a]; TDNotNil(result); TDEqualObjects(@"[-3.47]-3.47^", [result description]); obj = [result pop]; TDNotNil(obj); TDEqualObjects([NSNumber numberWithFloat:-3.47], obj); } - (void)testString { s = @"'foobar'"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p stringParser] bestMatchFor:a]; TDNotNil(result); TDEqualObjects(@"[foobar]'foobar'^", [result description]); id obj = [result pop]; TDNotNil(obj); TDEqualObjects(@"foobar", obj); s = @"\"baz boo boo\""; a = [PKTokenAssembly assemblyWithString:s]; result = [[p stringParser] bestMatchFor:a]; TDNotNil(result); TDEqualObjects(@"[baz boo boo]\"baz boo boo\"^", [result description]); obj = [result pop]; TDNotNil(obj); TDEqualObjects(@"baz boo boo", obj); } - (void)testBoolean { s = @"true"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p booleanParser] bestMatchFor:a]; TDNotNil(result); TDEqualObjects(@"[1]true^", [result description]); id obj = [result pop]; TDNotNil(obj); TDEqualObjects([NSNumber numberWithBool:YES], obj); s = @"false"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p booleanParser] bestMatchFor:a]; TDNotNil(result); TDEqualObjects(@"[0]false^", [result description]); obj = [result pop]; TDNotNil(obj); TDEqualObjects([NSNumber numberWithBool:NO], obj); } - (void)testArray { s = @"[1, 2, 3]"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p arrayParser] bestMatchFor:a]; // NSLog(@"result: %@", result); TDNotNil(result); id obj = [result pop]; TDEquals((int)3, (int)[obj count]); TDEqualObjects([NSNumber numberWithInteger:1], [obj objectAtIndex:0]); TDEqualObjects([NSNumber numberWithInteger:2], [obj objectAtIndex:1]); TDEqualObjects([NSNumber numberWithInteger:3], [obj objectAtIndex:2]); TDEqualObjects(@"[][/1/,/2/,/3/]^", [result description]); s = @"[true, 'garlic jazz!', .888]"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p arrayParser] bestMatchFor:a]; TDNotNil(result); //TDEqualObjects(@"[true, 'garlic jazz!', .888]true/'garlic jazz!'/.888^", [result description]); obj = [result pop]; TDEqualObjects([NSNumber numberWithBool:YES], [obj objectAtIndex:0]); TDEqualObjects(@"garlic jazz!", [obj objectAtIndex:1]); TDEqualObjects([NSNumber numberWithFloat:.888], [obj objectAtIndex:2]); s = @"[1, [2, [3, 4]]]"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p arrayParser] bestMatchFor:a]; TDNotNil(result); //NSLog(@"result: %@", [a stack]); TDEqualObjects([NSNumber numberWithInteger:1], [obj objectAtIndex:0]); } - (void)testObject { s = @"{'key': 'value'}"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p objectParser] bestMatchFor:a]; TDNotNil(result); id obj = [result pop]; TDEqualObjects([obj objectForKey:@"key"], @"value"); s = @"{'foo': false, 'bar': true, \"baz\": -9.457}"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p objectParser] bestMatchFor:a]; TDNotNil(result); obj = [result pop]; TDEqualObjects([obj objectForKey:@"foo"], [NSNumber numberWithBool:NO]); TDEqualObjects([obj objectForKey:@"bar"], [NSNumber numberWithBool:YES]); TDEqualObjects([obj objectForKey:@"baz"], [NSNumber numberWithFloat:-9.457]); s = @"{'baz': {'foo': [1,2]}}"; a = [PKTokenAssembly assemblyWithString:s]; result = [[p objectParser] bestMatchFor:a]; TDNotNil(result); obj = [result pop]; NSDictionary *dict = [obj objectForKey:@"baz"]; TDTrue([dict isKindOfClass:[NSDictionary class]]); NSArray *arr = [dict objectForKey:@"foo"]; TDTrue([arr isKindOfClass:[NSArray class]]); TDEqualObjects([NSNumber numberWithInteger:1], [arr objectAtIndex:0]); // TDEqualObjects(@"['baz', 'foo', 1, 2]'baz'/'foo'/1/2^", [result description]); } - (
{ "pile_set_name": "Github" }
/*- * Copyright (c) 1990, 1993 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by * the Systems Programming Group of the University of Utah Computer * Science Department. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #if defined(LIBC_SCCS) && !defined(lint) .asciz "@(#)divsi3.s 8.1 (Berkeley) 6/4/93" #endif /* LIBC_SCCS and not lint */ #include "DEFS.h" /* int / int */ ENTRY(__divsi3) movel sp@(4),d0 divsl sp@(8),d0 rts
{ "pile_set_name": "Github" }
[wheel] universal = 0
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" ?> <routes xmlns="http://symfony.com/schema/routing" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/routing https://symfony.com/schema/routing/routing-1.0.xsd"> <route id="localized"> <default key="_controller">MyBundle:Blog:show</default> <path locale="en">/path</path> <path locale="fr">/route</path> </route> </routes>
{ "pile_set_name": "Github" }
Content-language: cs Content-type: text/html; charset=UTF-8 Body:----------cs-- <!--#set var="CONTENT_LANGUAGE" value="cs" --><!--#set var="TITLE" value="Varianta má sama více variant!" --><!--#include virtual="include/top.html" --> Varianta požadované entity má sama více variant. Přístup není možný. <!--#include virtual="include/bottom.html" --> ----------cs-- Content-language: de Content-type: text/html; charset=UTF-8 Body:----------de-- <!--#set var="CONTENT_LANGUAGE" value="de" --><!--#set var="TITLE" value="Variante ebenfalls ver&auml;nderlich!" --><!--#include virtual="include/top.html" --> Ein Zugriff auf das angeforderte Objekt bzw. einer Variante dieses Objektes ist nicht m&ouml;glich, da es ebenfalls ein variables Objekt darstellt. <!--#include virtual="include/bottom.html" --> ----------de-- Content-language: en Content-type: text/html; charset=UTF-8 Body:----------en-- <!--#set var="TITLE" value="Variant also varies!" --><!--#include virtual="include/top.html" --> A variant for the requested entity is itself a negotiable resource. Access not possible. <!--#include virtual="include/bottom.html" --> ----------en-- Content-language: es Content-type: text/html Body:----------es-- <!--#set var="TITLE" value="La variante tambi&eacute;n varia!" --> <!--#include virtual="include/top.html" --> Una variante de la entidad solicitada es por si misma un recurso negociable. No es posible tener acceso a la entidad. <!--#include virtual="include/bottom.html" --> ----------es-- Content-language: fr Content-type: text/html; charset=UTF-8 Body:----------fr-- <!--#set var="CONTENT_LANGUAGE" value="fr" --><!--#set var="TITLE" value="La variante varie elle-m&ecirc;me!" --><!--#include virtual="include/top.html" --> Une variante pour l'entit&eacute; demand&eacute;e est elle-m&ecirc;me une ressource n&eacute;gociable. L'acc&egrave;s est impossible. <!--#include virtual="include/bottom.html" --> ----------fr-- Content-language: ga Content-type: text/html; charset=UTF-8 Body:----------ga-- <!--#set var="TITLE" value="Athraitheach intr&aacute;chta!" --><!--#include virtual="include/top.html" --> Is &eacute; ceann de na athraitha&iacute; don aon&aacute;n iarraithe acmhainn intr&aacute;chta f&eacute;in. Rochtain dodh&eacute;anta. <!--#include virtual="include/bottom.html" --> ----------ga-- Content-language: it Content-type: text/html; charset=UTF-8 Body:----------it-- <!--#set var="CONTENT_LANGUAGE" value="it" --><!--#set var="TITLE" value="La versione variante varia essa stessa!" --><!--#include virtual="include/top.html" --> Non &egrave; possibile accedere all'entit&agrave; richiesta perch&eacute; &egrave; essa stessa una risorsa negoziabile. <!--#include virtual="include/bottom.html" --> ----------it-- Content-language: ja Content-type: text/html; charset=UTF-8 Body:----------ja-- <!--#set var="CONTENT_LANGUAGE" value="ja" --><!--#set var="TITLE" value="Variant also varies!" --><!--#include virtual="include/top.html" --> リクエストされたものの variant はそれ自体もまた、ネゴシエーション可能なリソースです。 アクセスできませんでした。 <!--#include virtual="include/bottom.html" --> ----------ja-- Content-language: ko Content-type: text/html; charset=UTF-8 Body:----------ko-- <!--#set var="CONTENT_LANGUAGE" value="ko" --><!--#set var="TITLE" value="형태를 결정할 수 없음!" --><!--#include virtual="include/top.html" --> 요청한 객체의 형태 또한 여러 형태를 가지고 있어서 접근이 불가능합니다. <!--#include virtual="include/bottom.html" --> ----------ko-- Content-language: nl Content-type: text/html; charset=UTF-8 Body:----------nl-- <!--#set var="CONTENT_LANGUAGE" value="nl" --><!--#set var="TITLE" value="Variant varieert ook!" --><!--#include virtual="include/top.html" --> Een variant van het gevraagde object is op zich ook een te onderhandelen variant. Toegang is niet mogelijk. <!--#include virtual="include/bottom.html" --> ----------nl-- Content-language: nb Content-type: text/html; charset=UTF-8 Body:----------nb-- <!--#set var="CONTENT_LANGUAGE" value="nb" --><!--#set var="TITLE" value="Variant varierer også!" --><!--#include virtual="include/top.html" --> En variant av den forespurte enheten er i seg selv en forhandelbar ressurs. Tilgang ikke mulig. <!--#include virtual="include/bottom.html" --> ----------nb-- Content-language: pl Content-type: text/html; charset=UTF-8 Body:----------pl-- <!--#set var="CONTENT_LANGUAGE" value="pl" --><!--#set var="TITLE" value="Wariant jest wariantowy!" --><!--#include virtual="include/top.html" --> Wariant &#380;&#261;danego zasobu jest r&#243;wnie&#380; zasobem negocjowalnym. Dost&#281;p jest niemo&#380;liwy. <!--#include virtual="include/bottom.html" --> ----------pl-- Content-language: pt-br Content-type: text/html; charset=UTF-8 Body:-------pt-br-- <!--#set var="CONTENT_LANGUAGE" value="pt-br" --><!--#set var="TITLE" value="Variante auto-negoci&aacute;vel!" --><!--#include virtual="include/top.html" --> Uma variante da entidade de requisi&ccedil;&atilde;o &eacute; por si mesma um recurso negoci&aacute;vel. Acesso n&atilde;o &eacute; poss&iacute;vel. <!--#include virtual="include/bottom.html" --> -------pt-br-- Content-language: pt Content-type: text/html; charset=ISO-8859-1 Body:----------pt-- <!--#set var="TITLE" value="Variante tamb&eacute;m varia!" --><!--#include virtual="include/top.html" --> A variante relativa &agrave; entidade pedida &eacute; ela mesma um recurso negoci&aacute;vel. N&atilde;o &eacute; poss&iacute;vel ter acesso. <!--#include virtual="include/bottom.html" --> ----------pt-- Content-language: ro Content-type: text/html; charset=UTF-8 Body:----------ro-- <!--
{ "pile_set_name": "Github" }
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % This file is part of VivoMind Prolog Unicode Resources % % VivoMind Prolog Unicode Resources is free software distributed using the % Creative Commons CC0 1.0 Universal (CC0 1.0) - Public Domain Dedication % license % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Last modified: March 13, 2012 unicode_name(0x0024, 'DOLLAR SIGN'). unicode_name(0x00A2, 'CENT SIGN'). unicode_name(0x00A3, 'POUND SIGN'). unicode_name(0x00A4, 'CURRENCY SIGN'). unicode_name(0x00A5, 'YEN SIGN'). unicode_name(0x058F, 'ARMENIAN DRAM SIGN'). unicode_name(0x060B, 'AFGHANI SIGN'). unicode_name(0x09F2, 'BENGALI RUPEE MARK'). unicode_name(0x09F3, 'BENGALI RUPEE SIGN'). unicode_name(0x09FB, 'BENGALI GANDA MARK'). unicode_name(0x0AF1, 'GUJARATI RUPEE SIGN'). unicode_name(0x0BF9, 'TAMIL RUPEE SIGN'). unicode_name(0x0E3F, 'THAI CURRENCY SYMBOL BAHT'). unicode_name(0x17DB, 'KHMER CURRENCY SYMBOL RIEL'). unicode_name(0x20A0, 'EURO-CURRENCY SIGN'). unicode_name(0x20A1, 'COLON SIGN'). unicode_name(0x20A2, 'CRUZEIRO SIGN'). unicode_name(0x20A3, 'FRENCH FRANC SIGN'). unicode_name(0x20A4, 'LIRA SIGN'). unicode_name(0x20A5, 'MILL SIGN'). unicode_name(0x20A6, 'NAIRA SIGN'). unicode_name(0x20A7, 'PESETA SIGN'). unicode_name(0x20A8, 'RUPEE SIGN'). unicode_name(0x20A9, 'WON SIGN'). unicode_name(0x20AA, 'NEW SHEQEL SIGN'). unicode_name(0x20AB, 'DONG SIGN'). unicode_name(0x20AC, 'EURO SIGN'). unicode_name(0x20AD, 'KIP SIGN'). unicode_name(0x20AE, 'TUGRIK SIGN'). unicode_name(0x20AF, 'DRACHMA SIGN'). unicode_name(0x20B0, 'GERMAN PENNY SIGN'). unicode_name(0x20B1, 'PESO SIGN'). unicode_name(0x20B2, 'GUARANI SIGN'). unicode_name(0x20B3, 'AUSTRAL SIGN'). unicode_name(0x20B4, 'HRYVNIA SIGN'). unicode_name(0x20B5, 'CEDI SIGN'). unicode_name(0x20B6, 'LIVRE TOURNOIS SIGN'). unicode_name(0x20B7, 'SPESMILO SIGN'). unicode_name(0x20B8, 'TENGE SIGN'). unicode_name(0x20B9, 'INDIAN RUPEE SIGN'). unicode_name(0x20BA, 'TURKISH LIRA SIGN'). unicode_name(0xA838, 'NORTH INDIC RUPEE MARK'). unicode_name(0xFDFC, 'RIAL SIGN'). unicode_name(0xFE69, 'SMALL DOLLAR SIGN'). unicode_name(0xFF04, 'FULLWIDTH DOLLAR SIGN'). unicode_name(0xFFE0, 'FULLWIDTH CENT SIGN'). unicode_name(0xFFE1, 'FULLWIDTH POUND SIGN'). unicode_name(0xFFE5, 'FULLWIDTH YEN SIGN'). unicode_name(0xFFE6, 'FULLWIDTH WON SIGN').
{ "pile_set_name": "Github" }
--- title: Miras actions: ['cevapKontrol', 'ipuçları'] material: editor: language: sol startingCode: | pragma solidity ^0.4.19; contract ZombieFactory { event NewZombie(uint zombieId, string name, uint dna); uint dnaDigits = 16; uint dnaModulus = 10 ** dnaDigits; struct Zombie { string name; uint dna; } Zombie[] public zombies; mapping (uint => address) public zombieToOwner; mapping (address => uint) ownerZombieCount; function _createZombie(string _name, uint _dna) private { uint id = zombies.push(Zombie(_name, _dna)) - 1; zombieToOwner[id] = msg.sender; ownerZombieCount[msg.sender]++; NewZombie(id, _name, _dna); } function _generateRandomDna(string _str) private view returns (uint) { uint rand = uint(keccak256(_str)); return rand % dnaModulus; } function createRandomZombie(string _name) public { require(ownerZombieCount[msg.sender] == 0); uint randDna = _generateRandomDna(_name); _createZombie(_name, randDna); } } // Buradan başlayın answer: > pragma solidity ^0.4.19; contract ZombieFactory { event NewZombie(uint zombieId, string name, uint dna); uint dnaDigits = 16; uint dnaModulus = 10 ** dnaDigits; struct Zombie { string name; uint dna; } Zombie[] public zombies; mapping (uint => address) public zombieToOwner; mapping (address => uint) ownerZombieCount; function _createZombie(string _name, uint _dna) private { uint id = zombies.push(Zombie(_name, _dna)) - 1; zombieToOwner[id] = msg.sender; ownerZombieCount[msg.sender]++; NewZombie(id, _name, _dna); } function _generateRandomDna(string _str) private view returns (uint) { uint rand = uint(keccak256(_str)); return rand % dnaModulus; } function createRandomZombie(string _name) public { require(ownerZombieCount[msg.sender] == 0); uint randDna = _generateRandomDna(_name); _createZombie(_name, randDna); } } contract ZombieFeeding is ZombieFactory { } --- Oyun kodumuz oldukça uzun. Son derece uzun bir kontrat yapmaktansa, bazen kodu organize etmek için kod mantığınızı çoğlu kontratlara bölmek onu anlamlı yapar. Bunu daha yönetilebilir yapan Solidity'nin bir özelliği de kontrat **_mirası_**: ``` contract Doge { function catchphrase() public returns (string) { return "So Wow CryptoDoge"; } } contract BabyDoge is Doge { function anotherCatchphrase() public returns (string) { return "Such Moon BabyDoge"; } } ``` `Doge`'den `BabyDoge` **_mirasları_**. Bu, `BabyDoge`'u derleyip açarsanız hem `catchphrase()` hem de `anotherCatchphrase()` erişimine sahip olacağı anlamına gelir (ve `Doge`'da belirtebileceğimiz her bir diğer genel fonksiyonlar). Bu mantıklı miras için kullanılılabilir (bir alt sınıfla olduğu gibi, bir `Cat` bir `Animal`'dır). Fakat ayrıca farklı sınıflar içine benzer mantığı birlikte gruplayarak kodunuzu organize etmek için basitçe kullanılabilir. # Teste koy Sonraki bölümlerde, zombilerimizi besleyip çoğaltmak için işlevselliği uyguluyor olacağız. Hadi `ZombieFactory`'den tüm yöntemleri miras alan kendi sahip olduğu sınıf içine bu mantığı koyalım. 1. `ZombieFactory` altında `ZombieFeeding` denilen bir kontrat yapın. Bu kontrat `ZombieFactory` kontratımızdan miras alıyor olmalı.
{ "pile_set_name": "Github" }
--TEST-- Check for EOL-CR --SKIPIF-- <?php if (!extension_loaded("sundown")) print "skip"; ?> <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php $data = <<< DATA These lines all end with end of line (EOL) sequences. Seriously, they really do. If you don't believe me: HEX EDIT! DATA; $md = new Sundown($data); $result = $md->toHtml(); $tidy = new tidy; $tidy->parseString($result, array("show-body-only"=>1)); $tidy->cleanRepair(); echo (string)$tidy; --EXPECT-- <p>These lines all end with end of line (EOL) sequences.</p> <p>Seriously, they really do.</p> <p>If you don't believe me: HEX EDIT!</p>
{ "pile_set_name": "Github" }
/***************************************************************** * 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 may not use this file except in compliance * with the License. You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. ****************************************************************/ package org.apache.cayenne.testdo.java8; import org.apache.cayenne.testdo.java8.auto._LocalTimeTestEntity; public class LocalTimeTestEntity extends _LocalTimeTestEntity { private static final long serialVersionUID = 1L; }
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> <global name="StateDefinition" module="Products.DCWorkflow.States"/> </pickle> <pickle> <dictionary> <item> <key> <string>description</string> </key> <value> <string>A document which is released and and alive. It is accessible to its associates (team, project, members, partners, etc.) based on the security definition. It is modifiable by it assignees (ex. team, project, etc. for colloaborative documents) and by its assignor (ex. knowledge manager).</string> </value> </item> <item> <key> <string>id</string> </key> <value> <string>released_alive</string> </value> </item> <item> <key> <string>permission_roles</string> </key> <value> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> </value> </item> <item> <key> <string>title</string> </key> <value> <string>Released Alive</string> </value> </item> <item> <key> <string>transitions</string> </key> <value> <tuple> <string>archive</string> <string>archive_action</string> <string>hide</string> <string>hide_action</string> <string>publish</string> <string>publish_action</string> <string>publish_alive</string> <string>publish_alive_action</string> <string>reject</string> <string>reject_action</string> </tuple> </value> </item> <item> <key> <string>type_list</string> </key> <value> <tuple/> </value> </item> </dictionary> </pickle> </record> <record id="2" aka="AAAAAAAAAAI="> <pickle> <global name="PersistentMapping" module="Persistence.mapping"/> </pickle> <pickle> <dictionary> <item> <key> <string>data</string> </key> <value> <dictionary> <item> <key> <string>Access contents information</string> </key> <value> <tuple> <string>Assignee</string> <string>Assignor</string> <string>Associate</string> <string>Auditor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>Add portal content</string> </key> <value> <tuple> <string>Assignee</string> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>Change local roles</string> </key> <value> <tuple> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>Modify portal content</string> </key> <value> <tuple> <string>Assignee</string> <string>Assignor</string> <string>Manager</string> </tuple> </value> </item> <item> <key> <string>View</string> </key> <value> <tuple> <string>Assignee</string> <string>Assignor</string> <string>Associate</string> <string>Auditor</string> <string>Manager</string> </tuple> </value> </item> </dictionary> </value> </item> </dictionary> </pickle> </record> </ZopeData>
{ "pile_set_name": "Github" }
// The MIT License (MIT) // // Copyright (c) 2017 Firebase // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. import { expect } from 'chai'; import * as _ from 'lodash'; import { Change, Event, EventContext, makeCloudFunction, MakeCloudFunctionArgs, } from '../src/cloud-functions'; describe('makeCloudFunction', () => { const cloudFunctionArgs: MakeCloudFunctionArgs<any> = { provider: 'mock.provider', eventType: 'mock.event', service: 'service', triggerResource: () => 'resource', handler: () => null, legacyEventType: 'providers/provider/eventTypes/event', }; it('should put a __trigger on the returned CloudFunction', () => { const cf = makeCloudFunction({ provider: 'mock.provider', eventType: 'mock.event', service: 'service', triggerResource: () => 'resource', handler: () => null, }); expect(cf.__trigger).to.deep.equal({ eventTrigger: { eventType: 'mock.provider.mock.event', resource: 'resource', service: 'service', }, }); }); it('should have legacy event type in __trigger if provided', () => { const cf = makeCloudFunction(cloudFunctionArgs); expect(cf.__trigger).to.deep.equal({ eventTrigger: { eventType: 'providers/provider/eventTypes/event', resource: 'resource', service: 'service', }, }); }); it('should construct the right context for event', () => { const args: any = _.assign({}, cloudFunctionArgs, { handler: (data: any, context: EventContext) => context, }); const cf = makeCloudFunction(args); const test: Event = { context: { eventId: '00000', timestamp: '2016-11-04T21:29:03.496Z', eventType: 'provider.event', resource: { service: 'provider', name: 'resource', }, }, data: 'data', }; return expect(cf(test.data, test.context)).to.eventually.deep.equal({ eventId: '00000', timestamp: '2016-11-04T21:29:03.496Z', eventType: 'provider.event', resource: { service: 'provider', name: 'resource', }, params: {}, }); }); it('should throw error when context.params accessed in handler environment', () => { const args: any = _.assign({}, cloudFunctionArgs, { handler: (data: any, context: EventContext) => context, triggerResource: () => null, }); const cf = makeCloudFunction(args); const test: Event = { context: { eventId: '00000', timestamp: '2016-11-04T21:29:03.496Z', eventType: 'provider.event', resource: { service: 'provider', name: 'resource', }, }, data: 'test data', }; return cf(test.data, test.context).then((result) => { expect(result).to.deep.equal({ eventId: '00000', timestamp: '2016-11-04T21:29:03.496Z', eventType: 'provider.event', resource: { service: 'provider', name: 'resource', }, }); expect(() => result.params).to.throw(Error); }); }); }); describe('makeParams', () => { const args: MakeCloudFunctionArgs<any> = { provider: 'provider', eventType: 'event', service: 'service', triggerResource: () => 'projects/_/instances/pid/ref/{foo}/nested/{bar}', handler: (data, context) => context.params, legacyEventType: 'legacyEvent', }; const cf = makeCloudFunction(args); it('should construct params from the event resource of events', () => { const testEvent: Event = { context: { eventId: '111', timestamp: '2016-11-04T21:29:03.496Z', resource: { service: 'service', name: 'projects/_/instances/pid/ref/a/nested/b', }, eventType: 'event', }, data: 'data', }; return expect( cf(testEvent.data, testEvent.context) ).to.eventually.deep.equal({ foo: 'a', bar: 'b', }); }); }); describe('makeAuth and makeAuthType', () => { const args: MakeCloudFunctionArgs<any> = { provider: 'google.firebase.database', eventType: 'event', service: 'service', triggerResource: () => 'projects/_/instances/pid/ref/{foo}/nested/{bar}', handler: (data, context) => { return { auth: context.auth, authType: context.authType, }; }, }; const cf = makeCloudFunction(args); it('should construct correct auth and authType for admin user', () => { const testEvent = { data: 'data', context: { auth: { admin: true, }, }, }; return expect( cf(testEvent.data, testEvent.context) ).to.eventually.deep.equal({ auth: undefined, authType: 'ADMIN', }); }); it('should construct correct auth and authType for unauthenticated user', () => { const testEvent = { data: 'data', context: { auth: { admin: false, }, }, }; return expect( cf(testEvent.data, testEvent.context) ).to.eventually.deep.equal({ auth: null, authType: 'UNAUTHENTICATED', }); }); it('should construct correct auth and authType for a user', () => { const testEvent = { data: 'data', context: { auth: { admin: false, variable: { uid: 'user', provider: 'google', token: { sub: 'user', }, }, }, }, }; return expect( cf(testEvent.data, testEvent.context) ).to.eventually.deep.equal({ auth: { uid: 'user', token: { sub: 'user', }, }, authType: 'USER', }); }); }); describe('Change', () => { describe('applyFieldMask', () => { const after = { foo: 'bar', num: 2, obj: { a: 1, b: 2, }, }; it('should handle deleted values', () => { const sparseBefore = { baz: 'qux' };
{ "pile_set_name": "Github" }
const util = require('../../../packages/etherlime/cli-commands/util'); const colors = require('../../../packages/etherlime-utils/utils/colors') const assert = require('assert'); const sinon = require('sinon'); describe('Print report table test', function() { it('should return readable status with fail', () => { let colorSpy = sinon.spy(colors, "colorFailure") util.getReadableStatus(1) sinon.assert.calledWithExactly(colorSpy, 'Fail') }) })
{ "pile_set_name": "Github" }
.nh .TH restic backup(1)Jan 2017 generated by \fB\fCrestic generate\fR .SH NAME .PP restic\-cache \- Operate on local cache directories .SH SYNOPSIS .PP \fBrestic cache [flags]\fP .SH DESCRIPTION .PP The "cache" command allows listing and cleaning local cache directories. .SH EXIT STATUS .PP Exit status is 0 if the command was successful, and non\-zero if there was any error. .SH OPTIONS .PP \fB\-\-cleanup\fP[=false] remove old cache directories .PP \fB\-h\fP, \fB\-\-help\fP[=false] help for cache .PP \fB\-\-max\-age\fP=30 max age in \fB\fCdays\fR for cache directories to be considered old .PP \fB\-\-no\-size\fP[=false] do not output the size of the cache directories .SH OPTIONS INHERITED FROM PARENT COMMANDS .PP \fB\-\-cacert\fP=[] \fB\fCfile\fR to load root certificates from (default: use system certificates) .PP \fB\-\-cache\-dir\fP="" set the cache \fB\fCdirectory\fR\&. (default: use system default cache directory) .PP \fB\-\-cleanup\-cache\fP[=false] auto remove old cache directories .PP \fB\-\-json\fP[=false] set output mode to JSON for commands that support it .PP \fB\-\-key\-hint\fP="" \fB\fCkey\fR ID of key to try decrypting first (default: $RESTIC\_KEY\_HINT) .PP \fB\-\-limit\-download\fP=0 limits downloads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-limit\-upload\fP=0 limits uploads to a maximum rate in KiB/s. (default: unlimited) .PP \fB\-\-no\-cache\fP[=false] do not use a local cache .PP \fB\-\-no\-lock\fP[=false] do not lock the repo, this allows some operations on read\-only repos .PP \fB\-o\fP, \fB\-\-option\fP=[] set extended option (\fB\fCkey=value\fR, can be specified multiple times) .PP \fB\-\-password\-command\fP="" shell \fB\fCcommand\fR to obtain the repository password from (default: $RESTIC\_PASSWORD\_COMMAND) .PP \fB\-p\fP, \fB\-\-password\-file\fP="" \fB\fCfile\fR to read the repository password from (default: $RESTIC\_PASSWORD\_FILE) .PP \fB\-q\fP, \fB\-\-quiet\fP[=false] do not output comprehensive progress report .PP \fB\-r\fP, \fB\-\-repo\fP="" \fB\fCrepository\fR to backup to or restore from (default: $RESTIC\_REPOSITORY) .PP \fB\-\-tls\-client\-cert\fP="" path to a \fB\fCfile\fR containing PEM encoded TLS client certificate and private key .PP \fB\-v\fP, \fB\-\-verbose\fP[=0] be verbose (specify \-\-verbose multiple times or level \-\-verbose=\fB\fCn\fR) .SH SEE ALSO .PP \fBrestic(1)\fP
{ "pile_set_name": "Github" }
{ "lib_version" : "v0.3-106-g6f8837d", "first_frame" : 1, "last_frame" : 100, "buffer_frames" : 1, "merger" : { "type" : "gradient" }, "output" : { "type" : "png", "filename" : "ff_stereo_hfov_45_0-v2" }, "pano" : { "width" : 2048, "height" : 1024, "pad_top" : 0, "pad_bottom" : 0, "hfov" : 45, "blend_zenith" : true, "blend_nadir" : true, "proj" : "stereographic", "global_yaw" : 0, "global_pitch" : 0, "global_roll" : 0, "inputs" : [ { "width" : 1920, "height" : 1080, "hfov" : 275.871, "filename" : "procedural:checker(size=120,color1=000000,color2=ee2222,color3=222222)", "proj" : "ff_fisheye", "yaw" : 0, "pitch" : 7.03159, "roll" : -50.4692, "crop_left" : 341, "crop_right" : 1547, "crop_top" : -60, "crop_bottom" : 1142, "viewpoint_model" : "hugin", "translation_x" : 0, "translation_y" : 0, "translation_z" : 0, "viewpoint_pan" : 0, "viewpoint_tilt" : 0, "ev" : 0, "red_corr" : 1, "blue_corr" : 1, "response" : "emor", "emor_a" : 0, "emor_b" : 0, "emor_c" : 0, "emor_d" : 0, "emor_e" : 0, "gamma" : 1, "relative_to_cropped_area" : false, "lens_dist_a" : 0, "lens_dist_b" : -0.0899085, "lens_dist_c" : 0, "dist_center_x" : -15.7932, "dist_center_y" : 3.3929, "vign_a" : 1, "vign_b" : 0, "vign_c" : 0, "vign_d" : 0, "vign_x" : 0, "vign_y" : 0, "frame_offset" : 0 }, { "width" : 1920, "height" : 1080, "hfov" : 275.871, "filename" : "procedural:checker(size=120,color1=000000,color2=33ee33,color3=333333)", "proj" : "ff_fisheye", "yaw" : 120.996, "pitch" : 9.37486, "roll" : -47.1854, "crop_left" : 341, "crop_right" : 1547, "crop_top" : -60, "crop_bottom" : 1142, "viewpoint_model" : "hugin", "translation_x" : 0, "translation_y" : 0, "translation_z" : 0, "viewpoint_pan" : 0, "viewpoint_tilt" : 0, "ev" : 0, "red_corr" : 1, "blue_corr" : 1, "response" : "emor", "emor_a" : 0, "emor_b" : 0, "emor_c" : 0, "emor_d" : 0, "emor_e" : 0, "gamma" : 1, "relative_to_cropped_area" : false, "lens_dist_a" : 0, "lens_dist_b" : -0.0899085, "lens_dist_c" : 0, "dist_center_x" : -15.7932, "dist_center_y" : 3.3929, "vign_a" : 1, "vign_b" : 0, "vign_c" : 0, "vign_d" : 0, "vign_x" : 0, "vign_y" : 0, "frame_offset" : 0 }, { "width" : 1920, "height" : 1080, "hfov" : 275.871, "filename" : "procedural:checker(size=120,color1=000000,color2=4444dd,color3=444444)", "proj" : "ff_fisheye", "yaw" : 61.0095, "pitch" : 174.595, "roll" : 133.23, "crop_left" : 341, "crop_right" : 1547, "crop_top" : -60, "crop_bottom" : 1142, "viewpoint_model" : "hugin", "translation_x" : 0, "translation_y" : 0, "translation_z" : 0, "viewpoint_pan" : 0, "viewpoint_tilt" : 0, "ev" : 0, "red_corr" : 1, "blue_corr" : 1, "response" : "emor", "emor_a" : 0, "emor_b" : 0, "emor_c" : 0, "emor_d" : 0, "emor_e" : 0, "gamma" : 1, "relative_to_cropped_area" : false, "lens_dist_a" : 0, "lens_dist_b" : -0.0899085, "lens_dist_c" : 0, "dist_center_x" : -15.7932, "dist_center_y" : 3.3929, "vign_a" : 1, "vign_b" : 0, "vign_c" : 0, "vign_d" : 0, "vign_x" : 0, "vign_y" : 0, "frame_offset" : 0 } ] } }
{ "pile_set_name": "Github" }
# What is @nteract/core? @nteract/core is where the magic happens. The package, by itself, is nothing special. It encapsulates five other nteract packages that are designed to be used together. - `@nteract/actions` - `@nteract/reducers` - `@nteract/epics` - `@nteract/types` - `@nteract/selectors` Instead of installing and importing from each individual package above, it is recommend that you install `@nteract/core` and use each module like so. ```js import { actions } from "@nteract/core"; // For actions import { reducers } from "@nteract/core"; // For reducers import { epics } from "@nteract/core"; // For epics import { state } from "@nteract/core"; // For types import { selectors } from "@nteract/core"; // For selectors ``` You can also import individually exported elements from `@nteract/core`. For example, if you want to use the `createContentRef` function from the `@nteract/types` package, you can import it like so from the core package. ```js import { createContentRef } from "@nteract/core"; ``` ## Key Principles Behind @nteract/core The `@nteract/core` package is heavily dependent on the underlying technologies powering nteract, namely Redux and RxJS. Each module exported from the core package is designed to work with the other. Here's how it all flows. 1. One of the key principles behind nteract is the existence of a client-side state model. This client-side model makes it easy to manage the state of the nteract client and to synchronize it with a back-end system. You can learn more about the state in the documentation for the `@nteract/types` package. 2. Redux actions are dispatched from nteract clients. Function creators and type definitions for these actions are exported from the `actions` module. For example, if we wanted to focus a particularly cell in a notebook, we can dispatch a `FocusCell` action. 3. Reducers are functions that make immutable changes to the state. Reducers take a base state and an action as inputs. Depending on the action, the base state will be copied and modified in a particular way. For example, a `FocusCell` action will update the `cellFocused` property for a particular content model in the state. 4. Epics bring RxJS and Redux together. They allow developers to implement functions that listen to actions and dispatch async requests or execute side-effects. For example, epics exported from the `epics` module handle cell execution targeting a Jupyter kernel and content fetching from a Jupyter server. 5. The state model has several useful properties, like the currently focused cell or the filepath of a content. The `selectors` module exports a set of selectors, functions that take an input state and return a particular state property. ### More Information For more information on each component of the core SDK, visit the documentation pages for each module.
{ "pile_set_name": "Github" }
/* * * Copyright 2019 gRPC 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ // Package attributes defines a generic key/value store used in various gRPC // components. // // All APIs in this package are EXPERIMENTAL. package attributes import "fmt" // Attributes is an immutable struct for storing and retrieving generic // key/value pairs. Keys must be hashable, and users should define their own // types for keys. type Attributes struct { m map[interface{}]interface{} } // New returns a new Attributes containing all key/value pairs in kvs. If the // same key appears multiple times, the last value overwrites all previous // values for that key. Panics if len(kvs) is not even. func New(kvs ...interface{}) *Attributes { if len(kvs)%2 != 0 { panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs))) } a := &Attributes{m: make(map[interface{}]interface{}, len(kvs)/2)} for i := 0; i < len(kvs)/2; i++ { a.m[kvs[i*2]] = kvs[i*2+1] } return a } // WithValues returns a new Attributes containing all key/value pairs in a and // kvs. Panics if len(kvs) is not even. If the same key appears multiple // times, the last value overwrites all previous values for that key. To // remove an existing key, use a nil value. func (a *Attributes) WithValues(kvs ...interface{}) *Attributes { if a == nil { return New(kvs...) } if len(kvs)%2 != 0 { panic(fmt.Sprintf("attributes.New called with unexpected input: len(kvs) = %v", len(kvs))) } n := &Attributes{m: make(map[interface{}]interface{}, len(a.m)+len(kvs)/2)} for k, v := range a.m { n.m[k] = v } for i := 0; i < len(kvs)/2; i++ { n.m[kvs[i*2]] = kvs[i*2+1] } return n } // Value returns the value associated with these attributes for key, or nil if // no value is associated with key. func (a *Attributes) Value(key interface{}) interface{} { if a == nil { return nil } return a.m[key] }
{ "pile_set_name": "Github" }
<?php namespace oasis\names\specification\ubl\schema\xsd\CommonAggregateComponents_2; /** * @xmlNamespace urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2 * @xmlType PeriodType * @xmlName InvoicePeriod * @var oasis\names\specification\ubl\schema\xsd\CommonAggregateComponents_2\InvoicePeriod */ class InvoicePeriod extends PeriodType { } // end class InvoicePeriod
{ "pile_set_name": "Github" }
/* Copyright (c) 2015, Brandon Jones, Colin MacKenzie IV. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ describe("vec2", function() { var vec2 = require("../../src/gl-matrix/vec2.js"); var out, vecA, vecB, result; beforeEach(function() { vecA = [1, 2]; vecB = [3, 4]; out = [0, 0]; }); describe("create", function() { beforeEach(function() { result = vec2.create(); }); it("should return a 2 element array initialized to 0s", function() { expect(result).toBeEqualish([0, 0]); }); }); describe("clone", function() { beforeEach(function() { result = vec2.clone(vecA); }); it("should return a 2 element array initialized to the values in vecA", function() { expect(result).toBeEqualish(vecA); }); }); describe("fromValues", function() { beforeEach(function() { result = vec2.fromValues(1, 2); }); it("should return a 2 element array initialized to the values passed", function() { expect(result).toBeEqualish([1, 2]); }); }); describe("copy", function() { beforeEach(function() { result = vec2.copy(out, vecA); }); it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); }); it("should return out", function() { expect(result).toBe(out); }); }); describe("set", function() { beforeEach(function() { result = vec2.set(out, 1, 2); }); it("should place values into out", function() { expect(out).toBeEqualish([1, 2]); }); it("should return out", function() { expect(result).toBe(out); }); }); describe("add", function() { describe("with a separate output vector", function() { beforeEach(function() { result = vec2.add(out, vecA, vecB); }); it("should place values into out", function() { expect(out).toBeEqualish([4, 6]); }); it("should return out", function() { expect(result).toBe(out); }); it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); }); describe("when vecA is the output vector", function() { beforeEach(function() { result = vec2.add(vecA, vecA, vecB); }); it("should place values into vecA", function() { expect(vecA).toBeEqualish([4, 6]); }); it("should return vecA", function() { expect(result).toBe(vecA); }); it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); }); describe("when vecB is the output vector", function() { beforeEach(function() { result = vec2.add(vecB, vecA, vecB); }); it("should place values into vecB", function() { expect(vecB).toBeEqualish([4, 6]); }); it("should return vecB", function() { expect(result).toBe(vecB); }); it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); }); }); describe("subtract", function() { it("should have an alias called 'sub'", function() { expect(vec2.sub).toEqual(vec2.subtract); }); describe("with a separate output vector", function() { beforeEach(function() { result = vec2.subtract(out, vecA, vecB); }); it("should place values into out", function() { expect(out).toBeEqualish([-2, -2]); }); it("should return out", function() { expect(result).toBe(out); }); it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); }); describe("when vecA is the output vector", function() { beforeEach(function() { result = vec2.subtract(vecA, vecA, vecB); }); it("should place values into vecA", function() { expect(vecA).toBeEqualish([-2, -2]); }); it("should return vecA", function() { expect(result).toBe(vecA); }); it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); }); describe("when vecB is the output vector", function() { beforeEach(function() { result = vec2.subtract(vecB, vecA, vecB); }); it("should place values into vecB", function() { expect(vecB).toBeEqualish([-2, -2]); }); it("should return vecB", function() { expect(result).toBe(vecB); }); it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); }); }); describe("multiply", function() { it("should have an alias called 'mul'", function() { expect(vec2.mul).toEqual(vec2.multiply); }); describe("with a separate output vector", function() { beforeEach(function() { result = vec2.multiply(out, vecA, vecB); }); it("should place values into out", function() { expect(out).toBeEqualish([3, 8]); }); it("should return out", function() { expect(result).toBe(out); }); it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); }); describe("when vecA is the output vector", function() { beforeEach(function() { result = vec2.multiply(vecA, vecA, vecB); }); it("should place values into vecA", function() { expect(vecA).toBeEqualish([3, 8]); }); it("should return vecA", function() { expect(result).toBe(vecA); }); it("should not modify vecB", function() { expect(vecB).toBeEqualish([3, 4]); }); }); describe("when vecB is the output vector", function() { beforeEach(function() { result = vec2.multiply(vecB, vecA, vecB); }); it("should place values into vecB", function() { expect(vecB).toBeEqualish([3, 8]); }); it("should return vecB", function() { expect(result).toBe(vecB); }); it("should not modify vecA", function() { expect(vecA).toBeEqualish([1, 2]); }); }); }); describe("divide", function() { it("should have an alias called 'div'", function() { expect(vec2.div).toEqual(vec2.divide); }); describe("with a separate output vector", function() { beforeEach(function() { result = vec2.divide(out, vecA, vecB); }); it("should place values into out", function() { expect(out).toBeEqualish([
{ "pile_set_name": "Github" }
"use strict"; // Manually added data to be used by sbcs codec in addition to generated one. module.exports = { // Not supported by iconv, not sure why. "10029": "maccenteuro", "maccenteuro": { "type": "_sbcs", "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" }, "808": "cp808", "ibm808": "cp808", "cp808": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " }, "mik": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, // Aliases of generated encodings. "ascii8bit": "ascii", "usascii": "ascii", "ansix34": "ascii", "ansix341968": "ascii", "ansix341986": "ascii", "csascii": "ascii", "cp367": "ascii", "ibm367": "ascii", "isoir6": "ascii", "iso646us": "ascii", "iso646irv": "ascii", "us": "ascii", "latin1": "iso88591", "latin2": "iso88592", "latin3": "iso88593", "latin4": "iso88594", "latin5": "iso88599", "latin6": "iso885910", "latin7": "iso885913", "latin8": "iso885914", "latin9": "iso885915", "latin10": "iso885916", "csisolatin1": "iso88591", "csisolatin2": "iso88592", "csisolatin3": "iso88593", "csisolatin4": "iso88594", "csisolatincyrillic": "iso88595", "csisolatinarabic": "iso88596", "csisolatingreek": "iso88597", "csisolatinhebrew": "iso88598", "csisolatin5": "iso88599", "csisolatin6": "iso885910", "l1": "iso88591", "l2": "iso88592", "l3": "iso88593", "l4": "iso88594", "l5": "iso88599", "l6": "iso885910", "l7": "iso885913", "l8": "iso885914", "l9": "iso885915", "l10": "iso885916", "isoir14": "iso646jp", "isoir57": "iso646cn", "isoir100": "iso88591", "isoir101": "iso88592", "isoir109": "iso88593", "isoir110": "iso88594", "isoir144": "iso88595", "isoir127": "iso88596", "isoir126": "iso88597", "isoir138": "iso88598", "isoir148": "iso88599", "isoir157": "iso885910", "isoir166": "tis620", "isoir179": "iso885913", "isoir199": "iso885914", "isoir203": "iso885915", "isoir226": "iso885916", "cp819": "iso88591", "ibm819": "iso88591", "cyrillic": "iso88595", "arabic": "iso88596", "arabic8": "iso88596", "ecma114": "iso88596", "asmo708": "iso88596", "greek": "iso88597", "greek8": "iso88597", "ecma118": "iso88597", "elot928": "iso88597", "hebrew": "iso88598", "hebrew8": "iso88598", "turkish": "iso88599", "turkish8": "iso88599", "thai": "iso885911", "thai8": "iso885911", "celtic": "iso885914", "celtic8": "iso885914", "isoceltic": "iso885914", "tis6200": "tis620", "tis62025291": "tis620", "tis62025330": "tis620", "10000": "macroman", "10006": "macgreek", "10007": "maccyrillic", "10079": "maciceland", "10081": "macturkish", "cspc8codepage437": "cp437", "cspc775baltic": "cp775", "cspc850multilingual": "cp850", "cspcp852": "cp852", "cspc862latinhebrew": "cp862", "cpgr": "cp869", "msee": "cp1250", "mscyrl": "cp1251", "msansi": "cp1252", "msgreek": "cp1253", "msturk": "cp1254", "mshebr": "cp1255", "msarab": "cp1256", "winbaltrim": "cp1257", "cp20866": "koi8r", "20866": "koi8r", "ibm878": "koi8r", "cskoi8r": "koi8r", "cp21866": "koi8u", "21866": "koi8u", "ibm1168": "koi8u", "strk10482002": "rk1048",
{ "pile_set_name": "Github" }
/* * 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 may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /* * $Id$ */ #if !defined(XERCESC_INCLUDE_GUARD_KEYVALUEPAIR_HPP) #define XERCESC_INCLUDE_GUARD_KEYVALUEPAIR_HPP #include <xercesc/util/XMemory.hpp> XERCES_CPP_NAMESPACE_BEGIN template <class TKey, class TValue> class KeyValuePair : public XMemory { public : // ------------------------------------------------------------------- // Constructors and Destructor // ------------------------------------------------------------------- KeyValuePair(); KeyValuePair(const TKey& key, const TValue& value); KeyValuePair(const KeyValuePair<TKey,TValue>& toCopy); ~KeyValuePair(); // ------------------------------------------------------------------- // Getters // ------------------------------------------------------------------- const TKey& getKey() const; TKey& getKey(); const TValue& getValue() const; TValue& getValue(); // ------------------------------------------------------------------- // Setters // ------------------------------------------------------------------- TKey& setKey(const TKey& newKey); TValue& setValue(const TValue& newValue); private : // unimplemented: KeyValuePair<TKey,TValue>& operator=(const KeyValuePair<TKey,TValue>&); // ------------------------------------------------------------------- // Private data members // // fKey // The object that represents the key of the pair // // fValue // The object that represents the value of the pair // ------------------------------------------------------------------- TKey fKey; TValue fValue; }; XERCES_CPP_NAMESPACE_END #if !defined(XERCES_TMPLSINC) #include <xercesc/util/KeyValuePair.c> #endif #endif
{ "pile_set_name": "Github" }
/** * Author......: See docs/credits.txt * License.....: MIT */ #define NEW_SIMD_CODE #include "inc_vendor.cl" #include "inc_hash_constants.h" #include "inc_hash_functions.cl" #include "inc_types.cl" #include "inc_common.cl" #include "inc_simd.cl" __kernel void m01000_m04 (__global pw_t *pws, __global const kernel_rule_t *rules_buf, __global const comb_t *combs_buf, __global const bf_t *bfs_buf, __global void *tmps, __global void *hooks, __global const u32 *bitmaps_buf_s1_a, __global const u32 *bitmaps_buf_s1_b, __global const u32 *bitmaps_buf_s1_c, __global const u32 *bitmaps_buf_s1_d, __global const u32 *bitmaps_buf_s2_a, __global const u32 *bitmaps_buf_s2_b, __global const u32 *bitmaps_buf_s2_c, __global const u32 *bitmaps_buf_s2_d, __global plain_t *plains_buf, __global const digest_t *digests_buf, __global u32 *hashes_shown, __global const salt_t *salt_bufs, __global const void *esalt_bufs, __global u32 *d_return_buf, __global u32 *d_scryptV0_buf, __global u32 *d_scryptV1_buf, __global u32 *d_scryptV2_buf, __global u32 *d_scryptV3_buf, const u32 bitmap_mask, const u32 bitmap_shift1, const u32 bitmap_shift2, const u32 salt_pos, const u32 loop_pos, const u32 loop_cnt, const u32 il_cnt, const u32 digests_cnt, const u32 digests_offset, const u32 combs_mode, const u32 gid_max) { /** * modifier */ const u32 lid = get_local_id (0); /** * base */ const u32 gid = get_global_id (0); if (gid >= gid_max) return; u32 pw_buf0[4]; u32 pw_buf1[4]; pw_buf0[0] = pws[gid].i[0]; pw_buf0[1] = pws[gid].i[1]; pw_buf0[2] = pws[gid].i[2]; pw_buf0[3] = pws[gid].i[3]; pw_buf1[0] = pws[gid].i[4]; pw_buf1[1] = pws[gid].i[5]; pw_buf1[2] = pws[gid].i[6]; pw_buf1[3] = pws[gid].i[7]; const u32 pw_l_len = pws[gid].pw_len; /** * loop */ for (u32 il_pos = 0; il_pos < il_cnt; il_pos += VECT_SIZE) { const u32x pw_r_len = pwlenx_create_combt (combs_buf, il_pos); const u32x pw_len = pw_l_len + pw_r_len; /** * concat password candidate */ u32x wordl0[4] = { 0 }; u32x wordl1[4] = { 0 }; u32x wordl2[4] = { 0 }; u32x wordl3[4] = { 0 }; wordl0[0] = pw_buf0[0]; wordl0[1] = pw_buf0[1]; wordl0[2] = pw_buf0[2]; wordl0[3] = pw_buf0[3]; wordl1[0] = pw_buf1[0]; wordl1[1] = pw_buf1[1]; wordl1[2] = pw_buf1[2]; wordl1[3] = pw_buf1[3]; u32x wordr0[4] = { 0 }; u32x wordr1[4] = { 0 }; u32x wordr2[4] = { 0 }; u32x wordr3[4] = { 0 }; wordr0[0] = ix_create_combt (combs_buf, il_pos, 0); wordr0[1] = ix_create_combt (combs_buf, il_pos, 1); wordr0[2] = ix_create_combt (combs_buf, il_pos, 2); wordr0[3] = ix_create_combt (combs_buf, il_pos, 3); wordr1[0] = ix_create_combt (combs_buf, il_pos, 4); wordr1[1] = ix_create_combt (combs_buf, il_pos, 5); wordr1[2] = ix_create_combt (combs_buf, il_pos, 6); wordr1[3] = ix_create_combt (combs_buf, il_pos, 7); if (combs_mode == COMBINATOR_MODE_BASE_LEFT) { switch_buffer_by_offset_le_VV (wordr0, wordr1, wordr2, wordr3, pw_l_len); } else { switch_buffer_by_offset_le_VV (wordl0, wordl1, wordl2, wordl3, pw_r_len); } u32x w0[4]; u32x w1[4]; u32x w2[4]; u32x w3[4]; w0[0] = wordl0[0] | wordr0[0]; w0[1] = wordl0[1] | wordr0[1]; w0[2] = wordl0[2] | wordr0[2]; w0[3] = wordl0[3] | wordr0[3]; w1[0] = wordl1[0] | wordr1[0]; w1[1] = wordl1[1] | wordr1[1]; w1[2] = wordl1[2] | wordr1[2]; w1[3] = wordl1[3] | wordr1[3]; w2[0] = wordl2[0] | wordr2[0]; w2[1] = wordl2[1] | wordr2[1]; w2[2] = wordl2[2] | wordr2[2]; w2[3] = wordl2[3] | wordr2[3]; w3[0] = wordl3[0] | wordr3[0]; w3[1] = wordl3[1] | wordr3[1]; w3[2] = wordl3[2] | wordr3[2]; w3[3] = wordl3[3] | wordr3[3]; make_utf16le (w1, w2, w3); make_utf16le (w0, w0, w1); w3[2] = pw_len * 8 * 2; w3[3] = 0; /** * md4 */ u32x a = MD4M_A; u32x b = MD4M_B; u32x c = MD4M_C; u32x d = MD4M_D; MD4_STEP (MD4_Fo, a, b, c, d, w0[0], MD4C00, MD4S00); MD4_STEP (MD4_Fo, d, a, b, c, w0[1], MD4C00, MD4S01); MD4_STEP (MD4
{ "pile_set_name": "Github" }
#!/usr/bin/env perl #*************************************************************************** # _ _ ____ _ # Project ___| | | | _ \| | # / __| | | | |_) | | # | (__| |_| | _ <| |___ # \___|\___/|_| \_\_____| # # Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://curl.haxx.se/docs/copyright.html. # # You may opt to use, copy, modify, merge, publish, distribute and/or sell # copies of the Software, and permit persons to whom the Software is # furnished to do so, under the terms of the COPYING file. # # This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY # KIND, either express or implied. # ########################################################################### # This script accepts a source file as input on the command line. # # It first loads the 'symbols-in-versions' document and stores a lookup # table for all known symbols for which version they were introduced. # # It then scans the given source file to dig up all symbols starting with CURL. # Finally, it sorts the internal list of found symbols (using the version # number as sort key) and then it outputs the most recent version number and # the symbols from that version that are used. # # Usage: # # version-check.pl [source file] # open(S, "<../libcurl/symbols-in-versions") || die; my %doc; my %rem; while(<S>) { if(/(^CURL[^ \n]*) *(.*)/) { my ($sym, $rest)=($1, $2); my @a=split(/ +/, $rest); $doc{$sym}=$a[0]; # when it was introduced if($a[2]) { # this symbol is documented to have been present the last time # in this release $rem{$sym}=$a[2]; } } } close(S); sub age { my ($ver)=@_; my @s=split(/\./, $ver); return $s[0]*10000+$s[1]*100+$s[2]; } my %used; open(C, "<$ARGV[0]") || die; while(<C>) { if(/\W(CURL[_A-Z0-9v]+)\W/) { #print "$1\n"; $used{$1}++; } } close(C); sub sortversions { my $r = age($doc{$a}) <=> age($doc{$b}); if(!$r) { $r = $a cmp $b; } return $r; } my @recent = reverse sort sortversions keys %used; # the most recent symbol my $newsym = $recent[0]; # the most recent version my $newver = $doc{$newsym}; print "The scanned source uses these symbols introduced in $newver:\n"; for my $w (@recent) { if($doc{$w} eq $newver) { printf " $w\n"; next; } last; }
{ "pile_set_name": "Github" }
/* * Copyright 2007-2008 the original author or 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.gradle.api; /** * <p>A {@code Rule} represents some action to perform when an unknown domain object is referenced. The rule can use the * domain object name to add an implicit domain object.</p> */ public interface Rule { /** * Returns the description of the rule. This is used for reporting purposes. * * @return the description. should not return null. */ String getDescription(); /** * Applies this rule for the given unknown domain object. The rule can choose to ignore this name, or add a domain * object with the given name. * * @param domainObjectName The name of the unknown domain object. */ void apply(String domainObjectName); }
{ "pile_set_name": "Github" }
/* ============================================================================= FILE: UKFileWatcher.h PROJECT: Filie COPYRIGHT: (c) 2005 M. Uli Kusterer, all rights reserved. AUTHORS: M. Uli Kusterer - UK LICENSES: MIT License REVISIONS: 2006-03-13 UK Moved notification constants to .m file. 2005-02-25 UK Created. ========================================================================== */ /* This is a protocol that file change notification classes should adopt. That way, no matter whether you use Carbon's FNNotify/FNSubscribe, BSD's kqueue or whatever, the object being notified can react to change notifications the same way, and you can easily swap one out for the other to cater to different OS versions, target volumes etc. */ // ----------------------------------------------------------------------------- // Protocol: // ----------------------------------------------------------------------------- @protocol JournlerFileWatcher // +(id) sharedFileWatcher; // Singleton accessor. Not officially part of the protocol, but use this name if you provide a singleton. -(void) addPath: (NSString*)path; -(void) removePath: (NSString*)path; -(id) delegate; -(void) setDelegate: (id)newDelegate; @end // ----------------------------------------------------------------------------- // Methods delegates need to provide: // ----------------------------------------------------------------------------- @interface NSObject (JournlerFileWatcherDelegate) -(void) watcher: (id<JournlerFileWatcher>)kq receivedNotification: (NSString*)nm forPath: (NSString*)fpath; @end // Notifications this sends: /* object = the file watcher object userInfo.path = file path watched These notifications are sent via the NSWorkspace notification center */ extern NSString* UKFileWatcherRenameNotification; extern NSString* UKFileWatcherWriteNotification; extern NSString* UKFileWatcherDeleteNotification; extern NSString* UKFileWatcherAttributeChangeNotification; extern NSString* UKFileWatcherSizeIncreaseNotification; extern NSString* UKFileWatcherLinkCountChangeNotification; extern NSString* UKFileWatcherAccessRevocationNotification;
{ "pile_set_name": "Github" }
--TEST-- get_parent_class() tests --FILE-- <?php interface i { function test(); } class foo implements i { function test() { var_dump(get_parent_class()); } } class bar extends foo { function test_bar() { var_dump(get_parent_class()); } } $bar = new bar; $foo = new foo; $foo->test(); $bar->test(); $bar->test_bar(); var_dump(get_parent_class($bar)); var_dump(get_parent_class($foo)); var_dump(get_parent_class("bar")); var_dump(get_parent_class("foo")); var_dump(get_parent_class("i")); var_dump(get_parent_class("")); var_dump(get_parent_class("[[[[")); var_dump(get_parent_class(" ")); var_dump(get_parent_class(new stdclass)); var_dump(get_parent_class(array())); var_dump(get_parent_class(1)); echo "Done\n"; ?> --EXPECTF-- bool(false) bool(false) string(3) "foo" string(3) "foo" bool(false) string(3) "foo" bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) bool(false) Done
{ "pile_set_name": "Github" }
#ifndef CAFFE_UTIL_NCCL_H_ #define CAFFE_UTIL_NCCL_H_ #ifdef USE_NCCL #include <nccl.h> #include "caffe/common.hpp" #define NCCL_CHECK(condition) \ { \ ncclResult_t result = condition; \ CHECK_EQ(result, ncclSuccess) << " " \ << ncclGetErrorString(result); \ } namespace caffe { namespace nccl { template <typename Dtype> class dataType; template<> class dataType<float> { public: static const ncclDataType_t type = ncclFloat; }; template<> class dataType<double> { public: static const ncclDataType_t type = ncclDouble; }; } // namespace nccl } // namespace caffe #endif // end USE_NCCL #endif // CAFFE_UTIL_NCCL_H_
{ "pile_set_name": "Github" }
library built_redux; export 'src/action.dart'; export 'src/reducer_builder.dart'; export 'src/middleware.dart'; export 'src/store.dart'; export 'src/store_change.dart'; export 'src/typedefs.dart';
{ "pile_set_name": "Github" }
## ## Copyright (C) by Argonne National Laboratory ## See COPYRIGHT in top-level directory ## mpi_sources += \ src/mpi/attr/attr_delete.c \ src/mpi/attr/attr_get.c \ src/mpi/attr/attr_put.c \ src/mpi/attr/comm_create_keyval.c \ src/mpi/attr/comm_delete_attr.c \ src/mpi/attr/comm_free_keyval.c \ src/mpi/attr/comm_get_attr.c \ src/mpi/attr/comm_set_attr.c \ src/mpi/attr/keyval_create.c \ src/mpi/attr/keyval_free.c \ src/mpi/attr/type_create_keyval.c \ src/mpi/attr/type_delete_attr.c \ src/mpi/attr/type_free_keyval.c \ src/mpi/attr/type_get_attr.c \ src/mpi/attr/type_set_attr.c \ src/mpi/attr/win_create_keyval.c \ src/mpi/attr/win_delete_attr.c \ src/mpi/attr/win_free_keyval.c \ src/mpi/attr/win_get_attr.c \ src/mpi/attr/win_set_attr.c noinst_HEADERS += src/mpi/attr/attr.h mpi_core_sources += \ src/mpi/attr/attrutil.c \ src/mpi/attr/dup_fn.c
{ "pile_set_name": "Github" }
require('../../modules/es6.object.prevent-extensions'); module.exports = require('../../modules/_core').Object.preventExtensions;
{ "pile_set_name": "Github" }
resource_registry: OS::TripleO::DeployedServerEnvironment: ../deployed-server/deployed-server-environment-output.yaml
{ "pile_set_name": "Github" }
# -*- mode: snippet -*- # name: LaTeX header # key: lhe # condition: (= (current-column) 3) # contributor: Rafael Villarroel (rvf0068@gmail.com) # -- #+LATEX_HEADER: ${1:\usepackage{$2}}
{ "pile_set_name": "Github" }
[ 1; 2; 3; 4; 5; 6 ] |> List.groupBy (fun i -> i / 2) |> List.map (fun (group, xs) -> xs.Length) |> List.toSeq
{ "pile_set_name": "Github" }
/****************************************************************************** * Copyright (C) Ultraleap, Inc. 2011-2020. * * * * Use subject to the terms of the Apache License 2.0 available at * * http://www.apache.org/licenses/LICENSE-2.0, or another agreement * * between Ultraleap and you, your company or other organization. * ******************************************************************************/ using System.Collections.Generic; using UnityEngine; #if UNITY_2017_2_OR_NEWER using UnityEngine.XR; #else using UnityEngine.VR; #endif namespace Leap.Unity { /// <summary> /// Wraps various (but not all) "XR" calls with Unity 5.6-supporting "VR" calls /// via #ifdefs. /// </summary> public static class XRSupportUtil { #if UNITY_2019_2_OR_NEWER private static System.Collections.Generic.List<XRNodeState> nodeStates = new System.Collections.Generic.List<XRNodeState>(); #endif public static bool IsXREnabled() { #if UNITY_2017_2_OR_NEWER return XRSettings.enabled; #else return VRSettings.enabled; #endif } public static bool IsXRDevicePresent() { #if UNITY_2020_1_OR_NEWER return XRSettings.isDeviceActive; #elif UNITY_2017_2_OR_NEWER return XRDevice.isPresent; #else return VRDevice.isPresent; #endif } static bool outputPresenceWarning = false; public static bool IsUserPresent(bool defaultPresence = true) { #if UNITY_2019_3_OR_NEWER var devices = new List<InputDevice>(); InputDevices.GetDevicesWithCharacteristics(InputDeviceCharacteristics.HeadMounted, devices); if (devices.Count == 0 && !outputPresenceWarning) { Debug.LogWarning("No head-mounted devices found. Possibly no HMD is available to the XR system."); outputPresenceWarning = true; } if (devices.Count != 0) { var device = devices[0]; if (device.TryGetFeatureValue(CommonUsages.userPresence, out var userPresent)) { return userPresent; } } #elif UNITY_2017_2_OR_NEWER var userPresence = XRDevice.userPresence; if (userPresence == UserPresenceState.Present) { return true; } else if (!outputPresenceWarning && userPresence == UserPresenceState.Unsupported) { Debug.LogWarning("XR UserPresenceState unsupported (XR support is probably disabled)."); outputPresenceWarning = true; } #else if (!outputPresenceWarning){ Debug.LogWarning("XR UserPresenceState is only supported in 2017.2 and newer."); outputPresenceWarning = true; } #endif return defaultPresence; } public static Vector3 GetXRNodeCenterEyeLocalPosition() { #if UNITY_2019_2_OR_NEWER InputTracking.GetNodeStates(nodeStates); Vector3 position; foreach(XRNodeState state in nodeStates) { if(state.nodeType == XRNode.CenterEye && state.TryGetPosition(out position)) { return position; } } return Vector3.zero; #elif UNITY_2017_2_OR_NEWER return InputTracking.GetLocalPosition(XRNode.CenterEye); #else return InputTracking.GetLocalPosition(VRNode.CenterEye); #endif } public static Quaternion GetXRNodeCenterEyeLocalRotation() { #if UNITY_2019_2_OR_NEWER InputTracking.GetNodeStates(nodeStates); Quaternion rotation; foreach (XRNodeState state in nodeStates) { if (state.nodeType == XRNode.CenterEye && state.TryGetRotation(out rotation)) { return rotation; } } return Quaternion.identity; #elif UNITY_2017_2_OR_NEWER return InputTracking.GetLocalRotation(XRNode.CenterEye); #else return InputTracking.GetLocalRotation(VRNode.CenterEye); #endif } public static Vector3 GetXRNodeHeadLocalPosition() { #if UNITY_2019_2_OR_NEWER InputTracking.GetNodeStates(nodeStates); Vector3 position; foreach(XRNodeState state in nodeStates) { if(state.nodeType == XRNode.Head && state.TryGetPosition(out position)) { return position; } } return Vector3.zero; #elif UNITY_2017_2_OR_NEWER return InputTracking.GetLocalPosition(XRNode.Head); #else return InputTracking.GetLocalPosition(VRNode.Head); #endif } public static Quaternion GetXRNodeHeadLocalRotation() { #if UNITY_2019_2_OR_NEWER InputTracking.GetNodeStates(nodeStates); Quaternion rotation; foreach (XRNodeState state in nodeStates) { if (state.nodeType == XRNode.Head && state.TryGetRotation(out rotation)) { return rotation; } } return Quaternion.identity; #elif UNITY_2017_2_OR_NEWER return InputTracking.GetLocalRotation(XRNode.Head); #else return InputTracking.GetLocalRotation(VRNode.Head); #endif } public static Vector3 GetXRNodeLocalPosition(int node) { #if UNITY_2019_2_OR_NEWER InputTracking.GetNodeStates(nodeStates); Vector3 position; foreach(XRNodeState state in nodeStates) { if(state.nodeType == (XRNode)node && state.TryGetPosition(out position)) { return position; } } return Vector3.zero; #elif UNITY_2017_2_OR_NEWER return InputTracking.GetLocalPosition((XRNode)node); #else return InputTracking.GetLocalPosition((VRNode)node); #endif } public static Quaternion GetXRNodeLocalRotation(int node) { #if UNITY_2019_2_OR_NEWER InputTracking.GetNodeStates(nodeStates); Quaternion rotation; foreach (XRNodeState state in nodeStates) { if (state.nodeType == (XRNode)node && state.TryGetRotation(out rotation)) { return rotation; } } return Quaternion.identity; #elif UNITY_2017_2_OR_NEWER return InputTracking.GetLocalRotation((XRNode)node); #else return InputTracking.GetLocalRotation((VRNode)node); #endif } public static void Recenter() { #if UNITY_2019_3_OR_NEWER var devices = new List<InputDevice>(); InputDevices.GetDevicesWithCharacteristics(InputDeviceCharacteristics.HeadMounted, devices); if (devices.Count == 0) return; var hmdDevice = devices[0]; hmdDevice.subsystem.TryRecenter(); #else InputTracking.Recenter(); #endif } public static string GetLoadedDeviceName() { #if UNITY_2017_2_OR_NEWER return XRSettings.loadedDeviceName; #else return VRSettings.loadedDeviceName; #endif } /// <summary> Returns whether there's a floor available. </summary> public static bool IsRoomScale() { #if UNITY_2019_3_OR_NEWER var devices = new List<InputDevice>(); InputDevices.GetDevicesWithCharacteristics(InputDeviceCharacteristics.HeadMounted, devices); if (devices.Count == 0) return false; var hmdDevice = devices[0]; return hmdDevice.subsystem.GetTrackingOriginMode().HasFlag(Tracking
{ "pile_set_name": "Github" }
#region snippetALL // Unused usings removed. using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.RazorPages; using RazorPagesMovie.Models; using System; using System.Threading.Tasks; namespace RazorPagesMovie.Pages.Movies { public class CreateModel : PageModel { private readonly RazorPagesMovie.Models.RazorPagesMovieContext _context; public CreateModel(RazorPagesMovie.Models.RazorPagesMovieContext context) { _context = context; } public IActionResult OnGet() { return Page(); } [BindProperty] public Movie Movie { get; set; } #region snippetPost public async Task<IActionResult> OnPostAsync() { if (!ModelState.IsValid) { return Page(); } _context.Movie.Add(Movie); await _context.SaveChangesAsync(); return RedirectToPage("./Index"); } #endregion } } #endregion
{ "pile_set_name": "Github" }
#import <Foundation/Foundation.h> @interface EXPUnsupportedObject : NSObject { NSString *_type; } @property (nonatomic, retain) NSString *type; - (instancetype)initWithType:(NSString *)type NS_DESIGNATED_INITIALIZER; @end
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProductVersion>9.0.30729</ProductVersion> <SchemaVersion>2.0</SchemaVersion> <ProjectGuid>{F3D05B12-5F2F-489B-A634-3B3BD44F85A2}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>com.esri.gpt.csw</RootNamespace> <AssemblyName>CswClient</AssemblyName> <SccProjectName>SAK</SccProjectName> <SccLocalPath>SAK</SccLocalPath> <SccAuxPath>SAK</SccAuxPath> <SccProvider>SAK</SccProvider> <FileUpgradeFlags> </FileUpgradeFlags> <OldToolsVersion>3.5</OldToolsVersion> <UpgradeBackupLocation> </UpgradeBackupLocation> <TargetFrameworkVersion>v2.0</TargetFrameworkVersion> <PublishUrl>http://localhost/CswClient/</PublishUrl> <Install>true</Install> <InstallFrom>Web</InstallFrom> <UpdateEnabled>true</UpdateEnabled> <UpdateMode>Foreground</UpdateMode> <UpdateInterval>7</UpdateInterval> <UpdateIntervalUnits>Days</UpdateIntervalUnits> <UpdatePeriodically>false</UpdatePeriodically> <UpdateRequired>false</UpdateRequired> <MapFileExtensions>true</MapFileExtensions> <ApplicationRevision>0</ApplicationRevision> <ApplicationVersion>1.0.0.%2a</ApplicationVersion> <IsWebBootstrapper>true</IsWebBootstrapper> <UseApplicationTrust>false</UseApplicationTrust> <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>..\..\Bin\</OutputPath> <DefineConstants>DEBUG;TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\..\Bin\CswClient.XML</DocumentationFile> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>..\..\Bin\</OutputPath> <DefineConstants>TRACE</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <DocumentationFile>..\..\Bin\CswClient.XML</DocumentationFile> <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> </ItemGroup> <ItemGroup> <Compile Include="BoundingBox.cs" /> <Compile Include="CswCatalog.cs" /> <Compile Include="CswCatalogCapabilities.cs" /> <Compile Include="CswCatalogs.cs" /> <Compile Include="CswClient.cs" /> <Compile Include="CswManager.cs" /> <Compile Include="CswObjects.cs" /> <Compile Include="CswProfile.cs" /> <Compile Include="CswProfiles.cs" /> <Compile Include="CswRecord.cs" /> <Compile Include="CswRecords.cs" /> <Compile Include="CswSearchCriteria.cs" /> <Compile Include="CswSearchRequest.cs" /> <Compile Include="CswSearchResponse.cs" /> <Compile Include="DcList.cs" /> <Compile Include="Envelope.cs" /> <Compile Include="MapServiceInfo.cs" /> <Compile Include="PromptCredentials.cs"> <SubType>Form</SubType> </Compile> <Compile Include="PromptCredentials.Designer.cs"> <DependentUpon>PromptCredentials.cs</DependentUpon> </Compile> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Resources.Designer.cs"> <AutoGen>True</AutoGen> <DesignTime>True</DesignTime> <DependentUpon>Resources.resx</DependentUpon> </Compile> <Compile Include="Utils.cs" /> </ItemGroup> <ItemGroup> <EmbeddedResource Include="PromptCredentials.resx"> <DependentUpon>PromptCredentials.cs</DependentUpon> </EmbeddedResource> <EmbeddedResource Include="Resources.resx"> <Generator>ResXFileCodeGenerator</Generator> <LastGenOutput>Resources.Designer.cs</LastGenOutput> </EmbeddedResource> </ItemGroup> <ItemGroup> <None Include="CswClient.properties" /> </ItemGroup> <ItemGroup> <BootstrapperPackage Include="Microsoft.Net.Client.3.5"> <Visible>False</Visible> <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName> <Install>false</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> <Visible>False</Visible> <ProductName>.NET Framework 3.5 SP1</ProductName> <Install>true</Install> </BootstrapperPackage> <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1"> <Visible>False</Visible> <ProductName>Windows Installer 3.1</ProductName> <Install>true</Install> </BootstrapperPackage> </ItemGroup> <ItemGroup> <ProjectReference Include="..\..\..\AppLogger\trunk\src\AppLogger.csproj"> <Project>{2FFDEA64-1BC3-4FBF-BFEB-44C09499036C}</Project> <Name>AppLogger</Name> </ProjectReference> </ItemGroup> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. <Target Name="BeforeBuild"> </Target> <Target Name="AfterBuild"> </Target> --> </Project>
{ "pile_set_name": "Github" }
/* * Copyright (C) 2015 The gtkmm Development Team * * This library 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 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include <gtkmm/widget.h> _DEFS(gtkmm,gtk) _PINCLUDE(gtkmm/private/widget_p.h) #include <gdkmm/glcontext.h> namespace Gtk { /** A widget used for drawing with OpenGL. * @newin{3,18} * @ingroup Widgets */ class GTKMM_API GLArea : public Widget { _CLASS_GTKOBJECT(GLArea,GtkGLArea,GTK_GL_AREA,Gtk::Widget,GtkWidget, , , GTKMM_API) public: _CTOR_DEFAULT _WRAP_METHOD(Glib::RefPtr<Gdk::GLContext> get_context(), gtk_gl_area_get_context, refreturn, newin "3,18") _WRAP_METHOD(Glib::RefPtr<const Gdk::GLContext> get_context() const, gtk_gl_area_get_context, refreturn, constversion, newin "3,18") _WRAP_METHOD(void make_current(), gtk_gl_area_make_current, newin "3,18") _WRAP_METHOD(void queue_render(), gtk_gl_area_queue_render, newin "3,18") _WRAP_METHOD(void attach_buffers(), gtk_gl_area_attach_buffers, newin "3,18") /** Check if any error is currently set on this <i>area</i>. * * The error may be obtained by using throw_if_error() and * set using set_error(). * * @newin{3,18} * * @return true if an error is currently set. */ bool has_error() const; _IGNORE(gtk_gl_area_get_error) /** Will throw the correct Glib::Error subclass if * any is currently set on this <i>area</i>. * * @newin{3,18} * * @throw Throws any currently set error (e.g. Gdk::GLError). */ void throw_if_error() const; #m4 _CONVERSION(`const Glib::Error&', `const GError*', __FR2P) /** Sets an error on the <i>area</i> which will be shown * instead of GL rendering. * * This is useful in the signal_create_context() handler * if GL context creation fails. * * @newin{3,18} * * @param error The error to set on the <i>area</i>. */ _WRAP_METHOD(void set_error(const Glib::Error& error), gtk_gl_area_set_error) /** Clears any previous set error on this <i>area</i> made with set_error(). * * @newin{3,18} */ void unset_error(); _WRAP_METHOD(bool get_has_depth_buffer() const, gtk_gl_area_get_has_depth_buffer, newin "3,18") _WRAP_METHOD(void set_has_depth_buffer(bool has_depth_buffer = true), gtk_gl_area_set_has_depth_buffer, newin "3,18") _WRAP_METHOD(bool get_has_stencil_buffer() const, gtk_gl_area_get_has_stencil_buffer, newin "3,18") _WRAP_METHOD(void set_has_stencil_buffer(bool has_stencil_buffer = true), gtk_gl_area_set_has_stencil_buffer, newin "3,18") _WRAP_METHOD(bool get_auto_render() const, gtk_gl_area_get_auto_render, newin "3,18") _WRAP_METHOD(void set_auto_render(bool auto_render = true), gtk_gl_area_set_auto_render, newin "3,18") _WRAP_METHOD(void get_required_version(int& major, int& minor) const, gtk_gl_area_get_required_version, newin "3,18") _WRAP_METHOD(void set_required_version(int major, int minor), gtk_gl_area_set_required_version, newin "3,18") _WRAP_METHOD(bool get_use_es() const, gtk_gl_area_get_use_es) _WRAP_METHOD(void set_use_es(bool use_es = true), gtk_gl_area_set_use_es) _WRAP_PROPERTY("auto-render", bool, newin "3,18") _WRAP_PROPERTY("context", Glib::RefPtr<Gdk::GLContext>, newin "3,18") _WRAP_PROPERTY("has-depth-buffer", bool, newin "3,18") _WRAP_PROPERTY("has-stencil-buffer", bool, newin "3,18") _WRAP_PROPERTY("use-es", bool) #m4 _CONVERSION(`Glib::RefPtr<Gdk::GLContext>', `GdkGLContext*', Glib::unwrap_copy($3)) _WRAP_SIGNAL(Glib::RefPtr<Gdk::GLContext> create_context(), "create_context", newin "3,18") #m4 _CONVERSION(`GdkGLContext*', `const Glib::RefPtr<Gdk::GLContext>&', Glib::wrap($3, true)) _WRAP_SIGNAL(bool render(const Glib::RefPtr<Gdk::GLContext>& context), "render", newin "3,18") _WRAP_SIGNAL(void resize(int width, int height), "resize", newin "3,18") }; } //namespace Gtk
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <MyApplicationData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <MySubMain>true</MySubMain> <MainForm>Form1</MainForm> <SingleInstance>false</SingleInstance> <ShutdownMode>0</ShutdownMode> <EnableVisualStyles>true</EnableVisualStyles> <AuthenticationMode>0</AuthenticationMode> <SaveMySettingsOnExit>true</SaveMySettingsOnExit> </MyApplicationData>
{ "pile_set_name": "Github" }
/* * 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 may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.accumulo.core.client; import static com.google.common.base.Preconditions.checkArgument; import java.io.File; import java.io.StringReader; import java.io.StringWriter; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.UUID; import org.apache.accumulo.core.conf.Property; import org.apache.accumulo.core.conf.PropertyType; import org.apache.commons.configuration2.CompositeConfiguration; import org.apache.commons.configuration2.Configuration; import org.apache.commons.configuration2.MapConfiguration; import org.apache.commons.configuration2.PropertiesConfiguration; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.apache.commons.configuration2.builder.fluent.Parameters; import org.apache.commons.configuration2.ex.ConfigurationException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; /** * Contains a list of property keys recognized by the Accumulo client and convenience methods for * setting them. * * @since 1.6.0 * @deprecated since 2.0.0, replaced by {@link Accumulo#newClient()} */ @Deprecated(since = "2.0.0") public class ClientConfiguration { private static final Logger log = LoggerFactory.getLogger(ClientConfiguration.class); public static final String USER_ACCUMULO_DIR_NAME = ".accumulo"; public static final String USER_CONF_FILENAME = "config"; public static final String GLOBAL_CONF_FILENAME = "client.conf"; private final CompositeConfiguration compositeConfig; public enum ClientProperty { // SSL RPC_SSL_TRUSTSTORE_PATH(Property.RPC_SSL_TRUSTSTORE_PATH), RPC_SSL_TRUSTSTORE_PASSWORD(Property.RPC_SSL_TRUSTSTORE_PASSWORD), RPC_SSL_TRUSTSTORE_TYPE(Property.RPC_SSL_TRUSTSTORE_TYPE), RPC_SSL_KEYSTORE_PATH(Property.RPC_SSL_KEYSTORE_PATH), RPC_SSL_KEYSTORE_PASSWORD(Property.RPC_SSL_KEYSTORE_PASSWORD), RPC_SSL_KEYSTORE_TYPE(Property.RPC_SSL_KEYSTORE_TYPE), RPC_USE_JSSE(Property.RPC_USE_JSSE), GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS(Property.GENERAL_SECURITY_CREDENTIAL_PROVIDER_PATHS), INSTANCE_RPC_SSL_CLIENT_AUTH(Property.INSTANCE_RPC_SSL_CLIENT_AUTH), INSTANCE_RPC_SSL_ENABLED(Property.INSTANCE_RPC_SSL_ENABLED), // ZooKeeper INSTANCE_ZK_HOST(Property.INSTANCE_ZK_HOST), INSTANCE_ZK_TIMEOUT(Property.INSTANCE_ZK_TIMEOUT), // Instance information INSTANCE_NAME("instance.name", null, PropertyType.STRING, "Name of Accumulo instance to connect to"), INSTANCE_ID("instance.id", null, PropertyType.STRING, "UUID of Accumulo instance to connect to"), // Tracing TRACE_SPAN_RECEIVERS(Property.TRACE_SPAN_RECEIVERS), TRACE_SPAN_RECEIVER_PREFIX(Property.TRACE_SPAN_RECEIVER_PREFIX), TRACE_ZK_PATH(Property.TRACE_ZK_PATH), // SASL / GSSAPI(Kerberos) /** * @since 1.7.0 */ INSTANCE_RPC_SASL_ENABLED(Property.INSTANCE_RPC_SASL_ENABLED), /** * @since 1.7.0 */ RPC_SASL_QOP(Property.RPC_SASL_QOP), /** * @since 1.7.0 */ KERBEROS_SERVER_PRIMARY("kerberos.server.primary", "accumulo", PropertyType.STRING, "The first component of the Kerberos principal, the 'primary', " + "that Accumulo servers use to login"); private String key; private String defaultValue; private PropertyType type; private String description; private ClientProperty(Property prop) { this(prop.getKey(), prop.getDefaultValue(), prop.getType(), prop.getDescription()); } private ClientProperty(String key, String defaultValue, PropertyType type, String description) { this.key = key; this.defaultValue = defaultValue; this.type = type; this.description = description; } public String getKey() { return key; } public String getDefaultValue() { return defaultValue; } private PropertyType getType() { return type; } public String getDescription() { return description; } public static ClientProperty getPropertyByKey(String key) { for (ClientProperty prop : ClientProperty.values()) if (prop.getKey().equals(key)) return prop; return null; } } private ClientConfiguration(List<? extends Configuration> configs) { compositeConfig = new CompositeConfiguration(configs); } /** * Attempts to load a configuration file from the system using the default search paths. Uses the * <em>ACCUMULO_CLIENT_CONF_PATH</em> environment variable, split on <em>File.pathSeparator</em>, * for a list of target files. * <p> * If <em>ACCUMULO_CLIENT_CONF_PATH</em> is not set, uses the following in this order: * <ul> * <li>~/.accumulo/config * <li><em>$ACCUMULO_CONF_DIR</em>/client.conf, if <em>$ACCUMULO_CONF_DIR</em> is defined. * <li>/etc/accumulo/client.conf * <li>/etc/accumulo/conf/client.conf * </ul> * <p> * A client configuration will then be read from each location using * <em>PropertiesConfiguration</em> to construct a configuration. That means the latest item will * be the one in the configuration. * * @see PropertiesConfiguration * @see File#pathSeparator */ public static ClientConfiguration loadDefault() { return loadFromSearchPath(getDefaultSearchPath()); } /** * Initializes an empty configuration object to be further configured with other methods on the * class. * * @since 1.9.0 */ public static ClientConfiguration create() { return new ClientConfiguration(Collections.emptyList()); } /** * Initializes a configuration object from the contents of a configuration file. Currently * supports Java "properties" files. The returned object can be further configured with subsequent * calls to other methods on this class. * * @param file * the path to the configuration file * @since 1.9.0 */ public static ClientConfiguration from
{ "pile_set_name": "Github" }
// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved. // This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. // Code generated. DO NOT EDIT. // Object Storage Service API // // Common set of Object Storage and Archive Storage APIs for managing buckets, objects, and related resources. // For more information, see Overview of Object Storage (https://docs.cloud.oracle.com/Content/Object/Concepts/objectstorageoverview.htm) and // Overview of Archive Storage (https://docs.cloud.oracle.com/Content/Archive/Concepts/archivestorageoverview.htm). // package objectstorage import ( "github.com/oracle/oci-go-sdk/v25/common" ) // SseCustomerKeyDetails Specifies the details of the customer-provided encryption key (SSE-C) associated with an object. type SseCustomerKeyDetails struct { // Specifies the encryption algorithm. The only supported value is "AES256". Algorithm SseCustomerKeyDetailsAlgorithmEnum `mandatory:"true" json:"algorithm"` // Specifies the base64-encoded 256-bit encryption key to use to encrypt or decrypt the object data. Key *string `mandatory:"true" json:"key"` // Specifies the base64-encoded SHA256 hash of the encryption key. This value is used to check the integrity // of the encryption key. KeySha256 *string `mandatory:"true" json:"keySha256"` } func (m SseCustomerKeyDetails) String() string { return common.PointerString(m) } // SseCustomerKeyDetailsAlgorithmEnum Enum with underlying type: string type SseCustomerKeyDetailsAlgorithmEnum string // Set of constants representing the allowable values for SseCustomerKeyDetailsAlgorithmEnum const ( SseCustomerKeyDetailsAlgorithmAes256 SseCustomerKeyDetailsAlgorithmEnum = "AES256" ) var mappingSseCustomerKeyDetailsAlgorithm = map[string]SseCustomerKeyDetailsAlgorithmEnum{ "AES256": SseCustomerKeyDetailsAlgorithmAes256, } // GetSseCustomerKeyDetailsAlgorithmEnumValues Enumerates the set of values for SseCustomerKeyDetailsAlgorithmEnum func GetSseCustomerKeyDetailsAlgorithmEnumValues() []SseCustomerKeyDetailsAlgorithmEnum { values := make([]SseCustomerKeyDetailsAlgorithmEnum, 0) for _, v := range mappingSseCustomerKeyDetailsAlgorithm { values = append(values, v) } return values }
{ "pile_set_name": "Github" }
gen_mipmaps=false
{ "pile_set_name": "Github" }
/* Copyright 2017 The Kubernetes 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 agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package v1 import ( meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1" types "k8s.io/apimachinery/pkg/types" watch "k8s.io/apimachinery/pkg/watch" scheme "k8s.io/client-go/kubernetes/scheme" v1 "k8s.io/client-go/pkg/apis/networking/v1" rest "k8s.io/client-go/rest" ) // NetworkPoliciesGetter has a method to return a NetworkPolicyInterface. // A group's client should implement this interface. type NetworkPoliciesGetter interface { NetworkPolicies(namespace string) NetworkPolicyInterface } // NetworkPolicyInterface has methods to work with NetworkPolicy resources. type NetworkPolicyInterface interface { Create(*v1.NetworkPolicy) (*v1.NetworkPolicy, error) Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error) Delete(name string, options *meta_v1.DeleteOptions) error DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error Get(name string, options meta_v1.GetOptions) (*v1.NetworkPolicy, error) List(opts meta_v1.ListOptions) (*v1.NetworkPolicyList, error) Watch(opts meta_v1.ListOptions) (watch.Interface, error) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) NetworkPolicyExpansion } // networkPolicies implements NetworkPolicyInterface type networkPolicies struct { client rest.Interface ns string } // newNetworkPolicies returns a NetworkPolicies func newNetworkPolicies(c *NetworkingV1Client, namespace string) *networkPolicies { return &networkPolicies{ client: c.RESTClient(), ns: namespace, } } // Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any. func (c *networkPolicies) Create(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Post(). Namespace(c.ns). Resource("networkpolicies"). Body(networkPolicy). Do(). Into(result) return } // Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any. func (c *networkPolicies) Update(networkPolicy *v1.NetworkPolicy) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Put(). Namespace(c.ns). Resource("networkpolicies"). Name(networkPolicy.Name). Body(networkPolicy). Do(). Into(result) return } // Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs. func (c *networkPolicies) Delete(name string, options *meta_v1.DeleteOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). Name(name). Body(options). Do(). Error() } // DeleteCollection deletes a collection of objects. func (c *networkPolicies) DeleteCollection(options *meta_v1.DeleteOptions, listOptions meta_v1.ListOptions) error { return c.client.Delete(). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&listOptions, scheme.ParameterCodec). Body(options). Do(). Error() } // Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any. func (c *networkPolicies) Get(name string, options meta_v1.GetOptions) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Get(). Namespace(c.ns). Resource("networkpolicies"). Name(name). VersionedParams(&options, scheme.ParameterCodec). Do(). Into(result) return } // List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors. func (c *networkPolicies) List(opts meta_v1.ListOptions) (result *v1.NetworkPolicyList, err error) { result = &v1.NetworkPolicyList{} err = c.client.Get(). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Do(). Into(result) return } // Watch returns a watch.Interface that watches the requested networkPolicies. func (c *networkPolicies) Watch(opts meta_v1.ListOptions) (watch.Interface, error) { opts.Watch = true return c.client.Get(). Namespace(c.ns). Resource("networkpolicies"). VersionedParams(&opts, scheme.ParameterCodec). Watch() } // Patch applies the patch and returns the patched networkPolicy. func (c *networkPolicies) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.NetworkPolicy, err error) { result = &v1.NetworkPolicy{} err = c.client.Patch(pt). Namespace(c.ns). Resource("networkpolicies"). SubResource(subresources...). Name(name). Body(data). Do(). Into(result) return }
{ "pile_set_name": "Github" }
using UnityEngine; using System.Collections; using System.Collections.Generic; namespace UnityEditor.XCodeEditor { public class PBXSortedDictionary : SortedDictionary<string, object> { public void Append( PBXDictionary dictionary ) { foreach( var item in dictionary) { this.Add( item.Key, item.Value ); } } public void Append<T>( PBXDictionary<T> dictionary ) where T : PBXObject { foreach( var item in dictionary) { this.Add( item.Key, item.Value ); } } } public class PBXSortedDictionary<T> : SortedDictionary<string, T> where T : PBXObject { public PBXSortedDictionary() { } public PBXSortedDictionary( PBXDictionary genericDictionary ) { foreach( KeyValuePair<string, object> currentItem in genericDictionary ) { if( ((string)((PBXDictionary)currentItem.Value)[ "isa" ]).CompareTo( typeof(T).Name ) == 0 ) { T instance = (T)System.Activator.CreateInstance( typeof(T), currentItem.Key, (PBXDictionary)currentItem.Value ); this.Add( currentItem.Key, instance ); } } } public void Add( T newObject ) { this.Add( newObject.guid, newObject ); } public void Append( PBXDictionary<T> dictionary ) { foreach( KeyValuePair<string, T> item in dictionary) { this.Add( item.Key, (T)item.Value ); } } } }
{ "pile_set_name": "Github" }
<!-- ~ Copyright (c) 2018 Martin Denham, Tuomas Airaksinen and the And Bible contributors. ~ ~ This file is part of And Bible (http://github.com/AndBible/and-bible). ~ ~ And Bible 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 License, or (at your option) any later version. ~ ~ And Bible is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; ~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ~ See the GNU General Public License for more details. ~ ~ You should have received a copy of the GNU General Public License along with And Bible. ~ If not, see http://www.gnu.org/licenses/. ~ --> <vector android:height="24dp" android:tint="#FFFFFF" android:viewportHeight="24.0" android:viewportWidth="24.0" android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android"> <path android:fillColor="#FF000000" android:pathData="M19.43,12.98c0.04,-0.32 0.07,-0.64 0.07,-0.98s-0.03,-0.66 -0.07,-0.98l2.11,-1.65c0.19,-0.15 0.24,-0.42 0.12,-0.64l-2,-3.46c-0.12,-0.22 -0.39,-0.3 -0.61,-0.22l-2.49,1c-0.52,-0.4 -1.08,-0.73 -1.69,-0.98l-0.38,-2.65C14.46,2.18 14.25,2 14,2h-4c-0.25,0 -0.46,0.18 -0.49,0.42l-0.38,2.65c-0.61,0.25 -1.17,0.59 -1.69,0.98l-2.49,-1c-0.23,-0.09 -0.49,0 -0.61,0.22l-2,3.46c-0.13,0.22 -0.07,0.49 0.12,0.64l2.11,1.65c-0.04,0.32 -0.07,0.65 -0.07,0.98s0.03,0.66 0.07,0.98l-2.11,1.65c-0.19,0.15 -0.24,0.42 -0.12,0.64l2,3.46c0.12,0.22 0.39,0.3 0.61,0.22l2.49,-1c0.52,0.4 1.08,0.73 1.69,0.98l0.38,2.65c0.03,0.24 0.24,0.42 0.49,0.42h4c0.25,0 0.46,-0.18 0.49,-0.42l0.38,-2.65c0.61,-0.25 1.17,-0.59 1.69,-0.98l2.49,1c0.23,0.09 0.49,0 0.61,-0.22l2,-3.46c0.12,-0.22 0.07,-0.49 -0.12,-0.64l-2.11,-1.65zM12,15.5c-1.93,0 -3.5,-1.57 -3.5,-3.5s1.57,-3.5 3.5,-3.5 3.5,1.57 3.5,3.5 -1.57,3.5 -3.5,3.5z"/> </vector>
{ "pile_set_name": "Github" }
using Xamarin.Forms.CustomAttributes; using Xamarin.Forms.Internals; namespace Xamarin.Forms.Controls.Issues { #if UITEST [NUnit.Framework.Category(Core.UITests.UITestCategories.Bugzilla)] #endif [Preserve(AllMembers = true)] [Issue(IssueTracker.Bugzilla, 33890, "Setting CancelButtonColor does not have any effect", PlatformAffected.iOS)] public class Bugzilla33890 : TestContentPage { protected override void Init() { Label header = new Label { Text = "Search Bar", FontAttributes = FontAttributes.Bold, FontSize = 50, HorizontalOptions = LayoutOptions.Center }; SearchBar searchBar = new SearchBar { Placeholder = "Enter anything", CancelButtonColor = Color.Red }; Label reproSteps = new Label { Text = "Tap on the search bar and enter some text. The 'Cancel' button should appear. If the 'Cancel' button is not red, this is broken.", HorizontalOptions = LayoutOptions.Center }; Content = new StackLayout { Children = { header, searchBar, reproSteps } }; } } }
{ "pile_set_name": "Github" }
/*------------------------------------------------------------------------- * * buffile.c * Management of large buffered temporary files. * * Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION * src/backend/storage/file/buffile.c * * NOTES: * * BufFiles provide a very incomplete emulation of stdio atop virtual Files * (as managed by fd.c). Currently, we only support the buffered-I/O * aspect of stdio: a read or write of the low-level File occurs only * when the buffer is filled or emptied. This is an even bigger win * for virtual Files than for ordinary kernel files, since reducing the * frequency with which a virtual File is touched reduces "thrashing" * of opening/closing file descriptors. * * Note that BufFile structs are allocated with palloc(), and therefore * will go away automatically at query/transaction end. Since the underlying * virtual Files are made with OpenTemporaryFile, all resources for * the file are certain to be cleaned up even if processing is aborted * by ereport(ERROR). The data structures required are made in the * palloc context that was current when the BufFile was created, and * any external resources such as temp files are owned by the ResourceOwner * that was current at that time. * * BufFile also supports temporary files that exceed the OS file size limit * (by opening multiple fd.c temporary files). This is an essential feature * for sorts and hashjoins on large amounts of data. * * BufFile supports temporary files that can be shared with other backends, as * infrastructure for parallel execution. Such files need to be created as a * member of a SharedFileSet that all participants are attached to. * * BufFile also supports temporary files that can be used by the single backend * when the corresponding files need to be survived across the transaction and * need to be opened and closed multiple times. Such files need to be created * as a member of a SharedFileSet. *------------------------------------------------------------------------- */ #include "postgres.h" #include "commands/tablespace.h" #include "executor/instrument.h" #include "miscadmin.h" #include "pgstat.h" #include "storage/buf_internals.h" #include "storage/buffile.h" #include "storage/fd.h" #include "utils/resowner.h" /* * We break BufFiles into gigabyte-sized segments, regardless of RELSEG_SIZE. * The reason is that we'd like large BufFiles to be spread across multiple * tablespaces when available. */ #define MAX_PHYSICAL_FILESIZE 0x40000000 #define BUFFILE_SEG_SIZE (MAX_PHYSICAL_FILESIZE / BLCKSZ) /* * This data structure represents a buffered file that consists of one or * more physical files (each accessed through a virtual file descriptor * managed by fd.c). */ struct BufFile { int numFiles; /* number of physical files in set */ /* all files except the last have length exactly MAX_PHYSICAL_FILESIZE */ File *files; /* palloc'd array with numFiles entries */ bool isInterXact; /* keep open over transactions? */ bool dirty; /* does buffer need to be written? */ bool readOnly; /* has the file been set to read only? */ SharedFileSet *fileset; /* space for segment files if shared */ const char *name; /* name of this BufFile if shared */ /* * resowner is the ResourceOwner to use for underlying temp files. (We * don't need to remember the memory context we're using explicitly, * because after creation we only repalloc our arrays larger.) */ ResourceOwner resowner; /* * "current pos" is position of start of buffer within the logical file. * Position as seen by user of BufFile is (curFile, curOffset + pos). */ int curFile; /* file index (0..n) part of current pos */ off_t curOffset; /* offset part of current pos */ int pos; /* next read/write position in buffer */ int nbytes; /* total # of valid bytes in buffer */ PGAlignedBlock buffer; }; static BufFile *makeBufFileCommon(int nfiles); static BufFile *makeBufFile(File firstfile); static void extendBufFile(BufFile *file); static void BufFileLoadBuffer(BufFile *file); static void BufFileDumpBuffer(BufFile *file); static void BufFileFlush(BufFile *file); static File MakeNewSharedSegment(BufFile *file, int segment); /* * Create BufFile and perform the common initialization. */ static BufFile * makeBufFileCommon(int nfiles) { BufFile *file = (BufFile *) palloc(sizeof(BufFile)); file->numFiles = nfiles; file->isInterXact = false; file->dirty = false; file->resowner = CurrentResourceOwner; file->curFile = 0; file->curOffset = 0L; file->pos = 0; file->nbytes = 0; return file; } /* * Create a BufFile given the first underlying physical file. * NOTE: caller must set isInterXact if appropriate. */ static BufFile * makeBufFile(File firstfile) { BufFile *file = makeBufFileCommon(1); file->files = (File *) palloc(sizeof(File)); file->files[0] = firstfile; file->readOnly = false; file->fileset = NULL; file->name = NULL; return file; } /* * Add another component temp file. */ static void extendBufFile(BufFile *file) { File pfile; ResourceOwner oldowner; /* Be sure to associate the file with the BufFile's resource owner */ oldowner = CurrentResourceOwner; CurrentResourceOwner = file->resowner; if (file->fileset == NULL) pfile = OpenTemporaryFile(file->isInterXact); else pfile = MakeNewSharedSegment(file, file->numFiles); Assert(pfile >= 0); CurrentResourceOwner = oldowner; file->files = (File *) repalloc(file->files, (file->numFiles + 1) * sizeof(File)); file->files[file->numFiles] = pfile; file->numFiles++; } /* * Create a BufFile for a new temporary file (which will expand to become * multiple temporary files if more than MAX_PHYSICAL_FILESIZE bytes are * written to it). * * If interXact is true, the temp file will not be automatically deleted * at end of transaction. * * Note: if interXact is true, the caller had better be calling us in a * memory context, and with a resource owner, that will survive across * transaction boundaries. */ BufFile * BufFileCreateTemp(bool interXact) { BufFile *file; File pfile; /* * Ensure that temp tablespaces are set up for OpenTemporaryFile to use. * Possibly the caller will have done this already, but it seems useful to * double-check here. Failure to do this at all would result in the temp * files always getting placed in the default tablespace, which is a * pretty hard-to-detect bug. Callers may prefer to do it earlier if they * want to be sure that any required catalog access is done in some other * resource context. */ PrepareTempTablespaces(); pfile = OpenTemporaryFile(interXact); Assert(pfile >= 0); file = makeBufFile(pfile); file->isInterXact = interXact; return file; } /* * Build the name for a given segment of a given BufFile. */ static void SharedSegmentName(char *name, const char *buffile_name, int segment) { snprintf(name, MAXPGPATH, "%s.%d", buffile_name, segment); } /* * Create a new segment file backing a shared BufFile. */ static File Make
{ "pile_set_name": "Github" }
/* * $Id$ * * SARL is an general-purpose agent programming language. * More details on http://www.sarl.io * * Copyright (C) 2014-2020 the original authors or 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 agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.sarl.lang.tests.modules.actionprototype; import static io.sarl.tests.api.tools.TestAssertions.assertContainsStrings; import static io.sarl.tests.api.tools.TestEObjects.file; import static io.sarl.tests.api.tools.TestEObjects.getType; import static io.sarl.tests.api.tools.TestMockito.mock; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertSame; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.junit.jupiter.api.Assertions.fail; import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Objects; import com.google.inject.Inject; import org.eclipse.emf.common.util.BasicEList; import org.eclipse.emf.common.util.ECollections; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.xtend.core.xtend.XtendParameter; import org.eclipse.xtext.common.types.JvmAnnotationReference; import org.eclipse.xtext.common.types.JvmAnnotationType; import org.eclipse.xtext.common.types.JvmFormalParameter; import org.eclipse.xtext.common.types.JvmIdentifiableElement; import org.eclipse.xtext.common.types.JvmTypeReference; import org.eclipse.xtext.common.types.TypesPackage; import org.eclipse.xtext.xbase.XExpression; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.mockito.ArgumentMatchers; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; import org.opentest4j.AssertionFailedError; import io.sarl.lang.annotation.DefaultValue; import io.sarl.lang.sarl.SarlAction; import io.sarl.lang.sarl.SarlAgent; import io.sarl.lang.sarl.SarlFormalParameter; import io.sarl.lang.sarl.SarlScript; import io.sarl.lang.sarl.actionprototype.ActionParameterTypes; import io.sarl.lang.sarl.actionprototype.ActionPrototype; import io.sarl.lang.sarl.actionprototype.DefaultActionPrototypeProvider; import io.sarl.lang.sarl.actionprototype.FormalParameterProvider; import io.sarl.lang.sarl.actionprototype.IActionPrototypeContext; import io.sarl.lang.sarl.actionprototype.InferredPrototype; import io.sarl.lang.sarl.actionprototype.InferredStandardParameter; import io.sarl.lang.sarl.actionprototype.InferredValuedParameter; import io.sarl.lang.sarl.actionprototype.QualifiedActionName; import io.sarl.tests.api.AbstractSarlTest; import io.sarl.tests.api.Nullable; /** * @author $Author: sgalland$ * @version $FullVersion$ * @mavengroupid $GroupId$ * @mavenartifactid $ArtifactId$ */ @SuppressWarnings({"javadoc", "nls", "incomplete-switch"}) @DisplayName("DefaultActionPrototypeProvider") @Tag("core") @Tag("unit") public class DefaultActionPrototypeProviderTest extends AbstractSarlTest { static int index; static JvmIdentifiableElement createJvmIdentifiableElementStub() { ++index; Resource resource = mock(Resource.class); when(resource.getURI()).thenReturn(URI.createFileURI("/path/to/io/sarl/tests/Stub" + index + ".sarl")); JvmIdentifiableElement container = mock(JvmIdentifiableElement.class); when(container.eResource()).thenReturn(resource); when(container.getQualifiedName()).thenReturn("io.sarl.tests.Stub" + index); return container; } static void assertSameFormalParameters(List<? extends XtendParameter> expected, FormalParameterProvider actual) { assertEquals(expected.size(), actual.getFormalParameterCount()); for (int i = 0; i < expected.size(); ++i) { assertEquals(expected.get(i).getName(), actual.getFormalParameterName(i)); assertEquals(expected.get(i).getParameterType().getQualifiedName(), actual.getFormalParameterType(i, false)); if (expected.get(i) instanceof SarlFormalParameter) { assertSame(((SarlFormalParameter) expected.get(i)).getDefaultValue(), actual.getFormalParameterDefaultValue(i)); } else { assertNull(actual.getFormalParameterDefaultValue(i)); } } } static void assertSameJvmFormalParameters(List<? extends JvmFormalParameter> expected, FormalParameterProvider actual) { assertEquals(expected.size(), actual.getFormalParameterCount()); for (int i = 0; i < expected.size(); ++i) { assertEquals(expected.get(i).getName(), actual.getFormalParameterName(i)); assertEquals(expected.get(i).getParameterType().getQualifiedName(), actual.getFormalParameterType(i, false)); } } private static boolean matchPrototype(List<InferredStandardParameter> parameters, Object[] expected) { int i = 0; for (InferredStandardParameter parameter : parameters) { if (i >= expected.length || !((Class<?>) expected[i]).isInstance(parameter)) { return false; } ++i; if (i >= expected.length || !parameter.getType().getIdentifier().equals(expected[i])) { return false; } ++i; if (i >= expected.length || !parameter.getName().equals(expected[i])) { return false; } ++i; if (parameter instanceof InferredValuedParameter) { String arg = ((InferredValuedParameter) parameter).getCallingArgument(); if (i >= expected.length || !arg.equals(expected[i])) { return false; } ++i; } } return true; } private static void assertPrototypes( List<InferredStandardParameter> parameters, Collection<Object[]> expected, Object[][] originalExpected) { Iterator<Object[]> iterator = expected.iterator(); while (iterator.hasNext()) { if (matchPrototype(parameters, iterator.next())) { iterator.remove(); return; } } throw new AssertionFailedError("Not same parameter prototype.", parameters.toString(),
{ "pile_set_name": "Github" }
#include "MasterPlayer.h" #include "Chat.h" #include "Language.h" #include "World.h" #include "Channel.h" #include "ChannelMgr.h" #include "Player.h" // ######################## CHAT SYSTEM ########################### void MasterPlayer::UpdateSpeakTime() { // ignore chat spam protection for GMs in any mode if (GetSession()->GetSecurity() > SEC_PLAYER) return; time_t current = time(NULL); if (m_speakTime > current) { uint32 max_count = sWorld.getConfig(CONFIG_UINT32_CHATFLOOD_MESSAGE_COUNT); if (!max_count) return; ++m_speakCount; if (m_speakCount >= max_count) { // prevent overwrite mute time, if message send just before mutes set, for example. time_t new_mute = current + sWorld.getConfig(CONFIG_UINT32_CHATFLOOD_MUTE_TIME); if (GetSession()->m_muteTime < new_mute) GetSession()->m_muteTime = new_mute; m_speakCount = 0; } } else m_speakCount = 0; m_speakTime = current + sWorld.getConfig(CONFIG_UINT32_CHATFLOOD_MESSAGE_DELAY); } void MasterPlayer::Whisper(const std::string& text, uint32 language, MasterPlayer* receiver) { if (language != LANG_ADDON) // if not addon data language = LANG_UNIVERSAL; // whispers should always be readable WorldPacket data(SMSG_MESSAGECHAT, 100); Player::BuildPlayerChat(GetObjectGuid(), chatTag(), &data, CHAT_MSG_WHISPER, text, language); receiver->GetSession()->SendPacket(&data); // not send confirmation for addon messages if (language != LANG_ADDON) { data.Initialize(SMSG_MESSAGECHAT, 100); Player::BuildPlayerChat(receiver->GetObjectGuid(), receiver->chatTag(), &data, CHAT_MSG_WHISPER_INFORM, text, language); GetSession()->SendPacket(&data); } ALL_SESSION_SCRIPTS(receiver->GetSession(), OnWhispered(GetObjectGuid())); if (receiver->isDND()) { data.Initialize(SMSG_MESSAGECHAT, 100); Player::BuildPlayerChat(receiver->GetObjectGuid(), receiver->chatTag(), &data, CHAT_MSG_DND, receiver->dndMsg, language); GetSession()->SendPacket(&data); } else if (receiver->isAFK()) { data.Initialize(SMSG_MESSAGECHAT, 100); Player::BuildPlayerChat(receiver->GetObjectGuid(), receiver->chatTag(), &data, CHAT_MSG_AFK, receiver->afkMsg, language); GetSession()->SendPacket(&data); } if (!IsAcceptWhispers()) AddAllowedWhisperer(receiver->GetObjectGuid()); } void MasterPlayer::ToggleDND() { if (m_chatTag == 2) m_chatTag = 0; else m_chatTag = 2; } void MasterPlayer::ToggleAFK() { if (m_chatTag == 1) m_chatTag = 0; else m_chatTag = 1; } void MasterPlayer::JoinedChannel(Channel *c) { m_channels.push_back(c); } void MasterPlayer::LeftChannel(Channel *c) { m_channels.remove(c); } void MasterPlayer::CleanupChannels() { while (!m_channels.empty()) { Channel* ch = *m_channels.begin(); m_channels.erase(m_channels.begin()); // remove from player's channel list ch->Leave(GetObjectGuid(), false); // not send to client, not remove from player's channel list if (ChannelMgr* cMgr = channelMgr(GetTeam())) cMgr->LeftChannel(ch->GetName()); // deleted channel if empty } }
{ "pile_set_name": "Github" }
# Installation See http://caffe.berkeleyvision.org/installation.html for the latest installation instructions. Check the users group in case you need help: https://groups.google.com/forum/#!forum/caffe-users
{ "pile_set_name": "Github" }
#!@BASH_SHELL@ # # Copyright (C) 1997-2003 Sistina Software, Inc. All rights reserved. # Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved. # # 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 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # # File system common functions # LC_ALL=C LANG=C PATH=/bin:/sbin:/usr/bin:/usr/sbin export LC_ALL LANG PATH # Define this value to 0 by default, bind-mount.sh or any other agent # that uses this value will alter it after sourcing fs-lib.sh export IS_BIND_MOUNT=0 # Private return codes FAIL=2 NO=1 YES=0 YES_STR="yes" [ -z "$OCF_RESOURCE_INSTANCE" ] && export OCF_RESOURCE_INSTANCE="filesystem:$OCF_RESKEY_name" # # Using a global to contain the return value saves # clone() operations. This is important to reduce # resource consumption during status checks. # # There is no way to return a string from a function # in bash without cloning the process, which is exactly # what we are trying to avoid. So, we have to resort # to using a dedicated global variables. declare REAL_DEVICE declare STRIP_SLASHES="" declare FINDMNT_OUTPUT="" # # Stub ocf_log function for when we are using # quick_status, since ocf_log generally forks (and # sourcing ocf-shellfuncs forks -a lot-). # ocf_log() { echo $* } # # Assume NFS_TRICKS are not available until we are # proved otherwise. # export NFS_TRICKS=1 # # Quick status doesn't fork() or clone() when using # device files directly. (i.e. not symlinks, LABEL= or # UUID= # if [ "$1" = "status" -o "$1" = "monitor" ] && [ "$OCF_RESKEY_quick_status" = "1" ]; then echo Using Quick Status # XXX maybe we can make ocf-shellfuncs have a 'quick' mode too? export OCF_SUCCESS=0 export OCF_ERR_GENERIC=1 else # # Grab nfs lock tricks if available # if [ -f "$(dirname $0)/svclib_nfslock" ]; then . $(dirname $0)/svclib_nfslock NFS_TRICKS=0 fi . $(dirname $0)/ocf-shellfuncs fi verify_name() { if [ -z "$OCF_RESKEY_name" ]; then ocf_log err "No file system name specified." return $OCF_ERR_ARGS fi return $OCF_SUCCESS } verify_mountpoint() { if [ -z "$OCF_RESKEY_mountpoint" ]; then ocf_log err "No mount point specified." return $OCF_ERR_ARGS fi if ! [ -e "$OCF_RESKEY_mountpoint" ]; then ocf_log info "Mount point $OCF_RESKEY_mountpoint will be "\ "created at mount time." return $OCF_SUCCESS fi [ -d "$OCF_RESKEY_mountpoint" ] && return $OCF_SUCCESS ocf_log err "$OCF_RESKEY_mountpoint exists but is not a directory." return $OCF_ERR_ARGS } # # This used to be called using $(...), but doing this causes bash # to set up a pipe and clone(). So, the output of this function is # stored in the global variable REAL_DEVICE, declared previously. # real_device() { declare dev="$1" declare realdev if [ $IS_BIND_MOUNT -eq 1 ]; then REAL_DEVICE="$dev" return $OCF_SUCCESS fi REAL_DEVICE="" [ -z "$dev" ] && return $OCF_ERR_ARGS # Oops, we have a link. Sorry, this is going to fork. if [ -h "$dev" ]; then realdev=$(readlink -f $dev) if [ $? -ne 0 ]; then return $OCF_ERR_ARGS fi REAL_DEVICE="$realdev" return $OCF_SUCCESS fi # If our provided blockdev is a device, we are done if [ -b "$dev" ]; then REAL_DEVICE="$dev" return $OCF_SUCCESS fi # It's not a link, it's not a block device. If it also # does not match UUID= or LABEL=, then findfs is not # going to find anything useful, so we should quit now. if [ "${dev/UUID=/}" = "$dev" ] && [ "${dev/LABEL=/}" = "$dev" ]; then return $OCF_ERR_GENERIC fi # When using LABEL= or UUID=, we can't save a fork. realdev=$(findfs "$dev" 2> /dev/null) if [ -n "$realdev" ] && [ -b "$realdev" ]; then REAL_DEVICE="$realdev" return $OCF_SUCCESS fi return $OCF_ERR_GENERIC } verify_device() { declare realdev if [ -z "$OCF_RESKEY_device" ]; then ocf_log err "No device or label specified." return $OCF_ERR_ARGS fi real_device "$OCF_RESKEY_device" realdev="$REAL_DEVICE" if [ -n "$realdev" ]; then if [ "$realdev" != "$OCF_RESKEY_device" ]; then ocf_log info "Specified $OCF_RESKEY_device maps to $realdev" fi return $OCF_SUCCESS fi ocf_log err "Device or label \"$OCF_RESKEY_device\" not valid" return $OCF_ERR_ARGS } list_mounts() { if [ $IS_BIND_MOUNT -eq 1 ]; then cat /etc/mtab else cat /proc/mounts fi } ## # Tries to use findmnt util to return list # of mountpoints for a device # # Global variables are used to reduce forking when capturing stdout. # # Return values # 0 - device mount points found, mountpoint list returned to FINDMNT_OUTPUT global variable # 1 - device mount not found # 2 - findmnt tool isn't found or can not be used # ## try_findmnt() { FINDMNT_OUTPUT="" case $OCF_RESKEY_use_findmnt in 0|false|no|off) return 2 ;; *) : ;; esac which findmnt > /dev/null 2>&1 if [ $? -eq 0 ]; then FINDMNT_OUTPUT="$(findmnt -o TARGET --noheadings $1)" if [ $? -ne 0 ]; then # workaround mount helpers inconsistency that still # add / on the device entry in /proc/mounts FINDMNT_OUTPUT="$(findmnt -o TARGET --noheadings $1/)" if [ $? -ne 0 ]; then return 1 else return 0 fi else return 0 fi fi return 2 } ## #
{ "pile_set_name": "Github" }
package de.fhpotsdam.unfolding.geo; import processing.core.PApplet; import processing.core.PVector; import de.fhpotsdam.unfolding.core.Coordinate; public abstract class AbstractProjection { public float zoom; public Transformation transformation; public AbstractProjection() { this(0); } public AbstractProjection(float zoom) { this(zoom, new Transformation(1, 0, 0, 0, 1, 0)); } public AbstractProjection(float zoom, Transformation transformation) { this.zoom = zoom; this.transformation = transformation; } public abstract PVector rawProject(PVector point); public abstract PVector rawUnproject(PVector point); public PVector project(PVector point) { point = this.rawProject(point); if (this.transformation != null) { point = this.transformation.transform(point); } return point; } public PVector unproject(PVector point) { if (this.transformation != null) { point = this.transformation.untransform(point); } point = this.rawUnproject(point); return point; } public Coordinate locationCoordinate(Location location) { PVector point = new PVector(PApplet.PI * location.y / 180.0f, PApplet.PI * location.x / 180.0f); point = this.project(point); return new Coordinate(point.y, point.x, this.zoom); } public Location coordinateLocation(Coordinate coordinate) { coordinate = coordinate.zoomTo(this.zoom); PVector point = new PVector(coordinate.column, coordinate.row); point = this.unproject(point); return new Location(180.0f * point.y / PApplet.PI, 180.0f * point.x / PApplet.PI); } }
{ "pile_set_name": "Github" }
package org.chat21.android.core.chat_groups.listeners; import org.chat21.android.core.exception.ChatRuntimeException; import org.chat21.android.core.chat_groups.models.ChatGroup; /** * Created by stefanodp91 on 24/01/18. */ public interface ChatGroupsListener { void onGroupAdded(ChatGroup chatGroup, ChatRuntimeException e); void onGroupChanged(ChatGroup chatGroup, ChatRuntimeException e); void onGroupRemoved(ChatRuntimeException e); }
{ "pile_set_name": "Github" }
import merge from 'webpack-merge' import font from './font' import html from './html' import image from './image' import javaScript from './javascript' import style from './style' import txt from './txt' import video from './video' import yaml from './yaml' const loaders = [ font, html, image, javaScript, style, txt, video, yaml ] export default (saguiConfig) => { const disableLoaders = saguiConfig.disableLoaders || [] return loaders.filter((loader) => disableLoaders.indexOf(loader.name) === -1) .reduce((webpackConfig, loader) => ( merge.smart(webpackConfig, loader.configure(saguiConfig)) ), {}) }
{ "pile_set_name": "Github" }
--- title: Starting and Pausing a Miniport Adapter Overview description: Starting and Pausing a Miniport Adapter Overview ms.assetid: d278b331-90d9-4d19-bf00-732981962522 keywords: - miniport adapters WDK networking , starting - adapters WDK networking , starting - miniport adapters WDK networking , pausing - adapters WDK networking , pausing ms.date: 04/20/2017 ms.localizationpriority: medium --- # Starting and Pausing a Miniport Adapter Overview NDIS pauses an adapter to stop data flow that could interfere with Plug and Play operations, such as adding or removing a filter driver, or requests, such as setting a packet filter or multicast address list on the NIC. For more information about how to modify a running driver stack, see [Modifying a Running Driver Stack](modifying-a-running-driver-stack.md). NDIS restarts an adapter from the Paused state. The adapter enters the Paused start after adapter initialization is complete or after a pause operation is complete. The following topics provide more information about starting and pausing and adapter: - [Starting an Adapter](starting-an-adapter.md) - [Pausing an Adapter](pausing-an-adapter.md)
{ "pile_set_name": "Github" }
//Microsoft Developer Studio generated resource script. // #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // // Generated from the TEXTINCLUDE 2 resource. // #include "afxres.h" ///////////////////////////////////////////////////////////////////////////// #undef APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// // English (U.S.) resources #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) #ifdef _WIN32 LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US #pragma code_page(1252) #endif //_WIN32 #ifndef _MAC ///////////////////////////////////////////////////////////////////////////// // // Version // #include "common/my_version.h" VS_VERSION_INFO VERSIONINFO FILEVERSION MY_VERSION_BINARY PRODUCTVERSION MY_VERSION_BINARY FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L #else FILEFLAGS 0x0L #endif FILEOS 0x40004L FILETYPE 0x2L FILESUBTYPE 0x0L BEGIN BLOCK "StringFileInfo" BEGIN BLOCK "040904b0" BEGIN VALUE "Comments", "\0" VALUE "CompanyName", MY_COMPANY_NAME_STRING "\0" VALUE "FileDescription", MY_PRODUCT_NAME_STRING " Service\0" VALUE "FileVersion", MY_VERSION_STRING "\0" OPTIONAL_VALUE("InternalName", "SbieSvc\0") VALUE "LegalCopyright", MY_COPYRIGHT_STRING "\0" VALUE "LegalTrademarks", "\0" OPTIONAL_VALUE("OriginalFilename", "SbieSvc.exe\0") VALUE "PrivateBuild", "\0" VALUE "ProductName", MY_PRODUCT_NAME_STRING "\0" VALUE "ProductVersion", MY_VERSION_STRING "\0" VALUE "SpecialBuild", "\0" END END BLOCK "VarFileInfo" BEGIN VALUE "Translation", 0x409, 1200 END END #endif // !_MAC #endif // English (U.S.) resources /////////////////////////////////////////////////////////////////////////////
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Release|Win32"> <Configuration>Release</Configuration> <Platform>Win32</Platform> </ProjectConfiguration> </ItemGroup> <PropertyGroup Label="Globals"> <ProjectGUID>{59D12AB8-F55F-4EE4-99CC-76A51ACB3036}</ProjectGUID> <Keyword>Win32Proj</Keyword> <Platform>Win32</Platform> <ProjectName>rdjpgcom</ProjectName> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> <ConfigurationType>Application</ConfigurationType> <UseOfMfc>false</UseOfMfc> <CharacterSet>MultiByte</CharacterSet> <PlatformToolset>v140</PlatformToolset> </PropertyGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> <ImportGroup Label="ExtensionSettings"> </ImportGroup> <ImportGroup Label="PropertySheets"> <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> </ImportGroup> <PropertyGroup Label="UserMacros" /> <PropertyGroup> <_ProjectFileVersion>10.0.20506.1</_ProjectFileVersion> <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32\Release\</OutDir> <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">rdjpgcom.dir\Release\</IntDir> <TargetName Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">rdjpgcom</TargetName> <TargetExt Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.exe</TargetExt> <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental> <GenerateManifest Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</GenerateManifest> </PropertyGroup> <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> <ClCompile> <AdditionalIncludeDirectories>C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32;C:\Esenthel\ThirdPartyLibs\JpegTurbo\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <AssemblerListingLocation>Release/</AssemblerListingLocation> <CompileAs>CompileAsC</CompileAs> <DisableSpecificWarnings>4996</DisableSpecificWarnings> <ExceptionHandling> </ExceptionHandling> <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion> <Optimization>MaxSpeed</Optimization> <PrecompiledHeader>NotUsing</PrecompiledHeader> <RuntimeLibrary>MultiThreaded</RuntimeLibrary> <WarningLevel>Level3</WarningLevel> <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WITH_SIMD;CMAKE_INTDIR="Release";%(PreprocessorDefinitions)</PreprocessorDefinitions> <ObjectFileName>$(IntDir)</ObjectFileName> <DebugInformationFormat></DebugInformationFormat> </ClCompile> <ResourceCompile> <PreprocessorDefinitions>WIN32;_WINDOWS;NDEBUG;WITH_SIMD;CMAKE_INTDIR=\"Release\";%(PreprocessorDefinitions)</PreprocessorDefinitions> <AdditionalIncludeDirectories>C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32;C:\Esenthel\ThirdPartyLibs\JpegTurbo\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> </ResourceCompile> <Midl> <AdditionalIncludeDirectories>C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32;C:\Esenthel\ThirdPartyLibs\JpegTurbo\lib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> <OutputDirectory>$(ProjectDir)/$(IntDir)</OutputDirectory> <HeaderFileName>%(Filename).h</HeaderFileName> <TypeLibraryName>%(Filename).tlb</TypeLibraryName> <InterfaceIdentifierFileName>%(Filename)_i.c</InterfaceIdentifierFileName> <ProxyFileName>%(Filename)_p.c</ProxyFileName> </Midl> <Link> <AdditionalOptions> /machine:X86 %(AdditionalOptions)</AdditionalOptions> <AdditionalDependencies>kernel32.lib;user32.lib;gdi32.lib;winspool.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;comdlg32.lib;advapi32.lib</AdditionalDependencies> <AdditionalLibraryDirectories>%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <GenerateDebugInformation>false</GenerateDebugInformation> <IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries> <ImportLibrary>C:/Esenthel/ThirdPartyLibs/JpegTurbo/Windows32/Release/rdjpgcom.lib</ImportLibrary> <ProgramDataBaseFile>C:/Esenthel/ThirdPartyLibs/JpegTurbo/Windows32/Release/rdjpgcom.pdb</ProgramDataBaseFile> <SubSystem>Console</SubSystem> <Version></Version> </Link> <ProjectReference> <LinkLibraryDependencies>false</LinkLibraryDependencies> </ProjectReference> </ItemDefinitionGroup> <ItemGroup> <CustomBuild Include="C:\Esenthel\ThirdPartyLibs\JpegTurbo\lib\CMakeLists.txt"> <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Building Custom Rule C:/Esenthel/ThirdPartyLibs/JpegTurbo/lib/CMakeLists.txt</Message> <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">setlocal "C:\Program Files (x86)\CMake\bin\cmake.exe" -HC:/Esenthel/ThirdPartyLibs/JpegTurbo/lib -BC:/Esenthel/ThirdPartyLibs/JpegTurbo/Windows32 --check-stamp-file C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32\CMakeFiles\generate.stamp if %errorlevel% neq 0 goto :cmEnd :cmEnd endlocal &amp; call :cmErrorLevel %errorlevel% &amp; goto :cmDone :cmErrorLevel exit /b %1 :cmDone if %errorlevel% neq 0 goto :VCEnd</Command> <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">C:/Esenthel/ThirdPartyLibs/JpegTurbo/lib/CMakeLists.txt;C:\Esenthel\ThirdPartyLibs\JpegTurbo\lib\CMakeLists.txt;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeDetermineSystem.cmake;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeSystem.cmake.in;C:\Esenthel\ThirdPartyLibs\JpegTurbo\Windows32\CMakeFiles\3.3.1\CMakeSystem.cmake;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeSystemSpecificInitialize.cmake;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeDetermineCCompiler.cmake;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeDetermineCompiler.cmake;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeDetermineCompilerId.cmake;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeCompilerIdDetection.cmake;C:\Program Files (x86)\CMake\share\cmake-3.3\Modules\CMakeParseArguments.cmake;C:\Program Files (x86)\CMake\share\
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="theme-color" content="#000000" /> <meta name="description" content="Web site created using create-react-app" /> <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" /> <!-- manifest.json provides metadata used when your web app is installed on a user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/ --> <link rel="manifest" href="%PUBLIC_URL%/manifest.json" /> <!-- Notice the use of %PUBLIC_URL% in the tags above. It will be replaced with the URL of the `public` folder during the build. Only files inside the `public` folder can be referenced from the HTML. Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will work correctly both with client-side routing and a non-root public URL. Learn how to configure a non-root public URL by running `npm run build`. --> <title>React Spinner</title> </head> <body> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> <!-- This HTML file is a template. If you open it directly in the browser, you will see an empty page. You can add webfonts, meta tags, or analytics to this file. The build step will place the bundled scripts into the <body> tag. To begin the development, run `npm start` or `yarn start`. To create a production bundle, use `npm run build` or `yarn build`. --> </body> </html>
{ "pile_set_name": "Github" }
crlf crlf lf crlf crlf
{ "pile_set_name": "Github" }
{ "name": "data-generator", "version": "0.1.0", "description": "Demonstrates how to use basic dataset API, including fitting a model", "main": "index.js", "license": "Apache-2.0", "dependencies": { "@babel/plugin-transform-runtime": "^7.2.0", "@tensorflow/tfjs": "^1.3.2", "@tensorflow/tfjs-vis": "^1.0.3" }, "scripts": { "link-local": "yalc link", "watch": "cross-env NODE_ENV=development parcel index.html --no-hmr --open", "build": "cross-env NODE_ENV=production parcel build index.html --no-minify --public-url ./" }, "devDependencies": { "babel-core": "^6.26.3", "babel-plugin-transform-runtime": "^6.23.0", "babel-polyfill": "^6.26.0", "babel-preset-env": "^1.7.0", "clang-format": "^1.2.4", "cross-env": "^5.2.0", "parcel-bundler": "^1.11.0", "ts-node": "^7.0.1", "tslint": "^5.12.0", "typescript": "^3.2.2", "yalc": "^1.0.0-pre.27" } }
{ "pile_set_name": "Github" }
{ "created_at": "2015-02-27T22:28:57.552454", "description": "File/Directory Generator inspired by rails generators", "fork": false, "full_name": "lightsofapollo/file-generator", "language": "JavaScript", "updated_at": "2015-02-27T23:43:41.803770" }
{ "pile_set_name": "Github" }
/* * Copyright 2000-2016 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.intellij.openapi.fileEditor.impl; import com.intellij.ide.highlighter.HighlighterFactory; import consulo.disposer.Disposable; import com.intellij.openapi.command.CommandProcessor; import com.intellij.openapi.fileEditor.ex.FileEditorWithProvider; import consulo.logging.Logger; import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.EditorFactory; import com.intellij.openapi.editor.LogicalPosition; import com.intellij.openapi.editor.ex.EditorEx; import com.intellij.openapi.editor.highlighter.EditorHighlighter; import com.intellij.openapi.fileEditor.*; import com.intellij.openapi.fileEditor.ex.FileEditorManagerEx; import com.intellij.openapi.fileEditor.impl.text.TextEditorPsiDataProvider; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectManager; import com.intellij.openapi.project.ProjectManagerAdapter; import com.intellij.openapi.util.*; import com.intellij.openapi.vfs.VfsUtilCore; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.psi.PsiDocumentManager; import com.intellij.psi.PsiFile; import com.intellij.psi.PsiManager; import com.intellij.testFramework.LightVirtualFile; import com.intellij.util.IncorrectOperationException; import com.intellij.util.containers.HashMap; import consulo.fileEditor.impl.EditorComposite; import consulo.fileEditor.impl.EditorWindow; import consulo.fileEditor.impl.EditorsSplitters; import consulo.fileEditor.impl.text.TextEditorProvider; import consulo.ui.annotation.RequiredUIAccess; import consulo.ui.UIAccess; import org.jdom.Element; import javax.annotation.Nonnull; import javax.swing.*; import java.awt.*; import java.util.Collections; import java.util.LinkedList; import java.util.List; import java.util.Map; final class TestEditorManagerImpl extends FileEditorManagerEx implements Disposable { private static final Logger LOG = Logger.getInstance(TestEditorManagerImpl.class); private final TestEditorSplitter myTestEditorSplitter = new TestEditorSplitter(); private final Project myProject; private int counter = 0; private final Map<VirtualFile, Editor> myVirtualFile2Editor = new HashMap<>(); private VirtualFile myActiveFile; private static final LightVirtualFile LIGHT_VIRTUAL_FILE = new LightVirtualFile("Dummy.java"); public TestEditorManagerImpl(@Nonnull Project project) { myProject = project; registerExtraEditorDataProvider(new TextEditorPsiDataProvider(), null); project.getMessageBus().connect().subscribe(ProjectManager.TOPIC, new ProjectManagerAdapter() { @Override public void projectClosed(Project project, UIAccess uiAccess) { if (project == myProject) { closeAllFiles(); } } }); } @Override @Nonnull public Pair<FileEditor[], FileEditorProvider[]> openFileWithProviders(@Nonnull final VirtualFile file, final boolean focusEditor, boolean searchForSplitter) { final Ref<Pair<FileEditor[], FileEditorProvider[]>> result = new Ref<>(); CommandProcessor.getInstance().executeCommand(myProject, () -> result.set(openFileImpl3(file, focusEditor)), "", null); return result.get(); } private Pair<FileEditor[], FileEditorProvider[]> openFileImpl3(final VirtualFile file, boolean focusEditor) { // for non-text editors. uml, etc final FileEditorProvider provider = file.getUserData(FileEditorProvider.KEY); if (provider != null && provider.accept(getProject(), file)) { return Pair.create(new FileEditor[]{provider.createEditor(getProject(), file)}, new FileEditorProvider[]{provider}); } //text editor Editor editor = openTextEditor(new OpenFileDescriptor(myProject, file), focusEditor); assert editor != null; final FileEditor fileEditor = TextEditorProvider.getInstance().getTextEditor(editor); final FileEditorProvider fileEditorProvider = getProvider(); Pair<FileEditor[], FileEditorProvider[]> result = Pair.create(new FileEditor[]{fileEditor}, new FileEditorProvider[]{fileEditorProvider}); modifyTabWell(new Runnable() { @Override public void run() { myTestEditorSplitter.openAndFocusTab(file, fileEditor, fileEditorProvider); } }); return result; } private void modifyTabWell(Runnable tabWellModification) { FileEditor lastFocusedEditor = myTestEditorSplitter.getFocusedFileEditor(); VirtualFile lastFocusedFile = myTestEditorSplitter.getFocusedFile(); FileEditorProvider oldProvider = myTestEditorSplitter.getProviderFromFocused(); tabWellModification.run(); FileEditor currentlyFocusedEditor = myTestEditorSplitter.getFocusedFileEditor(); VirtualFile currentlyFocusedFile = myTestEditorSplitter.getFocusedFile(); FileEditorProvider newProvider = myTestEditorSplitter.getProviderFromFocused(); final FileEditorManagerEvent event = new FileEditorManagerEvent(this, lastFocusedFile, lastFocusedEditor, oldProvider, currentlyFocusedFile, currentlyFocusedEditor, newProvider); final FileEditorManagerListener publisher = getProject().getMessageBus().syncPublisher(FileEditorManagerListener.FILE_EDITOR_MANAGER); notifyPublisher(new Runnable() { @Override public void run() { publisher.selectionChanged(event); } }); } @RequiredUIAccess @Nonnull @Override public Pair<FileEditor[], FileEditorProvider[]> openFileWithProviders(@Nonnull VirtualFile file, boolean focusEditor, @Nonnull EditorWindow window) { return openFileWithProviders(file, focusEditor, false); } @Override public boolean isInsideChange() { return false; } @Nonnull @Override public ActionCallback notifyPublisher(@Nonnull Runnable runnable) { runnable.run(); return ActionCallback.DONE; } @Override public EditorsSplitters getSplittersFor(Component c) { return null; } @Override public void createSplitter(int orientation, EditorWindow window) { String containerName = createNewTabbedContainerName(); myTestEditorSplitter.setActiveTabGroup(containerName); } private String createNewTabbedContainerName() { counter++; return "SplitTabContainer" + ((Object) counter).toString(); } @Override public void changeSplitterOrientation() { } @Override public void flipTabs() { } @Override public boolean tabsMode() { return false; } @Override public boolean isInSplitter() { return false; } @Override public boolean hasOpenedFile() { return false; } @Override public VirtualFile getCurrentFile() { return myActiveFile; } @Override public FileEditorWithProvider getSelectedEditorWithProvider(@Nonnull VirtualFile file) { return null; } @Override
{ "pile_set_name": "Github" }
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("ModalNavigation.UWP")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("ModalNavigation.UWP")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)]
{ "pile_set_name": "Github" }
# -*- coding: utf-8; mode: snippet -*- # name: if(boolean-condition-from-kill-ring) { debugger; } # key: d # contributor: Chen Bin <chenbin DOT sh AT gmail> # -- if(${1:`(car kill-ring)`}) { console.clear(); debugger; }
{ "pile_set_name": "Github" }
![logo](indy-logo.png) * [Plenum Byzantine Fault Tolerant Protocol](#plenum-byzantine-fault-tolerant-protocol) * [Technical Overview of Indy Plenum](#technical-overview-of-indy-plenum) * [Other Documentation](#other-documentation) * [Indy Plenum Repository Structure](#indy-plenum-repository-structure) * [Dependencies](#dependencies) * [Contact Us](#contact-us) * [How to Contribute](#how-to-contribute) * [How to Start Working with the Code](#how-to-start-working-with-the-code) * [Try Plenum Locally](#try-plenum-locally) ## Plenum Byzantine Fault Tolerant Protocol Plenum is the heart of the distributed ledger technology inside Hyperledger Indy. As such, it provides features somewhat similar in scope to those found in Fabric. However, it is special-purposed for use in an identity system, whereas Fabric is general purpose. ## Technical Overview of Indy Plenum Refer to our documentation site at [indy.readthedocs.io](https://hyperledger-indy.readthedocs.io/projects/plenum/en/latest/index.html) for the most current documentation and walkthroughs. Please find the general overview of the system in [Overview of the system](docs/source/main.md). Plenum's consensus protocol which is based on [RBFT](https://pakupaku.me/plaublin/rbft/5000a297.pdf) is described in [consensus protocol diagram](docs/source/diagrams/consensus-protocol.png). More documentation can be found in [docs](docs). ## Other Documentation - Please have a look at aggregated documentation at [indy-node-documentation](https://github.com/hyperledger/indy-node/blob/master/README.md) which describes workflows and setup scripts common for both projects. ## Indy Plenum Repository Structure - plenum: - the main codebase for plenum including Byzantine Fault Tolerant Protocol based on [RBFT](https://pakupaku.me/plaublin/rbft/5000a297.pdf) - common: - common and utility code - crypto: - basic crypto-related code (in particular, [indy-crypto](https://github.com/hyperledger/indy-crypto) wrappers) - ledger: - Provides a simple, python-based, immutable, ordered log of transactions backed by a merkle tree. - This is an efficient way to generate verifiable proofs of presence and data consistency. - The scope of concerns here is fairly narrow; it is not a full-blown distributed ledger technology like Fabric, but simply the persistence mechanism that Plenum needs. - state: - state storage using python 3 version of Ethereum's Patricia Trie - stp: - secure transport abstraction - it has [ZeroMQ](http://zeromq.org/) implementations - storage: - key-value storage abstractions - contains [leveldb](http://leveldb.org/) implementation as the main key-valued storage used in Plenum (for ledger, state, etc.) ## Dependencies - Plenum makes extensive use of coroutines and the async/await keywords in Python, and as such, requires Python version 3.5.0 or later. - Plenum also depends on [libsodium](https://download.libsodium.org/doc/), an awesome crypto library. These need to be installed separately. - Plenum uses [ZeroMQ](http://zeromq.org/) as a secure transport - [indy-crypto](https://github.com/hyperledger/indy-crypto) - A shared crypto library - It's based on [AMCL](https://github.com/milagro-crypto/amcl) - In particular, it contains BLS multi-signature crypto needed for state proofs support in Indy. ## Contact Us - Bugs, stories, and backlog for this codebase are managed in [Hyperledger's Jira](https://jira.hyperledger.org). Use project name `INDY`. - Join us on [Jira's Rocket.Chat](https://chat.hyperledger.org/channel/indy) at `#indy` and/or `#indy-node` channels to discuss. ## How to Contribute - We'd love your help; see these [instructions on how to contribute](https://wiki.hyperledger.org/display/indy/How+to+Contribute). - You may also want to read this info about [maintainers](https://github.com/hyperledger/indy-node/blob/stable/MAINTAINERS.md). ## How to Start Working with the Code Please have a look at [Dev Setup](https://github.com/hyperledger/indy-node/blob/master/docs/setup-dev.md) in indy-node repo. It contains common setup for both indy-plenum and indy-node.
{ "pile_set_name": "Github" }
<!-- HTML header for doxygen 1.8.3.1--> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.3.1"/> <title>AngelScript: Deprecated List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <script type="test/javascript" src="touch.js"></script> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="aslogo_small.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">AngelScript </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.3.1 --> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('deprecated.html','');}); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">Deprecated List </div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><dl class="reflist"> <dt><a class="anchor" id="_deprecated000001"></a>Member <a class="el" href="classas_i_script_function.html#af75544f2e9216b5ee611cefe4cfa7672">asIScriptFunction::GetParamTypeId</a> (asUINT index, asDWORD *flags=0) const =0</dt> <dd>Since 2.29.0. Use <a class="el" href="classas_i_script_function.html#a2b3000b9fc5d3f2cfeea490d8c0c062a">asIScriptFunction::GetParam</a> instead. </dd> </dl> </div></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">Generated on Tue Oct 21 2014 22:29:17 for AngelScript by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.3.1 </li> </ul> </div> </body> </html>
{ "pile_set_name": "Github" }
// Copyright 2015 CoreOS, 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 writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package initialize import ( "fmt" "github.com/coreos/coreos-cloudinit/system" ) func SSHImportGithubUser(system_user string, github_user string) error { url := fmt.Sprintf("https://api.github.com/users/%s/keys", github_user) keys, err := fetchUserKeys(url) if err != nil { return err } key_name := fmt.Sprintf("github-%s", github_user) return system.AuthorizeSSHKeys(system_user, key_name, keys) }
{ "pile_set_name": "Github" }
package org.openrndr.math import org.amshove.kluent.`should be in range` import org.amshove.kluent.`should equal` import org.spekframework.spek2.Spek import org.spekframework.spek2.style.specification.describe object TestQuaternion : Spek({ describe("a quaternion") { it("IDENTITY times IDENTITY should result in IDENTITY") { val q0 = Quaternion.IDENTITY val q1 = Quaternion.IDENTITY val qm = q0 * q1 qm.x `should equal` 0.0 qm.y `should equal` 0.0 qm.z `should equal` 0.0 qm.w `should equal` 1.0 } it ("matrix to quaternion to matrix") { val q0 = Quaternion.fromMatrix(Matrix33.IDENTITY) val m0 = q0.matrix m0 `should equal` Matrix33.IDENTITY } it ("quaternion look +Z") { val q0 = Quaternion.fromLookAt(Vector3.ZERO, Vector3(0.0, 0.0, 1.0), Vector3.UNIT_Y) val v0 = q0 * Vector3.UNIT_Z v0.x.`should be in range` (-0.0001, 0.0001) v0.y.`should be in range` (-0.0001, 0.0001) v0.z.`should be in range` (1-0.0001,1+ 0.0001) } it ("quaternion look -Z") { val q0 = Quaternion.fromLookAt(Vector3.ZERO, Vector3(0.0, 0.0, -1.0), Vector3.UNIT_Y) val v0 = q0 * Vector3.UNIT_Z v0.x.`should be in range` (-0.0001, 0.0001) v0.y.`should be in range` (-0.0001, 0.0001) v0.z.`should be in range` (-1-0.0001,-1+ 0.0001) } it ("quaternion look +X") { val q0 = Quaternion.fromLookAt(Vector3.ZERO, Vector3(1.0, 0.0, 0.0), Vector3.UNIT_Y) val v0 = q0 * Vector3.UNIT_Z v0.x.`should be in range` (1-0.0001,1+ 0.0001) v0.y.`should be in range` (-0.0001, 0.0001) v0.z.`should be in range` (-0.0001, 0.0001) } it ("quaternion look -X") { val q0 = Quaternion.fromLookAt(Vector3.ZERO, Vector3(-1.0, 0.0, 0.0), Vector3.UNIT_Y) val v0 = q0 * Vector3.UNIT_Z v0.x.`should be in range` (-1-0.0001,-1+ 0.0001) v0.y.`should be in range` (-0.0001, 0.0001) v0.z.`should be in range` (-0.0001, 0.0001) } it("quaternion.identity * vector3") { Quaternion.IDENTITY * Vector3.UNIT_X `should equal` Vector3.UNIT_X Quaternion.IDENTITY * Vector3.UNIT_Y `should equal` Vector3.UNIT_Y Quaternion.IDENTITY * Vector3.UNIT_Z `should equal` Vector3.UNIT_Z } } })
{ "pile_set_name": "Github" }
package dev.lucasnlm.antimine.common.level.database.models import androidx.room.ColumnInfo import androidx.room.Entity import androidx.room.PrimaryKey @Entity data class Stats( @PrimaryKey(autoGenerate = true) val uid: Int, @ColumnInfo(name = "duration") val duration: Long, @ColumnInfo(name = "mines") val mines: Int, @ColumnInfo(name = "victory") val victory: Int, @ColumnInfo(name = "width") val width: Int, @ColumnInfo(name = "height") val height: Int, @ColumnInfo(name = "openArea") val openArea: Int, )
{ "pile_set_name": "Github" }
test Label : GLOBAL 5 Label : DEFINITION 5 Label : DEFINITION 5 Label : PROJECT 1 Label : DEFINITION 5 Label : DEFINITION 5 Label : FILE 3 Label : EXPRESSION 4 Label : CODE 3 Label : EXPRESSION 7 Label : LEFT 5 Label : RIGHT 8 Label : ARGUMENT 10 Label : INDEX 9 Label : VALUE 11
{ "pile_set_name": "Github" }
/* * /MathJax/jax/output/HTML-CSS/fonts/STIX/General/Regular/SupplementalArrowsA.js * * Copyright (c) 2009-2018 The MathJax Consortium * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ MathJax.Hub.Insert(MathJax.OutputJax["HTML-CSS"].FONTDATA.FONTS.STIXGeneral,{10224:[662,156,1033,69,965],10225:[662,156,1033,69,965],10226:[626,116,974,54,882],10227:[626,116,974,92,920],10228:[569,61,1200,52,1147],10237:[551,45,1574,55,1519],10238:[551,45,1574,55,1519],10239:[449,-58,1574,55,1519]});MathJax.Ajax.loadComplete(MathJax.OutputJax["HTML-CSS"].fontDir+"/General/Regular/SupplementalArrowsA.js");
{ "pile_set_name": "Github" }
// mkerrors.sh -m64 // Code generated by the command above; see README.md. DO NOT EDIT. // +build amd64,darwin // Created by cgo -godefs - DO NOT EDIT // cgo -godefs -- -m64 _const.go package unix import "syscall" const ( AF_APPLETALK = 0x10 AF_CCITT = 0xa AF_CHAOS = 0x5 AF_CNT = 0x15 AF_COIP = 0x14 AF_DATAKIT = 0x9 AF_DECnet = 0xc AF_DLI = 0xd AF_E164 = 0x1c AF_ECMA = 0x8 AF_HYLINK = 0xf AF_IEEE80211 = 0x25 AF_IMPLINK = 0x3 AF_INET = 0x2 AF_INET6 = 0x1e AF_IPX = 0x17 AF_ISDN = 0x1c AF_ISO = 0x7 AF_LAT = 0xe AF_LINK = 0x12 AF_LOCAL = 0x1 AF_MAX = 0x28 AF_NATM = 0x1f AF_NDRV = 0x1b AF_NETBIOS = 0x21 AF_NS = 0x6 AF_OSI = 0x7 AF_PPP = 0x22 AF_PUP = 0x4 AF_RESERVED_36 = 0x24 AF_ROUTE = 0x11 AF_SIP = 0x18 AF_SNA = 0xb AF_SYSTEM = 0x20 AF_UNIX = 0x1 AF_UNSPEC = 0x0 AF_UTUN = 0x26 ALTWERASE = 0x200 ATTR_BIT_MAP_COUNT = 0x5 ATTR_CMN_ACCESSMASK = 0x20000 ATTR_CMN_ACCTIME = 0x1000 ATTR_CMN_ADDEDTIME = 0x10000000 ATTR_CMN_BKUPTIME = 0x2000 ATTR_CMN_CHGTIME = 0x800 ATTR_CMN_CRTIME = 0x200 ATTR_CMN_DATA_PROTECT_FLAGS = 0x40000000 ATTR_CMN_DEVID = 0x2 ATTR_CMN_DOCUMENT_ID = 0x100000 ATTR_CMN_ERROR = 0x20000000 ATTR_CMN_EXTENDED_SECURITY = 0x400000 ATTR_CMN_FILEID = 0x2000000 ATTR_CMN_FLAGS = 0x40000 ATTR_CMN_FNDRINFO = 0x4000 ATTR_CMN_FSID = 0x4 ATTR_CMN_FULLPATH = 0x8000000 ATTR_CMN_GEN_COUNT = 0x80000 ATTR_CMN_GRPID = 0x10000 ATTR_CMN_GRPUUID = 0x1000000 ATTR_CMN_MODTIME = 0x400 ATTR_CMN_NAME = 0x1 ATTR_CMN_NAMEDATTRCOUNT = 0x80000 ATTR_CMN_NAMEDATTRLIST = 0x100000 ATTR_CMN_OBJID = 0x20 ATTR_CMN_OBJPERMANENTID = 0x40 ATTR_CMN_OBJTAG = 0x10 ATTR_CMN_OBJTYPE = 0x8 ATTR_CMN_OWNERID = 0x8000 ATTR_CMN_PARENTID = 0x4000000 ATTR_CMN_PAROBJID = 0x80 ATTR_CMN_RETURNED_ATTRS = 0x80000000 ATTR_CMN_SCRIPT = 0x100 ATTR_CMN_SETMASK = 0x41c7ff00 ATTR_CMN_USERACCESS = 0x200000 ATTR_CMN_UUID = 0x800000 ATTR_CMN_VALIDMASK = 0xffffffff ATTR_CMN_VOLSETMASK = 0x6700 ATTR_FILE_ALLOCSIZE = 0x4 ATTR_FILE_CLUMPSIZE = 0x10 ATTR_FILE_DATAALLOCSIZE = 0x400 ATTR_FILE_DATAEXTENTS = 0x800 ATTR_FILE_DATALENGTH = 0x200 ATTR_FILE_DEVTYPE = 0x20 ATTR_FILE_FILETYPE = 0x40 ATTR_FILE_FORKCOUNT = 0x80 ATTR_FILE_FORKLIST = 0x100 ATTR_FILE_IOBLOCKSIZE = 0x8 ATTR_FILE_LINKCOUNT = 0x1 ATTR_FILE_RSRCALLOCSIZE = 0x2000 ATTR_FILE_RSRCEXTENTS = 0x4000 ATTR_FILE_RSRCLENGTH = 0x1000 ATTR_FILE_SETMASK = 0x20 ATTR_FILE_TOTALSIZE = 0x2 ATTR_FILE_VALIDMASK = 0x37ff ATTR_VOL_ALLOCATIONCLUMP = 0x40 ATTR_VOL_ATTRIBUTES = 0x40000000 ATTR_VOL_CAPABILITIES = 0x20000 ATTR_VOL_DIRCOUNT = 0x400 ATTR_VOL_ENCODINGSUSED = 0x10000 ATTR_VOL_FILECOUNT = 0x200 ATTR_VOL_FSTYPE = 0x1 ATTR_VOL_INFO = 0x80000000 ATTR_VOL_IOBLOCKSIZE = 0x80 ATTR_VOL_MAXOBJCOUNT = 0x800 ATTR_VOL_MINALLOCATION = 0x20 ATTR_VOL_MOUNTEDDEVICE = 0x8000 ATTR_VOL_MOUNTFLAGS = 0x4000 ATTR_VOL_MOUNTPOINT = 0x1000 ATTR_VOL_NAME = 0x2000 ATTR_VOL_OBJCOUNT = 0x100 ATTR_VOL_QUOTA_SIZE = 0x10000000 ATTR_VOL_RESERVED_SIZE = 0x20000000 ATTR_VOL_SETMASK = 0x80002000 ATTR_VOL_SIGNATURE = 0x2 ATTR_VOL_SIZE = 0x4 ATTR_VOL_SPACEAVAIL = 0x10 ATTR_VOL_SPACEFREE = 0x8 ATTR_VOL_UUID = 0x40000 ATTR_VOL_VALIDMASK = 0xf007ffff B0 = 0x0 B110 = 0x6e B115200 = 0x1c200 B1200 = 0x4b0 B134 = 0x86 B14400 = 0x3840 B150 = 0x96 B1800 = 0x708 B19200 = 0x4b00 B200 = 0xc8 B230400 = 0x38400 B2400 = 0x960 B28800 = 0x7080 B300 = 0x12c B38400 = 0x9600 B4800 = 0x12c0 B50 = 0x32 B57600 = 0xe100 B600 = 0x258 B7200 = 0x1c20 B75 = 0x4b B76800 = 0x12c00 B9600 = 0x2580 BIOCFLUSH = 0x20004268 BIOCGBLEN = 0x40044266 BIOCGDLT = 0x4004426a BIOCGDLTLIST = 0xc00c4279 BIOCGETIF = 0x4020426b BIOCGHDRCMPLT =
{ "pile_set_name": "Github" }
// Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2019 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #if defined(HAVE_CONFIG_H) #include <config/bitcoin-config.h> #endif #include <randomenv.h> #include <clientversion.h> #include <compat/cpuid.h> #include <support/cleanse.h> #include <util/time.h> // for GetTime() #ifdef WIN32 #include <compat.h> // for Windows API #endif #include <algorithm> #include <atomic> #include <chrono> #include <climits> #include <thread> #include <vector> #include <cstdint> #include <cstring> #ifndef WIN32 #include <sys/types.h> // must go before a number of other headers #include <fcntl.h> #include <netinet/in.h> #include <sys/resource.h> #include <sys/socket.h> #include <sys/stat.h> #include <sys/time.h> #include <sys/utsname.h> #include <unistd.h> #endif #ifdef __MACH__ #include <mach/clock.h> #include <mach/mach.h> #include <mach/mach_time.h> #endif #if HAVE_DECL_GETIFADDRS #include <ifaddrs.h> #endif #if HAVE_SYSCTL #include <sys/sysctl.h> #if HAVE_VM_VM_PARAM_H #include <vm/vm_param.h> #endif #if HAVE_SYS_RESOURCES_H #include <sys/resources.h> #endif #if HAVE_SYS_VMMETER_H #include <sys/vmmeter.h> #endif #endif #ifdef __linux__ #include <sys/auxv.h> #endif //! Necessary on some platforms extern char **environ; namespace { void RandAddSeedPerfmon(CSHA512 &hasher) { #ifdef WIN32 // Seed with the entire set of perfmon data // This can take up to 2 seconds, so only do it every 10 minutes static std::atomic<std::chrono::seconds> last_perfmon{ std::chrono::seconds{0}}; auto last_time = last_perfmon.load(); auto current_time = GetTime<std::chrono::seconds>(); if (current_time < last_time + std::chrono::minutes{10}) { return; } last_perfmon = current_time; std::vector<uint8_t> vData(250000, 0); long ret = 0; unsigned long nSize = 0; // Bail out at more than 10MB of performance data const size_t nMaxSize = 10000000; while (true) { nSize = vData.size(); ret = RegQueryValueExA(HKEY_PERFORMANCE_DATA, "Global", nullptr, nullptr, vData.data(), &nSize); if (ret != ERROR_MORE_DATA || vData.size() >= nMaxSize) { break; } // Grow size of buffer exponentially vData.resize(std::max((vData.size() * 3) / 2, nMaxSize)); } RegCloseKey(HKEY_PERFORMANCE_DATA); if (ret == ERROR_SUCCESS) { hasher.Write(vData.data(), nSize); memory_cleanse(vData.data(), nSize); } else { // Performance data is only a best-effort attempt at improving the // situation when the OS randomness (and other sources) aren't // adequate. As a result, failure to read it is isn't considered // critical, so we don't call RandFailure(). // TODO: Add logging when the logger is made functional before global // constructors have been invoked. } #endif } /** Helper to easily feed data into a CSHA512. * * Note that this does not serialize the passed object (like stream.h's << * operators do). Its raw memory representation is used directly. */ template <typename T> CSHA512 &operator<<(CSHA512 &hasher, const T &data) { static_assert( !std::is_same<typename std::decay<T>::type, char *>::value, "Calling operator<<(CSHA512, char*) is probably not what you want"); static_assert( !std::is_same<typename std::decay<T>::type, uint8_t *>::value, "Calling operator<<(CSHA512, uint8_t*) is probably not what you " "want"); static_assert( !std::is_same<typename std::decay<T>::type, const char *>::value, "Calling operator<<(CSHA512, const char*) is probably not what you " "want"); static_assert( !std::is_same<typename std::decay<T>::type, const uint8_t *>::value, "Calling operator<<(CSHA512, const uint8_t*) is " "probably not what you want"); hasher.Write((const uint8_t *)&data, sizeof(data)); return hasher; } #ifndef WIN32 void AddSockaddr(CSHA512 &hasher, const struct sockaddr *addr) { if (addr == nullptr) { return; } switch (addr->sa_family) { case AF_INET: hasher.Write((const uint8_t *)addr, sizeof(sockaddr_in)); break; case AF_INET6: hasher.Write((const uint8_t *)addr, sizeof(sockaddr_in6)); break; default: hasher.Write((const uint8_t *)&addr->sa_family, sizeof(addr->sa_family)); } } void AddFile(CSHA512 &hasher, const char *path) { struct stat sb = {}; int f = open(path, O_RDONLY); size_t total = 0; if (f != -1) { uint8_t fbuf[4096]; int n; hasher.Write((const uint8_t *)&f, sizeof(f)); if (fstat(f, &sb) == 0) { hasher << sb; } do { n = read(f, fbuf, sizeof(fbuf)); if (n > 0) { hasher.Write(fbuf, n); } total += n; /* not bothering with EINTR handling. */ } while (n == sizeof(fbuf) && total < 1048576); // Read only the first 1 Mbyte close(f); } } void AddPath(CSHA512 &hasher, const char *path) { struct stat sb = {}; if (stat(path, &sb) == 0) { hasher.Write((const uint8_t *)path, strlen(path) + 1); hasher << sb; } } #endif #if HAVE_SYSCTL template <int... S> void AddSysctl(CSHA512 &hasher) { int CTL[sizeof...(S)] = {S...}; uint8_t buffer[65536]; size_t siz = 65536; int ret = sysctl(CTL, sizeof...(S), buffer, &siz, nullptr, 0); if (ret == 0 || (ret == -1 && errno == ENOMEM)) { hasher << sizeof(CTL); hasher.Write((const uint8_t *)CTL, sizeof(CTL)); if (siz > sizeof(buffer)) { siz = sizeof(buffer); } hasher << siz; hasher.Write(buffer, siz); } } #endif #ifdef HAVE_GETCPUID void inline AddCPUID(CSHA
{ "pile_set_name": "Github" }
/* * Copyright 2016, Joyent, Inc. All rights reserved. * Author: Alex Wilson <alex.wilson@joyent.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to * deal in the Software without restriction, including without limitation the * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or * sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS * IN THE SOFTWARE. */ module.exports = { getPass: getPass }; const mod_tty = require('tty'); const mod_fs = require('fs'); const mod_assert = require('assert-plus'); var BACKSPACE = String.fromCharCode(127); var CTRLC = '\u0003'; var CTRLD = '\u0004'; function getPass(opts, cb) { if (typeof (opts) === 'function' && cb === undefined) { cb = opts; opts = {}; } mod_assert.object(opts, 'options'); mod_assert.func(cb, 'callback'); mod_assert.optionalString(opts.prompt, 'options.prompt'); if (opts.prompt === undefined) opts.prompt = 'Password'; openTTY(function (err, rfd, wfd, rtty, wtty) { if (err) { cb(err); return; } wtty.write(opts.prompt + ':'); rtty.resume(); rtty.setRawMode(true); rtty.resume(); rtty.setEncoding('utf8'); var pw = ''; rtty.on('data', onData); function onData(data) { var str = data.toString('utf8'); for (var i = 0; i < str.length; ++i) { var ch = str[i]; switch (ch) { case '\r': case '\n': case CTRLD: cleanup(); cb(null, pw); return; case CTRLC: cleanup(); cb(new Error('Aborted')); return; case BACKSPACE: pw = pw.slice(0, pw.length - 1); break; default: pw += ch; break; } } } function cleanup() { wtty.write('\r\n'); rtty.setRawMode(false); rtty.pause(); rtty.removeListener('data', onData); if (wfd !== undefined && wfd !== rfd) { wtty.end(); mod_fs.closeSync(wfd); } if (rfd !== undefined) { rtty.end(); mod_fs.closeSync(rfd); } } }); } function openTTY(cb) { mod_fs.open('/dev/tty', 'r+', function (err, rttyfd) { if ((err && (err.code === 'ENOENT' || err.code === 'EACCES')) || (process.version.match(/^v0[.][0-8][.]/))) { cb(null, undefined, undefined, process.stdin, process.stdout); return; } var rtty = new mod_tty.ReadStream(rttyfd); mod_fs.open('/dev/tty', 'w+', function (err3, wttyfd) { var wtty = new mod_tty.WriteStream(wttyfd); if (err3) { cb(err3); return; } cb(null, rttyfd, wttyfd, rtty, wtty); }); }); }
{ "pile_set_name": "Github" }
using System.Collections.Generic; using System.Text.Json.Serialization; namespace Essensoft.AspNetCore.Payment.Alipay.Domain { /// <summary> /// MybankCreditLoantradePayAssetConsultModel Data Structure. /// </summary> public class MybankCreditLoantradePayAssetConsultModel : AlipayObject { /// <summary> /// 支付宝合作伙伴id /// </summary> [JsonPropertyName("alipay_partner_id")] public string AlipayPartnerId { get; set; } /// <summary> /// 申请金额,最小1元钱 /// </summary> [JsonPropertyName("apply_amt")] public CreditPayMoneyVO ApplyAmt { get; set; } /// <summary> /// 业务场景 /// </summary> [JsonPropertyName("biz_scene")] public string BizScene { get; set; } /// <summary> /// 咨询资产类型,LOAN_INSTALLMENT或者BILL /// </summary> [JsonPropertyName("credit_asset_types")] public List<string> CreditAssetTypes { get; set; } /// <summary> /// 交易订单信息,JSON数组格式的***字符串***,用于描述交易订单详情。再次强调,该字段是字符串形式,用于当做订单扩展使用。序列化整个请求的时候,这个字段一定要是字符串类型,只不过该字段产生,需要将订单List额外进行一次json序列化 /// </summary> [JsonPropertyName("order_infos")] public string OrderInfos { get; set; } /// <summary> /// 收单产品码 /// </summary> [JsonPropertyName("payment_sale_pd_code")] public string PaymentSalePdCode { get; set; } /// <summary> /// 平台类型 /// </summary> [JsonPropertyName("platform_type")] public string PlatformType { get; set; } /// <summary> /// 子业务类型 /// </summary> [JsonPropertyName("sub_biz_scene")] public string SubBizScene { get; set; } /// <summary> /// 子平台类型 /// </summary> [JsonPropertyName("sub_platform_type")] public string SubPlatformType { get; set; } /// <summary> /// 咨询用户信息 /// </summary> [JsonPropertyName("user")] public CreditPayUserVO User { get; set; } } }
{ "pile_set_name": "Github" }
'use strict'; // modified from https://github.com/es-shims/es5-shim var has = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; var slice = Array.prototype.slice; var isArgs = require('./isArguments'); var isEnumerable = Object.prototype.propertyIsEnumerable; var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); var dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ]; var equalsConstructorPrototype = function (o) { var ctor = o.constructor; return ctor && ctor.prototype === o; }; var excludedKeys = { $console: true, $external: true, $frame: true, $frameElement: true, $frames: true, $innerHeight: true, $innerWidth: true, $outerHeight: true, $outerWidth: true, $pageXOffset: true, $pageYOffset: true, $parent: true, $scrollLeft: true, $scrollTop: true, $scrollX: true, $scrollY: true, $self: true, $webkitIndexedDB: true, $webkitStorageInfo: true, $window: true }; var hasAutomationEqualityBug = (function () { /* global window */ if (typeof window === 'undefined') { return false; } for (var k in window) { try { if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { try { equalsConstructorPrototype(window[k]); } catch (e) { return true; } } } catch (e) { return true; } } return false; }()); var equalsConstructorPrototypeIfNotBuggy = function (o) { /* global window */ if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(o); } try { return equalsConstructorPrototype(o); } catch (e) { return false; } }; var keysShim = function keys(object) { var isObject = object !== null && typeof object === 'object'; var isFunction = toStr.call(object) === '[object Function]'; var isArguments = isArgs(object); var isString = isObject && toStr.call(object) === '[object String]'; var theKeys = []; if (!isObject && !isFunction && !isArguments) { throw new TypeError('Object.keys called on a non-object'); } var skipProto = hasProtoEnumBug && isFunction; if (isString && object.length > 0 && !has.call(object, 0)) { for (var i = 0; i < object.length; ++i) { theKeys.push(String(i)); } } if (isArguments && object.length > 0) { for (var j = 0; j < object.length; ++j) { theKeys.push(String(j)); } } else { for (var name in object) { if (!(skipProto && name === 'prototype') && has.call(object, name)) { theKeys.push(String(name)); } } } if (hasDontEnumBug) { var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); for (var k = 0; k < dontEnums.length; ++k) { if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { theKeys.push(dontEnums[k]); } } } return theKeys; }; keysShim.shim = function shimObjectKeys() { if (Object.keys) { var keysWorksWithArguments = (function () { // Safari 5.0 bug return (Object.keys(arguments) || '').length === 2; }(1, 2)); if (!keysWorksWithArguments) { var originalKeys = Object.keys; Object.keys = function keys(object) { if (isArgs(object)) { return originalKeys(slice.call(object)); } else { return originalKeys(object); } }; } } else { Object.keys = keysShim; } return Object.keys || keysShim; }; module.exports = keysShim;
{ "pile_set_name": "Github" }
es { teststring:string { "Hola Mundo!" } testint:int { 2 } testvector:intvector { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0 } testbin:bin { a1b2c3d4e5f67890 } testtable:table { major:int { 3 } minor:int { 4 } patch:int { 7 } } testarray:array { "cadena 1", "cadena 2", "cadena 3" } }
{ "pile_set_name": "Github" }
/** * Copyright (c) 2009 Ma Can <ml.macana@gmail.com> * <macan@ncic.ac.cn> * * Armed with EMACS. * Time-stamp: <2011-10-11 07:19:00 macan> * * 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 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "mds.h" #include "xnet.h" #include "branch.h" #define FORMAT_STRING "type:bdb;schema:default_db:default" /* this default trigger work following the rules bellow: * * TRIG on post-CREATE operation * Construct a file creation time string and send it to a selected BP site. */ int dt_main(u16 where, struct itb *itb, struct ite *ite, struct hvfs_index *hi, int status, void *arg) { struct dir_trigger __attribute__((unused)) *dt = (struct dir_trigger *)arg; struct branch_ops *bo; struct branch_entry *be; char branch_name[256]; char tag[256], kvs[256], *p; int err = 0; if (status) goto out; if (where == DIR_TRIG_POST_CREATE) { memset(tag, 0, sizeof(tag)); memset(kvs, 0, sizeof(kvs)); p = tag; p += sprintf(p, "%lx:", itb->h.puuid); if (hi->flag & INDEX_BY_NAME) { memcpy(p, hi->name, hi->namelen); p += hi->namelen; } p += sprintf(p, ":%lx:%lx", hi->uuid, hi->hash); p = kvs; p += sprintf(p, "@ctime=%ld", ite->s.mdu.ctime); /* Step 1: try to load the branch 'default-puuid' */ memset(branch_name, 0, sizeof(branch_name)); sprintf(branch_name, "default-%lx", hi->puuid); be = branch_lookup_load(branch_name); if (PTR_ERR(be) == -ENOENT) { /* create it now */ bo = alloca(sizeof(*bo) + sizeof(struct branch_op)); if (!bo) { goto out; } bo->nr = 1; bo->ops[0].op = BRANCH_OP_INDEXER; bo->ops[0].len = strlen(FORMAT_STRING); bo->ops[0].id = 1; bo->ops[0].rid = 0; bo->ops[0].lor = 0; bo->ops[0].data = FORMAT_STRING; err = branch_create(hi->puuid, hi->uuid, branch_name, "default", 1, bo); if (err) { hvfs_err(xnet, "branch_create(%s) failed w/ %d\n", branch_name, err); goto out; } } else if (IS_ERR(be)) { hvfs_err(xnet, "branch_load(%s) failed w/ %ld\n", branch_name, PTR_ERR(be)); goto out; } else { branch_put(be); } /* Step 2: publish the string to the branch */ err = branch_publish(hi->puuid, hi->uuid, branch_name, tag, 1, kvs, p - kvs); if (err) { hvfs_err(xnet, "branch_publish(%s) to B'%s' failed w/ %d\n", tag, branch_name, err); goto out; } } else if (where == DIR_TRIG_POST_UNLINK) { memset(tag, 0, sizeof(tag)); memset(kvs, 0, sizeof(kvs)); p = tag; p += sprintf(p, "-%lx:", itb->h.puuid); if (hi->flag & INDEX_BY_NAME) { memcpy(p, hi->name, hi->namelen); p += hi->namelen; } p += sprintf(p, ":%lx:%lx", hi->uuid, hi->hash); p = kvs; p += sprintf(p, "@ctime=%ld", ite->s.mdu.ctime); /* Step 1: try to load the branch 'default-puuid' */ memset(branch_name, 0, sizeof(branch_name)); sprintf(branch_name, "default-%lx", hi->puuid); be = branch_lookup_load(branch_name); if (PTR_ERR(be) == -ENOENT) { /* create it now */ bo = alloca(sizeof(*bo) + sizeof(struct branch_op)); if (!bo) { goto out; } bo->nr = 1; bo->ops[0].op = BRANCH_OP_INDEXER; bo->ops[0].len = strlen(FORMAT_STRING); bo->ops[0].id = 1; bo->ops[0].rid = 0; bo->ops[0].lor = 0; bo->ops[0].data = FORMAT_STRING; err = branch_create(hi->puuid, hi->uuid, branch_name, "default", 1, bo); if (err) { hvfs_err(xnet, "branch_create(%s) failed w/ %d\n", branch_name, err); goto out; } } else if (IS_ERR(be)) { hvfs_err(xnet, "branch_load(%s) failed w/ %ld\n", branch_name, PTR_ERR(be)); goto out; } else { branch_put(be); } /* Step 2: publish the string to the branch */ err = branch_publish(hi->puuid, hi->uuid, branch_name, tag, 1, kvs, p - kvs); if (err) { hvfs_err(xnet, "branch_publish(%s) to B'%s' failed w/ %d\n", tag, branch_name, err); goto out; } } out: return TRIG_CONTINUE; }
{ "pile_set_name": "Github" }
#pragma once #include "guiBaseObject.h" #include "guiTypeGroup.h" #include "guiColor.h" #include "simpleColor.h" #include "guiValue.h" #define LOCK_WIDTH 10 #define LOCK_HEIGHT 10 #define LOCK_BORDER 3 #define panelSpacing 10 #define tabWidth 25.f #define tabHeight 10.f #define tabPadding 2.0f class guiTypePanel : public guiBaseObject{ public: //------------------------------------------------ //override because of tab void updateBoundingBox(){ hitArea.y = (int)boundingBox.y + tabHeight; boundingBox.height = hitArea.height; } //------------------------------------------------ guiTypePanel(){ currentXPos = panelSpacing; currentYPos = panelSpacing; spacingAmntX = panelSpacing; spacingAmntY = panelSpacing; columns.clear(); columns.push_back(ofRectangle(20, 20, 30, 20)); col = 0; bDrawLock = false; tabRect.x = 0; tabRect.y = 0; tabRect.width = tabWidth; tabRect.height = tabHeight; bSelected = false; setGroupBgColor(255,255,255,255); } //------------------------------------------------ void setup(string panelName, float defaultX = 20, float defaultY = 10){ name = panelName; columns[0] = ofRectangle(defaultX, defaultY, 50, 20); //we don't want our panel flashing when we click :) bgColor.selected = bgColor.color; outlineColor.selected = outlineColor.color; updateText(); tabRect.width = displayText.getTextWidth() + tabPadding*2; tabRect.height = displayText.getTextSingleLineHeight()*1.5f; groupBg.x = panelSpacing; groupBg.width = getWidth() - panelSpacing*2; groupBg.y = panelSpacing; } //----------------------------------------------- void addColumn(float minWidth){ float colX = columns.back().x + columns.back().width + spacingAmntX; columns.push_back(ofRectangle(colX, 20, minWidth, 20)); } //----------------------------------------------- bool selectColumn(int which){ col = ofClamp(which, 0, columns.size()-1); return true; } //----------------------------------------------- void setElementSpacing(float spacingX, float spacingY){ spacingAmntX = spacingX; spacingAmntY = spacingY; } //----------------------------------------------- void setTabPosition(float tabX, float tabY){ tabRect.x = tabX; tabRect.y = tabY; } //----------------------------------------------- ofRectangle getTabRect(){ return tabRect; } //-----------------------------------------------. virtual bool checkHit(float x, float y, bool isRelative){ if(readOnly)return false; if( x >= hitArea.x && x <= hitArea.x + hitArea.width && y >= hitArea.y && y <= hitArea.y + hitArea.height){ state = SG_STATE_SELECTED; float xx = x - boundingBox.x; float yy = y - boundingBox.y; if( xx > lockRect.x && xx < lockRect.x + lockRect.width && yy > lockRect.y && yy < lockRect.y + lockRect.height ){ locked = !locked; } setSelected(); updateGui(x, y, true, isRelative); if( !locked ){ float offsetX = x - hitArea.x; float offsetY = y - hitArea.y; for(int i = 0; i < children.size(); i++){ children[i]->bTextEnterMode = false; children[i]->release(); } bTextEnterMode = false; for(int i = 0; i < children.size(); i++){ children[i]->bTextEnterMode = bTextEnterMode; children[i]->checkHit(offsetX, offsetY, isRelative); if (children[i]->bTextEnterMode){ bTextEnterMode = true; } } } else { resetChildren(); } return true; } return false; } //-----------------------------------------------. virtual void keyPressed(int key){ if( !locked ){ for(int i = 0; i < children.size(); i++){ //if (children[i]->state == SG_STATE_SELECTED) children[i]->keyPressed(key); children[i]->keyPressed(key); } } } //-----------------------------------------------. void updateGui(float x, float y, bool firstHit, bool isRelative){ if( state == SG_STATE_SELECTED){ float offsetX = 0; float offsetY = 0; if( isRelative ){ offsetX = x; offsetY = y; }else{ offsetX = x - hitArea.x; offsetY = y - hitArea.y; } if( !locked ){ for(int i = 0; i < children.size(); i++){ children[i]->updateGui(offsetX, offsetY, firstHit, isRelative); } } } } //we should actually be checking our child heights //every frame to see if the panel needs to adjust layout //for now we only check heights when elements are first added //---------------------------------------------- virtual void update(){ updateText(); lockRect.x = boundingBox.width - (LOCK_WIDTH + spacingAmntX + LOCK_BORDER); lockRect.y = spacingAmntY - LOCK_BORDER; lockRect.width = LOCK_WIDTH + LOCK_BORDER * 2; lockRect.height = LOCK_HEIGHT + LOCK_BORDER * 2; for(int i = 0; i < children.size(); i++){ children[i]->update(); } for(int i = 0; i < whichColumn.size(); i++){ if( children[i]->boundingBox.x != columns[whichColumn[i]].x ){ float amntToShiftX = columns[whichColumn[i]].x - children[i]->boundingBox.x; children[i]->hitArea.x += amntToShiftX; children[i]->boundingBox.x += amntToShiftX; } } //reset y positions (if elements are added / dimensions changed) currentYPos = panelSpacing; for(int i = 0; i < children.size(); i++){ children[i]->boundingBox.y = (int) currentYPos; currentYPos += children[i]->getHeight() + spacingAmntY; } //update group bg groupBg.height = 0; groupBg.width = getWidth() - panelSpacing*2; if (groups.size() > 0) groupBg.height = panelSpacing + groups[groups.size()-1]->boundingBox.y + groups[groups.size()-1]->getHeight(); } //----------------------------------------------- void addElement( guiBaseObject * element ){ element->updateText(); //currentYPos = 0; currentYPos = panelSpacing; for(int i = 0; i < children.size(); i++){ children[i]->setPosition((int)children[i]->getPosX(), (int)currentYPos); currentYPos += children[i]->getHeight() + spacingAmntY; } element->setPosition((int)columns[col].x, (int)currentYPos); whichColumn.push_back(col); //add the element to the panel list children.push_back( element ); //update the current position for the next element columns[col].y += element->getHeight() + spacingAmntY; float checkWidth = element->getWidth(); if(check
{ "pile_set_name": "Github" }
import generateGlobalActions from '../../../src/internals/actions/generateGlobalActions'; describe('generateGlobalActions', () => { test('only path', () => { expect(generateGlobalActions()).toMatchSnapshot(); }); });
{ "pile_set_name": "Github" }
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. # -------------------------------------------------------------------------- from msrest.serialization import Model class ExtractedKeyValuePair(Model): """Representation of a key-value pair as a list of key and value tokens. :param key: List of tokens for the extracted key in a key-value pair. :type key: list[~azure.cognitiveservices.formrecognizer.models.ExtractedToken] :param value: List of tokens for the extracted value in a key-value pair. :type value: list[~azure.cognitiveservices.formrecognizer.models.ExtractedToken] """ _attribute_map = { 'key': {'key': 'key', 'type': '[ExtractedToken]'}, 'value': {'key': 'value', 'type': '[ExtractedToken]'}, } def __init__(self, *, key=None, value=None, **kwargs) -> None: super(ExtractedKeyValuePair, self).__init__(**kwargs) self.key = key self.value = value
{ "pile_set_name": "Github" }
Below is the original copyright notice from libxml2. Files in this directory are highly-modified parts of libxml2 library and its python bindings. Except where otherwise noted in the source code (trio files, hash.c and list.c) covered by a similar licence but with different Copyright notices: Copyright (C) 1998-2002 Daniel Veillard. All Rights Reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is fur- nished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to promote the sale, use or other deal- ings in this Software without prior written authorization from him.
{ "pile_set_name": "Github" }
world
{ "pile_set_name": "Github" }
/* * Copyright 2016 LinkedIn Corp. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ import Ember from 'ember'; export default Ember.Component.extend({ });
{ "pile_set_name": "Github" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>SFML - Simple and Fast Multimedia Library</title> <meta http-equiv="Content-Type" content="text/html;"/> <meta charset="utf-8"/> <!--<link rel='stylesheet' type='text/css' href="http://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>--> <link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> </head> <body> <div id="banner-container"> <div id="banner"> <span id="sfml">SFML 2.4.2</span> </div> </div> <div id="content"> <!-- Generated by Doxygen 1.8.8 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="pages.html"><span>Related&#160;Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1AlResource.html">AlResource</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">sf::AlResource Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="classsf_1_1AlResource.html">sf::AlResource</a>, including all inherited members.</p> <table class="directory"> <tr class="even"><td class="entry"><a class="el" href="classsf_1_1AlResource.html#a51b4f3a825c5d68386f8683e3e1053d7">AlResource</a>()</td><td class="entry"><a class="el" href="classsf_1_1AlResource.html">sf::AlResource</a></td><td class="entry"><span class="mlabel">protected</span></td></tr> <tr><td class="entry"><a class="el" href="classsf_1_1AlResource.html#a74ad78198cddcb6e5d847177364049db">~AlResource</a>()</td><td class="entry"><a class="el" href="classsf_1_1AlResource.html">sf::AlResource</a></td><td class="entry"><span class="mlabel">protected</span></td></tr> </table></div><!-- contents --> </div> <div id="footer-container"> <div id="footer"> SFML is licensed under the terms and conditions of the <a href="http://www.sfml-dev.org/license.php">zlib/png license</a>.<br> Copyright &copy; Laurent Gomila &nbsp;::&nbsp; Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp; </div> </div> </body> </html>
{ "pile_set_name": "Github" }
.. # .. # @BEGIN LICENSE .. # .. # Psi4: an open-source quantum chemistry software package .. # .. # Copyright (c) 2007-2019 The Psi4 Developers. .. # .. # The copyrights for code used from other parties are included in .. # the corresponding files. .. # .. # This file is part of Psi4. .. # .. # Psi4 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, version 3. .. # .. # Psi4 is distributed in the hope that it will be useful, .. # but WITHOUT ANY WARRANTY; without even the implied warranty of .. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .. # GNU Lesser General Public License for more details. .. # .. # You should have received a copy of the GNU Lesser General Public License along .. # with Psi4; if not, write to the Free Software Foundation, Inc., .. # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. .. # .. # @END LICENSE .. # .. include:: autodoc_abbr_options_c.rst .. index:: adcc, ADC .. _`sec:adcc`: Interface to adcc by M. F. Herbst and M. Scheurer ================================================= .. codeauthor:: Michael F. Herbst .. sectionauthor:: Michael F. Herbst *Module:* :ref:`Keywords <apdx:adc>`, :ref:`PSI Variables <apdx:adc_psivar>` .. image:: https://img.shields.io/badge/home-adcc-informational.svg :target: https://code.adc-connect.org .. raw:: html <br> .. image:: https://img.shields.io/badge/docs-latest-5077AB.svg :target: http://adc-connect.org/latest |PSIfour| contains code to interface to the adcc python module developed by M. F. Herbst *et. al.*. No additional licence or configuration is required to use adcc. The module serves as the backend for most algebraic-diagrammatic construction methods for correlated excited states in |PSIfour|. For more details on ADC methods, see :req:`sec:adc`. Installation ~~~~~~~~~~~~ For up to date information and more details, see the `adcc documentation <https://adc-connect.org/latest/installation.html>`_. **Binary** * .. image:: https://anaconda.org/adcc/adcc/badges/version.svg :target: https://anaconda.org/adcc/adcc * .. image:: https://img.shields.io/pypi/v/adcc :target: https://pypi.org/project/adcc * adcc is available as a conda package for Linux and macOS and on pypi. .. * If using the |PSIfour| binary, adcc has already been installed alongside. .. .. * If using |PSIfour| built from source, and anaconda or miniconda has .. already been installed (instructions at :ref:`sec:quickconda`), .. adcc can be obtained through ``conda install adcc -c adcc``. .. Then enable it as a feature with :makevar:`ENABLE_adcc` .. and rebuild |PSIfour| to detect adcc and activate dependent code. .. .. * Previous bullet had details. To build |PSIfour| from source and use .. adcc from conda without thinking, consult :ref:`sec:condapsi4dev`. * To remove a conda installation, ``conda remove adcc``. **Source** * .. image:: https://img.shields.io/github/tag-date/adc-connect/adcc.svg?maxAge=2592000 :target: https://github.com/adc-connect/adcc * If using |PSIfour| built from source and you want adcc installed as well, enable it as a feature with :makevar:`ENABLE_adcc`, and let the build system fetch and install it. Keywords for adcc ~~~~~~~~~~~~~~~~~ .. include:: autodir_options_c/adc__cutoff_amps_print.rst .. include:: autodir_options_c/adc__kind.rst .. include:: autodir_options_c/adc__max_num_vecs.rst .. include:: autodir_options_c/adc__maxiter.rst .. include:: autodir_options_c/adc__num_core_orbitals.rst .. include:: autodir_options_c/adc__num_guesses.rst .. include:: autodir_options_c/adc__r_convergence.rst .. include:: autodir_options_c/adc__reference.rst .. include:: autodir_options_c/adc__roots_per_irrep.rst .. _`cmake:adcc`: How to configure adcc for building Psi4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ **Role and Dependencies** * Role |w---w| In |PSIfour|, adcc provides additional quantum-chemical methods (a wide range of ADC methods). In turn adcc can use |PSIfour| as the backend for self-consistent field calculations and required integrals. * Downstream Dependencies |w---w| |PSIfour| (\ |dr| optional) adcc * Upstream Dependencies |w---w| adcc (\ |dr| optional) |PSIfour| **CMake Variables** * :makevar:`ENABLE_adcc` |w---w| CMake variable toggling whether Psi4 automatically installs adcc **Examples** A. Build and install adcc if needed .. code-block:: bash >>> cmake -DENABLE_adcc=ON B. Build *without* adcc .. code-block:: bash >>> cmake
{ "pile_set_name": "Github" }