text
stringlengths
2
100k
meta
dict
/*============================================================================= Copyright (c) 2011 Eric Niebler Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ==============================================================================*/ #if !defined(BOOST_FUSION_SEGMENTED_FOLD_UNTIL_IMPL_HPP_INCLUDED) #define BOOST_FUSION_SEGMENTED_FOLD_UNTIL_IMPL_HPP_INCLUDED #include <boost/fusion/support/config.hpp> #include <boost/mpl/bool.hpp> #include <boost/mpl/eval_if.hpp> #include <boost/mpl/identity.hpp> #include <boost/utility/result_of.hpp> #include <boost/type_traits/add_const.hpp> #include <boost/type_traits/remove_reference.hpp> #include <boost/fusion/support/void.hpp> #include <boost/fusion/container/list/cons_fwd.hpp> #include <boost/fusion/sequence/intrinsic_fwd.hpp> #include <boost/fusion/iterator/equal_to.hpp> #include <boost/fusion/iterator/deref.hpp> #include <boost/fusion/iterator/next.hpp> #include <boost/fusion/support/is_segmented.hpp> #include <boost/fusion/sequence/intrinsic/segments.hpp> // fun(seq, state, context) // seq: a non-segmented range // state: the state of the fold so far // context: the path to the current range // // returns: (state', fcontinue) namespace boost { namespace fusion { template <typename First, typename Last> struct iterator_range; template <typename Context> struct segmented_iterator; namespace result_of { template <typename Cur, typename Context> struct make_segmented_iterator { typedef iterator_range< Cur , typename result_of::end< typename remove_reference< typename add_const< typename result_of::deref< typename Context::car_type::begin_type >::type >::type >::type >::type > range_type; typedef segmented_iterator<cons<range_type, Context> > type; }; } template <typename Cur, typename Context> BOOST_FUSION_GPU_ENABLED typename result_of::make_segmented_iterator<Cur, Context>::type make_segmented_iterator(Cur const& cur, Context const& context) { typedef result_of::make_segmented_iterator<Cur, Context> impl_type; typedef typename impl_type::type type; typedef typename impl_type::range_type range_type; return type(cons<range_type, Context>(range_type(cur, fusion::end(*context.car.first)), context)); } namespace detail { template < typename Begin , typename End , typename State , typename Context , typename Fun , bool IsEmpty > struct segmented_fold_until_iterate_skip_empty; template < typename Begin , typename End , typename State , typename Context , typename Fun , bool IsDone = result_of::equal_to<Begin, End>::type::value > struct segmented_fold_until_iterate; template < typename Sequence , typename State , typename Context , typename Fun , bool IsSegmented = traits::is_segmented<Sequence>::type::value > struct segmented_fold_until_impl; template <typename Segments, typename State, typename Context, typename Fun> struct segmented_fold_until_on_segments; //auto push_context(cur, end, context) //{ // return push_back(context, segment_sequence(iterator_range(cur, end))); //} template <typename Cur, typename End, typename Context> struct push_context { typedef iterator_range<Cur, End> range_type; typedef cons<range_type, Context> type; BOOST_FUSION_GPU_ENABLED static type call(Cur const& cur, End const& end, Context const& context) { return cons<range_type, Context>(range_type(cur, end), context); } }; //auto make_segmented_iterator(cur, end, context) //{ // return segmented_iterator(push_context(cur, end, context)); //} // //auto segmented_fold_until_impl(seq, state, context, fun) //{ // if (is_segmented(seq)) // { // segmented_fold_until_on_segments(segments(seq), state, context, fun); // } // else // { // return fun(seq, state, context); // } //} template < typename Sequence , typename State , typename Context , typename Fun , bool IsSegmented > struct segmented_fold_until_impl { typedef segmented_fold_until_on_segments< typename remove_reference< typename add_const< typename result_of::segments<Sequence>::type >::type >::type , State , Context , Fun > impl; typedef typename impl::type type; typedef typename impl::continue_type continue_type; BOOST_FUSION_GPU_ENABLED static type call(Sequence& seq, State const& state, Context const& context, Fun const& fun) { return impl::call(fusion::segments(seq), state, context, fun); } }; template < typename Sequence , typename State , typename Context , typename Fun > struct segmented_fold_until_impl<Sequence, State, Context, Fun, false> { typedef typename Fun::template apply<Sequence, State, Context> apply_type; typedef typename apply_type::type type; typedef typename apply_type::continue_type continue_type; BOOST_FUSION_GPU_ENABLED static type call(Sequence& seq, State const& state, Context const& context, Fun const& fun) { return apply_type::call(seq, state, context, fun); } }; //auto segmented_fold_until_on_segments(segs, state, context, fun) //{ // auto cur = begin(segs), end = end(segs); // for (; cur != end; ++cur) // { // if (empty(*cur)) // continue; // auto context` = push_context(cur, end, context); // state = segmented_fold_until_impl(*cur, state, context`, fun); // if (!second(state)) // return state; // } //} template <typename Apply> struct continue_wrap { typedef typename Apply::continue_type type; }; template <typename Begin, typename End, typename State, typename Context, typename Fun, bool IsEmpty> struct segmented_fold_until_iterate_skip_empty { // begin != end and !empty(*begin) typedef push_context<Begin, End, Context> push_context_impl; typedef typename push_context_impl::type next_context_type; typedef segmented_fold_until_impl< typename remove_reference< typename add_const< typename result_of::deref<Begin>::type >::type >::type , State , next_context_type , Fun > fold_recurse_impl; typedef typename fold_recurse_impl::type next_state_type; typedef segmented_fold_until_iterate< typename result_of::next<Begin>::type , End , next_state_type , Context , Fun > next_iteration_impl; typedef typename mpl::eval_if< typename fold_recurse_impl::continue_type , next_iteration_impl , mpl::identity<next_state_type> >::type type; typedef typename mpl::eval_if< typename fold_recurse_impl::continue_type , continue_wrap<next_iteration_impl> , mpl::identity<mpl::false_> >::type continue_type; BOOST_FUSION_GPU_ENABLED static type call(Begin const& beg, End const& end, State const& state , Context const& context, Fun const& fun) { return call(beg, end, state, context, fun, typename fold_recurse_impl::continue_type()); } BOOST_FUSION_GPU_ENABLED static type call(Begin const& beg, End const& end, State const& state , Context const& context, Fun const& fun, mpl::true_) // continue { return next_iteration_impl::call( fusion::next(beg) , end , fold_recurse_impl::call( *beg , state , push_context_impl::call(beg, end, context) , fun) , context , fun); } BOOST_FUSION_GPU_ENABLED static type call(Begin const& beg, End const& end, State const& state , Context const& context, Fun const& fun, mpl::false_) // break { return fold_recurse_impl::call( *beg , state , push_context_impl::call(beg, end, context) , fun); } }; template <typename Begin, typename End, typename State, typename Context, typename Fun> struct segmented_fold_until_iterate_skip_empty<Begin, End, State, Context, Fun, true> { typedef segmented_fold_until_iterate< typename result_of::next<Begin>::type , End , State , Context , Fun > impl; typedef typename impl::type type; typedef typename impl::continue_type continue_type; BOOST_FUSION_GPU_ENABLED static type call(Begin const& beg, End const& end, State const& state , Context const& context, Fun const& fun) { return impl::call(fusion::next(beg), end, state, context, fun); } }; template <typename Begin, typename End, typename State, typename Context, typename Fun, bool IsDone> struct segmented_fold_until_iterate { typedef typename result_of::empty< typename remove_reference< typename result_of::deref<Begin>::type >::type >::type empty_type; typedef segmented_fold_until_iterate_skip_empty<Begin, End, State, Context, Fun, empty_type::value> impl; typedef typename impl::type type; typedef typename impl::continue_type continue_type; BOOST_FUSION_GPU_ENABLED static type call(Begin const& beg, End const& end, State const& state , Context const& context, Fun const& fun) { return impl::call(beg, end, state, context, fun); } }; template <typename Begin, typename End, typename State, typename Context, typename Fun> struct segmented_fold_until_iterate<Begin, End, State, Context, Fun, true> { typedef State type; typedef mpl::true_ continue_type; BOOST_FUSION_GPU_ENABLED static type call(Begin const&, End const&, State const& state , Context const&, Fun const&) { return state; } }; template <typename Segments, typename State, typename Context, typename Fun> struct segmented_fold_until_on_segments { typedef segmented_fold_until_iterate< typename result_of::begin<Segments>::type , typename result_of::end<Segments>::type , State , Context , Fun > impl; typedef typename impl::type type; typedef typename impl::continue_type continue_type; BOOST_FUSION_GPU_ENABLED static type call(Segments& segs, State const& state, Context const& context, Fun const& fun) { return impl::call(fusion::begin(segs), fusion::end(segs), state, context, fun); } }; } }} #endif
{ "pile_set_name": "Github" }
// // Range.swift // RxSwift // // Created by Krunoslav Zaher on 9/13/15. // Copyright © 2015 Krunoslav Zaher. All rights reserved. // extension Observable where Element : SignedInteger { /** Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to generate and send out observer messages. - seealso: [range operator on reactivex.io](http://reactivex.io/documentation/operators/range.html) - parameter start: The value of the first integer in the sequence. - parameter count: The number of sequential integers to generate. - parameter scheduler: Scheduler to run the generator loop on. - returns: An observable sequence that contains a range of sequential integral numbers. */ public static func range(start: E, count: E, scheduler: ImmediateSchedulerType = CurrentThreadScheduler.instance) -> Observable<E> { return RangeProducer<E>(start: start, count: count, scheduler: scheduler) } } final fileprivate class RangeProducer<E: SignedInteger> : Producer<E> { fileprivate let _start: E fileprivate let _count: E fileprivate let _scheduler: ImmediateSchedulerType init(start: E, count: E, scheduler: ImmediateSchedulerType) { if count < 0 { rxFatalError("count can't be negative") } if start &+ (count - 1) < start { rxFatalError("overflow of count") } _start = start _count = count _scheduler = scheduler } override func run<O : ObserverType>(_ observer: O, cancel: Cancelable) -> (sink: Disposable, subscription: Disposable) where O.E == E { let sink = RangeSink(parent: self, observer: observer, cancel: cancel) let subscription = sink.run() return (sink: sink, subscription: subscription) } } final fileprivate class RangeSink<O: ObserverType> : Sink<O> where O.E: SignedInteger { typealias Parent = RangeProducer<O.E> private let _parent: Parent init(parent: Parent, observer: O, cancel: Cancelable) { _parent = parent super.init(observer: observer, cancel: cancel) } func run() -> Disposable { return _parent._scheduler.scheduleRecursive(0 as O.E) { i, recurse in if i < self._parent._count { self.forwardOn(.next(self._parent._start + i)) recurse(i + 1) } else { self.forwardOn(.completed) self.dispose() } } } }
{ "pile_set_name": "Github" }
/* * FreeRTOS Kernel V10.1.1 * Copyright (C) 2018 Amazon.com, Inc. or its affiliates. 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 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. * * http://www.FreeRTOS.org * http://aws.amazon.com/freertos * * 1 tab == 4 spaces! */ #include "FreeRTOS.h" #include "task.h" #include "croutine.h" /* Remove the whole file is co-routines are not being used. */ #if( configUSE_CO_ROUTINES != 0 ) /* * Some kernel aware debuggers require data to be viewed to be global, rather * than file scope. */ #ifdef portREMOVE_STATIC_QUALIFIER #define static #endif /* Lists for ready and blocked co-routines. --------------------*/ static List_t pxReadyCoRoutineLists[ configMAX_CO_ROUTINE_PRIORITIES ]; /*< Prioritised ready co-routines. */ static List_t xDelayedCoRoutineList1; /*< Delayed co-routines. */ static List_t xDelayedCoRoutineList2; /*< Delayed co-routines (two lists are used - one for delays that have overflowed the current tick count. */ static List_t * pxDelayedCoRoutineList; /*< Points to the delayed co-routine list currently being used. */ static List_t * pxOverflowDelayedCoRoutineList; /*< Points to the delayed co-routine list currently being used to hold co-routines that have overflowed the current tick count. */ static List_t xPendingReadyCoRoutineList; /*< Holds co-routines that have been readied by an external event. They cannot be added directly to the ready lists as the ready lists cannot be accessed by interrupts. */ /* Other file private variables. --------------------------------*/ CRCB_t * pxCurrentCoRoutine = NULL; static UBaseType_t uxTopCoRoutineReadyPriority = 0; static TickType_t xCoRoutineTickCount = 0, xLastTickCount = 0, xPassedTicks = 0; /* The initial state of the co-routine when it is created. */ #define corINITIAL_STATE ( 0 ) /* * Place the co-routine represented by pxCRCB into the appropriate ready queue * for the priority. It is inserted at the end of the list. * * This macro accesses the co-routine ready lists and therefore must not be * used from within an ISR. */ #define prvAddCoRoutineToReadyQueue( pxCRCB ) \ { \ if( pxCRCB->uxPriority > uxTopCoRoutineReadyPriority ) \ { \ uxTopCoRoutineReadyPriority = pxCRCB->uxPriority; \ } \ vListInsertEnd( ( List_t * ) &( pxReadyCoRoutineLists[ pxCRCB->uxPriority ] ), &( pxCRCB->xGenericListItem ) ); \ } /* * Utility to ready all the lists used by the scheduler. This is called * automatically upon the creation of the first co-routine. */ static void prvInitialiseCoRoutineLists( void ); /* * Co-routines that are readied by an interrupt cannot be placed directly into * the ready lists (there is no mutual exclusion). Instead they are placed in * in the pending ready list in order that they can later be moved to the ready * list by the co-routine scheduler. */ static void prvCheckPendingReadyList( void ); /* * Macro that looks at the list of co-routines that are currently delayed to * see if any require waking. * * Co-routines are stored in the queue in the order of their wake time - * meaning once one co-routine has been found whose timer has not expired * we need not look any further down the list. */ static void prvCheckDelayedList( void ); /*-----------------------------------------------------------*/ BaseType_t xCoRoutineCreate( crCOROUTINE_CODE pxCoRoutineCode, UBaseType_t uxPriority, UBaseType_t uxIndex ) { BaseType_t xReturn; CRCB_t *pxCoRoutine; /* Allocate the memory that will store the co-routine control block. */ pxCoRoutine = ( CRCB_t * ) pvPortMalloc( sizeof( CRCB_t ) ); if( pxCoRoutine ) { /* If pxCurrentCoRoutine is NULL then this is the first co-routine to be created and the co-routine data structures need initialising. */ if( pxCurrentCoRoutine == NULL ) { pxCurrentCoRoutine = pxCoRoutine; prvInitialiseCoRoutineLists(); } /* Check the priority is within limits. */ if( uxPriority >= configMAX_CO_ROUTINE_PRIORITIES ) { uxPriority = configMAX_CO_ROUTINE_PRIORITIES - 1; } /* Fill out the co-routine control block from the function parameters. */ pxCoRoutine->uxState = corINITIAL_STATE; pxCoRoutine->uxPriority = uxPriority; pxCoRoutine->uxIndex = uxIndex; pxCoRoutine->pxCoRoutineFunction = pxCoRoutineCode; /* Initialise all the other co-routine control block parameters. */ vListInitialiseItem( &( pxCoRoutine->xGenericListItem ) ); vListInitialiseItem( &( pxCoRoutine->xEventListItem ) ); /* Set the co-routine control block as a link back from the ListItem_t. This is so we can get back to the containing CRCB from a generic item in a list. */ listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xGenericListItem ), pxCoRoutine ); listSET_LIST_ITEM_OWNER( &( pxCoRoutine->xEventListItem ), pxCoRoutine ); /* Event lists are always in priority order. */ listSET_LIST_ITEM_VALUE( &( pxCoRoutine->xEventListItem ), ( ( TickType_t ) configMAX_CO_ROUTINE_PRIORITIES - ( TickType_t ) uxPriority ) ); /* Now the co-routine has been initialised it can be added to the ready list at the correct priority. */ prvAddCoRoutineToReadyQueue( pxCoRoutine ); xReturn = pdPASS; } else { xReturn = errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY; } return xReturn; } /*-----------------------------------------------------------*/ void vCoRoutineAddToDelayedList( TickType_t xTicksToDelay, List_t *pxEventList ) { TickType_t xTimeToWake; /* Calculate the time to wake - this may overflow but this is not a problem. */ xTimeToWake = xCoRoutineTickCount + xTicksToDelay; /* We must remove ourselves from the ready list before adding ourselves to the blocked list as the same list item is used for both lists. */ ( void ) uxListRemove( ( ListItem_t * ) &( pxCurrentCoRoutine->xGenericListItem ) ); /* The list item will be inserted in wake time order. */ listSET_LIST_ITEM_VALUE( &( pxCurrentCoRoutine->xGenericListItem ), xTimeToWake ); if( xTimeToWake < xCoRoutineTickCount ) { /* Wake time has overflowed. Place this item in the overflow list. */ vListInsert( ( List_t * ) pxOverflowDelayedCoRoutineList, ( ListItem_t * ) &( pxCurrentCoRoutine->xGenericListItem ) ); } else { /* The wake time has not overflowed, so we can use the current block list. */ vListInsert( ( List_t * ) pxDelayedCoRoutineList, ( ListItem_t * ) &( pxCurrentCoRoutine->xGenericListItem ) ); } if( pxEventList ) { /* Also add the co-routine to an event list. If this is done then the function must be called with interrupts disabled. */ vListInsert( pxEventList, &( pxCurrentCoRoutine->xEventListItem ) ); } } /*-----------------------------------------------------------*/ static void prvCheckPendingReadyList( void ) { /* Are there any co-routines waiting to get moved to the ready list? These are co-routines that have been readied by an ISR. The ISR cannot access the ready lists itself. */ while( listLIST_IS_EMPTY( &xPendingReadyCoRoutineList ) == pdFALSE ) { CRCB_t *pxUnblockedCRCB; /* The pending ready list can be accessed by an ISR. */ portDISABLE_INTERRUPTS(); { pxUnblockedCRCB = ( CRCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( (&xPendingReadyCoRoutineList) ); ( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) ); } portENABLE_INTERRUPTS(); ( void ) uxListRemove( &( pxUnblockedCRCB->xGenericListItem ) ); prvAddCoRoutineToReadyQueue( pxUnblockedCRCB ); } } /*-----------------------------------------------------------*/ static void prvCheckDelayedList( void ) { CRCB_t *pxCRCB; xPassedTicks = xTaskGetTickCount() - xLastTickCount; while( xPassedTicks ) { xCoRoutineTickCount++; xPassedTicks--; /* If the tick count has overflowed we need to swap the ready lists. */ if( xCoRoutineTickCount == 0 ) { List_t * pxTemp; /* Tick count has overflowed so we need to swap the delay lists. If there are any items in pxDelayedCoRoutineList here then there is an error! */ pxTemp = pxDelayedCoRoutineList; pxDelayedCoRoutineList = pxOverflowDelayedCoRoutineList; pxOverflowDelayedCoRoutineList = pxTemp; } /* See if this tick has made a timeout expire. */ while( listLIST_IS_EMPTY( pxDelayedCoRoutineList ) == pdFALSE ) { pxCRCB = ( CRCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxDelayedCoRoutineList ); if( xCoRoutineTickCount < listGET_LIST_ITEM_VALUE( &( pxCRCB->xGenericListItem ) ) ) { /* Timeout not yet expired. */ break; } portDISABLE_INTERRUPTS(); { /* The event could have occurred just before this critical section. If this is the case then the generic list item will have been moved to the pending ready list and the following line is still valid. Also the pvContainer parameter will have been set to NULL so the following lines are also valid. */ ( void ) uxListRemove( &( pxCRCB->xGenericListItem ) ); /* Is the co-routine waiting on an event also? */ if( pxCRCB->xEventListItem.pxContainer ) { ( void ) uxListRemove( &( pxCRCB->xEventListItem ) ); } } portENABLE_INTERRUPTS(); prvAddCoRoutineToReadyQueue( pxCRCB ); } } xLastTickCount = xCoRoutineTickCount; } /*-----------------------------------------------------------*/ void vCoRoutineSchedule( void ) { /* See if any co-routines readied by events need moving to the ready lists. */ prvCheckPendingReadyList(); /* See if any delayed co-routines have timed out. */ prvCheckDelayedList(); /* Find the highest priority queue that contains ready co-routines. */ while( listLIST_IS_EMPTY( &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) ) ) { if( uxTopCoRoutineReadyPriority == 0 ) { /* No more co-routines to check. */ return; } --uxTopCoRoutineReadyPriority; } /* listGET_OWNER_OF_NEXT_ENTRY walks through the list, so the co-routines of the same priority get an equal share of the processor time. */ listGET_OWNER_OF_NEXT_ENTRY( pxCurrentCoRoutine, &( pxReadyCoRoutineLists[ uxTopCoRoutineReadyPriority ] ) ); /* Call the co-routine. */ ( pxCurrentCoRoutine->pxCoRoutineFunction )( pxCurrentCoRoutine, pxCurrentCoRoutine->uxIndex ); return; } /*-----------------------------------------------------------*/ static void prvInitialiseCoRoutineLists( void ) { UBaseType_t uxPriority; for( uxPriority = 0; uxPriority < configMAX_CO_ROUTINE_PRIORITIES; uxPriority++ ) { vListInitialise( ( List_t * ) &( pxReadyCoRoutineLists[ uxPriority ] ) ); } vListInitialise( ( List_t * ) &xDelayedCoRoutineList1 ); vListInitialise( ( List_t * ) &xDelayedCoRoutineList2 ); vListInitialise( ( List_t * ) &xPendingReadyCoRoutineList ); /* Start with pxDelayedCoRoutineList using list1 and the pxOverflowDelayedCoRoutineList using list2. */ pxDelayedCoRoutineList = &xDelayedCoRoutineList1; pxOverflowDelayedCoRoutineList = &xDelayedCoRoutineList2; } /*-----------------------------------------------------------*/ BaseType_t xCoRoutineRemoveFromEventList( const List_t *pxEventList ) { CRCB_t *pxUnblockedCRCB; BaseType_t xReturn; /* This function is called from within an interrupt. It can only access event lists and the pending ready list. This function assumes that a check has already been made to ensure pxEventList is not empty. */ pxUnblockedCRCB = ( CRCB_t * ) listGET_OWNER_OF_HEAD_ENTRY( pxEventList ); ( void ) uxListRemove( &( pxUnblockedCRCB->xEventListItem ) ); vListInsertEnd( ( List_t * ) &( xPendingReadyCoRoutineList ), &( pxUnblockedCRCB->xEventListItem ) ); if( pxUnblockedCRCB->uxPriority >= pxCurrentCoRoutine->uxPriority ) { xReturn = pdTRUE; } else { xReturn = pdFALSE; } return xReturn; } #endif /* configUSE_CO_ROUTINES == 0 */
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"> <PreferenceCategory android:title="@string/automation"> <ListPreference android:defaultValue="PASSIVE" android:entries="@array/location" android:entryValues="@array/locationValues" android:key="@string/key_location" android:title="@string/locationservice" /> </PreferenceCategory> </PreferenceScreen>
{ "pile_set_name": "Github" }
{ "name": "Playtika LTD.", "displayName": "Playtika", "properties": [ "playtika.com" ], "prevalence": { "tracking": 0.0000139, "nonTracking": 0, "total": 0.0000139 } }
{ "pile_set_name": "Github" }
<pre><?php /** * yield $var; * foreach ($datas as list($a, $b)) { .. } * Generator * * @version PHP5.5+ * @see Iterator interface */ function fileLineGenerator($file) { if (!$fh = fopen($file, 'r')) { return; } $ln = 1; while (false !== ($line = fgets($fh))) { echo '&gt;'; yield [$ln, $line]; // 5.5+ ( Short array syntax 5.4+ ) ++$ln; } fclose($fh); //return; // OK //return null; // OK //return true; // FATAL ERROR } var_dump( fileLineGenerator(null), fileLineGenerator(null) instanceof Generator // true! ); foreach (fileLineGenerator(__FILE__) as list($ln, $line)) { // 5.5+ echo str_pad($ln, 4, ' ', STR_PAD_LEFT); echo ' ' . htmlspecialchars($line); } $generator = fileLineGenerator(__FILE__); $generator->rewind(); // OK var_dump( $generator->valid(), $generator->key(), $generator->next(), $generator->key(), $generator->current(), $generator->next(), //$generator->rewind(), // FATAL ERROR => Already begun $generator->current() ); echo '<hr />'; function echoGenerator() { $i = 0; while (true) { $str = yield; // Classic //$str = yield $i; // PARSE ERROR //$str = (yield $i); // OK var_dump($str); $i++; } } $echo = echoGenerator(); $echo->send('Hello Generator!'); $echo->send('Bye Generator...'); ?></pre>
{ "pile_set_name": "Github" }
html { text-align: center; font-family: Helvetica Neue; } h1 { font-weight: normal; } div.loading { color: #888; font-style: italic; margin-top: 150px; } div.description { text-align: left; max-width: 700px; margin: 10px auto; } canvas { -moz-filter: url(filter.svg#drop-shadow); filter: url(filter.svg#drop-shadow); filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5)); -webkit-filter: drop-shadow(0 0 4px rgba(0, 0, 0, 0.5)); width: 500px; height: 594px; margin: auto; } label { display: block; text-align: left; width: 500px; margin: 10px auto; } input, select { /*display: block;*/ width: 400px; }
{ "pile_set_name": "Github" }
@import '../../../assets/scss/var';
{ "pile_set_name": "Github" }
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np import deepxde as dde def main(): def func(x): """ x: array_like, N x D_in y: array_like, N x D_out """ return x * np.sin(5 * x) geom = dde.geometry.Interval(-1, 1) num_train = 16 num_test = 100 data = dde.data.Func(geom, func, num_train, num_test) activation = "tanh" initializer = "Glorot uniform" net = dde.maps.FNN([1] + [20] * 3 + [1], activation, initializer) model = dde.Model(data, net) model.compile("adam", lr=0.001, metrics=["l2 relative error"]) losshistory, train_state = model.train(epochs=10000) dde.saveplot(losshistory, train_state, issave=True, isplot=True) if __name__ == "__main__": main()
{ "pile_set_name": "Github" }
// Copyright Neil Groves 2009. Use, modification and // distribution is subject to the Boost Software License, Version // 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // // For more information, see http://www.boost.org/libs/range/ // #ifndef BOOST_RANGE_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED #define BOOST_RANGE_ALGORITHM_BINARY_SEARCH_HPP_INCLUDED #include <boost/concept_check.hpp> #include <boost/range/begin.hpp> #include <boost/range/end.hpp> #include <boost/range/concepts.hpp> #include <algorithm> namespace boost { namespace range { /// \brief template function binary_search /// /// range-based version of the binary_search std algorithm /// /// \pre ForwardRange is a model of the ForwardRangeConcept /// \pre BinaryPredicate is a model of the BinaryPredicateConcept template<class ForwardRange, class Value> inline bool binary_search(const ForwardRange& rng, const Value& val) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); return std::binary_search(boost::begin(rng), boost::end(rng), val); } /// \overload template<class ForwardRange, class Value, class BinaryPredicate> inline bool binary_search(const ForwardRange& rng, const Value& val, BinaryPredicate pred) { BOOST_RANGE_CONCEPT_ASSERT(( ForwardRangeConcept<const ForwardRange> )); return std::binary_search(boost::begin(rng), boost::end(rng), val, pred); } } // namespace range using range::binary_search; } // namespace boost #endif // include guard
{ "pile_set_name": "Github" }
{ "images" : [ { "idiom" : "universal", "scale" : "1x" }, { "idiom" : "universal", "filename" : "[email protected]", "scale" : "2x" }, { "idiom" : "universal", "scale" : "3x" } ], "info" : { "version" : 1, "author" : "xcode" } }
{ "pile_set_name": "Github" }
#as: --32 -mrelax-relocations=yes #ld: -melf_i386 #objdump: -dw .*: +file format .* Disassembly of section .text: [a-f0-9]+ <_start>: +[a-f0-9]+: 66 13 81 f8 ff ff ff adc -0x8\(%ecx\),%ax +[a-f0-9]+: 66 03 99 f8 ff ff ff add -0x8\(%ecx\),%bx +[a-f0-9]+: 66 23 89 f8 ff ff ff and -0x8\(%ecx\),%cx +[a-f0-9]+: 66 3b 91 f8 ff ff ff cmp -0x8\(%ecx\),%dx +[a-f0-9]+: 66 0b b9 f8 ff ff ff or -0x8\(%ecx\),%di +[a-f0-9]+: 66 1b b1 f8 ff ff ff sbb -0x8\(%ecx\),%si +[a-f0-9]+: 66 2b a9 f8 ff ff ff sub -0x8\(%ecx\),%bp +[a-f0-9]+: 66 33 a1 f8 ff ff ff xor -0x8\(%ecx\),%sp +[a-f0-9]+: 66 85 89 f8 ff ff ff test %cx,-0x8\(%ecx\) +[a-f0-9]+: 66 13 81 fc ff ff ff adc -0x4\(%ecx\),%ax +[a-f0-9]+: 66 03 99 fc ff ff ff add -0x4\(%ecx\),%bx +[a-f0-9]+: 66 23 89 fc ff ff ff and -0x4\(%ecx\),%cx +[a-f0-9]+: 66 3b 91 fc ff ff ff cmp -0x4\(%ecx\),%dx +[a-f0-9]+: 66 0b b9 fc ff ff ff or -0x4\(%ecx\),%di +[a-f0-9]+: 66 1b b1 fc ff ff ff sbb -0x4\(%ecx\),%si +[a-f0-9]+: 66 2b a9 fc ff ff ff sub -0x4\(%ecx\),%bp +[a-f0-9]+: 66 33 a1 fc ff ff ff xor -0x4\(%ecx\),%sp +[a-f0-9]+: 66 85 89 fc ff ff ff test %cx,-0x4\(%ecx\) #pass
{ "pile_set_name": "Github" }
#!/bin/sh cargo doc && git fetch origin gh-pages && git checkout gh-pages && (git mv doc doc-$(git describe --always master^) || rm -rf doc) && mv target/doc/ ./doc && git add -A ./doc* && git commit -m 'Update docs.' && git push origin gh-pages
{ "pile_set_name": "Github" }
// (C) Copyright Dave Abrahams, Steve Cleary, Beman Dawes, Howard // Hinnant & John Maddock 2000. // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt). // // See http://www.boost.org/libs/type_traits for most recent version including documentation. #ifndef BOOST_TT_ADD_VOLATILE_HPP_INCLUDED #define BOOST_TT_ADD_VOLATILE_HPP_INCLUDED #include <boost/config.hpp> namespace boost { // * convert a type T to volatile type - add_volatile<T> // this is not required since the result is always // the same as "T volatile", but it does suppress warnings // from some compilers: #if defined(BOOST_MSVC) // This bogus warning will appear when add_volatile is applied to a // const volatile reference because we can't detect const volatile // references with MSVC6. # pragma warning(push) # pragma warning(disable:4181) // warning C4181: qualifier applied to reference type ignored #endif template <class T> struct add_volatile{ typedef T volatile type; }; #if defined(BOOST_MSVC) # pragma warning(pop) #endif template <class T> struct add_volatile<T&>{ typedef T& type; }; } // namespace boost #endif // BOOST_TT_ADD_VOLATILE_HPP_INCLUDED
{ "pile_set_name": "Github" }
{ "name": "Kreissparkasse Kaiserslautern", "displayName": "Kreissparkasse Kaiserslautern", "properties": [ "kskkl.de" ] }
{ "pile_set_name": "Github" }
require('../../../modules/es6.array.every'); module.exports = require('../../../modules/_entry-virtual')('Array').every;
{ "pile_set_name": "Github" }
{ "id": "bamboo-lattice-fence", "name": "Bamboo Lattice Fence", "games": { "nh": { "orderable": false, "customizable": false, "sellPrice": { "currency": "bells", "value": 96 }, "recipe": { "bamboo-piece": 6 } } }, "category": "Furniture" }
{ "pile_set_name": "Github" }
Device Manager Proposal =============== * [Motivation](#motivation) * [Use Cases](#use-cases) * [Objectives](#objectives) * [Non Objectives](#non-objectives) * [Vendor story](#vendor-story) * [End User story](#end-user-story) * [Device Plugin](#device-plugin) * [Introduction](#introduction) * [Registration](#registration) * [Unix Socket](#unix-socket) * [Protocol Overview](#protocol-overview) * [API specification](#api-specification) * [HealthCheck and Failure Recovery](#healthcheck-and-failure-recovery) * [API Changes](#api-changes) * [Upgrading your cluster](#upgrading-your-cluster) * [Installation](#installation) * [Versioning](#versioning) * [References](#references) _Authors:_ * @RenaudWasTaken - Renaud Gaubert &lt;[email protected]&gt; * @jiayingz - Jiaying Zhang &lt;[email protected]&gt; # Motivation Kubernetes currently supports discovery of CPU and Memory primarily to a minimal extent. Very few devices are handled natively by Kubelet. It is not a sustainable solution to expect every hardware vendor to add their vendor specific code inside Kubernetes to make their devices usable. Instead, we want a solution for vendors to be able to advertise their resources to Kubelet and monitor them without writing custom Kubernetes code. We also want to provide a consistent and portable solution for users to consume hardware devices across k8s clusters. This document describes a vendor independent solution to: * Discovering and representing external devices * Making these devices available to the containers, using these devices, scrubbing and securely sharing these devices. * Health Check of these devices Because devices are vendor dependent and have their own sets of problems and mechanisms, the solution we describe is a plugin mechanism that may run in a container deployed through the DaemonSets mechanism or in bare metal mode. The targeted devices include GPUs, High-performance NICs, FPGAs, InfiniBand, Storage devices, and other similar computing resources that require vendor specific initialization and setup. The goal is for a user to be able to enable vendor devices (e.g: GPUs) through the following simple steps: * `kubectl create -f http://vendor.com/device-plugin-daemonset.yaml` * When launching `kubectl describe nodes`, the devices appear in the node status as `vendor-domain/vendor-device`. Note: naming convention is discussed in PR [#844](https://github.com/kubernetes/community/pull/844) # Use Cases * I want to use a particular device type (GPU, InfiniBand, FPGA, etc.) in my pod. * I should be able to use that device without writing custom Kubernetes code. * I want a consistent and portable solution to consume hardware devices across k8s clusters. # Objectives 1. Add support for vendor specific Devices in kubelet: * Through an extension mechanism. * Which allows discovery and health check of devices. * Which allows hooking the runtime to make devices available in containers and cleaning them up. 2. Define a deployment mechanism for this new API. 3. Define a versioning mechanism for this new API. # Non Objectives 1. Handling heterogeneous nodes and topology related problems 2. Collecting metrics is not part of this proposal. We will only solve Health Check. # TLDR At their core, device plugins are simple gRPC servers that may run in a container deployed through the pod mechanism or in bare metal mode. These servers implement the gRPC interface defined later in this design document and once the device plugin makes itself known to kubelet, kubelet will interact with the device through two simple functions: 1. A `ListAndWatch` function for the kubelet to Discover the devices and their properties as well as notify of any status change (device became unhealthy). 2. An `Allocate` function which is called before creating a user container consuming any exported devices ![Process](device-plugin-overview.png) # Vendor story Kubernetes provides to vendors a mechanism called device plugins to: * advertise devices. * monitor devices (currently perform health checks). * hook into the runtime to execute device specific instructions (e.g: Clean GPU memory) and to take in order to make the device available in the container. ```go service DevicePlugin { // returns a stream of []Device rpc ListAndWatch(Empty) returns (stream ListAndWatchResponse) {} rpc Allocate(AllocateRequest) returns (AllocateResponse) {} } ``` The gRPC server that the device plugin must implement is expected to be advertised on a unix socket in a mounted hostPath (e.g: `/var/lib/kubelet/device-plugins/nvidiaGPU.sock`). Finally, to notify Kubelet of the existence of the device plugin, the vendor's device plugin will have to make a request to Kubelet's own gRPC server. Only then will kubelet start interacting with the vendor's device plugin through the gRPC apis. # End User story When setting up the cluster the admin knows what kind of devices are present on the different machines and therefore can select what devices to enable. The cluster admin knows his cluster has NVIDIA GPUs therefore he deploys the NVIDIA device plugin through: `kubectl create -f nvidia.io/device-plugin.yml` The device plugin lands on all the nodes of the cluster and if it detects that there are no GPUs it terminates (assuming `restart: OnFailure`). However, when there are GPUs it reports them to Kubelet and starts its gRPC server to monitor devices and hook into the container creation process. Devices reported by Device Plugins are advertised as Extended resources of the shape `vendor-domain/vendor-device`. E.g., Nvidia GPUs are advertised as `nvidia.com/gpu` Devices can be selected using the same process as for OIRs in the pod spec. Devices have no impact on QOS. However, for the alpha, we expect the request to have limits == requests. 1. A user submits a pod spec requesting X GPUs (or devices) through `vendor-domain/vendor-device` 2. The scheduler filters the nodes which do not match the resource requests 3. The pod lands on the node and Kubelet decides which device should be assigned to the pod 4. Kubelet calls `Allocate` on the matching Device Plugins 5. The user deletes the pod or the pod terminates When receiving a pod which requests Devices kubelet is in charge of: * deciding which device to assign to the pod's containers * Calling the `Allocate` function with the list of devices The scheduler is still in charge of filtering the nodes which cannot satisfy the resource requests. # Device Plugin ## Introduction The device plugin is structured in 3 parts: 1. Registration: The device plugin advertises its presence to Kubelet 2. ListAndWatch: The device plugin advertises a list of Devices to Kubelet and sends it again if the state of a Device changes 3. Allocate: When creating containers, Kubelet calls the device plugin's `Allocate` function so that it can run device specific instructions (gpu cleanup, QRNG initialization, ...) and instruct Kubelet how to make the device available in the container. ## Registration When starting the device plugin is expected to make a (client) gRPC call to the `Register` function that Kubelet exposes. The communication between Kubelet is expected to happen only through Unix sockets and follow this simple pattern: 1. The device plugins sends a `RegisterRequest` to Kubelet (through a gRPC request) 2. Kubelet answers to the `RegisterRequest` with a `RegisterResponse` containing any error Kubelet might have encountered 3. The device plugin start its gRPC server if it did not receive an error ## Unix Socket Device Plugins are expected to communicate with Kubelet through gRPC on an Unix socket. When starting the gRPC server, they are expected to create a unix socket at the following host path: `/var/lib/kubelet/device-plugins/`. For non bare metal device plugin this means they will have to mount the folder as a volume in their pod spec ([see Installation](#installation)). Device plugins can expect to find the socket to register themselves on the host at the following path: `/var/lib/kubelet/device-plugins/kubelet.sock`. ## Protocol Overview When first registering themselves against Kubelet, the device plugin will send: * The name of their unix socket * [The API version against which they were built](#versioning). * Their `ResourceName` they want to advertise Kubelet answers with whether or not there was an error. The errors may include (but not limited to): * API version not supported * A device plugin already registered this `ResourceName` After successful registration, Kubelet will interact with the plugin through the following functions: * ListAndWatch: The device plugin advertises a list of Devices to Kubelet and sends it again if the state of a Device changes * `Allocate`: Called when creating a container with a list of devices ![Process](device-plugin.png) ## API Specification ```go // Registration is the service advertised by the Kubelet // Only when Kubelet answers with a success code to a Register Request // may Device Plugins start their service // Registration may fail when device plugin version is not supported by // Kubelet or the registered resourceName is already taken by another // active device plugin. Device plugin is expected to terminate upon registration failure service Registration { rpc Register(RegisterRequest) returns (Empty) {} } // DevicePlugin is the service advertised by Device Plugins service DevicePlugin { // ListAndWatch returns a stream of List of Devices // Whenever a Device state change or a Device disappears, ListAndWatch // returns the new list rpc ListAndWatch(Empty) returns (stream ListAndWatchResponse) {} // Allocate is called during container creation so that the Device // Plugin can run device specific operations and instruct Kubelet // of the steps to make the Device available in the container rpc Allocate(AllocateRequest) returns (AllocateResponse) {} } message RegisterRequest { // Version of the API the Device Plugin was built against string version = 1; // Name of the unix socket the device plugin is listening on // PATH = path.Join(DevicePluginPath, endpoint) string endpoint = 2; // Schedulable resource name string resource_name = 3; } // - Allocate is expected to be called during pod creation since allocation // failures for any container would result in pod startup failure. // - Allocate allows kubelet to exposes additional artifacts in a pod's // environment as directed by the plugin. // - Allocate allows Device Plugin to run device specific operations on // the Devices requested message AllocateRequest { repeated string devicesIDs = 1; } // Failure Handling: // if Kubelet sends an allocation request for dev1 and dev2. // Allocation on dev1 succeeds but allocation on dev2 fails. // The Device plugin should send a ListAndWatch update and fail the // Allocation request message AllocateResponse { repeated DeviceRuntimeSpec spec = 1; } // ListAndWatch returns a stream of List of Devices // Whenever a Device state change or a Device disappears, ListAndWatch // returns the new list message ListAndWatchResponse { repeated Device devices = 1; } // The list to be added to the CRI spec message DeviceRuntimeSpec { string ID = 1; // List of environment variable to set in the container. map<string, string> envs = 2; // Mounts for the container. repeated Mount mounts = 3; // Devices for the container repeated DeviceSpec devices = 4; } // DeviceSpec specifies a host device to mount into a container. message DeviceSpec { // Path of the device within the container. string container_path = 1; // Path of the device on the host. string host_path = 2; // Cgroups permissions of the device, candidates are one or more of // * r - allows container to read from the specified device. // * w - allows container to write to the specified device. // * m - allows container to create device files that do not yet exist. string permissions = 3; } // Mount specifies a host volume to mount into a container. // where device library or tools are installed on host and container message Mount { // Path of the mount on the host. string host_path = 1; // Path of the mount within the container. string mount_path = 2; // If set, the mount is read-only. bool read_only = 3; } // E.g: // struct Device { // ID: "GPU-fef8089b-4820-abfc-e83e-94318197576e", // State: "Healthy", //} message Device { string ID = 2; string health = 3; } ``` ### HealthCheck and Failure Recovery We want Kubelet as well as the Device Plugins to recover from failures that may happen on any side of this protocol. At the communication level, gRPC is a very strong piece of software and is able to ensure that if failure happens it will try its best to recover through exponential backoff reconnection and Keep Alive checks. The proposed mechanism intends to replace any device specific handling in Kubelet. Therefore in general, device plugin failure or upgrade means that Kubelet is not able to accept any pod requesting a Device until the upgrade or failure finishes. If a device fails, the Device Plugin should signal that through the `ListAndWatch` gRPC stream. We then expect Kubelet to fail the Pod. If any Device Plugin fails the behavior we expect depends on the task Kubelet is performing: * In general we expect Kubelet to remove any devices that are owned by the failed device plugin from the node capacity. We also expect node allocatable to be equal to node capacity. * We however do not expect Kubelet to fail or restart any pods or containers running that are using these devices. * If Kubelet is in the process of allocating a device, then it should fail the container process. If the Kubelet fails or restarts, we expect the Device Plugins to know about it through gRPC's Keep alive feature and try to reconnect to Kubelet. When Kubelet fails or restarts it should know what are the devices that are owned by the different containers and be able to rebuild a list of available devices. We are expecting to implement this through a checkpointing mechanism that Kubelet would write and read from. ## API Changes When discovering the devices, Kubelet will be in charge of advertising those resources to the API server as part of the kubelet node update current protocol. We will be using extended resources to schedule, trigger and advertise these Devices. When a Device plugin registers two `foo-device` the node status will be updated to advertise 2 `vendor-domain/foo-device`. If a user wants to trigger the device plugin he only needs to request this through the same mechanism as OIRs in his Pod Spec. # Upgrading your cluster *TLDR:* Given that we cannot guarantee that the Device Plugins are not running a daemon providing a critical service to Devices and when stopped will crash the running containers, it is up to the vendor to specify the upgrading scheme of their device plugin. However, If you are upgrading either Kubelet or any device plugin the safest way is to drain the node of all pods and upgrade. Depending on what you are upgrading and what changes happened then it is completely possible to only restart just Kubelet or just the device plugin. ## Upgrading Kubelet This assumes that the Device Plugins running on the nodes fully implement the protocol and are able to recover from a Kubelet crash. Then, as long as the Device Plugin API does not change upgrading Kubelet can be done seamlessly through a Kubelet restart. *Currently:* As mentioned in the Versioning section, we currently expect the Device Plugin's API version to match exactly the Kubelet's Device Plugin API version. Therefore if the Device Plugin API version change then you will have to change the Device Plugin too. *Future:* When the Device Plugin API becomes a stable feature, versioning should be backward compatible and even if Kubelet has a different Device Plugin API, it should not require a Device Plugin upgrade. Refer to the versioning section for versioning scheme compatibility. ## Upgrading Device Plugins Because we cannot enforce what the different Device Plugins will do, we cannot say for certain that upgrading a device plugin will not crash any containers on the node. It is therefore up to the Device Plugin vendors to specify if the Device Plugins can be upgraded without impacting any running containers. As mentioned earlier, the safest way is to drain the node before upgrading the Device Plugins. # Installation The installation process should be straightforward to the user, transparent and similar to other regular Kubernetes actions. The device plugin should also run in containers so that Kubernetes can deploy them and restart the plugins when they fail. However, we should not prevent the user from deploying a bare metal device plugin. Deploying the device plugins through DemonSets makes sense as the cluster admin would be able to specify which machines it wants the device plugins to run on, the process is similar to any Kubernetes action and does not require to change any parts of Kubernetes. Additionally, for integrated solutions such as `kubeadm` we can add support to auto-deploy community vetted Device Plugins. Thus not fragmenting once more the Kubernetes ecosystem. For users installing Kubernetes without using an integrated solution such as `kubeadm` they would use the examples that we would provide at: `https://github.com/vendor/device-plugin/tree/master/device-plugin.yaml` YAML example: ```yaml apiVersion: extensions/v1beta1 kind: DaemonSet metadata: spec: template: metadata: labels: - name: device-plugin spec: containers: name: device-plugin-ctr image: NVIDIA/device-plugin:1.0 volumeMounts: - mountPath: /device-plugin - name: device-plugin volumes: - name: device-plugin hostPath: path: /var/lib/kubelet/device-plugins ``` # Versioning Currently we require exact version match between Kubelet and Device Plugin. API version is expected to be increased only upon incompatible API changes. Follow protobuf guidelines on versioning: * Do not change ordering * Do not remove fields or change types * Add optional fields * Introducing new fields with proper default values * Freeze the package name to `apis/device-plugin/v1alpha1` * Have kubelet and the Device Plugin negotiate versions if we do break the API # References * [Adding a proposal for hardware accelerators](https://github.com/kubernetes/community/pull/844) * [Enable "kick the tires" support for NVIDIA GPUs in COS](https://github.com/kubernetes/kubernetes/pull/45136) * [Extend experimental support to multiple NVIDIA GPUs](https://github.com/kubernetes/kubernetes/pull/42116) * [Kubernetes Meeting notes](https://docs.google.com/document/d/1Qg42Nmv-QwL4RxicsU2qtZgFKOzANf8fGayw8p3lX6U/edit#) * [Better Abstraction for Compute Resources in Kubernetes](https://docs.google.com/document/d/1666PPUs4Lz56TqKygcy6mXkNazde-vwA7q4e5H92sUc) * [Extensible support for hardware devices in Kubernetes (join [email protected] for access)](https://docs.google.com/document/d/1LHeTPx_fWA1PdZkHuALPzYxR0AYXUiiXdo3S0g2VSlo/edit)
{ "pile_set_name": "Github" }
/* Copyright 2019 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by 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. ==============================================================================*/ #include <stdint.h> #include <memory> #include <vector> #include <gtest/gtest.h> #include "tensorflow/lite/interpreter.h" #include "tensorflow/lite/kernels/subgraph_test_util.h" namespace tflite { using subgraph_test_util::CheckIntTensor; using subgraph_test_util::ControlFlowOpTest; using subgraph_test_util::FillIntTensor; namespace { class WhileTest : public ControlFlowOpTest {}; // The test builds a model that produces the i-th number of // triangular number sequence. // // TODO(ycling): Consider to improve this test case by adding a // concat into the body subgraph. TEST_F(WhileTest, TestTriangularNumberSequence) { const std::vector<int> expected = {1, 3, 6, 10, 15, 21, 28}; for (int i = 0; i < expected.size(); ++i) { interpreter_.reset(new Interpreter); interpreter_->AddSubgraphs(2); builder_->BuildLessEqualCondSubgraph(interpreter_->subgraph(1), i); builder_->BuildAccumulateLoopBodySubgraph(interpreter_->subgraph(2)); builder_->BuildWhileSubgraph(&interpreter_->primary_subgraph()); interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {1}); interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {1}); ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk); FillIntTensor(interpreter_->tensor(interpreter_->inputs()[0]), {1}); FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {1}); ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); TfLiteTensor* output1 = interpreter_->tensor(interpreter_->outputs()[0]); CheckIntTensor(output1, {1}, {i + 1}); TfLiteTensor* output2 = interpreter_->tensor(interpreter_->outputs()[1]); CheckIntTensor(output2, {1}, {expected[i]}); } } TEST_F(WhileTest, TestPadLoop) { interpreter_.reset(new Interpreter); interpreter_->AddSubgraphs(2); builder_->BuildLessEqualCondSubgraph(interpreter_->subgraph(1), 3); builder_->BuildPadLoopBodySubgraph(interpreter_->subgraph(2), {1, 2}); builder_->BuildWhileSubgraph(&interpreter_->primary_subgraph()); interpreter_->ResizeInputTensor(interpreter_->inputs()[0], {1}); interpreter_->ResizeInputTensor(interpreter_->inputs()[1], {2}); ASSERT_EQ(interpreter_->AllocateTensors(), kTfLiteOk); FillIntTensor(interpreter_->tensor(interpreter_->inputs()[0]), {1}); FillIntTensor(interpreter_->tensor(interpreter_->inputs()[1]), {5, 7}); ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); TfLiteTensor* output1 = interpreter_->tensor(interpreter_->outputs()[0]); CheckIntTensor(output1, {1}, {4}); TfLiteTensor* output2 = interpreter_->tensor(interpreter_->outputs()[1]); CheckIntTensor(output2, {11}, {0, 0, 0, 5, 7, 0, 0, 0, 0, 0, 0}); // The extra invocation serves as a regression test: There was a bug that // invoking a while loop with dynamic shaped body makes the interpreter // state uninvokable. ASSERT_EQ(interpreter_->Invoke(), kTfLiteOk); } } // namespace } // namespace tflite
{ "pile_set_name": "Github" }
#!/bin/sh console_null_workaround_enabled() { return 0 } console_null_workaround_run() { if [ ! -h /proc/self/fd/0 ] ; then exec 0> /dev/null fi if [ ! -h /proc/self/fd/1 ] ; then exec 1> /dev/null fi if [ ! -h /proc/self/fd/2 ] ; then exec 2> /dev/null fi }
{ "pile_set_name": "Github" }
/* $Id: icc.h,v 1.4.2.2 2004/01/12 22:52:26 keil Exp $ * * ICC specific routines * * Author Matt Henderson & Guy Ellis * Copyright by Traverse Technologies Pty Ltd, www.travers.com.au * * This software may be used and distributed according to the terms * of the GNU General Public License, incorporated herein by reference. * * 1999.7.14 Initial implementation of routines for Siemens ISDN * Communication Controller PEB 2070 based on the ISAC routines * written by Karsten Keil. */ /* All Registers original Siemens Spec */ #define ICC_MASK 0x20 #define ICC_ISTA 0x20 #define ICC_STAR 0x21 #define ICC_CMDR 0x21 #define ICC_EXIR 0x24 #define ICC_ADF2 0x39 #define ICC_SPCR 0x30 #define ICC_ADF1 0x38 #define ICC_CIR0 0x31 #define ICC_CIX0 0x31 #define ICC_CIR1 0x33 #define ICC_CIX1 0x33 #define ICC_STCR 0x37 #define ICC_MODE 0x22 #define ICC_RSTA 0x27 #define ICC_RBCL 0x25 #define ICC_RBCH 0x2A #define ICC_TIMR 0x23 #define ICC_SQXR 0x3b #define ICC_MOSR 0x3a #define ICC_MOCR 0x3a #define ICC_MOR0 0x32 #define ICC_MOX0 0x32 #define ICC_MOR1 0x34 #define ICC_MOX1 0x34 #define ICC_RBCH_XAC 0x80 #define ICC_CMD_TIM 0x0 #define ICC_CMD_RES 0x1 #define ICC_CMD_DU 0x3 #define ICC_CMD_EI1 0x4 #define ICC_CMD_SSP 0x5 #define ICC_CMD_DT 0x6 #define ICC_CMD_AR 0x8 #define ICC_CMD_ARL 0xA #define ICC_CMD_AI 0xC #define ICC_CMD_DI 0xF #define ICC_IND_DR 0x0 #define ICC_IND_FJ 0x2 #define ICC_IND_EI1 0x4 #define ICC_IND_INT 0x6 #define ICC_IND_PU 0x7 #define ICC_IND_AR 0x8 #define ICC_IND_ARL 0xA #define ICC_IND_AI 0xC #define ICC_IND_AIL 0xE #define ICC_IND_DC 0xF extern void ICCVersion(struct IsdnCardState *cs, char *s); extern void initicc(struct IsdnCardState *cs); extern void icc_interrupt(struct IsdnCardState *cs, u_char val); extern void clear_pending_icc_ints(struct IsdnCardState *cs); extern void setup_icc(struct IsdnCardState *);
{ "pile_set_name": "Github" }
// Copyright 2016 Google Inc. All Rights Reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by 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 internal import ( "fmt" "time" gax "github.com/googleapis/gax-go" "golang.org/x/net/context" ) // Retry calls the supplied function f repeatedly according to the provided // backoff parameters. It returns when one of the following occurs: // When f's first return value is true, Retry immediately returns with f's second // return value. // When the provided context is done, Retry returns with ctx.Err(). func Retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error)) error { return retry(ctx, bo, f, gax.Sleep) } func retry(ctx context.Context, bo gax.Backoff, f func() (stop bool, err error), sleep func(context.Context, time.Duration) error) error { var lastErr error for { stop, err := f() if stop { return err } // Remember the last "real" error from f. if err != nil && err != context.Canceled && err != context.DeadlineExceeded { lastErr = err } p := bo.Pause() if cerr := sleep(ctx, p); cerr != nil { if lastErr != nil { return fmt.Errorf("%v; last function err: %v", cerr, lastErr) } return cerr } } }
{ "pile_set_name": "Github" }
{ "name": "@tensorflow/tfjs-backend-webgpu", "version": "0.0.1", "main": "dist/index.js", "types": "dist/index.d.ts", "jsnext:main": "dist/tf-webgpu.esm.js", "module": "dist/tf-webgpu.esm.js", "unpkg": "dist/tf-webgpu.min.js", "jsdelivr": "dist/tf-webgpu.min.js", "scripts": { "publish-local": "rimraf dist/ && yarn build && rollup -c && yalc push", "build": "tsc", "link-local": "yalc link", "unlink-local": "yalc remove", "lint": "tslint -p . -t verbose", "test": "karma start --browsers='chrome_webgpu'", "test-ci": "./scripts/test-ci.sh" }, "license": "Apache-2.0", "devDependencies": { "@tensorflow/tfjs-core": "1.2.1", "@types/jasmine": "~2.5.53", "clang-format": "~1.2.2", "http-server": "~0.10.0", "jasmine-core": "~3.1.0", "karma": "~4.0.0", "karma-browserstack-launcher": "~1.4.0", "karma-chrome-launcher": "~2.2.0", "karma-firefox-launcher": "~1.1.0", "karma-jasmine": "~1.1.1", "karma-typescript": "~4.1.1", "rimraf": "~2.6.2", "rollup": "^0.58.2", "rollup-plugin-commonjs": "9.1.3", "rollup-plugin-node-resolve": "3.3.0", "rollup-plugin-typescript2": "0.13.0", "rollup-plugin-uglify": "~3.0.0", "tslint": "~5.11.0", "tslint-no-circular-imports": "^0.5.0", "typescript": "3.3.3333", "yalc": "~1.0.0-pre.21" }, "dependencies": { "@webgpu/shaderc": "0.0.6", "@webgpu/types": "0.0.6" }, "peerDependencies": { "@tensorflow/tfjs-core": "1.2.1" } }
{ "pile_set_name": "Github" }
@charset "UTF-8"; /// Provides an easy way to change the `word-wrap` property. /// /// @param {String} $wrap [break-word] /// Value for the `word-break` property. /// /// @example scss - Usage /// .wrapper { /// @include word-wrap(break-word); /// } /// /// @example css - CSS Output /// .wrapper { /// overflow-wrap: break-word; /// word-break: break-all; /// word-wrap: break-word; /// } @mixin word-wrap($wrap: break-word) { overflow-wrap: $wrap; word-wrap: $wrap; @if $wrap == break-word { word-break: break-all; } @else { word-break: $wrap; } }
{ "pile_set_name": "Github" }
resources: - rbac.yaml - deployment.yaml - service.yaml
{ "pile_set_name": "Github" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <title>Flex Bison C++ Example: example Namespace Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <!-- Generated by Doxygen 1.5.9 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main&nbsp;Page</span></a></li> <li class="current"><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="namespaces.html"><span>Namespace&nbsp;List</span></a></li> <li><a href="namespacemembers.html"><span>Namespace&nbsp;Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>example Namespace Reference</h1>The <a class="el" href="namespaceexample.html" title="The example namespace is used to encapsulate the three parser classes example::Parser...">example</a> namespace is used to encapsulate the three parser classes <a class="el" href="classexample_1_1Parser.html" title="A Bison parser.">example::Parser</a>, <a class="el" href="classexample_1_1Scanner.html" title="Scanner is a derived class to add some extra function to the scanner class.">example::Scanner</a> and <a class="el" href="classexample_1_1Driver.html" title="The Driver class brings together all components.">example::Driver</a>. <a href="#_details">More...</a> <p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Classes</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexample_1_1Driver.html">Driver</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The <a class="el" href="classexample_1_1Driver.html" title="The Driver class brings together all components.">Driver</a> class brings together all components. <a href="classexample_1_1Driver.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexample_1_1location.html">location</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Abstract a <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a>. <a href="classexample_1_1location.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexample_1_1Parser.html">Parser</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A Bison parser. <a href="classexample_1_1Parser.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexample_1_1position.html">position</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Abstract a <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a>. <a href="classexample_1_1position.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexample_1_1Scanner.html">Scanner</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classexample_1_1Scanner.html" title="Scanner is a derived class to add some extra function to the scanner class.">Scanner</a> is a derived class to add some extra function to the scanner class. <a href="classexample_1_1Scanner.html#_details">More...</a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexample_1_1stack.html">stack</a></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">class &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classexample_1_1slice.html">slice</a></td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Present a <a class="el" href="classexample_1_1slice.html" title="Present a slice of the top of a stack.">slice</a> of the top of a <a class="el" href="classexample_1_1stack.html">stack</a>. <a href="classexample_1_1slice.html#_details">More...</a><br></td></tr> <tr><td colspan="2"><br><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classexample_1_1location.html">location</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#89372a147befefadf885a49e91bf178a">operator+</a> (const <a class="el" href="classexample_1_1location.html">location</a> &amp;begin, const <a class="el" href="classexample_1_1location.html">location</a> &amp;end)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Join two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects to create a <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a>. <a href="#89372a147befefadf885a49e91bf178a"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classexample_1_1location.html">location</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#59d98eb533706b8a9236ee6bf6db53ca">operator+</a> (const <a class="el" href="classexample_1_1location.html">location</a> &amp;begin, unsigned int width)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects. <a href="#59d98eb533706b8a9236ee6bf6db53ca"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classexample_1_1location.html">location</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#6a1a320eb30117289a70be3cc20fcba0">operator+=</a> (<a class="el" href="classexample_1_1location.html">location</a> &amp;res, unsigned int width)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add and assign a <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a>. <a href="#6a1a320eb30117289a70be3cc20fcba0"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#a68799a72a42f5df1011f26ae428a16f">operator==</a> (const <a class="el" href="classexample_1_1location.html">location</a> &amp;loc1, const <a class="el" href="classexample_1_1location.html">location</a> &amp;loc2)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects. <a href="#a68799a72a42f5df1011f26ae428a16f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#2d1471a6dd6cdfb75001fb44df444110">operator!=</a> (const <a class="el" href="classexample_1_1location.html">location</a> &amp;loc1, const <a class="el" href="classexample_1_1location.html">location</a> &amp;loc2)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects. <a href="#2d1471a6dd6cdfb75001fb44df444110"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#42e9c113ddb6666d26c0ad11d8950bf6">operator&lt;&lt;</a> (std::ostream &amp;ostr, const <a class="el" href="classexample_1_1location.html">location</a> &amp;loc)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Intercept output stream redirection. <a href="#42e9c113ddb6666d26c0ad11d8950bf6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classexample_1_1position.html">position</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#02ee68422c93270b3ffe561715c7c211">operator+=</a> (<a class="el" href="classexample_1_1position.html">position</a> &amp;res, const int width)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add and assign a <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a>. <a href="#02ee68422c93270b3ffe561715c7c211"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classexample_1_1position.html">position</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#749b87aac7a436e54888dedc8e278408">operator+</a> (const <a class="el" href="classexample_1_1position.html">position</a> &amp;begin, const int width)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <a href="#749b87aac7a436e54888dedc8e278408"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classexample_1_1position.html">position</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#52597b3bd50d7f8395addd568df07108">operator-=</a> (<a class="el" href="classexample_1_1position.html">position</a> &amp;res, const int width)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add and assign a <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a>. <a href="#52597b3bd50d7f8395addd568df07108"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classexample_1_1position.html">position</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#b6cb659f2190556d57885b763ac2f728">operator-</a> (const <a class="el" href="classexample_1_1position.html">position</a> &amp;begin, const int width)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <a href="#b6cb659f2190556d57885b763ac2f728"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#41eca92d18c869383fa7a715c9d38232">operator==</a> (const <a class="el" href="classexample_1_1position.html">position</a> &amp;pos1, const <a class="el" href="classexample_1_1position.html">position</a> &amp;pos2)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <a href="#41eca92d18c869383fa7a715c9d38232"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#f82508fee02df7922dae5a182b80b548">operator!=</a> (const <a class="el" href="classexample_1_1position.html">position</a> &amp;pos1, const <a class="el" href="classexample_1_1position.html">position</a> &amp;pos2)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Compare two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <a href="#f82508fee02df7922dae5a182b80b548"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="namespaceexample.html#b776d57e6954f0e84d5fec0f10acd613">operator&lt;&lt;</a> (std::ostream &amp;ostr, const <a class="el" href="classexample_1_1position.html">position</a> &amp;pos)</td></tr> <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Intercept output stream redirection. <a href="#b776d57e6954f0e84d5fec0f10acd613"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> The <a class="el" href="namespaceexample.html" title="The example namespace is used to encapsulate the three parser classes example::Parser...">example</a> namespace is used to encapsulate the three parser classes <a class="el" href="classexample_1_1Parser.html" title="A Bison parser.">example::Parser</a>, <a class="el" href="classexample_1_1Scanner.html" title="Scanner is a derived class to add some extra function to the scanner class.">example::Scanner</a> and <a class="el" href="classexample_1_1Driver.html" title="The Driver class brings together all components.">example::Driver</a>. <p> <hr><h2>Function Documentation</h2> <a class="anchor" name="f82508fee02df7922dae5a182b80b548"></a><!-- doxytag: member="example::operator!=" ref="f82508fee02df7922dae5a182b80b548" args="(const position &amp;pos1, const position &amp;pos2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool example::operator!= </td> <td>(</td> <td class="paramtype">const position &amp;&nbsp;</td> <td class="paramname"> <em>pos1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const position &amp;&nbsp;</td> <td class="paramname"> <em>pos2</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Compare two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <p> <p>Definition at line <a class="el" href="position_8hh_source.html#l00142">142</a> of file <a class="el" href="position_8hh_source.html">position.hh</a>.</p> </div> </div><p> <a class="anchor" name="2d1471a6dd6cdfb75001fb44df444110"></a><!-- doxytag: member="example::operator!=" ref="2d1471a6dd6cdfb75001fb44df444110" args="(const location &amp;loc1, const location &amp;loc2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool example::operator!= </td> <td>(</td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>loc1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>loc2</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Compare two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects. <p> <p>Definition at line <a class="el" href="location_8hh_source.html#l00136">136</a> of file <a class="el" href="location_8hh_source.html">location.hh</a>.</p> </div> </div><p> <a class="anchor" name="749b87aac7a436e54888dedc8e278408"></a><!-- doxytag: member="example::operator+" ref="749b87aac7a436e54888dedc8e278408" args="(const position &amp;begin, const int width)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classexample_1_1position.html">position</a> example::operator+ </td> <td>(</td> <td class="paramtype">const position &amp;&nbsp;</td> <td class="paramname"> <em>begin</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int&nbsp;</td> <td class="paramname"> <em>width</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <p> <p>Definition at line <a class="el" href="position_8hh_source.html#l00110">110</a> of file <a class="el" href="position_8hh_source.html">position.hh</a>.</p> </div> </div><p> <a class="anchor" name="59d98eb533706b8a9236ee6bf6db53ca"></a><!-- doxytag: member="example::operator+" ref="59d98eb533706b8a9236ee6bf6db53ca" args="(const location &amp;begin, unsigned int width)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classexample_1_1location.html">location</a> example::operator+ </td> <td>(</td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>begin</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int&nbsp;</td> <td class="paramname"> <em>width</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects. <p> <p>Definition at line <a class="el" href="location_8hh_source.html#l00113">113</a> of file <a class="el" href="location_8hh_source.html">location.hh</a>.</p> <p>References <a class="el" href="location_8hh_source.html#l00084">example::location::columns()</a>.</p> </div> </div><p> <a class="anchor" name="89372a147befefadf885a49e91bf178a"></a><!-- doxytag: member="example::operator+" ref="89372a147befefadf885a49e91bf178a" args="(const location &amp;begin, const location &amp;end)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classexample_1_1location.html">location</a> example::operator+ </td> <td>(</td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>begin</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>end</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Join two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects to create a <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a>. <p> <p>Definition at line <a class="el" href="location_8hh_source.html#l00105">105</a> of file <a class="el" href="location_8hh_source.html">location.hh</a>.</p> <p>References <a class="el" href="location_8hh_source.html#l00101">example::location::end</a>.</p> </div> </div><p> <a class="anchor" name="02ee68422c93270b3ffe561715c7c211"></a><!-- doxytag: member="example::operator+=" ref="02ee68422c93270b3ffe561715c7c211" args="(position &amp;res, const int width)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classexample_1_1position.html">position</a>&amp; example::operator+= </td> <td>(</td> <td class="paramtype">position &amp;&nbsp;</td> <td class="paramname"> <em>res</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int&nbsp;</td> <td class="paramname"> <em>width</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add and assign a <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a>. <p> <p>Definition at line <a class="el" href="position_8hh_source.html#l00102">102</a> of file <a class="el" href="position_8hh_source.html">position.hh</a>.</p> <p>References <a class="el" href="position_8hh_source.html#l00085">example::position::columns()</a>.</p> </div> </div><p> <a class="anchor" name="6a1a320eb30117289a70be3cc20fcba0"></a><!-- doxytag: member="example::operator+=" ref="6a1a320eb30117289a70be3cc20fcba0" args="(location &amp;res, unsigned int width)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classexample_1_1location.html">location</a>&amp; example::operator+= </td> <td>(</td> <td class="paramtype">location &amp;&nbsp;</td> <td class="paramname"> <em>res</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">unsigned int&nbsp;</td> <td class="paramname"> <em>width</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add and assign a <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a>. <p> <p>Definition at line <a class="el" href="location_8hh_source.html#l00121">121</a> of file <a class="el" href="location_8hh_source.html">location.hh</a>.</p> <p>References <a class="el" href="location_8hh_source.html#l00084">example::location::columns()</a>.</p> </div> </div><p> <a class="anchor" name="b6cb659f2190556d57885b763ac2f728"></a><!-- doxytag: member="example::operator&#45;" ref="b6cb659f2190556d57885b763ac2f728" args="(const position &amp;begin, const int width)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classexample_1_1position.html">position</a> example::operator- </td> <td>(</td> <td class="paramtype">const position &amp;&nbsp;</td> <td class="paramname"> <em>begin</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int&nbsp;</td> <td class="paramname"> <em>width</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <p> <p>Definition at line <a class="el" href="position_8hh_source.html#l00125">125</a> of file <a class="el" href="position_8hh_source.html">position.hh</a>.</p> </div> </div><p> <a class="anchor" name="52597b3bd50d7f8395addd568df07108"></a><!-- doxytag: member="example::operator&#45;=" ref="52597b3bd50d7f8395addd568df07108" args="(position &amp;res, const int width)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const <a class="el" href="classexample_1_1position.html">position</a>&amp; example::operator-= </td> <td>(</td> <td class="paramtype">position &amp;&nbsp;</td> <td class="paramname"> <em>res</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const int&nbsp;</td> <td class="paramname"> <em>width</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Add and assign a <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a>. <p> <p>Definition at line <a class="el" href="position_8hh_source.html#l00118">118</a> of file <a class="el" href="position_8hh_source.html">position.hh</a>.</p> </div> </div><p> <a class="anchor" name="b776d57e6954f0e84d5fec0f10acd613"></a><!-- doxytag: member="example::operator&lt;&lt;" ref="b776d57e6954f0e84d5fec0f10acd613" args="(std::ostream &amp;ostr, const position &amp;pos)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::ostream&amp; example::operator&lt;&lt; </td> <td>(</td> <td class="paramtype">std::ostream &amp;&nbsp;</td> <td class="paramname"> <em>ostr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const position &amp;&nbsp;</td> <td class="paramname"> <em>pos</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intercept output stream redirection. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ostr</em>&nbsp;</td><td>the destination output stream </td></tr> <tr><td valign="top"></td><td valign="top"><em>pos</em>&nbsp;</td><td>a reference to the <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> to redirect </td></tr> </table> </dl> <p>Definition at line <a class="el" href="position_8hh_source.html#l00152">152</a> of file <a class="el" href="position_8hh_source.html">position.hh</a>.</p> <p>References <a class="el" href="position_8hh_source.html#l00097">example::position::column</a>, <a class="el" href="position_8hh_source.html#l00093">example::position::filename</a>, and <a class="el" href="position_8hh_source.html#l00095">example::position::line</a>.</p> </div> </div><p> <a class="anchor" name="42e9c113ddb6666d26c0ad11d8950bf6"></a><!-- doxytag: member="example::operator&lt;&lt;" ref="42e9c113ddb6666d26c0ad11d8950bf6" args="(std::ostream &amp;ostr, const location &amp;loc)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">std::ostream&amp; example::operator&lt;&lt; </td> <td>(</td> <td class="paramtype">std::ostream &amp;&nbsp;</td> <td class="paramname"> <em>ostr</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>loc</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intercept output stream redirection. <p> <dl compact><dt><b>Parameters:</b></dt><dd> <table border="0" cellspacing="2" cellpadding="0"> <tr><td valign="top"></td><td valign="top"><em>ostr</em>&nbsp;</td><td>the destination output stream </td></tr> <tr><td valign="top"></td><td valign="top"><em>loc</em>&nbsp;</td><td>a reference to the <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> to redirect</td></tr> </table> </dl> Avoid duplicate information. <p>Definition at line <a class="el" href="location_8hh_source.html#l00147">147</a> of file <a class="el" href="location_8hh_source.html">location.hh</a>.</p> <p>References <a class="el" href="location_8hh_source.html#l00099">example::location::begin</a>, <a class="el" href="position_8hh_source.html#l00097">example::position::column</a>, <a class="el" href="location_8hh_source.html#l00101">example::location::end</a>, <a class="el" href="position_8hh_source.html#l00093">example::position::filename</a>, and <a class="el" href="position_8hh_source.html#l00095">example::position::line</a>.</p> </div> </div><p> <a class="anchor" name="41eca92d18c869383fa7a715c9d38232"></a><!-- doxytag: member="example::operator==" ref="41eca92d18c869383fa7a715c9d38232" args="(const position &amp;pos1, const position &amp;pos2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool example::operator== </td> <td>(</td> <td class="paramtype">const position &amp;&nbsp;</td> <td class="paramname"> <em>pos1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const position &amp;&nbsp;</td> <td class="paramname"> <em>pos2</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Compare two <a class="el" href="classexample_1_1position.html" title="Abstract a position.">position</a> objects. <p> <p>Definition at line <a class="el" href="position_8hh_source.html#l00132">132</a> of file <a class="el" href="position_8hh_source.html">position.hh</a>.</p> <p>References <a class="el" href="position_8hh_source.html#l00097">example::position::column</a>, <a class="el" href="position_8hh_source.html#l00093">example::position::filename</a>, and <a class="el" href="position_8hh_source.html#l00095">example::position::line</a>.</p> </div> </div><p> <a class="anchor" name="a68799a72a42f5df1011f26ae428a16f"></a><!-- doxytag: member="example::operator==" ref="a68799a72a42f5df1011f26ae428a16f" args="(const location &amp;loc1, const location &amp;loc2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool example::operator== </td> <td>(</td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>loc1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const location &amp;&nbsp;</td> <td class="paramname"> <em>loc2</em></td><td>&nbsp;</td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td><code> [inline]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Compare two <a class="el" href="classexample_1_1location.html" title="Abstract a location.">location</a> objects. <p> <p>Definition at line <a class="el" href="location_8hh_source.html#l00129">129</a> of file <a class="el" href="location_8hh_source.html">location.hh</a>.</p> <p>References <a class="el" href="location_8hh_source.html#l00099">example::location::begin</a>, and <a class="el" href="location_8hh_source.html#l00101">example::location::end</a>.</p> </div> </div><p> </div> <hr size="1"><address style="text-align: right;"><small>Generated on Sat Sep 5 10:26:25 2009 for Flex Bison C++ Example by&nbsp; <a href="http://www.doxygen.org/index.html"> <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address> </body> </html>
{ "pile_set_name": "Github" }
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * @category Zend * @package Zend_Gdata * @subpackage Photos * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** * @see Zend_Gdata_Extension */ #require_once 'Zend/Gdata/Extension.php'; /** * @see Zend_Gdata_Photos */ #require_once 'Zend/Gdata/Photos.php'; /** * Represents the gphoto:size element used by the API. * The size of a photo in bytes. * * @category Zend * @package Zend_Gdata * @subpackage Photos * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Gdata_Photos_Extension_Size extends Zend_Gdata_Extension { protected $_rootNamespace = 'gphoto'; protected $_rootElement = 'size'; /** * Constructs a new Zend_Gdata_Photos_Extension_Size object. * * @param string $text (optional) The value to represent. */ public function __construct($text = null) { $this->registerAllNamespaces(Zend_Gdata_Photos::$namespaces); parent::__construct(); $this->setText($text); } }
{ "pile_set_name": "Github" }
class Libxmlxx3 < Formula desc "C++ wrapper for libxml" homepage "https://libxmlplusplus.sourceforge.io/" url "https://download.gnome.org/sources/libxml++/3.2/libxml++-3.2.0.tar.xz" sha256 "b786fae7fd7820d356698069a787d107995c3efcbef50d8f4efd3766ab768e4f" license "LGPL-2.1" livecheck do url :stable end bottle do cellar :any sha256 "583c5345ed243a5cea2bbf82e71a130e85554110ebe3927183171c66225a7c26" => :catalina sha256 "054180f67aa9d297a26c40fc9e6dcc27bf68e78f09db895b3821c68751eabae2" => :mojave sha256 "2da0d0f6e732f910e75e5b20c19a01056854d00feab6e1c2490b7722bbc1af29" => :high_sierra end depends_on "pkg-config" => :build depends_on "glibmm" uses_from_macos "libxml2" def install ENV.cxx11 system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" system "make", "install" end test do (testpath/"test.cpp").write <<~EOS #include <libxml++/libxml++.h> int main(int argc, char *argv[]) { xmlpp::Document document; document.set_internal_subset("homebrew", "", "https://www.brew.sh/xml/test.dtd"); xmlpp::Element *rootnode = document.create_root_node("homebrew"); return 0; } EOS ENV.libxml2 gettext = Formula["gettext"] glib = Formula["glib"] glibmm = Formula["glibmm"] libsigcxx = Formula["libsigc++@2"] flags = %W[ -I#{gettext.opt_include} -I#{glib.opt_include}/glib-2.0 -I#{glib.opt_lib}/glib-2.0/include -I#{glibmm.opt_include}/glibmm-2.4 -I#{glibmm.opt_lib}/glibmm-2.4/include -I#{include}/libxml++-3.0 -I#{libsigcxx.opt_include}/sigc++-2.0 -I#{libsigcxx.opt_lib}/sigc++-2.0/include -I#{lib}/libxml++-3.0/include -L#{gettext.opt_lib} -L#{glib.opt_lib} -L#{glibmm.opt_lib} -L#{libsigcxx.opt_lib} -L#{lib} -lglib-2.0 -lglibmm-2.4 -lgobject-2.0 -lintl -lsigc-2.0 -lxml++-3.0 -lxml2 ] system ENV.cxx, "-std=c++11", "test.cpp", "-o", "test", *flags system "./test" end end
{ "pile_set_name": "Github" }
################################################################################ # # erlang-p1-xmpp # ################################################################################ ERLANG_P1_XMPP_VERSION = 1.2.5 ERLANG_P1_XMPP_SITE = $(call github,processone,xmpp,$(ERLANG_P1_XMPP_VERSION)) ERLANG_P1_XMPP_LICENSE = Apache-2.0 ERLANG_P1_XMPP_LICENSE_FILES = LICENSE.txt ERLANG_P1_XMPP_INSTALL_STAGING = YES ERLANG_P1_XMPP_DEPENDENCIES = erlang-p1-xml erlang-p1-stringprep \ erlang-p1-tls erlang-p1-utils erlang-p1-zlib host-erlang-p1-xml $(eval $(rebar-package)) $(eval $(host-rebar-package))
{ "pile_set_name": "Github" }
{ "notes": "", "support": { "Android Browser": "n 67", "Baidu Browser": "n 7.12", "Blackberry Browser": "n 10", "Chrome": "n 77", "Chrome for Android": "n 74", "Edge": "n 75", "Firefox": "n 69", "Firefox for Android": "n 66", "IE": "n 11", "IE Mobile": "n 11", "KaiOS Browser": "n 2.5", "Opera": "n 58", "Opera Mini": "n all", "Opera Mobile": "n 46", "QQ Browser": "n 1.2", "Safari": "y 5", "Samsung Internet": "n 9.2", "UC Browser for Android": "n 11.8", "iOS Safari": "y 5.0" }, "url": "http://www.itu.int/rec/T-REC-T.800-200208-I" }
{ "pile_set_name": "Github" }
/* zutil.h -- internal interface and configuration of the compression library * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ /* WARNING: this file should *not* be used by applications. It is part of the implementation of the compression library and is subject to change. Applications should only use zlib.h. */ /* @(#) $Id$ */ #ifndef ZUTIL_H #define ZUTIL_H #ifdef HAVE_HIDDEN # define ZLIB_INTERNAL __attribute__((visibility ("hidden"))) #else # define ZLIB_INTERNAL #endif #include "zlib.h" #if defined(STDC) && !defined(Z_SOLO) # if !(defined(_WIN32_WCE) && defined(_MSC_VER)) # include <stddef.h> # endif # include <string.h> # include <stdlib.h> #endif #ifdef Z_SOLO typedef long ptrdiff_t; /* guess -- will be caught if guess is wrong */ #endif #ifndef local # define local static #endif /* since "static" is used to mean two completely different things in C, we define "local" for the non-static meaning of "static", for readability (compile with -Dlocal if your debugger can't find static symbols) */ typedef unsigned char uch; typedef uch FAR uchf; typedef unsigned short ush; typedef ush FAR ushf; typedef unsigned long ulg; extern z_const char* const z_errmsg[10]; /* indexed by 2-zlib_error */ /* (size given to avoid silly warnings with Visual C++) */ #define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] #define ERR_RETURN(strm,err) \ return (strm->msg = ERR_MSG(err), (err)) /* To be used only when the state is known to be valid */ /* common constants */ #ifndef DEF_WBITS # define DEF_WBITS MAX_WBITS #endif /* default windowBits for decompression. MAX_WBITS is for compression only */ #if MAX_MEM_LEVEL >= 8 # define DEF_MEM_LEVEL 8 #else # define DEF_MEM_LEVEL MAX_MEM_LEVEL #endif /* default memLevel */ #define STORED_BLOCK 0 #define STATIC_TREES 1 #define DYN_TREES 2 /* The three kinds of block type */ #define MIN_MATCH 3 #define MAX_MATCH 258 /* The minimum and maximum match lengths */ #define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ /* target dependencies */ #if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) # define OS_CODE 0x00 # ifndef Z_SOLO # if defined(__TURBOC__) || defined(__BORLANDC__) # if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) /* Allow compilation with ANSI keywords only enabled */ void _Cdecl farfree( void *block ); void *_Cdecl farmalloc( unsigned long nbytes ); # else # include <alloc.h> # endif # else /* MSC or DJGPP */ # include <malloc.h> # endif # endif #endif #ifdef AMIGA # define OS_CODE 1 #endif #if defined(VAXC) || defined(VMS) # define OS_CODE 2 # define F_OPEN(name, mode) \ fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") #endif #ifdef __370__ # if __TARGET_LIB__ < 0x20000000 # define OS_CODE 4 # elif __TARGET_LIB__ < 0x40000000 # define OS_CODE 11 # else # define OS_CODE 8 # endif #endif #if defined(ATARI) || defined(atarist) # define OS_CODE 5 #endif #ifdef OS2 # define OS_CODE 6 # if defined(M_I86) && !defined(Z_SOLO) # include <malloc.h> # endif #endif #if defined(MACOS) || defined(TARGET_OS_MAC) # define OS_CODE 7 # ifndef Z_SOLO # if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os # include <unix.h> /* for fdopen */ # else # ifndef fdopen # define fdopen(fd,mode) NULL /* No fdopen() */ # endif # endif # endif #endif #ifdef __acorn # define OS_CODE 13 #endif #if defined(WIN32) && !defined(__CYGWIN__) # define OS_CODE 10 #endif #ifdef _BEOS_ # define OS_CODE 16 #endif #ifdef __TOS_OS400__ # define OS_CODE 18 #endif #ifdef __APPLE__ # define OS_CODE 19 #endif #if defined(_BEOS_) || defined(RISCOS) # define fdopen(fd,mode) NULL /* No fdopen() */ #endif #if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX # if defined(_WIN32_WCE) # define fdopen(fd,mode) NULL /* No fdopen() */ # ifndef _PTRDIFF_T_DEFINED typedef int ptrdiff_t; # define _PTRDIFF_T_DEFINED # endif # else # define fdopen(fd,type) _fdopen(fd,type) # endif #endif #if defined(__BORLANDC__) && !defined(MSDOS) #pragma warn -8004 #pragma warn -8008 #pragma warn -8066 #endif /* provide prototypes for these when building zlib without LFS */ #if !defined(_WIN32) && \ (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t)); ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t)); #endif /* common defaults */ #ifndef OS_CODE # define OS_CODE 3 /* assume Unix */ #endif #ifndef F_OPEN # define F_OPEN(name, mode) fopen((name), (mode)) #endif /* functions */ #if defined(pyr) || defined(Z_SOLO) # define NO_MEMCPY #endif #if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) /* Use our own functions for small and medium model with MSC <= 5.0. * You may have to use the same strategy for Borland C (untested). * The __SC__ check is for Symantec. */ # define NO_MEMCPY #endif #if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) # define HAVE_MEMCPY #endif #ifdef HAVE_MEMCPY # ifdef SMALL_MEDIUM /* MSDOS small or medium model */ # define zmemcpy _fmemcpy # define zmemcmp _fmemcmp # define zmemzero(dest, len) _fmemset(dest, 0, len) # else # define zmemcpy memcpy # define zmemcmp memcmp # define zmemzero(dest, len) memset(dest, 0, len) # endif #else void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len)); #endif /* Diagnostic functions */ #ifdef ZLIB_DEBUG # include <stdio.h> extern int ZLIB_INTERNAL z_verbose; extern void ZLIB_INTERNAL z_error OF((char *m)); # define Assert(cond,msg) {if(!(cond)) z_error(msg);} # define Trace(x) {if (z_verbose>=0) fprintf x ;} # define Tracev(x) {if (z_verbose>0) fprintf x ;} # define Tracevv(x) {if (z_verbose>1) fprintf x ;} # define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} # define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} #else # define Assert(cond,msg) # define Trace(x) # define Tracev(x) # define Tracevv(x) # define Tracec(c,x) # define Tracecv(c,x) #endif #ifndef Z_SOLO voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items, unsigned size)); void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr)); #endif #define ZALLOC(strm, items, size) \ (*((strm)->zalloc))((strm)->opaque, (items), (size)) #define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) #define TRY_FREE(s, p) {if (p) ZFREE(s, p);} /* Reverse the bytes in a 32-bit value */ #define ZSWAP32(q) ((((q) >> 24) & 0xff) + (((q) >> 8) & 0xff00) + \ (((q) & 0xff00) << 8) + (((q) & 0xff) << 24)) #endif /* ZUTIL_H */
{ "pile_set_name": "Github" }
#pragma clang diagnostic ignored "-Wmissing-prototypes" #include <metal_stdlib> #include <simd/simd.h> using namespace metal; struct main0_out { float4 FragColor [[color(0)]]; }; // Returns 2D texture coords corresponding to 1D texel buffer coords static inline __attribute__((always_inline)) uint2 spvTexelBufferCoord(uint tc) { return uint2(tc % 4096, tc / 4096); } fragment main0_out main0(texture2d<float> buf [[texture(0)]], texture2d<float, access::write> bufOut [[texture(1)]], float4 gl_FragCoord [[position]]) { main0_out out = {}; out.FragColor = buf.read(spvTexelBufferCoord(0)); bufOut.write(out.FragColor, spvTexelBufferCoord(int(gl_FragCoord.x))); return out; }
{ "pile_set_name": "Github" }
bundle-doctor(1) -- Checks the bundle for common problems ========================================================= ## SYNOPSIS `bundle doctor` [--quiet] [--gemfile=GEMFILE] ## DESCRIPTION Checks your Gemfile and gem environment for common problems. If issues are detected, Bundler prints them and exits status 1. Otherwise, Bundler prints a success message and exits status 0. Examples of common problems caught by bundle-doctor include: * Invalid Bundler settings * Mismatched Ruby versions * Mismatched platforms * Uninstalled gems * Missing dependencies ## OPTIONS * `--quiet`: Only output warnings and errors. * `--gemfile=<gemfile>`: The location of the Gemfile(5) which Bundler should use. This defaults to a Gemfile(5) in the current working directory. In general, Bundler will assume that the location of the Gemfile(5) is also the project's root and will try to find `Gemfile.lock` and `vendor/cache` relative to this location.
{ "pile_set_name": "Github" }
Due to inability to support (user contributed) Cmake scripts, the cmake builds are not officially supported by LibRaw team since October 23, 2014 The scripts are moved to separate github repository github.com:LibRaw/LibRaw-cmake.git Checkout from this repo if you want to use Cmake to build LibRaw.
{ "pile_set_name": "Github" }
import React, { Component } from 'react'; import { noop } from 'lodash'; import { handleClickOutside } from './helpers'; export default (WrappedComponent, { onOutsideClick = noop, getDOMNode = noop }) => { class ClickOutside extends Component { componentDidMount () { const { componentInstance } = this; const clickHandler = onOutsideClick(componentInstance); const componentNode = getDOMNode(componentInstance); this.handleAction = handleClickOutside(clickHandler, componentNode); global.document.addEventListener('mousedown', this.handleAction); global.document.addEventListener('touchStart', this.handleAction); } componentWillUnmount () { global.document.removeEventListener('mousedown', this.handleAction); global.document.removeEventListener('touchStart', this.handleAction); } setInstance = (instance) => { this.componentInstance = instance; } render () { const { setInstance } = this; return <WrappedComponent {...this.props} ref={setInstance} />; } } return ClickOutside; };
{ "pile_set_name": "Github" }
--- layout: "okta" page_title: "Okta: okta_idp_saml" sidebar_current: "docs-okta-datasource-idp-saml" description: |- Get a SAML IdP from Okta. --- # okta_idp_saml Use this data source to retrieve a SAML IdP from Okta. ## Example Usage ```hcl data "okta_idp_saml" "example" { label = "Example App" } ``` ## Arguments Reference * `name` - (Optional) The name of the idp to retrieve, conflicts with `id`. * `id` - (Optional) The id of the idp to retrieve, conflicts with `name`. ## Attributes Reference * `id` - id of idp. * `name` - name of the idp. * `type` - type of idp. * `acs_binding` - HTTP binding used to receive a SAMLResponse message from the IdP. * `acs_type` - Determines whether to publish an instance-specific (trust) or organization (shared) ACS endpoint in the SAML metadata. * `sso_url` - single sign on url. * `sso_binding` - single sign on binding. * `sso_destination` - SSO request binding, HTTP-POST or HTTP-REDIRECT. * `subject_format` - Expression to generate or transform a unique username for the IdP user. * `subject_filter` - regular expression pattern used to filter untrusted IdP usernames. * `issuer` - URI that identifies the issuer (IdP). * `issuer_mode` - indicates whether Okta uses the original Okta org domain URL, or a custom domain URL in the request to the IdP. * `audience` - URI that identifies the target Okta IdP instance (SP) * `kid` - Key ID reference to the IdP's X.509 signature certificate.
{ "pile_set_name": "Github" }
define("ace/mode/terraform_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var TerraformHighlightRules = function () { this.$rules = { "start": [ { token: ['storage.function.terraform'], regex: '\\b(output|resource|data|variable|module|export)\\b' }, { token: "variable.terraform", regex: "\\$\\s", push: [ { token: "keyword.terraform", regex: "(-var-file|-var)" }, { token: "variable.terraform", regex: "\\n|$", next: "pop" }, {include: "strings"}, {include: "variables"}, {include: "operators"}, {defaultToken: "text"} ] }, { token: "language.support.class", regex: "\\b(timeouts|provider|connection|provisioner|lifecycleprovider|atlas)\\b" }, { token: "singleline.comment.terraform", regex: '#(.)*$' }, { token: "multiline.comment.begin.terraform", regex: '^\\s*\\/\\*', push: "blockComment" }, { token: "storage.function.terraform", regex: "^\\s*(locals|terraform)\\s*{" }, { token: "paren.lpar", regex: "[[({]" }, { token: "paren.rpar", regex: "[\\])}]" }, {include: "constants"}, {include: "strings"}, {include: "operators"}, {include: "variables"} ], blockComment: [{ regex: "^\\s*\\/\\*", token: "multiline.comment.begin.terraform", push: "blockComment" }, { regex: "\\*\\/\\s*$", token: "multiline.comment.end.terraform", next: "pop" }, { defaultToken: "comment" }], "constants": [ { token: "constant.language.terraform", regex: "\\b(true|false|yes|no|on|off|EOF)\\b" }, { token: "constant.numeric.terraform", regex: "(\\b([0-9]+)([kKmMgG]b?)?\\b)|(\\b(0x[0-9A-Fa-f]+)([kKmMgG]b?)?\\b)" } ], "variables": [ { token: ["variable.assignment.terraform", "keyword.operator"], regex: "\\b([a-zA-Z_]+)(\\s*=)" } ], "interpolated_variables": [ { token: "variable.terraform", regex: "\\b(var|self|count|path|local)\\b(?:\\.*[a-zA-Z_-]*)?" } ], "strings": [ { token: "punctuation.quote.terraform", regex: "'", push: [{ token: 'punctuation.quote.terraform', regex: "'", next: 'pop' }, {include: "escaped_chars"}, {defaultToken: 'string'}] }, { token: "punctuation.quote.terraform", regex: '"', push: [{ token: 'punctuation.quote.terraform', regex: '"', next: 'pop' }, {include: "interpolation"}, {include: "escaped_chars"}, {defaultToken: 'string'}] } ], "escaped_chars": [ { token: "constant.escaped_char.terraform", regex: "\\\\." } ], "operators": [ { token: "keyword.operator", regex: "\\?|:|==|!=|>|<|>=|<=|&&|\\|\\\||!|%|&|\\*|\\+|\\-|/|=" } ], "interpolation": [ {// TODO: double $ token: "punctuation.interpolated.begin.terraform", regex: "\\$?\\$\\{", push: [{ token: "punctuation.interpolated.end.terraform", regex: "\\}", next: "pop" }, {include: "interpolated_variables"}, {include: "operators"}, {include: "constants"}, {include: "strings"}, {include: "functions"}, {include: "parenthesis"}, {defaultToken: "punctuation"} ] } ], "functions": [ { token: "keyword.function.terraform", regex: "\\b(abs|basename|base64decode|base64encode|base64gzip|base64sha256|base64sha512|bcrypt|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|coalesce|coalescelist|compact|concat|contains|dirname|distinct|element|file|floor|flatten|format|formatlist|indent|index|join|jsonencode|keys|length|list|log|lookup|lower|map|matchkeys|max|merge|min|md5|pathexpand|pow|replace|rsadecrypt|sha1|sha256|sha512|signum|slice|sort|split|substr|timestamp|timeadd|title|transpose|trimspace|upper|urlencode|uuid|values|zipmap)\\b" } ], "parenthesis": [ { token: "paren.lpar", regex: "\\[" }, { token: "paren.rpar", regex: "\\]" } ] }; this.normalizeRules(); }; oop.inherits(TerraformHighlightRules, TextHighlightRules); exports.TerraformHighlightRules = TerraformHighlightRules; }); define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var Range = require("../../range").Range; var BaseFoldMode = require("./fold_mode").FoldMode; var FoldMode = exports.FoldMode = function(commentRegex) { if (commentRegex) { this.foldingStartMarker = new RegExp( this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) ); this.foldingStopMarker = new RegExp( this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) ); } }; oop.inherits(FoldMode, BaseFoldMode); (function() { this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (this.singleLineBlockCommentRe.test(line)) { if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) return ""; } var fw = this._getFoldWidgetBase(session, foldStyle, row); if (!fw && this.startRegionRe.test(line)) return "start"; // lineCommentRegionStart return fw; }; this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { var line = session.getLine(row); if (this.startRegionRe.test(line)) return this.getCommentRegionBlock(session, line, row); var match = line.match(this.foldingStartMarker); if (match) { var i = match.index; if (match[1]) return this.openingBracketBlock(session, match[1], row, i); var range = session.getCommentFoldRange(row, i + match[0].length, 1); if (range && !range.isMultiLine()) { if (forceMultiline) { range = this.getSectionRange(session, row); } else if (foldStyle != "all") range = null; } return range; } if (foldStyle === "markbegin") return; var match = line.match(this.foldingStopMarker); if (match) { var i = match.index + match[0].length; if (match[1]) return this.closingBracketBlock(session, match[1], row, i); return session.getCommentFoldRange(row, i, -1); } }; this.getSectionRange = function(session, row) { var line = session.getLine(row); var startIndent = line.search(/\S/); var startRow = row; var startColumn = line.length; row = row + 1; var endRow = row; var maxRow = session.getLength(); while (++row < maxRow) { line = session.getLine(row); var indent = line.search(/\S/); if (indent === -1) continue; if (startIndent > indent) break; var subRange = this.getFoldWidgetRange(session, "all", row); if (subRange) { if (subRange.start.row <= startRow) { break; } else if (subRange.isMultiLine()) { row = subRange.end.row; } else if (startIndent == indent) { break; } } endRow = row; } return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); var m = re.exec(line); if (!m) continue; if (m[1]) depth--; else depth++; if (!depth) break; } var endRow = row; if (endRow > startRow) { return new Range(startRow, startColumn, endRow, line.length); } }; }).call(FoldMode.prototype); }); define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; var MatchingBraceOutdent = function() {}; (function() { this.checkOutdent = function(line, input) { if (! /^\s+$/.test(line)) return false; return /^\s*\}/.test(input); }; this.autoOutdent = function(doc, row) { var line = doc.getLine(row); var match = line.match(/^(\s*\})/); if (!match) return 0; var column = match[1].length; var openBracePos = doc.findMatchingBracket({row: row, column: column}); if (!openBracePos || openBracePos.row == row) return 0; var indent = this.$getIndent(doc.getLine(openBracePos.row)); doc.replace(new Range(row, 0, row, column-1), indent); }; this.$getIndent = function(line) { return line.match(/^\s*/)[0]; }; }).call(MatchingBraceOutdent.prototype); exports.MatchingBraceOutdent = MatchingBraceOutdent; }); define("ace/mode/terraform",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/terraform_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var TerraformHighlightRules = require("./terraform_highlight_rules").TerraformHighlightRules; var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var CStyleFoldMode = require("./folding/cstyle").FoldMode; var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; var Mode = function () { TextMode.call(this); this.HighlightRules = TerraformHighlightRules; this.$outdent = new MatchingBraceOutdent(); this.$behaviour = new CstyleBehaviour(); this.foldingRules = new CStyleFoldMode(); }; oop.inherits(Mode, TextMode); (function () { this.$id = "ace/mode/terraform"; }).call(Mode.prototype); exports.Mode = Mode; }); (function() { window.require(["ace/mode/terraform"], function(m) { if (typeof module == "object" && typeof exports == "object" && module) { module.exports = m; } }); })();
{ "pile_set_name": "Github" }
/* * jQuery UI CSS Framework * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. */ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { position: absolute; left: -99999999px; } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix { display: inline-block; } /* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix { height:1%; } .ui-helper-clearfix { display:block; } /* end clearfix */ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } /* Misc visuals ----------------------------------*/ /* Overlays */ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* * jQuery UI CSS Framework * Copyright (c) 2009 AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT (MIT-LICENSE.txt) and GPL (GPL-LICENSE.txt) licenses. * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Arial,sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=cc0000&bgTextureHeader=03_highlight_soft.png&bgImgOpacityHeader=15&borderColorHeader=e3a1a1&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=ffffff&bgTextureContent=01_flat.png&bgImgOpacityContent=75&borderColorContent=eeeeee&fcContent=333333&iconColorContent=cc0000&bgColorDefault=eeeeee&bgTextureDefault=04_highlight_hard.png&bgImgOpacityDefault=100&borderColorDefault=d8dcdf&fcDefault=004276&iconColorDefault=cc0000&bgColorHover=f6f6f6&bgTextureHover=04_highlight_hard.png&bgImgOpacityHover=100&borderColorHover=cdd5da&fcHover=111111&iconColorHover=cc0000&bgColorActive=ffffff&bgTextureActive=01_flat.png&bgImgOpacityActive=65&borderColorActive=eeeeee&fcActive=cc0000&iconColorActive=cc0000&bgColorHighlight=fbf8ee&bgTextureHighlight=02_glass.png&bgImgOpacityHighlight=55&borderColorHighlight=fcd3a1&fcHighlight=444444&iconColorHighlight=004276&bgColorError=f3d8d8&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=75&borderColorError=cc0000&fcError=2e2e2e&iconColorError=cc0000&bgColorOverlay=a6a6a6&bgTextureOverlay=09_dots_small.png&bgImgOpacityOverlay=65&opacityOverlay=40&bgColorShadow=333333&bgTextureShadow=01_flat.png&bgImgOpacityShadow=0&opacityShadow=10&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px */ /* Component containers ----------------------------------*/ .ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #eeeeee; background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; color: #333333; } .ui-widget-content a { color: #333333; } .ui-widget-header { border: 1px solid #e3a1a1; background: #cc0000 url(images/ui-bg_highlight-soft_15_cc0000_1x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } .ui-widget-header a { color: #ffffff; } /* Interaction states ----------------------------------*/ .ui-state-default, .ui-widget-content .ui-state-default { border: 1px solid #d8dcdf; background: #eeeeee url(images/ui-bg_highlight-hard_100_eeeeee_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #004276; outline: none; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #004276; text-decoration: none; outline: none; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus { border: 1px solid #cdd5da; background: #f6f6f6 url(images/ui-bg_highlight-hard_100_f6f6f6_1x100.png) 50% 50% repeat-x; font-weight: bold; color: #111111; outline: none; } .ui-state-hover a, .ui-state-hover a:hover { color: #111111; text-decoration: none; outline: none; } .ui-state-active, .ui-widget-content .ui-state-active { border: 1px solid #eeeeee; background: #ffffff url(images/ui-bg_flat_65_ffffff_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #cc0000; outline: none; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #cc0000; outline: none; text-decoration: none; } /* Interaction Cues ----------------------------------*/ .ui-state-highlight, .ui-widget-content .ui-state-highlight {border: 1px solid #fcd3a1; background: #fbf8ee url(images/ui-bg_glass_55_fbf8ee_1x400.png) 50% 50% repeat-x; color: #444444; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a { color: #444444; } .ui-state-error, .ui-widget-content .ui-state-error {border: 1px solid #cc0000; background: #f3d8d8 url(images/ui-bg_diagonals-thick_75_f3d8d8_40x40.png) 50% 50% repeat; color: #2e2e2e; } .ui-state-error a, .ui-widget-content .ui-state-error a { color: #2e2e2e; } .ui-state-error-text, .ui-widget-content .ui-state-error-text { color: #2e2e2e; } .ui-state-disabled, .ui-widget-content .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } .ui-priority-primary, .ui-widget-content .ui-priority-primary { font-weight: bold; } .ui-priority-secondary, .ui-widget-content .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-widget-content .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } .ui-state-default .ui-icon { background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-state-active .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_004276_256x240.png); } .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cc0000_256x240.png); } /* positioning */ .ui-icon-carat-1-n { background-position: 0 0; } .ui-icon-carat-1-ne { background-position: -16px 0; } .ui-icon-carat-1-e { background-position: -32px 0; } .ui-icon-carat-1-se { background-position: -48px 0; } .ui-icon-carat-1-s { background-position: -64px 0; } .ui-icon-carat-1-sw { background-position: -80px 0; } .ui-icon-carat-1-w { background-position: -96px 0; } .ui-icon-carat-1-nw { background-position: -112px 0; } .ui-icon-carat-2-n-s { background-position: -128px 0; } .ui-icon-carat-2-e-w { background-position: -144px 0; } .ui-icon-triangle-1-n { background-position: 0 -16px; } .ui-icon-triangle-1-ne { background-position: -16px -16px; } .ui-icon-triangle-1-e { background-position: -32px -16px; } .ui-icon-triangle-1-se { background-position: -48px -16px; } .ui-icon-triangle-1-s { background-position: -64px -16px; } .ui-icon-triangle-1-sw { background-position: -80px -16px; } .ui-icon-triangle-1-w { background-position: -96px -16px; } .ui-icon-triangle-1-nw { background-position: -112px -16px; } .ui-icon-triangle-2-n-s { background-position: -128px -16px; } .ui-icon-triangle-2-e-w { background-position: -144px -16px; } .ui-icon-arrow-1-n { background-position: 0 -32px; } .ui-icon-arrow-1-ne { background-position: -16px -32px; } .ui-icon-arrow-1-e { background-position: -32px -32px; } .ui-icon-arrow-1-se { background-position: -48px -32px; } .ui-icon-arrow-1-s { background-position: -64px -32px; } .ui-icon-arrow-1-sw { background-position: -80px -32px; } .ui-icon-arrow-1-w { background-position: -96px -32px; } .ui-icon-arrow-1-nw { background-position: -112px -32px; } .ui-icon-arrow-2-n-s { background-position: -128px -32px; } .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } .ui-icon-arrow-2-e-w { background-position: -160px -32px; } .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } .ui-icon-arrowstop-1-n { background-position: -192px -32px; } .ui-icon-arrowstop-1-e { background-position: -208px -32px; } .ui-icon-arrowstop-1-s { background-position: -224px -32px; } .ui-icon-arrowstop-1-w { background-position: -240px -32px; } .ui-icon-arrowthick-1-n { background-position: 0 -48px; } .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } .ui-icon-arrowthick-1-e { background-position: -32px -48px; } .ui-icon-arrowthick-1-se { background-position: -48px -48px; } .ui-icon-arrowthick-1-s { background-position: -64px -48px; } .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } .ui-icon-arrowthick-1-w { background-position: -96px -48px; } .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } .ui-icon-arrow-4 { background-position: 0 -80px; } .ui-icon-arrow-4-diag { background-position: -16px -80px; } .ui-icon-extlink { background-position: -32px -80px; } .ui-icon-newwin { background-position: -48px -80px; } .ui-icon-refresh { background-position: -64px -80px; } .ui-icon-shuffle { background-position: -80px -80px; } .ui-icon-transfer-e-w { background-position: -96px -80px; } .ui-icon-transferthick-e-w { background-position: -112px -80px; } .ui-icon-folder-collapsed { background-position: 0 -96px; } .ui-icon-folder-open { background-position: -16px -96px; } .ui-icon-document { background-position: -32px -96px; } .ui-icon-document-b { background-position: -48px -96px; } .ui-icon-note { background-position: -64px -96px; } .ui-icon-mail-closed { background-position: -80px -96px; } .ui-icon-mail-open { background-position: -96px -96px; } .ui-icon-suitcase { background-position: -112px -96px; } .ui-icon-comment { background-position: -128px -96px; } .ui-icon-person { background-position: -144px -96px; } .ui-icon-print { background-position: -160px -96px; } .ui-icon-trash { background-position: -176px -96px; } .ui-icon-locked { background-position: -192px -96px; } .ui-icon-unlocked { background-position: -208px -96px; } .ui-icon-bookmark { background-position: -224px -96px; } .ui-icon-tag { background-position: -240px -96px; } .ui-icon-home { background-position: 0 -112px; } .ui-icon-flag { background-position: -16px -112px; } .ui-icon-calendar { background-position: -32px -112px; } .ui-icon-cart { background-position: -48px -112px; } .ui-icon-pencil { background-position: -64px -112px; } .ui-icon-clock { background-position: -80px -112px; } .ui-icon-disk { background-position: -96px -112px; } .ui-icon-calculator { background-position: -112px -112px; } .ui-icon-zoomin { background-position: -128px -112px; } .ui-icon-zoomout { background-position: -144px -112px; } .ui-icon-search { background-position: -160px -112px; } .ui-icon-wrench { background-position: -176px -112px; } .ui-icon-gear { background-position: -192px -112px; } .ui-icon-heart { background-position: -208px -112px; } .ui-icon-star { background-position: -224px -112px; } .ui-icon-link { background-position: -240px -112px; } .ui-icon-cancel { background-position: 0 -128px; } .ui-icon-plus { background-position: -16px -128px; } .ui-icon-plusthick { background-position: -32px -128px; } .ui-icon-minus { background-position: -48px -128px; } .ui-icon-minusthick { background-position: -64px -128px; } .ui-icon-close { background-position: -80px -128px; } .ui-icon-closethick { background-position: -96px -128px; } .ui-icon-key { background-position: -112px -128px; } .ui-icon-lightbulb { background-position: -128px -128px; } .ui-icon-scissors { background-position: -144px -128px; } .ui-icon-clipboard { background-position: -160px -128px; } .ui-icon-copy { background-position: -176px -128px; } .ui-icon-contact { background-position: -192px -128px; } .ui-icon-image { background-position: -208px -128px; } .ui-icon-video { background-position: -224px -128px; } .ui-icon-script { background-position: -240px -128px; } .ui-icon-alert { background-position: 0 -144px; } .ui-icon-info { background-position: -16px -144px; } .ui-icon-notice { background-position: -32px -144px; } .ui-icon-help { background-position: -48px -144px; } .ui-icon-check { background-position: -64px -144px; } .ui-icon-bullet { background-position: -80px -144px; } .ui-icon-radio-off { background-position: -96px -144px; } .ui-icon-radio-on { background-position: -112px -144px; } .ui-icon-pin-w { background-position: -128px -144px; } .ui-icon-pin-s { background-position: -144px -144px; } .ui-icon-play { background-position: 0 -160px; } .ui-icon-pause { background-position: -16px -160px; } .ui-icon-seek-next { background-position: -32px -160px; } .ui-icon-seek-prev { background-position: -48px -160px; } .ui-icon-seek-end { background-position: -64px -160px; } .ui-icon-seek-first { background-position: -80px -160px; } .ui-icon-stop { background-position: -96px -160px; } .ui-icon-eject { background-position: -112px -160px; } .ui-icon-volume-off { background-position: -128px -160px; } .ui-icon-volume-on { background-position: -144px -160px; } .ui-icon-power { background-position: 0 -176px; } .ui-icon-signal-diag { background-position: -16px -176px; } .ui-icon-signal { background-position: -32px -176px; } .ui-icon-battery-0 { background-position: -48px -176px; } .ui-icon-battery-1 { background-position: -64px -176px; } .ui-icon-battery-2 { background-position: -80px -176px; } .ui-icon-battery-3 { background-position: -96px -176px; } .ui-icon-circle-plus { background-position: 0 -192px; } .ui-icon-circle-minus { background-position: -16px -192px; } .ui-icon-circle-close { background-position: -32px -192px; } .ui-icon-circle-triangle-e { background-position: -48px -192px; } .ui-icon-circle-triangle-s { background-position: -64px -192px; } .ui-icon-circle-triangle-w { background-position: -80px -192px; } .ui-icon-circle-triangle-n { background-position: -96px -192px; } .ui-icon-circle-arrow-e { background-position: -112px -192px; } .ui-icon-circle-arrow-s { background-position: -128px -192px; } .ui-icon-circle-arrow-w { background-position: -144px -192px; } .ui-icon-circle-arrow-n { background-position: -160px -192px; } .ui-icon-circle-zoomin { background-position: -176px -192px; } .ui-icon-circle-zoomout { background-position: -192px -192px; } .ui-icon-circle-check { background-position: -208px -192px; } .ui-icon-circlesmall-plus { background-position: 0 -208px; } .ui-icon-circlesmall-minus { background-position: -16px -208px; } .ui-icon-circlesmall-close { background-position: -32px -208px; } .ui-icon-squaresmall-plus { background-position: -48px -208px; } .ui-icon-squaresmall-minus { background-position: -64px -208px; } .ui-icon-squaresmall-close { background-position: -80px -208px; } .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } .ui-icon-grip-diagonal-se { background-position: -80px -224px; } /* Misc visuals ----------------------------------*/ /* Corner radius */ .ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; } .ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; } .ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; } .ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } .ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; } .ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } .ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; } .ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; } .ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; } /* Overlays */ .ui-widget-overlay { background: #a6a6a6 url(images/ui-bg_dots-small_65_a6a6a6_2x2.png) 50% 50% repeat; opacity: .40;filter:Alpha(Opacity=40); } .ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #333333 url(images/ui-bg_flat_0_333333_40x100.png) 50% 50% repeat-x; opacity: .10;filter:Alpha(Opacity=10); -moz-border-radius: 8px; -webkit-border-radius: 8px; }/* Accordion ----------------------------------*/ .ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } .ui-accordion .ui-accordion-li-fix { display: inline; } .ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } .ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em 2.2em; } .ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } .ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; } .ui-accordion .ui-accordion-content-active { display: block; }/* Datepicker ----------------------------------*/ .ui-datepicker { width: 17em; padding: .2em .2em 0; } .ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } .ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } .ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } .ui-datepicker .ui-datepicker-prev { left:2px; } .ui-datepicker .ui-datepicker-next { right:2px; } .ui-datepicker .ui-datepicker-prev-hover { left:1px; } .ui-datepicker .ui-datepicker-next-hover { right:1px; } .ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } .ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } .ui-datepicker .ui-datepicker-title select { float:left; font-size:1em; margin:1px 0; } .ui-datepicker select.ui-datepicker-month-year {width: 100%;} .ui-datepicker select.ui-datepicker-month, .ui-datepicker select.ui-datepicker-year { width: 49%;} .ui-datepicker .ui-datepicker-title select.ui-datepicker-year { float: right; } .ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } .ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } .ui-datepicker td { border: 0; padding: 1px; } .ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } .ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } .ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } .ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } /* with multiple calendars */ .ui-datepicker.ui-datepicker-multi { width:auto; } .ui-datepicker-multi .ui-datepicker-group { float:left; } .ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } .ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } .ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } .ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } .ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } .ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } .ui-datepicker-row-break { clear:both; width:100%; } /* RTL support */ .ui-datepicker-rtl { direction: rtl; } .ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } .ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } .ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } .ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } .ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } .ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } .ui-datepicker-rtl .ui-datepicker-group { float:right; } .ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } .ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } /* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ .ui-datepicker-cover { display: none; /*sorry for IE5*/ display/**/: block; /*sorry for IE5*/ position: absolute; /*must have*/ z-index: -1; /*must have*/ filter: mask(); /*must have*/ top: -4px; /*must have*/ left: -4px; /*must have*/ width: 200px; /*must have*/ height: 200px; /*must have*/ }/* Dialog ----------------------------------*/ .ui-dialog { position: relative; padding: .2em; width: 300px; } .ui-dialog .ui-dialog-titlebar { padding: .5em .3em .3em 1em; position: relative; } .ui-dialog .ui-dialog-title { float: left; margin: .1em 0 .2em; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .ui-dialog .ui-dialog-content { border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } .ui-dialog .ui-dialog-buttonpane button { float: right; margin: .5em .4em .5em 0; cursor: pointer; padding: .2em .6em .3em .6em; line-height: 1.4em; width:auto; overflow:visible; } .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* Progressbar ----------------------------------*/ .ui-progressbar { height:2em; text-align: left; } .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }/* Resizable ----------------------------------*/ .ui-resizable { position: relative;} .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0px; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0px; } .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0px; height: 100%; } .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0px; height: 100%; } .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* Slider ----------------------------------*/ .ui-slider { position: relative; text-align: left; } .ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } .ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; } .ui-slider-horizontal { height: .8em; } .ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } .ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } .ui-slider-horizontal .ui-slider-range-min { left: 0; } .ui-slider-horizontal .ui-slider-range-max { right: 0; } .ui-slider-vertical { width: .8em; height: 100px; } .ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } .ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } .ui-slider-vertical .ui-slider-range-min { bottom: 0; } .ui-slider-vertical .ui-slider-range-max { top: 0; }/* Tabs ----------------------------------*/ .ui-tabs { padding: .2em; zoom: 1; } .ui-tabs .ui-tabs-nav { list-style: none; position: relative; padding: .2em .2em 0; } .ui-tabs .ui-tabs-nav li { position: relative; float: left; border-bottom-width: 0 !important; margin: 0 .2em -1px 0; padding: 0; } .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding: .5em 1em; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected { padding-bottom: 1px; border-bottom-width: 0; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ .ui-tabs .ui-tabs-panel { padding: 1em 1.4em; display: block; border-width: 0; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; }
{ "pile_set_name": "Github" }
package account // Copyright (c) Microsoft and contributors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by 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. // // Code generated by Microsoft (R) AutoRest Code Generator. // Changes may cause incorrect behavior and will be lost if the code is regenerated. // UserAgent returns the UserAgent string to use when sending http.Requests. func UserAgent() string { return "Azure-SDK-For-Go/v11.1.1-beta arm-account/2016-11-01" } // Version returns the semantic version (see http://semver.org) of the client. func Version() string { return "v11.1.1-beta" }
{ "pile_set_name": "Github" }
import discord import aioredis import inspect import asyncio import os import re import json import math from utils import dump, find, parse_redis_url from logger import Logger from time import time from aiohttp import web from rpc import RPCServer, rpc, RPCException from collections import defaultdict if not discord.opus.is_loaded(): if platform == 'linux' or platform == 'linux2': discord.opus.load_opus('./libopus.so') elif platform == 'darwin': discord.opus.load_opus('libopus.dylib') class GatewayBot(discord.Client, Logger): players = dict() call_next = defaultdict(lambda: True) def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self.fetch_offline_members = True self.broker_url = kwargs.get('broker_url') self.redis_url = kwargs.get('redis_url') self._redis_connect() self._broker_connect() self.rpc_server = RPCServer(self) def __str__(self): return 'gateway-{}-{}'.format(self.shard_id, self.shard_count) def _redis_connect(self): loop = asyncio.get_event_loop() loop.create_task(self.__redis_connect()) def _broker_connect(self): loop = asyncio.get_event_loop() loop.create_task(self.__broker_connect()) async def __redis_connect(self): self.redis = await aioredis.create_redis( parse_redis_url(self.redis_url), encoding='utf8' ) async def __broker_connect(self): self.broker = await aioredis.create_redis( parse_redis_url(self.broker_url), encoding='utf8' ) async def send(self, queue, data): payload = json.dumps(data) await self.broker.lpush(queue, payload) async def send_dispatch_event(self, event_type, guild, before=None, after=None): e = dict(ts=time(), type=event_type, producer=str(self), guild=dump(guild)) if before: if after: e['before'] = dump(before) e['after'] = dump(after) else: e['data'] = dump(before) self.log("{event}:{gid} @ {ts}".format(event=e['type'], gid=e['guild']['id'], ts=e['ts'])) await self.send('discord.events.{}'.format(e['type']), e) # Events handling async def on_message(self, message): # Ignore private messages if not message.guild: return # Ignore WHs if message.author.__class__ is not discord.Member: return await self.send_dispatch_event('MESSAGE_CREATE', message.guild, message) async def on_message_delete(self, message): # Ignore private messages if not message.guild: return # Ignore webhooks if message.author.__class__ is not discord.Member: return await self.send_dispatch_event('MESSAGE_DELETE', message.guild, message) async def on_message_edit(self, before, after): # Ignore private messages if not after.guild: return # Ignore webhooks if after.author.__class__ is not discord.Member: return await self.send_dispatch_event('MESSAGE_EDIT', after.guild, before, after) async def on_ready(self): self.log('Connected to {} guilds'.format(len(self.guilds))) self.rpc_server.run() for guild in list(self.guilds): self.loop.create_task(self.on_guild_ready(guild)) async def on_guild_ready(self, guild): await self.send_dispatch_event('GUILD_READY', guild) async def on_guild_join(self, guild): await self.send_dispatch_event('GUILD_JOIN', guild) async def on_guild_remove(self, guild): await self.send_dispatch_event('GUILD_REMOVE', guild) async def on_guild_update(self, before, after): await self.send_dispatch_event('GUILD_UPDATE', after, before, after) async def on_member_join(self, member): await self.send_dispatch_event('MEMBER_JOIN', member.guild, member) async def on_member_remove(self, member): await self.send_dispatch_event('MEMBER_REMOVE', member.guild, member) # RPCs @rpc def get_guild(self, guild_id): guild = discord.utils.get(self.guilds, id=guild_id) if not guild: raise RPCException('guild_not_found') return guild @rpc def get_voice_channel(self, guild, voice_channel_id): if type(guild) in (str, int): guild = self.get_guild(guild) voice_channel = discord.utils.get(guild.channels, id=str(voice_channel_id)) if not voice_channel: raise RPCException('voice_channel_not_found') if voice_channel.type != discord.ChannelType.voice: raise RPCException('not_a_voice_channel') return voice_channel @rpc async def join_voice(self, guild, voice_channel_id): if type(guild) in (str, int): guild = self.get_guild(guild) voice_channel = self.get_voice_channel(guild, voice_channel_id) voice = guild.voice_client if voice: await voice.move_to(voice_channel) else: await self.join_voice_channel(voice_channel) return voice_channel @rpc async def leave(self, guild): if type(guild) in (str, int): guild = self.get_guild(guild) voice = guild.voice_client if voice: await voice.disconnect() return None @rpc def get_voice_client(self, guild): if type(guild) in (str, int): guild = self.get_guild(guild) voice = guild.voice_client if not voice: raise RPCException('voice_not_connected') return voice async def _ytdl_play_song(self, guild, song_url, after=None): if type(guild) in (str, int): guild = self.get_guild(guild) voice = self.get_voice_client(guild) lock = self.play_locs[guild.id] try: await lock.acquire() curr_player = self.players.get(guild.id) if curr_player: self.call_next[guild.id] = False curr_player.stop() player = await voice.create_ytdl_player(url, ytdl_options=opts, after=after) self.players[guild.id] = player player.volume = 0.6 player.start() finally: lock.release() return voice @rpc async def ytdl_play_song(self, guild, song_url): return self._ytdl_play_song(guild, song_url) @rpc async def ytdl_play_songs(self, guild, queue_name): def n(player): if player.error: e = player.error import traceback log('Error from the player') log(traceback.format_exception(type(e), e, None)) if self.call_next.get(guild.id): self.loop.create_task(self.ytdl_play_songs(guild, queue_name)) self.call_next[guild.id] = True song_url = redis.rpop(queue_name) if song_url: return await self._ytdl_play_song(guild, song_url, after=n) return None
{ "pile_set_name": "Github" }
package htmlutils import ( "bytes" "strings" html "github.com/gowade/whtml" ) func FragmentFromString(htmlCode string) *html.Node { buf := bytes.NewBufferString(strings.TrimSpace(htmlCode)) nodes, err := html.Parse(buf) if err != nil { panic(err) } return nodes[0] } func RemoveGarbageTextChildren(node *html.Node) { prev := node.FirstChild for c := node.FirstChild; c != nil; c = c.NextSibling { if c.Type == html.TextNode && strings.TrimSpace(c.Data) == "" { if c == node.FirstChild { node.FirstChild = c.NextSibling prev = node.FirstChild } else { prev.NextSibling = c.NextSibling if c == node.LastChild { node.LastChild = prev } } } else { prev = c } } } func Render(node *html.Node) string { var buf bytes.Buffer node.Render(&buf) return buf.String() }
{ "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. */ // This package has the automatically generated typed clients. package v1
{ "pile_set_name": "Github" }
<test-metadata> <benchmark-version>1.2</benchmark-version> <category>sqli</category> <test-number>01891</test-number> <vulnerability>true</vulnerability> <cwe>89</cwe> </test-metadata>
{ "pile_set_name": "Github" }
# The ASCII art must be 18 lines in height (6 lines per ascii art text line). # Max length of a line is 80 characters; the following line is for reference. ################################################################################ <color_light_cyan> _________ __ .__ <color_light_cyan> \_ ___ \ _____ _/ |_ _____ ____ | | ___.__ ______ _____ <color_light_cyan> / \ \/ \__ \ \ __\\__ \ _/ ___\ | | < | | / ___/ / \ <color_light_cyan> \ \____ / __ \_ | | / __ \_\ \___ | |__ \___ | \___ \ | Y Y \ <color_light_cyan> \______ /(____ / |__| (____ / \___ >|____/ / ____|/____ >|__|_| / <color_light_cyan> \/ \/ \/ \/ \/ \/ \/ <color_light_blue> ___________ __ ________ <color_light_blue> \__ ___/_ _________| | __ ____ ___.__. \______ \ _____ ___.__. <color_light_blue> | | | | \_ __ \ |/ // __ < | | | | \\__ \< | | <color_light_blue> | | | | /| | \/ <\ ___/\___ | | ` \/ __ \\___ | <color_light_blue> |____| |____/ |__| |__|_ \\___ > ____| /_______ (____ / ____| <color_light_blue> \/ \/\/ \/ \/\/ <color_light_blue> _____ .__ .___ <color_white> .--. <color_light_blue>/ _ \ | |__ ____ _____ __| _/ <color_white> {\<color_brown> / <color_yellow>q<color_red> {\ <color_light_blue>/ /_\ \ | | \ _/ __ \ \__ \ / __ | <color_white> { `\<color_brown> \ (-<color_red>(~` <color_light_blue>/ | \| Y \\ ___/ / __ \_/ /_/ | <color_white> { '.{`\<color_brown> \ \ <color_red>) <color_light_blue>\____|__ /|___| / \___ >(____ /\____ | <color_white> {'-{ ' \<color_brown> .-""'-. \ \ <color_light_blue>\/ \/ \/ \/ \/ <color_white> {._{'.' \<color_brown>/ '.) \ <color_white> {_.{. <color_brown>{` | <color_white> {._{ ' <color_brown>{ <color_white>;'-=-.<color_brown> | <color_white> {-.{.' <color_brown>{ <color_white>';-=-.`<color_brown> / <color_white> {._.{.<color_brown>; <color_white>'-=-<color_brown> .' <color_white> {_.-' <color_brown>`'.__ _,-' <color_white> <color_red>|||` <color_white> <color_red>.='==,
{ "pile_set_name": "Github" }
// (C) Copyright Gennadiy Rozental 2001. // Distributed under the Boost Software License, Version 1.0. // (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // See http://www.boost.org/libs/test for the library home page. // /// @file /// Defines c++14 index_sequence implementation // *************************************************************************** #ifndef BOOST_TEST_DATA_INDEX_SEQUENCE_HPP #define BOOST_TEST_DATA_INDEX_SEQUENCE_HPP // Boost.Test #include <boost/test/data/config.hpp> #include <boost/test/detail/suppress_warnings.hpp> //____________________________________________________________________________// namespace boost { namespace unit_test { namespace data { // ************************************************************************** // // ************** data::index_sequence ************** // // ************************************************************************** // template <std::size_t... Ns> struct index_sequence {}; template<typename IS1, typename IS2> struct merge_index_sequence; template <std::size_t... Ns1, std::size_t... Ns2> struct merge_index_sequence<index_sequence<Ns1...>, index_sequence<Ns2...>> { typedef index_sequence<Ns1..., Ns2...> type; }; template <std::size_t B, std::size_t E, typename Enabler = void> struct make_index_sequence { typedef typename merge_index_sequence<typename make_index_sequence<B,(B+E)/2>::type, typename make_index_sequence<(B+E)/2,E>::type>::type type; }; template <std::size_t B, std::size_t E> struct make_index_sequence<B,E,typename std::enable_if<E==B+1,void>::type> { typedef index_sequence<B> type; }; template <typename... T> using index_sequence_for = typename make_index_sequence<0, sizeof...(T)>::type; } // namespace data } // namespace unit_test } // namespace boost #include <boost/test/detail/enable_warnings.hpp> #endif // BOOST_TEST_DATA_INDEX_SEQUENCE_HPP
{ "pile_set_name": "Github" }
assert_no_difference "${1:Model}.${2:count}" do ${3} end
{ "pile_set_name": "Github" }
/* Copyright 2018 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 builder provides wraps other controller-runtime libraries and exposes simple // patterns for building common Controllers. // // Projects built with the builder package can trivially be rebased on top of the underlying // packages if the project requires more customized behavior in the future. package builder import ( logf "sigs.k8s.io/controller-runtime/pkg/internal/log" ) var log = logf.RuntimeLog.WithName("builder")
{ "pile_set_name": "Github" }
import 'dart:ui' as ui; import 'package:flutter/material.dart'; import 'package:wanandroid/api/Api.dart'; import 'package:wanandroid/api/CommonService.dart'; import 'package:wanandroid/common/GlobalConfig.dart'; import 'package:wanandroid/model/knowledge_systems/KnowledgeSystemsChildModel.dart'; import 'package:wanandroid/model/knowledge_systems/KnowledgeSystemsModel.dart'; import 'package:wanandroid/model/knowledge_systems/KnowledgeSystemsParentModel.dart'; import 'package:wanandroid/pages/article_list/ArticleListPage.dart'; import 'package:wanandroid/widget/EmptyHolder.dart'; class KnowledgeSystemsPage extends StatefulWidget { @override State<StatefulWidget> createState() { return _KnowledgeSystemsPageState(); } } class _KnowledgeSystemsPageState extends State<KnowledgeSystemsPage> with AutomaticKeepAliveClientMixin, TickerProviderStateMixin { double _screenWidth = MediaQueryData.fromWindow(ui.window).size.width; KnowledgeSystemsModel _treeModel; TabController _tabControllerOutter; Map<int, TabController> _tabControllerInnerMaps = Map(); KnowledgeSystemsParentModel _currentTreeRootModel; @override void initState() { super.initState(); _loadTreeList(); } @override bool get wantKeepAlive => true; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text(GlobalConfig.knowledgeSystemsTab), centerTitle: true, bottom: _buildTitleBottom(), ), body: _buildBody(_currentTreeRootModel), ); } PreferredSize _appBarBottom; PreferredSize _buildTitleBottom() { if (null == _appBarBottom && null != _treeModel) _appBarBottom = PreferredSize( child: _buildTitleTabs(), preferredSize: Size(_screenWidth, kToolbarHeight * 2), ); return _appBarBottom; } Widget _buildTitleTabs() { if (null == _treeModel) { return EmptyHolder( msg: "Loading", ); } _tabControllerOutter = TabController(length: _treeModel?.data?.length, vsync: this); _tabControllerOutter.addListener(() { setState(() { _currentTreeRootModel = _treeModel.data[_tabControllerOutter.index]; }); }); return Column( mainAxisAlignment: MainAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.center, children: <Widget>[ SizedBox( child: TabBar( controller: _tabControllerOutter, labelColor: Colors.white, isScrollable: true, unselectedLabelColor: GlobalConfig.color_white_a80, indicatorSize: TabBarIndicatorSize.label, indicatorPadding: EdgeInsets.only(bottom: 2.0), indicatorWeight: 1.0, indicatorColor: Colors.white, tabs: _buildRootTabs(), ), width: _screenWidth, height: kToolbarHeight, ), SizedBox( child: TabBarView( children: _buildSecondTitle(), controller: _tabControllerOutter, ), width: _screenWidth, height: kToolbarHeight, ), ], ); } List<Widget> _buildRootTabs() { return _treeModel.data?.map((KnowledgeSystemsParentModel model) { return Tab( text: model?.name, ); })?.toList(); } List<Widget> _buildSecondTitle() { return _treeModel.data?.map(_buildSingleSecondTitle)?.toList(); } Widget _buildSingleSecondTitle(KnowledgeSystemsParentModel model) { if (null == model) { return EmptyHolder( msg: "Loading", ); } if (null == _tabControllerInnerMaps[model.id]) _tabControllerInnerMaps[model.id] = TabController(length: model.children.length, vsync: this); return TabBar( controller: _tabControllerInnerMaps[model.id], labelColor: Colors.white, isScrollable: true, unselectedLabelColor: GlobalConfig.color_white_a80, indicatorSize: TabBarIndicatorSize.label, indicatorPadding: EdgeInsets.only(bottom: 2.0), indicatorWeight: 1.0, indicatorColor: Colors.white, tabs: _buildSecondTabs(model), ); } List<Widget> _buildSecondTabs(KnowledgeSystemsParentModel model) { return model.children.map((KnowledgeSystemsChildModel model) { return Tab( text: model?.name, ); })?.toList(); } Widget _buildBody(KnowledgeSystemsParentModel model) { if (null == model) { return EmptyHolder( msg: "Loading", ); } if (null == _tabControllerInnerMaps[model.id]) _tabControllerInnerMaps[model.id] = TabController(length: model.children.length, vsync: this); return TabBarView( key: Key("tb${model.id}"), children: _buildPages(model), controller: _tabControllerInnerMaps[model.id], ); } List<Widget> _buildPages(KnowledgeSystemsParentModel model) { return model.children?.map(_buildSinglePage)?.toList(); } Widget _buildSinglePage(KnowledgeSystemsChildModel model) { return ArticleListPage( key: Key("${model.id}"), request: (page) { return CommonService().getTreeItemList( "${Api.TREES_DETAIL_LIST}$page/json?cid=${model.id}"); }, ); } void _loadTreeList() async { CommonService().getTrees((KnowledgeSystemsModel _bean) { setState(() { _treeModel = _bean; _currentTreeRootModel = _treeModel.data[0]; }); }); } @override void dispose() { _tabControllerOutter?.dispose(); _tabControllerInnerMaps?.forEach((_, controller) { controller?.dispose(); }); super.dispose(); } }
{ "pile_set_name": "Github" }
#ifndef _UT_CSTL_PAIR_PRIVATE_H_ #define _UT_CSTL_PAIR_PRIVATE_H_ UT_SUIT_DECLARATION(cstl_pair_private) /* * test _pair_is_created */ UT_CASE_DECLARATION(_pair_is_created) void test__pair_is_created__null_pair(void** state); void test__pair_is_created__invalid_first(void** state); void test__pair_is_created__invalid_second(void** state); void test__pair_is_created__invalid_mapkeycompare(void** state); void test__pair_is_created__invalid_mapvaluecompare(void** state); void test__pair_is_created__invalid_typeinfofirst_style(void** state); void test__pair_is_created__invalid_typeinfofirst_type(void** state); void test__pair_is_created__invalid_typeinfosecond_style(void** state); void test__pair_is_created__invalid_typeinfosecond_type(void** state); void test__pair_is_created__created(void** state); /* * test _pair_is_inited */ UT_CASE_DECLARATION(_pair_is_inited) void test__pair_is_inited__null_pair(void** state); void test__pair_is_inited__null_pair_first(void** state); void test__pair_is_inited__null_pair_second(void** state); void test__pair_is_inited__invalid_typeinfofirst_style(void** state); void test__pair_is_inited__invalid_typeinfofirst_type(void** state); void test__pair_is_inited__invalid_typeinfosecond_style(void** state); void test__pair_is_inited__invalid_typeinfosecond_type(void** state); /* * test _create_pair */ UT_CASE_DECLARATION(_create_pair) void test__create_pair__null_typename(void** state); void test__create_pair__c_builtin(void** state); void test__create_pair__cstr(void** state); void test__create_pair__libcstl_builtin(void** state); void test__create_pair__user_define(void** state); void test__create_pair__unregister(void** state); void test__create_pair__invalid(void** state); /* * test _create_pair_auxiliary */ UT_CASE_DECLARATION(_create_pair_auxiliary) void test__create_pair_auxiliary__null_pair(void** state); void test__create_pair_auxiliary__null_typename(void** state); void test__create_pair_auxiliary__unregistered(void** state); void test__create_pair_auxiliary__c_builtin(void** state); void test__create_pair_auxiliary__cstr(void** state); void test__create_pair_auxiliary__libcstl_builtin(void** state); void test__create_pair_auxiliary__user_define(void** state); /* * test _pair_destroy_auxiliary */ UT_CASE_DECLARATION(_pair_destroy_auxiliary) void test__pair_destroy_auxiliary__null_pair(void** state); void test__pair_destroy_auxiliary__non_created(void** state); void test__pair_destroy_auxiliary__non_inited(void** state); void test__pair_destroy_auxiliary__empty(void** state); void test__pair_destroy_auxiliary__non_empty(void** state); void test__pair_destroy_auxiliary__created_not_inited(void** state); /* * test _pair_make_first */ UT_CASE_DECLARATION(_pair_make_first) void test__pair_make_first__null_pair(void** state); void test__pair_make_first__non_inited(void** state); void test__pair_make_first__c_builtin(void** state); void test__pair_make_first__str(void** state); void test__pair_make_first__libcstl_builtin(void** state); void test__pair_make_first__user_define(void** state); /* * test _pair_make_second */ UT_CASE_DECLARATION(_pair_make_second) void test__pair_make_second__null_pair(void** state); void test__pair_make_second__non_inited(void** state); void test__pair_make_second__c_builtin(void** state); void test__pair_make_second__str(void** state); void test__pair_make_second__libcstl_builtin(void** state); void test__pair_make_second__user_define(void** state); #define UT_CSTL_PAIR_PRIVATE_CASE\ UT_SUIT_BEGIN(cstl_pair_private, test__pair_is_created__null_pair),\ UT_CASE(test__pair_is_created__invalid_first),\ UT_CASE(test__pair_is_created__invalid_second),\ UT_CASE(test__pair_is_created__invalid_mapkeycompare),\ UT_CASE(test__pair_is_created__invalid_mapvaluecompare),\ UT_CASE(test__pair_is_created__invalid_typeinfofirst_style),\ UT_CASE(test__pair_is_created__invalid_typeinfofirst_type),\ UT_CASE(test__pair_is_created__invalid_typeinfosecond_style),\ UT_CASE(test__pair_is_created__invalid_typeinfosecond_type),\ UT_CASE(test__pair_is_created__created),\ UT_CASE_BEGIN(_pair_is_inited, test__pair_is_inited__null_pair),\ UT_CASE(test__pair_is_inited__null_pair_first),\ UT_CASE(test__pair_is_inited__null_pair_second),\ UT_CASE(test__pair_is_inited__invalid_typeinfofirst_style),\ UT_CASE(test__pair_is_inited__invalid_typeinfofirst_type),\ UT_CASE(test__pair_is_inited__invalid_typeinfosecond_style),\ UT_CASE(test__pair_is_inited__invalid_typeinfosecond_type),\ UT_SUIT_BEGIN(cstl_pair_private, test__create_pair__null_typename),\ UT_CASE(test__create_pair__c_builtin),\ UT_CASE(test__create_pair__cstr),\ UT_CASE(test__create_pair__libcstl_builtin),\ UT_CASE(test__create_pair__user_define),\ UT_CASE(test__create_pair__unregister),\ UT_CASE(test__create_pair__invalid),\ UT_CASE_BEGIN(_create_pair_auxiliary, test__create_pair_auxiliary__null_pair),\ UT_CASE(test__create_pair_auxiliary__null_typename),\ UT_CASE(test__create_pair_auxiliary__unregistered),\ UT_CASE(test__create_pair_auxiliary__c_builtin),\ UT_CASE(test__create_pair_auxiliary__cstr),\ UT_CASE(test__create_pair_auxiliary__libcstl_builtin),\ UT_CASE(test__create_pair_auxiliary__user_define),\ UT_CASE_BEGIN(_pair_destroy_auxiliary, test__pair_destroy_auxiliary__null_pair),\ UT_CASE(test__pair_destroy_auxiliary__non_created),\ UT_CASE(test__pair_destroy_auxiliary__non_inited),\ UT_CASE(test__pair_destroy_auxiliary__empty),\ UT_CASE(test__pair_destroy_auxiliary__non_empty),\ UT_CASE(test__pair_destroy_auxiliary__created_not_inited),\ UT_CASE_BEGIN(_pair_make_first, test__pair_make_first__null_pair),\ UT_CASE(test__pair_make_first__non_inited),\ UT_CASE(test__pair_make_first__c_builtin),\ UT_CASE(test__pair_make_first__str),\ UT_CASE(test__pair_make_first__libcstl_builtin),\ UT_CASE(test__pair_make_first__user_define),\ UT_CASE_BEGIN(_pair_make_second, test__pair_make_second__null_pair),\ UT_CASE(test__pair_make_second__non_inited),\ UT_CASE(test__pair_make_second__c_builtin),\ UT_CASE(test__pair_make_second__str),\ UT_CASE(test__pair_make_second__libcstl_builtin),\ UT_CASE(test__pair_make_second__user_define) #endif /* _UT_CSTL_PAIR_PRIVATE_H_ */
{ "pile_set_name": "Github" }
package(default_visibility = ["//visibility:public"]) load( "@io_bazel_rules_go//go:def.bzl", "go_library", ) go_library( name = "go_default_library", srcs = [ "authorization_client.go", "doc.go", "generated_expansion.go", "localsubjectaccessreview.go", "localsubjectaccessreview_expansion.go", "selfsubjectaccessreview.go", "selfsubjectaccessreview_expansion.go", "selfsubjectrulesreview.go", "selfsubjectrulesreview_expansion.go", "subjectaccessreview.go", "subjectaccessreview_expansion.go", ], importmap = "k8s.io/kubernetes/vendor/k8s.io/client-go/kubernetes/typed/authorization/v1", importpath = "k8s.io/client-go/kubernetes/typed/authorization/v1", deps = [ "//staging/src/k8s.io/api/authorization/v1:go_default_library", "//staging/src/k8s.io/client-go/kubernetes/scheme:go_default_library", "//staging/src/k8s.io/client-go/rest:go_default_library", ], ) filegroup( name = "package-srcs", srcs = glob(["**"]), tags = ["automanaged"], visibility = ["//visibility:private"], ) filegroup( name = "all-srcs", srcs = [ ":package-srcs", "//staging/src/k8s.io/client-go/kubernetes/typed/authorization/v1/fake:all-srcs", ], tags = ["automanaged"], )
{ "pile_set_name": "Github" }
import os, sys sys.path.append(os.getcwd()) import random import time import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import numpy as np import tensorflow as tf import sklearn.datasets import tflib as lib import tflib.ops.linear import tflib.plot MODE = 'wgan-gp' # wgan or wgan-gp DATASET = '8gaussians' # 8gaussians, 25gaussians, swissroll DIM = 512 # Model dimensionality FIXED_GENERATOR = False # whether to hold the generator fixed at real data plus # Gaussian noise, as in the plots in the paper LAMBDA = .1 # Smaller lambda makes things faster for toy tasks, but isn't # necessary if you increase CRITIC_ITERS enough CRITIC_ITERS = 5 # How many critic iterations per generator iteration BATCH_SIZE = 256 # Batch size ITERS = 100000 # how many generator iterations to train for lib.print_model_settings(locals().copy()) def ReLULayer(name, n_in, n_out, inputs): output = lib.ops.linear.Linear( name+'.Linear', n_in, n_out, inputs, initialization='he' ) output = tf.nn.relu(output) return output def Generator(n_samples, real_data): if FIXED_GENERATOR: return real_data + (1.*tf.random_normal(tf.shape(real_data))) else: noise = tf.random_normal([n_samples, 2]) output = ReLULayer('Generator.1', 2, DIM, noise) output = ReLULayer('Generator.2', DIM, DIM, output) output = ReLULayer('Generator.3', DIM, DIM, output) output = lib.ops.linear.Linear('Generator.4', DIM, 2, output) return output def Discriminator(inputs): output = ReLULayer('Discriminator.1', 2, DIM, inputs) output = ReLULayer('Discriminator.2', DIM, DIM, output) output = ReLULayer('Discriminator.3', DIM, DIM, output) output = lib.ops.linear.Linear('Discriminator.4', DIM, 1, output) return tf.reshape(output, [-1]) real_data = tf.placeholder(tf.float32, shape=[None, 2]) fake_data = Generator(BATCH_SIZE, real_data) disc_real = Discriminator(real_data) disc_fake = Discriminator(fake_data) # WGAN loss disc_cost = tf.reduce_mean(disc_fake) - tf.reduce_mean(disc_real) gen_cost = -tf.reduce_mean(disc_fake) # WGAN gradient penalty if MODE == 'wgan-gp': alpha = tf.random_uniform( shape=[BATCH_SIZE,1], minval=0., maxval=1. ) interpolates = alpha*real_data + ((1-alpha)*fake_data) disc_interpolates = Discriminator(interpolates) gradients = tf.gradients(disc_interpolates, [interpolates])[0] slopes = tf.sqrt(tf.reduce_sum(tf.square(gradients), reduction_indices=[1])) gradient_penalty = tf.reduce_mean((slopes-1)**2) disc_cost += LAMBDA*gradient_penalty disc_params = lib.params_with_name('Discriminator') gen_params = lib.params_with_name('Generator') if MODE == 'wgan-gp': disc_train_op = tf.train.AdamOptimizer( learning_rate=1e-4, beta1=0.5, beta2=0.9 ).minimize( disc_cost, var_list=disc_params ) if len(gen_params) > 0: gen_train_op = tf.train.AdamOptimizer( learning_rate=1e-4, beta1=0.5, beta2=0.9 ).minimize( gen_cost, var_list=gen_params ) else: gen_train_op = tf.no_op() else: disc_train_op = tf.train.RMSPropOptimizer(learning_rate=5e-5).minimize( disc_cost, var_list=disc_params ) if len(gen_params) > 0: gen_train_op = tf.train.RMSPropOptimizer(learning_rate=5e-5).minimize( gen_cost, var_list=gen_params ) else: gen_train_op = tf.no_op() # Build an op to do the weight clipping clip_ops = [] for var in disc_params: clip_bounds = [-.01, .01] clip_ops.append( tf.assign( var, tf.clip_by_value(var, clip_bounds[0], clip_bounds[1]) ) ) clip_disc_weights = tf.group(*clip_ops) print "Generator params:" for var in lib.params_with_name('Generator'): print "\t{}\t{}".format(var.name, var.get_shape()) print "Discriminator params:" for var in lib.params_with_name('Discriminator'): print "\t{}\t{}".format(var.name, var.get_shape()) frame_index = [0] def generate_image(true_dist): """ Generates and saves a plot of the true distribution, the generator, and the critic. """ N_POINTS = 128 RANGE = 3 points = np.zeros((N_POINTS, N_POINTS, 2), dtype='float32') points[:,:,0] = np.linspace(-RANGE, RANGE, N_POINTS)[:,None] points[:,:,1] = np.linspace(-RANGE, RANGE, N_POINTS)[None,:] points = points.reshape((-1,2)) samples, disc_map = session.run( [fake_data, disc_real], feed_dict={real_data:points} ) disc_map = session.run(disc_real, feed_dict={real_data:points}) plt.clf() x = y = np.linspace(-RANGE, RANGE, N_POINTS) plt.contour(x,y,disc_map.reshape((len(x), len(y))).transpose()) plt.scatter(true_dist[:, 0], true_dist[:, 1], c='orange', marker='+') plt.scatter(samples[:, 0], samples[:, 1], c='green', marker='+') plt.savefig('frame'+str(frame_index[0])+'.jpg') frame_index[0] += 1 # Dataset iterator def inf_train_gen(): if DATASET == '25gaussians': dataset = [] for i in xrange(100000/25): for x in xrange(-2, 3): for y in xrange(-2, 3): point = np.random.randn(2)*0.05 point[0] += 2*x point[1] += 2*y dataset.append(point) dataset = np.array(dataset, dtype='float32') np.random.shuffle(dataset) dataset /= 2.828 # stdev while True: for i in xrange(len(dataset)/BATCH_SIZE): yield dataset[i*BATCH_SIZE:(i+1)*BATCH_SIZE] elif DATASET == 'swissroll': while True: data = sklearn.datasets.make_swiss_roll( n_samples=BATCH_SIZE, noise=0.25 )[0] data = data.astype('float32')[:, [0, 2]] data /= 7.5 # stdev plus a little yield data elif DATASET == '8gaussians': scale = 2. centers = [ (1,0), (-1,0), (0,1), (0,-1), (1./np.sqrt(2), 1./np.sqrt(2)), (1./np.sqrt(2), -1./np.sqrt(2)), (-1./np.sqrt(2), 1./np.sqrt(2)), (-1./np.sqrt(2), -1./np.sqrt(2)) ] centers = [(scale*x,scale*y) for x,y in centers] while True: dataset = [] for i in xrange(BATCH_SIZE): point = np.random.randn(2)*.02 center = random.choice(centers) point[0] += center[0] point[1] += center[1] dataset.append(point) dataset = np.array(dataset, dtype='float32') dataset /= 1.414 # stdev yield dataset # Train loop! with tf.Session() as session: session.run(tf.initialize_all_variables()) gen = inf_train_gen() for iteration in xrange(ITERS): # Train generator if iteration > 0: _ = session.run(gen_train_op) # Train critic for i in xrange(CRITIC_ITERS): _data = gen.next() _disc_cost, _ = session.run( [disc_cost, disc_train_op], feed_dict={real_data: _data} ) if MODE == 'wgan': _ = session.run([clip_disc_weights]) # Write logs and save samples lib.plot.plot('disc cost', _disc_cost) if iteration % 100 == 99: lib.plot.flush() generate_image(_data) lib.plot.tick()
{ "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.stanbol.rules.adapters.swrl; import java.util.Collection; import java.util.List; import java.util.Set; import org.semanticweb.owlapi.model.OWLAnonymousIndividual; import org.semanticweb.owlapi.model.OWLClass; import org.semanticweb.owlapi.model.OWLClassExpression; import org.semanticweb.owlapi.model.OWLDataProperty; import org.semanticweb.owlapi.model.OWLDatatype; import org.semanticweb.owlapi.model.OWLEntity; import org.semanticweb.owlapi.model.OWLNamedIndividual; import org.semanticweb.owlapi.model.OWLObject; import org.semanticweb.owlapi.model.OWLObjectProperty; import org.semanticweb.owlapi.model.OWLObjectVisitor; import org.semanticweb.owlapi.model.OWLObjectVisitorEx; import org.semanticweb.owlapi.model.SWRLArgument; import org.semanticweb.owlapi.model.SWRLAtom; import org.semanticweb.owlapi.model.SWRLDArgument; import org.semanticweb.owlapi.model.SWRLObjectVisitor; import org.semanticweb.owlapi.model.SWRLObjectVisitorEx; import org.semanticweb.owlapi.model.SWRLPredicate; /** * It is used for represent higher order atoms.<br/> * It is used to convert Stanbol atoms that accept other atoms as arguments, such as * <code>sum(sum(5,?x), ?y)</code>.<br/> * In such a situation in SWRL we should use new variables as place holders, e.g., sum(?ph1, ?y, ?z) sum(5, * ?x, ?ph1). * * @author anuzzolese * */ public class HigherOrderSWRLAtom implements SWRLAtom { private SWRLDArgument bindableArgument; private List<SWRLAtom> atoms; public HigherOrderSWRLAtom(SWRLDArgument bindableArgument, List<SWRLAtom> atoms) { this.bindableArgument = bindableArgument; this.atoms = atoms; } public List<SWRLAtom> getAtoms() { return atoms; } public SWRLDArgument getBindableArgument() { return bindableArgument; } @Override public void accept(SWRLObjectVisitor arg0) { // TODO Auto-generated method stub } @Override public <O> O accept(SWRLObjectVisitorEx<O> arg0) { // TODO Auto-generated method stub return null; } @Override public void accept(OWLObjectVisitor arg0) { // TODO Auto-generated method stub } @Override public <O> O accept(OWLObjectVisitorEx<O> arg0) { // TODO Auto-generated method stub return null; } @Override public Set<OWLClass> getClassesInSignature() { // TODO Auto-generated method stub return null; } @Override public Set<OWLDataProperty> getDataPropertiesInSignature() { // TODO Auto-generated method stub return null; } @Override public Set<OWLDatatype> getDatatypesInSignature() { // TODO Auto-generated method stub return null; } @Override public Set<OWLNamedIndividual> getIndividualsInSignature() { // TODO Auto-generated method stub return null; } @Override public Set<OWLClassExpression> getNestedClassExpressions() { // TODO Auto-generated method stub return null; } @Override public Set<OWLObjectProperty> getObjectPropertiesInSignature() { // TODO Auto-generated method stub return null; } @Override public Set<OWLEntity> getSignature() { // TODO Auto-generated method stub return null; } @Override public boolean isBottomEntity() { // TODO Auto-generated method stub return false; } @Override public boolean isTopEntity() { // TODO Auto-generated method stub return false; } @Override public int compareTo(OWLObject arg0) { // TODO Auto-generated method stub return 0; } @Override public Collection<SWRLArgument> getAllArguments() { // TODO Auto-generated method stub return null; } @Override public SWRLPredicate getPredicate() { // TODO Auto-generated method stub return null; } @Override public Set<OWLAnonymousIndividual> getAnonymousIndividuals() { // TODO Auto-generated method stub return null; } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.yworks.com/xml/graphml" xmlns:yed="http://www.yworks.com/xml/yed/3" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://www.yworks.com/xml/schema/graphml/1.1/ygraphml.xsd"> <!--Created by yEd 3.12.2--> <key for="graphml" id="d0" yfiles.type="resources"/> <key for="port" id="d1" yfiles.type="portgraphics"/> <key for="port" id="d2" yfiles.type="portgeometry"/> <key for="port" id="d3" yfiles.type="portuserdata"/> <key attr.name="url" attr.type="string" for="node" id="d4"/> <key attr.name="description" attr.type="string" for="node" id="d5"/> <key for="node" id="d6" yfiles.type="nodegraphics"/> <key attr.name="Beschreibung" attr.type="string" for="graph" id="d7"/> <key attr.name="url" attr.type="string" for="edge" id="d8"/> <key attr.name="description" attr.type="string" for="edge" id="d9"/> <key for="edge" id="d10" yfiles.type="edgegraphics"/> <graph edgedefault="directed" id="G"> <data key="d7"/> <node id="n0" yfiles.foldertype="group"> <data key="d4"/> <data key="d6"> <y:ProxyAutoBoundsNode> <y:Realizers active="0"> <y:GroupNode> <y:Geometry height="409.0" width="148.0" x="290.953299818952" y="147.0"/> <y:Fill color="#F5F5F5" transparent="false"/> <y:BorderStyle color="#000000" type="dashed" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Segoe UI Semilight" fontSize="15" fontStyle="plain" hasLineColor="false" height="23.951171875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="148.0" x="0.0" y="0.0">console</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> <y:GroupNode> <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/> <y:Fill color="#F5F5F5" transparent="false"/> <y:BorderStyle color="#000000" type="dashed" width="1.0"/> <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="59.02685546875" x="-4.513427734375" y="0.0">Folder 4</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> </y:Realizers> </y:ProxyAutoBoundsNode> </data> <graph edgedefault="directed" id="n0:"/> </node> <node id="n1" yfiles.foldertype="group"> <data key="d4"/> <data key="d6"> <y:ProxyAutoBoundsNode> <y:Realizers active="0"> <y:GroupNode> <y:Geometry height="409.0" width="148.0" x="310.2342794220951" y="167.0"/> <y:Fill color="#F5F5F5" transparent="false"/> <y:BorderStyle color="#000000" type="dashed" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Segoe UI Semilight" fontSize="15" fontStyle="plain" hasLineColor="false" height="23.951171875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="148.0" x="0.0" y="0.0">backend</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> <y:GroupNode> <y:Geometry height="50.0" width="50.0" x="310.2342794220951" y="167.0"/> <y:Fill color="#F5F5F5" transparent="false"/> <y:BorderStyle color="#000000" type="dashed" width="1.0"/> <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="59.02685546875" x="-4.513427734375" y="0.0">Folder 3</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> </y:Realizers> </y:ProxyAutoBoundsNode> </data> <graph edgedefault="directed" id="n1:"/> </node> <node id="n2"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="348.0" y="628.9999999999999"/> <y:Fill color="#FFCC00" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.837890625" modelName="custom" textColor="#000000" visible="true" width="35.154296875" x="41.4228515625" y="21.0810546875">index<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n3" yfiles.foldertype="group"> <data key="d4"/> <data key="d6"> <y:ProxyAutoBoundsNode> <y:Realizers active="0"> <y:GroupNode> <y:Geometry height="403.951171875" width="148.0" x="333.0" y="187.048828125"/> <y:Fill color="#DDFFDD" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#DDFFDD" borderDistance="0.0" fontFamily="Segoe UI Semilight" fontSize="15" fontStyle="plain" hasLineColor="false" height="23.951171875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="148.0" x="0.0" y="0.0">frontend</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> <y:GroupNode> <y:Geometry height="50.0" width="50.0" x="0.0" y="60.0"/> <y:Fill color="#F5F5F5" transparent="false"/> <y:BorderStyle color="#000000" type="dashed" width="1.0"/> <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="59.02685546875" x="-4.513427734375" y="0.0">Folder 1</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> </y:Realizers> </y:ProxyAutoBoundsNode> </data> <graph edgedefault="directed" id="n3:"> <node id="n3::n0"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="348.0" y="226.0"/> <y:Fill color="#FFCCCC" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.837890625" modelName="custom" textColor="#000000" visible="true" width="46.310546875" x="35.8447265625" y="21.0810546875">params<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n3::n1"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="348.0" y="322.0"/> <y:Fill color="#FFCCCC" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.837890625" modelName="custom" textColor="#000000" visible="true" width="78.16796875" x="19.916015625" y="21.0810546875">params-local<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n3::n2"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="348.0" y="418.0"/> <y:Fill color="#99CCFF" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.837890625" modelName="custom" textColor="#000000" visible="true" width="32.46484375" x="42.767578125" y="21.0810546875">main<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n3::n3"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="348.0" y="514.0"/> <y:Fill color="#99CCFF" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.837890625" modelName="custom" textColor="#000000" visible="true" width="64.322265625" x="26.8388671875" y="21.0810546875">main-local<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> </graph> </node> <node id="n4"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="223.21580824827026" x="7.0" y="628.9999999999999"/> <y:Fill color="#ADF4A6" transparent="false"/> <y:BorderStyle color="#000000" type="dashed" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="35.67578125" modelName="custom" textColor="#000000" visible="true" width="52.0" x="85.60790412413513" y="13.162109375">aliases (别名)<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n5" yfiles.foldertype="group"> <data key="d4"/> <data key="d6"> <y:ProxyAutoBoundsNode> <y:Realizers active="0"> <y:GroupNode> <y:Geometry height="307.951171875" width="311.0" x="7.0" y="187.048828125"/> <y:Fill color="#DDFFDD" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="node_width" backgroundColor="#DDFFDD" borderDistance="0.0" fontFamily="Segoe UI Semilight" fontSize="15" fontStyle="plain" hasLineColor="false" height="23.951171875" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="311.0" x="0.0" y="0.0">common</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="false" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="15" bottomF="15.0" left="15" leftF="15.0" right="15" rightF="15.0" top="15" topF="15.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> <y:GroupNode> <y:Geometry height="50.0" width="50.0" x="-8.0" y="189.333984375"/> <y:Fill color="#F5F5F5" transparent="false"/> <y:BorderStyle color="#000000" type="dashed" width="1.0"/> <y:NodeLabel alignment="right" autoSizePolicy="node_width" backgroundColor="#EBEBEB" borderDistance="0.0" fontFamily="Dialog" fontSize="15" fontStyle="plain" hasLineColor="false" height="22.37646484375" modelName="internal" modelPosition="t" textColor="#000000" visible="true" width="59.02685546875" x="-4.513427734375" y="0.0">Folder 2</y:NodeLabel> <y:Shape type="roundrectangle"/> <y:State closed="true" closedHeight="50.0" closedWidth="50.0" innerGraphDisplayEnabled="false"/> <y:Insets bottom="5" bottomF="5.0" left="5" leftF="5.0" right="5" rightF="5.0" top="5" topF="5.0"/> <y:BorderInsets bottom="0" bottomF="0.0" left="0" leftF="0.0" right="0" rightF="0.0" top="0" topF="0.0"/> </y:GroupNode> </y:Realizers> </y:ProxyAutoBoundsNode> </data> <graph edgedefault="directed" id="n5:"> <node id="n5::n0"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="185.0" y="226.0"/> <y:Fill color="#FFCCCC" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.837890625" modelName="custom" textColor="#000000" visible="true" width="78.16796875" x="19.916015625" y="21.0810546875">params-local<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n5::n1"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="185.0" y="418.0"/> <y:Fill color="#99CCFF" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="19.837890625" modelName="custom" textColor="#000000" visible="true" width="64.322265625" x="26.8388671875" y="21.0810546875">main-local<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n5::n2"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="22.0" y="226.0"/> <y:Fill color="#FFCCCC" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="35.67578125" modelName="custom" textColor="#000000" visible="true" width="52.0" x="33.0" y="13.162109375">params (参数)<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> <node id="n5::n3"> <data key="d6"> <y:ShapeNode> <y:Geometry height="62.0" width="118.0" x="22.0" y="418.0"/> <y:Fill color="#99CCFF" transparent="false"/> <y:BorderStyle color="#000000" type="line" width="1.0"/> <y:NodeLabel alignment="center" autoSizePolicy="content" fontFamily="微软雅黑" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" height="35.67578125" modelName="custom" textColor="#000000" visible="true" width="52.0" x="33.0" y="13.162109375">main (主要)<y:LabelModel> <y:SmartNodeLabelModel distance="4.0"/> </y:LabelModel> <y:ModelParameter> <y:SmartNodeLabelModelParameter labelRatioX="0.0" labelRatioY="0.0" nodeRatioX="0.0" nodeRatioY="0.0" offsetX="0.0" offsetY="0.0" upX="0.0" upY="-1.0"/> </y:ModelParameter> </y:NodeLabel> <y:Shape type="rectangle"/> </y:ShapeNode> </data> </node> </graph> </node> <edge id="e0" source="n3::n3" target="n2"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="2.0" y="10.125"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="e1" source="n4" target="n2"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="-111.48005839096935" sy="0.0" tx="0.0" ty="0.0"/> <y:LineStyle color="#000000" type="line" width="3.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.25" textColor="#000000" visible="true" width="4.0" x="33.47449351530429" y="-6.000000000000114"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="e2" source="n5::n1" target="n3::n2"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="5.6843418860808015E-14" tx="0.0" ty="0.0"> <y:Point x="218.8251533742331" y="449.00000000000006"/> <y:Point x="218.8251533742331" y="449.0"/> </y:Path> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="10.089752197265625" y="-6.0"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="n5::e0" source="n5::n2" target="n5::n0"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="standard"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="10.125" y="-6.0"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="n5::e1" source="n5::n3" target="n5::n1"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="10.125" y="-6.0"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="n3::e0" source="n3::n0" target="n3::n1"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="2.0" y="10.125"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="n3::e1" source="n3::n1" target="n3::n2"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="2.0" y="10.125"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="n3::e2" source="n3::n2" target="n3::n3"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="0.0" tx="0.0" ty="0.0"/> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="2.0" y="10.125"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> <edge id="e3" source="n5::n0" target="n3::n0"> <data key="d10"> <y:PolyLineEdge> <y:Path sx="0.0" sy="-5.6843418860808015E-14" tx="0.0" ty="0.0"> <y:Point x="218.8251533742331" y="256.99999999999994"/> <y:Point x="218.8251533742331" y="257.0"/> </y:Path> <y:LineStyle color="#000000" type="line" width="2.0"/> <y:Arrows source="none" target="delta"/> <y:EdgeLabel alignment="center" distance="2.0" fontFamily="Dialog" fontSize="12" fontStyle="plain" hasBackgroundColor="false" hasLineColor="false" hasText="false" height="4.0" modelName="side_slider" preferredPlacement="right" ratio="0.0" textColor="#000000" visible="true" width="4.0" x="10.089752197265625" y="-6.0"> <y:PreferredPlacementDescriptor angle="0.0" angleOffsetOnRightSide="0" angleReference="absolute" angleRotationOnRightSide="co" distance="-1.0" frozen="true" placement="anywhere" side="right" sideReference="relative_to_edge_flow"/> </y:EdgeLabel> <y:BendStyle smoothed="false"/> </y:PolyLineEdge> </data> </edge> </graph> <data key="d0"> <y:Resources/> </data> </graphml>
{ "pile_set_name": "Github" }
/* --------------------------------------------------------------------------- Copyright (c) 1998-2010, Brian Gladman, Worcester, UK. All rights reserved. The redistribution and use of this software (with or without changes) is allowed without the payment of fees or royalties provided that: source code distributions include the above copyright notice, this list of conditions and the following disclaimer; binary distributions include the above copyright notice, this list of conditions and the following disclaimer in their documentation. This software is provided 'as is' with no explicit or implied warranties in respect of its operation, including, but not limited to, correctness and fitness for purpose. --------------------------------------------------------------------------- Issue Date: 20/12/2007 This file contains the compilation options for AES (Rijndael) and code that is common across encryption, key scheduling and table generation. OPERATION These source code files implement the AES algorithm Rijndael designed by Joan Daemen and Vincent Rijmen. This version is designed for the standard block size of 16 bytes and for key sizes of 128, 192 and 256 bits (16, 24 and 32 bytes). This version is designed for flexibility and speed using operations on 32-bit words rather than operations on bytes. It can be compiled with either big or little endian internal byte order but is faster when the native byte order for the processor is used. THE CIPHER INTERFACE The cipher interface is implemented as an array of bytes in which lower AES bit sequence indexes map to higher numeric significance within bytes. uint_8t (an unsigned 8-bit type) uint_32t (an unsigned 32-bit type) struct aes_encrypt_ctx (structure for the cipher encryption context) struct aes_decrypt_ctx (structure for the cipher decryption context) AES_RETURN the function return type C subroutine calls: AES_RETURN aes_encrypt_key128(const unsigned char *key, aes_encrypt_ctx cx[1]); AES_RETURN aes_encrypt_key192(const unsigned char *key, aes_encrypt_ctx cx[1]); AES_RETURN aes_encrypt_key256(const unsigned char *key, aes_encrypt_ctx cx[1]); AES_RETURN aes_encrypt(const unsigned char *in, unsigned char *out, const aes_encrypt_ctx cx[1]); AES_RETURN aes_decrypt_key128(const unsigned char *key, aes_decrypt_ctx cx[1]); AES_RETURN aes_decrypt_key192(const unsigned char *key, aes_decrypt_ctx cx[1]); AES_RETURN aes_decrypt_key256(const unsigned char *key, aes_decrypt_ctx cx[1]); AES_RETURN aes_decrypt(const unsigned char *in, unsigned char *out, const aes_decrypt_ctx cx[1]); IMPORTANT NOTE: If you are using this C interface with dynamic tables make sure that you call aes_init() before AES is used so that the tables are initialised. C++ aes class subroutines: Class AESencrypt for encryption Construtors: AESencrypt(void) AESencrypt(const unsigned char *key) - 128 bit key Members: AES_RETURN key128(const unsigned char *key) AES_RETURN key192(const unsigned char *key) AES_RETURN key256(const unsigned char *key) AES_RETURN encrypt(const unsigned char *in, unsigned char *out) const Class AESdecrypt for encryption Construtors: AESdecrypt(void) AESdecrypt(const unsigned char *key) - 128 bit key Members: AES_RETURN key128(const unsigned char *key) AES_RETURN key192(const unsigned char *key) AES_RETURN key256(const unsigned char *key) AES_RETURN decrypt(const unsigned char *in, unsigned char *out) const */ #if !defined( _AESOPT_H ) #define _AESOPT_H #if defined( __cplusplus ) #include "aescpp.h" #else #include "aes.h" #endif /* PLATFORM SPECIFIC INCLUDES */ #include "brg_endian.h" /* CONFIGURATION - THE USE OF DEFINES Later in this section there are a number of defines that control the operation of the code. In each section, the purpose of each define is explained so that the relevant form can be included or excluded by setting either 1's or 0's respectively on the branches of the related #if clauses. The following local defines should not be changed. */ #define ENCRYPTION_IN_C 1 #define DECRYPTION_IN_C 2 #define ENC_KEYING_IN_C 4 #define DEC_KEYING_IN_C 8 #define NO_TABLES 0 #define ONE_TABLE 1 #define FOUR_TABLES 4 #define NONE 0 #define PARTIAL 1 #define FULL 2 /* --- START OF USER CONFIGURED OPTIONS --- */ /* 1. BYTE ORDER WITHIN 32 BIT WORDS The fundamental data processing units in Rijndael are 8-bit bytes. The input, output and key input are all enumerated arrays of bytes in which bytes are numbered starting at zero and increasing to one less than the number of bytes in the array in question. This enumeration is only used for naming bytes and does not imply any adjacency or order relationship from one byte to another. When these inputs and outputs are considered as bit sequences, bits 8*n to 8*n+7 of the bit sequence are mapped to byte[n] with bit 8n+i in the sequence mapped to bit 7-i within the byte. In this implementation bits are numbered from 0 to 7 starting at the numerically least significant end of each byte (bit n represents 2^n). However, Rijndael can be implemented more efficiently using 32-bit words by packing bytes into words so that bytes 4*n to 4*n+3 are placed into word[n]. While in principle these bytes can be assembled into words in any positions, this implementation only supports the two formats in which bytes in adjacent positions within words also have adjacent byte numbers. This order is called big-endian if the lowest numbered bytes in words have the highest numeric significance and little-endian if the opposite applies. This code can work in either order irrespective of the order used by the machine on which it runs. Normally the internal byte order will be set to the order of the processor on which the code is to be run but this define can be used to reverse this in special situations WARNING: Assembler code versions rely on PLATFORM_BYTE_ORDER being set. This define will hence be redefined later (in section 4) if necessary */ #if 1 # define ALGORITHM_BYTE_ORDER PLATFORM_BYTE_ORDER #elif 0 # define ALGORITHM_BYTE_ORDER IS_LITTLE_ENDIAN #elif 0 # define ALGORITHM_BYTE_ORDER IS_BIG_ENDIAN #else # error The algorithm byte order is not defined #endif /* 2. VIA ACE SUPPORT */ #if !defined(__APPLE__) && defined( __GNUC__ ) && defined( __i386__ ) \ || defined( _WIN32 ) && defined( _M_IX86 ) \ && !(defined( _WIN64 ) || defined( _WIN32_WCE ) || defined( _MSC_VER ) && ( _MSC_VER <= 800 )) # define VIA_ACE_POSSIBLE #endif /* Define this option if support for the VIA ACE is required. This uses inline assembler instructions and is only implemented for the Microsoft, Intel and GCC compilers. If VIA ACE is known to be present, then defining ASSUME_VIA_ACE_PRESENT will remove the ordinary encryption/decryption code. If USE_VIA_ACE_IF_PRESENT is defined then VIA ACE will be used if it is detected (both present and enabled) but the normal AES code will also be present. When VIA ACE is to be used, all AES encryption contexts MUST be 16 byte aligned; other input/output buffers do not need to be 16 byte aligned but there are very large performance gains if this can be arranged. VIA ACE also requires the decryption key schedule to be in reverse order (which later checks below ensure). */ #if 1 && defined( VIA_ACE_POSSIBLE ) && !defined( USE_VIA_ACE_IF_PRESENT ) # define USE_VIA_ACE_IF_PRESENT #endif #if 0 && defined( VIA_ACE_POSSIBLE ) && !defined( ASSUME_VIA_ACE_PRESENT ) # define ASSUME_VIA_ACE_PRESENT # endif /* 3. ASSEMBLER SUPPORT This define (which can be on the command line) enables the use of the assembler code routines for encryption, decryption and key scheduling as follows: ASM_X86_V1C uses the assembler (aes_x86_v1.asm) with large tables for encryption and decryption and but with key scheduling in C ASM_X86_V2 uses assembler (aes_x86_v2.asm) with compressed tables for encryption, decryption and key scheduling ASM_X86_V2C uses assembler (aes_x86_v2.asm) with compressed tables for encryption and decryption and but with key scheduling in C ASM_AMD64_C uses assembler (aes_amd64.asm) with compressed tables for encryption and decryption and but with key scheduling in C Change one 'if 0' below to 'if 1' to select the version or define as a compilation option. */ #if 0 && !defined( ASM_X86_V1C ) # define ASM_X86_V1C #elif 0 && !defined( ASM_X86_V2 ) # define ASM_X86_V2 #elif 0 && !defined( ASM_X86_V2C ) # define ASM_X86_V2C #elif 0 && !defined( ASM_AMD64_C ) # define ASM_AMD64_C #endif #if (defined ( ASM_X86_V1C ) || defined( ASM_X86_V2 ) || defined( ASM_X86_V2C )) \ && !defined( _M_IX86 ) || defined( ASM_AMD64_C ) && !defined( _M_X64 ) # error Assembler code is only available for x86 and AMD64 systems #endif /* 4. FAST INPUT/OUTPUT OPERATIONS. On some machines it is possible to improve speed by transferring the bytes in the input and output arrays to and from the internal 32-bit variables by addressing these arrays as if they are arrays of 32-bit words. On some machines this will always be possible but there may be a large performance penalty if the byte arrays are not aligned on the normal word boundaries. On other machines this technique will lead to memory access errors when such 32-bit word accesses are not properly aligned. The option SAFE_IO avoids such problems but will often be slower on those machines that support misaligned access (especially so if care is taken to align the input and output byte arrays on 32-bit word boundaries). If SAFE_IO is not defined it is assumed that access to byte arrays as if they are arrays of 32-bit words will not cause problems when such accesses are misaligned. */ #if 1 && !defined( _MSC_VER ) # define SAFE_IO #endif /* 5. LOOP UNROLLING The code for encryption and decrytpion cycles through a number of rounds that can be implemented either in a loop or by expanding the code into a long sequence of instructions, the latter producing a larger program but one that will often be much faster. The latter is called loop unrolling. There are also potential speed advantages in expanding two iterations in a loop with half the number of iterations, which is called partial loop unrolling. The following options allow partial or full loop unrolling to be set independently for encryption and decryption */ #if 1 # define ENC_UNROLL FULL #elif 0 # define ENC_UNROLL PARTIAL #else # define ENC_UNROLL NONE #endif #if 1 # define DEC_UNROLL FULL #elif 0 # define DEC_UNROLL PARTIAL #else # define DEC_UNROLL NONE #endif #if 1 # define ENC_KS_UNROLL #endif #if 1 # define DEC_KS_UNROLL #endif /* 6. FAST FINITE FIELD OPERATIONS If this section is included, tables are used to provide faster finite field arithmetic (this has no effect if FIXED_TABLES is defined). */ #if 1 # define FF_TABLES #endif /* 7. INTERNAL STATE VARIABLE FORMAT The internal state of Rijndael is stored in a number of local 32-bit word varaibles which can be defined either as an array or as individual names variables. Include this section if you want to store these local varaibles in arrays. Otherwise individual local variables will be used. */ #if 1 # define ARRAYS #endif /* 8. FIXED OR DYNAMIC TABLES When this section is included the tables used by the code are compiled statically into the binary file. Otherwise the subroutine aes_init() must be called to compute them before the code is first used. */ #if 1 && !(defined( _MSC_VER ) && ( _MSC_VER <= 800 )) # define FIXED_TABLES #endif /* 9. MASKING OR CASTING FROM LONGER VALUES TO BYTES In some systems it is better to mask longer values to extract bytes rather than using a cast. This option allows this choice. */ #if 0 # define to_byte(x) ((uint_8t)(x)) #else # define to_byte(x) ((x) & 0xff) #endif /* 10. TABLE ALIGNMENT On some sytsems speed will be improved by aligning the AES large lookup tables on particular boundaries. This define should be set to a power of two giving the desired alignment. It can be left undefined if alignment is not needed. This option is specific to the Microsft VC++ compiler - it seems to sometimes cause trouble for the VC++ version 6 compiler. */ #if 1 && defined( _MSC_VER ) && ( _MSC_VER >= 1300 ) # define TABLE_ALIGN 32 #endif /* 11. REDUCE CODE AND TABLE SIZE This replaces some expanded macros with function calls if AES_ASM_V2 or AES_ASM_V2C are defined */ #if 1 && (defined( ASM_X86_V2 ) || defined( ASM_X86_V2C )) # define REDUCE_CODE_SIZE #endif /* 12. TABLE OPTIONS This cipher proceeds by repeating in a number of cycles known as 'rounds' which are implemented by a round function which can optionally be speeded up using tables. The basic tables are each 256 32-bit words, with either one or four tables being required for each round function depending on how much speed is required. The encryption and decryption round functions are different and the last encryption and decrytpion round functions are different again making four different round functions in all. This means that: 1. Normal encryption and decryption rounds can each use either 0, 1 or 4 tables and table spaces of 0, 1024 or 4096 bytes each. 2. The last encryption and decryption rounds can also use either 0, 1 or 4 tables and table spaces of 0, 1024 or 4096 bytes each. Include or exclude the appropriate definitions below to set the number of tables used by this implementation. */ #if 1 /* set tables for the normal encryption round */ # define ENC_ROUND FOUR_TABLES #elif 0 # define ENC_ROUND ONE_TABLE #else # define ENC_ROUND NO_TABLES #endif #if 1 /* set tables for the last encryption round */ # define LAST_ENC_ROUND FOUR_TABLES #elif 0 # define LAST_ENC_ROUND ONE_TABLE #else # define LAST_ENC_ROUND NO_TABLES #endif #if 1 /* set tables for the normal decryption round */ # define DEC_ROUND FOUR_TABLES #elif 0 # define DEC_ROUND ONE_TABLE #else # define DEC_ROUND NO_TABLES #endif #if 1 /* set tables for the last decryption round */ # define LAST_DEC_ROUND FOUR_TABLES #elif 0 # define LAST_DEC_ROUND ONE_TABLE #else # define LAST_DEC_ROUND NO_TABLES #endif /* The decryption key schedule can be speeded up with tables in the same way that the round functions can. Include or exclude the following defines to set this requirement. */ #if 1 # define KEY_SCHED FOUR_TABLES #elif 0 # define KEY_SCHED ONE_TABLE #else # define KEY_SCHED NO_TABLES #endif /* ---- END OF USER CONFIGURED OPTIONS ---- */ /* VIA ACE support is only available for VC++ and GCC */ #if !defined( _MSC_VER ) && !defined( __GNUC__ ) # if defined( ASSUME_VIA_ACE_PRESENT ) # undef ASSUME_VIA_ACE_PRESENT # endif # if defined( USE_VIA_ACE_IF_PRESENT ) # undef USE_VIA_ACE_IF_PRESENT # endif #endif #if defined( ASSUME_VIA_ACE_PRESENT ) && !defined( USE_VIA_ACE_IF_PRESENT ) # define USE_VIA_ACE_IF_PRESENT #endif #if defined( USE_VIA_ACE_IF_PRESENT ) && !defined ( AES_REV_DKS ) # define AES_REV_DKS #endif /* Assembler support requires the use of platform byte order */ #if ( defined( ASM_X86_V1C ) || defined( ASM_X86_V2C ) || defined( ASM_AMD64_C ) ) \ && (ALGORITHM_BYTE_ORDER != PLATFORM_BYTE_ORDER) # undef ALGORITHM_BYTE_ORDER # define ALGORITHM_BYTE_ORDER PLATFORM_BYTE_ORDER #endif /* In this implementation the columns of the state array are each held in 32-bit words. The state array can be held in various ways: in an array of words, in a number of individual word variables or in a number of processor registers. The following define maps a variable name x and a column number c to the way the state array variable is to be held. The first define below maps the state into an array x[c] whereas the second form maps the state into a number of individual variables x0, x1, etc. Another form could map individual state colums to machine register names. */ #if defined( ARRAYS ) # define s(x,c) x[c] #else # define s(x,c) x##c #endif /* This implementation provides subroutines for encryption, decryption and for setting the three key lengths (separately) for encryption and decryption. Since not all functions are needed, masks are set up here to determine which will be implemented in C */ #if !defined( AES_ENCRYPT ) # define EFUNCS_IN_C 0 #elif defined( ASSUME_VIA_ACE_PRESENT ) || defined( ASM_X86_V1C ) \ || defined( ASM_X86_V2C ) || defined( ASM_AMD64_C ) # define EFUNCS_IN_C ENC_KEYING_IN_C #elif !defined( ASM_X86_V2 ) # define EFUNCS_IN_C ( ENCRYPTION_IN_C | ENC_KEYING_IN_C ) #else # define EFUNCS_IN_C 0 #endif #if !defined( AES_DECRYPT ) # define DFUNCS_IN_C 0 #elif defined( ASSUME_VIA_ACE_PRESENT ) || defined( ASM_X86_V1C ) \ || defined( ASM_X86_V2C ) || defined( ASM_AMD64_C ) # define DFUNCS_IN_C DEC_KEYING_IN_C #elif !defined( ASM_X86_V2 ) # define DFUNCS_IN_C ( DECRYPTION_IN_C | DEC_KEYING_IN_C ) #else # define DFUNCS_IN_C 0 #endif #define FUNCS_IN_C ( EFUNCS_IN_C | DFUNCS_IN_C ) /* END OF CONFIGURATION OPTIONS */ #define RC_LENGTH (5 * (AES_BLOCK_SIZE / 4 - 2)) /* Disable or report errors on some combinations of options */ #if ENC_ROUND == NO_TABLES && LAST_ENC_ROUND != NO_TABLES # undef LAST_ENC_ROUND # define LAST_ENC_ROUND NO_TABLES #elif ENC_ROUND == ONE_TABLE && LAST_ENC_ROUND == FOUR_TABLES # undef LAST_ENC_ROUND # define LAST_ENC_ROUND ONE_TABLE #endif #if ENC_ROUND == NO_TABLES && ENC_UNROLL != NONE # undef ENC_UNROLL # define ENC_UNROLL NONE #endif #if DEC_ROUND == NO_TABLES && LAST_DEC_ROUND != NO_TABLES # undef LAST_DEC_ROUND # define LAST_DEC_ROUND NO_TABLES #elif DEC_ROUND == ONE_TABLE && LAST_DEC_ROUND == FOUR_TABLES # undef LAST_DEC_ROUND # define LAST_DEC_ROUND ONE_TABLE #endif #if DEC_ROUND == NO_TABLES && DEC_UNROLL != NONE # undef DEC_UNROLL # define DEC_UNROLL NONE #endif #if defined( bswap32 ) # define aes_sw32 bswap32 #elif defined( bswap_32 ) # define aes_sw32 bswap_32 #else # define brot(x,n) (((uint_32t)(x) << n) | ((uint_32t)(x) >> (32 - n))) # define aes_sw32(x) ((brot((x),8) & 0x00ff00ff) | (brot((x),24) & 0xff00ff00)) #endif /* upr(x,n): rotates bytes within words by n positions, moving bytes to higher index positions with wrap around into low positions ups(x,n): moves bytes by n positions to higher index positions in words but without wrap around bval(x,n): extracts a byte from a word WARNING: The definitions given here are intended only for use with unsigned variables and with shift counts that are compile time constants */ #if ( ALGORITHM_BYTE_ORDER == IS_LITTLE_ENDIAN ) # define upr(x,n) (((uint_32t)(x) << (8 * (n))) | ((uint_32t)(x) >> (32 - 8 * (n)))) # define ups(x,n) ((uint_32t) (x) << (8 * (n))) # define bval(x,n) to_byte((x) >> (8 * (n))) # define bytes2word(b0, b1, b2, b3) \ (((uint_32t)(b3) << 24) | ((uint_32t)(b2) << 16) | ((uint_32t)(b1) << 8) | (b0)) #endif #if ( ALGORITHM_BYTE_ORDER == IS_BIG_ENDIAN ) # define upr(x,n) (((uint_32t)(x) >> (8 * (n))) | ((uint_32t)(x) << (32 - 8 * (n)))) # define ups(x,n) ((uint_32t) (x) >> (8 * (n))) # define bval(x,n) to_byte((x) >> (24 - 8 * (n))) # define bytes2word(b0, b1, b2, b3) \ (((uint_32t)(b0) << 24) | ((uint_32t)(b1) << 16) | ((uint_32t)(b2) << 8) | (b3)) #endif #if defined( SAFE_IO ) # define word_in(x,c) bytes2word(((const uint_8t*)(x)+4*c)[0], ((const uint_8t*)(x)+4*c)[1], \ ((const uint_8t*)(x)+4*c)[2], ((const uint_8t*)(x)+4*c)[3]) # define word_out(x,c,v) { ((uint_8t*)(x)+4*c)[0] = bval(v,0); ((uint_8t*)(x)+4*c)[1] = bval(v,1); \ ((uint_8t*)(x)+4*c)[2] = bval(v,2); ((uint_8t*)(x)+4*c)[3] = bval(v,3); } #elif ( ALGORITHM_BYTE_ORDER == PLATFORM_BYTE_ORDER ) # define word_in(x,c) (*((uint_32t*)(x)+(c))) # define word_out(x,c,v) (*((uint_32t*)(x)+(c)) = (v)) #else # define word_in(x,c) aes_sw32(*((uint_32t*)(x)+(c))) # define word_out(x,c,v) (*((uint_32t*)(x)+(c)) = aes_sw32(v)) #endif /* the finite field modular polynomial and elements */ #define WPOLY 0x011b #define BPOLY 0x1b /* multiply four bytes in GF(2^8) by 'x' {02} in parallel */ #define gf_c1 0x80808080 #define gf_c2 0x7f7f7f7f #define gf_mulx(x) ((((x) & gf_c2) << 1) ^ ((((x) & gf_c1) >> 7) * BPOLY)) /* The following defines provide alternative definitions of gf_mulx that might give improved performance if a fast 32-bit multiply is not available. Note that a temporary variable u needs to be defined where gf_mulx is used. #define gf_mulx(x) (u = (x) & gf_c1, u |= (u >> 1), ((x) & gf_c2) << 1) ^ ((u >> 3) | (u >> 6)) #define gf_c4 (0x01010101 * BPOLY) #define gf_mulx(x) (u = (x) & gf_c1, ((x) & gf_c2) << 1) ^ ((u - (u >> 7)) & gf_c4) */ /* Work out which tables are needed for the different options */ #if defined( ASM_X86_V1C ) # if defined( ENC_ROUND ) # undef ENC_ROUND # endif # define ENC_ROUND FOUR_TABLES # if defined( LAST_ENC_ROUND ) # undef LAST_ENC_ROUND # endif # define LAST_ENC_ROUND FOUR_TABLES # if defined( DEC_ROUND ) # undef DEC_ROUND # endif # define DEC_ROUND FOUR_TABLES # if defined( LAST_DEC_ROUND ) # undef LAST_DEC_ROUND # endif # define LAST_DEC_ROUND FOUR_TABLES # if defined( KEY_SCHED ) # undef KEY_SCHED # define KEY_SCHED FOUR_TABLES # endif #endif #if ( FUNCS_IN_C & ENCRYPTION_IN_C ) || defined( ASM_X86_V1C ) # if ENC_ROUND == ONE_TABLE # define FT1_SET # elif ENC_ROUND == FOUR_TABLES # define FT4_SET # else # define SBX_SET # endif # if LAST_ENC_ROUND == ONE_TABLE # define FL1_SET # elif LAST_ENC_ROUND == FOUR_TABLES # define FL4_SET # elif !defined( SBX_SET ) # define SBX_SET # endif #endif #if ( FUNCS_IN_C & DECRYPTION_IN_C ) || defined( ASM_X86_V1C ) # if DEC_ROUND == ONE_TABLE # define IT1_SET # elif DEC_ROUND == FOUR_TABLES # define IT4_SET # else # define ISB_SET # endif # if LAST_DEC_ROUND == ONE_TABLE # define IL1_SET # elif LAST_DEC_ROUND == FOUR_TABLES # define IL4_SET # elif !defined(ISB_SET) # define ISB_SET # endif #endif #if !(defined( REDUCE_CODE_SIZE ) && (defined( ASM_X86_V2 ) || defined( ASM_X86_V2C ))) # if ((FUNCS_IN_C & ENC_KEYING_IN_C) || (FUNCS_IN_C & DEC_KEYING_IN_C)) # if KEY_SCHED == ONE_TABLE # if !defined( FL1_SET ) && !defined( FL4_SET ) # define LS1_SET # endif # elif KEY_SCHED == FOUR_TABLES # if !defined( FL4_SET ) # define LS4_SET # endif # elif !defined( SBX_SET ) # define SBX_SET # endif # endif # if (FUNCS_IN_C & DEC_KEYING_IN_C) # if KEY_SCHED == ONE_TABLE # define IM1_SET # elif KEY_SCHED == FOUR_TABLES # define IM4_SET # elif !defined( SBX_SET ) # define SBX_SET # endif # endif #endif /* generic definitions of Rijndael macros that use tables */ #define no_table(x,box,vf,rf,c) bytes2word( \ box[bval(vf(x,0,c),rf(0,c))], \ box[bval(vf(x,1,c),rf(1,c))], \ box[bval(vf(x,2,c),rf(2,c))], \ box[bval(vf(x,3,c),rf(3,c))]) #define one_table(x,op,tab,vf,rf,c) \ ( tab[bval(vf(x,0,c),rf(0,c))] \ ^ op(tab[bval(vf(x,1,c),rf(1,c))],1) \ ^ op(tab[bval(vf(x,2,c),rf(2,c))],2) \ ^ op(tab[bval(vf(x,3,c),rf(3,c))],3)) #define four_tables(x,tab,vf,rf,c) \ ( tab[0][bval(vf(x,0,c),rf(0,c))] \ ^ tab[1][bval(vf(x,1,c),rf(1,c))] \ ^ tab[2][bval(vf(x,2,c),rf(2,c))] \ ^ tab[3][bval(vf(x,3,c),rf(3,c))]) #define vf1(x,r,c) (x) #define rf1(r,c) (r) #define rf2(r,c) ((8+r-c)&3) /* perform forward and inverse column mix operation on four bytes in long word x in */ /* parallel. NOTE: x must be a simple variable, NOT an expression in these macros. */ #if !(defined( REDUCE_CODE_SIZE ) && (defined( ASM_X86_V2 ) || defined( ASM_X86_V2C ))) #if defined( FM4_SET ) /* not currently used */ # define fwd_mcol(x) four_tables(x,t_use(f,m),vf1,rf1,0) #elif defined( FM1_SET ) /* not currently used */ # define fwd_mcol(x) one_table(x,upr,t_use(f,m),vf1,rf1,0) #else # define dec_fmvars uint_32t g2 # define fwd_mcol(x) (g2 = gf_mulx(x), g2 ^ upr((x) ^ g2, 3) ^ upr((x), 2) ^ upr((x), 1)) #endif #if defined( IM4_SET ) # define inv_mcol(x) four_tables(x,t_use(i,m),vf1,rf1,0) #elif defined( IM1_SET ) # define inv_mcol(x) one_table(x,upr,t_use(i,m),vf1,rf1,0) #else # define dec_imvars uint_32t g2, g4, g9 # define inv_mcol(x) (g2 = gf_mulx(x), g4 = gf_mulx(g2), g9 = (x) ^ gf_mulx(g4), g4 ^= g9, \ (x) ^ g2 ^ g4 ^ upr(g2 ^ g9, 3) ^ upr(g4, 2) ^ upr(g9, 1)) #endif #if defined( FL4_SET ) # define ls_box(x,c) four_tables(x,t_use(f,l),vf1,rf2,c) #elif defined( LS4_SET ) # define ls_box(x,c) four_tables(x,t_use(l,s),vf1,rf2,c) #elif defined( FL1_SET ) # define ls_box(x,c) one_table(x,upr,t_use(f,l),vf1,rf2,c) #elif defined( LS1_SET ) # define ls_box(x,c) one_table(x,upr,t_use(l,s),vf1,rf2,c) #else # define ls_box(x,c) no_table(x,t_use(s,box),vf1,rf2,c) #endif #endif #if defined( ASM_X86_V1C ) && defined( AES_DECRYPT ) && !defined( ISB_SET ) # define ISB_SET #endif #endif
{ "pile_set_name": "Github" }
msgid "" msgstr "" "Project-Id-Version: VERSION\n" "POT-Creation-Date: 2017-07-10 19:51+0000\n" "PO-Revision-Date: 2017-07-10 19:51+0000\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE TEAM <EMAIL@ADDRESS>\n" "Language: sv\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: ../../../app/install/installer.php:1168 #: ../../../app/install/installer.php:1177 #: ../../../app/install/installer.php:1180 #: ../../../app/routes/route.account.php:414 #: ../../../app/routes/route.json.php:579 #: ../../../app/routes/route.json.php:1107 #: ../../../app/routes/route.page.php:80 #: ../../../app/routes/route.settings.php:185 #: ../../../app/routes/route.signup.php:97 #: ../../../content/pages/default/contact.php:28 msgid "Invalid email" msgstr "Felaktig e-postadress" #: ../../../app/install/installer.php:1171 #: ../../../app/routes/route.json.php:574 #: ../../../app/routes/route.settings.php:181 #: ../../../app/routes/route.signup.php:100 msgid "Invalid username" msgstr "Felaktigt användarnamn" #: ../../../app/install/installer.php:1174 #: ../../../app/routes/route.account.php:357 #: ../../../app/routes/route.json.php:584 #: ../../../app/routes/route.settings.php:323 #: ../../../app/routes/route.signup.php:103 msgid "Invalid password" msgstr "Felaktigt lösenord" #: ../../../app/install/installer.php:1183 #: ../../../app/routes/route.dashboard.php:667 msgid "Invalid website mode" msgstr "Okänt webbplatsläge" #: ../../../app/install/template/ready.php:31 #: ../../../app/themes/Peafowl/views/dashboard.php:1760 msgid "From email address" msgstr "Avsändarens email" #: ../../../app/install/template/ready.php:32 #: ../../../app/themes/Peafowl/views/dashboard.php:1763 msgid "Sender email for emails sent to users." msgstr "Avsändarens e-postadress som skickas till användare" #: ../../../app/install/template/ready.php:36 #: ../../../app/themes/Peafowl/views/dashboard.php:1766 msgid "Incoming email address" msgstr "Inkommande e-post" #: ../../../app/install/template/ready.php:37 #: ../../../app/themes/Peafowl/views/dashboard.php:1769 msgid "Recipient for contact form and system alerts." msgstr "Mottagare för kontaktformuläret samt systemmeddelanden" #: ../../../app/install/template/ready.php:44 #: ../../../app/themes/Peafowl/views/dashboard.php:327 msgid "Website mode" msgstr "Webbplatsläge" #: ../../../app/install/template/ready.php:45 #: ../../../app/themes/Peafowl/views/dashboard.php:334 msgid "You can switch the website mode anytime." msgstr "Du kan byta hemsidans läge närsomhelst." #: ../../../app/install/template/ready.php:47 #: ../../../app/themes/Peafowl/views/dashboard.php:330 msgid "Community" msgstr "Gemenskap" #: ../../../app/install/template/ready.php:47 #: ../../../app/themes/Peafowl/views/dashboard.php:330 msgid "Personal" msgstr "Personligt" #: ../../../app/install/update/template/update.php:2 msgid "Update in progress" msgstr "Uppdatering pågår" #: ../../../app/install/update/updater.php:62 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:22 #: ../../../app/lib/chevereto.js:1237 ../../../app/lib/chevereto.js:1313 #: ../../../app/lib/chevereto.js:1391 ../../../app/lib/chevereto.js:1539 #: ../../../app/lib/chevereto.js:1623 ../../../app/lib/chevereto.js:1668 #: ../../../app/lib/chevereto.min.js:59 ../../../app/lib/chevereto.min.js:63 #: ../../../app/lib/chevereto.min.js:67 ../../../app/lib/chevereto.min.js:70 #: ../../../app/lib/chevereto.min.js:74 ../../../app/lib/chevereto.min.js:77 #: ../../../lib/Peafowl/peafowl.js:2560 ../../../lib/Peafowl/peafowl.js:3096 #: ../../../lib/Peafowl/peafowl.min.js:158 #: ../../../lib/Peafowl/peafowl.min.js:195 msgid "An error occurred. Please try again later." msgstr "Något gick fel, vänligen prova igen senare." #: ../../../app/install/update/updater.php:72 #, php-format msgid "Missing %s file" msgstr "Saknad %s fil" #: ../../../app/install/update/updater.php:78 msgid "Invalid license info" msgstr "Ogiltig licensinformation" #: ../../../app/install/update/updater.php:84 msgid "Invalid license key" msgstr "Ogiltig licensnyckel" #: ../../../app/install/update/updater.php:87 msgid "Can't save file" msgstr "Kan inte spara fil" #: ../../../app/install/update/updater.php:100 #, php-format msgid "Can't download %s" msgstr "Kan inte ladda ned %s" #: ../../../app/install/update/updater.php:126 #, php-format msgid "Can't extract %s" msgstr "Kan inte extrahera %s" #, php-format msgid "Can't create %s directory - %e" msgstr "Kan inte skapa %s register - %e" #, php-format msgid "Can't update %s file - %e" msgstr "Kan inte uppdatera %s fil - %e" #: ../../../app/lib/classes/class.album.php:100 msgid "Untitled" msgstr "Namnlös" #: ../../../app/lib/classes/class.album.php:273 #: ../../../app/lib/classes/class.user.php:114 #, php-format msgid "%s's images" msgstr "%s's bilder" msgid "Note: This content is private but anyone with the link will be able to see this." msgstr "Notera: Detta innehåll är privat men kan ses av alla som har länken." msgid "Note: This content is password protected. Remember to pass the content password to share." msgstr "Notera: Detta innehåll är lösenordsskyddat. Kom ihåg att dela lösenordet med andra om du vill att de ska kunna se det." #: ../../../app/themes/Peafowl/snippets/modal_share.php:14 #: ../../../app/themes/Peafowl/views/album.php:74 #: ../../../app/themes/Peafowl/views/image.php:272 msgid "Note: This content is private. Change privacy to \"public\" to share." msgstr "Notera: Detta innehåll är privat, ändra sekretess till \"publikt\" för att dela." #: ../../../app/themes/Peafowl/views/dashboard.php:366 msgid "Private" msgstr "Privat" #: ../../../app/themes/Peafowl/snippets/form_album.php:20 #: ../../../app/themes/Peafowl/views/dashboard.php:366 msgid "Public" msgstr "Publikt" msgid "Me" msgstr "Jag" #: ../../../app/lib/classes/class.page.php:137 #: ../../../app/themes/Peafowl/snippets/modal_share.php:10 #: ../../../app/themes/Peafowl/views/dashboard.php:461 msgid "Link" msgstr "Länk" #: ../../../app/routes/route.settings.php:64 #: ../../../app/themes/Peafowl/header.php:292 #: ../../../app/themes/Peafowl/header.php:340 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:92 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:93 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:126 #: ../../../app/themes/Peafowl/snippets/modal_login.php:21 #: ../../../app/themes/Peafowl/views/dashboard.php:104 #: ../../../app/themes/Peafowl/views/dashboard.php:105 #: ../../../app/themes/Peafowl/views/login.php:39 #: ../../../app/themes/Peafowl/views/settings.php:322 #: ../../../app/themes/Peafowl/views/signup.php:49 #: ../../../app/themes/Peafowl/views/signup.php:50 msgid "Password" msgstr "Lösenord" #: ../../../app/lib/classes/class.image.php:1230 msgid "view" msgid_plural "views" msgstr[0] "visning" msgstr[1] "visningar" msgid "After %n %t" msgstr "Efter %n %t" #: ../../../app/lib/classes/class.image.php:348 msgid "Don't autodelete" msgstr "Radera inte automatiskt" #: ../../../app/lib/functions.php:42 ../../../app/lib/functions.php:54 msgid "minute" msgid_plural "minutes" msgstr[0] "minut" msgstr[1] "minuter" #: ../../../app/lib/functions.php:41 ../../../app/lib/functions.php:53 msgid "hour" msgid_plural "hours" msgstr[0] "timme" msgstr[1] "timmar" #: ../../../app/lib/functions.php:40 ../../../app/lib/functions.php:52 msgid "day" msgid_plural "days" msgstr[0] "dag" msgstr[1] "dagar" #: ../../../app/lib/classes/class.image.php:636 #: ../../../app/lib/classes/class.image.php:742 msgid "Duplicated upload" msgstr "Duplicerad uppladdning" msgid "Error storing file in external storage server" msgstr "Fel vid lagring av fil i extern lagringsserver" msgid "External storage has failed" msgstr "Extern lagring misslyckad" #: ../../../app/lib/classes/class.image.php:955 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:76 msgid "Private upload" msgstr "Privat uppladdning" msgid "Upload switched to local storage" msgstr "Uppladdning flyttad till lokalt lagringsutrymme" #: ../../../app/lib/classes/class.image.php:1231 msgid "like" msgid_plural "likes" msgstr[0] "Gilla" msgstr[1] "gillar" #: ../../../app/lib/classes/class.listing.php:296 #: ../../../app/routes/route.album.php:177 #: ../../../app/themes/Peafowl/snippets/breadcrum_owner_card.php:25 #: ../../../app/themes/Peafowl/views/album.php:34 #: ../../../app/themes/Peafowl/views/user.php:98 #: ../../../app/lib/chevereto.js:2412 ../../../app/lib/chevereto.min.js:126 msgid "image" msgid_plural "images" msgstr[0] "bild" msgstr[1] "bilder" msgid "Recent" msgstr "Nyliga" msgid "Trending" msgstr "Trendar" msgid "Popular" msgstr "Populärt" #: ../../../app/routes/route.dashboard.php:1163 msgid "Top users" msgstr "Aktivaste användarna" #: ../../../app/routes/route.album.php:80 #: ../../../app/routes/route.category.php:48 #: ../../../app/routes/route.dashboard.php:1105 #: ../../../app/routes/route.dashboard.php:1142 #: ../../../app/routes/route.dashboard.php:1171 #: ../../../app/routes/route.explore.php:34 #: ../../../app/routes/route.following.php:21 #: ../../../app/routes/route.user.php:187 #: ../../../app/routes/route.user.php:232 #: ../../../app/routes/route.user.php:255 #: ../../../app/themes/Peafowl/views/index.php:46 msgid "Most recent" msgstr "Nyast" #: ../../../app/routes/route.dashboard.php:1113 #: ../../../app/routes/route.dashboard.php:1150 #: ../../../app/routes/route.dashboard.php:1179 #: ../../../app/routes/route.user.php:238 #: ../../../app/routes/route.user.php:261 msgid "Oldest" msgstr "Äldst" #: ../../../app/routes/route.album.php:96 #: ../../../app/routes/route.category.php:64 #: ../../../app/routes/route.dashboard.php:1121 #: ../../../app/routes/route.explore.php:50 #: ../../../app/routes/route.following.php:29 #: ../../../app/routes/route.user.php:201 msgid "Most viewed" msgstr "Flest visningar" #: ../../../app/routes/route.album.php:104 #: ../../../app/routes/route.category.php:72 #: ../../../app/routes/route.dashboard.php:1129 #: ../../../app/routes/route.explore.php:58 #: ../../../app/routes/route.following.php:37 #: ../../../app/routes/route.user.php:207 msgid "Most liked" msgstr "Mest gillad" #: ../../../app/routes/route.explore.php:89 #: ../../../app/themes/Peafowl/header.php:188 #: ../../../app/themes/Peafowl/header.php:206 #: ../../../app/themes/Peafowl/views/dashboard.php:305 #: ../../../app/themes/Peafowl/views/explore.php:9 msgid "Explore" msgstr "Bläddra" msgid "Animated" msgstr "GIFar" #: ../../../app/routes/route.search.php:130 #: ../../../app/themes/Peafowl/header.php:215 #: ../../../app/themes/Peafowl/header.php:220 #: ../../../app/themes/Peafowl/views/dashboard.php:295 msgid "Search" msgstr "Sök" msgid "People" msgstr "Gillar" #: ../../../app/themes/Peafowl/views/dashboard.php:22 msgid "Image" msgid_plural "Images" msgstr[0] "Bild" msgstr[1] "Bilder" #: ../../../app/themes/Peafowl/snippets/form_move_existing_album.php:3 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:8 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:9 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:16 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:17 #: ../../../app/themes/Peafowl/views/dashboard.php:28 msgid "Album" msgid_plural "Albums" msgstr[0] "Album" msgstr[1] "Album" #: ../../../app/themes/Peafowl/views/dashboard.php:34 #: ../../../app/themes/Peafowl/views/dashboard.php:90 #: ../../../app/themes/Peafowl/views/settings.php:126 msgid "User" msgid_plural "Users" msgstr[0] "Användare" msgstr[1] "Användare" #: ../../../app/lib/functions.php:37 ../../../app/lib/functions.php:49 msgid "year" msgid_plural "years" msgstr[0] "år" msgstr[1] "år" #: ../../../app/lib/functions.php:38 ../../../app/lib/functions.php:50 msgid "month" msgid_plural "months" msgstr[0] "månad" msgstr[1] "månader" #: ../../../app/lib/functions.php:39 ../../../app/lib/functions.php:51 msgid "week" msgid_plural "weeks" msgstr[0] "vecka" msgstr[1] "veckor" #: ../../../app/lib/functions.php:43 ../../../app/lib/functions.php:55 msgid "second" msgid_plural "seconds" msgstr[0] "sekund" msgstr[1] "sekunder" #: ../../../app/lib/functions.php:67 #, php-format msgid "%s ago" msgstr "%s sedan" #: ../../../app/lib/functions.php:67 msgid "moments ago" msgstr "alldeles nyss" #: ../../../app/routes/route.dashboard.php:1223 #: ../../../app/themes/Peafowl/header.php:407 #: ../../../app/themes/Peafowl/views/dashboard.php:9 msgid "Dashboard" msgstr "Kontrollpanel" #: ../../../app/lib/functions.php:221 #, php-format msgid "Website is in maintenance mode. To revert this setting go to <a href=\"%s\">Dashboard > Settings</a>." msgstr "Hemsidan är i underhållsläge. För att ångra denna inställning, gå till <a href=\"%s\">Instrumentpanel > Inställningar</a>." #: ../../../app/loader.php:279 #: ../../../app/themes/Peafowl/views/settings.php:441 msgid "Feel free to browse and discover all my shared images and albums." msgstr "Välkommen att se och upptäcka alla mina delade bilder och album." #: ../../../app/loader.php:396 ../../../app/themes/Peafowl/views/404.php:6 msgid "That page doesn't exist" msgstr "Sidan existerar inte" #: ../../../app/routes/route.account.php:72 #: ../../../app/themes/Peafowl/header.php:295 #: ../../../app/themes/Peafowl/snippets/modal_login.php:24 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:8 #: ../../../app/themes/Peafowl/views/login.php:41 #: ../../../app/themes/Peafowl/views/settings.php:299 msgid "Forgot password?" msgstr "Glömt lösenord?" #: ../../../app/routes/route.account.php:73 #: ../../../app/themes/Peafowl/views/account/password-reset.php:8 msgid "Reset password" msgstr "Återställ lösenord" #: ../../../app/routes/route.account.php:74 #: ../../../app/themes/Peafowl/views/account/resend-activation.php:8 msgid "Resend account activation" msgstr "Skicka aktiveringsmeddelande igen" #: ../../../app/routes/route.account.php:76 #: ../../../app/themes/Peafowl/views/account/email-needed.php:8 msgid "Add your email address" msgstr "Lägg till din e-postadress" #: ../../../app/routes/route.account.php:77 #: ../../../app/themes/Peafowl/views/account/email-changed.php:7 msgid "Email changed" msgstr "E-postadress ändrad" #: ../../../app/routes/route.account.php:95 #: ../../../app/routes/route.login.php:71 #: ../../../app/routes/route.settings.php:140 #: ../../../app/routes/route.signup.php:73 msgid "The reCAPTCHA wasn't entered correctly" msgstr "Felaktig reCAPTCHA" #: ../../../app/routes/route.account.php:119 #: ../../../app/routes/route.account.php:164 #: ../../../app/routes/route.account.php:271 msgid "Invalid Username/Email" msgstr "Ogiltigt användarnamn/e-postadress" #: ../../../app/routes/route.account.php:129 msgid "User doesn't have an email." msgstr "Användaren har ingen e-postadress." #: ../../../app/routes/route.account.php:140 #: ../../../app/routes/route.account.php:299 #: ../../../app/routes/route.account.php:321 #: ../../../app/routes/route.account.php:388 #: ../../../app/routes/route.json.php:24 ../../../app/routes/route.json.php:37 #: ../../../app/routes/route.json.php:49 ../../../app/routes/route.json.php:561 #: ../../../app/routes/route.json.php:623 #: ../../../app/routes/route.json.php:672 #: ../../../app/routes/route.json.php:719 ../../../app/routes/route.page.php:66 #: ../../../app/themes/Peafowl/views/request-denied.php:8 #: ../../../content/pages/default/contact.php:14 msgid "Request denied" msgstr "Begäran nekad" #: ../../../app/routes/route.account.php:145 msgid "Account needs to be activated to use this feature" msgstr "Kontot måste vara aktiverat för att göra detta" #: ../../../app/routes/route.account.php:151 msgid "Account already activated" msgstr "Kontot är redan aktiverat" #: ../../../app/routes/route.account.php:192 msgid "Allow up to 15 minutes for the email. You can try again later." msgstr "Det kan ta upp till 15 minuter för e-postmeddelandet att skickas." #: ../../../app/routes/route.account.php:231 #, php-format msgid "Reset your password at %s" msgstr "Återställ ditt lösenord på %s" #: ../../../app/routes/route.account.php:233 #: ../../../app/routes/route.account.php:454 #: ../../../app/routes/route.settings.php:283 #: ../../../app/routes/route.signup.php:193 #, php-format msgid "Confirmation required at %s" msgstr "Bekräftelse krävs på %s" #: ../../../app/routes/route.account.php:342 #: ../../../app/routes/route.signup.php:216 #, php-format msgid "Welcome to %s" msgstr "Välkommen till %s" #: ../../../app/routes/route.account.php:360 #: ../../../app/routes/route.settings.php:327 #: ../../../app/themes/Peafowl/views/account/password-reset.php:36 #: ../../../app/themes/Peafowl/views/settings.php:313 #: ../../../app/themes/Peafowl/views/settings.php:330 #: ../../../app/lib/chevereto.js:1516 ../../../app/lib/chevereto.min.js:69 msgid "Passwords don't match" msgstr "Lösenorden matchar inte" #: ../../../app/routes/route.account.php:422 #: ../../../app/routes/route.json.php:599 #: ../../../app/routes/route.settings.php:243 #: ../../../app/routes/route.signup.php:141 msgid "Email already being used" msgstr "Denna e-post används redan av en annan användare." #: ../../../app/routes/route.account.php:508 #: ../../../app/routes/route.signup.php:236 #: ../../../content/pages/default/contact.php:132 #: ../../../app/lib/chevereto.js:283 ../../../app/lib/chevereto.min.js:16 #: ../../../lib/Peafowl/peafowl.js:196 ../../../lib/Peafowl/peafowl.min.js:10 msgid "Check the errors in the form to continue." msgstr "Kontrollera felen innan du går vidare." #: ../../../app/routes/route.album.php:115 #: ../../../app/themes/Peafowl/snippets/modal_share.php:4 #: ../../../app/themes/Peafowl/views/album.php:36 #: ../../../app/themes/Peafowl/views/image.php:89 msgid "Share" msgstr "Dela" #: ../../../app/routes/route.image.php:127 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:99 #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:110 msgid "Embed codes" msgstr "Inbäddningskoder" #: ../../../app/routes/route.album.php:124 #: ../../../app/routes/route.image.php:134 msgid "Full info" msgstr "Full info" #: ../../../app/routes/route.dashboard.php:38 msgid "Stats" msgstr "Statistik" #: ../../../app/routes/route.dashboard.php:40 #: ../../../app/routes/route.search.php:92 #: ../../../app/routes/route.user.php:90 ../../../app/routes/route.user.php:283 #: ../../../app/themes/Peafowl/header.php:403 #: ../../../app/themes/Peafowl/views/settings.php:77 msgid "Albums" msgstr "Album" #: ../../../app/routes/route.dashboard.php:41 #: ../../../app/routes/route.dashboard.php:233 #: ../../../app/routes/route.search.php:99 msgid "Users" msgstr "Användare" #: ../../../app/routes/route.dashboard.php:42 #: ../../../app/routes/route.settings.php:498 #: ../../../app/themes/Peafowl/header.php:363 #: ../../../app/themes/Peafowl/header.php:405 msgid "Settings" msgstr "Inställningar" #: ../../../app/routes/route.dashboard.php:161 msgid "Chevereto version" msgstr "Chevereto version" #: ../../../app/routes/route.dashboard.php:169 msgid "PHP version" msgstr "PHP version" #: ../../../app/routes/route.dashboard.php:173 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:114 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:115 msgid "Server" msgstr "Server" #: ../../../app/routes/route.dashboard.php:177 msgid "MySQL version" msgstr "MySQL version" #: ../../../app/routes/route.dashboard.php:181 msgid "MySQL server info" msgstr "MySQL server info" #: ../../../app/routes/route.dashboard.php:185 msgid "GD Library" msgstr "GD Bibliotek" #: ../../../app/routes/route.dashboard.php:189 msgid "File uploads" msgstr "Filuppladdningar" #: ../../../app/routes/route.dashboard.php:190 #: ../../../app/themes/Peafowl/views/dashboard.php:298 #: ../../../app/themes/Peafowl/views/dashboard.php:308 #: ../../../app/themes/Peafowl/views/dashboard.php:318 #: ../../../app/themes/Peafowl/views/dashboard.php:633 #: ../../../app/themes/Peafowl/views/dashboard.php:642 #: ../../../app/themes/Peafowl/views/dashboard.php:652 #: ../../../app/themes/Peafowl/views/dashboard.php:678 #: ../../../app/themes/Peafowl/views/dashboard.php:750 #: ../../../app/themes/Peafowl/views/dashboard.php:962 #: ../../../app/themes/Peafowl/views/dashboard.php:975 #: ../../../app/themes/Peafowl/views/dashboard.php:986 #: ../../../app/themes/Peafowl/views/dashboard.php:995 #: ../../../app/themes/Peafowl/views/dashboard.php:1024 #: ../../../app/themes/Peafowl/views/dashboard.php:1034 #: ../../../app/themes/Peafowl/views/dashboard.php:1073 #: ../../../app/themes/Peafowl/views/dashboard.php:1082 #: ../../../app/themes/Peafowl/views/dashboard.php:1091 #: ../../../app/themes/Peafowl/views/dashboard.php:1101 #: ../../../app/themes/Peafowl/views/dashboard.php:1247 #: ../../../app/themes/Peafowl/views/dashboard.php:1302 #: ../../../app/themes/Peafowl/views/dashboard.php:1312 #: ../../../app/themes/Peafowl/views/dashboard.php:1324 #: ../../../app/themes/Peafowl/views/dashboard.php:1336 #: ../../../app/themes/Peafowl/views/dashboard.php:1346 #: ../../../app/themes/Peafowl/views/dashboard.php:1356 #: ../../../app/themes/Peafowl/views/dashboard.php:1368 #: ../../../app/themes/Peafowl/views/dashboard.php:1475 #: ../../../app/themes/Peafowl/views/dashboard.php:1573 #: ../../../app/themes/Peafowl/views/dashboard.php:1582 #: ../../../app/themes/Peafowl/views/dashboard.php:1592 #: ../../../app/themes/Peafowl/views/dashboard.php:1627 #: ../../../app/themes/Peafowl/views/dashboard.php:1637 #: ../../../app/themes/Peafowl/views/dashboard.php:1835 #: ../../../app/themes/Peafowl/views/dashboard.php:1861 #: ../../../app/themes/Peafowl/views/dashboard.php:1894 #: ../../../app/themes/Peafowl/views/dashboard.php:1920 #: ../../../app/themes/Peafowl/views/dashboard.php:1946 #: ../../../app/themes/Peafowl/views/dashboard.php:1965 #: ../../../app/themes/Peafowl/views/dashboard.php:2010 #: ../../../app/themes/Peafowl/views/dashboard.php:2031 msgid "Enabled" msgstr "Aktiverat" #: ../../../app/routes/route.dashboard.php:190 #: ../../../app/themes/Peafowl/views/dashboard.php:298 #: ../../../app/themes/Peafowl/views/dashboard.php:308 #: ../../../app/themes/Peafowl/views/dashboard.php:318 #: ../../../app/themes/Peafowl/views/dashboard.php:633 #: ../../../app/themes/Peafowl/views/dashboard.php:642 #: ../../../app/themes/Peafowl/views/dashboard.php:652 #: ../../../app/themes/Peafowl/views/dashboard.php:679 #: ../../../app/themes/Peafowl/views/dashboard.php:750 #: ../../../app/themes/Peafowl/views/dashboard.php:962 #: ../../../app/themes/Peafowl/views/dashboard.php:975 #: ../../../app/themes/Peafowl/views/dashboard.php:986 #: ../../../app/themes/Peafowl/views/dashboard.php:995 #: ../../../app/themes/Peafowl/views/dashboard.php:1024 #: ../../../app/themes/Peafowl/views/dashboard.php:1034 #: ../../../app/themes/Peafowl/views/dashboard.php:1073 #: ../../../app/themes/Peafowl/views/dashboard.php:1082 #: ../../../app/themes/Peafowl/views/dashboard.php:1091 #: ../../../app/themes/Peafowl/views/dashboard.php:1101 #: ../../../app/themes/Peafowl/views/dashboard.php:1247 #: ../../../app/themes/Peafowl/views/dashboard.php:1302 #: ../../../app/themes/Peafowl/views/dashboard.php:1312 #: ../../../app/themes/Peafowl/views/dashboard.php:1324 #: ../../../app/themes/Peafowl/views/dashboard.php:1336 #: ../../../app/themes/Peafowl/views/dashboard.php:1346 #: ../../../app/themes/Peafowl/views/dashboard.php:1356 #: ../../../app/themes/Peafowl/views/dashboard.php:1368 #: ../../../app/themes/Peafowl/views/dashboard.php:1475 #: ../../../app/themes/Peafowl/views/dashboard.php:1573 #: ../../../app/themes/Peafowl/views/dashboard.php:1582 #: ../../../app/themes/Peafowl/views/dashboard.php:1592 #: ../../../app/themes/Peafowl/views/dashboard.php:1627 #: ../../../app/themes/Peafowl/views/dashboard.php:1637 #: ../../../app/themes/Peafowl/views/dashboard.php:1835 #: ../../../app/themes/Peafowl/views/dashboard.php:1861 #: ../../../app/themes/Peafowl/views/dashboard.php:1894 #: ../../../app/themes/Peafowl/views/dashboard.php:1920 #: ../../../app/themes/Peafowl/views/dashboard.php:1946 #: ../../../app/themes/Peafowl/views/dashboard.php:1965 #: ../../../app/themes/Peafowl/views/dashboard.php:2010 #: ../../../app/themes/Peafowl/views/dashboard.php:2031 msgid "Disabled" msgstr "Inaktiverat" #: ../../../app/routes/route.dashboard.php:197 msgid "Max. post size" msgstr "Max. poststorlek" #: ../../../app/routes/route.dashboard.php:201 msgid "Max. execution time" msgstr "Max. execution time" #: ../../../app/routes/route.dashboard.php:202 #, php-format msgid "%d second" msgid_plural "%d seconds" msgstr[0] "%d sekund" msgstr[1] "%d sekunder" #: ../../../app/routes/route.dashboard.php:205 msgid "Memory limit" msgstr "Minnesgräns" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:6 msgid "Links" msgstr "Länkar" #: ../../../app/routes/route.dashboard.php:227 #: ../../../app/themes/Peafowl/views/settings.php:370 msgid "Website" msgstr "Hemsida" #: ../../../app/routes/route.dashboard.php:228 msgid "Content" msgstr "Innehåll" #: ../../../app/routes/route.dashboard.php:231 msgid "Image upload" msgstr "Bilduppladdning" #: ../../../app/routes/route.dashboard.php:232 msgid "Categories" msgstr "Kategorier" #: ../../../app/routes/route.dashboard.php:234 #: ../../../app/themes/Peafowl/views/dashboard.php:1021 msgid "Flood protection" msgstr "Antiflood" #: ../../../app/routes/route.dashboard.php:235 #: ../../../app/themes/Peafowl/views/dashboard.php:1169 msgid "Theme" msgstr "Tema" #: ../../../app/routes/route.dashboard.php:236 #: ../../../app/routes/route.dashboard.php:373 #: ../../../app/routes/route.settings.php:66 msgid "Homepage" msgstr "Hemsida" #: ../../../app/routes/route.dashboard.php:237 msgid "Banners" msgstr "Banners" #: ../../../app/routes/route.dashboard.php:238 msgid "System" msgstr "System" #: ../../../app/routes/route.dashboard.php:241 #: ../../../app/themes/Peafowl/views/dashboard.php:99 msgid "Email" msgstr "E-post" #: ../../../app/routes/route.dashboard.php:242 #: ../../../app/themes/Peafowl/views/album.php:79 msgid "Social networks" msgstr "Sociala nätverk" #: ../../../app/routes/route.dashboard.php:243 msgid "External services" msgstr "Externa tjänster" #: ../../../app/routes/route.dashboard.php:287 #: ../../../app/themes/Peafowl/header.php:178 #: ../../../app/themes/Peafowl/snippets/form_advanced_search.php:37 #: ../../../app/themes/Peafowl/snippets/form_advanced_search.php:62 msgid "All" msgstr "Alla" #: ../../../app/routes/route.dashboard.php:292 #: ../../../app/routes/route.image.php:149 #: ../../../app/themes/Peafowl/views/dashboard.php:1710 msgid "search content" msgstr "Sök innehåll" #: ../../../app/routes/route.dashboard.php:404 msgid "Before comments" msgstr "Före kommentarer" #: ../../../app/routes/route.dashboard.php:409 msgid "Image page" msgstr "Bild sida" #: ../../../app/routes/route.dashboard.php:434 msgid "Album page" msgstr "Album sida" #: ../../../app/routes/route.dashboard.php:445 msgid "User profile page" msgstr "Användarprofil sida" #: ../../../app/routes/route.dashboard.php:557 msgid "Invalid website name" msgstr "Ogiltigt namn på hemsidan" #: ../../../app/routes/route.dashboard.php:562 msgid "Invalid language" msgstr "Ogiltigt språk" #: ../../../app/routes/route.dashboard.php:567 msgid "Invalid timezone" msgstr "Ogiltig tidszon" #: ../../../app/routes/route.dashboard.php:577 msgid "Invalid upload storage mode" msgstr "Ogiltig uppladdning till lagringsläge" #: ../../../app/routes/route.dashboard.php:582 msgid "Invalid upload filenaming" msgstr "Ogiltig uppladdning filnamn" #: ../../../app/routes/route.dashboard.php:587 msgid "Invalid thumb width" msgstr "Ogiltig bredd på miniatyrbild" #: ../../../app/routes/route.dashboard.php:592 msgid "Invalid thumb height" msgstr "Ogiltig tumnagelhöjd" #: ../../../app/routes/route.dashboard.php:612 msgid "Invalid theme" msgstr "Ogiltigt tema" #: ../../../app/routes/route.dashboard.php:572 #: ../../../app/routes/route.dashboard.php:617 #: ../../../app/routes/route.dashboard.php:794 #: ../../../app/routes/route.dashboard.php:940 msgid "Invalid value" msgstr "Ogiltigt värde" #: ../../../app/routes/route.dashboard.php:647 msgid "Invalid user id" msgstr "Okänd användar ID" #: ../../../app/routes/route.dashboard.php:652 msgid "Invalid email mode" msgstr "Invalid email mode" #: ../../../app/routes/route.dashboard.php:657 msgid "Invalid SMTP port" msgstr "Felaktig SMTP port" #: ../../../app/routes/route.dashboard.php:662 msgid "Invalid SMTP security" msgstr "Fel SMTP-säkerhet" #: ../../../app/routes/route.dashboard.php:687 msgid "Invalid website content privacy mode" msgstr "Ogiltig webbplatsinnehåll privat läge" #: ../../../app/routes/route.dashboard.php:769 msgid "Invalid upload image path" msgstr "Ogiltlig sökväg för bilduppladdning" #: ../../../app/routes/route.dashboard.php:797 #, php-format msgid "Max. allowed %s" msgstr "Max tillåtna %s" #: ../../../app/routes/route.dashboard.php:860 msgid "Invalid SMTP server" msgstr "Felaktig SMTP server" #: ../../../app/routes/route.dashboard.php:861 msgid "Invalid SMTP username" msgstr "Felaktigt SMTP användarnamn" #: ../../../app/routes/route.image.php:120 #: ../../../app/themes/Peafowl/header.php:424 msgid "About" msgstr "Om" #: ../../../app/routes/route.image.php:144 msgid "Image ID" msgstr "Bild ID" #: ../../../app/routes/route.image.php:148 msgid "Uploader IP" msgstr "Uppladdarens IP" #: ../../../app/routes/route.image.php:152 msgid "Upload date" msgstr "Uppladdad datum" #: ../../../app/routes/route.image.php:177 #, php-format msgid "%s images" msgstr "%s bilder" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:14 msgid "Direct links" msgstr "Direktlänkar" #: ../../../app/themes/Peafowl/views/image.php:279 msgid "Image URL" msgstr "Direktlänk" #: ../../../app/themes/Peafowl/views/image.php:285 msgid "Image link" msgstr "Bildlänk" #: ../../../app/themes/Peafowl/views/image.php:291 msgid "Thumbnail URL" msgstr "Liten miniatyrbild" #: ../../../app/themes/Peafowl/views/image.php:300 msgid "Medium URL" msgstr "Medelstor miniatyrbild" #: ../../../app/routes/route.json.php:44 ../../../app/routes/route.json.php:59 #: ../../../app/routes/route.json.php:260 #: ../../../app/routes/route.json.php:746 #: ../../../app/routes/route.json.php:810 #: ../../../app/routes/route.json.php:911 #: ../../../app/routes/route.json.php:1055 #: ../../../app/themes/Peafowl/snippets/modal_login.php:4 msgid "Login needed" msgstr "Inloggning krävs" #: ../../../app/routes/route.json.php:568 #: ../../../app/routes/route.json.php:630 msgid "Missing values" msgstr "Värden saknas" #: ../../../app/routes/route.json.php:589 msgid "Invalid role" msgstr "Ogitlig roll" #: ../../../app/routes/route.json.php:594 msgid "Username already being used" msgstr "Användarnamn används redan" #: ../../../app/routes/route.json.php:1092 #, php-format msgid "%s has been disconnected." msgstr "%s har " #: ../../../app/routes/route.login.php:133 msgid "Wrong Username/Email password combination" msgstr "Felaktigt användarnamn/lösenord" #: ../../../app/routes/route.login.php:148 #: ../../../app/themes/Peafowl/header.php:269 #: ../../../app/themes/Peafowl/header.php:275 #: ../../../app/themes/Peafowl/views/login.php:8 #: ../../../app/themes/Peafowl/views/login.php:52 msgid "Sign in" msgstr "Logga in" #: ../../../app/routes/route.logout.php:29 #: ../../../app/themes/Peafowl/views/logout.php:8 msgid "Logged out" msgstr "Utloggad" #: ../../../app/routes/route.page.php:61 #: ../../../content/pages/default/contact.php:7 msgid "General questions/comments" msgstr "General questions/comments" #: ../../../app/routes/route.page.php:62 #: ../../../content/pages/default/contact.php:8 msgid "DMCA complaint" msgstr "DMCA" #: ../../../app/routes/route.page.php:71 #: ../../../app/routes/route.settings.php:302 #: ../../../content/pages/default/contact.php:19 msgid "Invalid name" msgstr "Ogiltigt namn" #: ../../../app/routes/route.page.php:74 #: ../../../content/pages/default/contact.php:22 msgid "Invalid message" msgstr "Ogiltigt meddelande" #: ../../../app/routes/route.page.php:77 #: ../../../content/pages/default/contact.php:25 msgid "Invalid subject" msgstr "Ogiltigt ämne" #: ../../../app/routes/route.page.php:85 #: ../../../content/pages/default/contact.php:33 msgid "Invalid reCAPTCHA" msgstr "Ogiltig reCAPTCHA" #: ../../../app/routes/route.page.php:122 #: ../../../content/pages/default/contact.php:69 msgid "Mail error" msgstr "E-postfel" #: ../../../app/routes/route.settings.php:62 msgid "Account" msgstr "Konto" #: ../../../app/routes/route.settings.php:63 msgid "Profile" msgstr "Profil" #: ../../../app/routes/route.settings.php:65 msgid "Linked accounts" msgstr "Länkade konton" #: ../../../app/routes/route.settings.php:269 #, php-format msgid "An email has been sent to %s with instructions to activate this email" msgstr "Ett email har skickats till %s med instruktioner." #: ../../../app/routes/route.settings.php:305 msgid "Invalid website" msgstr "Ogiltig hemsida" #: ../../../app/routes/route.settings.php:313 msgid "Wrong password" msgstr "Felaktigt lösenord" #: ../../../app/routes/route.settings.php:316 msgid "Use a new password" msgstr "Använd ett nytt lösenord" #: ../../../app/routes/route.settings.php:416 #: ../../../app/themes/Peafowl/views/dashboard.php:2067 #: ../../../app/themes/Peafowl/views/settings.php:477 msgid "Changes have been saved." msgstr "Ändringarna har sparats." #: ../../../app/routes/route.settings.php:435 msgid "Password has been changed" msgstr "Lösenordet har ändrats" #: ../../../app/routes/route.settings.php:440 msgid "Password has been created." msgstr "Lösenordet har skapats" #: ../../../app/routes/route.settings.php:455 msgid "Wrong Username/Email values" msgstr "Felaktigt användarnamn/e-post" #: ../../../app/routes/route.settings.php:498 #, php-format msgid "Settings for %s" msgstr "Inställningar för %s" #: ../../../app/routes/route.signup.php:251 #: ../../../app/themes/Peafowl/header.php:316 #: ../../../app/themes/Peafowl/header.php:322 #: ../../../app/themes/Peafowl/views/index.php:81 #: ../../../app/themes/Peafowl/views/signup.php:8 #: ../../../app/themes/Peafowl/views/signup.php:63 msgid "Create account" msgstr "Skapa konto" #: ../../../app/routes/route.user.php:84 #: ../../../app/themes/Peafowl/header.php:56 #: ../../../app/themes/Peafowl/views/index.php:46 #, php-format msgid "%s's Images" msgstr "%s's Bilder" #: ../../../app/routes/route.user.php:89 #: ../../../app/themes/Peafowl/header.php:56 #, php-format, javascript-format msgid "%s's Albums" msgstr "%s's Album" #: ../../../app/routes/route.user.php:99 #: ../../../app/themes/Peafowl/views/search.php:8 msgid "Results for" msgstr "Resultat för" #: ../../../app/themes/Peafowl/header.php:233 #: ../../../app/themes/Peafowl/views/dashboard.php:315 #: ../../../app/themes/Peafowl/views/dashboard.php:713 msgid "Random" msgstr "Slumpvald" #: ../../../app/themes/Peafowl/header.php:258 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:76 msgid "Upload" msgstr "Ladda upp" #: ../../../app/themes/Peafowl/header.php:281 #: ../../../app/themes/Peafowl/snippets/modal_login.php:11 #: ../../../app/themes/Peafowl/snippets/modal_login.php:40 #: ../../../app/themes/Peafowl/views/login.php:18 #: ../../../app/themes/Peafowl/views/login.php:65 #: ../../../app/themes/Peafowl/views/signup.php:18 #: ../../../app/themes/Peafowl/views/signup.php:76 msgid "Sign in with another account" msgstr "Logga in med ett annat konto" #: ../../../app/themes/Peafowl/header.php:285 #: ../../../app/themes/Peafowl/header.php:332 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:76 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:80 #: ../../../app/themes/Peafowl/snippets/form_album.php:9 #: ../../../app/themes/Peafowl/snippets/form_move_existing_album.php:15 #: ../../../app/themes/Peafowl/snippets/modal_login.php:13 #: ../../../app/themes/Peafowl/snippets/modal_login.php:38 #: ../../../app/themes/Peafowl/views/account/awaiting-confirmation.php:10 #: ../../../app/themes/Peafowl/views/account/email-changed.php:11 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:16 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:26 #: ../../../app/themes/Peafowl/views/account/password-reset.php:16 #: ../../../app/themes/Peafowl/views/account/resend-activation.php:13 #: ../../../app/themes/Peafowl/views/dashboard.php:2044 #: ../../../app/themes/Peafowl/views/login.php:22 #: ../../../app/themes/Peafowl/views/login.php:62 #: ../../../app/themes/Peafowl/views/settings.php:354 #: ../../../app/themes/Peafowl/views/settings.php:463 #: ../../../app/themes/Peafowl/views/signup.php:22 #: ../../../app/themes/Peafowl/views/signup.php:73 #: ../../../content/pages/default/contact.php:123 #: ../../../app/lib/chevereto.js:1548 ../../../app/lib/chevereto.min.js:71 #: ../../../lib/Peafowl/peafowl.js:492 ../../../lib/Peafowl/peafowl.js:2325 #: ../../../lib/Peafowl/peafowl.min.js:31 #: ../../../lib/Peafowl/peafowl.min.js:140 msgid "or" msgstr "eller" #: ../../../app/themes/Peafowl/header.php:291 #: ../../../app/themes/Peafowl/snippets/modal_login.php:20 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:38 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:39 #: ../../../app/themes/Peafowl/views/account/resend-activation.php:23 #: ../../../app/themes/Peafowl/views/login.php:34 #: ../../../app/themes/Peafowl/views/login.php:35 msgid "Username or Email address" msgstr "Användarnamn eller e-postadress" #: ../../../app/themes/Peafowl/header.php:294 #: ../../../app/themes/Peafowl/snippets/modal_login.php:23 #: ../../../app/themes/Peafowl/views/login.php:53 msgid "Keep me logged in" msgstr "Kom ihåg mig" #: ../../../app/themes/Peafowl/header.php:301 #, php-format msgid "Don't have an account? <a href='%s'>Sign up</a> now." msgstr "Har du inget konto? <a href='%s'>Skaffa ett</a> nu." #: ../../../app/themes/Peafowl/header.php:328 msgid "Sign up with another account" msgstr "Registrera med ett annat konto" #: ../../../app/themes/Peafowl/header.php:338 #: ../../../app/themes/Peafowl/views/account/email-needed.php:15 #: ../../../app/themes/Peafowl/views/dashboard.php:100 #: ../../../app/themes/Peafowl/views/settings.php:155 #: ../../../app/themes/Peafowl/views/signup.php:34 #: ../../../app/themes/Peafowl/views/signup.php:35 #: ../../../content/pages/default/contact.php:92 msgid "Email address" msgstr "E-postadress" #: ../../../app/themes/Peafowl/header.php:339 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:88 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:89 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:122 #: ../../../app/themes/Peafowl/views/dashboard.php:94 #: ../../../app/themes/Peafowl/views/dashboard.php:95 #: ../../../app/themes/Peafowl/views/settings.php:143 #: ../../../app/themes/Peafowl/views/settings.php:144 #: ../../../app/themes/Peafowl/views/signup.php:39 #: ../../../app/themes/Peafowl/views/signup.php:40 msgid "Username" msgstr "Användarnamn" #: ../../../app/themes/Peafowl/header.php:341 #: ../../../app/themes/Peafowl/views/signup.php:65 #, php-format msgid "By signing up you agree to our <a href=\"%s\">Terms of service</a>" msgstr "Genom att registrera dig accepterar du våra <a href=\"%s\">villkor</a>" #: ../../../app/themes/Peafowl/header.php:381 #: ../../../app/themes/Peafowl/views/settings.php:348 #: ../../../lib/Peafowl/peafowl.js:3520 ../../../lib/Peafowl/peafowl.min.js:234 msgid "loading" msgstr "laddar" #: ../../../app/themes/Peafowl/header.php:402 msgid "My Profile" msgstr "Min profil" #: ../../../app/themes/Peafowl/header.php:409 msgid "Sign out" msgstr "Logga ut" #: ../../../app/themes/Peafowl/mails/account-change-email.php:4 msgid "We received a request to change the email of your <a href=\"%u\">%n</a> account at %w." msgstr "We received a request to change the email of your <a href=\"%u\">%n</a> account at %w." #: ../../../app/themes/Peafowl/mails/account-change-email.php:6 #, php-format msgid "To complete the process you must <a href=\"%s\">activate your email</a>." msgstr "För att slutföra processen måste du <a href=\"%s\">bekräfta din email</a>." #: ../../../app/themes/Peafowl/mails/account-change-email.php:8 #: ../../../app/themes/Peafowl/mails/account-confirm.php:8 #: ../../../app/themes/Peafowl/mails/account-password-reset.php:8 #, php-format msgid "Alternatively you can copy and paste the URL into your browser: <a href=\"%s\">%s</a>" msgstr "Alternativt kan du kopiera och klistra in adressen i webbläsaren: <a href=\"%s\">%s</a>" #: ../../../app/themes/Peafowl/mails/account-change-email.php:10 #: ../../../app/themes/Peafowl/mails/account-confirm.php:10 #: ../../../app/themes/Peafowl/mails/account-password-reset.php:10 msgid "If you didn't intend this just ignore this message." msgstr "Om detta inte stämmer kan du ignorera detta mail." #: ../../../app/themes/Peafowl/mails/account-change-email.php:12 #: ../../../app/themes/Peafowl/mails/account-confirm.php:12 #: ../../../app/themes/Peafowl/mails/account-password-reset.php:12 #, php-format msgid "This request was made from IP: %s" msgstr "Begäran gjordes från IP: %s" #: ../../../app/themes/Peafowl/mails/account-confirm.php:4 msgid "We received a request to register the %n account at %w." msgstr "Du (förhoppningsvis) vill registrera kontot %n hos %w." #: ../../../app/themes/Peafowl/mails/account-confirm.php:6 #, php-format msgid "To complete the process you must <a href=\"%s\">activate your account</a>." msgstr "För att slutföra registreringen måste du <a href=\"%s\">aktivera ditt konto</a>." #: ../../../app/themes/Peafowl/mails/account-password-reset.php:4 msgid "We received a request to reset the password for your <a href=\"%u\">%n</a> account." msgstr "Vi har mottagit en begäran om att återställa lösenordet för kontot <a href=\"%u\">%n</a>." #: ../../../app/themes/Peafowl/mails/account-password-reset.php:6 #, php-format msgid "To reset your password <a href=\"%s\">follow this link</a>." msgstr "För att återställa lösenordet, <a href=\"%s\">klicka här</a>." #: ../../../app/themes/Peafowl/mails/account-welcome.php:4 msgid "Hi %n, welcome to %w" msgstr "Hej %n, välkommen till %w" #: ../../../app/themes/Peafowl/mails/account-welcome.php:6 msgid "Now that your account is ready you can enjoy uploading your images, creating albums and setting the privacy of your content as well as many more cool things that you will discover." msgstr "Kul att du registrerade dig! Du kan nu ladda upp bilder, skapa album och dela (eller inte dela) med dina nära och kära!" #: ../../../app/themes/Peafowl/mails/account-welcome.php:10 msgid "Thank you for joining" msgstr "Tack för att du registrerade dig" #: ../../../app/themes/Peafowl/mails/footer.php:3 msgid "This email was sent from %w %u" msgstr "Detta mail skickades från %w %u" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:14 msgid "Select the images to upload" msgstr "Välj bilder att ladda upp" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:32 msgid "Upload complete" msgstr "Uppladdning klar" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:41 msgid "Some errors have occured and the system couldn't process your request." msgstr "Det blev ett fel och systemet kunde inte hantera din begärda åtgärd." #: ../../../app/themes/Peafowl/snippets/form_advanced_search.php:41 #: ../../../app/themes/Peafowl/snippets/form_category.php:3 msgid "Category" msgstr "Kategori" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:61 msgid "Select category" msgstr "Välj kategori" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:77 msgid "Mark this if the upload is not family safe" msgstr "Markera denna om uppladdningen inte är familjesäker" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:77 msgid "Not family safe upload" msgstr "Inte familje säker uppladdning" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:80 msgid "Uploading" msgstr "Laddar upp" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:76 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:80 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:92 #: ../../../app/themes/Peafowl/views/dashboard.php:2044 #: ../../../app/themes/Peafowl/views/settings.php:463 #: ../../../content/pages/default/contact.php:123 #: ../../../app/lib/chevereto.js:1548 ../../../app/lib/chevereto.min.js:71 #: ../../../lib/Peafowl/peafowl.js:2326 ../../../lib/Peafowl/peafowl.min.js:140 msgid "cancel" msgstr "avbryt" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:80 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:93 msgid "cancel remaining" msgstr "avbryt kvarvarande" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:85 msgid "Note: Some images couldn't be uploaded." msgstr "Notis: Vissa bilder kunde inte laddas upp" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:85 msgid "learn more" msgstr "läs mer" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:86 msgid "Check the <a data-modal=\"simple\" data-target=\"failed-upload-result\">error report</a> for more information." msgstr "Kolla <a data-modal=\"simple\" data-target=\"failed-upload-result\">felrapporteringen</a> för mer information." #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:89 msgid "max" msgstr "max" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:91 msgid "close" msgstr "stäng" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:146 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:6 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:12 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:13 msgid "Edit" msgstr "Redigera" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:158 #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:200 #: ../../../app/themes/Peafowl/snippets/form_album.php:12 #: ../../../app/themes/Peafowl/snippets/form_category_edit.php:12 #: ../../../app/themes/Peafowl/snippets/form_image.php:4 #: ../../../app/themes/Peafowl/snippets/form_image.php:28 #: ../../../app/themes/Peafowl/snippets/form_ip_ban_edit.php:9 #: ../../../app/themes/Peafowl/snippets/form_ip_ban_edit.php:15 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:104 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:108 #: ../../../app/themes/Peafowl/views/dashboard.php:503 #: ../../../app/themes/Peafowl/views/dashboard.php:509 #: ../../../app/themes/Peafowl/views/dashboard.php:566 #: ../../../app/themes/Peafowl/views/dashboard.php:573 #: ../../../app/themes/Peafowl/views/dashboard.php:580 #: ../../../app/themes/Peafowl/views/dashboard.php:1418 #: ../../../app/themes/Peafowl/views/dashboard.php:1428 msgid "optional" msgstr "valfritt" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:194 #: ../../../app/themes/Peafowl/snippets/form_image.php:25 #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:46 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_admin_tools.php:8 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:8 msgid "Flag as unsafe" msgstr "Markera som osäkert" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:200 #: ../../../app/themes/Peafowl/snippets/form_category_edit.php:12 #: ../../../app/themes/Peafowl/snippets/form_image.php:28 #: ../../../app/themes/Peafowl/views/dashboard.php:877 msgid "Description" msgstr "Beskrivning" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:201 #: ../../../app/themes/Peafowl/snippets/form_image.php:29 msgid "Brief description of this image" msgstr "Kort beskrivning av bilden" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:206 msgid "Add image URLs" msgstr "Lägg till URL till bild" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:208 msgid "Add the image URLs here" msgstr "Lägg till URL till bild här" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:223 #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:27 #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:31 msgid "Create album" msgstr "Skapa album" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:224 msgid "The uploaded content will be moved to this newly created album. You can also move the content to an <a class=\"modal-switch\" data-switch=\"move-existing-album\">existing album</a>." msgstr "Allt uppladdat innehåll kommer att flyttas till detta nya album. Du kan också flytta innehållet till ett <a class=\"modal-switch\" data-switch=\"move-existing-album\">existerande album</a>." #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:235 #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:28 #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:46 #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:70 msgid "Move to album" msgstr "Flytta till album" #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:236 msgid "Select an existing album to move the uploaded content. You can also <a class=\"modal-switch\" data-switch=\"move-new-album\">create a new album</a> and move the content there." msgstr "Välj ett existerande album för att flytta innehållet. Du kan också <a class=\"modal-switch\" data-switch=\"move-new-album\">skapa ett nytt album</a> och flytta allt innehåll dit." #: ../../../app/themes/Peafowl/snippets/anywhere_upload.php:252 msgid "Error report" msgstr "Felrapport" #: ../../../app/themes/Peafowl/snippets/breadcrum_owner_card.php:26 #: ../../../app/themes/Peafowl/views/user.php:99 msgid "album" msgid_plural "albums" msgstr[0] "album" msgstr[1] "album" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:9 msgid "Viewer links" msgstr "Kortlänkar" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:21 msgid "HTML Codes" msgstr "HTML-kod" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:34 msgid "HTML medium linked" msgstr "HTML-länk mediumstor" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:39 msgid "HTML thumbnail linked" msgstr "HTML-länk miniatyrbild" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:46 msgid "BBCodes" msgstr "BBCodes" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:59 msgid "BBCode medium linked" msgstr "BBCode mellanstor link" #: ../../../app/themes/Peafowl/snippets/embed_tpl.php:64 msgid "BBCode thumbnail linked" msgstr "BBCode länk miniatyrbild" #: ../../../app/themes/Peafowl/snippets/form_album.php:7 #: ../../../app/themes/Peafowl/snippets/form_album.php:8 msgid "Album name" msgstr "Albumnamn" #: ../../../app/themes/Peafowl/snippets/form_album.php:9 msgid "move to existing album" msgstr "flytta till befintligt album" #: ../../../app/themes/Peafowl/snippets/form_album.php:12 msgid "Album description" msgstr "Album beskrivning" #: ../../../app/themes/Peafowl/snippets/form_album.php:19 msgid "Who can view this content" msgstr "Vem kan se detta innehåll" #: ../../../app/themes/Peafowl/snippets/form_album.php:21 msgid "Private (just me)" msgstr "Privat (bara jag)" #: ../../../app/themes/Peafowl/snippets/form_category_edit.php:4 #: ../../../app/themes/Peafowl/snippets/form_storage_edit.php:3 #: ../../../app/themes/Peafowl/views/dashboard.php:875 #: ../../../app/themes/Peafowl/views/dashboard.php:1693 #: ../../../app/themes/Peafowl/views/settings.php:364 #: ../../../content/pages/default/contact.php:87 msgid "Name" msgstr "Namn" #: ../../../app/themes/Peafowl/snippets/form_category_edit.php:5 msgid "Category name" msgstr "Kategori namn" #: ../../../app/themes/Peafowl/snippets/form_category_edit.php:8 #: ../../../app/themes/Peafowl/views/dashboard.php:486 #: ../../../app/themes/Peafowl/views/dashboard.php:596 #: ../../../app/themes/Peafowl/views/dashboard.php:876 msgid "URL key" msgstr "URL nyckel" #: ../../../app/themes/Peafowl/snippets/form_category_edit.php:9 msgid "Category URL key" msgstr "Kategori URL nyckel" #: ../../../app/themes/Peafowl/snippets/form_ip_ban_edit.php:15 #: ../../../app/themes/Peafowl/views/dashboard.php:926 #: ../../../content/pages/default/contact.php:111 msgid "Message" msgstr "Meddelande" #: ../../../app/themes/Peafowl/snippets/form_move_existing_album.php:3 msgid "Existing album" msgstr "Existerande album" #: ../../../app/themes/Peafowl/snippets/form_move_existing_album.php:15 msgid "create new album" msgstr "Skapa nytt album" #: ../../../app/themes/Peafowl/snippets/image_album_slice.php:14 msgid "view more" msgstr "se mer" #: ../../../app/themes/Peafowl/snippets/listing.php:22 #: ../../../app/themes/Peafowl/snippets/templates_content_listing.php:6 #: ../../../app/themes/Peafowl/snippets/templates_content_listing.php:9 msgid "Load more" msgstr "Ladda mer" #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:10 msgid "Select all" msgstr "Välj alla" #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:10 #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:56 msgid "Clear selection" msgstr "Plocka bort val" #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:13 msgid "Action" msgstr "Funktion" #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:45 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_admin_tools.php:9 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:9 msgid "Flag as safe" msgstr "Markera som säker uppladdning" #: ../../../app/themes/Peafowl/snippets/listing_tools_editor.php:54 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_admin_tools.php:7 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_admin_tools.php:8 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:12 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:13 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_admin_tools.php:12 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_admin_tools.php:13 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:20 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:21 #: ../../../app/themes/Peafowl/views/dashboard.php:607 #: ../../../app/themes/Peafowl/views/dashboard.php:884 #: ../../../app/themes/Peafowl/views/dashboard.php:933 msgid "Delete" msgstr "Radera" #: ../../../app/themes/Peafowl/snippets/modal_login.php:5 #, php-format msgid "To use all the features of this site you must be logged in. If you don't have an account you can <a href=\"%s\">sign up</a> right now." msgstr "För att använda alla funktioner på denna webbplats måste du logga in. Om du inte har ett konto kan du <a href=\"%s\">skapa ett nu</a>." #: ../../../app/themes/Peafowl/snippets/template_content_empty.php:5 #: ../../../app/themes/Peafowl/views/dashboard.php:618 #: ../../../app/themes/Peafowl/views/index.php:63 msgid "There's nothing to show here." msgstr "Finns inget att visa här" #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:16 #: ../../../app/themes/Peafowl/views/image.php:69 #: ../../../app/themes/Peafowl/views/image.php:457 msgid "Edit image details" msgstr "Ändra bilddetaljer" #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:18 #: ../../../app/themes/Peafowl/views/album.php:22 #: ../../../app/themes/Peafowl/views/album.php:118 msgid "Edit album details" msgstr "Ändra albumdetaljer" #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:32 msgid "All the images will be moved to this newly created album. You can also move the images to an <a class=\"modal-switch\" data-switch=\"move-existing-album\">existing album</a>." msgstr "Alla bilder kommer att flyttas till detta nya album. Du kan också flytta bilderna till <a class=\"modal-switch\" data-switch=\"move-existing-album\">ett existerande album</a>." #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:50 msgid "Select an existing album to move the image. You can also <a class=\"modal-switch\" data-switch=\"move-new-album\">create a new album</a> and move the image there." msgstr "Välj ett redan existerande album att flytta bilderna till. Du kan också <a class=\"modal-switch\" data-switch=\"move-new-album\">skapa ett nytt album</a> och flytta bilderna dit." #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:71 msgid "Select an existing album to move the images. You can also <a class=\"modal-switch\" data-switch=\"move-new-album\">create a new album</a> and move the images there." msgstr "Välj ett redan existerande album att flytta bilderna till. Du kan också <a class=\"modal-switch\" data-switch=\"move-new-album\">skapa ett nytt album</a> och flytta bilderna dit." #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:106 #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:110 msgid "Confirm deletion" msgstr "Bekräfta radering" #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:107 msgid "Do you really want to remove this content? This can't be undone." msgstr "Vill du verkligen radera detta innehåll? Detta kan inte ångras." #: ../../../app/themes/Peafowl/snippets/user_items_editor.php:111 msgid "Do you really want to remove all the selected content? This can't be undone." msgstr "Vill du verkligen radera dessa valda delar? Detta kan inte ångras." #: ../../../app/themes/Peafowl/tpl_list_item/image_description_owner.php:2 #, php-format msgid "From %s" msgstr "Från %s" #: ../../../app/themes/Peafowl/tpl_list_item/item_album_admin_tools.php:3 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_admin_tools.php:4 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:3 #: ../../../app/themes/Peafowl/tpl_list_item/item_album_edit_tools.php:4 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_admin_tools.php:3 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_admin_tools.php:4 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:3 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_edit_tools.php:4 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_public_tools.php:3 #: ../../../app/themes/Peafowl/tpl_list_item/item_image_public_tools.php:4 #: ../../../app/lib/chevereto.js:3778 ../../../app/lib/chevereto.min.js:198 #: ../../../lib/Peafowl/peafowl.js:639 ../../../lib/Peafowl/peafowl.min.js:38 msgid "Select" msgstr "Markera" #: ../../../app/themes/Peafowl/views/404.php:7 msgid "The requested page was not found." msgstr "Den begärda sidan kunde inte hittas" #: ../../../app/themes/Peafowl/views/404.php:11 msgid "Search something else" msgstr "Sök efter något annat" #: ../../../app/themes/Peafowl/views/404.php:22 msgid "The user has been deleted" msgstr "Användaren har raderats" #: ../../../app/themes/Peafowl/views/404.php:22 #: ../../../app/themes/Peafowl/views/album.php:134 #: ../../../app/themes/Peafowl/views/user.php:171 #: ../../../app/lib/chevereto.js:3756 ../../../app/lib/chevereto.min.js:196 msgid "The content has been deleted." msgstr "Innehållet har raderats." #: ../../../app/themes/Peafowl/views/account/awaiting-confirmation.php:7 msgid "Your account is almost ready" msgstr "Ditt konto är nästan klart" #: ../../../app/themes/Peafowl/views/account/awaiting-confirmation.php:9 #, php-format msgid "An email to %s has been sent with instructions to activate your account. The activation link is only valid for 48 hours. If you don't receive the instructions try checking your junk or spam filters." msgstr "Ett e-postmeddelande har skickats till %s med instruktioner för hur du aktiverar ditt konto. Länken i e-postmeddelandet är giltig i 48 timmar. Glöm inte att kolla skräpmappen." #: ../../../app/themes/Peafowl/views/account/awaiting-confirmation.php:10 #: ../../../app/themes/Peafowl/views/account/email-changed.php:11 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:16 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:26 #: ../../../app/themes/Peafowl/views/account/password-reset.php:16 #: ../../../app/themes/Peafowl/views/account/resend-activation.php:13 #: ../../../app/themes/Peafowl/views/logout.php:13 #: ../../../app/themes/Peafowl/views/request-denied.php:13 msgid "Go to homepage" msgstr "Gå till startsidan" #: ../../../app/themes/Peafowl/views/account/awaiting-confirmation.php:10 #: ../../../app/themes/Peafowl/views/account/resend-activation.php:13 msgid "Resend activation" msgstr "Skicka aktivering igen" #: ../../../app/themes/Peafowl/views/account/email-changed.php:10 #, php-format msgid "You have successfully changed your account email to %s" msgstr "Du har ändrat din e-post till %s" #: ../../../app/themes/Peafowl/views/account/email-changed.php:11 msgid "Go to my profile" msgstr "Gå till min profil" #: ../../../app/themes/Peafowl/views/account/email-needed.php:12 msgid "A confirmation link will be sent to this email with details to activate your account." msgstr "En aktiveringslänk kommer skickas till mailen." #: ../../../app/themes/Peafowl/views/account/email-needed.php:16 #: ../../../app/themes/Peafowl/views/settings.php:156 #: ../../../content/pages/default/contact.php:93 msgid "Your email address" msgstr "Din e-postadress" #: ../../../app/themes/Peafowl/views/account/email-needed.php:26 msgid "Add email" msgstr "Lägg till e-postadress" #: ../../../app/themes/Peafowl/views/account/password-forgot.php:15 msgid "An email with instructions to reset your password has been sent to the registered email address. If you don't receive the instructions try checking your junk or spam filters." msgstr "Ett e-postmeddelande med instruktioner om hur du byter lösenord har skickats till angiven e-postadress. Om du inte få meddelandet direkt kolla så att det inte har fastnat i något spamfilter." #: ../../../app/themes/Peafowl/views/account/password-forgot.php:16 #: ../../../app/themes/Peafowl/views/account/password-forgot.php:26 msgid "Resend instructions" msgstr "Skicka instruktioner igen" #: ../../../app/themes/Peafowl/views/account/password-forgot.php:24 msgid "A previous email has been sent with instructions to reset your password. If you did not receive the instructions try checking your junk or spam filters." msgstr "A previous email has been sent with instructions to reset your password. If you did not receive the instructions try checking your junk or spam filters." #: ../../../app/themes/Peafowl/views/account/password-forgot.php:32 msgid "Enter your username or the email address that you used to create your account." msgstr "Ange ditt användarnamn eller e-postadress så skickar vi dina uppgifter." #: ../../../app/themes/Peafowl/views/account/password-forgot.php:52 #: ../../../app/themes/Peafowl/views/account/password-reset.php:47 #: ../../../app/themes/Peafowl/views/account/resend-activation.php:37 #: ../../../lib/Peafowl/peafowl.js:417 ../../../lib/Peafowl/peafowl.js:2324 #: ../../../lib/Peafowl/peafowl.min.js:25 #: ../../../lib/Peafowl/peafowl.min.js:140 msgid "Submit" msgstr "Skicka" #: ../../../app/themes/Peafowl/views/account/password-reset.php:15 msgid "Your password has been changed. You can now try logging in using your new password." msgstr "Ditt lösenord har ändrats. Du kan nu logga in." #: ../../../app/themes/Peafowl/views/account/password-reset.php:16 msgid "Login now" msgstr "Logga in nu" #: ../../../app/themes/Peafowl/views/account/password-reset.php:22 msgid "Enter the new password that you want to use." msgstr "Ange det nya lösenordet du vill använda." #: ../../../app/themes/Peafowl/views/account/password-reset.php:28 msgid "New Password" msgstr "Nytt lösenord" #: ../../../app/themes/Peafowl/views/account/password-reset.php:29 #: ../../../app/themes/Peafowl/views/dashboard.php:105 #: ../../../app/themes/Peafowl/views/settings.php:306 #: ../../../app/themes/Peafowl/views/settings.php:323 #: ../../../app/themes/Peafowl/views/signup.php:50 #, php-format msgid "%d characters min" msgstr "%d characters min" #: ../../../app/themes/Peafowl/views/account/password-reset.php:29 #: ../../../app/themes/Peafowl/views/settings.php:306 msgid "Enter your new password" msgstr "Ange ditt nya lösenord" #: ../../../app/themes/Peafowl/views/account/password-reset.php:34 #: ../../../app/themes/Peafowl/views/settings.php:328 msgid "Confirm password" msgstr "Bekräfta lösenord" #: ../../../app/themes/Peafowl/views/account/password-reset.php:35 #: ../../../app/themes/Peafowl/views/settings.php:312 msgid "Re-enter your new password" msgstr "Skriv in lösenordet igen" #: ../../../app/themes/Peafowl/views/album.php:16 #: ../../../app/themes/Peafowl/views/image.php:63 msgid "This content is private" msgstr "Detta innehåll är privat" #: ../../../app/themes/Peafowl/views/album.php:25 msgid "Do you really want to delete this album and all of its images? This can't be undone." msgstr "Vill du verkligen radera albumet och alla dess bilder? Detta kan inte ångras." #: ../../../app/themes/Peafowl/views/album.php:25 msgid "Delete album" msgstr "Radera album" #: ../../../app/themes/Peafowl/views/album.php:86 msgid "Album link" msgstr "Länk till album" #: ../../../app/themes/Peafowl/views/dashboard.php:40 #: ../../../app/themes/Peafowl/views/dashboard.php:1732 msgid "Disk used" msgstr "Använt utrymme" #: ../../../app/themes/Peafowl/views/dashboard.php:80 #: ../../../app/themes/Peafowl/views/dashboard.php:84 msgid "Add user" msgstr "Lägg till användare" #: ../../../app/themes/Peafowl/views/dashboard.php:87 #: ../../../app/themes/Peafowl/views/settings.php:121 msgid "Role" msgstr "Roll" #: ../../../app/themes/Peafowl/views/dashboard.php:89 #: ../../../app/themes/Peafowl/views/settings.php:125 msgid "Administrator" msgstr "Administratör" #: ../../../app/themes/Peafowl/views/dashboard.php:152 #: ../../../app/themes/Peafowl/views/dashboard.php:156 msgid "Add category" msgstr "Lägg till kategori" #: ../../../app/themes/Peafowl/views/dashboard.php:222 msgid "Website name" msgstr "Hemsidans namn" #: ../../../app/themes/Peafowl/views/dashboard.php:227 msgid "Website doctitle" msgstr "Hemsidans doctitle" #: ../../../app/themes/Peafowl/views/dashboard.php:231 msgid "Website description" msgstr "Hemsidans beskrivning" #: ../../../app/themes/Peafowl/views/dashboard.php:236 msgid "Website keywords" msgstr "Nyckelord för sidan" #: ../../../app/themes/Peafowl/views/dashboard.php:257 msgid "Default time zone" msgstr "Standard tidszon" #: ../../../app/themes/Peafowl/views/dashboard.php:261 #: ../../../app/themes/Peafowl/views/settings.php:250 msgid "Select region" msgstr "Välj region" #: ../../../app/themes/Peafowl/views/dashboard.php:345 #: ../../../app/themes/Peafowl/views/settings.php:69 msgid "User ID" msgstr "Användar-ID" #: ../../../app/themes/Peafowl/views/dashboard.php:376 msgid "Content privacy mode" msgstr "Innehåll privat läge" #: ../../../app/themes/Peafowl/views/dashboard.php:380 #: ../../../app/themes/Peafowl/views/dashboard.php:1225 #: ../../../app/themes/Peafowl/views/dashboard.php:1463 msgid "Default" msgstr "Standard" #: ../../../app/themes/Peafowl/views/dashboard.php:381 msgid "Force private (self)" msgstr "Tvinga privat (själv)" #: ../../../app/themes/Peafowl/views/dashboard.php:382 msgid "Force private (anyone with the link)" msgstr "Tvinga privat (Alla med en länk)" #: ../../../app/themes/Peafowl/views/dashboard.php:630 msgid "Enable uploads" msgstr "Aktivera uppladdningar" #: ../../../app/themes/Peafowl/views/dashboard.php:636 msgid "Enable this if you want to allow image uploads. This setting doesn't affect administrators." msgstr "Tillåt uppladdning av bilder. Detta påverkar inte administratörer." #: ../../../app/themes/Peafowl/views/dashboard.php:639 msgid "Guest uploads" msgstr "Gästuppladdningar" #: ../../../app/themes/Peafowl/views/dashboard.php:645 msgid "Enable this if you want to allow non registered users to upload." msgstr "Aktivera detta om du vill tillåta icke registrerade användare att ladda upp." #: ../../../app/themes/Peafowl/views/dashboard.php:695 msgid "Image path" msgstr "Sökväg för bild" #: ../../../app/themes/Peafowl/views/dashboard.php:696 msgid "Relative to Chevereto root" msgstr "Relative to Chevereto root" #: ../../../app/themes/Peafowl/views/dashboard.php:698 msgid "Where to store the images? Relative to Chevereto root." msgstr "Var ska bilderna lagras?" #: ../../../app/themes/Peafowl/views/dashboard.php:701 msgid "Storage mode" msgstr "Lagringsläge" #: ../../../app/themes/Peafowl/views/dashboard.php:704 msgid "Datefolders" msgstr "Datummappar" #: ../../../app/themes/Peafowl/views/dashboard.php:704 msgid "Direct" msgstr "Direkt" #: ../../../app/themes/Peafowl/views/dashboard.php:707 #, php-format msgid "Datefolders creates %s structure" msgstr "Datummappar skapar %s struktur" #: ../../../app/themes/Peafowl/views/dashboard.php:710 msgid "File naming method" msgstr "Metod för att namnge bilder" #: ../../../app/themes/Peafowl/views/dashboard.php:713 msgid "Original" msgstr "Original" #: ../../../app/themes/Peafowl/views/dashboard.php:722 msgid "Thumb size" msgstr "Storlek på miniatyrbild" #: ../../../app/themes/Peafowl/views/dashboard.php:733 msgid "Thumbnails will be fixed to this size." msgstr "Miniatyrbilder kommer att fastställas till den här storleken." #: ../../../app/themes/Peafowl/views/dashboard.php:754 msgid "Enable this to put a logo or anything you want in image uploads." msgstr "Aktivera denna för att lägga till en logotyp eller vad du vill i bilduppladdning." #: ../../../app/themes/Peafowl/views/dashboard.php:761 #: ../../../app/themes/Peafowl/views/dashboard.php:1238 #, php-format msgid "Warning: Can't write in %s" msgstr "Varning: Kan inte skriva till %s" #: ../../../app/themes/Peafowl/views/dashboard.php:810 msgid "Watermark image" msgstr "Vattenmärkningsbild" #: ../../../app/themes/Peafowl/views/dashboard.php:819 msgid "Watermark position" msgstr "Position för vattenmärkning" #: ../../../app/themes/Peafowl/views/dashboard.php:823 msgid "left top" msgstr "vänster övre" #: ../../../app/themes/Peafowl/views/dashboard.php:824 msgid "left center" msgstr "vänster center" #: ../../../app/themes/Peafowl/views/dashboard.php:825 msgid "left bottom" msgstr "vänster nedre" #: ../../../app/themes/Peafowl/views/dashboard.php:826 msgid "center top" msgstr "center övre" #: ../../../app/themes/Peafowl/views/dashboard.php:827 msgid "center center" msgstr "center center" #: ../../../app/themes/Peafowl/views/dashboard.php:828 msgid "center bottom" msgstr "center nedre" #: ../../../app/themes/Peafowl/views/dashboard.php:829 msgid "right top" msgstr "höger övre" #: ../../../app/themes/Peafowl/views/dashboard.php:830 msgid "right center" msgstr "höger center" #: ../../../app/themes/Peafowl/views/dashboard.php:831 msgid "right bottom" msgstr "höger nedre" #: ../../../app/themes/Peafowl/views/dashboard.php:836 msgid "Relative position of the watermark image. First horizontal align then vertical align." msgstr "Relativ position av vattenmärkning. Först är vågrätt och sen lodrätt led" #: ../../../app/themes/Peafowl/views/dashboard.php:847 msgid "Watermark margin" msgstr "Marginal av vattenmärkning" #: ../../../app/themes/Peafowl/views/dashboard.php:852 msgid "Margin from the border of the image to the watermark image." msgstr "Marginal från ramen i bilden till vattenmärkning" #: ../../../app/themes/Peafowl/views/dashboard.php:855 msgid "Watermark opacity" msgstr "Opacitet av vattenmärkning" #: ../../../app/themes/Peafowl/views/dashboard.php:860 msgid "Opacity of the watermark in the final watermarked image. Values 0 to 100." msgstr "Opacitet av vattenmärkning i den slutliga bilden. Värden från 0 till 100." #: ../../../app/themes/Peafowl/views/dashboard.php:902 msgid "Edit category" msgstr "Ändra kategori" #: ../../../app/themes/Peafowl/views/dashboard.php:959 msgid "Enable signups" msgstr "Aktivera registreringar" #: ../../../app/themes/Peafowl/views/dashboard.php:965 msgid "Enable this if you want to allow users to signup." msgstr "Aktivera om du vill tillåta användare att registrera sig." #: ../../../app/themes/Peafowl/views/dashboard.php:983 msgid "Require email confirmation" msgstr "Kräv epost validering" #: ../../../app/themes/Peafowl/views/dashboard.php:1019 msgid "Block image uploads by IP if the system notice a flood behavior based on the number of uploads per time period. This setting doesn't affect administrators." msgstr "Block image uploads by IP if the system notice a flood behavior based on the number of uploads per time period. This setting doesn't affect administrators." #: ../../../app/themes/Peafowl/views/dashboard.php:1031 msgid "Notify to email" msgstr "Notify to email" #: ../../../app/themes/Peafowl/views/dashboard.php:1037 msgid "If enabled the system will send an email on flood incidents." msgstr "If enabled the system will send an email on flood incidents." #: ../../../app/themes/Peafowl/views/dashboard.php:1040 msgid "Minute limit" msgstr "Minutgräns" #: ../../../app/themes/Peafowl/views/dashboard.php:1045 msgid "Hourly limit" msgstr "Timgräns" #: ../../../app/themes/Peafowl/views/dashboard.php:1050 msgid "Daily limit" msgstr "Dagsgräns" #: ../../../app/themes/Peafowl/views/dashboard.php:1055 msgid "Weekly limit" msgstr "Veckogräns" #: ../../../app/themes/Peafowl/views/dashboard.php:1060 msgid "Monthly limit" msgstr "Månadsgräns" #: ../../../app/themes/Peafowl/views/dashboard.php:1109 msgid "List items per page" msgstr "Lista objekt per sida" #: ../../../app/themes/Peafowl/views/dashboard.php:1112 msgid "How many items should be displayed per page listing." msgstr "Hur många poster ska visas per sida." #: ../../../app/themes/Peafowl/views/dashboard.php:1116 msgid "List pagination mode" msgstr "Lista paginering läge" #: ../../../app/themes/Peafowl/views/dashboard.php:1119 msgid "Endless scrolling" msgstr "Oändlig skrollning" #: ../../../app/themes/Peafowl/views/dashboard.php:1119 msgid "Classic pagination" msgstr "Klassisk paginering" #: ../../../app/themes/Peafowl/views/dashboard.php:1123 msgid "What pagination method should be used." msgstr "Vilken paginerings metod ska användas." #: ../../../app/themes/Peafowl/views/dashboard.php:1130 msgid "Fluid" msgstr "Flytande" #: ../../../app/themes/Peafowl/views/dashboard.php:1130 msgid "Fixed" msgstr "Fixerad" #: ../../../app/themes/Peafowl/views/dashboard.php:1167 #, php-format msgid "Put your themes in the %s folder" msgstr "Lägg dina teman i %s mappen" #: ../../../app/themes/Peafowl/views/dashboard.php:1244 msgid "Enable vector logo" msgstr "Aktivera vektor logotyp" #: ../../../app/themes/Peafowl/views/dashboard.php:1256 #: ../../../app/themes/Peafowl/views/dashboard.php:1418 msgid "Vector logo image" msgstr "Logotyp i vektor format" #: ../../../app/themes/Peafowl/views/dashboard.php:1287 msgid "Favicon image" msgstr "Favicon bild" #: ../../../app/themes/Peafowl/views/dashboard.php:1299 msgid "Enable download button" msgstr "Aktivera nerladdningsknapp" #: ../../../app/themes/Peafowl/views/dashboard.php:1305 msgid "Enable this if you want to show the image download button." msgstr "Aktivera om du vill visa bild nerladdningsknappen" #: ../../../app/themes/Peafowl/views/dashboard.php:1377 msgid "Custom CSS code" msgstr "Anpassad CSS kod" #: ../../../app/themes/Peafowl/views/dashboard.php:1378 msgid "Put your custom CSS code here. It will be placed as <style> just before the closing </head> tag." msgstr "Sätt in din anpassade CSS kod här. Den kommer att läggas till inom <style> precis före </head> taggen." #: ../../../app/themes/Peafowl/views/dashboard.php:1382 msgid "Custom JS code" msgstr "Anpassad JS kod" #: ../../../app/themes/Peafowl/views/dashboard.php:1383 msgid "Put your custom JS code here. It will be placed as <script> just before the closing </head> tag." msgstr "Sätt in din anpassade JS kod här. Den kommer att läggas till inom <script> precis före </head> taggen." #: ../../../app/themes/Peafowl/views/image.php:72 msgid "Do you really want to delete this image? This can't be undone." msgstr "Vill du verkligen radera bilden? Kan ej ångras." #: ../../../app/themes/Peafowl/views/image.php:72 msgid "Delete image" msgstr "Radera bild" #: ../../../app/themes/Peafowl/views/dashboard.php:1565 msgid "Crypt salt" msgstr "Crypt salt" #: ../../../app/themes/Peafowl/views/dashboard.php:1567 msgid "This is the salt used to convert numeric ID to alphanumeric. It was generated on install." msgstr "This is the salt used to convert numeric ID to alphanumeric. It was generated on install." #: ../../../app/themes/Peafowl/views/dashboard.php:1611 msgid "Default language" msgstr "Standardspråk" #: ../../../app/themes/Peafowl/views/dashboard.php:1620 msgid "Default base language to use." msgstr "Standardspråk att använda" #: ../../../app/themes/Peafowl/views/dashboard.php:1624 msgid "Auto language" msgstr "Sätt språk automatiskt" #: ../../../app/themes/Peafowl/views/dashboard.php:1754 msgid "From name" msgstr "Avsändarens namn" #: ../../../app/themes/Peafowl/views/dashboard.php:1757 msgid "Sender name for emails sent to users." msgstr "Avsändarens namn för e-post skickat till användare" #: ../../../app/themes/Peafowl/views/dashboard.php:1772 msgid "Email mode" msgstr "E-postläge" #: ../../../app/themes/Peafowl/views/dashboard.php:1779 msgid "How to send emails? SMTP recommended." msgstr "How to send emails? SMTP recommended." #: ../../../app/themes/Peafowl/views/dashboard.php:1784 msgid "SMTP server and port" msgstr "SMTP server och port" #: ../../../app/themes/Peafowl/views/dashboard.php:1787 msgid "SMTP server" msgstr "SMTP server" #: ../../../app/themes/Peafowl/views/dashboard.php:1800 msgid "SMTP username" msgstr "SMTP användarnamn" #: ../../../app/themes/Peafowl/views/dashboard.php:1805 msgid "SMTP password" msgstr "SMTP lösenord" #: ../../../app/themes/Peafowl/views/dashboard.php:1810 msgid "SMTP security" msgstr "SMTP säkerhet" #: ../../../app/themes/Peafowl/views/dashboard.php:1813 msgid "Unsecured" msgstr "Osäker" #: ../../../app/themes/Peafowl/views/dashboard.php:1838 msgid "You need a <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> for this." msgstr "Du behöver en <a href=\"https://developers.facebook.com/\" target=\"_blank\">Facebook app</a> för detta." #: ../../../app/themes/Peafowl/views/dashboard.php:1843 msgid "Facebook app id" msgstr "Facebook app id" #: ../../../app/themes/Peafowl/views/dashboard.php:1848 msgid "Facebook app secret" msgstr "Facebook app secret" #: ../../../app/themes/Peafowl/views/dashboard.php:1864 msgid "You need a <a href=\"https://apps.twitter.com\" target=\"_blank\">Twitter app</a> for this." msgstr "Du behöver <a href=\"https://apps.twitter.com\" target=\"_blank\">Twitter app</a> för detta." #: ../../../app/themes/Peafowl/views/dashboard.php:1869 msgid "Twitter API key" msgstr "Twitter API key" #: ../../../app/themes/Peafowl/views/dashboard.php:1874 msgid "Twitter API secret" msgstr "Twitter API secret" #: ../../../app/themes/Peafowl/views/dashboard.php:1881 msgid "Twitter account" msgstr "Twitter konto" #: ../../../app/themes/Peafowl/views/dashboard.php:1897 msgid "You need a <a href=\"https://cloud.google.com/console\" target=\"_blank\">Google app</a> for this." msgstr "Du behöver <a href=\"https://cloud.google.com/console\" target=\"_blank\">Google app</a> för detta." #: ../../../app/themes/Peafowl/views/dashboard.php:1902 msgid "Google client id" msgstr "Google client id" #: ../../../app/themes/Peafowl/views/dashboard.php:1907 msgid "Google client secret" msgstr "Google client secret" #: ../../../app/themes/Peafowl/views/dashboard.php:1986 msgid "reCAPTCHA threshold" msgstr "reCAPTCHA threshold" #: ../../../app/themes/Peafowl/views/dashboard.php:1997 msgid "Comment code" msgstr "Comment code" #: ../../../app/themes/Peafowl/views/dashboard.php:1998 msgid "Disqus, Facebook or anything you want. It will be used in image view." msgstr "Disqus, Facebook eller det du vill kommer att användas i bildvyn." #: ../../../app/themes/Peafowl/views/dashboard.php:2002 msgid "Analytics code" msgstr "Analytics code" #: ../../../app/themes/Peafowl/views/dashboard.php:2003 msgid "Google Analytics or anything you want. It will be added to the theme footer." msgstr "Google Analytics eller det du vill använda kommer att läggas till i footern på temat." #: ../../../app/themes/Peafowl/views/dashboard.php:2019 msgid "API v1 key" msgstr "API nyckel v1" #: ../../../app/themes/Peafowl/views/dashboard.php:2044 #: ../../../app/themes/Peafowl/views/settings.php:463 #: ../../../lib/Peafowl/peafowl.js:417 ../../../lib/Peafowl/peafowl.min.js:25 msgid "Save changes" msgstr "Spara ändringar" #: ../../../app/themes/Peafowl/views/dashboard.php:2067 #: ../../../app/themes/Peafowl/views/settings.php:477 msgid "Check the errors to proceed." msgstr "Undersök felen innan du fortsätter." #: ../../../app/themes/Peafowl/views/image.php:57 msgid "Guest" msgstr "Gäst" #: ../../../app/themes/Peafowl/views/image.php:138 #, php-format msgid "Added to %s" msgstr "Tillagt i %s" #: ../../../app/themes/Peafowl/views/image.php:143 #, php-format msgid "Uploaded to %s" msgstr "Uppladdad till %s" #: ../../../app/themes/Peafowl/views/image.php:145 #, php-format msgid "Uploaded %s" msgstr "Uppladdad %s" #: ../../../app/themes/Peafowl/views/image.php:182 #: ../../../app/themes/Peafowl/views/image.php:241 msgid "Share image" msgstr "Dela bild" #: ../../../app/themes/Peafowl/views/image.php:198 #: ../../../app/themes/Peafowl/views/image.php:204 msgid "Album ID" msgstr "Album ID" #: ../../../app/themes/Peafowl/views/image.php:252 msgid "In this album" msgstr "I detta album" #: ../../../app/themes/Peafowl/views/index.php:15 msgid "Upload and share your images." msgstr "Ladda upp och dela dina bilder." #: ../../../app/themes/Peafowl/views/index.php:79 msgid "Sign up to unlock all the features" msgstr "Registrera dig för att låsa upp alla funktioner" #: ../../../app/themes/Peafowl/views/index.php:80 msgid "Manage your content, create private albums, customize your profile and more." msgstr "Hantera ditt innehåll, skapa privata album, anpassa din profil och mer." #: ../../../app/themes/Peafowl/views/login.php:40 #: ../../../app/themes/Peafowl/views/settings.php:323 msgid "Enter your password" msgstr "Ange ditt lösenord" #: ../../../app/themes/Peafowl/views/logout.php:12 #, php-format msgid "You have been logged off %s. Hope to see you soon." msgstr "Du har loggats ut från %s. På återseende!" #: ../../../app/themes/Peafowl/views/request-denied.php:12 msgid "You either don't have permission to access this page or the link has expired." msgstr "Du har inte tillåtelse att besöka denna sida, alternativt har länken dött." #: ../../../app/themes/Peafowl/views/settings.php:36 #: ../../../app/themes/Peafowl/views/user.php:65 msgid "Do you really want to delete this user? This can't be undone." msgstr "Vill du verkligen radera denna användare? Går ej att ångra." #: ../../../app/themes/Peafowl/views/settings.php:36 #: ../../../app/themes/Peafowl/views/user.php:65 msgid "Delete user" msgstr "Radera användare" #: ../../../app/themes/Peafowl/views/settings.php:81 msgid "Register date" msgstr "Blev medlem" #: ../../../app/themes/Peafowl/views/settings.php:105 msgid "Status" msgstr "Status" #: ../../../app/themes/Peafowl/views/settings.php:109 msgid "Valid" msgstr "Aktiv" #: ../../../app/themes/Peafowl/views/settings.php:110 msgid "Banned" msgstr "Bannad" #: ../../../app/themes/Peafowl/views/settings.php:111 msgid "Awaiting email" msgstr "Väntar e-post" #: ../../../app/themes/Peafowl/views/settings.php:112 msgid "Awaiting confirmation" msgstr "Väntar på aktivering" #: ../../../app/themes/Peafowl/views/settings.php:144 #: ../../../app/themes/Peafowl/views/signup.php:40 msgid "%i to %f characters<br>Letters, numbers and \"_\"" msgstr "%i till %f tecken<br>Bokstäver, siffror och \"_\"" #: ../../../app/themes/Peafowl/views/settings.php:215 msgid "Language" msgstr "Språk" #: ../../../app/themes/Peafowl/views/settings.php:245 msgid "Timezone" msgstr "Tidszon" #: ../../../app/themes/Peafowl/views/settings.php:296 msgid "Current password" msgstr "Nuvarande lösenord" #: ../../../app/themes/Peafowl/views/settings.php:297 msgid "Enter your current password" msgstr "Ange ditt nuvarande lösenord" #: ../../../app/themes/Peafowl/views/settings.php:305 msgid "New password" msgstr "Nytt lösenord" #: ../../../app/themes/Peafowl/views/settings.php:311 msgid "Confirm new password" msgstr "Bekräfta nytt lösenord" #: ../../../app/themes/Peafowl/views/settings.php:319 msgid "Add a password to be able to login using your username or email." msgstr "Lägg till ett lösenord för att kunna logga in med ditt användarnamn eller e-post." #: ../../../app/themes/Peafowl/views/settings.php:319 msgid "This user doesn't have a password. Add one using this form." msgstr "Denna användare har inget lösenord. Ange ett med detta formulär." #: ../../../app/themes/Peafowl/views/settings.php:329 msgid "Re-enter your password" msgstr "Ange ditt lösenord igen" #: ../../../app/themes/Peafowl/views/settings.php:352 #: ../../../app/themes/Peafowl/views/user.php:21 msgid "Upload new image" msgstr "Ladda upp ny bild" #: ../../../app/themes/Peafowl/views/settings.php:354 msgid "Delete existing image" msgstr "Radera existerande bild" #: ../../../app/themes/Peafowl/views/settings.php:367 msgid "This is your real name, not your username." msgstr "Detta är ditt riktiga namn, inte ditt användarnamn." #: ../../../app/themes/Peafowl/views/settings.php:371 msgid "http://yourwebsite.com" msgstr "http://minsida.se" #: ../../../app/themes/Peafowl/views/settings.php:387 msgid "User has no connections." msgstr "Användaren har inga anslutningar." #: ../../../app/themes/Peafowl/views/settings.php:391 msgid "Link your account to external services to be able to login and share content." msgstr "Länka ditt konto till de externa tjänsterna för att logga in och dela innehållet." #: ../../../app/themes/Peafowl/views/settings.php:398 #, php-format msgid "Do you really want to disconnect %s from this account?" msgstr "Vill du verkligen koppla bort %s från detta konto?" #: ../../../app/themes/Peafowl/views/settings.php:399 #, php-format msgid "This account is connected to %s" msgstr "Detta konto är anslutet till %s" #: ../../../app/themes/Peafowl/views/settings.php:401 #, php-format msgid "Do you really want to disconnect your %s account?" msgstr "Vill du verkligen koppla bort ditt %s konto?" #: ../../../app/themes/Peafowl/views/settings.php:403 #, php-format msgid "You will be logged out and you won't be able to login to your account using this %s account." msgstr "Du kommer att loggas ut och du kommer inte att kunna logga in med %s kontot." #: ../../../app/themes/Peafowl/views/settings.php:405 #, php-format msgid "Your account is connected to %s" msgstr "Ditt konto är kopplat till %s" #: ../../../app/themes/Peafowl/views/settings.php:410 msgid "disconnect" msgstr "stäng av" #: ../../../app/themes/Peafowl/views/settings.php:423 #, php-format msgid "Connect %s" msgstr "Anslut %s" #: ../../../app/themes/Peafowl/views/user.php:15 msgid "Upload profile background" msgstr "Ladda upp profilbakgrund" #: ../../../app/themes/Peafowl/views/user.php:17 msgid "Change background" msgstr "Ändra bakgrund" #: ../../../app/themes/Peafowl/views/user.php:22 msgid "The profile background image will be deleted. This can't be undone. Are you sure that you want to delete the profile background image?" msgstr "Bakgrundsbilden kommer att raderas. Detta kan inte bli ogjort. Är du säker på att du vill radera bakgrundsbilden?" #: ../../../app/themes/Peafowl/views/user.php:22 msgid "Delete background" msgstr "Radera bakgrund" #: ../../../app/themes/Peafowl/views/user.php:61 msgid "Edit profile" msgstr "Redigera profil" #: ../../../app/lib/chevereto.js:732 ../../../app/lib/chevereto.js:809 #: ../../../app/lib/chevereto.js:998 ../../../app/lib/chevereto.js:2732 #: ../../../app/lib/chevereto.js:2785 ../../../app/lib/chevereto.js:2888 #: ../../../app/lib/chevereto.min.js:39 ../../../app/lib/chevereto.min.js:43 #: ../../../app/lib/chevereto.min.js:49 ../../../app/lib/chevereto.min.js:147 #: ../../../app/lib/chevereto.min.js:150 ../../../app/lib/chevereto.min.js:154 msgid "You must enter the album name." msgstr "Du måste ange ett namn på albumet." #: ../../../app/lib/chevereto.js:851 ../../../app/lib/chevereto.js:1044 #: ../../../app/lib/chevereto.js:1140 ../../../app/lib/chevereto.min.js:46 #: ../../../app/lib/chevereto.min.js:53 ../../../app/lib/chevereto.min.js:55 #: ../../../lib/Peafowl/peafowl.js:2358 ../../../lib/Peafowl/peafowl.min.js:143 msgid "Confirm" msgstr "Bekräfta" #: ../../../app/lib/chevereto.js:976 ../../../app/lib/chevereto.min.js:48 msgid "Select existing album" msgstr "Välj befintligt album" #: ../../../app/lib/chevereto.js:1259 ../../../app/lib/chevereto.js:1339 #: ../../../app/lib/chevereto.min.js:60 ../../../app/lib/chevereto.min.js:65 msgid "Please select a valid image file type." msgstr "Vänligen välj en giltig filtyp för bilder." #: ../../../app/lib/chevereto.js:1264 ../../../app/lib/chevereto.js:1344 #: ../../../app/lib/chevereto.min.js:61 ../../../app/lib/chevereto.min.js:66 #, javascript-format msgid "Please select a picture of at most %s size." msgstr "Bilden får inte vara större än %s." #: ../../../app/lib/chevereto.js:1311 ../../../app/lib/chevereto.min.js:63 msgid "Profile image updated." msgstr "Profilbild uppdaterad." #: ../../../app/lib/chevereto.js:1381 ../../../app/lib/chevereto.min.js:67 msgid "Profile background image updated." msgstr "Profilbakgrund uppdaterad." #: ../../../app/lib/chevereto.js:1453 ../../../app/lib/chevereto.min.js:68 msgid "Profile background image deleted." msgstr "Profilbakgrund raderad." #: ../../../app/lib/chevereto.js:1458 ../../../app/lib/chevereto.min.js:68 msgid "Error deleting profile background image." msgstr "Fel, kunde inte radera profilbakgrunden." #: ../../../app/lib/chevereto.js:2194 ../../../app/lib/chevereto.min.js:106 msgid "File too big." msgstr "Filen är för stor." #: ../../../app/lib/chevereto.js:2212 ../../../app/lib/chevereto.js:2395 #: ../../../app/lib/chevereto.min.js:109 ../../../app/lib/chevereto.min.js:125 msgid "Some files couldn't be added" msgstr "Vissa filer kunde inte läggas till" #: ../../../app/lib/chevereto.js:2860 ../../../app/lib/chevereto.min.js:154 msgid "Image edited successfully." msgstr "Bilden har ändrats." #: ../../../app/themes/Peafowl/snippets/form_move_existing_album.php:9 #: ../../../app/lib/chevereto.js:2923 ../../../app/lib/chevereto.js:3863 #: ../../../app/lib/chevereto.min.js:155 ../../../app/lib/chevereto.min.js:203 msgid "private" msgstr "privat" #: ../../../app/lib/chevereto.js:2928 ../../../app/lib/chevereto.min.js:155 msgid "Album edited successfully." msgstr "Albumet har ändrats." #: ../../../app/lib/chevereto.js:3764 ../../../app/lib/chevereto.js:3855 #: ../../../app/lib/chevereto.js:3938 ../../../app/lib/chevereto.js:3947 #: ../../../app/lib/chevereto.min.js:197 ../../../app/lib/chevereto.min.js:203 #: ../../../app/lib/chevereto.min.js:205 msgid "The content has been moved." msgstr "Innehållet har flyttats." #: ../../../app/lib/chevereto.js:3786 ../../../app/lib/chevereto.min.js:198 msgid "Unselect" msgstr "Avmarkera" #: ../../../app/lib/chevereto.js:3855 ../../../app/lib/chevereto.min.js:203 msgid "The content has been edited." msgstr "Innehållet har ändrats." #: ../../../lib/Peafowl/peafowl.js:25 ../../../lib/Peafowl/peafowl.js:492 #: ../../../lib/Peafowl/peafowl.min.js:1 ../../../lib/Peafowl/peafowl.min.js:31 msgid "All the changes that you have made will be lost if you continue." msgstr "Alla ändringar kommer försvinna." #: ../../../lib/Peafowl/peafowl.js:476 ../../../lib/Peafowl/peafowl.min.js:30 msgid "Changes saved successfully." msgstr "Ändringarna sparades." #: ../../../lib/Peafowl/peafowl.js:492 ../../../lib/Peafowl/peafowl.min.js:31 msgid "Go back to form" msgstr "Gå tillbaka till formulär" #: ../../../lib/Peafowl/peafowl.js:492 ../../../lib/Peafowl/peafowl.min.js:31 msgid "continue anyway" msgstr "Fortsätt ändå" #: ../../../lib/Peafowl/peafowl.js:2506 ../../../lib/Peafowl/peafowl.min.js:155 msgid "Saving" msgstr "Sparar" #: ../../../lib/Peafowl/peafowl.js:2511 ../../../lib/Peafowl/peafowl.min.js:155 msgid "Sending" msgstr "Skickar" #: ../../../lib/Peafowl/peafowl.js:2591 ../../../lib/Peafowl/peafowl.min.js:158 msgid "Confirm action" msgstr "Bekräfta" #: ../../../lib/Peafowl/peafowl.js:2603 ../../../lib/Peafowl/peafowl.min.js:159 msgid "information" msgstr "Information"
{ "pile_set_name": "Github" }
/* * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.rds.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.Request; import com.amazonaws.DefaultRequest; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.rds.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.util.StringUtils; /** * CreateDBParameterGroupRequest Marshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateDBParameterGroupRequestMarshaller implements Marshaller<Request<CreateDBParameterGroupRequest>, CreateDBParameterGroupRequest> { public Request<CreateDBParameterGroupRequest> marshall(CreateDBParameterGroupRequest createDBParameterGroupRequest) { if (createDBParameterGroupRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<CreateDBParameterGroupRequest> request = new DefaultRequest<CreateDBParameterGroupRequest>(createDBParameterGroupRequest, "AmazonRDS"); request.addParameter("Action", "CreateDBParameterGroup"); request.addParameter("Version", "2014-10-31"); request.setHttpMethod(HttpMethodName.POST); if (createDBParameterGroupRequest.getDBParameterGroupName() != null) { request.addParameter("DBParameterGroupName", StringUtils.fromString(createDBParameterGroupRequest.getDBParameterGroupName())); } if (createDBParameterGroupRequest.getDBParameterGroupFamily() != null) { request.addParameter("DBParameterGroupFamily", StringUtils.fromString(createDBParameterGroupRequest.getDBParameterGroupFamily())); } if (createDBParameterGroupRequest.getDescription() != null) { request.addParameter("Description", StringUtils.fromString(createDBParameterGroupRequest.getDescription())); } if (!createDBParameterGroupRequest.getTags().isEmpty() || !((com.amazonaws.internal.SdkInternalList<Tag>) createDBParameterGroupRequest.getTags()).isAutoConstruct()) { com.amazonaws.internal.SdkInternalList<Tag> tagsList = (com.amazonaws.internal.SdkInternalList<Tag>) createDBParameterGroupRequest.getTags(); int tagsListIndex = 1; for (Tag tagsListValue : tagsList) { if (tagsListValue.getKey() != null) { request.addParameter("Tags.Tag." + tagsListIndex + ".Key", StringUtils.fromString(tagsListValue.getKey())); } if (tagsListValue.getValue() != null) { request.addParameter("Tags.Tag." + tagsListIndex + ".Value", StringUtils.fromString(tagsListValue.getValue())); } tagsListIndex++; } } return request; } }
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0-only */ /* * Copyright (c) 2014-2015, Intel Corporation. */ #ifndef __NVDIMM_PFN_H #define __NVDIMM_PFN_H #include <linux/types.h> #include <linux/mmzone.h> #define PFN_SIG_LEN 16 #define PFN_SIG "NVDIMM_PFN_INFO\0" #define DAX_SIG "NVDIMM_DAX_INFO\0" struct nd_pfn_sb { u8 signature[PFN_SIG_LEN]; u8 uuid[16]; u8 parent_uuid[16]; __le32 flags; __le16 version_major; __le16 version_minor; __le64 dataoff; /* relative to namespace_base + start_pad */ __le64 npfns; __le32 mode; /* minor-version-1 additions for section alignment */ /** * @start_pad: Deprecated attribute to pad start-misaligned namespaces * * start_pad is deprecated because the original definition did * not comprehend that dataoff is relative to the base address * of the namespace not the start_pad adjusted base. The result * is that the dax path is broken, but the block-I/O path is * not. The kernel will no longer create namespaces using start * padding, but it still supports block-I/O for legacy * configurations mainly to allow a backup, reconfigure the * namespace, and restore flow to repair dax operation. */ __le32 start_pad; __le32 end_trunc; /* minor-version-2 record the base alignment of the mapping */ __le32 align; /* minor-version-3 guarantee the padding and flags are zero */ /* minor-version-4 record the page size and struct page size */ __le32 page_size; __le16 page_struct_size; u8 padding[3994]; __le64 checksum; }; #endif /* __NVDIMM_PFN_H */
{ "pile_set_name": "Github" }
<?xml version="1.0"?> <!--Phoronix Test Suite v9.2.0m0--> <PhoronixTestSuite> <TestInformation> <Title>ASKAP</Title> <AppVersion>2018-11-10</AppVersion> <Description>This is a CUDA benchmark of ATNF's ASKAP Benchmark with currently using the tConvolveCuda sub-test.</Description> <ResultScale>Million Grid Points Per Second</ResultScale> <Proportion>HIB</Proportion> <TimesToRun>3</TimesToRun> </TestInformation> <TestProfile> <Version>2.0.0</Version> <SupportedPlatforms>Linux</SupportedPlatforms> <SoftwareType>Benchmark</SoftwareType> <TestType>System</TestType> <License>Free</License> <Status>Verified</Status> <ExternalDependencies>build-utilities, cuda, opencl, openmpi-development</ExternalDependencies> <EnvironmentSize>35</EnvironmentSize> <ProjectURL>https://github.com/ATNF/askap-benchmarks</ProjectURL> <InternalTags>CUDA, SMP, MPI, OpenMP</InternalTags> <Maintainer>Michael Larabel</Maintainer> </TestProfile> <TestSettings> <Option> <DisplayName>Test</DisplayName> <Identifier>test</Identifier> <Menu> <Entry> <Name>tConvolve OpenCL</Name> <Value>tConvolve OpenCL</Value> </Entry> <Entry> <Name>tConvolve CUDA</Name> <Value>tConvolveCuda</Value> </Entry> <Entry> <Name>tConvolve MPI</Name> <Value>tConvolveMPI</Value> </Entry> <Entry> <Name>tConvolve OpenMP</Name> <Value>tConvolveOMP</Value> </Entry> <Entry> <Name>tConvolve MT</Name> <Value>tConvolveMT</Value> </Entry> </Menu> </Option> </TestSettings> </PhoronixTestSuite>
{ "pile_set_name": "Github" }
#!/bin/sh ####################################################################### # # # The Compcert verified compiler # # # # Xavier Leroy, INRIA Paris-Rocquencourt # # # # Copyright Institut National de Recherche en Informatique et en # # Automatique. All rights reserved. This file is distributed # # 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 file is also distributed # # under the terms of the INRIA Non-Commercial License Agreement. # # # ####################################################################### prefix='/usr/local' bindir='$(PREFIX)/bin' libdir='$(PREFIX)/lib/compcert' coqdevdir='$(PREFIX)/lib/compcert/coq' toolprefix='' target='' has_runtime_lib=true has_standard_headers=true clightgen=false install_coqdev=false responsefile="gnu" ignore_coq_version=false library_Flocq=local library_MenhirLib=local usage='Usage: ./configure [options] target For help on options and targets, do: ./configure -help ' help='Usage: ./configure [options] target Supported targets: ppc-eabi (PowerPC, EABI with GNU/Unix tools) ppc-eabi-diab (PowerPC, EABI with Diab tools) ppc-linux (PowerPC, Linux) arm-eabi (ARM, EABI, little endian) arm-linux (ARM, EABI, little endian) arm-eabihf (ARM, EABI using hardware FP registers, little endian) arm-hardfloat (ARM, EABI using hardware FP registers, little endian) armeb-eabi (ARM, EABI, big endian) armeb-linux (ARM, EABI, big endian) armeb-eabihf (ARM, EABI using hardware FP registers, big endian) armeb-hardfloat (ARM, EABI using hardware FP registers, big endian) x86_32-linux (x86 32 bits, Linux) x86_32-bsd (x86 32 bits, BSD) x86_32-cygwin (x86 32 bits, Cygwin environment under Windows) x86_64-linux (x86 64 bits, Linux) x86_64-bsd (x86 64 bits, BSD) x86_64-macosx (x86 64 bits, MacOS X) rv32-linux (RISC-V 32 bits, Linux) rv64-linux (RISC-V 64 bits, Linux) aarch64-linux (AArch64, i.e. ARMv8 in 64-bit mode, Linux) manual (edit configuration file by hand) For x86 targets, the "x86_32-" prefix can also be written "ia32-" or "i386-". For x86 targets, the "x86_64-" prefix can also be written "amd64-". For AArch64 targets, the "aarch64-" prefix can also be written "arm64-". For PowerPC targets, the "ppc-" prefix can be refined into: ppc64- PowerPC 64 bits e5500- Freescale e5500 core (PowerPC 64 bit, EREF extensions) For ARM targets, the "arm-" or "armeb-" prefix can be refined into: armv6- ARMv6 + VFPv2 (Thumb mode not supported) armv6t2- ARMv6T2 + VFPv2 armv7a- ARMv7-A + VFPv3-d16 (default for arm-) armv7r- ARMv7-R + VFPv3-d16 armv7m- ARMv7-M + VFPv3-d16 armebv6- ARMv6 + VFPv2 (Thumb mode not supported) armebv6t2- ARMv6T2 + VFPv2 armebv7a- ARMv7-A + VFPv3-d16 (default for armeb-) armebv7r- ARMv7-R + VFPv3-d16 armebv7m- ARMv7-M + VFPv3-d16 Options: -prefix <dir> Install in <dir>/bin and <dir>/lib/compcert -bindir <dir> Install binaries in <dir> -libdir <dir> Install libraries in <dir> -coqdevdir <dir> Install Coq development (.vo files) in <dir> -toolprefix <pref> Prefix names of tools ("gcc", etc) with <pref> -use-external-Flocq Use an already-installed Flocq library -use-external-MenhirLib Use an already-installed MenhirLib library -no-runtime-lib Do not compile nor install the runtime support library -no-standard-headers Do not install nor use the standard .h headers -clightgen Also compile and install the clightgen tool -install-coqdev Also install the Coq development (implied by -clightgen) -ignore-coq-version Accept to use experimental or unsupported versions of Coq ' # # Remove Leftover Makefile.config (if any) (GPR#244) # rm -f Makefile.config # # Parse Command-Line Arguments # while : ; do case "$1" in "") break;; -prefix|--prefix) prefix="$2"; shift;; -bindir|--bindir) bindir="$2"; shift;; -libdir|--libdir) libdir="$2"; shift;; -coqdevdir|--coqdevdir) coqdevdir="$2"; install_coqdev=true; shift;; -toolprefix|--toolprefix) toolprefix="$2"; shift;; -no-runtime-lib) has_runtime_lib=false;; -no-standard-headers) has_standard_headers=false;; -clightgen) clightgen=true install_coqdev=true;; -ignore-coq-version|--ignore-coq-version) ignore_coq_version=true;; -install-coqdev|--install-coqdev|-install-coq-dev|--install-coq-dev) install_coqdev=true;; -use-external-Flocq|--use-external-Flocq) library_Flocq=external;; -use-external-MenhirLib|--use-external-MenhirLib) library_MenhirLib=external;; -help|--help) echo "$help"; exit 0;; -*) echo "Error: unknown option '$1'." 1>&2 echo "$usage" 1>&2 exit 2;; *) if test -n "$target"; then echo "$usage" 1>&2; exit 2; fi target="$1";; esac shift done # # Extract Architecture, Model and Default Endianness # case "$target" in arm-*|armv7a-*) arch="arm"; model="armv7a"; endianness="little"; bitsize=32;; armv6-*) arch="arm"; model="armv6"; endianness="little"; bitsize=32;; armv6t2-*) arch="arm"; model="armv6t2"; endianness="little"; bitsize=32;; armv7r-*) arch="arm"; model="armv7r"; endianness="little"; bitsize=32;; armv7m-*) arch="arm"; model="armv7m"; endianness="little"; bitsize=32;; armeb-*|armebv7a-*) arch="arm"; model="armv7a"; endianness="big"; bitsize=32;; armebv6-*) arch="arm"; model="armv6"; endianness="big"; bitsize=32;; armebv6t2-*) arch="arm"; model="armv6t2"; endianness="big"; bitsize=32;; armebv7r-*) arch="arm"; model="armv7r"; endianness="big"; bitsize=32;; armebv7m-*) arch="arm"; model="armv7m"; endianness="big"; bitsize=32;; x86_32-*|ia32-*|i386-*) arch="x86"; model="32sse2"; endianness="little"; bitsize=32;; x86_64-*|amd64-*) arch="x86"; model="64"; endianness="little"; bitsize=64;; powerpc-*|ppc-*) arch="powerpc"; model="ppc32"; endianness="big"; bitsize=32;; powerpc64-*|ppc64-*) arch="powerpc"; model="ppc64"; endianness="big"; bitsize=32;; e5500-*) arch="powerpc"; model="e5500"; endianness="big"; bitsize=32;; rv32-*) arch="riscV"; model="32"; endianness="little"; bitsize=32;; rv64-*) arch="riscV"; model="64"; endianness="little"; bitsize=64;; aarch64-*|arm64-*) arch="aarch64"; model="default"; endianness="little"; bitsize=64;; manual) ;; "") echo "Error: no target architecture specified." 1>&2 echo "$usage" 1>&2 exit 2 ;; *) echo "Error: unknown target architecture: '$target'." 1>&2 echo "$usage" 1>&2 exit 2 ;; esac target=${target#[a-zA-Z0-9]*-} # Per-target configuration asm_supports_cfi="" casm_options="" casmruntime="" clinker_needs_no_pie=true clinker_options="" cprepro_options="" # # ARM Target Configuration # if test "$arch" = "arm"; then case "$target" in eabi|linux) abi="eabi" ;; eabihf|hf|hardfloat) abi="hardfloat" ;; *) echo "Error: invalid eabi/system '$target' for architecture ARM." 1>&2 echo "$usage" 1>&2 exit 2;; esac casm="${toolprefix}gcc" casm_options="-c" cc="${toolprefix}gcc" clinker="${toolprefix}gcc" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -U__GNUC__ '-D__REDIRECT(name,proto,alias)=name proto' '-D__REDIRECT_NTH(name,proto,alias)=name proto' -E" libmath="-lm" system="linux" fi # # PowerPC Target Configuration # if test "$arch" = "powerpc"; then case "$target" in eabi|eabi-diab|linux) ;; *) echo "Error: invalid eabi/system '$target' for architecture PowerPC." 1>&2 echo "$usage" 1>&2 exit 2;; esac case "$target" in linux) abi="linux" ;; *) abi="eabi" ;; esac case "$target" in eabi-diab) asm_supports_cfi=false casm="${toolprefix}das" casm_options="-Xalign-value" cc="${toolprefix}dcc" clinker_needs_no_pie=false clinker="${toolprefix}dcc" cprepro="${toolprefix}dcc" cprepro_options="-E -D__GNUC__" libmath="-lm" system="diab" responsefile="diab" ;; *) casm="${toolprefix}gcc" casm_options="-c" casmruntime="${toolprefix}gcc -c -Wa,-mregnames" cc="${toolprefix}gcc" clinker="${toolprefix}gcc" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -U__GNUC__ -E" libmath="-lm" system="linux" ;; esac fi # # x86 (32 bits) Target Configuration # if test "$arch" = "x86" -a "$bitsize" = "32"; then case "$target" in bsd) abi="standard" casm="${toolprefix}gcc" casm_options="-m32 -c" cc="${toolprefix}gcc -m32" clinker="${toolprefix}gcc" clinker_options="-m32" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -m32 -U__GNUC__ -E" libmath="-lm" system="bsd" ;; cygwin) abi="standard" casm="${toolprefix}gcc" casm_options="-m32 -c" cc="${toolprefix}gcc -m32" clinker="${toolprefix}gcc" clinker_options="-m32" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -m32 -U__GNUC__ '-D__attribute__(x)=' -E" libmath="-lm" system="cygwin" ;; linux) abi="standard" casm="${toolprefix}gcc" casm_options="-m32 -c" cc="${toolprefix}gcc -m32" clinker="${toolprefix}gcc" clinker_options="-m32" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -m32 -U__GNUC__ -E" libmath="-lm" system="linux" ;; *) echo "Error: invalid eabi/system '$target' for architecture IA32/X86_32." 1>&2 echo "$usage" 1>&2 exit 2;; esac fi # # x86 (64 bits) Target Configuration # if test "$arch" = "x86" -a "$bitsize" = "64"; then case "$target" in bsd) abi="standard" casm="${toolprefix}gcc" casm_options="-m64 -c" cc="${toolprefix}gcc -m64" clinker="${toolprefix}gcc" clinker_options="-m64" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -m64 -U__GNUC__ -E" libmath="-lm" system="bsd" ;; linux) abi="standard" casm="${toolprefix}gcc" casm_options="-m64 -c" cc="${toolprefix}gcc -m64" clinker="${toolprefix}gcc" clinker_options="-m64" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -m64 -U__GNUC__ -E" libmath="-lm" system="linux" ;; macosx) # kernel major versions count upwards from 4 for OSX 10.0 to 15 for OSX 10.11 kernel_major=`uname -r | cut -d "." -f 1` abi="macosx" casm="${toolprefix}gcc" casm_options="-arch x86_64 -c" cc="${toolprefix}gcc -arch x86_64" clinker="${toolprefix}gcc" clinker_needs_no_pie=false cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -arch x86_64 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' '-D_Nullable=' '-D_Nonnull=' -E" libmath="" system="macosx" ;; *) echo "Error: invalid eabi/system '$target' for architecture X86_64." 1>&2 echo "$usage" 1>&2 exit 2;; esac fi # # RISC-V Target Configuration # if test "$arch" = "riscV"; then if test "$model" = "64"; then model_options="-march=rv64imafd -mabi=lp64d" else model_options="-march=rv32imafd -mabi=ilp32d" fi abi="standard" casm="${toolprefix}gcc" casm_options="$model_options -c" cc="${toolprefix}gcc $model_options" clinker="${toolprefix}gcc" clinker_options="$model_options" cprepro="${toolprefix}gcc" cprepro_options="$model_options -std=c99 -U__GNUC__ -E" libmath="-lm" system="linux" fi # # AArch64 (ARMv8 64 bits) Target Configuration # if test "$arch" = "aarch64"; then case "$target" in linux) abi="standard" casm="${toolprefix}gcc" casm_options="-c" cc="${toolprefix}gcc" clinker="${toolprefix}gcc" clinker_options="" cprepro="${toolprefix}gcc" cprepro_options="-std=c99 -U__GNUC__ -E" libmath="-lm" system="linux";; *) echo "Error: invalid eabi/system '$target' for architecture AArch64." 1>&2 echo "$usage" 1>&2 exit 2;; esac fi # # Finalize Target Configuration # if test -z "$casmruntime"; then casmruntime="$casm $casm_options"; fi # Invoke a C compiler, e.g. to check for availability of command-line options testcompiler () { tmpsrc="${TMPDIR:-/tmp}/compcert-configure-$$.c" rm -f "$tmpsrc" tmpout="${TMPDIR:-/tmp}/compcert-configure-$$.out" rm -f "$tmpout" cat >> "$tmpsrc" <<EOF int main (void) { return 0; } EOF errout=$("$@" -o "$tmpout" "$tmpsrc" 2>&1 >/dev/null) retcode=$? errcount=$(echo "${errout}" | grep -ciE "(unknown|unsupported|unrecognized).*(option|argument)") rm -f "$tmpsrc" "$tmpout" # Test failed or error is logged to stderr if [ "${retcode}" != "0" ] || [ "${errcount}" != "0" ]; then return 1; fi # OK and no error was logged return 0 } # # Test Assembler Support for CFI Directives # if test "$target" != "manual" && test -z "$asm_supports_cfi"; then echo "Testing assembler support for CFI directives... " | tr -d '\n' tmpsrc="${TMPDIR:-/tmp}/compcert-configure-$$.s" rm -f "$tmpsrc" cat >> "$tmpsrc" <<EOF testfun: .file 1 "testfun.c" .loc 1 1 .cfi_startproc .cfi_adjust_cfa_offset 16 .cfi_endproc EOF if $casm $casm_options -o /dev/null "$tmpsrc" 2>/dev/null then echo "yes"; asm_supports_cfi=true else echo "no"; asm_supports_cfi=false fi rm -f "$tmpsrc" fi # # Test Availability of Option '-no-pie' or '-nopie' # if ($clinker_needs_no_pie) then echo "Testing linker support for '-no-pie' / '-nopie' option... " | tr -d '\n' if testcompiler ${cc} -no-pie; then echo "yes, '-no-pie'"; clinker_options="${clinker_options} -no-pie" elif testcompiler ${cc} -nopie; then echo "yes, '-nopie'"; clinker_options="${clinker_options} -nopie" else echo "no"; clinker_needs_no_pie=false fi fi # # Test Availability of Required Tools # missingtools=false echo "Testing Coq... " | tr -d '\n' coq_ver=$(${COQBIN}coqc -v 2>/dev/null | sed -n -e 's/The Coq Proof Assistant, version \([^ ]*\).*$/\1/p') case "$coq_ver" in 8.8.0|8.8.1|8.8.2|8.9.0|8.9.1|8.10.0|8.10.1|8.10.2|8.11.0|8.11.1|8.11.2|8.12.0) echo "version $coq_ver -- good!";; ?*) echo "version $coq_ver -- UNSUPPORTED" if $ignore_coq_version; then echo "Warning: this version of Coq is unsupported, proceed at your own risks." else echo "Error: CompCert requires a version of Coq between 8.8.0 and 8.12.0" missingtools=true fi;; "") echo "NOT FOUND" echo "Error: make sure Coq version 8.11.2 is installed." missingtools=true;; esac echo "Testing OCaml... " | tr -d '\n' ocaml_ver=`ocamlc -version 2>/dev/null` case "$ocaml_ver" in 4.00.*|4.01.*| 4.02.*|4.03.*|4.04.*) echo "version $ocaml_ver -- UNSUPPORTED" echo "Error: CompCert requires OCaml version 4.05 or later." missingtools=true;; 4.*) echo "version $ocaml_ver -- good!";; ?.*) echo "version $ocaml_ver -- UNSUPPORTED" echo "Error: CompCert requires OCaml version 4.05 or later." missingtools=true;; *) echo "NOT FOUND" echo "Error: make sure OCaml version 4.05 or later is installed." missingtools=true;; esac echo "Testing OCaml native-code compiler..." | tr -d '\n' ocamlopt_ver=`ocamlopt -version 2>/dev/null` if test "$ocamlopt_ver" = "$ocaml_ver"; then echo "yes" ocaml_native_comp=true else echo "no, will build to bytecode only" ocaml_native_comp=false fi echo "Testing OCaml .opt compilers... " | tr -d '\n' ocamlopt_opt_ver=`ocamlopt.opt -version 2>/dev/null` if test "$ocamlopt_opt_ver" = "$ocaml_ver"; then echo "yes" ocaml_opt_comp=true else echo "no, will do without" ocaml_opt_comp=false fi MENHIR_REQUIRED=20190626 echo "Testing Menhir... " | tr -d '\n' menhir_ver=`menhir --version 2>/dev/null | sed -n -e 's/^.*version \([0-9]*\).*$/\1/p'` case "$menhir_ver" in 20[0-9][0-9][0-9][0-9][0-9][0-9]) if test "$menhir_ver" -ge $MENHIR_REQUIRED; then echo "version $menhir_ver -- good!" menhir_dir=$(ocamlfind query menhirLib 2>/dev/null) || \ menhir_dir=$(menhir --suggest-menhirLib) || \ menhir_dir="" menhir_dir=$(echo "$menhir_dir" | tr -d '\r' | tr '\\' '/') if test ! -d "$menhir_dir"; then echo "Error: cannot determine the location of the Menhir API library." echo "This can be due to an incorrect Menhir package." echo "Consider using the OPAM package for Menhir." missingtools=true fi else echo "version $menhir_ver -- UNSUPPORTED" echo "Error: CompCert requires a version greater or equal to $MENHIR_REQUIRED." missingtools=true fi;; *) echo "NOT FOUND" echo "Error: make sure Menhir version $MENHIR_REQUIRED or later is installed." missingtools=true;; esac echo "Testing GNU make... " | tr -d '\n' make='' for mk in make gmake gnumake; do make_ver=`$mk -v 2>/dev/null | head -1 | sed -n -e 's/^GNU Make //p'` case "$make_ver" in 3.8*|3.9*|[4-9].*) echo "version $make_ver (command '$mk') -- good!" make="$mk" break;; esac done if test -z "$make"; then echo "NOT FOUND" echo "Error: make sure GNU Make version 3.80 or later is installed." missingtools=true fi if $missingtools; then echo "One or several required tools are missing or too old. Aborting." exit 2 fi # # Generate Makefile.config # sharedir="$(dirname "$bindir")"/share rm -f Makefile.config cat > Makefile.config <<EOF PREFIX=$prefix BINDIR=$bindir LIBDIR=$libdir MANDIR=$sharedir/man SHAREDIR=$sharedir COQDEVDIR=$coqdevdir OCAML_NATIVE_COMP=$ocaml_native_comp OCAML_OPT_COMP=$ocaml_opt_comp MENHIR_DIR=$menhir_dir COMPFLAGS=-bin-annot EOF if test "$target" != "manual"; then cat >> Makefile.config <<EOF ABI=$abi ARCH=$arch ASM_SUPPORTS_CFI=$asm_supports_cfi BITSIZE=$bitsize CASM=$casm CASM_OPTIONS=$casm_options CASMRUNTIME=$casmruntime CC=$cc CLIGHTGEN=$clightgen CLINKER=$clinker CLINKER_OPTIONS=$clinker_options CPREPRO=$cprepro CPREPRO_OPTIONS=$cprepro_options ENDIANNESS=$endianness HAS_RUNTIME_LIB=$has_runtime_lib HAS_STANDARD_HEADERS=$has_standard_headers INSTALL_COQDEV=$install_coqdev LIBMATH=$libmath MODEL=$model SYSTEM=$system RESPONSEFILE=$responsefile LIBRARY_FLOCQ=$library_Flocq LIBRARY_MENHIRLIB=$library_MenhirLib EOF else cat >> Makefile.config <<'EOF' # Target architecture # ARCH=powerpc # ARCH=arm # ARCH=x86 # ARCH=riscV # ARCH=aarch6 ARCH= # Hardware variant # MODEL=ppc32 # for plain PowerPC # MODEL=ppc64 # for PowerPC with 64-bit instructions # MODEL=e5500 # for Freescale e5500 PowerPC variant # MODEL=armv6 # for ARM # MODEL=armv6t2 # for ARM # MODEL=armv7a # for ARM # MODEL=armv7r # for ARM # MODEL=armv7m # for ARM # MODEL=32sse2 # for x86 in 32-bit mode # MODEL=64 # for x86 in 64-bit mode # MODEL=default # for others MODEL= # Target ABI # ABI=eabi # for PowerPC / Linux and other SVR4 or EABI platforms # ABI=eabi # for ARM # ABI=hardfloat # for ARM # ABI=standard # for others ABI= # Target bit width # BITSIZE=64 # for x86 in 64-bit mode, RiscV in 64-bit mode, AArch64 # BITSIZE=32 # otherwise BITSIZE= # Target endianness # ENDIANNESS=big # for ARM or PowerPC # ENDIANNESS=little # for ARM or x86 or RiscV or AArch64 ENDIANNESS= # Target operating system and development environment # # Possible choices for PowerPC: # SYSTEM=linux # SYSTEM=diab # # Possible choices for ARM, AArch64, RiscV: # SYSTEM=linux # # Possible choices for x86: # SYSTEM=linux # SYSTEM=bsd # SYSTEM=macosx # SYSTEM=cygwin SYSTEM= # C compiler for compiling runtime library files and some tests CC=gcc # Preprocessor for .c files CPREPRO=gcc -U__GNUC__ -E # Assembler for assembling .s files CASM=gcc -c # Assembler for assembling runtime library files CASMRUNTIME=gcc -c # Linker CLINKER=gcc # Math library. Set to empty under MacOS X LIBMATH=-lm # Turn on/off the installation and use of the runtime support library HAS_RUNTIME_LIB=true # Turn on/off the installation and use of the standard header files HAS_STANDARD_HEADERS=true # Whether the assembler $(CASM) supports .cfi debug directives ASM_SUPPORTS_CFI=false #ASM_SUPPORTS_CFI=true # Turn on/off compilation of clightgen CLIGHTGEN=false # Whether the other tools support responsefiles in gnu syntax RESPONSEFILE="none" # Whether to use the local copies of Flocq and MenhirLib LIBRARY_FLOCQ=local # external LIBRARY_MENHIRLIB=local # external EOF fi # # Generate Merlin and CoqProject files to simplify development # cat > .merlin <<EOF S lib S common S $arch S backend S cfrontend S driver S debug S exportclight S cparser S extraction B lib B common B $arch B backend B cfrontend B driver B debug B exportclight B cparser B extraction EOF make CoqProject # # Clean up target-dependent files to force their recompilation # rm -f .depend $arch/Archi.vo ${arch}_${bitsize}/Archi.vo runtime/*.o # # Summarize Configuration # if test "$target" = "manual"; then cat <<EOF Please finish the configuration by editing file ./Makefile.config. EOF else bindirexp=`echo "$bindir" | sed -e "s|\\\$(PREFIX)|$prefix|"` libdirexp=`echo "$libdir" | sed -e "s|\\\$(PREFIX)|$prefix|"` coqdevdirexp=`echo "$coqdevdir" | sed -e "s|\\\$(PREFIX)|$prefix|"` cat <<EOF CompCert configuration: Target architecture........... $arch Hardware model................ $model Application binary interface.. $abi Endianness.................... $endianness OS and development env........ $system C compiler.................... $cc C preprocessor................ $cprepro Assembler..................... $casm Assembler supports CFI........ $asm_supports_cfi Assembler for runtime lib..... $casmruntime Linker........................ $clinker Linker needs '-no-pie'........ $clinker_needs_no_pie Math library.................. $libmath Build command to use.......... $make Menhir API library............ $menhir_dir The Flocq library............. $library_Flocq The MenhirLib library......... $library_MenhirLib Binaries installed in......... $bindirexp Runtime library provided...... $has_runtime_lib Library files installed in.... $libdirexp Standard headers provided..... $has_standard_headers Standard headers installed in. $libdirexp/include EOF if $install_coqdev; then cat <<EOF Coq development installed in.. $coqdevdirexp EOF else cat <<EOF Coq development will not be installed EOF fi fi
{ "pile_set_name": "Github" }
<?php /** * SessionTest file * * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html> * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Model.Datasource * @since CakePHP(tm) v 1.2.0.4206 * @license http://www.opensource.org/licenses/mit-license.php MIT License */ App::uses('CakeSession', 'Model/Datasource'); App::uses('DatabaseSession', 'Model/Datasource/Session'); App::uses('CacheSession', 'Model/Datasource/Session'); /** * Class TestCakeSession * * @package Cake.Test.Case.Model.Datasource */ class TestCakeSession extends CakeSession { public static function setUserAgent($value) { static::$_userAgent = $value; } public static function setHost($host) { static::_setHost($host); } } /** * Class TestCacheSession * * @package Cake.Test.Case.Model.Datasource */ class TestCacheSession extends CacheSession { protected function _writeSession() { return true; } } /** * Class TestDatabaseSession * * @package Cake.Test.Case.Model.Datasource */ class TestDatabaseSession extends DatabaseSession { protected function _writeSession() { return true; } } /** * CakeSessionTest class * * @package Cake.Test.Case.Model.Datasource */ class CakeSessionTest extends CakeTestCase { protected static $_gcDivisor; /** * Fixtures used in the SessionTest * * @var array */ public $fixtures = array('core.session'); /** * setup before class. * * @return void */ public static function setupBeforeClass() { // Make sure garbage colector will be called static::$_gcDivisor = ini_get('session.gc_divisor'); ini_set('session.gc_divisor', '1'); } /** * teardown after class * * @return void */ public static function teardownAfterClass() { // Revert to the default setting ini_set('session.gc_divisor', static::$_gcDivisor); } /** * setUp method * * @return void */ public function setUp() { parent::setUp(); Configure::write('Session', array( 'defaults' => 'php', 'cookie' => 'cakephp', 'timeout' => 120, 'cookieTimeout' => 120, 'ini' => array(), )); } /** * tearDown method * * @return void */ public function tearDown() { if (TestCakeSession::started()) { session_write_close(); } unset($_SESSION); parent::tearDown(); } /** * test setting ini properties with Session configuration. * * @return void */ public function testSessionConfigIniSetting() { $_SESSION = null; Configure::write('Session', array( 'cookie' => 'test', 'checkAgent' => false, 'timeout' => 86400, 'ini' => array( 'session.referer_check' => 'example.com', 'session.use_trans_sid' => false ) )); TestCakeSession::start(); $this->assertEquals('', ini_get('session.use_trans_sid'), 'Ini value is incorrect'); $this->assertEquals('example.com', ini_get('session.referer_check'), 'Ini value is incorrect'); $this->assertEquals('test', ini_get('session.name'), 'Ini value is incorrect'); } /** * testSessionPath * * @return void */ public function testSessionPath() { TestCakeSession::init('/index.php'); $this->assertEquals('/', TestCakeSession::$path); TestCakeSession::init('/sub_dir/index.php'); $this->assertEquals('/sub_dir/', TestCakeSession::$path); } /** * testCakeSessionPathEmpty * * @return void */ public function testCakeSessionPathEmpty() { TestCakeSession::init(''); $this->assertEquals('/', TestCakeSession::$path, 'Session path is empty, with "" as $base needs to be /'); } /** * testCakeSessionPathContainsParams * * @return void */ public function testCakeSessionPathContainsQuestion() { TestCakeSession::init('/index.php?'); $this->assertEquals('/', TestCakeSession::$path); } /** * testSetHost * * @return void */ public function testSetHost() { TestCakeSession::init(); TestCakeSession::setHost('cakephp.org'); $this->assertEquals('cakephp.org', TestCakeSession::$host); } /** * testSetHostWithPort * * @return void */ public function testSetHostWithPort() { TestCakeSession::init(); TestCakeSession::setHost('cakephp.org:443'); $this->assertEquals('cakephp.org', TestCakeSession::$host); } /** * test valid with bogus user agent. * * @return void */ public function testValidBogusUserAgent() { Configure::write('Session.checkAgent', true); TestCakeSession::start(); $this->assertTrue(TestCakeSession::valid(), 'Newly started session should be valid'); TestCakeSession::userAgent('bogus!'); $this->assertFalse(TestCakeSession::valid(), 'user agent mismatch should fail.'); } /** * test valid with bogus user agent. * * @return void */ public function testValidTimeExpiry() { Configure::write('Session.checkAgent', true); TestCakeSession::start(); $this->assertTrue(TestCakeSession::valid(), 'Newly started session should be valid'); TestCakeSession::$time = strtotime('next year'); $this->assertFalse(TestCakeSession::valid(), 'time should cause failure.'); } /** * testCheck method * * @return void */ public function testCheck() { TestCakeSession::write('SessionTestCase', 'value'); $this->assertTrue(TestCakeSession::check('SessionTestCase')); $this->assertFalse(TestCakeSession::check('NotExistingSessionTestCase')); } /** * testSimpleRead method * * @return void */ public function testSimpleRead() { TestCakeSession::write('testing', '1,2,3'); $result = TestCakeSession::read('testing'); $this->assertEquals('1,2,3', $result); TestCakeSession::write('testing', array('1' => 'one', '2' => 'two', '3' => 'three')); $result = TestCakeSession::read('testing.1'); $this->assertEquals('one', $result); $result = TestCakeSession::read('testing'); $this->assertEquals(array('1' => 'one', '2' => 'two', '3' => 'three'), $result); $result = TestCakeSession::read(); $this->assertTrue(isset($result['testing'])); $this->assertTrue(isset($result['Config'])); $this->assertTrue(isset($result['Config']['userAgent'])); TestCakeSession::write('This.is.a.deep.array.my.friend', 'value'); $result = TestCakeSession::read('This.is.a.deep.array.my.friend'); $this->assertEquals('value', $result); } /** * testReadyEmpty * * @return void */ public function testReadyEmpty() { $this->assertNull(TestCakeSession::read('')); } /** * test writing a hash of values/ * * @return void */ public function testWriteArray() { $result = TestCakeSession::write(array( 'one' => 1, 'two' => 2, 'three' => array('something'), 'null' => null )); $this->assertTrue($result); $this->assertEquals(1, TestCakeSession::read('one')); $this->assertEquals(array('something'), TestCakeSession::read('three')); $this->assertEquals(null, TestCakeSession::read('null')); } /** * testWriteEmptyKey * * @return void */ public function testWriteEmptyKey() { $this->assertFalse(TestCakeSession::write('', 'graham')); $this->assertFalse(TestCakeSession::write('', '')); $this->assertFalse(TestCakeSession::write('')); } /** * Test overwriting a string value as if it were an array. * * @return void */ public function testWriteOverwriteStringValue() { TestCakeSession::write('Some.string', 'value'); $this->assertEquals('value', TestCakeSession::read('Some.string')); TestCakeSession::write('Some.string.array', array('values')); $this->assertEquals( array('values'), TestCakeSession::read('Some.string.array') ); } /** * Test consuming session data. * * @return void */ public function testConsume() { TestCakeSession::write('Some.string', 'value'); TestCakeSession::write('Some.array', array('key1' => 'value1', 'key2' => 'value2')); $this->assertEquals('value', TestCakeSession::read('Some.string')); $value = TestCakeSession::consume('Some.string'); $this->assertEquals('value', $value); $this->assertFalse(TestCakeSession::check('Some.string')); $value = TestCakeSession::consume(''); $this->assertNull($value); $value = TestCakeSession::consume(null); $this->assertNull($value); $value = TestCakeSession::consume('Some.array'); $expected = array('key1' => 'value1', 'key2' => 'value2'); $this->assertEquals($expected, $value); $this->assertFalse(TestCakeSession::check('Some.array')); } /** * testId method * * @return void */ public function testId() { TestCakeSession::destroy(); $result = TestCakeSession::id(); $expected = session_id(); $this->assertEquals($expected, $result); TestCakeSession::id('MySessionId'); $result = TestCakeSession::id(); $this->assertEquals('MySessionId', $result); } /** * testStarted method * * @return void */ public function testStarted() { unset($_SESSION); $_SESSION = null; $this->assertFalse(TestCakeSession::started()); $this->assertTrue(TestCakeSession::start()); $this->assertTrue(TestCakeSession::started()); } /** * testDel method * * @return void */ public function testDelete() { $this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out')); $this->assertTrue(TestCakeSession::delete('Delete.me')); $this->assertFalse(TestCakeSession::check('Delete.me')); $this->assertTrue(TestCakeSession::check('Delete')); $this->assertTrue(TestCakeSession::write('Clearing.sale', 'everything must go')); $this->assertFalse(TestCakeSession::delete('')); $this->assertTrue(TestCakeSession::check('Clearing.sale')); $this->assertFalse(TestCakeSession::delete(null)); $this->assertTrue(TestCakeSession::check('Clearing.sale')); $this->assertTrue(TestCakeSession::delete('Clearing')); $this->assertFalse(TestCakeSession::check('Clearing.sale')); $this->assertFalse(TestCakeSession::check('Clearing')); } /** * testClear method * * @return void */ public function testClear() { $this->assertTrue(TestCakeSession::write('Delete.me', 'Clearing out')); TestCakeSession::clear(false); $this->assertFalse(TestCakeSession::check('Delete.me')); $this->assertFalse(TestCakeSession::check('Delete')); TestCakeSession::write('Some.string', 'value'); TestCakeSession::clear(false); $this->assertNull(TestCakeSession::read('Some')); TestCakeSession::write('Some.string.array', array('values')); TestCakeSession::clear(false); $this->assertFalse(TestCakeSession::read()); } /** * testDestroy method * * @return void */ public function testDestroy() { TestCakeSession::write('bulletProof', 'invincible'); $id = TestCakeSession::id(); TestCakeSession::destroy(); $this->assertFalse(TestCakeSession::check('bulletProof')); $this->assertNotEquals(TestCakeSession::id(), $id); } /** * testCheckingSavedEmpty method * * @return void */ public function testCheckingSavedEmpty() { $this->assertTrue(TestCakeSession::write('SessionTestCase', 0)); $this->assertTrue(TestCakeSession::check('SessionTestCase')); $this->assertTrue(TestCakeSession::write('SessionTestCase', '0')); $this->assertTrue(TestCakeSession::check('SessionTestCase')); $this->assertTrue(TestCakeSession::write('SessionTestCase', false)); $this->assertTrue(TestCakeSession::check('SessionTestCase')); $this->assertTrue(TestCakeSession::write('SessionTestCase', null)); $this->assertFalse(TestCakeSession::check('SessionTestCase')); } /** * testCheckKeyWithSpaces method * * @return void */ public function testCheckKeyWithSpaces() { $this->assertTrue(TestCakeSession::write('Session Test', "test")); $this->assertTrue(TestCakeSession::check('Session Test')); TestCakeSession::delete('Session Test'); $this->assertTrue(TestCakeSession::write('Session Test.Test Case', "test")); $this->assertTrue(TestCakeSession::check('Session Test.Test Case')); } /** * testCheckEmpty * * @return void */ public function testCheckEmpty() { $this->assertFalse(TestCakeSession::check('')); $this->assertFalse(TestCakeSession::check(null)); } /** * test key exploitation * * @return void */ public function testKeyExploit() { $key = "a'] = 1; phpinfo(); \$_SESSION['a"; $result = TestCakeSession::write($key, 'haxored'); $this->assertFalse($result); $result = TestCakeSession::read($key); $this->assertNull($result); } /** * testReadingSavedEmpty method * * @return void */ public function testReadingSavedEmpty() { TestCakeSession::write('SessionTestCase', 0); $this->assertEquals(0, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', '0'); $this->assertEquals('0', TestCakeSession::read('SessionTestCase')); $this->assertFalse(TestCakeSession::read('SessionTestCase') === 0); TestCakeSession::write('SessionTestCase', false); $this->assertFalse(TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', null); $this->assertEquals(null, TestCakeSession::read('SessionTestCase')); } /** * testCheckUserAgentFalse method * * @return void */ public function testCheckUserAgentFalse() { Configure::write('Session.checkAgent', false); TestCakeSession::setUserAgent(md5('http://randomdomainname.com' . Configure::read('Security.salt'))); $this->assertTrue(TestCakeSession::valid()); } /** * testCheckUserAgentTrue method * * @return void */ public function testCheckUserAgentTrue() { Configure::write('Session.checkAgent', true); TestCakeSession::$error = false; $agent = md5('http://randomdomainname.com' . Configure::read('Security.salt')); TestCakeSession::write('Config.userAgent', md5('Hacking you!')); TestCakeSession::setUserAgent($agent); $this->assertFalse(TestCakeSession::valid()); } /** * testReadAndWriteWithCakeStorage method * * @return void */ public function testReadAndWriteWithCakeStorage() { Configure::write('Session.defaults', 'cake'); TestCakeSession::init(); TestCakeSession::start(); TestCakeSession::write('SessionTestCase', 0); $this->assertEquals(0, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', '0'); $this->assertEquals('0', TestCakeSession::read('SessionTestCase')); $this->assertFalse(TestCakeSession::read('SessionTestCase') === 0); TestCakeSession::write('SessionTestCase', false); $this->assertFalse(TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', null); $this->assertEquals(null, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', 'This is a Test'); $this->assertEquals('This is a Test', TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', 'This is a Test'); TestCakeSession::write('SessionTestCase', 'This was updated'); $this->assertEquals('This was updated', TestCakeSession::read('SessionTestCase')); TestCakeSession::destroy(); $this->assertNull(TestCakeSession::read('SessionTestCase')); } /** * test using a handler from app/Model/Datasource/Session. * * @return void */ public function testUsingAppLibsHandler() { App::build(array( 'Model/Datasource/Session' => array( CAKE . 'Test' . DS . 'test_app' . DS . 'Model' . DS . 'Datasource' . DS . 'Session' . DS ), 'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), App::RESET); Configure::write('Session', array( 'defaults' => 'cake', 'handler' => array( 'engine' => 'TestAppLibSession' ) )); TestCakeSession::start(); $this->assertTrue(TestCakeSession::started()); TestCakeSession::destroy(); $this->assertFalse(TestCakeSession::started()); App::build(); } /** * test using a handler from a plugin. * * @return void */ public function testUsingPluginHandler() { App::build(array( 'Plugin' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS) ), App::RESET); CakePlugin::load('TestPlugin'); Configure::write('Session', array( 'defaults' => 'cake', 'handler' => array( 'engine' => 'TestPlugin.TestPluginSession' ) )); TestCakeSession::start(); $this->assertTrue(TestCakeSession::started()); TestCakeSession::destroy(); $this->assertFalse(TestCakeSession::started()); App::build(); } /** * testReadAndWriteWithCacheStorage method * * @return void */ public function testReadAndWriteWithCacheStorage() { Configure::write('Session.defaults', 'cache'); Configure::write('Session.handler.engine', 'TestCacheSession'); TestCakeSession::init(); TestCakeSession::destroy(); TestCakeSession::write('SessionTestCase', 0); $this->assertEquals(0, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', '0'); $this->assertEquals('0', TestCakeSession::read('SessionTestCase')); $this->assertFalse(TestCakeSession::read('SessionTestCase') === 0); TestCakeSession::write('SessionTestCase', false); $this->assertFalse(TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', null); $this->assertEquals(null, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', 'This is a Test'); $this->assertEquals('This is a Test', TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', 'This is a Test'); TestCakeSession::write('SessionTestCase', 'This was updated'); $this->assertEquals('This was updated', TestCakeSession::read('SessionTestCase')); TestCakeSession::destroy(); $this->assertNull(TestCakeSession::read('SessionTestCase')); } /** * test that changing the config name of the cache config works. * * @return void */ public function testReadAndWriteWithCustomCacheConfig() { Configure::write('Session.defaults', 'cache'); Configure::write('Session.handler.engine', 'TestCacheSession'); Configure::write('Session.handler.config', 'session_test'); Cache::config('session_test', array( 'engine' => 'File', 'prefix' => 'session_test_', )); TestCakeSession::init(); TestCakeSession::start(); TestCakeSession::write('SessionTestCase', 'Some value'); $this->assertEquals('Some value', TestCakeSession::read('SessionTestCase')); $id = TestCakeSession::id(); Cache::delete($id, 'session_test'); } /** * testReadAndWriteWithDatabaseStorage method * * @return void */ public function testReadAndWriteWithDatabaseStorage() { Configure::write('Session.defaults', 'database'); Configure::write('Session.handler.engine', 'TestDatabaseSession'); Configure::write('Session.handler.table', 'sessions'); Configure::write('Session.handler.model', 'Session'); Configure::write('Session.handler.database', 'test'); TestCakeSession::init(); $this->assertNull(TestCakeSession::id()); TestCakeSession::start(); $expected = session_id(); $this->assertEquals($expected, TestCakeSession::id()); TestCakeSession::renew(); $this->assertFalse($expected === TestCakeSession::id()); $expected = session_id(); $this->assertEquals($expected, TestCakeSession::id()); TestCakeSession::write('SessionTestCase', 0); $this->assertEquals(0, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', '0'); $this->assertEquals('0', TestCakeSession::read('SessionTestCase')); $this->assertFalse(TestCakeSession::read('SessionTestCase') === 0); TestCakeSession::write('SessionTestCase', false); $this->assertFalse(TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', null); $this->assertEquals(null, TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', 'This is a Test'); $this->assertEquals('This is a Test', TestCakeSession::read('SessionTestCase')); TestCakeSession::write('SessionTestCase', 'Some additional data'); $this->assertEquals('Some additional data', TestCakeSession::read('SessionTestCase')); TestCakeSession::destroy(); $this->assertNull(TestCakeSession::read('SessionTestCase')); Configure::write('Session', array( 'defaults' => 'php' )); TestCakeSession::init(); } /** * testSessionTimeout method * * @return void */ public function testSessionTimeout() { Configure::write('debug', 2); Configure::write('Session.defaults', 'cake'); Configure::write('Session.autoRegenerate', false); $timeoutSeconds = Configure::read('Session.timeout') * 60; TestCakeSession::destroy(); TestCakeSession::write('Test', 'some value'); $this->assertWithinMargin(time() + $timeoutSeconds, CakeSession::$sessionTime, 1); $this->assertEquals(10, $_SESSION['Config']['countdown']); $this->assertWithinMargin(CakeSession::$sessionTime, $_SESSION['Config']['time'], 1); $this->assertWithinMargin(time(), CakeSession::$time, 1); $this->assertWithinMargin(time() + $timeoutSeconds, $_SESSION['Config']['time'], 1); Configure::write('Session.harden', true); TestCakeSession::destroy(); TestCakeSession::write('Test', 'some value'); $this->assertWithinMargin(time() + $timeoutSeconds, CakeSession::$sessionTime, 1); $this->assertEquals(10, $_SESSION['Config']['countdown']); $this->assertWithinMargin(CakeSession::$sessionTime, $_SESSION['Config']['time'], 1); $this->assertWithinMargin(time(), CakeSession::$time, 1); $this->assertWithinMargin(CakeSession::$time + $timeoutSeconds, $_SESSION['Config']['time'], 1); } /** * Test that cookieTimeout matches timeout when unspecified. * * @return void */ public function testCookieTimeoutFallback() { $_SESSION = null; Configure::write('Session', array( 'defaults' => 'cake', 'timeout' => 400, )); TestCakeSession::start(); $this->assertEquals(400, Configure::read('Session.cookieTimeout')); $this->assertEquals(400, Configure::read('Session.timeout')); $this->assertEquals(400 * 60, ini_get('session.cookie_lifetime')); $this->assertEquals(400 * 60, ini_get('session.gc_maxlifetime')); $_SESSION = null; Configure::write('Session', array( 'defaults' => 'cake', 'timeout' => 400, 'cookieTimeout' => 600 )); TestCakeSession::start(); $this->assertEquals(600, Configure::read('Session.cookieTimeout')); $this->assertEquals(400, Configure::read('Session.timeout')); } /** * Proves that invalid sessions will be destroyed and re-created * if invalid * * @return void */ public function testInvalidSessionRenew() { TestCakeSession::start(); $this->assertNotEmpty($_SESSION['Config']); $data = $_SESSION; session_write_close(); $_SESSION = null; TestCakeSession::start(); $this->assertEquals($data, $_SESSION); TestCakeSession::write('Foo', 'Bar'); session_write_close(); $_SESSION = null; TestCakeSession::userAgent('bogus!'); TestCakeSession::start(); $this->assertNotEquals($data, $_SESSION); $this->assertEquals('bogus!', $_SESSION['Config']['userAgent']); } }
{ "pile_set_name": "Github" }
var Symbol = require('./_Symbol'), copyArray = require('./_copyArray'), getTag = require('./_getTag'), isArrayLike = require('./isArrayLike'), isString = require('./isString'), iteratorToArray = require('./_iteratorToArray'), mapToArray = require('./_mapToArray'), setToArray = require('./_setToArray'), stringToArray = require('./_stringToArray'), values = require('./values'); /** `Object#toString` result references. */ var mapTag = '[object Map]', setTag = '[object Set]'; /** Built-in value references. */ var symIterator = Symbol ? Symbol.iterator : undefined; /** * Converts `value` to an array. * * @static * @since 0.1.0 * @memberOf _ * @category Lang * @param {*} value The value to convert. * @returns {Array} Returns the converted array. * @example * * _.toArray({ 'a': 1, 'b': 2 }); * // => [1, 2] * * _.toArray('abc'); * // => ['a', 'b', 'c'] * * _.toArray(1); * // => [] * * _.toArray(null); * // => [] */ function toArray(value) { if (!value) { return []; } if (isArrayLike(value)) { return isString(value) ? stringToArray(value) : copyArray(value); } if (symIterator && value[symIterator]) { return iteratorToArray(value[symIterator]()); } var tag = getTag(value), func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); return func(value); } module.exports = toArray;
{ "pile_set_name": "Github" }
StartChar: uni062E.medi_BaaHaaMemInit Encoding: 1116760 -1 2932 Width: 209 Flags: HW AnchorPoint: "TashkilAbove" 154 801 basechar 0 AnchorPoint: "TashkilBelow" 173 -327 basechar 0 LayerCount: 2 Fore Refer: 191 -1 N 1 0 0 1 -36 559 2 Refer: 178 -1 N 1 0 0 1 0 0 3 EndChar
{ "pile_set_name": "Github" }
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG), # acting on behalf of its Max Planck Institute for Intelligent Systems and the # Max Planck Institute for Biological Cybernetics. All rights reserved. # # Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V. (MPG) is holder of all proprietary rights # on this computer program. You can only use this computer program if you have closed a license agreement # with MPG or you get the right to use the computer program from someone who is authorized to grant you that right. # Any use of the computer program without a valid license is prohibited and liable to prosecution. # Contact: [email protected] # # # If you use this code in a research publication please consider citing the following: # # AMASS: Archive of Motion Capture as Surface Shapes <https://arxiv.org/abs/1904.03278> # # # Code Developed by: # Nima Ghorbani <https://nghorbani.github.io/> # # 2019.08.09 from setuptools import setup, find_packages setup(name='amass', version='0.1.0', packages=find_packages(), include_package_data=True, author='Nima Ghorbani', author_email='[email protected]', maintainer='Nima Ghorbani', maintainer_email='[email protected]', url='https://github.com/nghorbani/amass', description='AMASS: Archive of Motion Capture as Surface Shapes', long_description=open("README.md").read(), long_description_content_type="text/markdown", install_requires=['torch==1.1.0', 'human_body_prior', 'trimesh', 'pyrender', 'numpy'], dependency_links=[ "https://github.com/nghorbani/configer/tarball/master#egg=configer" "https://github.com/nghorbani/human_body_prior/tarball/master#egg=human_body_prior" ], classifiers=[ "Intended Audience :: Developers", "Intended Audience :: Researchers", "Natural Language :: English", "Operating System :: MacOS :: MacOS X", "Operating System :: POSIX", "Operating System :: POSIX :: BSD", "Operating System :: POSIX :: Linux", "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.7", ], )
{ "pile_set_name": "Github" }
// Licensed to Elasticsearch B.V under one or more agreements. // Elasticsearch B.V. licenses this file to you under the Apache 2.0 License. // See the LICENSE file in the project root for more information. // // Code generated, DO NOT EDIT package elasticsearch_test import ( "fmt" "os" "strings" "testing" "github.com/elastic/go-elasticsearch/v8" ) var ( _ = fmt.Printf _ = os.Stdout _ = elasticsearch.NewDefaultClient ) // <https://github.com/elastic/elasticsearch/blob/master/docs/reference/mapping/types/nested.asciidoc#L58> // // -------------------------------------------------------------------------------- // GET my-index-000001/_search // { // "query": { // "bool": { // "must": [ // { "match": { "user.first": "Alice" }}, // { "match": { "user.last": "Smith" }} // ] // } // } // } // -------------------------------------------------------------------------------- func Test_mapping_types_nested_5553cf7a02c22f616cd994747f2dd5a5(t *testing.T) { es, _ := elasticsearch.NewDefaultClient() // tag:5553cf7a02c22f616cd994747f2dd5a5[] res, err := es.Search( es.Search.WithIndex("my-index-000001"), es.Search.WithBody(strings.NewReader(`{ "query": { "bool": { "must": [ { "match": { "user.first": "Alice" } }, { "match": { "user.last": "Smith" } } ] } } }`)), es.Search.WithPretty(), ) fmt.Println(res, err) if err != nil { // SKIP t.Fatalf("Error getting the response: %s", err) // SKIP } // SKIP defer res.Body.Close() // SKIP // end:5553cf7a02c22f616cd994747f2dd5a5[] }
{ "pile_set_name": "Github" }
defmodule BowlingTest do use ExUnit.Case defp roll_reduce(game, rolls) do Enum.reduce(rolls, game, fn roll, game -> Bowling.roll(game, roll) end) end test "should be able to score a game with all zeros" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == 0 end @tag :pending test "should be able to score a game with no strikes or spares" do game = Bowling.start() rolls = [3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6, 3, 6] game = roll_reduce(game, rolls) assert Bowling.score(game) == 90 end @tag :pending test "a spare followed by zeros is worth ten points" do game = Bowling.start() rolls = [6, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == 10 end @tag :pending test "points scored in the roll after a spare are counted twice" do game = Bowling.start() rolls = [6, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == 16 end @tag :pending test "consecutive spares each get a one roll bonus" do game = Bowling.start() rolls = [5, 5, 3, 7, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == 31 end @tag :pending test "a spare in the last frame gets a one roll bonus that is counted once" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 7] game = roll_reduce(game, rolls) assert Bowling.score(game) == 17 end @tag :pending test "a strike earns ten points in a frame with a single roll" do game = Bowling.start() rolls = [10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == 10 end @tag :pending test "points scored in the two rolls after a strike are counted twice as a bonus" do game = Bowling.start() rolls = [10, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == 26 end @tag :pending test "consecutive strikes each get the two roll bonus" do game = Bowling.start() rolls = [10, 10, 10, 5, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == 81 end @tag :pending test "a strike in the last frame gets a two roll bonus that is counted once" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 7, 1] game = roll_reduce(game, rolls) assert Bowling.score(game) == 18 end @tag :pending test "rolling a spare with the two roll bonus does not get a bonus roll" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 7, 3] game = roll_reduce(game, rolls) assert Bowling.score(game) == 20 end @tag :pending test "strikes with the two roll bonus do not get bonus rolls" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 10] game = roll_reduce(game, rolls) assert Bowling.score(game) == 30 end @tag :pending test "a strike with the one roll bonus after a spare in the last frame does not get a bonus" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 10] game = roll_reduce(game, rolls) assert Bowling.score(game) == 20 end @tag :pending test "all strikes is a perfect game" do game = Bowling.start() rolls = [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10] game = roll_reduce(game, rolls) assert Bowling.score(game) == 300 end @tag :pending test "rolls cannot score negative points" do game = Bowling.start() assert Bowling.roll(game, -1) == {:error, "Negative roll is invalid"} end @tag :pending test "a roll cannot score more than 10 points" do game = Bowling.start() assert Bowling.roll(game, 11) == {:error, "Pin count exceeds pins on the lane"} end @tag :pending test "two rolls in a frame cannot score more than 10 points" do game = Bowling.start() game = Bowling.roll(game, 5) assert Bowling.roll(game, 6) == {:error, "Pin count exceeds pins on the lane"} end @tag :pending test "bonus roll after a strike in the last frame cannot score more than 10 points" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10] game = roll_reduce(game, rolls) assert Bowling.roll(game, 11) == {:error, "Pin count exceeds pins on the lane"} end @tag :pending test "two bonus rolls after a strike in the last frame cannot score more than 10 points" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 5] game = roll_reduce(game, rolls) assert Bowling.roll(game, 6) == {:error, "Pin count exceeds pins on the lane"} end @tag :pending test "two bonus rolls after a strike in the last frame can score more than 10 points if one is a strike" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10, 6] game = roll_reduce(game, rolls) assert Bowling.score(game) == 26 end @tag :pending test "the second bonus rolls after a strike in the last frame cannot be a strike if the first one is not a strike" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 6] game = roll_reduce(game, rolls) assert Bowling.roll(game, 10) == {:error, "Pin count exceeds pins on the lane"} end @tag :pending test "second bonus roll after a strike in the last frame cannot score more than 10 points" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10] game = roll_reduce(game, rolls) assert Bowling.roll(game, 11) == {:error, "Pin count exceeds pins on the lane"} end @tag :pending test "an unstarted game cannot be scored" do game = Bowling.start() assert Bowling.score(game) == {:error, "Score cannot be taken until the end of the game"} end @tag :pending test "an incomplete game cannot be scored" do game = Bowling.start() rolls = [0, 0] game = roll_reduce(game, rolls) assert Bowling.score(game) == {:error, "Score cannot be taken until the end of the game"} end @tag :pending test "cannot roll if game already has ten frames" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] game = roll_reduce(game, rolls) assert Bowling.roll(game, 0) == {:error, "Cannot roll after game is over"} end @tag :pending test "bonus rolls for a strike in the last frame must be rolled before score can be calculated" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10] game = roll_reduce(game, rolls) assert Bowling.score(game) == {:error, "Score cannot be taken until the end of the game"} end @tag :pending test "both bonus rolls for a strike in the last frame must be rolled before score can be calculated" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 10] game = roll_reduce(game, rolls) assert Bowling.score(game) == {:error, "Score cannot be taken until the end of the game"} end @tag :pending test "bonus roll for a spare in the last frame must be rolled before score can be calculated" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3] game = roll_reduce(game, rolls) assert Bowling.score(game) == {:error, "Score cannot be taken until the end of the game"} end @tag :pending test "cannot roll after bonus roll for spare" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 3, 2] game = roll_reduce(game, rolls) assert Bowling.roll(game, 2) == {:error, "Cannot roll after game is over"} end @tag :pending test "cannot roll after bonus roll for strike" do game = Bowling.start() rolls = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 10, 3, 2] game = roll_reduce(game, rolls) assert Bowling.roll(game, 2) == {:error, "Cannot roll after game is over"} end end
{ "pile_set_name": "Github" }
# This OWNERS file also covers: # # //chrome/browser/background_fetch/ # //content/common/background_fetch/ [email protected] [email protected] [email protected] # TEAM: [email protected] # COMPONENT: Blink>BackgroundFetch
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef AST_DRAM_TABLES_H #define AST_DRAM_TABLES_H /* DRAM timing tables */ struct ast_dramstruct { u16 index; u32 data; }; static const struct ast_dramstruct ast2000_dram_table_data[] = { { 0x0108, 0x00000000 }, { 0x0120, 0x00004a21 }, { 0xFF00, 0x00000043 }, { 0x0000, 0xFFFFFFFF }, { 0x0004, 0x00000089 }, { 0x0008, 0x22331353 }, { 0x000C, 0x0d07000b }, { 0x0010, 0x11113333 }, { 0x0020, 0x00110350 }, { 0x0028, 0x1e0828f0 }, { 0x0024, 0x00000001 }, { 0x001C, 0x00000000 }, { 0x0014, 0x00000003 }, { 0xFF00, 0x00000043 }, { 0x0018, 0x00000131 }, { 0x0014, 0x00000001 }, { 0xFF00, 0x00000043 }, { 0x0018, 0x00000031 }, { 0x0014, 0x00000001 }, { 0xFF00, 0x00000043 }, { 0x0028, 0x1e0828f1 }, { 0x0024, 0x00000003 }, { 0x002C, 0x1f0f28fb }, { 0x0030, 0xFFFFFE01 }, { 0xFFFF, 0xFFFFFFFF } }; static const struct ast_dramstruct ast1100_dram_table_data[] = { { 0x2000, 0x1688a8a8 }, { 0x2020, 0x000041f0 }, { 0xFF00, 0x00000043 }, { 0x0000, 0xfc600309 }, { 0x006C, 0x00909090 }, { 0x0064, 0x00050000 }, { 0x0004, 0x00000585 }, { 0x0008, 0x0011030f }, { 0x0010, 0x22201724 }, { 0x0018, 0x1e29011a }, { 0x0020, 0x00c82222 }, { 0x0014, 0x01001523 }, { 0x001C, 0x1024010d }, { 0x0024, 0x00cb2522 }, { 0x0038, 0xffffff82 }, { 0x003C, 0x00000000 }, { 0x0040, 0x00000000 }, { 0x0044, 0x00000000 }, { 0x0048, 0x00000000 }, { 0x004C, 0x00000000 }, { 0x0050, 0x00000000 }, { 0x0054, 0x00000000 }, { 0x0058, 0x00000000 }, { 0x005C, 0x00000000 }, { 0x0060, 0x032aa02a }, { 0x0064, 0x002d3000 }, { 0x0068, 0x00000000 }, { 0x0070, 0x00000000 }, { 0x0074, 0x00000000 }, { 0x0078, 0x00000000 }, { 0x007C, 0x00000000 }, { 0x0034, 0x00000001 }, { 0xFF00, 0x00000043 }, { 0x002C, 0x00000732 }, { 0x0030, 0x00000040 }, { 0x0028, 0x00000005 }, { 0x0028, 0x00000007 }, { 0x0028, 0x00000003 }, { 0x0028, 0x00000001 }, { 0x000C, 0x00005a08 }, { 0x002C, 0x00000632 }, { 0x0028, 0x00000001 }, { 0x0030, 0x000003c0 }, { 0x0028, 0x00000003 }, { 0x0030, 0x00000040 }, { 0x0028, 0x00000003 }, { 0x000C, 0x00005a21 }, { 0x0034, 0x00007c03 }, { 0x0120, 0x00004c41 }, { 0xffff, 0xffffffff }, }; static const struct ast_dramstruct ast2100_dram_table_data[] = { { 0x2000, 0x1688a8a8 }, { 0x2020, 0x00004120 }, { 0xFF00, 0x00000043 }, { 0x0000, 0xfc600309 }, { 0x006C, 0x00909090 }, { 0x0064, 0x00070000 }, { 0x0004, 0x00000489 }, { 0x0008, 0x0011030f }, { 0x0010, 0x32302926 }, { 0x0018, 0x274c0122 }, { 0x0020, 0x00ce2222 }, { 0x0014, 0x01001523 }, { 0x001C, 0x1024010d }, { 0x0024, 0x00cb2522 }, { 0x0038, 0xffffff82 }, { 0x003C, 0x00000000 }, { 0x0040, 0x00000000 }, { 0x0044, 0x00000000 }, { 0x0048, 0x00000000 }, { 0x004C, 0x00000000 }, { 0x0050, 0x00000000 }, { 0x0054, 0x00000000 }, { 0x0058, 0x00000000 }, { 0x005C, 0x00000000 }, { 0x0060, 0x0f2aa02a }, { 0x0064, 0x003f3005 }, { 0x0068, 0x02020202 }, { 0x0070, 0x00000000 }, { 0x0074, 0x00000000 }, { 0x0078, 0x00000000 }, { 0x007C, 0x00000000 }, { 0x0034, 0x00000001 }, { 0xFF00, 0x00000043 }, { 0x002C, 0x00000942 }, { 0x0030, 0x00000040 }, { 0x0028, 0x00000005 }, { 0x0028, 0x00000007 }, { 0x0028, 0x00000003 }, { 0x0028, 0x00000001 }, { 0x000C, 0x00005a08 }, { 0x002C, 0x00000842 }, { 0x0028, 0x00000001 }, { 0x0030, 0x000003c0 }, { 0x0028, 0x00000003 }, { 0x0030, 0x00000040 }, { 0x0028, 0x00000003 }, { 0x000C, 0x00005a21 }, { 0x0034, 0x00007c03 }, { 0x0120, 0x00005061 }, { 0xffff, 0xffffffff }, }; /* * AST2500 DRAM settings modules */ #define REGTBL_NUM 17 #define REGIDX_010 0 #define REGIDX_014 1 #define REGIDX_018 2 #define REGIDX_020 3 #define REGIDX_024 4 #define REGIDX_02C 5 #define REGIDX_030 6 #define REGIDX_214 7 #define REGIDX_2E0 8 #define REGIDX_2E4 9 #define REGIDX_2E8 10 #define REGIDX_2EC 11 #define REGIDX_2F0 12 #define REGIDX_2F4 13 #define REGIDX_2F8 14 #define REGIDX_RFC 15 #define REGIDX_PLL 16 static const u32 ast2500_ddr3_1600_timing_table[REGTBL_NUM] = { 0x64604D38, /* 0x010 */ 0x29690599, /* 0x014 */ 0x00000300, /* 0x018 */ 0x00000000, /* 0x020 */ 0x00000000, /* 0x024 */ 0x02181E70, /* 0x02C */ 0x00000040, /* 0x030 */ 0x00000024, /* 0x214 */ 0x02001300, /* 0x2E0 */ 0x0E0000A0, /* 0x2E4 */ 0x000E001B, /* 0x2E8 */ 0x35B8C105, /* 0x2EC */ 0x08090408, /* 0x2F0 */ 0x9B000800, /* 0x2F4 */ 0x0E400A00, /* 0x2F8 */ 0x9971452F, /* tRFC */ 0x000071C1 /* PLL */ }; static const u32 ast2500_ddr4_1600_timing_table[REGTBL_NUM] = { 0x63604E37, /* 0x010 */ 0xE97AFA99, /* 0x014 */ 0x00019000, /* 0x018 */ 0x08000000, /* 0x020 */ 0x00000400, /* 0x024 */ 0x00000410, /* 0x02C */ 0x00000101, /* 0x030 */ 0x00000024, /* 0x214 */ 0x03002900, /* 0x2E0 */ 0x0E0000A0, /* 0x2E4 */ 0x000E001C, /* 0x2E8 */ 0x35B8C106, /* 0x2EC */ 0x08080607, /* 0x2F0 */ 0x9B000900, /* 0x2F4 */ 0x0E400A00, /* 0x2F8 */ 0x99714545, /* tRFC */ 0x000071C1 /* PLL */ }; #endif
{ "pile_set_name": "Github" }
// Copyright (c) 2017 Ultimaker B.V. // Uranium is released under the terms of the LGPLv3 or higher. import QtQuick 2.10 import QtQuick.Window 2.2 import QtQuick.Layouts 1.3 import UM 1.0 as UM Window { id: base modality: Qt.ApplicationModal; flags: Qt.Dialog | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowCloseButtonHint; minimumWidth: screenScaleFactor * 640; minimumHeight: screenScaleFactor * 480; width: minimumWidth height: minimumHeight property int margin: screenScaleFactor * 8; property bool closeOnAccept: true; // Automatically close the window when the window is "accepted" (eg using the return key) default property alias contents: contentItem.children; property alias loader: contentLoader property alias leftButtons: leftButtonRow.children; property alias rightButtons: rightButtonRow.children; property alias backgroundColor: background.color signal accepted(); signal rejected(); function accept() { if (base.closeOnAccept) { base.visible = false; } base.accepted(); } function reject() { //If we don't have a close button we don't want to allow the user to close the window by rejecting it (escape key). if (base.flags & Qt.WindowCloseButtonHint) { base.visible = false; base.rejected(); } } function open() { base.visible = true; } Rectangle { id: background anchors.fill: parent; color: palette.window; focus: base.visible; Keys.onEscapePressed:{ base.reject(); } Keys.onReturnPressed: { base.accept(); } Item { id: contentItem; anchors { left: parent.left; leftMargin: base.margin; right: parent.right; rightMargin: base.margin; top: parent.top; topMargin: base.margin; bottom: buttonRow.top; bottomMargin: base.margin; } Loader { id: contentLoader anchors.fill: parent property var manager: null } } Item { id: buttonRow; anchors { bottom: parent.bottom; bottomMargin: base.margin; left: parent.left; leftMargin: base.margin; right: parent.right; rightMargin: base.margin; } height: childrenRect.height; Row { id: leftButtonRow; anchors.left: parent.left; } Row { id: rightButtonRow; anchors.right: parent.right; } } } SystemPalette { id: palette; } }
{ "pile_set_name": "Github" }
import argparse import json import math import os import shutil from pprint import pprint import tensorflow as tf from tqdm import tqdm import numpy as np from basic_cnn.evaluator import F1Evaluator, Evaluator, ForwardEvaluator, MultiGPUF1Evaluator, CNNAccuracyEvaluator, \ MultiGPUCNNAccuracyEvaluator from basic_cnn.graph_handler import GraphHandler from basic_cnn.model import Model, get_multi_gpu_models from basic_cnn.trainer import Trainer, MultiGPUTrainer from basic_cnn.read_data import read_data, get_cnn_data_filter, update_config def main(config): set_dirs(config) with tf.device(config.device): if config.mode == 'train': _train(config) elif config.mode == 'test' or config.mode == 'dev': _test(config) elif config.mode == 'forward': _forward(config) else: raise ValueError("invalid value for 'mode': {}".format(config.mode)) def _config_draft(config): if config.draft: config.num_steps = 2 config.eval_period = 1 config.log_period = 1 config.save_period = 1 config.eval_num_batches = 1 def _train(config): # load_metadata(config, 'train') # this updates the config file according to metadata file data_filter = get_cnn_data_filter(config) train_data = read_data(config, 'train', config.load, data_filter=data_filter) dev_data = read_data(config, 'dev', True, data_filter=data_filter) # test_data = read_data(config, 'test', True, data_filter=data_filter) update_config(config, [train_data, dev_data]) _config_draft(config) word2vec_dict = train_data.shared['lower_word2vec'] if config.lower_word else train_data.shared['word2vec'] word2idx_dict = train_data.shared['word2idx'] idx2vec_dict = {word2idx_dict[word]: vec for word, vec in word2vec_dict.items() if word in word2idx_dict} print("{}/{} unique words have corresponding glove vectors.".format(len(idx2vec_dict), len(word2idx_dict))) emb_mat = np.array([idx2vec_dict[idx] if idx in idx2vec_dict else np.random.multivariate_normal(np.zeros(config.word_emb_size), np.eye(config.word_emb_size)) for idx in range(config.word_vocab_size)]) config.emb_mat = emb_mat # construct model graph and variables (using default graph) pprint(config.__flags, indent=2) # model = Model(config) models = get_multi_gpu_models(config) model = models[0] trainer = MultiGPUTrainer(config, models) evaluator = MultiGPUCNNAccuracyEvaluator(config, models, tensor_dict=model.tensor_dict if config.vis else None) graph_handler = GraphHandler(config) # controls all tensors and variables in the graph, including loading /saving # Variables sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) graph_handler.initialize(sess) # begin training print(train_data.num_examples) num_steps = config.num_steps or int(math.ceil(train_data.num_examples / (config.batch_size * config.num_gpus))) * config.num_epochs global_step = 0 for batches in tqdm(train_data.get_multi_batches(config.batch_size, config.num_gpus, num_steps=num_steps, shuffle=True, cluster=config.cluster), total=num_steps): global_step = sess.run(model.global_step) + 1 # +1 because all calculations are done after step get_summary = global_step % config.log_period == 0 loss, summary, train_op = trainer.step(sess, batches, get_summary=get_summary) if get_summary: graph_handler.add_summary(summary, global_step) # occasional saving if global_step % config.save_period == 0: graph_handler.save(sess, global_step=global_step) if not config.eval: continue # Occasional evaluation if global_step % config.eval_period == 0: num_steps = math.ceil(dev_data.num_examples / (config.batch_size * config.num_gpus)) if 0 < config.eval_num_batches < num_steps: num_steps = config.eval_num_batches e_train = evaluator.get_evaluation_from_batches( sess, tqdm(train_data.get_multi_batches(config.batch_size, config.num_gpus, num_steps=num_steps), total=num_steps) ) graph_handler.add_summaries(e_train.summaries, global_step) e_dev = evaluator.get_evaluation_from_batches( sess, tqdm(dev_data.get_multi_batches(config.batch_size, config.num_gpus, num_steps=num_steps), total=num_steps)) graph_handler.add_summaries(e_dev.summaries, global_step) if config.dump_eval: graph_handler.dump_eval(e_dev) if config.dump_answer: graph_handler.dump_answer(e_dev) if global_step % config.save_period != 0: graph_handler.save(sess, global_step=global_step) def _test(config): assert config.load test_data = read_data(config, config.mode, True) update_config(config, [test_data]) _config_draft(config) if config.use_glove_for_unk: word2vec_dict = test_data.shared['lower_word2vec'] if config.lower_word else test_data.shared['word2vec'] new_word2idx_dict = test_data.shared['new_word2idx'] idx2vec_dict = {idx: word2vec_dict[word] for word, idx in new_word2idx_dict.items()} # print("{}/{} unique words have corresponding glove vectors.".format(len(idx2vec_dict), len(word2idx_dict))) new_emb_mat = np.array([idx2vec_dict[idx] for idx in range(len(idx2vec_dict))], dtype='float32') config.new_emb_mat = new_emb_mat pprint(config.__flags, indent=2) models = get_multi_gpu_models(config) evaluator = MultiGPUCNNAccuracyEvaluator(config, models, tensor_dict=models[0].tensor_dict if config.vis else None) graph_handler = GraphHandler(config) # controls all tensors and variables in the graph, including loading /saving sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) graph_handler.initialize(sess) num_steps = math.ceil(test_data.num_examples / (config.batch_size * config.num_gpus)) if 0 < config.eval_num_batches < num_steps: num_steps = config.eval_num_batches e = None for multi_batch in tqdm(test_data.get_multi_batches(config.batch_size, config.num_gpus, num_steps=num_steps, cluster=config.cluster), total=num_steps): ei = evaluator.get_evaluation(sess, multi_batch) e = ei if e is None else e + ei if config.vis: eval_subdir = os.path.join(config.eval_dir, "{}-{}".format(ei.data_type, str(ei.global_step).zfill(6))) if not os.path.exists(eval_subdir): os.mkdir(eval_subdir) path = os.path.join(eval_subdir, str(ei.idxs[0]).zfill(8)) graph_handler.dump_eval(ei, path=path) print(e) if config.dump_answer: print("dumping answer ...") graph_handler.dump_answer(e) if config.dump_eval: print("dumping eval ...") graph_handler.dump_eval(e) def _forward(config): assert config.load test_data = read_data(config, config.forward_name, True) update_config(config, [test_data]) _config_draft(config) if config.use_glove_for_unk: word2vec_dict = test_data.shared['lower_word2vec'] if config.lower_word else test_data.shared['word2vec'] new_word2idx_dict = test_data.shared['new_word2idx'] idx2vec_dict = {idx: word2vec_dict[word] for word, idx in new_word2idx_dict.items()} # print("{}/{} unique words have corresponding glove vectors.".format(len(idx2vec_dict), len(word2idx_dict))) new_emb_mat = np.array([idx2vec_dict[idx] for idx in range(len(idx2vec_dict))], dtype='float32') config.new_emb_mat = new_emb_mat pprint(config.__flags, indent=2) models = get_multi_gpu_models(config) model = models[0] evaluator = ForwardEvaluator(config, model) graph_handler = GraphHandler(config) # controls all tensors and variables in the graph, including loading /saving sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True)) graph_handler.initialize(sess) num_batches = math.ceil(test_data.num_examples / config.batch_size) if 0 < config.eval_num_batches < num_batches: num_batches = config.eval_num_batches e = evaluator.get_evaluation_from_batches(sess, tqdm(test_data.get_batches(config.batch_size, num_batches=num_batches), total=num_batches)) print(e) if config.dump_answer: print("dumping answer ...") graph_handler.dump_answer(e, path=config.answer_path) if config.dump_eval: print("dumping eval ...") graph_handler.dump_eval(e) def set_dirs(config): # create directories if not config.load and os.path.exists(config.out_dir): shutil.rmtree(config.out_dir) config.save_dir = os.path.join(config.out_dir, "save") config.log_dir = os.path.join(config.out_dir, "log") config.eval_dir = os.path.join(config.out_dir, "eval") config.answer_dir = os.path.join(config.out_dir, "answer") if not os.path.exists(config.out_dir): os.makedirs(config.out_dir) if not os.path.exists(config.save_dir): os.mkdir(config.save_dir) if not os.path.exists(config.log_dir): os.mkdir(config.log_dir) if not os.path.exists(config.answer_dir): os.mkdir(config.answer_dir) if not os.path.exists(config.eval_dir): os.mkdir(config.eval_dir) def _get_args(): parser = argparse.ArgumentParser() parser.add_argument("config_path") return parser.parse_args() class Config(object): def __init__(self, **entries): self.__dict__.update(entries) def _run(): args = _get_args() with open(args.config_path, 'r') as fh: config = Config(**json.load(fh)) main(config) if __name__ == "__main__": _run()
{ "pile_set_name": "Github" }
using System; using System.Linq; namespace Unity.UIWidgets { public interface Dispatcher { T dispatch<T>(object action); object dispatch(object action); } public class DispatcherImpl : Dispatcher { readonly Func<object, object> _impl; public DispatcherImpl(Func<object, object> impl) { this._impl = impl; } public T dispatch<T>(object action) { if (this._impl == null) { return default; } return (T) this._impl(action); } public object dispatch(object action) { if (this._impl == null) { return default; } return this._impl(action); } } public delegate State Reducer<State>(State previousState, object action); public delegate Func<Dispatcher, Dispatcher> Middleware<State>(Store<State> store); public delegate void StateChangedHandler<State>(State action); public class Store<State> { public StateChangedHandler<State> stateChanged; readonly Dispatcher _dispatcher; readonly Reducer<State> _reducer; State _state; public Store( Reducer<State> reducer, State initialState = default, params Middleware<State>[] middleware) { this._reducer = reducer; this._dispatcher = this._applyMiddleware(middleware); this._state = initialState; } public Dispatcher dispatcher { get { return this._dispatcher; } } public State getState() { return this._state; } Dispatcher _applyMiddleware(params Middleware<State>[] middleware) { return middleware.Reverse().Aggregate<Middleware<State>, Dispatcher>( new DispatcherImpl(this._innerDispatch), (current, middlewareItem) => middlewareItem(this)(current)); } object _innerDispatch(object action) { this._state = this._reducer(this._state, action); if (this.stateChanged != null) { this.stateChanged(this._state); } return action; } } }
{ "pile_set_name": "Github" }
// Copyright (c) .NET Foundation and contributors. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Xunit; namespace Microsoft.DotNet.Cli.Utils.Tests { public class ArgumentEscaperTests { [Theory] [InlineData(new[] { "one", "two", "three" }, "one two three")] [InlineData(new[] { "line1\nline2", "word1\tword2" }, "\"line1\nline2\" \"word1\tword2\"")] [InlineData(new[] { "with spaces" }, "\"with spaces\"")] [InlineData(new[] { @"with\backslash" }, @"with\backslash")] [InlineData(new[] { @"""quotedwith\backslash""" }, @"\""quotedwith\backslash\""")] [InlineData(new[] { @"C:\Users\" }, @"C:\Users\")] [InlineData(new[] { @"C:\Program Files\dotnet\" }, @"""C:\Program Files\dotnet\\""")] [InlineData(new[] { @"backslash\""preceedingquote" }, @"backslash\\\""preceedingquote")] [InlineData(new[] { @""" hello """ }, @"""\"" hello \""""")] public void EscapesArgumentsForProcessStart(string[] args, string expected) { Assert.Equal(expected, ArgumentEscaper.EscapeAndConcatenateArgArrayForProcessStart(args)); } } }
{ "pile_set_name": "Github" }
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the internal implementation details of L{twisted.internet.udp}. """ import socket from twisted.trial import unittest from twisted.internet.protocol import DatagramProtocol from twisted.internet import udp from twisted.python.runtime import platformType if platformType == "win32": from errno import WSAEWOULDBLOCK as EWOULDBLOCK # type: ignore[attr-defined] # noqa else: from errno import EWOULDBLOCK class StringUDPSocket: """ A fake UDP socket object, which returns a fixed sequence of strings and/or socket errors. Useful for testing. @ivar retvals: A C{list} containing either strings or C{socket.error}s. @ivar connectedAddr: The address the socket is connected to. """ def __init__(self, retvals): self.retvals = retvals self.connectedAddr = None def connect(self, addr): self.connectedAddr = addr def recvfrom(self, size): """ Return (or raise) the next value from C{self.retvals}. """ ret = self.retvals.pop(0) if isinstance(ret, socket.error): raise ret return ret, None class KeepReads(DatagramProtocol): """ Accumulate reads in a list. """ def __init__(self): self.reads = [] def datagramReceived(self, data, addr): self.reads.append(data) class ErrorsTests(unittest.SynchronousTestCase): """ Error handling tests for C{udp.Port}. """ def test_socketReadNormal(self): """ Socket reads with some good data followed by a socket error which can be ignored causes reading to stop, and no log messages to be logged. """ # Add a fake error to the list of ignorables: udp._sockErrReadIgnore.append(-7000) self.addCleanup(udp._sockErrReadIgnore.remove, -7000) protocol = KeepReads() port = udp.Port(None, protocol) # Normal result, no errors port.socket = StringUDPSocket( [b"result", b"123", socket.error(-7000), b"456", socket.error(-7000)] ) port.doRead() # Read stops on error: self.assertEqual(protocol.reads, [b"result", b"123"]) port.doRead() self.assertEqual(protocol.reads, [b"result", b"123", b"456"]) def test_readImmediateError(self): """ If the socket is unconnected, socket reads with an immediate connection refusal are ignored, and reading stops. The protocol's C{connectionRefused} method is not called. """ # Add a fake error to the list of those that count as connection # refused: udp._sockErrReadRefuse.append(-6000) self.addCleanup(udp._sockErrReadRefuse.remove, -6000) protocol = KeepReads() # Fail if connectionRefused is called: protocol.connectionRefused = lambda: 1 / 0 port = udp.Port(None, protocol) # Try an immediate "connection refused" port.socket = StringUDPSocket( [b"a", socket.error(-6000), b"b", socket.error(EWOULDBLOCK)] ) port.doRead() # Read stops on error: self.assertEqual(protocol.reads, [b"a"]) # Read again: port.doRead() self.assertEqual(protocol.reads, [b"a", b"b"]) def test_connectedReadImmediateError(self): """ If the socket connected, socket reads with an immediate connection refusal are ignored, and reading stops. The protocol's C{connectionRefused} method is called. """ # Add a fake error to the list of those that count as connection # refused: udp._sockErrReadRefuse.append(-6000) self.addCleanup(udp._sockErrReadRefuse.remove, -6000) protocol = KeepReads() refused = [] protocol.connectionRefused = lambda: refused.append(True) port = udp.Port(None, protocol) port.socket = StringUDPSocket( [b"a", socket.error(-6000), b"b", socket.error(EWOULDBLOCK)] ) port.connect("127.0.0.1", 9999) # Read stops on error: port.doRead() self.assertEqual(protocol.reads, [b"a"]) self.assertEqual(refused, [True]) # Read again: port.doRead() self.assertEqual(protocol.reads, [b"a", b"b"]) self.assertEqual(refused, [True]) def test_readUnknownError(self): """ Socket reads with an unknown socket error are raised. """ protocol = KeepReads() port = udp.Port(None, protocol) # Some good data, followed by an unknown error port.socket = StringUDPSocket([b"good", socket.error(-1337)]) self.assertRaises(socket.error, port.doRead) self.assertEqual(protocol.reads, [b"good"])
{ "pile_set_name": "Github" }
@import 'ej2-base/styles/highcontrast-definition.scss'; @import '../ribbon/highcontrast-definition.scss'; @import 'ej2-buttons/styles/button/highcontrast-definition.scss'; @import 'ej2-buttons/styles/check-box/highcontrast-definition.scss'; @import 'ej2-navigations/styles/tab/highcontrast-definition.scss'; @import 'ej2-navigations/styles/toolbar/highcontrast-definition.scss'; @import 'ej2-navigations/styles/context-menu/highcontrast-definition.scss'; @import 'ej2-grids/styles/excel-filter/highcontrast-definition.scss'; @import 'ej2-calendars/styles/datepicker/highcontrast-definition.scss'; @import 'ej2-calendars/styles/datetimepicker/highcontrast-definition.scss'; @import 'highcontrast-definition.scss'; @import 'icons/highcontrast.scss'; @import 'all.scss';
{ "pile_set_name": "Github" }
### ### DO NOT MODIFY THIS FILE. THIS FILE HAS BEEN AUTOGENERATED ### FROM circleci/php:7.2.33-apache-stretch # # Install Java 11 LTS / OpenJDK 11 # RUN if grep -q Debian /etc/os-release && grep -q stretch /etc/os-release; then \ echo 'deb http://deb.debian.org/debian stretch-backports main' | sudo tee -a /etc/apt/sources.list.d/stretch-backports.list; \ elif grep -q Ubuntu /etc/os-release && grep -q xenial /etc/os-release; then \ sudo apt-get update && sudo apt-get install -y software-properties-common && \ sudo add-apt-repository -y ppa:openjdk-r/ppa; \ fi && \ sudo apt-get update && sudo apt-get install -y openjdk-11-jre openjdk-11-jre-headless openjdk-11-jdk openjdk-11-jdk-headless && \ sudo apt-get install -y bzip2 libgconf-2-4 # for extracting firefox and running chrome, respectively ENV OPENSSL_CONF / ## install phantomjs # RUN PHANTOMJS_URL="https://circle-downloads.s3.amazonaws.com/circleci-images/cache/linux-amd64/phantomjs-latest.tar.bz2" \ && sudo apt-get install libfontconfig \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/phantomjs.tar.bz2 ${PHANTOMJS_URL} \ && tar -x -C /tmp -f /tmp/phantomjs.tar.bz2 \ && sudo mv /tmp/phantomjs-*-linux-x86_64/bin/phantomjs /usr/local/bin \ && rm -rf /tmp/phantomjs.tar.bz2 /tmp/phantomjs-* \ && phantomjs --version # install firefox # If you are upgrading to any version newer than 47.0.1, you must check the compatibility with # selenium. See https://github.com/SeleniumHQ/selenium/issues/2559#issuecomment-237079591 RUN FIREFOX_URL="https://s3.amazonaws.com/circle-downloads/firefox-mozilla-build_47.0.1-0ubuntu1_amd64.deb" \ && curl --silent --show-error --location --fail --retry 3 --output /tmp/firefox.deb $FIREFOX_URL \ && echo 'ef016febe5ec4eaf7d455a34579834bcde7703cb0818c80044f4d148df8473bb /tmp/firefox.deb' | sha256sum -c \ && sudo dpkg -i /tmp/firefox.deb || sudo apt-get -f install \ && sudo apt-get install -y libgtk3.0-cil-dev libasound2 libasound2 libdbus-glib-1-2 libdbus-1-3 \ && rm -rf /tmp/firefox.deb \ && firefox --version # install geckodriver—disabling this temporarily, we will likely want this code in the future, but until we're ready to upgrade our version of firefox to 53+, geckodriver wont' be compatible... # RUN export GECKODRIVER_LATEST_RELEASE_URL=$(curl https://api.github.com/repos/mozilla/geckodriver/releases/latest | jq -r ".assets[] | select(.name | test(\"linux64\")) | .browser_download_url") \ # && curl --silent --show-error --location --fail --retry 3 --output /tmp/geckodriver_linux64.tar.gz "$GECKODRIVER_LATEST_RELEASE_URL" \ # && cd /tmp \ # && tar xf geckodriver_linux64.tar.gz \ # && rm -rf geckodriver_linux64.tar.gz \ # && sudo mv geckodriver /usr/local/bin/geckodriver \ # && sudo chmod +x /usr/local/bin/geckodriver \ # && geckodriver --version # install chrome RUN cd /home/circleci && wget -O google-chrome-stable_current_amd64.deb -t 5 "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" \ && (sudo dpkg -i google-chrome-stable_current_amd64.deb || sudo apt-get -fy install) \ && rm -rf google-chrome-stable_current_amd64.deb \ && sudo sed -i 's|HERE/chrome"|HERE/chrome" --disable-setuid-sandbox --no-sandbox|g' \ "/opt/google/chrome/google-chrome" \ && google-chrome --version RUN CHROME_VERSION="$(google-chrome --version)" \ && export CHROMEDRIVER_RELEASE="$(echo $CHROME_VERSION | sed 's/^Google Chrome //')" && export CHROMEDRIVER_RELEASE=${CHROMEDRIVER_RELEASE%%.*} \ && CHROMEDRIVER_VERSION=$(curl --silent --show-error --location --fail --retry 4 --retry-delay 5 http://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROMEDRIVER_RELEASE}) \ && curl --silent --show-error --location --fail --retry 4 --retry-delay 5 --output /tmp/chromedriver_linux64.zip "http://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip" \ && cd /tmp \ && unzip chromedriver_linux64.zip \ && rm -rf chromedriver_linux64.zip \ && sudo mv chromedriver /usr/local/bin/chromedriver \ && sudo chmod +x /usr/local/bin/chromedriver \ && chromedriver --version # install libgconf-2-4 manually since chrome no longer pulls it in automatically RUN sudo apt-get install -y libgconf-2-4 # start xvfb automatically to avoid needing to express in circle.yml ENV DISPLAY :99 RUN printf '#!/bin/sh\nXvfb :99 -screen 0 1280x1024x24 &\nexec "$@"\n' > /tmp/entrypoint \ && chmod +x /tmp/entrypoint \ && sudo mv /tmp/entrypoint /docker-entrypoint.sh # ensure that the build agent doesn't override the entrypoint LABEL com.circleci.preserve-entrypoint=true ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["/bin/sh"]
{ "pile_set_name": "Github" }
# cr16 testcase for pop count reg insns. # mach: cr16 .include "testutils.inc" start .global pop2 pop2: movd $0x1000, (sp) movw $0x2f50, r3 storw r3, 0x1000 movw $0x107e, r3 storw r3, 0x1002 movw $0x35ec, r3 storw r3, 0x1004 pop $3,r5 cmpw $0x2f50,r5 beq ok1 br not_ok not_ok: fail ok1: cmpw $0x107e,r6 beq ok2 br not_ok ok2: cmpw $0x35ec,r7 beq ok3 br not_ok ok3: pass
{ "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.samza.system; /** * Streams in Samza consist of both the stream name and the system to which the stream belongs. * Systems are defined through the job config and have corresponding serdes, producers and * consumers in order to deserialize, send to and retrieve from them. A stream name is dependent * on its system, and may be the topic, queue name, file name, etc. as makes sense for a * particular system. */ public class SystemStream { protected final String system; protected final String stream; /** * Constructs a Samza stream object from specified components. * @param system The name of the system of which this stream is associated with. * @param stream The name of the stream as specified in the stream configuration file. */ public SystemStream(String system, String stream) { this.system = system; this.stream = stream; } /** * Constructs a Samza stream object based upon an existing Samza stream. * @param other Reference to an already existing Samza stream. */ public SystemStream(SystemStream other) { this(other.getSystem(), other.getStream()); } public String getSystem() { return system; } public String getStream() { return stream; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((stream == null) ? 0 : stream.hashCode()); result = prime * result + ((system == null) ? 0 : system.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; SystemStream other = (SystemStream) obj; if (stream == null) { if (other.stream != null) return false; } else if (!stream.equals(other.stream)) return false; if (system == null) { if (other.system != null) return false; } else if (!system.equals(other.system)) return false; return true; } @Override public String toString() { return "SystemStream [system=" + system + ", stream=" + stream + "]"; } }
{ "pile_set_name": "Github" }
--- title: "' <modifier> ' no es válido en una declaración de evento" ms.date: 07/20/2015 f1_keywords: - vbc30243 - bc30243 helpviewer_keywords: - BC30243 ms.assetid: 7e7c886e-34f5-44a0-b278-5ba7354ea2ad ms.openlocfilehash: 56ae09c62c97d09d1ad7f5800e9eb1bbb14280ea ms.sourcegitcommit: bf5c5850654187705bc94cc40ebfb62fe346ab02 ms.translationtype: MT ms.contentlocale: es-ES ms.lasthandoff: 09/23/2020 ms.locfileid: "91097116" --- # <a name="modifier-is-not-valid-on-an-event-declaration"></a>' \<modifier> ' no es válido en una declaración de evento Una instrucción `Event` contiene una palabra clave no válida, como `ReadOnly`. **Identificador de error:** BC30243 ## <a name="to-correct-this-error"></a>Para corregir este error 1. Quite la palabra clave no válida de la instrucción `Event` . ## <a name="see-also"></a>Vea también - [Event (Instrucción)](../language-reference/statements/event-statement.md)
{ "pile_set_name": "Github" }
/* * JBoss, Home of Professional Open Source * Copyright 2010, Red Hat Inc., and individual contributors as indicated * by the @authors tag. See the copyright.txt in the distribution for a * full listing of individual contributors. * * This 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 software 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 software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.as.weld.services.bootstrap; import java.util.function.Consumer; import javax.transaction.RollbackException; import javax.transaction.Status; import javax.transaction.Synchronization; import javax.transaction.SystemException; import javax.transaction.UserTransaction; import org.jboss.as.weld.ServiceNames; import org.jboss.msc.Service; import org.jboss.msc.service.ServiceName; import org.jboss.msc.service.StartContext; import org.jboss.msc.service.StopContext; import org.jboss.weld.transaction.spi.TransactionServices; import org.wildfly.transaction.client.ContextTransactionManager; import org.wildfly.transaction.client.LocalUserTransaction; /** * Service that implements welds {@link TransactionServices} * <p> * This class is thread safe, and does not require a happens-before action between construction and usage * * @author Stuart Douglas * @author <a href="mailto:[email protected]">Tomasz Adamski</a> * @author <a href="mailto:[email protected]">Richard Opalka</a> */ public class WeldTransactionServices implements TransactionServices, Service { public static final ServiceName SERVICE_NAME = ServiceNames.WELD_TRANSACTION_SERVICES_SERVICE_NAME; private final Consumer<WeldTransactionServices> weldTransactionServicesConsumer; private final boolean jtsEnabled; public WeldTransactionServices(final boolean jtsEnabled, final Consumer<WeldTransactionServices> weldTransactionServicesConsumer) { this.jtsEnabled = jtsEnabled; this.weldTransactionServicesConsumer = weldTransactionServicesConsumer; } @Override public UserTransaction getUserTransaction() { return LocalUserTransaction.getInstance(); } @Override public boolean isTransactionActive() { try { final int status = ContextTransactionManager.getInstance().getStatus(); return status == Status.STATUS_ACTIVE || status == Status.STATUS_COMMITTING || status == Status.STATUS_MARKED_ROLLBACK || status == Status.STATUS_PREPARED || status == Status.STATUS_PREPARING || status == Status.STATUS_ROLLING_BACK; } catch (SystemException e) { throw new RuntimeException(e); } } @Override public void cleanup() { } @Override public void registerSynchronization(Synchronization synchronizedObserver) { try { final Synchronization synchronization; if (!jtsEnabled) { synchronization = synchronizedObserver; } else { synchronization = new JTSSynchronizationWrapper(synchronizedObserver); } ContextTransactionManager.getInstance().getTransaction().registerSynchronization(synchronization); } catch (IllegalStateException e) { throw new RuntimeException(e); } catch (RollbackException e) { throw new RuntimeException(e); } catch (SystemException e) { throw new RuntimeException(e); } } @Override public void start(final StartContext context) { weldTransactionServicesConsumer.accept(this); } @Override public void stop(final StopContext context) { weldTransactionServicesConsumer.accept(null); } }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/blueupload" android:state_pressed="true" /> <item android:drawable="@drawable/blueupload" android:state_checked="true" /> <item android:drawable="@drawable/whiteupload" /> </selector>
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2" xmlns:aapt="http://schemas.android.com/aapt"> <item android:state_enabled="false" android:state_checked="true" android:drawable="@a/radio_default_on"/> <item android:state_enabled="false" android:state_checked="false" android:drawable="@a/radio_off"/> <item android:state_checked="true" android:drawable="@a/radio_on"/> <item android:drawable="@a/radio_off"/> </selector>
{ "pile_set_name": "Github" }
package assfolder; public class PositionalConstraints { }
{ "pile_set_name": "Github" }
<?php /** * Zend Framework * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://framework.zend.com/license/new-bsd * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * @category Zend * @package Zend_Markup * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id$ */ /** * @see Zend_Exception */ require_once 'Zend/Exception.php'; /** * Exception class for Zend_Markup * * @category Zend * @uses Zend_Exception * @package Zend_Markup * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */ class Zend_Markup_Exception extends Zend_Exception { }
{ "pile_set_name": "Github" }
import styled from 'styled-components'; import ButtonIcon from '../../ButtonIcon'; import attachThemeAttrs from '../../../styles/helpers/attachThemeAttrs'; const StyledArrowButton = attachThemeAttrs(styled(ButtonIcon))` color: ${props => props.palette.brand.main}; ${props => props.disabled && ` color: ${props.palette.text.disabled}; `}; width: 2rem; height: 2rem; line-height: 2; svg { width: 0.7rem !important; height: 0.7rem !important; } `; export default StyledArrowButton;
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link rel="shortcut icon" type="image/ico" href="http://www.datatables.net/favicon.ico"> <meta name="viewport" content="initial-scale=1.0, maximum-scale=2.0"> <title>TableTools example - Ajax loaded data</title> <link rel="stylesheet" type="text/css" href="../../../media/css/jquery.dataTables.css"> <link rel="stylesheet" type="text/css" href="../css/dataTables.tableTools.css"> <link rel="stylesheet" type="text/css" href="../../../examples/resources/syntax/shCore.css"> <link rel="stylesheet" type="text/css" href="../../../examples/resources/demo.css"> <style type="text/css" class="init"> </style> <script type="text/javascript" language="javascript" src="../../../media/js/jquery.js"></script> <script type="text/javascript" language="javascript" src="../../../media/js/jquery.dataTables.js"></script> <script type="text/javascript" language="javascript" src="../js/dataTables.tableTools.js"></script> <script type="text/javascript" language="javascript" src="../../../examples/resources/syntax/shCore.js"></script> <script type="text/javascript" language="javascript" src="../../../examples/resources/demo.js"></script> <script type="text/javascript" language="javascript" class="init"> $(document).ready(function() { $('#example').DataTable( { dom: 'T<"clear">lfrtip', "ajax": "../../../../examples/ajax/data/objects.txt", "columns": [ { "data": "name" }, { "data": "position" }, { "data": "office" }, { "data": "extn" }, { "data": "start_date" }, { "data": "salary" } ], deferRender: true } ); } ); </script> </head> <body class="dt-example"> <div class="container"> <section> <h1>TableTools example <span>Ajax loaded data</span></h1> <div class="info"> <p>This TableTools example shows DataTables using its ability to <a href="//datatables.net/manual/data#Objects">Ajax load object based data</a> and operate in exactly the same manner as when the data is read directly from the document.</p> </div> <table id="example" class="display" cellspacing="0" width="100%"> <thead> <tr> <th>Name</th> <th>Position</th> <th>Office</th> <th>Extn.</th> <th>Start date</th> <th>Salary</th> </tr> </thead> <tfoot> <tr> <th>Name</th> <th>Position</th> <th>Office</th> <th>Extn.</th> <th>Start date</th> <th>Salary</th> </tr> </tfoot> </table> <ul class="tabs"> <li class="active">Javascript</li> <li>HTML</li> <li>CSS</li> <li>Ajax</li> <li>Server-side script</li> </ul> <div class="tabs"> <div class="js"> <p>The Javascript shown below is used to initialise the table shown in this example:</p><code class="multiline language-js">$(document).ready(function() { $('#example').DataTable( { dom: 'T&lt;&quot;clear&quot;&gt;lfrtip', &quot;ajax&quot;: &quot;../../../../examples/ajax/data/objects.txt&quot;, &quot;columns&quot;: [ { &quot;data&quot;: &quot;name&quot; }, { &quot;data&quot;: &quot;position&quot; }, { &quot;data&quot;: &quot;office&quot; }, { &quot;data&quot;: &quot;extn&quot; }, { &quot;data&quot;: &quot;start_date&quot; }, { &quot;data&quot;: &quot;salary&quot; } ], deferRender: true } ); } );</code> <p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p> <ul> <li><a href="../../../media/js/jquery.js">../../../media/js/jquery.js</a></li> <li><a href="../../../media/js/jquery.dataTables.js">../../../media/js/jquery.dataTables.js</a></li> <li><a href="../js/dataTables.tableTools.js">../js/dataTables.tableTools.js</a></li> </ul> </div> <div class="table"> <p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p> </div> <div class="css"> <div> <p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The additional CSS used is shown below:</p><code class="multiline language-css"></code> </div> <p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p> <ul> <li><a href="../../../media/css/jquery.dataTables.css">../../../media/css/jquery.dataTables.css</a></li> <li><a href="../css/dataTables.tableTools.css">../css/dataTables.tableTools.css</a></li> </ul> </div> <div class="ajax"> <p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is loaded.</p> </div> <div class="php"> <p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side processing scripts can be written in any language, using <a href="//datatables.net/manual/server-side">the protocol described in the DataTables documentation</a>.</p> </div> </div> </section> </div> <section> <div class="footer"> <div class="gradient"></div> <div class="liner"> <h2>Other examples</h2> <div class="toc"> <div class="toc-group"> <h3><a href="./index.html">Examples</a></h3> <ul class="toc active"> <li><a href="./simple.html">Basic initialisation</a></li> <li><a href="./swf_path.html">Setting the SWF path</a></li> <li><a href="./new_init.html">Initialisation with `new`</a></li> <li><a href="./defaults.html">Defaults</a></li> <li><a href="./select_single.html">Row selection - single row select</a></li> <li><a href="./select_multi.html">Row selection - multi-row select</a></li> <li><a href="./select_os.html">Row selection - operating system style</a></li> <li><a href="./select_column.html">Row selection - row selector on specific cells</a></li> <li><a href="./multiple_tables.html">Multiple tables</a></li> <li><a href="./multi_instance.html">Multiple toolbars</a></li> <li><a href="./collection.html">Button collections</a></li> <li><a href="./plug-in.html">Plug-in button types</a></li> <li><a href="./button_text.html">Custom button text</a></li> <li><a href="./alter_buttons.html">Button arrangement</a></li> <li class="active"><a href="./ajax.html">Ajax loaded data</a></li> <li><a href="./pdf_message.html">PDF message</a></li> <li><a href="./bootstrap.html">Bootstrap styling</a></li> <li><a href="./jqueryui.html">jQuery UI styling</a></li> </ul> </div> </div> <div class="epilogue"> <p>Please refer to the <a href="http://www.datatables.net">DataTables documentation</a> for full information about its API properties and methods.<br> Additionally, there are a wide range of <a href="http://www.datatables.net/extras">extras</a> and <a href="http://www.datatables.net/plug-ins">plug-ins</a> which extend the capabilities of DataTables.</p> <p class="copyright">DataTables designed and created by <a href="http://www.sprymedia.co.uk">SpryMedia Ltd</a> &#169; 2007-2015<br> DataTables is licensed under the <a href="http://www.datatables.net/mit">MIT license</a>.</p> </div> </div> </div> </section> </body> </html>
{ "pile_set_name": "Github" }
.hero { background: #333; background: -webkit-radial-gradient(circle, #333, #111); background: -o-radial-gradient(circle, #333, #111); background: -moz-radial-gradient(circle, #333, #111); background: radial-gradient(circle, #333, #111); color: #fff; padding: 60px 0; min-height: 800px; } .hero .hero-header { background-image: url('/images/logo256X256-opacity.png'); background-size: 100%; background-repeat: no-repeat; background-position: center; } .hero .hero-header h1 { margin-top: 60px; margin-bottom: 40px; } .hero .hero-header h1 .display-1 { font-size: 9rem; font-weight: 700; } .hero .hero-header .download-count .item-text { color: #888; font-size: 1.2rem; margin-top: 30px; } .hero .hero-examples .row:first-child { padding-bottom: 30px; } .hero .hero-examples h5 { background: rgb(204, 0, 0); background: -webkit-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); background: -o-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); background: -moz-radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); background: radial-gradient(circle, rgb(204, 0, 0), rgb(170, 0, 0), rgb(154, 0, 0)); border-radius: 50%; font-size: 20px; font-weight: 700; height: 140px; width: 140px; text-align: center; padding: 40px 0px; margin: 0; text-shadow: 2px -1px rgba(0, 0, 0, 0.7); } .hero .hero-examples .hero-arrow img{ width: 90px; } .hero .hero-examples .hero-arrow-ltr { text-align: right; } .hero .hero-examples .hero-arrow-rtl img{ transform: scaleX(-1); } @media (max-width: 575px) { .hero .hero-header .download-count img { width: 350px; } } @media (max-width: 991px) { .hero .hero-header { text-align: center; } .hero .hero-header .download-count img { width: 350px; } .hero .hero-examples h5 { margin: auto; } .hero .hero-examples .hero-arrow { display: none; } .hero .hero-examples h5 { margin-bottom: 20px; } .hero .hero-examples .row:last-child { margin-top: 40px; } } @media (max-width: 1199px) { .hero .hero-header .download-count img { width: 350px; } }
{ "pile_set_name": "Github" }
/dts-v1/; /include/ "rt2880.dtsi" / { #address-cells = <1>; #size-cells = <1>; compatible = "F5D8235_V1", "ralink,rt2880-soc"; model = "Belkin F5D8235 v1"; palmbus@300000 { gpio0: gpio@600 { status = "okay"; }; }; pinctrl { state_default: pinctrl0 { gpio { ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf"; ralink,function = "gpio"; }; }; }; cfi@1f000000 { compatible = "cfi-flash"; reg = <0x1f000000 0x800000>; bank-width = <2>; device-width = <2>; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "uboot"; reg = <0x0 0x30000>; read-only; }; partition@30000 { label = "uboot-env"; reg = <0x30000 0x10000>; read-only; }; factory: partition@40000 { label = "factory"; reg = <0x40000 0x10000>; read-only; }; partition@50000 { label = "linux"; reg = <0x50000 0x3b0000>; }; }; ethernet@400000 { status = "okay"; mtd-mac-address = <&factory 0x4>; port@0 { ralink,fixed-link = <1000 1 1 1>; }; }; /* FIXME: no u-boot partition and 0x40000@uboot is out of boundaries */ /* wmac@480000 { status = "okay"; ralink,mtd-eeprom = <&u-boot 0x40000>; }; */ rtl8366s { compatible = "realtek,rtl8366s"; gpio-sda = <&gpio0 1 0>; gpio-sck = <&gpio0 2 0>; }; gpio-keys-polled { compatible = "gpio-keys-polled"; #address-cells = <1>; #size-cells = <0>; poll-interval = <100>; wps { label = "wps"; gpios = <&gpio0 0 1>; linux,code = <0x211>; }; reset { label = "reset"; gpios = <&gpio0 9 1>; linux,code = <0x198>; }; }; gpio-leds { compatible = "gpio-leds"; storage { label = "f5d8235-v1:blue:storage"; gpios = <&gpio0 7 1>; }; storage2 { label = "f5d8235-v1:orange:storage"; gpios = <&gpio0 8 1>; }; }; };
{ "pile_set_name": "Github" }
// Copyright 2017-2020 The Verible 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. #include "verilog/analysis/checkers/undersized_binary_literal_rule.h" #include <initializer_list> #include "gtest/gtest.h" #include "common/analysis/linter_test_utils.h" #include "common/analysis/syntax_tree_linter_test_utils.h" #include "common/text/symbol.h" #include "verilog/CST/verilog_nonterminals.h" #include "verilog/analysis/verilog_analyzer.h" namespace verilog { namespace analysis { namespace { using verible::LintTestCase; using verible::RunLintTestCases; TEST(UndersizedBinaryLiteralTest, FunctionFailures) { constexpr int kToken = TK_BinDigits; const std::initializer_list<LintTestCase> kTestCases = { {""}, {"localparam x = 0;"}, {"localparam x = 1;"}, {"localparam x = '0;"}, {"localparam x = '1;"}, {"localparam x = 2'b0;"}, // exception granted for 0 {"localparam x = 3'b", {kToken, "00"}, ";"}, // only 2 0s for 3 bits {"localparam x = 32'b0;"}, // exception granted for 0 {"localparam x = 2'b", {kToken, "1"}, ";"}, {"localparam x = 2'b", {kToken, "?"}, ";"}, {"localparam x = 2'b", {kToken, "x"}, ";"}, {"localparam x = 2'b", {kToken, "z"}, ";"}, {"localparam x = 2'b ", {kToken, "1"}, ";"}, // with space after base {"localparam x = 2'b ", {kToken, "_1_"}, ";"}, // with underscores {"localparam x = 1'b0;"}, {"localparam x = 1'b1;"}, {"localparam x = 2'h1;"}, {"localparam x = 2'habcd;"}, {"localparam x = 32'd20;"}, {"localparam x = 16'o7;"}, {"localparam x = 8'b 0001_1000;"}, {"localparam x = 8'b ", {kToken, "001_1000"}, ";"}, {"localparam x = 8'b ", {kToken, "0001_100"}, ";"}, {"localparam x = 8'b ", {kToken, "????_xx1"}, ";"}, {"localparam x = 8'b ", {kToken, "1??_xz10"}, ";"}, {"localparam x = 0 + 2'b", {kToken, "1"}, ";"}, {"localparam x = 3'b", {kToken, "10"}, " + 3'b", {kToken, "1"}, ";"}, {"localparam x = 2'b ", {kToken, "x"}, " & 2'b ", {kToken, "1"}, ";"}, }; RunLintTestCases<VerilogAnalyzer, UndersizedBinaryLiteralRule>(kTestCases); } } // namespace } // namespace analysis } // namespace verilog
{ "pile_set_name": "Github" }
/* * The contents of this file are subject to the terms of the Common Development and * Distribution License (the License). You may not use this file except in compliance with the * License. * * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the * specific language governing permission and limitations under the License. * * When distributing Covered Software, include this CDDL Header Notice in each file and include * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL * Header, with the fields enclosed by brackets [] replaced by your own identifying * information: "Portions copyright [year] [name of copyright owner]". * * Copyright 2013-2015 ForgeRock AS. */ package org.forgerock.openam.entitlement.conditions.environment; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; import com.googlecode.ipv6.IPv6Address; import com.sun.identity.entitlement.EntitlementException; import com.sun.identity.entitlement.PrivilegeManager; import com.sun.identity.shared.debug.Debug; import java.util.List; import static com.sun.identity.entitlement.EntitlementException.INVALID_PROPERTY_VALUE; import static org.forgerock.openam.entitlement.conditions.environment.ConditionConstants.*; /** * An <code>EntitlementCondition</code> that can be used to enable/disable an authorization policy * based on the IP address and DNS name of the originating client requesting access to a resource. */ public class IPv6Condition extends IPvXCondition<IPv6Address> { /** * Constructs a new IPv6Condition instance. */ public IPv6Condition() { this(PrivilegeManager.debug); } /** * Constructs a new IPv6Condition instance. * * @param debug A Debug instance. */ IPv6Condition(Debug debug) { super(debug, null, null, IPVersion.IPV6); } /** * JSON deserialization constructor used to ensure fields are set in an order * that allows inter-field validation to pass. * * @throws EntitlementException If any of the provided properties fail validation */ @JsonCreator public IPv6Condition(@JsonProperty(START_IP) String startIp, @JsonProperty(END_IP) String endIp, @JsonProperty(IP_RANGE) List<String> ipRange, @JsonProperty(DNS_NAME) List<String> dnsName) throws EntitlementException { super(PrivilegeManager.debug, null, null, IPVersion.IPV6, startIp, endIp, ipRange, dnsName); } /** * {@inheritDoc} */ @Override protected IPv6Address stringToIp(String ip) throws EntitlementException { try { return IPv6Address.fromString(ip); } catch (IllegalArgumentException ex) { throw new EntitlementException(INVALID_PROPERTY_VALUE, new String[]{"ip", ip}); } } }
{ "pile_set_name": "Github" }
syntax = "proto2"; import "game_commands.proto"; message Command_RevealCards { extend GameCommand { optional Command_RevealCards ext = 1026; } optional string zone_name = 1; optional sint32 card_id = 2 [default = -1]; optional sint32 player_id = 3 [default = -1]; optional bool grant_write_access = 4; optional sint32 top_cards = 5 [default = -1]; }
{ "pile_set_name": "Github" }
#include <asm-generic/kvm_para.h>
{ "pile_set_name": "Github" }
<?php /** * Behavior for binding management. * * Behavior to simplify manipulating a model's bindings when doing a find operation * * PHP versions 4 and 5 * * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) * Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * Redistributions of files must retain the above copyright notice. * * @copyright Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://cakephp.org CakePHP(tm) Project * @package cake * @subpackage cake.tests.test_app.models * @since CakePHP(tm) v 1.2.0.5669 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ /** * Behavior to allow for dynamic and atomic manipulation of a Model's associations used for a find call. Most useful for limiting * the amount of associations and data returned. * * @package cake * @subpackage cake.cake.console.libs */ class PersisterOneBehaviorBehavior extends ModelBehavior { }
{ "pile_set_name": "Github" }
// Copyright 2019 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. #include "textflag.h" // On FreeBSD argc/argv are passed in R0, not RSP TEXT _rt0_arm64_freebsd(SB),NOSPLIT|NOFRAME,$0 ADD $8, R0, R1 // argv MOVD 0(R0), R0 // argc BL main(SB) // When building with -buildmode=c-shared, this symbol is called when the shared // library is loaded. TEXT _rt0_arm64_freebsd_lib(SB),NOSPLIT,$184 // Preserve callee-save registers. MOVD R19, 24(RSP) MOVD R20, 32(RSP) MOVD R21, 40(RSP) MOVD R22, 48(RSP) MOVD R23, 56(RSP) MOVD R24, 64(RSP) MOVD R25, 72(RSP) MOVD R26, 80(RSP) MOVD R27, 88(RSP) FMOVD F8, 96(RSP) FMOVD F9, 104(RSP) FMOVD F10, 112(RSP) FMOVD F11, 120(RSP) FMOVD F12, 128(RSP) FMOVD F13, 136(RSP) FMOVD F14, 144(RSP) FMOVD F15, 152(RSP) MOVD g, 160(RSP) // Initialize g as null in case of using g later e.g. sigaction in cgo_sigaction.go MOVD ZR, g MOVD R0, _rt0_arm64_freebsd_lib_argc<>(SB) MOVD R1, _rt0_arm64_freebsd_lib_argv<>(SB) // Synchronous initialization. MOVD $runtime·libpreinit(SB), R4 BL (R4) // Create a new thread to do the runtime initialization and return. MOVD _cgo_sys_thread_create(SB), R4 CMP $0, R4 BEQ nocgo MOVD $_rt0_arm64_freebsd_lib_go(SB), R0 MOVD $0, R1 SUB $16, RSP // reserve 16 bytes for sp-8 where fp may be saved. BL (R4) ADD $16, RSP B restore nocgo: MOVD $0x800000, R0 // stacksize = 8192KB MOVD $_rt0_arm64_freebsd_lib_go(SB), R1 MOVD R0, 8(RSP) MOVD R1, 16(RSP) MOVD $runtime·newosproc0(SB),R4 BL (R4) restore: // Restore callee-save registers. MOVD 24(RSP), R19 MOVD 32(RSP), R20 MOVD 40(RSP), R21 MOVD 48(RSP), R22 MOVD 56(RSP), R23 MOVD 64(RSP), R24 MOVD 72(RSP), R25 MOVD 80(RSP), R26 MOVD 88(RSP), R27 FMOVD 96(RSP), F8 FMOVD 104(RSP), F9 FMOVD 112(RSP), F10 FMOVD 120(RSP), F11 FMOVD 128(RSP), F12 FMOVD 136(RSP), F13 FMOVD 144(RSP), F14 FMOVD 152(RSP), F15 MOVD 160(RSP), g RET TEXT _rt0_arm64_freebsd_lib_go(SB),NOSPLIT,$0 MOVD _rt0_arm64_freebsd_lib_argc<>(SB), R0 MOVD _rt0_arm64_freebsd_lib_argv<>(SB), R1 MOVD $runtime·rt0_go(SB),R4 B (R4) DATA _rt0_arm64_freebsd_lib_argc<>(SB)/8, $0 GLOBL _rt0_arm64_freebsd_lib_argc<>(SB),NOPTR, $8 DATA _rt0_arm64_freebsd_lib_argv<>(SB)/8, $0 GLOBL _rt0_arm64_freebsd_lib_argv<>(SB),NOPTR, $8 TEXT main(SB),NOSPLIT|NOFRAME,$0 MOVD $runtime·rt0_go(SB), R2 BL (R2) exit: MOVD $0, R0 MOVD $1, R8 // SYS_exit SVC B exit
{ "pile_set_name": "Github" }
#!/bin/bash # # Usage: /path/to/phan/tool/make_ctags_for_phan_project [options for phpctags] # # This combines Phan and phpctags to generate a ctags file for your Phan project. # (This includes only the files you parse and analyze) # # phpctags can be obtained from https://github.com/vim-php/phpctags # # This may be useful if you already have whitelists and/or blacklists for excluding: # # - classes that aren't direct dependencies of your codebase # - `examples/` folders and test folders in `vendor/` and other third party code # # The resulting tags file may be combined with tags for JS, CSS, etc. function usage() { echo "Usage: $0 [options for phpctags]" 1>&2 } if ! type phpctags ; then echo "$0: Could not find phpctags in $PATH" 1>&2 echo usage exit 1 fi if [ ! -f .phan/config.php ]; then echo "Must run this from the root of a project configured to use Phan (could not find $PWD/.phan/config.php)" 1>&2 usage exit 1 fi DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" echo "Generating file list with Phan and running phpctags" # Run phpctags on the files that Phan would parse or analyze. # This can be a long list. Choose a default larger than 128KB (2MB) -- (run getconf ARG_MAX for the actual limit) # Unfortunately, phpctags doesn't have an option to read file arguments from a list or stdin # Note: Use a default memory limit higher than 128M - This is needed to parse FunctionSignatureMap.php "$DIR/../phan" --dump-parsed-file-list | xargs --exit -s 2000000 phpctags --memory=2G --verbose "$@"
{ "pile_set_name": "Github" }
/***************************************************************************/ /* */ /* t1gload.c */ /* */ /* Type 1 Glyph Loader (body). */ /* */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */ /* understand and accept it fully. */ /* */ /***************************************************************************/ #include <ft2build.h> #include "t1gload.h" #include FT_INTERNAL_CALC_H #include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_STREAM_H #include FT_OUTLINE_H #include FT_INTERNAL_POSTSCRIPT_AUX_H #include "t1errors.h" /*************************************************************************/ /* */ /* The macro FT_COMPONENT is used in trace mode. It is an implicit */ /* parameter of the FT_TRACE() and FT_ERROR() macros, used to print/log */ /* messages during execution. */ /* */ #undef FT_COMPONENT #define FT_COMPONENT trace_t1gload /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ /********** *********/ /********** COMPUTE THE MAXIMUM ADVANCE WIDTH *********/ /********** *********/ /********** The following code is in charge of computing *********/ /********** the maximum advance width of the font. It *********/ /********** quickly processes each glyph charstring to *********/ /********** extract the value from either a `sbw' or `seac' *********/ /********** operator. *********/ /********** *********/ /*************************************************************************/ /*************************************************************************/ /*************************************************************************/ FT_LOCAL_DEF( FT_Error ) T1_Parse_Glyph_And_Get_Char_String( T1_Decoder decoder, FT_UInt glyph_index, FT_Data* char_string ) { T1_Face face = (T1_Face)decoder->builder.face; T1_Font type1 = &face->type1; FT_Error error = T1_Err_Ok; #ifdef FT_CONFIG_OPTION_INCREMENTAL FT_Incremental_InterfaceRec *inc = face->root.internal->incremental_interface; #endif decoder->font_matrix = type1->font_matrix; decoder->font_offset = type1->font_offset; #ifdef FT_CONFIG_OPTION_INCREMENTAL /* For incremental fonts get the character data using the */ /* callback function. */ if ( inc ) error = inc->funcs->get_glyph_data( inc->object, glyph_index, char_string ); else #endif /* FT_CONFIG_OPTION_INCREMENTAL */ /* For ordinary fonts get the character data stored in the face record. */ { char_string->pointer = type1->charstrings[glyph_index]; char_string->length = (FT_Int)type1->charstrings_len[glyph_index]; } if ( !error ) error = decoder->funcs.parse_charstrings( decoder, (FT_Byte*)char_string->pointer, char_string->length ); #ifdef FT_CONFIG_OPTION_INCREMENTAL /* Incremental fonts can optionally override the metrics. */ if ( !error && inc && inc->funcs->get_glyph_metrics ) { FT_Incremental_MetricsRec metrics; metrics.bearing_x = FIXED_TO_INT( decoder->builder.left_bearing.x ); metrics.bearing_y = 0; metrics.advance = FIXED_TO_INT( decoder->builder.advance.x ); metrics.advance_v = FIXED_TO_INT( decoder->builder.advance.y ); error = inc->funcs->get_glyph_metrics( inc->object, glyph_index, FALSE, &metrics ); decoder->builder.left_bearing.x = INT_TO_FIXED( metrics.bearing_x ); decoder->builder.advance.x = INT_TO_FIXED( metrics.advance ); decoder->builder.advance.y = INT_TO_FIXED( metrics.advance_v ); } #endif /* FT_CONFIG_OPTION_INCREMENTAL */ return error; } FT_CALLBACK_DEF( FT_Error ) T1_Parse_Glyph( T1_Decoder decoder, FT_UInt glyph_index ) { FT_Data glyph_data; FT_Error error = T1_Parse_Glyph_And_Get_Char_String( decoder, glyph_index, &glyph_data ); #ifdef FT_CONFIG_OPTION_INCREMENTAL if ( !error ) { T1_Face face = (T1_Face)decoder->builder.face; if ( face->root.internal->incremental_interface ) face->root.internal->incremental_interface->funcs->free_glyph_data( face->root.internal->incremental_interface->object, &glyph_data ); } #endif /* FT_CONFIG_OPTION_INCREMENTAL */ return error; } FT_LOCAL_DEF( FT_Error ) T1_Compute_Max_Advance( T1_Face face, FT_Pos* max_advance ) { FT_Error error; T1_DecoderRec decoder; FT_Int glyph_index; T1_Font type1 = &face->type1; PSAux_Service psaux = (PSAux_Service)face->psaux; FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) ); *max_advance = 0; /* initialize load decoder */ error = psaux->t1_decoder_funcs->init( &decoder, (FT_Face)face, 0, /* size */ 0, /* glyph slot */ (FT_Byte**)type1->glyph_names, face->blend, 0, FT_RENDER_MODE_NORMAL, T1_Parse_Glyph ); if ( error ) return error; decoder.builder.metrics_only = 1; decoder.builder.load_points = 0; decoder.num_subrs = type1->num_subrs; decoder.subrs = type1->subrs; decoder.subrs_len = type1->subrs_len; decoder.buildchar = face->buildchar; decoder.len_buildchar = face->len_buildchar; *max_advance = 0; /* for each glyph, parse the glyph charstring and extract */ /* the advance width */ for ( glyph_index = 0; glyph_index < type1->num_glyphs; glyph_index++ ) { /* now get load the unscaled outline */ error = T1_Parse_Glyph( &decoder, glyph_index ); if ( glyph_index == 0 || decoder.builder.advance.x > *max_advance ) *max_advance = decoder.builder.advance.x; /* ignore the error if one occurred - skip to next glyph */ } psaux->t1_decoder_funcs->done( &decoder ); return T1_Err_Ok; } FT_LOCAL_DEF( FT_Error ) T1_Get_Advances( FT_Face t1face, /* T1_Face */ FT_UInt first, FT_UInt count, FT_Int32 load_flags, FT_Fixed* advances ) { T1_Face face = (T1_Face)t1face; T1_DecoderRec decoder; T1_Font type1 = &face->type1; PSAux_Service psaux = (PSAux_Service)face->psaux; FT_UInt nn; FT_Error error; if ( load_flags & FT_LOAD_VERTICAL_LAYOUT ) { for ( nn = 0; nn < count; nn++ ) advances[nn] = 0; return T1_Err_Ok; } error = psaux->t1_decoder_funcs->init( &decoder, (FT_Face)face, 0, /* size */ 0, /* glyph slot */ (FT_Byte**)type1->glyph_names, face->blend, 0, FT_RENDER_MODE_NORMAL, T1_Parse_Glyph ); if ( error ) return error; decoder.builder.metrics_only = 1; decoder.builder.load_points = 0; decoder.num_subrs = type1->num_subrs; decoder.subrs = type1->subrs; decoder.subrs_len = type1->subrs_len; decoder.buildchar = face->buildchar; decoder.len_buildchar = face->len_buildchar; for ( nn = 0; nn < count; nn++ ) { error = T1_Parse_Glyph( &decoder, first + nn ); if ( !error ) advances[nn] = FIXED_TO_INT( decoder.builder.advance.x ); else advances[nn] = 0; } return T1_Err_Ok; } FT_LOCAL_DEF( FT_Error ) T1_Load_Glyph( FT_GlyphSlot t1glyph, /* T1_GlyphSlot */ FT_Size t1size, /* T1_Size */ FT_UInt glyph_index, FT_Int32 load_flags ) { T1_GlyphSlot glyph = (T1_GlyphSlot)t1glyph; FT_Error error; T1_DecoderRec decoder; T1_Face face = (T1_Face)t1glyph->face; FT_Bool hinting; T1_Font type1 = &face->type1; PSAux_Service psaux = (PSAux_Service)face->psaux; const T1_Decoder_Funcs decoder_funcs = psaux->t1_decoder_funcs; FT_Matrix font_matrix; FT_Vector font_offset; FT_Data glyph_data; FT_Bool must_finish_decoder = FALSE; #ifdef FT_CONFIG_OPTION_INCREMENTAL FT_Bool glyph_data_loaded = 0; #endif #ifdef FT_CONFIG_OPTION_INCREMENTAL if ( glyph_index >= (FT_UInt)face->root.num_glyphs && !face->root.internal->incremental_interface ) #else if ( glyph_index >= (FT_UInt)face->root.num_glyphs ) #endif /* FT_CONFIG_OPTION_INCREMENTAL */ { error = T1_Err_Invalid_Argument; goto Exit; } FT_ASSERT( ( face->len_buildchar == 0 ) == ( face->buildchar == NULL ) ); if ( load_flags & FT_LOAD_NO_RECURSE ) load_flags |= FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING; if ( t1size ) { glyph->x_scale = t1size->metrics.x_scale; glyph->y_scale = t1size->metrics.y_scale; } else { glyph->x_scale = 0x10000L; glyph->y_scale = 0x10000L; } t1glyph->outline.n_points = 0; t1glyph->outline.n_contours = 0; hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE ) == 0 && ( load_flags & FT_LOAD_NO_HINTING ) == 0 ); t1glyph->format = FT_GLYPH_FORMAT_OUTLINE; error = decoder_funcs->init( &decoder, t1glyph->face, t1size, t1glyph, (FT_Byte**)type1->glyph_names, face->blend, FT_BOOL( hinting ), FT_LOAD_TARGET_MODE( load_flags ), T1_Parse_Glyph ); if ( error ) goto Exit; must_finish_decoder = TRUE; decoder.builder.no_recurse = FT_BOOL( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 ); decoder.num_subrs = type1->num_subrs; decoder.subrs = type1->subrs; decoder.subrs_len = type1->subrs_len; decoder.buildchar = face->buildchar; decoder.len_buildchar = face->len_buildchar; /* now load the unscaled outline */ error = T1_Parse_Glyph_And_Get_Char_String( &decoder, glyph_index, &glyph_data ); if ( error ) goto Exit; #ifdef FT_CONFIG_OPTION_INCREMENTAL glyph_data_loaded = 1; #endif font_matrix = decoder.font_matrix; font_offset = decoder.font_offset; /* save new glyph tables */ decoder_funcs->done( &decoder ); must_finish_decoder = FALSE; /* now, set the metrics -- this is rather simple, as */ /* the left side bearing is the xMin, and the top side */ /* bearing the yMax */ if ( !error ) { t1glyph->outline.flags &= FT_OUTLINE_OWNER; t1glyph->outline.flags |= FT_OUTLINE_REVERSE_FILL; /* for composite glyphs, return only left side bearing and */ /* advance width */ if ( load_flags & FT_LOAD_NO_RECURSE ) { FT_Slot_Internal internal = t1glyph->internal; t1glyph->metrics.horiBearingX = FIXED_TO_INT( decoder.builder.left_bearing.x ); t1glyph->metrics.horiAdvance = FIXED_TO_INT( decoder.builder.advance.x ); internal->glyph_matrix = font_matrix; internal->glyph_delta = font_offset; internal->glyph_transformed = 1; } else { FT_BBox cbox; FT_Glyph_Metrics* metrics = &t1glyph->metrics; FT_Vector advance; /* copy the _unscaled_ advance width */ metrics->horiAdvance = FIXED_TO_INT( decoder.builder.advance.x ); t1glyph->linearHoriAdvance = FIXED_TO_INT( decoder.builder.advance.x ); t1glyph->internal->glyph_transformed = 0; if ( load_flags & FT_LOAD_VERTICAL_LAYOUT ) { /* make up vertical ones */ metrics->vertAdvance = ( face->type1.font_bbox.yMax - face->type1.font_bbox.yMin ) >> 16; t1glyph->linearVertAdvance = metrics->vertAdvance; } else { metrics->vertAdvance = FIXED_TO_INT( decoder.builder.advance.y ); t1glyph->linearVertAdvance = FIXED_TO_INT( decoder.builder.advance.y ); } t1glyph->format = FT_GLYPH_FORMAT_OUTLINE; if ( t1size && t1size->metrics.y_ppem < 24 ) t1glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION; #if 1 /* apply the font matrix, if any */ if ( font_matrix.xx != 0x10000L || font_matrix.yy != font_matrix.xx || font_matrix.xy != 0 || font_matrix.yx != 0 ) FT_Outline_Transform( &t1glyph->outline, &font_matrix ); if ( font_offset.x || font_offset.y ) FT_Outline_Translate( &t1glyph->outline, font_offset.x, font_offset.y ); advance.x = metrics->horiAdvance; advance.y = 0; FT_Vector_Transform( &advance, &font_matrix ); metrics->horiAdvance = advance.x + font_offset.x; advance.x = 0; advance.y = metrics->vertAdvance; FT_Vector_Transform( &advance, &font_matrix ); metrics->vertAdvance = advance.y + font_offset.y; #endif if ( ( load_flags & FT_LOAD_NO_SCALE ) == 0 ) { /* scale the outline and the metrics */ FT_Int n; FT_Outline* cur = decoder.builder.base; FT_Vector* vec = cur->points; FT_Fixed x_scale = glyph->x_scale; FT_Fixed y_scale = glyph->y_scale; /* First of all, scale the points, if we are not hinting */ if ( !hinting || ! decoder.builder.hints_funcs ) for ( n = cur->n_points; n > 0; n--, vec++ ) { vec->x = FT_MulFix( vec->x, x_scale ); vec->y = FT_MulFix( vec->y, y_scale ); } /* Then scale the metrics */ metrics->horiAdvance = FT_MulFix( metrics->horiAdvance, x_scale ); metrics->vertAdvance = FT_MulFix( metrics->vertAdvance, y_scale ); } /* compute the other metrics */ FT_Outline_Get_CBox( &t1glyph->outline, &cbox ); metrics->width = cbox.xMax - cbox.xMin; metrics->height = cbox.yMax - cbox.yMin; metrics->horiBearingX = cbox.xMin; metrics->horiBearingY = cbox.yMax; if ( load_flags & FT_LOAD_VERTICAL_LAYOUT ) { /* make up vertical ones */ ft_synthesize_vertical_metrics( metrics, metrics->vertAdvance ); } } /* Set control data to the glyph charstrings. Note that this is */ /* _not_ zero-terminated. */ t1glyph->control_data = (FT_Byte*)glyph_data.pointer; t1glyph->control_len = glyph_data.length; } Exit: #ifdef FT_CONFIG_OPTION_INCREMENTAL if ( glyph_data_loaded && face->root.internal->incremental_interface ) { face->root.internal->incremental_interface->funcs->free_glyph_data( face->root.internal->incremental_interface->object, &glyph_data ); /* Set the control data to null - it is no longer available if */ /* loaded incrementally. */ t1glyph->control_data = 0; t1glyph->control_len = 0; } #endif if ( must_finish_decoder ) decoder_funcs->done( &decoder ); return error; } /* END */
{ "pile_set_name": "Github" }
{% extends "templates/layout.jinja2" %} {% block content %} <h2>{{ context.title }}</h2> <p>A document might have some body text.</p> {% endblock content %}
{ "pile_set_name": "Github" }
f5249a08d7e9e6b71ccf948a2982c92026ea6368e05d87f25ecc80a8ed6a70b775a25675f139815cff9f26d8e3c031fbf0597f1a4d23b64ffed0b323f71c2b94
{ "pile_set_name": "Github" }
package org.jetbrains.plugins.scala.lang.parser.parsing.patterns import org.jetbrains.plugins.scala.ScalaBundle import org.jetbrains.plugins.scala.lang.lexer.ScalaTokenTypes import org.jetbrains.plugins.scala.lang.parser.ScalaElementTypes import org.jetbrains.plugins.scala.lang.parser.parsing.builder.ScalaPsiBuilder /** * @author Alexander Podkhalyuzin * Date: 28.02.2008 */ /* * Pattern1 ::= varid ':' TypePat * | '_' ':' TypePat * | Pattern2 */ object Pattern1 extends Pattern1 { override protected def pattern2 = Pattern2 override protected def typePattern = TypePattern } trait Pattern1 { protected def pattern2: Pattern2 protected def typePattern: TypePattern def parse(builder: ScalaPsiBuilder): Boolean = { def isVarId = { val text = builder.getTokenText text.substring(0, 1).toLowerCase != text.substring(0, 1) || ( text.apply(0) == '`' && text.apply(text.length - 1) == '`' ) } val pattern1Marker = builder.mark val backupMarker = builder.mark builder.getTokenType match { case ScalaTokenTypes.tIDENTIFIER => if (isVarId) { backupMarker.rollbackTo() } else { builder.advanceLexer() //Ate id builder.getTokenType match { case ScalaTokenTypes.tCOLON => builder.advanceLexer() //Ate : backupMarker.drop() if (!typePattern.parse(builder)) { builder error ScalaBundle.message("wrong.type") } pattern1Marker.done(ScalaElementTypes.TYPED_PATTERN) return true case _ => backupMarker.rollbackTo() } } case ScalaTokenTypes.tUNDER => builder.advanceLexer() //Ate _ builder.getTokenType match { case ScalaTokenTypes.tCOLON => builder.advanceLexer() //Ate : backupMarker.drop() if (!typePattern.parse(builder)) { builder error ScalaBundle.message("wrong.type") } pattern1Marker.done(ScalaElementTypes.TYPED_PATTERN) return true case _ => backupMarker.rollbackTo() } case _ => backupMarker.drop() } pattern1Marker.drop() pattern2.parse(builder, forDef = false) } }
{ "pile_set_name": "Github" }
// // Jesse Squires // http://www.jessesquires.com // // GitHub // https://github.com/jessesquires/swift-sorts // // Copyright (c) 2014 Jesse Squires // import XCTest class SwiftSortsTests: XCTestCase { let sortedArray : [Int] = [0, 1, 4, 10, 23, 34, 34, 35, 66, 75, 87, 98, 687, 809, 9324] var unsortedArray : [Int]? = nil override func setUp() { super.setUp() self.unsortedArray = [23, 87, 1, 0, 34, 687, 34, 75, 10, 9324, 809, 98, 35, 4, 66] } override func tearDown() { self.unsortedArray = nil super.tearDown() } func testSwiftSort() { XCTAssertNotEqual(self.sortedArray, self.unsortedArray!, "Arrays should not be equal before sorting") let newSortedArray = swiftSort(self.unsortedArray!) XCTAssertEqual(self.sortedArray, newSortedArray, "Arrays should be equal after sorting") } func testQuickSort() { XCTAssertNotEqual(self.sortedArray, self.unsortedArray!, "Arrays should not be equal before sorting") let newSortedArray = quickSort(self.unsortedArray!) XCTAssertEqual(self.sortedArray, newSortedArray, "Arrays should be equal after sorting") } func testHeapSort() { XCTAssertNotEqual(self.sortedArray, self.unsortedArray!, "Arrays should not be equal before sorting") let newSortedArray = heapSort(self.unsortedArray!) XCTAssertEqual(self.sortedArray, newSortedArray, "Arrays should be equal after sorting") } func testInsertionSort() { XCTAssertNotEqual(self.sortedArray, self.unsortedArray!, "Arrays should not be equal before sorting") let newSortedArray = insertionSort(self.unsortedArray!) XCTAssertEqual(self.sortedArray, newSortedArray, "Arrays should be equal after sorting") } func testSelectionSort() { XCTAssertNotEqual(self.sortedArray, self.unsortedArray!, "Arrays should not be equal before sorting") let newSortedArray = selectionSort(self.unsortedArray!) XCTAssertEqual(self.sortedArray, newSortedArray, "Arrays should be equal after sorting") } }
{ "pile_set_name": "Github" }
apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: creationTimestamp: null labels: app.kubernetes.io/name: kubeform name: dbeventsubscriptions.aws.kubeform.com spec: additionalPrinterColumns: - JSONPath: .status.phase name: Phase type: string group: aws.kubeform.com names: kind: DbEventSubscription listKind: DbEventSubscriptionList plural: dbeventsubscriptions singular: dbeventsubscription scope: Namespaced subresources: status: {} validation: openAPIV3Schema: properties: apiVersion: description: 'APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' type: string kind: description: 'Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' type: string metadata: type: object spec: properties: arn: type: string customerAwsID: type: string enabled: type: boolean eventCategories: items: type: string type: array id: type: string name: type: string namePrefix: type: string providerRef: description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object snsTopic: type: string sourceIDS: items: type: string type: array sourceType: type: string tags: additionalProperties: type: string type: object required: - providerRef - snsTopic type: object status: properties: observedGeneration: description: Resource generation, which is updated on mutation by the API Server. format: int64 type: integer output: properties: arn: type: string customerAwsID: type: string enabled: type: boolean eventCategories: items: type: string type: array id: type: string name: type: string namePrefix: type: string providerRef: description: LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace. properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names TODO: Add other useful fields. apiVersion, kind, uid?' type: string type: object snsTopic: type: string sourceIDS: items: type: string type: array sourceType: type: string tags: additionalProperties: type: string type: object required: - providerRef - snsTopic type: object phase: type: string state: properties: lineage: type: string serial: format: int64 type: integer terraform_version: type: string version: format: int64 type: integer required: - lineage - serial - terraform_version - version type: object type: object type: object version: v1alpha1 versions: - name: v1alpha1 served: true storage: true
{ "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.spark.ml.classification import org.apache.spark.{SparkException, SparkFunSuite} import org.apache.spark.ml.classification.ClassifierSuite.MockClassifier import org.apache.spark.ml.feature.LabeledPoint import org.apache.spark.ml.linalg.{Vector, Vectors} import org.apache.spark.ml.param.ParamMap import org.apache.spark.ml.util.Identifiable import org.apache.spark.mllib.util.MLlibTestSparkContext import org.apache.spark.rdd.RDD import org.apache.spark.sql.{DataFrame, Dataset} class ClassifierSuite extends SparkFunSuite with MLlibTestSparkContext { import testImplicits._ private def getTestData(labels: Seq[Double]): DataFrame = { labels.map { label: Double => LabeledPoint(label, Vectors.dense(0.0)) }.toDF() } test("extractLabeledPoints") { val c = new MockClassifier // Valid dataset val df0 = getTestData(Seq(0.0, 2.0, 1.0, 5.0)) c.extractLabeledPoints(df0, 6).count() // Invalid datasets val df1 = getTestData(Seq(0.0, -2.0, 1.0, 5.0)) withClue("Classifier should fail if label is negative") { val e: SparkException = intercept[SparkException] { c.extractLabeledPoints(df1, 6).count() } assert(e.getMessage.contains("given dataset with invalid label")) } val df2 = getTestData(Seq(0.0, 2.1, 1.0, 5.0)) withClue("Classifier should fail if label is not an integer") { val e: SparkException = intercept[SparkException] { c.extractLabeledPoints(df2, 6).count() } assert(e.getMessage.contains("given dataset with invalid label")) } // extractLabeledPoints with numClasses specified withClue("Classifier should fail if label is >= numClasses") { val e: SparkException = intercept[SparkException] { c.extractLabeledPoints(df0, numClasses = 5).count() } assert(e.getMessage.contains("given dataset with invalid label")) } withClue("Classifier.extractLabeledPoints should fail if numClasses <= 0") { val e: IllegalArgumentException = intercept[IllegalArgumentException] { c.extractLabeledPoints(df0, numClasses = 0).count() } assert(e.getMessage.contains("but requires numClasses > 0")) } } test("getNumClasses") { val c = new MockClassifier // Valid dataset val df0 = getTestData(Seq(0.0, 2.0, 1.0, 5.0)) assert(c.getNumClasses(df0) === 6) // Invalid datasets val df1 = getTestData(Seq(0.0, 2.0, 1.0, 5.1)) withClue("getNumClasses should fail if label is max label not an integer") { val e: IllegalArgumentException = intercept[IllegalArgumentException] { c.getNumClasses(df1) } assert(e.getMessage.contains("requires integers in range")) } val df2 = getTestData(Seq(0.0, 2.0, 1.0, Int.MaxValue.toDouble)) withClue("getNumClasses should fail if label is max label is >= Int.MaxValue") { val e: IllegalArgumentException = intercept[IllegalArgumentException] { c.getNumClasses(df2) } assert(e.getMessage.contains("requires integers in range")) } } } object ClassifierSuite { /** * Mapping from all Params to valid settings which differ from the defaults. * This is useful for tests which need to exercise all Params, such as save/load. * This excludes input columns to simplify some tests. */ val allParamSettings: Map[String, Any] = Map( "predictionCol" -> "myPrediction", "rawPredictionCol" -> "myRawPrediction" ) class MockClassifier(override val uid: String) extends Classifier[Vector, MockClassifier, MockClassificationModel] { def this() = this(Identifiable.randomUID("mockclassifier")) override def copy(extra: ParamMap): MockClassifier = throw new NotImplementedError() override def train(dataset: Dataset[_]): MockClassificationModel = throw new NotImplementedError() // Make methods public override def extractLabeledPoints(dataset: Dataset[_], numClasses: Int): RDD[LabeledPoint] = super.extractLabeledPoints(dataset, numClasses) def getNumClasses(dataset: Dataset[_]): Int = super.getNumClasses(dataset) } class MockClassificationModel(override val uid: String) extends ClassificationModel[Vector, MockClassificationModel] { def this() = this(Identifiable.randomUID("mockclassificationmodel")) protected def predictRaw(features: Vector): Vector = throw new NotImplementedError() override def copy(extra: ParamMap): MockClassificationModel = throw new NotImplementedError() override def numClasses: Int = throw new NotImplementedError() } }
{ "pile_set_name": "Github" }