text:
@interface BBBBookActionHandlerTests : BBBCoreDataTestCase{
    BBBMockBookManager *bookManager;
    BBBMockLibraryService *libraryService;
    BBBMockRouter *router;

}
@end

@implementation BBBBookActionHandlerTests

#pragma mark - SetUp/TearDown

- (void) setUp{
    [super setUp];
    bookManager = [BBBMockBookManager new];
    libraryService = [BBBMockLibraryService new];
    router = [BBBMockRouter new];
}

- (void) tearDown{
    router = nil;
    bookManager = nil;
    libraryService = nil;
    [super tearDown];
}

#pragma mark - Helpers

- (BBBBookActionHandler *) newHandler{
    BBBBookActionHandler *handler = [BBBBookActionHandler new];
    handler.bookManager = bookManager;
    handler.libraryService = libraryService;
    handler.router = router;
    return handler;
}

#pragma mark - Init Tests

- (void) testInit{
    XCTAssertNotNil([BBBBookActionHandler new],
                    @"init should work");

}

#pragma mark - Paramater validation Tests

- (void) testCallingPerformActionWithNilBookThrows{
    BBBBookActionHandler *handler = [self newHandler];
    XCTAssertThrows([handler performAction:(BBBBookActionRead)
                                    onBook:nil
                             inEnvironment:BBBBookActionEnvironmentLibrary], @"should throw without book");
}

- (void) testCallingPerformActionWithNoActionThrows{
    id book = [super newBook];
    BBBBookActionHandler *handler = [self newHandler];
    XCTAssertThrows([handler performAction:(BBBBookActionNone)
                                    onBook:book
                             inEnvironment:BBBBookActionEnvironmentLibrary], @"should throw without action");
}

- (void) testCallingPerformUnsupportedActionInEnvironmentThrows{
    id book = [super newBook];
    BBBBookActionHandler *handler = [self newHandler];
    XCTAssertThrows([handler performAction:(BBBBookActionDelete) onBook:book inEnvironment:BBBBookActionEnvironmentSearch], @"should throw with invalid action for environment");
}

#pragma mark - Book Actions

- (void) testMarkAsReadLaterActionMarksBookAsUnread{
    id book = [self newBook];
    [book setEnumReadingStatus:BBBBookReadingStatusRead];
    BBBBookActionHandler *handler = [self newHandler];
    [handler performAction:BBBBookActionReadLater onBook:book inEnvironment:BBBBookActionEnvironmentNowReading];
    XCTAssertEqual([book readingStatusAsEnum], BBBBookReadingStatusUnread);
}

- (void) testReadBookOpensBook{
    id book = [self newBook];
    [book setEnumDownloadStatus:BBBBookDownloadStatusDownloaded];
    BBBBookActionHandler *handler = [self newHandler];
    handler.router = router;
    [handler performAction:BBBBookActionRead onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];
    XCTAssertEqualObjects(router.passedTarget, @"reader");
    XCTAssertEqualObjects(router.passedParamaters[@"book"], book);
}

- (void) testDownloadBookCallsPrepareBookForReading{
    id book = [self newBook];
    [book setEnumDownloadStatus:BBBBookDownloadStatusNotDownloaded];
    BBBBookActionHandler *handler = [self newHandler];
    handler.bookManager = bookManager;
    [handler performAction:BBBBookActionDownload onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];
    XCTAssertEqualObjects(bookManager.preparedBook, book);
}

- (void) testStopDownloadBookCallsStopPreparingBook{
    id book = [self newBook];
    [book setEnumDownloadStatus:BBBBookDownloadStatusDownloading];
    BBBBookActionHandler *handler = [self newHandler];
    handler.bookManager = bookManager;
    [handler performAction:BBBBookActionStopDownload onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];
    XCTAssertEqualObjects(bookManager.stoppedBook, book);
}

- (void) testDeleteBookCallsDeleteBook{
    id book = [self newBook];
    [book setIsbn:@"123"];
    [book setEnumDownloadStatus:BBBBookDownloadStatusDownloaded];
    BBBBookActionHandler *handler = [self newHandler];
    handler.bookManager = bookManager;
    [handler performAction:BBBBookActionDelete onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];
    XCTAssertTrue([bookManager.deletedISBNS containsObject:[book isbn]]);
}

- (void) testHideBookMarksBookAsHiddenOnDevice{
    id book = [self newBook];
    [book setIsHiddenOnDevice:@(NO)];
    BBBBookActionHandler *handler = [self newHandler];
    [handler performAction:BBBBookActionHide onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];
    XCTAssertEqualObjects([book isHiddenOnDevice], @(YES));
}

- (void) testPerformShowAboutShowsAboutThisBook{
    BBBBookActionHandler *handler = [self newHandler];

    BBBBook *book = [self newBook];
    book.isbn = @"123";

    handler.router = router;

    [handler performAction:(BBBBookActionShowAbout) onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];

    XCTAssertEqualObjects(router.passedTarget, @"aboutbook");
    XCTAssertEqualObjects(router.passedParamaters[@"book"], book);
}

- (void) testPerformShowTOCShowsTOCForBook{
    BBBBookActionHandler *handler = [self newHandler];

    BBBBook *book = [self newBook];
    book.isbn = @"123";

    handler.router = router;

    [handler performAction:(BBBBookActionShowTableOfContents) onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];

    XCTAssertEqualObjects(router.passedTarget, @"toc");
    XCTAssertEqualObjects(router.passedParamaters[@"book"], book);
}

- (void) testPrepareBookFailureIsReported{
    BBBBook *book = [self newBook];
    book.isbn = @"123";
    book.title = @"Book Title";
    BBBBookActionHandler *handler = [self newHandler];
    bookManager.shouldInvokePrepareCompletionBlock = YES;
    bookManager.prepareCompletionBlockPassedSuccess = NO;
    bookManager.prepareCompletionBlockPassedError =  [NSError errorWithDomain:kBBBPasswordRetrieverErrorDomain
                                                                          code:BBBPasswordRetreiverErrorCodeDownloadLimitReached
                                                                      userInfo:nil];

    handler.bookManager = bookManager;

    BBBUnitTestAnalyticsTracker *testTracker = [BBBUnitTestAnalyticsTracker new];
    [[BBBAnalyticsHelper sharedInstance]addTracker:testTracker withName:@"BBBTestTracker"];

    __block BOOL alertShown = NO;
    BBB_SWIZZLE_INSTANCE_METHOD_WITH_BLOCK([UIAlertView class], @selector(show), ^(UIAlertView *this){
        alertShown = YES;
        return;
    });

    [handler performAction:BBBBookActionDownload onBook:book inEnvironment:BBBBookActionEnvironmentLibrary];

    BBB_DESWIZZLE_INSTANCE_METHOD([UIAlertView class], @selector(show));

    XCTAssertTrue(alertShown);

    XCTAssertTrue([testTracker.receievedCategories containsObject:kBBBAnalyticsEventCategoryBookDownloads], @"");
    XCTAssertTrue([testTracker.receievedActions containsObject:kBBBAnalyticsEventActionDownloadStatus], @"");
    XCTAssertTrue([testTracker.receievedLabels containsObject:kBBBAnalyticsEventLabelFailed], @"");
    XCTAssertTrue([testTracker.receievedValues containsObject:@"123"], @"");

    XCTAssertTrue([testTracker.receievedCategories containsObject:kBBBAnalyticsEventCategoryError], @"");
    XCTAssertTrue([testTracker.receievedActions containsObject:kBBBAnalyticsEventActionDownloadError], @"");
    XCTAssertTrue([testTracker.receievedLabels containsObject:kBBBAnalyticsEventLabelExceedDownloadLimit], @"");
    XCTAssertTrue([testTracker.receievedValues containsObject:@"5000"], @"");

}

@end


text:
<?php

/**
 * COLORFULframework
 * @author sintloer <contact@sintloer.com>
 * @license MIT
 *
 */

namespace sintloer\COLORFUL\Utils;

class Helper
{

    /**
	 * Bind this object to callback.
	 * @param Closure $callback
	 * @param object $object
	 * @return boolean
	 *
	 */

	public static function bind(&$callback, $object)
	{
		if(is_callable($callback))
		{
			$bind = @$callback->bindTo($object);
			if($bind !== null && $bind !== false)
			{
				$callback = $bind;
				return true;
			}
		}

		return false;
	}

	/**
	 * Get callback from array.
	 * @param array $array
	 * @return mixed
	 *
	 */

	public static function getCallbackFromArray($array)
	{
		if(count($array) == 2)
		{
			$class = $array[0];
			$classMethod = $array[1];

			if(class_exists($class))
			{
				$obj = new $class();
				if(method_exists($obj, $classMethod))
				{
					$reflection = new \ReflectionMethod($obj, $classMethod);
					$closure = $reflection->getClosure($obj);

					if(is_callable($closure))
						return $closure;
				}
			}
		}

		return false;
	}
}

redpajama_set_name: RedPajamaGithub


text:
package org.intelligentsia.dowsers.command;

import org.intelligentsia.dowsers.core.Handler;

/**
 * CommandHandlerRegistry register command handlers instance.
 *
 * A command handler has only one responsibility: handle one particular command
 * by executing the appropriate domain behavior.

 * The command handler should not be doing any domain logic itself.

 * If there is a need for this than that logic should be moved into a service of
 * its own.

 * CommandHandler act as transaction boundaries for change on domain model.

 * CommandHandler should have a singleton scope.

 *
 * Example of CommandHandler implementation:
 *
 *

 * public class FakeHelloCommandHandler implements CommandHandler<FakeHelloCommand> {
 *
 * 	private String lastCalled;
 *
 * 	@Override
 * 	public void handle(final FakeHelloCommand command) {
 * 		lastCalled = command.getName();
 * 	}
 *
 * 	public String getLastCalled() {
 * 		return lastCalled;
 * 	}
 *
 * }
 *
 *

 *
 *
 *
 * @author Jerome Guibert
 */
public interface CommandHandlerRegistry {

	/**
	 * Register a new command handler instance.
	 *
	 * @param commandHandler
	 *            command handler instance
	 * @throws NullPointerException
	 *             if commandHandler is null
	 */
	public <T extends Command> void register(final Handler<T> commandHandler) throws NullPointerException;
}


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

		<link type="text/css" href="../../styles/left-without.css" rel="stylesheet" />

Basic example - without carousel

This is an example of the basic theme.

jCarousel is supported and can be integrated with PikaChoose!

Be sure to check out PikaChoose.com for updates.

You can use any type of html you want with PikaChoose

PikaChoose survives on your donations! Keep the project alive with a donation.


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.ServiceModel;
using System.Web;
using TeaCommerce.Api.Common;
using TeaCommerce.Api.Infrastructure.Logging;
using TeaCommerce.Api.Models;
using TeaCommerce.Api.Services;
using TeaCommerce.Api.Web.PaymentProviders;
using TeaCommerce.PaymentProviders.ePayService;

namespace TeaCommerce.PaymentProviders.Classic {

  [PaymentProvider( "ePay" )]
  public class ePay : APaymentProvider {

    public override string DocumentationLink { get { return "http://anders.burla.dk/umbraco/tea-commerce/using-epay-with-tea-commerce/"; } }

    public override bool SupportsRetrievalOfPaymentStatus { get { return true; } }
    public override bool SupportsCapturingOfPayment { get { return true; } }
    public override bool SupportsRefundOfPayment { get { return true; } }
    public override bool SupportsCancellationOfPayment { get { return true; } }

    public override IDictionary<string, string> DefaultSettings {
      get {
        Dictionary<string, string> defaultSettings = new Dictionary<string, string>();
        defaultSettings[ "merchantnumber" ] = "";
        defaultSettings[ "language" ] = "2";
        defaultSettings[ "accepturl" ] = "";
        defaultSettings[ "cancelurl" ] = "";
        defaultSettings[ "instantcapture" ] = "0";
        defaultSettings[ "paymenttype" ] = "";
        defaultSettings[ "windowstate" ] = "1";
        defaultSettings[ "iframeelement" ] = "";
        defaultSettings[ "md5securitykey" ] = "";
        defaultSettings[ "webservicepassword" ] = "";
        defaultSettings[ "testMode" ] = "1";
        return defaultSettings;
      }
    }

    public override PaymentHtmlForm GenerateHtmlForm( Order order, string teaCommerceContinueUrl, string teaCommerceCancelUrl, string teaCommerceCallBackUrl, string teaCommerceCommunicationUrl, IDictionary<string, string> settings ) {
      order.MustNotBeNull( "order" );
      settings.MustNotBeNull( "settings" );
      settings.MustContainKey( "merchantnumber", "settings" );
      settings.MustContainKey( "language", "settings" );

      PaymentHtmlForm htmlForm = new PaymentHtmlForm {
        Action = "https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx"
      };

      string[] settingsToExclude = new[] { "iframeelement", "md5securitykey", "webservicepassword", "testMode" };
      htmlForm.InputFields = settings.Where( i => !settingsToExclude.Contains( i.Key ) ).ToDictionary( i => i.Key, i => i.Value );

      //orderid
      htmlForm.InputFields[ "orderid" ] = order.CartNumber;

      //currency
      Currency currency = CurrencyService.Instance.Get( order.StoreId, order.CurrencyId );
      if ( !Iso4217CurrencyCodes.ContainsKey( currency.IsoCode ) ) {
        throw new Exception( "You must specify an ISO 4217 currency code for the " + currency.Name + " currency" );
      }

      htmlForm.InputFields[ "currency" ] = Iso4217CurrencyCodes[ currency.IsoCode ];

      //amount
      htmlForm.InputFields[ "amount" ] = ( order.TotalPrice.Value.WithVat * 100M ).ToString( "0", CultureInfo.InvariantCulture );

      htmlForm.InputFields[ "accepturl" ] = teaCommerceContinueUrl;
      htmlForm.InputFields[ "cancelurl" ] = teaCommerceCancelUrl;
      htmlForm.InputFields[ "callbackurl" ] = teaCommerceCallBackUrl;

      //instantcallback
      htmlForm.InputFields[ "instantcallback" ] = "1";

      //instantcapture
      if ( htmlForm.InputFields.ContainsKey( "instantcapture" ) && string.IsNullOrEmpty( htmlForm.InputFields[ "instantcapture" ] ) )
        htmlForm.InputFields.Remove( "instantcapture" );

      //cardtype
      if ( htmlForm.InputFields.ContainsKey( "paymenttype" ) && string.IsNullOrEmpty( htmlForm.InputFields[ "paymenttype" ] ) )
        htmlForm.InputFields.Remove( "paymenttype" );

      //windowstate
      if ( htmlForm.InputFields.ContainsKey( "windowstate" ) && string.IsNullOrEmpty( htmlForm.InputFields[ "windowstate" ] ) )
        htmlForm.InputFields.Remove( "windowstate" );

      htmlForm.InputFields[ "ownreceipt" ] = "1";

      //ePay dont support to show order line information to the shopper

      //md5securitykey
      if ( settings.ContainsKey( "md5securitykey" ) && !string.IsNullOrEmpty( settings[ "md5securitykey" ] ) ) {
        htmlForm.InputFields[ "hash" ] = GenerateMD5Hash( string.Join( "", htmlForm.InputFields.Values ) + settings[ "md5securitykey" ] );
      }

      htmlForm.JavaScriptFunction = SubmitJavascriptFunction( htmlForm.InputFields, settings );

      return htmlForm;
    }

    protected string SubmitJavascriptFunction( IDictionary<string, string> inputFields, IDictionary<string, string> settings ) {
      inputFields.MustNotBeNull( "inputFields" );
      settings.MustNotBeNull( "settings" );

      string rtnString = string.Empty;

      //If its state 3 (fullscreen) we return empty string because it's not supported by the JavaScript
      if ( !inputFields.ContainsKey( "windowstate" ) || inputFields[ "windowstate" ] != "3" ) {

        //Check if its iFrame mode (2) and check if an html element is specified - else fallback to overlay (1)
        if ( inputFields.ContainsKey( "windowstate" ) && inputFields[ "windowstate" ] == "2" && !settings.ContainsKey( "iframeelement" ) ) {
          inputFields[ "windowstate" ] = "1";
        }

        rtnString += "var paymentwindow = new PaymentWindow({";
        foreach ( var kvp in inputFields ) {
          rtnString += "'" + kvp.Key + "': '" + kvp.Value + "',";
        }
        rtnString = rtnString.Remove( rtnString.Length - 1, 1 );
        rtnString += "});";

        //Check if it's iFrame mode
        if ( inputFields.ContainsKey( "windowstate" ) && inputFields[ "windowstate" ] == "2" ) {
          rtnString += "paymentwindow.append('" + settings[ "iframeelement" ] + "');";
        }

        rtnString += "paymentwindow.open();";
      }

      return rtnString;
    }

    public override string GetContinueUrl( Order order, IDictionary<string, string> settings ) {
      settings.MustNotBeNull( "settings" );
      settings.MustContainKey( "accepturl", "settings" );

      return settings[ "accepturl" ];
    }

    public override string GetCancelUrl( Order order, IDictionary<string, string> settings ) {
      settings.MustNotBeNull( "settings" );
      settings.MustContainKey( "cancelurl", "settings" );

      return settings[ "cancelurl" ];
    }

    public override CallbackInfo ProcessCallback( Order order, HttpRequest request, IDictionary<string, string> settings ) {
      CallbackInfo callbackInfo = null;

      try {
        order.MustNotBeNull( "order" );
        request.MustNotBeNull( "request" );
        settings.MustNotBeNull( "settings" );

        //Write data when testing
        if ( settings.ContainsKey( "testMode" ) && settings[ "testMode" ] == "1" ) {
          LogRequest<ePay>( request, logGetData: true );
        }

        string transaction = request.QueryString[ "txnid" ];
        string strAmount = request.QueryString[ "amount" ];
        string hash = request.QueryString[ "hash" ];

        string md5CheckValue = string.Empty;

        foreach ( string k in request.QueryString.Keys ) {
          if ( k != "hash" ) {
            md5CheckValue += request.QueryString[ k ];
          }
        }
        if ( settings.ContainsKey( "md5securitykey" ) ) {
          md5CheckValue += settings[ "md5securitykey" ];
        }

        if ( order.CartNumber == request.QueryString[ "orderid" ] && GenerateMD5Hash( md5CheckValue ) == hash ) {
          string fee = request.QueryString[ "txnfee" ];
          string cardid = request.QueryString[ "paymenttype" ];
          string cardnopostfix = request.QueryString[ "cardno" ];

          decimal totalAmount = ( decimal.Parse( strAmount, CultureInfo.InvariantCulture ) + decimal.Parse( fee, CultureInfo.InvariantCulture ) );

          bool autoCaptured = settings.ContainsKey( "instantcapture" ) && settings[ "instantcapture" ] == "1";

          callbackInfo = new CallbackInfo( totalAmount / 100M, transaction, !autoCaptured ? PaymentState.Authorized : PaymentState.Captured, cardid, cardnopostfix );
        } else {
          LoggingService.Instance.Warn<ePay>( "ePay(" + order.CartNumber + ") - MD5Sum security check failed" );
        }
      } catch ( Exception exp ) {
        LoggingService.Instance.Error<ePay>( "ePay(" + order.CartNumber + ") - Process callback", exp );
      }

      return callbackInfo;
    }

    public override ApiInfo GetStatus( Order order, IDictionary<string, string> settings ) {
      ApiInfo apiInfo = null;

      try {
        order.MustNotBeNull( "order" );
        settings.MustNotBeNull( "settings" );
        settings.MustContainKey( "merchantnumber", "settings" );

        TransactionInformationType tit = new TransactionInformationType();
        int ePayResponse = 0;

        if ( GetEPayServiceClient().gettransaction( int.Parse( settings[ "merchantnumber" ] ), long.Parse( order.TransactionInformation.TransactionId ), settings.ContainsKey( "webservicepassword" ) ? settings[ "webservicepassword" ] : string.Empty, ref tit, ref ePayResponse ) ) {
          apiInfo = new ApiInfo( tit.transactionid.ToString( CultureInfo.InvariantCulture ), GetPaymentState( tit.status, tit.creditedamount ) );
        } else {
          LoggingService.Instance.Warn<ePay>( "ePay(" + order.OrderNumber + ") - Error making API request - error code: " + ePayResponse );
        }
      } catch ( Exception exp ) {
        LoggingService.Instance.Error<ePay>( "ePay(" + order.OrderNumber + ") - Get status", exp );
      }

      return apiInfo;
    }

    public override ApiInfo CapturePayment( Order order, IDictionary<string, string> settings ) {
      ApiInfo apiInfo = null;

      try {
        order.MustNotBeNull( "order" );
        settings.MustNotBeNull( "settings" );
        settings.MustContainKey( "merchantnumber", "settings" );

        int pbsResponse = 0;
        int ePayResponse = 0;

        if ( GetEPayServiceClient().capture( int.Parse( settings[ "merchantnumber" ] ), long.Parse( order.TransactionInformation.TransactionId ), (int)( order.TransactionInformation.AmountAuthorized.Value * 100M ), string.Empty, settings.ContainsKey( "webservicepassword" ) ? settings[ "webservicepassword" ] : string.Empty, ref pbsResponse, ref ePayResponse ) ) {
          apiInfo = new ApiInfo( order.TransactionInformation.TransactionId, PaymentState.Captured );
        } else {
          LoggingService.Instance.Warn<ePay>( "ePay(" + order.OrderNumber + ") - Error making API request - error code: " + ePayResponse + ", pbs response: " + pbsResponse );
        }
      } catch ( Exception exp ) {
        LoggingService.Instance.Error<ePay>( "ePay(" + order.OrderNumber + ") - Capture payment", exp );
      }

      return apiInfo;
    }

    public override ApiInfo RefundPayment( Order order, IDictionary<string, string> settings ) {
      ApiInfo apiInfo = null;

      try {
        order.MustNotBeNull( "order" );
        settings.MustNotBeNull( "settings" );
        settings.MustContainKey( "merchantnumber", "settings" );

        int pbsResponse = 0;
        int ePayResponse = 0;

        if ( GetEPayServiceClient().credit( int.Parse( settings[ "merchantnumber" ] ), long.Parse( order.TransactionInformation.TransactionId ), (int)( order.TransactionInformation.AmountAuthorized.Value * 100M ), string.Empty, settings.ContainsKey( "webservicepassword" ) ? settings[ "webservicepassword" ] : string.Empty, ref pbsResponse, ref ePayResponse ) ) {
          apiInfo = new ApiInfo( order.TransactionInformation.TransactionId, PaymentState.Refunded );
        } else {
          LoggingService.Instance.Warn<ePay>( "ePay(" + order.OrderNumber + ") - Error making API request - error code: " + ePayResponse + ", pbs response: " + pbsResponse );
        }
      } catch ( Exception exp ) {
        LoggingService.Instance.Error<ePay>( "ePay(" + order.OrderNumber + ") - Refund payment", exp );
      }

      return apiInfo;
    }

    public override ApiInfo CancelPayment( Order order, IDictionary<string, string> settings ) {
      ApiInfo apiInfo = null;

      try {
        order.MustNotBeNull( "order" );
        settings.MustNotBeNull( "settings" );
        settings.MustContainKey( "merchantnumber", "settings" );

        int ePayResponse = 0;

        if ( GetEPayServiceClient().delete( int.Parse( settings[ "merchantnumber" ] ), long.Parse( order.TransactionInformation.TransactionId ), string.Empty, settings.ContainsKey( "webservicepassword" ) ? settings[ "webservicepassword" ] : string.Empty, ref ePayResponse ) ) {
          apiInfo = new ApiInfo( order.TransactionInformation.TransactionId, PaymentState.Cancelled );
        } else {
          LoggingService.Instance.Warn<ePay>( "ePay(" + order.OrderNumber + ") - Error making API request - error code: " + ePayResponse );
        }
      } catch ( Exception exp ) {
        LoggingService.Instance.Error<ePay>( "ePay(" + order.OrderNumber + ") - Cancel payment", exp );
      }

      return apiInfo;
    }

    public override string GetLocalizedSettingsKey( string settingsKey, CultureInfo culture ) {
      switch ( settingsKey ) {
        case "accepturl":
          return settingsKey + "
e.g. /continue/";
        case "cancelurl":
          return settingsKey + "
e.g. /cancel/";
        case "instantcapture":
          return settingsKey + "
1 = true; 0 = false";
        case "paymenttype":
          return settingsKey + "
e.g. 2,4";
        case "windowstate":
          return settingsKey + "
1 = overlay; 2 = iframe; 3 = fullscreen";
        case "iframeelement":
          return settingsKey + "
Used when window state = 2";
        case "testMode":
          return settingsKey + "
1 = true; 0 = false";
        default:
          return base.GetLocalizedSettingsKey( settingsKey, culture );
      }
    }

    protected PaymentSoapClient GetEPayServiceClient() {
      return new PaymentSoapClient( new BasicHttpBinding( BasicHttpSecurityMode.Transport ), new EndpointAddress( "https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx" ) );
    }

    protected PaymentState GetPaymentState( TransactionStatus transactionStatus, int refundAmount ) {
      PaymentState paymentState = PaymentState.Initialized;
      if ( transactionStatus == TransactionStatus.PAYMENT_NEW )
        paymentState = PaymentState.Authorized;
      else if ( transactionStatus == TransactionStatus.PAYMENT_CAPTURED && refundAmount == 0 )
        paymentState = PaymentState.Captured;
      else if ( transactionStatus == TransactionStatus.PAYMENT_DELETED )
        paymentState = PaymentState.Cancelled;
      else if ( transactionStatus == TransactionStatus.PAYMENT_CAPTURED && refundAmount != 0 )
        paymentState = PaymentState.Refunded;
      else if ( transactionStatus == TransactionStatus.PAYMENT_EUROLINE_WAIT_CAPTURE || transactionStatus == TransactionStatus.PAYMENT_EUROLINE_WAIT_CREDIT )
        paymentState = PaymentState.PendingExternalSystem;
      return paymentState;
    }

  }
}


text:
from calvin.actor.actor import Actor, manage, condition, stateguard, calvinsys
from calvin.utilities.calvinlogger import get_logger

_log = get_logger(__name__)

class HTTPPost(Actor):
    """
    Post data to URL

    Input:
      URL : URL to post to
      data : Data to post
      params : dictionary with query parameters (optional)
      headers: dictionary with headers to include in request (optional)
      auth : dictionary with authtype (basic/digest), username and password (optional)
    Output:
      status: HTTP status of request
      headers: dictionary of response headers
      data : body of response (only if body is non-empty)
    """

    @manage()
    def init(self):
        self.cmd = calvinsys.open(self, "http.post")
        self.response = None

    @stateguard(lambda actor: calvinsys.can_write(actor.cmd))
    @condition(action_input=['URL', 'data', 'params', 'headers', 'auth'])
    def new_request(self, url, data, params, headers, auth):
        calvinsys.write(self.cmd, {"url": url, "data": data, "params": params, "headers": headers, "auth": auth})

    @stateguard(lambda actor: calvinsys.can_read(actor.cmd))
    @condition()
    def handle_reply(self):
        self.response = calvinsys.read(self.cmd)

    @stateguard(lambda actor: actor.response and actor.response.get("body"))
    @condition(action_output=['status', 'headers', 'data'])
    def reply_with_body(self):
        response = self.response
        self.response = None
        return (response.get("status"), response.get("headers"), response.get("body"))

    @stateguard(lambda actor: actor.response and not actor.response.get("body"))
    @condition(action_output=['status', 'headers'])
    def reply_without_body(self):
        response = self.response
        self.response = None
        return (response.get("status"), response.get("headers"))

    action_priority = (new_request, handle_reply, reply_with_body, reply_without_body)
    requires = ['http.post']


text:
package net.dryuf.maven.plugin.csvlocalizer;

import java.io.File;

/**
 * Main generator class
 */
public class Configuration
{
	public void			setLanguages(String[] languages)
	{
		this.languages = languages;
	}

	public String[]			getLanguages()
	{
		return languages;
	}

	public void			setCharsetEncoding(String charsetEncoding)
	{
		this.charsetEncoding = charsetEncoding;
	}

	public String			getCharsetEncoding()
	{
		return charsetEncoding;
	}

	public void			setOutputDirectory(File outputDirectory)
	{
		this.outputDirectory = outputDirectory;
	}

	public File			getOutputDirectory()
	{
		return outputDirectory;
	}

	public boolean			getGenerateMainMessages()
	{
		return generateMainMessages;
	}

	public void			setGenerateMainMessages(boolean generateMainMessages)
	{
		this.generateMainMessages = generateMainMessages;
	}

	public boolean			getGenerateClassMessages()
	{
		return generateClassMessages;
	}

	public void			setGenerateClassMessages(boolean generateClassMessages)
	{
		this.generateClassMessages = generateClassMessages;
	}

	protected String[]		languages;

	protected String		charsetEncoding;

	protected File			outputDirectory;

	protected boolean		generateMainMessages;

	protected boolean		generateClassMessages;
}


text:
(function($) {

  $.fn.ABWizard = function(options) {

    // default options
    var defaults = {
      stepNavigation: "#abwizard-navigation",
      stepOnLoad: undefined,
      beforeAjaxLoad: undefined,
      afterAjaxLoad: undefined,
      onAjaxError: undefined,
      beforeShowStep: undefined,
      onShowStep: undefined,
      onHideStep: undefined
    };
    options = $.extend(defaults, options);

    function showStep(step, widget) {
      var stepToShow = $("#" + step);
      var stepToHide = $("#" + widget.currentStep);
      var result;

      if(stepToShow.length === 0) {
        return; // if step does not exist, ignore
      }

      if($.isFunction(options.beforeShowStep)) {
        result = options.beforeShowStep(this, stepToShow, stepToHide);
        if(result === false) {
            return;
        }
      }

      if(stepToShow.hasClass("step-ajax") && (stepToShow.data("reload") || !stepToShow.data("loaded"))) {
        if($.isFunction(options.beforeAjaxLoad)) {
          options.beforeAjaxLoad(this, stepToShow);
        }
        stepToShow.load(stepToShow.data("href"), function(response, status) {
          if(status === "error") {
            if($.isFunction(options.onAjaxError)) {
              options.onAjaxError(this, stepToShow);
            }
          } else {
            widget._setup_buttons(stepToShow);
            stepToShow.data("loaded", "true");
            if($.isFunction(options.afterAjaxLoad)) {
              options.afterAjaxLoad(this, stepToShow);
            }
          }
        });
      }

      if($.isFunction(options.onHideStep)) {
        result = options.onHideStep(this, stepToShow);
        if(result === false) {
          return;
        }
      }
      stepToHide.hide();
      stepToShow.show();
      widget.currentStep = step;

      if(typeof widget.stepNavigation !== 'undefined') {
        widget.stepNavigation.find("." + stepToHide.attr("id")).removeClass("active");
        widget.stepNavigation.find("." + stepToShow.attr("id")).addClass("active");
      }

      if($.isFunction(options.onShowStep)) {
        options.onShowStep(this, stepToShow);
      }
    }

    function setup_navigation(element, widget) {
      if(typeof element !== 'undefined') {
        element.find("a.step-link").bind("click", function(event) {
          event.preventDefault();
          var step = $(event.currentTarget).attr("href").replace(/#/g, '');
          showStep(step, widget);
        });
      }
      return element;
    }

    var widget = {
      _init: function(container, options) {
        this.container = $(container);
        this.container.find(".step").hide();
        this.stepNavigation = setup_navigation($(options.stepNavigation), this);
        this._setup_buttons();
        this.currentStep = "";
        this.goto(options.stepOnLoad);
      },
      _setup_buttons: function(element) {
        var self = this;
        var containerElement = this.container;
        if(typeof element !== 'undefined') {
          containerElement = element;
        }

        var buttons = containerElement.find(".wizard-action-button");
        $.each(buttons, function(index, button) {
          $(button).bind("click", function(event) {
            var stepToGo = $(event.currentTarget).data("step");
            if(typeof stepToGo === 'undefined') {
              self.first();
            } else {
              self.goto(stepToGo);
            }
          });
        });

        buttons = containerElement.find(".wizard-next-button");
        $.each(buttons, function(index, button) {
          $(button).bind("click", function() {
            self.next();
          });
        });

        buttons = containerElement.find(".wizard-previous-button");
        $.each(buttons, function(index, button) {
          $(button).bind("click", function() {
            self.previous();
          });
        });
      },
      first: function() {
        var firstStep = this.container.find(".step:first");
        showStep(firstStep.attr("id"), this);
      },
      last: function() {
        var lastStep = this.container.find(".step:last");
        showStep(lastStep.attr("id"), this);
      },
      next: function() {
        var nextStep = this.container.find("#" + this.currentStep).next();
        if(nextStep.hasClass("step")) {
          showStep(nextStep.attr("id"), this);
        }
      },
      previous: function() {
        var prevStep = this.container.find("#" + this.currentStep).prev();
        if(prevStep.hasClass("step")) {
          showStep(prevStep.attr("id"), this);
        }
      },
      goto: function(step) {
        if(typeof step === 'undefined') {
          this.first();
        } else {
          if(this.currentStep === step) {
            return;
          }
          showStep(step, this);
        }
      }
    };

    widget._init(this, options);
    return widget;
  };

}(jQuery));


text:
.. image:: ../../images/badges/badge_mobile.png
    :class: pull-right

Statictext
===========

Statictext controls display text that read-only and does not require user input. They often serve as labels for other controls
or to indentify areas of the View. They can also be used to add context to the user interface.

|

.. image:: ../../images/gcs/mob/mobgc-statictext.png

|

The Statictext control properties can be set for the following categories of properties:

* :ref:`mobgc-statictext_main-label`
* :ref:`mobgc-statictext_styling-label`
* :ref:`mobgc-statictext_tooltip-label`
* :ref:`mobgc-statictext_events-label`
* :ref:`mobgc-statictext_extended-label`

|

.. _mobgc-statictext_main-label:

Main Properties
---------------

+------------------------+-------------------+--------------------------------------------------------------------------------------------+
| **Main Properties**    | Possible Values   | Description                                                                                |
+========================+===================+============================================================================================+
| Id                     | nnnnn             | Id is a unique identifier that is 5 or more digits long. It is generated by DreamFace and  |
|                        |                   | can be used when refering to this field in script.                                         |
+------------------------+-------------------+--------------------------------------------------------------------------------------------+
| Name                   | txtText1#         | Name is a reference to the component's DOM element. It can be used to dynamically access   |
|                        |                   | and set component properties. DreamFace gives a default name of *txtText#* where #         |
|                        |                   | corresponds to the order in which the control was created. The second statictext created   |
|                        |                   | will have a default Name of *txtText12*. Name is not required and can be removed if not    |
|                        |                   | needed.                                                                                |
+------------------------+-------------------+--------------------------------------------------------------------------------------------+
| Text                   | Any text or       | Any text that will be displayed in the field. It should be in quotes, otherwise it will be |
|                        | angular expression| treated as a variable.                                                                     |
|                        |                   |                                                                                |
|                        |                   | **Text can also be an angular expression** which will be evaluated at runtime.             |
|                        |                   |                                                                                |
|                        |                   | See more about how to define :ref:`angular-expression-label` here.                         |
|                        |                   |                                                                                |
|                        |                   | **Note** - If your label doesn't appear in Preview mode, make sure the text is in quotes.  |
|                        |                   | If you have an angular expression that does not appear in Preview mode it means that their |
|                        |                   | most likely an error in your angular expression. Take a look at the sample angular         |
|                        |                   | expressions in the Samples Gallery. If your expression contains an apostrophe, use double  |
|                        |                   | quotes. For example "It's a button" would evaluate to: *It's a button* at runtime or in    |
|                        |                   | in Preview Mode when testing the View.                                                     |
|                        |                   |                                                                                |
+------------------------+-------------------+--------------------------------------------------------------------------------------------+
| Display                | *true* or *false* | The value can either be a literal *true* to display the field or *false* to hide it, or it |
|                        | angular expression| can be a angular expression that evaulates to *true* or *false*, for example,              |
|                        |                   | 5 > 2 would evaluate to *true* and 5 < 2 would evaluate to *false* because 5 is not less   |
|                        |                   | than 2. It is also possible to use $scope variables that are already defined.              |
|                        |                   |                                                                                |
|                        |                   | On the right hand side of the field you will see **...** indicating that help in defining  |
|                        |                   | expression is available. Click on the *...** and a Expression Editor will be displayed,    |
|                        |                   | indicating defined scope variables and functions. You can use existing scope variables in  |
|                        |                   | as part of your angular expression, for example, myVar == 5, would evaluate the expression |
|                        |                   | using the value stored in the scope variable myVar, if equal to 5 the expression would     |
|                        |                   | evaluate to **true** and the text would be displayed.                                      |
|                        |                   |                                                                                |
|                        |                   | See :ref:`angular-expression-label`  for more help.                                        |
+------------------------+-------------------+--------------------------------------------------------------------------------------------+

|

.. _mobgc-statictext_styling-label:

.. include:: mobgc-props-styling.rst

|

.. _mobgc-statictext_tooltip-label:

Tooltip Properties
------------------

+------------------------+-------------------+--------------------------------------------------------------------------------------------+
| **Tooltip Properties** | Possible Values   | Description                                                                                |
+========================+===================+============================================================================================+
| Tooltip Text           |  Any text         | Tip to help the user know what to do. It will be displayed when mouse passes over this     |
|                        |                   | control. The Tooltip Text can also be an expression.                                       |
+------------------------+-------------------+--------------------------------------------------------------------------------------------+
| Tooltip Direction      | Left, Top,        | A radio button is provided with the values Left, Top, Bottom or Right corresponding to the |
|                        | Bottom, Right     | position where the tooltip will be displayed relative to the text.                         |
+------------------------+-------------------+--------------------------------------------------------------------------------------------+

|

.. _mobgc-statictext_events-label:

.. include:: mobgc-props-events.rst

|

.. _mobgc-statictext_extended-label:

Extended Directive
------------------

+------------------------+-------------------+--------------------------------------------------------------------------------------------+
| **Extended Directive** | Possible Values   | Description                                                                                |
+========================+===================+============================================================================================+
|  Add Directive         | function name     | This allows developers to add extended directives to customize the default Statictext      |
|                        |                   | and add functionality. When you click on *Add Directive*                                   |
+------------------------+-------------------+--------------------------------------------------------------------------------------------+

Return to the `Documentation Home <http://localhost:63342/dfd/build/index.html>`_.

|


text:
package org.nowireless.miscmath.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Marks a method or an parameter that accepts radians for angle measurements,
 * or it can return a radian value.
 * @author nowireless
 *
 */

@Documented
@Target({ElementType.METHOD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface Radian {
}


text:
<?php
use Yii;
use yii\bootstrap\Nav;

$menus = [
    ['label' => Yii::t('module', 'Installed Modules'), 'url' => ['module/installed']],
    ['label' => Yii::t('module', 'Marketplace'), 'url' => ['module/marketplace']],
    ['label' => Yii::t('module', 'Available Updates'), 'url' => ['module/available-updates']]
];

echo Nav::widget([
    'options' => ['class' => 'nav nav-pills'],
    'items' => $menus,
]);


text:
<?php

/**
 * Spanish Translation
 * By: Supay, Lautaro
 */

# General
$lang['server_time'] = 'Hora del Servidor';
$lang['user_time'] = 'Tu hora';
$lang['switch_lang'] = 'Cambiar idioma';

# Menú y barra de navegación
$lang['menu_txt_1'] = 'Inicio';
$lang['menu_txt_2'] = 'Foro';
$lang['menu_txt_3'] = 'Registro';
$lang['menu_txt_4'] = 'Entrar';
$lang['menu_txt_5'] = 'Mi Cuenta';
$lang['menu_txt_6'] = 'Salir';
$lang['menu_txt_7'] = 'Descargas';
$lang['menu_txt_8'] = 'Donaciones';
$lang['menu_txt_9'] = 'Vote';
$lang['menu_txt_10'] = 'Ranking';
$lang['menu_txt_11'] = 'Información';

# títulos de módulos
$lang['module_titles_txt_1'] = 'Registrar una nueva cuenta';
$lang['module_titles_txt_2'] = 'Ingresar';
$lang['module_titles_txt_3'] = 'Panel de Control';
$lang['module_titles_txt_4'] = 'Mi Cuenta';
$lang['module_titles_txt_5'] = 'Cambiar correo electrónico';
$lang['module_titles_txt_6'] = 'Cambiar contraseña';
$lang['module_titles_txt_7'] = 'Votar por créditos';
$lang['module_titles_txt_8'] = 'Descargas';
$lang['module_titles_txt_9'] = 'Términos de uso';
$lang['module_titles_txt_10'] = 'TOP Rankings';
$lang['module_titles_txt_11'] = 'Dona por créditos';
$lang['module_titles_txt_12'] = 'Resetear personaje';
$lang['module_titles_txt_13'] = 'Borrar PK';
$lang['module_titles_txt_14'] = 'Preguntas más frecuentes';
$lang['module_titles_txt_15'] = 'He olvidado la contraseña';
$lang['module_titles_txt_16'] = 'Desatorar personaje';
$lang['module_titles_txt_17'] = 'Información del servidor';
$lang['module_titles_txt_18'] = 'Resetear Stats';
$lang['module_titles_txt_19'] = 'Resetear Árbol de Habilidad';
$lang['module_titles_txt_20'] = 'Verificación de correo electrónico';
$lang['module_titles_txt_21'] = 'PayPal';
$lang['module_titles_txt_22'] = 'Super Rewards';
$lang['module_titles_txt_23'] = 'Western Union';
$lang['module_titles_txt_24'] = 'Politica de Privacidad';
$lang['module_titles_txt_25'] = 'Agregar Stats';
$lang['module_titles_txt_26'] = 'Contáctanos';
$lang['module_titles_txt_27'] = 'Reembolsos';
$lang['module_titles_txt_28'] = 'Comprar Zen';
$lang['module_titles_txt_29'] = 'Castle Siege';

# usercp
$lang['usercp_menu_title'] = 'Panel de Usuario';
$lang['usercp_menu_txt_1'] = 'Mi Cuenta';
$lang['usercp_menu_txt_2'] = 'Reset personaje';
$lang['usercp_menu_txt_3'] = 'Borrar PK';
$lang['usercp_menu_txt_4'] = 'Votar por créditos';
$lang['usercp_menu_txt_5'] = 'Dona por créditos';
$lang['usercp_menu_txt_6'] = 'Desatorar personaje';
$lang['usercp_menu_txt_7'] = 'Sbuscripción VIP';
$lang['usercp_menu_txt_8'] = 'Resetear Stats';
$lang['usercp_menu_txt_9'] = 'Restear Árbol de Habilidad';
$lang['usercp_menu_txt_10'] = 'Agregar stats';
$lang['usercp_menu_txt_11'] = 'Comprar Zen';

# éxito
$lang['success_1'] = 'Su cuenta ha sido creada con éxito. Usted será redirigido a inicio de sesión en 3 segundos. ';
$lang['success_2'] = 'Su contraseña de la cuenta se ha actualizado correctamente.';
$lang['success_3'] = 'Te hemos enviado un correo electrónico con un enlace de verificación. Una vez que se verifique la dirección de correo electrónico de su contraseña se actualizará. ';
$lang['success_4'] = 'Hemos enviado un correo electrónico con su nueva contraseña! (Recuerde revisar también su carpeta de correo no deseado/basura) ';
$lang['success_5'] = 'Su contraseña de la cuenta se ha cambiado correctamente!';
$lang['success_6'] = 'Te hemos enviado un correo electrónico con un enlace especial para recuperar su cuenta de acceso. (Recuerde revisar también su carpeta de correo no deseado/basura) ';
$lang['success_7'] = 'Hemos enviado un correo electrónico con su nueva contraseña! (Recuerde revisar también su carpeta de correo no deseado/basura) ';
$lang['success_8'] = 'Su personaje ha sido reseteado correctamente.';
$lang['success_9'] = 'Las estadísticas de su personaje han sido reseteadas correctamente. ';
$lang['success_10'] = 'El nivel PK de su personaje ha sido limpiado correctamente. ';
$lang['success_11'] = 'Tu personaje ha sido movido al bar de Lorencia.';
$lang['success_12'] = 'El árbol de habilidades de tu personaje ha sido reseteado.';
$lang['success_13'] = '';
$lang['success_14'] = '';
$lang['success_15'] = 'Noticias añadidas correctamente!';
$lang['success_16'] = '';
$lang['success_17'] = 'Los puntos han sido agregados a tu personaje.';
$lang['success_18'] = 'Un enlace de verificación ha sido enviado a su correo electrónico para completar el registro.';
$lang['success_19'] = 'Por favor, compruebe su dirección de correo electrónico actual para continuar.';
$lang['success_20'] = 'La dirección de correo electrónico de su cuenta se ha cambiado correctamente. ';
$lang['success_21'] = 'Completado con éxito la compra Zen.';
$lang['success_22'] = 'Gracias por contactar con nosotros, vamos a responder a su mensaje breve.';

# errores
$lang['error_1'] = 'La contraseña ingresada no es correcta, por favor, inténtelo de nuevo. ';
$lang['error_2'] = 'El nombre de usuario introducido no existe.';
$lang['error_3'] = 'Ha alcanzado el número máximo de errores de inicio de sesión, por lo tanto, su cuenta se ha inhabilitado temporalmente para iniciar sesión en el sitio web.';
$lang['error_4'] = 'Debe completar todos los campos del formulario.';
$lang['error_5'] = 'La longitud nombre de usuario debe ser de 4 a 10 caracteres.';
$lang['error_6'] = 'El nombre de usuario sólo puede contener caracteres alfanuméricos.';
$lang['error_7'] = 'La longitud de la contraseña puede ser de 4 a 32 caracteres.';
$lang['error_8'] = 'Las contraseñas no coinciden.';
$lang['error_9'] = 'La dirección de correo electrónico que entró no es válido. ';
$lang['error_10'] = 'El nombre de usuario que ha introducido ya existe.';
$lang['error_11'] = 'La dirección de correo electrónico que ha introducido ya existe.';
$lang['error_12'] = 'La información de su cuenta no pudo ser recuperada. Por favor, inténtelo de nuevo más tarde.';
$lang['error_13'] = 'Su contraseña es incorrecta.';
$lang['error_14'] = 'Su cuenta está en línea, porfavor desconéctela.';
$lang['error_15'] = 'Su cuenta ya ha votado en este sitio en las últimas 12 horas';
$lang['error_16'] = 'Su dirección IP ya ha votado en ese sitio en las últimas 12 horas';
$lang['error_17'] = 'Nuevos registros no están habilitadas actualmente, por favor intente de nuevo más tarde.';
$lang['error_18'] = 'Verificación de Recaptcha fallida, por favor inténtelo de nuevo';
$lang['error_19'] = 'Usted tiene una solicitud de cambio de contraseña activa, por favor revise su correo electrónico';
$lang['error_20'] = 'No se podía enviar el mensaje de verificación, en contacto con el equipo de soporte.';
$lang['error_21'] = 'Su solicitud no pudo ser procesada, por favor, póngase en contacto con el equipo de apoyo.';
$lang['error_22'] = 'No podríamos crear su cuenta, por favor, póngase en contacto con el equipo de apoyo.';
$lang['error_23'] = 'Se ha producido un error inesperado, por favor, póngase en contacto con el equipo de apoyo';
$lang['error_24'] = 'La información proporcionada en su solicitud no es válida.';
$lang['error_25'] = 'Su solicitud no pudo completarse, por favor intente de nuevo.';
$lang['error_26'] = 'Su solicitud de cambio de contraseña ha caducado, por favor solicite una nueva.';
$lang['error_27'] = 'El código de autorización proporcionado no es válida.';
$lang['error_28'] = 'Su cuenta está en línea, porfavor desconéctela.';
$lang['error_29'] = 'La contraseña no puede ser cambiado, por favor, póngase en contacto con el equipo de apoyo.';
$lang['error_30'] = 'No se han encontrado con la dirección de correo electrónico proporcionada cuentas';
$lang['error_31'] = 'Datos de recuperación de contraseña no válidos.';
$lang['error_32'] = 'Usted no tiene permiso para restablecer este personaje';
$lang['error_33'] = 'Su personaje no cumple con el requisito de nivel de restablecimiento, por favor, subir de nivel.';
$lang['error_34'] = 'Usted no tiene suficiente Zen.';
$lang['error_35'] = 'Usted no tiene permiso para restablecer este personaje estadísticas. ';
$lang['error_36'] = 'Usted no tiene permiso para restablecer este personaje nivel de PK ';
$lang['error_37'] = 'Usted no tiene permiso para despegar este personaje posición de s ';
$lang['error_38'] = 'Usted no tiene permiso para borrar este personaje árbol de habilidad';
$lang['error_39'] = 'Su nivel maestro debe ser';
$lang['error_40'] = 'Usted no tiene suficientes créditos.';
$lang['error_41'] = 'Por favor complete todos los campos.';
$lang['error_42'] = 'Título puede tener un mínimo de 4 caracteres y un máximo de 80.';
$lang['error_43'] = 'El contenido de las noticias debe ser de al menos 4 caracteres.';
$lang['error_44'] = 'No se pudo cargar el ranking solicitado.';
$lang['error_45'] = 'Operación no válida, redirigiendo a inicio.';
$lang['error_46'] = 'Su cuenta no tiene caracteres.';
$lang['error_47'] = 'Este módulo no está habilitada actualmente, por favor intente de nuevo más tarde.';
$lang['error_48'] = 'Su solicitud no pudo ser procesada debido a que el sistema de correo electrónico no está activo, por favor, póngase en contacto con el equipo de apoyo';
$lang['error_49'] = 'El id de cron proporcionado no es valido.';
$lang['error_50'] = 'El archivo de cron proporcionado no es valido.';
$lang['error_51'] = 'Has excedido la cantidad de puntos disponibles para agregar.';
$lang['error_52'] = 'Unicamente la clase Dark Lord puede agregar puntos de command.';
$lang['error_53'] = 'Tus stats no deberan exceder el maximo de %s puntos.';
$lang['error_54'] = 'Debes agregar al menos %s puntos.';
$lang['error_55'] = 'La compra de la cantidad seleccionada superará el límite permitido zen por personaje, por favor elija una cantidad diferente.';
$lang['error_56'] = 'El nombre introducido no es válido.';
$lang['error_57'] = 'El mensaje introducido no es válido.';
$lang['error_58'] = 'No hay resultados de la clasificación para mostrar.';
$lang['error_59'] = 'No se pudo determinar qué clases requieren CMD stat. Por favor confifure character_cmd en su archivo de configuración. ';
$lang['error_60'] = 'No se pudo cargar la biblioteca de reCAPTCHA, por favor contactar con el soporte.';
$lang['error_61'] = 'No hay artículos de noticias se han publicado.';
$lang['error_62'] = 'El sistema de cambio de idioma está desactivada.';
$lang['error_63'] = 'El idioma seleccionado no es válido.';
$lang['error_64'] = 'Usted no tiene permiso para añadir estadísticas para este personaje';
$lang['error_65'] = 'No se pudo cambiar el idioma.';
$lang['error_66'] = 'No ha establecido un ID de configuración.';
$lang['error_67'] = 'El ID de usuario introducido no es válido.';
$lang['error_68'] = 'El nombre de usuario introducido contiene caracteres no permitidos.';
$lang['error_69'] = 'El nombre de usuario introducido no es válido.';
$lang['error_70'] = 'El correo electrónico introducido no es válido.';
$lang['error_71'] = 'El nombre de caracteres introducida no es válida.';
$lang['error_72'] = 'La cantidad de créditos para agregar debe ser un número sin signo.';
$lang['error_73'] = 'El identificador de usuario no se ha establecido.';
$lang['error_74'] = 'Hubo un error añadiendo los créditos';
$lang['error_75'] = 'La cantidad de créditos para restar debe ser un número sin signo.';
$lang['error_76'] = 'Hubo un error restando los créditos';
$lang['error_77'] = 'El ID de configuración proporcionada no es válida.';
$lang['error_78'] = 'El título sólo puede contener caracteres alfanuméricos y espacios.';
$lang['error_79'] = 'La base de datos entró contiene caracteres no permitidos.';
$lang['error_80'] = 'La tabla entró contiene caracteres no permitidos.';
$lang['error_81'] = 'La columna créditos entró contiene caracteres no permitidos.';
$lang['error_82'] = 'La columna usuario ha introducido contiene caracteres no permitidos.';
$lang['error_83'] = 'El identificador de columna de usuario no es válida.';
$lang['error_84'] = 'Rellene todos los campos obligatorios';
$lang['error_85'] = 'Ha habido un error al añadir la configuración de la base de datos, comprobar los errores de base de datos';
$lang['error_86'] = 'Ha habido un error al editar la configuración, comprobar si hay errores de base de datos';
$lang['error_87'] = 'Ha habido un error al eliminar la configuración, comprobar los errores de base de datos';
$lang['error_88'] = 'Identificador no se establece, no se puede comprobar el estado en línea';
$lang['error_89'] = 'Hubo un error al obtener el valor de los créditos.';
$lang['error_90'] = 'No se pudo cargar configuraciones de correo electrónico.';
$lang['error_91'] = 'No puede mostrarse la plantilla de correo electrónico.';
$lang['error_92'] = 'Dirección de correo electrónico no válida, no pueden enviar correo electrónico.';
$lang['error_93'] = 'Usted no se estableció una plantilla.';
$lang['error_94'] = 'No se pudo cargar la plantilla de correo electrónico personalizado (usted debe proporcionar una ruta completa de la plantilla).';
$lang['error_95'] = 'Plantilla de correo electrónico no se ha establecido.';
$lang['error_96'] = 'No hay ninguna dirección de correo del destinatario se ha establecido.';
$lang['error_97'] = 'asunto del correo electrónico no se ha establecido.';
$lang['error_98'] = 'Iniciar sesión configuraciones que faltan.';
$lang['error_99'] = 'Se produjo un error durante la edición de las noticias';
$lang['error_100'] = 'No se pudo cargar configuraciones de sistemas voto.';
$lang['error_101'] = 'Dirección IP no es válida.';
$lang['error_102'] = 'Configuración de crédito no se ha establecido (sistema de votación)';
$lang['error_103'] = 'La información de castle siege no se pudo cargar, contacta a soporte tecnico.';
$lang['error_104'] = 'No existen crons en la base de datos.';
$lang['error_105'] = 'La accion pedida no es valida.';
$lang['error_106'] = 'El nuevo cron no pudo ser agregado, favor de llenar todos los campos requeridos.';
$lang['error_107'] = 'Ya existe un cron con el mismo nombre.';
$lang['error_108'] = 'No se pudo cargar la información de la clase del personaje, contacta a soporte tecnico.';
$lang['error_109'] = 'La clase de tu personaje no es valida, contacta a soporte tecnico.';
$lang['error_110'] = 'No se pudo cargar la información de stats base de tu clase, contacta a soporte tecnico.';
$lang['error_111'] = 'El id de usuario proporcionado no es valido.';
$lang['error_112'] = 'El nombre de usuario proporcionado no es valido.';
$lang['error_113'] = 'No tienes suficientes %s para resetear los stats de tu personaje.';
$lang['error_114'] = 'No tienes suficientes %s para mover de ubicacion tu personaje.';
$lang['error_115'] = 'Tu personaje ya se encuentra en el Bar de Lorencia.';
$lang['error_116'] = 'No tienes suficientes %s para resetear el estado de PK de tu personaje.';
$lang['error_117'] = 'Tu personaje no es PK.';
$lang['error_118'] = 'No tienes suficientes %s para resetear el arbol de habilidades de tu personaje.';
$lang['error_119'] = 'No se pudo cargar la información de nivel maestro de tu personaje, contacta a soporte tecnico.';
$lang['error_120'] = 'Tu personaje no cuenta con el nivel requerido para resetear el arbol de habilidades.';
$lang['error_121'] = 'Tu personaje no cuenta con el nivel maestro requerido para resetear el arbol de habilidades.';
$lang['error_122'] = 'Los valores ingresados no son validos, favor de intentar nuevamente.';
$lang['error_123'] = 'Tu personaje no cuenta con el nivel requerido para agregar puntos.';
$lang['error_124'] = 'Tu personaje no cuenta con el nivel maestro requerido para agregar puntos.';
$lang['error_125'] = 'No tienes suficientes %s para agregar puntos a tu personaje.';
$lang['error_126'] = 'No tienes suficientes %s para resetear tu personaje.';
$lang['error_127'] = 'Has alcanzado el maximo de resets con este personaje.';
$lang['error_128'] = 'No se pudo cargar la información del grupo de clase, contacta a soporte tecnico.';

# registro
$lang['register_txt_1'] = 'Nombre de usuario:';
$lang['register_txt_2'] = 'Contraseña:';
$lang['register_txt_3'] = 'Confirmar contraseña:';
$lang['register_txt_4'] = 'Dirección de correo electrónico:';
$lang['register_txt_5'] = 'Crear Cuenta';
$lang['register_txt_6'] = '%s a %s caracteres alfanumericos';
$lang['register_txt_7'] = '%s a %s caracteres';
$lang['register_txt_8'] = 'Re-escribir la contraseña';
$lang['register_txt_9'] = 'Por favor utilice una dirección válida de correo electrónico';
$lang['register_txt_10'] = 'Al registrarse usted acepta nuestros
Términos de Servicios.';

# iniciar sesión
$lang['login_txt_1'] = 'Nombre de usuario:';
$lang['login_txt_2'] = 'Contraseña:';
$lang['login_txt_3'] = 'Iniciar sesión';
$lang['login_txt_4'] = 'olvidó su contraseña?';
$lang['login_txt_5'] = 'Ha utilizado %s de %s intentos de inicio de sesión. Después se han utilizado todos los s%, no podrá iniciar sesión durante 15 minutos. ';

# cuenta
$lang['myaccount_txt_1'] = 'Estado de Cuenta:';
$lang['myaccount_txt_2'] = 'Nombre de usuario:';
$lang['myaccount_txt_3'] = 'Dirección de correo electrónico:';
$lang['myaccount_txt_4'] = 'Contraseña:';
$lang['myaccount_txt_5'] = 'Estado:';
$lang['myaccount_txt_6'] = 'Cambio';
$lang['myaccount_txt_7'] = 'Activada';
$lang['myaccount_txt_8'] = 'Congelada';
$lang['myaccount_txt_9'] = 'En línea';
$lang['myaccount_txt_10'] = 'Desconectado';
$lang['myaccount_txt_12'] = 'Créditos:';
$lang['myaccount_txt_13'] = 'Fecha';
$lang['myaccount_txt_14'] = 'Recuperar';
$lang['myaccount_txt_15'] = 'Mis Personajes:';
$lang['myaccount_txt_16'] = 'Historial de Conexion';
$lang['myaccount_txt_17'] = 'Server';
$lang['myaccount_txt_18'] = 'IP';
$lang['myaccount_txt_19'] = 'Accion';

# votar
$lang['vfc_txt_1'] = 'TopSite';
$lang['vfc_txt_2'] = 'Créditos de recompensa';
$lang['vfc_txt_3'] = 'Votar ahora!';

# Se te olvidó tu contraseña
$lang['forgotpass_txt_1'] = 'Dirección de correo electrónico:';
$lang['forgotpass_txt_2'] = 'Enviar correo electrónico de recuperación';

# descargas
$lang['downloads_txt_1'] = 'Archivo';
$lang['downloads_txt_2'] = 'Host';
$lang['downloads_txt_3'] = 'Tamaño del archivo';
$lang['downloads_txt_4'] = 'MB';
$lang['downloads_txt_5'] = 'Descargar';
$lang['downloads_txt_6'] = 'Descarga de cliente';
$lang['downloads_txt_7'] = 'Descarga de parches';
$lang['downloads_txt_8'] = 'Descarga de herramientas';

# Noticias
$lang['news_txt_1'] = 'Publicado por %s, %s';
$lang['news_txt_2'] = 'Mostrar los comentarios';
$lang['news_txt_3'] = 'Leer más ›';

# ranking
$lang['rankings_txt_1'] = 'Top Level';
$lang['rankings_txt_2'] = 'Top Resets';
$lang['rankings_txt_3'] = 'Top Killers';
$lang['rankings_txt_4'] = 'Top Guilds';
$lang['rankings_txt_5'] = 'Top Grand Resets';
$lang['rankings_txt_6'] = 'Top Online';
$lang['rankings_txt_7'] = 'Top Votes';
$lang['rankings_txt_8'] = 'Top Gens';
$lang['rankings_txt_9'] = '';
$lang['rankings_txt_10'] = 'Personaje';
$lang['rankings_txt_11'] = 'Clase';
$lang['rankings_txt_12'] = 'Nivel';
$lang['rankings_txt_13'] = 'Resets';
$lang['rankings_txt_14'] = 'Asesinatos';
$lang['rankings_txt_15'] = 'Tiempo total en línea';
$lang['rankings_txt_16'] = 'Horas';
$lang['rankings_txt_17'] = 'Nombre del Guild';
$lang['rankings_txt_18'] = 'Guild Master';
$lang['rankings_txt_19'] = 'Puntuación';
$lang['rankings_txt_20'] = 'Última actualización @';
$lang['rankings_txt_21'] = 'Grand Resets';
$lang['rankings_txt_22'] = 'Top Master Level';
$lang['rankings_txt_23'] = 'Master Level';
$lang['rankings_txt_24'] = '';
$lang['rankings_txt_25'] = '';
$lang['rankings_txt_26'] = 'Gens Duprian';
$lang['rankings_txt_27'] = 'Gens Vanert';
$lang['rankings_txt_28'] = 'Guild logo';
$lang['rankings_txt_29'] = 'Tipo';
$lang['rankings_txt_30'] = 'Rango';
$lang['rankings_txt_31'] = 'Contribución';
$lang['rankings_txt_32'] = 'Votos';
$lang['rankings_txt_33'] = 'País';
$lang['rankings_txt_34'] = 'Localización';
$lang['rankings_txt_35'] = 'Nivel de Pk';

# Limpiar PK
$lang['clearpk_txt_1'] = 'Personaje';
$lang['clearpk_txt_2'] = 'Zen';
$lang['clearpk_txt_3'] = 'Estado PK';
$lang['clearpk_txt_4'] = 'Borrar PK';
$lang['clearpk_txt_5'] = 'Su personaje debe tener al menos %s Zen para borrar Pk';

# Árbol de habilidades clara
$lang['clearst_txt_1'] = 'Personaje';
$lang['clearst_txt_2'] = 'Nivel Maestro';
$lang['clearst_txt_3'] = 'Zen';
$lang['clearst_txt_4'] = 'GO';
$lang['clearst_txt_5'] = 'Puntos';
$lang['clearst_txt_6'] = 'Tu personaje debe tener como minimo nivel %s maestro.';
$lang['clearst_txt_7'] = 'Su personaje debe tener al menos %s Zen para restablecer el árbol de habilidades';
$lang['clearst_txt_8'] = 'Tu personaje debe tener como minimo nivel %s';

# donación
$lang['donation_txt_2'] = 'Créditos';

# Cambia la contraseña
$lang['changepassword_txt_1'] = 'Contraseña actual:';
$lang['changepassword_txt_2'] = 'Nueva contraseña:';
$lang['changepassword_txt_3'] = 'Confirmar nueva contraseña:';
$lang['changepassword_txt_4'] = 'Cambiar contraseña';

# Resetear
$lang['resetcharacter_txt_1'] = 'Personaje';
$lang['resetcharacter_txt_2'] = 'Nivel';
$lang['resetcharacter_txt_3'] = 'Zen';
$lang['resetcharacter_txt_4'] = 'Resets';
$lang['resetcharacter_txt_5'] = 'Reset';
$lang['resetcharacter_txt_6'] = 'Su personaje debe ser nivel %s';
$lang['resetcharacter_txt_7'] = 'Tu personaje debe tener como minimo %s zen';
$lang['resetcharacter_txt_8'] = 'Seras recompensado con %s credits';
$lang['resetcharacter_txt_9'] = 'Debes contar como minimo con %s creditos para resetear tu personaje';
$lang['resetcharacter_txt_10'] = 'Puedes resetear tu personaje un maximo de %s veces';
$lang['resetcharacter_txt_11'] = 'El inventario de tu personaje sera borrado, asegurate de guardar tus items en el baul.';

# Arreglar stats
$lang['resetstats_txt_1'] = 'Personaje';
$lang['resetstats_txt_2'] = 'Nivel';
$lang['resetstats_txt_3'] = 'STR';
$lang['resetstats_txt_4'] = 'AGI';
$lang['resetstats_txt_5'] = 'VIT';
$lang['resetstats_txt_6'] = 'ENE';
$lang['resetstats_txt_7'] = 'CMD';
$lang['resetstats_txt_8'] = 'Resetear';
$lang['resetstats_txt_9'] = 'Tu personaje debe tener como mínimo %s zen para resetear los stats.';

# unstick
$lang['unstickcharacter_txt_1'] = 'personaje';
$lang['unstickcharacter_txt_2'] = 'Zen';
$lang['unstickcharacter_txt_3'] = 'desatorar';
$lang['unstickcharacter_txt_4'] = 'Su personaje debe tener al menos %s Zen para desatorar';

# Recuperarse Master Key
$lang['masterkey_txt_1'] = 'Enviar Master Key a mi correo electrónico ahora!';

# Añadir las estadísticas
$lang['addstats_txt_1'] = 'Personaje';
$lang['addstats_txt_2'] = '%s puntos disponibles';
$lang['addstats_txt_3'] = 'Fuerza';
$lang['addstats_txt_4'] = 'agilidad';
$lang['addstats_txt_5'] = 'vitalidad';
$lang['addstats_txt_6'] = 'Energía';
$lang['addstats_txt_7'] = 'Comando';
$lang['addstats_txt_8'] = 'Agregar puntos';
$lang['addstats_txt_9'] = 'Su personaje debe tener al menos %s Zen añadir stats';
$lang['addstats_txt_10'] = 'Tu personaje debe tener como minimo nivel maestro %s';
$lang['addstats_txt_11'] = 'Tu personaje debe tener como minimo nivel %s';
$lang['addstats_txt_12'] = 'Cada stat puede tener un maximo de %s puntos';
$lang['addstats_txt_13'] = 'Debes agregar como minimo %s puntos para utilizar esta herramienta';

# Castillo bandera de asedio
$lang['csbanner_txt_1'] = 'Dueño del Castillo';
$lang['csbanner_txt_2'] = 'La batalla comienza en';
$lang['csbanner_txt_3'] = 'Guild Master';

# perfiles
$lang['profiles_txt_1'] = 'Perfil del Guild';
$lang['profiles_txt_2'] = 'Perfil del jugador';
$lang['profiles_txt_3'] = 'Guild Master:';
$lang['profiles_txt_4'] = 'Puntuación:';
$lang['profiles_txt_5'] = 'Miembros:';
$lang['profiles_txt_6'] = 'Miembros';
$lang['profiles_txt_7'] = 'Nivel';
$lang['profiles_txt_8'] = 'Resets';
$lang['profiles_txt_9'] = 'Grand Resets';
$lang['profiles_txt_10'] = 'Fuerza';
$lang['profiles_txt_11'] = 'agilidad';
$lang['profiles_txt_12'] = 'vitalidad';
$lang['profiles_txt_13'] = 'Energía';
$lang['profiles_txt_14'] = 'Comando';
$lang['profiles_txt_15'] = 'Asesinatos';
$lang['profiles_txt_16'] = 'Guild';
$lang['profiles_txt_17'] = 'Estado';
$lang['profiles_txt_18'] = 'En línea';
$lang['profiles_txt_19'] = 'Desconectado';
$lang['profiles_txt_20'] = 'Nivel maestro';

# Cambio de dirección de correo electrónico
$lang['changemail_txt_1'] = 'Nuevo correo electrónico';
$lang['changemail_txt_2'] = 'Cambiar';

# Información del servidor barra lateral
$lang['sidebar_srvinfo_txt_1'] = 'Información del Servidor';
$lang['sidebar_srvinfo_txt_2'] = 'Cuentas totales';
$lang['sidebar_srvinfo_txt_3'] = 'Personajes totales';
$lang['sidebar_srvinfo_txt_4'] = 'Guilds totales';
$lang['sidebar_srvinfo_txt_5'] = 'Usuarios en línea';
$lang['sidebar_srvinfo_txt_6'] = 'Version';
$lang['sidebar_srvinfo_txt_7'] = 'Experiencia';
$lang['sidebar_srvinfo_txt_8'] = 'Experiencia Maestra';
$lang['sidebar_srvinfo_txt_9'] = 'Drop';

# Castillo de sitio
$lang['castlesiege_txt_1'] = 'Batalla Castle Siege';
$lang['castlesiege_txt_2'] = 'Dueño del Castillo';
$lang['castlesiege_txt_3'] = 'Trial Money:';
$lang['castlesiege_txt_4'] = 'Tax Rate Goblin:';
$lang['castlesiege_txt_5'] = 'Tax Rate NPC:';
$lang['castlesiege_txt_6'] = 'Tax Rate Trial:';
$lang['castlesiege_txt_7'] = 'Información del Castillo';
$lang['castlesiege_txt_8'] = 'Zen';
$lang['castlesiege_txt_9'] = 'Estapa Actual:';
$lang['castlesiege_txt_10'] = 'Siguiente Etapa:';
$lang['castlesiege_txt_11'] = 'Duracion de la Battalla:';
$lang['castlesiege_txt_12'] = 'Guild Master';
$lang['castlesiege_txt_13'] = 'Alianza del Castillo';
$lang['castlesiege_txt_14'] = 'Guild';
$lang['castlesiege_txt_15'] = 'Master';
$lang['castlesiege_txt_16'] = 'Logo';
$lang['castlesiege_txt_17'] = 'Puntuación';
$lang['castlesiege_txt_18'] = 'Miembros';
$lang['castlesiege_txt_19'] = 'Guilds Registrados';
$lang['castlesiege_txt_20'] = 'Calendario del Evento';
$lang['castlesiege_txt_21'] = 'Etapa';
$lang['castlesiege_txt_22'] = 'Fecha de Inicio';
$lang['castlesiege_txt_23'] = 'Fecha Final';
$lang['castlesiege_schedule_1'] = 'Periodo de Registracion de Guilds';
$lang['castlesiege_schedule_2'] = 'Periodo de Registracion de Mark of Lord';
$lang['castlesiege_schedule_3'] = 'Anuncio';
$lang['castlesiege_schedule_4'] = 'Preparacion del Castillo';
$lang['castlesiege_schedule_5'] = 'Batalla de Castle Siege';
$lang['castlesiege_schedule_6'] = 'Espera';
$lang['castlesiege_time_1'] = '%s dias %s horas';
$lang['castlesiege_time_2'] = '%s horas %s minutos';
$lang['castlesiege_time_3'] = '%s minutos';
$lang['castlesiege_time_4'] = 'Menos de un minuto.';
$lang['castlesiege_battle_duration'] = '%s horas %s minutos';
$lang['castlesiege_widget_title'] = 'Castle Siege';

# Compran zen
$lang['buyzen_txt_1'] = 'Comprar Zen';
$lang['buyzen_txt_2'] = 'Enviar zen a';
$lang['buyzen_txt_3'] = 'Personaje';
$lang['buyzen_txt_4'] = 'Zen';
$lang['buyzen_txt_5'] = 'Comprar';
$lang['buyzen_txt_6'] = 'Crédito(s)';

# Contáctenos
$lang['contactus_txt_1'] = 'Dirección de correo electrónico';
$lang['contactus_txt_2'] = 'Mensaje';
$lang['contactus_txt_3'] = 'Enviar';

# footer
$lang['footer_terms'] = 'Terminos de Servicio';
$lang['footer_privacy'] = 'Politica de Privacidad';
$lang['footer_refund'] = 'Politica de Reembolsos';
$lang['footer_info'] = 'Información del Servidor';
$lang['footer_contact'] = 'Contactanos';
$lang['footer_copyright'] = '%s © %s, TODOS LOS DERECHOS RESERVADOS.';
$lang['footer_webzen_copyright'] = 'Este sitio no está asociado ni respaldado de ninguna manera por Webzen Inc.';


text:
* - 400 g de viande hachée de boeuf
- 4 oeufs
- 1 bouquet de qqch (persil, menthe, basilic...)
- 1 bel oignon
- "chapelure" obtenue ac du pain rassis broyé ou chapelure du commerce ou biscottes broyées(mais c moins bon) pour obtenir la consistance souhaitée
- une poignée de parmesan
- 2 belles gousses d'ail
- sel poivre

* Mixer le tout et mélanger

* Saisir et faire cuire dans un peu d'huile d'olive

*Faire mijoter:
- pulpe de tomate "mutti"
- 2 gousses d'ail
- un petit oignon
- sel poivre

* Rajouter les boulettes ds la sauce pour finir la cuisson

(Servir avec de bonnes pâtes au beurre par exemple.)
    'teaser' => '- 400 g de viande hachée de boeuf
- 4 oeufs
- 1 bouquet de qqch (persil, menthe, basilic...)
- 1 bel oignon
- "chapelure" obtenue ac du pain rassis broyé ou chapelure du commerce ou biscottes broyées(mais c moins bon) pour obtenir la consistance souhaitée
- une poignée de parmesan
- 2 belles gousses d'ail
- sel poivre

* Mixer le tout et mélanger

* Saisir et faire cuire dans un peu d'huile d'olive

*Faire mijoter:
- pulpe de tomate "mutti"
- 2 gousses d'ail
- un petit oignon
- sel poivre

* Rajouter les boulettes ds la sauce pour finir la cuisson

(Servir avec de bonnes pâtes au beurre par exemple.)


text:
package io.craigmiller160.school.service;

import java.time.LocalDate;
import java.util.List;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import io.craigmiller160.school.entity.Course;
import io.craigmiller160.school.entity.Gender;
import io.craigmiller160.school.entity.JoinHolder;
import io.craigmiller160.school.entity.ScJoinHolder;
import io.craigmiller160.school.entity.Student;
import io.craigmiller160.school.repo.GenericEntityDaoBean;
import io.craigmiller160.school.repo.GenericJoinHolderDaoBean;

/**
 * Default implementation of the <tt>SchoolService</tt>
 * interface. Accepts DAO objects for the <tt>Student</tt>
 * and <tt>Course</tt> entities and the <tt>ScJoinHolder</tt> entity
 * that they're joined to, with logic to perform
 * the necessary operations for all three via the generic methods.
 *

 * THREAD SAFETY: This class is thread-safe. Its only
 * state is contained in the DAO fields, which are final
 * and cannot be changed after instantiation.
 *
 * @author craig
 * @version 1.0
 */
@Component ("schoolService")
public class SchoolDataService
implements GenericEntityServiceBean {

	//TODO for the convenience create operations, wrap all exceptions
	//in IllegalArgumentException

	/**
	 * The DAO for persisting <tt>Student</tt> objects.
	 */
	private final GenericEntityDaoBean<Student> studentDao;

	/**
	 * The DAO for persisting <tt>Course</tt> objects.
	 */
	private final GenericEntityDaoBean<Course> courseDao;

	/**
	 * The DAO for persisting <tt>ScJoinHolder</tt> objects.
	 */
	private final GenericJoinHolderDaoBean<ScJoinHolder> scJoinHolderDao;

	/**
	 * Create a new instance of this service, setting
	 * both DAOs that it requires. If null is passed as
	 * either DAO parameter, this class will not be able
	 * to function.
	 *
	 * @param studentDao the DAO for persisting <tt>Student</tt>
	 * objects.
	 * @param courseDao the DAO for persisting <tt>Course</tt>
	 * objects.
	 * @param scJoinHolderDao the DAO for persisting <tt>ScJoinHolder</tt>
	 * objects.
	 */
	@Autowired (required=true)
	public SchoolDataService(GenericEntityDaoBean<Student> studentDao,
			GenericEntityDaoBean<Course> courseDao,
			GenericJoinHolderDaoBean<ScJoinHolder> scJoinHolderDao){
		this.studentDao = studentDao;
		this.courseDao = courseDao;
		this.scJoinHolderDao = scJoinHolderDao;
	}

	/**
	 * Get the DAO for persisting <tt>ScJoinHolder</tt> objects.
	 *
	 * @return the DAO for persisting <tt>ScJoinHolder</tt> objects.
	 */
	public GenericJoinHolderDaoBean<ScJoinHolder> getScJoinHolderDao(){
		return scJoinHolderDao;
	}

	/**
	 * Get the DAO for persisting <tt>Course</tt> objects.
	 *
	 * @return the DAO for persisting <tt>Course</tt> objects.
	 */
	public GenericEntityDaoBean<Course> getCourseDao(){
		return courseDao;
	}

	/**
	 * Get the DAO for persisting <tt>Student</tt> objects.
	 *
	 * @return the DAO for persisting <tt>Student</tt> objects.
	 */
	public GenericEntityDaoBean<Student> getStudentDao(){
		return studentDao;
	}

	@Transactional
	@Override
	public <T> void updateEntity(T entity) {
		if(entity instanceof Student){
			studentDao.updateEntity((Student) entity);
		}
		else if(entity instanceof Course){
			courseDao.updateEntity((Course) entity);
		}
		else if(entity instanceof ScJoinHolder){
			scJoinHolderDao.updateEntity((ScJoinHolder) entity);
		}
		else{
			throw new IllegalArgumentException(entity.getClass() + " is not a valid entity");
		}
	}

	@Transactional
	@Override
	public <T> void deleteEntity(T entity){
		if(entity instanceof Student){
			studentDao.deleteEntity((Student) entity);
		}
		else if(entity instanceof Course){
			courseDao.deleteEntity((Course) entity);
		}
		else if(entity instanceof ScJoinHolder){
			scJoinHolderDao.deleteEntity((ScJoinHolder) entity);
		}
		else{
			throw new IllegalArgumentException(entity.getClass() + " is not a valid entity");
		}
	}

	/**
	 * {@inheritDoc}
	 *

	 * NOTE: This implementation of this method does NOT support
	 * creating the <tt>ScJoinHolder</tt> entity. That is handled by the
	 * separate <tt>joinEntities(Class,Object...)</tt> method.
	 */
	@Transactional
	@SuppressWarnings("unchecked") //Casting to <T> works because of the check on entityType
	@Override
	public <T> T createEntity(Class<T> entityType, Object... params) {
		if(entityType.equals(Student.class)){
			Student student = createStudent(
					params.length >= 1 ? (String) params[0] : null,
					params.length >= 2 ? (String) params[1] : null,
					params.length >= 3 ? (LocalDate) params[2] : null,
					params.length >= 4 ? (Gender) params[3] : null,
					params.length >= 5 ? (int) params[4] : null);
			studentDao.insertEntity(student);
			return (T) student;
		}
		else if(entityType.equals(Course.class)){
			Course course = createCourse(
					params.length >= 1 ? (String) params[0] : null,
					params.length >= 2 ? (String) params[1] : null,
					params.length >= 3 ? (String) params[2] : null,
					params.length >= 4 ? (int) params[3] : null);
			courseDao.insertEntity(course);
			return (T) course;
		}
		else{
			throw new IllegalArgumentException(entityType + " is not a valid entity");
		}
	}

	/**
	 * Internal method to create a <tt>Student</tt>
	 * entity for the <tt>createEntity(Class<T>, Object...)
	 * convenience method.
	 *
	 * @param firstName the student's first name.
	 * @param lastName the student's last name.
	 * @param birthDate the student's birth date.
	 * @param gender the student's gender.
	 * @param grade the student's grade.
	 * @return the created student.
	 */
	private Student createStudent(String firstName, String lastName,
			LocalDate birthDate, Gender gender, Integer grade){
		Student student = new Student();
		if(firstName != null){
			student.setFirstName(firstName);
		}
		if(lastName != null){
			student.setLastName(lastName);
		}
		if(birthDate != null){
			student.setBirthDate(birthDate);
		}
		if(gender != null){
			student.setGender(gender);
		}
		if(grade != null){
			student.setGrade(grade);
		}

		return student;
	}

	/**
	 * Internal method to create a <tt>Course</tt>
	 * entity for the <tt>createEntity(Class<T>, Object...)
	 * convenience method.
	 *
	 * @param courseName the name of the course.
	 * @param subject the subject of the course.
	 * @param teacherLastName the name of the course's teacher.
	 * @param period the period the course is taught.
	 * @return the created course.
	 */
	private Course createCourse(String courseName, String subject,
			String teacherLastName, Integer period){
		Course course = new Course();
		if(courseName != null){
			course.setCourseName(courseName);
		}
		if(subject != null){
			course.setSubject(subject);
		}
		if(teacherLastName != null){
			course.setTeacherLastName(teacherLastName);
		}
		if(period != null){
			course.setPeriod(period);
		}

		return course;
	}

	@Transactional
	@Override
	public <T> void insertEntity(T entity) {
		if(entity instanceof Student){
			studentDao.insertEntity((Student) entity);
		}
		else if(entity instanceof Course){
			courseDao.insertEntity((Course) entity);
		}
		else if(entity instanceof ScJoinHolder){
			scJoinHolderDao.insertEntity((ScJoinHolder) entity);
		}
		else{
			throw new IllegalArgumentException(entity.getClass() + " is not a valid entity");
		}
	}

	@SuppressWarnings("unchecked") //The entityType.equals(Class<?>) is the type check
	@Transactional
	@Override
	public <T> List<T> getAllEntities(Class<T> entityType) {
		if(entityType.equals(Student.class)){
			return (List<T>) studentDao.getAllEntities();
		}
		else if(entityType.equals(Course.class)){
			return (List<T>) courseDao.getAllEntities();
		}
		else if(entityType.equals(ScJoinHolder.class)){
			return (List<T>) scJoinHolderDao.getAllEntities();
		}
		else{
			throw new IllegalArgumentException(entityType + " is not a valid entity");
		}
	}

	@SuppressWarnings("unchecked") //The entityType.equals(Class<?>) is the type check
	@Transactional
	@Override
	public <T> T getEntityById(Class<T> entityType, int entityId) {
		if(entityType.equals(Student.class)){
			return (T) studentDao.getEntityById(entityId);
		}
		else if(entityType.equals(Course.class)){
			return (T) courseDao.getEntityById(entityId);
		}
		else if(entityType.equals(ScJoinHolder.class)){
			return (T) scJoinHolderDao.getEntityById(entityId);
		}
		else{
			throw new IllegalArgumentException(entityType + " is not a valid entity");
		}
	}

	@Transactional
	@Override
	public <T> long getEntityCount(Class<T> entityType) {
		long result = 0;
		if(entityType.equals(Student.class)){
			result = studentDao.getEntityCount();
		}
		else if(entityType.equals(Course.class)){
			result = courseDao.getEntityCount();
		}
		else if(entityType.equals(ScJoinHolder.class)){
			result = scJoinHolderDao.getEntityCount();
		}
		else{
			throw new IllegalArgumentException(entityType + " is not a valid Entity");
		}

		return result;
	}

	@SuppressWarnings("unchecked") //The entityType.equals(Class<?>) is the type check
	@Transactional
	@Override
	public <T extends JoinHolder, U> List<T> getAllJoinsFor(Class<T> joinHolderType,
			Class joinedEntityType, int entityId) {
		List<T> resultList = null;
		if(joinHolderType.equals(ScJoinHolder.class)){
			if(joinedEntityType.equals(Student.class)
					|| joinedEntityType.equals(Course.class)){
				resultList = (List<T>) scJoinHolderDao.getAllJoinsFor(joinedEntityType, entityId);
			}
			else{
				throw new IllegalArgumentException(joinedEntityType + " is not a valid Joined Entity");
			}
		}
		else{
			throw new IllegalArgumentException(joinHolderType + " is not a valid JoinHolder");
		}

		return resultList;
	}

	@Transactional
	@Override
	public <T extends JoinHolder,U> long getJoinCountFor(Class<T> joinHolderType, Class joinedEntityType, int entityId) {
		long result = 0;
		if(joinHolderType.equals(ScJoinHolder.class)){
			if(joinedEntityType.equals(Student.class)
					|| joinedEntityType.equals(Course.class)){
				result = (Long) scJoinHolderDao.getJoinCountFor(joinedEntityType, entityId);
			}
			else{
				throw new IllegalArgumentException(joinedEntityType + " is not a valid Joined Entity");
			}
		}
		else{
			throw new IllegalArgumentException(joinHolderType + " is not a valid JoinHolder");
		}

		return result;
	}

	@Transactional
	@Override
	public <T extends JoinHolder> void joinEntities(Class<T> joinHolderType, Object...entitiesToJoin){
		if(joinHolderType.equals(ScJoinHolder.class)){
			if(entitiesToJoin.length > 2){
				throw new IllegalArgumentException("Wrong number of parameters");
			}
			if(entitiesToJoin[0] instanceof Student && entitiesToJoin[1] instanceof Course){
				ScJoinHolder joinHolder = new ScJoinHolder();
				joinHolder.setStudent((Student) entitiesToJoin[0]);
				joinHolder.setCourse((Course) entitiesToJoin[1]);
				scJoinHolderDao.insertEntity(joinHolder);
			}
			else if(entitiesToJoin[0] instanceof Course && entitiesToJoin[1] instanceof Student){
				ScJoinHolder joinHolder = new ScJoinHolder();
				joinHolder.setStudent((Student) entitiesToJoin[1]);
				joinHolder.setCourse((Course) entitiesToJoin[0]);
				scJoinHolderDao.insertEntity(joinHolder);
			}
			else{
				throw new IllegalArgumentException("Wrong entities as parameters");
			}
		}
		else{
			throw new IllegalArgumentException(joinHolderType + " is not a valid JoinHolder");
		}
	}

	@Transactional
	@Override
	public <T extends JoinHolder, U> void removeJoinsFor(Class<T> joinHolderType, Class joinedEntityType,
			int entityId) {
		if(joinHolderType.equals(ScJoinHolder.class)){
			scJoinHolderDao.removeJoinsFor(joinedEntityType, entityId);
		}
		else{
			throw new IllegalArgumentException(joinHolderType + " is not a valid JoinHolder");
		}
	}

	@Transactional
	@SuppressWarnings("unchecked") //type is checked prior to the operation
	@Override
	public <T> List<T> getEntitiesByPage(Class<T> entityType, int pageNumber, int pageRowCount) {
		List<T> resultList = null;
		int startPageAfterRow = (pageNumber - 1) * pageRowCount;

		if(entityType.equals(Student.class)){
			resultList = (List<T>) studentDao.getEntitiesByPage(startPageAfterRow, pageRowCount);
		}
		else if(entityType.equals(Course.class)){
			resultList = (List<T>) courseDao.getEntitiesByPage(startPageAfterRow, pageRowCount);
		}
		else if(entityType.equals(ScJoinHolder.class)){
			resultList = (List<T>) scJoinHolderDao.getEntitiesByPage(startPageAfterRow, pageRowCount);
		}
		else{
			throw new IllegalArgumentException(entityType + " is not a valid Entity");
		}

		return resultList;
	}

	@Transactional
	@SuppressWarnings("unchecked") //type is checked prior to the operation
	@Override
	public <T extends JoinHolder, U> List<T> getEntitiesByPageFor(Class<T> joinHolderType,
			Class joinedEntityType, int entityId, int pageNumber, int pageRowCount) {
		List<T> resultList = null;
		int startPageAfterRow = (pageNumber - 1) * pageRowCount;

		if(joinHolderType.equals(ScJoinHolder.class)){
			if(joinedEntityType.equals(Student.class)
					|| joinedEntityType.equals(Course.class)){
				resultList = (List<T>) scJoinHolderDao.getEntitiesByPageFor(joinedEntityType,
						entityId, startPageAfterRow, pageRowCount);
			}
			else{
				throw new IllegalArgumentException(joinedEntityType + " is not a valid Joined Entity");
			}
		}
		else{
			throw new IllegalArgumentException(joinHolderType + " is not a valid JoinHolder");
		}

		return resultList;
	}

	@Transactional
	@Override
	public <T> void deleteEntityById(Class<T> entityType, int entityId) {
		if(entityType.equals(Student.class)){
			Student student = studentDao.getEntityById(entityId);
			studentDao.deleteEntity(student);
		}
		else if(entityType.equals(Course.class)){
			Course course = courseDao.getEntityById(entityId);
			courseDao.deleteEntity(course);
		}
		else if(entityType.equals(ScJoinHolder.class)){
			ScJoinHolder joinHolder = scJoinHolderDao.getEntityById(entityId);
			scJoinHolderDao.deleteEntity(joinHolder);
		}
		else{
			throw new IllegalArgumentException(entityType + " is not a valid entity");
		}
	}

	@Transactional
	@Override
	public <T> boolean hasPagesRemaining(Class<T> entityType, int pageNumber, int pageRowCount) {
		long actualCount = 0;
		long expectedCount = pageNumber * pageRowCount;

		if(entityType.equals(Student.class)){
			actualCount = studentDao.getEntityCount();
		}
		else if(entityType.equals(Course.class)){
			actualCount = courseDao.getEntityCount();
		}
		else if(entityType.equals(ScJoinHolder.class)){
			actualCount = scJoinHolderDao.getEntityCount();
		}
		else{
			throw new IllegalArgumentException(entityType + " is not a valid entity");
		}

		return actualCount > expectedCount;
	}

	@Transactional
	@Override
	public <T extends JoinHolder, U> boolean hasPagesRemainingFor(Class<T> joinHolderType, Class joinedEntityType,
			int entityId, int pageNumber, int pageRowCount) {
		long actualCount = 0;
		long expectedCount = pageNumber * pageRowCount;

		if(joinHolderType.equals(ScJoinHolder.class)){
			if(joinedEntityType.equals(Student.class)
					|| joinedEntityType.equals(Course.class)){
				actualCount = scJoinHolderDao.getJoinCountFor(joinedEntityType, entityId);
			}
			else{
				throw new IllegalArgumentException(joinedEntityType + " is not a valid Joined Entity");
			}
		}
		else{
			throw new IllegalArgumentException(joinHolderType + " is not a valid JoinHolder");
		}

		return actualCount > expectedCount;
	}

}


text:
CodeBuilder - CLI helper for easy CI on AWS
===========================================

|Build Status| |Docs| |Version| |License|

CodeBuilder is a CLI tool which allows developpers to use simple commands
and helpers inside AWS CI/CD tools like CodePipeline and CodeBuild.

.. _`stable docs`: https://codebuilder.readthedocs.io/en/stable/
.. _`Read the Docs`: https://codebuilder.readthedocs.io/en/latest/

.. |Build Status| image:: https://img.shields.io/travis/wnkz/codebuilder/master.svg?style=flat
    :target: https://travis-ci.org/wnkz/codebuilder
    :alt: Build Status

.. |Docs| image:: https://readthedocs.org/projects/codebuilder/badge/?version=latest
    :target: http://codebuilder.readthedocs.io/en/latest/?badge=latest
    :alt: Read the docs

.. |Version| image:: https://img.shields.io/pypi/v/codebuilder.svg?style=flat
    :target: https://pypi.python.org/pypi/codebuilder/
    :alt: Version

.. |License| image:: http://img.shields.io/pypi/l/codebuilder.svg?style=flat
    :target: https://github.com/wnkz/codebuilder/blob/master/LICENSE
    :alt: License

Quick Start
-----------

Generally, you would run CodeBuilder on an `AWS CodeBuild environment <https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref.html>`__
where AWS CLI is properly installed and configured. CodeBuilder uses the exact same authentication method as Boto 3 and AWS CLI.

Install with ``pip``:

.. code-block:: sh

    $ pip install codebuilder

Example CodeBuild usage (``buildspec.yml``):

.. code-block:: yaml

    version: 0.1
    environment_variables:
      plaintext:
        KMS_CIPHERBLOB: "AQEC..."

    phases:
      install:
        commands:
          - pip install codebuilder
      pre_build:
        commands:
          - codebuilder aws ecr login
          - codebuilder aws kms decrypt ${KMS_CIPHERBLOB} > ${CODEBUILD_SRC_DIR}/secret
      build:
        commands:
          - docker build -t 123456789012.dkr.ecr.eu-west-1.amazonaws.com/foo .
      post_build:
        commands:
          - docker push 123456789012.dkr.ecr.eu-west-1.amazonaws.com/foo
          - codebuilder docker --image-name 123456789012.dkr.ecr.eu-west-1.amazonaws.com/foo get-image full --source-json-file config.json --in-place Parameters DockerImage
          - codebuilder aws ecr prune


text:
export default class Canvas {

}


text:
description: How to get Access Tokens to make scheduled frequent calls to the Management API.
section: apis
toc: true
topics:
  - apis
  - management-api
  - tokens
contentType:
    - how-to
useCase: invoke-api
---

# Get Access Tokens for Production

To make scheduled frequent calls for a production environment, you have to build a process at your backend that will provide you with a token automatically (and thus simulate a non-expiring token).

## Prerequisite

* [Create and Authorize a Machine-to-Machine Application](/api/management/v2/create-m2m-app).

## Get Access Tokens

To ask Auth0 for a Management API v2 token, perform a `POST` operation to the `https://${account.namespace}/oauth/token` endpoint, using the credentials of the Machine-to-Machine Application you created in the prerequisite step.

The payload should be in the following format:

```har
{
  "method": "POST",
  "url": "https://${account.namespace}/oauth/token",
  "headers": [
    { "name": "Content-Type", "value": "application/x-www-form-urlencoded" }
  ],
  "postData": {
    "mimeType": "application/x-www-form-urlencoded",
    "params": [
        {
          "name": "grant_type",
          "value": "client_credentials"
        },
        {
          "name": "client_id",
          "value": "${account.clientId}"
        },
        {
          "name": "client_secret",
          "value": "YOUR_CLIENT_SECRET"
        },
        {
          "name": "audience",
          "value": "https://${account.namespace}/api/v2/"
        }
    ]
  }
}
```

The request parameters are:

| __Request Parameter__ | __Description__ |
| ------ | ----------- |
| __grant_type__ | Denotes which [OAuth 2.0 flow](/protocols/oauth2#authorization-grant-types) you want to run. For machine to machine communication use the value `client_credentials`. |
| __client_id__ | This is the value of the __Client ID__ field of the Machine-to-Machine Application you created. You can find it on the [Settings tab of your Application](${manage_url}/#/applications/${account.clientId}/settings). |
| __client_secret__ | This is the value of the __Client Secret__ field of the Machine-to-Machine Application you created. You can find it at the [Settings tab of your Application](${manage_url}/#/applications/${account.clientId}/settings). |
| __audience__ | This is the value of the __Identifier__ field of the `Auth0 Management API`. You can find it at the [Settings tab of the API](${manage_url}/#/apis). |

The response will contain a [signed JWT](/tokens/concepts/jwts), when it expires, the <dfn data-key="scope">scopes</dfn> granted, and the token type.

```json
{
  "access_token": "eyJ...Ggg",
  "expires_in": 86400,
  "scope": "read:clients create:clients read:client_keys",
  "token_type": "Bearer"
}
```

From the above we can see that our <dfn data-key="access-token">Access Token</dfn> is a [Bearer Access Token](https://tools.ietf.org/html/rfc6750), it will expire in 24 hours (86400 seconds), and it has been authorized to read and create applications.

### Use Auth0's Node.js Client Library

As an alternative to making HTTP calls, you can use the [node-auth0](https://www.npmjs.com/package/auth0) library to automatically [obtain tokens for the Management API](https://www.npmjs.com/package/auth0#user-content-management-api-client).

## Use Access Tokens

To use this token, include it in the `Authorization` header of your request.

```har
{
  "method": "POST",
  "url": "http://PATH_TO_THE_ENDPOINT/",
  "headers": [
    { "name": "Content-Type", "value": "application/json" },
    { "name": "Authorization", "value": "Bearer YOUR_ACCESS_TOKEN"}
  ]
}
```

For example, in order to [Get all applications](/api/management/v2#!/Clients/get_clients) use the following:

```har
{
  "method": "GET",
  "url": "https://${account.namespace}/api/v2/clients",
  "headers": [
    { "name": "Content-Type", "value": "application/json" },
    { "name": "Authorization", "value": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik5ESTFNa05DTVRGQlJrVTRORVF6UXpFMk1qZEVNVVEzT1VORk5ESTVSVU5GUXpnM1FrRTFNdyJ9.eyJpc3MiOiJodHRwczovL2RlbW8tYWNjb3VudC5hdXRoMC5jb20vIiwic3ViIjoib9O7eVBnMmd4VGdMNjkxTnNXY2RUOEJ1SmMwS2NZSEVAY2xpZW50cyIsImF1ZCI6Imh0dHBzOi8vZGVtby1hY2NvdW50LmF1dGgwLmNvbS9hcGkvdjIvIiwiZXhwIjoxNDg3MDg2Mjg5LCJpYXQiOjE5ODY5OTk4ODksInNjb3BlIjoicmVhZDpjbGllbnRzIGNyZWF0ZTpjbGllbnRzIHJlYWQ6Y2xpZW50X2tleXMifQ.oKTT_cEA_U6hVzNYPCl_4-SnEXXvFSOMJbZyFydQDPml2KqBxVw_UPAXhjgtW8Kifc_b2HQ4jFh7nH0KC_j1XjfEJPvwFZgqfI_ILzO3DPfpEIK_n_aX-Tz4okbZe6nj2aT_qLpHimLxK50jOGaMuzp4a1djHJTj5q-NbIiPW8AJowS2-gveP4T3dyyegUsZkmTNwrreqppPApmpWWE-wVsxnVsI_FZFrHnq0rn7lmY_Iz6vyiZjaKrd2C3hFm0zFGTn8FslBfHUldTcDNzOKOpCq7HFMeU0urXBXDetrzkW1afxIqED3G2C51JEV-4nTRYUinnWgXJfLJ87G3ge_A"}
  ]
}
```

::: note
You can get the curl command for each endpoint from the Management API v2 Explorer. Go to the endpoint you want to call, and click the __get curl command__ link at the __Test this endpoint__ section.
:::

## Example: Python Implementation

This python script gets a Management API v2 Access Token, uses it to call the [Get all applications](/api/management/v2#!/Clients/get_clients) endpoint, and prints the response in the console.

Before you run it make sure that the following variables hold valid values:
- `audience`: The __Identifier__ of the `Auth0 Management API`. You can find it at the [Settings tab of the API](${manage_url}/#/apis).
- `domain`: The __Domain__ of the Machine-to-Machine Application you created.
- `client_id`: The __Client ID__ of the Machine to Machine Application you created.
- `client_secret`: The __Client Secret__ of the Machine-to-Machine Application you created.

```python
def main():
  import json, requests
  from requests.exceptions import RequestException, HTTPError, URLRequired

  # Configuration Values
  audience = f"https://${account.namespace}/api/v2/"
  domain = "${account.namespace}"
  client_id = "${account.clientId}"
  client_secret = "YOUR_CLIENT_SECRET"
  grant_type = "client_credentials" # OAuth 2.0 flow to use

  # Get an Access Token from Auth0
  base_url = f"https://{domain}"
  payload =  {'grant_type': 'client_credentials',
               'client_id': client_id,
               'client_secret': client_secret,
               'audience': audience}
  res = requests.get(base_url, data=payload)
  oauth = json.loads(response.json())
  access_token = oauth.get('access_token')

  # Get all Applications using the token
  res = requests.get(base_url + "/api/v2/clients")
  header = {
    'Authorization', 'Bearer ' + access_token,
    'Content-Type', 'application/json'
    }

  try:
    res = request.get(req, header = header)
    output = json.loads(res.json())
    print(output)
  except HTTPError as e:
    print('HTTPError = ' + str(e.code) + ' ' + str(e.reason))
  except URLRequired as e:
    print(f'URLRequired = str(e.reason)')
  except RequestException as e:
    print('RequestException: {e}')
  except Exception as e:
    print(f'Generic Exception: {e}')

# Standard boilerplate to call the main() function.
if __name__ == '__main__':
  main()
```

## Keep reading

- [Applications](/applications)
* [Management API Explorer](/api/management/v2#!)
* [Management API Access Tokens FAQs](/api/management/v2/faq-management-api-access-tokens)