code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
3
942
language
stringclasses
30 values
license
stringclasses
15 values
size
int32
3
1.05M
line_mean
float64
0.5
100
line_max
int64
1
1k
alpha_frac
float64
0.25
1
autogenerated
bool
1 class
/** * */ 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); } }
thekant/myCodeRepo
src/com/kant/datastructure/stacks/StockSpanProblem.java
Java
mit
2,329
23.593407
80
0.608416
false
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() { }
jezze/nes
cnrom.c
C
mit
370
15.818182
92
0.651351
false
// 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}"); } } } }
AzureAD/microsoft-authentication-library-for-dotnet
tests/CacheCompat/CommonCache.Test.Unit/Utils/CacheTestExecutor.cs
C#
mit
4,930
41.482759
141
0.621347
false
<?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 . '"!'); } }
eggbe/helpers
src/Hash.php
PHP
mit
1,219
21.574074
114
0.61936
false
//****************************************************************************************************** // 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 } }
GridProtectionAlliance/gsf
Source/Libraries/GSF.PhasorProtocols/BPAPDCstream/FrequencyValue.cs
C#
mit
7,224
40.745665
158
0.599917
false
<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>
fabienInizan/menuPlugin
templates/admin/menu/displayEditForm.php
PHP
mit
516
33.4
90
0.662791
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.07.1-2.0.6/extra-dev/dev/fourcolor/1.2.1.html
HTML
mit
7,527
43.922156
188
0.556385
false
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);
AndyBitz/dme11a-js-presentation
pages/slides/0x05_call_by_reference.js
JavaScript
mit
2,834
25.745283
89
0.591743
false
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")]
msotiroff/Programming-FUNDAMENTALS
Practice/Lists/EqualSumAfterExtraction/Examlpe/Properties/AssemblyInfo.cs
C#
mit
1,390
37.527778
84
0.743331
false
![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.
ericluwj/ericluwj.github.io
README.md
Markdown
mit
1,805
35.857143
194
0.745706
false
/* 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, }) }) }) })
artsy/metaphysics
src/schema/v2/me/__tests__/showsByFollowedArtists.test.ts
TypeScript
mit
1,640
20.866667
68
0.430488
false
<?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); } } }
Komrod/UserScriptorium
src/scriptorium/UserBundle/Entity/User.php
PHP
mit
7,423
24.162712
141
0.576047
false
/* 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; }
panzi/mediaextract
src/au.c
C
mit
2,119
31.090909
80
0.712937
false
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(); } }
jasonlam604/StockTechnicals
src/com/jasonlam604/stocktechnicals/indicators/MovingAverageConvergenceDivergence.java
Java
mit
2,631
26.123711
101
0.691752
false
/* ----------------------------------------------------------------------------- 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; } }
RealityFactory/ogre
RenderSystems/GLES2/src/GLSLES/src/OgreGLSLESProgram.cpp
C++
mit
18,117
40.840647
158
0.552685
false
/* * 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 {}
guberti/AliensGame
ConsoleAliensGame/src/consolealiensgame/AlienContainer.java
Java
mit
4,017
30.390625
131
0.595967
false
<!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>
daemth/highcharts-editor
app/index.html
HTML
mit
2,606
41.048387
142
0.577897
false
'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); } }); };
dylanlawrence/ango
lib/controllers/example.js
JavaScript
mit
2,149
18.724771
100
0.488134
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.05.0-2.0.1/released/8.5.2~camlp4/cantor/8.8.0.html
HTML
mit
7,710
41.683333
190
0.567096
false
class ApplicationMailer < ActionMailer::Base helper Common::PageHelper end
jbox-web/media-server
app/mailers/application_mailer.rb
Ruby
mit
77
24.666667
44
0.818182
false
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;
ractivejs/ractive
src/view/resolvers/ReferenceExpressionProxy.js
JavaScript
mit
3,804
23.701299
96
0.586488
false
'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'), }, })); };
node-templates/base-microservice-swagger
bld/documentation.js
JavaScript
mit
601
32.388889
86
0.687188
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.08.1-2.0.5/released/8.7.0/ceres/0.3.0.html
HTML
mit
6,619
39.207317
159
0.534577
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.06.1-2.0.5/released/8.7.2/ltl/8.10.0.html
HTML
mit
7,100
38.971751
159
0.548127
false
--- 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>
ChrisMacNaughton/chrismacnaughton.github.com
_pages/thanks.md
Markdown
mit
494
15.896552
159
0.691207
false
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; } }
KhaledMuahamed/GameDevelop
Game/src/model/question/ImageQuestion.java
Java
mit
1,428
23.052632
76
0.534314
false
**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.
edwkar/houdini
README.md
Markdown
mit
530
16.096774
76
0.709434
false
// 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 }
derekstavis/bluntly
vendor/github.com/youtube/vitess/go/vt/tabletserver/queryservice/queryservice.go
GO
mit
6,381
45.23913
233
0.773233
false
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()
hackaugusto/raiden
raiden/tests/utils/smartcontracts.py
Python
mit
4,965
35.240876
99
0.703927
false
<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>
marulinho/Proyecto-Angular-Final
src/app/pages/component-menu/component-menu.component.html
HTML
mit
14,721
34.302158
118
0.48081
false
// // SettingVCPopAnimator.h // BlackNoise // // Created by 李金 on 2016/11/24. // Copyright © 2016年 kingandyoga. All rights reserved. // #import <Foundation/Foundation.h> @interface SettingVCPopAnimator : NSObject<UIViewControllerAnimatedTransitioning> @end
kingandyoga/BlackNoise
BlackNoise/BlackNoise/SettingVCPopAnimator.h
C
mit
271
19.307692
81
0.75
false
<!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>
jesion/d3js-flight-connections-map
src/index.html
HTML
mit
10,931
36.56701
123
0.443601
false
require 'test_helper' describe Subcheat do it 'should report version number' do Subcheat::VERSION.must_be_instance_of String end end
avdgaag/subcheat
test/subcheat_test.rb
Ruby
mit
142
19.285714
48
0.753521
false
using System.Reflection; [assembly: AssemblyTitle("Querify.Nh")]
Lotpath/Querify
src/Querify.Nh/Properties/AssemblyInfo.cs
C#
mit
68
32
39
0.772727
false
<!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>
anseki/leader-line
test/spec/funcs/isElement-c.html
HTML
mit
369
17.45
53
0.566396
false
#!/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
nfq-technologies/docker-images
php70-dev/build/setup_docker.sh
Shell
mit
2,588
28.078652
213
0.709815
false
// // 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
leberwurstsaft/TuneFight
TuneFight/TuneFightAppDelegate.h
C
mit
324
18.058824
66
0.728395
false
class Network < ApplicationRecord end
NextEpisode/NextEpisode
app/models/network.rb
Ruby
mit
38
18
33
0.842105
false
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); } } } }
jontansey/.Net-Core-Ecommerce-Base
src/Shop/Features/Product/ProductEdit.cs
C#
mit
4,494
30.640845
100
0.536955
false
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(); } } }
GuMiner/napack
server/Definitions/SystemStats/SystemStats.cs
C#
mit
1,627
28.563636
102
0.570462
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.11.2-2.0.7/extra-dev/dev/extructures/0.3.0.html
HTML
mit
7,071
39.965116
159
0.546267
false
'use strict' var test = require('tape') var createDate = require('./') test(function (t) { t.ok(createDate('1-1-2000') instanceof Date) t.end() })
bendrucker/create-date
test.js
JavaScript
mit
153
16
46
0.633987
false
<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>
epikcraw/ggool
public/Windows 10 x64 (18362.116)/HAL_PRIVATE_DISPATCH.html
HTML
mit
8,993
58.171053
98
0.702769
false
<?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'; }
romainneutron/PHPExiftool
lib/PHPExiftool/Driver/Tag/Microsoft/MediaType.php
PHP
mit
796
17.952381
74
0.679648
false
# 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)
indico/indico
indico/core/oauth/__init__.py
Python
mit
1,252
31.102564
82
0.675719
false
<!-- 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>
ONSdigital/tredegar
src/main/resources/files/app/partials/latest-bulletins/latest-bulletins.html
HTML
mit
2,318
44.45098
179
0.554789
false
<?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());
Gueststream-Inc/gueststream-php
examples/is_online.php
PHP
mit
265
18
48
0.622642
false
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; } } }
maxinfet/FlaUI
src/FlaUI.Core/AutomationElements/PatternElements/SelectionItemAutomationElement.cs
C#
mit
2,132
31.272727
127
0.580751
false
#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
thuleqaid/boost_study
demo-xml/include/seq.hpp
C++
mit
1,305
26.1875
80
0.711111
false
<?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); } }
MacXGaming/PHP-Uploader
Upload.php
PHP
mit
6,087
28.124402
131
0.510268
false
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(); } } } }
OlegAxenow/refinid
Refinid.Specs/TestStorage.cs
C#
mit
737
16.95122
69
0.681633
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.04.2-2.0.5/released/8.5.2/compcert/3.9.html
HTML
mit
8,106
41.756614
159
0.562554
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.10.1-2.0.6/released/8.13.0/string/8.5.0.html
HTML
mit
6,632
40.43125
157
0.534319
false
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); } } }
zraees/sms-project
SMSServices/SMSServices/Controllers/TeachersSubjectsController.cs
C#
mit
9,436
36.145669
122
0.508374
false
<?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; } }
nquocnghia/EdtUbx
src/Condition/MatchInArray.php
PHP
mit
629
17
70
0.5469
false
// 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); } } } }
kieranhogan13/Java
Distributed Systems/Labs/Week 7_Lab_Review/Week_3_T7/TCPSerServer.java
Java
mit
1,769
20.313253
79
0.61221
false
<?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; } }
easybill/zugferd-php
src/zugferd211/Model/DocumentLineDocument.php
PHP
mit
584
23.333333
131
0.679795
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.08.1-2.0.5/released/8.7.1/menhirlib/20200123.html
HTML
mit
10,617
51.435644
159
0.575434
false
--- 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 ---
vscooper/vscooper.github.io
old_site/_attachments/pic_md.html
HTML
mit
979
45.619048
560
0.630235
false
#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
sepehr-laal/nofx
nofx/nofx_ofAppRunner/nofx_ofSetOrientation.cc
C++
mit
368
22.0625
69
0.600543
false
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")]
tanyta78/ProgramingFundamentals
05Dictionaries/LabDictionariesLambdaLINQ/6. Fold and Sum/Properties/AssemblyInfo.cs
C#
mit
1,406
37.972222
84
0.740556
false
#Active Projects
FSND2015/FSND2015-Side-Project-Ideas
Active.md
Markdown
mit
17
16
16
0.823529
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.06.1-2.0.5/released/8.7.1+2/relation-extraction/8.5.0.html
HTML
mit
7,137
42.10303
208
0.550619
false
<!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>
dayse/gesplan
doc/DAO/exception/package-frame.html
HTML
mit
1,026
28.176471
139
0.673489
false
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)); } } }
yht-fand/cardone-platform-usercenter
consumer/src/test/java/top/cardone/func/vx/usercenter/userDepartment/D0002FuncTest.java
Java
mit
3,282
36.306818
154
0.708714
false
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(); } } }
dvdstelt/batchprocessing
Client/Program.cs
C#
mit
1,659
29.127273
110
0.604707
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.03.0-2.0.5/released/8.9.0/minic/8.5.0.html
HTML
mit
7,217
41.3
159
0.549437
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.09.0-2.0.5/released/8.10.0/presburger/8.8.0.html
HTML
mit
7,100
42.012121
405
0.552487
false
<!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>
v8-dox/v8-dox.github.io
e72b7b8/html/classv8_1_1_boolean-members.html
HTML
mit
12,646
90.637681
337
0.65412
false
'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'); } ]);
crosscent/platform
public/modules/categories/config/categories.client.config.js
JavaScript
mit
544
37.857143
110
0.670956
false
# 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.
acjim/angular-html-window
README.md
Markdown
mit
2,480
29.243902
152
0.717339
false
<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>
floydxiu/Restaurant-reservation-system
application/views/seat_reservation_by_manager.php
PHP
mit
4,390
30.036232
168
0.633115
false
/** * Created by zhang on 16/5/19. */ $.myjq = function () { alert("hello my jQuery") }; //js的扩展 $.fn.myjq=function(){ $(this).text("hello") };
qiang437587687/pythonBrother
jQueryFirst/jQuery扩展和noConflict/myjQuery.js
JavaScript
mit
161
12
31
0.535484
false
<?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>
chauncey/there-be-docs
static/docs/epydocs/module-tree.html
HTML
mit
16,369
70.480349
217
0.65343
false
// 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); };
aziis98/node-canvas-graphics-wrapper
graphics.js
JavaScript
mit
2,626
24.25
66
0.617289
false
<!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>
datamade/elpc_bakken
html/pdf/W29357.pdf_ind.html
HTML
mit
4,269
59.985714
130
0.6751
false
<?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()); }
bobsta63/dodns
examples/delete_a_domain.php
PHP
mit
886
38.363636
119
0.711061
false
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
slundberg/TextAnalysis.jl
src/preprocessing.jl
Julia
mit
13,988
32.384248
157
0.590149
false
<?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'); } }
mb-webdev/MBOptimizationBundle
DependencyInjection/MBOptimizationExtension.php
PHP
mit
957
30.9
105
0.725183
false
<?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';
perecedero/FramePress
main.php
PHP
mit
245
21.272727
50
0.722449
false
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; } }
SuchTeam-NoJoro-MuchSad/Doge-News
DogeNews/Src/Web/DogeNews.Web.Mvp/UserControls/ArticleComments/IArticleCommentsView.cs
C#
mit
390
26.785714
75
0.796392
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.10.2-2.0.6/extra-dev/dev/mtac2/1.0.1+8.8.html
HTML
mit
6,990
40.452381
303
0.53676
false
<!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>
spf-iOS/WebJSBridge
WebJSBridgeDemo/WebJSBridgeDemo/demo.html
HTML
mit
3,163
34.719512
112
0.464664
false
/* * 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_ */
andrewparlane/kinetis_test_projects
common/devices/MK66F18/utilities/fsl_debug_console.h
C
mit
7,074
35.428571
112
0.650551
false
<?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'); } } ?>
aisy/polieditor
application/controllers/Latihan.php
PHP
mit
334
17.647059
63
0.595808
false
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)) }
jbub/tabular
dataset_test.go
GO
mit
3,925
17.961353
75
0.616306
false
<?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'); } }
dlauritzen/CS-360-Forum
app/AppKernel.php
PHP
mit
1,561
40.078947
89
0.67713
false
<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>
Kericthecoolguy/ayuda
modules/articles/client/views/edit-article.client.view.html
HTML
mit
1,180
39.689655
156
0.584746
false
#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()
ProjetPP/PPP-QuestionParsing-ML-Standalone
README.md
Markdown
mit
2,491
29.378049
224
0.751907
false
<!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>
coq-bench/coq-bench.github.io
clean/Linux-x86_64-4.07.1-2.0.6/released/8.10.0/stalmarck/8.14.0.html
HTML
mit
6,859
39.420118
159
0.5497
false
-- 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)
BLavery/esuite-lua
library/lib-TELNET.lua
Lua
mit
1,299
26.638298
101
0.581216
false
"use strict"; var EventEmitter = require ('events'); module.exports = new EventEmitter ();
alexandruradovici/messengertrivia
source/bus.js
JavaScript
mit
92
22
38
0.706522
false
'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() })
jsumners/node-activedirectory
test/getgroupmembershipforuser.test.js
JavaScript
mit
2,662
25.62
97
0.596544
false
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; } }
lg198/CodeFray
src/com/github/lg198/codefray/jfx/GameResultGui.java
Java
mit
3,347
32.808081
106
0.601135
false
<?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; } }
TIIUNDER/flatmate
src/Flatmate/UtilitiesBundle/Entity/Consumption.php
PHP
mit
4,174
15.898785
89
0.502396
false
<!--<?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. ?>-->
maicong/OpenAPI
MetInfo5.2/admin/templates/met/content/message/inc.html
HTML
mit
6,182
25.423077
128
0.604012
false
<? 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"); ?>
anshaik/recsports
webapp/advproj/editstats.php
PHP
mit
1,187
31.108108
158
0.546757
false
version https://git-lfs.github.com/spec/v1 oid sha256:b1b66ad7cf63a081650856aed61fbfdf1b6b511e47c622989e9927e504424a5d size 2493
yogeshsaroya/new-cdnjs
ajax/libs/jquery.lazyloadxt/0.8.12/jquery.lazyloadxt.extra.min.js
JavaScript
mit
129
42
75
0.883721
false
#include "ErrorCodes.h" std::error_code make_error_code(SimBlockErrc ec) { return {static_cast<int>(ec), simblockErrCategory}; }
josokw/Fuzzy
libDySySim/ErrorCodes.cpp
C++
mit
133
21.166667
54
0.729323
false
<?php /* Safe sample input : backticks interpretation, reading the file /tmp/tainted.txt sanitize : cast in float construction : use of sprintf via a %d with simple quote */ /*Copyright 2015 Bertrand STIVALET Permission is hereby granted, without written agreement or royalty fee, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following three paragraphs appear in all copies of this software. IN NO EVENT SHALL AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. AUTHORS SPECIFICALLY DISCLAIM ANY WARRANTIES INCLUDING, BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THE SOFTWARE IS PROVIDED ON AN "AS-IS" BASIS AND AUTHORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.*/ $tainted = `cat /tmp/tainted.txt`; $tainted = (float) $tainted ; $var = include(sprintf("pages/'%d'.php", $tainted)); ?>
stivalet/PHP-Vulnerability-test-suite
Injection/CWE_98/safe/CWE_98__backticks__CAST-cast_float__include_file_id-sprintf_%d_simple_quote.php
PHP
mit
1,212
21.462963
75
0.769802
false