text:
In this lab, you will implement continouous integration for a Provider-Hosted app deployed to Windows Azure and Office 365.

## Prerequisites
1. You must have an Office 365 tenant and Windows Azure subscription to complete this lab. If you do not have one, the lab for **O3651-7 Setting up your Developer environment in Office 365** shows you how to obtain a trial.
2. You must have a Microsoft Account. If not, obtain one at https://signup.live.com.

## Exercise 1: Create a Provider-Hosted App
In this exercise you create a new provider-hosted app under source control.

1. Sign up for Visual Studio Online
  1. Sign in to Visual Studio Online (http://go.microsoft.com/fwlink/?LinkId=307137) with your **Microsoft Account**.
  2. If you are new to Visual Studio Online, you will have to fill out some additional information.
2. Connect to Team Foundation Server
  1. Start **Visual Studio 2013**.
  2. Click **Sign In**.

      ![](Images/01.png?raw=true "Figure 1")
  3. Click **Team/Connect to Team Foundation Server** from the main menu in Visual Studio 2013.
  4. Click **Team Explorer**.
  5. Click **Select Team Projects** to open the **Connect to Team Foundation Server** dialog.

      ![](Images/02.png?raw=true "Figure 2")
  6. Select your Team Foundation Server instance.
  7. Click **Connect**.

      ![](Images/03.png?raw=true "Figure 3")
  8. In the **Team Explorer**, click **Configure Your Workspace**.
  9. Enter an appropriate path to map your workspace to a local directory.
  10. Click **Map and Get**.

      ![](Images/04.png?raw=true "Figure 4")
3. Create the new solution in Visual Studio 2013:
  1. Launch **Visual Studio 2013** as administrator.
  2. In Visual Studio select **File/New/Team Project**.
  3. In **Visual Studio Online** name the new Team Project **Lifecycle App Project**.
  4. Click **Create Project**

       ![](Images/05.png?raw=true "Figure 5")
  5. In Visual Studio, select **View/Team Explorer**.
  6. Click **Source Control Explorer**.
  7. Right click the **Default Collection** and select **Get Latest Version**.
  8. In Visual Studio select **File/New/Project**.
  9. In the New Project dialog:
    1. Select **Templates/Visual C#/Office/SharePoint/Apps**.
    2. Click **App for SharePoint 2013**.
    3. Select to place the new project in the **Lifecycle App Project** directory.
    4. Name the new project **LifecycleApp**.
    5. Check the box **Add to Source Control**.
    6. Click **OK**.

       ![](Images/06.png?raw=true "Figure 6")
  7. In the New App for SharePoint wizard:
    1. Enter the address of a SharePoint site to use for testing the app (***NOTE:*** The targeted site must be based on a Developer Site template)
    2. Select **Provider-Hosted** as the hosting model.
    3. Click **Next**.

       ![](Images/07.png?raw=true "Figure 7")
    4. Select **ASP.NET MVC Web Application**.
    5. Click **Next**.

       ![](Images/08.png?raw=true "Figure 8")
    6. Select the option labeled **Use Windows Azure Access Control Service (for SharePoint cloud apps)**.
    7. Click **Finish**.

       ![](Images/09.png?raw=true "Figure 9")
    8. When prompted, select to add the new project to the **Lifecycle App Project** Team Project.
4. When the project is created, **Build** the solution.

## Exercise 2: Deploy the App
In this exercise, you will perform the initial deployment of the app to the O365/Azure environment.

1. Deploy the remote web to Windows Azure.
  1. In the **Solution Explorer**, right click the **LifecycleAppWeb** project and select **Publish**.
  2. In the **Publish Web** dialog:
    1. Click **Windows Azure Web Sites**.
    2. In the **Select Existing Web Site** dialog, click **Sign In**.
    3. Sign in using your **Organizational Account**.
    4. Click **New**.
    5. In the **Create Site on Windows Azure** dialog, give your app a unique name and select a region for hosting.
    6. Click **Create**.

       ![](Images/10.png?raw=true "Figure 10")
    7. In the **Publish Web** dialog, click **Publish**.
2. Register the app in Office 365
  1. Log into the O365 developer site as an administrator
  2. From the developer site, navigate to **/_layouts/15/appregnew.aspx**.
  3. Click **Generate** next to Client ID.
  4. Click **Generate** next to Client Secret.
  5. Enter **Lifecycle App** as the Title.
  6. Enter the **App Domain** for the Azure web site you created earlier (e.g., lifecycleapp.azurewebsites.net)
  7. Enter the **Redirect URI** as the reference for home page (e.g. https://lifecycleapp.azurewebsites.net).
  8. Click **Create.**
    1. Save the **Client ID** and **Client Secret** separately for later use.

         ![](Images/11.png?raw=true "Figure 11")
3.  Update the provider-hosted app
  1. In the **LifecycleApp** project open the **AppManifest.xml** file in a text editor.
  2. Update the **Client ID** and **App Start page** to reflect the values you created earlier.

         ![](Images/12.png?raw=true "Figure 12")
  3. Open the **web.config** file for the **LifecycleAppWeb** project.
  4. Update the **Client ID** and **Client Secret** to use the generated values.
4. Update information in the Azure Portal
  1. Open to the [Azure Management portal](https://manage.windowsazure.com).
  2. Click **Web Sites**.
  3. Select your Azure Web Site.
  4. Click **Configure**.
  5. In the **App Settings** section, add a **ClientId** and **ClientSecret** setting.
  6. Set the values to the values you generated earlier.
  7. Click **Save**.

5. Package the SharePoint App
  1. In **Visual Studio 2013**, right click the **LifecycleApp** project and select **Publish**.
  2. Click **Package the App**.
  3. Enter the **Start URL** and **Client ID** for the app.
  4. Click **Finish**.

         ![](Images/13.png?raw=true "Figure 13")
6. Publish the App to the Corporate Catalog
  1. Return to the O365 tenant and select **Admin/SharePoint**.
  2. Click **Apps/App Catalog**.
  3. In the app catalog site, click **Apps for SharePoint**.
  4. Click **New**.
  5. **Browse** to the app package you created earlier.
  6. **Add** the app package to the Apps for SharePoint library.
7. Add the app to a SharePoint site
  1. Navigate to a site in your O365 tenancy.
  2. Click **Site Contents**.
  3. Click **Add an App**.
  4. Click **From Your Organization**.
  5. Click the app installer.
  6. When prompted, click **Trust It**.

## Exercise 3: Configure Continuous Integration
In this exercise, you will utilize Visual Studio Online to automatically deploy the app when code is updated.

1. In **Visual Studio 2013**, check in the code.
  1. Right click the **LifecycleApp** solution and select **Check In...**.
  2. Enter a comment and click "Check In".

         ![](Images/14.png?raw=true "Figure 14")
2. In **Visual Studio 2013**, make some code changes.
  1. In the **LifecycleApp** project, open **AppManifest.xml**.
  2. Update the app title to be **Lifecycle Demonstration App**.
  3. In the ""LifecycleAppWeb** project, open **Index.cshtml** from the **Views/Home** folder.
  4. **Replace** all of the code with the following:
  ```HTML

  @{
      ViewBag.Title = "Home Page";
  }

  <div class="jumbotron">
      <h2>Welcome @ViewBag.UserName! You have successfully implemented Continuous Integration.</h2>
  </div>

  ```
3. Navigate to the [Azure Portal](https://manage.windowsazure.com)
  1. Click **Web Sites**.
  2. Click the web site created for this exercise.
  3. Click **Setup Deployment from Source Control**.
         ![](Images/15.png?raw=true "Figure 15")
  4. Select **Visual Studio Online**.
  5. Click the **Next** arrow.

         ![](Images/16.png?raw=true "Figure 16")
  6. Fill in the information for your instance of **Visual Studio Online** and click **Authorize Now**.
  7. When prompted, click **Accept**.
  8. Select to deploy **Lifecycle App Project** and click the **checkmark**.

         ![](Images/17.png?raw=true "Figure 17")
4. In **Visual Studio 2013**, configure the build process.
  1. Click the **Team Explorer** tab.
  2. Click the **Home** icon.
  3. Click **Builds**.
  4. Right-click the build definition **lifecycleapp_CD** and select **Edit Build Definition**.
         ![](Images/18.png?raw=true "Figure 18")
  5. Click **General** and verify that the build definition is **Enabled**.

         ![](Images/19.png?raw=true "Figure 19")
  6. Click **Trigger** and verify that the it is set to **Continuous Integration**.

         ![](Images/20.png?raw=true "Figure 20")
  7. Click **Source Settings** and verify that the **Lifecycle App** is selected.

         ![](Images/21.png?raw=true "Figure 21")
  8. Click **Process**.
  9. Expand the **Deployment** node.
  10. Click **SharePoint Deployment**.
  11. In the **Office 365 Deployment Settings** dialog:
    1. Enter **Lifecycle App O365** in the **Deployment Settings Name** field.
    2. Enter the URL for the target SharePoint site in the **SharePoint URL** field.
    3. Enter your **Organizational Account** in the **User Name** field.
    4. Enter your password in the **Password** field.
    5. Click **OK**.

         ![](Images/22.png?raw=true "Figure 22")
  12. Save the project.
5. Check in your code changes, build, and deploy.
  1. Right click the **LifecycleApp** solution and select **Check In...**.
  2. Enter a comment and click "Check In".
  3. Click **Team Explorer**.
  4. Click the **Home** icon.
  5. Click **Builds**.
  6. Double click the in-process build so you can montior the progress.

         ![](Images/23.png?raw=true "Figure 23")
6. Validate changes
  1. When the build is complete, navigate to O365 and verify that the app title has changed.

         ![](Images/24.png?raw=true "Figure 24")
  2. Launch the app and verify the UI changes were successfully deployed to Windows Azure.

         ![](Images/25.png?raw=true "Figure 25")

## Exercise 4: Build Validation Testing
In this exercise, you will use Microsoft Test Manager to create a test plan for the app.

1. Add a new Test Plan
  1. In **Visual Studio 2013**, click **Team Explorer**.
  2. Click **Web Portal** to open Visual Studio Online.
  3. Click **Test**.

          ![](Images/26.png?raw=true "Figure 26")
  4. Select to create a new **Test Plan**.

          ![](Images/27.png?raw=true "Figure 27")
  5. Name the new Test Plan **Build Validation**.
  6. Click **Create**.

          ![](Images/28.png?raw=true "Figure 28")
2. Create a Test case
  1. Select to create a new **Test Case**.

          ![](Images/29.png?raw=true "Figure 29")
  2. Name the test **Launch Test**.
  3. Add steps to the test so it appears as shown.
  4. Click **Save**.

          ![](Images/30.png?raw=true "Figure 30")
  5. Close the dialog.
  6. Click **Open Test Plan using Microsoft Test Manager**.

          ![](Images/31.png?raw=true "Figure 31")
  7. In **Microsoft Test Manager**, mark the testing suite as **In Progress**.

          ![](Images/32.png?raw=true "Figure 32")
  8. Click **Test**.
          ![](Images/33.png?raw=true "Figure 33")
  9. Right click the **Launch Test** and select **Run**.

          ![](Images/34.png?raw=true "Figure 34")
  10. Check **Create Action Recording**.
  11. Click **Start Test**.
  12. Follow the steps in the test to record the test case.
  13. Click **End Test** when you are finished.
  14. When finished, click **Save and Close**.

          ![](Images/35.png?raw=true "Figure 35")

Congratulations! You have completed implementing Continuous Integration.


text:
"""Module for KNX/IP Error codes."""
from enum import Enum

class ErrorCode(Enum):
    """Enum class for KNX/IP error codes."""

    # The connection state is normal.
    E_NO_ERROR = 0x00

    # requested host protocol is not supported
    E_HOST_PROTOCOL_TYPE = 0x01

    # requested protocol version is not supported
    E_VERSION_NOT_SUPPORTED = 0x02

    # received sequence number is out of order.
    E_SEQUENCE_NUMBER = 0x04

    # The KNXnet/IP Server device cannot find an active data
    # connection with the specified ID.
    E_CONNECTION_ID = 0x21

    # The requested connection type is not supported
    E_CONNECTION_TYPE = 0x22

    # One or more requested connection options are not supported
    E_CONNECTION_OPTION = 0x23

    # The KNXnet/IP Server device cannot accept the new data connection
    # because its maximum amount of concurrent connections is already
    # occupied.
    E_NO_MORE_CONNECTIONS = 0x24

    # KNXnet/IP Tunnelling device does not accept connection because the
    # Individual Address is used multiple times
    E_NO_MORE_UNIQUE_CONNECTIONS = 0x25

    # The KNXnet/IP Server device detects an error concerning
    # the data connection with the specified ID.
    E_DATA_CONNECTION = 0x26

    # The KNXnet/IP Server device detects an error concerning
    # the KNX subnetwork connection with the specified ID.
    E_KNX_CONNECTION = 0x27

    # The requested tunnelling layer is not supported by the
    # KNXnet/IP Server device.
    E_TUNNELLING_LAYER = 0x29

redpajama_set_name: RedPajamaGithub


text:
TaKDA

Course Offering Management System

The system named "TaKDa" is a course offering management system developed to provide an easy-to-implement course allocation and room control in the Institute of Computer Science. Due to the increasing number of students taking up Computer Science in UPLB, manual course allocations is seen to be inefficient. That is why a system that will address this problem is seen to be important.


text:
package com.streamsets.pipeline.lib.jdbc;

import com.streamsets.pipeline.api.impl.Utils;

import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.regex.Matcher;

public class BasicConnectionString {
  private static final String HOSTNAME_REGEX = "(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-\\_]*[a-zA-Z0-9])\\.)*" +
      "([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])*";

  private static final String IP_ADDRESS_V4_REGEX = "(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}" +
      "([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])*";

  private static final String IP_ADDRESS_V6_REGEX = "((((?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4})))";

  private static final String
      IP_ADDRESS_V6_HEX_COMPRESSED_REGEX
      = "(((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)::((?:[0-9A-Fa-f]{1,4}(?::[0-9A-Fa-f]{1,4})*)?)*)";

  /**
   * Bear in mind that all the REGEX included here must have the same exact number of groups since they are used in
   * all the JDBC branded implementations.
   *
   * @return List of all the regex included
   */
  public static List<String> getAllRegex() {
    return Arrays.asList(HOSTNAME_REGEX, IP_ADDRESS_V4_REGEX, IP_ADDRESS_V6_REGEX, IP_ADDRESS_V6_HEX_COMPRESSED_REGEX);
  }

  /**
   * Bean containing the basic information from connection string: host, port and tail.
   */
  public static class Info {
    private final String host;
    private final int port;
    private final String tail;

    private Info(String host, int port, String tail) {
      this.host = host;
      this.port = port;
      this.tail = tail;
    }

    public String getHost() {
      return host;
    }

    public int getPort() {
      return port;
    }

    public String getTail() {
      return tail;
    }

    public Info changeHostPort(String host, int port) {
      return new Info(host, port, getTail());
    }

  }

  /**
   * Basic connection pattern finder and data extractor.
   */
  public static class Pattern {
    private final java.util.regex.Pattern pattern;
    private final int hostGroup;
    private final int portGroup;
    private final String defaultHost;
    private final int defaultPort;
    private final int tailGroup;

    public Pattern(
        String regex, int hostGroup, String defaultHost, int portGroup, int defaultPort, int tailGroup
    ) {
      this.pattern = java.util.regex.Pattern.compile(regex);
      this.hostGroup = hostGroup;
      this.defaultHost = defaultHost;
      this.portGroup = portGroup;
      this.defaultPort = defaultPort;
      this.tailGroup = tailGroup;
    }

    protected Info find(String connectionString) {
      String host;
      int port;
      String tail = "";
      Matcher matcher = pattern.matcher(connectionString);

      if (matcher.matches()) {
        if (hostGroup > 0) {
          host = matcher.group(hostGroup);
        } else {
          host = defaultHost;
        }
        if (portGroup > 0) {
          port = Integer.parseInt(matcher.group(portGroup));
        } else {
          port = defaultPort;
        }
        if (tailGroup > 0) {
          tail = matcher.group(tailGroup);
          if (tail == null){
            tail = "";
          }
        }
        return new Info(host, port, tail);
      } else {
        return null;
      }
    }
  }

  private final Set<Pattern> patterns;
  private final String basicConnectionStringTemplate;

  public BasicConnectionString(
      Set<Pattern> patterns, String basicConnectionStringTemplate
  ) {
    this.patterns = Utils.checkNotNull(patterns, "basicConnectionPatterns");
    this.basicConnectionStringTemplate = Utils.checkNotNull(basicConnectionStringTemplate,
        "basicConnectionStringTemplate"
    );
  }

  public Info getBasicConnectionInfo(String connectionString) {
    for (Pattern pattern : patterns) {
      Info info = pattern.find(connectionString);
      if (info != null) {
        return info;
      }
    }
    return null;
  }

  public String getBasicConnectionUrl(Info info) {
    Utils.checkNotNull(info, "info");
    return String.format(basicConnectionStringTemplate, info.getHost(), info.getPort(), info.getTail());
  }
}


text:
from datetime import date

from base import Container, Resource

class Deputy(Resource):
    """
        Deputy resource.
    """

    SRC_OBJ_MAP = {"name": "name", "sname": "surname", "unid": "id"}
    DUMP_FIELDS = ["id", "name", "surname"]

    def __init__(self, lst, clean=False, **kwargs):
        if clean:
            self._dct = dict(zip(self.DUMP_FIELDS, lst))
            return

        ilst = iter(lst)
        _raw_dct = dict()

        if not lst[0]:
            ilst.next()  # drop the first (empty) element, if it exists

        while True:
            try:
                key = next(ilst)
                value = next(ilst)
                _raw_dct[key] = value
            except StopIteration:
                break

        self._dct = {}
        for source_key, obj_key in self.SRC_OBJ_MAP.items():
            self._dct[obj_key] = _raw_dct[source_key]

    def __unicode__(self):
        return str(self._dct)

    def __str__(self):
        return str(self._dct)

    def __repr__(self):
        return "%s\n" % ",".join(self._dct[x] for x in self.DUMP_FIELDS)

class Session(Resource, Container):
    """
        Session resource.
        Works both as a resource (an object in calendar container),
        And as a container (for voting objects)
    """

    def __init__(self, lst, **kwargs):
        self.unpack_format = "csv"
        self._items = None
        self._date = None
        self._lst = lst
        self.term = kwargs["term"]

    def __unicode__(self):
        return "%s on %s" % (self._map_type(), self.date)

    def __str__(self):
        return "%s on %s" % (self._map_type(), self.date)

    def __repr__(self):
        return '%s\n' % ",".join(self._lst)

    @property
    def type(self):
        # Session types:
        # 1 -> regular session
        # 2 -> emergency session (A & As)
        # 4 -> ceremonial session (S)
        # 5 -> PM answering deputy questions (J)
        # 6 -> emergency session (A)
        #
        # TODO: find out about differences between types 2 & 6 and "A" and "As"
        return self._lst[4]

    @property
    def date(self):
        # NOTE: This is the start date, as there might be sessions that end after
        #       midnight
        if self._date is None:
            self._date = date(int(self._lst[1]), int(self._lst[2]), int(self._lst[3]))
        return self._date

    @property
    def id(self):
        return self._lst[6]

    @property
    def _filename(self):
        return "session-%s.csv" % self.id

    @property
    def votings(self):
        if self._items is None:
            self.Resource = Voting
            self._items = self.load(unique_index=None)

        return self._items

    @property
    def urn(self):
        return "LIVS%s/saeimalivs2_dk.nsf/DK?ReadForm&calendar=1%s" % (self.term, self.id)

    def _map_type(self):
        return {
            "1": "Regular session",
            "2": "Emergency session",
            "4": "Ceremonial session",
            "5": "Q&A session",
            "6": "Emergency session",
        }.get(self._lst[4], "Unknown session type")

class Voting(Resource):
    def __init__(self, lst, **kwargs):
        self._lst = lst

    def __str__(self):
        return self._lst[0]


text:
<?php

use yii\helpers\Html;
use app\models\User;
use app\models\PostViews;
use app\models\PostServices;
use app\models\PostRatings;
use app\models\AcceptedOrders;
use yii\helpers\Url;

/* @var $this yii\web\View */
/* @var $searchModel app\models\CategorySearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$ratings = new PostRatings;
$this->title = 'User details for '. $user->display_name;
$this->params['breadcrumbs'][] = 'User details';
$this->params['breadcrumbs'][] = $user->display_name;
?>
<?php if(Yii::$app->session->getFlash('message')){ ?>

		<button type="button" class="close" data-dismiss="alert" aria-label="Close">×</button>
		<?= Yii::$app->session->getFlash('message'); ?>

		<?php } ?>

<?= Html::encode($this->title) ?>
   <a href="<?= Url::to(['/admin/viewusers'])?>"> Back

								<img src="<?= \Yii::getAlias('@web/images/users/'.$user->profilePic); ?>" alt="" class="center-block img-circle img-thumbnail" width="150">

								<?php $rating = \Yii::$app->function->getUserRating($user->user_id); ?>
								<?php if ($rating != 0) : ?>
								<?php for ($i=1; $i <= $rating['full'] ; $i++) { ?>

								<?php } ?>
								<?php for ($i=1; $i <= $rating['half'] ; $i++) { ?>

								<?php } ?>

<?= $rating['count']?> reviews
							<?php else: ?>
							<?php for ($i=1; $i <= 5 ; $i++) { ?>

							<?php } ?>

0 reviews
						<?php endif; ?>

<?= $user->fname . ' ' . $user->lname;?>

Member since:  <?= $user->created_at;?>

Address:  <?= $user->address;?>

Display name:  <?= $user->display_name;?>

		Posted Services

			Bought Services

				Reviews

						Services posted by the user

						<?php if(count($user->posts) > 0): ?>

							<?php foreach ($user->posts as $post) { ?>

									<?php if($post->featured == 1) : ?>

Featured

								<?php endif; ?>
								<img src="<?= Yii::getAlias('@web'); ?>/images/services/<?= $post->image_url; ?>" alt="Promotional image">

Price: <?= $post->currency, ' ', Html::encode($post->price); ?>

<?= substr(Html::encode($post->title), 0, 70); ?>

									by <?= User::findIdentity($post->owner_id)->display_name; ?>

									Sold:  <?= \Yii::$app->function->getSoldCount($post->post_id);?>
										<?= (PostViews::find()->where(['post_id'=>$post->post_id])->count() == 0 ? 0 : PostViews::find()->where(['post_id'=>$post->post_id])->one()->view_count);?>   <?= $ratings->postRating($post->post_id)['likes'];?>   <?= $ratings->postRating($post->post_id)['dislikes'];?>

										<?php if($post->featured == 1) : ?>
										<a href="<?= Url::to(['admin/addtofeatured/'.$post->post_id]); ?>" class="btn btn-danger">Remove featured
									<?php else: ?>
									<a href="<?= Url::to(['admin/addtofeatured/'.$post->post_id]); ?>" class="btn btn-success">Add to featured
								<?php endif; ?>

					<?php } ?>

			<?php else: ?>
			No services posted yet
		<?php endif; ?>

  Services bought by the user

		<?php $accepted = AcceptedOrders::find()->joinWith('posts')->where(['accepted_orders.user_id'=>$user->user_id])->all();
		if(count($accepted) > 0): ?>

			<?php foreach ($accepted as $post) {  ?>

					<?php if($post->posts->featured == 1) : ?>

Featured

				<?php endif; ?>
				<img src="<?= Yii::getAlias('@web'); ?>/images/services/<?= $post->posts->image_url; ?>" alt="Promotional image">

Price: <?= $post->posts->currency, ' ', Html::encode($post->posts->price); ?>

<?= substr(Html::encode($post->posts->title), 0, 70); ?>

					by <?= User::findIdentity($post->posts->owner_id)->display_name; ?>

					Sold:  <?= \Yii::$app->function->getSoldCount($post->posts->post_id);?>
						<?= (PostViews::find()->where(['post_id'=>$post->posts->post_id])->count() == 0 ? 0 : PostViews::find()->where(['post_id'=>$post->posts->post_id])->one()->view_count);?>   <?= $ratings->postRating($post->posts->post_id)['likes'];?>   <?= $ratings->postRating($post->posts->post_id)['dislikes'];?>

						<?php if($post->posts->featured == 1) : ?>
						<a href="<?= Url::to(['admin/addtofeatured/'.$post->post_id]); ?>" class="btn btn-danger">Remove featured
					<?php else: ?>
					<a href="<?= Url::to(['admin/addtofeatured/'.$post->post_id]); ?>" class="btn btn-success">Add to featured
				<?php endif; ?>

	<?php } ?>

<?php else: ?>
	No services bought yet
<?php endif; ?>

		User Reviews

		<?php if(count($comments) > 0): ?>
		<?php foreach($comments as $comment){ ?>

				<img src="<?= \Yii::getAlias('@web/images/users/'.$comment->commentBy->profilePic); ?>" class="img-circle pull-left" style="margin-right:15px"width="80"><a href="<?= Url::to(['admin/user/'.$comment->commentBy->user_id]);?>" style="display:block; margin-bottom: -15px"><?= $comment->commentBy->display_name; ?>

				<?php for($i = 1; $i <= $comment->stars; $i++){ ?>

				<?php } ?>
				<?php for($i = 1; $i <= 5 - $comment->stars; $i++){ ?>

				<?php } ?>
				<?= \Yii::$app->function->getAgoTime($comment->datetimestamp); ?>

<?= Html::encode($comment->comment);?>

		<?php } ?>
	<?php else: ?>
	No user reviews yet
<?php endif; ?>


text:
<!--
 ~ Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
 ~
 ~ WSO2 Inc. 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.
 -->
<assembly>
    <!--<id>bin</id>-->
    <formats>
        <format>zip</format>
    </formats>
    <includeBaseDirectory>false</includeBaseDirectory>
    <fileSets>
        <fileSet>
            <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
            <outputDirectory>wso2is-${pom.version}</outputDirectory>
            <excludes>
                <exclude>**/*.sh</exclude>
                <exclude>**/wso2server.bat</exclude>
                <exclude>**/axis2services/sample01.aar</exclude>
                <exclude>**/axis2services/Echo.aar</exclude>
                <exclude>**/axis2services/Version.aar</exclude>
                <exclude>**/pom.xml</exclude>
                <exclude>**/version.txt</exclude>
                <exclude>**/README*</exclude>
                <exclude>**/carbon.xml</exclude>
                <exclude>**/axis2/*</exclude>
                <exclude>**/LICENSE.txt</exclude>
                <exclude>**/INSTALL.txt</exclude>
                <exclude>**/release-notes.html</exclude>
                <exclude>**/claim-config.xml</exclude>
                <exclude>**/log4j.properties</exclude>
                <exclude>**/registry.xml</exclude>
		<exclude>**/email/email-admin-config.xml</exclude>
		<exclude>**/dbscripts/**</exclude>
		<!-- Changes related to Carbon kernel 4.2.0 patches -->
                <!--exclude>**/lib/org.wso2.carbon.server-4.2.0.jar</exclude-->
		<!--exclude>**/lib/org.wso2.ciphertool-1.0.0-wso2v2.jar</exclude-->
                <!--exclude>**/cipher-text.properties</exclude-->
		<!--exclude>**/client-truststore.jks</exclude-->
                <!--exclude>**/cipher-tool.properties</exclude-->
                <!--exclude>**/authenticators.xml</exclude-->
		<!--exclude>**/ciphertool.bat</exclude-->
		<!--exclude>**/wso2carbon-version.txt</exclude-->
                <!-- End - Changes related to Carbon kernel 4.2.0 patches -->
            </excludes>
        </fileSet>
        <fileSet>
            <directory>target/wso2carbon-core-${carbon.kernel.version}</directory>
            <outputDirectory>wso2is-${pom.version}</outputDirectory>
            <excludes>
                <exclude>**/wso2server.bat</exclude>
            </excludes>
            <includes>
                <include>**/*.sh</include>
            </includes>
            <fileMode>755</fileMode>
        </fileSet>
        <!--<fileSet>-->
        <!--<directory>-->
        <!--../../p2-profile-gen/product/target/wso2carbon-core-${wso2carbon.version}/repository/conf/advanced/-->
        <!--</directory>-->
        <!--<outputDirectory>wso2is-${pom.version}/repository/conf/advanced</outputDirectory>-->
        <!--<includes>-->
        <!--<include>**/qpid-config.xml</include>-->
        <!--<include>**/qpid-jmxremote.access</include>-->
        <!--<include>**/qpid-virtualhosts.xml</include>-->
        <!--</includes>-->
        <!--</fileSet>-->

	<!--copying registry dbscripts-->
        <!--<fileSet>-->
            <!--<directory>../jaggery/modules</directory>-->
            <!--<outputDirectory>${pom.artifactId}-${pom.version}/modules</outputDirectory>-->
            <!--<!– Changes related to Carbon kernel 4.2.0 patches –>-->
            <!--<includes>-->
                <!--<include>**/**.js</include>-->
		<!--<include>**/**.xml</include>-->
            <!--</includes>-->
            <!--<!– End - Changes related to Carbon kernel 4.2.0 patches –>-->
        <!--</fileSet>-->

        <fileSet>
            <directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/modules</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/modules</outputDirectory>
            <includes>
                <include>**/**</include>
            </includes>
        </fileSet>
	<!--Adding my jaggery apps-->
	<!--<fileSet>
            <directory>../jaggery-apps/my-identity/web</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/my-identity</outputDirectory>
            <includes>
                <include>**/**</include>
            </includes>
        </fileSet> -->
	<fileSet>
            <directory>../jaggery-apps/user-dashboard/dashboard</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/dashboard</outputDirectory>
            <!-- Changes related to Carbon kernel 4.2.0 patches -->
            <includes>
                <include>**/**</include>
            </includes>
            <!-- End - Changes related to Carbon kernel 4.2.0 patches -->
        </fileSet>
	<fileSet>
            <directory>../jaggery-apps/portal</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/jaggeryapps/portal</outputDirectory>
            <!-- Changes related to Carbon kernel 4.2.0 patches -->
            <includes>
                <include>**/**</include>
            </includes>
            <!-- End - Changes related to Carbon kernel 4.2.0 patches -->
        </fileSet>
	<!--<fileSet>-->
            <!--<directory>../jaggery-apps/shindig</directory>-->
            <!--<outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/shindig</outputDirectory>-->
            <!--<!– Changes related to Carbon kernel 4.2.0 patches –>-->
            <!--<includes>-->
                <!--<include>**/**</include>-->
            <!--</includes>-->
            <!--<!– End - Changes related to Carbon kernel 4.2.0 patches –>-->
        <!--</fileSet>-->
        <fileSet>
            <directory>target/shindig</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/shindig
            </outputDirectory>
            <includes>
                <include>**/**</include>
            </includes>
        </fileSet>
	<fileSet>
            <directory>target/wso2carbon-core-${carbon.kernel.version}/dbscripts</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts</outputDirectory>
            <!-- Changes related to Carbon kernel 4.2.0 patches -->
            <!--excludes>
                <exclude>db2.sql</exclude>
                <exclude>mysql.sql</exclude>
                <exclude>mysql_cluster.sql</exclude>
            </excludes-->
            <!-- End - Changes related to Carbon kernel 4.2.0 patches -->
        </fileSet>
        <fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/
            </directory>
            <outputDirectory>wso2is-${pom.version}/repository/conf/security</outputDirectory>
            <includes>
                <include>**/krb5.conf</include>
                <include>**/jaas.conf</include>
            </includes>
	    <!-- Changes related to Carbon kernel 4.2.0 patches -->
            <!--excludes>
                <exclude>**/cipher-text.properties</exclude>
                <exclude>**/cipher-tool.properties</exclude>
            </excludes-->
            <!-- End - Changes related to Carbon kernel 4.2.0 patches -->
        </fileSet>

        <fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/identity
            </directory>
            <outputDirectory>wso2is-${pom.version}/repository/conf/identity</outputDirectory>
            <includes>
                <include>**/*.xml</include>
            </includes>
        </fileSet>

	<fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/security/ldif
            </directory>
            <outputDirectory>wso2is-${pom.version}/repository/resources/security/ldif</outputDirectory>
            <includes>
                <include>identityPerson.ldif</include>
                <include>scimPerson.ldif</include>
		<include>wso2Person.ldif</include>
            </includes>
        </fileSet>
        <!--fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.platform.version}/dbscripts/identity/
            </directory>
            <outputDirectory>wso2is-${pom.version}/dbscripts/identity</outputDirectory>
            <includes>
                <include>**/**.sql</include>
            </includes>
        </fileSet>

        <fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.platform.version}/dbscripts/service-provider/
            </directory>
            <outputDirectory>wso2is-${pom.version}/dbscripts/service-provider</outputDirectory>
            <includes>
                <include>**/**.sql</include>
            </includes>
        </fileSet-->
        <!--  copying samples -->
        <!--fileSet>
            <directory>../samples</directory>
            <outputDirectory>wso2is-${pom.version}/samples</outputDirectory>
            <excludes>
                <exclude>**/**.sh</exclude>
                <exclude>**/pom.xml</exclude>
                <exclude>**/target/**</exclude>
            </excludes>
        </fileSet-->

        <!-- copy executables in samples with execute permissions -->
        <!--fileSet>
            <directory>../samples</directory>
            <outputDirectory>wso2is-${pom.version}/samples</outputDirectory>
            <includes>
                <include>**/**.sh</include>
            </includes>
            <fileMode>755</fileMode>
        </fileSet-->

        <!-- copy the landing page webapp -->
        <fileSet>
            <directory>lib/home</directory>
            <outputDirectory>
                ${pom.artifactId}-${pom.version}/repository/deployment/server/webapps/STRATOS_ROOT
            </outputDirectory>
        </fileSet>

		<!--copy jaxrs web app for SCIM feature-->
		<fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps
            </directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
            <includes>
                <include>wso2.war</include>
            </includes>
        </fileSet>

        <!--copy jaxrs web app for OAuth feature-->
		<fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps
            </directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
            <includes>
                <include>oauth2.war</include>
            </includes>
        </fileSet>

	 <!--copy web app for application authentication feature -->
         <fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps
            </directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
            <includes>
                <include>authenticationendpoint.war</include>
            </includes>
        </fileSet>

        <!--copy web app for certificate authority feature -->
        <fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/deployment/server/webapps
            </directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/server/webapps</outputDirectory>
            <includes>
                <include>ca.war</include>
            </includes>
        </fileSet>

	 <!--Multitenancy related file -->
        <fileSet>
            <directory>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/multitenancy/
            </directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/multitenancy</outputDirectory>
            <includes>
                <include>**/stratos.xml</include>
                <include>**/multitenancy-packages.xml</include>
                <include>**/usage-throttling-agent-config.xml</include>
                <include>**/cloud-services-desc.xml</include>
            </includes>
        </fileSet>

        <fileSet>
            <directory>../styles/service/src/main/resources/web/styles/css</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/resources/allthemes/Default/admin</outputDirectory>
            <includes>
                <include>**/**.css</include>
            </includes>
        </fileSet>
        <fileSet>
            <directory>../styles/service/src/main/resources/web/styles/images</directory>
            <outputDirectory>${pom.artifactId}-${pom.version}/resources/allthemes/Default/images</outputDirectory>
            <includes>
                <include>**/**.gif</include>
                <include>**/**.png</include>
            </includes>
        </fileSet>

        <fileSet>
            <directory>conf/policies</directory>
            <outputDirectory>wso2is-${pom.version}/repository/resources/security/policies/xacml/default</outputDirectory>
        </fileSet>

	<!-- copying runtimes -->
       	<fileSet>
       		<directory>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/lib/runtimes</directory>
       		<outputDirectory>${pom.artifactId}-${pom.version}/lib/runtimes/</outputDirectory>
       		<includes>
      			 <include>*/**</include>
       		</includes>
       </fileSet>

       <!-- Kernal patches -->
<!--
	<fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0001</directory>
             <outputDirectory>wso2is-${pom.version}/repository/components/patches/</outputDirectory>
             <includes>
                  <include>**/patch0001/*.*</include>
             </includes>
        </fileSet>
	<fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0002</directory>
             <outputDirectory>wso2is-${pom.version}/repository/components/patches/</outputDirectory>
             <includes>
                  <include>**/patch0002/*.*</include>
             </includes>
        </fileSet>
	<fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0003</directory>
             <outputDirectory>wso2is-${pom.version}/repository/components/patches/</outputDirectory>
             <includes>
                  <include>**/patch0003/*.*</include>
             </includes>
        </fileSet>
	<fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0004</directory>
             <outputDirectory>wso2is-${pom.version}/repository/components/patches/</outputDirectory>
             <includes>
                  <include>**/patch0004/*.*</include>
             </includes>
        </fileSet>
	<fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0005</directory>
             <outputDirectory>wso2is-${pom.version}/repository/components/patches/</outputDirectory>
             <includes>
                  <include>**/patch0005/*.*</include>
             </includes>
        </fileSet>
	<fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0006</directory>
             <outputDirectory>wso2is-${pom.version}/repository/components/patches/</outputDirectory>
             <includes>
                  <include>**/patch0006/*.*</include>
             </includes>
        </fileSet>
        <fileSet>
             <directory>../p2-profile-gen/target/WSO2-CARBON-PATCH-4.2.0-0007</directory>
             <outputDirectory>wso2is-${pom.version}/repository/components/patches/</outputDirectory>
             <includes>
                  <include>**/patch0007/*.*</include>
             </includes>
        </fileSet-->
    </fileSets>

    <dependencySets>
        <!--dependencySet>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/deployment/client/modules
            </outputDirectory>
            <includes>
                <include>org.apache.rampart:rampart:mar</include>
            </includes>
        </dependencySet-->
    	</dependencySets>

    <files>
        <file>
            <source>../../README.txt</source>
            <outputDirectory>wso2is-${pom.version}</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>../../INSTALL.txt</source>
            <outputDirectory>wso2is-${pom.version}</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>../../LICENSE.txt</source>
            <outputDirectory>wso2is-${pom.version}</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>../../release-notes.html</source>
            <outputDirectory>wso2is-${pom.version}</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/README.txt</source>
            <outputDirectory>wso2is-${pom.version}/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/version.txt</source>
            <outputDirectory>wso2is-${pom.version}/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/repository/conf/carbon.xml</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <filtered>true</filtered>
        </file>
        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/repository/conf/axis2/axis2.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/axis2/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/repository/conf/axis2/axis2_client.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/axis2/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/repository/conf/axis2/tenant-axis2.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/axis2/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
	<file>
            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/webapp-classloading-environments.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/tomcat/context.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/tomcat</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/repository/conf/README</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>

        <file>
            <source>target/wso2carbon-core-${carbon.kernel.version}/bin/wso2server.bat</source>
            <outputDirectory>wso2is-${pom.version}/bin/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>

        <file>
            <source>conf/card.jpg</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <!--claim-config.xml is now copied from the feature installation.>
        <file>
            <source>conf/claim-config.xml</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <fileMode>644</fileMode>
        </file-->

        <file>
            <source>conf/saml1-assertion-config.xml</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>conf/registry.xml</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <fileMode>644</fileMode>
        </file>

        <!--identity.xml is now copied from the feature installation.>
        <file>
            <source>conf/identity.xml</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <fileMode>644</fileMode>
        </file-->

        <!--file>
            <source>conf/entitlement.properties</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/security/</outputDirectory>
            <fileMode>644</fileMode>
        </file-->

        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/claim-config.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
        </file>
<!--
     <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.platform.version}/repository/conf/identity.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
            <fileMode>644</fileMode>
        </file>
-->
    <!--identity.xml is now copied from conf . -->
        <file>
            <source>conf/identity.xml</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <fileMode>644</fileMode>
        </file>
    <!--identity.xml is now copied from conf . -->

        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/email/email-admin-config.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/email</outputDirectory>
            <fileMode>644</fileMode>
        </file>

        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/identity-mgt.properties
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/security</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/entitlement.properties
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/security</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/saml2.federation.properties
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/security</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/sso-idp-config.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/security</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/security/sso_redirect.html
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/resources/security</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/security/application-authentication.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/security</outputDirectory>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/data/is-default-schema.zip
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/data</outputDirectory>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/embedded-ldap.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
        </file>
	<!--file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.platform.version}/repository/conf/multitenancy/tenant-mgt.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
        </file-->
        <!-- Stratos specific files -->

        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/etc/logging-config.xml
            </source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/etc/
            </outputDirectory>
        </file>
	 <!-- Including log4j.properties file -->
     <!--   <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.platform.version}/repository/conf/log4j.properties
            </source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/
            </outputDirectory>
        </file>  -->
        <file>
            <source>conf/log4j.properties</source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/</outputDirectory>
            <fileMode>644</fileMode>
        </file>

	<!--copy scim-consumer-config.xml-->
	<file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/provisioning-config.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/scim-schema-extension.config
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
        </file>
        <file>
            <source>../jaggery-apps/user-dashboard/sp_dashboard.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/identity/service-providers/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/thrift-authentication.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
        </file>
	<!--copy url-mapping-config.xml-->
	<!--file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${patch.version.405}/repository/conf/etc/url-mapping-config.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf/etc</outputDirectory>
        </file-->
        <!-- copying event broker config file -->
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/event-broker.xml
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
        </file>
        <file>
            <source>
                ../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/conf/msg-mgt.properties
            </source>
            <outputDirectory>wso2is-${pom.version}/repository/conf</outputDirectory>
            <fileMode>644</fileMode>
        </file>

	<!-- Changes related to Carbon kernel 4.2.0 patches -->
        <!-- Files WSO2-CARBON-PATCH-4.2.0-0001 - Start -->
 	<!--
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0001/lib/org.wso2.carbon.server-4.2.0.jar</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/lib/</outputDirectory>
        </file>
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0001/dbscripts/db2.sql</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/</outputDirectory>
	    <fileMode>644</fileMode>
        </file>
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0001/dbscripts/mysql.sql</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/</outputDirectory>
	    <fileMode>644</fileMode>
        </file>
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0003/dbscripts/mysql_cluster.sql</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/dbscripts/</outputDirectory>
	    <fileMode>644</fileMode>
        </file> -->
        <!-- Files WSO2-CARBON-PATCH-4.2.0-0002 - Start -->
	<!--
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0002/repository/conf/security/cipher-text.properties</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>
        </file>
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0002/repository/conf/security/cipher-tool.properties</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/security/</outputDirectory>
        </file>
	<file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0002/repository/conf/axis2/axis2.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/axis2/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0002/repository/conf/axis2/tenant-axis2.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/axis2/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
        <file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0002/repository/conf/axis2/axis2_client.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/axis2/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file>
	<file>
            <source>../p2-profile-gen/target/WSO2-CARBON-PATCH-${carbon.kernel.version}-0004/repository/conf/carbon.xml</source>
            <outputDirectory>${pom.artifactId}-${pom.version}/repository/conf/</outputDirectory>
            <filtered>true</filtered>
            <fileMode>644</fileMode>
        </file> -->
        <!-- End - Changes related to Carbon kernel 4.2.0 patches -->
    </files>
</assembly>


text:
<!DOCTYPE html>

<meta charset="utf-8">
<title>About Virtual Disk Compact and Copy</title>

About Virtual Disk Compact and Copy

To reduce the size of virtual disk images

Version 2.3

Released under the Apache License 2.0

For more information see the following topics:

What is CompactVD?

Compact disk image in place

Copy to new disk image

Copyright notices

What is CompactVD?▲

CompactVD is a utility to optimize the size of dynamic disk images,
based on the bitmap allocation tables of known file systems.

You can check if there is wasted space in a dynamic disk image comparing
the size of the disk image file with the space used by file systems inside the image.
For a optimal resource allocation, they should not be very different.
Or just drag a disk image into this window:

Currently supported file systems are:

New Technology File System (NTFS), for Windows computers

Hierarchical or Apple File System (HFS or APFS), for macOS

Extended File System (EXT), used in most linux desktops

Compact Disk Image In Place
▲

The compact operation pulls blocks of data from the end of the disk image
to space that was detected to be not in use by file systems.

To begin a scan is made to detect blocks of data that are not in use by file systems,
and the disk image structure is updated marking those blocks as if they were never used.

Then blocks with effective data are moved from the end of the disk image to the space
that was recovered by the previous operation.

Finally the image structure is updated to reflect the new position of the moved blocks,
and the image file size is trimmed. Updates to the image structure are temporarily saved on the host media
and will be written to the image at next program execution, in case of a recoverable hardware failure.

Copy to New Disk Image
▲

The copy operation begins with a scan to detect blocks of data that are not in use by file systems.
The new image is created ignoring those blocks, and blocks that would otherwise be completely filled with zeros.

The format of the new disk image can be select in the Copy Disk Image dialog
with one these file extensions:

VDI, Virtual Disk Image for Oracle VirtualBox

VMDK, Virtual Machine Disk for VMware products

VHD, Virtual Hard Disk for Microsoft products

RAW, for a complete disk image

Copyright Notices
▲

Copyright © 2016-2022 Rui Baptista

Licensed under the Apache License, Version 2.0. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0.
Software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
either express or implied.

This product includes Apache
Commons CLI software Copyright 2001-2015 The Apache Software Foundation.

The application icon is a derivative work of original made by
Susumu Yoshida
(Copyright © 2009 McDo DESIGN.com).

The other icons that identify image disks in the view panel are copyright-protected computer icons of file formats.
The author believes that the exhibition of icons to identify the file formats in question qualifies as fair use.


text:
picturefillComponentPolyfill = function () {

    //    POLYFILL FOR SAFARI AND EDGE
    //    POLYFILL FOR SAFARI AND EDGE

    var needPolyfill = '';

    if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
        needPolyfill = 'yes';
    } else if (document.documentMode || /Edge/.test(navigator.userAgent)) {
        needPolyfill = 'yes';
    }

    if (needPolyfill == 'yes') {
        // If components are used
        if ($('img-picturefill').length || $('img-picturefill-mid').length) {
            // Set interval for fill srcset of sources the quicker as possible. When they are defined, stop it
            var pictureFillComponentPolyfillInterval = setInterval(function () {

                // If srcset are already defined
                if (typeof $('img-picturefill').find('source').attr('srcset') != 'undefined' || typeof $('img-picturefill-mid').find('source').attr('srcset') != 'undefined') {
                    // Clear interval
                    clearInterval(pictureFillComponentPolyfillInterval);
                    // Fire pictureFill and show main
                    $(document).ready(function () {
                        $('main').css('opacity', '1');
                        picturefill();
                    });

                } else {
                    if ($('img-picturefill').length) {
                        // For each picturefill image
                        $('img-picturefill').each(function () {
                            // Get data values. Name of image and format.
                            pictureContainer = $(this);
                            pictureName = pictureContainer.attr('image');
                            format = pictureContainer.attr('format');
                            if (typeof format == 'undefined') {
                                format = 'jpg';
                            }

                            // Assign srcset of each source and img.
                            pictureContainer.find('source:nth-of-type(1)').attr('srcset', 'assets/img/' + pictureName + '-2880.' + format);
                            pictureContainer.find('source:nth-of-type(2)').attr('srcset', 'assets/img/' + pictureName + '-2280.' + format + ', assets/img/' + pictureName + '-2880.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(3)').attr('srcset', 'assets/img/' + pictureName + '-1440.' + format + ', assets/img/' + pictureName + '-2880.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(4)').attr('srcset', 'assets/img/' + pictureName + '-1140.' + format + ', assets/img/' + pictureName + '-2280.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(5)').attr('srcset', 'assets/img/' + pictureName + '-960.' + format + ', assets/img/' + pictureName + '-1920.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(6)').attr('srcset', 'assets/img/' + pictureName + '-720-v.' + format + ', assets/img/' + pictureName + '-1440-v.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(7)').attr('srcset', 'assets/img/' + pictureName + '-960-v.' + format + ' 2x');
                        });
                    }

                    if ($('img-picturefill-mid').length) {
                        // For each picturefill-mid image
                        $('img-picturefill-mid').each(function () {
                            // Get data values. Name of image and format.
                            pictureContainer = $(this);
                            pictureName = pictureContainer.attr('image');
                            format = pictureContainer.attr('format');
                            if (typeof format == 'undefined') {
                                format = 'jpg';
                            }

                            // Assign srcset of each source and img.
                            pictureContainer.find('source:nth-of-type(1)').attr('srcset', 'assets/img/' + pictureName + '-1440.' + format);
                            pictureContainer.find('source:nth-of-type(2)').attr('srcset', 'assets/img/' + pictureName + '-960.' + format + ', assets/img/' + pictureName + '-1440.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(3)').attr('srcset', 'assets/img/' + pictureName + '-960.' + format + ', assets/img/' + pictureName + '-1140.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(4)').attr('srcset', 'assets/img/' + pictureName + '-960.' + format + ', assets/img/' + pictureName + '-1140.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(5)').attr('srcset', 'assets/img/' + pictureName + '-960.' + format + ', assets/img/' + pictureName + '-1140.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(6)').attr('srcset', 'assets/img/' + pictureName + '-720-v.' + format + ', assets/img/' + pictureName + '-1440-v.' + format + ' 2x');
                            pictureContainer.find('source:nth-of-type(7)').attr('srcset', 'assets/img/' + pictureName + '-960-v.' + format + ' 2x');
                        });
                    }
                }

                // Fire pictureFill
                $(window).on('load', function () {
                    picturefill();
                });

            }, 50);
        }
    }
};


text:
'use strict';

const
  {
    When,
    Then
  } = require('cucumber');

When(/^I get the server timestamp$/, function (callback) {
  this.api.now()
    .then(response => {
      if (response.error) {
        return callback(new Error(response.error.message));
      }

      if (! response.result) {
        return callback(new Error('No result provided'));
      }

      this.result = response.result;
      callback();
    })
    .catch(error => callback(error));
});

Then(/^I can read the timestamp$/, function (callback) {
  if (! this.result.now || ! Number.isInteger(this.result.now)) {
    return callback('Expected a timestamp result, got: ' + this.result);
  }

  callback();
});


text:
  layout: page
  title: DynamicString
  exclude_from_nav: true
---

VM index: `18`

Autogenerated from `src/shared/classes.rb`, last revised: 2017-11-10


text:
<form id="formGeneral" class="section">

                <input id="paso1_codigo" name="paso1_codigo" type="text" value="<?= $resultado['empresa']['codigoCotizacion']?>">
                <?= label("paso1_labelCodido"); ?>

                <input readonly id="paso1_numero" name="paso1_numero" type="text" value='#'>
                <?= label("paso1_labelNumero"); ?>

            <?= label("paso1_labelCliente"); ?>

                <select data-incluirBoton="1" placeholder="seleccionar" data-tipo="paso1Cliente" id="paso1Cliente" name="paso1Cliente" data-textoBoton="<?= label("agregarNuevo"); ?>" data-placeholder="<?= label("paso1_elegirCliente"); ?>" class="chosen-select browser-default" style="width:350px;" tabindex="2">
                    <option value="0" disabled selected style="display:none;"><?= label("paso1_elegirCliente"); ?></option>
                    <option value="nuevo"><?= label("agregarNuevo"); ?></option>
                    <?php
                        foreach ($resultado['clientes'] as $cliente) {
                            $valor = "value='".$cliente['idCliente']."'";
                            if ($cliente['todosVendedores'] == 1 || $cliente['valido'] == 1) {
                                echo '<option '.$valor.'>'.$cliente['nombre'].' '.$cliente['primerApellido'].' '.$cliente['segundoApellido'].'</option>");';
                            } else{
                                echo '<option '.$valor.' disabled>'.$cliente['nombre'].' '.$cliente['primerApellido'].' '.$cliente['segundoApellido'].'</option>");';
                            }
                        }

                    ?>
                </select>

            <?= label("paso1_labelContacto"); ?>

                <select disabled='disabled' data-incluirBoton="1" placeholder="seleccionar" data-tipo="paso1Atencion" id="paso1Atencion" name="paso1Atencion" data-textoBoton="<?= label("agregarNuevo"); ?>" data-placeholder="<?= label("paso1_elegirAtencion"); ?>" class="chosen-select browser-default" style="width:350px;" tabindex="2">

                </select>

            <?= label("paso1_labelFormaPago"); ?>

                <select data-incluirBoton="1" placeholder="seleccionar" data-tipo="paso1FormaPago" id="paso1FormaPago" name="paso1FormaPago" data-textoBoton="<?= label("agregarNuevo"); ?>" data-placeholder="<?= label("paso1_elegirFormaPago"); ?>" class="chosen-select browser-default" style="width:350px;" tabindex="2">
                    <option value="0" disabled selected style="display:none;"><?= label("paso1_elegirFormaPago"); ?></option>
                    <option value="nuevo"><?= label("agregarNuevo"); ?></option>
                    <?php
                        foreach ($resultado['formasPago'] as $forma) {
                            $valor = "value='".$forma['idFormaPago']."'";
                            echo '<option '.$valor.'>'.$forma['nombre'].'</option>");';
                        }
                    ?>
                </select>

            <?= label("paso1_labelTipoMoneda"); ?>

                <select data-incluirBoton="1" placeholder="seleccionar" data-tipo="paso1Moneda" id="paso1Moneda" name="paso1Moneda"
                        data-textoBoton="<?= label("agregarNuevo"); ?>" data-placeholder="<?= label("paso1_elegirMoneda"); ?>"
                        class="chosen-select browser-default" style="width:350px;" tabindex="2">
                    <option value="0" disabled selected style="display:none;"><?= label("paso1_elegirMoneda"); ?></option>
                    <option value="nuevo"><?= label("agregarNuevo"); ?></option>
                    <?php
                        foreach ($resultado['monedas'] as $moneda) {
                            $valor = "value='".$moneda['idMoneda']."'";
                            echo '<option '.$valor.'>'.$moneda['nombre'].'</option>");';
                        }
                    ?>
                </select>

            <input id="paso1_validez" name="paso1_validez" class="datepicker-fechaCotizacion" type="text">
            <?= label("paso1_labelTiempoVlidez"); ?>

            <input id="paso1_tipoCambio" name="paso1_tipoCambio" type="text">
            <?= label("paso1_labelTipoCambio"); ?>

</form>

<?= label('nombreSistema'); ?>

        <form id="form_tipoMoneda_cotizar" action="<?=base_url()?>cotizacion/insertarMoneda" method="post">

                    <input id="tipoMoneda_nombre" name="tipoMoneda_nombre" type="text">
                    <?= label('formTipoMoneda_nombre'); ?>

                    <input id="tipoMoneda_signo" name="tipoMoneda_signo" type="text">
                    <?= label('formTipoMoneda_signo'); ?>

                    <input id="tipoMoneda_tipoCambio" name="tipoMoneda_tipoCambio" type="number">
                    <?= label('formTipoMoneda_tipoCambio'); ?>

                    <?= label('guardarCerrar'); ?>

                    <?= label('guardarAgregarOtro'); ?>

        </form>

<?= label('nombreSistema'); ?>

<?= label('gasto_agregarFormaPago'); ?>

        <form id="form_formaPago_cotizar" action="<?=base_url()?>cotizacion/insertarFormaPago" method="post">

                    <input id="formaPago_nombre" name="formaPago_nombre" type="text">
                    <?= label('formaPago_Nombre') ?>

                    <input id="formaPago_descripcion" name="formaPago_descripcion" type="text">
                    <?= label('formaPago_descripcion') ?>

                    <?= label('guardarCerrar'); ?>

                    <?= label('guardarAgregarOtro'); ?>

        </form>

<?= label('nombreSistema'); ?>

<?= label('cotizacion_agregarCliente'); ?>

        <?php $this->load->helper('form'); ?>
        <?php echo form_open_multipart(base_url().'clientes/insertar',
            array('id' => 'form_cliente_cotizar', 'method' => 'POST', 'class' => 'col s12')); ?>

                    <select id="cliente_tipo" name="cliente_tipo" onchange="datosCliente(this)">
                        <option value="0" selected><?= label('formCliente_fisica'); ?></option>
                        <option value="1"><?= label('formCliente_juridica'); ?></option>
                    </select>
                    <?= label('formCliente_tipoPersona'); ?>

                    <?= label('formCliente_nacionalidad'); ?>

                    <select data-placeholder="<?= label('formCliente_seleccioneUno'); ?>" data-incluirBoton="0" id="cliente_nacionalidad" name="cliente_nacionalidad" class="browser-default chosen-select">
                    </select>

                        <input id="cliente_id" name="cliente_id" type="text">
                        <?= label('formCliente_identificacion'); ?>

                            <input id="cliente_nombre" name="cliente_nombre" type="text">
                            <?= label('formCliente_nombre'); ?>

                            <input id="cliente_apellido1" name="cliente_apellido1" type="text">
                            <?= label('formCliente_apellido1'); ?>

                            <input id="cliente_apellido2" name="cliente_apellido2" type="text">
                            <?= label('formCliente_apellido2'); ?>

                            <input id="cliente_correo" name="cliente_correo" type="email">
                            <?= label('formCliente_correo'); ?>

                            <input value='1' type="checkbox" class="filled-in" id="checkbox_correoCliente" name="checkbox_correoCliente" />

                                <?= label('formCliente_correoCheck') ?>

                        <input id="clientejuridico_id" name="clientejuridico_id" type="text">
                        <?= label('formCliente_identificacionJuridica'); ?>

                        <input id="clientejuridico_nombre" name="clientejuridico_nombre" type="text">
                        <?= label('formCliente_nombreJuridico'); ?>

                            <input id="clientejuridico_correo" name="clientejuridico_correo" type="email">
                            <?= label('formCliente_correo'); ?>

                            <input type="checkbox" class="filled-in"
                                   id="checkbox_correoClientejuridico" name="checkbox_correoClientejuridico" />

                                <?= label('formCliente_correoCheck') ?>

                    <?= label('paso1_clientesOtrosDatos'); ?>

                            <input id="cliente_telefonoMovil" name="cliente_telefonoMovil" type="text">
                            <?= label('formCliente_telefonoMovil'); ?>

                            <input id="cliente_telefono" name="cliente_telefono" type="text">
                            <?= label('formCliente_telefonoFijo'); ?>

                            <input id="cliente_fechaNacimiento" name="cliente_fechaNacimiento" type="text" class="datepicker-fecha">
                            <?= label('formCliente_fechaNacimiento'); ?>

                            <input id="clientejuridico_nombreFantasia" name="clientejuridico_nombreFantasia" type="text">
                            <?= label('formCliente_nombreFantasia'); ?>

                            <input id="clientejuridico_telefono" name="clientejuridico_telefono" type="text">
                            <?= label('formCliente_telefono'); ?>

                            <input id="clientejuridico_fax" name="clientejuridico_fax" type="text">
                            <?= label('formCliente_fax'); ?>

                            <?= label('formCliente_fotografia'); ?>

                                <input name="cliente_fotografia" class="file-path" type="text" readonly/>

                                <div class="btn" data-toggle="tooltip" title="<?= label('tooltip_examinar') ?>">

                                    <input style="padding-right: 800px;" id="userfile" type="file" name="userfile"
                                           accept="image/jpeg,image/png"/>

                                <img id="imagen_seleccionada" src="<?= base_url(); ?>files/default-user-image.png">

                            <?= label('formCliente_direccionPais'); ?>

                            <select data-placeholder="<?= label('formCliente_seleccioneUno'); ?>" data-incluirBoton="0" id="cliente_direccionPais" name="cliente_direccionPais" class="browser-default chosen-select">
                            </select>

                            <input id="cliente_direccionProvincia" name="cliente_direccionProvincia" type="text">
                            <?= label('formCliente_direccionProvincia'); ?>

                            <input id="cliente_direccionCanton" name="cliente_direccionCanton" type="text">
                            <?= label('formCliente_direccionCanton'); ?>

                            <input id="cliente_direccionDomicilio" name="cliente_direccionDomicilio" type="text">
                            <?= label('formCliente_direccionDomicilio'); ?>

                    <?= label('paso1_formContactos'); ?>

                            <?= label('formCliente_contactoAgregar') ?>

                    <?= label('paso1_formAdicional'); ?>

                        <?= label('formCliente_cotizador'); ?>

                            <input value='1' type="checkbox" class="filled-in" id="checkbox_todosVendedores" name="checkbox_todosVendedores" />

                                <?= label('formCliente_todos') ?>

                                <input id="cliente_vendedores" name="cliente_vendedores" placeholder="<?= label('formCliente_anadirVendedor'); ?>" type="text"/>

                        <?= label('formCliente_gustos_preferencias'); ?>

                                <input id="cliente_gustos" name="cliente_gustos" placeholder="<?= label('formCliente_anadirGusto'); ?>" type="text"
                                       value=""/>

                        <?= label('formCliente_mediosContacto'); ?>

                                <input id="cliente_medios" name="cliente_medios" placeholder="<?= label('formCliente_anadirMedio'); ?>" type="text"
                                       value=""/>

                    <?= label('paso1_formFacturacion'); ?>

                        <?= label('formCliente_formaPagoFavorita'); ?>

                        <select data-placeholder="<?= label('formCliente_seleccioneUno'); ?>" data-incluirBoton="0" id="cliente_formaPago" name="cliente_formaPago" class="browser-default chosen-select">
                        </select>

                        <input id="cliente_descuento" name="cliente_descuento" type="text">
                        <?= label('formCliente_descuento'); ?>
                        %

                        <?= label('formCliente_monedaCotizar'); ?>

                        <select data-placeholder="<?= label('formCliente_seleccioneUno'); ?>" data-incluirBoton="0" id="cliente_monedaCotizar" name="cliente_monedaCotizar" class="browser-default chosen-select">
                        </select>

                    <?= label('guardarCerrar'); ?>

                    <?= label('guardarAgregarOtro'); ?>

                <input id="cantidadContactos" name="cantidadContactos" type="text" value="0">

        </form>

<?= label('nombreSistema'); ?>

        <form id="form_contacto_cotizar" action="<?=base_url()?>cotizacion/insertarContacto" method="post">

                    <input id="cliente_contactoNombre" name="cliente_contactoNombre" type="text">
                    <?= label('formContacto_nombre'); ?>

                    <input id="cliente_contactoApellido1" name="cliente_contactoApellido1" type="text">
                    <?= label('formContacto_apellido1'); ?>

                    <input id="cliente_contactoApellido2" name="cliente_contactoApellido2" type="text">
                    <?= label('formContacto_apellido2'); ?>

                        <input id="cliente_contactoCorreo" name="cliente_contactoCorreo" type="email" style="margin-bottom: 0;">
                        <?= label('formCliente_correo'); ?>

                        <input type="checkbox" class="filled-in" id="checkbox_contactoCorreoCliente" name="checkbox_contactoCorreoCliente"/>
                        <?= label('formCliente_correoCheck') ?>

                    <input id="cliente_contactoPuesto" name="cliente_contactoPuesto" type="text">
                    <?= label('formContacto_puesto'); ?>

                    <input id="cliente_contactoTelefono" name="cliente_contactoTelefono" type="text">
                    <?= label('formContacto_telefono'); ?>

                    <input id="cliente_contactoIdCliente" name="cliente_contactoIdCliente" type="text" style="display: none;">

                    <?= label('guardarCerrar'); ?>

                    <?= label('guardarAgregarOtro'); ?>

        </form>


text:
using namespace llvm;

namespace {
  // This is a ModulePass because that makes it easier to find all
  // uses of intrinsics efficiently.
  class CanonicalizeMemIntrinsics : public ModulePass {
  public:
    static char ID; // Pass identification, replacement for typeid
    CanonicalizeMemIntrinsics() : ModulePass(ID) {
      initializeCanonicalizeMemIntrinsicsPass(*PassRegistry::getPassRegistry());
    }

    virtual bool runOnModule(Module &M);
  };
}

char CanonicalizeMemIntrinsics::ID = 0;
INITIALIZE_PASS(CanonicalizeMemIntrinsics, "canonicalize-mem-intrinsics",
                "Make memcpy() et al's \"len\" argument consistent",
                false, false)

static bool expandIntrinsic(Module *M, Intrinsic::ID ID) {
  SmallVector<Type *, 3> Types;
  Types.push_back(Type::getInt8PtrTy(M->getContext()));
  if (ID != Intrinsic::memset)
    Types.push_back(Type::getInt8PtrTy(M->getContext()));
  unsigned LengthTypePos = Types.size();
  Types.push_back(Type::getInt64Ty(M->getContext()));

  std::string OldName = Intrinsic::getName(ID, Types);
  Function *OldIntrinsic = M->getFunction(OldName);
  if (!OldIntrinsic)
    return false;

  Types[LengthTypePos] = Type::getInt32Ty(M->getContext());
  Function *NewIntrinsic = Intrinsic::getDeclaration(M, ID, Types);

  SmallVector<CallInst *, 64> Calls;
  for (User *U : OldIntrinsic->users()) {
    if (CallInst *Call = dyn_cast<CallInst>(U))
      Calls.push_back(Call);
    else
      report_fatal_error("CanonicalizeMemIntrinsics: Taking the address of an "
                         "intrinsic is not allowed: " +
                         OldName);
  }

  for (CallInst *Call : Calls) {
    // This temporarily leaves Call non-well-typed.
    Call->setCalledFunction(NewIntrinsic);
    // Truncate the "len" argument.  No overflow check.
    IRBuilder<> Builder(Call);
    Value *Length = Builder.CreateTrunc(Call->getArgOperand(2),
                                        Type::getInt32Ty(M->getContext()),
                                        "mem_len_truncate");
    Call->setArgOperand(2, Length);
  }

  OldIntrinsic->eraseFromParent();
  return true;
}

bool CanonicalizeMemIntrinsics::runOnModule(Module &M) {
  bool Changed = false;
  Changed |= expandIntrinsic(&M, Intrinsic::memset);
  Changed |= expandIntrinsic(&M, Intrinsic::memcpy);
  Changed |= expandIntrinsic(&M, Intrinsic::memmove);
  return Changed;
}

ModulePass *llvm::createCanonicalizeMemIntrinsicsPass() {
  return new CanonicalizeMemIntrinsics();
}


text:
// Copyright (C) 2015 Sebastian Bøe, Joakim Andersson
// License: BSD 2-Clause (see LICENSE for details)

package TurboRav

import Chisel._
import Constants._

class Cache() extends Module {

  val io = new Bundle {
    val write_address = UInt(INPUT, Config.xlen)
    val read_address  = UInt(INPUT, Config.xlen)
    val write_data    = UInt(INPUT, Config.xlen)
    val read_data     = UInt(OUTPUT, Config.xlen)
    val read          = Bool(INPUT)
    val write         = Bool(INPUT)
    val hit           = Bool(OUTPUT)
  }

  val read_address = Reg(init = UInt(0), next = io.read_address)

  // Extract configuration for convenience
  val cache_line_width = Config.cache.cache_line_width
  val num_entries     = Config.cache.num_entries
  val associativity  = Config.cache.associativity

  require(isPow2(num_entries))
  require(num_entries % associativity == 0)
  require(cache_line_width % INSTRUCTION_WIDTH == 0)

  val entries_per_bank  = num_entries / associativity
  val instrPerCacheLine = cache_line_width / INSTRUCTION_WIDTH

  val byte_offset_size  = log2Down(Config.xlen / BITS_IN_BYTE)
  val block_offset_size = log2Down(cache_line_width / INSTRUCTION_WIDTH)
  val index_size        = log2Down(entries_per_bank)
  val non_tag_size      = index_size + block_offset_size + byte_offset_size
  val tag_size          = INSTRUCTION_WIDTH - non_tag_size

  val read_tag   = read_address(INSTRUCTION_WIDTH-1, non_tag_size)
  val read_index = read_address(non_tag_size-1,
                                block_offset_size + byte_offset_size)

  val tag_array  = Mem( Bits(width = tag_size*associativity), entries_per_bank,
                        seqRead = true)
  val validArray = Reg(init = Bits(0, associativity * entries_per_bank))

  val read_lines = Vec.fill(associativity) { Bits() }
  val tag_hits   = Vec.fill(associativity) { Bool() }

  /* Linear Feedback register used for random replacement policy */
  val shift = LFSR16(io.write)

  for( i <- 0 until associativity) {
    val bank = Mem(Bits(width = cache_line_width),
                  entries_per_bank,
                  seqRead = true)
    val tag = tag_array(read_index)((i + 1)*tag_size - 1, i*tag_size)
    // TODO: check valid bit
    tag_hits(i) := tag === read_tag

    when(io.read){
      read_lines(i) := bank(read_index)
    } .otherwise {
      read_lines(i) := UInt(0)
    }

  }

  val read_line = Mux1H(tag_hits, read_lines)
  //TODO: select out word from cache line
  io.read_data := read_line(Config.xlen-1,0)
  io.hit := tag_hits.exists((x: Bool) => x === Bool(true))
}


text:
local RD = {}
local status = (LIFESUPPORT == 1)

--The Class
--[[
	The Constructor for this Custom Addon Class
]]
function RD.__Construct()
    return true
end

--[[
	Is this Addon visible in the menu?
]]
function RD.IsVisible()
    return status
end

--[[
	The Destructor for this Custom Addon Class
]]
function RD.__Destruct()
    return false, "Can't disable"
end

--[[
	Get the required Addons for this Addon Class
]]
function RD.GetRequiredAddons()
    return {}
end

--[[
	Get the Boolean Status from this Addon Class
]]
function RD.GetStatus()
    return status
end

--[[
	Get the Version of this Custom Addon Class
]]
function RD.GetVersion()
    return 0, "Release"
end

--[[
	Get any custom options this Custom Addon Class might have
]]
function RD.GetExtraOptions()
    return {}
end

--[[
	Gets a menu from this Custom Addon Class
]]
function RD.GetMenu(menutype, menuname) --Name is nil for main menu, String for others
    local data = {}
    return data
end

--[[
	Get the Custom String Status from this Addon Class
]]
function RD.GetCustomStatus()
    if status then
        return "Installed"
    end
    return "Not installed"
end

--[[
	Can the Status of the addon be changed?
]]
function RD.CanChangeStatus()
    return false;
end

--[[
	Returns a table containing the Description of this addon
]]
function RD.GetDescription()
    return {
        "Life Support 1",
        "",
        "Original Liufe Support made by Shanjaq"
    }
end

CAF.RegisterAddon("Life Support 1", RD, "1")


text:
package com.main.dao;

import com.google.appengine.api.datastore.Entity;

public class HomepageInfo {
	String id;
	String companyID;
	String coRegNum;
	String branch;
	String address;
	String dutyHours;
	String representative;

	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getCompanyID() {
		return companyID;
	}
	public void setCompanyID(String companyID) {
		this.companyID = companyID;
	}
	public String getCoRegNum() {
		return coRegNum;
	}
	public void setCoRegNum(String coRegNum) {
		this.coRegNum = coRegNum;
	}
	public String getBranch() {
		return branch;
	}
	public void setBranch(String branch) {
		this.branch = branch;
	}
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	public String getDutyHours() {
		return dutyHours;
	}
	public void setDutyHours(String dutyHours) {
		this.dutyHours = dutyHours;
	}
	public String getRepresentative() {
		return representative;
	}
	public void setRepresentative(String representative) {
		this.representative = representative;
	}
	@Override
	public String toString() {
		return "HomepageInfo [id=" + id + ", companyID=" + companyID + ", coRegNum=" + coRegNum + ", branch=" + branch
				+ ", address=" + address + ", dutyHours=" + dutyHours + ", representative=" + representative + "]";
	}
	public HomepageInfo(String id, String companyID, String coRegNum, String branch, String address, String dutyHours,
			String representative) {
		super();
		this.id = id;
		this.companyID = companyID;
		this.coRegNum = coRegNum;
		this.branch = branch;
		this.address = address;
		this.dutyHours = dutyHours;
		this.representative = representative;
	}

	public HomepageInfo(Entity en) {

		super();
		this.id = (String) en.getProperty("address");
		this.companyID = (String) en.getProperty("companyID") ;
		this.coRegNum = (String) en.getProperty("coRegNum")  ;
		this.branch = (String) en.getProperty("branch") ;
		this.address = (String) en.getProperty("address") ;
		this.dutyHours = (String) en.getProperty("dutyHours") ;
		this.representative = (String) en.getProperty("representative") ;
	}

	public HomepageInfo() {
		super();
	}

}


text:
/*jslint node: true */
'use strict';

/* system libs */
var FB = require('fb');
var moment = require('moment');

/* app libs */
var auth = require('../config/auth');

/* working variables */
var RequestsQueue = [];

/* queue process */
module.exports = {

    /* authorise application */
    auth: function (callback) {
        FB.api('oauth/access_token', {
            client_id: auth.facebook.clientID,
            client_secret: auth.facebook.clientSecret,
            grant_type: 'client_credentials'
        }, function (res) {
            if (!res || res.error) {
                console.log('Authorisation failed!');
                console.log(!res ? 'Unknown Facebook error!' : res.error);
            } else {
                console.log('Authorisation successful!');
                console.log('Access token: ' + res.access_token);
                FB.setAccessToken(res.access_token);
                callback();
            }
        });
    },

    /* add a new request to the queue */
    add: function (page, request, args, callback, fields, errorCallback) {
        var newRequest = {
            page: page,
            request: request,
            args: args,
            callback: callback,
            errorCallback: errorCallback,
            fields: fields
        };
        RequestsQueue.push(newRequest);
        console.log('  Added /' + request + ' to the queue.');
    },

    /* execute all requests which are pending */
    execute: function () {
        var i,
            j,
            cur,
            url,
            poll = [],
            obj;

        /* pop all the queue */
        while (RequestsQueue.length > 0 && poll.length < 50) {
            cur = RequestsQueue.pop();

            /* format the query string */
            url = cur.request + '?locale=pt_BR';

            if (cur.args) {
                url += '&' + cur.args;
            }

            for(j = 0; j < cur.fields.length; j += 1) {
                url += (j === 0) ? '&fields=' : ',';
                url += cur.fields[j];
            }

            /* add each job to the batch poll */
            poll.push({
                method: 'get',
                relative_url: url,
                page: cur.page,
                callback: cur.callback,
                errorCallback: cur.errorCallback
            });

            console.log('>> ' + moment().format('DD/MM/YYYY HH:mm:ss') + ' - GET ' + url);
        }

        /* post the batch request */
        if (poll.length > 0) {
            FB.api('', 'post', { batch: poll }, function(res) {
                if (!res || res.error) {
                    console.log('-------- FATAL: BATCH FACEBOOK ERROR ----------');
                    console.log(poll);
                    console.log('-----');
                    console.log(res);
                    console.log('-----------------------------------------------');
                    //throw res.error;
                }

                /* parse each response and exec the corresponding callback */
                for (j = 0; j < res.length; j += 1) {
                    obj = JSON.parse(res[j].body);
                    if (!obj || obj.error) {
                        console.log('----------');
                        console.log('Error at request ' + poll[j].relative_url + ':');
                        console.log(obj.error);

                        if (poll[j].errorCallback) {
                            console.log('Calling error callback...');
                            poll[j].errorCallback(poll[j].page, poll[j].relative_url, obj.error);
                        } else {
                            console.log('No error callback supplied!');
                        }

                        console.log('----------');
                    } else {
                        poll[j].callback(poll[j].page, obj);
                    }
                }
            });
        }
    }

};