code
stringlengths
4
1.01M
language
stringclasses
2 values
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>compcert: 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.7.1 / compcert - 2.0.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> compcert <small> 2.0.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-02-19 06:39:30 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-02-19 06:39:30 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base camlp5 7.11 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq 8.7.1 Formal proof management system. num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.0 Official release 4.09.0 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;thomas.braibant@gmail.com&quot; homepage: &quot;http://compcert.inria.fr/&quot; dev-repo: &quot;git+https://github.com/AbsInt/CompCert.git&quot; bug-reports: &quot;https://github.com/AbsInt/CompCert/issues&quot; license: &quot;INRIA Non-Commercial License Agreement&quot; build: [ [&quot;./configure&quot; &quot;ia32-linux&quot;] [make &quot;-j%{jobs}%&quot;] ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.4pl4&quot; &amp; &lt; &quot;8.5~&quot;} ] synopsis: &quot;The CompCert C compiler&quot; authors: &quot;Xavier Leroy &lt;xavier.leroy@inria.fr&gt;&quot; extra-files: [&quot;coq-compcert.install&quot; &quot;md5=a7efe759bff32c6aac2c2ca483d5a266&quot;] url { src: &quot;http://compcert.inria.fr/release/compcert-2.0.tgz&quot; checksum: &quot;md5=931325ad6a1faf22df73c249509c0b9f&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-compcert.2.0.0 coq.8.7.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.7.1). The following dependencies couldn&#39;t be met: - coq-compcert -&gt; coq &lt; 8.5~ -&gt; ocaml &lt; 4.03.0 base of this switch (use `--unlock-base&#39; to force) 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-compcert.2.0.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"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </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>
Java
/** * */ package com.kant.datastructure.stacks; import com.kant.sortingnsearching.MyUtil; /** * http://www.geeksforgeeks.org/the-stock-span-problem/ <br/> * * * The stock span problem is a financial problem where we have a series of n * daily price quotes for a stock and we need to calculate span of stock’s price * for all n days. The span Si of the stock’s price on a given day i is defined * as the maximum number of consecutive days just before the given day, for * which the price of the stock on the current day is less than or equal to its * price on the given day. For example, if an array of 7 days prices is given as * {100, 80, 60, 70, 60, 75, 85}, then the span values for corresponding 7 days * are {1, 1, 1, 2, 1, 4, 6} * * @author shaskant * */ public class StockSpanProblem { int[] stockData;// prices /** * */ public StockSpanProblem(int[] stockData) { this.stockData = stockData; } /** * General approach. TESTED * * @return */ public int[] getStackSpan() { int[] result = new int[stockData.length]; for (int i = 0; i < stockData.length; i++) { result[i] = 1; for (int j = i - 1; j > 0; j--) { if (stockData[i] > stockData[j]) result[i]++; } } return result; } /** * TESTED * * @return */ public int[] getStackSpanOptimal() { int[] result = new int[stockData.length]; result[0] = 1; // store indexes Stack<Integer> stack = new StackListImplementation<>(false); stack.push(0); for (int i = 1; i < stockData.length; i++) { // pop as long as top element is lesser. while (!stack.isEmpty() && stockData[stack.peek().intValue()] <= stockData[i]) { stack.pop(); } // if stack is empty , current stock price is greater than all // before it , else index difference between current and index of // greater element at top of stack result[i] = (stack.isEmpty()) ? (i + 1) : (i - stack.peek()); stack.push(i); } return result; } /** * * @param args */ public static void main(String[] args) { StockSpanProblem stockSpan = new StockSpanProblem(new int[] { 100, 80, 60, 70, 60, 75, 85 }); int[] result = stockSpan.getStackSpanOptimal(); MyUtil.printArrayInt(result); } }
Java
static void cnrom_switchchr(int bank) { int size = 8192; backend_read(romfn, 16 + (16384 * header.prgromsize) + (bank * size), size, ppu_memory); } static void cnrom_access(unsigned int address, unsigned char data) { if (address > 0x7fff && address < 0x10000) cnrom_switchchr(data & (header.chrromsize - 1)); } static void cnrom_reset() { }
Java
// Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.ExceptionServices; using System.Threading; using System.Threading.Tasks; using CommonCache.Test.Common; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace CommonCache.Test.Unit.Utils { public class CacheTestExecutor { private readonly IEnumerable<LabUserData> _labUsers; private readonly CacheStorageType _cacheStorageType; public CacheTestExecutor( IEnumerable<LabUserData> labUsers, CacheStorageType cacheStorageType) { _labUsers = labUsers; _cacheStorageType = cacheStorageType; } public async Task ExecuteAsync( CacheProgramType firstProgram, CacheProgramType secondProgram, CancellationToken cancellationToken) { Console.WriteLine($"Running {firstProgram} -> {secondProgram}..."); CommonCacheTestUtils.DeleteAllTestCaches(); CommonCacheTestUtils.EnsureCacheFileDirectoryExists(); await ExecuteCacheProgramAsync(firstProgram, true, cancellationToken).ConfigureAwait(false); await ExecuteCacheProgramAsync(secondProgram, false, cancellationToken).ConfigureAwait(false); PrintCacheInfo(); } private async Task ExecuteCacheProgramAsync(CacheProgramType cacheProgramType, bool isFirst, CancellationToken cancellationToken) { var cacheProgramFirst = CacheProgramFactory.CreateCacheProgram(cacheProgramType, _cacheStorageType); var results = await cacheProgramFirst.ExecuteAsync(_labUsers, cancellationToken).ConfigureAwait(false); Console.WriteLine(); Console.WriteLine("------------------------------------"); if (isFirst) { Console.WriteLine($"First Results: {cacheProgramType}"); } else { Console.WriteLine($"Second Results: {cacheProgramType}"); } Console.WriteLine("stdout:"); Console.WriteLine(results.StdOut); Console.WriteLine(); Console.WriteLine("stderr:"); Console.WriteLine(results.StdErr); Console.WriteLine("------------------------------------"); Assert.IsFalse(results.ExecutionResults.IsError, $"{cacheProgramType} should not fail: {results.ExecutionResults.ErrorMessage}"); Assert.IsFalse(results.ProcessExecutionFailed, $"{cacheProgramFirst.ExecutablePath} should not fail"); foreach (var upnResult in results.ExecutionResults.Results) { if (isFirst) { Assert.IsFalse(upnResult.IsAuthResultFromCache, $"{upnResult.LabUserUpn} --> First result should not be from the cache"); } else { Assert.IsTrue(upnResult.IsAuthResultFromCache, $"{upnResult.LabUserUpn} --> Second result should be from the cache"); } Assert.AreEqual(upnResult?.LabUserUpn?.ToLowerInvariant(), upnResult?.AuthResultUpn?.ToLowerInvariant()); } } private static void PrintCacheInfo() { if (File.Exists(CommonCacheTestUtils.AdalV3CacheFilePath)) { Console.WriteLine($"Adal Cache Exists at: {CommonCacheTestUtils.AdalV3CacheFilePath}"); Console.WriteLine("Adal Cache Size: " + Convert.ToInt32(new FileInfo(CommonCacheTestUtils.AdalV3CacheFilePath).Length)); } else { Console.WriteLine($"Adal Cache DOES NOT EXIST at: {CommonCacheTestUtils.AdalV3CacheFilePath}"); } if (File.Exists(CommonCacheTestUtils.MsalV2CacheFilePath)) { Console.WriteLine($"MSAL V2 Cache Exists at: {CommonCacheTestUtils.MsalV2CacheFilePath}"); Console.WriteLine("MSAL V2 Cache Size: " + Convert.ToInt32(new FileInfo(CommonCacheTestUtils.MsalV2CacheFilePath).Length)); } else { Console.WriteLine($"MSAL V2 Cache DOES NOT EXIST at: {CommonCacheTestUtils.MsalV2CacheFilePath}"); } if (File.Exists(CommonCacheTestUtils.MsalV3CacheFilePath)) { Console.WriteLine($"MSAL V3 Cache Exists at: {CommonCacheTestUtils.MsalV3CacheFilePath}"); Console.WriteLine("MSAL V3 Cache Size: " + Convert.ToInt32(new FileInfo(CommonCacheTestUtils.MsalV3CacheFilePath).Length)); } else { Console.WriteLine($"MSAL V3 Cache DOES NOT EXIST at: {CommonCacheTestUtils.MsalV3CacheFilePath}"); } } } }
Java
<?php namespace Eggbe\Helper; use \Eggbe\Helper\Abstractions\AHelper; class Hash extends AHelper { /** * @param int $length * @return string * @throws \Exception */ public final static function solt($length){ if ((int)$length > 62){ throw new \Exception('Max solt length can not be more that 62 characters!'); } return substr(str_shuffle(implode(array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9')))), 0, $length); } /** * @const int */ const HASH_TYPE_MD5 = 1; /** * @param int $type * @param string $value * @return bool * @throws \Exception */ public final static function make($type, $value){ switch((int)$type){ case self::HASH_TYPE_MD5: return md5(implode(Arr::simplify(array_slice(func_get_args(), 1)))); } throw new \Exception('Unknown validation type "' . $type . '"!'); } /** * @param string $value * @param int $type * @return bool * @throws \Exception */ public final static function validate($value, $type){ switch((int)$type){ case self::HASH_TYPE_MD5: return strlen(($value = strtolower(trim($value)))) == 32 && ctype_xdigit($value); } throw new \Exception('Unknown validation type "' . $type . '"!'); } }
Java
//****************************************************************************************************** // FrequencyValue.cs - Gbtc // // Copyright © 2012, Grid Protection Alliance. All Rights Reserved. // // Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See // the NOTICE file distributed with this work for additional information regarding copyright ownership. // The GPA licenses this file to you under the MIT License (MIT), the "License"; you may // not use this file except in compliance with the License. You may obtain a copy of the License at: // // http://www.opensource.org/licenses/MIT // // Unless agreed to in writing, the subject software distributed under the License is distributed on an // "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the // License for the specific language governing permissions and limitations. // // Code Modification History: // ---------------------------------------------------------------------------------------------------- // 11/12/2004 - J. Ritchie Carroll // Generated original version of source code. // 09/15/2009 - Stephen C. Wills // Added new header and license agreement. // 12/17/2012 - Starlynn Danyelle Gilliam // Modified Header. // //****************************************************************************************************** using System; using System.Runtime.Serialization; namespace GSF.PhasorProtocols.BPAPDCstream { /// <summary> /// Represents the BPA PDCstream implementation of a <see cref="IFrequencyValue"/>. /// </summary> [Serializable] public class FrequencyValue : FrequencyValueBase { #region [ Constructors ] /// <summary> /// Creates a new <see cref="FrequencyValue"/>. /// </summary> /// <param name="parent">The <see cref="IDataCell"/> parent of this <see cref="FrequencyValue"/>.</param> /// <param name="frequencyDefinition">The <see cref="IFrequencyDefinition"/> associated with this <see cref="FrequencyValue"/>.</param> public FrequencyValue(IDataCell parent, IFrequencyDefinition frequencyDefinition) : base(parent, frequencyDefinition) { } /// <summary> /// Creates a new <see cref="FrequencyValue"/> from specified parameters. /// </summary> /// <param name="parent">The <see cref="DataCell"/> parent of this <see cref="FrequencyValue"/>.</param> /// <param name="frequencyDefinition">The <see cref="FrequencyDefinition"/> associated with this <see cref="FrequencyValue"/>.</param> /// <param name="frequency">The floating point value that represents this <see cref="FrequencyValue"/>.</param> /// <param name="dfdt">The floating point value that represents the change in this <see cref="FrequencyValue"/> over time.</param> public FrequencyValue(DataCell parent, FrequencyDefinition frequencyDefinition, double frequency, double dfdt) : base(parent, frequencyDefinition, frequency, dfdt) { } /// <summary> /// Creates a new <see cref="FrequencyValue"/> from serialization parameters. /// </summary> /// <param name="info">The <see cref="SerializationInfo"/> with populated with data.</param> /// <param name="context">The source <see cref="StreamingContext"/> for this deserialization.</param> protected FrequencyValue(SerializationInfo info, StreamingContext context) : base(info, context) { } #endregion #region [ Properties ] /// <summary> /// Gets or sets the <see cref="DataCell"/> parent of this <see cref="FrequencyValue"/>. /// </summary> public new virtual DataCell Parent { get => base.Parent as DataCell; set => base.Parent = value; } /// <summary> /// Gets or sets the <see cref="FrequencyDefinition"/> associated with this <see cref="FrequencyValue"/>. /// </summary> public new virtual FrequencyDefinition Definition { get => base.Definition as FrequencyDefinition; set => base.Definition = value; } /// <summary> /// Gets the length of the <see cref="BodyImage"/>. /// </summary> /// <remarks> /// The base implementation assumes fixed integer values are represented as 16-bit signed /// integers and floating point values are represented as 32-bit single-precision floating-point /// values (i.e., short and float data types respectively). /// </remarks> protected override int BodyLength => Definition.Parent.IsPdcBlockSection ? 2 : base.BodyLength; // PMUs in PDC block do not include Df/Dt /// <summary> /// Gets the binary body image of the <see cref="FrequencyValue"/> object. /// </summary> protected override byte[] BodyImage { get { // PMUs in PDC block do not include Df/Dt if (!Definition.Parent.IsPdcBlockSection) return base.BodyImage; byte[] buffer = new byte[2]; BigEndian.CopyBytes((short)UnscaledFrequency, buffer, 0); return buffer; } } #endregion #region [ Methods ] /// <summary> /// Parses the binary body image. /// </summary> /// <param name="buffer">Binary image to parse.</param> /// <param name="startIndex">Start index into <paramref name="buffer"/> to begin parsing.</param> /// <param name="length">Length of valid data within <paramref name="buffer"/>.</param> /// <returns>The length of the data that was parsed.</returns> protected override int ParseBodyImage(byte[] buffer, int startIndex, int length) { // PMUs in PDC block do not include Df/Dt if (Definition.Parent.IsPdcBlockSection) { UnscaledFrequency = BigEndian.ToInt16(buffer, startIndex); return 2; } return base.ParseBodyImage(buffer, startIndex, length); } #endregion #region [ Static ] // Static Methods // Calculates binary length of a frequency value based on its definition internal static uint CalculateBinaryLength(IFrequencyDefinition definition) { // The frequency definition will determine the binary length based on data format return (uint)new FrequencyValue(null, definition).BinaryLength; } // Delegate handler to create a new BPA PDCstream frequency value internal static IFrequencyValue CreateNewValue(IDataCell parent, IFrequencyDefinition definition, byte[] buffer, int startIndex, out int parsedLength) { IFrequencyValue frequency = new FrequencyValue(parent, definition); parsedLength = frequency.ParseBinaryImage(buffer, startIndex, 0); return frequency; } #endregion } }
Java
<ul class="context_menu"> <li><a href="?module=menu">Retour aux menus</a></li> </ul> <form action="?module=menu&action=edit" method="post"> <input type="hidden" name="menuId" value="<?php echo $menu->getId(); ?>" /> <label class="mandatory">Titre</label> <input type="text" name="title" value="<?php echo stripslashes($menu->getTitle()); ?>" /> <label>Commentaire</label> <textarea name="comment"><?php echo stripslashes($menu->getComment()); ?></textarea> <button type="submit">Modifier</button> </form>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>fourcolor: 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 / extra-dev</a></li> <li class="active"><a href="">dev / fourcolor - 1.2.1</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> fourcolor <small> 1.2.1 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-29 01:31:58 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-29 01:31:58 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 dev Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system 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 ocaml-secondary-compiler 4.08.1-1 OCaml 4.08.1 Secondary Switch Compiler ocamlfind 1.9.1 A library manager for OCaml ocamlfind-secondary 1.9.1 Adds support for ocaml-secondary-compiler to ocamlfind zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Mathematical Components &lt;mathcomp-dev@sympa.inria.fr&gt;&quot; homepage: &quot;https://math-comp.github.io/math-comp/&quot; bug-reports: &quot;Mathematical Components &lt;mathcomp-dev@sympa.inria.fr&gt;&quot; dev-repo: &quot;git+https://github.com/math-comp/fourcolor&quot; license: &quot;CeCILL-B&quot; build: [ make &quot;-j&quot; &quot;%{jobs}%&quot; ] install: [ make &quot;install&quot; ] depends: [ &quot;coq-mathcomp-algebra&quot; { &gt;= &quot;1.10.0&quot; &amp; &lt; &quot;1.11&quot; } ] tags: [ &quot;keyword:Four color theorem&quot; &quot;keyword:small scale reflection&quot; &quot;keyword:mathematical components&quot; ] authors: [ &quot;Georges Gonthier&quot; ] synopsis: &quot;Mechanization of the Four Color Theorem&quot; description: &quot;&quot;&quot; Proof of the Four Color Theorem This library contains a formalized proof of the Four Color Theorem, along with the theories needed to support stating and then proving the Theorem. This includes an axiomatization of the setoid of classical real numbers, basic plane topology definitions, and a theory of combinatorial hypermaps. &quot;&quot;&quot; url { src: &quot;https://github.com/math-comp/fourcolor/archive/v1.2.1.tar.gz&quot; checksum: &quot;sha256=7bed7a08f388d7f0910d39593dc7e1dcb4fd30af76cba01d11502db713393281&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-fourcolor.1.2.1 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-fourcolor -&gt; coq-mathcomp-algebra &lt; 1.11 -&gt; coq-mathcomp-fingroup &lt; 1.11+beta1 -&gt; coq-mathcomp-ssreflect &lt; 1.11+beta1 -&gt; coq &lt; 8.12~ -&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-fourcolor.1.2.1</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
import { Component } from 'react'; import Router from 'next/router'; import io from 'socket.io-client'; import fetch from 'isomorphic-fetch'; import Page from '../../layouts/page.js'; import Slide from '../../components/slide.js'; import Code from '../../components/code.js' import Emojis from '../../components/emojis.js'; import SlideNavigation from '../../components/slidenavigation.js'; import { Title, Headline, Enum, Column } from '../../components/text.js'; import withRedux from 'next-redux-wrapper'; import { makeStore, _changeRole } from '../../components/store.js'; class SlideFour extends Component { constructor(props) { super(props); this.props = props; this.state = { socket: undefined }; this.emojiModule = this.emojiModule.bind(this); this.navModule = this.navModule.bind(this); } static async getInitialProps({ isServer }) { let host = 'http://localhost:3000'; if (!isServer) host = `${location.protocol}//${location.host}`; const response = await fetch(`${host}/static/html_template.txt`); const htmlCode = await response.text(); return { htmlCode }; } componentDidMount() { // socket if (!this.state.socket) { const socket = io(`${location.protocol}//${location.host}/`); socket.on('viewer-update', data => { if (this.props.role === 'VIEWER') { Router.replace(data.url); } }); this.setState(state => ( {socket: socket} )); } } componentWillUnmount() { if (this.state.socket) this.state.socket.close(); } emojiModule() { if (this.state.socket) { return ( <Emojis socket={this.state.socket} /> ); } } navModule() { if (this.state.socket && this.props.role) { return ( <SlideNavigation role={this.props.role} socket={this.state.socket} prev="/slides/0x04_y_tho" next="/slides/0x06_include" /> ); } } render() { return ( <Page> <Slide> <Title>0x05_call_by_reference</Title> <Headline>Anwendung im Browser</Headline> <Column> <Enum>JavaScript kann direkt im { '<script>-Tag' } geschrieben werden</Enum> <Enum>oder als externe Datei durch das src-Attribut eingebunden werden</Enum> </Column> <Column> <Code language='html'>{ this.props.htmlCode }</Code> </Column> { this.navModule() } </Slide> { this.emojiModule() } </Page> ); } }; const mapStateToProps = state => ({ role: state.role }); const mapDispatchToProps = dipatch => ({ changeRole: role => (dispatch(_changeRole(role))) }); export default withRedux(makeStore, mapStateToProps, mapDispatchToProps)(SlideFour);
Java
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Examlpe")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Examlpe")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("0a3acc12-4731-41d0-9c54-8985a348bf4d")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
Java
![preview Long Haul](/preview.jpg) Long Haul is a minimal jekyll theme built with SASS / GULP / BROWSERSYNC / AUTOPREFIXER and focuses on long form blog posts. It is meant to be used as a starting point for a jekyll blog/website. If you really enjoy Long Haul and want to give me credit somewhere on the internet send or tweet out your experience with Long Haul and tag me [@brianmaierjr](https://twitter.com/brianmaierjr). #### [View Demo](http://brianmaierjr.com/long-haul) ## Features - Minimal, Type Focused Design - Built with GULP + SASS + BROWSERSYNC + AUTOPREFIXER - SVG Social Icons - Responsive Nav Menu - XML Feed for RSS Readers - Contact Form via Formspree - 5 Post Loop with excerpt on Home Page - Previous / Next Post Navigation - Estimated Reading Time for posts - Stylish Drop Cap on posts - A Better Type Scale for all devices - Comments powered by Disqus ## Setup 1. [Install Jekyll](http://jekyllrb.com) 2. Fork the [Long Haul repo](http://github.com/brianmaierjr/long-haul) 3. Clone it 4. [Install Bundler](http://bundler.io/) 5. Run `bundle install` 6. Install gulp dependencies by running `npm install` 7. Run Jekyll and watch files by running `bundle exec gulp` 8. Customize and watch the magic happen! ## Site Settings The main settings can be found inside the `_config.yml` file: - **title:** title of your site - **description:** description of your site - **url:** your url - **paginate:** the amount of posts displayed on homepage - **navigation:** these are the links in the main site navigation - **social** diverse social media usernames (optional) - **google_analytics** Google Analytics key (optional) ## License This is [MIT](LICENSE) with no added caveats, so feel free to use this Jekyll theme on your site without linking back to me or using a disclaimer.
Java
/* eslint-disable promise/always-return */ import { runAuthenticatedQuery } from "schema/v2/test/utils" import gql from "lib/gql" describe("Me", () => { describe("ShowsByFollowedArtists", () => { it("returns shows by followed artists", async () => { const query = gql` { me { showsByFollowedArtists( first: 100 sort: NAME_ASC status: UPCOMING ) { totalCount edges { node { name } } } } } ` const expectedConnectionData = { totalCount: 2, edges: [ { node: { name: "Show 1", }, }, { node: { name: "Show 2", }, }, ], } const followedArtistsShowsLoader = jest.fn(async () => ({ headers: { "x-total-count": 2 }, body: [ { name: "Show 1", }, { name: "Show 2", }, ], })) const context = { meLoader: () => Promise.resolve({}), followedArtistsShowsLoader, } const { me: { showsByFollowedArtists }, } = await runAuthenticatedQuery(query, context) expect(showsByFollowedArtists).toEqual(expectedConnectionData) expect(followedArtistsShowsLoader).toHaveBeenCalledWith({ offset: 0, size: 100, sort: "name", status: "upcoming", total_count: true, }) }) }) })
Java
<?php namespace scriptorium\UserBundle\Entity; use FOS\UserBundle\Entity\User as BaseUser; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Component\HttpFoundation\File\UploadedFile; use Symfony\Component\Security\Core\Util\SecureRandom; /** * @ORM\Entity * @ORM\Table(name="fos_user") */ class User extends BaseUser { /** * @ORM\Id * @ORM\Column(type="integer") * @ORM\GeneratedValue(strategy="AUTO") */ protected $id; /** * @ORM\Column(name="registration_date", type="datetime") */ protected $registrationDate; /** * @ORM\Column(name="edition_date", type="datetime") */ protected $editionDate; /** * @Assert\File(maxSize="2048k") * @Assert\Image(mimeTypesMessage="Please upload a valid image.") */ protected $profilePictureFile; // for temporary storage private $tempProfilePicturePath; /** * @ORM\Column(type="string", length=255, nullable=true) */ protected $profilePicturePath; public function __construct() { parent::__construct(); // default registration date $this->registrationDate = new \DateTime(); // default edition date $this->editionDate = new \DateTime(); } /** * Get id * @return integer */ public function getId() { return $this->id; } /** * Get registration date * @return DateTime */ public function getRegistrationDate() { return $this->registrationDate; } /** * Set registration date * @param $date DateTime The registration date */ public function setRegistrationDate($date) { $this->registrationDate = $date; } /** * Get edition date * @return DateTime */ public function getEditionDate() { return $this->editionDate; } /** * Set edition date * @param $date DateTime The edition date */ public function setEditionDate($date) { $this->registrationDate = $date; } /** * Set registrationDate * @param $date DateTime The registration date */ public function setEditionDateNow() { $this->setEditionDate(new \DateTime()); } /** * Sets the file used for profile picture uploads * * @param UploadedFile $file * @return object */ public function setProfilePictureFile(UploadedFile $file = null) { // set the value of the holder $this->profilePictureFile = $file; // check if we have an old image path if (isset($this->profilePicturePath)) { // store the old name to delete after the update $this->tempProfilePicturePath = $this->profilePicturePath; $this->profilePicturePath = null; } else { $this->profilePicturePath = 'initial'; } return $this; } /** * Get the file used for profile picture uploads * * @return UploadedFile */ public function getProfilePictureFile() { return $this->profilePictureFile; } /** * Set profilePicturePath * * @param string $profilePicturePath * @return User */ public function setProfilePicturePath($profilePicturePath) { $this->profilePicturePath = $profilePicturePath; return $this; } /** * Get profilePicturePath * * @return string */ public function getProfilePicturePath() { return $this->profilePicturePath; } /** * Get the absolute path of the profilePicturePath */ public function getProfilePictureAbsolutePath() { return null === $this->profilePicturePath ? null : $this->getUploadRootDir().'/'.$this->profilePicturePath; } /** * Get root directory for file uploads * * @return string */ protected function getUploadRootDir($type='profilePicture') { // the absolute directory path where uploaded // documents should be saved return __DIR__.'/../../../../web/'.$this->getUploadDir($type); } /** * Specifies where in the /web directory profile pic uploads are stored * * @return string */ protected function getUploadDir($type='profilePicture') { // the type param is to change these methods at a later date for more file uploads // get rid of the __DIR__ so it doesn't screw up // when displaying uploaded doc/image in the view. return 'uploads/user/profilepics'; } /** * Get the web path for the user * * @return string */ public function getWebProfilePicturePath() { return '/'.$this->getUploadDir().'/'.$this->getProfilePicturePath(); } /** * @ORM\PrePersist() * @ORM\PreUpdate() */ public function preUploadProfilePicture() { if (null !== $this->getProfilePictureFile()) { // a file was uploaded // generate a unique filename $filename = $this->generateRandomProfilePictureFilename(); $this->setProfilePicturePath($filename.'.'.$this->getProfilePictureFile()->guessExtension()); } } /** * Generates a 32 char long random filename * * @return string */ public function generateRandomProfilePictureFilename() { $count = 0; do { $generator = new SecureRandom(); $random = $generator->nextBytes(16); $randomString = bin2hex($random); $count++; } while (file_exists($this->getUploadRootDir().'/'.$randomString.'.'.$this->getProfilePictureFile()->guessExtension()) && $count < 50); return $randomString; } /** * @ORM\PostPersist() * @ORM\PostUpdate() * * Upload the profile picture * * @return mixed */ public function uploadProfilePicture() { // check there is a profile pic to upload if ($this->getProfilePictureFile() === null) { return; } // if there is an error when moving the file, an exception will // be automatically thrown by move(). This will properly prevent // the entity from being persisted to the database on error $this->getProfilePictureFile()->move($this->getUploadRootDir(), $this->getProfilePicturePath()); // check if we have an old image if (isset($this->tempProfilePicturePath) && file_exists($this->getUploadRootDir().'/'.$this->tempProfilePicturePath)) { // delete the old image unlink($this->getUploadRootDir().'/'.$this->tempProfilePicturePath); // clear the temp image path $this->tempProfilePicturePath = null; } $this->profilePictureFile = null; } /** * @ORM\PostRemove() */ public function removeProfilePictureFile() { if ($file = $this->getProfilePictureAbsolutePath() && file_exists($this->getProfilePictureAbsolutePath())) { unlink($file); } } }
Java
/* Copyright (c) 2015 Mathias Panzenböck * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * 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. */ #include "au.h" struct au_header { uint32_t magic; uint32_t data_offset; uint32_t data_size; uint32_t encoding; uint32_t sample_rate; uint32_t channels; }; int au_isfile(const uint8_t *data, size_t input_len, size_t *lengthptr) { if (input_len < AU_HEADER_SIZE || MAGIC(data) != AU_MAGIC) return 0; const struct au_header *header = (const struct au_header *)data; size_t data_offset = be32toh(header->data_offset); size_t data_size = be32toh(header->data_size); uint32_t encoding = be32toh(header->encoding); uint32_t channels = be32toh(header->channels); if (data_offset % 8 != 0 || encoding < 1 || encoding > 27 || channels == 0 || data_size == 0 || data_size == 0xffffffff) return 0; if (SIZE_MAX - data_offset < data_size) return 0; size_t length = data_offset + data_size; // I'm pretty sure it's a truncated AU file when this happens if (length > input_len) length = input_len; if (lengthptr) *lengthptr = length; return 1; }
Java
package com.jasonlam604.stocktechnicals.indicators; import com.jasonlam604.stocktechnicals.util.NumberFormatter; /** * Moving Average Convergence/Divergence Oscillator */ public class MovingAverageConvergenceDivergence { private static final int CROSSOVER_NONE = 0; private static final int CROSSOVER_POSITIVE = 1; private static final int CROSSOVER_NEGATIVE = -1; private double[] prices; private double[] macd; private double[] signal; private double[] diff; private int[] crossover; public MovingAverageConvergenceDivergence calculate(double[] prices, int fastPeriod, int slowPeriod, int signalPeriod) throws Exception { this.prices = prices; this.macd = new double[prices.length]; this.signal = new double[prices.length]; this.diff = new double[prices.length]; this.crossover = new int[prices.length]; ExponentialMovingAverage emaShort = new ExponentialMovingAverage(); emaShort.calculate(prices, fastPeriod).getEMA(); ExponentialMovingAverage emaLong = new ExponentialMovingAverage(); emaLong.calculate(prices, slowPeriod).getEMA(); for (int i = slowPeriod - 1; i < this.prices.length; i++) { this.macd[i] = NumberFormatter.round(emaShort.getEMA()[i] - emaLong.getEMA()[i]); } ExponentialMovingAverage signalEma = new ExponentialMovingAverage(); this.signal = signalEma.calculate(this.macd, signalPeriod).getEMA(); for (int i = 0; i < this.macd.length; i++) { this.diff[i] = this.macd[i] - this.signal[i]; if (this.diff[i] > 0 && this.diff[i - 1] < 0) { this.crossover[i] = MovingAverageConvergenceDivergence.CROSSOVER_POSITIVE; } else if (this.diff[i] < 0 && this.diff[i - 1] > 0) { this.crossover[i] = MovingAverageConvergenceDivergence.CROSSOVER_NEGATIVE; } else { this.crossover[i] = MovingAverageConvergenceDivergence.CROSSOVER_NONE; } } return this; } public double[] getMACD() { return this.macd; } public double[] getSignal() { return this.signal; } public double[] getDiff() { return this.diff; } public int[] getCrossover() { return this.crossover; } @Override public String toString() { StringBuilder sb = new StringBuilder(); for (int i = 0; i < this.prices.length; i++) { sb.append(String.format("%02.2f", this.prices[i])); sb.append(" "); sb.append(String.format("%02.2f", this.macd[i])); sb.append(" "); sb.append(String.format("%02.2f", this.signal[i])); sb.append(" "); sb.append(String.format("%02.2f", this.diff[i])); sb.append(" "); sb.append(String.format("%d", this.crossover[i])); sb.append(" "); sb.append("\n"); } return sb.toString(); } }
Java
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2014 Torus Knot Software Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 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. ----------------------------------------------------------------------------- */ #include "OgreGLES2Prerequisites.h" #include "OgreGpuProgram.h" #include "OgreHighLevelGpuProgramManager.h" #include "OgreLogManager.h" #include "OgreRoot.h" #include "OgreStringConverter.h" #include "OgreGLUtil.h" #include "OgreGLES2RenderSystem.h" #include "OgreGLES2Support.h" #include "OgreGLSLESProgram.h" #include "OgreGLSLESProgramManager.h" #include "OgreGLSLPreprocessor.h" namespace Ogre { //----------------------------------------------------------------------- #if !OGRE_NO_GLES2_GLSL_OPTIMISER GLSLESProgram::CmdOptimisation GLSLESProgram::msCmdOptimisation; #endif //----------------------------------------------------------------------- //----------------------------------------------------------------------- GLSLESProgram::GLSLESProgram(ResourceManager* creator, const String& name, ResourceHandle handle, const String& group, bool isManual, ManualResourceLoader* loader) : GLSLShaderCommon(creator, name, handle, group, isManual, loader) , mGLShaderHandle(0) , mGLProgramHandle(0) #if !OGRE_NO_GLES2_GLSL_OPTIMISER , mIsOptimised(false) , mOptimiserEnabled(false) #endif { if (createParamDictionary("GLSLESProgram")) { setupBaseParamDictionary(); ParamDictionary* dict = getParamDictionary(); dict->addParameter(ParameterDef("preprocessor_defines", "Preprocessor defines use to compile the program.", PT_STRING),&msCmdPreprocessorDefines); #if !OGRE_NO_GLES2_GLSL_OPTIMISER dict->addParameter(ParameterDef("use_optimiser", "Should the GLSL optimiser be used. Default is false.", PT_BOOL),&msCmdOptimisation); #endif } // Manually assign language now since we use it immediately mSyntaxCode = "glsles"; // There is nothing to load mLoadFromFile = false; } //--------------------------------------------------------------------------- GLSLESProgram::~GLSLESProgram() { // Have to call this here reather than in Resource destructor // since calling virtual methods in base destructors causes crash if (isLoaded()) { unload(); } else { unloadHighLevel(); } } //--------------------------------------------------------------------------- #if OGRE_PLATFORM == OGRE_PLATFORM_ANDROID || OGRE_PLATFORM == OGRE_PLATFORM_EMSCRIPTEN void GLSLESProgram::notifyOnContextLost() { unloadHighLevelImpl(); } #endif GLuint GLSLESProgram::createGLProgramHandle() { if(!Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_SEPARATE_SHADER_OBJECTS)) return 0; if (mGLProgramHandle) return mGLProgramHandle; OGRE_CHECK_GL_ERROR(mGLProgramHandle = glCreateProgram()); if(Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_DEBUG)) { glLabelObjectEXT(GL_PROGRAM_OBJECT_EXT, mGLProgramHandle, 0, mName.c_str()); } return mGLProgramHandle; } bool GLSLESProgram::compile(bool checkErrors) { if (mCompiled == 1) { return true; } // Only create a shader object if glsl es is supported if (isSupported()) { // Create shader object GLenum shaderType = 0x0000; if (mType == GPT_VERTEX_PROGRAM) { shaderType = GL_VERTEX_SHADER; } else if (mType == GPT_FRAGMENT_PROGRAM) { shaderType = GL_FRAGMENT_SHADER; } OGRE_CHECK_GL_ERROR(mGLShaderHandle = glCreateShader(shaderType)); if(Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_DEBUG)) { glLabelObjectEXT(GL_SHADER_OBJECT_EXT, mGLShaderHandle, 0, mName.c_str()); } createGLProgramHandle(); } // Add preprocessor extras and main source if (!mSource.empty()) { const RenderSystemCapabilities* caps = Root::getSingleton().getRenderSystem()->getCapabilities(); // Fix up the source in case someone forgot to redeclare gl_Position if (caps->hasCapability(RSC_GLSL_SSO_REDECLARE) && mType == GPT_VERTEX_PROGRAM) { size_t versionPos = mSource.find("#version"); int shaderVersion = StringConverter::parseInt(mSource.substr(versionPos+9, 3)); size_t belowVersionPos = mSource.find('\n', versionPos) + 1; if(shaderVersion >= 300) { // Check that it's missing and that this shader has a main function, ie. not a child shader. if(mSource.find("out highp vec4 gl_Position") == String::npos) { mSource.insert(belowVersionPos, "out highp vec4 gl_Position;\nout highp float gl_PointSize;\n"); } if(mSource.find("#extension GL_EXT_separate_shader_objects : require") == String::npos) { mSource.insert(belowVersionPos, "#extension GL_EXT_separate_shader_objects : require\n"); } } } #if !OGRE_NO_GLES2_GLSL_OPTIMISER const char *source = (getOptimiserEnabled() && getIsOptimised()) ? mOptimisedSource.c_str() : mSource.c_str(); #else const char *source = mSource.c_str(); #endif OGRE_CHECK_GL_ERROR(glShaderSource(mGLShaderHandle, 1, &source, NULL)); } if (checkErrors) GLSLES::logObjectInfo("GLSL ES compiling: " + mName, mGLShaderHandle); OGRE_CHECK_GL_ERROR(glCompileShader(mGLShaderHandle)); // Check for compile errors OGRE_CHECK_GL_ERROR(glGetShaderiv(mGLShaderHandle, GL_COMPILE_STATUS, &mCompiled)); if(!mCompiled && checkErrors) { String message = GLSLES::logObjectInfo("GLSL ES compile log: " + mName, mGLShaderHandle); checkAndFixInvalidDefaultPrecisionError(message); } // Log a message that the shader compiled successfully. if (mCompiled && checkErrors) GLSLES::logObjectInfo("GLSL ES compiled: " + mName, mGLShaderHandle); return (mCompiled == 1); } #if !OGRE_NO_GLES2_GLSL_OPTIMISER //----------------------------------------------------------------------- void GLSLESProgram::setOptimiserEnabled(bool enabled) { if(mOptimiserEnabled != enabled && mOptimiserEnabled && mCompiled == 1) { OGRE_CHECK_GL_ERROR(glDeleteShader(mGLShaderHandle)); if(Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_SEPARATE_SHADER_OBJECTS)) { OGRE_CHECK_GL_ERROR(glDeleteProgram(mGLProgramHandle)); } mGLShaderHandle = 0; mGLProgramHandle = 0; mCompiled = 0; } mOptimiserEnabled = enabled; } #endif //----------------------------------------------------------------------- void GLSLESProgram::createLowLevelImpl(void) { } //----------------------------------------------------------------------- void GLSLESProgram::unloadHighLevelImpl(void) { if (isSupported()) { // LogManager::getSingleton().logMessage("Deleting shader " + StringConverter::toString(mGLShaderHandle) + // " and program " + StringConverter::toString(mGLProgramHandle)); OGRE_CHECK_GL_ERROR(glDeleteShader(mGLShaderHandle)); if(Root::getSingleton().getRenderSystem()->getCapabilities()->hasCapability(RSC_SEPARATE_SHADER_OBJECTS)) { OGRE_CHECK_GL_ERROR(glDeleteProgram(mGLProgramHandle)); } // destroy all programs using this shader GLSLESProgramManager::getSingletonPtr()->destroyAllByShader(this); mGLShaderHandle = 0; mGLProgramHandle = 0; mCompiled = 0; mLinked = 0; } } //----------------------------------------------------------------------- void GLSLESProgram::buildConstantDefinitions() const { // We need an accurate list of all the uniforms in the shader, but we // can't get at them until we link all the shaders into a program object. // Therefore instead, parse the source code manually and extract the uniforms createParameterMappingStructures(true); GLSLESProgramManager::getSingleton().extractUniformsFromGLSL(mSource, *mConstantDefs, mName); } //----------------------------------------------------------------------- #if !OGRE_NO_GLES2_GLSL_OPTIMISER String GLSLESProgram::CmdOptimisation::doGet(const void *target) const { return StringConverter::toString(static_cast<const GLSLESProgram*>(target)->getOptimiserEnabled()); } void GLSLESProgram::CmdOptimisation::doSet(void *target, const String& val) { static_cast<GLSLESProgram*>(target)->setOptimiserEnabled(StringConverter::parseBool(val)); } #endif //----------------------------------------------------------------------- void GLSLESProgram::attachToProgramObject( const GLuint programObject ) { // LogManager::getSingleton().logMessage("Attaching shader " + StringConverter::toString(mGLShaderHandle) + // " to program " + StringConverter::toString(programObject)); OGRE_CHECK_GL_ERROR(glAttachShader(programObject, mGLShaderHandle)); } //----------------------------------------------------------------------- void GLSLESProgram::detachFromProgramObject( const GLuint programObject ) { // LogManager::getSingleton().logMessage("Detaching shader " + StringConverter::toString(mGLShaderHandle) + // " to program " + StringConverter::toString(programObject)); OGRE_CHECK_GL_ERROR(glDetachShader(programObject, mGLShaderHandle)); } //----------------------------------------------------------------------- const String& GLSLESProgram::getLanguage(void) const { static const String language = "glsles"; return language; } //----------------------------------------------------------------------- Ogre::GpuProgramParametersSharedPtr GLSLESProgram::createParameters( void ) { GpuProgramParametersSharedPtr params = HighLevelGpuProgram::createParameters(); params->setTransposeMatrices(true); return params; } //----------------------------------------------------------------------- void GLSLESProgram::checkAndFixInvalidDefaultPrecisionError( String &message ) { String precisionQualifierErrorString = ": 'Default Precision Qualifier' : invalid type Type for default precision qualifier can be only float or int"; vector< String >::type linesOfSource = StringUtil::split(mSource, "\n"); if( message.find(precisionQualifierErrorString) != String::npos ) { LogManager::getSingleton().logMessage("Fixing invalid type Type for default precision qualifier by deleting bad lines the re-compiling"); // remove relevant lines from source vector< String >::type errors = StringUtil::split(message, "\n"); // going from the end so when we delete a line the numbers of the lines before will not change for(int i = static_cast<int>(errors.size()) - 1 ; i != -1 ; i--) { String & curError = errors[i]; size_t foundPos = curError.find(precisionQualifierErrorString); if(foundPos != String::npos) { String lineNumber = curError.substr(0, foundPos); size_t posOfStartOfNumber = lineNumber.find_last_of(':'); if (posOfStartOfNumber != String::npos) { lineNumber = lineNumber.substr(posOfStartOfNumber + 1, lineNumber.size() - (posOfStartOfNumber + 1)); if (StringConverter::isNumber(lineNumber)) { int iLineNumber = StringConverter::parseInt(lineNumber); linesOfSource.erase(linesOfSource.begin() + iLineNumber - 1); } } } } // rebuild source StringStream newSource; for(size_t i = 0; i < linesOfSource.size() ; i++) { newSource << linesOfSource[i] << "\n"; } mSource = newSource.str(); const char *source = mSource.c_str(); OGRE_CHECK_GL_ERROR(glShaderSource(mGLShaderHandle, 1, &source, NULL)); if (compile()) { LogManager::getSingleton().logMessage("The removing of the lines fixed the invalid type Type for default precision qualifier error."); } else { LogManager::getSingleton().logMessage("The removing of the lines didn't help."); } } } //----------------------------------------------------------------------------- void GLSLESProgram::bindProgram(void) { // Tell the Link Program Manager what shader is to become active switch (mType) { case GPT_VERTEX_PROGRAM: GLSLESProgramManager::getSingleton().setActiveVertexShader( this ); break; case GPT_FRAGMENT_PROGRAM: GLSLESProgramManager::getSingleton().setActiveFragmentShader( this ); break; case GPT_GEOMETRY_PROGRAM: default: break; } } //----------------------------------------------------------------------------- void GLSLESProgram::unbindProgram(void) { // Tell the Link Program Manager what shader is to become inactive if (mType == GPT_VERTEX_PROGRAM) { GLSLESProgramManager::getSingleton().setActiveVertexShader( NULL ); } else if (mType == GPT_FRAGMENT_PROGRAM) { GLSLESProgramManager::getSingleton().setActiveFragmentShader( NULL ); } } //----------------------------------------------------------------------------- void GLSLESProgram::bindProgramParameters(GpuProgramParametersSharedPtr params, uint16 mask) { // Link can throw exceptions, ignore them at this point try { // Activate the link program object GLSLESProgramCommon* linkProgram = GLSLESProgramManager::getSingleton().getActiveProgram(); // Pass on parameters from params to program object uniforms linkProgram->updateUniforms(params, mask, mType); } catch (Exception& e) {} } //----------------------------------------------------------------------------- void GLSLESProgram::bindProgramSharedParameters(GpuProgramParametersSharedPtr params, uint16 mask) { // Link can throw exceptions, ignore them at this point try { // Activate the link program object GLSLESProgramCommon* linkProgram = GLSLESProgramManager::getSingleton().getActiveProgram(); // Pass on parameters from params to program object uniforms linkProgram->updateUniformBlocks(params, mask, mType); } catch (Exception& e) {} } //----------------------------------------------------------------------------- void GLSLESProgram::bindProgramPassIterationParameters(GpuProgramParametersSharedPtr params) { // Activate the link program object GLSLESProgramCommon* linkProgram = GLSLESProgramManager::getSingleton().getActiveProgram(); // Pass on parameters from params to program object uniforms linkProgram->updatePassIterationUniforms( params ); } //----------------------------------------------------------------------------- size_t GLSLESProgram::calculateSize(void) const { size_t memSize = 0; // Delegate Names memSize += sizeof(GLuint); memSize += sizeof(GLenum); memSize += GpuProgram::calculateSize(); return memSize; } }
Java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package consolealiensgame; import alieninterfaces.*; import java.lang.reflect.Constructor; /** * * @author guberti */ public class AlienContainer { public final String alienPackageName; public final String alienClassName; public final Constructor<?> alienConstructor; private final Alien alien; private final AlienAPI api; int tech; int energy; boolean fought; public int x; public int y; public boolean action; // Whether the alien has performed an action this turn // Declare stats here // // Heads up: This constructs an AlienContainer and contained Alien // public AlienContainer(int x, int y, String alienPackageName, String alienClassName, Constructor<?> cns, int energy, int tech) { Alien a; this.alienPackageName = alienPackageName; this.alienClassName = alienClassName; this.alienConstructor = cns; this.energy = energy; this.tech = tech; this.api = new AlienAPI(this); // construct and initialize alien try { a = (Alien) cns.newInstance(); a.init(this.api); } catch (Throwable t) { a = null; t.printStackTrace(); } this.alien = a; } public void move(ViewImplementation view) throws NotEnoughTechException { // Whether the move goes off the board will be determined by the grid api.view = view; MoveDir direction = alien.getMove(); checkMove(direction); // Throws an exception if illegal x += direction.x(); y += direction.y(); } public void kill() { energy = Integer.MIN_VALUE; } public Action getAction(ViewImplementation view) throws NotEnoughEnergyException, UnknownActionException { api.view = view; Action action = alien.getAction(); switch (action.code) { case None: case Gain: return new Action (action.code); case Research: if (tech > energy) { // If the tech can't be researched due to lack of energy throw new NotEnoughEnergyException(); } // Otherwise return new Action (ActionCode.Research, tech); case Spawn: if (action.power + 3 > energy) { throw new NotEnoughEnergyException(); } return action; default: throw new UnknownActionException(); } } public int fight() throws NotEnoughEnergyException, NotEnoughTechException { int fightPower = 0; //alien.getFightPower(api); GM need to fix this up after reconciling fighting into Action // If the alien cannot fight with the amount of energy it wants // Throw the appropriate exception if (fightPower > energy) { throw new NotEnoughEnergyException(); } if (fightPower > tech) { throw new NotEnoughTechException(); } // If the move is valid, subtract the energy expended energy -= fightPower; // Return how much power the alien will fight with return fightPower; } private void checkMove(MoveDir direction) throws NotEnoughTechException { // If the move is farther than the alien has the tech to move if (Math.pow(direction.x(), 2) + Math.pow(direction.y(), 2) > Math.pow(tech, 2)) { throw new NotEnoughTechException(); } } } class NotEnoughEnergyException extends Exception {} class NotEnoughTechException extends Exception {} class UnknownActionException extends Exception {}
Java
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link href='https://fonts.googleapis.com/css?family=Roboto:400,300,100,700|Source Sans:400,300,100' rel='stylesheet' type='text/css'/> <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"/> <script src="dependencies/highstock.js" type="text/javascript" charset="utf-8"></script> <script src="dependencies/standalone-framework.js" type="text/javascript" charset="utf-8"></script> <script src="dependencies/highcharts-more.js" type="text/javascript" charset="utf-8"></script> <script src="dependencies/highcharts-3d.js" type="text/javascript" charset="utf-8"></script> <script src="dependencies/data.js" type="text/javascript" charset="utf-8"></script> <script src="dependencies/exporting.js"></script> <script src="dependencies/funnel.js"></script> <script src="dependencies/solid-gauge.js"></script> <link href="./highcharts-editor.min.css" type="text/css" rel="stylesheet"/> <script src="./highcharts-editor.min.js" type="text/javascript" charset="utf-8"></script> <script src="./plugins/data-csv.js" type="text/javascript" charset="utf-8"></script> <script src="./plugins/data-difi.js" type="text/javascript" charset="utf-8"></script> <script src="./plugins/data-gspreadsheets.js" type="text/javascript" charset="utf-8"></script> <script src="./plugins/data-socrata.js" type="text/javascript" charset="utf-8"></script> <style> html, body { margin: 0; padding: 0; width:100%; height:100%; } </style> </head> <body id="main"></body> <script> highed.ready(function () { highed.Editor('main', {}); }); window.onbeforeunload = function(e) { var electron = require('electron'); var remote = require('remote'); var dialog = remote.require('dialog'); var choice = dialog.showMessageBox( remote.getCurrentWindow(), { type: 'question', buttons: ['Yes', 'No'], title: 'Confirm', message: 'Are you sure you want to quit?' }); return choice === 0; }; </script> </html>
Java
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Example = mongoose.model('Example'), _ = require('lodash'), upload = require('./upload'); /** * Find example by id */ exports.example = function(req, res, next, id) { Example.load(id, function(err, example) { if (err) return next(err); if (!example) return next(new Error('Failed to load example ' + id)); req.example = example; next(); }); }; /** * Create a example */ exports.create = function(req, res) { var example = new Example(req.body); example.user = req.user; example.save(function(err) { if (err) { return res.send('/login', { errors: err.errors, example: example }); } else { res.jsonp(example); } }); }; /** * Update a example */ exports.update = function(req, res) { var example = req.example; example = _.extend(example, req.body); example.save(function(err) { if (err) { console.log("Error -" + err); return res.send('/login', { errors: err, example: example }); } else { console.log("Example Saved - " + example); res.jsonp(example); } }); }; /** * Delete an example */ exports.destroy = function(req, res) { var example = req.example; example.remove(function(err) { if (err) { return res.send('/login', { errors: err.errors, example: example }); } else { res.jsonp(example); } }); }; /** * Show an example */ exports.show = function(req, res) { res.jsonp(req.example); }; /** * List of Examples */ exports.all = function(req, res) { Example.find().sort('-created').populate('user', 'name username').exec(function(err, examples) { if (err) { res.render('error', { status: 500 }); } else { res.jsonp(examples); } }); };
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>cantor: 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.2~camlp4 / cantor - 8.8.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> cantor <small> 8.8.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-24 13:47:43 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-24 13:47:43 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 camlp4 4.05+1 Camlp4 is a system for writing extensible parsers for programming languages conf-findutils 1 Virtual package relying on findutils coq 8.5.2~camlp4 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 ocamlbuild 0.14.0 OCamlbuild is a build system with builtin rules to easily build most OCaml projects. # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/cantor&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/Cantor&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} ] tags: [ &quot;keyword: ordinal numbers&quot; &quot;keyword: well-foundedness&quot; &quot;keyword: termination&quot; &quot;keyword: rpo&quot; &quot;keyword: Goodstein sequences&quot; &quot;category: Mathematics/Logic&quot; &quot;category: Mathematics/Arithmetic and Number Theory/Number theory&quot; &quot;date: 2006-05-22&quot; ] authors: [ &quot;Pierre Castéran &lt;pierre.casteran@labri.fr&gt; [http://www.labri.fr/~casteran/]&quot; &quot;Évelyne Contejean &lt;contejea@lri.fr&gt; [http://www.lri.fr/~contejea]&quot; ] bug-reports: &quot;https://github.com/coq-contribs/cantor/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/cantor.git&quot; synopsis: &quot;On Ordinal Notations&quot; description: &quot;&quot;&quot; This contribution contains data structures for ordinals less than Gamma0 under Cantor and Veblen normal forms. Well-foundedness is established thanks to RPO with status for generic terms. This contribution also includes termination proofs of Hydra battles and Goodstein sequences as well as a computation of the length of the Goodstein sequence starting from 4 in base 2. This work is supported by INRIA-Futurs (Logical project-team), CNRS and the French ANR via the A3PAT project (http://www3.iie.cnam.fr/~urbain/a3pat/).&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/cantor/archive/v8.8.0.tar.gz&quot; checksum: &quot;md5=608c1cf50146fa0f705222f3c6bd239e&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-cantor.8.8.0 coq.8.5.2~camlp4</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.2~camlp4). The following dependencies couldn&#39;t be met: - coq-cantor -&gt; coq &gt;= 8.8 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-cantor.8.8.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
class ApplicationMailer < ActionMailer::Base helper Common::PageHelper end
Java
import { fireShuffleTasks } from 'src/model/ModelBase'; import { REFERENCE } from 'config/types'; import { rebindMatch } from 'shared/rebind'; import { isArray, isString } from 'utils/is'; import { escapeKey } from 'shared/keypaths'; import ExpressionProxy from './ExpressionProxy'; import resolveReference from './resolveReference'; import resolve from './resolve'; import LinkModel, { Missing } from 'src/model/LinkModel'; export default class ReferenceExpressionProxy extends LinkModel { constructor(fragment, template) { super(null, null, null, '@undefined'); this.root = fragment.ractive.viewmodel; this.template = template; this.rootLink = true; this.template = template; this.fragment = fragment; this.rebound(); } getKeypath() { return this.model ? this.model.getKeypath() : '@undefined'; } rebound() { const fragment = this.fragment; const template = this.template; let base = (this.base = resolve(fragment, template)); let idx; if (this.proxy) { teardown(this); } const proxy = (this.proxy = { rebind: (next, previous) => { if (previous === base) { next = rebindMatch(template, next, previous); if (next !== base) { this.base = base = next; } } else if (~(idx = members.indexOf(previous))) { next = rebindMatch(template.m[idx].n, next, previous); if (next !== members[idx]) { members.splice(idx, 1, next || Missing); } } if (next !== previous) { previous.unregister(proxy); if (next) next.addShuffleTask(() => next.register(proxy)); } }, handleChange: () => { pathChanged(); } }); base.register(proxy); const members = (this.members = template.m.map(tpl => { if (isString(tpl)) { return { get: () => tpl }; } let model; if (tpl.t === REFERENCE) { model = resolveReference(fragment, tpl.n); model.register(proxy); return model; } model = new ExpressionProxy(fragment, tpl); model.register(proxy); return model; })); const pathChanged = () => { const model = base && base.joinAll( members.reduce((list, m) => { const k = m.get(); if (isArray(k)) return list.concat(k); else list.push(escapeKey(String(k))); return list; }, []) ); if (model !== this.model) { this.model = model; this.relinking(model); fireShuffleTasks(); refreshPathDeps(this); this.fragment.shuffled(); } }; pathChanged(); } teardown() { teardown(this); super.teardown(); } unreference() { super.unreference(); if (!this.deps.length && !this.refs) this.teardown(); } unregister(dep) { super.unregister(dep); if (!this.deps.length && !this.refs) this.teardown(); } } function teardown(proxy) { if (proxy.base) proxy.base.unregister(proxy.proxy); if (proxy.models) { proxy.models.forEach(m => { if (m.unregister) m.unregister(proxy); }); } } function refreshPathDeps(proxy) { let len = proxy.deps.length; let i, v; for (i = 0; i < len; i++) { v = proxy.deps[i]; if (v.pathChanged) v.pathChanged(); if (v.fragment && v.fragment.pathModel) v.fragment.pathModel.applyValue(proxy.getKeypath()); } len = proxy.children.length; for (i = 0; i < len; i++) { refreshPathDeps(proxy.children[i]); } } const eproto = ExpressionProxy.prototype; const proto = ReferenceExpressionProxy.prototype; proto.unreference = eproto.unreference; proto.unregister = eproto.unregister; proto.unregisterLink = eproto.unregisterLink;
Java
'use strict'; const config = require('config'); const esdoc = require('gulp-esdoc'); const gulp = require('gulp'); module.exports = function documentationBuilder() { return gulp.src('./src') .pipe(esdoc({ destination: config.get('build.documentation.outputPath'), unexportIdentifier: config.get('build.documentation.unexportedIdentifiers'), undocumentIdentifier: config.get('build.documentation.undocumentedIdentifiers'), test: { type: config.get('build.documentation.testType'), source: config.get('build.documentation.testRoot'), }, })); };
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>ceres: 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.7.0 / ceres - 0.3.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> ceres <small> 0.3.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-12-26 20:28:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-12-26 20:28:19 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.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;Li-yao Xia &lt;lysxia@gmail.com&gt;&quot; authors: &quot;Li-yao Xia&quot; homepage: &quot;https://github.com/Lysxia/coq-ceres&quot; bug-reports: &quot;https://github.com/Lysxia/coq-ceres/issues&quot; license: &quot;MIT&quot; dev-repo: &quot;git+https://github.com/Lysxia/coq-ceres.git&quot; build: [make &quot;build&quot;] run-test: [make &quot;test&quot;] install: [make &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.8.2&quot; &amp; &lt; &quot;8.13~&quot;} ] tags: [ &quot;date:2020-09-28&quot; &quot;logpath:Ceres&quot; &quot;keyword:serialization&quot; ] synopsis: &quot;Library for serialization to S-expressions&quot; url { src: &quot;https://github.com/Lysxia/coq-ceres/archive/0.3.0.tar.gz&quot; checksum: &quot;sha512=2de406c1df6c37cf1a99bed741bf8d266ede024e862b828abe426acc2559816091dbc5630a7de4655c48993354d3db87569aefa90d136054a476d1c82fb44134&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-ceres.0.3.0 coq.8.7.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.7.0). The following dependencies couldn&#39;t be met: - coq-ceres -&gt; coq &gt;= 8.8.2 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-ceres.0.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>ltl: 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.7.2 / ltl - 8.10.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> ltl <small> 8.10.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-02-10 19:42:23 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-10 19:42:23 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.7.2 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.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/ltl&quot; license: &quot;Unknown&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/LTL&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.11~&quot;} ] tags: [ &quot;keyword: temporal logic&quot; &quot;keyword: infinite transition systems&quot; &quot;keyword: co-induction&quot; &quot;category: Mathematics/Logic/Modal logic&quot; &quot;date: 2002-07&quot; ] authors: [ &quot;Solange Coupet-Grimal&quot; ] bug-reports: &quot;https://github.com/coq-contribs/ltl/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/ltl.git&quot; synopsis: &quot;Linear Temporal Logic&quot; description: &quot;&quot;&quot; This contribution contains a shallow embedding of Linear Temporal Logic (LTL) based on a co-inductive representation of program executions. Temporal operators are implemented as inductive (respectively co-inductive) types when they are least (respectively greatest) fixpoints. Several general lemmas, that correspond to LTL rules, are proved.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/ltl/archive/v8.10.0.tar.gz&quot; checksum: &quot;md5=8a4b130957215e97768d37fb747f2c18&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-ltl.8.10.0 coq.8.7.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.7.2). The following dependencies couldn&#39;t be met: - coq-ltl -&gt; coq &gt;= 8.10 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-ltl.8.10.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
--- layout: single title: Thanks comments: false share: false permalink: /thanks/ --- I’m truly grateful to all the wonderful humans and companies supporting my open source work on [GitHub Sponsors](https://github.com/sponsors/chrismacnaughton). ## 🦄 Sponsor <p class="small">$1000/month</p> ## Silver Sponsor <p class="small">$200/month</p> ## Sponsor <p class="small">$100/month</p> ### Top Supporter <p class="small">$50/month</p> ### Supporter <p class="small">$10/month</p>
Java
package model.question; import model.enums.QuestionTypes; public class ImageQuestion implements QuestionIF { private String imagePath; private char[] answer; private QuestionTypes type; public ImageQuestion(String imagePath, char[] answer, QuestionTypes type){ this.setType(type); this.setImagePath(imagePath); this.setAnswer(answer); } private void setType(QuestionTypes type) { // TODO Auto-generated method stub this.type = type; } private void setAnswer(char[] answer) { // TODO Auto-generated method stub this.answer = answer; } private void setImagePath(String imagePath) { // TODO Auto-generated method stub this.imagePath = imagePath; } // ************************************************************************ // get question from file // ************************************************************************ @Override public String getQuestion() { // TODO Auto-generated method stub return imagePath; } // ************************************************************************ // get the answer read from file // ************************************************************************ @Override public char[] getAnswer() { // TODO Auto-generated method stub return answer; } @Override public QuestionTypes getType() { // TODO Auto-generated method stub return type; } }
Java
**Houdini** allows easy hotswapping of Python code. The snippet is currently at ALPHA stage, but should soon be top notch. ### Basic usage example Create the files **swapped.py**: ```python from houdini import hotswap @hotswap def foo(): return '0x0' ``` and **client.py**: ```python import time import swapped while True: print swapped.foo() time.sleep(1) ``` Then, launch `client.py` and edit `swapped.py`. ### Limitations Currently only top-level functions and methods in top-level classes are supported.
Java
// Copyright 2015, Google Inc. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Package queryservice contains the interface for the service definition // of the Query Service. package queryservice import ( "io" "golang.org/x/net/context" "github.com/youtube/vitess/go/sqltypes" "github.com/youtube/vitess/go/vt/tabletserver/querytypes" querypb "github.com/youtube/vitess/go/vt/proto/query" ) // QueryService is the interface implemented by the tablet's query service. // All streaming methods accept a callback function that will be called for // each response. If the callback returns an error, that error is returned // back by the function, except in the case of io.EOF in which case the stream // will be terminated with no error. Streams can also be terminated by canceling // the context. // This API is common for both server and client implementations. All functions // must be safe to be called concurrently. type QueryService interface { // Transaction management // Begin returns the transaction id to use for further operations Begin(ctx context.Context, target *querypb.Target) (int64, error) // Commit commits the current transaction Commit(ctx context.Context, target *querypb.Target, transactionID int64) error // Rollback aborts the current transaction Rollback(ctx context.Context, target *querypb.Target, transactionID int64) error // Prepare prepares the specified transaction. Prepare(ctx context.Context, target *querypb.Target, transactionID int64, dtid string) (err error) // CommitPrepared commits the prepared transaction. CommitPrepared(ctx context.Context, target *querypb.Target, dtid string) (err error) // RollbackPrepared rolls back the prepared transaction. RollbackPrepared(ctx context.Context, target *querypb.Target, dtid string, originalID int64) (err error) // CreateTransaction creates the metadata for a 2PC transaction. CreateTransaction(ctx context.Context, target *querypb.Target, dtid string, participants []*querypb.Target) (err error) // StartCommit atomically commits the transaction along with the // decision to commit the associated 2pc transaction. StartCommit(ctx context.Context, target *querypb.Target, transactionID int64, dtid string) (err error) // SetRollback transitions the 2pc transaction to the Rollback state. // If a transaction id is provided, that transaction is also rolled back. SetRollback(ctx context.Context, target *querypb.Target, dtid string, transactionID int64) (err error) // ConcludeTransaction deletes the 2pc transaction metadata // essentially resolving it. ConcludeTransaction(ctx context.Context, target *querypb.Target, dtid string) (err error) // ReadTransaction returns the metadata for the sepcified dtid. ReadTransaction(ctx context.Context, target *querypb.Target, dtid string) (metadata *querypb.TransactionMetadata, err error) // Query execution Execute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]interface{}, transactionID int64, options *querypb.ExecuteOptions) (*sqltypes.Result, error) StreamExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]interface{}, options *querypb.ExecuteOptions, callback func(*sqltypes.Result) error) error ExecuteBatch(ctx context.Context, target *querypb.Target, queries []querytypes.BoundQuery, asTransaction bool, transactionID int64, options *querypb.ExecuteOptions) ([]sqltypes.Result, error) // Combo methods, they also return the transactionID from the // Begin part. If err != nil, the transactionID may still be // non-zero, and needs to be propagated back (like for a DB // Integrity Error) BeginExecute(ctx context.Context, target *querypb.Target, sql string, bindVariables map[string]interface{}, options *querypb.ExecuteOptions) (*sqltypes.Result, int64, error) BeginExecuteBatch(ctx context.Context, target *querypb.Target, queries []querytypes.BoundQuery, asTransaction bool, options *querypb.ExecuteOptions) ([]sqltypes.Result, int64, error) // Messaging methods. MessageStream(ctx context.Context, target *querypb.Target, name string, callback func(*sqltypes.Result) error) error MessageAck(ctx context.Context, target *querypb.Target, name string, ids []*querypb.Value) (count int64, err error) // SplitQuery is a MapReduce helper function // This version of SplitQuery supports multiple algorithms and multiple split columns. // See the documentation of SplitQueryRequest in 'proto/vtgate.proto' for more information. SplitQuery(ctx context.Context, target *querypb.Target, query querytypes.BoundQuery, splitColumns []string, splitCount int64, numRowsPerQueryPart int64, algorithm querypb.SplitQueryRequest_Algorithm) ([]querytypes.QuerySplit, error) // UpdateStream streams updates from the provided position or timestamp. UpdateStream(ctx context.Context, target *querypb.Target, position string, timestamp int64, callback func(*querypb.StreamEvent) error) error // StreamHealth streams health status. StreamHealth(ctx context.Context, callback func(*querypb.StreamHealthResponse) error) error // HandlePanic will be called if any of the functions panic. HandlePanic(err *error) // Close must be called for releasing resources. Close(ctx context.Context) error } type resultStreamer struct { done chan struct{} ch chan *sqltypes.Result err error } func (rs *resultStreamer) Recv() (*sqltypes.Result, error) { select { case <-rs.done: return nil, rs.err case qr := <-rs.ch: return qr, nil } } // ExecuteWithStreamer performs a StreamExecute, but returns a *sqltypes.ResultStream to iterate on. // This function should only be used for legacy code. New usage should directly use StreamExecute. func ExecuteWithStreamer(ctx context.Context, conn QueryService, target *querypb.Target, sql string, bindVariables map[string]interface{}, options *querypb.ExecuteOptions) sqltypes.ResultStream { rs := &resultStreamer{ done: make(chan struct{}), ch: make(chan *sqltypes.Result), } go func() { defer close(rs.done) rs.err = conn.StreamExecute(ctx, target, sql, bindVariables, options, func(qr *sqltypes.Result) error { select { case <-ctx.Done(): return io.EOF case rs.ch <- qr: } return nil }) if rs.err == nil { rs.err = io.EOF } }() return rs }
Java
import os from typing import List, Tuple from raiden.network.blockchain_service import BlockChainService from raiden.network.pathfinding import get_random_service from raiden.network.proxies.service_registry import ServiceRegistry from raiden.network.rpc.client import JSONRPCClient from raiden.network.rpc.smartcontract_proxy import ContractProxy from raiden.utils import typing from raiden.utils.smart_contracts import deploy_contract_web3 from raiden.utils.solc import compile_files_cwd from raiden_contracts.constants import CONTRACT_HUMAN_STANDARD_TOKEN from raiden_contracts.contract_manager import ContractManager def deploy_token( deploy_client: JSONRPCClient, contract_manager: ContractManager, initial_amount: typing.TokenAmount, decimals: int, token_name: str, token_symbol: str, ) -> ContractProxy: token_address = deploy_contract_web3( contract_name=CONTRACT_HUMAN_STANDARD_TOKEN, deploy_client=deploy_client, contract_manager=contract_manager, constructor_arguments=(initial_amount, decimals, token_name, token_symbol), ) contract_abi = contract_manager.get_contract_abi(CONTRACT_HUMAN_STANDARD_TOKEN) return deploy_client.new_contract_proxy( contract_interface=contract_abi, contract_address=token_address ) def deploy_tokens_and_fund_accounts( token_amount: int, number_of_tokens: int, deploy_service: BlockChainService, participants: typing.List[typing.Address], contract_manager: ContractManager, ) -> typing.List[typing.TokenAddress]: """ Deploy `number_of_tokens` ERC20 token instances with `token_amount` minted and distributed among `blockchain_services`. Optionally the instances will be registered with the raiden registry. Args: token_amount (int): number of units that will be created per token number_of_tokens (int): number of token instances that will be created deploy_service (BlockChainService): the blockchain connection that will deploy participants (list(address)): participant addresses that will receive tokens """ result = list() for _ in range(number_of_tokens): token_address = deploy_contract_web3( CONTRACT_HUMAN_STANDARD_TOKEN, deploy_service.client, contract_manager=contract_manager, constructor_arguments=(token_amount, 2, "raiden", "Rd"), ) result.append(token_address) # only the creator of the token starts with a balance (deploy_service), # transfer from the creator to the other nodes for transfer_to in participants: deploy_service.token(token_address).transfer( to_address=transfer_to, amount=token_amount // len(participants) ) return result def deploy_service_registry_and_set_urls( private_keys, web3, contract_manager, service_registry_address ) -> Tuple[ServiceRegistry, List[str]]: urls = ["http://foo", "http://boo", "http://coo"] c1_client = JSONRPCClient(web3, private_keys[0]) c1_service_proxy = ServiceRegistry( jsonrpc_client=c1_client, service_registry_address=service_registry_address, contract_manager=contract_manager, ) c2_client = JSONRPCClient(web3, private_keys[1]) c2_service_proxy = ServiceRegistry( jsonrpc_client=c2_client, service_registry_address=service_registry_address, contract_manager=contract_manager, ) c3_client = JSONRPCClient(web3, private_keys[2]) c3_service_proxy = ServiceRegistry( jsonrpc_client=c3_client, service_registry_address=service_registry_address, contract_manager=contract_manager, ) # Test that getting a random service for an empty registry returns None pfs_address = get_random_service(c1_service_proxy, "latest") assert pfs_address is None # Test that setting the urls works c1_service_proxy.set_url(urls[0]) c2_service_proxy.set_url(urls[1]) c3_service_proxy.set_url(urls[2]) return c1_service_proxy, urls def get_test_contract(name): contract_path = os.path.abspath( os.path.join(os.path.dirname(__file__), "..", "smart_contracts", name) ) contracts = compile_files_cwd([contract_path]) return contract_path, contracts def deploy_rpc_test_contract(deploy_client, name): contract_path, contracts = get_test_contract(f"{name}.sol") contract_proxy, _ = deploy_client.deploy_solidity_contract( name, contracts, libraries=dict(), constructor_parameters=None, contract_path=contract_path ) return contract_proxy def get_list_of_block_numbers(item): """ Creates a list of block numbers of the given list/single event""" if isinstance(item, list): return [element["blockNumber"] for element in item] if isinstance(item, dict): block_number = item["blockNumber"] return [block_number] return list()
Java
<md-tab-group> <md-tab label="Example"> <div class="page-content"> <div fxLayout="row" fxLayout.xs="column" fxLayout.sm="column" fxFlex> <md-card fxFlex class="page-card"> <md-card-title>Menu</md-card-title> <md-card-subtitle>Default material menu</md-card-subtitle> <md-card-content> <md-card class="example-md-menu"> <div class="example-menu-title"> <p>Basic menu</p> </div> <div class="example-menu-content"> <button md-button [mdMenuTriggerFor]="basic">Menu</button> <md-menu #basic="mdMenu"> <button md-menu-item>Item 1</button> <button md-menu-item>Item 2</button> <button md-menu-item>Item 3</button> </md-menu> </div> </md-card> </md-card-content> </md-card> </div> <div fxLayout="row" fxLayout.xs="column" fxLayout.sm="column" fxFlex> <md-card fxFlex class="page-card"> <md-card-content> <md-card class="example-md-menu"> <div class="example-menu-title"> <p>Food</p> <md-menu #food="mdMenu"> <button md-menu-item> Pizza </button> <button md-menu-item> Steak </button> </md-menu> <button md-icon-button [mdMenuTriggerFor]="food" class="example-md-button"> <md-icon>more_vert</md-icon> </button> </div> <div class="example-menu-content"> <p>This is a Menu</p> </div> </md-card> <br> </md-card-content> </md-card> </div> <div fxLayout="row" fxLayout.xs="column" fxLayout.sm="column" fxFlex> <md-card fxFlex class="page-card"> <md-card-content> <md-card class="example-md-menu"> <div class="example-menu-title"> <p>Home</p> <button md-icon-button [mdMenuTriggerFor]="menu" class="example-md-button"> <md-icon>more_vert</md-icon> </button> <md-menu #menu="mdMenu"> <button md-menu-item> <md-icon>home</md-icon> <span>Home</span> </button> <button md-menu-item> <md-icon>refresh</md-icon> <span>Refresh</span> </button> <button md-menu-item> <md-icon>feedback</md-icon> <span>Feedback</span> </button> </md-menu> </div> <div class="example-menu-content"> <p> This is a Menu </p> </div> </md-card> </md-card-content> </md-card> </div> </div> </md-tab> <md-tab label="Overview"> <div class="page-content"> <md-card class="page-card"> <md-card-title><code>MdMenuModule</code> <a class="badge" href="https://material.angular.io/components/component/menu">Official Documentation </a> </md-card-title> <md-card-content> <div class="docs-guide-content"> <p> <code>&lt;md-menu&gt;</code> is a floating panel containing list of options. </p> <p> By itself, the <code>&lt;md-menu&gt;</code> element does not render anything. The menu is attached to and opened via application of the mdMenuTriggerFor directive: </p> <pre> <code>&lt;md-menu &#35;appMenu="mdMenu"&gt;</code> <code>&lt;button md-menu-item&gt;</code> Settings <code>&lt;/button&gt;</code> <code>&lt;button md-menu-item&gt;</code> Help <code>&lt;/button&gt;</code> <code>&lt;/md-menu&gt;</code> <code>&lt;button md-icon-button &#91;mdMenuTriggerFor&#93;="appMenu"&gt;</code> <code>&lt;md-icon&gt;</code>more_vert<code>&lt;/md-icon&gt;</code> <code>&lt;/button&gt;</code> </pre> <h3>Toggling the menu programmatically</h3> <p> The menu exposes an API to open/close programmatically. Please note that in this case, an mdMenuTriggerFor directive is still necessary to attach the menu to a trigger element in the DOM. </p> <pre> <code> class MyComponent &#123; @ViewChild(MdMenuTrigger) trigger: MdMenuTrigger; someMethod() &#123; this.trigger.openMenu(); &#125; &#125; </code> </pre> <h3>Icons</h3> <p> Menus support displaying md-icon elements before the menu item text. </p> <p>my-comp.html</p> <pre> <code>&lt;md-menu #menu="mdMenu"&gt;</code> <code>&lt;button md-menu-item&gt;</code> <code>&lt;md-icon&gt;</code> dialpad <code>&lt;/md-icon&gt;</code> <code>&lt;span&gt;</code> Redial <code>&lt;/span&gt;</code> <code>&lt;/button&gt;</code> <code>&lt;button md-menu-item disabled&gt;</code> <code>&lt;md-icon&gt;</code> voicemail <code>&lt;/md-icon&gt;</code> <code>&lt;span&gt;</code> Check voicemail <code>&lt;/span&gt;</code> <code>&lt;/button&gt;</code> <code>&lt;button md-menu-item&gt;</code> <code>&lt;md-icon&gt;</code> notifications_off <code>&lt;/md-icon&gt;</code> <code>&lt;span&gt;</code> Disable alerts <code>&lt;/span&gt;</code> <code>&lt;/button&gt;</code> <code>&lt;/md-menu&gt;</code> </pre> <h3>Customizing menu position</h3> <p> By default, the menu will display after and below its trigger. The position can be changed using the x-position (before | after) and y-position (above | below) attributes. </p> <h3>Keyboard interaction</h3> <ul> <li><kbd>DOWN_ARROW</kbd>: Focuses the next menu item</li> <li><kbd>UP_ARROW</kbd>: Focuses previous menu item</li> <li><kbd>ENTER</kbd>: Activates the focused menu item</li> </ul> </div> </md-card-content> </md-card> </div> </md-tab> <md-tab label="API Reference"> <div class="page-content"> <md-card class="page-card"> <md-card-title><code>MdMenuModule</code></md-card-title> <md-card-content> <div class="docs-guide-content"> <h2>Directives</h2> <h3 class="docs-api-h3 docs-api-class-name">MdChipList</h3> <p class="docs-api-class-description">A material design chips component (named ChipList for it&#39;s similarity to the List component). Example: &lt;md-chip-list&gt; &lt;md-chip&gt;Chip 1&lt;md-chip&gt; &lt;md-chip&gt;Chip 2&lt;md-chip&gt; &lt;/md-chip-list&gt; </p> <h4 class="docs-api-h4 docs-api-method-header">Properties</h4> <table class="docs-api-properties-table"> <tr class="docs-api-properties-header-row"> <th class="docs-api-properties-th">Name</th> <th class="docs-api-properties-th">Description</th> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"><p class="docs-api-property-name"> chips </p> </td> <td class="docs-api-property-description">The chip components contained within this chip list. </td> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"> <div class="docs-api-input-marker"> @Input() </div> <p class="docs-api-property-name"> selectable </p> </td> <td class="docs-api-property-description">Whether or not this chip is selectable. When a chip is not selectable, it&#39;s selected state is always ignored. </td> </tr> </table> <h4 class="docs-api-h4 docs-api-method-header">Methods</h4> <table class="docs-api-method-table"> <thead> <tr class="docs-api-method-name-row"> <th colspan="2" class="docs-api-method-name-cell">focus</th> </tr> </thead> <tr class="docs-api-method-description-row"> <td colspan="2" class="docs-api-method-description-cell">Programmatically focus the chip list. This in turn focuses the first non-disabled chip in this chip list. </td> </tr> </table> <h3 class="docs-api-h3 docs-api-class-name">MdChip</h3> <p class="docs-api-class-description">Material design styled Chip component. Used inside the MdChipList component. </p> <h4 class="docs-api-h4 docs-api-method-header">Properties</h4> <table class="docs-api-properties-table"> <tr class="docs-api-properties-header-row"> <th class="docs-api-properties-th">Name</th> <th class="docs-api-properties-th">Description</th> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"><p class="docs-api-property-name"> onFocus </p> </td> <td class="docs-api-property-description">Emitted when the chip is focused. </td> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"> <div class="docs-api-output-marker"> @Output() </div> <p class="docs-api-property-name"> select </p> </td> <td class="docs-api-property-description">Emitted when the chip is selected. </td> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"> <div class="docs-api-output-marker"> @Output() </div> <p class="docs-api-property-name"> deselect </p> </td> <td class="docs-api-property-description">Emitted when the chip is deselected. </td> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"> <div class="docs-api-output-marker"> @Output() </div> <p class="docs-api-property-name"> destroy </p> </td> <td class="docs-api-property-description">Emitted when the chip is destroyed. </td> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"> <div class="docs-api-input-marker"> @Input() </div> <p class="docs-api-property-name"> disabled </p> </td> <td class="docs-api-property-description">Whether or not the chip is disabled. </td> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"> <div class="docs-api-input-marker"> @Input() </div> <p class="docs-api-property-name"> selected </p> </td> <td class="docs-api-property-description">Whether or not this chip is selected. </td> </tr> <tr class="docs-api-properties-row"> <td class="docs-api-properties-name-cell"> <div class="docs-api-input-marker"> @Input() </div> <p class="docs-api-property-name"> color </p> </td> <td class="docs-api-property-description">The color of the chip. Can be `primary`, `accent`, or `warn`. </td> </tr> </table> <h4 class="docs-api-h4 docs-api-method-header">Methods</h4> <table class="docs-api-method-table"> <thead> <tr class="docs-api-method-name-row"> <th colspan="2" class="docs-api-method-name-cell">toggleSelected</th> </tr> </thead> <tr class="docs-api-method-description-row"> <td colspan="2" class="docs-api-method-description-cell">Toggles the current selected state of this chip. </td> </tr> <tr class="docs-api-method-returns-header-row"> <th colspan="2" class="docs-api-method-returns-header-cell">Returns</th> </tr> <tr> <td class="docs-api-method-returns-type-cell"> <code class="docs-api-method-returns-type">boolean</code> </td> <td class="docs-api-method-returns-description-cell"> <p class="docs-api-method-returns-description">Whether the chip is selected. </p> </td> </tr> </table> <table class="docs-api-method-table"> <thead> <tr class="docs-api-method-name-row"> <th colspan="2" class="docs-api-method-name-cell">focus</th> </tr> </thead> <tr class="docs-api-method-description-row"> <td colspan="2" class="docs-api-method-description-cell">Allows for programmatic focusing of the chip. </td> </tr> </table> </div> </md-card-content> </md-card> </div> </md-tab> </md-tab-group>
Java
// // SettingVCPopAnimator.h // BlackNoise // // Created by 李金 on 2016/11/24. // Copyright © 2016年 kingandyoga. All rights reserved. // #import <Foundation/Foundation.h> @interface SettingVCPopAnimator : NSObject<UIViewControllerAnimatedTransitioning> @end
Java
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> .country { fill: lightgray; stroke: darkgrey; stroke-width: 1px; } .country:hover { fill: darkgrey; } div.tooltipDestination { position: absolute; text-align: center; width: 60px; height: 16px; padding: 2px; font: 12px sans-serif; background: red; border: 0px; border-radius: 0px; pointer-events: none; padding-top: 5px; } div.tooltipOrigin { position: absolute; text-align: center; width: 60px; height: 16px; padding: 2px; font: 12px sans-serif; background: green; border: 0px; border-radius: 0px; pointer-events: none; padding-top: 5px; } </style> </head> <body> <div id="map"></div> <script src="http://d3js.org/d3.v4.min.js"></script> <script src="http://d3js.org/topojson.v1.min.js"></script> <script> var originGeo = [16.8286, 52.4200]; var originName = 'POZ'; var destinations = [ {'coord': [20.9679, 52.1672], 'name': 'WAW'}, {'coord': [23.9569, 49.8134], 'name': 'LWO'}, {'coord': [30.4433, 50.4120], 'name': 'IEV'}, {'coord': [13.3724, 55.5355], 'name': 'MMX'}, {'coord': [12.6508, 55.6180], 'name': 'CPH'}, {'coord': [16.9154, 58.7890], 'name': 'NYO'}, {'coord': [10.2569, 59.1824], 'name': 'TRF'}, {'coord': [9.1526, 55.7408], 'name': 'BLL'}, {'coord': [8.5622, 50.0379], 'name': 'FRA'}, {'coord': [11.7750, 48.3537], 'name': 'MUC'}, {'coord': [5.3921, 51.4584], 'name': 'EIN'}, {'coord': [2.1115, 49.4545], 'name': 'BVA'}, {'coord': [-2.7135, 51.3836], 'name': 'BRS'}, {'coord': [0.3717, 51.8763], 'name': 'LTN'}, {'coord': [0.2389, 51.8860], 'name': 'STN'}, {'coord': [-1.743507, 52.4524], 'name': 'BHX'}, {'coord': [-2.8544, 53.3375], 'name': 'LPL'}, {'coord': [-3.3615, 55.9508], 'name': 'EDI'}, {'coord': [-1.010464, 53.480662], 'name': 'DSA'}, {'coord': [-6.2499, 53.4264], 'name': 'DUB'}, {'coord': [-0.560056, 38.285483], 'name': 'ALC'}, {'coord': [0.065603, 40.207479], 'name': 'CDT'}, {'coord': [-3.56795, 40.4839361], 'name': 'MAD'}, {'coord': [2.071062, 41.288288], 'name': 'BCN'}, {'coord': [2.766066, 41.898201], 'name': 'GRO'}, {'coord': [14.483279, 35.854114], 'name': 'MLA'}, {'coord': [23.9484, 37.9356467], 'name': 'ATH'}, {'coord': [19.914486, 39.607645], 'name': 'CFU'}, {'coord': [34.9362, 29.9511], 'name': 'VDA'}, {'coord': [34.8854, 32.0055], 'name': 'TLV'} ]; var svg; var projection; var speed = 2800;//km/sec var tooltip = d3.select('#map').append('div') .attr('class', 'tooltipDestination') .style('opacity', 0); function getArc(d, s) { var dx = d.destination.x - d.origin.x; var dy = d.destination.y - d.origin.y; var dr = Math.sqrt(dx * dx + dy * dy); var spath = s == false ? ' 0 0,0 ' : ' 0 0,1 '; return 'M' + d.origin.x + ',' + d.origin.y + 'A' + dr + ',' + dr + spath + d.destination.x + ',' + d.destination.y; } function calculateDistance(lat1, lon1, lat2, lon2) { var p = 0.017453292519943295; var c = Math.cos; var a = 0.5 - c((lat2 - lat1) * p)/2 + c(lat1 * p) * c(lat2 * p) * (1 - c((lon2 - lon1) * p))/2; return 12742 * Math.asin(Math.sqrt(a)); } function calculateDuration(distance) { return (distance / this.speed) * 1000; } function drawConnection(index) { var destination = this.destinations[index]; var originPos = projection(this.originGeo); var destinationPos = projection(destination.coord); var connection = [ originPos, destinationPos ]; var destinationName = destination.name; var originGeo = this.originGeo; var destinationGeo = destination.coord; var svg = this.svg; var distance = calculateDistance(originGeo[1], originGeo[0], destinationGeo[1], destinationGeo[0]); var duration = calculateDuration(distance); var arc = svg .append('path') .datum(connection) .attr('class', 'arc' + index) .attr('d', function(coordinates) { var d = { origin: { x: coordinates[0][0], y: coordinates[0][1]}, destination: { x: coordinates[1][0], y: coordinates[1][1]} }; var s = false; if (d.destination.x > d.origin.x) { s = true; } return getArc(d, s); }) .style('stroke', 'steelblue') .style('stroke-width', 2) .style('fill', 'none') .transition() .duration(duration) .attrTween('stroke-dasharray', function() { var len = this.getTotalLength(); return function(t) { return (d3.interpolate('0,' + len, len + ',0'))(t) }; }) .on('end', function(d) { var c = connection[1]; svg.append('circle') .attr('cx', c[0]) .attr('cy', c[1]) .attr('r', 0) .attr('class', 'destCircleInner') .style('fill', 'steelblue') .style('fill-opacity', '1') .transition() .duration(300) .attr('r', '3px'); svg.append('circle') .attr('cx', c[0]) .attr('cy', c[1]) .attr('r', 0) .attr('class', 'destCircleOuter') .style('fill', 'black') .style('fill-opacity', '0.05') .transition() .duration(300) .attr('r', '10px'); svg.append('circle') .datum(c) .attr('cx', c[0]) .attr('cy', c[1]) .attr('r', 0) .style('class', 'destCircleMouse') .style('fill', 'steelblue') .style('fill-opacity', '1') .on('mouseover', function (d) { tooltip.html('<span style="color:white">' + destinationName + '</span>') .attr('class', 'tooltipDestination') .style('left', d[0] + 12 + 'px') .style('top', d[1] - 20 + 'px') .transition() .duration(700) .style('opacity', 1) }) .on('mouseout', function (d) { tooltip.transition() .duration(700) .style('opacity', 0) }) .transition() .duration(300) .attr('r', '3px') .on('end', function(d) { d3.select(this) .transition() .duration(2000) .attr('r', 20) .style('fill-opacity', '0'); d3.select('.arc' + index) .transition() .duration(2000) .style('stroke-opacity', '0') .style('stroke-width', '1') .on('end', function (d) { if (index === destinations.length - 1) { svg.selectAll('.destCircleInner').remove(); svg.selectAll('.destCircleOuter').remove(); svg.selectAll('.destCircleMouse').remove(); for (i = 0; i < destinations.length; i++) { svg.selectAll('.arc' + i).remove(); } } var nextIndex = index + 1; if (nextIndex < destinations.length) { drawConnection(nextIndex); } else { drawConnection(0); } }) }); }); } function drawConnections() { drawConnection(0); } function drawMap(originName, originGeo, destinations) { var countries, height, path, projection, scale, svg, width; var width = 800; var height = 800; var center = [4, 68.6]; var scale = 700; projection = d3.geoMercator().scale(scale).translate([width / 2, 0]).center(center); path = d3.geoPath().projection(projection); svg = d3.select('#map').append('svg') .attr('height', height) .attr('width', width) .style('background', '#C1E1EC'); countries = svg.append("g"); d3.json('europe.json', function(data) { countries.selectAll('.country') .data(topojson.feature(data, data.objects.europe).features) .enter() .append('path') .attr('class', 'country') .attr('d', path) return; }); var source = svg.selectAll('circleOrigin'); source .data([originGeo]).enter() .append('circle') .attr('cx', function (d) { return projection(d)[0]; }) .attr('cy', function (d) { return projection(d)[1]; }) .attr('r', '3px') .style('opacity', 1) .attr('fill', 'green') .attr('class', 'circleOrigin') source .data([originGeo]).enter() .append('circle') .attr('cx', function (d) { return projection(d)[0]; }) .attr('cy', function (d) { return projection(d)[1]; }) .attr('r', '10px') .style('opacity', 0.05) .attr('fill', 'black') .attr('class', 'circleOrigin') .on('mouseover', function (d) { tooltip.html('<span style="color:white">' + originName + '</span>') .attr('class', 'tooltipOrigin') .style('left', projection(d)[0] + 12 + 'px') .style('top', projection(d)[1] - 20 + 'px') .transition() .duration(700) .style('opacity', 1) }) .on('mouseout', function (d) { tooltip.transition() .duration(700) .style('opacity', 0) }); this.svg = svg; this.projection = projection; this.drawConnections(); }; this.drawMap(this.originName, this.originGeo, this.destinations); </script> </body> </html>
Java
require 'test_helper' describe Subcheat do it 'should report version number' do Subcheat::VERSION.must_be_instance_of String end end
Java
using System.Reflection; [assembly: AssemblyTitle("Querify.Nh")]
Java
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <p>isElement</p> <p><a href="isElement.html"></a>isElement</p> <form><input><input></form> <select><option></option><option></option></select> <script></script> <svg> <g id="elmG"/> <text id="elmText"/> <rect id="elmRect"/> <defs id="elmDefs"/> </svg> </body> </html>
Java
#!/bin/bash set -x set -e source "/tools/common_rc/functions.sh" apt-get update # install SSHD apt-get install -y --no-install-recommends ssh # let root logins, disable password logins sed -i \ -e 's/^#?UsePAM.*$/UsePAM no/g' \ -e 's/^#?PasswordAuthentication.*$/PasswordAuthentication yes/g' \ -e 's/^#?PermitRootLogin.*$/PermitRootLogin yes/g' \ -e 's/^#?UseDNS.*$/UseDNS no/g' \ -e 's/AcceptEnv LANG.*//' \ /etc/ssh/sshd_config mkdir -p /var/run/sshd echo 'root:root' | chpasswd apt-get install -y --no-install-recommends openssh-client git git-flow echo 'Setup nice PS1 to use with git...' \ && wget -q "https://gist.githubusercontent.com/dariuskt/0e0b714a4cf6387d7178/raw/83065e2fead22bb1c2ddf809be05548411eabea7/git_bash_prompt.sh" -O /home/project/.git_bash_prompt.sh \ && echo '. ~/.git_bash_prompt.sh' >> /home/project/.bashrc \ && chown project:project /home/project/.git_bash_prompt.sh \ && echo -e '\n\nDONE\n' # make directories not that dark on dark background echo 'DIR 30;47' > /home/project/.dircolors chown project:project /home/project/.dircolors echo 'adding git aliases...' \ && echo alias gl=\"git log --pretty=format:\'%C\(bold blue\)%h %Creset-%C\(bold yellow\)%d %C\(red\)%an %C\(green\)%s\' --graph --date=short --decorate --color --all\" >> /home/project/.bash_aliases \ && echo 'alias pull-all='\''CB=$(git branch | grep ^\* | cut -d" " -f2); git branch | grep -o [a-z].*$ | xargs -n1 -I{} bash -c "git checkout {} && git pull"; git checkout "$CB"'\' >> /home/project/.bash_aliases \ && chown project:project /home/project/.bash_aliases \ && echo -e '\n\nDONE\n' echo 'enable bash_custom inside dev container' echo 'if [ -f ~/.bash_custom ]; then . ~/.bash_custom ; fi' >> /home/project/.bashrc # install mysql-client apt-get install -y --no-install-recommends mariadb-client # install composer phpEnableModule json phpEnableModule phar phpEnableModule zip phpEnableModule iconv curl -sSL 'https://getcomposer.org/download/1.10.22/composer.phar' > /usr/local/bin/composer.phar chmod a+x /usr/local/bin/composer.phar ln -s /usr/local/bin/composer.phar /usr/local/bin/composer composer self-update --1 # installl hiroku/prestissimo phpEnableModule curl sudo -u project composer --no-interaction global require "hirak/prestissimo:^0.3" # disable enabled modules phpDisableModule curl phpDisableModule json phpDisableModule phar phpDisableModule zip # install phpunit apt-get install -y --no-install-recommends phpunit65 phpenmod phar cp -frv /build/files/* / # Clean up APT when done. source /usr/local/build_scripts/cleanup_apt.sh
Java
// // TuneFightAppDelegate.h // TuneFight // // Created by Pit Garbe on 14.01.11. // Copyright 2011 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> @class RootViewController; @interface TuneFightAppDelegate : NSObject <UIApplicationDelegate> @property (nonatomic, strong) UIWindow *window; @end
Java
class Network < ApplicationRecord end
Java
using FluentValidation; using MediatR; using Shop.Infrastructure.Data; using System.Linq; using System.Threading.Tasks; using AutoMapper; using Microsoft.EntityFrameworkCore; using Shop.Core.Interfaces; using Shop.Infrastructure.Data.Extensions; namespace Shop.Features.Product { public class ProductEdit { #region Query public class Query : IRequest<Command> { public string ProductReference { get; set; } } public class QueryValidator : AbstractValidator<Query> { public QueryValidator() { RuleFor(x => x.ProductReference).NotNull(); } } public class QueryHandler : IAsyncRequestHandler<Query, Command> { private readonly ShopContext _db; public QueryHandler(ShopContext db) { _db = db; } public async Task<Command> Handle(Query query) { var product = await _db.Products .Where(p => p.ProductReference == query.ProductReference) .FirstOrDefaultAsync(); return Mapper.Map<Command>(product); } } #endregion #region Command public class Command : IRequest<bool> { public string ProductReference { get; set; } public string ProductName { get; set; } public string ProductShortDescription { get; set; } public string ProductDescription { get; set; } public decimal Price { get; set; } public decimal TaxRate { get; set; } public bool AvailableForOrder { get; set; } public bool Configureable { get; set; } } public class CommandValidator : AbstractValidator<Command> { public CommandValidator() { RuleFor(x => x.ProductReference).NotEmpty().NotNull(); RuleFor(x => x.ProductName).NotEmpty().NotNull(); RuleFor(x => x.ProductShortDescription).NotEmpty().NotNull(); RuleFor(x => x.ProductDescription).NotEmpty().NotNull(); RuleFor(x => x.Price).NotEmpty().NotNull(); RuleFor(x => x.TaxRate).NotEmpty().NotNull(); } } public class Handler : IAsyncRequestHandler<Command, bool> { private readonly ShopContext _db; public Handler(ShopContext db) { _db = db; } public async Task<bool> Handle(Command message) { var updatedProduct = Mapper.Map<Core.Entites.Product>(message); var currentProduct = await _db .Products .Active() .FirstOrDefaultAsync(p => p.ProductReference == message.ProductReference); if (currentProduct == null) return false; var isDirty = new MapToExisting().Map(updatedProduct, currentProduct); return !isDirty || await _db.SaveChangesAsync() > 0; } private class MapToExisting : IMapToExisting<Core.Entites.Product, Core.Entites.Product> { public bool Map(Core.Entites.Product source, Core.Entites.Product target) { target.MarkClean(); target.ProductName = source.ProductName; target.ProductShortDescription = source.ProductShortDescription; target.ProductDescription = source.ProductDescription; target.Price = source.Price; target.TaxRate = source.TaxRate; target.ShippingWeightKg = source.ShippingWeightKg; target.AvailableForOrder = source.AvailableForOrder; target.Configureable = source.Configureable; if (target.IsDirty) target.MarkUpdated(); return target.IsDirty; } } } #endregion public class MappingProfile : AutoMapper.Profile { public MappingProfile() { CreateMap<Core.Entites.Product, Command>(MemberList.None); CreateMap<Command, Core.Entites.Product>(MemberList.None); } } } }
Java
using System; using System.Collections.Concurrent; using System.Threading; namespace Napack.Server { /// <summary> /// Holds statistics for the Napack Framework Server system as a whole. /// </summary> /// <remarks> /// This class and its contents is stored in memory. /// </remarks> public class SystemStats { private object lockObject; private DateTime startTime; public SystemStats() { this.RequestStats = new ConcurrentDictionary<string, RequestStats>(); this.TotalCallsSinceUptime = 0; this.UniqueIpsSinceUptime = 0; this.lockObject = new object(); this.startTime = DateTime.UtcNow; } public ConcurrentDictionary<string, RequestStats> RequestStats { get; private set; } public long TotalCallsSinceUptime; public long UniqueIpsSinceUptime; public TimeSpan Uptime => DateTime.UtcNow - startTime; public bool AddCall(string ip) { Interlocked.Increment(ref this.TotalCallsSinceUptime); ++this.TotalCallsSinceUptime; if (!RequestStats.ContainsKey(ip)) { lock (this.lockObject) { if (!RequestStats.ContainsKey(ip)) { Interlocked.Increment(ref this.UniqueIpsSinceUptime); RequestStats.AddOrUpdate(ip, new RequestStats(), (key, existing) => existing); } } } return RequestStats[ip].AddCall(); } } }
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>extructures: 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 / extra-dev</a></li> <li class="active"><a href="">dev / extructures - 0.3.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> extructures <small> 0.3.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-19 18:24:42 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-19 18:24:42 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 dev Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.11.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.2 Official release 4.11.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: synopsis: &quot;Finite sets, maps, and other data structures with extensional reasoning&quot; opam-version: &quot;2.0&quot; maintainer: &quot;arthur.aa@gmail.com&quot; homepage: &quot;https://github.com/arthuraa/extructures&quot; dev-repo: &quot;git+https://github.com/arthuraa/extructures.git&quot; bug-reports: &quot;https://github.com/arthuraa/extructures/issues&quot; authors: [&quot;Arthur Azevedo de Amorim&quot;] license: &quot;MIT&quot; build: [ [make &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;ocaml&quot; &quot;coq&quot; {(&gt;= &quot;8.11&quot; &amp; &lt; &quot;8.14~&quot;)} &quot;coq-mathcomp-ssreflect&quot; {(&gt;= &quot;1.10&quot; &amp; &lt; &quot;1.13~&quot;)} &quot;coq-deriving&quot; {(&gt;= &quot;0.1&quot; &amp; &lt; &quot;0.2~&quot;)} ] tags: [ &quot;keyword:finite maps&quot; &quot;keyword:extensionality&quot; &quot;category:Computer Science/Data Types and Data Structures&quot; &quot;logpath:extructures&quot; ] url { src: &quot;https://github.com/arthuraa/extructures/archive/v0.3.0.tar.gz&quot; checksum: &quot;sha512=1bbf711f53b86b37daef5fc08dc30f34d6e3334127b4cc2d887b89709e089c56dbd186c38aa1b925ed4802e3aad8cf29a5a66f12294c0e954815c28ad04f648b&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-extructures.0.3.0 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-extructures -&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-extructures.0.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
'use strict' var test = require('tape') var createDate = require('./') test(function (t) { t.ok(createDate('1-1-2000') instanceof Date) t.end() })
Java
<html><body> <h4>Windows 10 x64 (18362.116)</h4><br> <h2>HAL_PRIVATE_DISPATCH</h2> <font face="arial"> +0x000 Version : Uint4B<br> +0x008 HalHandlerForBus : Ptr64 _<a href="./_BUS_HANDLER.html">_BUS_HANDLER</a><br> +0x010 HalHandlerForConfigSpace : Ptr64 _<a href="./_BUS_HANDLER.html">_BUS_HANDLER</a><br> +0x018 HalLocateHiberRanges : Ptr64 void <br> +0x020 HalRegisterBusHandler : Ptr64 long <br> +0x028 HalSetWakeEnable : Ptr64 void <br> +0x030 HalSetWakeAlarm : Ptr64 long <br> +0x038 HalPciTranslateBusAddress : Ptr64 unsigned char <br> +0x040 HalPciAssignSlotResources : Ptr64 long <br> +0x048 HalHaltSystem : Ptr64 void <br> +0x050 HalFindBusAddressTranslation : Ptr64 unsigned char <br> +0x058 HalResetDisplay : Ptr64 unsigned char <br> +0x060 HalAllocateMapRegisters : Ptr64 long <br> +0x068 KdSetupPciDeviceForDebugging : Ptr64 long <br> +0x070 KdReleasePciDeviceForDebugging : Ptr64 long <br> +0x078 KdGetAcpiTablePhase0 : Ptr64 void* <br> +0x080 KdCheckPowerButton : Ptr64 void <br> +0x088 HalVectorToIDTEntry : Ptr64 unsigned char <br> +0x090 KdMapPhysicalMemory64 : Ptr64 void* <br> +0x098 KdUnmapVirtualAddress : Ptr64 void <br> +0x0a0 KdGetPciDataByOffset : Ptr64 unsigned long <br> +0x0a8 KdSetPciDataByOffset : Ptr64 unsigned long <br> +0x0b0 HalGetInterruptVectorOverride : Ptr64 unsigned long <br> +0x0b8 HalGetVectorInputOverride : Ptr64 long <br> +0x0c0 HalLoadMicrocode : Ptr64 long <br> +0x0c8 HalUnloadMicrocode : Ptr64 long <br> +0x0d0 HalPostMicrocodeUpdate : Ptr64 long <br> +0x0d8 HalAllocateMessageTargetOverride : Ptr64 long <br> +0x0e0 HalFreeMessageTargetOverride : Ptr64 void <br> +0x0e8 HalDpReplaceBegin : Ptr64 long <br> +0x0f0 HalDpReplaceTarget : Ptr64 void <br> +0x0f8 HalDpReplaceControl : Ptr64 long <br> +0x100 HalDpReplaceEnd : Ptr64 void <br> +0x108 HalPrepareForBugcheck : Ptr64 void <br> +0x110 HalQueryWakeTime : Ptr64 unsigned char <br> +0x118 HalReportIdleStateUsage : Ptr64 void <br> +0x120 HalTscSynchronization : Ptr64 void <br> +0x128 HalWheaInitProcessorGenericSection : Ptr64 long <br> +0x130 HalStopLegacyUsbInterrupts : Ptr64 void <br> +0x138 HalReadWheaPhysicalMemory : Ptr64 long <br> +0x140 HalWriteWheaPhysicalMemory : Ptr64 long <br> +0x148 HalDpMaskLevelTriggeredInterrupts : Ptr64 long <br> +0x150 HalDpUnmaskLevelTriggeredInterrupts : Ptr64 long <br> +0x158 HalDpGetInterruptReplayState : Ptr64 long <br> +0x160 HalDpReplayInterrupts : Ptr64 long <br> +0x168 HalQueryIoPortAccessSupported : Ptr64 unsigned char <br> +0x170 KdSetupIntegratedDeviceForDebugging : Ptr64 long <br> +0x178 KdReleaseIntegratedDeviceForDebugging : Ptr64 long <br> +0x180 HalGetEnlightenmentInformation : Ptr64 void <br> +0x188 HalAllocateEarlyPages : Ptr64 void* <br> +0x190 HalMapEarlyPages : Ptr64 void* <br> +0x198 Dummy1 : Ptr64 Void<br> +0x1a0 Dummy2 : Ptr64 Void<br> +0x1a8 HalNotifyProcessorFreeze : Ptr64 void <br> +0x1b0 HalPrepareProcessorForIdle : Ptr64 long <br> +0x1b8 HalRegisterLogRoutine : Ptr64 void <br> +0x1c0 HalResumeProcessorFromIdle : Ptr64 void <br> +0x1c8 Dummy : Ptr64 Void<br> +0x1d0 HalVectorToIDTEntryEx : Ptr64 unsigned long <br> +0x1d8 HalSecondaryInterruptQueryPrimaryInformation : Ptr64 long <br> +0x1e0 HalMaskInterrupt : Ptr64 long <br> +0x1e8 HalUnmaskInterrupt : Ptr64 long <br> +0x1f0 HalIsInterruptTypeSecondary : Ptr64 unsigned char <br> +0x1f8 HalAllocateGsivForSecondaryInterrupt : Ptr64 long <br> +0x200 HalAddInterruptRemapping : Ptr64 long <br> +0x208 HalRemoveInterruptRemapping : Ptr64 void <br> +0x210 HalSaveAndDisableHvEnlightenment : Ptr64 void <br> +0x218 HalRestoreHvEnlightenment : Ptr64 void <br> +0x220 HalFlushIoBuffersExternalCache : Ptr64 void <br> +0x228 HalFlushExternalCache : Ptr64 void <br> +0x230 HalPciEarlyRestore : Ptr64 long <br> +0x238 HalGetProcessorId : Ptr64 long <br> +0x240 HalAllocatePmcCounterSet : Ptr64 long <br> +0x248 HalCollectPmcCounters : Ptr64 void <br> +0x250 HalFreePmcCounterSet : Ptr64 void <br> +0x258 HalProcessorHalt : Ptr64 long <br> +0x260 HalTimerQueryCycleCounter : Ptr64 unsigned int64 <br> +0x268 Dummy3 : Ptr64 Void<br> +0x270 HalPciMarkHiberPhase : Ptr64 void <br> +0x278 HalQueryProcessorRestartEntryPoint : Ptr64 long <br> +0x280 HalRequestInterrupt : Ptr64 long <br> +0x288 HalEnumerateUnmaskedInterrupts : Ptr64 long <br> +0x290 HalFlushAndInvalidatePageExternalCache : Ptr64 void <br> +0x298 KdEnumerateDebuggingDevices : Ptr64 long <br> +0x2a0 HalFlushIoRectangleExternalCache : Ptr64 void <br> +0x2a8 HalPowerEarlyRestore : Ptr64 void <br> +0x2b0 HalQueryCapsuleCapabilities : Ptr64 long <br> +0x2b8 HalUpdateCapsule : Ptr64 long <br> +0x2c0 HalPciMultiStageResumeCapable : Ptr64 unsigned char <br> +0x2c8 HalDmaFreeCrashDumpRegisters : Ptr64 void <br> +0x2d0 HalAcpiAoacCapable : Ptr64 unsigned char <br> +0x2d8 HalInterruptSetDestination : Ptr64 long <br> +0x2e0 HalGetClockConfiguration : Ptr64 void <br> +0x2e8 HalClockTimerActivate : Ptr64 void <br> +0x2f0 HalClockTimerInitialize : Ptr64 void <br> +0x2f8 HalClockTimerStop : Ptr64 void <br> +0x300 HalClockTimerArm : Ptr64 long <br> +0x308 HalTimerOnlyClockInterruptPending : Ptr64 unsigned char <br> +0x310 HalAcpiGetMultiNode : Ptr64 void* <br> +0x318 HalPowerSetRebootHandler : Ptr64 <<a href="./<function>.html"><function></a><br> +0x320 HalIommuRegisterDispatchTable : Ptr64 void <br> +0x328 HalTimerWatchdogStart : Ptr64 void <br> +0x330 HalTimerWatchdogResetCountdown : Ptr64 void <br> +0x338 HalTimerWatchdogStop : Ptr64 void <br> +0x340 HalTimerWatchdogGeneratedLastReset : Ptr64 unsigned char <br> +0x348 HalTimerWatchdogTriggerSystemReset : Ptr64 long <br> +0x350 HalInterruptVectorDataToGsiv : Ptr64 long <br> +0x358 HalInterruptGetHighestPriorityInterrupt : Ptr64 long <br> +0x360 HalProcessorOn : Ptr64 long <br> +0x368 HalProcessorOff : Ptr64 long <br> +0x370 HalProcessorFreeze : Ptr64 long <br> +0x378 HalDmaLinkDeviceObjectByToken : Ptr64 long <br> +0x380 HalDmaCheckAdapterToken : Ptr64 long <br> +0x388 Dummy4 : Ptr64 Void<br> +0x390 HalTimerConvertPerformanceCounterToAuxiliaryCounter : Ptr64 long <br> +0x398 HalTimerConvertAuxiliaryCounterToPerformanceCounter : Ptr64 long <br> +0x3a0 HalTimerQueryAuxiliaryCounterFrequency : Ptr64 long <br> +0x3a8 HalConnectThermalInterrupt : Ptr64 long <br> +0x3b0 HalIsEFIRuntimeActive : Ptr64 unsigned char <br> +0x3b8 HalTimerQueryAndResetRtcErrors : Ptr64 unsigned char <br> +0x3c0 HalAcpiLateRestore : Ptr64 void <br> +0x3c8 KdWatchdogDelayExpiration : Ptr64 long <br> +0x3d0 HalGetProcessorStats : Ptr64 long <br> +0x3d8 HalTimerWatchdogQueryDueTime : Ptr64 unsigned int64 <br> +0x3e0 HalConnectSyntheticInterrupt : Ptr64 long <br> +0x3e8 HalPreprocessNmi : Ptr64 void <br> +0x3f0 HalEnumerateEnvironmentVariablesWithFilter : Ptr64 long <br> +0x3f8 HalCaptureLastBranchRecordStack : Ptr64 long <br> +0x400 HalClearLastBranchRecordStack : Ptr64 unsigned char <br> +0x408 HalConfigureLastBranchRecord : Ptr64 long <br> +0x410 HalGetLastBranchInformation : Ptr64 unsigned char <br> +0x418 HalResumeLastBranchRecord : Ptr64 void <br> +0x420 HalStartLastBranchRecord : Ptr64 long <br> +0x428 HalStopLastBranchRecord : Ptr64 long <br> +0x430 HalIommuBlockDevice : Ptr64 long <br> +0x438 HalIommuUnblockDevice : Ptr64 long <br> +0x440 HalGetIommuInterface : Ptr64 long <br> +0x448 HalRequestGenericErrorRecovery : Ptr64 long <br> +0x450 HalTimerQueryHostPerformanceCounter : Ptr64 long <br> +0x458 HalTopologyQueryProcessorRelationships : Ptr64 long <br> +0x460 HalInitPlatformDebugTriggers : Ptr64 void <br> +0x468 HalRunPlatformDebugTriggers : Ptr64 void <br> +0x470 HalTimerGetReferencePage : Ptr64 void* <br> +0x478 HalGetHiddenProcessorPowerInterface : Ptr64 long <br> +0x480 HalGetHiddenProcessorPackageId : Ptr64 unsigned long <br> +0x488 HalGetHiddenPackageProcessorCount : Ptr64 unsigned long <br> +0x490 HalGetHiddenProcessorApicIdByIndex : Ptr64 long <br> +0x498 HalRegisterHiddenProcessorIdleState : Ptr64 long <br> </font></body></html>
Java
<?php /* * This file is part of PHPExifTool. * * (c) 2012 Romain Neutron <imprec@gmail.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace PHPExiftool\Driver\Tag\Microsoft; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy("all") */ class MediaType extends AbstractTag { protected $Id = 'MediaType'; protected $Name = 'MediaType'; protected $FullName = 'Microsoft::Xtra'; protected $GroupName = 'Microsoft'; protected $g0 = 'QuickTime'; protected $g1 = 'Microsoft'; protected $g2 = 'Video'; protected $Type = '?'; protected $Writable = false; protected $Description = 'Media Type'; }
Java
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. import os from indico.core import signals from indico.core.db import db from .logger import logger from .oauth2 import require_oauth __all__ = ['require_oauth'] @signals.core.app_created.connect def _no_ssl_required_on_debug(app, **kwargs): if app.debug or app.testing: os.environ['AUTHLIB_INSECURE_TRANSPORT'] = '1' @signals.users.merged.connect def _delete_merged_user_tokens(target, source, **kwargs): target_app_links = {link.application: link for link in target.oauth_app_links} for source_link in source.oauth_app_links.all(): try: target_link = target_app_links[source_link.application] except KeyError: logger.info('merge: reassigning %r to %r', source_link, target) source_link.user = target else: logger.info('merge: merging %r into %r', source_link, target_link) target_link.update_scopes(set(source_link.scopes)) target_link.tokens.extend(source_link.tokens) db.session.delete(source_link)
Java
<!-- Latest statistical bulletins --> <section class="panel wrapper box box--padded--med panel--bottom-mar box--teal--separated-left solid border"> <header class="actionable-header__title"> <h2 class="actionable-header__title table-inline ">Latest statistical bulletins</h2> <a class="actionable-header--asidelink hide-med-down" href="#!{{getPath()}}/collection?contentType=bulletins" id="viewAllStatsBulletins">View more statistical bulletins</a> </header> <!-- Static Content if there is not related stats bulletin in the data --> <div class="grid-wrap" ng-if="!(taxonomy.data.statsBulletins)"> <div ng-if="getPage() != 'economy'" class="grid-col desktop-grid-one-third tablet-grid-one-half"> <article class="box--padded"> <div class="box__content"> <ul class="list--table"> <li class="">This content is not available in the prototype but in future will include related statistical bulletins</li> </ul> </div> </article> </div> <!-- /grid-col --> <div class="grid-col hide-large"> <a href="#!{{getPath()}}/collection?contentType=bulletins" id="viewAllStatsBulletins">View all statistical bulletins</a> </div> </div> <!-- /grid-wrap --> <!-- Dynamic Content --> <div class="grid-wrap" ng-if="(taxonomy.data.statsBulletins)"> <div ng-repeat="bulletin in taxonomy.data.statsBulletins track by $index" class="grid-col desktop-grid-one-third tablet-grid-one-half"> <article class="box--padded"> <header class="box__header"> <h3> <a href="#!{{bulletin.uri}}">{{bulletin.name}}</a> </h3> </header> <div class="box__content"> <ul class="list--table"> <li class="">{{bulletin.data.summary}}.</li> </ul> </div> </article> </div> <!-- /grid-col --> <div class="grid-col hide-large"> <a href="#!{{getPath()}}/collection?contentType=bulletins" id="viewAllStatsBulletins">View more statistical bulletins</a> </div> </div> </section>
Java
<!DOCTYPE html> <?xml version="1.0" encoding="UTF-8"?> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Earth Negotiations Bulletin: AWGs</title> <link href="../assets/style/bulletin.css" rel="stylesheet" /> </head> <body> <h1>Earth Negotiations Bulletin: AWGs</h1> <p><b>Bonn Climate Change Talks - May/June 2010</b></p> <p>04-Jun-10 &mdash; <a href="http://www.iisd.ca/vol12/enb12465e.html">original report</a></p> <div id="section_enb12465e_1"> <h2>SBSTA RESEARCH DIALOGUE</h2> <small>SBSTA</small> <p>SBSTA Chair Mama Konaté (Mali) opened the SBSTA dialogue on developments in research activities, recalling the SBSTA decision inviting research programmes to inform the SBSTA of scientific developments relevant to the Convention (FCCC/SBSTA/2007/4).</p> <p>Rik Leemans, Earth System Science Partnership, highlighted impacts of climate change on ecosystems and socio-economic systems and called for policy makers to search for win-win solutions addressing multiple challenges.</p> <p>Ghassem Asrar, World Climate Research Programme, spoke on planned activities that will use climate information for science-based decision-making, noting challenges in developing seasonal and regional climate prediction capabilities, and sea-level change and variability predictions.</p> <p>Sybil Seitzinger, International Geosphere-Biosphere Programme, stressed that ocean acidification is occurring and described the importance of biological life for absorbing carbon in the ocean, highlighting potential disruptions to fisheries.</p> <p>Ottmar Edenhofer, IPCC, discussed the outlines of the contributions by the three IPCC working groups to the Fifth Assessment Report (AR5), including bridges between the working groups. IPCC Vice-Chair Jean-Pascal van Ypersele emphasized that the IPCC is making maximum effort to reduce the potential for errors in the AR5.</p> <p>He also noted that the InterAcademy s review of IPCC policies and practices will be discussed by the IPCC in October 2010 to ensure that the AR5 is as policy relevant as possible without being prescriptive.</p> <p>Andrew Matthews, Asia Pacific Network for Global Change Research, outlined new programmes on REDD and pathways for sustainable development, as well as continuing activities on impact and vulnerability, data management and work relevant to the AR5.</p> <p>Elisabeth Lipiatou, Seventh Framework Programme, described the organization s regional work on climate change support in developing countries.</p> <p>She presented work on aerosols, sea ice and ocean acidification, as well as new research priorities on MRV methodologies and projected adaptation costs.</p> <p>John Padgham, Global Change SysTem for Analysis, Research and Training (START), discussed science policy dialogues aiming to foster better communication between scientists and policy makers in developing countries, stressing the importance, inter alia , of: addressing capacity and knowledge gaps; improving access to data; using integrated inter-sectoral planning; and enhancing communication pathways.</p> <p>Ann Gordon, National Meteorological Service of Belize, said priority needs for the Caribbean Region include studies on: the relationship between melting ice sheets and sea-level rise; the impacts of 1.5°C, 2°C and 3°C temperature rise on sea levels, as well as on maritime and terrestrial life; integrated assessments of the interplay between ecosystems; and social impacts of climate change.</p> <p>David Warrilow, Department of Energy and Climate Change, UK, identified key challenges, such as: describing the impacts of different levels of temperature rise; identifying critical tipping points; clarifying risks and damages; and considering negative effects on human security.</p> <p>Hiroki Kondo, Ministry of Education, Culture, Sport, Science and Technology of Japan, focused on modeling efforts, including, inter alia : satellite observation to provide global data; climate risk assessment; simulation of physical and geochemical processes; and addressing uncertainties in climate model projections.</p> <p>Birama Diarra, Direction Nationale de la Météorologie, Mali, identified research needs and challenges for Africa: the insufficiency of data and data networks; high costs of equipment; and a lack of studies on the frequency and intensity of extreme events.</p> <p>He called for enhancing knowledge on the needs of the agriculture sector.</p> <p>Benjamin Zaitchik, Office of Global Change, Bureau of Oceans, Environment and Science, US, called for making better use of available information and identified the need to: reorganize science around scientific-societal issues; strengthen stakeholder participation in research; and move towards a flexible, comprehensive, integrated and cross-cutting scientific approach.</p> </div> <div id="section_enb12465e_2"> <h2>DECISION 1/CP.10 (SBI)</h2> <p>In the contact group on progress on the implementation of decision 1/CP.10 (Buenos Aires programme of work on adaptation and response measures), SBI Chair Robert Owen-Jones (Australia) introduced the new draft decision text.</p> <p>SAUDI ARABIA noted that quite a few elements of the G-77/China s position seemed to be conspicuously absent.</p> <p>The Cook Islands, for AOSIS, emphasized that the document should be oriented towards implementation on the ground.</p> <p>With AUSTRALIA and BURKINA FASO, she also requested reference to particularly vulnerable states, including SIDS and LDCs.</p> <p>AUSTRALIA and Spain, for the EU, emphasized that the document should acknowledge that implementation is already occurring. REVIEW OF THE ADAPTATION FUND (SBI): During the contact group, Co-Chair Ruleta Camacho (Antigua and Barbuda) recalled the mandate to agree on the terms of reference (TORs) for the review of the Adaptation Fund (AF) to be undertaken by COP/MOP 6 and highlighted the proposed TORs prepared by the Secretariat (FCCC/SBI/2010/7).</p> <p>The Philippines, for the G-77/CHINA, submitted a proposal for the TORs and parties agreed to consult on the basis of the G-77/China s proposal.</p> <p>Several parties, including the EU and Antigua and Barbuda, for AOSIS, requested information on the performance reviews of the interim secretariat and trustee servicing the AF, and on the annual report by the Adaptation Fund Board (AFB).</p> <p>Co-Chair Camacho clarified that the report by the AFB will have to be presented by September.</p> <p>NORWAY, supported by the EU, AOSIS and AUSTRALIA, urged also including the review of the AFB in the TORs.</p> <p>AOSIS proposed including reference to the CDM project cycle regarding a potential bottleneck in funding for the AF and BANGLADESH stressed the importance of ensuring funding.</p> </div> <div id="section_enb12465e_3"> <h2>ITEM 3 (AWG-LCA): Shared Vision</h2> <p>During the AWG-LCA contact group in the morning, parties focused on a shared vision for long-term cooperative action, based on questions by the AWG-LCA Chair ( http://unfccc.int/files/meetings/ad_hoc_working_groups/lca/application/pdf/indicative_questions_for_cg_shared_vision.pdf ).</p> <p>The Philippines, for the G-77/CHINA, stated that the preamble of the text on a shared vision should set out the bigger picture, including concepts such as historical responsibility, justice, equity and burden sharing, as well as the effective implementation of developed countries commitments.</p> <p>He called for articulation of, inter alia , the rights of Mother Earth, indigenous and local community rights, and the avoidance of climate change-related trade measures.</p> <p>He also highlighted the need for a shared vision for all the building blocks and the articulation of the maximum global temperature increase goal and global emission reduction goal.</p> <p>On the review process, he highlighted the need to review the adequacy and effectiveness of developed country commitments.</p> <p>Emphasizing that the issue of vulnerability is not a matter for negotiation, Uganda, for the LDCs, lamented that some elements important to the LDCs were missing from the text.</p> <p>He explained that the shared vision should be underpinned by concrete action in the operative part with equal importance given to adaptation and mitigation, taking into account national circumstances, especially of the LDCs and SIDS.</p> <p>SOUTH AFRICA said the preamble should cover a shared vision for each building block.</p> <p>She highlighted the long-term global goal as more than just a number, but also nothing without a number. ANTIGUA AND BARBUDA supported the articulation of a shared vision for each of the building blocks.</p> <p>On the global goal, she highlighted, inter alia : limiting temperature increase to well below 1.5°C from pre-industrial levels; peaking emissions by 2015; stabilizing greenhouse gas concentrations at well below 350 parts per million (ppm) of carbon dioxide (CO2) equivalent; and a global long-term goal for emission reductions of 85% from 1990 levels by 2050.</p> <p>She observed that the review should assess the adequacy of the long-term global goal and emission reductions, and that the first review should be initiated by the COP in 2013 and concluded by 2015, with subsequent reviews every five years. NEW ZEALAND opposed articulating a shared vision for each of the building blocks, noting that the shared vision should encapsulate what we want to achieve.</p> <p>He observed that the review should be conducted thoroughly and periodically.</p> <p>The US highlighted high-level guidance from Copenhagen and noted that the application of the Convention s principles evolves as the world changes.</p> <p>He supported retaining structural linkages and including a review provision, and said the 2°C goal, to which the political leaders have committed, should guide the vision. INDIA called for a balanced treatment of the building blocks and stressed that the global long-term goal must be linked to an equitable burden-sharing paradigm and challenges that developing countries face in terms of poverty eradication.</p> <p>CHINA and INDIA stressed the need to avoid protectionist trade measures in the name of climate change action.</p> <p>SINGAPORE and BRAZIL called for including text on an open international economic system and on parties not using trade measures that lead to arbitrary discrimination or constitute disguised trade restrictions.</p> <p>Panama, for the CENTRAL AMERICAN INTEGRATION SYSTEM, stressed the urgent need for a legally-binding agreement and underscored that their region is among the most vulnerable in the world.</p> <p>He called for stabilizing greenhouse gas concentrations to below 350 ppm of CO2 equivalent and ensuring that the global average temperature increase does not exceed 1.5°C. JAPAN called for a clear and concise vision and reiterated support for a fair and effective single legal framework.</p> <p>He highlighted the 2°C target, identified the need to review the level of ambition based on rigorous science and supported a 50% global emission reduction target by 2050.</p> <p>AUSTRALIA supported a clear and concise roadmap, saying the detailed tools to implement it should be placed under thematic decisions.</p> <p>She said the Copenhagen Accord provides excellent guidance, and called for reflecting agreement on the 2°C target with the possibility of strengthening it and on peaking global emissions as soon as possible.</p> <p>She said the text should guide parties towards a legally-binding framework and called for a common section on mitigation.</p> <p>The EU stressed the need to operationalize the 2°C target that was agreed in Copenhagen, saying global emissions should peak by 2020 and be reduced by at least 50% by 2050.</p> <p>He also said developed countries should reduce their emissions by 80-95% by 2050. BOLIVIA called for limiting the temperature increase to 1°C and stabilization at as close to 300 ppm as possible.</p> <p>He urged developed countries to reduce emissions by 50% from 1990 levels by 2017 without the use of market mechanisms.</p> <p>He also called for recognition of developed countries climate debt, decolonization of the atmospheric space and addressing unsustainable production and consumption in developed countries.</p> <p>BOLIVIA also supported the establishment of an international court of climate and environmental justice and democratic participation with world referenda on climate issues. CHINA said the text on a shared vision should provide guidance on action on the building blocks and not be operational text.</p> <p>He also emphasized that a shared vision should not be narrowed down to only a global goal on emission reductions and explained that the global long-term goal should be expressed in a balanced way, with a link to ambitious mid-term emission reductions by developed countries and support for developing countries.</p> <p>He said the review should be consistent with the Convention and focus on Annex I emission reductions as well as their support for developing countries. PAKISTAN supported the articulation of a shared vision for all the building blocks and emphasized that peaking periods for developing countries were conditional on the development threshold. INDONESIA supported a review process every five years.</p> <p>NORWAY emphasized the need for global emissions to peak at the earliest possible time and proposed that a review process be conducted regularly.</p> <p>Switzerland, for the ENVIRONMENTAL INTEGRITY GROUP, stated that a shared vision should articulate thematic areas of the Bali Action Plan towards the achievement of a long-term global goal and that the global goal for emission reductions should be expressed in such a way as to guide actions in a political and technical way.</p> <p>He highlighted the role of national greenhouse gas inventories in a periodic review process.</p> </div> <div id="section_enb12465e_4"> <h2>Mitigation</h2> <p>During the AWG-LCA contact group in the afternoon, parties focused on mitigation commitments or actions by developed country parties and associated monitoring, reporting and verification (MRV) based on questions by the AWG-LCA Chair ( http://unfccc.int/files/meetings/ad_hoc_working_groups/lca/application/pdf/1b(i)_questions_for_web_final.pdf ).</p> <p>Brazil, for the G-77/CHINA, identified the need for stronger language on using the Kyoto Protocol as the basis for Annex I MRV and compliance, and recalled the G-77/China s proposal for a technical panel on comparability of developed countries mitigation efforts.</p> <p>He explained that comparability of efforts is not a principle, but that it relates to magnitude of emission reductions, compliance, legal form and MRV.</p> <p>The G-77/CHINA stressed that commitments should be defined top down, reflect science, and be part of the formal outcome of the negotiations.</p> <p>He said the Protocol should also guide LULUCF accounting rules and identified the need to strengthen these rules.</p> <p>Barbados, for AOSIS, urged agreement on Annex I aggregate emission reductions of at least 45% from 1990 levels by 2020.</p> <p>He noted relevant discussions under the AWG-KP and expressed willingness to explore the possibility of a common space to discuss this issue.</p> <p>He stressed that discussions should be limited to the scale of ambition of Annex I aggregate emission reductions and that the two-track process should be maintained.</p> <p>COLOMBIA, also speaking for Chile, Costa Rica, the Dominican Republic, Guatemala, Panama, Peru and Uruguay, expressed great interest in the proposal by AOSIS.</p> <p>The US emphasized that Annex I countries put forward their targets before and after Copenhagen.</p> <p>On the need to set a collective goal for emission reductions, he highlighted the goal of limiting temperature increase to 2°C, which may be strengthened by 2015.</p> <p>He said all credible mitigation actions, including LULUCF, should count for commitments.</p> <p>The US stressed the need for provisions on MRV and on international consultation and analysis, indicating that reaching agreement on a fully operational system is essential this year.</p> <p>He emphasized that MRV for Annex I countries must be considered in tandem with international consultation and analysis for non-Annex I countries and, with CANADA, proposed a separate chapter on this.</p> <p>Switzerland, for the ENVIRONMENTAL INTEGRITY GROUP, requested a discussion on the legal nature of the work and a compilation of pledges of all developed country parties.</p> <p>With many other developed countries, he noted the importance of LULUCF and market based instruments.</p> <p>South Africa, for the AFRICAN GROUP, offered a proposal to insert a collective mid-term goal and then agree on a process to negotiate pledges leading to at least a 40% reduction by 2020. JAPAN stressed the need to coordinate work with the AWG-KP and to revise the MRV system to include both Annex I and non-Annex I parties, taking into account differences between them.</p> <p>AUSTRALIA expressed support for devoting a portion of the meeting to discussing MRV.</p> <p>The EU said MRV under the Protocol needs to be linked to discussions under the AWG-LCA. NEW ZEALAND stressed consideration of MRV for all countries through a common but different framework.</p> <p>CHINA highlighted comparability as the core of sub-paragraph 1(b)(i) of the BAP, and said the same provisions on third party review, LULUCF and offsets should apply to Protocol parties and non-parties.</p> <p>SOUTH AFRICA requested a new chapter in the text on how Annex I countries will implement their targets for 2020, what the compliance system will look like, and how MRV will be ensured. BOLIVIA emphasized that the Protocol must be maintained, and that the Protocol compliance mechanism should be applied and strengthened.</p> <p>INDONESIA stressed MRV as a key element in the achievement of developed countries reduction objectives.</p> <p>The PHILIPPINES supported a top-down approach to setting science-based targets, with the objective of not exceeding a 1.5°C temperature increase. NORWAY stressed economy-wide targets as an important way of ensuring comparability, and highlighted the role of market mechanisms.</p> <p>The RUSSIAN FEDERATION said a collective emission reduction goal might be a useful tool for indicating the aspiration of countries, while saying it should not be used for defining individual targets. INDIA emphasized that MRV of developed country support must be more rigorous than that of MRV of developing country mitigation actions.</p> <p>NICARAGUA highlighted the importance of domestic reductions.</p> <p>Chair Mukahanana-Sangarwe said that as parties had reiterated their known positions, she did not have a basis to revise the text.</p> <p>Responding to Grenada on how she intents to proceed with the proposal by AOSIS, Chair Mukahanana-Sangarwe said she would consult with the AWG-KP Chair on the potential for joint discussions. CONVENTION ARTICLE 6 (SBI): The contact group on Convention Article 6 (education, training and public awareness) focused on the intermediate review of the implementation of the New Delhi work programme, as mandated by decision 9/CP.13 (amended New Delhi work programme on Article 6 of the Convention).</p> <p>Chair Liana Bratasida (Indonesia) proposed preparing draft text containing the TORs for the intermediate review for parties consideration at the next meeting of the group.</p> <p>Many parties supported the Chair s proposal.</p> <p>JAPAN, supported by many parties, suggested inviting submissions from parties on good practices and lessons learned, as input for the interim review.</p> <p>Spain, for the EU, proposed extending the invitation to intergovernmental and non-governmental organizations. YOUTH urged parties to adopt a proper review process and proposed: extending the work programme beyond 2010; giving the Secretariat a broad mandate to conduct the review in an inclusive manner; including young people in national work programmes, and also inviting submissions from civil society; and providing sufficient financing for the Secretariat to organize regional workshops in Africa and the LDCs.</p> <p>The Gambia, for the G-77/CHINA, suggested requesting the Secretariat to compile and synthesize the outcomes and recommendations from the regional workshops held so far, together with the implementation of these outcomes and recommendations.</p> <p>The EU suggested including an invitation to parties to provide funding for the regional workshops yet to be held. UKRAINE urged for the implementation of Convention Article 6(b)(ii) (development and implementation of education and training programmes) to be extended to countries with economies in transition.</p> <p>NEPAL called for extending the work programme for at least five years.</p> <p>Responding to a request by the US, the Secretariat provided an update of the implementation of the Climate Change Information Network (CC:iNet).</p> <p>He explained that the Secretariat is in the process of developing its full-scale implementation and expects to launch additional functionalities before Cancún.</p> <p>The DOMINICAN REPUBLIC highlighted the proposal to establish a financial mechanism to support projects and programmes in relation to the implementation of Article 6.</p> <p>MALAWI questioned why no regional workshop had been organized in Africa and the Secretariat responded that this was due to lack of funds.</p> <p>The Chair will prepare draft conclusions and informal consultations will continue. OTHER ISSUES (AWG-KP) In informal consultations on LULUCF, delegates discussed a proposal from developing countries on constructing reference levels. ANNEX I EMISSION REDUCTIONS (AWG-KP): In the afternoon, parties addressed the need to reconstitute the legal issues contact group in order to analyze the entry into force of Protocol amendments to avoid a gap between commitment periods.</p> <p>Parties agreed to request the AWG-KP Chair to reconstitute the legal issues contact group.</p> <p>The Secretariat presented a paper compiling pledges, related assumptions and associated emission reductions (FCCC/KP/AWG/2010/INF.1).</p> <p>CHINA emphasized that the current pledges are not sufficient.</p> <p>The Federated States of Micronesia, for AOSIS, stressed the need for more specific information from parties to chisel down into what the numbers actually mean. COLOMBIA, supported by GRENADA, the PHILIPPINES and BARBADOS, called for a joint discussion of emission reductions by all Annex I countries.</p> <p>AUSTRALIA, supported by JAPAN and NORWAY, called for a broader discussion of what is happening globally, saying it is important to analyze the level of ambition of the flood of international pledges in the wake of Copenhagen.</p> <p>CHINA opposed any attempt to merge the two AWGs but said they could go along with the proposal by Colombia if the discussion was strictly limited to discussion of Annex I emission reductions and was compatible with the respective mandates of the AWGs.</p> <p>BOLIVIA, VENEZUELA, SINGAPORE, SUDAN and BRAZIL opposed broader discussions.</p> <p>AUSTRALIA emphasized that no single group of countries is able to deliver the level of ambition necessary to address climate change and that if ambitions were to be hardened down to specific numbers, a broader discussion would be the next step.</p> <p>ARGENTINA said that a joint discussion is premature.</p> <p>INDIA opposed discussions of developing countries emission reductions.</p> <p>SAUDI ARABIA stressed that they would not accept a joint discussion.</p> <p>Intervening on a point of order, the US emphasized that they would oppose any effort to discuss their emission reductions in the context of Annex I emission reductions under the Kyoto Protocol. CAPACITY BUILDING UNDER THE CONVENTION (SBI): Co-Chair Jaudet introduced new draft text containing draft SBI conclusions and a draft COP decision.</p> <p>JAPAN, AUSTRALIA and the US noted that, although there are portions of the text that could be acceptable as a basis for discussions, the text contains some elements that will take parties back to previous discussions and disagreements.</p> <p>JAPAN, supported by the US and others, but opposed by Tanzania, for the G-77/CHINA, proposed inviting presentations from the UN Development Programme and from any other interested party or organization, on experiences of monitoring and evaluation within countries. ARRANGEMENTS FOR INTERGOVERNMENTAL MEETINGS (SBI): In the contact group, parties discussed observer organizations in the intergovernmental process.</p> <p>Highlighting lessons from Copenhagen, UNFCCC Executive Secretary de Boer outlined plans for pre-meeting online registration and said two projects would be initiated, one on streamlining and improving stakeholder participation and another to draw together best practices on stakeholder involvement from the UN system.</p> <p>The International Trade Union Confederation, for ENGOs, YOUTH, WOMEN and GENDER, LOCAL GOVERNMENTS and INDIGENOUS ORGANIZATIONS, underscored that the full and effective participation of civil society provides legitimacy to the UNFCCC process and called for guidelines on civil society participation to be revised before COP 16.</p> <p>She highlighted access to informal consultations and called for equal treatment of side events by parties and by civil society, as well as for the right for observers to vocally demonstrate.</p> <p>On the issue of stunts, the CLIMATE ACTION NETWORK emphasized the need to be able to express frustration and to participate in vocal demonstrations.</p> <p>Many parties acknowledged the role of stakeholders and supported their active engagement.</p> <p>Bangladesh, for the G-77/CHINA, noted the need to strike an appropriate balance bearing in mind that the process is party-driven.</p> <p>AUSTRALIA, with BOLIVIA, highlighted unnecessary burdens such as observers being required to register significantly in advance without the ability to change names on delegations.</p> <p>The US called for guidelines to ensure a more predictable process, especially for the high-level segment.</p> <p>The PHILIPPINES called for a differentiation between observers, particularly NGOs and IGOs.</p> </div> <div id="section_enb12465e_5"> <h2>IN THE CORRIDORS</h2> <small>corridors</small> <p>In contrast to the déjà vu feeling expressed by many delegates at the end of Wednesday, on Thursday evening, many delegates said they were positively surprised by what they saw as signs of possible movement concerning an issue that has remained a sticking point for a long time.</p> <p>They referred to the proposal by AOSIS, supported by some other developing countries, for joint discussions by the two AWGs of Annex I emission reductions.</p> <p>As one developed country delegate put it: We ve been calling for cooperation between the two AWGs for a very long time which is why I was pleasantly surprised by the proposal and that it did not receive quite as much opposition as I would have expected.</p> <p>Other developed country delegates remarked, however, that there was still strong opposition to the idea of broader joint discussions on mitigation.</p> <p>Although some developing country delegates seemed very positive about this idea of joint discussions limited to Annex I parties some were wondering if it would be possible to get all developing countries to agree on the proposal.</p> <p>And then there is obviously the US I am not sure whether they are willing to accept such discussions, commented one delegate, continuing: We have to see what happens when groups have had time to coordinate.</p> <p>Some also made positive remarks on the agreement to reconstitute the legal issues group under the AWG-KP and on the LULUCF submission by developing countries: Things are suddenly picking up and discussions are becoming more animated and constructive!</p> </div> <script type="text/javascript" src="../assets/src/bulletin.js"></script> </body> </html>
Java
<?php /** * Created by PhpStorm. * User: Josh Houghtelin <josh@findsomehelp.com> * Date: 12/19/14 * Time: 6:08 PM */ require __DIR__.'/../vendor/autoload.php'; require __DIR__.'/api_key.php'; $vrp = new \Gueststream\Vrp($api_key); print_r($vrp->isOnline());
Java
using FlaUI.Core.AutomationElements.Infrastructure; using FlaUI.Core.Patterns; namespace FlaUI.Core.AutomationElements.PatternElements { /// <summary> /// An element which supports the <see cref="ISelectionItemPattern" />. /// </summary> public class SelectionItemAutomationElement : AutomationElement { /// <summary> /// Creates a <see cref="SelectionItemAutomationElement"/> element. /// </summary> public SelectionItemAutomationElement(BasicAutomationElementBase basicAutomationElement) : base(basicAutomationElement) { } /// <summary> /// Pattern object for the <see cref="ISelectionItemPattern"/>. /// </summary> protected ISelectionItemPattern SelectionItemPattern => Patterns.SelectionItem.Pattern; /// <summary> /// Value to get/set if this element is selected. /// </summary> public virtual bool IsSelected { get => SelectionItemPattern.IsSelected; set { if (IsSelected == value) return; if (value && !IsSelected) { Select(); } } } /// <summary> /// Selects the element. /// </summary> public virtual SelectionItemAutomationElement Select() { ExecuteInPattern(SelectionItemPattern, true, pattern => pattern.Select()); return this; } /// <summary> /// Adds the element to the selection. /// </summary> public virtual SelectionItemAutomationElement AddToSelection() { ExecuteInPattern(SelectionItemPattern, true, pattern => pattern.AddToSelection()); return this; } /// <summary> /// Removes the element from the selection. /// </summary> public virtual SelectionItemAutomationElement RemoveFromSelection() { ExecuteInPattern(SelectionItemPattern, true, pattern => pattern.RemoveFromSelection()); return this; } } }
Java
#ifndef __SEQ_HPP__ #define __SEQ_HPP__ #include <string> #include <vector> #include <memory> #include <iostream> class SeqNode; typedef std::shared_ptr<SeqNode> SeqNodeSP; class SeqNode { public: enum E_CallType { E_UNKNOWN, E_SYNC, E_ASYNC, E_ASYNC_WAIT }; SeqNode(); void printTree(std::ostream &out,int tabcnt=0); void setCallType(E_CallType calltype); void setTaskSrc(const std::string& src); void setTaskDst(const std::string& dst); void setFunction(const std::string& func); void setReturn(const std::string& ret); void appendFuncParam(const std::string& param); void appendFuncExtra(const std::string& extra); void appendFuncMemo(const std::string& memo); friend void AppendChild(SeqNodeSP parent, SeqNodeSP child); protected: std::string toString(); private: E_CallType m_call_type; std::string m_task_src; std::string m_task_dst; std::string m_func_name; std::string m_func_ret; std::vector<std::string> m_func_param; std::vector<std::string> m_func_extra; std::vector<std::string> m_func_memo; std::vector< SeqNodeSP > m_child; std::weak_ptr<SeqNode> m_parent; }; SeqNodeSP CreateNode(); void AppendChild(SeqNodeSP parent, SeqNodeSP child); void SetMember(SeqNodeSP node,const std::string& key, const std::string& value); #endif
Java
<?php class Upload { private $error = array(); private $name; private $ext; private $orgWidth; private $orgHeight; private $width; private $height; private $maxWidth = 0; private $maxHeight = 0; private $prefix; private $suffix; private $uploadedFile; private $source; private $newImage; private $KB = 1024; private $MB = 1048576; private $GB = 1073741824; private $TB = 1099511627776; function __construct(array $fileToUpload) { $this->name = pathinfo($fileToUpload['name'], PATHINFO_FILENAME); $this->ext = strtolower(pathinfo($fileToUpload['name'], PATHINFO_EXTENSION)); $this->filesize = $fileToUpload['size']; $this->uploadedFile = $fileToUpload['tmp_name']; $this->orgWidth = getimagesize($this->uploadedFile)[0]; $this->orgHeight = getimagesize($this->uploadedFile)[1]; $this->setWidth($this->orgWidth); $this->setHeight($this->orgHeight); if (!file_exists($this->uploadedFile) OR $this->filesize == 0) { $this->error[] = _("You have to upload something!"); } } public function errors() { return $this->error; } public function AllowedTypes(array $types) { if (!in_array(mime_content_type($this->uploadedFile), $types)) { $this->error[] = _("This type of file is not allowed!"); } } public function GetType() { return mime_content_type($this->uploadedFile); } public function setMaxSize($size, $type) { if ($this->filesize > $size * $this->$type) { $this->error[] = _("Your file hits the limit!"); } } public function getImageHeight() { return $this->orgHeight; } public function getImageWidth() { return $this->orgWidth; } public function setPrefix($prefix) { $this->prefix = $prefix; } public function setSuffix($suffix) { $this->suffix = $suffix; } public function setWidth($width) { $this->width = $width; } public function setHeight($height) { $this->height = $height; } public function setMaxWidth($width) { $this->maxWidth = $width; } public function setMaxHeight($height) { $this->maxHeight = $height; } public function setPath($path) { $this->path = $path; } public function setName($name) { $this->name = $name; } public function rotateImage($degrees = 90, $filename) { $source = imagecreatefromjpeg($filename); $rotate = imagerotate($source, $degrees, 0); imagejpeg($rotate, $filename, 100); imagedestroy($source); imagedestroy($rotate); } public function Move() { if (!empty($this->error)) { return false; } $filename = $this->prefix . $this->name . $this->suffix . "." . $this->ext; if (move_uploaded_file($this->uploadedFile, $this->path . $filename)) { return $this->prefix . $this->name . $this->suffix . "." . $this->ext; } else { return false; } } public function Render() { if (!empty($this->error)) { return false; } $width = $this->width; if ($this->height == $this->orgHeight) { $height = ($this->orgHeight / $this->orgWidth) * $width; } else { $height = $this->height; } if ($this->maxWidth != 0 && $width > $this->maxWidth) { $width = $this->maxWidth; } if ($this->maxHeight != 0 && $height > $this->maxHeight) { $height = $this->maxHeight; } $this->newImage = imagecreatetruecolor($width, $height); switch ($this->ext) { case 'png': imagealphablending($this->newImage, false); imagesavealpha($this->newImage, true); $this->source = imagecreatefrompng($this->uploadedFile); imagecopyresampled($this->newImage, $this->source, 0, 0, 0, 0, $width, $height, $this->orgWidth, $this->orgHeight); $filename = $this->path . $this->prefix . $this->name . $this->suffix . "." . $this->ext; imagepng($this->newImage, $filename, 9); break; case 'gif': $this->source = imagecreatefromgif($this->uploadedFile); imagecopyresampled($this->newImage, $this->source, 0, 0, 0, 0, $width, $height, $this->orgWidth, $this->orgHeight); $filename = $this->path . $this->prefix . $this->name . $this->suffix . "." . $this->ext; imagegif($this->newImage, $filename); break; case 'jpeg': case 'jpg': $this->source = imagecreatefromjpeg($this->uploadedFile); imagecopyresampled($this->newImage, $this->source, 0, 0, 0, 0, $width, $height, $this->orgWidth, $this->orgHeight); $filename = $this->path . $this->prefix . $this->name . $this->suffix . "." . $this->ext; imagejpeg($this->newImage, $filename, 100); $exif = exif_read_data($this->uploadedFile); if(isset($exif['Orientation'])) { switch ($exif['Orientation']) { case 3: $this->rotateImage(180, $filename); break; case 6: $this->rotateImage(-90, $filename); break; case 8: $this->rotateImage(90, $filename); break; } } break; } imagedestroy($this->newImage); return $this->prefix . $this->name . $this->suffix . "." . $this->ext; } public function Clean() { imagedestroy($this->source); } }
Java
using System; using System.Collections.Generic; namespace RefinId.Specs { public class TestStorage : ILongIdStorage { private List<long> _values; public TestStorage(params long[] values) { _values = new List<long>(values); } public List<long> Values { get { return _values; } } public List<long> GetLastValues(bool requestFromRealTables = false) { return new List<long>(_values); } public void SaveLastValues(IEnumerable<long> values, bool removeUnusedRows = true) { _values = new List<long>(values); } public void SaveLastValue(long value) { SaveLastValues(new[] { value }); } public TableCommandBuilder Builder { get { throw new NotImplementedException(); } } } }
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>compcert: 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.2 / compcert - 3.9</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> compcert <small> 3.9 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-25 22:42:58 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-25 22:42:58 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.5.2 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.04.2 The OCaml compiler (virtual package) ocaml-base-compiler 4.04.2 Official 4.04.2 release ocaml-config 1 OCaml Switch Configuration # opam file: opam-version: &quot;2.0&quot; authors: &quot;Xavier Leroy &lt;xavier.leroy@inria.fr&gt;&quot; maintainer: &quot;Jacques-Henri Jourdan &lt;jacques-Henri.jourdan@normalesup.org&gt;&quot; homepage: &quot;http://compcert.inria.fr/&quot; dev-repo: &quot;git+https://github.com/AbsInt/CompCert.git&quot; bug-reports: &quot;https://github.com/AbsInt/CompCert/issues&quot; license: &quot;INRIA Non-Commercial License Agreement&quot; build: [ [&quot;./configure&quot; &quot;amd64-linux&quot; {os = &quot;linux&quot;} &quot;amd64-macosx&quot; {os = &quot;macos&quot;} &quot;amd64-cygwin&quot; {os = &quot;cygwin&quot;} # This is for building a MinGW CompCert with cygwin host and cygwin target &quot;amd64-cygwin&quot; {os = &quot;win32&quot; &amp; os-distribution = &quot;cygwinports&quot;} # This is for building a 64 bit CompCert on 32 bit MinGW with cygwin build host &quot;-toolprefix&quot; {os = &quot;win32&quot; &amp; os-distribution = &quot;cygwinports&quot; &amp; arch = &quot;i686&quot;} &quot;x86_64-pc-cygwin-&quot; {os = &quot;win32&quot; &amp; os-distribution = &quot;cygwinports&quot; &amp; arch = &quot;i686&quot;} &quot;-prefix&quot; &quot;%{prefix}%&quot; &quot;-install-coqdev&quot; &quot;-clightgen&quot; &quot;-use-external-Flocq&quot; &quot;-use-external-MenhirLib&quot; &quot;-coqdevdir&quot; &quot;%{lib}%/coq/user-contrib/compcert&quot; &quot;-ignore-coq-version&quot;] [make &quot;-j%{jobs}%&quot; {ocaml:version &gt;= &quot;4.06&quot;}] ] install: [ [make &quot;install&quot;] ] depends: [ &quot;coq&quot; {&gt;= &quot;8.9.0&quot; &amp; &lt; &quot;8.15~&quot;} &quot;menhir&quot; {&gt;= &quot;20190626&quot; } &quot;ocaml&quot; {&gt;= &quot;4.05.0&quot;} &quot;coq-flocq&quot; {&gt;= &quot;3.1.0&quot; &amp; &lt; &quot;4~&quot;} &quot;coq-menhirlib&quot; {&gt;= &quot;20190626&quot;} ] synopsis: &quot;The CompCert C compiler (64 bit)&quot; tags: [ &quot;category:Computer Science/Semantics and Compilation/Compilation&quot; &quot;category:Computer Science/Semantics and Compilation/Semantics&quot; &quot;keyword:C&quot; &quot;keyword:compiler&quot; &quot;logpath:compcert&quot; &quot;date:2021-05-10&quot; ] url { src: &quot;https://github.com/AbsInt/CompCert/archive/v3.9.tar.gz&quot; checksum: &quot;sha512=485cbed95284c93124ecdea536e6fb9ea6a05a72477584204c8c3930759d27b0949041ae567044eda9b716a33bba4315665a8d3860deebf851e10c9a4ef88684&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-compcert.3.9 coq.8.5.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.5.2). The following dependencies couldn&#39;t be met: - coq-compcert -&gt; ocaml &gt;= 4.05.0 base of this switch (use `--unlock-base&#39; to force) 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-compcert.3.9</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>string: 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.13.0 / string - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> string <small> 8.5.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2021-04-08 21:07:48 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-04-08 21:07:48 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.13.0 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.10.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.10.1 Official release 4.10.1 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;matej.kosik@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/string&quot; license: &quot;LGPL 2&quot; build: [make] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:string&quot; &quot;keyword:ascii character&quot; &quot;category:Miscellaneous/Coq Extensions&quot; &quot;date:2002-03&quot; ] authors: [ &quot;Laurent Théry &lt;&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/string/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/string.git&quot; synopsis: &quot;Definition of strings in Coq&quot; description: &quot;Strings as list of characters.&quot; url { src: &quot;https://github.com/coq-contribs/string/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=7c066e35b0b7ed1242241a6332e12092&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-string.8.5.0 coq.8.13.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.13.0). The following dependencies couldn&#39;t be met: - coq-string -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) 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-string.8.5.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"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </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>
Java
using SMSServices.Models; using System; using System.Collections.Generic; using System.Data.Entity; using System.Data.Entity.Infrastructure; using System.Data.Entity.Validation; using System.Data.SqlClient; using System.Linq; using System.Net; using System.Net.Http; using System.Text; using System.Web.Http; using WebApi.ErrorHelper; namespace SMSServices.Controllers { public class TeachersSubjectsController : ApiController { private SMSEntities entities = new SMSEntities(); // GET api/<controller> [Route("api/TeachersSubjects/All/{teacherId}")] //public IEnumerable<TeachersSubjects> Get() public HttpResponseMessage Get(int teacherId) { entities.Configuration.ProxyCreationEnabled = false; var query = entities.TeachersSubjects//.Include("Classes").Include("Shifts"); //query.Include("Sections") .Where(t => t.TeacherID == teacherId) .Select(e => new { e.TeacherSubjectID, e.TeacherID, TeacherName = e.Teachers.Name, e.SubjectID, SubjectCode = e.Subjects.Code, SubjectName = e.Subjects.Name, SubjectNameAr = e.Subjects.NameAr, Id = e.SubjectID, Code = e.Subjects.Code, Name = e.Subjects.Name, NameAr = e.Subjects.NameAr }); //return query.ToList(); //entities.TeachersSubjects.Include("Classes").Include("Shifts").Include("Sections"); return this.Request.CreateResponse(HttpStatusCode.OK, query.ToList()); } // POST api/<controller> [Route("api/TeachersSubjects/{TeacherID}/{SubjectIDs}")] public HttpResponseMessage Post(int TeacherID, string SubjectIDs) { try { foreach (string ID in SubjectIDs.Split(',')) { entities.TeachersSubjects.Add(new TeachersSubjects() { TeacherID = TeacherID, SubjectID = Convert.ToInt32(ID) }); } entities.SaveChanges(); return Request.CreateResponse(HttpStatusCode.OK, "Done ..."); } //catch (Exception e) //{ // return Request.CreateResponse(HttpStatusCode.BadRequest, "I have some issue ..."); //} catch (DbUpdateException dbEx) { throw dbEx; //return Request.CreateResponse(HttpStatusCode.BadRequest, "I have more issue ..."); //StringBuilder sb = new StringBuilder(); //foreach (var item in dbEx.EntityValidationErrors) //{ // sb.Append(item + " errors: "); // foreach (var i in item.ValidationErrors) // { // sb.Append(i.PropertyName + " : " + i.ErrorMessage); // } // sb.Append(Environment.NewLine); //} ////throw new ApiDataException(GetErrorCode(dbEx), sb.ToString(), HttpStatusCode.BadRequest); //throw new ApiDataException(1021, "too many errors ...", HttpStatusCode.BadRequest); //return Request.CreateResponse(HttpStatusCode.OK, sb.ToString()); } //catch (DbUpdateException ex) //{ // throw ex; // //return Request.CreateResponse(HttpStatusCode.BadRequest, ex); //} } //// GET api/<controller>/5/1/2 //[Route("api/TeachersSubjects/{ShiftId}/{ClassId}/{SectionId}")] //public TeachersSubjects Get(int ShiftId, int ClassId, int SectionId) //{ // entities.Configuration.ProxyCreationEnabled = false; // TeachersSubjects TeacherSubject = entities.TeachersSubjects // .Where(t => t.ShiftID == ShiftId && t.ClassID == ClassId && t.SectionID == SectionId).FirstOrDefault(); // if (TeacherSubject == null) // { // TeacherSubject = new TeachersSubjects() { ClassID = 0 }; // } // return TeacherSubject; //} //[Route("api/TeachersSubjectsById/{id}")] //public TeachersSubjects Get(int id) //{ // entities.Configuration.ProxyCreationEnabled = false; // return entities.TeachersSubjects.Where(t => t.TeacherSubjectID == id).FirstOrDefault(); //} // POST api/<controller> //public HttpResponseMessage Post(TeachersSubjects teacher) //{ // try // { // entities.TeachersSubjects.Add(new TeachersSubjects() // { // TeacherID = teacher.TeacherID, // SubjectID = teacher.SubjectID // }); // entities.SaveChanges(); // return Request.CreateResponse(HttpStatusCode.OK, "Done ..."); // } // //catch (Exception e) // //{ // // return Request.CreateResponse(HttpStatusCode.BadRequest, "I have some issue ..."); // //} // catch (DbUpdateException dbEx) // { // throw dbEx; // //return Request.CreateResponse(HttpStatusCode.BadRequest, "I have more issue ..."); // //StringBuilder sb = new StringBuilder(); // //foreach (var item in dbEx.EntityValidationErrors) // //{ // // sb.Append(item + " errors: "); // // foreach (var i in item.ValidationErrors) // // { // // sb.Append(i.PropertyName + " : " + i.ErrorMessage); // // } // // sb.Append(Environment.NewLine); // //} // ////throw new ApiDataException(GetErrorCode(dbEx), sb.ToString(), HttpStatusCode.BadRequest); // //throw new ApiDataException(1021, "too many errors ...", HttpStatusCode.BadRequest); // //return Request.CreateResponse(HttpStatusCode.OK, sb.ToString()); // } // //catch (DbUpdateException ex) // //{ // // throw ex; // // //return Request.CreateResponse(HttpStatusCode.BadRequest, ex); // //} //} private int GetErrorCode(DbEntityValidationException dbEx) { int ErrorCode = (int)HttpStatusCode.BadRequest; if (dbEx.InnerException != null && dbEx.InnerException.InnerException != null) { if (dbEx.InnerException.InnerException is SqlException) { ErrorCode = (dbEx.InnerException.InnerException as SqlException).Number; } } return ErrorCode; } // PUT api/<controller>/5 public void Put(TeachersSubjects TeacherSubject) { try { var entity = entities.TeachersSubjects.Find(TeacherSubject.TeacherSubjectID); if (entity != null) { entities.Entry(entity).CurrentValues.SetValues(TeacherSubject); entities.SaveChanges(); } } catch //(DbUpdateException) { throw; } } /* // DELETE api/<controller>/5 public void Delete(int id) { try { var teacher = new TeachersSubjects { TeacherId = id }; if (teacher != null) { entities.Entry(teacher).State = EntityState.Deleted; entities.TeachersSubjects.Remove(teacher); entities.SaveChanges(); } } catch (Exception) { throw; } } */ [HttpPost] [Route("api/RemoveTeacherSubject/{id}")] public HttpResponseMessage RemoveTeacherSubject(int id) { try { var TeacherSubject = new TeachersSubjects { TeacherSubjectID = id }; if (TeacherSubject != null) { entities.Entry(TeacherSubject).State = EntityState.Deleted; entities.TeachersSubjects.Remove(TeacherSubject); entities.SaveChanges(); return Request.CreateResponse(HttpStatusCode.OK, "Removed..."); } else return Request.CreateResponse(HttpStatusCode.NotFound, "not found..."); } catch (Exception ex) { return Request.CreateResponse(HttpStatusCode.BadRequest, ex); //return Request.CreateResponse(HttpStatusCode.BadRequest, ex.Message + // " inner ex: " + ex.InnerException !=null ? ex.InnerException.Message : "null" ); //throw; } } protected override void Dispose(bool disposing) { if (disposing) { entities.Dispose(); } base.Dispose(disposing); } } }
Java
<?php namespace QnNguyen\EdtUbxNS\Condition; /** * Class MatchInArray * Check if an element exists in an array * @package QnNguyen\EdtUbxNS\Condition */ class MatchInArray extends PropertyCondition { /** * @param $value * @return bool */ function typeCheck($value) { return is_array($value); } /** * @param $value * @return boolean */ function doTest($value) { foreach ($value as $arrayItem) { if ($this->_regex_test($this->regexPattern, $arrayItem)) { return true; } } return false; } }
Java
// Week 5 - Task 7 import java.io.PrintWriter; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.io.*; public class TCPSerServer { private static ServerSocket servSock; private static final int PORT = 1234; public static void main(String[] args) { System.out.println("!!!Opening port...\n"); try { servSock = new ServerSocket(PORT); } catch(IOException e) { System.out.println("Unable to attach to port!"); System.exit(1); } do { run(); }while (true); } private static void run() { Socket link = null; try{ link = servSock.accept(); PrintWriter out = new PrintWriter(link.getOutputStream(),true); ObjectInputStream istream = new ObjectInputStream (link.getInputStream()); Person p = null; while(true){ try{ p = (Person)istream.readObject(); System.out.println("SERVER - Received: New object.\n"); System.out.println("SERVER - Received: Person name=" + p.getName()); System.out.println("SERVER - Received: Person age=" + p.getAge()); System.out.println("SERVER - Received: Person address=" + p.getAddress()); out.println("Person object received."); } catch (Exception e) { System.out.println("Exception in run"); System.out.println("\n* Closing connection... *"); break; } } } catch(IOException e) { e.printStackTrace(); } finally { try { System.out.println("\n* Closing connection... *"); link.close(); } catch(IOException e) { System.out.println("Unable to disconnect!"); System.exit(1); } } } }
Java
<?php namespace Easybill\ZUGFeRD211\Model; use JMS\Serializer\Annotation\SerializedName; use JMS\Serializer\Annotation\Type; use JMS\Serializer\Annotation\XmlElement; class DocumentLineDocument { /** * @Type("string") * @XmlElement(cdata = false, namespace = "urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100") * @SerializedName("LineID") */ public string $lineId; public static function create(string $lineId): self { $self = new self(); $self->lineId = $lineId; return $self; } }
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>menhirlib: 43 s 🏆</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.7.1 / menhirlib - 20200123</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> menhirlib <small> 20200123 <span class="label label-success">43 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-11-16 15:55:17 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-16 15:55:17 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.08.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.08.1 Official release 4.08.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # 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/menhir&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.12&quot; } ] conflicts: [ &quot;menhir&quot; { != &quot;20200123&quot; } ] tags: [ &quot;date:2020-01-23&quot; &quot;logpath:MenhirLib&quot; ] url { src: &quot;https://gitlab.inria.fr/fpottier/menhir/-/archive/20200123/archive.tar.gz&quot; checksum: [ &quot;md5=91aeae45fbf781e82ec3fe636be6ad49&quot; &quot;sha512=4a7c4a72d4437940a0f62d402f783efcf357dde6f0a9e9f164c315148776e4642a822b6472f1e6e641164d110bc1ee05a6c1ad4a733f5defe4603b6072c1a34f&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.20200123 coq.8.7.1</code></dd> <dt>Return code</dt> <dd>0</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>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-menhirlib.20200123 coq.8.7.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>13 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-menhirlib.20200123 coq.8.7.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>43 s</dd> </dl> <h2>Installation size</h2> <p>Total: 6 M</p> <ul> <li>2 M <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter_complete.vo</code></li> <li>1 M <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Main.vo</code></li> <li>1 M <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_complete.vo</code></li> <li>333 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter.vo</code></li> <li>264 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter_correct.vo</code></li> <li>156 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_safe.vo</code></li> <li>124 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Automaton.vo</code></li> <li>105 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter_complete.glob</code></li> <li>87 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Alphabet.vo</code></li> <li>80 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Grammar.vo</code></li> <li>42 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter.glob</code></li> <li>41 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_classes.vo</code></li> <li>38 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_complete.glob</code></li> <li>33 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Alphabet.glob</code></li> <li>33 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter_complete.v</code></li> <li>20 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter_correct.glob</code></li> <li>18 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_safe.glob</code></li> <li>18 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter.v</code></li> <li>15 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_complete.v</code></li> <li>11 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Grammar.glob</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Automaton.glob</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Alphabet.v</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_safe.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Main.glob</code></li> <li>7 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Interpreter_correct.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Automaton.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_classes.glob</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Grammar.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Main.v</code></li> <li>3 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Validator_classes.v</code></li> <li>2 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Version.vo</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Version.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/MenhirLib/Version.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-menhirlib.20200123</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
--- layout: attachment title: pic_md date: type: attachment published: false status: inherit categories: [] tags: [] meta: _wp_attached_file: 2013/05/pic_md-1p2ic7x.png _wp_attachment_metadata: a:6:{s:5:"width";s:3:"343";s:6:"height";s:3:"412";s:14:"hwstring_small";s:22:"height='96' width='79'";s:4:"file";s:26:"2013/05/pic_md-1p2ic7x.png";s:5:"sizes";a:2:{s:9:"thumbnail";a:3:{s:4:"file";s:26:"pic_md-1p2ic7x-150x150.png";s:5:"width";s:3:"150";s:6:"height";s:3:"150";}s:6:"medium";a:3:{s:4:"file";s:26:"pic_md-1p2ic7x-249x300.png";s:5:"width";s:3:"249";s:6:"height";s:3:"300";}}s:10:"image_meta";a:10:{s:8:"aperture";s:1:"0";s:6:"credit";s:0:"";s:6:"camera";s:0:"";s:7:"caption";s:0:"";s:17:"created_timestamp";s:1:"0";s:9:"copyright";s:0:"";s:12:"focal_length";s:1:"0";s:3:"iso";s:1:"0";s:13:"shutter_speed";s:1:"0";s:5:"title";s:0:"";}} author: login: rachels email: rachelkstaples@gmail.com display_name: Rachel first_name: Rachel last_name: Staples ---
Java
#include "nofx_ofSetOrientation.h" #include "ofAppRunner.h" namespace nofx { namespace AppRunner { NAN_METHOD(nofx_ofSetOrientation) { ofSetOrientation((ofOrientation) args[0]->Uint32Value()); NanReturnUndefined(); } // !nofx_ofSetOrientation } // !namespace AppRunner } // !namespace nofx
Java
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("6. Fold and Sum")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("6. Fold and Sum")] [assembly: AssemblyCopyright("Copyright © 2017")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("c1bd8400-c942-4329-ae49-a7752bbf68bd")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
Java
#Active Projects
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>relation-extraction: 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.7.1+2 / relation-extraction - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> relation-extraction <small> 8.5.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-11-21 02:02:39 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-21 02:02:39 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 1 Virtual package relying on perl coq 8.7.1+2 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;matej.kosik@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/relation-extraction&quot; license: &quot;GPL 3&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/RelationExtraction&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:extraction&quot; &quot;keyword:inductive relations&quot; &quot;keyword:semantics&quot; &quot;category:Computer Science/Semantics and Compilation/Compilation&quot; &quot;date:2011&quot; ] authors: [ &quot;Catherine Dubois &lt;&gt;&quot; &quot;David Delahaye &lt;&gt;&quot; &quot;Pierre-Nicolas Tollitte &lt;&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/relation-extraction/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/relation-extraction.git&quot; synopsis: &quot;Functions extraction from inductive relations&quot; description: &quot;&quot;&quot; This plugin introduces a new set of extraction commands that generates functional code form inductive specifications.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/relation-extraction/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=081bb10e77ea72dfef13df6b9f30248b&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-relation-extraction.8.5.0 coq.8.7.1+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.7.1+2). The following dependencies couldn&#39;t be met: - coq-relation-extraction -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) 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-relation-extraction.8.5.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_15) on Thu Mar 10 09:38:24 BRT 2011 --> <TITLE> DAO.exception </TITLE> <META NAME="date" CONTENT="2011-03-10"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <FONT size="+1" CLASS="FrameTitleFont"> <A HREF="../../DAO/exception/package-summary.html" target="classFrame">DAO.exception</A></FONT> <TABLE BORDER="0" WIDTH="100%" SUMMARY=""> <TR> <TD NOWRAP><FONT size="+1" CLASS="FrameHeadingFont"> Exceptions</FONT>&nbsp; <FONT CLASS="FrameItemFont"> <BR> <A HREF="InfraestruturaException.html" title="class in DAO.exception" target="classFrame">InfraestruturaException</A> <BR> <A HREF="ObjetoNaoEncontradoException.html" title="class in DAO.exception" target="classFrame">ObjetoNaoEncontradoException</A></FONT></TD> </TR> </TABLE> </BODY> </HTML>
Java
package top.cardone.func.vx.usercenter.userDepartment; import com.google.common.base.Charsets; import lombok.extern.log4j.Log4j2; import lombok.val; import org.apache.commons.io.FileUtils; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.core.io.Resource; import org.springframework.http.HttpEntity; import org.springframework.http.HttpHeaders; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.util.StopWatch; import top.cardone.ConsumerApplication; import top.cardone.context.ApplicationContextHolder; import java.io.IOException; @Log4j2 @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = ConsumerApplication.class, value = {"spring.profiles.active=test"}, webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT) public class D0002FuncTest { @Value("http://localhost:${server.port:8765}${server.servlet.context-path:}/vx/usercenter/userDepartment/d0002.json") private String funcUrl; @Value("file:src/test/resources/top/cardone/func/vx/usercenter/userDepartment/D0002FuncTest.func.input.json") private Resource funcInputResource; @Value("file:src/test/resources/top/cardone/func/vx/usercenter/userDepartment/D0002FuncTest.func.output.json") private Resource funcOutputResource; private HttpEntity<String> httpEntity; private int pressure = 10000; @Before public void setup() throws Exception { HttpHeaders headers = new HttpHeaders(); headers.setContentType(MediaType.APPLICATION_JSON_UTF8); headers.set("Accept", MediaType.APPLICATION_JSON_UTF8_VALUE); headers.set("token", ApplicationContextHolder.getBean(org.apache.shiro.authc.credential.PasswordService.class).encryptPassword("admin")); headers.set("username", "admin"); if (!funcInputResource.exists()) { FileUtils.write(funcInputResource.getFile(), "{}", Charsets.UTF_8); } String input = FileUtils.readFileToString(funcInputResource.getFile(), Charsets.UTF_8); httpEntity = new HttpEntity<>(input, headers); } @Test public void func() throws RuntimeException { String output = new org.springframework.boot.test.web.client.TestRestTemplate().postForObject(funcUrl, httpEntity, String.class); try { FileUtils.write(funcOutputResource.getFile(), output, Charsets.UTF_8); } catch (IOException e) { throw new RuntimeException(e); } } @Test public void pressureFunc() throws Exception { for (int i = 0; i < pressure; i++) { val sw = new StopWatch(); sw.start(funcUrl); new org.springframework.boot.test.web.client.TestRestTemplate().postForObject(funcUrl, httpEntity, String.class); sw.stop(); if (sw.getTotalTimeMillis() > 500) { log.error(sw.prettyPrint()); } else if (log.isDebugEnabled()) { log.debug(sw.prettyPrint()); } log.debug("pressured:" + (i + 1)); } } }
Java
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using InvoiceProcessing.Messages.Commands; using NServiceBus; using Shared; namespace Client { class Program { static void Main(string[] args) { MainAsync().GetAwaiter().GetResult(); } static async Task MainAsync() { var numberOfInvoices = 150; Console.Title = "Client"; Console.WriteLine($"Press a key to start a batch of {numberOfInvoices} customers."); Console.ReadKey(); var endpointConfiguration = new EndpointConfiguration("Client"); endpointConfiguration.ApplyCommonConfiguration(); endpointConfiguration.SendOnly(); // Routing var transport = endpointConfiguration.UseTransport<LearningTransport>(); transport.Routing().RouteToEndpoint(typeof(CreateInvoiceProposals).Assembly, "InvoiceProcessing"); // Start endpoint var sendOnlyEndpoint = await Endpoint.Start(endpointConfiguration); var customerIds = new List<Guid>(); for (int i = 0; i < numberOfInvoices; i++) { customerIds.Add(Guid.NewGuid()); } var msg = new CreateInvoiceProposals(); msg.BillingRunId = Guid.NewGuid(); msg.Customers = customerIds; await sendOnlyEndpoint.Send(msg); await sendOnlyEndpoint.Stop(); Console.WriteLine("Send out batch, press any key to quit..."); Console.ReadKey(); } } }
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>minic: 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.0 / minic - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> minic <small> 8.5.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-02-24 12:53:50 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-24 12:53:50 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 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-perl 2 Virtual package relying on perl coq 8.9.0 Formal proof management system num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.03.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.03.0 Official 4.03.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;matej.kosik@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/minic&quot; license: &quot;LGPL 2&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/MiniC&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:denotational semantics&quot; &quot;keyword:compilation&quot; &quot;category:Computer Science/Semantics and Compilation/Semantics&quot; ] authors: [ &quot;Eduardo Giménez &lt;&gt;&quot; &quot;Emmanuel Ledinot &lt;&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/minic/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/minic.git&quot; synopsis: &quot;Semantics of a subset of the C language&quot; description: &quot;&quot;&quot; This contribution defines the denotational semantics of MiniC, a sub-set of the C language. This sub-set is sufficiently large to contain any program generated by lustre2C. The denotation function describing the semantics of a MiniC program actually provides an interpreter for the program.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/minic/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=8d252b80c4fc1e1fce6d89b5a64c0b96&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-minic.8.5.0 coq.8.9.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.9.0). The following dependencies couldn&#39;t be met: - coq-minic -&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-minic.8.5.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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>presburger: 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 / presburger - 8.8.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> presburger <small> 8.8.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-02-26 23:22:14 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-02-26 23:22:14 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-m4 1 Virtual package relying on m4 coq 8.10.0 Formal proof management system num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.09.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.09.0 Official release 4.09.0 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.8.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Hugo.Herbelin@inria.fr&quot; homepage: &quot;https://github.com/coq-contribs/presburger&quot; license: &quot;LGPL 2.1&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/Presburger&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8&quot; &amp; &lt; &quot;8.9~&quot;} ] tags: [ &quot;keyword: Integers&quot; &quot;keyword: Arithmetic&quot; &quot;keyword: Decision Procedure&quot; &quot;keyword: Presburger&quot; &quot;category: Mathematics/Logic/Foundations&quot; &quot;category: Mathematics/Arithmetic and Number Theory/Miscellaneous&quot; &quot;category: Computer Science/Decision Procedures and Certified Algorithms/Decision procedures&quot; &quot;date: March 2002&quot; ] authors: [ &quot;Laurent Théry&quot; ] bug-reports: &quot;https://github.com/coq-contribs/presburger/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/presburger.git&quot; synopsis: &quot;Presburger&#39;s algorithm&quot; description: &quot;&quot;&quot; A formalization of Presburger&#39;s algorithm as stated in the initial paper by Presburger.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/presburger/archive/v8.8.0.tar.gz&quot; checksum: &quot;md5=a1b064cf124b40bae0df70e22630d2d6&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-presburger.8.8.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-presburger -&gt; coq &lt; 8.9~ -&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-presburger.8.8.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"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </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>
Java
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.9.1"/> <title>V8 API Reference Guide for node.js v0.1.92: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { init_search(); }); </script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">V8 API Reference Guide for node.js v0.1.92 </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.9.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main&#160;Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="examples.html"><span>Examples</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </li> </ul> </div> <div id="navrow2" class="tabs2"> <ul class="tablist"> <li><a href="annotated.html"><span>Class&#160;List</span></a></li> <li><a href="classes.html"><span>Class&#160;Index</span></a></li> <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li> <li><a href="functions.html"><span>Class&#160;Members</span></a></li> </ul> </div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="classv8_1_1_boolean.html">Boolean</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">v8::Boolean Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="classv8_1_1_boolean.html">v8::Boolean</a>, including all inherited members.</p> <table class="directory"> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>BooleanValue</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#adc2a7a92a120675bbd4c992163a20869">Equals</a>(Handle&lt; Value &gt; that) const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>Int32Value</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>IntegerValue</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classv8_1_1_value.html#aaee0b144087d20eae02314c9393ff80f">IsArray</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#a0aceb7645e71b096df5cd73d1252b1b0">IsBoolean</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classv8_1_1_value.html#a8bc11fab0aded4a805722ab6df173cae">IsDate</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#a7ac61a325c18af8dcb6d7d5bf47d2503">IsExternal</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classv8_1_1_value.html#a68c0296071d01ca899825d7643cf495a">IsFalse</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#a05532a34cdd215f273163830ed8b77e7">IsFunction</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classv8_1_1_value.html#a01e1db51c65b2feace248b7acbf71a2c">IsInt32</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#aa2c6ed8ef832223a7e2cd81e6ac61c78">IsNull</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classv8_1_1_value.html#a1bd51e3e55f67c65b9a8f587fbffb7c7">IsNumber</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#a355b7991c5c978c0341f6f961b63c5a2">IsObject</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classv8_1_1_value.html#ab23a34b7df62806808e01b0908bf5f00">IsString</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#a8f27462322186b295195eecb3e81d6d7">IsTrue</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr class="even"><td class="entry"><a class="el" href="classv8_1_1_value.html#a783c89631bac4ef3c4b909f40cc2b8d8">IsUint32</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#aea287b745656baa8a12a2ae1d69744b6">IsUndefined</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>New</b>(bool value) (defined in <a class="el" href="classv8_1_1_boolean.html">v8::Boolean</a>)</td><td class="entry"><a class="el" href="classv8_1_1_boolean.html">v8::Boolean</a></td><td class="entry"><span class="mlabel">inline</span><span class="mlabel">static</span></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>NumberValue</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>StrictEquals</b>(Handle&lt; Value &gt; that) const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr><td class="entry"><a class="el" href="classv8_1_1_value.html#ae810be0ae81a87f677592d0176daac48">ToArrayIndex</a>() const </td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>ToBoolean</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>ToDetailString</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>ToInt32</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>ToInteger</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>ToNumber</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>ToObject</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>ToString</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>ToUint32</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>Uint32Value</b>() const (defined in <a class="el" href="classv8_1_1_value.html">v8::Value</a>)</td><td class="entry"><a class="el" href="classv8_1_1_value.html">v8::Value</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>Value</b>() const (defined in <a class="el" href="classv8_1_1_boolean.html">v8::Boolean</a>)</td><td class="entry"><a class="el" href="classv8_1_1_boolean.html">v8::Boolean</a></td><td class="entry"></td></tr> </table></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Tue Aug 11 2015 23:44:42 for V8 API Reference Guide for node.js v0.1.92 by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.9.1 </small></address> </body> </html>
Java
'use strict'; // Configuring the Articles module angular.module('categories').run(['Menus', function(Menus) { // Set top bar menu items // Menus.addMenuItem('topbar', 'Categories', 'categories', 'item', '/categories(?:/[^/]+)?', null, null, 9); // Set admin menu items Menus.addMenuItem('admin', 'Categories', 'categories', 'dropdown', '/categories(/create)?'); Menus.addSubMenuItem('admin', 'categories', 'List Categories', 'categories'); Menus.addSubMenuItem('admin', 'categories', 'New Category', 'categories/create'); } ]);
Java
# Angular HTML Window AngularJS module that provides a draggable and resizable window directive. Based on https://github.com/rlamana/Ventus **This project is no longer maintained! However, feel free to fork and PR.** ## How to use ### Install via npm Install the package over npm. ``` npm i angular-html-window ``` ### Include in your project Include the css and javascript in your html file. ```html <link rel="stylesheet" type="text/css" href="path/to/library/ngHtmlWindow.css" /> <script type="text/javascript" src="path/to/library/ngHtmlWindow.js" /> ``` And include it as a dependency in your application. ```javascript angular.module('demo', ['ngHtmlWindow']); ``` ### Creating a window You can create windows by including the directive in your HTML. Use ng-repeat to iterate through a collection in the scope. ```html <ng-html-window options="options" ng-repeat="window in windows"> <!--your content goes here--> </ng-html-window> ``` ### Options Specify options and handlers in the options object. These are the standard values: ```javascript options = { title: 'Untitled window's, width: 400, height: 200, x: 0, y: 0, minWidth: 200, maxWidth: Infinity, minHeight: 100, maxHeight: Infinity, resizable: true, appendTo: element.parent(), onClose: function() { return true; } }; ``` **Important:** When using ng-repeat, you should provide a onClose handler function that deletes the window from your collection. ## Events Events are broadcast on the scope where the window is attached. This means they are available to any controller inside of the ng-html-window container. ### ngWindow.resize Dispatched when a window is resized, debounced to occur only every 50ms. ```javascript $scope.$on('ngWindow.resize', function(e, windowObject){}); ``` ### ngWindow.active Only one window can have the focus. When a window gets focused (by clicking it), a broadcast with a reference to the window is sent to all child scopes: ```javascript $scope.$on('ngWindow.active', function(e, windowObject){}); ``` ### ngWindow.inactive The same goes for when a window looses the focus: ```javascript $scope.$on('ngWindow.inactive', function(e, windowObject){}); ``` ## Z-Handling The extent of z-values used for the window layering ranges from and to those values. ```javascript var baseZ = 1000, maxZ = 2000; ``` Be sure to consider this when you want to display other elements on top or bellow the windows.
Java
<html> <title>代客訂位訂餐</title> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script> </head> <body> <div><form> 姓名 : <input type="text" id="name"> <br> 電話:<input type="text" id="phonenum"> <br> 日期:<select name="date_" id="date_"> <?php for($i=0; $i<7; $i++){ $temp = $dates[$i]; echo "<option value=\"".$temp."\">".$temp."</option>"; } ?> </select> <br> 時段:<select name="time_" id="time_"> <option value="0">11:00~13:00</option> <option value="1">13:00~15:00</option> <option value="2">17:00~19:00</option> <option value="3">19:00~21:00</option> </select> <br> 人數:<select name="quantity" id="quantity"> <?php for($i=1; $i<11; $i++){ echo "<option value=\"".$i."\">".$i."</option>"; } ?> </select> <br> <button class="myButton" id="submit">確認</button> <button class="myButton" type="button" onclick="window.location.replace('/CI/index.php/reservation');">回到大廳</button> <br> </form></div> <script> $(document).ready(function(){ $("#submit").click(function() { var order_confirm = confirm("是否訂菜?"); $.ajax({ url : "upload_seat_reservation_by_manager", type : "POST", dataType : "text", data : {"date_" : $('#date_').val(), "time_" : $('#time_').val(), "quantity" : $('#quantity').val(), "name" : $('#name').val(), "phonenum" : $('#phonenum').val()}, success : function(response){ var check = response; if(check == "c"){ if(!order_confirm){ window.location.replace("/CI/index.php/reservation/create_reservation"); }else{ window.location.replace("/CI/index.php/reservation/menu"); } } else if(check == "n"){ alert("no enough seat"); } else{ alert("invalid value"); } } }); }); }); </script> </body> </html> <style> body { background: url("http://127.0.0.1/CI/image/index_back.jpg"); background-size: cover; background-repeat: no-repeat; font-style: oblique; font-size: 18px; font-weight: bold; } div { background-color: #DDDDDD; width: 350px; height: 280px; margin-top: 150px; margin:0px auto; border-radius: 10px; box-shadow: 10px 10px 5px #111111; text-align:center; line-height:40px; } input { border: 1px solid #BBBBBB; //改變外框 background: #fff; // 背景色 /* 邊角圓弧化,不同瀏器覧設定不同 */ -moz-border-radius:3px; // Firefox -webkit-border-radius: 3px; // Safari 和 Chrome border-radius: 3px; // Opera 10.5+ } a{ text-decoration:none; color: #666666; } .myButton { margin-top: 15px; -moz-box-shadow:inset 0px 1px 0px 0px #ffffff; -webkit-box-shadow:inset 0px 1px 0px 0px #ffffff; box-shadow:inset 0px 1px 0px 0px #ffffff; background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #f9f9f9), color-stop(1, #e9e9e9)); background:-moz-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:-webkit-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:-o-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:-ms-linear-gradient(top, #f9f9f9 5%, #e9e9e9 100%); background:linear-gradient(to bottom, #f9f9f9 5%, #e9e9e9 100%); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#e9e9e9',GradientType=0); background-color:#f9f9f9; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; border:1px solid #807480; display:inline-block; cursor:pointer; color:#666666; font-family:Arial; font-size:15px; font-weight:bold; padding:11px 24px; text-decoration:none; text-shadow:0px 1px 0px #ffffff; } .myButton:hover { background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #e9e9e9), color-stop(1, #f9f9f9)); background:-moz-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:-webkit-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:-o-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:-ms-linear-gradient(top, #e9e9e9 5%, #f9f9f9 100%); background:linear-gradient(to bottom, #e9e9e9 5%, #f9f9f9 100%); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#e9e9e9', endColorstr='#f9f9f9',GradientType=0); background-color:#e9e9e9; } .myButton:active { position:relative; top:1px; } </style>
Java
/** * Created by zhang on 16/5/19. */ $.myjq = function () { alert("hello my jQuery") }; //js的扩展 $.fn.myjq=function(){ $(this).text("hello") };
Java
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace SocketClient.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); public static Settings Default { get { return defaultInstance; } } } }
Java
<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Module Hierarchy</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th bgcolor="#70b0f0" class="navbar-select" >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th> <!-- Index link --> <th>&nbsp;&nbsp;&nbsp;<a href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th> <!-- Help link --> <th>&nbsp;&nbsp;&nbsp;<a href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" ><a class="navbar" target="_top" href="file:///G:/Web%20Development/epydoc/">EIC Site-packages</a></th> </tr></table></th> </tr> </table> <table width="100%" cellpadding="0" cellspacing="0"> <tr valign="top"> <td width="100%">&nbsp;</td> <td> <table cellpadding="0" cellspacing="0"> <!-- hide/show private --> <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr> <tr><td align="right"><span class="options" >[<a href="frames.html" target="_top">frames</a >]&nbsp;|&nbsp;<a href="module-tree.html" target="_top">no&nbsp;frames</a>]</span></td></tr> </table> </td> </tr> </table> <center><b> [ <a href="module-tree.html">Module Hierarchy</a> | <a href="class-tree.html">Class Hierarchy</a> ] </b></center><br /> <h1 class="epydoc">Module Hierarchy</h1> <ul class="nomargin-top"> <li> <strong class="uidlink"><a href="bbpy-module.html">bbpy</a></strong>: <em class="summary">The BBpy module contains methods and classes that allow Python programs to interface with BBx data files and structures.</em> <ul> <li> <strong class="uidlink"><a href="bbpy.config-module.html">bbpy.config</a></strong>: <em class="summary">The config module contains classes for getting the BBx environment configuration information.</em> </li> <li> <strong class="uidlink"><a href="bbpy.files-module.html">bbpy.files</a></strong> <ul> <li> <strong class="uidlink"><a href="bbpy.files.mkeyed-module.html">bbpy.files.mkeyed</a></strong>: <em class="summary">Python utilities for reading and writing MKEYED files</em> </li> <li> <strong class="uidlink"><a href="bbpy.files.template-module.html">bbpy.files.template</a></strong> </li> </ul> </li> <li> <strong class="uidlink"><a href="bbpy.functions-module.html">bbpy.functions</a></strong> <ul> <li class="private"> <strong class="uidlink"><a href="bbpy.functions.bitwise-module.html" onclick="show_private();">bbpy.functions.bitwise</a></strong> </li> <li class="private"> <strong class="uidlink"><a href="bbpy.functions.checksums-module.html" onclick="show_private();">bbpy.functions.checksums</a></strong> </li> </ul> </li> <li> <strong class="uidlink"><a href="bbpy.strings-module.html">bbpy.strings</a></strong> </li> <li> <strong class="uidlink"><a href="bbpy.util-module.html">bbpy.util</a></strong>: <em class="summary">Utility functions for BBPy</em> </li> </ul> </li> <li> <strong class="uidlink"><a href="dateutil-module.html">dateutil</a></strong>: <em class="summary">Copyright (c) 2003-2010 Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;</em> <ul> <li> <strong class="uidlink"><a href="dateutil.easter-module.html">dateutil.easter</a></strong>: <em class="summary">Copyright (c) 2003-2007 Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;</em> </li> <li> <strong class="uidlink"><a href="dateutil.parser-module.html">dateutil.parser</a></strong>: <em class="summary">Copyright (c) 2003-2007 Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;</em> </li> <li> <strong class="uidlink"><a href="dateutil.relativedelta-module.html">dateutil.relativedelta</a></strong>: <em class="summary">Copyright (c) 2003-2010 Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;</em> </li> <li> <strong class="uidlink"><a href="dateutil.rrule-module.html">dateutil.rrule</a></strong>: <em class="summary">Copyright (c) 2003-2010 Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;</em> </li> <li> <strong class="uidlink"><a href="dateutil.tz-module.html">dateutil.tz</a></strong>: <em class="summary">Copyright (c) 2003-2007 Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;</em> </li> <li> <strong class="uidlink"><a href="dateutil.tzwin-module.html">dateutil.tzwin</a></strong> </li> <li> <strong class="uidlink"><a href="dateutil.zoneinfo-module.html">dateutil.zoneinfo</a></strong>: <em class="summary">Copyright (c) 2003-2005 Gustavo Niemeyer &lt;gustavo@niemeyer.net&gt;</em> </li> </ul> </li> <li> <strong class="uidlink"><a href="eicpy-module.html">eicpy</a></strong> <ul> <li> <strong class="uidlink"><a href="eicpy.address-module.html">eicpy.address</a></strong> </li> <li> <strong class="uidlink"><a href="eicpy.beta-module.html">eicpy.beta</a></strong>: <em class="summary">Check for agent allowed to access Beta features</em> </li> <li> <strong class="uidlink"><a href="eicpy.bridge-module.html">eicpy.bridge</a></strong> <ul> <li> <strong class="uidlink"><a href="eicpy.bridge.acordxml-module.html">eicpy.bridge.acordxml</a></strong> </li> <li> <strong class="uidlink"><a href="eicpy.bridge.bridge-module.html">eicpy.bridge.bridge</a></strong> </li> <li> <strong class="uidlink"><a href="eicpy.bridge.common-module.html">eicpy.bridge.common</a></strong> </li> <li> <strong class="uidlink"><a href="eicpy.bridge.common_itc-module.html">eicpy.bridge.common_itc</a></strong> </li> </ul> </li> <li> <strong class="uidlink"><a href="eicpy.cgierror-module.html">eicpy.cgierror</a></strong>: <em class="summary">Traceback formatting for Equity's Python programs, inspired by Ka-Ping Yee's cgitb.</em> </li> <li> <strong class="uidlink"><a href="eicpy.coverage-module.html">eicpy.coverage</a></strong>: <em class="summary">Coverage library for accessing rate coverages</em> </li> <li> <strong class="uidlink"><a href="eicpy.data-module.html">eicpy.data</a></strong>: <em class="summary">This module encapsulates the best (fastest) way to retrieve data from legacy sources.</em> </li> <li> <strong class="uidlink"><a href="eicpy.dcs-module.html">eicpy.dcs</a></strong>: <em class="summary">Module for interfacing with DCS.</em> </li> <li> <strong class="uidlink"><a href="eicpy.elf-module.html">eicpy.elf</a></strong>: <em class="summary">Base classes for eLink currently only used for endorsements (endorsement/edriver.py, etc.)</em> </li> <li> <strong class="uidlink"><a href="eicpy.encrypt-module.html">eicpy.encrypt</a></strong>: <em class="summary">A replacement for SUBR.ENCRYPT; reverse-engineering ENCRYPT:</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement-module.html">eicpy.endorsement</a></strong>: <em class="summary">The endorsement module contains methods and classes for eLink endorsements</em> <ul> <li> <strong class="uidlink"><a href="eicpy.endorsement.edriver-module.html">eicpy.endorsement.edriver</a></strong>: <em class="summary">Endorsement driver that uses the elf.py Driver class</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement.endapply-module.html">eicpy.endorsement.endapply</a></strong>: <em class="summary">Endorsement request applied</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement.epolicy-module.html">eicpy.endorsement.epolicy</a></strong>: <em class="summary">Endorsement policy that uses the elf.py Policy class</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement.erequest-module.html">eicpy.endorsement.erequest</a></strong>: <em class="summary">Endorsement request classes</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement.ersdriver-module.html">eicpy.endorsement.ersdriver</a></strong>: <em class="summary">Endorsement request driver class</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement.ersvehicle-module.html">eicpy.endorsement.ersvehicle</a></strong>: <em class="summary">Endorsement request vehicle class</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement.evehicle-module.html">eicpy.endorsement.evehicle</a></strong>: <em class="summary">Endorsement vehicle that uses the elf.py Vehicle class</em> </li> <li> <strong class="uidlink"><a href="eicpy.endorsement.misc-module.html">eicpy.endorsement.misc</a></strong>: <em class="summary">Miscellaneous utilities for endorsements</em> </li> </ul> </li> <li> <strong class="uidlink"><a href="eicpy.erroremail-module.html">eicpy.erroremail</a></strong>: <em class="summary">This script is designed to handle error emails for the web side for both Python and BBx.</em> </li> <li> <strong class="uidlink"><a href="eicpy.insureds-module.html">eicpy.insureds</a></strong> <ul> <li> <strong class="uidlink"><a href="eicpy.insureds.mobile-module.html">eicpy.insureds.mobile</a></strong> <ul> <li> <strong class="uidlink"><a href="eicpy.insureds.mobile.eicmobile-module.html">eicpy.insureds.mobile.eicmobile</a></strong> </li> </ul> </li> <li> <strong class="uidlink"><a href="eicpy.insureds.pesession-module.html">eicpy.insureds.pesession</a></strong>: <em class="summary">Sessions to work like previously created BBx PE.VALIDATE.SESSION</em> </li> <li> <strong class="uidlink"><a href="eicpy.insureds.policelink-module.html">eicpy.insureds.policelink</a></strong>: <em class="summary">Polic-elink main python library script that's used heavily in mobile</em> </li> </ul> </li> <li> <strong class="uidlink"><a href="eicpy.irupload-module.html">eicpy.irupload</a></strong>: <em class="summary">ImageRight Upload utilities</em> </li> <li> <strong class="uidlink"><a href="eicpy.misc-module.html">eicpy.misc</a></strong>: <em class="summary">Miscellaneous functions</em> </li> <li> <strong class="uidlink"><a href="eicpy.multiagent-module.html">eicpy.multiagent</a></strong>: <em class="summary">Multi state agent utilities</em> </li> <li> <strong class="uidlink"><a href="eicpy.name_build-module.html">eicpy.name_build</a></strong> </li> <li> <strong class="uidlink"><a href="eicpy.paypal-module.html">eicpy.paypal</a></strong>: <em class="summary">PayPal payment library</em> </li> <li> <strong class="uidlink"><a href="eicpy.pdf-module.html">eicpy.pdf</a></strong>: <em class="summary">PDF handling for eLink including Printall functionality</em> </li> <li> <strong class="uidlink"><a href="eicpy.rpc-module.html">eicpy.rpc</a></strong> <ul> <li class="private"> <strong class="uidlink"><a href="eicpy.rpc.driver-module.html" onclick="show_private();">eicpy.rpc.driver</a></strong>: <em class="summary">Location tools for XML-RPC.</em> </li> <li class="private"> <strong class="uidlink"><a href="eicpy.rpc.location-module.html" onclick="show_private();">eicpy.rpc.location</a></strong>: <em class="summary">Location tools for XML-RPC.</em> </li> <li class="private"> <strong class="uidlink"><a href="eicpy.rpc.vehicle-module.html" onclick="show_private();">eicpy.rpc.vehicle</a></strong>: <em class="summary">Vehicle tools for XML-RPC.</em> </li> <li class="private"> <strong class="uidlink"><a href="eicpy.rpc.voucher-module.html" onclick="show_private();">eicpy.rpc.voucher</a></strong>: <em class="summary">Voucher tools for XML-RPC.</em> </li> </ul> </li> <li> <strong class="uidlink"><a href="eicpy.sql-module.html">eicpy.sql</a></strong>: <em class="summary">This module contains ezsql and supporting classes and functions.</em> </li> <li> <strong class="uidlink"><a href="eicpy.vehicle-module.html">eicpy.vehicle</a></strong>: <em class="summary">Vehicle lookups including VIN, makes and models</em> </li> <li> <strong class="uidlink"><a href="eicpy.www-module.html">eicpy.www</a></strong>: <em class="summary">Python module for Building a Web page using Zope Page Templates</em> </li> <li> <strong class="uidlink"><a href="eicpy.yourpay-module.html">eicpy.yourpay</a></strong>: <em class="summary">YourPay request and response utility</em> </li> </ul> </li> <li> <strong class="uidlink"><a href="simplejson-module.html">simplejson</a></strong>: <em class="summary">JSON (JavaScript Object Notation) &lt;http://json.org&gt; is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format.</em> <ul> <li class="private"> <strong class="uidlink"><a href="simplejson._speedups-module.html" onclick="show_private();">simplejson._speedups</a></strong>: <em class="summary">simplejson speedups</em> </li> <li class="private"> <strong class="uidlink"><a href="simplejson.decoder-module.html" onclick="show_private();">simplejson.decoder</a></strong>: <em class="summary">Implementation of JSONDecoder</em> </li> <li class="private"> <strong class="uidlink"><a href="simplejson.encoder-module.html" onclick="show_private();">simplejson.encoder</a></strong>: <em class="summary">Implementation of JSONEncoder</em> </li> <li> <strong class="uidlink"><a href="simplejson.ordered_dict-module.html">simplejson.ordered_dict</a></strong>: <em class="summary">Drop-in replacement for collections.OrderedDict by Raymond Hettinger</em> </li> <li class="private"> <strong class="uidlink"><a href="simplejson.scanner-module.html" onclick="show_private();">simplejson.scanner</a></strong>: <em class="summary">JSON token scanner</em> </li> <li> <strong class="uidlink"><a href="simplejson.tool-module.html">simplejson.tool</a></strong>: <em class="summary">Command-line tool to validate and pretty-print JSON</em> </li> </ul> </li> </ul> <!-- ==================== NAVIGATION BAR ==================== --> <table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0"> <tr valign="middle"> <!-- Tree link --> <th bgcolor="#70b0f0" class="navbar-select" >&nbsp;&nbsp;&nbsp;Trees&nbsp;&nbsp;&nbsp;</th> <!-- Index link --> <th>&nbsp;&nbsp;&nbsp;<a href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th> <!-- Help link --> <th>&nbsp;&nbsp;&nbsp;<a href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th> <!-- Project homepage --> <th class="navbar" align="right" width="100%"> <table border="0" cellpadding="0" cellspacing="0"> <tr><th class="navbar" align="center" ><a class="navbar" target="_top" href="file:///G:/Web%20Development/epydoc/">EIC Site-packages</a></th> </tr></table></th> </tr> </table> <table border="0" cellpadding="0" cellspacing="0" width="100%%"> <tr> <td align="left" class="footer"> <a href="epydoc-log.html">Generated by Epydoc 3.0.1 on Mon Oct 8 11:15:33 2012</a> </td> <td align="right" class="footer"> <a target="mainFrame" href="http://epydoc.sourceforge.net" >http://epydoc.sourceforge.net</a> </td> </tr> </table> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>
Java
// Generated by CoffeeScript 1.10.0 var Graphics; Graphics = (function() { function Graphics(ctx, viewport1) { this.ctx = ctx; this.viewport = viewport1; this.transform = { x: 0, y: 0, rotation: 0, scale: 1 }; } Graphics.prototype.translate = function(dx, dy) { this.transform.x += dx; this.transform.y += dy; return this.ctx.translate(dx, dy); }; Graphics.prototype.setColor = function(color) { this.ctx.fillStyle = color; return this.ctx.strokeStyle = color; }; Graphics.prototype.setLineWidth = function(linewidth) { return this.ctx.lineWidth = linewidth; }; Graphics.prototype.setFont = function(fontdef) { return this.ctx.font = fontdef; }; Graphics.prototype.drawArc = function(x, y, r, sAngle, eAngle) { this.ctx.beginPath(); this.ctx.arc(x, y, r, sAngle, eAngle, true); return this.ctx.stroke(); }; Graphics.prototype.fillArc = function(x, y, r, sAngle, eAngle) { this.ctx.beginPath(); this.ctx.arc(x, y, r, sAngle, eAngle, true); return this.ctx.fill(); }; Graphics.prototype.drawCircle = function(x, y, r) { return this.drawArc(x, y, r, 0, 2 * Math.PI); }; Graphics.prototype.fillCircle = function(x, y, r) { return this.fillArc(x, y, r, 0, 2 * Math.PI); }; Graphics.prototype.drawRect = function(x, y, width, height) { return this.ctx.strokeRect(x, y, width, height); }; Graphics.prototype.fillRect = function(x, y, width, height) { return this.ctx.fillRect(x, y, width, height); }; Graphics.prototype.drawText = function(x, y, text) { return this.ctx.fillText(text, x, y); }; Graphics.prototype.drawLine = function(x1, y1, x2, y2) { this.ctx.beginPath(); this.ctx.moveTo(x1, y1); this.ctx.lineTo(x2, y2); return this.ctx.stroke(); }; Graphics.prototype.drawPoly = function(ptlist) { var i, len, pt; this.ctx.beginPath(); this.ctx.moveTo(ptlist[0].x, ptlist[0].y); for (i = 0, len = ptlist.length; i < len; i++) { pt = ptlist[i]; this.ctx.lineTo(pt.x, pt.y); } this.ctx.closePath(); return this.ctx.stroke(); }; Graphics.prototype.fillPoly = function(ptlist) { var i, len, pt; this.ctx.beginPath(); this.ctx.moveTo(ptlist[0].x, ptlist[0].y); for (i = 0, len = ptlist.length; i < len; i++) { pt = ptlist[i]; this.ctx.lineTo(pt.x, pt.y); } this.ctx.closePath(); return this.ctx.fill(); }; return Graphics; })(); exports.createFromCanvas = function(canvas, viewport) { return new Graphics(canvas.getContext('2d'), viewport); };
Java
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><HTML> <HEAD> <TITLE></TITLE> </HEAD> <BODY> <A href="W29357.pdfs.html#outline" target="contents">Outline</a><br><A href="W29357.pdfs.html#1" target="contents" >Page 1</a><br> <A href="W29357.pdfs.html#2" target="contents" >Page 2</a><br> <A href="W29357.pdfs.html#3" target="contents" >Page 3</a><br> <A href="W29357.pdfs.html#4" target="contents" >Page 4</a><br> <A href="W29357.pdfs.html#5" target="contents" >Page 5</a><br> <A href="W29357.pdfs.html#6" target="contents" >Page 6</a><br> <A href="W29357.pdfs.html#7" target="contents" >Page 7</a><br> <A href="W29357.pdfs.html#8" target="contents" >Page 8</a><br> <A href="W29357.pdfs.html#9" target="contents" >Page 9</a><br> <A href="W29357.pdfs.html#10" target="contents" >Page 10</a><br> <A href="W29357.pdfs.html#11" target="contents" >Page 11</a><br> <A href="W29357.pdfs.html#12" target="contents" >Page 12</a><br> <A href="W29357.pdfs.html#13" target="contents" >Page 13</a><br> <A href="W29357.pdfs.html#14" target="contents" >Page 14</a><br> <A href="W29357.pdfs.html#15" target="contents" >Page 15</a><br> <A href="W29357.pdfs.html#16" target="contents" >Page 16</a><br> <A href="W29357.pdfs.html#17" target="contents" >Page 17</a><br> <A href="W29357.pdfs.html#18" target="contents" >Page 18</a><br> <A href="W29357.pdfs.html#19" target="contents" >Page 19</a><br> <A href="W29357.pdfs.html#20" target="contents" >Page 20</a><br> <A href="W29357.pdfs.html#21" target="contents" >Page 21</a><br> <A href="W29357.pdfs.html#22" target="contents" >Page 22</a><br> <A href="W29357.pdfs.html#23" target="contents" >Page 23</a><br> <A href="W29357.pdfs.html#24" target="contents" >Page 24</a><br> <A href="W29357.pdfs.html#25" target="contents" >Page 25</a><br> <A href="W29357.pdfs.html#26" target="contents" >Page 26</a><br> <A href="W29357.pdfs.html#27" target="contents" >Page 27</a><br> <A href="W29357.pdfs.html#28" target="contents" >Page 28</a><br> <A href="W29357.pdfs.html#29" target="contents" >Page 29</a><br> <A href="W29357.pdfs.html#30" target="contents" >Page 30</a><br> <A href="W29357.pdfs.html#31" target="contents" >Page 31</a><br> <A href="W29357.pdfs.html#32" target="contents" >Page 32</a><br> <A href="W29357.pdfs.html#33" target="contents" >Page 33</a><br> <A href="W29357.pdfs.html#34" target="contents" >Page 34</a><br> <A href="W29357.pdfs.html#35" target="contents" >Page 35</a><br> <A href="W29357.pdfs.html#36" target="contents" >Page 36</a><br> <A href="W29357.pdfs.html#37" target="contents" >Page 37</a><br> <A href="W29357.pdfs.html#38" target="contents" >Page 38</a><br> <A href="W29357.pdfs.html#39" target="contents" >Page 39</a><br> <A href="W29357.pdfs.html#40" target="contents" >Page 40</a><br> <A href="W29357.pdfs.html#41" target="contents" >Page 41</a><br> <A href="W29357.pdfs.html#42" target="contents" >Page 42</a><br> <A href="W29357.pdfs.html#43" target="contents" >Page 43</a><br> <A href="W29357.pdfs.html#44" target="contents" >Page 44</a><br> <A href="W29357.pdfs.html#45" target="contents" >Page 45</a><br> <A href="W29357.pdfs.html#46" target="contents" >Page 46</a><br> <A href="W29357.pdfs.html#47" target="contents" >Page 47</a><br> <A href="W29357.pdfs.html#48" target="contents" >Page 48</a><br> <A href="W29357.pdfs.html#49" target="contents" >Page 49</a><br> <A href="W29357.pdfs.html#50" target="contents" >Page 50</a><br> <A href="W29357.pdfs.html#51" target="contents" >Page 51</a><br> <A href="W29357.pdfs.html#52" target="contents" >Page 52</a><br> <A href="W29357.pdfs.html#53" target="contents" >Page 53</a><br> <A href="W29357.pdfs.html#54" target="contents" >Page 54</a><br> <A href="W29357.pdfs.html#55" target="contents" >Page 55</a><br> <A href="W29357.pdfs.html#56" target="contents" >Page 56</a><br> <A href="W29357.pdfs.html#57" target="contents" >Page 57</a><br> <A href="W29357.pdfs.html#58" target="contents" >Page 58</a><br> <A href="W29357.pdfs.html#59" target="contents" >Page 59</a><br> <A href="W29357.pdfs.html#60" target="contents" >Page 60</a><br> <A href="W29357.pdfs.html#61" target="contents" >Page 61</a><br> <A href="W29357.pdfs.html#62" target="contents" >Page 62</a><br> <A href="W29357.pdfs.html#63" target="contents" >Page 63</a><br> </BODY> </HTML>
Java
<?php // Autoload the library using Composer, if you're using a framework you shouldn't need to do this!! require_once '../vendor/autoload.php'; use Ballen\Dodns\CredentialManager; use Ballen\Dodns\Dodns; /** * Example of deleting a domain */ // We now create an instance of the DigitalOcean DNS client passing in our API credentials. $dns = new Dodns(new CredentialManager(file_get_contents('token.txt'))); // Set the domain entity that we wish to delete from our account... $domain = new \Ballen\Dodns\Entities\Domain(); $domain->setName('mytestdodmain.uk'); // Now we carry out the deletion and check if it was successful... if (!$dns->deleteDomain($domain)) { echo "An error occured and the domain could not be deleted!"; } else { echo sprintf("Congratulations, the domain <strong>%s</strong> has been deleted successfully!", $domain->getName()); }
Java
const strip_patterns = @compat(UInt32(0)) const strip_corrupt_utf8 = @compat(UInt32(0x1)) << 0 const strip_case = @compat(UInt32(0x1)) << 1 const stem_words = @compat(UInt32(0x1)) << 2 const tag_part_of_speech = @compat(UInt32(0x1)) << 3 const strip_whitespace = @compat(UInt32(0x1)) << 5 const strip_punctuation = @compat(UInt32(0x1)) << 6 const strip_numbers = @compat(UInt32(0x1)) << 7 const strip_non_letters = @compat(UInt32(0x1)) << 8 const strip_indefinite_articles = @compat(UInt32(0x1)) << 9 const strip_definite_articles = @compat(UInt32(0x1)) << 10 const strip_articles = (strip_indefinite_articles | strip_definite_articles) const strip_prepositions = @compat(UInt32(0x1)) << 13 const strip_pronouns = @compat(UInt32(0x1)) << 14 const strip_stopwords = @compat(UInt32(0x1)) << 16 const strip_sparse_terms = @compat(UInt32(0x1)) << 17 const strip_frequent_terms = @compat(UInt32(0x1)) << 18 const strip_html_tags = @compat(UInt32(0x1)) << 20 const alpha_sparse = 0.05 const alpha_frequent = 0.95 const regex_cache = Dict{AbstractString, Regex}() function mk_regex(regex_string) d = haskey(regex_cache, regex_string) ? regex_cache[regex_string] : (regex_cache[regex_string] = Regex(regex_string)) (length(regex_cache) > 50) && empty!(regex_cache) d end ############################################################################## # # Remove corrupt UTF8 characters # ############################################################################## function remove_corrupt_utf8(s::AbstractString) r = zeros(Char, endof(s)+1) i = 0 for chr in s i += 1 r[i] = (chr != 0xfffd) ? chr : ' ' end return utf8(CharString(r)) end remove_corrupt_utf8!(d::FileDocument) = error("FileDocument cannot be modified") function remove_corrupt_utf8!(d::StringDocument) d.text = remove_corrupt_utf8(d.text) nothing end function remove_corrupt_utf8!(d::TokenDocument) for i in 1:length(d.tokens) d.tokens[i] = remove_corrupt_utf8(d.tokens[i]) end end function remove_corrupt_utf8!(d::NGramDocument) new_ngrams = Dict{AbstractString, Int}() for token in keys(d.ngrams) new_token = remove_corrupt_utf8(token) if haskey(new_ngrams, new_token) new_ngrams[new_token] = new_ngrams[new_token] + 1 else new_ngrams[new_token] = 1 end end d.ngrams = new_ngrams end function remove_corrupt_utf8!(crps::Corpus) for doc in crps remove_corrupt_utf8!(doc) end end ############################################################################## # # Conversion to lowercase # ############################################################################## remove_case{T <: AbstractString}(s::T) = lowercase(s) remove_case!(d::FileDocument) = error("FileDocument cannot be modified") function remove_case!(d::StringDocument) d.text = remove_case(d.text) nothing end function remove_case!(d::TokenDocument) for i in 1:length(d.tokens) d.tokens[i] = remove_case(d.tokens[i]) end end function remove_case!(d::NGramDocument) new_ngrams = Dict{AbstractString, Int}() for token in keys(d.ngrams) new_token = remove_case(token) if haskey(new_ngrams, new_token) new_ngrams[new_token] = new_ngrams[new_token] + 1 else new_ngrams[new_token] = 1 end end d.ngrams = new_ngrams end function remove_case!(crps::Corpus) for doc in crps remove_case!(doc) end end ############################################################################## # # Stripping HTML tags # ############################################################################## const script_tags = Regex("<script\\b[^>]*>([\\s\\S]*?)</script>") const html_tags = Regex("<[^>]*>") function remove_html_tags(s::AbstractString) s = remove_patterns(s, script_tags) remove_patterns(s, html_tags) end function remove_html_tags!(d::AbstractDocument) error("HTML tags can be removed only from a StringDocument") end function remove_html_tags!(d::StringDocument) d.text = remove_html_tags(d.text) nothing end function remove_html_tags!(crps::Corpus) for doc in crps remove_html_tags!(doc) end end ############################################################################## # # Remove specified words # ############################################################################## function remove_words!{T <: AbstractString}(entity::(@compat Union{AbstractDocument,Corpus}), words::Vector{T}) skipwords = Set{AbstractString}() union!(skipwords, words) prepare!(entity, strip_patterns, skip_words = skipwords) end function remove_whitespace!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_whitespace! is deprecated, Use prepare! instead.") prepare!(entity, strip_whitespace) end function remove_punctuation!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_punctuation! is deprecated, Use prepare! instead.") prepare!(entity, strip_punctuation) end function remove_nonletters!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_nonletters! is deprecated, Use prepare! instead.") prepare!(entity, strip_non_letters) end function remove_numbers!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_numbers! is deprecated, Use prepare! instead.") prepare!(entity, strip_numbers) end function remove_articles!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_articles! is deprecated, Use prepare! instead.") prepare!(entity, strip_articles) end function remove_indefinite_articles!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_indefinite_articles! is deprecated, Use prepare! instead.") prepare!(entity, strip_indefinite_articles) end function remove_definite_articles!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_definite_articles! is deprecated, Use prepare! instead.") prepare!(entity, strip_definite_articles) end function remove_prepositions!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_prepositions! is deprecated, Use prepare! instead.") prepare!(entity, strip_prepositions) end function remove_pronouns!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_pronouns! is deprecated, Use prepare! instead.") prepare!(entity, strip_pronouns) end function remove_stop_words!(entity::(@compat Union{AbstractDocument,Corpus})) Base.warn_once("remove_stop_words! is deprecated, Use prepare! instead.") prepare!(entity, strip_stopwords) end ############################################################################## # # Part-of-Speech tagging # ############################################################################## tag_pos!(entity) = error("Not yet implemented") ############################################################################## # # Drop terms based on frequency # ############################################################################## function sparse_terms(crps::Corpus, alpha::Real = alpha_sparse) update_lexicon!(crps) update_inverse_index!(crps) res = Array(UTF8String, 0) ndocs = length(crps.documents) for term in keys(crps.lexicon) f = length(crps.inverse_index[term]) / ndocs if f <= alpha push!(res, utf8(term)) end end return res end function frequent_terms(crps::Corpus, alpha::Real = alpha_frequent) update_lexicon!(crps) update_inverse_index!(crps) res = Array(UTF8String, 0) ndocs = length(crps.documents) for term in keys(crps.lexicon) f = length(crps.inverse_index[term]) / ndocs if f >= alpha push!(res, utf8(term)) end end return res end # Sparse terms occur in less than x percent of all documents remove_sparse_terms!(crps::Corpus, alpha::Real = alpha_sparse) = remove_words!(crps, sparse_terms(crps, alpha)) # Frequent terms occur in more than x percent of all documents remove_frequent_terms!(crps::Corpus, alpha::Real = alpha_frequent) = remove_words!(crps, frequent_terms(crps, alpha)) ############################################################################## # # Remove parts from document based on flags or regular expressions # ############################################################################## function prepare!(crps::Corpus, flags::UInt32; skip_patterns = Set{AbstractString}(), skip_words = Set{AbstractString}()) ((flags & strip_sparse_terms) > 0) && union!(skip_words, sparse_terms(crps)) ((flags & strip_frequent_terms) > 0) && union!(skip_words, frequent_terms(crps)) ((flags & strip_corrupt_utf8) > 0) && remove_corrupt_utf8!(crps) ((flags & strip_case) > 0) && remove_case!(crps) ((flags & strip_html_tags) > 0) && remove_html_tags!(crps) lang = language(crps.documents[1]) # assuming all documents are of the same language - practically true r = _build_regex(lang, flags, skip_patterns, skip_words) !isempty(r.pattern) && remove_patterns!(crps, r) ((flags & stem_words) > 0) && stem!(crps) ((flags & tag_part_of_speech) > 0) && tag_pos!(crps) nothing end function prepare!(d::AbstractDocument, flags::UInt32; skip_patterns = Set{AbstractString}(), skip_words = Set{AbstractString}()) ((flags & strip_corrupt_utf8) > 0) && remove_corrupt_utf8!(d) ((flags & strip_case) > 0) && remove_case!(d) ((flags & strip_html_tags) > 0) && remove_html_tags!(d) r = _build_regex(language(d), flags, skip_patterns, skip_words) !isempty(r.pattern) && remove_patterns!(d, r) ((flags & stem_words) > 0) && stem!(d) ((flags & tag_part_of_speech) > 0) && tag_pos!(d) nothing end ## # internal helper methods function remove_patterns(s::AbstractString, rex::Regex) iob = IOBuffer() ibegin = 1 for m in matchall(rex, s) len = m.offset-ibegin+1 if len > 0 Base.write_sub(iob, s.data, ibegin, len) write(iob, ' ') end ibegin = m.endof+m.offset+1 end len = length(s.data) - ibegin + 1 (len > 0) && Base.write_sub(iob, s.data, ibegin, len) takebuf_string(iob) end function remove_patterns{T <: ByteString}(s::SubString{T}, rex::Regex) iob = IOBuffer() ioffset = s.offset data = s.string.data ibegin = 1 for m in matchall(rex, s) len = m.offset-ibegin+1 if len > 0 Base.write_sub(iob, data, ibegin+ioffset, len) write(iob, ' ') end ibegin = m.endof+m.offset+1 end len = s.endof - ibegin + 1 (len > 0) && Base.write_sub(iob, data, ibegin+ioffset, len) takebuf_string(iob) end remove_patterns!(d::FileDocument, rex::Regex) = error("FileDocument cannot be modified") function remove_patterns!(d::StringDocument, rex::Regex) d.text = remove_patterns(d.text, rex) nothing end function remove_patterns!(d::TokenDocument, rex::Regex) for i in 1:length(d.tokens) d.tokens[i] = remove_patterns(d.tokens[i], rex) end end function remove_patterns!(d::NGramDocument, rex::Regex) new_ngrams = Dict{AbstractString, Int}() for token in keys(d.ngrams) new_token = remove_patterns(token, rex) if haskey(new_ngrams, new_token) new_ngrams[new_token] = new_ngrams[new_token] + 1 else new_ngrams[new_token] = 1 end end d.ngrams = new_ngrams nothing end function remove_patterns!(crps::Corpus, rex::Regex) for doc in crps remove_patterns!(doc, rex) end end _build_regex(lang, flags::UInt32) = _build_regex(lang, flags, Set{AbstractString}(), Set{AbstractString}()) _build_regex{T <: AbstractString}(lang, flags::UInt32, patterns::Set{T}, words::Set{T}) = _combine_regex(_build_regex_patterns(lang, flags, patterns, words)) function _combine_regex{T <: AbstractString}(regex_parts::Set{T}) l = length(regex_parts) (0 == l) && return r"" (1 == l) && return mk_regex(pop!(regex_parts)) iob = IOBuffer() write(iob, "($(pop!(regex_parts)))") for part in regex_parts write(iob, "|($part)") end mk_regex(takebuf_string(iob)) end function _build_regex_patterns{T <: AbstractString}(lang, flags::UInt32, patterns::Set{T}, words::Set{T}) ((flags & strip_whitespace) > 0) && push!(patterns, "\\s+") if (flags & strip_non_letters) > 0 push!(patterns, "[^a-zA-Z\\s]") else ((flags & strip_punctuation) > 0) && push!(patterns, "[,;:.!?()]+") ((flags & strip_numbers) > 0) && push!(patterns, "\\d+") end if (flags & strip_articles) > 0 union!(words, articles(lang)) else ((flags & strip_indefinite_articles) > 0) && union!(words, indefinite_articles(lang)) ((flags & strip_definite_articles) > 0) && union!(words, definite_articles(lang)) end ((flags & strip_prepositions) > 0) && union!(words, prepositions(lang)) ((flags & strip_pronouns) > 0) && union!(words, pronouns(lang)) ((flags & strip_stopwords) > 0) && union!(words, stopwords(lang)) words_pattern = _build_words_pattern(collect(words)) !isempty(words_pattern) && push!(patterns, words_pattern) patterns end function _build_words_pattern{T <: AbstractString}(words::Vector{T}) isempty(words) && return "" iob = IOBuffer() write(iob, "\\b(") write(iob, words[1]) l = length(words) for idx in 2:l write(iob, '|') write(iob, words[idx]) end write(iob, ")\\b") takebuf_string(iob) end
Java
<?php namespace MB\Bundle\OptimizationBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader; /** * This is the class that loads and manages your bundle configuration * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html} */ class MBOptimizationExtension extends Extension { /** * {@inheritdoc} */ public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); $config = $this->processConfiguration($configuration, $configs); $container->setParameter('mb_optimization', $config); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); } }
Java
<?php /* Plugin Name: FramePress Plugin URI: http://framepress.co Description: Boost your plugins with extra power! Author: Ivan Lansky (@perecedero) Author URI: http://about.me/ivan.lansky */ //init framework require 'bootstrap.php';
Java
using System; using DogeNews.Web.Mvp.UserControls.ArticleComments.EventArguments; using WebFormsMvp; namespace DogeNews.Web.Mvp.UserControls.ArticleComments { public interface IArticleCommentsView : IView<ArticleCommentsViewModel> { event EventHandler<ArticleCommetnsPageLoadEventArgs> PageLoad; event EventHandler<AddCommentEventArguments> AddComment; } }
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>mtac2: 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 / extra-dev</a></li> <li class="active"><a href="">dev / mtac2 - 1.0.1+8.8</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> mtac2 <small> 1.0.1+8.8 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-01-20 06:05:22 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-01-20 06:05:22 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 dev 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;beta.ziliani@gmail.com&quot; homepage: &quot;https://github.com/Mtac2/Mtac2&quot; dev-repo: &quot;git+https://github.com/Mtac2/Mtac2.git&quot; bug-reports: &quot;https://github.com/Mtac2/Mtac2/issues&quot; authors: [&quot;Beta Ziliani &lt;beta.ziliani@gmail.com&gt;&quot; &quot;Jan-Oliver Kaiser &lt;janno@mpi-sws.org&gt;&quot; &quot;Robbert Krebbers &lt;mail@robbertkrebbers.nl&gt;&quot; &quot;Yann Régis-Gianas &lt;yrg@pps.univ-paris-diderot.fr&gt;&quot; &quot;Derek Dreyer &lt;dreyer@mpi-sws.org&gt;&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/Mtac2&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.8.0&quot; &amp; &lt; &quot;8.9~&quot;} &quot;coq-unicoq&quot; {&gt;= &quot;1.3~&quot; &amp; &lt; &quot;2~&quot;} ] synopsis: &quot;Mtac2: Typed Tactics for Coq&quot; flags: light-uninstall url { src: &quot;https://github.com/Mtac2/Mtac2/archive/v1.0.1-coq8.8.tar.gz&quot; checksum: &quot;md5=e4a139572dc91efc7fe63b933029264c&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-mtac2.1.0.1+8.8 coq.dev</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is dev). The following dependencies couldn&#39;t be met: - coq-mtac2 -&gt; coq &lt; 8.9~ -&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-mtac2.1.0.1+8.8</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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1, maximum-scale=1, user-scalable=no"> <style> .btn-block { display: block; height: 40px; line-height: 40px; margin: 10px auto; color: #fff; background: #8bc53f; border-radius: 10px; text-align: center; text-decoration: none; font-size: 14px; } .btn-block1 { display: block; height: 40px; line-height: 40px; margin: 10px auto; color: #fff; background: #868686; border-radius: 10px; text-align: center; text-decoration: none; font-size: 14px; } .content { text-align: left; font-size: 14px; margin-bottom: 25px; } </style> </head> <body> <br> <div class="btn-block" onclick="AppObject.appHandler('login','js调用App成功','')"> js调用App,App不用给js结果 </div> <div class="content">js调用App,App不用给js结果</div> <div class="btn-block" onclick="AppObject.appHandler('loginToResult','js调用App成功,给我反馈','loginToResult')"> js调用App,App给js结果 </div> <div class="content" id="loginToResult">js调用App,App给js结果:内容会改变</div> <div class="btn-block1">下面显示App调用js的结果,没有给App反馈</div> <div class="content" id="appToJSNotResult">App调用js的结果:内容会改变</div> <div class="btn-block1" onclick="appToJSResult()"> 下面显示App调用js的结果,需要给App反馈 </div> <div class="content" id="appToJSResult">App调用js的结果:内容会改变</div> <script type="text/javascript"> function loginToResult(argument) { document.getElementById('loginToResult').innerHTML = "js调用App,App给js结果:" + argument; } function appToJSNotResult(argument) { document.getElementById('appToJSNotResult').innerHTML = "App调用js的结果:" + argument['name']; } function appToJSResult(argument) { document.getElementById('appToJSResult').innerHTML = "App调用js回调函数啦, 我是" + argument['name']; AppObject.appHandler('appToJSResult','js已接受到App传来的' + argument['name'],''); } </script> </body> </html>
Java
/* * Copyright (c) 2013 - 2015, Freescale Semiconductor, Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * o Redistributions of source code must retain the above copyright notice, this list * of conditions and the following disclaimer. * * o Redistributions in binary form must reproduce the above copyright notice, this * list of conditions and the following disclaimer in the documentation and/or * other materials provided with the distribution. * * o Neither the name of Freescale Semiconductor, Inc. nor the names of its * contributors may be used to endorse or promote products derived from this * software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Debug console shall provide input and output functions to scan and print formatted data. * o Support a format specifier for PRINTF follows this prototype "%[flags][width][.precision][length]specifier" * - [flags] :'-', '+', '#', ' ', '0' * - [width]: number (0,1...) * - [.precision]: number (0,1...) * - [length]: do not support * - [specifier]: 'd', 'i', 'f', 'F', 'x', 'X', 'o', 'p', 'u', 'c', 's', 'n' * o Support a format specifier for SCANF follows this prototype " %[*][width][length]specifier" * - [*]: is supported. * - [width]: number (0,1...) * - [length]: 'h', 'hh', 'l','ll','L'. ignore ('j','z','t') * - [specifier]: 'd', 'i', 'u', 'f', 'F', 'e', 'E', 'g', 'G', 'a', 'A', 'o', 'c', 's' */ #ifndef _FSL_DEBUGCONSOLE_H_ #define _FSL_DEBUGCONSOLE_H_ #include "fsl_common.h" /* * @addtogroup debug_console * @{ */ /******************************************************************************* * Definitions ******************************************************************************/ /*! @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 PRINTF_ADVANCED_ENABLE #define PRINTF_ADVANCED_ENABLE 1U #endif /* PRINTF_ADVANCED_ENABLE */ /*! @brief Definition to support advanced format specifier for scanf. */ #ifndef SCANF_ADVANCED_ENABLE #define SCANF_ADVANCED_ENABLE 1U #endif /* SCANF_ADVANCED_ENABLE */ #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 */ /******************************************************************************* * Prototypes ******************************************************************************/ #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 DEBUG_CONSOLE_DEVICE_TYPE_UART, * @arg DEBUG_CONSOLE_DEVICE_TYPE_LPUART, * @arg DEBUG_CONSOLE_DEVICE_TYPE_LPSCI, * @arg DEBUG_CONSOLE_DEVICE_TYPE_USBCDC. * @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 kStatus_InvalidArgument 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 /* _FSL_DEBUGCONSOLE_H_ */
Java
<?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'); } } ?>
Java
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) TestRowWidthWithHeaders() { 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) TestRowWidthWithoutHeaders() { 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) TestWriteEmptyDataset() { 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 TestDatasetTestSuite(t *testing.T) { suite.Run(t, new(DatasetTestSuite)) }
Java
<?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\FrameworkExtraBundle\SensioFrameworkExtraBundle(), new JMS\SecurityExtraBundle\JMSSecurityExtraBundle(), new DLauritz\Forum\AdminBundle\DLauritzForumAdminBundle(), new DLauritz\Forum\ForumBundle\DLauritzForumForumBundle(), new DLauritz\Forum\UserBundle\DLauritzForumUserBundle(), ); if (in_array($this->getEnvironment(), array('dev', 'test'))) { $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); $bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(); } return $bundles; } public function registerContainerConfiguration(LoaderInterface $loader) { $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); } }
Java
<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>
Java
#PPP-QuestionParsing-ML-standalone [![Build Status](https://travis-ci.org/ProjetPP/PPP-QuestionParsing-ML-Standalone.svg?branch=master)](https://travis-ci.org/ProjetPP/PPP-QuestionParsing-ML-Standalone) [![Code Coverage](https://scrutinizer-ci.com/g/ProjetPP/PPP-QuestionParsing-ML-standalone/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/ProjetPP/PPP-QuestionParsing-ML-standalone/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/ProjetPP/PPP-QuestionParsing-ML-standalone/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/ProjetPP/PPP-QuestionParsing-ML-standalone/?branch=master) 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/PPP-QuestionParsing-ML-standalone cd PPP-NLP-ML-standalone ``` 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/cw-embeddings-ACL2010/embeddings-scaled.EMBEDDING_SIZE=25.txt.gz gzip -d embeddings-scaled.EMBEDDING_SIZE=25.txt.gz ``` ###Generate the data set The goal of ppp_questionparsing_ml_standalone/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 ppp_questionparsing_ml_standalone: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()
Java
<!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://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </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>
Java
-- 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)
Java
"use strict"; var EventEmitter = require ('events'); module.exports = new EventEmitter ();
Java
'use strict' const tap = require('tap') const ActiveDirectory = require('../index') const config = require('./config') const serverFactory = require('./mockServer') const settings = require('./settings').getGroupMembershipForUser 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('#getGroupMembershipForUser()', 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.getGroupMembershipForUser(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.getGroupMembershipForUser('!!!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.getGroupMembershipForUser(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('#getGroupMembershipForUser(opts)', t => { t.test('should return only requested attributes', t => { const opts = { attributes: ['createTimeStamp'] } const user = settings.users[0] t.context.ad.getGroupMembershipForUser(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() })
Java
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; } }
Java
<?php namespace Flatmate\UtilitiesBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Validator\Constraints as Assert; /** * Consumption * * @ORM\Table() * @ORM\Entity * @ORM\HasLifecycleCallbacks() */ 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", referencedColumnName="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", referencedColumnName="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; } }
Java
<!--<?php # MetInfo Enterprise Content Management System # Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved. 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="met_message_fd_class"> <!-- EOT; foreach($fd_paraall as $key=>$val){ $select1=''; if($val[id]==$met_message_fd_class)$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>{$lang_message_content}{$lang_marks}</dt> <dd> <select name="met_message_fd_content"> <!-- EOT; foreach($fd_paraalls as $key=>$val){ $select1=''; if($val[id]==$met_message_fd_content)$select1="selected='selected'"; echo <<<EOT --> <option value="$val[id]" $select1 >$val[name]</option> <!-- EOT; } echo <<<EOT --> </select> <span class="tips">{$lang_message_content1}</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>{$lang_message_AcceptMail}{$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="met_message_fd_email"> <!-- EOT; foreach($fd_paraall as $key=>$val){ $select1=''; if($val[id]==$met_message_fd_email)$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>{$lang_fdincFeedbackTitle}{$lang_marks}</dt> <dd> <input name="met_fd_title" type="text" class="text" value="$met_fd_title" /> <span class="tips">{$lang_fdincAutoFbTitle}</span> </dd> </dl> </div> <div class="v52fmbx_dlbox"> <dl> <dt>{$lang_fdincAutoContent}{$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">{$lang_feedbackautosms}</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>{$lang_fdincAutoContentsms}{$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; # This program is an open source system, commercial use, please consciously to purchase commercial license. # Copyright (C) MetInfo Co., Ltd. (http://www.metinfo.cn). All rights reserved.d. ?>-->
Java
<? 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"); ?>
Java