answer
stringlengths
15
1.25M
#ifndef <API key> #define <API key> #include "fsl_common.h" /* * @addtogroup debug_console * @{ */ /*! @brief Definition to select sdk or toolchain printf, scanf. */ #ifndef SDK_DEBUGCONSOLE #define SDK_DEBUGCONSOLE 1U #endif /*! @brief Definition to printf float number. */ #ifndef PRINTF_FLOAT_ENABLE #define PRINTF_FLOAT_ENABLE 1U #endif /* PRINTF_FLOAT_ENABLE */ /*! @brief Definition to scanf float number. */ #ifndef SCANF_FLOAT_ENABLE #define SCANF_FLOAT_ENABLE 1U #endif /* SCANF_FLOAT_ENABLE */ /*! @brief Definition to support advanced format specifier for printf. */ #ifndef <API key> #define <API key> 1U #endif /* <API key> */ /*! @brief Definition to support advanced format specifier for scanf. */ #ifndef <API key> #define <API key> 1U #endif /* <API key> */ #if SDK_DEBUGCONSOLE /* Select printf, scanf, putchar, getchar of SDK version. */ #define PRINTF DbgConsole_Printf #define SCANF DbgConsole_Scanf #define PUTCHAR DbgConsole_Putchar #define GETCHAR DbgConsole_Getchar #else /* Select printf, scanf, putchar, getchar of toolchain. */ #define PRINTF printf #define SCANF scanf #define PUTCHAR putchar #define GETCHAR getchar #endif /* SDK_DEBUGCONSOLE */ #if defined(__cplusplus) extern "C" { #endif /* __cplusplus */ /*! @name Initialization*/ /*! * @brief Initialize the the peripheral used for debug messages. * * Call this function to enable debug log messages to be output via the specified peripheral, * frequency of peripheral source clock, base address at the specified baud rate. * After this function has returned, stdout and stdin will be connected to the selected peripheral. * * @param baseAddr Which address of peripheral is used to send debug messages. * @param baudRate The desired baud rate in bits per second. * @param device Low level device type for the debug console, could be one of: * @arg <API key>, * @arg <API key>, * @arg <API key>, * @arg <API key>. * @param clkSrcFreq Frequency of peripheral source clock. * * @return Whether initialization was successful or not. * @retval kStatus_Success Execution successfully * @retval kStatus_Fail Execution failure * @retval <API key> Invalid argument existed */ status_t DbgConsole_Init(uint32_t baseAddr, uint32_t baudRate, uint8_t device, uint32_t clkSrcFreq); /*! * @brief De-initialize the peripheral used for debug messages. * * Call this function to disable debug log messages to be output via the specified peripheral * base address and at the specified baud rate. * * @return Whether de-initialization was successful or not. */ status_t DbgConsole_Deinit(void); #if SDK_DEBUGCONSOLE /*! * @brief Writes formatted output to the standard output stream. * * Call this function to Writes formatted output to the standard output stream. * * @param fmt_s Format control string. * @return Returns the number of characters printed, or a negative value if an error occurs. */ int DbgConsole_Printf(char *fmt_s, ...); /*! * @brief Writes a character to stdout. * * Call this function to write a character to stdout. * * @param ch Character to be written. * @return Returns the character written. */ int DbgConsole_Putchar(int ch); /*! * @brief Reads formatted data from the standard input stream. * * Call this function to read formatted data from the standard input stream. * * @param fmt_ptr Format control string. * @return Returns the number of fields successfully converted and assigned. */ int DbgConsole_Scanf(char *fmt_ptr, ...); /*! * @brief Reads a character from standard input. * * Call this function to read a character from standard input. * * @return Returns the character read. */ int DbgConsole_Getchar(void); #endif /* SDK_DEBUGCONSOLE */ #if defined(__cplusplus) } #endif /* __cplusplus */ #endif /* <API key> */
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Latihan extends CI_Controller{ public function __construct(){ parent::__construct(); //Codeigniter : Write Less Do More } function index(){ $this->load->view('mhs/latihan'); // $this->load->view('sample'); } } ?>
package tabular import ( "bufio" "bytes" "io" "testing" "github.com/stretchr/testify/suite" ) var ( testHeaders = []struct { Key string Title string }{ { Key: "name", Title: "First name", }, { Key: "surname", Title: "Last name", }, { Key: "age", Title: "Age", }, } testRows = [][]string{ {"Julia", "Roberts", "40"}, {"John", "Malkovich", "42"}, } ) type mockWriter struct { } func (mw *mockWriter) Name() string { return "mock" } func (mw *mockWriter) NeedsHeaders() bool { return false } func (mw *mockWriter) Write(d *Dataset, w io.Writer) error { return nil } func newTestDataset() (*Dataset, error) { d := NewDataSet() for _, hdr := range testHeaders { d.AddHeader(hdr.Key, hdr.Title) } for _, row := range testRows { r := NewRowFromSlice(row) if err := d.Append(r); err != nil { return nil, err } } return d, nil } func newTestWrite(d *Dataset, w Writer) (string, error) { var buf bytes.Buffer bufw := bufio.NewWriter(&buf) if err := d.Write(w, bufw); err != nil { return "", err } if err := bufw.Flush(); err != nil { return "", err } return buf.String(), nil } type DatasetTestSuite struct { suite.Suite } func (s *DatasetTestSuite) <API key>() { d := NewDataSet() d.AddHeader("name", "Name") r1 := NewRow("john") err := d.Append(r1) s.Nil(err) r2 := NewRow("julia", "mitchell") err = d.Append(r2) s.Error(err) s.True(d.HasHeaders()) } func (s *DatasetTestSuite) <API key>() { d := NewDataSet() r1 := NewRow("julia", "mitchell") err := d.Append(r1) s.Nil(err) r2 := NewRow("john") err = d.Append(r2) s.Error(err) s.False(d.HasHeaders()) } func (s *DatasetTestSuite) TestSort() { d := NewDataSet() d.AddHeader("name", "Name") d.AddHeader("surname", "Surname") r1 := NewRow("julia", "mitchell") r2 := NewRow("martin", "brown") r3 := NewRow("peter", "kafka") s.NoError(d.Append(r1, r2, r3)) d.Sort("name", false) e1, _ := d.Get(0) e2, _ := d.Get(1) e3, _ := d.Get(2) s.Equal(e1, r1) s.Equal(e2, r2) s.Equal(e3, r3) } func (s *DatasetTestSuite) TestSortReverse() { d := NewDataSet() d.AddHeader("name", "Name") d.AddHeader("surname", "Surname") r1 := NewRow("julia", "mitchell") r2 := NewRow("martin", "brown") r3 := NewRow("peter", "kafka") s.NoError(d.Append(r1, r2, r3)) d.Sort("name", true) e1, _ := d.Get(0) e2, _ := d.Get(1) e3, _ := d.Get(2) s.Equal(e1, r3) s.Equal(e2, r2) s.Equal(e3, r1) } func (s *DatasetTestSuite) TestHasColumns() { d := NewDataSet() d.AddHeader("name", "Name") d.AddHeader("surname", "Surname") s.True(d.HasCol("name")) s.True(d.HasCol("surname")) s.False(d.HasCol("not")) s.Equal(2, d.HeaderCount()) } func (s *DatasetTestSuite) TestColValues() { d := NewDataSet() d.AddHeader("name", "Name") d.AddHeader("surname", "Surname") r1 := NewRow("julia", "mitchell") r2 := NewRow("martin", "brown") r3 := NewRow("peter", "kafka") s.NoError(d.Append(r1, r2, r3)) s.Equal([]string{"julia", "martin", "peter"}, d.GetColValues("name")) s.Equal([]string{"mitchell", "brown", "kafka"}, d.GetColValues("surname")) } func (s *DatasetTestSuite) TestColWidth() { d := NewDataSet() d.AddHeader("name", "Name") d.AddHeader("surname", "Surname") r1 := NewRow("julia", "mitchell") r2 := NewRow("martin", "brown") r3 := NewRow("peter", "kafka") s.NoError(d.Append(r1, r2, r3)) s.Equal(6, d.GetKeyWidth("name")) s.Equal(8, d.GetKeyWidth("surname")) s.Equal(0, d.GetKeyWidth("not")) s.Equal(6, d.GetIdxWidth(0)) s.Equal(8, d.GetIdxWidth(1)) s.Equal(0, d.GetIdxWidth(23)) } func (s *DatasetTestSuite) <API key>() { d := NewDataSet() d.AddHeader("name", "Name") d.AddHeader("surname", "Surname") mw := &mockWriter{} err := d.Write(mw, nil) s.Error(err) s.Equal(err, ErrEmptyDataset) } func <API key>(t *testing.T) { suite.Run(t, new(DatasetTestSuite)) }
<?php use Symfony\Component\HttpKernel\Kernel; use Symfony\Component\Config\Loader\LoaderInterface; class AppKernel extends Kernel { public function registerBundles() { $bundles = array( new Symfony\Bundle\FrameworkBundle\FrameworkBundle(), new Symfony\Bundle\SecurityBundle\SecurityBundle(), new Symfony\Bundle\TwigBundle\TwigBundle(), new Symfony\Bundle\MonologBundle\MonologBundle(), new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(), new Symfony\Bundle\DoctrineBundle\DoctrineBundle(), new Symfony\Bundle\AsseticBundle\AsseticBundle(), new Sensio\Bundle\<API key>\<API key>(), new JMS\SecurityExtraBundle\<API key>(), new DLauritz\Forum\AdminBundle\<API key>(), new DLauritz\Forum\ForumBundle\<API key>(), new DLauritz\Forum\UserBundle\<API key>(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\<API key>(); $bundles[] = new Sensio\Bundle\GeneratorBundle\<API key>(); } return $bundles; } public function <API key>(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } }
<section data-ng-controller="ArticlesController" data-ng-init="findOne()"> <div class="page-header"> <h1>Edit Post</h1> </div> <div class="col-md-12"> <form name="articleForm" class="form-horizontal" data-ng-submit="update()" novalidate> <fieldset> <div class="form-group"> <label class="control-label" for="title">Title</label> <div class="controls"> <input name="title" type="text" data-ng-model="article.title" id="title" class="form-control" placeholder="Title" required> </div> </div> <div class="form-group"> <label class="control-label" for="content">Content</label> <div class="controls"> <textarea name="content" data-ng-model="article.content" id="content" class="form-control" cols="30" rows="10" placeholder="Content"></textarea> </div> </div> <div class="form-group"> <input type="submit" value="Update" class="btn btn-default"> </div> <div data-ng-show="error" class="text-danger"> <strong data-ng-bind="error"></strong> </div> </fieldset> </form> </div> </section>
#<API key> [![Build Status](https: [![Code Coverage](https: [![Scrutinizer Code Quality](https: We provide here a tool to transform an English question into a triple: (subject, predicate, object) We emphasis on keywords questions like "Barack Obama birth date?" You can find some examples of this transformation is the file data/AnnotatedQuestions.txt. ## How to install Download the git repository: git clone https://github.com/ProjetPP/<API key> cd <API key> Then, install the script: python3 setup.py install Use the `--user` option if you want to install it only for the current user. ## Bootstrap Short version: run `./bootstrap.sh` Detailed version: Download the look-up table: cd data wget http://metaoptimize.s3.amazonaws.com/<API key>/embeddings-scaled.EMBEDDING_SIZE=25.txt.gz gzip -d embeddings-scaled.EMBEDDING_SIZE=25.txt.gz Generate the data set The goal of <API key>/Dataset.py is to transform English questions in a vectorized form that is compatible with our ML model, according to a lookup table. The english data set of questions is in the file: data/AnnotatedQuestions.txt Compile the data set with the command: python3 demo/Dataset.py Learn the Python model python3 demo/Learn.py ##Use the tool in CLI Execute the command: python3 demo/Demo.py Type a question in English, and the program will compute the triple associated to the question. Example: birth date Barack Obama? (Barack Obama, birth date, ?) ##Use the tool with the server gunicorn <API key>:app -b 127.0.0.1:8080 In a python shell: import requests, json requests.post('http://localhost:8080/', data=json.dumps({'id': 'foo', 'language': 'en', 'measures': {}, 'trace': [], 'tree': {'type': 'sentence', 'value': 'What is the birth date of George Washington?'}})).json()
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>stalmarck: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.0 / stalmarck - 8.14.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> stalmarck <small> 8.14.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-07 06:33:16 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-07 06:33:16 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.10.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/coq-community/stalmarck&quot; dev-repo: &quot;git+https://github.com/coq-community/stalmarck.git&quot; bug-reports: &quot;https://github.com/coq-community/stalmarck/issues&quot; license: &quot;LGPL-2.1-or-later&quot; synopsis: &quot;Correctness proof of Stålmarck&#39;s algorithm in Coq&quot; description: &quot;&quot;&quot; A two-level approach to prove tautologies using Stålmarck&#39;s algorithm in Coq.&quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.14&quot; &amp; &lt; &quot;8.15~&quot;} ] tags: [ &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Decision procedures&quot; &quot;keyword:boolean formula&quot; &quot;keyword:tautology checker&quot; &quot;logpath:Stalmarck.Algorithm&quot; &quot;date:2021-10-30&quot; ] authors: [ &quot;Pierre Letouzey&quot; &quot;Laurent Théry&quot; ] url { src: &quot;https://github.com/coq-community/stalmarck/archive/v8.14.0.tar.gz&quot; checksum: &quot;sha512=5080457e36384932e4f94bda7c68d816388a6ce282262c44b92cf00c482c43d06fe3df842121aa62d734f6b82af9687743bbb59a0b77571c4573bd75799ee2b8&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-stalmarck.8.14.0 coq.8.10.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.10.0). The following dependencies couldn&#39;t be met: - coq-stalmarck -&gt; coq &gt;= 8.14 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-stalmarck.8.14.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
-- a simple telnet server -- https://github.com/nodemcu/nodemcu-firmware/blob/master/lua_examples/telnet.lua tport = tport or 2323 _telnet_srv = net.createServer(net.TCP, 180) print("Telnet port: " .. (tport)) _telnet_srv:listen(tport, function(socket) local fifo = {} local fifo_drained = true local function sender(c) if #fifo > 0 then str=table.remove(fifo, 1) if #str ==0 then str = " " end c:send(str) else fifo_drained = true end end local function s_output(str) table.insert(fifo, str) if socket ~= nil and fifo_drained then fifo_drained = false sender(socket) end end node.output(s_output, 1) -- re-direct output to function s_ouput. socket:on("receive", function(c, l) node.input(l) -- works like pcall(loadstring(l)) but support multiple separate line end) socket:on("disconnection", function(c) node.output(nil) -- un-regist the redirect output function, output goes to serial print("Telnet fin") end) socket:on("sent", sender) socket:on("connection", function(c) print("ESP8266 Telnet on") end ) --print("Welcome.") end)
"use strict"; var EventEmitter = require ('events'); module.exports = new EventEmitter ();
'use strict' const tap = require('tap') const ActiveDirectory = require('../index') const config = require('./config') const serverFactory = require('./mockServer') const settings = require('./settings').<API key> tap.beforeEach((done, t) => { serverFactory(function (err, server) { if (err) return done(err) const connectionConfig = config(server.port) t.context.ad = new ActiveDirectory(connectionConfig) t.context.server = server done() }) }) tap.afterEach((done, t) => { if (t.context.server) t.context.server.close() done() }) tap.test('#<API key>()', t => { settings.users.forEach((user) => { ['dn', 'userPrincipalName', 'sAMAccountName'].forEach((attr) => { const len = user.members.length t.test(`should return ${len} groups for ${attr}`, t => { t.context.ad.<API key>(user[attr], function (err, groups) { t.error(err) t.true(groups.length >= user.members.length) const groupNames = groups.map((g) => { return g.cn }) user.members.forEach((g) => { t.true(groupNames.includes(g)) }) t.end() }) }) }) }) t.test('should return empty groups if groupName doesn\'t exist', t => { t.context.ad.<API key>('!!!NON-EXISTENT GROUP!!!', function (err, groups) { t.error(err) t.type(groups, Array) t.equal(groups.length, 0) t.end() }) }) t.test('should return default group attributes when not specified', t => { const defaultAttributes = ['objectCategory', 'distinguishedName', 'cn', 'description'] const user = settings.users[0] t.context.ad.<API key>(user.userPrincipalName, function (err, groups) { t.error(err) t.ok(groups) groups.forEach((g) => { const keys = Object.keys(g) defaultAttributes.forEach((attr) => { t.true(keys.includes(attr)) }) }) t.end() }) }) t.end() }) tap.test('#<API key>(opts)', t => { t.test('should return only requested attributes', t => { const opts = { attributes: ['createTimeStamp'] } const user = settings.users[0] t.context.ad.<API key>(opts, user.userPrincipalName, function (err, groups) { t.error(err) t.ok(groups) t.true(groups.length >= user.members.length) groups.forEach((g) => { const keys = Object.keys(g) keys.forEach((attr) => { t.true(opts.attributes.includes(attr)) }) }) t.end() }) }) t.end() })
package com.github.lg198.codefray.jfx; import com.github.lg198.codefray.api.game.Team; import com.github.lg198.codefray.game.GameEndReason; import com.github.lg198.codefray.game.GameStatistics; import com.github.lg198.codefray.util.TimeFormatter; import javafx.geometry.Insets; import javafx.geometry.Pos; import javafx.scene.control.Label; import javafx.scene.control.ProgressBar; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; public class GameResultGui { private final GameStatistics stats; public GameResultGui(GameStatistics gs) { stats = gs; } public VBox build() { VBox root = new VBox(); root.setAlignment(Pos.CENTER); root.setSpacing(10); root.setPadding(new Insets(15)); Label title = new Label("Game Result"); title.setStyle("-fx-font-size: 30px"); title.setUnderline(true); root.getChildren().add(title); VBox.setMargin(title, new Insets(0, 0, 5, 0)); root.getChildren().addAll( createWinnerStatBox(stats.reason), createStatBox("Rounds:", "" + stats.rounds), createStatBox("Length:", TimeFormatter.format(stats.timeInSeconds)), createStatBox("Red Golems Left:", "" + stats.redLeft), createStatBox("Blue Golems Left:", "" + stats.blueLeft), createStatBox("Red Health:", stats.redHealthPercent, Team.RED), createStatBox("Blue Health:", stats.blueHealthPercent, Team.BLUE) ); return root; } private HBox createWinnerStatBox(GameEndReason reason) { HBox box = new HBox(); box.setSpacing(6); box.setAlignment(Pos.CENTER); if (reason instanceof GameEndReason.Win) { Label key = new Label("Winner:"); Label value = new Label(((GameEndReason.Win)reason).winner.name()); key.setStyle("-fx-font-size: 20px"); value.setStyle(key.getStyle()); box.getChildren().addAll(key, value); return box; } else if (reason instanceof GameEndReason.Infraction) { Label key = new Label(((GameEndReason.Infraction)reason).guilty.name() + " cheated and lost"); key.setStyle("-fx-font-size: 20px"); box.getChildren().addAll(key); return box; } else { Label key = new Label("Winner:"); Label value = new Label("None"); key.setStyle("-fx-font-size: 20px"); value.setStyle(key.getStyle()); box.getChildren().addAll(key, value); return box; } } private HBox createStatBox(String name, String value) { HBox box = new HBox(); box.setSpacing(6); box.setAlignment(Pos.CENTER); box.getChildren().addAll(new Label(name), new Label(value)); return box; } private HBox createStatBox(String name, double perc, Team team) { HBox box = new HBox(); box.setAlignment(Pos.CENTER); box.setSpacing(6); ProgressBar pb = new ProgressBar(perc); if (team == Team.RED) { pb.setStyle("-fx-accent: red"); } else { pb.setStyle("-fx-accent: blue"); } box.getChildren().addAll(new Label(name), pb); return box; } }
<?php namespace Flatmate\UtilitiesBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * Consumption * * @ORM\Table() * @ORM\Entity * @ORM\<API key>() */ class Consumption { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var integer * * @ORM\Column(name="category_id", type="integer") */ private $categoryId; /** * @var string * * @ORM\Column(name="name", type="string", length=255) * @Assert\NotBlank(message="consumption.name.not_blank") */ private $name; /** * @var string * * @ORM\Column(name="value", type="decimal", scale=1) * @Assert\NotBlank(message="consumption.value.not_blank") */ private $value; /** * @var \DateTime * * @ORM\Column(name="created_at", type="datetime") */ private $createdAt; /** * @var * * @ORM\ManyToOne(targetEntity="Category") * @ORM\JoinColumn(name="category_id", <API key>="id", onDelete="CASCADE") */ private $category; /** * @var integer * * @ORM\Column(name="user_id", type="integer") */ private $userId; /** * @var string * * @ORM\ManyToOne(targetEntity="Flatmate\UserBundle\Entity\User") * @ORM\JoinColumn(name="user_id", <API key>="id", onDelete="CASCADE") */ private $user; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set categoryId * * @param integer $categoryId * @return Consumption */ public function setCategoryId($categoryId) { $this->categoryId = $categoryId; return $this; } /** * Set category * * @param $category * @return $this */ public function setCategory($category) { $this->category = $category; return $this; } /** * Get categoryId * * @return integer */ public function getCategoryId() { return $this->categoryId; } /** * Get category * * @return mixed */ public function getCategory() { return $this->category; } /** * Set name * * @param string $name * @return Consumption */ public function setName($name) { $this->name = $name; return $this; } /** * Get name * * @return string */ public function getName() { return $this->name; } /** * Set value * * @param string $value * @return Consumption */ public function setValue($value) { $this->value = $value; return $this; } /** * Get value * * @return string */ public function getValue() { return $this->value; } /** * Set createdAt * * @param \DateTime $createdAt * @return Consumption */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * Set Created At value at current time * * @ORM\PrePersist */ public function setCreatedAtNow() { $this->createdAt = new \DateTime(); } /** * Get User ID * * @return integer */ public function getUserId() { return $this->userId; } /** * Set User ID * * @param $userId */ public function setUserId($userId) { $this->userId = $userId; } /** * Get User * * @return string */ public function getUser() { return $this->user; } /** * Set User * * @param User */ public function setUser($user) { $this->user = $user; } }
<!--<?php # MetInfo Enterprise Content Management System require_once template('head'); echo <<<EOT </head> <body> <! EOT; $title="<a href='index.php?anyid={$anyid}&lang={$lang}&class1={$class1}'>{$met_class[$class1][name]}</a>"; $class1=$class1?$class1:($id?$id:0); $title=title($class1,$anyid,$lang)?title($class1,$anyid,$lang):$title; require_once template('content/message/top'); echo <<<EOT <form method="POST" name="myform" action="inc.php?anyid={$anyid}&lang=$lang" target="_self"> <input name="action" type="hidden" value="modify"> <input name="class1" type="hidden" value="$class1"> <div class="v52fmbx_tbmax"> <div class="v52fmbx_tbbox"> <div class="v52fmbx"> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_messagesubmit}{$lang_marks}</dt> <dd> <label><input name="met_fd_ok" type="radio" class="radio" value="1" $met_fd_ok1[1] />{$lang_open}</label> <label><input name="met_fd_ok" type="radio" class="radio" value="0" $met_fd_ok1[0]/>{$lang_close}</label> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_fdincTime}{$lang_marks}</dt> <dd> <input name="met_fd_time" type="text" class="text" value="$met_fd_time" /> <span class="tips">{$lang_fdincTip4}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_fdincSlash}{$lang_marks}</dt> <dd> <textarea name="met_fd_word" class="textarea gen" cols="50" rows="3" >$met_fd_word</textarea> <span class="tips">{$lang_fdincTip5}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_message_name}{$lang_marks}</dt> <dd> <select name="<API key>"> <! EOT; foreach($fd_paraall as $key=>$val){ $select1=''; if($val[id]==$<API key>)$select1="selected='selected'"; echo <<<EOT --> <option value="$val[id]" $select1 >$val[name]</option> <! EOT; } echo <<<EOT </select> <span class="tips">{$lang_message_name1}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$<API key>}{$lang_marks}</dt> <dd> <select name="<API key>"> <! EOT; foreach($fd_paraalls as $key=>$val){ $select1=''; if($val[id]==$<API key>)$select1="selected='selected'"; echo <<<EOT --> <option value="$val[id]" $select1 >$val[name]</option> <! EOT; } echo <<<EOT </select> <span class="tips">{$<API key>}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_messageincShow}{$lang_marks}</dt> <dd> <label><input name="met_fd_type" type="checkbox" class="checkbox" value="1" $met_fd_type1 />{$lang_messageincTip3}</label> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_messageincSend}{$lang_marks}</dt> <dd> <label><input name="met_fd_email" type="checkbox" class="checkbox" value="1" $met_fd_email1 />{$lang_messageincTip4}</label> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$<API key>}{$lang_marks}</dt> <dd> <input name="met_fd_to" type="text" class="text" value="$met_fd_to" /> <span class="tips">{$lang_fdincTip9}</span> </dd> </dl> </div> <h3 class="v52fmbx_hr metsliding" sliding="1">{$lang_feedbackauto}</h3> <div class="metsliding_box metsliding_box_1"> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_fdincAuto}{$lang_marks}</dt> <dd> <label><input name="met_fd_back" type="checkbox" class="checkbox" value="1" {$met_fd_back1} />{$lang_fdincTip10}</label> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_fdincEmailName}{$lang_marks}</dt> <dd> <select name="<API key>"> <! EOT; foreach($fd_paraall as $key=>$val){ $select1=''; if($val[id]==$<API key>)$select1="selected='selected'"; echo <<<EOT <option value="$val[id]" $select1 >$val[name]</option> <! EOT; } echo <<<EOT </select> <span class="tips">{$lang_fdincTip11}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$<API key>}{$lang_marks}</dt> <dd> <input name="met_fd_title" type="text" class="text" value="$met_fd_title" /> <span class="tips">{$<API key>}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$<API key>}{$lang_marks}</dt> <dd> <textarea name="met_fd_content" cols="50" class="textarea gen" rows="3">$met_fd_content</textarea> <span class="tips">{$lang_htmlok}</span> </dd> </dl> </div> <h3 class="v52fmbx_hr metsliding" sliding="1">{$<API key>}</h3> <div class="metsliding_box metsliding_box_1"> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_fdincAutosms}{$lang_marks}</dt> <dd> <label><input type="checkbox" value=1 name="met_fd_sms_back" $met_fd_sms_back1/>{$lang_fdincTipsms}</label> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_fdinctellsms}{$lang_marks}</dt> <dd> <select name="met_message_fd_sms"> <! EOT; foreach($fd_paraall as $key=>$val){ $select1=''; if($val[id]==$met_message_fd_sms)$select1="selected='selected'"; echo <<<EOT <option value="$val[id]" $select1 >$val[name]</option> <! EOT; } echo <<<EOT </select> <span class="tips">{$lang_fdinctells}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <div class="v52fmbx_dlbox"> <dl> <dt>{$<API key>}{$lang_marks}</dt> <dd> <textarea name="met_fd_sms_content" cols="50" class="textarea gen" rows="3">$met_fd_sms_content</textarea> <span class="tips"></span> </dd> </dl> </div> <div class="v52fmbx_submit"> <input type="submit" name="Submit" value="{$lang_Submit}" class="submit" onclick="return Smit($(this),'myform')" /> </div> </div> </div> </div> </div> </div> </div> </form> <div class="footer">{$foot}</div> </body> </html> <! EOT; ?>
<? include('dbconnect.php'); $headerOptions = array( "title" => "Edit Stats" ); require_once "header.php"; ?> <?php $tn = $_GET['tn']; $played = $_GET['played']; $wins = $_GET['wins']; $losses = $_GET['losses']; $draws = $_GET['draws']; $ncs = $_GET['ncs']; $sql = "SELECT team_id FROM Team WHERE team_name='".$tn."';"; $result = mysql_query($sql) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error()); $tid = mysql_result($result, 0); //Update game... $sql = "UPDATE Stats SET played='".$played."', wins='".$wins."', losses='".$losses."', draws='".$draws."', ncs='".$ncs."' WHERE team_id='".$tid."';"; $result = mysql_query($sql) or die("<b>A fatal MySQL error occured</b>.\n<br />Query: " . $sql . "<br />\nError: (" . mysql_errno() . ") " . mysql_error()); //$sql = "SELECT game_id FROM Game WHERE game_date='".$date."' AND game_time='".$time."' AND game_location='".$location."';"; //Redirect back to getteam.php header("Location: getteam.php?teamname=".$tn."");//?leaguetype='".$leaguetype."'&sport='".$sport."'&submit=Set+League"); ?>
#include "ErrorCodes.h" std::error_code make_error_code(SimBlockErrc ec) { return {static_cast<int>(ec), simblockErrCategory}; }
<?php /* Safe sample input : backticks interpretation, reading the file /tmp/tainted.txt sanitize : cast in float construction : use of sprintf via a %d with simple quote */ $tainted = `cat /tmp/tainted.txt`; $tainted = (float) $tainted ; $var = include(sprintf("pages/'%d'.php", $tainted)); ?>
<div class="ui container" id="event"> <div class="ui stackable one column grid"> <div class="column"> <div class="ui card"> <div class="content"> <div class="header">{{ vm.event.attributes.title }}</div> </div><!-- header --> <div class="content"> <h3>Organization: {{ vm.event.attributes.organization }}</h3> <div class="ui large feed"> <div class="event"> <div class="content"> <div class="summary"> <span ng-if="vm.event.attributes.address != null">Location: {{ vm.event.attributes.address }}</span> <span ng-if="vm.event.attributes.address == null">Location: N/A</span> <br> <span ng-if="vm.event.attributes.start != null">Start Date: {{ vm.event.attributes.start | amDateFormat: 'dddd, MMMM Do YYYY, h:mm a' }}</span> <span ng-if="vm.event.attributes.start == null">Start Date: N/A</span> <br> <span ng-if="vm.event.attributes.end != null">End Date: {{ vm.event.attributes.end | amDateFormat: 'dddd, MMMM Do YYYY, h:mm a' }}</span> <span ng-if="vm.event.attributes.end == null">End Date: N/A</span> <br> <h3>Information</h3> Description: <br> <p ng-if="vm.event.attributes.description != null">{{ vm.event.attributes.description }}</p> <p ng-if="vm.event.attributes.description == null">No description. Please visit the link for more details!</p> <p ng-if="vm.event.attributes.age != null">Minimum Age: {{ vm.event.attributes.age }}</p> <p ng-if="vm.event.attributes.age == null">Minimum Age: No age requirement!</p> <p ng-if="vm.event.attributes.skills != null">Skills Needed: {{ vm.event.attributes.skills }}</p> <p ng-if="vm.event.attributes.skills == null">Skills Needed: No skills required!</p> </div> </div> </div> </div> </div><!-- content --> <div class="ui positive right labeled icon button" ng-click="vm.hyperlink()">Volunteer Now <i class="checkmark icon"></i></div><!-- volunteer button --> </div><!-- card --> <br> <div class="ui card" id="comment"> <comments></comments> <h3 class="form-header">Comments</h3> <div class="ui relaxed divided list"> <div class="item" ng-repeat="comment in vm.comments"> <div class="item"> <div class="content"> <div class="header">{{ comment.attributes.name }} says...</div> <div class="description">{{ comment.attributes.content }}</div> </div> </div> </div> </div> </div><!-- comments --> </div><!-- column --> </div><!-- grid --> </div>
<?php namespace Oriancci\Query; class Insert extends Built { public function buildQuery() { // INSERT INTO $sql = 'INSERT INTO '; $sql .= $this->buildTableName(INSERT_INTO); // SET $sql .= ' SET '; $sql .= $this->buildSet(SET); return $sql; } }
package pl.yourempire.api.event; import java.lang.reflect.<API key>; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.Map; public class Event { private static Map<Class<Event>, ArrayList<ListenerCaller>> listenerMap = new HashMap<>(); public static void callEvent(Event e) { if (listenerMap.containsKey(e.getClass())) { for (ListenerCaller lc : listenerMap.get(e.getClass())) { try { lc.getEventMethod().invoke(lc.getInstance(), e); } catch (<API key> e1) { e1.printStackTrace(); } catch (<API key> e1) { e1.printStackTrace(); } } } } public static boolean isEvent(Class<?> clazz) { try { clazz.cast(Event.class); return true; } catch(ClassCastException e) { return false; } } public static void registerListener(Listener l) { Arrays.asList(l.getClass().getMethods()).forEach(m -> { if (m.getParameterTypes().length == 1 && isEvent(m.getParameterTypes()[0])) { listenerMap.get(m.getParameterTypes()[0]).add(new ListenerCaller(l, m)); } }); } protected boolean cancelled; public Event() { cancelled = false; } public void setCancelled(boolean flag) { this.cancelled = flag; } public boolean isCancelled() { return this.cancelled; } }
tinyMCE.init({ mode : 'textareas', theme : "advanced", <API key> : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect", <API key> : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor", });
package org.fluentjava.iwant.plannerapi; public interface ResourcePool { boolean hasFreeResources(); Resource acquire(); void release(Resource resource); }
#ifndef <API key> #define <API key> 1 #include <mi/VolumeData.hpp> class EndocastExtractor { private: public: EndocastExtractor ( void ) ; ~EndocastExtractor ( void ) ; bool extract ( mi::VolumeData<float>& distData, mi::VolumeData<int>& labelData, const double scale ) ; private: bool init ( mi::VolumeData<float>& distData, mi::VolumeData<int>& labelData, const double scale ) ; bool run ( mi::VolumeData<float>& distData, mi::VolumeData<int>& labelData ) ; }; #endif // <API key>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>qcert: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.2 / qcert - 1.0.5</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> qcert <small> 1.0.5 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-10-27 14:06:13 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-27 14:06:13 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.2 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;jeromesimeon@me.com&quot; homepage: &quot;https://querycert.github.io&quot; dev-repo: &quot;git+https://github.com/querycert/qcert&quot; bug-reports: &quot;https://github.com/querycert/qcert/issues&quot; authors: [ &quot;Josh Auerbach&quot; &quot;Martin Hirzel&quot; &quot;Louis Mandel&quot; &quot;Avi Shinnar&quot; &quot;Jerome Simeon&quot; ] license: &quot;Apache-2.0&quot; build: [ [make &quot;-j%{jobs}%&quot; &quot;qcert-coq&quot;] ] install: [ [make &quot;install-coq&quot;] ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7.2&quot; &amp; &lt; &quot;8.8&quot;} ] synopsis: &quot;A platform for implementing and verifying query compilers&quot; url { src: &quot;https://github.com/querycert/qcert/archive/v1.0.5.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-qcert.1.0.5 coq.8.12.2</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.2). The following dependencies couldn&#39;t be met: - coq-qcert -&gt; coq &lt; 8.8 -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-qcert.1.0.5</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>menhirlib: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.14.0 / menhirlib - 20201122</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> menhirlib <small> 20201122 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-23 01:13:15 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-23 01:13:15 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq 8.14.0 Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.10.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.10.2 Official release 4.10.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; synopsis: &quot;A support library for verified Coq parsers produced by Menhir&quot; maintainer: &quot;francois.pottier@inria.fr&quot; authors: [ &quot;Jacques-Henri Jourdan &lt;jacques-henri.jourdan@lri.fr&gt;&quot; ] homepage: &quot;https://gitlab.inria.fr/fpottier/coq-menhirlib&quot; dev-repo: &quot;git+https://gitlab.inria.fr/fpottier/menhir.git&quot; bug-reports: &quot;jacques-henri.jourdan@lri.fr&quot; license: &quot;LGPL-3.0-or-later&quot; build: [ [make &quot;-C&quot; &quot;coq-menhirlib&quot; &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;-C&quot; &quot;coq-menhirlib&quot; &quot;install&quot;] ] depends: [ &quot;coq&quot; { &gt;= &quot;8.7&quot; &amp; &lt; &quot;8.14&quot; } ] conflicts: [ &quot;menhir&quot; { != &quot;20201122&quot; } ] tags: [ &quot;date:2020-11-22&quot; &quot;logpath:MenhirLib&quot; ] url { src: &quot;https://gitlab.inria.fr/fpottier/menhir/-/archive/20201122/archive.tar.gz&quot; checksum: [ &quot;md5=<API key>&quot; &quot;sha512=9174e74cfb2336c5008c7461411ba79190e673d310da99117e363f60782bcf9a4bb26a04f6448cf6f3ed7888aa2b5b04d38c32e6d86594accfaadbbb72528068&quot; ] } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-menhirlib.20201122 coq.8.14.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.14.0). The following dependencies couldn&#39;t be met: - coq-menhirlib -&gt; coq &lt; 8.14 -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-menhirlib.20201122</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
/* eslint-env node */ 'use strict'; const EmberAddon = require('ember-cli/lib/broccoli/ember-addon'); module.exports = function(defaults) { let app = new EmberAddon(defaults, { 'ember-cli-babel': { includePolyfill: true } }); app.import('node_modules/highlightjs/styles/monokai-sublime.css'); /* This build file specifies the options for the dummy test app of this addon, located in `/tests/dummy` This build file does *not* influence how the addon or the app using it behave. You most likely want to be modifying `./index.js` or app's build file */ return app.toTree(); };
import { SplashEffect } from "./effect.js"; import { Linear } from "../interpolation.js"; export class <API key> extends SplashEffect { constructor(element, options) { super(element); options = options || {}; this.x = options.x || 0; this.y = options.y || 0; // Can be whatever, but the effect won't do // anything if it isn't a valid css unit. this.unit = options.unit || "px"; // Can be either "transform" or "position" this.translationType = options.translationType || "transform"; this.interpolation = options.interpolation || new Linear(); } in(value) { this._set( this.interpolation.in(value * -1 + 1) * this.x, this.interpolation.in(value * -1 + 1) * this.y ); } out(value) { this._set( this.interpolation.out(value) * this.x, this.interpolation.out(value) * this.y ); } _set(x, y) { if (this.translationType = "transform") { this.setTransform("translateX", x + this.unit); this.setTransform("translateY", y + this.unit); } else if (this.translationType = "position") { this.setStyle("left", x + this.unit); this.setStyle("top", y + this.unit); } else { console.error("Unknown translation type: " + this.translationType); } } }
/* RTL except Hebrew (see below): Tahoma as the first font; */ body.rtl, body.rtl .press-this a.wp-switch-editor { font-family: Tahoma, Arial, sans-serif; } /* Arial is best for RTL headings. */ .rtl h1, .rtl h2, .rtl h3, .rtl h4, .rtl h5, .rtl h6 { font-family: Arial, sans-serif; font-weight: 600; } /* he_IL: Remove Tahoma from the font stack. Arial is best for Hebrew. */ body.locale-he-il, body.locale-he-il .press-this a.wp-switch-editor { font-family: Arial, sans-serif; } /* he_IL: Have <em> be bold rather than italic. */ .locale-he-il em { font-style: normal; font-weight: 600; } /* zh_CN: Remove italic properties. */ .locale-zh-cn .howto, .locale-zh-cn .tablenav .displaying-num, .locale-zh-cn .js .<API key>, .locale-zh-cn .link-to-original, .locale-zh-cn .inline-edit-row fieldset span.title, .locale-zh-cn .inline-edit-row fieldset span.checkbox-title, .locale-zh-cn #utc-time, .locale-zh-cn #local-time, .locale-zh-cn p.install-help, .locale-zh-cn p.help, .locale-zh-cn p.description, .locale-zh-cn span.description, .locale-zh-cn .form-wrap p { font-style: normal; } /* zh_CN: Enlarge dashboard widget 'Configure' link */ .locale-zh-cn .hdnle a { font-size: 12px; } /* zn_CH: Enlarge font size, set font-size: normal */ .locale-zh-cn form.upgrade .hint { font-style: normal; font-size: 100%; } /* zh_CN: Enlarge font-size. */ .locale-zh-cn #sort-buttons { font-size: 1em !important; } /* de_DE: Text needs more space for translation */ .locale-de-de #<API key> .button, .locale-de-de-formal #<API key> .button { padding: 0 5px 1px; /* default 0 10px 1px */ } .locale-de-de #<API key> .spinner, .locale-de-de-formal #<API key> .spinner { margin: 16px 3px 0; /* default 16px 4px 0 5px */ } /* ru_RU: Text needs more room to breathe. */ .locale-ru-ru #adminmenu { width: inherit; /* back-compat for pre-3.2 */ } .locale-ru-ru #adminmenu, .locale-ru-ru #wpbody { margin-right: 0; /* back-compat for pre-3.2 */ } .locale-ru-ru .inline-edit-row fieldset label span.title, .locale-ru-ru .inline-edit-row fieldset.inline-edit-date legend { width: 8em; /* default 6em */ } .locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap, .locale-ru-ru .inline-edit-row fieldset .timestamp-wrap { margin-right: 8em; /* default 6em */ } .locale-ru-ru.post-php .tagsdiv .newtag, .locale-ru-ru.post-new-php .tagsdiv .newtag { width: 165px; /* default 180px - 15px */ } .locale-ru-ru.press-this .posting { margin-left: 277px; /* default 252px + 25px */ } .locale-ru-ru .press-this-sidebar { width: 265px; /* default 240px + 25px */ } .locale-ru-ru #<API key> .button { padding: 0 5px 1px; /* default 0 10px 1px */ } .locale-ru-ru #<API key> .spinner { margin: 16px 3px 0; /* default 16px 4px 0 5px */ } /* lt_LT: QuickEdit */ .locale-lt-lt .inline-edit-row fieldset label span.title, .locale-lt-lt .inline-edit-row fieldset.inline-edit-date legend { width: 8em; /* default 6em */ } .locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap, .locale-lt-lt .inline-edit-row fieldset .timestamp-wrap { margin-right: 8em; /* default 6em */ } @media screen and (max-width: 782px) { .locale-ru-ru .inline-edit-row fieldset label span.input-text-wrap, .locale-ru-ru .inline-edit-row fieldset .timestamp-wrap, .locale-lt-lt .inline-edit-row fieldset label span.input-text-wrap, .locale-lt-lt .inline-edit-row fieldset .timestamp-wrap { margin-right: 0; } }
<html><img border=0 src=716-53-0.txt alt=716-53-0.txt></img><body> "x" "1" "KAZIUS, J, MCGUIRE, R AND BURSI, R. DERIVATION AND VALIDATION OF TOXICOPHORES FOR MUTAGENICITY PREDICTION. J. MED. CHEM. 48: 312-320, 2005" </body></html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><API key>: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.4.5 / <API key> - 8.6.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> <API key> <small> 8.6.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-02-05 04:20:23 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-05 04:20:23 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-ocamlbuild base OCamlbuild binary and libraries distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.4.5 Formal proof management system. num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.02.3 The OCaml compiler (virtual package) ocaml-base-compiler 4.02.3 Official 4.02.3 release ocaml-config 1 OCaml Switch Configuration ocamlbuild 0 Build system distributed with the OCaml compiler since OCaml 3.10.0 # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/<API key>&quot; license: &quot;BSD&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/QuicksortComplexity&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.7~&quot;} ] tags: [ &quot;keyword: quicksort&quot; &quot;keyword: complexity&quot; &quot;keyword: average-case&quot; &quot;category: Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; &quot;date: 2010-06&quot; ] authors: [ &quot;Eelis&quot; ] bug-reports: &quot;https://github.com/coq-contribs/<API key>/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/<API key>.git&quot; synopsis: &quot;Proofs of Quicksort&#39;s worst- and average-case complexity&quot; description: &quot;&quot;&quot; The development contains: - a set of monads and monad transformers for measuring a (possibly nondeterministic) algorithm&#39;s use of designated operations; - monadically expressed deterministic and nondeterministic implementations of Quicksort; - proofs of these implementations&#39; worst- and average case complexity. Most of the development is documented in the TYPES 2008 paper &quot;A Machine-Checked Proof of the Average-Case Complexity of Quicksort in Coq&quot;, available at the homepage.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/<API key>/archive/v8.6.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.8.6.0 coq.8.4.5</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.4.5). The following dependencies couldn&#39;t be met: - <API key> -&gt; coq &gt;= 8.6 -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.6.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
// of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // copies or substantial portions of the Software. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. // This file was automatically generated and should not be edited directly. using System; using System.Runtime.InteropServices; namespace SharpVk { <summary> Structure specifying parameters of a newly created framebuffer. </summary> [StructLayout(LayoutKind.Sequential)] public partial struct <API key> { <summary> Reserved for future use. </summary> public SharpVk.<API key>? Flags { get; set; } <summary> A render pass that defines what render passes the framebuffer will be compatible with. </summary> public SharpVk.RenderPass RenderPass { get; set; } <summary> An array of ImageView handles, each of which will be used as the corresponding attachment in a render pass instance. </summary> public SharpVk.ImageView[] Attachments { get; set; } <summary> width, height and layers define the dimensions of the framebuffer. If the render pass uses multiview, then layers must be one and each attachment requires a number of layers that is greater than the maximum bit index set in the view mask in the subpasses in which it is used. </summary> public uint Width { get; set; } <summary> </summary> public uint Height { get; set; } <summary> </summary> public uint Layers { get; set; } <summary> </summary> <param name="pointer"> </param> internal unsafe void MarshalTo(SharpVk.Interop.<API key>* pointer) { pointer->SType = StructureType.<API key>; pointer->Next = null; if (this.Flags != null) { pointer->Flags = this.Flags.Value; } else { pointer->Flags = default(SharpVk.<API key>); } pointer->RenderPass = this.RenderPass?.handle ?? default(SharpVk.Interop.RenderPass); pointer->AttachmentCount = (uint)(Interop.HeapUtil.GetLength(this.Attachments)); if (this.Attachments != null) { var fieldPointer = (SharpVk.Interop.ImageView*)(Interop.HeapUtil.AllocateAndClear<SharpVk.Interop.ImageView>(this.Attachments.Length).ToPointer()); for(int index = 0; index < (uint)(this.Attachments.Length); index++) { fieldPointer[index] = this.Attachments[index]?.handle ?? default(SharpVk.Interop.ImageView); } pointer->Attachments = fieldPointer; } else { pointer->Attachments = null; } pointer->Width = this.Width; pointer->Height = this.Height; pointer->Layers = this.Layers; } } }
namespace Sorting { using System; using System.Collections.Generic; using Constants; <summary> Define class for selection sort algorithm and its implementation </summary> <typeparam name="T">Type of the elements to be sorted</typeparam> <see cref="https://en.wikipedia.org/wiki/Selection_sort"/> <seealso cref="http: public class SelectionSorter<T> : ISorter<T> where T : IComparable<T> { public void Sort(IList<T> collection) { if (collection == null) { throw new <API key>(ExceptionMessage.<API key>); } int swapIndex = 0; for (int i = 0; i < collection.Count - 1; i++) { swapIndex = i; for (int j = i + 1; j < collection.Count; j++) { if (collection[swapIndex].CompareTo(collection[j]) > 0) { swapIndex = j; } } this.Swap(collection, i, swapIndex); } } private void Swap(IList<T> collection, int index, int swapIndex) { T swap = collection[index]; collection[index] = collection[swapIndex]; collection[swapIndex] = swap; } } }
# encoding: utf-8 module Axiom class Relation module Operation # A mixin for Binary relations module Binary include Axiom::Operation::Binary # Hook called when module is included # @param [Module] descendant # the module or class including Binary # @return [undefined] # @api private def self.included(descendant) super descendant.extend(ClassMethods) end <API key> :included # Initialize a Binary relation # @return [undefined] # @api private def initialize(*) super @header = left.header | right.header end module ClassMethods # Instantiate a new Binary relation # @example # binary = BinaryRelation.new(left, right) # @param [Relation] left # @param [Relation] right # @return [Binary] # @api public def new(left, right) assert_sorted_match(left, right) super end private # Assert that sorted and unsorted relations are not mixed # @param [Relation] left # @param [Relation] right # @return [undefined] # @raise [<API key>] # raised if one relation is sorted and the other is not # @api private def assert_sorted_match(left, right) if left.directions.empty? != right.directions.empty? fail <API key>, 'both relations must be sorted or neither may be sorted' end end end # module ClassMethods end # module Binary end # module Operation end # class Relation end # module Axiom
<?php /** * @file * * Contains \Drupal\Tests\test_example\Unit\<API key>. */ namespace Drupal\Tests\test_example\Functional; use Drupal\simpletest\BrowserTestBase; /** * Ensure that the simpletest_example content type provided functions properly. * * The <API key> is a functional test case, meaning that it * actually exercises a particular sequence of actions through the web UI. * The majority of core test cases are done this way, but the SimpleTest suite * also provides unit tests as demonstrated in the unit test case example later * in this file. * * Functional test cases are far slower to execute than unit test cases because * they require a complete Drupal install to be done for each test. * * @see Drupal\simpletest\BrowserTestBase * @see <API key> * * @ingroup test_example * * SimpleTest uses group annotations to help you organize your tests. * * @group test_example * @group examples */ class <API key> extends BrowserTestBase { /** * The installation profile to use with this test. * * @var string */ protected $profile = 'standard'; /** * Test node creation through the user interface. * * Creates a node using the node/add form and verifies its consistency in * the database. */ public function <API key>() { // Create a user. $user = $this->drupalCreateUser([], NULL, TRUE); // Log in our user. $this->drupalLogin($user); // Create a node using the node/add form. $edit = []; $edit['title[0][value]'] = $this->randomMachineName(32); $edit['body[0][value]'] = $this->randomMachineName(32); $this->drupalPostForm('node/add/article', $edit, t('Save and publish')); // Check that our article node has been created. $this->assertText(t('@post @title has been created.', [ '@post' => 'Article', '@title' => $edit['title[0][value]'], ])); // Check that the node exists in the database. $node = $this-><API key>($edit['title[0][value]']); $this->assertTrue($node, 'Node found in database.'); } }
package com.myconnector.client.domain; import java.util.List; import com.google.gwt.user.client.rpc.IsSerializable; import com.myconnector.client.domain.interfaces.ITodoContext; import com.myconnector.client.domain.interfaces.ITodoItem; import com.myconnector.client.domain.interfaces.ITodoList; public class TodoListClient implements IsSerializable, ITodoList { private Long id; private String title; private boolean todoItemsLoaded = false; private List<ITodoItem> todoItems; private Integer position; private ITodoContext context; public TodoListClient() { } public TodoListClient(Long id, String title) { super(); this.id = id; this.title = title; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public List<ITodoItem> getTodoItems() { return todoItems; } public void setTodoItems(List<ITodoItem> todoItems) { this.todoItems = todoItems; } public Integer getPosition() { return position; } public void setPosition(Integer position) { this.position = position; } public boolean isTodoItemsLoaded() { return todoItemsLoaded; } public void setTodoItemsLoaded(boolean todoItemsLoaded) { this.todoItemsLoaded = todoItemsLoaded; } public ITodoContext getContext() { return context; } public void setContext(ITodoContext context) { this.context = context; } }
const File = require('./File'); exports.FileDetail = class extends File.File { constructor(opts) { opts.className = 'file detail'; super(opts); } initDOM(parentNode) { let file = this._file; this.create( parentNode, { id: this.setElement.bind(this), className: this._className, children: [ File.getIcon(this._getImage, file), { id: this.setLinkElement.bind(this), type: 'a', href: ' className: 'no-select name', innerHTML: file.name }, !file.directory && file.size ? { type: 'span', href: ' className: 'no-select size', innerHTML: file.size + ' - ' + this.bytesToSize(file.size) } : null, (file.modified || file.hash) ? { type: 'span', href: ' className: 'no-select modified', innerHTML: file.modified || file.hash } : null ] } ); } bytesToSize(bytes) { const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; if (parseInt(bytes, 10) === 0) { return '0 Byte'; } let i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; } };
import { Position } from '../core/position'; import { Range } from '../core/range'; import { InlineDecoration, ViewModelDecoration } from './viewModel'; import { <API key> } from '../config/editorOptions'; var <API key> = /** @class */ (function () { function <API key>(editorId, model, configuration, linesCollection, <API key>) { this.editorId = editorId; this.model = model; this.configuration = configuration; this._linesCollection = linesCollection; this.<API key> = <API key>; this._decorationsCache = Object.create(null); this.<API key> = null; this.<API key> = null; } <API key>.prototype.<API key> = function () { this.<API key> = null; this.<API key> = null; }; <API key>.prototype.dispose = function () { this._decorationsCache = Object.create(null); this.<API key>(); }; <API key>.prototype.reset = function () { this._decorationsCache = Object.create(null); this.<API key>(); }; <API key>.prototype.<API key> = function () { this._decorationsCache = Object.create(null); this.<API key>(); }; <API key>.prototype.<API key> = function () { this._decorationsCache = Object.create(null); this.<API key>(); }; <API key>.prototype.<API key> = function (modelDecoration) { var id = modelDecoration.id; var r = this._decorationsCache[id]; if (!r) { var modelRange = modelDecoration.range; var options = modelDecoration.options; var viewRange = void 0; if (options.isWholeLine) { var start = this.<API key>.<API key>(new Position(modelRange.startLineNumber, 1)); var end = this.<API key>.<API key>(new Position(modelRange.endLineNumber, this.model.getLineMaxColumn(modelRange.endLineNumber))); viewRange = new Range(start.lineNumber, start.column, end.lineNumber, end.column); } else { viewRange = this.<API key>.<API key>(modelRange); } r = new ViewModelDecoration(viewRange, options); this._decorationsCache[id] = r; } return r; }; <API key>.prototype.<API key> = function (viewRange) { var cacheIsValid = (this.<API key> !== null); cacheIsValid = cacheIsValid && (viewRange.equalsRange(this.<API key>)); if (!cacheIsValid) { this.<API key> = this.<API key>(viewRange); this.<API key> = viewRange; } return this.<API key>; }; <API key>.prototype.<API key> = function (viewportRange) { var modelDecorations = this._linesCollection.<API key>(viewportRange, this.editorId, <API key>(this.configuration.options)); var startLineNumber = viewportRange.startLineNumber; var endLineNumber = viewportRange.endLineNumber; var <API key> = [], <API key> = 0; var inlineDecorations = []; for (var j = startLineNumber; j <= endLineNumber; j++) { inlineDecorations[j - startLineNumber] = []; } for (var i = 0, len = modelDecorations.length; i < len; i++) { var modelDecoration = modelDecorations[i]; var decorationOptions = modelDecoration.options; var viewModelDecoration = this.<API key>(modelDecoration); var viewRange = viewModelDecoration.range; <API key>[<API key>++] = viewModelDecoration; if (decorationOptions.inlineClassName) { var inlineDecoration = new InlineDecoration(viewRange, decorationOptions.inlineClassName, decorationOptions.<API key> ? 3 /* <API key> */ : 0 /* Regular */); var <API key> = Math.max(startLineNumber, viewRange.startLineNumber); var <API key> = Math.min(endLineNumber, viewRange.endLineNumber); for (var j = <API key>; j <= <API key>; j++) { inlineDecorations[j - startLineNumber].push(inlineDecoration); } } if (decorationOptions.<API key>) { if (startLineNumber <= viewRange.startLineNumber && viewRange.startLineNumber <= endLineNumber) { var inlineDecoration = new InlineDecoration(new Range(viewRange.startLineNumber, viewRange.startColumn, viewRange.startLineNumber, viewRange.startColumn), decorationOptions.<API key>, 1 /* Before */); inlineDecorations[viewRange.startLineNumber - startLineNumber].push(inlineDecoration); } } if (decorationOptions.<API key>) { if (startLineNumber <= viewRange.endLineNumber && viewRange.endLineNumber <= endLineNumber) { var inlineDecoration = new InlineDecoration(new Range(viewRange.endLineNumber, viewRange.endColumn, viewRange.endLineNumber, viewRange.endColumn), decorationOptions.<API key>, 2 /* After */); inlineDecorations[viewRange.endLineNumber - startLineNumber].push(inlineDecoration); } } } return { decorations: <API key>, inlineDecorations: inlineDecorations }; }; return <API key>; }()); export { <API key> };
<?php namespace Code200\ImageKing\Classes; use Cms\Helpers\File; use Code200\ImageKing\Classes\Exceptions\<API key>; use Code200\Imageking\models\Settings; use Illuminate\Support\Facades\Log; use Illuminate\Support\Facades\URL; class ImageService { /** * @var string */ private $html; /** * @var DomManipulator */ private $domImageFinder; /** * Filepath of current image * @var string */ private $imageFilePath; /** * @var Settings */ private $s; /** * Allowed image extensions * @var array */ private $allowedExtensions; /** * Responsive sizes * @var array */ private $responsiveSizes; /** * ImageService constructor. * @param string $html */ public function __construct($html) { $this->html = $html; $this->setDomImageFinder(); $this->s = Settings::instance(); } protected function setDomImageFinder() { $this->domImageFinder = new DomImageFinder($this->html); } /** * Process images and returns modified HTML containing images. * * @return string */ public function process() { $imageNodes = $this->domImageFinder->getImageNodes(); foreach ($imageNodes as $node) { try { //get image $this->imageFilePath = $this->getFilePathFromNode($node); $image = $this-><API key>($this->imageFilePath); $this->checkIfProcessable($image); //check cache $newMainImagePath = $image->getStoragePath(); if(!file_exists($newMainImagePath) || empty(Settings::get("enable_cache", 0)) ) { $imgChanged = $this->processMainImage($image); } $node->setAttribute("src", $image->getPublicUrl($newMainImagePath)); //responsive versions $this-><API key>($this->imageFilePath, $node); //captions $this->applyCaptions($node); } catch (\RemotePathException $e) { //we simply cant and dont want to process remote images ... continue; } catch (<API key> $e) { //we dont want to process certain files I guess continue; } catch (\Exception $e) { Log::warning("[Code200.ImageKing] could not process image: " . $this->imageFilePath); continue; } } return $this->domImageFinder->dom->saveHTML(); } private function processMainImage(&$image) { $imgChanged = false; //limit its output size in case we dont want to share sources $maxWidth = $this->s->get("max_width"); if (!empty($maxWidth) && $maxWidth < $image->getWidth() ) { $image->resize($maxWidth, null); $imgChanged = true; } //watermark if ($this->shouldWatermark()) { $image->applyWatermark(); $imgChanged = true; } if($imgChanged || $this->s->get("<API key>")) { $newMainImagePath = $image->getStoragePath(); $image->save($newMainImagePath); // $node->setAttribute("src", $image->getPublicUrl($newMainImagePath)); } return $imgChanged; } /** * Return new image manipulator object * @param $imagePath * @return ImageManipulator */ protected function <API key>($imagePath){ return new ImageManipulator($imagePath); } /** * Is watermarking enabled in settings * @return bool */ private function shouldWatermark() { $isWatermarkEnabled = $this->s->get("enable_watermark"); if (!$isWatermarkEnabled) { return false; } return true; } private function applyCaptions(&$node){ if(empty($this->s->get("enable_captions")) && ! empty($node->getAttribute("title"))){ return; } $figureElement = $this->domImageFinder->dom->createElement("figure"); $captionElement = $this->domImageFinder->dom->createElement("figcaption", $node->getAttribute("title")); $node->parentNode->replaceChild($figureElement, $node); $figureElement->appendChild($node); $figureElement->appendChild($captionElement); } /** * Returns array of allowed image extensions to be manipulated * @return array string */ private function <API key>() { if (empty($this->allowedExtensions)) { $this->allowedExtensions = array_map( function ($element) { return trim($element); }, explode(",", $this->s->get("allowed_extensions")) ); } return $this->allowedExtensions; } /** * Returns int array of responsive sizes * @return array int */ private function getResponsiveSizes() { if (empty($this->responsiveSizes)) { if(!empty($this->s->get("responsive_sizes"))) { //fetch from settings $this->responsiveSizes = array_map( function ($el) { if (empty($el)) { return null; } return (int)trim($el); }, explode(",", $this->s->get("responsive_sizes")) ); //limit max size to settings $this->responsiveSizes = array_filter($this->responsiveSizes, function($el){ if(!empty($el) && (empty($this->getMaxWidth()) || $this->getMaxWidth() >= $el)) { return true; } }); } else { $this->responsiveSizes = array(); } } return $this->responsiveSizes; } /** * Checks if image is processable * @param ImageManipulator $image * @return bool */ protected function checkIfProcessable($image) { if (!in_array($image->getExtension(), $this-><API key>())) { throw new <API key>("Extension not allowed."); } return true; } /** * @param $imagePath * @param $node * @return ImageManipulator * @throws \Exception */ private function <API key>($imagePath, &$node) { $srcSetAttributes = array(); foreach ($this->getResponsiveSizes() as $newSize) { $image = $this-><API key>($imagePath); $newPath = $image->getStoragePath($newSize); if( !file_exists($newPath) || empty(Settings::get("enable_cache", false))){ $image->resize($newSize, null); if($this->shouldWatermark()){ $image->applyWatermark(); } // $newPath = $image->getStoragePath($newSize); $image->save($newPath); $srcSetAttributes[] = sprintf('%s %sw', $image->getPublicUrl($newPath), $newSize); } else { $srcSetAttributes[] = sprintf('%s %sw', $image->getPublicUrl($newPath), $newSize); } } $node->setAttribute('srcset', implode(",", $srcSetAttributes)); } /** * Gets max (limit) image width from settings * @return int */ private function getMaxWidth(){ return (int)trim($this->s->get("max_width")); } /** * Remove the local host name from path src and add the base path. * * @param $node * @return mixed */ protected function getFilePathFromNode($node) { $imagePath = rawurldecode($this->domImageFinder->getSrcAttribute($node)); return str_replace(URL::to('/'), '', base_path($imagePath)); } }
wedge = 14 background = { epsilon = 0.997179, q = 0.619347 } streams = { { epsilon = -1.297424, mu = 190.545111, r = 13.878006, theta = 0.198390, phi = 3.139994, sigma = 3.743833 }, { epsilon = -1.008419, mu = 199.646461, r = 39.369932, theta = 1.119290, phi = 0.926942, sigma = 8.875175 }, { epsilon = -3.069995, mu = 156.562280, r = 16.517515, theta = 0.332154, phi = 0.588367, sigma = 1.400307 } } area = { { r_min = 16, r_max = 22.5, r_steps = 700, mu_min = 135, mu_max = 235, mu_steps = 800, nu_min = -1.25, nu_max = 1.25, nu_steps = 320 } }
const _transform = require('lodash/transform'); function MatchTransformer(match) { if( !(this instanceof MatchTransformer) ) { return this.transform(new MatchTransformer(match)); } if( typeof match === 'string' ) { // Escape string match = match.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); match = new RegExp(match); } this._match = match; } MatchTransformer.prototype.parse = function(source) { return _transform(source, (result, value, key) => { if( this._match.test(key) ) result[key] = value; }, {}); }; MatchTransformer.prototype.reverse = MatchTransformer.prototype.parse; module.exports = MatchTransformer;
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>huffman: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.5.1 / huffman - 8.13.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> huffman <small> 8.13.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-10-15 03:37:57 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-15 03:37:57 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.5.1 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.0 release ocaml-config 1 OCaml Switch Configuration # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/coq-community/huffman&quot; dev-repo: &quot;git+https://github.com/coq-community/huffman.git&quot; bug-reports: &quot;https://github.com/coq-community/huffman/issues&quot; doc: &quot;https://coq-community.github.io/huffman/&quot; license: &quot;LGPL-2.1-or-later&quot; synopsis: &quot;Coq proof of the correctness of the Huffman coding algorithm&quot; description: &quot;&quot;&quot; This projects contains a Coq proof of the correctness of the Huffman coding algorithm, as described in David A. Huffman&#39;s paper A Method for the Construction of Minimum-Redundancy Codes, Proc. IRE, pp. 1098-1101, September 1952.&quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.12&quot; &amp; &lt; &quot;8.15~&quot;} ] tags: [ &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; &quot;category:Miscellaneous/Extracted Programs/Combinatorics&quot; &quot;keyword:data compression&quot; &quot;keyword:code&quot; &quot;keyword:huffman tree&quot; &quot;logpath:Huffman&quot; &quot;date:2021-07-30&quot; ] authors: [ &quot;Laurent Théry&quot; ] url { src: &quot;https://github.com/coq-community/huffman/archive/v8.13.0.tar.gz&quot; checksum: &quot;sha512=7a38feed6b2757badaf696729287bf5df7a8786e97e3133faf647335ab36ecd7c83caa8c359288d4b8dff89012bdc240a9eb548f3ffe3dc5757244d4ea0f9b78&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-huffman.8.13.0 coq.8.5.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.5.1). The following dependencies couldn&#39;t be met: - coq-huffman -&gt; coq &gt;= 8.12 Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-huffman.8.13.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
body { margin:0; padding:0; font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; -<API key>:antialiased; font-size:11px; } a { color:#111; } a:hover { text-decoration:none; } header { background:url(header.jpg) center center #111; text-align:center; color:#fff; position:relative; padding:5em 5% 10em; background-size:cover; } header h1 { font-size:3em; text-transform:uppercase; margin-bottom:0.2em; color:#fff; letter-spacing:0.1em; font-weight:500; } header h2 { font-size:1.7em; font-weight:400; line-height:1.2; color:#fff; max-width:25em; margin-bottom:1.5em; } header a { color:#fff; } header .btn { border:0.2em solid #fff; color:#fff; text-transform:uppercase; padding:0.6em 1em; font-weight:bold; font-size:1.1em; text-decoration:none; margin:1em 0.5em; display:inline-block; transition:0.15s all ease; } header .btn:hover { background:#fff; color:#5e5d9d; transition:0.15s all ease; } header span { font-size:1em; font-weight:normal; text-transform:uppercase; color:rgb(30, 128, 105); position:absolute; bottom:2em; text-align:center; left:0; right:0; letter-spacing:0.3em; } address { display:inline; } address a { color:rgb(30, 128, 105); } h1, h2, h3, h4, h5, h6, p, li, blockquote { font-family:'Helvetica Neue', Helvetica, Arial, sans-serif; } h2, h3 { margin:0 auto 0.2em; color:#000; font-weight:400; line-height:1.2; } h2 { font-size:3em; max-width:60rem; text-align:center; } h3, p { max-width:60rem; } hr { border:0; border-bottom:1px solid #ddd; } .lead { text-align:center; } p { color:#65777c; font-size:1.5em; margin:0 auto 1.5em; line-height:1.45; } blockquote { color:#13b38f; font-size:3em; max-width:18em; margin:1.5em auto; border:0; text-align:center; line-height:1.2; font-weight:300; padding:0; } section { padding:4em 5%; text-align:center; max-width:90%; margin:0 auto; overflow:hidden; } footer { padding:6em 0 0em; margin:0 auto; } footer hr { border-color:#333; margin:5em 0 0; } footer > div > * { display:inline-block; vertical-align:middle; margin-right:2em; } footer span { color:#999; } section img { max-width:90%; } h3 { font-size:1.6em; } footer { background:#000; color:#fff; text-align:center; } footer h2 { color:#fff; max-width:60em; font-size:2.5em; } footer p { color:#959DA0; max-width:60em; font-size:1.3em; } footer a { text-decoration:none; color:#eee; } footer a:hover { background:rgba(255,255,255,0.1); color:#fff; border-color:#fff; } footer .btn { color:#eee; text-decoration:none; padding-bottom:0.2em; display:inline-block; margin:0 0.5em; border-bottom:2px solid #ccc; } iframe { border:0; } footer { padding-left:10%; padding-right:10%; } .social-buttons li { list-style:none; display:inline-block; padding:1em; } #box > div { text-align:left; } #box hr { clear:both; border-color:transparent; } footer > div { padding:2em 0; max-width:70em; text-align:left; margin:0 auto; } @media(min-width:764px) { body { font-size:13px; } #box > div { width:30%; float:left; text-align:left; margin:2em 0 0 3%; } #box > div p { font-size:1.2em; } .logo { position:absolute; top:30px; left:30px; } section { max-width:70em; padding:5em 5%; } header { padding-top:10em; padding-bottom:20em; } footer { padding:5em 0 1em; } .social-buttons { margin:5em 0 0; } } @media(min-width:960px) { body { font-size:14px; } header h1 { font-size:5em; } h3 { font-size:1.5em; } } div#demo { min-height: 374px; } .container{ padding: 20px; } .container h2{ padding-bottom: .3em; font-size: 1.75em; line-height: 1.225; border-bottom: 1px solid #eee; margin-top: 1em; margin-bottom: 16px; font-weight: bold; float: left; } .container a{ margin-right: 5px; } .container p{ margin-left: 0px; } .container img{ border-radius: 3px; } .container code{ padding: 2px 4px; border: 1px solid #ccc; margin: 0; font-size: 14px; background-color: #e8e7e7; border-radius: 3px; } .container .install p{ position: absolute; margin-top: 65px; } .container .listbox{ padding: 20px; position: absolute; margin-top: 120px; }
import ProgressBar from "progress"; import padEnd from "lodash/padEnd"; class <API key> { constructor() { this.bar = null; } init(total) { if (this.bar) { this.terminate(); } // Intentionally a noop because node-progress doesn't work well in non-TTY // environments if (!process.stdout.isTTY) { return; } // Don't do any of this while testing if (process.env.NODE_ENV === "lerna-test") { return; } this.bar = new ProgressBar(":packagename :bar", { total: total, complete: "", incomplete: "", clear: true, // terminal columns - package name length - additional characters length width: (process.stdout.columns || 100) - 50 - 3 }); } tick(name) { if (this.bar) { this.bar.tick({ packagename: padEnd(name.slice(0, 50), 50) }); } } clear() { if (this.bar) { this.bar.terminate(); } } restore() { if (this.bar) { // This is a hack to get the bar to redraw it's last state. // See: https://github.com/tj/node-progress/blob/<SHA1-like>/lib/node-progress.js#L154-L159 this.bar.stream.write(this.bar.lastDraw); } } terminate() { this.clear(); this.bar = null; } } export default new <API key>();
var commons = require('../commons') var frisby = require('frisby'); var FormData = require('form-data'); frisby.create('Get file') .get(commons.host+'/file/2134354/zgzhrthztrh/sgeh' ) .after(function(err, res, body) { expect(res.request.href.match(/errcode=404/)).not.toBeNull() }) .toss()
<!doctype html> <!--[if lt IE 7]> <html class="lt-ie9 lt-ie8 lt-ie7"> <![endif]--> <!--[if IE 7]> <html class="lt-ie9 lt-ie8"> <![endif]--> <!--[if IE 8]> <html class="lt-ie9"> <![endif]--> <!--[if gt IE 8]><!--> <html lang="en"> <!--<![endif]--> <head> <!-- Meta, title, CSS, favicons, etc. --> {% include base/head.html %} </head> <body> <a href="#content" class="sr-only sr-only-focusable">Skip to main content</a> {% include components/toolbar.html %} {% include layout/header.html %} {% include components/banner.html %} <main class="app-main" role="main"> <div class="app-main-section"> <div class="app-main-aside"> {% include layout/sidebar.html %} </div> <div class="app-main-content"> {{ content }} </div> </div> </main> {% include layout/footer.html %} {% include base/javascript.html %} <div class="app-js-slot"> {% include base/webfonts.html %} </div> </body> </html>
<?php namespace Frontend\PublicBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; class <API key> extends Extension { /** * {@inheritDoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this-><API key>($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); } }
package command import ( "fmt" "os" "path/filepath" "time" "github.com/kemokemo/gckdir/lib" "github.com/skratchdot/open-golang/open" "github.com/urfave/cli" ) var ( // UsageVerify is Usage of verify subcommand for cli UsageVerify = "Verifies the structure and each hash value of files." ) // CmdVerify verifies directory information below cases. // Case 1. a json file of hash list with target directory // Case 2. source directory with target directory func CmdVerify(c *cli.Context) error { help := fmt.Sprintf("Please see '%s %s --help'.", c.App.Name, c.Command.FullName()) source := c.Args().Get(0) target := c.Args().Get(1) if source == "" || target == "" { return cli.NewExitError( fmt.Sprintf("Source path or target path is empty. %s", help), <API key>) } source = filepath.Clean(source) target = filepath.Clean(target) sourceList, err := lib.GetHashList(source) if err != nil { return cli.NewExitError( fmt.Sprintf("Failed to get the hash list. %v\n%s", err, help), <API key>) } targetList, err := lib.GetHashList(target) if err != nil { return cli.NewExitError( fmt.Sprintf("Failed to get the hash list. %v\n%s", err, help), <API key>) } result := lib.VerifyHashList(sourceList, targetList, !c.Bool("no-hv"), !c.Bool("no-uv")) var path string if c.Bool("report") || c.Bool("open") { pathList := lib.PathList{SourcePath: source, TargetPath: target} path, err = createReport(c.String("output"), pathList, result) if err != nil { return cli.NewExitError( fmt.Sprintf("Failed to create a result report. %v\n%s", err, help), <API key>) } } if c.Bool("open") { err = open.Run(path) if err != nil { return cli.NewExitError( fmt.Sprintf("Failed to open a result report. %v\n%s", err, help), <API key>) } } if result.VerifyResult == false { fmt.Println("Verification failed.") return cli.NewExitError("", <API key>) } return nil } func createReport(output string, pathList lib.PathList, result lib.HashList) (string, error) { cd, err := os.Getwd() if err != nil { return "", err } if output == "" { output = time.Now().Format("<API key>.000000000.html") } path := filepath.Join(cd, output) file, err := os.Create(path) defer func() { err = file.Close() if err != nil { fmt.Println("failed to close file: ", err) } }() err = lib.CreateReport(file, pathList, result) if err != nil { return "", err } path = filepath.Join("file:///", path) return path, nil }
search_result['2189']=["<API key>--.html","<API key> Attached Properties",""];
<reference path="Transform3D.ts" /> namespace zen { export class GameObject extends Transform3D { public name:string = "GameObject"; public tag:string = ""; public layer:string = ""; private _guid:string = zen.guid.create(); public get guid() { return this._guid; } private _app:Application; constructor(app:Application) { super(); this._app = app; } private _components:{[key:string]:Component} = {}; public addComponent(component:Component):void { let system:System = this._app.systemManager.getSystem(component.type); if(system) { if(!this._components[component.type]) { component.gameObject = this; system.addComponent(this, component); this._components[component.type] = component; } else { console.error("Game Object already has " + component.type + " Component"); } } else { console.error("System: " + component.type + " doesn't exist"); } } public getComponent<T extends Component>(type:ComponentType | number):T { return <T>this._components[type]; } public removeComponent(component:Component):void { let system:System = this._app.systemManager.getSystem(component.type); if(system) { if(this._components[component.type]) { component.gameObject = null; system.removeComponent(this); delete this._components[component.type]; } else { console.error("Game Object doesn't have " + component.type + " Component"); } } else { console.error("System: " + component.type + " doesn't exist"); } } } }
$(document).ready(function () { startAnimation(); }); if (!window.<API key>) { window.<API key> = (window.<API key> || window.<API key> || window.<API key> || window.<API key> || function (callback) { return window.setTimeout(callback, 1000 / 60); }); } (function ($, window) { function Constellation (canvas, options) { var $canvas = $(canvas), context = canvas.getContext('2d'), defaults = { star: { color: 'rgba(255, 255, 255, .5)', width: 2 }, line: { color: 'rgba(255, 255, 255, .5)', width: 0.4 }, position: { x: 0, // This value will be overwritten at startup y: 0 // This value will be overwritten at startup }, width: window.innerWidth, height: window.innerHeight, velocity: 0.1, length: 100, distance: 120, radius: 150, stars: [] }, config = $.extend(true, {}, defaults, options); function Star () { this.x = Math.random() * canvas.width; this.y = Math.random() * canvas.height; this.vx = (config.velocity - (Math.random() * 0.5)); this.vy = (config.velocity - (Math.random() * 0.5)); this.radius = Math.random() * config.star.width; } Star.prototype = { create: function(){ context.beginPath(); context.arc(this.x, this.y, this.radius, 0, Math.PI * 2, false); context.fill(); }, animate: function(){ var i; for (i = 0; i < config.length; i++) { var star = config.stars[i]; if (star.y < 0 || star.y > canvas.height) { star.vx = star.vx; star.vy = - star.vy; } else if (star.x < 0 || star.x > canvas.width) { star.vx = - star.vx; star.vy = star.vy; } star.x += star.vx; star.y += star.vy; } }, line: function(){ var length = config.length, iStar, jStar, i, j; for (i = 0; i < length; i++) { for (j = 0; j < length; j++) { iStar = config.stars[i]; jStar = config.stars[j]; if ( (iStar.x - jStar.x) < config.distance && (iStar.y - jStar.y) < config.distance && (iStar.x - jStar.x) > - config.distance && (iStar.y - jStar.y) > - config.distance ) { if ( (iStar.x - config.position.x) < config.radius && (iStar.y - config.position.y) < config.radius && (iStar.x - config.position.x) > - config.radius && (iStar.y - config.position.y) > - config.radius ) { context.beginPath(); context.moveTo(iStar.x, iStar.y); context.lineTo(jStar.x, jStar.y); context.stroke(); context.closePath(); } } } } } }; this.createStars = function () { var length = config.length, star, i; context.clearRect(0, 0, canvas.width, canvas.height); for (i = 0; i < length; i++) { config.stars.push(new Star()); star = config.stars[i]; star.create(); } star.line(); star.animate(); }; this.setCanvas = function () { canvas.width = config.width; canvas.height = config.height; }; this.setContext = function () { context.fillStyle = config.star.color; context.strokeStyle = config.line.color; context.lineWidth = config.line.width; }; this.setInitialPosition = function () { if (!options || !options.hasOwnProperty('position')) { config.position = { x: canvas.width * 0.5, y: canvas.height * 0.5 }; } }; this.loop = function (callback) { callback(); window.<API key>(function () { this.loop(callback); }.bind(this)); }; this.bind = function () { $canvas.on('mousemove', function(e){ config.position.x = e.pageX - $canvas.offset().left; config.position.y = e.pageY - $canvas.offset().top; }); }; this.init = function () { this.setCanvas(); this.setContext(); this.setInitialPosition(); this.loop(this.createStars); this.bind(); }; } $.fn.constellation = function (options) { return this.each(function () { var c = new Constellation(this, options); c.init(); }); }; })($, window); var startAnimation = function() { window.addEventListener("resize", function() { startAnimation()} ); $('canvas').constellation({ line: { color: 'rgba(255, 255, 255, .5)' } }); };
<?php get_template_part('templates/front', 'page'); ?>
/*jshint camelcase: false */ (function(window, module, undefined) { 'use strict'; // lifted from Underscore then bastardized var _flatten = function(input, output) { for (var i = 0, length = input.length; i < length; i++) { var value = input[i]; if (value.type === 'div') { _flatten(value.contents, output); } else if (value.type !== 'button') { output.push(formBuilder.determineFieldName(value)); } } return output; }; var flatten = function(array) { return _flatten(array, []); }; var copyObject = function(obj) { return window.JSON.parse(window.JSON.stringify(obj)); }; var unionArrays = function (x, y) { var obj = {}; for (var ix = x.length-1; ix >= 0; obj[x[ix]] = x[ix]; } for (var iy = y.length-1; iy >= 0; obj[y[iy]] = y[iy]; } var res = []; for (var k in obj) { if (obj.hasOwnProperty(k)) { res.push(obj[k]); } } return res; }; var formBuilder = { buildForm: function(buildArray, config) { return this.buildRecurse(buildArray, config); }, buildRecurse: function(buildArray, config) { var htmlString = ""; for (var i = 0; i < buildArray.length; i++) { var current = buildArray[i]; if(['number', 'text', 'email', 'tel', 'week', 'url', 'date', 'datetime', 'datetime-local', 'color', 'search', 'password'].indexOf(current.type) >= 0) { htmlString += formBuilder.input(current, config); } else if(current.type === 'select') { htmlString += formBuilder.select(current, config); } else if (current.type === 'div') { var className = formBuilder.<API key>(current, config); var openTag = "<div>"; if (className) { openTag = "<div class='" + className + "'>"; } htmlString += openTag + this.buildRecurse(current.contents, config) + "</div>"; } else if (current.type === 'textarea') { htmlString += formBuilder.textarea(current, config); } else if (current.type === 'button') { htmlString += formBuilder.button(current, config); } else if (current.type === 'hidden') { htmlString += formBuilder.hidden(current, config); } else if (current.type === 'checkbox') { htmlString += formBuilder.checkbox(current, config); } } return htmlString; }, camelcase: function(input) { return input.toLowerCase().replace(/[- ](.)/g, function(match, group1) { return group1.toUpperCase(); }); }, determineFieldName: function(config) { return config.fieldName || this.camelcase(config.name); }, <API key>: function(config, global) { var className = ""; if (!config.noDefaultClasses && global.defaultClass) { className = global.defaultClass; } if (config.className) { if (className) { className += " "; } className += config.className; } return className; }, input: function(config, global) { var className = this.<API key>(config, global); var placeholder = config.placeholder || config.name; var fieldName = this.determineFieldName(config); var options = " "; if (config.required) { options += "required "; } if (config.charLimit) { options += "maxlength='" + config.charLimit + "' "; } return "<input type='" + config.type + "' class='" + className + "' placeholder='" + placeholder + "' data-forge-key='" + fieldName + "'" + options +"/>"; }, select: function(config, global) { var className = this.<API key>(config, global); var fieldName = (config.fieldName) ? config.fieldName : this.camelcase(config.name); var options = " "; if (config.required) { options += "required "; } var html = "<select class='" + className + "' data-forge-key='" + fieldName + "'" + options +">"; for (var i = 0; i < config.options.length; i++) { html += "<option value='" + config.options[i][0] + "'>" + config.options[i][1] + "</option>"; } html += "</select>"; return html; }, textarea: function(config, global) { var className = this.<API key>(config, global); var placeholder = config.placeholder || config.name; var fieldName = this.determineFieldName(config); var options = " "; if (config.required) { options += "required "; } if (config.charLimit) { options += "maxlength='" + config.charLimit + "' "; } return "<textarea class='" + className + "' placeholder='" + placeholder + "' data-forge-key='" + fieldName + "'" + options +"></textarea>"; }, button: function(config, global) { return "<button type='submit' class='" + this.<API key>(config, global) + "'>" + config.name + "</button>"; }, hidden: function(config, global) { var fieldName = this.determineFieldName(config); return "<input value='' type='" + config.type + "' data-forge-key='" + fieldName + "'/>"; }, checkbox: function(config, global) { return "<label class='" + config.label.className + "'><input data-forge-key=" + this.determineFieldName(config, global) + " class='" + config.className + "' type='checkbox' /> " + config.label.text + "</label>"; } }; var mergeObjects = function(obj1, obj2) { var impureMerge = function(fromObj, toObj) { for (var key in fromObj) { if (fromObj.hasOwnProperty(key)) { toObj[key] = fromObj[key]; } } return toObj; }; var newObj = {}; newObj = impureMerge(obj1, newObj); newObj = impureMerge(obj2, newObj); return newObj; }; var discoverWatches = function(form) { var watches = {}; for (var i = 0; i < form.length; i++) { var current = form[i]; if (current.type === 'div') { var newWatches = discoverWatches(current.contents); watches = mergeObjects(watches, newWatches); } else if (current.conditional) { if (current.conditional.callback && current.conditional.dependencies) { for (var j = 0; j < current.conditional.dependencies.length; j++) { if (!watches[current.conditional.dependencies[j]]) { watches[current.conditional.dependencies[j]] = []; } var clone = { targets: formBuilder.determineFieldName(current), dependencies: current.conditional.dependencies, callback: current.conditional.callback }; watches[current.conditional.dependencies[j]].push(clone); } } else { window.console.warn('To register a conditional watch, you must include both callback and dependencies. Watch skipped for ', current); } } } return watches; }; var isEmptyObject = function(obj) { for (var key in obj) { if (obj.hasOwnProperty(key)) { return false; } } return true; }; var gatherArgs = function(deps, values, config) { var ans = []; for (var i = 0, l = deps.length; i < l; i++) { if (deps[i] !== '$internals') { ans.push(values[deps[i]]); } else { ans.push(config.internals); } } return ans; }; var gatherNodes = function(domTree, values) { var nodes = {}; for (var key in values) { if (values.hasOwnProperty(key)) { var node = domTree.querySelector("[data-forge-key='" + key +"']"); nodes[key] = node; if (node.type !== 'checkbox') { this._values[key] = nodes[key].value; } else { this._values[key] = nodes[key].checked; } } } return nodes; }; var Forge = function(form, config){ this._form = form; this._config = config; this._target = null; this._innerHTML = ""; this._values = {}; this._domNode = null; this._watches = {}; this._nodes = {}; this._init(); }; Forge.prototype._init = function() { var flattened = flatten(this._form); var obj = {}; flattened.map(function(el) { obj[el] = ""; }); this._values = obj; this._watches = discoverWatches(this._form); this._hasWatches = !isEmptyObject(this._watches); this._generateCss(); }; Forge.prototype._generateCss = function() { if (!window.document.getElementById('<API key>')) { var style = window.document.createElement('style'); style.type = 'text/css'; style.id = "<API key>"; style.innerHTML = '.forge-hidden { display: none !important; }'; window.document.<API key>('head')[0].appendChild(style); } }; Forge.prototype._runAllConditionals = function() { for (var key in this._watches) { if (this._watches.hasOwnProperty(key)) { this.<API key>(key); } } }; Forge.prototype.render = function(target) { var node = window.document.querySelector(target); this._innerHTML = formBuilder.buildForm(this._form, this._config); var form = window.document.createElement('form'); form.innerHTML = this._innerHTML; form.id = this._config.formId; form.addEventListener('change', this.eventDispatch.bind(this)); form.addEventListener('keydown', this.eventDispatch.bind(this)); if (this._config.formSubmit) { form.addEventListener('submit', this._config.formSubmit); } this._domNode= form; this._nodes = gatherNodes.call(this, form, this._values); this._runAllConditionals(); node.appendChild(form); this._target = target; }; Forge.prototype.eventDispatch = function(e) { var target = e.target; var key = target.dataset.forgeKey; if (target.type === 'checkbox') { this._values[key] = e.target.checked; } else { this._values[key] = e.target.value; } this.<API key>(key); }; Forge.prototype.<API key> = function(key) { if (this._hasWatches && this._watches[key]) { var current = this._watches[key]; for (var i = 0, l = current.length; i < l; i++) { var node = this._nodes[current[i].targets]; var gatheredArgs = gatherArgs(current[i].dependencies, this._values, this._config); if (!current[i].callback.apply(this, gatheredArgs)) { if (node.className.indexOf('forge-hidden') < 0) { node.className += " forge-hidden"; } } else if (node.className.indexOf('forge-hidden') >= 0) { node.className = node.className.replace('forge-hidden','','i'); } } } }; Forge.prototype.set = function(key, value) { var node = this._domNode.querySelector("[data-forge-key='" + key +"']"); this._values[key] = value; if (node.type === 'checkbox') { node.checked = value; } else { node.value = value; } this.<API key>(key); }; Forge.prototype.getData = function() { return copyObject(this._values); }; Forge.prototype.getConfig = function() { return copyObject(this._config); }; Forge.prototype.validate = function() { var validateRecurse = function(form, acc) { for (var i = 0, l = form.length; i < l; i++) { if (form[i].type === 'div') { validateRecurse(form[i].contents, acc); } else if (form[i].type === 'button') { // do nothing } else { var fieldName = formBuilder.determineFieldName(form[i]); if (form[i].required && !this._values[fieldName]) { acc.push(fieldName); } } } return acc; }.bind(this); var errors = validateRecurse(this._form, []); if (this._config.validate) { var validateErrors = this._config.validate(this._values); errors = unionArrays(errors, validateErrors); } for (var key in this._values) { if (this._values.hasOwnProperty(key)) { var node = this._nodes[key]; if (errors.indexOf(key) >= 0 && node.className.indexOf('forge-error') < 0) { node.className += " forge-error"; } else if (errors.indexOf(key) < 0 && node.className.indexOf('forge-error') >= 0) { node.className = node.className.replace('forge-error','','i'); } } } return errors; }; module.exports = function(form, config) { return new Forge(form, config); }; })(window, module);
module.exports = function(grunt) { // load all grunt tasks require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks); grunt.initConfig({ // watch for changes and trigger compass, jshint, uglify and livereload watch: { js: { files: ['jquery.accrue.js'], tasks: ['jshint','uglify'], options: { livereload: true, }, }, css: { files: 'example.scss', tasks: ['sass'], options: { livereload: true, }, } }, // we use the Sass sass: { dist: { options: { // nested, compact, compressed, expanded style: 'compressed' }, files: { 'example.css': 'example.scss' } } }, // uglify to concat & minify uglify: { js: { files: { 'jquery.accrue.min.js': 'jquery.accrue.js', } } }, // lint me. jshint: { all: ['jquery.accrue.js'] } }); // register task grunt.registerTask('default', ['watch']); };
require "lita" Lita.load_locales Dir[File.expand_path( File.join("..", "..", "locales", "*.yml"), __FILE__ )] require "lita/handlers/urban"
using UnityEngine; using System; using System.Collections; using System.Collections.Generic; using System.Runtime.InteropServices; using System.IO; using System.Text; public class KinectManager : MonoBehaviour { public enum Smoothing : int { None, Default, Medium, Aggressive } // Public Bool to determine how many players there are. Default of one user. public bool TwoUsers = false; // Public Bool to determine if the sensor is used in near mode. public bool NearMode = false; // Public Bool to determine whether to receive and compute the user map public bool ComputeUserMap = false; // Public Bool to determine whether to receive and compute the color map public bool ComputeColorMap = false; // Public Bool to determine whether to display user map on the GUI public bool DisplayUserMap = false; // Public Bool to determine whether to display color map on the GUI public bool DisplayColorMap = false; // Public Bool to determine whether to display the skeleton lines on user map public bool <API key> = false; // Public Floats to specify the width and height of the depth and color maps as % of the camera width and height public float MapsPercentWidth = 0f; public float MapsPercentHeight = 0f; // How high off the ground is the sensor (in meters). public float SensorHeight = 1.0f; // Kinect elevation angle (in degrees) public int SensorAngle = 0; // Minimum user distance in order to process skeleton data public float MinUserDistance = 1.0f; // Public Bool to determine whether to detect only the closest user or not public bool DetectClosestUser = true; // Public Bool to determine whether to use only the tracked joints (and ignore the inferred ones) public bool <API key> = true; // Selection of smoothing parameters public Smoothing smoothing = Smoothing.Default; // Public Bool to determine the use of additional filters public bool <API key> = false; public bool <API key> = false; public bool <API key> = true; public bool <API key> = false; // Lists of GameObjects that will be controlled by which player. public List<GameObject> Player1Avatars; public List<GameObject> Player2Avatars; // Calibration poses for each player, if needed public KinectGestures.Gestures <API key>; public KinectGestures.Gestures <API key>; // List of Gestures to detect for each player public List<KinectGestures.Gestures> Player1Gestures; public List<KinectGestures.Gestures> Player2Gestures; // Minimum time between gesture detections public float <API key> = 0f; // List of Gesture Listeners. They must implement KinectGestures.<API key> public List<MonoBehaviour> GestureListeners; // GUI Text to show messages. public GameObject CalibrationText; // GUI Texture to display the hand cursor for Player1 public GameObject HandCursor1; // GUI Texture to display the hand cursor for Player1 public GameObject HandCursor2; // Bool to specify whether Left/Right-hand-cursor and the Click-gesture control the mouse cursor and click public bool ControlMouseCursor = false; // Bool to keep track of whether Kinect has been initialized private bool KinectInitialized = false; // Bools to keep track of who is currently calibrated. private bool Player1Calibrated = false; private bool Player2Calibrated = false; private bool <API key> = false; // Values to track which ID (assigned by the Kinect) is player 1 and player 2. private uint Player1ID; private uint Player2ID; // Lists of AvatarControllers that will let the models get updated. private List<AvatarController> Player1Controllers; private List<AvatarController> Player2Controllers; // User Map vars. private Texture2D usersLblTex; private Color32[] usersMapColors; private ushort[] usersPrevState; private Rect usersMapRect; private int usersMapSize; private Texture2D usersClrTex; //Color[] usersClrColors; private Rect usersClrRect; //short[] usersLabelMap; private short[] usersDepthMap; private float[] usersHistogramMap; // List of all users private List<uint> allUsers; // Image stream handles for the kinect private IntPtr colorStreamHandle; private IntPtr depthStreamHandle; // Color image data, if used private Color32[] colorImage; private byte[] usersColorMap; // Skeleton related structures private KinectWrapper.NuiSkeletonFrame skeletonFrame; private KinectWrapper.<API key> smoothParameters; private int player1Index, player2Index; // Skeleton tracking states, positions and joints' orientations private Vector3 player1Pos, player2Pos; private Matrix4x4 player1Ori, player2Ori; private bool[] <API key>, <API key>; private bool[] player1PrevTracked, player2PrevTracked; private Vector3[] player1JointsPos, player2JointsPos; private Matrix4x4[] player1JointsOri, player2JointsOri; private KinectWrapper.<API key>[] jointOrientations; // Calibration gesture data for each player private KinectGestures.GestureData <API key>; private KinectGestures.GestureData <API key>; // Lists of gesture data, for each player private List<KinectGestures.GestureData> player1Gestures = new List<KinectGestures.GestureData>(); private List<KinectGestures.GestureData> player2Gestures = new List<KinectGestures.GestureData>(); // general gesture tracking time start private float[] <API key>; // List of Gesture Listeners. They must implement KinectGestures.<API key> public List<KinectGestures.<API key>> gestureListeners; private Matrix4x4 kinectToWorld, flipMatrix; private static KinectManager instance; // Timer for controlling Filter Lerp blends. private float lastNuiTime; // Filters private TrackingStateFilter[] trackingStateFilter; private <API key>[] <API key>; private ClippedLegsFilter[] clippedLegsFilter; private <API key> <API key>; private <API key> <API key>; // returns the single KinectManager instance public static KinectManager Instance { get { return instance; } } // checks if Kinect is initialized and ready to use. If not, there was an error during Kinect-sensor initialization public static bool IsKinectInitialized() { return instance != null ? instance.KinectInitialized : false; } // checks if Kinect is initialized and ready to use. If not, there was an error during Kinect-sensor initialization public bool IsInitialized() { return KinectInitialized; } // this function is used internally by AvatarController public static bool IsCalibrationNeeded() { return false; } // // returns the raw depth/user data,if ComputeUserMap is true // public short[] GetUsersDepthMap() // return usersDepthMap; // returns the depth data for a specific pixel,if ComputeUserMap is true public short GetDepthForPixel(int x, int y) { int index = y * KinectWrapper.Constants.ImageWidth + x; if(index >= 0 && index < usersDepthMap.Length) return usersDepthMap[index]; else return 0; } // returns the depth map position for a 3d joint position public Vector2 <API key>(Vector3 posJoint) { Vector3 vDepthPos = KinectWrapper.<API key>(posJoint); Vector2 vMapPos = new Vector2(vDepthPos.x, vDepthPos.y); return vMapPos; } // returns the color map position for a depth 2d position public Vector2 <API key>(Vector2 posDepth) { int cx, cy; KinectWrapper.NuiImageViewArea pcViewArea = new KinectWrapper.NuiImageViewArea { eDigitalZoom = 0, lCenterX = 0, lCenterY = 0 }; int hr = KinectWrapper.<API key>( KinectWrapper.Constants.ImageResolution, KinectWrapper.Constants.ImageResolution, ref pcViewArea, (int)posDepth.x, (int)posDepth.y, GetDepthForPixel((int)posDepth.x, (int)posDepth.y), out cx, out cy); return new Vector2(cx, cy); } // returns the depth image/users histogram texture,if ComputeUserMap is true public Texture2D GetUsersLblTex() { return usersLblTex; } // returns the color image texture,if ComputeColorMap is true public Texture2D GetUsersClrTex() { return usersClrTex; } // returns true if at least one user is currently detected by the sensor public bool IsUserDetected() { return KinectInitialized && (allUsers.Count > 0); } // returns the UserID of Player1, or 0 if no Player1 is detected public uint GetPlayer1ID() { return Player1ID; } // returns the UserID of Player2, or 0 if no Player2 is detected public uint GetPlayer2ID() { return Player2ID; } // returns true if the User is calibrated and ready to use public bool IsPlayerCalibrated(uint UserId) { if(UserId == Player1ID) return Player1Calibrated; else if(UserId == Player2ID) return Player2Calibrated; return false; } // returns the raw unmodified joint position, as returned by the Kinect sensor public Vector3 <API key>(uint UserId, int joint) { if(UserId == Player1ID) return joint >= 0 && joint < player1JointsPos.Length ? (Vector3)skeletonFrame.SkeletonData[player1Index].SkeletonPositions[joint] : Vector3.zero; else if(UserId == Player2ID) return joint >= 0 && joint < player2JointsPos.Length ? (Vector3)skeletonFrame.SkeletonData[player2Index].SkeletonPositions[joint] : Vector3.zero; return Vector3.zero; } // returns the User position, relative to the Kinect-sensor, in meters public Vector3 GetUserPosition(uint UserId) { if(UserId == Player1ID) return player1Pos; else if(UserId == Player2ID) return player2Pos; return Vector3.zero; } // returns the User rotation, relative to the Kinect-sensor public Quaternion GetUserOrientation(uint UserId, bool flip) { if(UserId == Player1ID && <API key>[(int)KinectWrapper.<API key>.HipCenter]) return ConvertMatrixToQuat(player1Ori, (int)KinectWrapper.<API key>.HipCenter, flip); else if(UserId == Player2ID && <API key>[(int)KinectWrapper.<API key>.HipCenter]) return ConvertMatrixToQuat(player2Ori, (int)KinectWrapper.<API key>.HipCenter, flip); return Quaternion.identity; } // returns true if the given joint of the specified user is being tracked public bool IsJointTracked(uint UserId, int joint) { if(UserId == Player1ID) return joint >= 0 && joint < <API key>.Length ? <API key>[joint] : false; else if(UserId == Player2ID) return joint >= 0 && joint < <API key>.Length ? <API key>[joint] : false; return false; } // returns the joint position of the specified user, relative to the Kinect-sensor, in meters public Vector3 GetJointPosition(uint UserId, int joint) { if(UserId == Player1ID) return joint >= 0 && joint < player1JointsPos.Length ? player1JointsPos[joint] : Vector3.zero; else if(UserId == Player2ID) return joint >= 0 && joint < player2JointsPos.Length ? player2JointsPos[joint] : Vector3.zero; return Vector3.zero; } // returns the local joint position of the specified user, relative to the parent joint, in meters public Vector3 <API key>(uint UserId, int joint) { int parent = KinectWrapper.<API key>(joint); if(UserId == Player1ID) return joint >= 0 && joint < player1JointsPos.Length ? (player1JointsPos[joint] - player1JointsPos[parent]) : Vector3.zero; else if(UserId == Player2ID) return joint >= 0 && joint < player2JointsPos.Length ? (player2JointsPos[joint] - player2JointsPos[parent]) : Vector3.zero; return Vector3.zero; } // returns the joint rotation of the specified user, relative to the Kinect-sensor public Quaternion GetJointOrientation(uint UserId, int joint, bool flip) { if(UserId == Player1ID) { if(joint >= 0 && joint < player1JointsOri.Length && <API key>[joint]) return ConvertMatrixToQuat(player1JointsOri[joint], joint, flip); } else if(UserId == Player2ID) { if(joint >= 0 && joint < player2JointsOri.Length && <API key>[joint]) return ConvertMatrixToQuat(player2JointsOri[joint], joint, flip); } return Quaternion.identity; } // returns the joint rotation of the specified user, relative to the parent joint public Quaternion <API key>(uint UserId, int joint, bool flip) { int parent = KinectWrapper.<API key>(joint); if(UserId == Player1ID) { if(joint >= 0 && joint < player1JointsOri.Length && <API key>[joint]) { Matrix4x4 localMat = (player1JointsOri[parent].inverse * player1JointsOri[joint]); return Quaternion.LookRotation(localMat.GetColumn(2), localMat.GetColumn(1)); } } else if(UserId == Player2ID) { if(joint >= 0 && joint < player2JointsOri.Length && <API key>[joint]) { Matrix4x4 localMat = (player2JointsOri[parent].inverse * player2JointsOri[joint]); return Quaternion.LookRotation(localMat.GetColumn(2), localMat.GetColumn(1)); } } return Quaternion.identity; } // returns the direction between baseJoint and nextJoint, for the specified user public Vector3 <API key>(uint UserId, int baseJoint, int nextJoint, bool flipX, bool flipZ) { Vector3 jointDir = Vector3.zero; if(UserId == Player1ID) { if(baseJoint >= 0 && baseJoint < player1JointsPos.Length && <API key>[baseJoint] && nextJoint >= 0 && nextJoint < player1JointsPos.Length && <API key>[nextJoint]) { jointDir = player1JointsPos[nextJoint] - player1JointsPos[baseJoint]; } } else if(UserId == Player2ID) { if(baseJoint >= 0 && baseJoint < player2JointsPos.Length && <API key>[baseJoint] && nextJoint >= 0 && nextJoint < player2JointsPos.Length && <API key>[nextJoint]) { jointDir = player2JointsPos[nextJoint] - player2JointsPos[baseJoint]; } } if(jointDir != Vector3.zero) { if(flipX) jointDir.x = -jointDir.x; if(flipZ) jointDir.z = -jointDir.z; } return jointDir; } // adds a gesture to the list of detected gestures for the specified user public void DetectGesture(uint UserId, KinectGestures.Gestures gesture) { int index = GetGestureIndex(UserId, gesture); if(index >= 0) DeleteGesture(UserId, gesture); KinectGestures.GestureData gestureData = new KinectGestures.GestureData(); gestureData.userId = UserId; gestureData.gesture = gesture; gestureData.state = 0; gestureData.joint = 0; gestureData.progress = 0f; gestureData.complete = false; gestureData.cancelled = false; gestureData.checkForGestures = new List<KinectGestures.Gestures>(); switch(gesture) { case KinectGestures.Gestures.ZoomIn: gestureData.checkForGestures.Add(KinectGestures.Gestures.ZoomOut); gestureData.checkForGestures.Add(KinectGestures.Gestures.Wheel); break; case KinectGestures.Gestures.ZoomOut: gestureData.checkForGestures.Add(KinectGestures.Gestures.ZoomIn); gestureData.checkForGestures.Add(KinectGestures.Gestures.Wheel); break; case KinectGestures.Gestures.Wheel: gestureData.checkForGestures.Add(KinectGestures.Gestures.ZoomIn); gestureData.checkForGestures.Add(KinectGestures.Gestures.ZoomOut); break; // case KinectGestures.Gestures.Jump: // gestureData.checkForGestures.Add(KinectGestures.Gestures.Squat); // break; // case KinectGestures.Gestures.Squat: // gestureData.checkForGestures.Add(KinectGestures.Gestures.Jump); // break; // case KinectGestures.Gestures.Push: // gestureData.checkForGestures.Add(KinectGestures.Gestures.Pull); // break; // case KinectGestures.Gestures.Pull: // gestureData.checkForGestures.Add(KinectGestures.Gestures.Push); // break; } if(UserId == Player1ID) player1Gestures.Add(gestureData); else if(UserId == Player2ID) player2Gestures.Add(gestureData); } // resets the gesture-data state for the given gesture of the specified user public bool ResetGesture(uint UserId, KinectGestures.Gestures gesture) { int index = GetGestureIndex(UserId, gesture); if(index < 0) return false; KinectGestures.GestureData gestureData = (UserId == Player1ID) ? player1Gestures[index] : player2Gestures[index]; gestureData.state = 0; gestureData.joint = 0; gestureData.progress = 0f; gestureData.complete = false; gestureData.cancelled = false; gestureData.startTrackingAtTime = Time.<API key> + KinectWrapper.Constants.<API key>; if(UserId == Player1ID) player1Gestures[index] = gestureData; else if(UserId == Player2ID) player2Gestures[index] = gestureData; return true; } // resets the gesture-data states for all detected gestures of the specified user public void ResetPlayerGestures(uint UserId) { if(UserId == Player1ID) { int listSize = player1Gestures.Count; for(int i = 0; i < listSize; i++) { ResetGesture(UserId, player1Gestures[i].gesture); } } else if(UserId == Player2ID) { int listSize = player2Gestures.Count; for(int i = 0; i < listSize; i++) { ResetGesture(UserId, player2Gestures[i].gesture); } } } // deletes the given gesture from the list of detected gestures for the specified user public bool DeleteGesture(uint UserId, KinectGestures.Gestures gesture) { int index = GetGestureIndex(UserId, gesture); if(index < 0) return false; if(UserId == Player1ID) player1Gestures.RemoveAt(index); else if(UserId == Player2ID) player2Gestures.RemoveAt(index); return true; } // clears detected gestures list for the specified user public void ClearGestures(uint UserId) { if(UserId == Player1ID) { player1Gestures.Clear(); } else if(UserId == Player2ID) { player2Gestures.Clear(); } } // returns the count of detected gestures in the list of detected gestures for the specified user public int GetGesturesCount(uint UserId) { if(UserId == Player1ID) return player1Gestures.Count; else if(UserId == Player2ID) return player2Gestures.Count; return 0; } // returns the list of detected gestures for the specified user public List<KinectGestures.Gestures> GetGesturesList(uint UserId) { List<KinectGestures.Gestures> list = new List<KinectGestures.Gestures>(); if(UserId == Player1ID) { foreach(KinectGestures.GestureData data in player1Gestures) list.Add(data.gesture); } else if(UserId == Player2ID) { foreach(KinectGestures.GestureData data in player1Gestures) list.Add(data.gesture); } return list; } // returns true, if the given gesture is in the list of detected gestures for the specified user public bool IsGestureDetected(uint UserId, KinectGestures.Gestures gesture) { int index = GetGestureIndex(UserId, gesture); return index >= 0; } // returns true, if the given gesture for the specified user is complete public bool IsGestureComplete(uint UserId, KinectGestures.Gestures gesture, bool bResetOnComplete) { int index = GetGestureIndex(UserId, gesture); if(index >= 0) { if(UserId == Player1ID) { KinectGestures.GestureData gestureData = player1Gestures[index]; if(bResetOnComplete && gestureData.complete) { ResetPlayerGestures(UserId); return true; } return gestureData.complete; } else if(UserId == Player2ID) { KinectGestures.GestureData gestureData = player2Gestures[index]; if(bResetOnComplete && gestureData.complete) { ResetPlayerGestures(UserId); return true; } return gestureData.complete; } } return false; } // returns true, if the given gesture for the specified user is cancelled public bool IsGestureCancelled(uint UserId, KinectGestures.Gestures gesture) { int index = GetGestureIndex(UserId, gesture); if(index >= 0) { if(UserId == Player1ID) { KinectGestures.GestureData gestureData = player1Gestures[index]; return gestureData.cancelled; } else if(UserId == Player2ID) { KinectGestures.GestureData gestureData = player2Gestures[index]; return gestureData.cancelled; } } return false; } // returns the progress in range [0, 1] of the given gesture for the specified user public float GetGestureProgress(uint UserId, KinectGestures.Gestures gesture) { int index = GetGestureIndex(UserId, gesture); if(index >= 0) { if(UserId == Player1ID) { KinectGestures.GestureData gestureData = player1Gestures[index]; return gestureData.progress; } else if(UserId == Player2ID) { KinectGestures.GestureData gestureData = player2Gestures[index]; return gestureData.progress; } } return 0f; } // returns the current "screen position" of the given gesture for the specified user public Vector3 GetGestureScreenPos(uint UserId, KinectGestures.Gestures gesture) { int index = GetGestureIndex(UserId, gesture); if(index >= 0) { if(UserId == Player1ID) { KinectGestures.GestureData gestureData = player1Gestures[index]; return gestureData.screenPos; } else if(UserId == Player2ID) { KinectGestures.GestureData gestureData = player2Gestures[index]; return gestureData.screenPos; } } return Vector3.zero; } // recreates and reinitializes the lists of avatar controllers, after the list of avatars for player 1/2 was changed public void <API key>() { if(Player1Avatars.Count == 0 && Player2Avatars.Count == 0) { AvatarController[] avatars = FindObjectsOfType(typeof(AvatarController)) as AvatarController[]; foreach(AvatarController avatar in avatars) { Player1Avatars.Add(avatar.gameObject); } } if(Player1Controllers != null) { Player1Controllers.Clear(); foreach(GameObject avatar in Player1Avatars) { if(avatar != null && avatar.activeInHierarchy) { AvatarController controller = avatar.GetComponent<AvatarController>(); controller.<API key>(); controller.Start(); Player1Controllers.Add(controller); } } } if(Player2Controllers != null) { Player2Controllers.Clear(); foreach(GameObject avatar in Player2Avatars) { if(avatar != null && avatar.activeInHierarchy) { AvatarController controller = avatar.GetComponent<AvatarController>(); controller.<API key>(); controller.Start(); Player2Controllers.Add(controller); } } } } // removes the currently detected kinect users, allowing a new detection/calibration process to start public void ClearKinectUsers() { if(!KinectInitialized) return; // remove current users for(int i = allUsers.Count - 1; i >= 0; i { uint userId = allUsers[i]; RemoveUser(userId); } ResetFilters(); } // clears Kinect buffers and resets the filters public void ResetFilters() { if(!KinectInitialized) return; // clear kinect vars player1Pos = Vector3.zero; player2Pos = Vector3.zero; player1Ori = Matrix4x4.identity; player2Ori = Matrix4x4.identity; int skeletonJointsCount = (int)KinectWrapper.<API key>.Count; for(int i = 0; i < skeletonJointsCount; i++) { <API key>[i] = false; <API key>[i] = false; player1PrevTracked[i] = false; player2PrevTracked[i] = false; player1JointsPos[i] = Vector3.zero; player2JointsPos[i] = Vector3.zero; player1JointsOri[i] = Matrix4x4.identity; player2JointsOri[i] = Matrix4x4.identity; } if(trackingStateFilter != null) { for(int i = 0; i < trackingStateFilter.Length; i++) if(trackingStateFilter[i] != null) trackingStateFilter[i].Reset(); } if(<API key> != null) { for(int i = 0; i < <API key>.Length; i++) if(<API key>[i] != null) <API key>[i].Reset(); } if(clippedLegsFilter != null) { for(int i = 0; i < clippedLegsFilter.Length; i++) if(clippedLegsFilter[i] != null) clippedLegsFilter[i].Reset(); } } void Start() { //CalibrationText = GameObject.Find("CalibrationText"); int hr = 0; try { hr = KinectWrapper.NuiInitialize(KinectWrapper.NuiInitializeFlags.UsesSkeleton | KinectWrapper.NuiInitializeFlags.<API key> | (ComputeColorMap ? KinectWrapper.NuiInitializeFlags.UsesColor : 0)); if (hr != 0) { throw new Exception("NuiInitialize Failed"); } hr = KinectWrapper.<API key>(IntPtr.Zero, 8); // 0, 12,8 if (hr != 0) { throw new Exception("Cannot initialize Skeleton Data"); } depthStreamHandle = IntPtr.Zero; if(ComputeUserMap) { hr = KinectWrapper.NuiImageStreamOpen(KinectWrapper.NuiImageType.DepthAndPlayerIndex, KinectWrapper.Constants.ImageResolution, 0, 2, IntPtr.Zero, ref depthStreamHandle); if (hr != 0) { throw new Exception("Cannot open depth stream"); } } colorStreamHandle = IntPtr.Zero; if(ComputeColorMap) { hr = KinectWrapper.NuiImageStreamOpen(KinectWrapper.NuiImageType.Color, KinectWrapper.Constants.ImageResolution, 0, 2, IntPtr.Zero, ref colorStreamHandle); if (hr != 0) { throw new Exception("Cannot open color stream"); } } // set kinect elevation angle KinectWrapper.<API key>(SensorAngle); // init skeleton structures skeletonFrame = new KinectWrapper.NuiSkeletonFrame() { SkeletonData = new KinectWrapper.NuiSkeletonData[KinectWrapper.Constants.NuiSkeletonCount] }; // values used to pass to smoothing function smoothParameters = new KinectWrapper.<API key>(); switch(smoothing) { case Smoothing.Default: smoothParameters.fSmoothing = 0.5f; smoothParameters.fCorrection = 0.5f; smoothParameters.fPrediction = 0.5f; smoothParameters.fJitterRadius = 0.05f; smoothParameters.fMaxDeviationRadius = 0.04f; break; case Smoothing.Medium: smoothParameters.fSmoothing = 0.5f; smoothParameters.fCorrection = 0.1f; smoothParameters.fPrediction = 0.5f; smoothParameters.fJitterRadius = 0.1f; smoothParameters.fMaxDeviationRadius = 0.1f; break; case Smoothing.Aggressive: smoothParameters.fSmoothing = 0.7f; smoothParameters.fCorrection = 0.3f; smoothParameters.fPrediction = 1.0f; smoothParameters.fJitterRadius = 1.0f; smoothParameters.fMaxDeviationRadius = 1.0f; break; } // init the tracking state filter trackingStateFilter = new TrackingStateFilter[KinectWrapper.Constants.<API key>]; for(int i = 0; i < trackingStateFilter.Length; i++) { trackingStateFilter[i] = new TrackingStateFilter(); trackingStateFilter[i].Init(); } // init the bone orientation filter <API key> = new <API key>[KinectWrapper.Constants.<API key>]; for(int i = 0; i < <API key>.Length; i++) { <API key>[i] = new <API key>(); <API key>[i].Init(); } // init the clipped legs filter clippedLegsFilter = new ClippedLegsFilter[KinectWrapper.Constants.<API key>]; for(int i = 0; i < clippedLegsFilter.Length; i++) { clippedLegsFilter[i] = new ClippedLegsFilter(); } // init the bone orientation constraints <API key> = new <API key>(); <API key>.<API key>(); // init the self intersection constraints <API key> = new <API key>(); // create arrays for joint positions and joint orientations int skeletonJointsCount = (int)KinectWrapper.<API key>.Count; <API key> = new bool[skeletonJointsCount]; <API key> = new bool[skeletonJointsCount]; player1PrevTracked = new bool[skeletonJointsCount]; player2PrevTracked = new bool[skeletonJointsCount]; player1JointsPos = new Vector3[skeletonJointsCount]; player2JointsPos = new Vector3[skeletonJointsCount]; player1JointsOri = new Matrix4x4[skeletonJointsCount]; player2JointsOri = new Matrix4x4[skeletonJointsCount]; <API key> = new float[KinectWrapper.Constants.<API key>]; //create the transform matrix that converts from kinect-space to world-space Quaternion quatTiltAngle = new Quaternion(); quatTiltAngle.eulerAngles = new Vector3(-SensorAngle, 0.0f, 0.0f); //float heightAboveHips = SensorHeight - 1.0f; // transform matrix - kinect to world //kinectToWorld.SetTRS(new Vector3(0.0f, heightAboveHips, 0.0f), quatTiltAngle, Vector3.one); kinectToWorld.SetTRS(new Vector3(0.0f, SensorHeight, 0.0f), quatTiltAngle, Vector3.one); flipMatrix = Matrix4x4.identity; flipMatrix[2, 2] = -1; instance = this; DontDestroyOnLoad(gameObject); } catch(<API key> e) { string message = "Please check the Kinect SDK installation."; Debug.LogError(message); Debug.LogError(e.ToString()); if(CalibrationText != null) CalibrationText.guiText.text = message; return; } catch (Exception e) { string message = e.Message + " - " + KinectWrapper.GetNuiErrorString(hr); Debug.LogError(message); Debug.LogError(e.ToString()); if(CalibrationText != null) CalibrationText.guiText.text = message; return; } // get the main camera rectangle Rect cameraRect = Camera.main.pixelRect; // calculate map width and height in percent, if needed if(MapsPercentWidth == 0f) MapsPercentWidth = (KinectWrapper.GetDepthWidth() / 2) / cameraRect.width; if(MapsPercentHeight == 0f) MapsPercentHeight = (KinectWrapper.GetDepthHeight() / 2) / cameraRect.height; if(ComputeUserMap) { // Initialize depth & label map related stuff usersMapSize = KinectWrapper.GetDepthWidth() * KinectWrapper.GetDepthHeight(); usersLblTex = new Texture2D(KinectWrapper.GetDepthWidth(), KinectWrapper.GetDepthHeight()); usersMapColors = new Color32[usersMapSize]; usersPrevState = new ushort[usersMapSize]; //usersMapRect = new Rect(Screen.width, Screen.height - usersLblTex.height / 2, -usersLblTex.width / 2, usersLblTex.height / 2); //usersMapRect = new Rect(cameraRect.width, cameraRect.height - cameraRect.height * MapsPercentHeight, -cameraRect.width * MapsPercentWidth, cameraRect.height * MapsPercentHeight); usersMapRect = new Rect(cameraRect.width - cameraRect.width * MapsPercentWidth, cameraRect.height, cameraRect.width * MapsPercentWidth, -cameraRect.height * MapsPercentHeight); usersDepthMap = new short[usersMapSize]; usersHistogramMap = new float[8192]; } if(ComputeColorMap) { // Initialize color map related stuff usersClrTex = new Texture2D(KinectWrapper.GetDepthWidth(), KinectWrapper.GetDepthHeight()); //usersClrRect = new Rect(cameraRect.width, cameraRect.height - cameraRect.height * MapsPercentHeight, -cameraRect.width * MapsPercentWidth, cameraRect.height * MapsPercentHeight); usersClrRect = new Rect(cameraRect.width - cameraRect.width * MapsPercentWidth, cameraRect.height, cameraRect.width * MapsPercentWidth, -cameraRect.height * MapsPercentHeight); if(ComputeUserMap) usersMapRect.x -= cameraRect.width * MapsPercentWidth; //usersClrTex.width / 2; colorImage = new Color32[KinectWrapper.GetDepthWidth() * KinectWrapper.GetDepthHeight()]; usersColorMap = new byte[colorImage.Length << 2]; } // try to automatically find the available avatar controllers in the scene if(Player1Avatars.Count == 0 && Player2Avatars.Count == 0) { AvatarController[] avatars = FindObjectsOfType(typeof(AvatarController)) as AvatarController[]; foreach(AvatarController avatar in avatars) { Player1Avatars.Add(avatar.gameObject); } } // Initialize user list to contain ALL users. allUsers = new List<uint>(); // Pull the AvatarController from each of the players Avatars. Player1Controllers = new List<AvatarController>(); Player2Controllers = new List<AvatarController>(); // Add each of the avatars' controllers into a list for each player. foreach(GameObject avatar in Player1Avatars) { if(avatar != null && avatar.activeInHierarchy) { Player1Controllers.Add(avatar.GetComponent<AvatarController>()); } } foreach(GameObject avatar in Player2Avatars) { if(avatar != null && avatar.activeInHierarchy) { Player2Controllers.Add(avatar.GetComponent<AvatarController>()); } } // create the list of gesture listeners gestureListeners = new List<KinectGestures.<API key>>(); foreach(MonoBehaviour script in GestureListeners) { if(script && (script is KinectGestures.<API key>)) { KinectGestures.<API key> listener = (KinectGestures.<API key>)script; gestureListeners.Add(listener); } } // GUI Text. if(CalibrationText != null) { CalibrationText.guiText.text = "WAITING FOR USERS"; } Debug.Log("Waiting for users."); KinectInitialized = true; } void Update() { if(KinectInitialized) { // // for testing purposes only // KinectWrapper.UpdateKinectSensor(); // If the players aren't all calibrated yet, draw the user map. if(ComputeUserMap) { if(depthStreamHandle != IntPtr.Zero && KinectWrapper.PollDepth(depthStreamHandle, NearMode, ref usersDepthMap)) { UpdateUserMap(); } } if(ComputeColorMap) { if(colorStreamHandle != IntPtr.Zero && KinectWrapper.PollColor(colorStreamHandle, ref usersColorMap, ref colorImage)) { UpdateColorMap(); } } if(KinectWrapper.PollSkeleton(ref smoothParameters, ref skeletonFrame)) { ProcessSkeleton(); } // Update player 1's models if he/she is calibrated and the model is active. if(Player1Calibrated) { foreach (AvatarController controller in Player1Controllers) { //if(controller.Active) { controller.UpdateAvatar(Player1ID, NearMode); } } // Check for complete gestures foreach(KinectGestures.GestureData gestureData in player1Gestures) { if(gestureData.complete) { if(gestureData.gesture == KinectGestures.Gestures.Click) { if(ControlMouseCursor) { MouseControl.MouseClick(); } } foreach(KinectGestures.<API key> listener in gestureListeners) { if(listener.GestureCompleted(Player1ID, 0, gestureData.gesture, (KinectWrapper.SkeletonJoint)gestureData.joint, gestureData.screenPos)) { ResetPlayerGestures(Player1ID); } } } else if(gestureData.cancelled) { foreach(KinectGestures.<API key> listener in gestureListeners) { if(listener.GestureCancelled(Player1ID, 0, gestureData.gesture, (KinectWrapper.SkeletonJoint)gestureData.joint)) { ResetGesture(Player1ID, gestureData.gesture); } } } else if(gestureData.progress >= 0.1f) { if((gestureData.gesture == KinectGestures.Gestures.RightHandCursor || gestureData.gesture == KinectGestures.Gestures.LeftHandCursor) && gestureData.progress >= 0.5f) { if(HandCursor1 != null) { HandCursor1.transform.position = Vector3.Lerp(HandCursor1.transform.position, gestureData.screenPos, 3 * Time.deltaTime); } if(ControlMouseCursor) { MouseControl.MouseMove(gestureData.screenPos); } } foreach(KinectGestures.<API key> listener in gestureListeners) { listener.GestureInProgress(Player1ID, 0, gestureData.gesture, gestureData.progress, (KinectWrapper.SkeletonJoint)gestureData.joint, gestureData.screenPos); } } } } // Update player 2's models if he/she is calibrated and the model is active. if(Player2Calibrated) { foreach (AvatarController controller in Player2Controllers) { //if(controller.Active) { controller.UpdateAvatar(Player2ID, NearMode); } } // Check for complete gestures foreach(KinectGestures.GestureData gestureData in player2Gestures) { if(gestureData.complete) { if(gestureData.gesture == KinectGestures.Gestures.Click) { if(ControlMouseCursor) { MouseControl.MouseClick(); } } foreach(KinectGestures.<API key> listener in gestureListeners) { if(listener.GestureCompleted(Player2ID, 1, gestureData.gesture, (KinectWrapper.SkeletonJoint)gestureData.joint, gestureData.screenPos)) { ResetPlayerGestures(Player2ID); } } } else if(gestureData.cancelled) { foreach(KinectGestures.<API key> listener in gestureListeners) { if(listener.GestureCancelled(Player2ID, 1, gestureData.gesture, (KinectWrapper.SkeletonJoint)gestureData.joint)) { ResetGesture(Player2ID, gestureData.gesture); } } } else if(gestureData.progress >= 0.1f) { if((gestureData.gesture == KinectGestures.Gestures.RightHandCursor || gestureData.gesture == KinectGestures.Gestures.LeftHandCursor) && gestureData.progress >= 0.5f) { if(HandCursor2 != null) { HandCursor2.transform.position = Vector3.Lerp(HandCursor2.transform.position, gestureData.screenPos, 3 * Time.deltaTime); } if(ControlMouseCursor) { MouseControl.MouseMove(gestureData.screenPos); } } foreach(KinectGestures.<API key> listener in gestureListeners) { listener.GestureInProgress(Player2ID, 1, gestureData.gesture, gestureData.progress, (KinectWrapper.SkeletonJoint)gestureData.joint, gestureData.screenPos); } } } } } // Kill the program with ESC. if(Input.GetKeyDown(KeyCode.Escape)) { Application.Quit(); } } // Make sure to kill the Kinect on quitting. void OnApplicationQuit() { if(KinectInitialized) { // Shutdown OpenNI KinectWrapper.NuiShutdown(); instance = null; } } // Draw the Histogram Map on the GUI. void OnGUI() { if(KinectInitialized) { if(ComputeUserMap && (/**(allUsers.Count == 0) ||*/ DisplayUserMap)) { GUI.DrawTexture(usersMapRect, usersLblTex); } if(ComputeColorMap && (/**(allUsers.Count == 0) ||*/ DisplayColorMap)) { GUI.DrawTexture(usersClrRect, usersClrTex); } } } // Update the User Map void UpdateUserMap() { int numOfPoints = 0; Array.Clear(usersHistogramMap, 0, usersHistogramMap.Length); // Calculate cumulative histogram for depth for (int i = 0; i < usersMapSize; i++) { // Only calculate for depth that contains users if ((usersDepthMap[i] & 7) != 0) { usersHistogramMap[usersDepthMap[i] >> 3]++; numOfPoints++; } } if (numOfPoints > 0) { for (int i = 1; i < usersHistogramMap.Length; i++) { usersHistogramMap[i] += usersHistogramMap[i-1]; } for (int i = 0; i < usersHistogramMap.Length; i++) { usersHistogramMap[i] = 1.0f - (usersHistogramMap[i] / numOfPoints); } } // dummy structure needed by the coordinate mapper KinectWrapper.NuiImageViewArea pcViewArea = new KinectWrapper.NuiImageViewArea { eDigitalZoom = 0, lCenterX = 0, lCenterY = 0 }; // Create the actual users texture based on label map and depth histogram Color32 clrClear = Color.clear; for (int i = 0; i < usersMapSize; i++) { // Flip the texture as we convert label map to color array int flipIndex = i; // usersMapSize - i - 1; ushort userMap = (ushort)(usersDepthMap[i] & 7); ushort userDepth = (ushort)(usersDepthMap[i] >> 3); ushort nowUserPixel = userMap != 0 ? (ushort)((userMap << 13) | userDepth) : userDepth; ushort wasUserPixel = usersPrevState[flipIndex]; // draw only the changed pixels if(nowUserPixel != wasUserPixel) { usersPrevState[flipIndex] = nowUserPixel; if (userMap == 0) { usersMapColors[flipIndex] = clrClear; } else { if(colorImage != null) { int x = i % KinectWrapper.Constants.ImageWidth; int y = i / KinectWrapper.Constants.ImageWidth; int cx, cy; int hr = KinectWrapper.<API key>( KinectWrapper.Constants.ImageResolution, KinectWrapper.Constants.ImageResolution, ref pcViewArea, x, y, usersDepthMap[i], out cx, out cy); if(hr == 0) { int colorIndex = cx + cy * KinectWrapper.Constants.ImageWidth; //colorIndex = usersMapSize - colorIndex - 1; if(colorIndex >= 0 && colorIndex < usersMapSize) { Color32 colorPixel = colorImage[colorIndex]; usersMapColors[flipIndex] = colorPixel; // new Color(colorPixel.r / 256f, colorPixel.g / 256f, colorPixel.b / 256f, 0.9f); usersMapColors[flipIndex].a = 230; // 0.9f } } } else { // Create a blending color based on the depth histogram float histDepth = usersHistogramMap[userDepth]; Color c = new Color(histDepth, histDepth, histDepth, 0.9f); switch(userMap % 4) { case 0: usersMapColors[flipIndex] = Color.red * c; break; case 1: usersMapColors[flipIndex] = Color.green * c; break; case 2: usersMapColors[flipIndex] = Color.blue * c; break; case 3: usersMapColors[flipIndex] = Color.magenta * c; break; } } } } } // Draw it! usersLblTex.SetPixels32(usersMapColors); usersLblTex.Apply(); } // Update the Color Map void UpdateColorMap() { usersClrTex.SetPixels32(colorImage); usersClrTex.Apply(); } // Assign UserId to player 1 or 2. void CalibrateUser(uint UserId, ref KinectWrapper.NuiSkeletonData skeletonData) { // If player 1 hasn't been calibrated, assign that UserID to it. if(!Player1Calibrated) { // Check to make sure we don't accidentally assign player 2 to player 1. if (!allUsers.Contains(UserId)) { if(<API key>(UserId, ref <API key>, ref <API key>, ref skeletonData)) { Player1Calibrated = true; Player1ID = UserId; allUsers.Add(UserId); foreach(AvatarController controller in Player1Controllers) { controller.<API key>(UserId); } // add the gestures to detect, if any foreach(KinectGestures.Gestures gesture in Player1Gestures) { DetectGesture(UserId, gesture); } print ("user.detected"); // notify the gesture listeners about the new user foreach(KinectGestures.<API key> listener in gestureListeners) { listener.UserDetected(UserId, 0); } // reset skeleton filters ResetFilters(); // If we're not using 2 users, we're all calibrated. //if(!TwoUsers) { <API key> = !TwoUsers ? allUsers.Count >= 1 : allUsers.Count >= 2; // true; } } } } // Otherwise, assign to player 2. else if(TwoUsers && !Player2Calibrated) { if (!allUsers.Contains(UserId)) { if(<API key>(UserId, ref <API key>, ref <API key>, ref skeletonData)) { Player2Calibrated = true; Player2ID = UserId; allUsers.Add(UserId); foreach(AvatarController controller in Player2Controllers) { controller.<API key>(UserId); } // add the gestures to detect, if any foreach(KinectGestures.Gestures gesture in Player2Gestures) { DetectGesture(UserId, gesture); } // notify the gesture listeners about the new user foreach(KinectGestures.<API key> listener in gestureListeners) { listener.UserDetected(UserId, 1); } // reset skeleton filters ResetFilters(); // All users are calibrated! <API key> = !TwoUsers ? allUsers.Count >= 1 : allUsers.Count >= 2; // true; } } } // If all users are calibrated, stop trying to find them. if(<API key>) { Debug.Log("All players calibrated."); if(CalibrationText != null) { CalibrationText.guiText.text = ""; } } } // Remove a lost UserId void RemoveUser(uint UserId) { // If we lose player 1... if(UserId == Player1ID) { // Null out the ID and reset all the models associated with that ID. Player1ID = 0; Player1Calibrated = false; foreach(AvatarController controller in Player1Controllers) { controller.<API key>(UserId, IsCalibrationNeeded()); } foreach(KinectGestures.<API key> listener in gestureListeners) { listener.UserLost(UserId, 0); } <API key>.userId = 0; } // If we lose player 2... if(UserId == Player2ID) { // Null out the ID and reset all the models associated with that ID. Player2ID = 0; Player2Calibrated = false; foreach(AvatarController controller in Player2Controllers) { controller.<API key>(UserId, IsCalibrationNeeded()); } foreach(KinectGestures.<API key> listener in gestureListeners) { listener.UserLost(UserId, 1); } <API key>.userId = 0; } // clear gestures list for this user ClearGestures(UserId); // remove from global users list allUsers.Remove(UserId); <API key> = !TwoUsers ? allUsers.Count >= 1 : allUsers.Count >= 2; // false; // Try to replace that user! Debug.Log("Waiting for users."); if(CalibrationText != null) { CalibrationText.guiText.text = "WAITING FOR USERS"; } } // Some internal constants private const int stateTracked = (int)KinectWrapper.<API key>.Tracked; private const int stateNotTracked = (int)KinectWrapper.<API key>.NotTracked; private int [] mustBeTrackedJoints = { (int)KinectWrapper.<API key>.AnkleLeft, (int)KinectWrapper.<API key>.FootLeft, (int)KinectWrapper.<API key>.AnkleRight, (int)KinectWrapper.<API key>.FootRight, }; // Process the skeleton data void ProcessSkeleton() { List<uint> lostUsers = new List<uint>(); lostUsers.AddRange(allUsers); // calculate the time since last update float currentNuiTime = Time.<API key>; float deltaNuiTime = currentNuiTime - lastNuiTime; for(int i = 0; i < KinectWrapper.Constants.NuiSkeletonCount; i++) { KinectWrapper.NuiSkeletonData skeletonData = skeletonFrame.SkeletonData[i]; uint userId = skeletonData.dwTrackingID; if(skeletonData.eTrackingState == KinectWrapper.<API key>.SkeletonTracked) { // get the skeleton position Vector3 skeletonPos = kinectToWorld.MultiplyPoint3x4(skeletonData.Position); if(!<API key>) { // check if this is the closest user bool bClosestUser = true; if(DetectClosestUser) { for(int j = 0; j < KinectWrapper.Constants.NuiSkeletonCount; j++) { if(j != i) { KinectWrapper.NuiSkeletonData skeletonDataOther = skeletonFrame.SkeletonData[j]; if((skeletonDataOther.eTrackingState == KinectWrapper.<API key>.SkeletonTracked) && (Mathf.Abs(kinectToWorld.MultiplyPoint3x4(skeletonDataOther.Position).z) < Mathf.Abs(skeletonPos.z))) { bClosestUser = false; break; } } } } if(bClosestUser) { CalibrateUser(userId, ref skeletonData); } } / get joints orientations //KinectWrapper.<API key>[] jointOrients = new KinectWrapper.<API key>[(int)KinectWrapper.<API key>.Count]; //KinectWrapper.<API key>(ref skeletonData, jointOrients); if(userId == Player1ID && Mathf.Abs(skeletonPos.z) >= MinUserDistance) { player1Index = i; // get player position player1Pos = skeletonPos; // apply tracking state filter first trackingStateFilter[0].UpdateFilter(ref skeletonData); // fixup skeleton to improve avatar appearance. if(<API key> && clippedLegsFilter[0] != null) { clippedLegsFilter[0].FilterSkeleton(ref skeletonData, deltaNuiTime); } if(<API key> && <API key> != null) { <API key>.Constrain(ref skeletonData); } // get joints' position and rotation for (int j = 0; j < (int)KinectWrapper.<API key>.Count; j++) { bool playerTracked = <API key> ? (int)skeletonData.<API key>[j] == stateTracked : (Array.BinarySearch(mustBeTrackedJoints, j) >= 0 ? (int)skeletonData.<API key>[j] == stateTracked : (int)skeletonData.<API key>[j] != stateNotTracked); <API key>[j] = player1PrevTracked[j] && playerTracked; player1PrevTracked[j] = playerTracked; if(<API key>[j]) { player1JointsPos[j] = kinectToWorld.MultiplyPoint3x4(skeletonData.SkeletonPositions[j]); //player1JointsOri[j] = jointOrients[j].absoluteRotation.rotationMatrix * flipMatrix; } // if(j == (int)KinectWrapper.<API key>.HipCenter) // string debugText = String.Format("{0} {1}", /**(int)skeletonData.<API key>[j], */ // <API key>[j] ? "T" : "F", player1JointsPos[j]/**, skeletonData.SkeletonPositions[j]*/); // if(CalibrationText) // CalibrationText.guiText.text = debugText; } // draw the skeleton on top of texture if(<API key> && ComputeUserMap) { DrawSkeleton(usersLblTex, ref skeletonData, ref <API key>); } // calculate joint orientations KinectWrapper.<API key>(ref player1JointsPos, ref <API key>, ref player1JointsOri); // filter orientation constraints if(<API key> && <API key> != null) { <API key>.Constrain(ref player1JointsOri, ref <API key>); } // filter joint orientations. // it should be performed after all joint position modifications. if(<API key> && <API key>[0] != null) { <API key>[0].UpdateFilter(ref skeletonData, ref player1JointsOri); } // get player rotation player1Ori = player1JointsOri[(int)KinectWrapper.<API key>.HipCenter]; // check for gestures if(Time.<API key> >= <API key>[0]) { int listGestureSize = player1Gestures.Count; float timestampNow = Time.<API key>; for(int g = 0; g < listGestureSize; g++) { KinectGestures.GestureData gestureData = player1Gestures[g]; if((timestampNow >= gestureData.startTrackingAtTime) && !<API key>(gestureData)) { KinectGestures.CheckForGesture(userId, ref gestureData, Time.<API key>, ref player1JointsPos, ref <API key>); player1Gestures[g] = gestureData; if(gestureData.complete) { <API key>[0] = timestampNow + <API key>; } } } } } else if(userId == Player2ID && Mathf.Abs(skeletonPos.z) >= MinUserDistance) { player2Index = i; // get player position player2Pos = skeletonPos; // apply tracking state filter first trackingStateFilter[1].UpdateFilter(ref skeletonData); // fixup skeleton to improve avatar appearance. if(<API key> && clippedLegsFilter[1] != null) { clippedLegsFilter[1].FilterSkeleton(ref skeletonData, deltaNuiTime); } if(<API key> && <API key> != null) { <API key>.Constrain(ref skeletonData); } // get joints' position and rotation for (int j = 0; j < (int)KinectWrapper.<API key>.Count; j++) { bool playerTracked = <API key> ? (int)skeletonData.<API key>[j] == stateTracked : (Array.BinarySearch(mustBeTrackedJoints, j) >= 0 ? (int)skeletonData.<API key>[j] == stateTracked : (int)skeletonData.<API key>[j] != stateNotTracked); <API key>[j] = player2PrevTracked[j] && playerTracked; player2PrevTracked[j] = playerTracked; if(<API key>[j]) { player2JointsPos[j] = kinectToWorld.MultiplyPoint3x4(skeletonData.SkeletonPositions[j]); } } // draw the skeleton on top of texture if(<API key> && ComputeUserMap) { DrawSkeleton(usersLblTex, ref skeletonData, ref <API key>); } // calculate joint orientations KinectWrapper.<API key>(ref player2JointsPos, ref <API key>, ref player2JointsOri); // filter orientation constraints if(<API key> && <API key> != null) { <API key>.Constrain(ref player2JointsOri, ref <API key>); } // filter joint orientations. // it should be performed after all joint position modifications. if(<API key> && <API key>[1] != null) { <API key>[1].UpdateFilter(ref skeletonData, ref player2JointsOri); } // get player rotation player2Ori = player2JointsOri[(int)KinectWrapper.<API key>.HipCenter]; // check for gestures if(Time.<API key> >= <API key>[1]) { int listGestureSize = player2Gestures.Count; float timestampNow = Time.<API key>; for(int g = 0; g < listGestureSize; g++) { KinectGestures.GestureData gestureData = player2Gestures[g]; if((timestampNow >= gestureData.startTrackingAtTime) && !<API key>(gestureData)) { KinectGestures.CheckForGesture(userId, ref gestureData, Time.<API key>, ref player2JointsPos, ref <API key>); player2Gestures[g] = gestureData; if(gestureData.complete) { <API key>[1] = timestampNow + <API key>; } } } } } lostUsers.Remove(userId); } } // update the nui-timer lastNuiTime = currentNuiTime; // remove the lost users if any if(lostUsers.Count > 0) { foreach(uint userId in lostUsers) { RemoveUser(userId); } lostUsers.Clear(); } } // draws the skeleton in the given texture private void DrawSkeleton(Texture2D aTexture, ref KinectWrapper.NuiSkeletonData skeletonData, ref bool[] playerJointsTracked) { int jointsCount = (int)KinectWrapper.<API key>.Count; for(int i = 0; i < jointsCount; i++) { int parent = KinectWrapper.<API key>(i); if(playerJointsTracked[i] && playerJointsTracked[parent]) { Vector3 posParent = KinectWrapper.<API key>(skeletonData.SkeletonPositions[parent]); Vector3 posJoint = KinectWrapper.<API key>(skeletonData.SkeletonPositions[i]); // posParent.y = KinectWrapper.Constants.ImageHeight - posParent.y - 1; // posJoint.y = KinectWrapper.Constants.ImageHeight - posJoint.y - 1; // posParent.x = KinectWrapper.Constants.ImageWidth - posParent.x - 1; // posJoint.x = KinectWrapper.Constants.ImageWidth - posJoint.x - 1; //Color lineColor = playerJointsTracked[i] && playerJointsTracked[parent] ? Color.red : Color.yellow; DrawLine(aTexture, (int)posParent.x, (int)posParent.y, (int)posJoint.x, (int)posJoint.y, Color.yellow); } } aTexture.Apply(); } // draws a line in a texture private void DrawLine(Texture2D a_Texture, int x1, int y1, int x2, int y2, Color a_Color) { int width = KinectWrapper.Constants.ImageWidth; int height = KinectWrapper.Constants.ImageHeight; int dy = y2 - y1; int dx = x2 - x1; int stepy = 1; if (dy < 0) { dy = -dy; stepy = -1; } int stepx = 1; if (dx < 0) { dx = -dx; stepx = -1; } dy <<= 1; dx <<= 1; if(x1 >= 0 && x1 < width && y1 >= 0 && y1 < height) for(int x = -1; x <= 1; x++) for(int y = -1; y <= 1; y++) a_Texture.SetPixel(x1 + x, y1 + y, a_Color); if (dx > dy) { int fraction = dy - (dx >> 1); while (x1 != x2) { if (fraction >= 0) { y1 += stepy; fraction -= dx; } x1 += stepx; fraction += dy; if(x1 >= 0 && x1 < width && y1 >= 0 && y1 < height) for(int x = -1; x <= 1; x++) for(int y = -1; y <= 1; y++) a_Texture.SetPixel(x1 + x, y1 + y, a_Color); } } else { int fraction = dx - (dy >> 1); while (y1 != y2) { if (fraction >= 0) { x1 += stepx; fraction -= dy; } y1 += stepy; fraction += dx; if(x1 >= 0 && x1 < width && y1 >= 0 && y1 < height) for(int x = -1; x <= 1; x++) for(int y = -1; y <= 1; y++) a_Texture.SetPixel(x1 + x, y1 + y, a_Color); } } } // convert the matrix to quaternion, taking care of the mirroring private Quaternion ConvertMatrixToQuat(Matrix4x4 mOrient, int joint, bool flip) { Vector4 vZ = mOrient.GetColumn(2); Vector4 vY = mOrient.GetColumn(1); if(!flip) { vZ.y = -vZ.y; vY.x = -vY.x; vY.z = -vY.z; } else { vZ.x = -vZ.x; vZ.y = -vZ.y; vY.z = -vY.z; } if(vZ.x != 0.0f || vZ.y != 0.0f || vZ.z != 0.0f) return Quaternion.LookRotation(vZ, vY); else return Quaternion.identity; } // return the index of gesture in the list, or -1 if not found private int GetGestureIndex(uint UserId, KinectGestures.Gestures gesture) { if(UserId == Player1ID) { int listSize = player1Gestures.Count; for(int i = 0; i < listSize; i++) { if(player1Gestures[i].gesture == gesture) return i; } } else if(UserId == Player2ID) { int listSize = player2Gestures.Count; for(int i = 0; i < listSize; i++) { if(player2Gestures[i].gesture == gesture) return i; } } return -1; } private bool <API key>(KinectGestures.GestureData gestureData) { foreach(KinectGestures.Gestures gesture in gestureData.checkForGestures) { int index = GetGestureIndex(gestureData.userId, gesture); if(index >= 0) { if(gestureData.userId == Player1ID) { if(player1Gestures[index].progress > 0f) return true; } else if(gestureData.userId == Player2ID) { if(player2Gestures[index].progress > 0f) return true; } } } return false; } // check if the calibration pose is complete for given user private bool <API key>(uint userId, ref KinectGestures.Gestures calibrationGesture, ref KinectGestures.GestureData gestureData, ref KinectWrapper.NuiSkeletonData skeletonData) { if(calibrationGesture == KinectGestures.Gestures.None) return true; // init gesture data if needed if(gestureData.userId != userId) { gestureData.userId = userId; gestureData.gesture = calibrationGesture; gestureData.state = 0; gestureData.joint = 0; gestureData.progress = 0f; gestureData.complete = false; gestureData.cancelled = false; } // get temporary joints' position int skeletonJointsCount = (int)KinectWrapper.<API key>.Count; bool[] jointsTracked = new bool[skeletonJointsCount]; Vector3[] jointsPos = new Vector3[skeletonJointsCount]; int stateTracked = (int)KinectWrapper.<API key>.Tracked; int stateNotTracked = (int)KinectWrapper.<API key>.NotTracked; int [] mustBeTrackedJoints = { (int)KinectWrapper.<API key>.AnkleLeft, (int)KinectWrapper.<API key>.FootLeft, (int)KinectWrapper.<API key>.AnkleRight, (int)KinectWrapper.<API key>.FootRight, }; for (int j = 0; j < skeletonJointsCount; j++) { jointsTracked[j] = Array.BinarySearch(mustBeTrackedJoints, j) >= 0 ? (int)skeletonData.<API key>[j] == stateTracked : (int)skeletonData.<API key>[j] != stateNotTracked; if(jointsTracked[j]) { jointsPos[j] = kinectToWorld.MultiplyPoint3x4(skeletonData.SkeletonPositions[j]); } } // estimate the gesture progess KinectGestures.CheckForGesture(userId, ref gestureData, Time.<API key>, ref jointsPos, ref jointsTracked); // check if gesture is complete if(gestureData.complete) { gestureData.userId = 0; return true; } return false; } }
<?php namespace Lam\MdlBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Lam\MdlBundle\Entity\<API key> * @ORM\Table() * @ORM\Entity(repositoryClass="Lam\MdlBundle\Entity\<API key>") */ class <API key> { /** * @var integer $id * * @ORM\Column(name="id", type="integer", nullable=false) * @ORM\Id * @ORM\GeneratedValue(strategy="IDENTITY") */ private $id; /** * @var string $titre * * @ORM\Column(name="Titre", type="string", length=100, nullable=false) */ private $titre; /** * @var text $objectif * * @ORM\Column(name="Objectif", type="text", nullable=false) */ private $objectif; /** * @var string $public * * @ORM\Column(name="Public", type="string", length=150, nullable=false) */ private $public; /** * @var text $prerequis * * @ORM\Column(name="Prerequis", type="text", nullable=false) */ private $prerequis; /** * @var string $logo * * @ORM\Column(name="Logo", type="string", length=50, nullable=false) */ private $logo; /** * @var integer $nbplace * * @ORM\Column(name="nbPlace", type="integer", nullable=false) */ private $nbplace; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set titre * * @param string $titre */ public function setTitre($titre) { $this->titre = $titre; } /** * Get titre * * @return string */ public function getTitre() { return $this->titre; } /** * Set objectif * * @param text $objectif */ public function setObjectif($objectif) { $this->objectif = $objectif; } /** * Get objectif * * @return text */ public function getObjectif() { return $this->objectif; } /** * Set public * * @param string $public */ public function setPublic($public) { $this->public = $public; } /** * Get public * * @return string */ public function getPublic() { return $this->public; } /** * Set prerequis * * @param text $prerequis */ public function setPrerequis($prerequis) { $this->prerequis = $prerequis; } /** * Get prerequis * * @return text */ public function getPrerequis() { return $this->prerequis; } /** * Set logo * * @param string $logo */ public function setLogo($logo) { $this->logo = $logo; } /** * Get logo * * @return string */ public function getLogo() { return $this->logo; } /** * Set nbplace * * @param integer $nbplace */ public function setNbplace($nbplace) { $this->nbplace = $nbplace; } /** * Get nbplace * * @return integer */ public function getNbplace() { return $this->nbplace; } }
package com.hackathon.hackathon2014.activity; import android.app.Activity; import android.app.Fragment; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ImageView; import android.widget.ListView; import android.widget.Toast; import com.hackathon.hackathon2014.R; import com.hackathon.hackathon2014.webservice.PostRequestHandler; import com.hackathon.hackathon2014.webservice.RestProvider; import com.hackathon.hackathon2014.adapter.QuestionListAdapter; import com.hackathon.hackathon2014.model.Question; import java.util.List; public class QuestionActivity extends Activity { public static String EXTRA_QUESTION = "question"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_question); if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()) .commit(); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.question, menu); return true; } @Override public boolean <API key>(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.<API key>(item); } /** * A placeholder fragment containing a simple view. */ public static class PlaceholderFragment extends Fragment { public PlaceholderFragment() { } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View rootView = inflater.inflate(R.layout.fragment_question, container, false); Toast.makeText(rootView.getContext(),"Loading...",Toast.LENGTH_LONG).show(); RestProvider.getQuestions(new PostRequestHandler<List<Question>>() { @Override public void handle(List<Question> questions) { QuestionListAdapter questionListAdapter = new QuestionListAdapter(getActivity(), questions); ListView listView = (ListView) rootView.findViewById(R.id.questionListView); listView.setAdapter(questionListAdapter); listView.<API key>(new OpenAnswerEvent(getActivity(), questions)); } }); return rootView; } private class OpenAnswerEvent implements android.widget.AdapterView.OnItemClickListener { private List<Question> questions; private Activity activity; private OpenAnswerEvent(Activity activity, List<Question> questions) { this.activity = activity; this.questions = questions; } @Override public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { Question question = questions.get(i); question.setSelected(true); Intent intent = new Intent(activity,CategoryActivity.class); intent.putExtra(EXTRA_QUESTION, question); activity.startActivity(intent); final ImageView questionIcon = (ImageView) view.findViewById(R.id.questionIcon); QuestionListAdapter.renderChecked(question.isSelected(), questionIcon, R.drawable.ok_enable, R.drawable.ok_disable); } } } }
require_relative 'shell/version' require_relative 'shell/loader' require_relative 'shell/alfrc' module Alf module Shell # This is the default configuration to be forked from DEFAULT_CONFIG = Alfrc.new # Command factory def self.Command(*args) Quickl::Command(*args){|builder| builder.command_parent = Alf::Shell::Main builder.instance_module Shell::Support yield(builder) if block_given? } end end # module Shell end # module Alf require_relative 'shell/support' require_relative 'shell/command'
package net.tqft.iterables.interfaces; public interface Transformer<S, T> { public abstract T evaluate(S s); }
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mathcomp-analysis: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.9.1 / mathcomp-analysis - 0.3.2</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mathcomp-analysis <small> 0.3.2 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-02-16 00:21:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-16 00:21:27 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.14 <API key> of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.9.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;reynald.affeldt@aist.go.jp&quot; homepage: &quot;https://github.com/math-comp/analysis&quot; bug-reports: &quot;https://github.com/math-comp/analysis/issues&quot; dev-repo: &quot;git+https://github.com/math-comp/analysis.git&quot; license: &quot;CECILL-C&quot; authors: [ &quot;Reynald Affeldt&quot; &quot;Cyril Cohen&quot; &quot;Assia Mahboubi&quot; &quot;Damien Rouhling&quot; &quot;Pierre-Yves Strub&quot; ] build: [ [make &quot;INSTMODE=global&quot; &quot;config&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;coq&quot; { ((&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.13~&quot;) | = &quot;dev&quot;) } &quot;<API key>&quot; {(&gt;= &quot;1.0.0&quot;)} &quot;coq-mathcomp-field&quot; {(&gt;= &quot;1.11.0&quot; &amp; &lt; &quot;1.12~&quot;)} &quot;coq-mathcomp-finmap&quot; {(&gt;= &quot;1.5.0&quot; &amp; &lt; &quot;1.6~&quot;)} ] synopsis: &quot;An analysis library for mathematical components&quot; description: &quot;&quot;&quot; This repository contains an experimental library for real analysis for the Coq proof-assistant and using the Mathematical Components library. It is inspired by the Coquelicot library. &quot;&quot;&quot; tags: [ &quot;category:Mathematics/Real Calculus and Topology&quot; &quot;keyword: analysis&quot; &quot;keyword: topology&quot; &quot;keyword: real numbers&quot; &quot;logpath: mathcomp.analysis&quot; &quot;date:2020-08-11&quot; ] url { http: &quot;https://github.com/math-comp/analysis/archive/0.3.2.tar.gz&quot; checksum: &quot;sha512=aa2ffac487d71d3aceea9dafca21d7c8bfcbaaf52d9977fd9bf19a055d65597b95d9e2e10dc7da10676ab2f86a8cc205aac9e0fa08360fc127971f60f68c5430&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.0.3.2 coq.8.9.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.9.1). The following dependencies couldn&#39;t be met: - <API key> -&gt; coq &gt;= dev no matching version Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.0.3.2</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
require "capybarel/dsl/elements" require "capybarel/dsl/javascript" require "capybarel/dsl/from_yaml" module Capybarel module DSL module All include Capybarel::DSL::Elements include Capybarel::DSL::JavaScript include Capybarel::DSL::FromYaml end end end
import React, { Component } from 'react'; import logo from './logo.svg'; import './App.css'; import update from 'immutability-helper'; class ListItemBullet extends Component { render() { let cssClasses = `listbullet`; const bulletStyle = { border: `5px solid ${this.props.color}`, backgroundColor: 'white' }; return ( <div className={cssClasses} style={bulletStyle}></div> ); } }; class MyRouteMap extends Component { render() { const renderList = (list) => { const lis = list.map((data, index) => { return (<li key={index}><ListItemBullet color={this.props.color} /> { data.url? (<a href={data.url}><span className='description'>{data.name}</span><div className='details'>This is a test.<br/>This is second line</div></a>) : (<span className='description'>{data.name}</span>) } </li>); }) return lis; }; const cssClasses = `App-routemap ${this.props.color}`; const ulStyle = { //color: this.props.color, marginTop: '30px' }; const ulBeforeStyle = { content: " ", position: 'absolute', marginLeft: '8px', left: '0px', top: '20px', bottom: '40px', width: '12px', zIndex: -5, backgroundColor: this.props.color }; return ( <div className="App-routemap-div"> <h2>{this.props.title}</h2> <ul className={cssClasses} style={ulStyle}> <div style={ulBeforeStyle}></div> { renderList(this.props.datalist) } </ul> </div> ); } } class App extends Component { constructor() { super(); this.state = { list_unix: [ { name: "Git ", url: "https://se101.mtsa.me/Slide/Git/ } ], 'list_system': [ "", "", "Scaling Up" ], 'list_data': [ "", "TensorFlow ", ], 'list_algo': [ "Python3 ", "", "", "", "", "" ] }; } handleClick(e) { var p = this.state.list_data; p.push("Test Item"); var newState = update(this.state, {'list_data': {$set: p}}); this.setState(newState); } render() { return ( <div className="App"> <div className="App-header"> <h1>SE101: </h1> <span className="App-intro">UMich Taiwanese Software Engineers Reading Group - Fall 2017</span> </div> <div className="App-contents"> <MyRouteMap title=''datalist={this.state.list_unix} color='red' /> <MyRouteMap title='' datalist={this.state.list_system} color='darkgreen' /> <MyRouteMap title='' datalist={this.state.list_data} color='darkblue' /> <MyRouteMap title='' datalist={this.state.list_algo} color='orange' /> </div> </div> ); //<button onClick={() => this.handleClick()}>Add Item</button> } } export default App;
require 'spec_helper' describe RubygemsController do before do @g = Factory.create :rubygem @v = Factory.create :version, rubygem: @g end it 'should #show successfully' do tr = Factory.create :test_result, rubygem_id: @g.id, version_id: @v.id get :show, id: @g.name response.should be_successful end describe '' do render_views it "should redirect if there are no test results" do get :show, id: @g.name response.body.should match(/Nothing to see here!/) end end it 'should route to the root url when showing a gem that does not exist' do get :show, id: 'foo' response.should be_redirect flash[:notice].should == "Sorry, there's no data for foo yet." response.should redirect_to root_path end it 'should respond to json requests' do 10.times { Factory.create :test_result, rubygem_id: @g.id, version_id: @v.id } get :show, id: @g.name, format: 'json' response.should be_success response.body.should == @g.to_json(methods: [:pass_count, :fail_count], include: { versions: {methods: [:pass_count, :fail_count], include: :test_results} } ) end it 'should be successful when the rubygem is not found' do get :show, id: 'somegem', format: 'json' response.should be_success response.body.should == '{}' end describe "When there is a platform parameter" do render_views before do 10.times do v = Factory.create :version, rubygem: @g Factory.create :test_result, version: v, rubygem: @g, platform: "ruby" Factory.create :test_result, version: v, rubygem: @g, platform: "jruby" end @g2 = Factory.create :rubygem @v2 = Factory.create :version, rubygem: @g2 Factory.create :test_result, version: @v2, rubygem: @g2, platform: "jruby" end it "should #show if there are tests for that platform" do get :show, id: @g.name, platform: "ruby" response.should be_successful end it "should not omit valid platforms if one is selected" do get :show, id: @g.name, platform: "ruby" response.should be_successful response.body.should match(%r!<option[^>]*>jruby</option>!) end it "should redirect if there are no tests for that platform" do get :show, id: @g.name, platform: "rbx" response.body.should match(/Nothing to see here!/) end it "should have the right platform selected when there is only one platform" do get :show, id: @g.name, platform: "jruby" response.should be_success response.body.should match(%r!<option value="[^\"]+" selected="selected">jruby</option>!i) end end describe "datatables paging" do before do @datatables_params = { "rubygem_id"=> @g.name, "format"=>"json", "sEcho"=>"3", "iColumns"=>"7", "sColumns"=>"", "iDisplayStart"=>"0", "iDisplayLength"=>"10", "sNames"=>",,,,,,", "sSearch"=>"", "bRegex"=>"false", "sSearch_0"=>"", "bRegex_0"=>"false", "bSearchable_0"=>"true", "sSearch_1"=>"", "bRegex_1"=>"false", "bSearchable_1"=>"true", "sSearch_2"=>"", "bRegex_2"=>"false", "bSearchable_2"=>"true", "sSearch_3"=>"", "bRegex_3"=>"false", "bSearchable_3"=>"true", "sSearch_4"=>"", "bRegex_4"=>"false", "bSearchable_4"=>"true", "sSearch_5"=>"", "bRegex_5"=>"false", "bSearchable_5"=>"true", "sSearch_6"=>"", "bRegex_6"=>"false", "bSearchable_6"=>"true", "iSortingCols"=>"1", "iSortCol_0"=>"0", "sSortDir_0"=>"asc", "bSortable_0"=>"true", "bSortable_1"=>"true", "bSortable_2"=>"true", "bSortable_3"=>"true", "bSortable_4"=>"true", "bSortable_5"=>"true", "bSortable_6"=>"true"} end it "should handle datatables splatter of parameters with show_paged" do t = Array.new(20).collect { |x| Factory.create :test_result, version: @v, rubygem: @g } expected_response = { iTotalRecords: 20, <API key>: 20, aaData: t.slice(0..9).collect(&:<API key>) }.to_json get :show_paged, @datatables_params response.should be_successful response.body.should == expected_response end describe "should search" do before do @params = @datatables_params.clone end it 'pass or fail' do @params['sSearch'] = 'pass' t = Factory.create :test_result, rubygem: @g, version: @v, result: true expected_response = {iTotalRecords: 1, <API key>: 1, aaData: [t.<API key>]}.to_json get :show_paged, @params response.should be_successful response.body.should == expected_response end end describe "should honor sorting in for" do before do @params = @datatables_params.clone end describe "result" do it "ascending" do @params['iSortCol_0'] = 0 @params['sSortDir_0'] = 'asc' Array.new(5).collect { |x| Factory.create :test_result, result: true, version: @v, rubygem: @g } Array.new(5).collect { |x| Factory.create :test_result, result: false, version: @v, rubygem: @g } Array.new(3).collect { |x| Factory.create :test_result, result: true, version: @v, rubygem: @g } get :show_paged, @params r = JSON::parse response.body r['aaData'].slice(0..4).collect { |x| x[0].should match(/FAIL/) } r['aaData'].slice(5..12).collect { |x| x[0].should match(/PASS/) } end it "descending" do @params['iSortCol_0'] = 0 @params['sSortDir_0'] = 'desc' Array.new(5).collect { |x| Factory.create :test_result, result: true, version: @v, rubygem: @g } Array.new(5).collect { |x| Factory.create :test_result, result: false, version: @v, rubygem: @g } Array.new(3).collect { |x| Factory.create :test_result, result: true, version: @v, rubygem: @g } get :show_paged, @params r = JSON::parse response.body r['aaData'].slice(0..7).collect { |x| x[0].should match(/PASS/) } r['aaData'].slice(8..12).collect { |x| x[0].should match(/FAIL/) } end end describe "gem version" do it "ascending" do @params['iSortCol_0'] = 1 @params['sSortDir_0'] = 'asc' v1 = Factory.create :version, number: '0.1.0' v3 = Factory.create :version, number: '1.2.0' v2 = Factory.create :version, number: '0.2.0' Array.new(5).collect { |x| Factory.create :test_result, result: true, version: v1, rubygem: @g } Array.new(5).collect { |x| Factory.create :test_result, result: false, version: v3, rubygem: @g } Array.new(3).collect { |x| Factory.create :test_result, result: true, version: v2, rubygem: @g } get :show_paged, @params r = JSON::parse response.body r['aaData'].slice(0..4).collect { |x| x[1].should match(/0.1.0/) } r['aaData'].slice(5..7).collect { |x| x[1].should match(/0.2.0/) } r['aaData'].slice(8..9).collect { |x| x[1].should match(/1.2.0/) } end it "descending" do @params['iSortCol_0'] = 1 @params['sSortDir_0'] = 'desc' v1 = Factory.create :version, number: '0.1.0' v3 = Factory.create :version, number: '1.2.0' v2 = Factory.create :version, number: '0.2.0' Array.new(5).collect { |x| Factory.create :test_result, result: true, version: v1, rubygem: @g } Array.new(5).collect { |x| Factory.create :test_result, result: false, version: v3, rubygem: @g } Array.new(3).collect { |x| Factory.create :test_result, result: true, version: v2, rubygem: @g } get :show_paged, @params r = JSON::parse response.body r['aaData'].slice(0..4).collect { |x| x[1].should match(/1.2.0/) } r['aaData'].slice(5..7).collect { |x| x[1].should match(/0.2.0/) } r['aaData'].slice(8..10).collect { |x| x[1].should match(/0.1.0/) } end end end end end
using System; using System.IO; namespace Pulse.Core { <summary> НЕ потокобезопасный! </summary> public sealed class StreamSegment : Stream { private long _offset, _length; public readonly Stream BaseStream; public StreamSegment(Stream stream, long offset, long length, FileAccess access) { Exceptions.CheckArgumentNull(stream, "stream"); if (offset < 0 || offset >= stream.Length) throw new <API key>("offset", offset, "Смещение выходит за границы потока."); if (offset + length > stream.Length) throw new <API key>("length", length, "Недопустимая длина."); _offset = offset; _length = length; BaseStream = stream; switch (access) { case FileAccess.Read: BaseStream.Position = _offset; break; case FileAccess.Write: BaseStream.Position = _offset; break; default: BaseStream.Seek(_offset, SeekOrigin.Begin); break; } } public override bool CanRead { get { return BaseStream.CanRead; } } public override bool CanSeek { get { return BaseStream.CanSeek; } } public override bool CanWrite { get { return BaseStream.CanWrite; } } public override long Length { get { return _length; } } public override long Position { get { return BaseStream.Position - _offset; } set { BaseStream.Position = value + _offset; } } public override void Flush() { BaseStream.Flush(); } public override long Seek(long offset, SeekOrigin origin) { switch (origin) { case SeekOrigin.Begin: Position = offset; break; case SeekOrigin.Current: Position += offset; break; case SeekOrigin.End: Position = Length + offset; break; } return Position; } public void SetOffset(long value) { _offset = value; } public override void SetLength(long value) { _length = value; } public override int Read(byte[] buffer, int offset, int count) { return BaseStream.Read(buffer, offset, (int)Math.Min(count, Length - Position)); } public override void Write(byte[] buffer, int offset, int count) { BaseStream.Write(buffer, offset, count); } } }
import Ember from 'ember'; export default Ember.Component.extend({ tagName: '', didInsertElement: function() { this.startPoppover(); }, willDestroyElement: function() { this.dismissPoppover(); }, startPoppover: function() { var options = this.getPoppoverOptions(); Ember.$(function() { Ember.$('[data-toggle="popover"]').popover(options); }); }, getPoppoverOptions: function() { var template = Ember.$('.poppover-template').innerHTML; var content = Ember.$('.poppover-content').html(); return { template: template, placement: 'right', title: 'Download Tip', trigger: 'hover', content: content, html: true }; }, dismissPoppover: function() { Ember.$('[data-toggle="popover"]').popover('hide'); } });
#ifndef _RELLIK_H_ #define _RELLIK_H_ #include "gametime.h" typedef struct rellik Rellik; Rellik *rellik_Create(); void rellik_Destroy(Rellik *self); void rellik_Initialize(Rellik *self); void rellik_Update(Rellik *self, GameTime gameTime); void rellik_Render(Rellik *self); #endif
header { width: 100%; color: #fff; text-align: center; } .container { width: 80%; margin: 0 auto; } .brand { background: linear-gradient(-225deg, #2c5499, #3e97e6); padding: 30px 0; } .brand img { cursor: pointer; } h1 { font-size: 3em; font-weight: normal; line-height: 60px; cursor: pointer; display: inline-block; } h3 { font-size: 1.375em; font-weight: normal; color: #bfd7ff; line-height: 30px; } .search-box { position: relative; width: 30%; min-width: 300px; margin: 15px auto; } #search-field { width: 100%; background: url(../../../assets/img/icon-search-32px.svg) no-repeat 16px 16px, rgba(255,255,255,0.4); border: none; font-size: 1.5em; color: rgba(62, 151, 230, 0.87);; padding: 16px 20px; } #search-field:focus, #search-field:valid { background: url(../../../assets/img/icon-search-32px.svg) no-repeat 16px 16px, #fff; } .search-box label { position: absolute; top: 16px; left: 54px; font-size: 1.5em; color: #fff; cursor: text; } #search-field:focus + label, #search-field:valid + label { display: none; } .brand a, .brand a:active, .brand a:visited { text-transform: uppercase; color: #fff; font-size: 0.875em; } .brand a:hover { opacity: 0.7; } .divider { background: #2c5499; font-size: 1.25em; color: rgba(255, 255, 255, 0.7); line-height: 32px; padding: 24px; } .container .page { width: 100%; margin-top: 30px; } .section-title { font-size: 1.5em; color: #78909C; margin-bottom: 20px; } .card { position: relative; float: left; height: 200px; width: calc(33% - 30px); background: #fff; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); padding: 24px; margin: 15px; margin-bottom: 28px; cursor: pointer; } .card:last-child { margin-bottom: 45px; } .card:hover { box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 1px 10px 0 rgba(0, 0, 0, 0.12), 0 2px 4px -1px rgba(0, 0, 0, 0.4); } .no-results { font-size: 1.5em; width: 100%; text-align: center; padding: 50px 0; } .row { clear: both; padding: 0px; margin: 0px; } .col { display: block; float: left; margin-bottom: 30px; padding-left: 30px; } .col:first-child { padding-left: 0; } .col-3 { width: 33%; } .publish-steps { background: linear-gradient(45deg, #2c5499, #3e97e6); text-align: center; color: #fff; padding-top: 30px; padding-bottom: 10px; } .how-to { font-size: 1.75em; color: #bfd7ff; margin-bottom: 30px; } .step-number { width: 64px; height: 64px; float: left; background: #fff; border-radius: 50%; font-size: 1.75em; color: #2c5499; line-height: 64px; margin-right: 16px; } .step-content { display: table-cell; vertical-align: middle; height: 64px; font-size: 1.25em; text-align: left; margin-left: 24px; } @media only screen and (max-width: 1200px) { .container { width: 90%; } .card { width: calc(50% - 30px); } } @media only screen and (max-width: 1020px) { .col, .col:first-child { padding-left: 10px; padding-right: 10px; } .col-3 { width: 100%; } } @media only screen and (max-width: 768px) { .container { width: 100%; } .card { width: calc(100% - 30px); } }
FROM debian:8.2 MAINTAINER Stuart Ellis <stuart@stuartellis.eu> ENV REFRESHED_AT 2015-09-09 ENV PYTHON_VERSION 3.4.2-2 RUN apt-get update && \ apt-get install -qy python3=$PYTHON_VERSION && \
<?php use Illuminate\Database\Seeder; use Illuminate\Support\Str; class TagsTableSeeder extends Seeder { /** * Run the database seeding. */ public function run() { DB::table('tags')->truncate(); DB::table('tags')->insert([ [ 'name' => 'Qnique', 'slug' => Str::slug('qnique'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Quilting', 'slug' => Str::slug('quilting'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Quilting Machine', 'slug' => Str::slug('quilting-machine'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Sewing Machine', 'slug' => Str::slug('sewing-machine'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Expert Quilter', 'slug' => Str::slug('expert-quilter'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Quilting Tutorial', 'slug' => Str::slug('quilting-tutorial'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Hand Quilting', 'slug' => Str::slug('hand-quilting'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Hand Quilting Frame', 'slug' => Str::slug('hand-quilting-frame'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Quilting Hoop', 'slug' => Str::slug('quilting-hoop'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Quilting Lap Hoop', 'slug' => Str::slug('quilting-lap-hoop'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Grace', 'slug' => Str::slug('grace'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Grace Company', 'slug' => Str::slug('grace-company'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Grace Frame', 'slug' => Str::slug('grace-frame'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Grace Manufacturing', 'slug' => Str::slug('grace-manufacturing'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], [ 'name' => 'Affordable Programmer', 'slug' => Str::slug('<API key>'), 'created_at' => new DateTime(), 'updated_at' => new DateTime(), 'lang' => 'en', ], ]); } }
using System; using System.Diagnostics; using Microsoft.CodeAnalysis; using SonarAnalyzer.Helpers; using SonarLint.VisualStudio.Integration.Vsix.Suppression; namespace SonarLint.VisualStudio.Integration.Vsix { // This workflow affects only the VSIX Analyzers internal class <API key> : <API key> { private readonly <API key> suppressionHandler; public <API key>(Workspace workspace, <API key> suppressionHandler) : base(workspace) { if (suppressionHandler == null) { throw new <API key>(nameof(suppressionHandler)); } this.suppressionHandler = suppressionHandler; <API key>.ReportDiagnostic = <API key>; } internal /* for testing purposes */ void <API key>(IReportingContext context) { Debug.Assert(context.SyntaxTree != null, "Not expecting to be called with a null SyntaxTree"); Debug.Assert(context.Diagnostic != null, "Not expecting to be called with a null Diagnostic"); Debug.Assert(<API key>(context.SyntaxTree) == <API key>.NoAnalyzer, "Not expecting to be called when project contains any SonarAnalyzer NuGet"); if (this.suppressionHandler.<API key>(context.SyntaxTree, context.Diagnostic)) { context.ReportDiagnostic(context.Diagnostic); } } } }
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * SoundcloudSearch Schema */ var <API key> = new Schema({ // SoundcloudSearch model fields search: { type: String, required: 'There must be a search term', trim: true }, result: { type: Object }, created: { type: Date, default: Date.now } }); mongoose.model('SoundcloudSearch', <API key>);
layout: home title: All Posts description: "An archive of posts." comments: false {% for post in site.posts %} {% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %} {% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %} {% if forloop.first %} <article> <h2 id="{{ this_year }}-ref">{{ this_year }}</h2> <ul> {% endif %} <li class="entry-title"><a href="{{ site.url }}{{ post.url }}" title="{{ post.title }}">{{ post.title }}</a> </li> {% if forloop.last %} </ul> </article> {% else %} {% if this_year != next_year %} </ul> </article> <article> <h2 id="{{ next_year }}-ref" class="year-heading">{{next_year}}</h2> <ul> {% endif %} {% endif %} {% endfor %}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>io: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.0 / io - 3.3.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> io <small> 3.3.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2022-03-02 09:40:27 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-02 09:40:27 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-num base Num library distributed with the OCaml compiler base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.0 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.0 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;dev@clarus.me&quot; homepage: &quot;https://github.com/clarus/io&quot; dev-repo: &quot;git+https://github.com/clarus/io.git&quot; bug-reports: &quot;https://github.com/clarus/io/issues&quot; authors: [&quot;Guillaume Claret&quot;] license: &quot;MIT&quot; build: [ [&quot;./configure.sh&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Io&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] synopsis: &quot;A library for effects in Coq&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-io/io/archive/3.3.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-io.3.3.0 coq.8.12.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.0). The following dependencies couldn&#39;t be met: - coq-io -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.03.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-io.3.3.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script type="text/javascript" src="lens.js"></script> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/kineticjs/4.7.2/kinetic.min.js"></script> <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.min.js"></script> <LINK REL=StyleSheet HREF="style.css" TYPE="text/css" > </head> <body onload="startup()"> <div id="main"> <div id="toolbar" align="center"> <div id="lensgroup" title="Drag and Drop upto two lenses"> <div id="labels">Lens</div> <div id="lens" ><img id="lense0" name="convex_lense" class="lenses" width=100 height=100 src="Images/100b.png"></div> <div id="lens"><img id="lense1" name="concave_lense" class="lenses" width=100 height=100 src="Images/100a.png"></div> <div id="lens" ><img id="lense2" name="plano_convex_lense" class="lenses" width=100 height=100 src="Images/100plano.png"></div> <div id="lens"><img id="lense3" name="plano_concave_lense" class="lenses" width=100 height=100 src="Images/plano100.png"></div> <div id="lens" ><img id="lense4" name="meniscus_lense" class="lenses" width=100 height=100 src="Images/100po.png"></div> </div></div> <div id="container" align="center"></div> <div id="toolbar" align="center"> <div id="objectgroup" title="Click one of these objects" > <div id="labels">Objects</div> <div id="object"><img id="object_arrow" width=100% height=100% src="Images/arr.png"></div> <div id="object"><img id="object_triangle" width=100% height=100% src="Images/triangle.png"></div> <div id="object"><img id="object_square" width=100% height=100% src="Images/box.png"></div> </div> <div id="labels">Help</div> <div id="help1"><img id="help" width=100% height=100% src="Images/help.png"></div> </div> </div> <div class="overlay-bg"> </div> <div class="overlay-content popup1"> <p># In the toolbar there are five type of lenses avaiable. <br /><br /> # <b>Drag & Drop</b> the lens to the experiment area to place the lens <br /><br /> # <b>Click</b> on the Object to place the object in experimental area <br /><br /> # You can add upto <b>two lenses</b> , after added two lenses you can <b>replace</b> the lens by dragging the wanted lens near to the existing lens.<br /><br /> # You can <b>Drag</b> the lenses to get ray diagram after adding <b>second lens</b> <br /><br /> # <b>Double click</b> on the lens to remove the lens from the experimental area.<br /><br /> # There are three types of objects are available here <b>Arrow</b>, <b>Triangle</b> and <b>Rectangle</b> </p> <button class="close-btn">Close</button> </div> </body> </html>
{% extends 'base.html' %} {% block body %} <div> rest: {{ restaurant.name }} </div> {% endblock %}
import random # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): _largesize = 300 def __init__(self, head): self.head = head self.lsize = 0 while head.next: head = head.next self.lsize += 1 self.m1_idx = None self.m2_idx = None if self.lsize > self._largesize: self.m1_idx = self.lsize / 3 # start from 1/3 self.m1 = self._getN(self.m1_idx) self.m2_idx = self.m1_idx * 2 # start from 2/3 self.m2 = self._getN(self.m2_idx) def _getN(self, n): n -= 1 p = self.head while n: p = p.next n -= 1 return p def getRandom(self): def _get(delta, start): p = start while delta: p = p.next delta -= 1 return p.val nextpos = random.randint(0, self.lsize) if not self.m1_idx: return _get(nextpos, self.head) if nextpos < self.m1_idx: val = _get(nextpos, self.head) elif nextpos < self.m2_idx: val = _get(nextpos - self.m1_idx, self.m1) else: val = _get(nextpos - self.m2_idx, self.m2) return val
package db import ( "io/ioutil" "os" . "fmt" "strings" . "github.com/yak-labs/chirp-lang" "github.com/yak-labs/smilax-web/table/levi" ) /* table get Site Table Row -> []Value table set Site Table Row []Value table match Site Table RowPattern ValuePattern -> []{row value} */ var Lev = levi.New("leveldb.dat") var data_dir = os.Getenv("SMILAX_DATA_DIR") var log_file = Sprintf("%s/table_log.txt", data_dir) func init() { if len(data_dir) == 0 { data_dir = "." } } func cmdTableLoad(fr *Frame, argv []T) T { Arg0(argv) TableLoad() return Empty } func cmdTableGet(fr *Frame, argv []T) T { site, table, row := Arg3(argv) return MkList(TableGet(site.String(), table.String(), row.String())) } func cmdTableSet(fr *Frame, argv []T) T { site, table, row, values := Arg4(argv) TableSet(site.String(), table.String(), row.String(), values.String()) return Empty } func cmdTableMatch(fr *Frame, argv []T) T { site, table, rowPat, valuePat := Arg4(argv) return MkList(TableMatch(site.String(), table.String(), rowPat.String(), valuePat.String())) } func TableLoad() { // Start with a fresh levelDB database. Lev.Close() err := os.RemoveAll("leveldb.data") if err != nil { panic(err) } Lev = levi.New("leveldb.dat") text, err := ioutil.ReadFile(log_file) if err != nil { panic(err) } lines := strings.Split(string(text), "\n") for _, line := range lines { line = strings.Trim(line, " \t") if line == "" || strings.HasPrefix(line, " continue } words := ParseList(line) leviSet(words[0].String(), words[1].String(), words[2].String(), words[3].String()) } } func TableGet(site, table, row string) []T { key := Sprintf("/%s/%s/%s", site, table, row) vals := Lev.Get(key) return ParseList(vals) } func leviSet(site, table, row, values string) { key := Sprintf("/%s/%s/%s", site, table, row) Lev.Set(key, values) } func TableSet(site, table, row, values string) { leviSet(site, table, row, values) line := MkList( []T { MkString(site), MkString(table), MkString(row), MkString(values), }).String() line = Sprintf("%s\n", line) f, err := os.OpenFile(log_file, os.O_APPEND|os.O_WRONLY, 0600) if err != nil { panic(err) } defer f.Close() if _, err = f.WriteString(line); err != nil { panic(err) } } func TableMatch(site, table, rowPat, valuePat string) []T { threeSlashLen := len(site) + len(table) + 3 keyPattern := Sprintf("/%s/%s/%s", site, table, rowPat) prefix := keyPattern star := strings.IndexAny(prefix, "*[") if star >= 0 { prefix = prefix[:star] // Shorten prefix, stopping before '*'. } zz := make([]T, 0) it := Lev.Find(prefix) // for it.Next() // IF mappy for _ = it; it.Valid() ; it.Next() { key := string(it.Key()) value := string(it.Value()) if !strings.HasPrefix(key, prefix) { break // Gone too far. } if StringMatch(keyPattern, key) { z := make([]T, 0, 0) vv := ParseList(value) for _, v := range vv { if StringMatch(valuePat, v.String()) { z = append(z, v) } } if len(z) > 0 { zz = append(zz, MkList([]T{MkString(key[threeSlashLen:]), MkList(z)})) } } } if err := it.GetError(); err != nil { panic(err) } return zz } var tableEnsemble = []EnsembleItem{ EnsembleItem{Name: "load", Cmd: cmdTableLoad}, EnsembleItem{Name: "get", Cmd: cmdTableGet}, EnsembleItem{Name: "set", Cmd: cmdTableSet}, EnsembleItem{Name: "match", Cmd: cmdTableMatch}, } func init() { if Unsafes == nil { Unsafes = make(map[string]Command, 333) } Unsafes["table"] = MkEnsemble(tableEnsemble) }
package com.github.wovnio.wovnjava; import java.util.HashMap; import javax.servlet.FilterConfig; import javax.servlet.http.HttpServletRequest; import org.easymock.EasyMock; import java.net.URL; import java.net.<API key>; import junit.framework.TestCase; public class HeadersTest extends TestCase { private Lang japanese; protected void setUp() throws Exception { this.japanese = Lang.get("ja"); } private static FilterConfig mockConfigPath() { HashMap<String, String> parameters = new HashMap<String, String>() {{ put("urlPattern", "path"); }}; return TestUtil.<API key>(parameters); } private static FilterConfig mockConfigSubdomain() { HashMap<String, String> parameters = new HashMap<String, String>() {{ put("urlPattern", "subdomain"); }}; return TestUtil.<API key>(parameters); } private static FilterConfig mockConfigQuery() { HashMap<String, String> parameters = new HashMap<String, String>() {{ put("urlPattern", "query"); put("defaultLang", "en"); put("supportedLangs", "en,ja,zh-CHS"); }}; return TestUtil.<API key>(parameters); } public void testHeaders() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/ja/test"); FilterConfig mockConfig = mockConfigPath(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertNotNull(h); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/ja/test"); FilterConfig mockConfig = mockConfigPath(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals(this.japanese, h.getRequestLang()); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://ja.example.com/test"); FilterConfig mockConfig = mockConfigSubdomain(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals(this.japanese, h.getRequestLang()); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/test?wovn=ja"); FilterConfig mockConfig = mockConfigQuery(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals(this.japanese, h.getRequestLang()); } public void <API key>() throws ConfigurationError, <API key> { HttpServletRequest mockRequest = <API key>.create("https://example.com/ja/test"); FilterConfig mockConfig = mockConfigPath(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); URL url = new URL("http://example.com/ja/test"); assertEquals("http://example.com/test", h.<API key>(url).toString()); } public void <API key>() throws ConfigurationError, <API key> { HttpServletRequest mockRequest = <API key>.create("https://ja.example.com/test"); FilterConfig mockConfig = mockConfigSubdomain(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); URL url = new URL("http://ja.example.com/test"); assertEquals("http://example.com/test", h.<API key>(url).toString()); } public void <API key>() throws ConfigurationError, <API key> { HttpServletRequest mockRequest = <API key>.create("https://example.com/test?wovn=ja"); FilterConfig mockConfig = mockConfigQuery(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); URL url = new URL("http://example.com/test?wovn=ja"); assertEquals("http://example.com/test", h.<API key>(url).toString()); } public void <API key>() throws ConfigurationError, <API key> { Headers h = createHeaders("/global/en/foo", "/global/", ""); URL url; url = new URL("http://site.com/global/en/"); assertEquals("http://site.com/global/", h.<API key>(url).toString()); url = new URL("http://site.com/en/global/"); assertEquals("http://site.com/en/global/", h.<API key>(url).toString()); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/signin"); FilterConfig mockConfig = mockConfigPath(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals("http: assertEquals("https: assertEquals("https: } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/ja/dir/signin"); FilterConfig mockConfig = mockConfigPath(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals("http: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https://example.com/ja/", h.<API key>("/")); assertEquals("https://example.com/ja/dir/file", h.<API key>("/dir/file")); assertEquals("https://example.com/ja/dir/file", h.<API key>("./file")); assertEquals("https://example.com/ja/file", h.<API key>("../file")); assertEquals("https://example.com/ja/file", h.<API key>("../../file")); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/ja/dir/signin/"); FilterConfig mockConfig = mockConfigPath(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals("https://example.com/ja/dir/signin/file", h.<API key>("./file")); assertEquals("https://example.com/ja/dir/file", h.<API key>("../file")); assertEquals("https://example.com/ja/file", h.<API key>("../../file")); assertEquals("https://example.com/ja/file", h.<API key>("../../../file")); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/location.jsp?wovn=ja"); FilterConfig mockConfig = mockConfigQuery(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals("https://example.com/index.jsp?wovn=ja", h.<API key>("./index.jsp")); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com/dir/signin?wovn=ja"); FilterConfig mockConfig = mockConfigQuery(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals("http: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https://example.com/?wovn=ja", h.<API key>("/")); assertEquals("https://example.com/dir/file?wovn=ja", h.<API key>("/dir/file")); assertEquals("https://example.com/dir/file?wovn=ja", h.<API key>("./file")); assertEquals("https://example.com/file?wovn=ja", h.<API key>("../file")); assertEquals("https://example.com/file?wovn=ja", h.<API key>("../../file")); assertEquals("https://example.com/file?q=hello&wovn=ja", h.<API key>("../../file?q=hello&wovn=zh-CHS")); assertEquals("https://example.com/file?wovn=ja", h.<API key>("../../file?wovn=zh-CHS")); } public void <API key>() throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://ja.example.com/dir/signin"); FilterConfig mockConfig = mockConfigSubdomain(); Settings s = new Settings(mockConfig); <API key> ulph = <API key>.create(s); Headers h = new Headers(mockRequest, s, ulph); assertEquals("http: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https://ja.example.com/", h.<API key>("/")); assertEquals("https://ja.example.com/dir/file", h.<API key>("/dir/file")); assertEquals("https://ja.example.com/dir/file", h.<API key>("./file")); assertEquals("https://ja.example.com/file", h.<API key>("../file")); assertEquals("https://ja.example.com/file", h.<API key>("../../file")); } public void <API key>() throws ConfigurationError { Headers h = createHeaders("/global/ja/foo", "/global/", ""); assertEquals("http: assertEquals("http: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: assertEquals("https: } public void <API key>() throws ConfigurationError { Headers h; h = createHeaders("/", "global", ""); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/global", "global", ""); assertEquals(true, h.getIsValidRequest()); h = createHeaders("/global/ja/foo", "global", ""); assertEquals(true, h.getIsValidRequest()); h = createHeaders("/ja/global/foo", "global", ""); assertEquals(false, h.getIsValidRequest()); } public void <API key>() throws ConfigurationError { Headers h; h = createHeaders("/", "", "/admin,/wp-admin"); assertEquals(true, h.getIsValidRequest()); h = createHeaders("/user/admin", "", "/admin,/wp-admin"); assertEquals(true, h.getIsValidRequest()); h = createHeaders("/adminpage", "", "/admin,/wp-admin"); assertEquals(true, h.getIsValidRequest()); h = createHeaders("/admin", "", "/admin,/wp-admin"); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/wp-admin/", "", "/admin,/wp-admin"); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/wp-admin/page", "", "/admin,/wp-admin"); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/ja/admin", "", "/admin,/wp-admin"); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/ja/wp-admin/", "", "/admin,/wp-admin"); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/en/admin", "", "/admin,/wp-admin"); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/en/wp-admin/", "", "/admin,/wp-admin"); assertEquals(false, h.getIsValidRequest()); h = createHeaders("/city/wp-admin", "city", "/admin,/wp-admin"); assertEquals(true, h.getIsValidRequest()); h = createHeaders("/city/wp-admin", "city", "/city/admin,/city/wp-admin"); assertEquals(false, h.getIsValidRequest()); } private Headers createHeaders(String requestPath, String sitePrefixPath, String ignorePaths) throws ConfigurationError { HttpServletRequest mockRequest = <API key>.create("https://example.com" + requestPath); HashMap<String, String> option = new HashMap<String, String>() {{ put("urlPattern", "path"); put("sitePrefixPath", sitePrefixPath); put("ignorePaths", ignorePaths); }}; Settings s = TestUtil.makeSettings(option); <API key> ulph = <API key>.create(s); return new Headers(mockRequest, s, ulph); } public void <API key>() throws ConfigurationError { Settings settings = TestUtil.makeSettings(new HashMap<String, String>() {{ put("defaultLang", "en"); put("supportedLangs", "en,ja,fr"); put("urlPattern", "path"); put("sitePrefixPath", "/home"); }}); <API key> patternHandler = <API key>.create(settings); HttpServletRequest request = <API key>.create("https://example.com/home?user=123"); Headers sut = new Headers(request, settings, patternHandler); HashMap<String, String> hreflangs = sut.getHreflangUrlMap(); assertEquals(3, hreflangs.size()); assertEquals("https://example.com/home?user=123", hreflangs.get("en")); assertEquals("https://example.com/home/ja?user=123", hreflangs.get("ja")); assertEquals("https://example.com/home/fr?user=123", hreflangs.get("fr")); } public void <API key>() throws ConfigurationError { Settings settings = TestUtil.makeSettings(new HashMap<String, String>() {{ put("defaultLang", "ja"); put("supportedLangs", "ko"); put("urlPattern", "query"); }}); <API key> patternHandler = <API key>.create(settings); HttpServletRequest request = <API key>.create("https://example.com/home?user=123"); Headers sut = new Headers(request, settings, patternHandler); HashMap<String, String> hreflangs = sut.getHreflangUrlMap(); assertEquals(2, hreflangs.size()); assertEquals("https://example.com/home?user=123", hreflangs.get("ja")); assertEquals("https://example.com/home?user=123&wovn=ko", hreflangs.get("ko")); } public void <API key>() throws ConfigurationError { Settings settings = TestUtil.makeSettings(new HashMap<String, String>() {{ put("defaultLang", "ja"); put("supportedLangs", "ko,th, zh-CHT, zh-CHS"); put("urlPattern", "subdomain"); }}); <API key> patternHandler = <API key>.create(settings); HttpServletRequest request = <API key>.create("https://example.com/home?user=123"); Headers sut = new Headers(request, settings, patternHandler); HashMap<String, String> hreflangs = sut.getHreflangUrlMap(); assertEquals(5, hreflangs.size()); assertEquals("https://example.com/home?user=123", hreflangs.get("ja")); assertEquals("https://ko.example.com/home?user=123", hreflangs.get("ko")); assertEquals("https://th.example.com/home?user=123", hreflangs.get("th")); assertEquals("https://zh-CHT.example.com/home?user=123", hreflangs.get("zh-Hant")); assertEquals("https://zh-CHS.example.com/home?user=123", hreflangs.get("zh-Hans")); } public void <API key>() throws ConfigurationError { String userAgent = null; Settings settings = TestUtil.makeSettings(); <API key> patternHandler = <API key>.create(settings); HttpServletRequest request = <API key>.create("https://example.com/home?user=123", userAgent); Headers sut = new Headers(request, settings, patternHandler); assertEquals(false, sut.isSearchEngineBot()); } public void <API key>() throws ConfigurationError { String userAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.81 Safari/537.36"; Settings settings = TestUtil.makeSettings(); <API key> patternHandler = <API key>.create(settings); HttpServletRequest request = <API key>.create("https://example.com/home?user=123"); Headers sut = new Headers(request, settings, patternHandler); assertEquals(false, sut.isSearchEngineBot()); } public void <API key>() throws ConfigurationError { String userAgent = "Mozilla/5.0 (compatible; Googlebot/2.1; +http: Settings settings = TestUtil.makeSettings(); <API key> patternHandler = <API key>.create(settings); HttpServletRequest request = <API key>.create("https://example.com/home?user=123", userAgent); Headers sut = new Headers(request, settings, patternHandler); assertEquals(true, sut.isSearchEngineBot()); } }
package eu.cyfronoid.core.configuration.evaluator; import java.util.ArrayDeque; public class Stack extends ArrayDeque<Double> { private static final long serialVersionUID = 1L; @Override public void push(Double v) { super.push(v); } @Override public Double pop() { Double v = super.pop(); return v; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("["); for (Double v: this) { builder.append(v); builder.append(" "); } builder.append("]"); return builder.toString(); } }
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest import os from misura.canon import option from misura.canon.option import get_typed_cols, get_insert_cmd, base_col_def, print_tree import sqlite3 from misura.canon.tests import testdir db = testdir + 'storage/tmpdb' c1 = testdir + 'storage/Conf.csv' def go(t): o = option.Option(**{'handle': t, 'type': t}) o.validate() return o class SqlStore(unittest.TestCase): @classmethod def setUpClass(cls): if os.path.exists(db): os.remove(db) cls.conn = sqlite3.connect(db, detect_types=sqlite3.PARSE_DECLTYPES) st0 = option.CsvStore(kid='/base/') st0.merge_file(c1) st0.validate() cls.desc = st0.desc def test_get_typed_cols(self): print(get_typed_cols(go('Integer'))) print(get_typed_cols(go('String'))) print(get_typed_cols(go('Point'))) print(get_typed_cols(go('Role'))) print(get_typed_cols(go('RoleIO'))) print(get_typed_cols(go('Log'))) print(get_typed_cols(go('Meta'))) def test_get_insert_cmd(self): print(get_insert_cmd(go('Integer'), base_col_def)) print(get_insert_cmd(go('String'), base_col_def)) print(get_insert_cmd(go('Point'), base_col_def)) print(get_insert_cmd(go('Role'), base_col_def)) print(get_insert_cmd(go('RoleIO'), base_col_def)) print(get_insert_cmd(go('Log'), base_col_def)) print(get_insert_cmd(go('Meta'), base_col_def)) def <API key>(self): s = option.SqlStore() print(s.column_definition(go('Integer'))[1]) print(s.column_definition(go('String'))[1]) print(s.column_definition(go('Point'))[1]) print(s.column_definition(go('Role'))[1]) print(s.column_definition(go('RoleIO'))[1]) print(s.column_definition(go('Log'))[1]) print(s.column_definition(go('Meta'))[1]) def test_write_desc(self): s = option.SqlStore() s.cursor = self.conn.cursor() s.write_desc(self.desc) print('READING') r = s.read_tree() print(r) print('print(tree\n', print_tree(r)) print('WRITING AGAIN') s.write_tree(r) print("READING AGAIN") r = s.read_tree() print(r) print('print(tree2\n', print_tree(r)) # @unittest.skip('') def test_tables(self): st0 = option.CsvStore(kid='ciao') st0.merge_file(c1) st = option.SqlStore(kid='ciao') st.desc = st0.desc k0 = set(st.desc.keys()) cursor = self.conn.cursor() st.write_table(cursor, 'conf1') self.conn.commit() cursor.execute('select handle from conf1') r = cursor.fetchall() k1 = set([eval(k[0]) for k in r]) self.assertEqual(k0, k1) st2 = option.SqlStore(kid='ciao') st2.read_table(cursor, 'conf1') self.assertEqual(st.desc, st2.desc) if __name__ == "__main__": unittest.main()
/* Taken from the popular Visual Studio Vibrant Ink Schema */ .cm-s-vibrant-ink.CodeMirror { background: black; color: white; } .cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; } .cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } .cm-s-vibrant-ink .<API key> { color: white; } .cm-s-vibrant-ink .<API key> { color: #d0d0d0; } .cm-s-vibrant-ink .<API key> { color: #d0d0d0; } .cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; } .cm-s-vibrant-ink .cm-keyword { color: #CC7832; } .cm-s-vibrant-ink .cm-atom { color: #fdd733; } .cm-s-vibrant-ink .cm-number { color: #FFEE98; } .cm-s-vibrant-ink .cm-def { color: #8DA6CE; } .cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D } .cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D } .cm-s-vibrant-ink .cm-operator { color: #888; } .cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } .cm-s-vibrant-ink .cm-string { color: #A5C25C } .cm-s-vibrant-ink .cm-string-2 { color: red } .cm-s-vibrant-ink .cm-meta { color: #D8FA3C; } .cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; } .cm-s-vibrant-ink .cm-tag { color: #8DA6CE; } .cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; } .cm-s-vibrant-ink .cm-header { color: #FF6400; } .cm-s-vibrant-ink .cm-hr { color: #AEAEAE; } .cm-s-vibrant-ink .cm-link { color: blue; } .cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; } .cm-s-vibrant-ink .<API key> {background: #27282E !important;} .cm-s-vibrant-ink .<API key> {outline:1px solid grey; color:white !important;}
// * cli upload // * uploads image by providing a link by running: var cli_upload = function () {} // vendor dependencies var Promise = require('bluebird') // local dependencies var logger = require(ENDURO_FOLDER + '/libs/logger') var file_uploader = require(ENDURO_FOLDER + '/libs/admin_utilities/file_uploader') // * cli upload // * generates object based on flag array // * @return {string} - url for uploaded link cli_upload.prototype.cli_upload = function (file_url) { if (!file_url) { logger.err('File url not specified\nUsage: $ enduro upload http://yourdomain.com/yourimage.png') return Promise.reject() } return file_uploader.upload_by_url(file_url) } module.exports = new cli_upload()
import React from "react" import Img from "gatsby-image" import { StaticQuery, graphql } from "gatsby" import html5 from "../images/html5.svg" import js from "../images/javascript.svg" import jQuery from "../images/jquery.svg" import php from "../images/php.svg" import python from "../images/python.svg" import css3 from "../images/css3.svg" import sass from "../images/sass.svg" import react from "../images/react.svg" import redux from "../images/redux.svg" import angular from "../images/angular.svg" import nodejs from "../images/nodejs.svg" import express from "../images/express.svg" import graphQL from "../images/graphql.svg" import apollo from "../images/apollo.svg" import laravel from "../images/laravel.svg" import django from "../images/django.svg" import ruby from "../images/ruby.svg" import rails from "../images/rails.svg" import firebase from "../images/firebase.svg" import mongodb from "../images/mongodb.svg" import postgresql from "../images/postgresql.svg" const About = ({ id }) => ( <StaticQuery query={graphql` query AboutImgQuery { aboutImg: file(relativePath: { eq: "towers.jpg" }) { childImageSharp { fluid(maxWidth: 1200) { <API key> } } } } `} render={data => ( <section id={id} className="section cover"> <Img title="About image" alt="Towers" fluid={data.aboutImg.childImageSharp.fluid} style={{ borderBottom: "2px solid #0F2027", position: "absolute", left: 0, top: 0, width: "100%", height: "100%", }} /> <div className="overlay" /> <div className="about"> <h1 className="name mt-5"> <b>About Me</b> </h1> <div className="description mb-4"> <h5 className="greetings"> I'm a developer who is driven by the motivation to learn and utilize all of the <br /> newest and leading software technologies, tools and frameworks.{" "} <br /> Here are some of the technologies I have worked with: </h5> </div> <div className="svg-container"> <div className="logo-container"> <a href="https://rebrand.ly/w1zfk5" target="_blank" rel="noopener noreferrer" > <img src={html5} alt="html5" /> </a> <h5>HTML</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/gpe80b" target="_blank" rel="noopener noreferrer" > <img src={css3} alt="css3" /> </a> <h5>CSS</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/ac3zez" target="_blank" rel="noopener noreferrer" > <img src={sass} alt="sass" /> </a> <h5>Sass</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/gdw8nf" target="_blank" rel="noopener noreferrer" > <img src={js} alt="js" /> </a> <h5>JavaScript</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/t8q4kk" target="_blank" rel="noopener noreferrer" > <img src={jQuery} alt="jQuery" /> </a> <h5>jQuery</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/5dmk0k" target="_blank" rel="noopener noreferrer" > <img src={php} alt="php" /> </a> <h5>PHP</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/51v3f7" target="_blank" rel="noopener noreferrer" > <img src={ruby} alt="ruby" /> </a> <h5>Ruby</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/u9f3bu" target="_blank" rel="noopener noreferrer" > <img src={python} alt="python" /> </a> <h5>Python</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/4711zo" target="_blank" rel="noopener noreferrer" > <img src={react} alt="react" /> </a> <h5>React</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/f4fdtb" target="_blank" rel="noopener noreferrer" > <img src={redux} alt="redux" /> </a> <h5>Redux</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/0af3pn" target="_blank" rel="noopener noreferrer" > <img src={angular} alt="angular" /> </a> <h5>Angular</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/fno5hy" target="_blank" rel="noopener noreferrer" > <img src={nodejs} alt="nodejs" /> </a> <h5>Node</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/8pwvla" target="_blank" rel="noopener noreferrer" > <img src={express} alt="express" /> </a> <h5>Express</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/chgco7" target="_blank" rel="noopener noreferrer" > <img src={graphQL} alt="graphQL" /> </a> <h5>GraphQL</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/s8v7qq" target="_blank" rel="noopener noreferrer" > <img src={apollo} alt="apollo" /> </a> <h5>Apollo</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/jm3gu8" target="_blank" rel="noopener noreferrer" > <img src={laravel} alt="laravel" /> </a> <h5>Laravel</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/hbkv6c" target="_blank" rel="noopener noreferrer" > <img src={django} alt="django" /> </a> <h5>Django</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/71jw07" target="_blank" rel="noopener noreferrer" > <img src={rails} alt="rails" /> </a> <h5>Ruby on Rails</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/8jg10f" target="_blank" rel="noopener noreferrer" > <img src={firebase} alt="firebase" /> </a> <h5>Firebase</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/1lamx3" target="_blank" rel="noopener noreferrer" > <img src={mongodb} alt="mongodb" /> </a> <h5>MongoDB</h5> </div> <div className="logo-container"> <a href="https://rebrand.ly/az0ssm" target="_blank" rel="noopener noreferrer" > <img src={postgresql} alt="postgresql" /> </a> <h5>PostgreSQL</h5> </div> </div> <div className="arrow animated bounceInDown" /> </div> </section> )} /> ) export default About
var debug = require('debug')('harmonyhubjs:client:login:hub') var Client = require('node-xmpp-client') var Q = require('q') var util = require('../util') /** PrivateFunction: getIdentity * Logs in to a Harmony hub as a guest and uses the userAuthToken from logitech's * web service to retrieve an identity token. * * Parameters: * (String) hubhost - Hostname/IP of the Harmony hub to connect. * (int) hubport - Optional. Port of the Harmony hub to connect. By default, * this is set to 5222. * * Returns: * (Q.promise) - The resolved promise passes the retrieved identity token. */ function getIdentity (hubhost, hubport) { debug('retrieve identity by logging in as guest') // guest@x.com / guest // guest@connect.logitech.com/gatorade var deferred = Q.defer() var iqId var xmppClient = new Client({ jid: 'guest@x.com/gatorade', password: 'guest', host: hubhost, port: hubport, disallowTLS: true, reconnect: true }) xmppClient.on('online', function () { debug('XMPP client connected') var body = 'method=pair:name=harmonyjs#iOS6.0.1#iPhone' var iq = util.buildIqStanza( 'get', 'connect.logitech.com', 'vnd.logitech.connect/vnd.logitech.pair', body, 'guest') iqId = iq.attr('id') xmppClient.send(iq) }) xmppClient.on('error', function (e) { debug('XMPP client error', e) xmppClient.end() deferred.reject(e) }) xmppClient.on('stanza', function (stanza) { debug('received XMPP stanza: ' + stanza) if (stanza.attrs.id === iqId.toString()) { var body = stanza.getChildText('oa') var response = util.<API key>(body) if (response.identity && response.identity !== undefined) { debug('received identity token: ' + response.identity) xmppClient.end() deferred.resolve(response.identity) } else { debug('could not find identity token') xmppClient.end() deferred.reject(new Error('Did not retrieve identity.')) } } }) return deferred.promise } /** PrivateFunction: loginWithIdentity * After fetching an identity from the Harmony hub, this function creates an * XMPP client using that identity. It returns a promise which, when resolved, * passes that XMPP client. * * Parameters: * (String) identity - Identity token to login to the Harmony hub. * (String) hubhost - Hostname/IP of the Harmony hub to connect. * (int) hubport - Optional. Port of the Harmony hub to connect. By default, * this is set to 5222. * * Returns: * (Q.promise) - When resolved, passes the logged in XMPP client, ready to * communicate with the Harmony hub. */ function loginWithIdentity (identity, hubhost, hubport) { debug('create xmpp client using retrieved identity token: ' + identity) var deferred = Q.defer() var jid = identity + '@connect.logitech.com/gatorade' var password = identity var xmppClient = new Client({ jid: jid, password: password, host: hubhost, port: hubport, disallowTLS: true }) xmppClient.on('error', function (e) { debug('XMPP login error', e) xmppClient.end() deferred.reject(e) }) xmppClient.once('online', function () { debug('XMPP client connected using identity token') deferred.resolve(xmppClient) }) return deferred.promise } /** Function: loginToHub * Uses a userAuthToken to login to a Harmony hub. * * Parameters: * (String) userAuthToken - A authentication token, retrieved from logitechs * web service. * (String) hubhost - Hostname/IP of the Harmony hub to connect. * (int) hubport - Optional. Port of the Harmony hub to connect. By default, * this is set to 5222. * * Returns: * (Q.promise) - The final resolved promise will pass a fully authenticated * XMPP client which can be used to communicate with the * Harmony hub. */ function loginToHub (hubhost, hubport) { debug('perform hub login') hubport = hubport || 5222 return getIdentity(hubhost, hubport) .then(function (identity) { return loginWithIdentity(identity, hubhost, hubport) }) } module.exports = loginToHub
from players.player import player from auxiliar.aux_plot import * import random from collections import deque import sys sys.path.append('..') import tensorblock as tb import numpy as np import tensorflow as tf # PLAYER REINFORCE RNN class <API key>(player): # __INIT__ def __init__(self): player.__init__(self) self.experiences = deque() # CHOOSE NEXT ACTION def act(self, state): return self.calculate(state) # CALCULATE NETWORK def calculate(self, state): size = len( self.experiences ) if size < self.NUM_FRAMES: return self.<API key>() states = np.zeros( (self.NUM_FRAMES , self.obsv_shape[0], self.obsv_shape[1] ) ) for i , j in enumerate( range( size - self.NUM_FRAMES , size ) ): states[i] = self.experiences[j][1] states = np.expand_dims( states, 0 ) output = np.squeeze( self.brain.run('Output', [['Observation', states]]) ) action = np.random.choice( np.arange(len(output)), p=output ) return self.create_action(action) # PREPARE NETWORK def operations(self): # Action Placeholders self.brain.addInput( shape = [ None , self.num_actions ] , name = 'Actions' ) self.brain.addInput( shape = [ None ] , name = 'Target' ) # Operations self.brain.addOperation( function = tb.ops.pgcost, input = [ 'Output', 'Actions', 'Target' ], name = 'Cost' ) # Optimizer self.brain.addOperation( function = tb.optims.adam, input = 'Cost', learning_rate = self.LEARNING_RATE, name = 'Optimizer' ) # TensorBoard self.brain.addSummaryScalar( input = 'Cost' ) self.brain.addSummaryHistogram( input = 'Target' ) self.brain.addWriter( name = 'Writer' , dir = './' ) self.brain.addSummary( name = 'Summary' ) self.brain.initialize() # TRAIN NETWORK def train(self, prev_state, curr_state, actn, rewd, done, episode): # Store New Experience Until Done self.experiences.append((prev_state, curr_state, actn, rewd, done)) batchsize = len( self.experiences ) - self.NUM_FRAMES + 1 # Check for Train if done: # Select Batch batch = self.experiences # Separate Batch Data prev_states = np.zeros( ( batchsize , self.NUM_FRAMES , self.obsv_shape[0], self.obsv_shape[1] ) ) curr_states = np.zeros( ( batchsize , self.NUM_FRAMES , self.obsv_shape[0], self.obsv_shape[1] ) ) actions = np.zeros( ( batchsize , self.num_actions ) ) rewards = np.zeros( ( batchsize ) ) dones = np.zeros( ( batchsize ) ) # Select Batches for i in range( 0 , batchsize ): for j in range( 0 , self.NUM_FRAMES ): prev_states[i,j,:,:] = self.experiences[ i + j ][0] curr_states[i,j,:,:] = self.experiences[ i + j ][1] actions[i] = self.experiences[ i + self.NUM_FRAMES - 1][2] rewards[i] = self.experiences[ i + self.NUM_FRAMES - 1][3] dones[i] = self.experiences[ i + self.NUM_FRAMES - 1][4] # Calculate Discounted Reward running_add = 0 discounted_r = np.zeros_like(rewards) for t in reversed(range(0, len(rewards))): if rewards[t] != 0: # pygame_catch specific running_add = 0 running_add = running_add * self.REWARD_DISCOUNT + rewards[t] discounted_r[t] = running_add # Optimize Neural Network _, summary = self.brain.run( ['Optimizer','Summary'], [ ['Observation', prev_states ], ['Actions', actions ], ['Target', discounted_r ] ] ) # TensorBoard self.brain.write( summary = summary, iter = episode ) # Reset Batch self.experiences = deque()
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title><API key>: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.1 / <API key> - 8.9.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> <API key> <small> 8.9.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-26 01:44:44 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-26 01:44:44 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.06.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.06.1 Official 4.06.1 release ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;http://perso.ens-lyon.fr/sebastien.briais/tools/Arith_080201.tar.gz&quot; license: &quot;LGPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/<API key>&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} ] tags: [ &quot;keyword: arithmetic&quot; &quot;keyword: number theory&quot; &quot;category: Mathematics/Arithmetic and Number Theory/Miscellaneous&quot; &quot;date: 2008-02-1&quot; ] authors: [ &quot;Sébastien Briais &lt;sebastien.briais at ens-lyon.fr&gt; [http://perso.ens-lyon.fr/sebastien.briais/]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/<API key>/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/<API key>.git&quot; synopsis: &quot;Fundamental theorems of arithmetic&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/<API key>/archive/v8.9.0.tar.gz&quot; checksum: &quot;md5=<API key>&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action <API key>.8.9.0 coq.8.12.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.1). The following dependencies couldn&#39;t be met: - <API key> -&gt; coq &lt; 8.10~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base <API key>.8.9.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>huffman: Not compatible </title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file: <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif] </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.14.0 / huffman - 8.11.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> huffman <small> 8.11.0 <span class="label label-info">Not compatible </span> </small> </h1> <p> <em><script>document.write(moment("2021-12-23 01:13:15 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-23 01:13:15 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils conf-gmp 3 Virtual package relying on a GMP lib system installation coq 8.14.0 Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.10.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.10.2 Official release 4.10.2 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;palmskog@gmail.com&quot; homepage: &quot;https://github.com/coq-community/huffman&quot; dev-repo: &quot;git+https://github.com/coq-community/huffman.git&quot; bug-reports: &quot;https://github.com/coq-community/huffman/issues&quot; doc: &quot;https://coq-community.github.io/huffman/&quot; license: &quot;LGPL-2.1-or-later&quot; synopsis: &quot;Coq proof of the correctness of the Huffman coding algorithm&quot; description: &quot;&quot;&quot; This projects contains a Coq proof of the correctness of the Huffman coding algorithm, as described in David A. Huffman&#39;s paper A Method for the Construction of Minimum-Redundancy Codes, Proc. IRE, pp. 1098-1101, September 1952.&quot;&quot;&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.7&quot; &amp; &lt; &quot;8.12~&quot;} ] tags: [ &quot;category:Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; &quot;category:Miscellaneous/Extracted Programs/Combinatorics&quot; &quot;keyword:data compression&quot; &quot;keyword:code&quot; &quot;keyword:huffman tree&quot; &quot;logpath:Huffman&quot; &quot;date:2020-02-01&quot; ] authors: [ &quot;Laurent Théry&quot; ] url { src: &quot;https://github.com/coq-community/huffman/archive/v8.11.0.tar.gz&quot; checksum: &quot;sha512=5417b219b54a7e553a278cd3d8c8ae9e86d411c3277513cdef3a68840cce145062f601782620e495df2724b92cead9a78d19c26fa1ff4cd8d332526c6b5180a2&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install </h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-huffman.8.11.0 coq.8.14.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.14.0). The following dependencies couldn&#39;t be met: - coq-huffman -&gt; coq &lt; 8.12~ -&gt; ocaml &lt; 4.10 base of this switch (use `--unlock-base&#39; to force) Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-huffman.8.11.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install </h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https: </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
<html> <head> <title>User agent detail - Blogos/1.13 CFNetwork/548.0.4 Darwin/11.0.0</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> </head> <body> <div class="container"> <div class="section"> <h1 class="header center orange-text">User agent detail</h1> <div class="row center"> <h5 class="header light"> Blogos/1.13 CFNetwork/548.0.4 Darwin/11.0.0 </h5> </div> </div> <div class="section"> <table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Source result (test suite)</th></tr><tr><td>woothee/woothee-testset<br /><small>/testsets/smartphone_ios.yaml</small></td><td>UNKNOWN </td><td>iOS </td><td> </td><td style="border-left: 1px solid #555"></td><td></td><td>smartphone</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-test">Detail</a> <!-- Modal Structure --> <div id="modal-test" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Testsuite result detail</h4> <p><pre><code class="php">Array ( [target] => Blogos/1.13 CFNetwork/548.0.4 Darwin/11.0.0 [name] => UNKNOWN [os] => iOS [category] => smartphone ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapPhp<br /><small>6012</small></td><td>CFNetwork </td><td>WebKit </td><td>iOS 5.0</td><td style="border-left: 1px solid #555">Apple</td><td></td><td>Mobile Device</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.029</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapPhp result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^.*cfnetwork\/548\.0.*$/ [<API key>] => *cfnetwork/548.0* [parent] => CFNetwork for iOS [comment] => CFNetwork for iOS [browser] => CFNetwork [browser_type] => Application [browser_bits] => 32 [browser_maker] => Apple Inc [browser_modus] => unknown [version] => 0.0 [majorver] => 0 [minorver] => 0 [platform] => iOS [platform_version] => 5.0 [<API key>] => iPod, iPhone & iPad [platform_bits] => 32 [platform_maker] => Apple Inc [alpha] => [beta] => [win16] => [win32] => [win64] => [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [javascript] => 1 [vbscript] => [javaapplets] => 1 [activexcontrols] => [ismobiledevice] => 1 [istablet] => [issyndicationreader] => [crawler] => [cssversion] => 0 [aolversion] => 0 [device_name] => general Mobile Device [device_maker] => Apple Inc [device_type] => Mobile Device [<API key>] => touchscreen [device_code_name] => general Mobile Device [device_brand_name] => Apple [<API key>] => WebKit [<API key>] => unknown [<API key>] => For Google Chrome, iOS (including both mobile Safari, WebViews within third-party apps, and web clips), Safari, Arora, Midori, OmniWeb, Shiira, iCab since version 4, Web, SRWare Iron, Rekonq, and in Maxthon 3. [<API key>] => Apple Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>DonatjUAParser<br /><small>v0.5.0</small></td><td>Blogos 1.13</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>DonatjUAParser result detail</h4> <p><pre><code class="php">Array ( [platform] => [browser] => Blogos [version] => 1.13 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>NeutrinoApiCom<br /><small></small></td><td>Blogos 1.13</td><td><i class="material-icons">close</i></td><td>iOS 5.0.1</td><td style="border-left: 1px solid #555"></td><td></td><td>mobile-browser</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.30803</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>NeutrinoApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [<API key>] => 0 [is_mobile] => 1 [type] => mobile-browser [mobile_brand] => [mobile_model] => [version] => 1.13 [is_android] => [browser_name] => Blogos [<API key>] => iOS [<API key>] => 5.0.1 [is_ios] => 1 [producer] => [operating_system] => iOS 5.0.1 [mobile_screen_width] => 0 [mobile_browser] => ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>PiwikDeviceDetector<br /><small>3.5.2</small></td><td> </td><td> </td><td>iOS 5.0</td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>yes</td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.007</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [client] => [operatingSystem] => Array ( [name] => iOS [short_name] => IOS [version] => 5.0 [platform] => ) [device] => Array ( [brand] => [brandName] => [model] => [device] => [deviceName] => ) [bot] => [extra] => Array ( [isBot] => [isBrowser] => [isFeedReader] => [isMobileApp] => [isPIM] => [isLibrary] => [isMediaPlayer] => [isCamera] => [isCarBrowser] => [isConsole] => [isFeaturePhone] => [isPhablet] => [<API key>] => [isSmartDisplay] => [isSmartphone] => [isTablet] => [isTV] => [isDesktop] => [isMobile] => 1 [isTouchEnabled] => ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td><API key><br /><small>6.0.0</small></td> <td colspan="12" class="center-align red lighten-1"> <strong>No result found</strong> </td> </tr><tr><td>UAParser<br /><small>v3.4.5</small></td><td>CFNetwork 548.0.4</td><td><i class="material-icons">close</i></td><td>iOS 5.0.1</td><td style="border-left: 1px solid #555">Apple</td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.002</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">UAParser\Result\Client Object ( [ua] => UAParser\Result\UserAgent Object ( [major] => 548 [minor] => 0 [patch] => 4 [family] => CFNetwork ) [os] => UAParser\Result\OperatingSystem Object ( [major] => 5 [minor] => 0 [patch] => 1 [patchMinor] => [family] => iOS ) [device] => UAParser\Result\Device Object ( [brand] => Apple [model] => iOS-Device [family] => iOS-Device ) [originalUserAgent] => Blogos/1.13 CFNetwork/548.0.4 Darwin/11.0.0 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentStringCom<br /><small></small></td> <td colspan="12" class="center-align red lighten-1"> <strong>No result found</strong> </td> </tr><tr><td>WhatIsMyBrowserCom<br /><small></small></td><td> </td><td> </td><td>Darwin </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.40804</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhatIsMyBrowserCom result detail</h4> <p><pre><code class="php">stdClass Object ( [<API key>] => Darwin [<API key>] => [<API key>] => [browser_version] => [extra_info] => Array ( ) [operating_platform] => [extra_info_table] => Array ( ) [layout_engine_name] => [detected_addons] => Array ( ) [<API key>] => [<API key>] => [<API key>] => [<API key>] => Array ( ) [browser_name_code] => [<API key>] => [<API key>] => [is_abusive] => [<API key>] => [<API key>] => Array ( ) [<API key>] => [operating_system] => Darwin [<API key>] => [<API key>] => [browser_name] => [<API key>] => darwin [user_agent] => Blogos/1.13 CFNetwork/548.0.4 Darwin/11.0.0 [<API key>] => [browser] => ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhichBrowser<br /><small>2.0.10</small></td><td>Blogos 1.13</td><td> </td><td>iOS 5.0.1</td><td style="border-left: 1px solid #555"></td><td></td><td>mobile:smart</td><td>yes</td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.013</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhichBrowser result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [name] => Blogos [version] => 1.13 [type] => app:feedreader ) [os] => Array ( [name] => iOS [version] => 5.0.1 ) [device] => Array ( [type] => mobile [subtype] => smart ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Woothee<br /><small>v1.2.0</small></td><td> </td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>smartphone</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Woothee result detail</h4> <p><pre><code class="php">Array ( [category] => smartphone [os] => iOS [name] => UNKNOWN [version] => UNKNOWN [vendor] => UNKNOWN [os_version] => UNKNOWN ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Mobile Safari 5.0</td><td><i class="material-icons">close</i></td><td>iOS 5.0</td><td style="border-left: 1px solid #555">Apple</td><td>iPhone</td><td>Smartphone</td><td>yes</td><td>yes</td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.011</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#<API key>">Detail</a> <!-- Modal Structure --> <div id="<API key>" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Wurfl result detail</h4> <p><pre><code class="php">Array ( [virtual] => Array ( [is_android] => false [is_ios] => true [is_windows_phone] => false [is_app] => true [is_full_desktop] => false [is_largescreen] => false [is_mobile] => true [is_robot] => false [is_smartphone] => true [is_touchscreen] => true [is_wml_preferred] => false [<API key>] => false [is_html_preferred] => true [<API key>] => iOS [<API key>] => 5.0 [advertised_browser] => Mobile Safari [<API key>] => 5.0 [<API key>] => Apple iPhone [form_factor] => Smartphone [is_phone] => true [is_app_webview] => false ) [all] => Array ( [brand_name] => Apple [model_name] => iPhone [unique] => true [<API key>] => [is_wireless_device] => true [<API key>] => true [has_qwerty_keyboard] => true [<API key>] => true [uaprof] => [uaprof2] => [uaprof3] => [nokia_series] => 0 [nokia_edition] => 0 [device_os] => iOS [mobile_browser] => Safari [<API key>] => 5.0 [device_os_version] => 5.0 [pointing_method] => touchscreen [release_date] => 2011_october [marketing_name] => [model_extra_info] => 5.0 [nokia_feature_pack] => 0 [<API key>] => true [is_tablet] => false [manufacturer_name] => [is_bot] => false [is_google_glass] => false [proportional_font] => false [<API key>] => false [card_title_support] => false [softkey_support] => false [table_support] => false [numbered_menus] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [access_key_support] => false [wrap_mode_support] => false [<API key>] => false [<API key>] => false [<API key>] => false [wizards_recommended] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => none [<API key>] => false [emoji] => false [<API key>] => false [<API key>] => false [imode_region] => none [<API key>] => tel: [chtml_table_support] => false [<API key>] => true [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => true [<API key>] => true [<API key>] => true [<API key>] => false [xhtml_nowrap_mode] => false [<API key>] => false [<API key>] => #D9EFFF [<API key>] => #FFFFFF [<API key>] => false [<API key>] => true [<API key>] => utf8 [<API key>] => false [<API key>] => tel: [<API key>] => text/html [xhtml_table_support] => true [<API key>] => sms: [<API key>] => none [xhtml_file_upload] => not_supported [cookie_support] => true [<API key>] => false [<API key>] => full [<API key>] => false [<API key>] => none [<API key>] => true [ajax_manipulate_css] => true [<API key>] => true [<API key>] => true [ajax_xhr_type] => standard [ajax_manipulate_dom] => true [ajax_support_events] => true [<API key>] => true [<API key>] => w3c_api [xhtml_support_level] => 4 [preferred_markup] => html_web_4_0 [wml_1_1] => false [wml_1_2] => false [wml_1_3] => false [<API key>] => true [<API key>] => true [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => true [html_web_3_2] => true [html_web_4_0] => true [voicexml] => false [multipart_support] => false [<API key>] => false [<API key>] => false [resolution_width] => 320 [resolution_height] => 480 [columns] => 20 [max_image_width] => 320 [max_image_height] => 480 [rows] => 20 [<API key>] => 50 [<API key>] => 74 [dual_orientation] => true [density_class] => 1.0 [wbmp] => false [bmp] => true [epoc_bmp] => false [gif_animated] => true [jpg] => true [png] => true [tiff] => false [<API key>] => false [<API key>] => false [svgt_1_1] => true [svgt_1_1_plus] => false [greyscale] => false [gif] => true [colors] => 65536 [webp_lossy_support] => false [<API key>] => false [post_method_support] => true [basic_<API key>] => true [<API key>] => true [emptyok] => false [nokia_voice_call] => false [wta_voice_call] => false [wta_phonebook] => false [wta_misc] => false [wta_pdc] => false [https_support] => true [phone_id_provided] => false [max_data_rate] => 200 [wifi] => true [sdio] => false [vpn] => true [has_cellular_radio] => true [max_deck_size] => 100000 [<API key>] => 512 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [max_no_of_bookmarks] => 0 [<API key>] => 0 [<API key>] => 0 [max_object_size] => 0 [downloadfun_support] => false [<API key>] => false [inline_support] => false [oma_support] => false [ringtone] => true [ringtone_3gpp] => false [<API key>] => true [<API key>] => true [ringtone_imelody] => false [ringtone_digiplug] => false [<API key>] => false [ringtone_mmf] => false [ringtone_rmf] => false [ringtone_xmf] => false [ringtone_amr] => true [ringtone_awb] => false [ringtone_aac] => true [ringtone_wav] => true [ringtone_mp3] => true [ringtone_spmidi] => false [ringtone_qcelp] => false [ringtone_voices] => 12 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [wallpaper] => false [wallpaper_max_width] => 320 [<API key>] => 480 [<API key>] => 320 [<API key>] => 480 [wallpaper_resize] => none [wallpaper_wbmp] => false [wallpaper_bmp] => false [wallpaper_gif] => false [wallpaper_jpg] => false [wallpaper_png] => false [wallpaper_tiff] => false [wallpaper_greyscale] => false [wallpaper_colors] => 2 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [screensaver] => false [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [screensaver_resize] => none [screensaver_wbmp] => false [screensaver_bmp] => false [screensaver_gif] => false [screensaver_jpg] => false [screensaver_png] => false [<API key>] => false [screensaver_colors] => 2 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [picture] => false [picture_max_width] => 0 [picture_max_height] => 0 [<API key>] => 0 [<API key>] => 0 [picture_resize] => none [picture_wbmp] => false [picture_bmp] => false [picture_gif] => false [picture_jpg] => false [picture_png] => false [picture_greyscale] => false [picture_colors] => 2 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [video] => true [<API key>] => false [<API key>] => false [<API key>] => false [streaming_video] => true [streaming_3gpp] => true [streaming_mp4] => true [streaming_mov] => false [<API key>] => 0 [<API key>] => none [streaming_flv] => false [streaming_3g2] => false [<API key>] => 30 [<API key>] => -1 [<API key>] => 3 [<API key>] => 3 [<API key>] => 3.0 [<API key>] => nb [<API key>] => lc [streaming_wmv] => none [<API key>] => http [<API key>] => <API key> [wap_push_support] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => false [utf8_support] => true [ascii_support] => false [iso8859_support] => false [expiration_date] => false [j2me_cldc_1_0] => false [j2me_cldc_1_1] => false [j2me_midp_1_0] => false [j2me_midp_2_0] => false [doja_1_0] => false [doja_1_5] => false [doja_2_0] => false [doja_2_1] => false [doja_2_2] => false [doja_3_0] => false [doja_3_5] => false [doja_4_0] => false [j2me_jtwi] => false [j2me_mmapi_1_0] => false [j2me_mmapi_1_1] => false [j2me_wmapi_1_0] => false [j2me_wmapi_1_1] => false [j2me_wmapi_2_0] => false [j2me_btapi] => false [j2me_3dapi] => false [j2me_locapi] => false [j2me_nokia_ui] => false [j2me_motorola_lwt] => false [<API key>] => false [<API key>] => false [j2me_heap_size] => 0 [j2me_max_jar_size] => 0 [j2me_storage_size] => 0 [<API key>] => 0 [j2me_screen_width] => 0 [j2me_screen_height] => 0 [j2me_canvas_width] => 0 [j2me_canvas_height] => 0 [j2me_bits_per_pixel] => 0 [<API key>] => false [<API key>] => false [<API key>] => false [<API key>] => none [j2me_http] => false [j2me_https] => false [j2me_socket] => false [j2me_udp] => false [j2me_serial] => false [j2me_gif] => false [j2me_gif89a] => false [j2me_jpg] => false [j2me_png] => false [j2me_bmp] => false [j2me_bmp3] => false [j2me_wbmp] => false [j2me_midi] => false [j2me_wav] => false [j2me_amr] => false [j2me_mp3] => false [j2me_mp4] => false [j2me_imelody] => false [j2me_rmf] => false [j2me_au] => false [j2me_aac] => false [j2me_realaudio] => false [j2me_xmf] => false [j2me_wma] => false [j2me_3gpp] => false [j2me_h263] => false [j2me_svgt] => false [j2me_mpeg4] => false [j2me_realvideo] => false [j2me_real8] => false [j2me_realmedia] => false [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [j2me_clear_key_code] => 0 [<API key>] => false [<API key>] => false [receiver] => true [sender] => true [mms_max_size] => 1048576 [mms_max_height] => 1024 [mms_max_width] => 1024 [built_in_recorder] => false [built_in_camera] => true [mms_jpeg_baseline] => true [<API key>] => true [mms_gif_static] => true [mms_gif_animated] => true [mms_png] => true [mms_bmp] => true [mms_wbmp] => false [mms_amr] => true [mms_wav] => false [mms_midi_monophonic] => false [mms_midi_polyphonic] => false [<API key>] => 0 [mms_spmidi] => false [mms_mmf] => false [mms_mp3] => true [mms_evrc] => false [mms_qcelp] => false [mms_ota_bitmap] => false [mms_nokia_wallpaper] => false [<API key>] => false [<API key>] => false [<API key>] => false [mms_rmf] => false [mms_xmf] => false [mms_symbian_install] => false [mms_jar] => false [mms_jad] => false [mms_vcard] => true [mms_vcalendar] => false [mms_wml] => false [mms_wbxml] => false [mms_wmlc] => false [mms_video] => true [mms_mp4] => true [mms_3gpp] => true [mms_3gpp2] => true [mms_max_frame_rate] => 0 [nokiaring] => false [picturemessage] => false [operatorlogo] => false [largeoperatorlogo] => false [callericon] => false [nokiavcard] => false [nokiavcal] => false [sckl_ringtone] => false [sckl_operatorlogo] => false [sckl_groupgraphic] => false [sckl_vcard] => false [sckl_vcalendar] => false [text_imelody] => false [ems] => false [<API key>] => false [ems_imelody] => false [ems_odi] => false [ems_upi] => false [ems_version] => 0 [siemens_ota] => false [siemens_logo_width] => 101 [siemens_logo_height] => 29 [<API key>] => 101 [<API key>] => 50 [gprtf] => false [sagem_v1] => false [sagem_v2] => false [panasonic] => false [sms_enabled] => true [wav] => false [mmf] => false [smf] => false [mld] => false [midi_monophonic] => false [midi_polyphonic] => false [sp_midi] => false [rmf] => false [xmf] => false [compactmidi] => false [digiplug] => false [nokia_ringtone] => false [imelody] => false [au] => false [amr] => false [awb] => false [aac] => true [mp3] => true [voices] => 1 [qcelp] => false [evrc] => false [flash_lite_version] => [fl_wallpaper] => false [fl_screensaver] => false [fl_standalone] => false [fl_browser] => false [fl_sub_lcd] => false [full_flash_support] => false [<API key>] => true [css_border_image] => webkit [css_rounded_corners] => webkit [css_gradient] => webkit [css_spriting] => true [css_gradient_linear] => webkit [is_transcoder] => false [<API key>] => user-agent [rss_support] => true [pdf_support] => true [<API key>] => true [<API key>] => 30 [<API key>] => -1 [<API key>] => 3 [<API key>] => 2 [<API key>] => 3.0 [playback_real_media] => none [playback_3gpp] => true [playback_3g2] => true [playback_mp4] => true [playback_mov] => true [playback_acodec_amr] => nb [playback_acodec_aac] => lc [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => 0 [<API key>] => false [playback_wmv] => none [<API key>] => false [html_preferred_dtd] => html4 [viewport_supported] => true [viewport_width] => device_width_token [<API key>] => no [<API key>] => [<API key>] => [<API key>] => [mobileoptimized] => false [handheldfriendly] => false [canvas_support] => full [image_inlining] => true [is_smarttv] => false [is_console] => false [nfc_support] => false [ux_full_desktop] => false [jqm_grade] => A [is_sencha_touch_ok] => true [<API key>] => default [controlcap_is_ios] => default [<API key>] => default [controlcap_is_robot] => default [controlcap_is_app] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default [<API key>] => default ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr></table> </div> <div class="section"> <h1 class="header center orange-text">About this comparison</h1> <div class="row center"> <h5 class="header light"> The primary goal of this project is simple<br /> I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br /> <br /> The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br /> <br /> You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/<API key>">ThaDafinser/<API key></a><br /> <br /> The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a> </h5> </div> </div> <div class="card"> <div class="card-content"> Comparison created <i>2016-02-13 13:32:21</i> | by <a href="https://github.com/ThaDafinser">ThaDafinser</a> </div> </div> </div> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script> <script> $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); </script> </body> </html>
<!DOCTYPE html> <html> <head> <title>MyFonts Webfonts Demo for iOS devices</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <style type="text/css" media="all"> h2 { font-weight:normal; } @font-face { font-family:"ProximaNova-Bold"; src:url("2FE569_0.svg#ProximaNova-Bold") format("svg"); } .webfont_0 { font-family: ProximaNova-Bold; } @font-face { font-family:"ProximaNova-Regular"; src:url("2FE569_1.svg#ProximaNova-Regular") format("svg"); } .webfont_1 { font-family: ProximaNova-Regular; } </style> </head> <body> <h1>MyFonts Webfonts Demo for iOS devices</h1> <h2>0. <span class='webfont_0'><a href='http: <small>(VersionID 675566, ttf)</small> </h2> <p class='webfont_0'>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p class='webfont_0'>An, partus ancillae sitne in fructu habendus, disseretur inter principes civitatis, P. Scaevolam M'.que Manilium, ab iisque M. Brutus dissentiet -- quod et acutum genus est et ad usus civium non inutile, nosque ea scripta reliquaque eiusdem generis et legimus libenter et legemus --, haec, quae vitam omnem continent, neglegentur? nam, ut sint illa vendibiliora, haec uberiora certe sunt. quamquam id quidem licebit iis existimare, qui legerint. nos autem hanc omnem quaestionem de finibus bonorum et malorum fere a nobis explicatam esse his litteris arbitramur, in quibus, quantum potuimus, non modo quid nobis probaretur, sed etiam quid a singulis philosophiae disciplinis diceretur, persecuti sumus.</p> <p class='webfont_0'>Id qui in una virtute ponunt et splendore nominis capti quid natura postulet non intellegunt, errore maximo, si Epicurum audire voluerint, liberabuntur: istae enim vestrae eximiae pulchraeque virtutes nisi voluptatem efficerent, quis eas aut laudabilis aut expetendas arbitraretur? ut enim medicorum scientiam non ipsius artis, sed bonae valetudinis causa probamus, et gubernatoris ars, quia bene navigandi rationem habet, utilitate, non arte laudatur, sic sapientia, quae ars vivendi putanda est, non expeteretur, si nihil efficeret; nunc expetitur, quod est tamquam artifex conquirendae et comparandae voluptatis.</p> <h2>1. <span class='webfont_1'><a href='http: <small>(VersionID 675574, ttf)</small> </h2> <p class='webfont_1'>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> <p class='webfont_1'>An, partus ancillae sitne in fructu habendus, disseretur inter principes civitatis, P. Scaevolam M'.que Manilium, ab iisque M. Brutus dissentiet -- quod et acutum genus est et ad usus civium non inutile, nosque ea scripta reliquaque eiusdem generis et legimus libenter et legemus --, haec, quae vitam omnem continent, neglegentur? nam, ut sint illa vendibiliora, haec uberiora certe sunt. quamquam id quidem licebit iis existimare, qui legerint. nos autem hanc omnem quaestionem de finibus bonorum et malorum fere a nobis explicatam esse his litteris arbitramur, in quibus, quantum potuimus, non modo quid nobis probaretur, sed etiam quid a singulis philosophiae disciplinis diceretur, persecuti sumus.</p> <p class='webfont_1'>Id qui in una virtute ponunt et splendore nominis capti quid natura postulet non intellegunt, errore maximo, si Epicurum audire voluerint, liberabuntur: istae enim vestrae eximiae pulchraeque virtutes nisi voluptatem efficerent, quis eas aut laudabilis aut expetendas arbitraretur? ut enim medicorum scientiam non ipsius artis, sed bonae valetudinis causa probamus, et gubernatoris ars, quia bene navigandi rationem habet, utilitate, non arte laudatur, sic sapientia, quae ars vivendi putanda est, non expeteretur, si nihil efficeret; nunc expetitur, quod est tamquam artifex conquirendae et comparandae voluptatis.</p> </body> </html>
Namespace Media ''' <summary></summary> ''' <autogenerated>Generated from a T4 template. Modifications will be lost, if applicable use a partial class instead.</autogenerated> ''' <generator-date>17/02/2014 16:03:03</generator-date> ''' <generator-functions>1</generator-functions> ''' <generator-source>Deimos\_Media\Enums\WMT_ATTR_DATATYPE.tt</generator-source> ''' <generator-version>1</generator-version> <System.CodeDom.Compiler.GeneratedCode("Deimos\_Media\Enums\WMT_ATTR_DATATYPE.tt", "1")> _ Public Enum WMT_ATTR_DATATYPE As System.Int32 ''' <summary>WMT_TYPE_DWORD</summary> WMT_TYPE_DWORD = 0 ''' <summary>WMT_TYPE_STRING</summary> WMT_TYPE_STRING = 1 ''' <summary>WMT_TYPE_BINARY</summary> WMT_TYPE_BINARY = 2 ''' <summary>WMT_TYPE_BOOL</summary> WMT_TYPE_BOOL = 3 ''' <summary>WMT_TYPE_QWORD</summary> WMT_TYPE_QWORD = 4 ''' <summary>WMT_TYPE_WORD</summary> WMT_TYPE_WORD = 5
package org.spongepowered.api.text; import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.collect.ImmutableList; import org.spongepowered.api.scoreboard.Score; import org.spongepowered.api.text.format.TextColor; import org.spongepowered.api.text.format.TextColors; import org.spongepowered.api.text.format.TextStyle; import org.spongepowered.api.text.format.TextStyles; import org.spongepowered.api.text.selector.Selector; import org.spongepowered.api.text.translation.Translatable; import org.spongepowered.api.text.translation.Translation; import java.util.Locale; /** * Utility class to work with and create {@link Text}. */ public final class Texts { private static final TextFactory factory = null; static final Text.Literal EMPTY = new Text.Literal(); private Texts() { } /** * Returns an empty, unformatted {@link Text} instance. * * @return An empty text */ public static Text of() { return EMPTY; } /** * Creates a {@link Text} with the specified plain text. The created message * won't have any formatting or events configured. * * @param content The content of the text * @return The created text * @see Text.Literal */ public static Text.Literal of(String content) { if (checkNotNull(content, "content").isEmpty()) { return EMPTY; } return new Text.Literal(content); } /** * Creates a new unformatted {@link Text.Translatable} with the given * {@link Translation} and arguments. * * @param translation The translation for the text * @param args The arguments for the translation * @return The created text * @see Text.Translatable */ public static Text.Translatable of(Translation translation, Object... args) { return new Text.Translatable(translation, ImmutableList.copyOf(checkNotNull(args, "args"))); } /** * Creates a new unformatted {@link Text.Translatable} from the given * {@link Translatable}. * * @param translatable The translatable for the text * @param args The arguments for the translation * @return The created text * @see Text.Translatable */ public static Text.Translatable of(Translatable translatable, Object... args) { return of(checkNotNull(translatable, "translatable").getTranslation(), args); } /** * Creates a new unformatted {@link Text.Selector} with the given selector. * * @param selector The selector for the text * @return The created text * @see Text.Selector */ public static Text.Selector of(Selector selector) { return new Text.Selector(selector); } /** * Creates a new unformatted {@link Text.Score} with the given score. * * @param score The score for the text * @return The created text * @see Text.Score */ public static Text.Score of(Score score) { return new Text.Score(score); } /** * Builds a {@link Text} from a given array of objects. * * <p>For instance, you can use this like * <code>Texts.of(TextColors.DARK_AQUA, "Hi", TextColors.AQUA, "Bye")</code> * </p> * * <p>This will create the correct {@link Text} instance if the input object * is the input for one of the {@link Text} types or convert the object to a * string otherwise.</p> * * @param objects The object array * @return The built text object */ public static Text of(Object... objects) { TextBuilder builder = builder(); TextColor color = TextColors.NONE; TextStyle style = TextStyles.NONE; for (Object obj : objects) { if (obj instanceof TextColor) { color = (TextColor) obj; } else if (obj instanceof TextStyle) { style = obj.equals(TextStyles.RESET) ? TextStyles.NONE : style.and((TextStyle) obj); } else if (obj instanceof Text) { builder.append((Text) obj); } else if (obj instanceof TextBuilder) { builder.append(((TextBuilder) obj).build()); } else { TextBuilder childBuilder; if (obj instanceof String) { childBuilder = Texts.builder((String) obj); } else if (obj instanceof Translation) { childBuilder = Texts.builder((Translation) obj); } else if (obj instanceof Selector) { childBuilder = Texts.builder((Selector) obj); } else if (obj instanceof Score) { childBuilder = Texts.builder((Score) obj); } else { childBuilder = Texts.builder(String.valueOf(obj)); } builder.append(childBuilder.color(color).style(style).build()); } } return builder.build(); } /** * Creates a {@link TextBuilder} with empty text. * * @return A new text builder with empty text */ public static TextBuilder builder() { return new TextBuilder.Literal(); } /** * Creates a new unformatted {@link TextBuilder.Literal} with the specified * content. * * @param content The content of the text * @return The created text builder * @see Text.Literal * @see TextBuilder.Literal */ public static TextBuilder.Literal builder(String content) { return new TextBuilder.Literal(content); } /** * Creates a new {@link TextBuilder.Literal} with the formatting and actions * of the specified {@link Text} and the given content. * * @param text The text to apply the properties from * @param content The content for the text builder * @return The created text builder * @see Text.Literal * @see TextBuilder.Literal */ public static TextBuilder.Literal builder(Text text, String content) { return new TextBuilder.Literal(text, content); } /** * Creates a new unformatted {@link TextBuilder.Translatable} with the given * {@link Translation} and arguments. * * @param translation The translation for the builder * @param args The arguments for the translation * @return The created text builder * @see Text.Translatable * @see TextBuilder.Translatable */ public static TextBuilder.Translatable builder(Translation translation, Object... args) { return new TextBuilder.Translatable(translation, args); } /** * Creates a new unformatted {@link TextBuilder.Translatable} from the given * {@link Translatable}. * * @param translatable The translatable for the builder * @param args The arguments for the translation * @return The created text builder * @see Text.Translatable * @see TextBuilder.Translatable */ public static TextBuilder.Translatable builder(Translatable translatable, Object... args) { return new TextBuilder.Translatable(translatable, args); } /** * Creates a new {@link TextBuilder.Translatable} with the formatting and * actions of the specified {@link Text} and the given {@link Translation} * and arguments. * * @param text The text to apply the properties from * @param translation The translation for the builder * @param args The arguments for the translation * @return The created text builder * @see Text.Translatable * @see TextBuilder.Translatable */ public static TextBuilder.Translatable builder(Text text, Translation translation, Object... args) { return new TextBuilder.Translatable(text, translation, args); } /** * Creates a new {@link TextBuilder.Translatable} with the formatting and * actions of the specified {@link Text} and the given {@link Translatable}. * * @param text The text to apply the properties from * @param translatable The translatable for the builder * @param args The arguments for the translation * @return The created text builder * @see Text.Translatable * @see TextBuilder.Translatable */ public static TextBuilder.Translatable builder(Text text, Translatable translatable, Object... args) { return new TextBuilder.Translatable(text, translatable, args); } /** * Creates a new unformatted {@link TextBuilder.Selector} with the given * selector. * * @param selector The selector for the builder * @return The created text builder * @see Text.Selector * @see TextBuilder.Selector */ public static TextBuilder.Selector builder(Selector selector) { return new TextBuilder.Selector(selector); } /** * Creates a new {@link TextBuilder.Selector} with the formatting and * actions of the specified {@link Text} and the given selector. * * @param text The text to apply the properties from * @param selector The selector for the builder * @return The created text builder * @see Text.Selector * @see TextBuilder.Selector */ public static TextBuilder.Selector builder(Text text, Selector selector) { return new TextBuilder.Selector(text, selector); } /** * Creates a new unformatted {@link TextBuilder.Score} with the given score. * * @param score The score for the text builder * @return The created text builder * @see Text.Score * @see TextBuilder.Score */ public static TextBuilder.Score builder(Score score) { return new TextBuilder.Score(score); } /** * Creates a new {@link TextBuilder.Score} with the formatting and actions * of the specified {@link Text} and the given score. * * @param text The text to apply the properties from * @param score The score for the text builder * @return The created text builder * @see Text.Score * @see TextBuilder.Score */ public static TextBuilder.Score builder(Text text, Score score) { return new TextBuilder.Score(text, score); } /** * Joins a sequence of text objects together. * * @param texts The texts to join * @return A text object that joins the given text objects */ public static Text join(Text... texts) { return builder().append(texts).build(); } /** * Joins a sequence of text objects together. * * @param texts The texts to join * @return A text object that joins the given text objects */ public static Text join(Iterable<? extends Text> texts) { return builder().append(texts).build(); } /** * Joins a sequence of text objects together along with a separator. * * @param separator The separator * @param texts The text to join * @return A text object that joins the given text objects */ public static Text join(Text separator, Text... texts) { switch (texts.length) { case 0: return of(); case 1: return texts[0]; default: TextBuilder builder = builder(); boolean appendSeparator = false; for (Text text : texts) { if (appendSeparator) { builder.append(separator); } else { appendSeparator = true; } builder.append(text); } return builder.build(); } } /** * Parses the specified JSON text and returns the parsed result. * * @param json The valid JSON text * @return The parsed text * @throws <API key> If the JSON is invalid */ public static Text parseJson(String json) throws <API key> { return factory.parseJson(json); } /** * Parses the specified JSON text and returns the parsed result. * * <p>Unlike {@link #parseJson(String)} this will ignore some formatting * errors and parse the JSON data more leniently.</p> * * @param json The JSON text * @return The parsed text * @throws <API key> If the JSON couldn't be parsed */ public static Text parseJsonLenient(String json) throws <API key> { return factory.parseJsonLenient(json); } /** * Returns a plain text representation of the {@link Text} without any * formatting. * * @param text The text to convert * @return The text converted to plain text */ public static String toPlain(Text text) { return factory.toPlain(text); } /** * Returns a JSON representation of the {@link Text} as used in commands. * * @param text The text to convert * @return The text converted to JSON */ public static String toJson(Text text) { return factory.toJson(text); } /** * Returns a plain text representation of the {@link Text} without any * formatting. * * @param text The text to convert * @return The text converted to plain text */ public static String toPlain(Text text, Locale locale) { return factory.toPlain(text, locale); } /** * Returns a JSON representation of the {@link Text} as used in commands. * * @param text The text to convert * @return The text converted to JSON */ public static String toJson(Text text, Locale locale) { return factory.toJson(text, locale); } /** * Returns the default legacy formatting character. * * @return The legacy formatting character * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated public static char getLegacyChar() { return factory.getLegacyChar(); } /** * Creates a Message from a legacy string using the default legacy. * * @param text The text to be converted as a String * @return The converted Message * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated @SuppressWarnings("deprecation") public static Text.Literal fromLegacy(String text) { return fromLegacy(text, getLegacyChar()); } /** * Creates a Message from a legacy string, given a color character. * * @param text The text to be converted as a String * @param color The color character to be replaced * @return The converted Message * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated public static Text.Literal fromLegacy(String text, char color) { return factory.parseLegacyMessage(text, color); } /** * Removes the legacy formatting character from a legacy string. * * @param text The legacy text as a String * @return The stripped text * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated @SuppressWarnings("deprecation") public static String stripCodes(String text) { return stripCodes(text, getLegacyChar()); } /** * Removes the legacy formatting character from a legacy string. * * @param text The legacy text as a String * @param color The color character to be replaced * @return The stripped text * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated public static String stripCodes(String text, char color) { return factory.stripLegacyCodes(text, color); } /** * Replaces the given formatting character with the default legacy * formatting character from a legacy string. * * @param text The legacy text as a String * @param from The color character to be replaced * @return The replaced text * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated @SuppressWarnings("deprecation") public static String replaceCodes(String text, char from) { return replaceCodes(text, from, getLegacyChar()); } /** * Replaces the given formatting character with another given formatting * character from a legacy string. * * @param text The legacy text as a String * @param from The color character to be replaced * @param to The color character to replace with * @return The replaced text * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated public static String replaceCodes(String text, char from, char to) { return factory.replaceLegacyCodes(text, from, to); } /** * Returns a representation of the {@link Text} using the legacy color * codes. * * @param text The text to convert * @return The text converted to the old color codes * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated @SuppressWarnings("deprecation") public static String toLegacy(Text text) { return toLegacy(text, getLegacyChar()); } /** * Returns a representation of the {@link Text} using the legacy color * codes. * * @param text The text to convert * @param code The legacy char to use for the message * @return The text converted to the old color codes * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated public static String toLegacy(Text text, char code) { return factory.toLegacy(text, code); } /** * Returns a representation of the {@link Text} using the legacy color * codes. * * @param text The text to convert * @param code The legacy char to use for the message * @param locale The language to return this representation in * @return The text converted to the old color codes * @deprecated Legacy formatting codes are being phased out of Minecraft */ @Deprecated public static String toLegacy(Text text, char code, Locale locale) { return factory.toLegacy(text, code, locale); } }
module.exports = require('regenerate')(0x261D, 0x26F9, 0x1F385, 0x1F3C7, 0x1F46E, 0x1F47C, 0x1F4AA, 0x1F57A, 0x1F590, 0x1F6A3, 0x1F6C0, 0x1F6CC, 0x1F926).addRange(0x270A, 0x270D).addRange(0x1F3C2, 0x1F3C4).addRange(0x1F3CA, 0x1F3CC).addRange(0x1F442, 0x1F443).addRange(0x1F446, 0x1F450).addRange(0x1F466, 0x1F469).addRange(0x1F470, 0x1F478).addRange(0x1F481, 0x1F483).addRange(0x1F485, 0x1F487).addRange(0x1F574, 0x1F575).addRange(0x1F595, 0x1F596).addRange(0x1F645, 0x1F647).addRange(0x1F64B, 0x1F64F).addRange(0x1F6B4, 0x1F6B6).addRange(0x1F918, 0x1F91C).addRange(0x1F91E, 0x1F91F).addRange(0x1F930, 0x1F939).addRange(0x1F93D, 0x1F93E).addRange(0x1F9D1, 0x1F9DD);
# VivaTalk Oh god it's time. run this to push to GH pages: rm output/images; cp -r images output; ghp-import -n output -p; rm -r output/images; ln -s ../images output/images
from SBaaS_base.postgresql_orm_base import * class <API key>(Base): __tablename__ = '<API key>' id = Column(Integer, Sequence('<API key>'), primary_key=True) analysis_id = Column(String(500)) experiment_id = Column(String(50)) <API key> = Column(String(500)) # equivalent to <API key> sample_name = Column(String(500)) # equivalent to <API key> time_point = Column(String(10)) # converted to intermediate in lineage analysis analysis_type = Column(String(100)); # time-course (i.e., multiple time points), paired (i.e., control compared to multiple replicates), group (i.e., single grouping of samples). used_ = Column(Boolean); comment_ = Column(Text); __table_args__ = ( UniqueConstraint('experiment_id','<API key>','sample_name','time_point','analysis_type','analysis_id'), ) def __init__(self, row_dict_I, ): self.analysis_id=row_dict_I['analysis_id']; self.experiment_id=row_dict_I['experiment_id']; self.<API key>=row_dict_I['<API key>']; self.sample_name=row_dict_I['sample_name']; self.time_point=row_dict_I['time_point']; self.analysis_type=row_dict_I['analysis_type']; self.used_=row_dict_I['used_']; self.comment_=row_dict_I['comment_']; def __set__row__(self,analysis_id_I, experiment_id_I, <API key>, sample_name_I, time_point_I, analysis_type_I, used__I, comment__I): self.analysis_id=analysis_id_I self.experiment_id=experiment_id_I self.<API key>=<API key> self.sample_name=sample_name_I self.time_point=time_point_I self.analysis_type=analysis_type_I self.used_=used__I self.comment_=comment__I def __repr__dict__(self): return {'id':self.id, 'analysis_id':self.analysis_id, 'experiment_id':self.experiment_id, '<API key>':self.<API key>, 'sample_name':self.sample_name, 'time_point':self.time_point, 'analysis_type':self.analysis_type, 'used_':self.used_, 'comment_':self.comment_} def __repr__json__(self): return json.dumps(self.__repr__dict__())
require 'faraday' # @private module Faraday module Disqussion # @private class RaiseHttp4xx < ::Faraday::Response::Middleware def on_complete(env) case env[:status].to_i when 400 raise ::Disqussion::BadRequest.new(error_message(env), env[:response_headers]) when 401 raise ::Disqussion::Unauthorized.new(error_message(env), env[:response_headers]) when 403 raise ::Disqussion::Forbidden.new(error_message(env), env[:response_headers]) when 404 raise ::Disqussion::NotFound.new(error_message(env), env[:response_headers]) end end private def error_message(env) "#{env[:method].to_s.upcase} #{env[:url].to_s}: (#{env[:status]}) #{error_body(env[:body])}" end def error_body(body) if body['code'] && body['response'] "Disqus Error #{body['code']}: #{body['response']}" else nil end end end end end
#![alt text](http://farkhor.github.io/CuSha/images/CuSha-logo-small.png "CuSha") CuSha is a CUDA-based vertex-centric graph processing framework that uses G-Shards and Concatenated Windows (CW) representations to store graphs inside the GPU global memory. G-Shards and CW consume more space compared to Compressed Sparse Row (CSR) format but on the other hand provide better performance due to GPU-friendly representations. For completeness, provided package also includes Virtual Warp-Centric (VWC) processing method for GPU that uses CSR representation. [ [Paper](http://www.cs.ucr.edu/~fkhor001/index.html This work is supported by National Science Foundation grants CCF-1157377 and CCF-0905509 to UC Riverside.
package jp.co.future.uroborosql.parameter.mapper; import static org.hamcrest.MatcherAssert.*; import static org.hamcrest.Matchers.*; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.math.BigDecimal; import java.sql.Connection; import java.sql.Timestamp; import java.text.ParseException; import java.time.Clock; import java.time.LocalDate; import java.time.Month; import java.time.ZoneId; import java.util.Date; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import jp.co.future.uroborosql.parameter.mapper.legacy.<API key>; public class <API key> { private Clock clock; @BeforeEach public void setUp() { this.clock = Clock.systemDefaultZone(); } @Test public void test() throws ParseException { var <API key> = new <API key>(this.clock); assertThat(<API key>.toJdbc(null, null), is(nullValue())); assertThat(<API key>.toJdbc(true, null), is(true)); assertThat(<API key>.toJdbc((byte) 1, null), is((byte) 1)); assertThat(<API key>.toJdbc((short) 1, null), is((short) 1)); assertThat(<API key>.toJdbc(1, null), is(1)); assertThat(<API key>.toJdbc(1L, null), is(1L)); assertThat(<API key>.toJdbc(1F, null), is(1F)); assertThat(<API key>.toJdbc(1D, null), is(1D)); assertThat(<API key>.toJdbc(BigDecimal.TEN, null), is(BigDecimal.TEN)); assertThat(<API key>.toJdbc("A", null), is("A")); assertThat(<API key>.toJdbc(new byte[] { 1, 2 }, null), is(new byte[] { 1, 2 })); assertThat(<API key>.toJdbc(new java.sql.Date(1), null), is(new java.sql.Date(1))); assertThat(<API key>.toJdbc(new java.sql.Time(1), null), is(new java.sql.Time(1))); assertThat(<API key>.toJdbc(new java.sql.Timestamp(1), null), is(new java.sql.Timestamp(1))); var array = newProxy(java.sql.Array.class); assertThat(<API key>.toJdbc(array, null), is(array)); var ref = newProxy(java.sql.Ref.class); assertThat(<API key>.toJdbc(ref, null), is(ref)); var blob = newProxy(java.sql.Blob.class); assertThat(<API key>.toJdbc(blob, null), is(blob)); var clob = newProxy(java.sql.Clob.class); assertThat(<API key>.toJdbc(clob, null), is(clob)); var sqlxml = newProxy(java.sql.SQLXML.class); assertThat(<API key>.toJdbc(sqlxml, null), is(sqlxml)); var struct = newProxy(java.sql.Struct.class); assertThat(<API key>.toJdbc(struct, null), is(struct)); var object = new Object(); assertThat(<API key>.toJdbc(object, null), is(object)); var date = Date.from(LocalDate.parse("2000-01-01").atStartOfDay(ZoneId.systemDefault()).toInstant()); assertThat(<API key>.toJdbc(date, null), is(new java.sql.Timestamp(date.getTime()))); assertThat(<API key>.toJdbc(Month.APRIL, null), is(4)); } @Test public void testWithCustom() throws ParseException { var original = new <API key>(this.clock); original.addMapper(new <API key>()); var mapper = new <API key>(); original.addMapper(mapper); var <API key> = new <API key>(original, this.clock); var date = Date.from(LocalDate.parse("2000-01-01").atStartOfDay(this.clock.getZone()).toInstant()); assertThat(<API key>.toJdbc(date, null), is("20000101")); assertThat(<API key>.canAcceptByStandard(date), is(true)); <API key>.removeMapper(mapper); assertThat(<API key>.toJdbc(date, null), is(instanceOf(Timestamp.class))); } @Test public void testCustom() { var <API key> = new <API key>(this.clock); <API key>.addMapper(new BindParameterMapper<String>() { @Override public Class<String> targetType() { return String.class; } @Override public Object toJdbc(final String original, final Connection connection, final <API key> <API key>) { return original.toLowerCase(); } }); assertThat(<API key>.toJdbc("S", null), is("s")); assertThat(<API key>.toJdbc(true, null), is(true)); } @Test public void testCustomWithClock() { var <API key> = new <API key>(this.clock); <API key>.addMapper(new <API key><String>() { private Clock clock; @Override public Class<String> targetType() { return String.class; } @Override public Object toJdbc(final String original, final Connection connection, final <API key> <API key>) { return original.toLowerCase(); } @Override public Clock getClock() { return this.clock; } @Override public void setClock(final Clock clock) { this.clock = clock; } }); assertThat(<API key>.toJdbc("S", null), is("s")); assertThat(<API key>.toJdbc(true, null), is(true)); } interface ProxyContainer { Object getOriginal(); } @SuppressWarnings("unchecked") private static <I> I newProxy(final Class<I> interfaceType) { var o = new Object(); Method getOriginal; try { getOriginal = ProxyContainer.class.getMethod("getOriginal"); } catch (<API key> | SecurityException e) { throw new AssertionError(e); } var proxyInstance = (I) Proxy.newProxyInstance(Thread.currentThread().<API key>(), new Class<?>[] { interfaceType, ProxyContainer.class }, (proxy, method, args) -> { if (getOriginal.equals(method)) { return o; } for (int i = 0; i < args.length; i++) { if (args[i] instanceof ProxyContainer) { args[i] = ((ProxyContainer) args[i]).getOriginal(); } } return method.invoke(o, args); }); return proxyInstance; } }
<?php namespace Ejimba\Pesapal\OAuth; class OAuthRequest { private $parameters; private $http_method; private $http_url; // for debug purposes public $base_string; public static $version = '1.0'; public static $POST_INPUT = 'php://input'; function __construct($http_method, $http_url, $parameters=NULL) { @$parameters or $parameters = array(); $this->parameters = $parameters; $this->http_method = $http_method; $this->http_url = $http_url; } /** * attempt to build up a request from what was passed to the server */ public static function from_request($http_method=NULL, $http_url=NULL, $parameters=NULL) { $scheme = (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] != "on") ? 'http' : 'https'; @$http_url or $http_url = $scheme . '://' . $_SERVER['HTTP_HOST'] . ':' . $_SERVER['SERVER_PORT'] . $_SERVER['REQUEST_URI']; @$http_method or $http_method = $_SERVER['REQUEST_METHOD']; // We weren't handed any parameters, so let's find the ones relevant to // this request. // If you run XML-RPC or similar you should use this to provide your own // parsed parameter-list if (!$parameters) { // Find request headers $request_headers = OAuthUtil::get_headers(); // Parse the query-string to find GET parameters $parameters = OAuthUtil::parse_parameters($_SERVER['QUERY_STRING']); // It's a POST request of the proper content-type, so parse POST // parameters and add those overriding any duplicates from GET if ($http_method == "POST" && @strstr($request_headers["Content-Type"], "application/<API key>") ) { $post_data = OAuthUtil::parse_parameters( file_get_contents(self::$POST_INPUT) ); $parameters = array_merge($parameters, $post_data); } // We have a <API key> with OAuth data. Parse the header // and add those overriding any duplicates from GET or POST if (@substr($request_headers['Authorization'], 0, 6) == "OAuth ") { $header_parameters = OAuthUtil::split_header( $request_headers['Authorization'] ); $parameters = array_merge($parameters, $header_parameters); } } return new OAuthRequest($http_method, $http_url, $parameters); } /** * pretty much a helper function to set up the request */ public static function <API key>($consumer, $token, $http_method, $http_url, $parameters=NULL) { @$parameters or $parameters = array(); $defaults = array("oauth_version" => OAuthRequest::$version, "oauth_nonce" => OAuthRequest::generate_nonce(), "oauth_timestamp" => OAuthRequest::generate_timestamp(), "oauth_consumer_key" => $consumer->key); if ($token) $defaults['oauth_token'] = $token->key; $parameters = array_merge($defaults, $parameters); return new OAuthRequest($http_method, $http_url, $parameters); } public function set_parameter($name, $value, $allow_duplicates = true) { if ($allow_duplicates && isset($this->parameters[$name])) { // We have already added parameter(s) with this name, so add to the list if (is_scalar($this->parameters[$name])) { // This is the first duplicate, so transform scalar (string) // into an array so we can add the duplicates $this->parameters[$name] = array($this->parameters[$name]); } $this->parameters[$name][] = $value; } else { $this->parameters[$name] = $value; } } public function get_parameter($name) { return isset($this->parameters[$name]) ? $this->parameters[$name] : null; } public function get_parameters() { return $this->parameters; } public function unset_parameter($name) { unset($this->parameters[$name]); } /** * The request parameters, sorted and concatenated into a normalized string. * @return string */ public function <API key>() { // Grab all parameters $params = $this->parameters; // Remove oauth_signature if present // Ref: Spec: 9.1.1 ("The oauth_signature parameter MUST be excluded.") if (isset($params['oauth_signature'])) { unset($params['oauth_signature']); } return OAuthUtil::build_http_query($params); } /** * Returns the base string of this request * * The base string defined as the method, the url * and the parameters (normalized), each urlencoded * and the concated with &. */ public function <API key>() { $parts = array( $this-><API key>(), $this-><API key>(), $this-><API key>() ); $parts = OAuthUtil::urlencode_rfc3986($parts); return implode('&', $parts); } /** * just uppercases the http method */ public function <API key>() { return strtoupper($this->http_method); } /** * parses the url and rebuilds it to be * scheme://host/path */ public function <API key>() { $parts = parse_url($this->http_url); $port = @$parts['port']; $scheme = $parts['scheme']; $host = $parts['host']; $path = @$parts['path']; $port or $port = ($scheme == 'https') ? '443' : '80'; if (($scheme == 'https' && $port != '443') || ($scheme == 'http' && $port != '80')) { $host = "$host:$port"; } return "$scheme://$host$path"; } /** * builds a url usable for a GET request */ public function to_url() { $post_data = $this->to_postdata(); $out = $this-><API key>(); if ($post_data) { $out .= '?'.$post_data; } return $out; } /** * builds the data one would send in a POST request */ public function to_postdata() { return OAuthUtil::build_http_query($this->parameters); } /** * builds the Authorization: header */ public function to_header() { $out ='Authorization: OAuth realm=""'; $total = array(); foreach ($this->parameters as $k => $v) { if (substr($k, 0, 5) != "oauth") continue; if (is_array($v)) { throw new OAuthException('Arrays not supported in headers'); } $out .= ',' . OAuthUtil::urlencode_rfc3986($k) . '="' . OAuthUtil::urlencode_rfc3986($v) . '"'; } return $out; } public function __toString() { return $this->to_url(); } public function sign_request($signature_method, $consumer, $token) { $this->set_parameter( "o<API key>, $signature_method->get_name(), false ); $signature = $this->build_signature($signature_method, $consumer, $token); $this->set_parameter("oauth_signature", $signature, false); } public function build_signature($signature_method, $consumer, $token) { $signature = $signature_method->build_signature($this, $consumer, $token); return $signature; } /** * util function: current timestamp */ private static function generate_timestamp() { return time(); } /** * util function: current nonce */ private static function generate_nonce() { mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up. $charid = strtoupper(md5(uniqid(rand(), true))); $hyphen = chr(45); $uuid = chr(123) .substr($charid, 0, 8).$hyphen .substr($charid, 8, 4).$hyphen .substr($charid,12, 4).$hyphen .substr($charid,16, 4).$hyphen .substr($charid,20,12) .chr(125); return $uuid; } }
#!/bin/sh # Capture the current version. VERSION=`cat ./VERSION` # Currently using YUI Compressor for minification. YUICOMPRESSOR=./3pty/yui/yuicompressor/yuicompressor-2.4.7.jar JAVA=`which java` if [ "$JAVA" == "" ]; then echo "Not found: java" ; exit 1 ; fi # Output tmp version file (use comment style that works for both CSS and JS). echo "" > ./version.tmp # Process CSS files for each third-party UI framework. UIFWKFILES=`find ./src/css/adapters/uifwk -type f` for UIFWKFILE in $UIFWKFILES do # Extract framework identifier. # Note: remove "-" for readability, e.g. jquery-ui => jqueryui. UIFWKID=`expr "$UIFWKFILE" : ".*/\(.*\).css" | tr -d "-"` echo "Generating uducada-$UIFWKID CSS files..." # Generate unminified and minified versions of the CSS file. # Note: add adapter file before uducada files. cat $UIFWKFILE ./src/css/*.css > ./uducada.css.tmp $JAVA -jar $YUICOMPRESSOR --type css -o ./uducada.min.css.tmp ./uducada.css.tmp # Add the version file to the minified and unminified versions of the CSS file. cat ./version.tmp ./uducada.css.tmp > ./uducada-$UIFWKID.css cat ./version.tmp ./uducada.min.css.tmp > ./uducada-$UIFWKID.min.css done # Process JS files for each third-party JS and UI framework combination. FWKFILES=`find ./src/js/adapters/fwk -type f` for FWKFILE in $FWKFILES do # Extract framework identifier. # Note: remove "-" for readability, e.g. jquery-ui => jqueryui. FWKID=`expr "$FWKFILE" : ".*/\(.*\).js" | tr -d "-"` UIFWKFILES=`find ./src/js/adapters/uifwk -type f` for UIFWKFILE in $UIFWKFILES do # Extract framework identifier. # Note: remove "-" for readability, e.g. jquery-ui => jqueryui. UIFWKID=`expr "$UIFWKFILE" : ".*/\(.*\).js" | tr -d "-"` echo "Generating uducada-$FWKID-$UIFWKID JS files..." # Generate unminified and minified versions of the JS file. # Note: add adapter files before uducada files.
<template name="home"> <div id="ww"> <div class="container"> <div class="row"> <div class="col-lg-8 col-md-offset-2 centered"> {{> me}} </div><!-- /col-lg-8 --> </div><!-- /row --> </div> <!-- /container --> </div> {{> work}} </template>
/** * Scale Interpolation Function. * * @param {number} a start scale * @param {number} b end scale * @param {number} v progress * @returns {string} the interpolated scale */ export default function scale(a, b, v) { // <API key> no-bitwise return `scale(${((a + (b - a) * v) * 1000 >> 0) / 1000})`; }