text:
var gulp = require('gulp');
var config = require('./config');
var ssh2Client = require('ssh2').Client;
var conn;

// JS hint task
// this is just a nice library for making sure your JavaScript syntax is all good
gulp.task('jshint', function () {
    var jshint = require('gulp-jshint');
    gulp.src('./*.js')
    .pipe(jshint())
    .pipe(jshint.reporter('default'));
});

// deploy to the device
// NOTE: this will only deploy files at the root project level; it is not recursive
gulp.task('deploy', function () {
    var scp = require('gulp-scp2');
    return gulp.src(['*.{js,json}', '!gulpfile.js'])
        .pipe(scp({
            host: config.host,
            username: config.user,
            password: config.password,
            dest: config.projectName
        }))
        .on('error', function (err) {
            console.log('ERR: ' + err);
        });
});

//run npm install on the remote machine to assure all packages
gulp.task('restore-packages', function () {
    var run = require('gulp-run');
    run('ssh ' + config.user + '@' + config.host + ' cd ~/' + config.projectName + '; npm install --production')
        .exec().pipe(gulp.dest('output'));
});

//kill processes
gulp.task('killProcesses', function () {
    conn = new ssh2Client();
    conn.on('ready', function () {
        conn.exec('kill -9 `ps | grep "edref/app.js" | grep -v grep | awk \' { print $1 }\'`', execCallback);
    }).connect({ host: config.host, port: config.sshPort, username: config.user, password: config.password });
});

//set startup
gulp.task('set-startup', function () {
    var serviceText =
        "[Unit]\n" +
        "    Description = Node startup app service for starting a node process\n" +
        "    After = mdns.service\n" +
        "[Service]\n" +
        "    ExecStart = /usr/bin/node /home/" + config.user + "/" + config.projectName + "/" + config.startFile + "\n" +
        "    Restart = on-failure\n" +
        "    RestartSec = 2s\n" +
        "[Install]\n" +
        "    WantedBy=default.target\n";

    conn = new ssh2Client();
    conn.on('ready', function () {
        conn.exec('systemctl stop nodeup.service; echo "' + serviceText + '" > /etc/systemd/system/nodeup.service; systemctl daemon-reload; systemctl enable nodeup.service; systemctl start nodeup.service', execCallback);
    }).connect({ host: config.host, port: config.sshPort, username: config.user, password:config.password });
});

//DON'T USE YET
////execute
//gulp.task('execute', ['killProcesses'], function () {
//    conn = new ssh2Client();
//    conn.on('ready', function () {
//        conn.exec("node /home/" + config.user + "/" + config.projectName + "/" + config.startFile, execCallback);
//    }).connect({ host: config.host, port: config.sshPort, username: config.user, password: config.password });
//});

function execCallback (err, stream) {
    if (err) throw err;
    stream
        .on('close', function (code, signal) { console.log('Stream closed with code ' + code + ' and signal ' + signal); conn.end() })
        .on('data', function (data) { console.log(data); })
        .stderr.on('data', function (err) { console.log('Error: ' + err); });
}


text:
import Component from '@ember/component';
import { computed } from '@ember/object';

export default Component.extend({
  "data-test-school-curriculum-inventory-institution-details": true,
  classNames: ['school-curriculum-inventory-institution-details'],

  hasInstitution: computed('school.curriculumInventoryInstitution', function() {
    return !!this.school.belongsTo('curriculumInventoryInstitution').id();
  }),

  actions: {
    manage() {
      this.manage(true);
    }
  }
});

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Catrineta\db\mysql;

use \Catrineta\register\CatExceptions;
use \Catrineta\tools\StringTools;
use \Catrineta\db\Sql;

/**
 * Description of MysqlStatement
 *
 * @author Luís Pinto / luis.nestesitio@gmail.com
 * Created @Oct 6, 2017
 */
class MysqlStatement
{

    /**
     *
     * @var array
     */
    protected $selects = [];
    /**
     *
     * @var string The primary table
     */
    protected $main_table = null;
    /**
     *
     * @var string The alias for the primary table
     */
    protected $table_alias = null;
    /**
     *
     * @var string This change with joins
     */
    public $alias = null;

    /**
     *
     * @param string $table Valid table in database
     * @param string $alias An alias for the table
     */
    function __construct($table, $alias = null)
    {
        $this->main_table = $table;

        $this->alias = (null == $alias) ? $this->main_table : $alias;
        $this->putJoinOnStack($table, $this->alias);
    }

    /**
     *
     * @var array
     */
    protected $params = [];

    /**
     *
     * @return array The parameters to bind values in PDO
     */
    public function getParams()
    {
        return $this->params;
    }

    protected $wheres = [];

    /**
     *
     * @param string $column
     * @param string $operator
     * @param mixed $value
     * @param string $wildcard '%'
     * @return $this
     */
    protected function buildCondition($column, $operator, $value, $wildcard = null)
    {
        $col = str_replace('.', '_', $column);
        $param = ($wildcard == '%') ? '%' . $value . '%' : $value;
        $this->params[$col] = $param;
        return $column . $operator . ':' . $col;

    }

    /**
     * @param $column
     * @param array $values
     * @param string $clause
     * @return $this
     */
    public function buildArrayCondition($column, $values = [], $clause = Sql::IN)
    {
        $col = str_replace('.', '_', $column);
        $i = 0;
        $params = [];
        foreach($values as $value){
            $this->params[$col . $i] = $value;
            $params[] = $col . $i++;
        }
        if($clause == Sql::BETWEEN){
            return $column . $clause . "'" . implode("' AND '", $params) . "'";
        }else{
            return $column . $clause . "('" . implode("', '", $params) . "')";
        }
    }

    public function setCondition($column, $values, $operator = Sql::EQUAL, $wildcard= null)
    {
        $column = $this->getColumnAliased($column);
        if($operator == Sql::BETWEEN){
            if($values['max'] == null && $values['min'] == null){
                throw new CatExceptions('Null range of values min and max for column ' . $column, CatExceptions::CODE_SQL);
            }elseif($values['max'] == null){
                $this->wheres[] = $this->buildCondition($column, Sql::GREATER_EQUAL, $values['min']);
            }elseif($values['min'] == null){
                $this->wheres[] = $this->buildCondition($column, Sql::LESS_EQUAL, $values['max']);
            }else{
                $this->wheres[] = $this->buildArrayCondition($column, $values, Sql::BETWEEN);
            }
        }elseif(is_array($values)){
            if($operator == Sql::EQUAL){
                $operator = Sql::IN;
            }
            $this->wheres[] = $this->buildArrayCondition($column, $values, $operator);
        }else{
            $this->wheres[] = $this->buildCondition($column, $operator, $values, $wildcard);
        }

        return $this;
    }

    /**
     * @param $column
     * @param $null
     * @return $this
     */
    public function whereIsNullOrNot($column, $null = null)
    {
        $column = $this->getColumnAliased($column);
        $condition = $column;
        $condition .= ($null == null)? Sql::ISNULL : $null;
        $this->wheres[] = $condition;
        return $this;
    }

     /**
     * @param string $column
     * @param string $operator
     * @param string $expression Raw mysql expression
     * @return $this
     */
    public function setExpressionCondition($column, $operator, $expression = '')
    {
        $column = $this->getColumnAliased($column);
        $this->wheres[] = $column . $operator . $expression ;
        return $this;
    }

    /**
     * @param $expression Raw mysql expression
     * @return $this
     */
    public function where($expression)
    {
        $this->wheres[] = $expression ;
        return $this;
    }

    /**
     * @param $array
     * @return $this
     */
    public function whereOr($array)
    {
        $parts = [];
        foreach($array as $column=>$value){
            $column = $this->getColumnAliased($column);
            if(is_array($value)){
                $parts[] = $this->buildArrayCondition($column, $value, Sql::IN);
            }else{
                $parts[] = $this->buildCondition($column, Sql::EQUAL, $value);
            }
        }
        $this->wheres[] = "(" . implode(" OR ", $parts) . ")";
        return $this;
    }

    /**
     * @return mixed
     */
    public function getLastWhere()
    {
        return end($this->wheres);
    }

    /**
     * Pop the element off the end of array
     * @return mixed The last value of array
     */
    protected function getAndPopLastWhere()
    {
        return array_pop($this->wheres);
    }

    /**
     * @param $expression
     * @param string $operator
     */
    public function joinWhere($expression, $operator = Sql::LOGICAL_OR)
    {
        $condition = $this->getAndPopLastWhere();
        $this->wheres[] = '(' . $condition . " $operator " . $expression . ')';

    }

    /**
     *
     * @param string $column
     * @param string $table
     * @return string The column name with table name prefixed
     */
    protected function getColumnAliased($column, $table = null)
    {
        if($table == null){
            $table = strstr($column, '.', true);
        }
        if($table != false){
            $field = StringTools::getStringAfterLastChar($column, '.');
            if($table == $this->main_table){
                return $this->getFirstAlias() . '.' . $field;
            }else{
                foreach($this->joins as $alias => $join){
                    if(strpos($join, 'JOIN ' . $table) ||
                            $alias == $table){
                        return $alias . '.' . $field;
                    }
                }
            }
        }
    }

    /**
     *
     * @param type $table
     * @param type $i
     * @return type
     */
    public function convertToAlias($table, $i = 0)
    {
        if($i == 0){
            $alias = strtoupper(substr($table, 0, 1));
        }
        if(in_array($alias, array_keys($this->joins))){
            $i++;
            return $this->getAlias($alias . $i, $i);
        }
        return $alias;
    }

    /**
     *
     * @var array
     */
    protected $stack_of_joins = [];

    /**
     *
     * @param string $table
     * @param string $alias
     */
    protected function putJoinOnStack($table, $alias)
    {
        $this->stack_of_joins[$table] = $alias;
    }

    /**
     * Return the actual alias
     * @return string
     */
    public function getAlias()
    {
        return end($this->stack_of_joins);
    }

    /**
     *
     * @return string
     */
    public function getActualTable()
    {
        $arr = array_keys($this->stack_of_joins);
        return end($arr);
    }

    /**
     *
     * @return string
     */
    protected function getPreviousAlias()
    {
        end($this->stack_of_joins);
        prev($this->stack_of_joins);
        return current($this->stack_of_joins);
    }

    /**
     *
     * @return string
     */
    protected function getFirstAlias()
    {
        reset($this->stack_of_joins);
        return current($this->stack_of_joins);
    }

}


text:
"""
Tests for the PCG_XSL_RR_V0 generator.
"""
import pkgutil
import unittest

from pcgrandom.pcg_xsl_rr_v0 import PCG_XSL_RR_V0
from pcgrandom.test.test_pcg_common import TestPCGCommon

class Test_PCG_XSL_RR_V0(TestPCGCommon, unittest.TestCase):
    gen_class = PCG_XSL_RR_V0

    def setUp(self):
        self.gen = self.gen_class(seed=15206, sequence=1729)

    def test_agrees_with_reference_implementation_explicit_sequence(self):
        # Comparison with the C++ PCG reference implementation, version 0.98.
        gen = self.gen_class(seed=42, sequence=54)

        expected_raw = pkgutil.get_data(
            'pcgrandom.test', 'data/setseq_xsl_rr_128_64.txt')
        expected_words = expected_raw.decode('utf-8').splitlines(False)
        actual_words = [format(gen._next_output(), '#018x') for _ in range(32)]
        self.assertEqual(actual_words, expected_words)

    def test_agrees_with_reference_implementation_unspecified_sequence(self):
        # Comparison with the C++ PCG reference implementation, version 0.98.
        gen = self.gen_class(seed=123)

        expected_raw = pkgutil.get_data(
            'pcgrandom.test', 'data/oneseq_xsl_rr_128_64.txt')
        expected_words = expected_raw.decode('utf-8').splitlines(False)
        actual_words = [format(gen._next_output(), '#018x') for _ in range(32)]
        self.assertEqual(actual_words, expected_words)


text:
<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tableLayout1"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:layout_margin="0dp"
    android:layout_marginBottom="160dp"
    android:layout_marginLeft="25dp"
    android:padding="0dp" >

    <TableRow
        android:id="@+id/tableRow1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:paddingBottom="5dp"
        android:paddingTop="0dp"
        android:weightSum="37" >

        <TextView
            android:id="@+id/stationName"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="11"
            android:paddingLeft="3dp"
            android:textColor="#000" />

        <TextView
            android:id="@+id/airTemp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_weight="4"
            android:textColor="#000" />

        <TextView
            android:id="@+id/dewPoint"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_weight="0"
            android:textColor="#000"
            android:visibility="gone" />

        <TextView
            android:id="@+id/relHumidity"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_weight="3"
            android:textColor="#000" />

        <TextView
            android:id="@+id/windSpeed"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_weight="7"
            android:textColor="#000" />

        <TextView
            android:id="@+id/soilTemp"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_weight="4"
            android:textColor="#000" />

        <TextView
            android:id="@+id/totalPrec"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_weight="4"
            android:textColor="#000" />

        <TextView
            android:id="@+id/solarRad"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginLeft="3dp"
            android:layout_weight="4"
            android:textColor="#000" />
    </TableRow>

</TableLayout>


text: {{getValue(row,header)}}


text:
{% extends "horizon/common/_modal_form.html" %}
{% load i18n %}

{% block modal-body-right %}

{% trans "Description:" %}

{% trans "You may update rule details here." %}

{% endblock %}


text:
import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';

import { IonicStorageModule } from '@ionic/storage';
import { FeedProvider } from './../providers/feed/feed';
import { InAppBrowser } from '@ionic-native/in-app-browser';

import { MyApp } from './app.component';
import { HomePage } from '../pages/home/home';
import { ListPage } from '../pages/list/list';
import { SettingsPage } from '../pages/settings/settings';
import { AvatarPage } from '../pages/avatar/avatar';
import { TassePage } from '../pages/tasse/tasse';
import { DovutePage } from '../pages/tasse/dovute/dovute';
import { PagatePage } from '../pages/tasse/pagate/pagate';
import { LibrettoPage } from '../pages/libretto/libretto';
import { PianodistudiPage } from '../pages/pianodistudi/pianodistudi';
import { Anno1Page } from '../pages/pianodistudi/anno1/anno1';
import { Anno2Page } from '../pages/pianodistudi/anno2/anno2';
import { Anno3Page } from '../pages/pianodistudi/anno3/anno3';
import { NomemateriaPage } from '../pages/nomemateria/nomemateria';
import { AulePage } from '../pages/aulelibere/aule';
import { Blocco0Page } from '../pages/aulelibere/blocco0/blocco0';
import { Blocco1Page } from '../pages/aulelibere/blocco1/blocco1';
import { Blocco2Page } from '../pages/aulelibere/blocco2/blocco2';
import { DettaglioAppelliPage } from '../pages/dettaglioappelli/dettaglioappelli';
import { ListaAppelliPage } from '../pages/listaappelli/listaappelli';
import { QuestionarioPage } from '../pages/questionario/questionario';
import { ConfermaPrenotazionePage } from '../pages/confermaprenotazione/confermaprenotazione'
import { LoginPage } from '../pages/login/login';
import { OrarioPage } from '../pages/orario/orario';

import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Calendar } from '@ionic-native/calendar';
import { AuthServiceProvider } from '../providers/auth-service/auth-service';
import { JsonDataProvider } from '../providers/json-data/json-data';
import { HttpModule } from '@angular/http';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    ListPage,
    SettingsPage,
    AvatarPage,
    TassePage,
    DovutePage,
    PagatePage,
    LibrettoPage,
    PianodistudiPage,
    Anno1Page,
    Anno2Page,
    Anno3Page,
    NomemateriaPage,
    AulePage,
    Blocco0Page,
    Blocco1Page,
    Blocco2Page,
    DettaglioAppelliPage,
    ListaAppelliPage,
    QuestionarioPage,
    ConfermaPrenotazionePage,
    LoginPage,
    OrarioPage
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp,{tabsPlacement: 'bottom'}),
    HttpModule,
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    ListPage,
    SettingsPage,
    AvatarPage,
    TassePage,
    DovutePage,
    PagatePage,
    LibrettoPage,
    PianodistudiPage,
    Anno1Page,
    Anno2Page,
    Anno3Page,
    NomemateriaPage,
    AulePage,
    Blocco0Page,
    Blocco1Page,
    Blocco2Page,
    DettaglioAppelliPage,
    ListaAppelliPage,
    QuestionarioPage,
    ConfermaPrenotazionePage,
    LoginPage,
    OrarioPage
  ],
  providers: [
    StatusBar,
    SplashScreen,
    Calendar,
    {provide: ErrorHandler, useClass: IonicErrorHandler},
    AuthServiceProvider,
    JsonDataProvider,
    FeedProvider,
    InAppBrowser
  ]
})
export class AppModule {}


text:
<?xml version="1.0" encoding="utf-8"?>
<!--
  #  Licensed to the Apache Software Foundation (ASF) under one
  #  or more contributor license agreements.  See the NOTICE file
  #  distributed with this work for additional information
  #  regarding copyright ownership.  The ASF licenses this file
  #  to you under the Apache License, Version 2.0 (the
  #  "License"); you may not use this file except in compliance
  #  with the License.  You may obtain a copy of the License at
  #
  #  http://www.apache.org/licenses/LICENSE-2.0
  #
  #  Unless required by applicable law or agreed to in writing,
  #  software distributed under the License is distributed on an
  #  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  #  KIND, either express or implied.  See the License for the
  #  specific language governing permissions and limitations
  #  under the License.
  -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <parent>
        <groupId>org.apache.stratos</groupId>
        <artifactId>stratos-components-parent</artifactId>
        <version>4.1.0-SNAPSHOT</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>org.apache.stratos.cloud.controller</artifactId>
    <packaging>bundle</packaging>
    <name>Apache Stratos - Cloud Controller</name>
    <url>http://apache.org</url>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>

            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>1.4.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Export-Package>
                            !org.apache.stratos.cloud.controller.internal.*,
                            org.apache.stratos.cloud.controller.*,
                        </Export-Package>
                        <Private-Package>
                            org.apache.stratos.cloud.controller.internal.*,
                        </Private-Package>
                        <Import-Package>
                            !org.apache.commons.logging,
                            org.apache.commons.logging; version=0.0.0,
                            org.apache.commons.io.*,
                            org.wso2.carbon.utils.*,
                            <!--org.jclouds.compute*;version="${jclouds.version}";resolution:=optional,
                            org.jclouds*;version="${jclouds.version}",-->
                            *; resolution:=optional
                        </Import-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>
                        <Axis2Deployer>CloudControllerDeployer</Axis2Deployer>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.axis2</groupId>
                <artifactId>axis2-java2wsdl-maven-plugin</artifactId>
                <configuration>
                    <className>org.apache.stratos.cloud.controller.services.impl.CloudControllerServiceImpl</className>
                    <outputFileName>target/generated-resources/wsdl/CloudControllerService.wsdl</outputFileName>
                    <serviceName>CloudControllerService</serviceName>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>java2wsdl</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.core</artifactId>
            <version>${wso2carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.utils</artifactId>
            <version>${wso2carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.messaging</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.kubernetes.client</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>17.0</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.jsch</artifactId>
            <version>0.0.7</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.core</artifactId>
            <version>0.0.7</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.connector-factory</artifactId>
            <version>0.0.7</version>
        </dependency>
        <dependency>
            <groupId>org.reflections</groupId>
            <artifactId>reflections</artifactId>
            <version>0.9.9-RC1</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.api</groupId>
            <artifactId>cloudstack</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.securevault</artifactId>
            <version>${wso2carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.hectorclient.wso2</groupId>
            <artifactId>hector-core</artifactId>
            <version>1.1.0.wso2v1</version>
            <exclusions>
                <exclusion>
                    <groupId>com.google.guava.wso2</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.wso2.andes.wso2</groupId>
            <artifactId>andes-client</artifactId>
            <version>0.13.wso2v3</version>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs.wso2</groupId>
            <artifactId>geronimo-jms_1.1_spec</artifactId>
            <version>${orbit.version.geronimo-jms_1.1_spec}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.analytics.hive.stub</artifactId>
            <version>${wso2carbon.version}</version>
        </dependency>
        <!-- jclouds dependencies -->
        <dependency>
            <groupId>org.apache.jclouds</groupId>
            <artifactId>jclouds-core</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds</groupId>
            <artifactId>jclouds-compute</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.driver</groupId>
            <artifactId>jclouds-bouncycastle</artifactId>
            <version>${jclouds.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.bouncycastle</groupId>
                    <artifactId>bcprov-jdk16</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.driver</groupId>
            <artifactId>jclouds-sshj</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.driver</groupId>
            <artifactId>jclouds-log4j</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.driver</groupId>
            <artifactId>jclouds-enterprise</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.api</groupId>
            <artifactId>ec2</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>aws-ec2</artifactId>
            <version>${jclouds.stratos.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.api</groupId>
            <artifactId>openstack-nova</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>openstack-neutron</artifactId>
            <version>${jclouds.stratos.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds.api</groupId>
            <artifactId>openstack-keystone</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.jclouds</groupId>
            <artifactId>jclouds-scriptbuilder</artifactId>
            <version>${jclouds.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>vcloud</artifactId>
            <version>${jclouds.stratos.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>gce</artifactId>
            <version>${jclouds.stratos.version}</version>
        </dependency>
        <dependency>
            <groupId>com.jamesmurty.utils.wso2</groupId>
            <artifactId>java-xmlbuilder</artifactId>
            <version>0.4.wso2v1</version>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>${gson2.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guice.wso2</groupId>
            <artifactId>guice</artifactId>
            <version>${google.guice.wso2.version}</version>
        </dependency>
        <dependency>
            <groupId>com.google.guice.assistedinject.wso2</groupId>
            <artifactId>guice-assistedinject</artifactId>
            <version>${com.google.guice.assistedinject.wso2.version}</version>
        </dependency>
        <dependency>
            <groupId>com.sun.jersey</groupId>
            <artifactId>jersey-core</artifactId>
            <version>${sun.jersey.version}</version>
        </dependency>
        <dependency>
            <groupId>net.oauth.core</groupId>
            <artifactId>oauth</artifactId>
            <version>20100527</version>
        </dependency>
        <dependency>
            <groupId>commons-io.wso2</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.0.0.wso2v1</version>
        </dependency>
        <dependency>
            <groupId>rhino.wso2</groupId>
            <artifactId>js</artifactId>
            <version>1.7.0.R1-wso2v3</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.databridge.agent.thrift</artifactId>
            <version>${wso2carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.carbon</groupId>
            <artifactId>org.wso2.carbon.ntask.core</artifactId>
            <version>${wso2carbon.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.metadata.client</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.mock.iaas.client</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>
    <properties>
        <gson2.version>2.2</gson2.version>
        <com.google.guice.assistedinject.wso2.version>3.0.wso2v1</com.google.guice.assistedinject.wso2.version>
        <sun.jersey.version>1.12</sun.jersey.version>
    </properties>
</project>


text:
#pragma once

#include <QStyledItemDelegate>

namespace GreenChilli { namespace Views {

class RatingDelegate : public QStyledItemDelegate
{
    Q_OBJECT
public:
    explicit RatingDelegate( int columnIndex,
                             bool editable = true,
                             QObject *parent = 0 );

protected:
    void paint( QPainter *painter,
          const QStyleOptionViewItem &option,
          const QModelIndex &index ) const;

    QWidget *createEditor( QWidget *parent,
                      const QStyleOptionViewItem &option,
                      const QModelIndex &index ) const;

    void setEditorData( QWidget *editor,
                       const QModelIndex &index ) const;

    void setModelData( QWidget *editor,
                      QAbstractItemModel *model,
                      const QModelIndex &index ) const;

private:
    int m_columnIndex;

    bool m_isEditable;

};

} }


text:
package com.google.cloud.orgpolicy.v2;

import com.google.api.core.BetaApi;
import com.google.cloud.orgpolicy.v2.OrgPolicyGrpc.OrgPolicyImplBase;
import com.google.protobuf.AbstractMessage;
import com.google.protobuf.Empty;
import io.grpc.stub.StreamObserver;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
import javax.annotation.Generated;

@BetaApi
@Generated("by gapic-generator-java")
public class MockOrgPolicyImpl extends OrgPolicyImplBase {
  private List<AbstractMessage> requests;
  private Queue<Object> responses;

  public MockOrgPolicyImpl() {
    requests = new ArrayList<>();
    responses = new LinkedList<>();
  }

  public List<AbstractMessage> getRequests() {
    return requests;
  }

  public void addResponse(AbstractMessage response) {
    responses.add(response);
  }

  public void setResponses(List<AbstractMessage> responses) {
    this.responses = new LinkedList<Object>(responses);
  }

  public void addException(Exception exception) {
    responses.add(exception);
  }

  public void reset() {
    requests = new ArrayList<>();
    responses = new LinkedList<>();
  }

  @Override
  public void listConstraints(
      ListConstraintsRequest request, StreamObserver<ListConstraintsResponse> responseObserver) {
    Object response = responses.poll();
    if (response instanceof ListConstraintsResponse) {
      requests.add(request);
      responseObserver.onNext(((ListConstraintsResponse) response));
      responseObserver.onCompleted();
    } else if (response instanceof Exception) {
      responseObserver.onError(((Exception) response));
    } else {
      responseObserver.onError(
          new IllegalArgumentException(
              String.format(
                  "Unrecognized response type %s for method ListConstraints, expected %s or %s",
                  response == null ? "null" : response.getClass().getName(),
                  ListConstraintsResponse.class.getName(),
                  Exception.class.getName())));
    }
  }

  @Override
  public void listPolicies(
      ListPoliciesRequest request, StreamObserver<ListPoliciesResponse> responseObserver) {
    Object response = responses.poll();
    if (response instanceof ListPoliciesResponse) {
      requests.add(request);
      responseObserver.onNext(((ListPoliciesResponse) response));
      responseObserver.onCompleted();
    } else if (response instanceof Exception) {
      responseObserver.onError(((Exception) response));
    } else {
      responseObserver.onError(
          new IllegalArgumentException(
              String.format(
                  "Unrecognized response type %s for method ListPolicies, expected %s or %s",
                  response == null ? "null" : response.getClass().getName(),
                  ListPoliciesResponse.class.getName(),
                  Exception.class.getName())));
    }
  }

  @Override
  public void getPolicy(GetPolicyRequest request, StreamObserver<Policy> responseObserver) {
    Object response = responses.poll();
    if (response instanceof Policy) {
      requests.add(request);
      responseObserver.onNext(((Policy) response));
      responseObserver.onCompleted();
    } else if (response instanceof Exception) {
      responseObserver.onError(((Exception) response));
    } else {
      responseObserver.onError(
          new IllegalArgumentException(
              String.format(
                  "Unrecognized response type %s for method GetPolicy, expected %s or %s",
                  response == null ? "null" : response.getClass().getName(),
                  Policy.class.getName(),
                  Exception.class.getName())));
    }
  }

  @Override
  public void getEffectivePolicy(
      GetEffectivePolicyRequest request, StreamObserver<Policy> responseObserver) {
    Object response = responses.poll();
    if (response instanceof Policy) {
      requests.add(request);
      responseObserver.onNext(((Policy) response));
      responseObserver.onCompleted();
    } else if (response instanceof Exception) {
      responseObserver.onError(((Exception) response));
    } else {
      responseObserver.onError(
          new IllegalArgumentException(
              String.format(
                  "Unrecognized response type %s for method GetEffectivePolicy, expected %s or %s",
                  response == null ? "null" : response.getClass().getName(),
                  Policy.class.getName(),
                  Exception.class.getName())));
    }
  }

  @Override
  public void createPolicy(CreatePolicyRequest request, StreamObserver<Policy> responseObserver) {
    Object response = responses.poll();
    if (response instanceof Policy) {
      requests.add(request);
      responseObserver.onNext(((Policy) response));
      responseObserver.onCompleted();
    } else if (response instanceof Exception) {
      responseObserver.onError(((Exception) response));
    } else {
      responseObserver.onError(
          new IllegalArgumentException(
              String.format(
                  "Unrecognized response type %s for method CreatePolicy, expected %s or %s",
                  response == null ? "null" : response.getClass().getName(),
                  Policy.class.getName(),
                  Exception.class.getName())));
    }
  }

  @Override
  public void updatePolicy(UpdatePolicyRequest request, StreamObserver<Policy> responseObserver) {
    Object response = responses.poll();
    if (response instanceof Policy) {
      requests.add(request);
      responseObserver.onNext(((Policy) response));
      responseObserver.onCompleted();
    } else if (response instanceof Exception) {
      responseObserver.onError(((Exception) response));
    } else {
      responseObserver.onError(
          new IllegalArgumentException(
              String.format(
                  "Unrecognized response type %s for method UpdatePolicy, expected %s or %s",
                  response == null ? "null" : response.getClass().getName(),
                  Policy.class.getName(),
                  Exception.class.getName())));
    }
  }

  @Override
  public void deletePolicy(DeletePolicyRequest request, StreamObserver<Empty> responseObserver) {
    Object response = responses.poll();
    if (response instanceof Empty) {
      requests.add(request);
      responseObserver.onNext(((Empty) response));
      responseObserver.onCompleted();
    } else if (response instanceof Exception) {
      responseObserver.onError(((Exception) response));
    } else {
      responseObserver.onError(
          new IllegalArgumentException(
              String.format(
                  "Unrecognized response type %s for method DeletePolicy, expected %s or %s",
                  response == null ? "null" : response.getClass().getName(),
                  Empty.class.getName(),
                  Exception.class.getName())));
    }
  }
}