text:
package burstcoin.faucet.network;

import burstcoin.faucet.BurstcoinFaucetProperties;
import burstcoin.faucet.network.model.Balance;
import burstcoin.faucet.network.model.MiningInfo;
import burstcoin.faucet.network.model.SendMoneyResponse;
import burstcoin.faucet.network.model.Timestamp;
import burstcoin.faucet.network.model.Transaction;
import burstcoin.faucet.network.model.Transactions;
import burstcoin.faucet.util.FormatUtil;
import com.fasterxml.jackson.databind.ObjectMapper;
import nxt.crypto.ReedSolomon;
import nxt.util.Convert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.api.Response;
import org.eclipse.jetty.client.util.InputStreamResponseListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.InputStream;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;

@Component
public class NetworkComponent
{
  private static final String FAUCET_ACCOUNT_RS = "BURST-" + ReedSolomon
    .encode(Convert.parseUnsignedLong(BurstcoinFaucetProperties.getNumericFaucetAccountId()));
  private static final String BURST_API_URL = BurstcoinFaucetProperties.getWalletServer() + "/burst";
  private static Log LOG = LogFactory.getLog(NetworkComponent.class);

  private ObjectMapper objectMapper;
  private HttpClient httpClient;

  private Map<Long, Integer> txPerBlock;

  @Autowired
  public NetworkComponent(HttpClient httpClient, ObjectMapper objectMapper)
  {
    this.httpClient = httpClient;
    this.objectMapper = objectMapper;
    txPerBlock = new HashMap<>();
  }

  public SendMoneyResponse sendMoney(long amount, String recipientId, String secretPhrase, Locale locale)
  {
    MiningInfo miningInfo = getMiningInfo();

    if(miningInfo == null)
    {
      return null;
    }

    if(!txPerBlock.containsKey(miningInfo.getHeight()))
    {
      txPerBlock.put(miningInfo.getHeight(), 1);
    }
    else
    {
      txPerBlock.put(miningInfo.getHeight(), txPerBlock.get(miningInfo.getHeight()) + 1);
    }

    SendMoneyResponse sendMoneyResponse = null;
    try
    {
      ContentResponse response = httpClient.POST(BurstcoinFaucetProperties.getWalletServer() + "/burst")
        .param("requestType", "sendMoney")
        .param("recipient", recipientId)
        .param("amountNQT", String.valueOf(amount))
        .param("feeNQT", String.valueOf(txPerBlock.get(miningInfo.getHeight()) * BurstcoinFaucetProperties.getFee()))
        .param("deadline", "1000")
        .param("secretPhrase", secretPhrase)
        .timeout(BurstcoinFaucetProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS)
        .send();

      if(!response.getContentAsString().contains("errorDescription"))
      {
        sendMoneyResponse = objectMapper.readValue(response.getContentAsString(), SendMoneyResponse.class);
        LOG.info("send '" + FormatUtil.formatAmount(amount, FormatUtil.getFormatter(locale)) + "' BURST to recipientId: '"
                 + recipientId + "' in '" + sendMoneyResponse.getRequestProcessingTime() + "' ms");
      }
      else
      {
        LOG.error("Error: " + response.getContentAsString());
      }
    }
    catch(Exception e)
    {
      LOG.warn("Error: Failed to 'sendMoney' to accountId '" + recipientId + "' : " + e.getMessage());
    }
    return sendMoneyResponse;
  }

  // if asset has digits amount will start at lowest digit e.g. 2 digits, amount of 15 will be 0.15 assets
  public SendMoneyResponse sendAsset(int amount, String numericAssetId, String recipientId, String secretPhrase)
  {
    SendMoneyResponse sendMoneyResponse = null;
    try
    {
      ContentResponse response = httpClient.POST(BurstcoinFaucetProperties.getWalletServer() + "/burst")
        .param("requestType", "transferAsset")
        .param("asset", numericAssetId)
        .param("recipient", recipientId)
        .param("amountNQT", String.valueOf(amount))
        .param("feeNQT", BurstcoinFaucetProperties.getFee() + "00000000") // todo
        .param("deadline", "1000")
        .param("secretPhrase", secretPhrase)
        .timeout(BurstcoinFaucetProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS)
        .send();

      if(!response.getContentAsString().contains("errorDescription"))
      {
        sendMoneyResponse = objectMapper.readValue(response.getContentAsString(), SendMoneyResponse.class);
        LOG.info("send '" + amount + "' BURST to recipientId: '" + recipientId + "' in '" + sendMoneyResponse.getRequestProcessingTime() + "' ms");
      }
      else
      {
        LOG.error("Error: " + response.getContentAsString());
      }
    }
    catch(Exception e)
    {
      LOG.warn("Error: Failed to 'sendMoney' to accountId '" + recipientId + "' : " + e.getMessage());
    }
    return sendMoneyResponse;
  }

  public int getNumberOfClaims(String recipientId)
  {

    Map<String, Transaction> transactions = new HashMap<>();
    // get all transactions
    boolean hasMoreTransactions = true;
    int offset = 0;
    int transactionsPerRequest = 1999;
    while(hasMoreTransactions)
    {
      Map<String, Transaction> temp = getTransactions(recipientId, offset, transactionsPerRequest, true);
      if(temp != null && !temp.isEmpty())
      {
        hasMoreTransactions = temp.size() >= transactionsPerRequest;
        transactions.putAll(temp);
        offset += transactionsPerRequest;
      }
      else
      {
        hasMoreTransactions = false;
      }
    }

    int count = 0;
    for(Transaction transaction : transactions.values())
    {
      if(FAUCET_ACCOUNT_RS.equals(transaction.getSenderRS()))
      {
        count++;
      }
    }
    return count;
  }

  public Map<String, Transaction> getTransactions(String accountId, int offset, int transactionsPerRequest, boolean ignoreException)
  {
    Map<String, Transaction> transactionLookup = null;
    try
    {
      InputStreamResponseListener listener = new InputStreamResponseListener();

      Request request = httpClient.POST(BURST_API_URL)
        .param("requestType", "getAccountTransactions")
        .param("firstIndex", String.valueOf(offset))
        .param("lastIndex", String.valueOf(offset + transactionsPerRequest))
        .param("account", accountId);
      request.send(listener);

      Response response = listener.get(BurstcoinFaucetProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS);
      transactionLookup = handleGetTransactionsResponse(listener, response, ignoreException);
    }
    catch(Exception e)
    {
      LOG.warn("Error: Failed to 'getAccountTransactions' for accountId '" + accountId + "' : " + e.getMessage());
    }
    return transactionLookup;
  }

  public Map<String, Transaction> getTransactions(String accountId, int timestamp, boolean ignoreException)
  {
    Map<String, Transaction> transactionLookup = null;
    try
    {
      InputStreamResponseListener listener = new InputStreamResponseListener();

      Request request = httpClient.POST(BURST_API_URL)
        .param("requestType", "getAccountTransactions")
        .param("timestamp", String.valueOf(timestamp))
        .param("account", accountId);
      request.send(listener);

      Response response = listener.get(BurstcoinFaucetProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS);
      transactionLookup = handleGetTransactionsResponse(listener, response, ignoreException);
    }
    catch(Exception e)
    {
      LOG.warn("Error: Failed to 'getAccountTransactions' for accountId '" + accountId + "' : " + e.getMessage());
    }
    return transactionLookup;
  }

  private Map<String, Transaction> handleGetTransactionsResponse(InputStreamResponseListener listener, Response response, boolean ignoreException)
  {
    Map<String, Transaction> transactionLookup = new HashMap<>();
    // Look at the response
    if(response.getStatus() == 200)
    {
      // Use try-with-resources to close input stream.
      try (InputStream responseContent = listener.getInputStream())
      {
        Transactions transactions = objectMapper.readValue(responseContent, Transactions.class);
        LOG.info("received '" + transactions.getTransactions().size() + "' transactions in '" + transactions.getRequestProcessingTime() + "' ms");
        transactionLookup = new HashMap<>();
        for(Transaction transaction : transactions.getTransactions())
        {
          transactionLookup.put(transaction.getTransaction(), transaction);
        }
      }
      catch(Exception e)
      {
        // exception is ok for new accounts
        if(!ignoreException)
        {
          LOG.warn("Failed to receive faucet account transactions.", e);
        }
      }
    }
    return transactionLookup;
  }

  public Balance getBalance(String accountId)
  {
    Balance balance = null;
    try
    {
      ContentResponse response = httpClient.POST(BurstcoinFaucetProperties.getWalletServer() + "/burst?requestType=getBalance&account=" + accountId)
        .timeout(BurstcoinFaucetProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS)
        .send();

      if(!response.getContentAsString().contains("errorDescription"))
      {
        balance = objectMapper.readValue(response.getContentAsString(), Balance.class);
        LOG.info("received balance from accountId: '" + accountId + "' in '" + balance.getRequestProcessingTime() + "' ms");
      }
      else
      {
        LOG.error("Error: " + response.getContentAsString());
      }
    }
    catch(Exception e)
    {
      LOG.warn("Error: Failed to 'getBalance' for accountId '" + accountId + "' : " + e.getMessage(), e);
    }
    return balance;
  }

  public Timestamp getTime()
  {
    Timestamp timestamp = null;
    try
    {
      ContentResponse response = httpClient.POST(BurstcoinFaucetProperties.getWalletServer() + "/burst?requestType=getTime")
        .timeout(BurstcoinFaucetProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS)
        .send();

      if(!response.getContentAsString().contains("errorDescription"))
      {
        timestamp = objectMapper.readValue(response.getContentAsString(), Timestamp.class);
        LOG.info("received timestamp: '" + timestamp.getTime() + "' in '" + timestamp.getRequestProcessingTime() + "' ms");
      }
      else
      {
        LOG.error("Error: " + response.getContentAsString());
      }
    }
    catch(Exception e)
    {
      LOG.warn("Error: Failed to 'getTime':" + e.getMessage(), e);
    }
    return timestamp;
  }

  public MiningInfo getMiningInfo()
  {
    MiningInfo result = null;
    try
    {
      ContentResponse response;
      response = httpClient.newRequest(BurstcoinFaucetProperties.getWalletServer() + "/burst?requestType=getMiningInfo")
        .timeout(BurstcoinFaucetProperties.getConnectionTimeout(), TimeUnit.MILLISECONDS)
        .send();

      result = objectMapper.readValue(response.getContentAsString(), MiningInfo.class);
    }
    catch(TimeoutException timeoutException)
    {
      LOG.warn("Unable to get mining info caused by connectionTimeout, currently '" + (BurstcoinFaucetProperties.getConnectionTimeout() / 1000)
               + " sec.' try increasing it!");
    }
    catch(Exception e)
    {
      LOG.trace("Unable to get mining info from wallet: " + e.getMessage());
    }
    return result;
  }
}


text:
package com.keger.annotation.annotation;

import com.keger.annotation.internal.JSONType;

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

@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface JSONValue {
    public String key();
    public JSONType type();
}

redpajama_set_name: RedPajamaGithub


text:
/* global $, interfaceConfig, APP */
var SmallVideo = require("./SmallVideo");
var ConnectionIndicator = require("./ConnectionIndicator");
var NicknameHandler = require("../util/NicknameHandler");
var UIUtil = require("../util/UIUtil");
var LargeVideo = require("./LargeVideo");
var RTCBrowserType = require("../../RTC/RTCBrowserType");

function LocalVideo(VideoLayout) {
    this.videoSpanId = "localVideoContainer";
    this.container = $("#localVideoContainer").get(0);
    this.bindHoverHandler();
    this.VideoLayout = VideoLayout;
    this.flipX = true;
    this.isLocal = true;
    this.peerJid = null;
}

LocalVideo.prototype = Object.create(SmallVideo.prototype);
LocalVideo.prototype.constructor = LocalVideo;

/**
 * Creates the edit display name button.
 *
 * @returns {object} the edit button
 */
function createEditDisplayNameButton() {
    var editButton = document.createElement('a');
    editButton.className = 'displayname';
    UIUtil.setTooltip(editButton,
        "videothumbnail.editnickname",
        "top");
    editButton.innerHTML = '<i class="fa fa-pencil"></i>';

    return editButton;
}

/**
 * Sets the display name for the given video span id.
 */
LocalVideo.prototype.setDisplayName = function(displayName, key) {
    if (!this.container) {
        console.warn(
                "Unable to set displayName - " + this.videoSpanId +
                " does not exist");
        return;
    }

    var nameSpan = $('#' + this.videoSpanId + '>span.displayname');
    var defaultLocalDisplayName = APP.translation.generateTranslationHTML(
        interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);

    var meHTML;
    // If we already have a display name for this video.
    if (nameSpan.length > 0) {
        if (nameSpan.text() !== displayName) {
            if (displayName && displayName.length > 0) {
                meHTML = APP.translation.generateTranslationHTML("me");
                $('#localDisplayName').html(displayName + ' (' + meHTML + ')');
            } else {
                $('#localDisplayName').html(defaultLocalDisplayName);
            }
        }
    } else {
        var editButton = createEditDisplayNameButton();

        nameSpan = document.createElement('span');
        nameSpan.className = 'displayname';
        $('#' + this.videoSpanId)[0].appendChild(nameSpan);

        if (displayName && displayName.length > 0) {
            meHTML = APP.translation.generateTranslationHTML("me");
            nameSpan.innerHTML = displayName + meHTML;
        }
        else {
            nameSpan.innerHTML = defaultLocalDisplayName;
        }

        nameSpan.id = 'localDisplayName';
        this.container.appendChild(editButton);
        //translates popover of edit button
        APP.translation.translateElement($("a.displayname"));

        var editableText = document.createElement('input');
        editableText.className = 'displayname';
        editableText.type = 'text';
        editableText.id = 'editDisplayName';

        if (displayName && displayName.length) {
            editableText.value = displayName;
        }

        var defaultNickname = APP.translation.translateString(
            "defaultNickname", {name: "Jane Pink"});
        editableText.setAttribute('style', 'display:none;');
        editableText.setAttribute('data-18n',
            '[placeholder]defaultNickname');
        editableText.setAttribute("data-i18n-options",
            JSON.stringify({name: "Jane Pink"}));
        editableText.setAttribute("placeholder", defaultNickname);

        this.container.appendChild(editableText);

        var self = this;
        $('#localVideoContainer .displayname')
            .bind("click", function (e) {

                var editDisplayName = $('#editDisplayName');
                e.preventDefault();
                e.stopPropagation();
                $('#localDisplayName').hide();
                editDisplayName.show();
                editDisplayName.focus();
                editDisplayName.select();

                editDisplayName.one("focusout", function (e) {
                    self.VideoLayout.inputDisplayNameHandler(this.value);
                });

                editDisplayName.on('keydown', function (e) {
                    if (e.keyCode === 13) {
                        e.preventDefault();
                        self.VideoLayout.inputDisplayNameHandler(this.value);
                    }
                });
            });
    }
};

LocalVideo.prototype.inputDisplayNameHandler = function (name) {
    NicknameHandler.setNickname(name);

    var localDisplayName = $('#localDisplayName');
    if (!localDisplayName.is(":visible")) {
        if (NicknameHandler.getNickname()) {
            var meHTML = APP.translation.generateTranslationHTML("me");
            localDisplayName.html(NicknameHandler.getNickname() + " (" +
            meHTML + ")");
        } else {
            var defaultHTML = APP.translation.generateTranslationHTML(
                interfaceConfig.DEFAULT_LOCAL_DISPLAY_NAME);
            localDisplayName .html(defaultHTML);
        }
        localDisplayName.show();
    }

    $('#editDisplayName').hide();
};

LocalVideo.prototype.createConnectionIndicator = function() {
    if(this.connectionIndicator)
        return;

    this.connectionIndicator = new ConnectionIndicator(this, null);
};

LocalVideo.prototype.changeVideo = function (stream, isMuted) {
    var self = this;

    function localVideoClick(event) {
        // FIXME: with Temasys plugin event arg is not an event, but
        // the clicked object itself, so we have to skip this call
        if (event.stopPropagation) {
            event.stopPropagation();
        }
        self.VideoLayout.handleVideoThumbClicked(
            true,
            APP.xmpp.myResource());
    }

    var localVideoContainerSelector = $('#localVideoContainer');
    localVideoContainerSelector.off('click');
    localVideoContainerSelector.on('click', localVideoClick);

    if(isMuted) {
        APP.UI.setVideoMute(true);
        return;
    }
    this.flipX = stream.videoType != "screen";
    var localVideo = document.createElement('video');
    localVideo.id = 'localVideo_' +
        APP.RTC.getStreamID(stream.getOriginalStream());
    if (!RTCBrowserType.isIExplorer()) {
        localVideo.autoplay = true;
        localVideo.volume = 0; // is it required if audio is separated ?
    }
    localVideo.oncontextmenu = function () { return false; };

    var localVideoContainer = document.getElementById('localVideoWrapper');
    // Put the new video always in front
    UIUtil.prependChild(localVideoContainer, localVideo);

    var localVideoSelector = $('#' + localVideo.id);

    // Add click handler to both video and video wrapper elements in case
    // there's no video.

    // onclick has to be used with Temasys plugin
    localVideo.onclick = localVideoClick;

    if (this.flipX) {
        localVideoSelector.addClass("flipVideoX");
    }

    // Attach WebRTC stream
    APP.RTC.attachMediaStream(localVideoSelector, stream.getOriginalStream());

    // Add stream ended handler
    stream.getOriginalStream().onended = function () {
        // We have to re-select after attach when Temasys plugin is used,
        // because <video> element is replaced with <object>
        localVideo = $('#' + localVideo.id)[0];
        localVideoContainer.removeChild(localVideo);
        self.VideoLayout.updateRemovedVideo(APP.xmpp.myResource());
    };
};

LocalVideo.prototype.joined = function (jid) {
    this.peerJid = jid;
};

LocalVideo.prototype.getResourceJid = function () {
    var myResource = APP.xmpp.myResource();
    if (!myResource) {
        console.error("Requested local resource before we're in the MUC");
    }
    return myResource;
};

module.exports = LocalVideo;


text:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="./testcase.xsl"?>
<test_definition>
  <suite category="Tizen Web Device APIs" extension="crosswalk" name="tct-push-tizen-tests">
    <set name="Push" type="js">
      <capabilities>
        <capability name="push" />
      </capabilities>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService" onload_delay="90" priority="P1" purpose="Check if method registerService of PushManager works properly" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_without_errorCallback" onload_delay="90" priority="P1" purpose="Check if method registerService of PushManager works properly without errorCallback" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_without_errorCallback.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManagerObject_notexist" priority="P3" purpose="Check if interface PushManagerObject exists, it should not" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManagerObject_notexist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushManagerObject" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_connectService_exist" priority="P1" purpose="Check if method connectService of PushManager exists" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_connectService_exist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="connectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_disconnectService_exist" priority="P1" purpose="Check if method disconnectService of PushManager exists" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_disconnectService_exist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="disconnectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_disconnectService_extra_argument" priority="P1" purpose="Check if method disconnectService of PushManager accepts extra argument" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_disconnectService_extra_argument.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="disconnectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_extend" priority="P3" purpose="Check if PushManager is extendable" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_extend.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushManager" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_getRegistrationId_exist" priority="P1" purpose="Check if method getRegistrationId of PushManager exists" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_getRegistrationId_exist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="getRegistrationId" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_getRegistrationId_extra_argument" priority="P1" purpose="Check if method getRegistrationId of PushManager accepts extra argument" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_getRegistrationId_extra_argument.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="getRegistrationId" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_getRegistrationId_notRegistered" onload_delay="90" priority="P1" purpose="Check if method getRegistrationId of PushManager returns default value" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_getRegistrationId_notRegistered.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="getRegistrationId" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_in_tizen" priority="P3" purpose="Check if push exists in tizen" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_in_tizen.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushManager" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_notexist" priority="P3" purpose="Check if interface PushManager exists, it should not" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_notexist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushManager" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_appControl_TypeMismatch" onload_delay="90" priority="P2" purpose="Check type conversions for appControl argument of PushManager.registerService method" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_appControl_TypeMismatch.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_appControl_invalid_obj" onload_delay="90" priority="P2" purpose="Check if PushManager.registerService method throws exception when appControl is invalid" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_appControl_invalid_obj.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_misargs" priority="P1" purpose="Check if method registerService throws exception when non-optional argument is missing" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_misargs.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_exist" priority="P1" purpose="Check if method registerService of PushManager exists" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_exist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_successCallback_TypeMismatch" onload_delay="90" priority="P2" purpose="Check type conversions for successCallback argument of PushManager.registerService method" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_successCallback_TypeMismatch.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_successCallback_invalid_cb" onload_delay="90" priority="P2" purpose="Check if PushManager.registerService method throws exception when successCallback is invalid" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_successCallback_invalid_cb.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService_exist" priority="P1" purpose="Check if method unregisterService of PushManager exists" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService_exist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushMessage_notexist" priority="P3" purpose="Check if interface PushMessage exists, it should not" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushMessage_notexist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushMessage" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushNotificationCallback_notexist" priority="P3" purpose="Check if interface PushNotificationCallback exists, it should not" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushNotificationCallback_notexist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushNotificationCallback" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService_errorCallback_TypeMismatch" onload_delay="90" priority="P2" purpose="Check type conversions for errorCallback argument of PushManager.unregisterService method" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService_errorCallback_TypeMismatch.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService_errorCallback_invalid_cb" onload_delay="90" priority="P2" purpose="Check if PushManager.unregisterService method throws exception when errorCallback is invalid" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService_errorCallback_invalid_cb.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_errorCallback_TypeMismatch" onload_delay="90" priority="P2" purpose="Check type conversions for errorCallback argument of PushManager.registerService method" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_errorCallback_TypeMismatch.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_registerService_errorCallback_invalid_cb" onload_delay="90" priority="P2" purpose="Check if PushManager.registerService method throws exception when errorCallback is invalid" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_registerService_errorCallback_invalid_cb.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="registerService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService_successCallback_TypeMismatch" onload_delay="90" priority="P2" purpose="Check type conversions for successCallback argument of PushManager.unregisterService method" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService_successCallback_TypeMismatch.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService_successCallback_invalid_cb" onload_delay="90" priority="P2" purpose="Check if PushManager.unregisterService method throws exception when successCallback is invalid" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService_successCallback_invalid_cb.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_connectService_notificationCallback_TypeMismatch" priority="P2" purpose="Check type conversions for notificationCallback argument of PushManager.connectService method" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_connectService_notificationCallback_TypeMismatch.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="connectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_connectService_notificationCallback_invalid_cb" onload_delay="90" priority="P2" purpose="Check if PushManager.connectService method throws exception when notificationCallback is invalid" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_connectService_notificationCallback_invalid_cb.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="connectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_getRegistrationId" onload_delay="90" priority="P1" purpose="Check if method getRegistrationId of PushManager works correctly" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_getRegistrationId.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="getRegistrationId" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_connectService" onload_delay="90" priority="P1" purpose="Check if connectService method works correctly" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_connectService.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="connectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_connectService_missarg" onload_delay="90" priority="P1" purpose="Check with missing non-optional argument - PushManager.connectService method" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_connectService_missarg.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="connectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_disconnectService" onload_delay="90" priority="P1" purpose="Check if disconnectService method works correctly" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_disconnectService.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="disconnectService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService" onload_delay="90" priority="P1" purpose="Check if unregisterService works correctly" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService_without_errorCallback" onload_delay="90" priority="P1" purpose="Check if unregisterService method works without errorCallback" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService_without_errorCallback.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushManager_unregisterService_without_successCallback" onload_delay="90" priority="P1" purpose="Check if unregisterService method works without successCallback" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushManager_unregisterService_without_successCallback.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" element_name="unregisterService" element_type="method" interface="PushManager" section="TBD" specification="Push" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushRegisterSuccessCallback_onsuccess" onload_delay="90" priority="P3" purpose="Check if PushRegisterSuccessCallback works" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushRegisterSuccessCallback_onsuccess.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushRegisterSuccessCallback" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
      <testcase component="Tizen Device APIs/Communication/Push" execution_type="auto" id="PushRegisterSuccessCallback_notexist" priority="P3" purpose="Check if interface PushRegisterSuccessCallback exists, it should not" status="approved" type="compliance">
        <description>
          <test_script_entry>/opt/tct-push-tizen-tests/push/PushRegisterSuccessCallback_notexist.html</test_script_entry>
        </description>
        <specs>
          <spec>
            <spec_assertion category="Tizen Device API Specifications" interface="PushRegisterSuccessCallback" section="TBD" specification="Push" usage="true" />
            <spec_url>https://developer.tizen.org/help/topic/org.tizen.web.device.apireference/tizen/push.html</spec_url>
            <spec_statement>TBD</spec_statement>
          </spec>
        </specs>
      </testcase>
    </set>
  </suite>
</test_definition>


text:
<fims-layout-card-over title="{{ ledger.identifier + ' - ' + ledger.name }}" [subTitle]="ledger.description" [navigateBackTo]="ledger.parentLedgerIdentifier ? ['../'] : ['../../../../']">
  <fims-layout-card-over-header-menu layout="row" layout-align="end center">
    <mat-icon>mode_edit</mat-icon>
    <button mat-icon-button (click)="deleteLedger()" title="{{'Delete this ledger' | translate}}" *hasPermission="{ id: 'accounting_ledgers', accessLevel: 'DELETE' }"><mat-icon>delete</mat-icon></button>
  </fims-layout-card-over-header-menu>

      <mat-list>
        <mat-list-item>
          <mat-icon matListAvatar>account_balance</mat-icon>

Type

{{ledger.type}}

        </mat-list-item>
        <mat-list-item>

Balance

{{ledger.totalValue | displayFimsNumber}}

        </mat-list-item>
      </mat-list>

Subledgers

        <fims-data-table flex
                         (onActionCellClick)="rowSelect($event)"
                         [columns]="columns"
                         [data]="ledgerData">
        </fims-data-table>

</fims-layout-card-over>
<fims-fab-button title="{{'Add subledger' | translate}}" icon="add" [link]="['create']" [permission]="{ id: 'accounting_ledgers', accessLevel: 'CHANGE'}"></fims-fab-button>


text:
/*
 * reserved comment block
 * DO NOT REMOVE OR ALTER!
 */
/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.sun.org.apache.xpath.internal.operations;

import com.sun.org.apache.xpath.internal.XPathContext;
import com.sun.org.apache.xpath.internal.objects.XBoolean;
import com.sun.org.apache.xpath.internal.objects.XObject;

/**
 * The 'and' operation expression executer.
 */
public class And extends Operation
{
    static final long serialVersionUID = 392330077126534022L;

  /**
   * AND two expressions and return the boolean result. Override
   * superclass method for optimization purposes.
   *
   * @param xctxt The runtime execution context.
   *
   * @return {@link com.sun.org.apache.xpath.internal.objects.XBoolean#S_TRUE} or
   * {@link com.sun.org.apache.xpath.internal.objects.XBoolean#S_FALSE}.
   *
   * @throws javax.xml.transform.TransformerException
   */
  public XObject execute(XPathContext xctxt) throws javax.xml.transform.TransformerException
  {

    XObject expr1 = m_left.execute(xctxt);

    if (expr1.bool())
    {
      XObject expr2 = m_right.execute(xctxt);

      return expr2.bool() ? XBoolean.S_TRUE : XBoolean.S_FALSE;
    }
    else
      return XBoolean.S_FALSE;
  }

  /**
   * Evaluate this operation directly to a boolean.
   *
   * @param xctxt The runtime execution context.
   *
   * @return The result of the operation as a boolean.
   *
   * @throws javax.xml.transform.TransformerException
   */
  public boolean bool(XPathContext xctxt)
          throws javax.xml.transform.TransformerException
  {
    return (m_left.bool(xctxt) && m_right.bool(xctxt));
  }

}


text:
$(function(){

	var users = $('.assign-users');

	$.getJSON(siteurl + 'ajax/project/inactive_users?project_id=0', function(data){
		var suggestions = [];

		$.each(data, function(key, value){
			suggestions.push(value);
		});

		var input = $('#add-user-project');

		$(input).autocomplete({
			source: suggestions,
			select: function (event, ui){

				var append = '
' +
						'Remove' +
						'' + ui.item.label + '' +
						'<input type="hidden" name="user[]" value="' + ui.item.id + '" />' +
						'
';

				users.append(append);
			},
			close: function(event, ui){
				$('#add-user-project').val('');
			}
		});
	});

});


text:
namespace arrow {
namespace io {

// ----------------------------------------------------------------------
// Cross-platform file compatability layer

static inline Status CheckOpenResult(
    int ret, int errno_actual, const char* filename, size_t filename_length) {
  if (ret == -1) {
    // TODO: errno codes to strings
    std::stringstream ss;
    ss << "Failed to open file: ";
#if defined(_MSC_VER)
    // using wchar_t

    // this requires c++11
    std::wstring_convert<std::codecvt_utf8<wchar_t>, wchar_t> converter;
    std::wstring wide_string(
        reinterpret_cast<const wchar_t*>(filename), filename_length / sizeof(wchar_t));
    std::string byte_string = converter.to_bytes(wide_string);
    ss << byte_string;
#else
    ss << filename;
#endif
    return Status::IOError(ss.str());
  }
  return Status::OK();
}

#define CHECK_LSEEK(retval) \
  if ((retval) == -1) return Status::IOError("lseek failed");

static inline int64_t lseek64_compat(int fd, int64_t pos, int whence) {
#if defined(_MSC_VER)
  return _lseeki64(fd, pos, whence);
#else
  return lseek(fd, pos, whence);
#endif
}

static inline Status FileOpenReadable(const std::string& filename, int* fd) {
  int ret;
  errno_t errno_actual = 0;
#if defined(_MSC_VER)
  // https://msdn.microsoft.com/en-us/library/w64k0ytk.aspx

  // See GH #209. Here we are assuming that the filename has been encoded in
  // utf-16le so that unicode filenames can be supported
  const int nwchars = static_cast<int>(filename.size()) / sizeof(wchar_t);
  std::vector<wchar_t> wpath(nwchars + 1);
  memcpy(wpath.data(), filename.data(), filename.size());
  memcpy(wpath.data() + nwchars, L"\0", sizeof(wchar_t));

  errno_actual = _wsopen_s(fd, wpath.data(), _O_RDONLY | _O_BINARY, _SH_DENYNO, _S_IREAD);
  ret = *fd;
#else
  ret = *fd = open(filename.c_str(), O_RDONLY | O_BINARY);
  errno_actual = errno;
#endif

  return CheckOpenResult(ret, errno_actual, filename.c_str(), filename.size());
}

static inline Status FileOpenWriteable(
    const std::string& filename, bool write_only, bool truncate, int* fd) {
  int ret;
  errno_t errno_actual = 0;

#if defined(_MSC_VER)
  // https://msdn.microsoft.com/en-us/library/w64k0ytk.aspx
  // Same story with wchar_t as above
  const int nwchars = static_cast<int>(filename.size()) / sizeof(wchar_t);
  std::vector<wchar_t> wpath(nwchars + 1);
  memcpy(wpath.data(), filename.data(), filename.size());
  memcpy(wpath.data() + nwchars, L"\0", sizeof(wchar_t));

  int oflag = _O_CREAT | _O_BINARY;
  int sh_flag = _S_IWRITE;
  if (!write_only) { sh_flag |= _S_IREAD; }

  if (truncate) { oflag |= _O_TRUNC; }

  if (write_only) {
    oflag |= _O_WRONLY;
  } else {
    oflag |= _O_RDWR;
  }

  errno_actual = _wsopen_s(fd, wpath.data(), oflag, _SH_DENYNO, sh_flag);
  ret = *fd;

#else
  int oflag = O_CREAT | O_BINARY;

  if (truncate) { oflag |= O_TRUNC; }

  if (write_only) {
    oflag |= O_WRONLY;
  } else {
    oflag |= O_RDWR;
  }

  ret = *fd = open(filename.c_str(), oflag, ARROW_WRITE_SHMODE);
#endif
  return CheckOpenResult(ret, errno_actual, filename.c_str(), filename.size());
}

static inline Status FileTell(int fd, int64_t* pos) {
  int64_t current_pos;

#if defined(_MSC_VER)
  current_pos = _telli64(fd);
  if (current_pos == -1) { return Status::IOError("_telli64 failed"); }
#else
  current_pos = lseek64_compat(fd, 0, SEEK_CUR);
  CHECK_LSEEK(current_pos);
#endif

  *pos = current_pos;
  return Status::OK();
}

static inline Status FileSeek(int fd, int64_t pos) {
  int64_t ret = lseek64_compat(fd, pos, SEEK_SET);
  CHECK_LSEEK(ret);
  return Status::OK();
}

static inline Status FileRead(
    int fd, uint8_t* buffer, int64_t nbytes, int64_t* bytes_read) {
#if defined(_MSC_VER)
  if (nbytes > INT32_MAX) { return Status::IOError("Unable to read > 2GB blocks yet"); }
  *bytes_read = _read(fd, buffer, static_cast<size_t>(nbytes));
#else
  *bytes_read = read(fd, buffer, static_cast<size_t>(nbytes));
#endif

  if (*bytes_read == -1) {
    // TODO(wesm): errno to string
    return Status::IOError("Error reading bytes from file");
  }

  return Status::OK();
}

static inline Status FileWrite(int fd, const uint8_t* buffer, int64_t nbytes) {
  int ret;
#if defined(_MSC_VER)
  if (nbytes > INT32_MAX) {
    return Status::IOError("Unable to write > 2GB blocks to file yet");
  }
  ret = static_cast<int>(_write(fd, buffer, static_cast<size_t>(nbytes)));
#else
  ret = static_cast<int>(write(fd, buffer, static_cast<size_t>(nbytes)));
#endif

  if (ret == -1) {
    // TODO(wesm): errno to string
    return Status::IOError("Error writing bytes to file");
  }
  return Status::OK();
}

static inline Status FileGetSize(int fd, int64_t* size) {
  int64_t ret;

  // Save current position
  int64_t current_position = lseek64_compat(fd, 0, SEEK_CUR);
  CHECK_LSEEK(current_position);

  // move to end of the file
  ret = lseek64_compat(fd, 0, SEEK_END);
  CHECK_LSEEK(ret);

  // Get file length
  ret = lseek64_compat(fd, 0, SEEK_CUR);
  CHECK_LSEEK(ret);

  *size = ret;

  // Restore file position
  ret = lseek64_compat(fd, current_position, SEEK_SET);
  CHECK_LSEEK(ret);

  return Status::OK();
}

static inline Status FileClose(int fd) {
  int ret;

#if defined(_MSC_VER)
  ret = static_cast<int>(_close(fd));
#else
  ret = static_cast<int>(close(fd));
#endif

  if (ret == -1) { return Status::IOError("error closing file"); }
  return Status::OK();
}

class OSFile {
 public:
  OSFile() : fd_(-1), is_open_(false), size_(-1) {}

  ~OSFile() {}

  Status OpenWriteable(const std::string& path, bool append, bool write_only) {
    RETURN_NOT_OK(FileOpenWriteable(path, write_only, !append, &fd_));
    path_ = path;
    is_open_ = true;
    mode_ = write_only ? FileMode::WRITE : FileMode::READWRITE;

    if (append) {
      RETURN_NOT_OK(FileGetSize(fd_, &size_));
    } else {
      size_ = 0;
    }
    return Status::OK();
  }

  Status OpenReadable(const std::string& path) {
    RETURN_NOT_OK(FileOpenReadable(path, &fd_));
    RETURN_NOT_OK(FileGetSize(fd_, &size_));

    path_ = path;
    is_open_ = true;
    mode_ = FileMode::READ;
    return Status::OK();
  }

  Status Close() {
    if (is_open_) {
      RETURN_NOT_OK(FileClose(fd_));
      is_open_ = false;
    }
    return Status::OK();
  }

  Status Read(int64_t nbytes, int64_t* bytes_read, uint8_t* out) {
    std::lock_guard<std::mutex> guard(lock_);
    return FileRead(fd_, out, nbytes, bytes_read);
  }

  Status Seek(int64_t pos) {
    if (pos < 0) { return Status::Invalid("Invalid position"); }
    return FileSeek(fd_, pos);
  }

  Status Tell(int64_t* pos) const { return FileTell(fd_, pos); }

  Status Write(const uint8_t* data, int64_t length) {
    std::lock_guard<std::mutex> guard(lock_);
    if (length < 0) { return Status::IOError("Length must be non-negative"); }
    return FileWrite(fd_, data, length);
  }

  int fd() const { return fd_; }

  bool is_open() const { return is_open_; }
  const std::string& path() const { return path_; }

  int64_t size() const { return size_; }

  FileMode::type mode() const { return mode_; }

 protected:
  std::string path_;

  std::mutex lock_;

  // File descriptor
  int fd_;

  FileMode::type mode_;

  bool is_open_;
  int64_t size_;
};

// ----------------------------------------------------------------------
// ReadableFile implementation

class ReadableFile::ReadableFileImpl : public OSFile {
 public:
  explicit ReadableFileImpl(MemoryPool* pool) : OSFile(), pool_(pool) {}

  Status Open(const std::string& path) { return OpenReadable(path); }

  Status ReadBuffer(int64_t nbytes, std::shared_ptr<Buffer>* out) {
    std::shared_ptr<ResizableBuffer> buffer;
    RETURN_NOT_OK(AllocateResizableBuffer(pool_, nbytes, &buffer));

    int64_t bytes_read = 0;
    RETURN_NOT_OK(Read(nbytes, &bytes_read, buffer->mutable_data()));

    // XXX: heuristic
    if (bytes_read < nbytes / 2) { RETURN_NOT_OK(buffer->Resize(bytes_read)); }

    *out = buffer;
    return Status::OK();
  }

 private:
  MemoryPool* pool_;
};

ReadableFile::ReadableFile(MemoryPool* pool) {
  impl_.reset(new ReadableFileImpl(pool));
}

ReadableFile::~ReadableFile() {
  impl_->Close();
}

Status ReadableFile::Open(const std::string& path, std::shared_ptr<ReadableFile>* file) {
  *file = std::shared_ptr<ReadableFile>(new ReadableFile(default_memory_pool()));
  return (*file)->impl_->Open(path);
}

Status ReadableFile::Open(const std::string& path, MemoryPool* memory_pool,
    std::shared_ptr<ReadableFile>* file) {
  *file = std::shared_ptr<ReadableFile>(new ReadableFile(memory_pool));
  return (*file)->impl_->Open(path);
}

Status ReadableFile::Close() {
  return impl_->Close();
}

Status ReadableFile::Tell(int64_t* pos) {
  return impl_->Tell(pos);
}

Status ReadableFile::Read(int64_t nbytes, int64_t* bytes_read, uint8_t* out) {
  return impl_->Read(nbytes, bytes_read, out);
}

Status ReadableFile::Read(int64_t nbytes, std::shared_ptr<Buffer>* out) {
  return impl_->ReadBuffer(nbytes, out);
}

Status ReadableFile::GetSize(int64_t* size) {
  *size = impl_->size();
  return Status::OK();
}

Status ReadableFile::Seek(int64_t pos) {
  return impl_->Seek(pos);
}

bool ReadableFile::supports_zero_copy() const {
  return false;
}

int ReadableFile::file_descriptor() const {
  return impl_->fd();
}

// ----------------------------------------------------------------------
// FileOutputStream

class FileOutputStream::FileOutputStreamImpl : public OSFile {
 public:
  Status Open(const std::string& path, bool append) {
    return OpenWriteable(path, append, true);
  }
};

FileOutputStream::FileOutputStream() {
  impl_.reset(new FileOutputStreamImpl());
}

FileOutputStream::~FileOutputStream() {
  // This can fail; better to explicitly call close
  impl_->Close();
}

Status FileOutputStream::Open(
    const std::string& path, std::shared_ptr<FileOutputStream>* file) {
  return Open(path, false, file);
}

Status FileOutputStream::Open(
    const std::string& path, bool append, std::shared_ptr<FileOutputStream>* file) {
  // private ctor
  *file = std::shared_ptr<FileOutputStream>(new FileOutputStream());
  return (*file)->impl_->Open(path, append);
}

Status FileOutputStream::Close() {
  return impl_->Close();
}

Status FileOutputStream::Tell(int64_t* pos) {
  return impl_->Tell(pos);
}

Status FileOutputStream::Write(const uint8_t* data, int64_t length) {
  return impl_->Write(data, length);
}

int FileOutputStream::file_descriptor() const {
  return impl_->fd();
}

// ----------------------------------------------------------------------
// Implement MemoryMappedFile

class MemoryMappedFile::MemoryMap : public MutableBuffer {
 public:
  MemoryMap() : MutableBuffer(nullptr, 0) {}

  ~MemoryMap() {
    if (file_->is_open()) {
      munmap(mutable_data_, static_cast<size_t>(size_));
      file_->Close();
    }
  }

  Status Open(const std::string& path, FileMode::type mode) {
    int prot_flags;
    int map_mode;

    file_.reset(new OSFile());

    if (mode != FileMode::READ) {
      // Memory mapping has permission failures if PROT_READ not set
      prot_flags = PROT_READ | PROT_WRITE;
      map_mode = MAP_SHARED;
      constexpr bool append = true;
      constexpr bool write_only = false;
      RETURN_NOT_OK(file_->OpenWriteable(path, append, write_only));

      is_mutable_ = true;
    } else {
      prot_flags = PROT_READ;
      map_mode = MAP_PRIVATE;  // Changes are not to be committed back to the file
      RETURN_NOT_OK(file_->OpenReadable(path));

      is_mutable_ = false;
    }

    void* result = mmap(nullptr, static_cast<size_t>(file_->size()), prot_flags, map_mode,
        file_->fd(), 0);
    if (result == MAP_FAILED) {
      std::stringstream ss;
      ss << "Memory mapping file failed, errno: " << errno;
      return Status::IOError(ss.str());
    }

    data_ = mutable_data_ = reinterpret_cast<uint8_t*>(result);
    size_ = file_->size();

    position_ = 0;

    return Status::OK();
  }

  int64_t size() const { return size_; }

  Status Seek(int64_t position) {
    if (position < 0) { return Status::Invalid("position is out of bounds"); }
    position_ = position;
    return Status::OK();
  }

  int64_t position() { return position_; }

  void advance(int64_t nbytes) { position_ = position_ + nbytes; }

  uint8_t* head() { return mutable_data_ + position_; }

  bool writable() { return file_->mode() != FileMode::READ; }

  bool opened() { return file_->is_open(); }

  int fd() const { return file_->fd(); }

 private:
  std::unique_ptr<OSFile> file_;
  int64_t position_;
};

MemoryMappedFile::MemoryMappedFile() {}
MemoryMappedFile::~MemoryMappedFile() {}

Status MemoryMappedFile::Open(const std::string& path, FileMode::type mode,
    std::shared_ptr<MemoryMappedFile>* out) {
  std::shared_ptr<MemoryMappedFile> result(new MemoryMappedFile());

  result->memory_map_.reset(new MemoryMap());
  RETURN_NOT_OK(result->memory_map_->Open(path, mode));

  *out = result;
  return Status::OK();
}

Status MemoryMappedFile::GetSize(int64_t* size) {
  *size = memory_map_->size();
  return Status::OK();
}

Status MemoryMappedFile::Tell(int64_t* position) {
  *position = memory_map_->position();
  return Status::OK();
}

Status MemoryMappedFile::Seek(int64_t position) {
  return memory_map_->Seek(position);
}

Status MemoryMappedFile::Close() {
  // munmap handled in pimpl dtor
  return Status::OK();
}

Status MemoryMappedFile::Read(int64_t nbytes, int64_t* bytes_read, uint8_t* out) {
  nbytes = std::max<int64_t>(
      0, std::min(nbytes, memory_map_->size() - memory_map_->position()));
  if (nbytes > 0) { std::memcpy(out, memory_map_->head(), static_cast<size_t>(nbytes)); }
  *bytes_read = nbytes;
  memory_map_->advance(nbytes);
  return Status::OK();
}

Status MemoryMappedFile::Read(int64_t nbytes, std::shared_ptr<Buffer>* out) {
  nbytes = std::max<int64_t>(
      0, std::min(nbytes, memory_map_->size() - memory_map_->position()));

  if (nbytes > 0) {
    *out = SliceBuffer(memory_map_, memory_map_->position(), nbytes);
  } else {
    *out = std::make_shared<Buffer>(nullptr, 0);
  }
  memory_map_->advance(nbytes);
  return Status::OK();
}

bool MemoryMappedFile::supports_zero_copy() const {
  return true;
}

Status MemoryMappedFile::WriteAt(int64_t position, const uint8_t* data, int64_t nbytes) {
  std::lock_guard<std::mutex> guard(lock_);

  if (!memory_map_->opened() || !memory_map_->writable()) {
    return Status::IOError("Unable to write");
  }

  RETURN_NOT_OK(memory_map_->Seek(position));
  return WriteInternal(data, nbytes);
}

Status MemoryMappedFile::Write(const uint8_t* data, int64_t nbytes) {
  std::lock_guard<std::mutex> guard(lock_);

  if (!memory_map_->opened() || !memory_map_->writable()) {
    return Status::IOError("Unable to write");
  }
  if (nbytes + memory_map_->position() > memory_map_->size()) {
    return Status::Invalid("Cannot write past end of memory map");
  }
  return WriteInternal(data, nbytes);
}

Status MemoryMappedFile::WriteInternal(const uint8_t* data, int64_t nbytes) {
  memcpy(memory_map_->head(), data, static_cast<size_t>(nbytes));
  memory_map_->advance(nbytes);
  return Status::OK();
}

int MemoryMappedFile::file_descriptor() const {
  return memory_map_->fd();
}

}  // namespace io
}  // namespace arrow


text:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="colorPrimary">#3F51B5</color>
    <color name="colorPrimaryDark">#303F9F</color>
    <color name="colorAccent">#e23342</color>
    <color name="bottomBarColor">#f5f5f5</color>
    <color name="selectorColor">#e1e1e1</color>
</resources>


text:
module Octopress
  module Paginate
    class SiteHook < Hooks::Site
      priority :low

      def post_read(site)
        site.pages.select {|p| p.data['paginate'] }.each do |page|
          Octopress::Paginate.paginate(page)
        end
      end
    end

    class PageHook < Hooks::Page
      def merge_payload(payload, page)
        if page.data['paginate']
          Octopress::Paginate.page_payload(payload, page)
        end
      end
    end
  end
end


text:
<?php
namespace frontend\controllers;

use Yii;
use yii\helpers\Url;
use common\models\LoginForm;
use frontend\models\PasswordResetRequestForm;
use frontend\models\ResetPasswordForm;
use frontend\models\SignupForm;
use frontend\models\ContactForm;
use yii\base\InvalidParamException;
use yii\web\BadRequestHttpException;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;

/**
 * Site controller
 */
class SiteController extends Controller
{
    /**
     * @inheritdoc
     */
    public function behaviors()
    {
        return [
            'access' => [
                'class' => AccessControl::className(),
                'only' => ['logout','signup'],
                'rules' => [
                    [
                        'actions' => ['update', 'view','logout','signup'],
                        'allow' => true,
                        'matchCallback' => function ($rule, $action) {
                            if(!Yii::$app->user->isGuest)
                            {
                                return Yii::$app->user->identity->grupoacesso == 'estagiario_psicossocial' ;
                            }
                        }
                    ],
                    [
                        'actions' => ['update', 'view', 'delete','logout','signup'],
                        'allow' => true,
                        'matchCallback' => function ($rule, $action) {
                            if(!Yii::$app->user->isGuest)
                            {
                                return Yii::$app->user->identity->grupoacesso == 'servidor_psicossocial' ;
                            }
                        }
                    ],
                    [
                        'actions' => [ 'update', 'view','logout','signup'],
                        'allow' => true,
                        'matchCallback' => function ($rule, $action) {
                            if(!Yii::$app->user->isGuest)
                            {
                                return Yii::$app->user->identity->grupoacesso == 'estagiario_juridico' ;
                            }
                        }
                    ],
                    [
                        'actions' => ['update', 'view','logout','signup'],
                        'allow' => true,
                        'matchCallback' => function ($rule, $action) {
                            if(!Yii::$app->user->isGuest)
                            {
                                return Yii::$app->user->identity->grupoacesso == 'servidor_juridico' ;
                            }
                        }
                    ],
                    [
                        'actions' => ['create','index', 'update', 'view', 'delete','logout','signup'],
                        'allow' => true,
                        'matchCallback' => function ($rule, $action) {
                            if(!Yii::$app->user->isGuest)
                            {
                                return Yii::$app->user->identity->grupoacesso == 'gestor' ;
                            }
                        }
                    ],
                ],
            ],
            'verbs' => [
                'class' => VerbFilter::className(),
                'actions' => [
                    'logout' => ['post'],
                ],
            ],
        ];
    }

    /**
     * @inheritdoc
     */
    public function actions()
    {
        return [
            'error' => [
                'class' => 'yii\web\ErrorAction',
            ],
            'captcha' => [
                'class' => 'yii\captcha\CaptchaAction',
                'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
            ],
        ];
    }

    /**
     * Displays homepage.
     *
     * @return mixed
     */
    public function actionIndex()
    {

        return $this->actionLogin(); //$this->render('index');
    }

    /**
     * Logs in a user.
     *
     * @return mixed
     */
    public function actionLogin()
    {
        if (!\Yii::$app->user->isGuest) {
            //return $this->goHome();
            return $this->render('index');
        }

        $model = new LoginForm();
        if ($model->load(Yii::$app->request->post()) && $model->login()) {
            return $this->goBack();
        } else {
            return $this->render('login', [
                'model' => $model,
            ]);
        }
    }
    public function actionLogin2()
    {
        return $this->actionSignup();

        // if (!\Yii::$app->user->isGuest) {
        //     return $this->goHome();
        // }

        // $model = new LoginForm();
        // if ($model->load(Yii::$app->request->post()) && $model->login()) {
        //     return $this->goBack();
        // } else {
        //     return $this->render('login', [
        //         'model' => $model,
        //     ]);
        // }
    }

    /**
     * Logs out the current user.
     *
     * @return mixed
     */
    public function actionLogout()
    {
        Yii::$app->user->logout();

        return $this->goHome();
    }
    public function actionAbout()
    {
        return $this->render('about');
    }
    /**
     * Displays contact page.
     *
     * @return mixed
     */

    /**
     * Displays about page.
     *
     * @return mixed
     */

    /**
     * Signs user up.
     *
     * @return mixed
     */
    public function actionSignup()
    {
        $model = new SignupForm();
        if ($model->load(Yii::$app->request->post())) {
            if ($user = $model->signup()) {

                    Yii::$app->session->setFlash('success', 'Usuario Cadastrado.');
                     return $this->render('index', [
                        'model' => $model,
                    ]);

            }
        }

        return $this->render('signup', [
            'model' => $model,
        ]);
    }

    /**
     * Requests password reset.
     *
     * @return mixed
     */
    public function actionRequestPasswordReset()
    {
        $model = new PasswordResetRequestForm();
        if ($model->load(Yii::$app->request->post()) && $model->validate()) {
            if ($model->sendEmail()) {
                Yii::$app->session->setFlash('success', 'Verifique seu e-mail para obter mais instruções.');

                return $this->goHome();
            } else {
                Yii::$app->session->setFlash('error', 'Desculpe, mas não foi possível redefinir a senha para o email fornecido.');
            }
        }

        return $this->render('requestPasswordResetToken', [
            'model' => $model,
        ]);
    }

    /**
     * Resets password.
     *
     * @param string $token
     * @return mixed
     * @throws BadRequestHttpException
     */
    public function actionResetPassword($token)
    {
        try {
            $model = new ResetPasswordForm($token);
        } catch (InvalidParamException $e) {
            throw new BadRequestHttpException($e->getMessage());
        }

        if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->resetPassword()) {
            Yii::$app->session->setFlash('success', 'Nova senha foi salva.');

            return $this->goHome();
        }

        return $this->render('resetPassword', [
            'model' => $model,
        ]);
    }

    public function actionCreateMPDF(){
        $mpdf=new mPDF();
        $mpdf->WriteHTML($this->renderPartial('mpdf'));
        $mpdf->Output();
        exit;
        //return $this->renderPartial('mpdf');
    }
    public function actionSamplePdf() {
        $mpdf = new mPDF;
        $mpdf->WriteHTML('Sample Text');
        $mpdf->Output();
        exit;
    }
    public function actionForceDownloadPdf(){
        $mpdf=new mPDF();
        $mpdf->WriteHTML($this->renderPartial('mpdf'));
        $mpdf->Output('MyPDF.pdf', 'D');
        exit;
    }
}


text:
id: 5900f3f61000cf542c50ff09
challengeType: 5
title: 'Problem 138: Special isosceles triangles'
videoUrl: ''
localeTitle: 'Problema 138: triángulos isósceles especiales'
---

## Description

 Considere el triángulo isósceles con la longitud de la base, b = 16, y las patas, L = 17.
 Al usar el teorema de Pitágoras, se puede ver que la altura del triángulo, h = √ (172 - 82) = 15, que es uno menos que la longitud de la base. Con b = 272 y L = 305, obtenemos h = 273, que es uno más que la longitud de la base, y este es el segundo triángulo isósceles más pequeño con la propiedad que h = b ± 1. Encuentre ∑ L para las doce isósceles más pequeñas triángulos para los cuales h = b ± 1 y b, L son enteros positivos.

## Instructions

## Tests

```yml
tests:
  - text: <code>euler138()</code> debe devolver 1118049290473932.
    testString: 'assert.strictEqual(euler138(), 1118049290473932, "<code>euler138()</code> should return 1118049290473932.");'

```

## Challenge Seed

```js
function euler138() {
  // Good luck!
  return true;
}

euler138();

```

## Solution

```js
// solution required
```


text:
(function ($) {
    var id = 0;
    var menus = {};

    $.fn.materialMenu = function (action, settings) {
        var settings = $.extend({
            animationSpeed: 250,
            position: "",
            items: []
        }, settings);

        return this.each(function (item) {
            var parent = $(this);
            if (action === "init") {
                parent.attr('id', getNextId());
                var menu = getMenuForParent(parent);
                menu.element = $('

');
                menu.parent = parent;
                menu.settings = settings;
                menu.items = [];

                settings.items.forEach(function (item) {
                    var item = $.extend({
                        text: "",
                        type: "normal",
                        radioGroup: "default",
                        click: function () { }
                    }, item);
                    if (item.type === 'toggle') {
                        var elStr = "

";
                        var itemElement = $(elStr)
                            .append("check")
                            .append("" + item.text + "")
                            .click(function () {
                                if (item.checked) {
                                    item.element.addClass('unchecked');
                                } else {
                                    item.element.removeClass('unchecked');
                                }
                                item.checked = !item.checked;
                                item.click(menu.parent, item.checked);
                                closeMenu(menu);
                            });
                    } else if (item.type === 'radio') {
                        var elStr = "

";
                        var itemElement = $(elStr)
                            .append("check")
                            .append("" + item.text + "")
                            .click(function () {
                                menu.items.forEach(function (otherItem) {
                                    if (otherItem.radioGroup === item.radioGroup) {
                                        if (otherItem == item) {
                                            item.element.removeClass('unchecked');
                                            otherItem.checked = false;
                                        } else {
                                            otherItem.element.addClass('unchecked');
                                            otherItem.checked = false;
                                        }
                                    }
                                });
                                item.click(menu.parent, item.checked);
                                closeMenu(menu);
                            });
                    } else if (item.type === 'divider') {
                        var itemElement = $("

");
                    } else if (item.type === 'label') {
                        var itemElement = $("

")
                            .html(item.text);
                    } else if (item.type === 'submenu') {
                        var itemElement = $("

")
                            .append("" + item.text + "")
                            .append('
arrow_drop_up
')
                            .click(function () {
                                item.click(menu.parent);
                                closeMenu(menu);
                            });
                    } else if (item.type === 'normal') {
                        var itemElement = $("

")
                            .html(item.text)
                            .click(function () {
                                item.click(menu.parent);
                                closeMenu(menu);
                            });
                    } else {
                        console.log("Menu item with invalid type, type was: " + item.type);
                        return;
                    }
                    itemElement.attr('id', getNextId());
                    item.element = itemElement;
                    menu.element.children('ul').append(itemElement);
                    menu.items.push(item);
                });
                menu.element.hide();
                $('body').append(menu.element);

                return this;
            }

            if (action === 'open') {
                var menu = getMenuForParent(parent);
                if (menu.open) {
                    return;
                }
                openMenu(menu);
                return this;
            }

            if (action === 'close') {
                var menu = getMenuForParent(parent);
                if (!menu.open) {
                    return;
                }
                closeMenu(menu);
                return this;
            }
        });
    };

    function openMenu(menu) {
        menu.open = true;
        updatePos(menu);

        menu.element.css('opacity', 0)
          .slideDown(menu.settings.animationSpeed)
          .animate(
            { opacity: 1 },
            { queue: false, duration: 'fast' }
          );

        $(document).on('mousedown', function (event) {
            if (!$(event.target).closest(menu.element).length) {
                closeMenu(menu);
            }
        });
    }

    function closeMenu(menu) {
        menu.element.fadeOut(menu.settings.animationSpeed, function () {
            menu.open = false;
        });
    }

    function updatePos(menu) {
        // position the div, according to it's parent using the worlds most hacky thing ever
        var offset = $("#" + menu.parent.attr('id')).offset();
        var left = offset.left;
        var top = offset.top + menu.parent.outerHeight();

        // If the menu is greater than 75% of the screen size, it should scroll
        menu.element.height('auto'); // so the height calculation works correctly
        var menuHeight = menu.element.outerHeight();
        var windowHeight = $(window).height();
        if (menuHeight > windowHeight * 0.75) {
            menu.element.height(windowHeight * 0.75);
            menuHeight = menu.element.outerHeight();
        }

        // Offset top, if the menu would appear below the screen (with 5px margin)
        var distanceFromBottom = windowHeight - menuHeight - top - 5;
        if (distanceFromBottom < 0) {
            // Need to adjust the menu, to make it fit the screen bounds
            if (distanceFromBottom > -menuHeight / 2) {
                menu.element.height(menu.element.height() + distanceFromBottom);

                // If doing overlay positioning, subtract height
                if (menu.settings.position.indexOf('overlay') >= 0) {
                    top -= menu.parent.outerHeight();
                }
            } else {
                top -= menuHeight;
                // If NOT doing overlay positioning, subtract height
                if (menu.settings.position.indexOf('overlay') == -1) {
                    top -= menu.parent.outerHeight();
                }
            }
        }

        // Calculate width so we can ensure the menu is not displayed off of the right hand side of the screen
        var menuWidth = menu.element.outerWidth()
        var windowWidth = $(window).width();
        var distanceFromRight = windowWidth - menuWidth - left - 5;
        if (distanceFromRight < 0) {
            left -= menu.element.outerWidth() - menu.parent.outerWidth();
        }

        menu.element.css({ top: top, left: left });
    }

    function getMenuForParent(parent) {
        var id = parent.attr('id');
        if (menus[id] == undefined) {
            menus[id] = {};
        }
        return menus[id];
    }

    function getNextId() {
        return 'sm-' + id++;
    }

    // Should rethink how this works, but will do for now
    $(document).ready(function () {
        var items = $('sm-title');
        for (var i=0; i<items.length; i++) {
            var element = items.eq(i);
            var newElement = $('')
                .text(element.text())
                .addClass('sm-text sm-font-title')
                .attr('id', getNextId());
            element.replaceWith(newElement);
        }

        items = $('sm-toolbar');
        for (var i=0; i<items.length; i++) {
            var element = items.eq(i);
            var newElement = $('

')
                .html(element.html())
                .addClass('sm-toolbar sm-primary-500')
                .attr('id', getNextId());

            var toolbarItems = newElement.find('sm-item');
            console.log(toolbarItems);
            for (var j=0; j<toolbarItems.length; j++) {
                var item = toolbarItems.eq(j);
                var newItem = $('')
                    .append($('')
                        .text(item.text())
                        .addClass('sm-icon material-icons md-24'))
                    .attr('id', getNextId());
                if (item.attr('left') != undefined) {
                    newItem.addClass('sm-left');
                } else if (item.attr('right') != undefined) {
                    newItem.addClass('sm-right');
                }
                item.replaceWith(newItem);
            }

            element.replaceWith(newElement);
        }
    });
}(jQuery));


text:
mkdir -p $PREFIX/opt/
find $SRC_DIR/util -name '*.pl' -exec sed -i.bak 's/FindBin::Bin/FindBin::RealBin/' {} +
find $SRC_DIR/util -name '*.bak' -exec rm {} +
cp -R $SRC_DIR $PREFIX/opt/$PKG_NAME

# symlink to binaries
mkdir -p $PREFIX/bin/
ln -s $PREFIX/opt/$PKG_NAME/TransDecoder.Predict $PREFIX/bin/
ln -s $PREFIX/opt/$PKG_NAME/TransDecoder.LongOrfs $PREFIX/bin/
ln -s $PREFIX/opt/$PKG_NAME/util/*.pl $PREFIX/bin/


text:
The sample shows instructions and algorithm of how to save as pdf with spreadsheet sdk and how to make it run in your VBScript application. ByteScout Barcode Suite can save as pdf with spreadsheet sdk. It can be applied from VBScript. ByteScout Barcode Suite is the bundle that privides 3  SDK products to generate barcodes (Barcode SDK), read barcodes (Barcode Reaer SDK) and read and write spreadsheets (Spreadsheet SDK).

 These VBScript code samples for VBScript guide developers to speed up coding of the application when using ByteScout Barcode Suite. Follow the instructions from scratch to work and copy the VBScript code. Enjoy writing a code with ready-to-use sample codes in VBScript.

ByteScout provides the free trial version of ByteScout Barcode Suite along with the documentation and source code samples.

## REQUEST FREE TECH SUPPORT

[Click here to get in touch](https://bytescout.zendesk.com/hc/en-us/requests/new?subject=ByteScout%20Barcode%20Suite%20Question)

or just send email to [support@bytescout.com](mailto:support@bytescout.com?subject=ByteScout%20Barcode%20Suite%20Question)

## ON-PREMISE OFFLINE SDK

[Get Your 60 Day Free Trial](https://bytescout.com/download/web-installer?utm_source=github-readme)
[Explore SDK Docs](https://bytescout.com/documentation/index.html?utm_source=github-readme)
[Sign Up For Online Training](https://academy.bytescout.com/)

## ON-DEMAND REST WEB API

[Get your API key](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Documentation](https://pdf.co/documentation/api?utm_source=github-readme)
[Explore Web API Samples](https://github.com/bytescout/ByteScout-SDK-SourceCode/tree/master/PDF.co%20Web%20API)

## VIDEO REVIEW

[https://www.youtube.com/watch?v=NEwNs2b9YN8](https://www.youtube.com/watch?v=NEwNs2b9YN8)

<!-- code block begin -->

##### ****Save As PDF.vbs:**

```
Set document = CreateObject("Bytescout.Spreadsheet.Spreadsheet")

document.RegistrationName = "demo"
document.RegistrationKey = "demo"

 ' Add new worksheet
Set worksheet = document.Workbook.Worksheets.Add("HelloWorld")

' add a cell
Set cell = worksheet.Cell(1, 1)
cell.Value = "Testing, Testing, Testing, Testing..."

' Save spreadsheet as PDF file:

' Save PDF with automatic page size...
document.SaveAsPDF "autosized.pdf"
' ... or save PDF with fixed page size
document.SaveAsPDF_2 "fixedsize.pdf", False ' the second parameter disables autosizing

' close Spreadsheet
Set document = Nothing

```

<!-- code block end -->


text:
layout: post
microblog: true
date: 2010-01-27 03:00 +0300
guid: http://desparoz.micro.blog/2010/01/27/t8295113950.html
---
Watching @leolaporte, @andyihnatko, @alexlindsay & crew on MacBreak Weekly. These guys are pros and sharing the passion of the #iPad