text:
<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/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>com.smarttools.demo</groupId>
    <artifactId>docbook-demo</artifactId>
    <packaging>pom</packaging>
    <version>0.0.1-SNAPSHOTS</version>

	<properties>
		<docbook.xsl.version>0.0.1-SNAPSHOTS</docbook.xsl.version>
		<docbook.dir>src/docbook</docbook.dir>
		<staging.dir>${project.build.directory}/staging</staging.dir>
	</properties>

	<build>
		<plugins>

			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>unpack</id>
						<goals>
							<goal>unpack</goal>
						</goals>
						<phase>generate-resources</phase>
					</execution>
				</executions>
				<configuration>
					<artifactItems>
						<artifactItem>
							<groupId>com.smarttools.docbook</groupId>
						    <artifactId>docbook-xsl</artifactId>
							<version>${docbook.xsl.version}</version>
							<type>zip</type>
						</artifactItem>
					</artifactItems>
					<overWrite>false</overWrite>
					<outputDirectory>${staging.dir}</outputDirectory>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.agilejava.docbkx</groupId>
				<artifactId>docbkx-maven-plugin</artifactId>
				<dependencies>

					<dependency>
						<groupId>docbook</groupId>
						<artifactId>docbook-xml</artifactId>
						<version>4.5</version>
						<scope>runtime</scope>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<id>gen-pdf</id>
						<goals>
							<goal>generate-pdf</goal>
						</goals>
						<phase>prepare-package</phase>
					</execution>
				</executions>
				<configuration>
					<showXslMessages>true</showXslMessages>

					<foCustomization>${staging.dir}/xslt/pdf.xsl</foCustomization>

					<xincludeSupported>true</xincludeSupported>

					<calloutGraphicsPath>${staging.dir}/images/docbook/callouts/</calloutGraphicsPath>
					<admonGraphicsPath>${staging.dir}/images/docbook/</admonGraphicsPath>

					<fonts>

							<name>WenQuanYi Zen Hei</name>

							<weight>normal</weight>
							<embedFile>${staging.dir}/fonts/WenQuanYiZenHei.ttf</embedFile>
							<metricsFile>${staging.dir}/fonts/WenQuanYiZenHei-metrics.xml</metricsFile>

							<name>WenQuanYi Zen Hei Sharp</name>

							<weight>normal</weight>
							<embedFile>${staging.dir}/fonts/WenQuanYiZenHeiSharp.ttf</embedFile>
							<metricsFile>${staging.dir}/fonts/WenQuanYiZenHeiSharp-metrics.xml</metricsFile>

							<name>WenQuanYi Zen Hei Mono</name>

							<weight>normal</weight>
							<embedFile>${staging.dir}/fonts/WenQuanYiZenHeiMono.ttf</embedFile>
							<metricsFile>${staging.dir}/fonts/WenQuanYiZenHeiMono-metrics.xml</metricsFile>

					</fonts>
					<titleFontFamily>'WenQuanYi Zen Hei'</titleFontFamily>
					<bodyFontFamily>'WenQuanYi Zen Hei Sharp'</bodyFontFamily>
					<monospaceFontFamily>'WenQuanYi Zen Hei Mono'</monospaceFontFamily>

					<sourceDirectory>${docbook.dir}</sourceDirectory>
					<targetDirectory>${project.build.directory}/docs</targetDirectory>
					<includes>User_Guide.xml</includes>
				</configuration>
			</plugin>

			<plugin>
				<groupId>com.agilejava.docbkx</groupId>
				<artifactId>docbkx-fop-support</artifactId>
				<executions>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>generate</goal>
						</goals>
						<configuration>
							<ansi>false</ansi>
							<sourceDirectory>${staging.dir}/fonts</sourceDirectory>
							<targetDirectory>${staging.dir}/fonts</targetDirectory>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<configuration>
					<descriptors>
						<descriptor>src/assembly.xml</descriptor>
					</descriptors>
				</configuration>
				<executions>
					<execution>
						<id>make-assembly</id>
						<phase>package</phase>
						<goals>
							<goal>single</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>


text:
@interface OWDisOldPartyVC : UITableViewController

@end

redpajama_set_name: RedPajamaGithub


text:
"""Evluating SQL expressions on ORM objects"""
import sqlalchemy as sa
from sqlalchemy import testing
from sqlalchemy import String, Integer, select
from sqlalchemy.testing.schema import Table
from sqlalchemy.testing.schema import Column
from sqlalchemy.orm import mapper, create_session
from sqlalchemy.testing import eq_
from sqlalchemy.testing import fixtures

from sqlalchemy import and_, or_, not_
from sqlalchemy.orm import evaluator

compiler = evaluator.EvaluatorCompiler()
def eval_eq(clause, testcases=None):
    evaluator = compiler.process(clause)
    def testeval(obj=None, expected_result=None):
        assert evaluator(obj) == expected_result, "%s != %r for %s with %r" % (evaluator(obj), expected_result, clause, obj)
    if testcases:
        for an_obj,result in testcases:
            testeval(an_obj, result)
    return testeval

class EvaluateTest(fixtures.MappedTest):
    @classmethod
    def define_tables(cls, metadata):
        Table('users', metadata,
              Column('id', Integer, primary_key=True),
              Column('name', String(64)))

    @classmethod
    def setup_classes(cls):
        class User(cls.Basic):
            pass

    @classmethod
    def setup_mappers(cls):
        users, User = cls.tables.users, cls.classes.User

        mapper(User, users)

    def test_compare_to_value(self):
        User = self.classes.User

        eval_eq(User.name == 'foo', testcases=[
            (User(name='foo'), True),
            (User(name='bar'), False),
            (User(name=None), None),
        ])

        eval_eq(User.id < 5, testcases=[
            (User(id=3), True),
            (User(id=5), False),
            (User(id=None), None),
        ])

    def test_compare_to_none(self):
        User = self.classes.User

        eval_eq(User.name == None, testcases=[
            (User(name='foo'), False),
            (User(name=None), True),
        ])

    def test_boolean_ops(self):
        User = self.classes.User

        eval_eq(and_(User.name == 'foo', User.id == 1), testcases=[
            (User(id=1, name='foo'), True),
            (User(id=2, name='foo'), False),
            (User(id=1, name='bar'), False),
            (User(id=2, name='bar'), False),
            (User(id=1, name=None), None),
        ])

        eval_eq(or_(User.name == 'foo', User.id == 1), testcases=[
            (User(id=1, name='foo'), True),
            (User(id=2, name='foo'), True),
            (User(id=1, name='bar'), True),
            (User(id=2, name='bar'), False),
            (User(id=1, name=None), True),
            (User(id=2, name=None), None),
        ])

        eval_eq(not_(User.id == 1), testcases=[
            (User(id=1), False),
            (User(id=2), True),
            (User(id=None), None),
        ])

    def test_null_propagation(self):
        User = self.classes.User

        eval_eq((User.name == 'foo') == (User.id == 1), testcases=[
            (User(id=1, name='foo'), True),
            (User(id=2, name='foo'), False),
            (User(id=1, name='bar'), False),
            (User(id=2, name='bar'), True),
            (User(id=None, name='foo'), None),
            (User(id=None, name=None), None),
        ])


text:
package sdk

import (
	"github.com/invopop/jsonschema"
)

func GetWorkerModelJsonSchema() *jsonschema.Schema {
	wmSchema := jsonschema.Reflect(&V2WorkerModel{})
	wmDocker := jsonschema.Reflect(&V2WorkerModelDockerSpec{})
	wmOpenstack := jsonschema.Reflect(&V2WorkerModelOpenstackSpec{})
	wmVSphere := jsonschema.Reflect(&V2WorkerModelVSphereSpec{})

	if wmSchema.Definitions == nil {
		wmSchema.Definitions = make(map[string]*jsonschema.Schema)
	}
	wmSchema.Definitions["V2WorkerModelVSphereSpec"] = wmVSphere
	wmSchema.Definitions["V2WorkerModelOpenstackSpec"] = wmOpenstack
	wmSchema.Definitions["V2WorkerModelDockerSpec"] = wmDocker
	return wmSchema
}

func GetWorkerModelTemplateJsonSchema() *jsonschema.Schema {
	wmtSchema := jsonschema.Reflect(&WorkerModelTemplate{})
	wmtDocker := jsonschema.Reflect(&WorkerModelTemplateDocker{})
	wmtVM := jsonschema.Reflect(&WorkerModelTemplateVM{})

	if wmtSchema.Definitions == nil {
		wmtSchema.Definitions = make(map[string]*jsonschema.Schema)
	}
	wmtSchema.Definitions["WorkerModelTemplateDocker"] = wmtDocker
	wmtSchema.Definitions["WorkerModelTemplateVM"] = wmtVM
	return wmtSchema
}


text:
package scala99

import scala.annotation.tailrec

object Questions11To20 {
  /**
   * Problem 11
   *
   * Modified run-length encoding.
   *
   * Modify the result of problem P10 in such a way that if an element has no
   * duplicates it is simply copied into the result list. Only elements with
   * duplicates are transferred as (N, E) terms.
   *
   * Example:
   *   encodeModified("aaaabcccdeeeff".toList) ===
   *     List((4, 'a'), 'b', (3, 'c'), 'd', (3, 'e'), (2, 'f'))
   */
  def encodeModified[T](list: List[T]): List[Any] = {
    import Questions01To10.encode

    /**
     * Create the filtered list, but in a reversed representation.
     */
    @tailrec
    def filterEncoded(list: List[(Int, T)], acc: List[Any]): List[Any] = {
      list match {
        case Nil => acc
        case (x @ (c, elem)) :: xs =>
          if (c > 1) filterEncoded(xs, x :: acc)
          else if (c == 1) filterEncoded(xs, elem :: acc)
          else filterEncoded(xs, acc)
      }
    }

    val encodedList = encode(list)
    filterEncoded(encodedList, List()).reverse
  }

  /**
   * Problem 12
   *
   * Decode a run-length encoded list.
   *
   * Given a run-length code list generated as specified in problem P10, construct its uncompressed version.
   *
   * Example:
   *   decode(List((4, 'a'), (1, 'b'), (3, 'c'), (1, 'd'), (3, 'e'), (2, 'f'))) ===
   *     "aaaabcccdeeeff".toList
   */
  def decode[T](list: List[(Int, T)]): List[T] = {
    /**
     * Create the decoded list, but in a reversed representation.
     */
    @tailrec
    def decodeInt(list: List[(Int, T)], acc: List[T]): List[T] = {
      list match {
        case Nil => acc
        case (c, elem) :: xs =>
          if (c > 0) decodeInt((c - 1, elem) :: xs, elem :: acc)
          else decodeInt(xs, acc)
      }
    }
    decodeInt(list, List()).reverse
  }

  /**
   * Problem 13
   *
   * Run-length encoding of a list (direct solution).
   *
   * Implement the so-called run-length encoding data compression method directly.
   * I.e. don't explicitly create the sublists containing the duplicates, as in problem 9,
   * but only count them.
   * As in problem P11, simplify the result list by replacing the tuple (1, X) by X.
   *
   * Example:
   *   encodeDirect("aaaabcccdeeeff".toList) ===
   *     List((4, 'a'), 'b', (3, 'c'), 'd', (3, 'e'), (2, 'f'))
   */
  def encodeDirect[T](list: List[T]): List[Any] = {
    /**
     * Increase counter in the first element of a list.
     */
    def increaseCounterInFirst(list: List[Any]): List[Any] = {
      list match {
        case Nil => throw new IllegalArgumentException("No first element in empty list.")
        case (c: Int, x) :: xs => (c + 1, x) :: xs
        case x :: xs => (2, x) :: xs
      }
    }
    /**
     * Create the encoded list, but in a reversed representation.
     */
    @tailrec
    def encodeInt(list: List[T], acc: List[Any], last: Option[T]): List[Any] = {
      (list, last) match {
        case (Nil, _) => acc
        case (x :: xs, Some(y)) =>
          if (x == y) encodeInt(xs, increaseCounterInFirst(acc), Some(x))
          else encodeInt(xs, x :: acc, Some(x))
        case (x :: xs, None) =>
          encodeInt(xs, x :: acc, Some(x))
      }
    }
    encodeInt(list, List(), None).reverse
  }

  /**
   * Problem 14
   *
   * Duplicate the elements of a list.
   *
   * Example:
   *   duplicate("abcdde".toList) === "aabbccddddee".toList
   */
  def duplicate[T](list: List[T]): List[T] = {
    /**
     * Create the list with duplicated elements, but in a reversed representation.
     */
    @tailrec
    def duplicateInt(list: List[T], acc: List[T]): List[T] = {
      list match {
        case Nil => acc
        case x :: xs =>
          duplicateInt(xs, x :: x :: acc)
      }
    }
    duplicateInt(list, List()).reverse
  }

  /**
   * Problem 15
   *
   * Replicate the elements of a list a given number of times.
   *
   * Example:
   *   replicate("abc".toList, 3) === "aaabbbccc".toList
   */
  def replicate[T](list: List[T], count: Int): List[T] = {
    /**
     * Create the list with replicated elements, but in a reversed representation.
     */
    @tailrec
    def replicateInt(list: List[T], acc: List[T], count: Int, countCurrent: Int): List[T] = {
      list match {
        case Nil => acc
        case x :: xs if countCurrent > 0 =>
          replicateInt(list, x :: acc, count, countCurrent - 1)
        case x :: xs =>
          replicateInt(xs, acc, count, count)
      }
    }
    replicateInt(list, List(), count, count).reverse
  }

  /**
   * Problem 16
   *
   * Drop every Nth element from a list.
   *
   * Example:
   *   dropEveryN("abcdefghijk".toList, 3) === "abdeghjk".toList
   */
  def dropEveryN[T](list: List[T], n: Int): List[T] = {
    /**
     * Create the list with dropped elements, but in a reversed representation.
     */
    @tailrec
    def dropEveryNInt(list: List[T], acc: List[T], n: Int, currentN: Int): List[T] = {
      list match {
        case Nil => acc
        case x :: xs if currentN > 1 =>
          dropEveryNInt(xs, x :: acc, n, currentN - 1)
        case x :: xs =>
          dropEveryNInt(xs, acc, n, n)
      }
    }
    if (n < 1) throw new IllegalArgumentException
    else dropEveryNInt(list, List(), n, n).reverse
  }

  /**
   * Problem 17
   *
   * Split a list into two parts.
   *
   * The length of the first part is given. Use a Tuple for your result.
   *
   * Example:
   *   split("abcdefgh".toList, 3) === ("abc".toList, "defgh".toList)
   */
  def split[T](list: List[T], firstLength: Int): (List[T], List[T]) = {
    @tailrec
    def splitInt(list: List[T], acc: (List[T], List[T]), firstLength: Int, currentN: Int): (List[T], List[T]) = {
      list match {
        case Nil => acc
        case x :: xs =>
          if (currentN < firstLength)
            splitInt(xs, (x :: acc._1, acc._2), firstLength, currentN + 1)
          else
            splitInt(xs, (acc._1, x :: acc._2), firstLength, currentN + 1)
      }
    }
    val (first, second) = splitInt(list, (List(), List()), firstLength, 0)
    (first.reverse, second.reverse)
  }

  /**
   * Problem 18
   *
   * Extract a slice from a list.
   *
   * Given two indices, I and K, the slice is the list containing the elements
   * from and including the Ith element up to but not including the Kth element
   * of the original list.
   * Start counting the elements with 0.
   *
   * Example:
   *   slice("abcdefgh".toList, 2, 5) === "cde".toList
   */
  def slice[T](list: List[T], i: Int, k: Int): List[T] = {
    @tailrec
    def sliceInt(list: List[T], acc: List[T], i: Int, k: Int, currentN: Int): List[T] = {
      list match {
        case Nil => acc
        case x :: xs =>
          if (currentN < i)
            sliceInt(xs, acc, i, k, currentN + 1)
          else if (currentN < k)
            sliceInt(xs, x :: acc, i, k, currentN + 1)
          else
            acc
      }
    }
    sliceInt(list, List(), i, k, 0).reverse
  }

  /**
   * Problem 19
   *
   * Rotate a list N places to the left.
   *
   * Example:
   *   rotate("abcdefghijk".toList, 3) === List('d', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'a', 'b', 'c')
   */
  def rotate[T](list: List[T], n: Int): List[T] = {
    val splitPoint = if (n < 0) list.length + n
    else n
    val (first, second) = split(list, splitPoint)
    second ++ first
  }

  /**
   * Problem 20
   *
   * Remove the Kth element from a list.
   *
   * Return the list and the removed element in a Tuple. Elements are numbered from 0.
   *
   * Example:
   *   removeAt("abcdefgh".toList, 2) === ("abdefgh".toList, 'c')
   */
  def removeAt[T](list: List[T], k: Int): (List[T], T) = {
    /**
     * Create the list without the removed element, but in a reversed representation.
     */
    @tailrec
    def removeAtInt[T](list: List[T], acc: List[T], k: Int, currentK: Int, kTh: Option[T]): (List[T], T) = {
      (list, kTh) match {
        case (Nil, None) => throw new NoSuchElementException
        case (Nil, Some(kThValue)) => (acc, kThValue)
        case (x :: xs, _) =>
          if (currentK < k || currentK > k) removeAtInt(xs, x :: acc, k, currentK + 1, kTh)
          else removeAtInt(xs, acc, k, currentK + 1, Some(x))
      }
    }
    val (newList, removed) = removeAtInt(list, List(), k, 0, None)
    (newList.reverse, removed)
  }
}


text:
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>Manual</title>

        <link href="../css/bootstrap.min.css" rel="stylesheet">
        <link href="../css/bootstrap-theme.min.css" rel="stylesheet">
        <link href="../css/bootstrap-datetimepicker.css" rel="stylesheet">

        <link rel="stylesheet" href="../font-awesome-4.3.0/css/font-awesome.min.css">

        <link href="../css/manual.css" rel="stylesheet" />

Layers

Timeline-Temporal Layers

Adjust time span

Adjust time span of the Timeline

When working with the Timeline, we can also change the span of the Timeline using mouse scroll on the top band. The default time span is one year, but we can zoom in to have a more detailed span down to four hours. An example of this feature is illustrated below.


text:
package io.vertx.test.codegen.testapi.nullable;

import io.vertx.codegen.annotations.Nullable;
import io.vertx.codegen.annotations.VertxGen;

/**
 * @author Tim Fox
 */
@VertxGen
public interface MethodWithInvalidNullableByteReturn {

  @Nullable byte method();

}


text:
/*
Package guest_memory_info - get guest memory info

Example:
        { "execute": "guest-memory-info", "arguments": {}}
*/
package guest_memory_info

import (
	"bufio"
	"bytes"
	"io/ioutil"
	"strconv"
	"strings"

	"github.com/vtolstov/cloudagent/qga"
)

func init() {
	qga.RegisterCommand(&qga.Command{
		Name:    "guest-memory-info",
		Func:    fnGuestMemoryInfo,
		Enabled: true,
		Returns: true,
	})
}

func fnGuestMemoryInfo(req *qga.Request) *qga.Response {
	res := &qga.Response{ID: req.ID}

	resData := struct {
		MemoryTotal int64
		MemoryFree  int64
		SwapTotal   int64
		SwapFree    int64
	}{}

	buf, err := ioutil.ReadFile("/proc/meminfo")
	if err != nil {
		res.Error = &qga.Error{Code: -1, Desc: err.Error()}
		return res
	}

	reader := bufio.NewReader(bytes.NewBuffer(buf))

	for {
		line, _, err := reader.ReadLine()
		if err != nil {
			break
		}
		fields := strings.Fields(string(line))
		value, err := strconv.ParseInt(strings.TrimSpace(fields[1]), 10, 64)
		if err != nil {
			continue
		}
		switch strings.TrimSpace(fields[0]) {
		case "MemTotal:":
			resData.MemoryTotal = value * 1024
		case "MemFree:", "Cached:", "Buffers:":
			resData.MemoryFree += value * 1024
		case "SwapTotal:":
			resData.SwapTotal = value * 1024
		case "SwapFree:":
			resData.SwapFree = value * 1024
		}
	}

	res.Return = resData
	return res
}


text:
using log4net;
using Movimientos.Common.Logging;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;
using System.Web.Http.Tracing;

namespace Movimientos.Web.Common
{
    public class SimpleTraceWriter : ITraceWriter
    {
        private readonly ILog _log;

        public SimpleTraceWriter(ILogManager logManager)
        {
            _log = logManager.GetLog(typeof(SimpleTraceWriter));
        }

        public void Trace(HttpRequestMessage request, string category, TraceLevel level, Action<TraceRecord> traceAction)
        {
            var rec = new TraceRecord(request, category, level);
            traceAction(rec);
            WriteTrace(rec);
        }

        public virtual void WriteTrace(TraceRecord rec)
        {
            const string traceFormat =
                "RequestId={0};{1}Kind={2};{3}Status={4};{5}Operation={6};{7}Operator={8};{9}Category={10}{11}Request={12}{13}Message={14}";

            var args = new object[]
            {
                rec.RequestId,
                Environment.NewLine,
                rec.Kind,
                Environment.NewLine,
                rec.Status,
                Environment.NewLine,
                rec.Operation,
                Environment.NewLine,
                rec.Operator,
                Environment.NewLine,
                rec.Category,
                Environment.NewLine,
                rec.Request,
                Environment.NewLine,
                rec.Message
            };

            switch (rec.Level)
            {
                case TraceLevel.Debug:
                    _log.DebugFormat(traceFormat, args);
                    break;
                case TraceLevel.Info:
                    _log.InfoFormat(traceFormat, args);
                    break;
                case TraceLevel.Warn:
                    _log.WarnFormat(traceFormat, args);
                    break;
                case TraceLevel.Error:
                    _log.ErrorFormat(traceFormat, args);
                    break;
                case TraceLevel.Fatal:
                    _log.FatalFormat(traceFormat, args);
                    break;
            }
        }
    }

}


text:
package igx.client;

// Dispatcher.java
// Class Dispatcher
import java.util.*;
import igx.shared.*;

class Dispatcher {

    GameInstance Game;
    ClientUI ui;
    Server server;
    Vector fleets = new Vector();
    String name;

    public Dispatcher(GameInstance Game, Server server, String name) {
        this.Game = Game;
        this.server = server;
        this.name = name;
    }

    public void addFleet(Fleet f) {
        fleets.addElement(f);
    }

    public void advance() {
        Game.update(fleets);
        ui.postNextTurn();
        fleets.removeAllElements();
    }

    public void dispatch(char from, char to, int ships) {
        // Still in this game, or watching?
        Player p = getMe();
        if ((p != null) && (p.isActive)) {
            server.send(new Character(from).toString());
            server.send(new Character(to).toString());
            server.send(String.valueOf(ships));
        }
    }

    public void forumMessage(String sender, String text) {
        ui.postForumMessage(sender, text);
    }

    public Player getMe() {
        return Game.getPlayer(server.name);
    }

    public void message(Player sender, Player recipient, String message) {
        ui.postMessage(sender, recipient, message);
    }

    public void playerArrived(String name) {
        ui.postArrival(name);
    }

    public void playerLeft(String name) {
        for (int i = 0; i < Game.players; i++) {
            if ((Game.player[i].name.equals(name)) && (Game.player[i].isActive)) {
                Game.player[i].isPresent = false;
                ui.postPlayerLeft(name, i);
                return;
            }
        }
        ui.postPlayerLeft(name, -1);
    }

    public void playerQuit(int quitter, int status) {
        if (status != Params.QUIT_SIGNAL) {
            Game.player[quitter].status = status;
            ui.postPlayerQuit(Game.player[quitter], status);
        } else {
            Game.player[quitter].isActive = false;
            if (!Game.player[quitter].name.equals(server.name)) {
                ui.postPlayerQuit(Game.player[quitter], status);
            }
        }
    }

    public void quit(int command) {
        server.send(Params.PLAYERQUITTING);
        server.send(new Integer(command).toString());
    }

    public void registerUI(ClientUI ui) {
        this.ui = ui;
    }

    public void sendMessage(int receiver, String message) {
        server.send(Params.SENDMESSAGE);
        if (receiver == -1) // Send to all
        {
            receiver = Params.MAXPLAYERS;
        }
        server.send(new Integer(receiver).toString());
        server.send(message);
    }

    /**
     * This method was created in VisualAge.
     *
     * @param sender java.lang.String
     * @param recipient igx.shared.Player
     * @param text java.lang.String
     */
    public void watcherMessage(String sender, Player recipient, String text) {
        ui.postForumMessage(sender, recipient, text);
    }

    public void youQuit() {
        // ui.quit();
    }
}


text:
import {ViewEncapsulation, ΔdefineInjectable, ΔdefineInjector} from '../../src/core';
import {createInjector} from '../../src/di/r3_injector';
import {AttributeMarker, ComponentFactory, LifecycleHooksFeature, getRenderedText, markDirty, ΔdefineComponent, ΔdirectiveInject, Δtemplate} from '../../src/render3/index';
import {tick, Δbind, Δcontainer, ΔcontainerRefreshEnd, ΔcontainerRefreshStart, Δelement, ΔelementEnd, ΔelementProperty, ΔelementStart, ΔembeddedViewEnd, ΔembeddedViewStart, ΔnextContext, Δtext, ΔtextBinding} from '../../src/render3/instructions/all';
import {ComponentDef, RenderFlags} from '../../src/render3/interfaces/definition';

import {NgIf} from './common_with_def';
import {ComponentFixture, MockRendererFactory, containerEl, createComponent, renderComponent, renderToHtml, requestAnimationFrame, toHtml} from './render_util';

describe('component', () => {
  class CounterComponent {
    count = 0;

    increment() { this.count++; }

    static ngComponentDef = ΔdefineComponent({
      type: CounterComponent,
      encapsulation: ViewEncapsulation.None,
      selectors: [['counter']],
      consts: 1,
      vars: 1,
      template: function(rf: RenderFlags, ctx: CounterComponent) {
        if (rf & RenderFlags.Create) {
          Δtext(0);
        }
        if (rf & RenderFlags.Update) {
          ΔtextBinding(0, Δbind(ctx.count));
        }
      },
      factory: () => new CounterComponent,
      inputs: {count: 'count'},
    });
  }

  describe('renderComponent', () => {
    it('should render on initial call', () => {
      renderComponent(CounterComponent);
      expect(toHtml(containerEl)).toEqual('0');
    });

    it('should re-render on input change or method invocation', () => {
      const component = renderComponent(CounterComponent);
      expect(toHtml(containerEl)).toEqual('0');
      component.count = 123;
      markDirty(component);
      expect(toHtml(containerEl)).toEqual('0');
      requestAnimationFrame.flush();
      expect(toHtml(containerEl)).toEqual('123');
      component.increment();
      markDirty(component);
      expect(toHtml(containerEl)).toEqual('123');
      requestAnimationFrame.flush();
      expect(toHtml(containerEl)).toEqual('124');
    });

    class MyService {
      constructor(public value: string) {}
      static ngInjectableDef =
          ΔdefineInjectable({providedIn: 'root', factory: () => new MyService('no-injector')});
    }
    class MyComponent {
      constructor(public myService: MyService) {}
      static ngComponentDef = ΔdefineComponent({
        type: MyComponent,
        encapsulation: ViewEncapsulation.None,
        selectors: [['my-component']],
        factory: () => new MyComponent(ΔdirectiveInject(MyService)),
        consts: 1,
        vars: 1,
        template: function(fs: RenderFlags, ctx: MyComponent) {
          if (fs & RenderFlags.Create) {
            Δtext(0);
          }
          if (fs & RenderFlags.Update) {
            ΔtextBinding(0, Δbind(ctx.myService.value));
          }
        }
      });
    }

    class MyModule {
      static ngInjectorDef = ΔdefineInjector({
        factory: () => new MyModule(),
        providers: [{provide: MyService, useValue: new MyService('injector')}]
      });
    }

    it('should support bootstrapping without injector', () => {
      const fixture = new ComponentFixture(MyComponent);
      expect(fixture.html).toEqual('no-injector');
    });

    it('should support bootstrapping with injector', () => {
      const fixture = new ComponentFixture(MyComponent, {injector: createInjector(MyModule)});
      expect(fixture.html).toEqual('injector');
    });

  });

  it('should instantiate components at high indices', () => {

    // {{ name }}
    class Comp {
      // @Input
      name = '';

      static ngComponentDef = ΔdefineComponent({
        type: Comp,
        selectors: [['comp']],
        factory: () => new Comp(),
        consts: 1,
        vars: 1,
        template: (rf: RenderFlags, ctx: Comp) => {
          if (rf & RenderFlags.Create) {
            Δtext(0);
          }
          if (rf & RenderFlags.Update) {
            ΔtextBinding(0, Δbind(ctx.name));
          }
        },
        inputs: {name: 'name'}
      });
    }

    // Artificially inflating the slot IDs of this app component to mimic an app
    // with a very large view
    const App = createComponent('app', (rf: RenderFlags, ctx: any) => {
      if (rf & RenderFlags.Create) {
        Δelement(4097, 'comp');
      }
      if (rf & RenderFlags.Update) {
        ΔelementProperty(4097, 'name', Δbind(ctx.name));
      }
    }, 4098, 1, [Comp]);

    const fixture = new ComponentFixture(App);
    expect(fixture.html).toEqual('<comp></comp>');

    fixture.component.name = 'some name';
    fixture.update();
    expect(fixture.html).toEqual('<comp>some name</comp>');
  });

});

it('should not invoke renderer destroy method for embedded views', () => {
  let comp: Comp;

  function MyComponent_div_Template_2(rf: any, ctx: any) {
    if (rf & RenderFlags.Create) {
      ΔelementStart(0, 'div');
      Δtext(1, 'Child view');
      ΔelementEnd();
    }
  }

  class Comp {
    visible = true;

    static ngComponentDef = ΔdefineComponent({
      type: Comp,
      selectors: [['comp']],
      consts: 3,
      vars: 1,
      factory: () => {
        comp = new Comp();
        return comp;
      },
      directives: [NgIf],
      /**
       *
Root view

       *
Child view

       */
      template: function(rf: RenderFlags, ctx: Comp) {
        if (rf & RenderFlags.Create) {
          ΔelementStart(0, 'div');
          Δtext(1, 'Root view');
          ΔelementEnd();
          Δtemplate(2, MyComponent_div_Template_2, 2, 0, 'div', [AttributeMarker.Template, 'ngIf']);
        }
        if (rf & RenderFlags.Update) {
          ΔelementProperty(2, 'ngIf', Δbind(ctx.visible));
        }
      }
    });
  }

  const rendererFactory = new MockRendererFactory(['destroy']);
  const fixture = new ComponentFixture(Comp, {rendererFactory});

  comp !.visible = false;
  fixture.update();

  comp !.visible = true;
  fixture.update();

  const renderer = rendererFactory.lastRenderer !;
  const destroySpy = renderer.spies['destroy'];

  // we should never see `destroy` method being called
  // in case child views are created/removed
  expect(destroySpy.calls.count()).toBe(0);
});

describe('component with a container', () => {
  function showItems(rf: RenderFlags, ctx: {items: string[]}) {
    if (rf & RenderFlags.Create) {
      Δcontainer(0);
    }
    if (rf & RenderFlags.Update) {
      ΔcontainerRefreshStart(0);
      {
        for (const item of ctx.items) {
          const rf0 = ΔembeddedViewStart(0, 1, 1);
          {
            if (rf0 & RenderFlags.Create) {
              Δtext(0);
            }
            if (rf0 & RenderFlags.Update) {
              ΔtextBinding(0, Δbind(item));
            }
          }
          ΔembeddedViewEnd();
        }
      }
      ΔcontainerRefreshEnd();
    }
  }

  class WrapperComponent {
    // TODO(issue/24571): remove '!'.
    items !: string[];
    static ngComponentDef = ΔdefineComponent({
      type: WrapperComponent,
      encapsulation: ViewEncapsulation.None,
      selectors: [['wrapper']],
      consts: 1,
      vars: 0,
      template: function ChildComponentTemplate(rf: RenderFlags, ctx: {items: string[]}) {
        if (rf & RenderFlags.Create) {
          Δcontainer(0);
        }
        if (rf & RenderFlags.Update) {
          ΔcontainerRefreshStart(0);
          {
            const rf0 = ΔembeddedViewStart(0, 1, 0);
            { showItems(rf0, {items: ctx.items}); }
            ΔembeddedViewEnd();
          }
          ΔcontainerRefreshEnd();
        }
      },
      factory: () => new WrapperComponent,
      inputs: {items: 'items'}
    });
  }

  function template(rf: RenderFlags, ctx: {items: string[]}) {
    if (rf & RenderFlags.Create) {
      Δelement(0, 'wrapper');
    }
    if (rf & RenderFlags.Update) {
      ΔelementProperty(0, 'items', Δbind(ctx.items));
    }
  }

  const defs = [WrapperComponent];

  it('should re-render on input change', () => {
    const ctx: {items: string[]} = {items: ['a']};
    expect(renderToHtml(template, ctx, 1, 1, defs)).toEqual('<wrapper>a</wrapper>');

    ctx.items = [...ctx.items, 'b'];
    expect(renderToHtml(template, ctx, 1, 1, defs)).toEqual('<wrapper>ab</wrapper>');
  });
});

describe('recursive components', () => {
  let events: string[];
  let count: number;

  beforeEach(() => {
    events = [];
    count = 0;
  });

  class TreeNode {
    constructor(
        public value: number, public depth: number, public left: TreeNode|null,
        public right: TreeNode|null) {}
  }

  /**
   * {{ data.value }}
   *
   * % if (data.left != null) {
   *   <tree-comp [data]="data.left"></tree-comp>
   * % }
   * % if (data.right != null) {
   *   <tree-comp [data]="data.right"></tree-comp>
   * % }
   */
  class TreeComponent {
    data: TreeNode = _buildTree(0);

    ngDoCheck() { events.push('check' + this.data.value); }

    ngOnDestroy() { events.push('destroy' + this.data.value); }

    static ngComponentDef = ΔdefineComponent({
      type: TreeComponent,
      encapsulation: ViewEncapsulation.None,
      selectors: [['tree-comp']],
      factory: () => new TreeComponent(),
      consts: 3,
      vars: 1,
      template: (rf: RenderFlags, ctx: TreeComponent) => {
        if (rf & RenderFlags.Create) {
          Δtext(0);
          Δcontainer(1);
          Δcontainer(2);
        }
        if (rf & RenderFlags.Update) {
          ΔtextBinding(0, Δbind(ctx.data.value));
          ΔcontainerRefreshStart(1);
          {
            if (ctx.data.left != null) {
              let rf0 = ΔembeddedViewStart(0, 1, 1);
              if (rf0 & RenderFlags.Create) {
                Δelement(0, 'tree-comp');
              }
              if (rf0 & RenderFlags.Update) {
                ΔelementProperty(0, 'data', Δbind(ctx.data.left));
              }
              ΔembeddedViewEnd();
            }
          }
          ΔcontainerRefreshEnd();
          ΔcontainerRefreshStart(2);
          {
            if (ctx.data.right != null) {
              let rf0 = ΔembeddedViewStart(0, 1, 1);
              if (rf0 & RenderFlags.Create) {
                Δelement(0, 'tree-comp');
              }
              if (rf0 & RenderFlags.Update) {
                ΔelementProperty(0, 'data', Δbind(ctx.data.right));
              }
              ΔembeddedViewEnd();
            }
          }
          ΔcontainerRefreshEnd();
        }
      },
      inputs: {data: 'data'}
    });
  }

  (TreeComponent.ngComponentDef as ComponentDef<TreeComponent>).directiveDefs =
      () => [TreeComponent.ngComponentDef];

  /**
   * {{ data.value }}
   *  <ng-if-tree [data]="data.left" *ngIf="data.left"></ng-if-tree>
   *  <ng-if-tree [data]="data.right" *ngIf="data.right"></ng-if-tree>
   */
  class NgIfTree {
    data: TreeNode = _buildTree(0);

    ngDoCheck() { events.push('check' + this.data.value); }

    ngOnDestroy() { events.push('destroy' + this.data.value); }

    static ngComponentDef = ΔdefineComponent({
      type: NgIfTree,
      encapsulation: ViewEncapsulation.None,
      selectors: [['ng-if-tree']],
      factory: () => new NgIfTree(),
      consts: 3,
      vars: 3,
      template: (rf: RenderFlags, ctx: NgIfTree) => {

        if (rf & RenderFlags.Create) {
          Δtext(0);
          Δtemplate(
              1, IfTemplate, 1, 1, 'ng-if-tree',
              [AttributeMarker.Bindings, 'data', AttributeMarker.Template, 'ngIf']);
          Δtemplate(
              2, IfTemplate2, 1, 1, 'ng-if-tree',
              [AttributeMarker.Bindings, 'data', AttributeMarker.Template, 'ngIf']);
        }
        if (rf & RenderFlags.Update) {
          ΔtextBinding(0, Δbind(ctx.data.value));
          ΔelementProperty(1, 'ngIf', Δbind(ctx.data.left));
          ΔelementProperty(2, 'ngIf', Δbind(ctx.data.right));
        }

      },
      inputs: {data: 'data'},
    });
  }

  function IfTemplate(rf: RenderFlags, left: any) {
    if (rf & RenderFlags.Create) {
      ΔelementStart(0, 'ng-if-tree');
      ΔelementEnd();
    }
    if (rf & RenderFlags.Update) {
      const parent = ΔnextContext();
      ΔelementProperty(0, 'data', Δbind(parent.data.left));
    }
  }

  function IfTemplate2(rf: RenderFlags, right: any) {
    if (rf & RenderFlags.Create) {
      ΔelementStart(0, 'ng-if-tree');
      ΔelementEnd();
    }
    if (rf & RenderFlags.Update) {
      const parent = ΔnextContext();
      ΔelementProperty(0, 'data', Δbind(parent.data.right));
    }
  }

  (NgIfTree.ngComponentDef as ComponentDef<NgIfTree>).directiveDefs =
      () => [NgIfTree.ngComponentDef, NgIf.ngDirectiveDef];

  function _buildTree(currDepth: number): TreeNode {
    const children = currDepth < 2 ? _buildTree(currDepth + 1) : null;
    const children2 = currDepth < 2 ? _buildTree(currDepth + 1) : null;
    return new TreeNode(count++, currDepth, children, children2);
  }

  it('should check each component just once', () => {
    const comp = renderComponent(TreeComponent, {hostFeatures: [LifecycleHooksFeature]});
    expect(getRenderedText(comp)).toEqual('6201534');
    expect(events).toEqual(['check6', 'check2', 'check0', 'check1', 'check5', 'check3', 'check4']);

    events = [];
    tick(comp);
    expect(events).toEqual(['check6', 'check2', 'check0', 'check1', 'check5', 'check3', 'check4']);
  });

  // This tests that the view tree is set up properly for recursive components
  it('should call onDestroys properly', () => {

    /**
     * % if (!skipContent) {
     *   <tree-comp></tree-comp>
     * % }
     */
    const App = createComponent('app', function(rf: RenderFlags, ctx: any) {
      if (rf & RenderFlags.Create) {
        Δcontainer(0);
      }
      if (rf & RenderFlags.Update) {
        ΔcontainerRefreshStart(0);
        if (!ctx.skipContent) {
          const rf0 = ΔembeddedViewStart(0, 1, 0);
          if (rf0 & RenderFlags.Create) {
            ΔelementStart(0, 'tree-comp');
            ΔelementEnd();
          }
          ΔembeddedViewEnd();
        }
        ΔcontainerRefreshEnd();
      }
    }, 1, 0, [TreeComponent]);

    const fixture = new ComponentFixture(App);
    expect(getRenderedText(fixture.component)).toEqual('6201534');

    events = [];
    fixture.component.skipContent = true;
    fixture.update();
    expect(events).toEqual(
        ['destroy0', 'destroy1', 'destroy2', 'destroy3', 'destroy4', 'destroy5', 'destroy6']);
  });

  it('should call onDestroys properly with ngIf', () => {
    /**
     * % if (!skipContent) {
     *   <ng-if-tree></ng-if-tree>
     * % }
     */
    const App = createComponent('app', function(rf: RenderFlags, ctx: any) {
      if (rf & RenderFlags.Create) {
        Δcontainer(0);
      }
      if (rf & RenderFlags.Update) {
        ΔcontainerRefreshStart(0);
        if (!ctx.skipContent) {
          const rf0 = ΔembeddedViewStart(0, 1, 0);
          if (rf0 & RenderFlags.Create) {
            ΔelementStart(0, 'ng-if-tree');
            ΔelementEnd();
          }
          ΔembeddedViewEnd();
        }
        ΔcontainerRefreshEnd();
      }
    }, 1, 0, [NgIfTree]);

    const fixture = new ComponentFixture(App);
    expect(getRenderedText(fixture.component)).toEqual('6201534');
    expect(events).toEqual(['check6', 'check2', 'check0', 'check1', 'check5', 'check3', 'check4']);

    events = [];
    fixture.component.skipContent = true;
    fixture.update();
    expect(events).toEqual(
        ['destroy0', 'destroy1', 'destroy2', 'destroy3', 'destroy4', 'destroy5', 'destroy6']);
  });

  it('should map inputs minified & unminified names', async() => {
    class TestInputsComponent {
      // TODO(issue/24571): remove '!'.
      minifiedName !: string;
      static ngComponentDef = ΔdefineComponent({
        type: TestInputsComponent,
        encapsulation: ViewEncapsulation.None,
        selectors: [['test-inputs']],
        inputs: {minifiedName: 'unminifiedName'},
        consts: 0,
        vars: 0,
        factory: () => new TestInputsComponent(),
        template: function(rf: RenderFlags, ctx: TestInputsComponent): void {
          // Template not needed for this test
        }
      });
    }

    const testInputsComponentFactory = new ComponentFactory(TestInputsComponent.ngComponentDef);

    expect([
      {propName: 'minifiedName', templateName: 'unminifiedName'}
    ]).toEqual(testInputsComponentFactory.inputs);

  });

});


text:
#ifndef QKMSDEVICE_H
#define QKMSDEVICE_H

#include <stddef.h>

extern "C" {
#include <gbm.h>
}
#include <EGL/egl.h>

#include <QObject>

struct gbm_device;

QT_BEGIN_NAMESPACE

class QKmsIntegration;

class QKmsDevice : public QObject
{
    Q_OBJECT
public:
    explicit QKmsDevice(const QString &path, QKmsIntegration *parent);
    ~QKmsDevice();

    EGLDisplay eglDisplay() { return m_eglDisplay; }
    gbm_device *gbmDevice() { return m_graphicsBufferManager; }
    int fd() const { return m_fd; }

    static void pageFlipHandler(int fd, unsigned int frame, unsigned int sec,
                                unsigned int usec, void *data);

public slots:
    void handlePageFlipCompleted();
private:
    void createScreens();

    QKmsIntegration *m_integration;

    EGLDisplay m_eglDisplay;
    EGLContext m_eglContext;
    gbm_device *m_graphicsBufferManager;
    int m_fd;
};

QT_END_NAMESPACE

#endif // QKMSDEVICE_H


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>V-Index</title>
<meta name="date" content="2017-12-04">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes

A B C D E F G H I K L M N O P Q R S T U V W X Z

V

verifySettings() - Static method in class com.cmput301.t05.habilect.UserAccount

Initialize and setup objects if needed

VERSION_CODE - Static variable in class com.cmput301.t05.habilect.BuildConfig

VERSION_NAME - Static variable in class com.cmput301.t05.habilect.BuildConfig

View - Static variable in class com.cmput301.t05.habilect.R.styleable

Attributes that can be used with a View.

View_android_focusable - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.focusable
 attribute's value can be found in the R.styleable.View array.

View_android_theme - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.theme
 attribute's value can be found in the R.styleable.View array.

view_habits - Static variable in class com.cmput301.t05.habilect.R.drawable

view_offset_helper - Static variable in class com.cmput301.t05.habilect.R.id

View_paddingEnd - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.paddingEnd
 attribute's value can be found in the R.styleable.View array.

View_paddingStart - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.paddingStart
 attribute's value can be found in the R.styleable.View array.

View_theme - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.theme
 attribute's value can be found in the R.styleable.View array.

ViewBackgroundHelper - Static variable in class com.cmput301.t05.habilect.R.styleable

Attributes that can be used with a ViewBackgroundHelper.

ViewBackgroundHelper_android_background - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.background
 attribute's value can be found in the R.styleable.ViewBackgroundHelper array.

ViewBackgroundHelper_backgroundTint - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.backgroundTint
 attribute's value can be found in the R.styleable.ViewBackgroundHelper array.

ViewBackgroundHelper_backgroundTintMode - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.backgroundTintMode
 attribute's value can be found in the R.styleable.ViewBackgroundHelper array.

viewEventBackButton - Static variable in class com.cmput301.t05.habilect.R.id

ViewFeedEventActivity - Class in com.cmput301.t05.habilect

This activity shows the details of a particular feed event

ViewFeedEventActivity() - Constructor for class com.cmput301.t05.habilect.ViewFeedEventActivity

viewFeedEventBackButton - Static variable in class com.cmput301.t05.habilect.R.id

viewFeedEventComment - Static variable in class com.cmput301.t05.habilect.R.id

viewFeedEventCommentText - Static variable in class com.cmput301.t05.habilect.R.id

viewFeedEventCompletionDate - Static variable in class com.cmput301.t05.habilect.R.id

viewFeedEventCompletionDateText - Static variable in class com.cmput301.t05.habilect.R.id

viewFeedEventImage - Static variable in class com.cmput301.t05.habilect.R.id

viewFeedEventTitle - Static variable in class com.cmput301.t05.habilect.R.id

viewFeedEventUserName - Static variable in class com.cmput301.t05.habilect.R.id

ViewFriendActivity - Class in com.cmput301.t05.habilect

This activity allows the user to see details about one of their friends

ViewFriendActivity() - Constructor for class com.cmput301.t05.habilect.ViewFriendActivity

viewFriendBackButton - Static variable in class com.cmput301.t05.habilect.R.id

viewFriendProfileImage - Static variable in class com.cmput301.t05.habilect.R.id

viewFriendUserName - Static variable in class com.cmput301.t05.habilect.R.id

ViewHabitDialog - Class in com.cmput301.t05.habilect

ViewHabitDialog() - Constructor for class com.cmput301.t05.habilect.ViewHabitDialog

ViewHabitEventActivity - Class in com.cmput301.t05.habilect

This activity launches when a user wishes to see more information about a particular
 habit event.

ViewHabitEventActivity() - Constructor for class com.cmput301.t05.habilect.ViewHabitEventActivity

viewHabitEventComment - Static variable in class com.cmput301.t05.habilect.R.id

viewHabitEventCommentText - Static variable in class com.cmput301.t05.habilect.R.id

viewHabitEventDate - Static variable in class com.cmput301.t05.habilect.R.id

viewHabitEventDateText - Static variable in class com.cmput301.t05.habilect.R.id

viewHabitEventImageView - Static variable in class com.cmput301.t05.habilect.R.id

viewHabitEventTitle - Static variable in class com.cmput301.t05.habilect.R.id

viewHabitEventType - Static variable in class com.cmput301.t05.habilect.R.id

ViewHabitTypesActivity - Class in com.cmput301.t05.habilect

This activity shows the user a list of all of their habit types

ViewHabitTypesActivity() - Constructor for class com.cmput301.t05.habilect.ViewHabitTypesActivity

ViewPagerFriendAdapter - Class in com.cmput301.t05.habilect

ViewPagerFriendAdapter(FragmentManager) - Constructor for class com.cmput301.t05.habilect.ViewPagerFriendAdapter

ViewPagerHistoryAdapter - Class in com.cmput301.t05.habilect

ViewPagerHistoryAdapter(FragmentManager) - Constructor for class com.cmput301.t05.habilect.ViewPagerHistoryAdapter

ViewPagerHomeAdapter - Class in com.cmput301.t05.habilect

ViewPagerHomeAdapter(FragmentManager) - Constructor for class com.cmput301.t05.habilect.ViewPagerHomeAdapter

ViewPagerSocialAdapter - Class in com.cmput301.t05.habilect

Created by Oliver on 03/12/2017.

ViewPagerSocialAdapter(FragmentManager) - Constructor for class com.cmput301.t05.habilect.ViewPagerSocialAdapter

ViewStubCompat - Static variable in class com.cmput301.t05.habilect.R.styleable

Attributes that can be used with a ViewStubCompat.

ViewStubCompat_android_id - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.id
 attribute's value can be found in the R.styleable.ViewStubCompat array.

ViewStubCompat_android_inflatedId - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.inflatedId
 attribute's value can be found in the R.styleable.ViewStubCompat array.

ViewStubCompat_android_layout - Static variable in class com.cmput301.t05.habilect.R.styleable

This symbol is the offset where the R.attr.layout
 attribute's value can be found in the R.styleable.ViewStubCompat array.

visible - Static variable in class com.cmput301.t05.habilect.R.id

voiceIcon - Static variable in class com.cmput301.t05.habilect.R.attr

May be a reference to another resource, in the form
 "@[+][package:]type/name" or a theme
 attribute in the form
 "?[package:]type/name".

A B C D E F G H I K L M N O P Q R S T U V W X Z

Skip navigation links

Package

Class

Tree

Deprecated

Index

Help

Prev Letter

Next Letter

Frames

No Frames

All Classes


text:
Installation and Execution
==========================

`Single-file, click-to-run executables <https://github.com/sametz/nmrmint/releases>`_ are available for Windows (64-bit) and Mac OSX. A Linux version is planned but not available yet. See the `CHANGELOG <https://github.com/sametz/nmrmint/blob/master/CHANGELOG.rst>`_ for the map towards a Version 1 release.

Alternatively, the Python code can be downloaded and executed. The essential package components required to run the application are main.py plus the nmrmint subfolder and its contents. The project was developed with Python 3.6; older versions may work, but have not been tested yet.

The dependencies listed in requirements.txt are also required.
If pip is installed, the following command should automatically install the required dependencies::

>>>pip install -r requirements.txt

If you are familiar with virtual environments (e.g. using virtualenv, venv, or conda), you may wish to create one specifically for running this code, and install Python 3.6 and requirements there. If you use an Anaconda installation of Python, it is quite easy to set up and switch between different environments. See `the conda documentation`_ for details.

.. _the conda documentation: https://conda.io/docs/using/envs.html

Once the required code has been downloaded, and requirements installed, the nmrmint application can be launched by running main.py from the command line within the top-level nmrmint directory: ::

    $ python main.py