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
<!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.4"/> <title>libString: 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="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); $(window).load(resizeHeight); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </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">libString </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.4 --> <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 class="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</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> </ul> </div> </div><!-- top --> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> <div id="nav-sync" class="sync"></div> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> $(document).ready(function(){initNavTree('structstring__t.html','');}); </script> <div id="doc-content"> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a></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 class="header"> <div class="headertitle"> <div class="title">string_t Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="structstring__t.html">string_t</a>, including all inherited members.</p> <table class="directory"> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>capacity</b> (defined in <a class="el" href="structstring__t.html">string_t</a>)</td><td class="entry"><a class="el" href="structstring__t.html">string_t</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0"><td class="entry"><b>char_array</b> (defined in <a class="el" href="structstring__t.html">string_t</a>)</td><td class="entry"><a class="el" href="structstring__t.html">string_t</a></td><td class="entry"></td></tr> <tr bgcolor="#f0f0f0" class="even"><td class="entry"><b>length</b> (defined in <a class="el" href="structstring__t.html">string_t</a>)</td><td class="entry"><a class="el" href="structstring__t.html">string_t</a></td><td class="entry"></td></tr> </table></div><!-- contents --> </div><!-- doc-content --> <!-- start footer part --> <div id="nav-path" class="navpath"><!-- id is needed for treeview function! --> <ul> <li class="footer">Generated on Sat Feb 1 2014 23:09:47 for libString by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.4 </li> </ul> </div> </body> </html>
jasonmaclafferty/String
libString/doxygen/html/structstring__t-members.html
HTML
mit
5,565
<?php namespace Library\WhatsApp\Connection\WhatsAPI; class rc4 { private $s; private $i; private $j; public function __construct($key, $drop) { $this->s = range(0, 255); for ($i = 0, $j = 0; $i < 256; $i++) { $k = ord($key{$i % strlen($key)}); $j = ($j + $k + $this->s[$i]) & 255; $this->swap($i, $j); } $this->i = 0; $this->j = 0; $this->cipher(range(0, $drop), 0, $drop); } public function cipher($data, $offset, $length) { $r = ''; for ($n = $length; $n > 0; $n--) { $this->i = ($this->i + 1) & 255; $this->j = ($this->j + $this->s[$this->i]) & 255; $this->swap($this->i, $this->j); $d = ord($data{$offset++}); $r .= chr($d ^ $this->s[($this->s[$this->i] + $this->s[$this->j]) & 255]); } return $r; } protected function swap($i, $j) { $c = $this->s[$i]; $this->s[$i] = $this->s[$j]; $this->s[$j] = $c; } }
flolas/WhatsAppZorron
Classes/Library/WhatsApp/Connection/WhatsAPI/RC4.php
PHP
mit
1,065
<?php /** * This file is part of the Loops framework. * * @author Lukas <lukas@loopsframework.com> * @license https://raw.githubusercontent.com/loopsframework/base/master/LICENSE * @link https://github.com/loopsframework/base * @link https://loopsframework.com/ * @version 0.1 */ namespace Loops; use IteratorAggregate; use Serializable; use Loops; use Loops\Renderer\CacheInterface; use Loops\Misc\AccessTrait; use Loops\Annotations\Access\ReadOnly; use Loops\Annotations\Access\ReadWrite; use Loops\Annotations\Access\Expose; /** * An element that can be structured in hierarical trees * * Instances of the Loops\Element class largely define how Loops processes requests. The Loops\ElementInterface is implemented * and parent/name values are automatically updated. * The action method of the Loops\Element class implements the (recommended) way of how Loops processes request urls that have * been split into parameter. * * Loops\Element inherits from Loops\Object and implements all its magic Loops behaviour. It also implements the * Loops\Renderer\CacheInterface. The behaviour of this interface is quickly configurable by settings default properties or * overriding methods. * */ abstract class Element extends Object implements ElementInterface, CacheInterface { /** * @var string|FALSE Used by the action method to determine a default offset where a request may be forwarded to. * * @ReadOnly */ protected $delegate_action = FALSE; /** * @var bool Used by the action method to specify if the element accepts the request on default. * * See method action for details. */ protected $direct_access = FALSE; /** * @var bool Used by the action method to specify if the element accepts the request on default during an ajax request. * * See method action for details. */ protected $ajax_access = FALSE; /** * @var integer The renderer cache lifetime of this object in seconds. * @ReadWrite * * A negative value disabled the renderer cache. * 0 defines that the cache never expires. */ protected $cache_lifetime = -1; /** * @var string Magic access to ->getLoopsId() * @Expose * @ReadOnly("getLoopsId") */ protected $loopsid; /** * @var string Magic access to ->getPagePath() * @Expose * @ReadOnly("getPagePath") */ protected $pagepath; /** * @var mixed The creation context (see constructor) * @ReadOnly */ protected $context; /** * Can be returned from action methods for convinience */ const NO_OUTPUT = -1; private $__name = NULL; private $__parent = NULL; /** * The contructror * * A creation context can be passed to the constructor. It can be any value but should * be set to the object which is responsible of creating this instance. This is done * automatically when creating elements via loops annotations. * Usually this value will be the same as the parent object of this element. * * @param mixed $context The creation context * @param Loops\Context $loops The context that is used to resolve services. * * The content will default to the last Loops context. */ public function __construct($context = NULL, Loops $loops = NULL) { $this->context = $context; parent::__construct($loops); } /** * Generate the Loops id of this object. * * If the object has no parent use its hash as the Loops id. * Otherwise add its name to the parents Loops id separated with a dash * * @param string|NULL $refkey Defines the offset of a child which is requesting the Loops id * @return string The Loops id */ protected function __getLoopsId($refkey = NULL) { if($this->__parent) { return $this->__parent->__getLoopsId($this->__name)."-".$this->__name; } return spl_object_hash($this); } /** * Returns if the object is cacheable based on the cache_lifetime property. * * @return bool TRUE if the renderer chache should be used for this object. */ public function isCacheable() { return $this->cache_lifetime >= 0; } /** * Return the cacheid * * By default, the elements Loops ID is going to be used. * This method should be overridden if the appearance changes based on other factors. * * @return string The Cache ID */ public function getCacheId() { return $this->getLoopsId(); } /** * Returns the cache lifetime in seconds (=property cache_lifetime) * * @return integer The cache lifetime in seconds */ public function getCacheLifetime() { return $this->cache_lifetime; } /** * {@inheritdoc} */ public function getLoopsId() { return $this->__getLoopsId(); } /** * Adds an element into the hierarchy. * * This function is a simple wrapper for offsetSet but introduces type checking. * * @param string $name The name of the child element * @param Loops\Element $child The child element */ public function addChild($name, Element $child) { $this->offsetSet($name, $child); } /** * Internal use, an Element instances __parent and __name property are automatically updated * * @param string $name The name of the property where the Loops\Element is stored * @param mixed $child The value that is going to be checked and adjusted if it is a Loops\Element * @param bool $detacht Detach the element from its old parent if exists. * @return mixed The passed $child value */ protected function initChild($name, $child, $detach = FALSE) { if($child instanceof Element) { if($detach && $child->__parent && $child->__parent !== $this) { $child->detach(); } if(!$child->__parent) { $child->__parent = $this; $child->__name = $name; } } return $child; } /** * Automatically initializes child elements in case they were not initialized yet * * @param string $offset The element offset */ public function offsetGet($offset) { $value = parent::offsetGet($offset); return $offset === "context" ? $value : $this->initChild($offset, $value); } /** * Automatically initailizes child elements in case they were not initialized yet * * If a element was already set on another element object, it will be detached. * * @param string $offset The offset * @param mixed $value The value to be set at offset */ public function offsetSet($offset, $value) { parent::offsetSet($offset, $value); $this->initChild($offset, $value, TRUE); } /** * Automatically detaches child elements if they belong to this element * * @param string The offset */ public function offsetUnset($offset) { $detach = NULL; if(parent::offsetExists($offset)) { $child = parent::offsetGet($offset); if($child instanceof Element && $child->__parent === $this) { $detach = $child; } } parent::offsetUnset($offset); if($detach) { $detach->detach(); } } /** * A class internal way of iterating over class properties. * * Wrapper to the AccessTrait getGenerator method. * * @param bool $include_readonly Include values that have been marked with the {\@}ReadOnly or {\@}ReadWrite annotations. * @param bool $include_protected Also include protected values without annotations. * @param array Only include values with keys that are specified in this array. * @param array Exclude values with keys that are specified in this array. * @return Generator A generator that traverses over the requested values of this object. */ protected function getGenerator($include_readonly = FALSE, $include_protected = FALSE, $include = FALSE, $exclude = FALSE) { foreach(parent::getGenerator($include_readonly, $include_protected, $include, $exclude) as $key => $value) { yield $key => ($key === "context") ? $value : $this->initChild($key, $value); } } /** * Default action processing * * The default behaviour of an element is to not accept a request. * An element only accepts requests on default, when no parameter were passed and direct_access has been set to TRUE. * In an ajax call, it is also possible to set ajax_access to TRUE for accepting the request. The service request will * be checked if this currently is an ajax call. * The action method will return itself (rather than TRUE) when accepting a request. This makes it possible to determine * which (sub) element actually accepted the request. * * If parameters are given, the following logic can be used to determine if a request should be accepted: * 1. Take the first parameter and check for a method named "{param}Action", pass all parameters to it and use the resulting value. * If such a method does not exist or the value is NULL or FALSE do not accept the request, continue. * 2. Take the first parameter and check if there is another Loops\Element instance at the offset defined by the parameter (->offsetExists($param) & ->offsetGet($param)) * If such object exists execute that objects action, pass the rest of the parameter and use its return value, continue if it was NULL or FALSE. * 3. Check if the element defines a property delegate_action and, prepend it to the action parameters and apply step 2. * * @param array $parameter The action parameter. * @return mixed The processed value */ public function action($parameter) { $result = FALSE; if($parameter) { $name = $parameter[0]; $method_name = $name."Action"; if(method_exists($this, $method_name)) { $result = $this->$method_name(array_slice($parameter, 1)); } if(in_array($result, [FALSE, NULL], TRUE)) { if($parameter && $this->offsetExists($name)) { $child = $this->offsetGet($name); if($child instanceof ElementInterface) { $result = $child->action(array_slice($parameter, 1)); } } } } if(in_array($result, [FALSE, NULL], TRUE)) { if($this->delegate_action) { if($this->offsetExists($this->delegate_action)) { $child = $this->offsetGet($this->delegate_action); if($child instanceof ElementInterface) { $result = $child->action($parameter); } } } } if(in_array($result, [FALSE, NULL], TRUE)) { if(!$parameter) { if($this->direct_access) { $result = TRUE; } else { $loops = $this->getLoops(); if($loops->hasService("request") && $loops->getService("request")->isAjax() && $this->ajax_access) { $result = TRUE; } } } } if($result === TRUE) { $result = $this; } return $result; } /** * Reset the internal caching mechanism of the parent element and name. * This may be needed if you want to assign the element on a different object. * * @return Loops\Element Returns $this for method chaining. */ public function detach() { if($this->__parent) { $this->__parent->offsetUnset($this->__name); } $this->__parent = NULL; $this->__name = NULL; return $this; } /** * Returns the parent elemenet * * @return Loops\Element The parent object or FALSE if the element has no parent. */ public function getParent() { return $this->__parent ?: FALSE; } /** * Returns the offset name with which this object can be accessed from its parent object. * * @return string|FALSE Returns FALSE if the element has no parent. */ public function getName() { return $this->__parent ? $this->__name : FALSE; } /** * Returns the page path of this object. (See documentation of Loops\ElementInterface for details) * * If the element has no parent or is not present in a hierachy with a page element at the top, no * page path can be generated and FALSE is returned. * * @return string */ public function getPagePath() { if(!$this->__parent) { return FALSE; } $pagepath = $this->__parent->getPagePath(); if($pagepath === FALSE) { return FALSE; } if($this->__parent->delegate_action == $this->__name) { return $pagepath; } return ltrim(rtrim($pagepath, "/")."/".$this->__name, "/"); } /** * Returns FALSE on default * * @return false */ public static function isPage() { return FALSE; } }
loopsframework/base
src/Loops/Element.php
PHP
mit
13,526
namespace More.Windows.Controls { using System; using System.Collections; using System.Collections.Generic; using System.Collections.Specialized; using System.Diagnostics.CodeAnalysis; using System.Diagnostics.Contracts; using System.Windows.Controls; /// <summary> /// Represents a mediator that can coordinate columns between a /// <see cref="DataGrid">data grid</see> and a <see cref="IList">list</see>. /// </summary> sealed class ColumnsMediator : IDisposable { volatile bool disposed; volatile bool suppressCollectionChanged; volatile bool suppressColumnsChanged; DataGrid dataGrid; ICollection<DataGridColumn> columns; INotifyCollectionChanged columnEvents; #pragma warning disable SA1401 // Fields should be private internal readonly long Key; #pragma warning restore SA1401 // Fields should be private internal ColumnsMediator( DataGrid dataGrid, IEnumerable<DataGridColumn> sequence, INotifyCollectionChanged columnEvents ) { Contract.Requires( dataGrid != null ); Contract.Requires( sequence != null ); Contract.Requires( columnEvents != null ); Key = CreateKey( dataGrid, sequence ); columns = sequence as ICollection<DataGridColumn>; this.columnEvents = columnEvents; this.columnEvents.CollectionChanged += OnCollectionChanged; this.dataGrid = dataGrid; // if the provided sequence isn't a collection, then mediation is one-way. // the sequence can notify the data grid, but not the other way around. if ( columns != null ) { this.dataGrid.Columns.CollectionChanged += OnColumnsChanged; } } bool IsSuppressingEvents => suppressColumnsChanged || suppressCollectionChanged; void Dispose( bool disposing ) { if ( disposed ) { return; } disposed = true; if ( !disposing ) { return; } if ( dataGrid != null ) { dataGrid.Columns.CollectionChanged -= OnColumnsChanged; dataGrid = null; } if ( columnEvents != null ) { columnEvents.CollectionChanged -= OnCollectionChanged; columnEvents = null; } columns = null; } internal static long CreateKey( DataGrid dataGrid, object items ) { Contract.Requires( dataGrid != null ); var hash = ( dataGrid.GetHashCode() << 32 ) | ( items == null ? 0 : items.GetHashCode() ); return hash; } static void SynchronizeCollection( ICollection<DataGridColumn> columns, NotifyCollectionChangedEventArgs e, bool fastClear ) { Contract.Requires( columns != null ); Contract.Requires( e != null ); if ( e.Action == NotifyCollectionChangedAction.Reset ) { if ( fastClear ) { columns.Clear(); } else { // HACK: yet another blunder in the DataGrid (at least for Silverlight). I'm assuming this will hold true in WPF // as well. Calling Clear() on the DataGrid.Columns property does not correctly calculate it's internal indexes. An // ArgumentOutOfRangeException is thrown from an internal List<T>, but it's difficult to say what the exact problem is. // Through trial and error, removing columns one at a time proved to produce reliable results; therefore, this branch of // the code uses Remove() or RemoveAt() instead of Clear(). if ( columns is IList<DataGridColumn> list ) { for ( var i = list.Count - 1; i > -1; i-- ) { list.RemoveAt( i ); } } else { list = new List<DataGridColumn>( columns ); for ( var i = list.Count - 1; i > -1; i-- ) { columns.Remove( list[i] ); } } } return; } if ( e.OldItems != null ) { foreach ( DataGridColumn column in e.OldItems ) { columns.Remove( column ); } } if ( e.NewItems != null ) { foreach ( DataGridColumn column in e.NewItems ) { if ( !columns.Contains( column ) ) { columns.Add( column ); } } } } void OnColumnsChanged( object sender, NotifyCollectionChangedEventArgs e ) { if ( IsSuppressingEvents ) { return; } suppressCollectionChanged = true; SynchronizeCollection( columns, e, true ); suppressCollectionChanged = false; } void OnCollectionChanged( object sender, NotifyCollectionChangedEventArgs e ) { if ( IsSuppressingEvents ) { return; } suppressColumnsChanged = true; SynchronizeCollection( dataGrid.Columns, e, false ); suppressColumnsChanged = false; } public void Dispose() { Dispose( true ); GC.SuppressFinalize( this ); } } }
commonsensesoftware/More
src/More.UI.Presentation/Platforms/net45/More/Windows.Controls/ColumnsMediator.cs
C#
mit
5,912
<form method="POST" action="<?= URL ;?>users/update/<?= $data['news']->id;?>"> <div class="modal-content"> <h4>Modifier l'utilisateur : <?= $data['user']->pseudo; ?></h4> <input type="hidden" name="user_id" value="<?= $data['user']->id; ?>"> <div class="row"> <div class="input-field col s12"> <input id="pseudo" type="text" name="pseudo" value="<?= $data['user']->pseudo; ?>"> <label class="active" for="pseudo">Pseudo</label> </div> </div> <div class="row"> <div class="input-field col s6"> <input id="first_name" type="text" name="first_name" value="<?= $data['user']->prenom; ?>"> <label class="active" for="first_name">Prénom</label> </div> <div class="input-field col s6"> <input id="last_name" type="text" name="last_name" value="<?= $data['user']->nom; ?>"> <label class="active" for="last_name">Nom</label> </div> </div> <div class="row"> <div class="input-field col s12"> <input id="email" type="email" name="email" class="validate" value="<?= $data['user']->mail; ?>"> <label class="active" for="email">Email</label> </div> </div> <div class="row"> Admin : <div class="switch"> <label> Off <?php $checked = ''; if($data['user']->admin == 1) { $checked = 'checked'; } ?> <input type="checkbox" name="admin" <?= $checked;?>> <span class="lever"></span> On </label> </div> </div> </div> <div class="modal-footer"> <button class="btn waves-effect waves-light" type="submit" name="action">Submit <i class="material-icons right">send</i> </button> </div> </form>
HelleboidQ/projetphpgghq
app/views/admin/edit_user.php
PHP
mit
2,071
/** * @(#)MenuScroller.java 1.5.0 04/02/12 * Code taken from https://tips4java.wordpress.com/2009/02/01/menu-scroller/ */ package darrylbu.util; import java.awt.Color; import java.awt.Component; import java.awt.Dimension; import java.awt.Graphics; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.Icon; import javax.swing.JComponent; import javax.swing.JMenu; import javax.swing.JMenuItem; import javax.swing.JPopupMenu; import javax.swing.MenuSelectionManager; import javax.swing.Timer; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import javax.swing.event.PopupMenuEvent; import javax.swing.event.PopupMenuListener; /** * A class that provides scrolling capabilities to a long menu dropdown or * popup menu. A number of items can optionally be frozen at the top and/or * bottom of the menu. * <P> * <B>Implementation note:</B> The default number of items to display * at a time is 15, and the default scrolling interval is 125 milliseconds. * <P> * * @version 1.5.0 04/05/12 * @author Darryl */ public class MenuScroller { private JPopupMenu menu; private Component[] menuItems; private MenuScrollItem upItem; private MenuScrollItem downItem; private final MenuScrollListener menuListener = new MenuScrollListener(); private int scrollCount; private int interval; private int topFixedCount; private int bottomFixedCount; private int firstIndex = 0; private int keepVisibleIndex = -1; /** * Registers a menu to be scrolled with the default number of items to * display at a time and the default scrolling interval. * * @param menu the menu * @return the MenuScroller */ public static MenuScroller setScrollerFor(JMenu menu) { return new MenuScroller(menu); } /** * Registers a popup menu to be scrolled with the default number of items to * display at a time and the default scrolling interval. * * @param menu the popup menu * @return the MenuScroller */ public static MenuScroller setScrollerFor(JPopupMenu menu) { return new MenuScroller(menu); } /** * Registers a menu to be scrolled with the default number of items to * display at a time and the specified scrolling interval. * * @param menu the menu * @param scrollCount the number of items to display at a time * @return the MenuScroller * @throws IllegalArgumentException if scrollCount is 0 or negative */ public static MenuScroller setScrollerFor(JMenu menu, int scrollCount) { return new MenuScroller(menu, scrollCount); } /** * Registers a popup menu to be scrolled with the default number of items to * display at a time and the specified scrolling interval. * * @param menu the popup menu * @param scrollCount the number of items to display at a time * @return the MenuScroller * @throws IllegalArgumentException if scrollCount is 0 or negative */ public static MenuScroller setScrollerFor(JPopupMenu menu, int scrollCount) { return new MenuScroller(menu, scrollCount); } /** * Registers a menu to be scrolled, with the specified number of items to * display at a time and the specified scrolling interval. * * @param menu the menu * @param scrollCount the number of items to be displayed at a time * @param interval the scroll interval, in milliseconds * @return the MenuScroller * @throws IllegalArgumentException if scrollCount or interval is 0 or negative */ public static MenuScroller setScrollerFor(JMenu menu, int scrollCount, int interval) { return new MenuScroller(menu, scrollCount, interval); } /** * Registers a popup menu to be scrolled, with the specified number of items to * display at a time and the specified scrolling interval. * * @param menu the popup menu * @param scrollCount the number of items to be displayed at a time * @param interval the scroll interval, in milliseconds * @return the MenuScroller * @throws IllegalArgumentException if scrollCount or interval is 0 or negative */ public static MenuScroller setScrollerFor(JPopupMenu menu, int scrollCount, int interval) { return new MenuScroller(menu, scrollCount, interval); } /** * Registers a menu to be scrolled, with the specified number of items * to display in the scrolling region, the specified scrolling interval, * and the specified numbers of items fixed at the top and bottom of the * menu. * * @param menu the menu * @param scrollCount the number of items to display in the scrolling portion * @param interval the scroll interval, in milliseconds * @param topFixedCount the number of items to fix at the top. May be 0. * @param bottomFixedCount the number of items to fix at the bottom. May be 0 * @throws IllegalArgumentException if scrollCount or interval is 0 or * negative or if topFixedCount or bottomFixedCount is negative * @return the MenuScroller */ public static MenuScroller setScrollerFor(JMenu menu, int scrollCount, int interval, int topFixedCount, int bottomFixedCount) { return new MenuScroller(menu, scrollCount, interval, topFixedCount, bottomFixedCount); } /** * Registers a popup menu to be scrolled, with the specified number of items * to display in the scrolling region, the specified scrolling interval, * and the specified numbers of items fixed at the top and bottom of the * popup menu. * * @param menu the popup menu * @param scrollCount the number of items to display in the scrolling portion * @param interval the scroll interval, in milliseconds * @param topFixedCount the number of items to fix at the top. May be 0 * @param bottomFixedCount the number of items to fix at the bottom. May be 0 * @throws IllegalArgumentException if scrollCount or interval is 0 or * negative or if topFixedCount or bottomFixedCount is negative * @return the MenuScroller */ public static MenuScroller setScrollerFor(JPopupMenu menu, int scrollCount, int interval, int topFixedCount, int bottomFixedCount) { return new MenuScroller(menu, scrollCount, interval, topFixedCount, bottomFixedCount); } /** * Constructs a <code>MenuScroller</code> that scrolls a menu with the * default number of items to display at a time, and default scrolling * interval. * * @param menu the menu */ public MenuScroller(JMenu menu) { this(menu, 15); } /** * Constructs a <code>MenuScroller</code> that scrolls a popup menu with the * default number of items to display at a time, and default scrolling * interval. * * @param menu the popup menu */ public MenuScroller(JPopupMenu menu) { this(menu, 15); } /** * Constructs a <code>MenuScroller</code> that scrolls a menu with the * specified number of items to display at a time, and default scrolling * interval. * * @param menu the menu * @param scrollCount the number of items to display at a time * @throws IllegalArgumentException if scrollCount is 0 or negative */ public MenuScroller(JMenu menu, int scrollCount) { this(menu, scrollCount, 150); } /** * Constructs a <code>MenuScroller</code> that scrolls a popup menu with the * specified number of items to display at a time, and default scrolling * interval. * * @param menu the popup menu * @param scrollCount the number of items to display at a time * @throws IllegalArgumentException if scrollCount is 0 or negative */ public MenuScroller(JPopupMenu menu, int scrollCount) { this(menu, scrollCount, 150); } /** * Constructs a <code>MenuScroller</code> that scrolls a menu with the * specified number of items to display at a time, and specified scrolling * interval. * * @param menu the menu * @param scrollCount the number of items to display at a time * @param interval the scroll interval, in milliseconds * @throws IllegalArgumentException if scrollCount or interval is 0 or negative */ public MenuScroller(JMenu menu, int scrollCount, int interval) { this(menu, scrollCount, interval, 0, 0); } /** * Constructs a <code>MenuScroller</code> that scrolls a popup menu with the * specified number of items to display at a time, and specified scrolling * interval. * * @param menu the popup menu * @param scrollCount the number of items to display at a time * @param interval the scroll interval, in milliseconds * @throws IllegalArgumentException if scrollCount or interval is 0 or negative */ public MenuScroller(JPopupMenu menu, int scrollCount, int interval) { this(menu, scrollCount, interval, 0, 0); } /** * Constructs a <code>MenuScroller</code> that scrolls a menu with the * specified number of items to display in the scrolling region, the * specified scrolling interval, and the specified numbers of items fixed at * the top and bottom of the menu. * * @param menu the menu * @param scrollCount the number of items to display in the scrolling portion * @param interval the scroll interval, in milliseconds * @param topFixedCount the number of items to fix at the top. May be 0 * @param bottomFixedCount the number of items to fix at the bottom. May be 0 * @throws IllegalArgumentException if scrollCount or interval is 0 or * negative or if topFixedCount or bottomFixedCount is negative */ public MenuScroller(JMenu menu, int scrollCount, int interval, int topFixedCount, int bottomFixedCount) { this(menu.getPopupMenu(), scrollCount, interval, topFixedCount, bottomFixedCount); } /** * Constructs a <code>MenuScroller</code> that scrolls a popup menu with the * specified number of items to display in the scrolling region, the * specified scrolling interval, and the specified numbers of items fixed at * the top and bottom of the popup menu. * * @param menu the popup menu * @param scrollCount the number of items to display in the scrolling portion * @param interval the scroll interval, in milliseconds * @param topFixedCount the number of items to fix at the top. May be 0 * @param bottomFixedCount the number of items to fix at the bottom. May be 0 * @throws IllegalArgumentException if scrollCount or interval is 0 or * negative or if topFixedCount or bottomFixedCount is negative */ public MenuScroller(JPopupMenu menu, int scrollCount, int interval, int topFixedCount, int bottomFixedCount) { if (scrollCount <= 0 || interval <= 0) { throw new IllegalArgumentException("scrollCount and interval must be greater than 0"); } if (topFixedCount < 0 || bottomFixedCount < 0) { throw new IllegalArgumentException("topFixedCount and bottomFixedCount cannot be negative"); } upItem = new MenuScrollItem(MenuIcon.UP, -1); downItem = new MenuScrollItem(MenuIcon.DOWN, +1); setScrollCount(scrollCount); setInterval(interval); setTopFixedCount(topFixedCount); setBottomFixedCount(bottomFixedCount); this.menu = menu; menu.addPopupMenuListener(menuListener); } /** * Returns the scroll interval in milliseconds * * @return the scroll interval in milliseconds */ public int getInterval() { return interval; } /** * Sets the scroll interval in milliseconds * * @param interval the scroll interval in milliseconds * @throws IllegalArgumentException if interval is 0 or negative */ public void setInterval(int interval) { if (interval <= 0) { throw new IllegalArgumentException("interval must be greater than 0"); } upItem.setInterval(interval); downItem.setInterval(interval); this.interval = interval; } /** * Returns the number of items in the scrolling portion of the menu. * * @return the number of items to display at a time */ public int getscrollCount() { return scrollCount; } /** * Sets the number of items in the scrolling portion of the menu. * * @param scrollCount the number of items to display at a time * @throws IllegalArgumentException if scrollCount is 0 or negative */ public void setScrollCount(int scrollCount) { if (scrollCount <= 0) { throw new IllegalArgumentException("scrollCount must be greater than 0"); } this.scrollCount = scrollCount; MenuSelectionManager.defaultManager().clearSelectedPath(); } /** * Returns the number of items fixed at the top of the menu or popup menu. * * @return the number of items */ public int getTopFixedCount() { return topFixedCount; } /** * Sets the number of items to fix at the top of the menu or popup menu. * * @param topFixedCount the number of items */ public void setTopFixedCount(int topFixedCount) { if (firstIndex <= topFixedCount) { firstIndex = topFixedCount; } else { firstIndex += (topFixedCount - this.topFixedCount); } this.topFixedCount = topFixedCount; } /** * Returns the number of items fixed at the bottom of the menu or popup menu. * * @return the number of items */ public int getBottomFixedCount() { return bottomFixedCount; } /** * Sets the number of items to fix at the bottom of the menu or popup menu. * * @param bottomFixedCount the number of items */ public void setBottomFixedCount(int bottomFixedCount) { this.bottomFixedCount = bottomFixedCount; } /** * Scrolls the specified item into view each time the menu is opened. Call this method with * <code>null</code> to restore the default behavior, which is to show the menu as it last * appeared. * * @param item the item to keep visible * @see #keepVisible(int) */ public void keepVisible(JMenuItem item) { if (item == null) { keepVisibleIndex = -1; } else { int index = menu.getComponentIndex(item); keepVisibleIndex = index; } } /** * Scrolls the item at the specified index into view each time the menu is opened. Call this * method with <code>-1</code> to restore the default behavior, which is to show the menu as * it last appeared. * * @param index the index of the item to keep visible * @see #keepVisible(javax.swing.JMenuItem) */ public void keepVisible(int index) { keepVisibleIndex = index; } /** * Removes this MenuScroller from the associated menu and restores the * default behavior of the menu. */ public void dispose() { if (menu != null) { menu.removePopupMenuListener(menuListener); menu = null; } } /** * Ensures that the <code>dispose</code> method of this MenuScroller is * called when there are no more refrences to it. * * @exception Throwable if an error occurs. * @see MenuScroller#dispose() */ @Deprecated protected void finalize() throws Throwable { dispose(); } private void refreshMenu() { if (menuItems != null && menuItems.length > 0) { firstIndex = Math.max(topFixedCount, firstIndex); firstIndex = Math.min(menuItems.length - bottomFixedCount - scrollCount, firstIndex); upItem.setEnabled(firstIndex > topFixedCount); downItem.setEnabled(firstIndex + scrollCount < menuItems.length - bottomFixedCount); menu.removeAll(); for (int i = 0; i < topFixedCount; i++) { menu.add(menuItems[i]); } if (topFixedCount > 0) { menu.addSeparator(); } menu.add(upItem); for (int i = firstIndex; i < scrollCount + firstIndex; i++) { menu.add(menuItems[i]); } menu.add(downItem); if (bottomFixedCount > 0) { menu.addSeparator(); } for (int i = menuItems.length - bottomFixedCount; i < menuItems.length; i++) { menu.add(menuItems[i]); } JComponent parent = (JComponent) upItem.getParent(); parent.revalidate(); parent.repaint(); } } private class MenuScrollListener implements PopupMenuListener { @Override public void popupMenuWillBecomeVisible(PopupMenuEvent e) { setMenuItems(); } @Override public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { restoreMenuItems(); } @Override public void popupMenuCanceled(PopupMenuEvent e) { restoreMenuItems(); } private void setMenuItems() { menuItems = menu.getComponents(); if (keepVisibleIndex >= topFixedCount && keepVisibleIndex <= menuItems.length - bottomFixedCount && (keepVisibleIndex > firstIndex + scrollCount || keepVisibleIndex < firstIndex)) { firstIndex = Math.min(firstIndex, keepVisibleIndex); firstIndex = Math.max(firstIndex, keepVisibleIndex - scrollCount + 1); } if (menuItems.length > topFixedCount + scrollCount + bottomFixedCount) { refreshMenu(); } } private void restoreMenuItems() { menu.removeAll(); for (Component component : menuItems) { menu.add(component); } } } private class MenuScrollTimer extends Timer { public MenuScrollTimer(final int increment, int interval) { super(interval, new ActionListener() { @Override public void actionPerformed(ActionEvent e) { firstIndex += increment; refreshMenu(); } }); } } private class MenuScrollItem extends JMenuItem implements ChangeListener { private MenuScrollTimer timer; public MenuScrollItem(MenuIcon icon, int increment) { setIcon(icon); setDisabledIcon(icon); timer = new MenuScrollTimer(increment, interval); addChangeListener(this); } public void setInterval(int interval) { timer.setDelay(interval); } @Override public void stateChanged(ChangeEvent e) { if (isArmed() && !timer.isRunning()) { timer.start(); } if (!isArmed() && timer.isRunning()) { timer.stop(); } } } private enum MenuIcon implements Icon { UP(9, 1, 9), DOWN(1, 9, 1); final int[] xPoints = {1, 5, 9}; final int[] yPoints; MenuIcon(int... yPoints) { this.yPoints = yPoints; } @Override public void paintIcon(Component c, Graphics g, int x, int y) { Dimension size = c.getSize(); Graphics g2 = g.create(size.width / 2 - 5, size.height / 2 - 5, 10, 10); g2.setColor(Color.GRAY); g2.drawPolygon(xPoints, yPoints, 3); if (c.isEnabled()) { g2.setColor(Color.BLACK); g2.fillPolygon(xPoints, yPoints, 3); } g2.dispose(); } @Override public int getIconWidth() { return 0; } @Override public int getIconHeight() { return 10; } } }
Idrinth/WARAddonClient
src/main/java/darrylbu/util/MenuScroller.java
Java
mit
18,868
{% extends 'base.html' %} {% load static %} <html> {% block title %}Experiment: {{experiment.name}}{% endblock %} {% block body_block %} <h3>Validation for {{experiment.name}}</h3> {% if validation_form %} <p>Enter the probability threshold for document to mass2motif membership</p> <form id="doc_form" method="post" action="/basicviz/validation/{{experiment.id}}/"> {% csrf_token %} {% for hidden in validation_form.hidden_fields %} {{ hidden }} {% endfor %} {% for field in validation_form.visible_fields %} <p>{{ field.errors }}</p> <p>{{ field }} {{ field.label }}</p> {% endfor %} <input type="submit" name="submit" value="Do validation" class="btn btn-primary" /> </form> {% else %} <a href="/basicviz/dump_validations/{{experiment.id}}">Dump current validations to a .csv file</a> {% for m2m,count,all_dm2m in annotated_mass2motifs %} <h5><a href="/basicviz/view_parents/{{m2m.id}}" target=new>{{m2m.name}}: {{m2m.annotation}}</a></h5> <h6><span id='c{{m2m.id}}'>{{count.1}}</span> validated out of {{count.0}}</h6> <a href="/basicviz/dump_topic_molecules/{{m2m.id}}" class="btn btn-info" role="button">Dump molecules</a> <button data-toggle="collapse" data-target="#{{m2m.id}}" class="btn btn-primary">Show</button> <div id="{{m2m.id}}" class="collapse"> <table class="table"> <tr><th>Name</th><th>Probability</th><th>Overlap score</th><th width=200px>Annotation</th><th>Image</th><th>link</th><th>Validated?</th><th>View in ms2ldaviz</th></tr> {% for doc in all_dm2m %} {% if not just_annotated or doc.document.annotation %} <tr><td>{{doc.document.name}}</td><td>{{doc.probability}}</td><td>{{doc.overlap_score}}</td><td>{{doc.document.display_name}}</td> <td> {% if doc.document.csid %} <img src="http://www.chemspider.com/ImagesHandler.ashx?id={{doc.document.csid}}"></td> {% endif %} <td> {% if doc.document.csid %} <a href="http://www.chemspider.com/Chemical-Structure.{{doc.document.csid}}.html" target=new>ChemSpider</a></td> {% endif %} <td> <div> {% if doc.validated %} <div style="float:left; font-weight:bold" id='t{{doc.id}}'>Yes</div> {% else %} <div style="float:left; font-weight:normal" id='t{{doc.id}}'>No</div> {% endif %} <div style="float:right"> <button type="button" onclick="toggle_validation({{doc.id}},{{m2m.id}})">Toggle</button> </div> </div> </td> <td><a href="/basicviz/show_doc/{{doc.document.id}}" target=new>Show doc</a></td> </tr> {% endif %} {% endfor %} </table> </div> <p>&nbsp;</p> {% endfor %} {% endif %} {% endblock %} {% block js_block %} <script type='text/javascript' src="{% static "js/d3.v3.min.js" %}"></script> <script> function toggle_validation(docm2m_id,m2m_id) { var url = '/basicviz/toggle_dm2m/{{experiment.id}}/' + docm2m_id var d = document.getElementById("t" + docm2m_id); var c = document.getElementById("c" + m2m_id); var count = parseInt(c.innerHTML); if(d.innerHTML == 'Yes') { count --; c.innerHTML = "" + count; } d.innerHTML = 'Pending....'; d3.json(url,function(error,jd) { if (error) throw error; new_html = jd[0]; d.innerHTML = new_html; if(jd[0] == 'Yes') { count ++; c.innerHTML = "" + count; d.style.fontWeight = 'bold'; } else { d.style.fontWeight = 'normal'; } }); } </script> {% endblock %}
sdrogers/ms2ldaviz
ms2ldaviz/templates/basicviz/validation.html
HTML
mit
3,467
<!DOCTYPE html> <html> <head> <title>New Sails App</title> <!-- Viewport mobile tag for sensible mobile support --> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> <link href="dist/css/vendor/bootstrap.min.css" rel="stylesheet"> <link href="dist/css/flat-ui.min.css" rel="stylesheet"> </head> <body style="background-color:#1ABC9C"> <style> .headline{ padding: 50px 0 30px; } .libSlot-wrapper{ overflow:hidden; display: inline-block; } ul#number { padding: 0; margin: 0; list-style: none; font-size: 100px; height: 170px; } </style> <div class="container" style="padding: 50px 0 30px 0;"> <div class="row"> <div class="col-md-4"></div> <div class="col-md-4" > <div class="tile"> <div class="headline"> <img src="dist/img/icons/svg/gift-box.svg" alt="Gift-Box"> <h1>Lucky Time!</h1> </div> <div class="panel panel-default"> <ul id="number" class="slot"> <!--<% for(var i=1; i<=999; i++) {%> <li><%= i %></li> <% } %>--> </ul> </div> <button type="buton" id="playBtn" class="btn btn-block btn-lg btn-primary">Ann <span class="fui-heart"></span> Phat</button> </div> </div> <div class="col-md-4"></div> </div> </div> <!--TEMPLATES--> <!--TEMPLATES END--> <!--<script type="text/javascript" src="ejs_production.js"></script>--> <!--SCRIPTS--> <script src="js/jquery-1.7.1.js"></script> <script src="js/jquery.easing.1.3.js" charset="utf-8"></script> <!--SCRIPTS END--> <script src="dist/js/vendor/video.js"></script> <script src="dist/js/flat-ui.min.js"></script> <script type="text/javascript"> (function($){ $.libSlot = function(el,options){ var base = this; base.options = options; base.$el = $(el); base.el = el; var $list = base.$el; var $li = $list.find('li').first(); base.$liHeight = $li.outerHeight(); base.$liWidth = $li.outerWidth(); base.liCount = $list.children().length; base.listHeight = base.liCount* base.$liHeight; base.spinSpeed = 0; base.increment = 200; $list.css('position','relative'); // add first one, so when we rotate, it will look like really rotate back to the beginning $li.clone().appendTo($list); base.$wrapper = $list.wrap('<div class="libSlot-wrapper"></div>').parent(); // set wrap to li height //base.$wrapper.css('height',base.$liHeight); base.trigger = function() { if(!base.isSpin){ base.isSpin=true; base.startSpin(); }else{ base.isSpin=false; } }; // one rotation base.startSpin = function(){ base.isSpin = true; $list.css('top',-base.listHeight).animate({'top':'0px'},'slow','swing',function(){ if(base.isSpin){ base.startSpin(); }else{ base.stopSpin(); } }); }; base.stopSpin = function(){ var endNum = Math.floor( Math.random() * (base.liCount) ); var finalPos = -( base.$liHeight * (endNum)); var finalSpeed = base.spinSpeed*0.5*base.liCount/endNum; $list.css('top',-base.listHeight).animate({'top':finalPos},'slow','swing',function(){ console.log('stop stop!'); }); }; // bind event $(base.options.spinner).bind(base.options.spinEvent, function(event){ base.trigger(); }); }; // declare new function in jquery $.fn.libSlot = function(options){ new $.libSlot(this, options); }; })(jQuery); function getParameterByName(name) { name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]"); var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search); return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " ")); } </script> <script type="text/javascript"> $(document).ready(function(){ var maxnum = getParameterByName('maxnum'); for(var i = 1;i<=maxnum;i++){ $( ".slot" ).append("<li>"+i+"</li>"); } $('.slot').libSlot({ spinner: '#playBtn', spinEvent: 'click' }); }); </script> </body> </html>
parnurzeal/go-mysite
assets/wedding/index.html
HTML
mit
4,845
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>geocoq: 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.8.1 / geocoq - 1.0.1</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> geocoq <small> 1.0.1 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-02-10 07:56:43 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-02-10 07:56:43 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.8.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;Julien Narboux &lt;julien@narboux.fr&gt;&quot; homepage: &quot;http://geocoq.github.io/GeoCoq/&quot; bug-reports: &quot;https://github.com/GeoCoq/GeoCoq/issues&quot; authors: [&quot;Gabriel Braun &lt;gabriel.braun@unistra.fr&gt;&quot; &quot;Pierre Boutry &lt;pierre.boutry@unistra.fr&gt;&quot; &quot;Julien Narboux &lt;narboux@unistra.fr&gt;&quot;] license: &quot;LGPL 3&quot; build: [ [&quot;./configure.sh&quot;] [make &quot;-j%{jobs}%&quot;] ] install: [make &quot;install&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.4pl4&quot; &amp; &lt; &quot;8.5~&quot;} ] tags: [ &quot;logpath:GeoCoq&quot; ] synopsis: &quot;A formalization of geometry in Coq based on Tarski&#39;s axiom system&quot; url { src: &quot;https://github.com/GeoCoq/GeoCoq/archive/1.0.1.tar.gz&quot; checksum: &quot;md5=5e656c305b8fd6c2e19a133d899067bd&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-geocoq.1.0.1 coq.8.8.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.8.1). The following dependencies couldn&#39;t be met: - coq-geocoq -&gt; coq &lt; 8.5~ -&gt; ocaml &lt; 4.03.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-geocoq.1.0.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/released/8.8.1/geocoq/1.0.1.html
HTML
mit
6,587
import Ember from 'ember' import config from '../config/environment' export default function () { if (config && config.mirageNamespace) { this.namespace = config.mirageNamespace } this.get('/countries', function ({db}, request) { let search = request.queryParams.p search = search ? search.replace('name:', '') : null const countries = db.countries .filter((country) => { if (search && country.name.indexOf(search) === -1) { return false } return true }) .slice(0, 5) return { countries } }) this.get('/resources', function ({db}, request) { let search = request.queryParams.p search = search ? search.replace('label:', '') : null const resources = db.resources .filter((resource) => { if (search && resource.label.indexOf(search) === -1) { return false } return true }) .slice(0, 5) return { resources } }) this.get('/nodes', function ({db}, request) { const nodes = db.nodes return { nodes } }) ;[ 'models', 'values', 'views' ].forEach((key) => { const pluralizedKey = Ember.String.pluralize(key) this.get(`/${key}`, function ({db}, request) { let items = db[pluralizedKey] if ('modelId' in request.queryParams) { const modelId = request.queryParams.modelId items = items.filter((item) => { return item.modelIds ? item.modelIds.indexOf(modelId) !== -1 : false }) } if ('p' in request.queryParams) { const pQueries = request.queryParams.p.split(',') pQueries.foreach((query) => { let [attr, value] = query.split(':') items = items.filter((item) => { return item[attr] ? item[attr].toLowerCase().indexOf(value.toLowerCase()) !== -1 : false }) }) } return { [key]: items } }) this.get(`/${key}/:id`, function ({db}, request) { return { [key]: db[pluralizedKey].find((item) => item.id === request.params.id) } }) }) this.passthrough() this.passthrough('http://data.consumerfinance.gov/api/**') this.passthrough('http://www.mapquestapi.com/**') }
sandersky/ember-frost-bunsen
tests/dummy/mirage/config.js
JavaScript
mit
2,271
# Criteria > Criteria is a library for creating objective-c command line tools. A very simple, callback approach to handling arguments and values. Just include the .h file, in the main or wherever. Add some options and throw a callback in there that will be executed when Criteria hits the defined flags. ## Usage Example: ```objectivec #import "Criteria.h" int main(int argc, const char * argv[]) { @autoreleasepool { [Criteria addOption:@[@"v", @"version"] callback:^(NSString *value) { printf("\nVersion: 1.0.0\n"); }]; [Criteria run]; } return 0; } ``` ## If you need me * [Github](http://www.github.com/wess) * [@WessCope](http://www.twitter.com/wesscope) ## License Read LICENSE file for more info.
wess/Criteria
README.md
Markdown
mit
735
/**************************************************************************** ** Meta object code from reading C++ file 'walletstack.h' ** ** Created by: The Qt Meta Object Compiler version 63 (Qt 4.8.5) ** ** WARNING! All changes made in this file will be lost! *****************************************************************************/ #include "../src/qt/walletstack.h" #if !defined(Q_MOC_OUTPUT_REVISION) #error "The header file 'walletstack.h' doesn't include <QObject>." #elif Q_MOC_OUTPUT_REVISION != 63 #error "This file was generated using the moc from 4.8.5. It" #error "cannot be used with the include files from this version of Qt." #error "(The moc has changed too much.)" #endif QT_BEGIN_MOC_NAMESPACE static const uint qt_meta_data_WalletStack[] = { // content: 6, // revision 0, // classname 0, 0, // classinfo 17, 14, // methods 0, 0, // properties 0, 0, // enums/sets 0, 0, // constructors 0, // flags 0, // signalCount // slots: signature, parameters, type, tag, flags 18, 13, 12, 12, 0x0a, 44, 12, 12, 12, 0x0a, 63, 12, 12, 12, 0x0a, 83, 12, 12, 12, 0x0a, 101, 12, 12, 12, 0x0a, 123, 12, 12, 12, 0x0a, 151, 146, 12, 12, 0x0a, 178, 12, 12, 12, 0x2a, 198, 146, 12, 12, 0x0a, 226, 12, 12, 12, 0x2a, 247, 146, 12, 12, 0x0a, 277, 12, 12, 12, 0x2a, 307, 300, 12, 12, 0x0a, 327, 12, 12, 12, 0x0a, 342, 12, 12, 12, 0x0a, 361, 12, 12, 12, 0x0a, 376, 12, 12, 12, 0x0a, 0 // eod }; static const char qt_meta_stringdata_WalletStack[] = { "WalletStack\0\0name\0setCurrentWallet(QString)\0" "gotoOverviewPage()\0gotoMessagingPage()\0" "gotoHistoryPage()\0gotoAddressBookPage()\0" "gotoReceiveCoinsPage()\0addr\0" "gotoSendCoinsPage(QString)\0" "gotoSendCoinsPage()\0gotoSignMessageTab(QString)\0" "gotoSignMessageTab()\0gotoVerifyMessageTab(QString)\0" "gotoVerifyMessageTab()\0status\0" "encryptWallet(bool)\0backupWallet()\0" "changePassphrase()\0unlockWallet()\0" "setEncryptionStatus()\0" }; void WalletStack::qt_static_metacall(QObject *_o, QMetaObject::Call _c, int _id, void **_a) { if (_c == QMetaObject::InvokeMetaMethod) { Q_ASSERT(staticMetaObject.cast(_o)); WalletStack *_t = static_cast<WalletStack *>(_o); switch (_id) { case 0: _t->setCurrentWallet((*reinterpret_cast< const QString(*)>(_a[1]))); break; case 1: _t->gotoOverviewPage(); break; case 2: _t->gotoMessagingPage(); break; case 3: _t->gotoHistoryPage(); break; case 4: _t->gotoAddressBookPage(); break; case 5: _t->gotoReceiveCoinsPage(); break; case 6: _t->gotoSendCoinsPage((*reinterpret_cast< QString(*)>(_a[1]))); break; case 7: _t->gotoSendCoinsPage(); break; case 8: _t->gotoSignMessageTab((*reinterpret_cast< QString(*)>(_a[1]))); break; case 9: _t->gotoSignMessageTab(); break; case 10: _t->gotoVerifyMessageTab((*reinterpret_cast< QString(*)>(_a[1]))); break; case 11: _t->gotoVerifyMessageTab(); break; case 12: _t->encryptWallet((*reinterpret_cast< bool(*)>(_a[1]))); break; case 13: _t->backupWallet(); break; case 14: _t->changePassphrase(); break; case 15: _t->unlockWallet(); break; case 16: _t->setEncryptionStatus(); break; default: ; } } } const QMetaObjectExtraData WalletStack::staticMetaObjectExtraData = { 0, qt_static_metacall }; const QMetaObject WalletStack::staticMetaObject = { { &QStackedWidget::staticMetaObject, qt_meta_stringdata_WalletStack, qt_meta_data_WalletStack, &staticMetaObjectExtraData } }; #ifdef Q_NO_DATA_RELOCATION const QMetaObject &WalletStack::getStaticMetaObject() { return staticMetaObject; } #endif //Q_NO_DATA_RELOCATION const QMetaObject *WalletStack::metaObject() const { return QObject::d_ptr->metaObject ? QObject::d_ptr->metaObject : &staticMetaObject; } void *WalletStack::qt_metacast(const char *_clname) { if (!_clname) return 0; if (!strcmp(_clname, qt_meta_stringdata_WalletStack)) return static_cast<void*>(const_cast< WalletStack*>(this)); return QStackedWidget::qt_metacast(_clname); } int WalletStack::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QStackedWidget::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { if (_id < 17) qt_static_metacall(this, _c, _id, _a); _id -= 17; } return _id; } QT_END_MOC_NAMESPACE
danielmash/matchcoin-wallet
build/moc_walletstack.cpp
C++
mit
4,766
// ref: http://www.cplusplus.com/reference/future/future/ // future example #include <iostream> // std::cout #include <future> // std::async, std::future #include <chrono> // std::chrono::milliseconds // a non-optimized way of checking for prime numbers: bool is_prime (int x) { for (int i=2; i<x; ++i) if (x%i==0) return false; return true; } int main () { // call function asynchronously: // std::future<bool> fut = std::async (is_prime,444444443); // <--- BAD! std::future<bool> fut = std::async (std::launch::async, []() { return is_prime(444444443); }); // do something while waiting for function to set future: std::cout << "checking, please wait"; std::chrono::milliseconds span (100); while (fut.wait_for(span)==std::future_status::timeout) std::cout << '.' << std::flush; bool x = fut.get(); // retrieve return value std::cout << "\n444444443 " << (x?"is":"is not") << " prime.\n"; return 0; }
flavio-fernandes/oclock
misc/junk/c++/future3.cpp
C++
mit
967
<div id="page-wrapper"> <div class="row"> <div class="col-lg-12"> <h3 class="page-header">Causas</h3> <div class="form-group" style="width: 100%" > <div style="width: 40%; float: left;"> <?php echo "<code><a class='btn btn-primary btn btn-large' href='$base/disenio/insert/'> <span class='glyphicon-plus'></span> Nuevo</a></code>"; ?> </div> <div style="width: 25%; float: right;"> <div class="panel panel-green"> <div class="panel-heading"> <h4 class="panel-title"> <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne">Buscar</a> </h4> </div> <div id="collapseOne" class="panel-collapse collapse"> <div class="panel-body"> <form method="POST" action="<?php echo base_url() . "causa/Buscar"; ?>"> <table> <tr> <td> <label>Buscar: </label> </td> <td> <input type="text" name="dato" class="form-control" placeholder="Abollado" required="TRUE"> </td> <td> <span class="input-group-btn"> <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button> </span> </td> </tr> </table> </form> </div> </div> </div> </div> </div> </div> </div> <br> <br> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-heading"> <div class="form-group input-group" > <form method="POST" action="<?php echo base_url() . "causa/Lim"; ?>"> <table> <tr> <td> <label>Mostrar: </label> </td> <td> <select name="dato" class="form-control" required="TRUE"> <option value="">Selecciona</option> <option value="10">10</option> <option value="50">50</option> <option value="100">100</option> <option value="1000">Todos</option> </select> </td> <td> <span class="input-group-btn"> <button class="btn btn-default" type="submit"><i class="fa fa-search"></i></button> </span> </td> </tr> </table> </form> </div> </div> <div class="panel-body"> <div class="row"> <div class="table-responsive"> <?php echo '<table class ="table table-bordered>"'; echo '<TR><TD>'; echo '<b><center>Causa'; echo '</TD><TD colspan=2>'; echo '<b><center>Acción '; echo '</TD></TR>'; foreach ($datos as $obj){ echo '</TD><TD>'; echo $obj->getTipoCausa(); echo '</TD><TD>'; echo "<a class = 'fa fa-trash-o fa-lg' href='$base/causa/delete/" . $obj->getIdCausa() . "'></a>"; echo '</TD><TD>'; echo "<a class = 'fa fa-pencil fa-fw' href='$base/causa/update/" .$obj->getIdCausa() . "'></a>"; echo '</TD></TR>'; } echo '</table>'; if (empty($datos)) { echo '<div style="text-align: center" class="alert-danger"><strong>No existen registros!!!</strong> Intenta con otro dato <span class="glyphicon glyphicon-alert"><span/></div >'; } echo '</div>'; ?> </div> </div> </div> </div> </div> </div> </div>
SoldierVega/SIRSJ1
application/views/causa/listCausa.php
PHP
mit
5,886
<?php declare(strict_types=1); namespace Phpcq\Runner\Console\Definition\OptionValue; final class OptionParamsDefinition extends OptionValueDefinition { /** * @var array<string,mixed> */ private $params; /** @param array<string,mixed> $params */ public function __construct(bool $required, array $params) { parent::__construct($required); $this->params = $params; } /** @return array<string,mixed> */ public function getParams(): array { return $this->params; } }
phpcq/phpcq
src/Console/Definition/OptionValue/OptionParamsDefinition.php
PHP
mit
544
package kv import ( "sort" "github.com/gocontrib/nosql/q" ) type lookup struct { collection *collection tx Tx } func (c lookup) find(f []interface{}) keys { return c.and(f) } func (c lookup) condition(f interface{}) keys { switch t := f.(type) { case q.Not: return emptyKeys case q.And: return c.and(t) case q.Or: return c.or(t) case q.M: var set hashset for name, val := range t { var keys = c.field(name, val) if set == nil { set = newHashset(keys) continue } var set2 = make(hashset) for _, k := range keys { if set.has(k) { set2.add(k) } } set = set2 if len(set) == 0 { return emptyKeys } } if set == nil { return emptyKeys } return set.toArray() } return emptyKeys } func (c lookup) field(name string, value interface{}) keys { if name == "id" || name == "_id" { var s, ok = value.(string) if !ok { return emptyKeys } return keys{s} } var idxName = "idx_" + c.collection.name + "_" + name idx, err := c.tx.Bucket(idxName, false) if err != nil || idx == nil { return emptyKeys } switch v := value.(type) { case string: raw, err := idx.Get([]byte(v)) if err != nil || raw == nil { return emptyKeys } return unmarshalKeys(raw) } return emptyKeys } func (c lookup) and(f []interface{}) keys { if len(f) == 1 { return c.condition(f[0]) } var set = newHashset(c.condition(f[0])) if len(set) == 0 { return emptyKeys } for i := 1; i < len(f); i++ { var keys = c.condition(f[i]) var set2 = make(hashset) for _, k := range keys { if set.has(k) { set2.add(k) } } set = set2 if len(set) == 0 { return emptyKeys } } return set.toArray() } func (c lookup) or(f []interface{}) keys { if len(f) == 1 { return c.condition(f[0]) } var set = newHashset(c.condition(f[0])) for i := 1; i < len(f); i++ { var keys = c.condition(f[i]) for _, k := range keys { set.add(k) } } return set.toArray() } // determines whether given filter(s) can use index tables func (c lookup) isSuitable(f interface{}) bool { switch t := f.(type) { case q.Not: return false case q.And: for _, i := range t { if !c.isSuitable(i) { return false } } return true case q.Or: for _, i := range t { if !c.isSuitable(i) { return false } } return true case []interface{}: for _, i := range t { if !c.isSuitable(i) { return false } } return true case q.M: for name, v := range t { switch v.(type) { case q.In: return false case q.NotIn: return false case q.Op: return false } // now only strings are indexed s, ok := v.(string) if !ok { return len(s) > 0 } if name == "id" || name == "_id" { return true } var idxName = "idx_" + c.collection.name + "_" + name idx, err := c.tx.Bucket(idxName, false) if err != nil || idx == nil { return false } } return true } return false } // hashset of strings type hashset map[string]struct{} func (s hashset) has(k string) bool { _, h := s[k] return h } func (s hashset) add(k string) bool { if _, h := s[k]; h { return false } s[k] = struct{}{} return true } func (s hashset) toArray() []string { var a []string for k := range s { a = append(a, k) } sort.Strings(a) return a } func newHashset(keys []string) hashset { var t = make(hashset) for _, k := range keys { t.add(k) } return t }
gocontrib/nosql
kv/lookup.go
GO
mit
3,434
package omise // Dispute represents Omise's dispute object. // See https://www.omise.co/disputes-api for more information. type Dispute struct { Base Amount int64 `json:"amount"` Currency string `json:"currency"` Status DisputeStatus `json:"status"` Message string `json:"message"` Charge string `json:"charge"` Metadata map[string]interface{} `json:"metadata,omitempty"` }
omise/omise-go
dispute.go
GO
mit
463
// // NSString+WhitespaceStripping.h // Puissant // // Created by Robert Widmann on 2/2/13. // Copyright (c) 2013 CodaFi. All rights reserved. // #import <Foundation/Foundation.h> @interface NSString (WhitespaceStripping) - (NSString*)stringByTrimmingLeadingWhitespace; - (NSString*)stringByTrimmingTailingWhitespace; - (NSString*)stringByTrimmingLeadingAndTailingWhitespace; @end
DotMail/Puissant
Puissant/NSString+WhitespaceStripping.h
C
mit
389
// // LYCObjectCardAdapter.h // LYCAdapterPattern // // Created by YouchengLi on 2017/6/22. // Copyright © 2017年 深圳市齐家互联网科技股份有限公司. All rights reserved. // #import "LYCCardAdapter.h" @interface LYCObjectCardAdapter : LYCCardAdapter @end
LiYouCheng/iOSDesignPattern
LYCAdapterPattern/LYCAdapterPattern/LYCObjectCardAdapter.h
C
mit
278
import micropython micropython.alloc_emergency_exception_buf(100) import pyb import micropython class Heartbeat(object): def __init__(self): self.tick = 0 self.led = pyb.LED(4) # 4 = Blue tim = pyb.Timer(4) tim.init(freq=10) tim.callback(self.heartbeat_cb) def heartbeat_cb(self, tim): if self.tick <= 3: self.led.toggle() self.tick = (self.tick + 1) % 10 class serial_speed_test(object): def __init__(self, freq_Hz): self.tick = 0 self.freq_Hz = freq_Hz tim1 = pyb.Timer(1) tim1.init(freq=freq_Hz) tim1.callback(self.serial_speed_test_cb) def serial_speed_test_cb(self, tim1): print(micros_timer.counter(), ',', 40*self.tick) self.tick = (self.tick + 1) % 100 micropython.alloc_emergency_exception_buf(100) micros_timer = pyb.Timer(2, prescaler=83, period=0x3ffffff) Heartbeat() serial_speed_test(10)
gregnordin/micropython_pyboard
150729_pyboard_to_pyqtgraph/pyboard_code.py
Python
mit
954
<?php declare(strict_types=1); namespace Gos\Bundle\WebSocketBundle\Tests\Server\Type; use Gos\Bundle\WebSocketBundle\Event\ServerLaunchedEvent; use Gos\Bundle\WebSocketBundle\GosWebSocketEvents; use Gos\Bundle\WebSocketBundle\Server\App\ServerBuilderInterface; use Gos\Bundle\WebSocketBundle\Server\Type\WebSocketServer; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Ratchet\MessageComponentInterface; use React\EventLoop\LoopInterface; use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; class WebSocketServerTest extends TestCase { /** * @var MockObject|ServerBuilderInterface */ private $serverBuilder; /** * @var MockObject|LoopInterface */ private $loop; /** * @var MockObject|EventDispatcherInterface */ private $eventDispatcher; protected function setUp(): void { parent::setUp(); $this->serverBuilder = $this->createMock(ServerBuilderInterface::class); $this->loop = $this->createMock(LoopInterface::class); $this->eventDispatcher = $this->createMock(EventDispatcherInterface::class); } /** * @runInSeparateProcess */ public function testTheServerIsLaunched(): void { $this->serverBuilder->expects(self::once()) ->method('buildMessageStack') ->willReturn($this->createMock(MessageComponentInterface::class)); $this->eventDispatcher->expects(self::once()) ->method('dispatch') ->with(self::isInstanceOf(ServerLaunchedEvent::class), GosWebSocketEvents::SERVER_LAUNCHED); $this->loop->expects(self::once()) ->method('run'); (new WebSocketServer($this->serverBuilder, $this->loop, $this->eventDispatcher)) ->launch('127.0.0.1', 1337, false); } /** * @runInSeparateProcess */ public function testTheServerIsLaunchedWithTlsSupport(): void { $this->serverBuilder->expects(self::once()) ->method('buildMessageStack') ->willReturn($this->createMock(MessageComponentInterface::class)); $this->eventDispatcher->expects(self::once()) ->method('dispatch') ->with(self::isInstanceOf(ServerLaunchedEvent::class), GosWebSocketEvents::SERVER_LAUNCHED); $this->loop->expects(self::once()) ->method('run'); (new WebSocketServer($this->serverBuilder, $this->loop, $this->eventDispatcher, true, ['verify_peer' => false])) ->launch('127.0.0.1', 1337, false); } }
GeniusesOfSymfony/WebSocketBundle
tests/Server/Type/WebSocketServerTest.php
PHP
mit
2,570
<!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="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>pymatgen.cli.pmg_query module &#8212; pymatgen 2018.6.11 documentation</title> <link rel="stylesheet" href="_static/proBlue.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script type="text/javascript" src="_static/jquery.js"></script> <script type="text/javascript" src="_static/underscore.js"></script> <script type="text/javascript" src="_static/doctools.js"></script> <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> <link rel="shortcut icon" href="_static/favicon.ico"/> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-33990148-1']); _gaq.push(['_trackPageview']); </script> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="nav-item nav-item-0"><a href="index.html">pymatgen 2018.6.11 documentation</a> &#187;</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="module-pymatgen.cli.pmg_query"> <span id="pymatgen-cli-pmg-query-module"></span><h1>pymatgen.cli.pmg_query module<a class="headerlink" href="#module-pymatgen.cli.pmg_query" title="Permalink to this headline">¶</a></h1> <dl class="function"> <dt id="pymatgen.cli.pmg_query.do_query"> <code class="descname">do_query</code><span class="sig-paren">(</span><em>args</em><span class="sig-paren">)</span><a class="reference internal" href="_modules/pymatgen/cli/pmg_query.html#do_query"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#pymatgen.cli.pmg_query.do_query" title="Permalink to this definition">¶</a></dt> <dd></dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="_sources/pymatgen.cli.pmg_query.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3>Quick search</h3> <div class="searchformwrapper"> <form class="search" action="search.html" method="get"> <input type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="nav-item nav-item-0"><a href="index.html">pymatgen 2018.6.11 documentation</a> &#187;</li> </ul> </div> <div class="footer" role="contentinfo"> &#169; Copyright 2011, Pymatgen Development Team. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.7.5. </div> <div class="footer">This page uses <a href="http://analytics.google.com/"> Google Analytics</a> to collect statistics. You can disable it by blocking the JavaScript coming from www.google-analytics.com. <script type="text/javascript"> (function() { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.setAttribute('async', 'true'); document.documentElement.firstChild.appendChild(ga); })(); </script> </div> </body> </html>
nisse3000/pymatgen
docs/pymatgen.cli.pmg_query.html
HTML
mit
4,960
from . import server import sys server.main(*sys.argv)
TeamNext/qos.py
qos/__main__.py
Python
mit
55
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>class RubyXL::BodyProperties - rubyXL 3.2.1</title> <link href="../fonts.css" rel="stylesheet"> <link href="../rdoc.css" rel="stylesheet"> <script type="text/javascript"> var rdoc_rel_prefix = "../"; </script> <script src="../js/jquery.js"></script> <script src="../js/navigation.js"></script> <script src="../js/search_index.js"></script> <script src="../js/search.js"></script> <script src="../js/searcher.js"></script> <script src="../js/darkfish.js"></script> <body id="top" role="document" class="class"> <nav role="navigation"> <div id="project-navigation"> <div id="home-section" role="region" title="Quick navigation" class="nav-section"> <h2> <a href="../index.html" rel="home">Home</a> </h2> <div id="table-of-contents-navigation"> <a href="../table_of_contents.html#pages">Pages</a> <a href="../table_of_contents.html#classes">Classes</a> <a href="../table_of_contents.html#methods">Methods</a> </div> </div> <div id="search-section" role="search" class="project-section initially-hidden"> <form action="#" method="get" accept-charset="utf-8"> <div id="search-field-wrapper"> <input id="search-field" role="combobox" aria-label="Search" aria-autocomplete="list" aria-controls="search-results" type="text" name="search" placeholder="Search" spellcheck="false" title="Type to search, Up and Down to navigate, Enter to load"> </div> <ul id="search-results" aria-label="Search Results" aria-busy="false" aria-expanded="false" aria-atomic="false" class="initially-hidden"></ul> </form> </div> </div> <div id="class-metadata"> <div id="parent-class-section" class="nav-section"> <h3>Parent</h3> <p class="link"><a href="OOXMLObject.html">RubyXL::OOXMLObject</a> </div> </div> </nav> <main role="main" aria-labelledby="class-RubyXL::BodyProperties"> <h1 id="class-RubyXL::BodyProperties" class="class"> class RubyXL::BodyProperties </h1> <section class="description"> </section> <section id="5Buntitled-5D" class="documentation-section"> </section> </main> <footer id="validator-badges" role="contentinfo"> <p><a href="http://validator.w3.org/check/referer">Validate</a> <p>Generated by <a href="http://rdoc.rubyforge.org">RDoc</a> 4.1.1. <p>Based on <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>. </footer>
ThijsWouters/rubyXL
rdoc/RubyXL/BodyProperties.html
HTML
mit
2,588
<?php //error_reporting(E_ALL); //ini_set('display_errors', 'On'); ini_set("memory_limit","300M"); set_time_limit(0); $phpModelName = $_GET["layer"]; function getModel($modelname) { include "dbconnect.php"; $modelquery = pg_query($db, "SELECT ST_AsText(geom), \"ID\" FROM public.\"$modelname\"; "); $polygonString = ""; $polyhedralString = ""; $tinzString = ""; $lineString = ""; $pointString = ""; $polyhedralsurfaceID = array(); $tinzID = array(); $linestringID = array(); $pointID = array(); $polygonID = array(); function PolygonZM($pzmModel) { // Unfortunately nearly unreadable, however a lot more efficent than the original code. It essentially a series of string replacements. return str_replace(" nan", "", str_replace(")", "", str_replace("(", "", str_replace(")", "", str_replace("),", " &&& ", $aModel = str_replace("POLYGON ZM (", "", str_replace(" -999999", "", $pzmModel))))))); } function PolyhedralSurfaceZ($pszModel) { return str_replace(")", "", str_replace("(", "", str_replace("POLYHEDRALSURFACE Z (", "", str_replace(" nan", "", $pszModel)))); } function TINZ($tinzModel) { return str_replace(")", "", str_replace("(", " ||| ", str_replace("TIN Z (", "", str_replace(" nan", "", $tinzModel)))); } function LineStringZ($lineString) { return str_replace(")", "", str_replace("(", "", str_replace("LINESTRING ZM", "", str_replace(" -999999", "", str_replace(" nan", "", $lineString))))); } function PointZ($pointString) { return str_replace(")", "", str_replace("(", "", str_replace("POINT ZM", "", str_replace(" -999999", "", str_replace(" nan", "", $pointString))))); } function checkGeometryType($aGeometry) { if (substr( $aGeometry, 0, 10 ) === "POLYGON ZM") { return array("POLYGON ZM", PolygonZM($aGeometry) . " ::: "); } if (substr( $aGeometry, 0, 19 ) === "POLYHEDRALSURFACE Z") { return array("POLYHEDRALSURFACE Z", PolyhedralSurfaceZ($aGeometry) . " ::: "); } if (substr( $aGeometry, 0, 5 ) === "TIN Z") { return array("TIN Z", TINZ($aGeometry)); } if (substr( $aGeometry, 0, 12 ) === "LINESTRING Z") { return array("LINESTRING Z", LineStringZ($aGeometry)); } if (substr( $aGeometry, 0, 7 ) === "POINT Z") { return array("POINT Z", PointZ($aGeometry)); } } while ($model = pg_fetch_row($modelquery)) { if (substr( $model[0], 0, 18 ) === "GEOMETRYCOLLECTION") { $cleanedCollection = str_replace("GEOMETRYCOLLECTION Z (", "", $model[0]); if (substr( $cleanedCollection, 0, 5 ) === "TIN Z") { $TINZgeom = checkGeometryType($cleanedCollection); $tinzString .= $TINZgeom[1] . " %%% "; array_push( $tinzID, $model[1] ); } else { $splitCollection = explode("),", $cleanedCollection); foreach($splitCollection as $collection){ $geomtype = checkGeometryType($collection); if ($geomtype[0] == "POLYHEDRALSURFACE Z") { $polyhedralString .= $geomtype[1]; } if ($geomtype[0] == "POLYGON ZM") { $polygonString .= $geomtype[1]; } } if ($polyhedralString != "") { $polyhedralString .= " %%% "; array_push($polyhedralsurfaceID, $model[1]); } if ($polygonString != "") { $polygonString .= " %%% "; array_push($polygonID, $model[1]); } } } else { $geomtype = checkGeometryType($model[0]); if ($geomtype[0] == "POLYHEDRALSURFACE Z") { $polyhedralString .= $geomtype[1] . " %%% "; array_push($polyhedralsurfaceID, $model[1]); continue; } if ($geomtype[0] == "POLYGON ZM") { $polygonString .= $geomtype[1] . " %%% "; array_push($polygonID, $model[1]); continue; } if ($geomtype[0] == "LINESTRING Z") { $lineString .= $geomtype[1] . " %%% "; array_push($linestringID, $model[1]); continue; } if ($geomtype[0] == "TIN Z") { $tinzString .= $geomtype[1] . " %%% "; array_push($tinzID, $model[1]); continue; } if ($geomtype[0] == "POINT Z") { $pointString .= $geomtype[1] . " %%% "; array_push($pointID, $model[1]); } } } return json_encode( array( array("POLYGON ZM", $polygonString, $polygonID), array("POLYHEDRALSURFACE Z", $polyhedralString, $polyhedralsurfaceID), array("TIN Z", $tinzString, $tinzID), array("LINESTRING Z", $lineString, $linestringID), array("POINT Z", $pointString, $pointID) ) ); } echo getModel($phpModelName); ?>
JamesMilnerUK/Lacuna
ajax/getdataajax.php
PHP
mit
4,445
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>topology: 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+1 / topology - 8.9.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> topology <small> 8.9.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-07-01 08:43:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-07-01 08:43:19 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.12 Preprocessor-pretty-printer of OCaml conf-findutils 1 Virtual package relying on findutils conf-m4 1 Virtual package relying on m4 coq 8.7.1+1 Formal proof management system. num 0 The Num library for arbitrary-precision integer and rational arithmetic ocaml 4.05.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.05.0 Official 4.05.0 release ocaml-config 1 OCaml Switch Configuration 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/topology&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/Topology&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} &quot;coq-zorns-lemma&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.10~&quot;} ] tags: [ &quot;keyword: topology&quot; &quot;keyword: filters&quot; &quot;keyword: nets&quot; &quot;keyword: metric spaces&quot; &quot;keyword: real analysis&quot; &quot;keyword: Urysohn&#39;s lemma&quot; &quot;keyword: Tietze extension theorem&quot; &quot;category: Mathematics/Real Calculus and Topology&quot; ] authors: [ &quot;Daniel Schepler &lt;dschepler@gmail.com&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/topology/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/topology.git&quot; synopsis: &quot;General Topology&quot; description: &quot;&quot;&quot; This library develops some of the basic concepts and results of general topology.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/topology/archive/v8.9.0.tar.gz&quot; checksum: &quot;md5=c8b3a305d79561f5c28d7a76d50418ca&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-topology.8.9.0 coq.8.7.1+1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+1). The following dependencies couldn&#39;t be met: - coq-topology -&gt; coq &gt;= 8.9 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-topology.8.9.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <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.05.0-2.0.6/released/8.7.1+1/topology/8.9.0.html
HTML
mit
7,153
<!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_06) on Sat Dec 12 16:17:59 CET 2009 --> <TITLE> Uses of Class org.mockito.internal.creation.jmock.SerializableNoOp (Mockito API) </TITLE> <META NAME="date" CONTENT="2009-12-12"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="Uses of Class org.mockito.internal.creation.jmock.SerializableNoOp (Mockito API)"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/mockito/internal/creation/jmock/SerializableNoOp.html" title="class in org.mockito.internal.creation.jmock"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/mockito/internal/creation/jmock/\class-useSerializableNoOp.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SerializableNoOp.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>org.mockito.internal.creation.jmock.SerializableNoOp</B></H2> </CENTER> No usage of org.mockito.internal.creation.jmock.SerializableNoOp <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/mockito/internal/creation/jmock/SerializableNoOp.html" title="class in org.mockito.internal.creation.jmock"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../index.html?org/mockito/internal/creation/jmock/\class-useSerializableNoOp.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SerializableNoOp.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
tobyclemson/msci-project
vendor/mockito-1.8.2/doc/org/mockito/internal/creation/jmock/class-use/SerializableNoOp.html
HTML
mit
6,267
/* * Rotate Image * Total Accepted: 10296 Total Submissions: 33430 * * You are given an n x n 2D matrix representing an image. * * Rotate the image by 90 degrees (clockwise). * * Follow up: * Could you do this in-place? */ class Solution { public: void rotate(vector<vector<int> > &matrix) { int n = matrix.size(); for (int i = 0; i < n / 2; i++) { for (int j = i; j < n - 1 - i; j++) { int i1 = i; int i2 = j; int i3 = n - 1 - i; int i4 = n - 1 - j; int j1 = j; int j2 = n - 1 - i; int j3 = n - 1 - j; int j4 = i; singleRotate(i1, j1, i2, j2, i3, j3, i4, j4, matrix); } } } void singleRotate(int i1, int j1, int i2, int j2, int i3, int j3, int i4, int j4, vector<vector<int> > &matrix) { swap(matrix[i1][j1], matrix[i2][j2]); swap(matrix[i1][j1], matrix[i4][j4]); swap(matrix[i3][j3], matrix[i4][j4]); } };
liyiji/LeetCode
008_Rotate_Image.cpp
C++
mit
1,079
#!/usr/bin/env python2 """Hacked-together development server for feedreader. Runs the feedreader server under the /api prefix, serves URI not containing a dot public/index.html, servers everything else to public. """ import logging import tornado.ioloop import tornado.web from feedreader.config import ConnectionConfig, FeederConfig import feedreader.config import feedreader.main class PrefixedFallbackHandler(tornado.web.FallbackHandler): """FallbackHandler that removes the given prefix from requests.""" def prepare(self): # hacky way of removing /api/ self.request.uri = self.request.uri[4:] self.request.path = self.request.path[4:] super(PrefixedFallbackHandler, self).prepare() class SingleFileHandler(tornado.web.StaticFileHandler): """FileHandler that only reads a single static file.""" @classmethod def get_absolute_path(cls, root, path): return tornado.web.StaticFileHandler.get_absolute_path(root, "index.html") def main(): logging.basicConfig(format='[%(levelname)s][%(name)s]: %(message)s') logging.getLogger().setLevel(logging.DEBUG) feeder_config = FeederConfig.from_args() conn_config = ConnectionConfig.from_file(feeder_config.conn_filepath) feedreader_app = feedreader.main.get_application(feeder_config, conn_config) application = tornado.web.Application([ (r"/api/(.*)", PrefixedFallbackHandler, dict(fallback=feedreader_app)), (r"/(.*\..*)", tornado.web.StaticFileHandler, {"path": "public"}), (r"/(.*)", SingleFileHandler, {"path": "public"}), ]) application.listen(feeder_config.port) tornado.ioloop.IOLoop.instance().start() if __name__ == "__main__": main()
tdryer/feeder
run.py
Python
mit
1,843
# CentralConfig - Multi-machine configuration manager ## Overview CentralConfig is a replacement for the built in .net ConfigurationManager. It makes managing multi-machine configurations simple while, from a usability point of view, looking very similar to ConfigurationManager. ## Features * All config must be able to be stored in version control * A way to have config centralised. I.e. you should not have to update the same setting on multiple machines. * Support for multiple environments (dev, build, test, prod etc) * A sane and simple way of having default values. You should not have to specify the same settings for each machine if a default will work. * Override a setting for a particular machine. e.g. one machine in an environment must have a slightly different config. * Simple and light weight * Support for simple values as well as more complex object types * A full replacement for ConfigManager ## What about the .net config transformer The .net transformer does a reasonable job but did not quite do everything I required. The examples below should show some of the differences ## Using CentralConfig Install "CentralConfig" from nuget Unless you have created a custom persistor use the mongo settings persistor Set the central config mongo settings Setup DI ### app.settings for the mong persistor ```xml <appSettings> <add key="MongoDB.Server" value="mongodb://localhost:27017" /> <add key="CentralConfig.MongoDatabase" value="TestConfig" /> </appSettings> ``` ### DI setup ```csharp ObjectFactory.Configure( x => { x.For<IEnvironment>().Use<SystemEnvironment>(); x.For<IConfigPersistor>().Use<MongoDbConfigPersistor>(); } ); ```` ### Configure settings in Mongo ```javascript { "key" : "TestSetting", "machine" : null, "value" : "some value" } ``` ### Use the setting from code ```csharp //ConfigManager.AppSettings["TestSetting"] Console.WriteLine( "test: {0}", ConfigManager.AppSettings["TestSetting"] ); ``` ## Different Persistors I've always used the mongo persistor but you can easily create new persistors as required. To do so implement the IPersistor interface ```csharp public interface IConfigPersistor { string ReadAppSetting( string key, string machine, long version ); string ReadAppSetting( string key, string machine ); string ReadAppSetting( string key, long version ); string ReadAppSetting( string key ); TResult GetSection<TResult>( string sectionName, string machine, long version ); TResult GetSection<TResult>( string sectionName, string machine ); TResult GetSection<TResult>( string sectionName, long version ); TResult GetSection<TResult>( string sectionName ); } ``` ## Order of matching When you request a value, CentralConfig will try find the most specific value it can. So it will first look for the setting match both the key and the current machine name, if that does not match then it looks for a value matching on key only ```javascript { "key" : "TestSetting", "machine" : null, "value" : "some value" }, { "key" : "TestSetting", "machine" : "MYPC", "value" : "another value" } ``` Given the mongo settings above when you request "TestSetting" you will get "another value" if your machine name is MYPC or "some value otherwise"
andrevdm/CentralConfig
README.md
Markdown
mit
3,546
{% extends "layout.html" %} {% block content %} <div class="container"> <p><h2 class="form-signin-heading" align="center">Branch Admin Panel</h2></p> <div> <a href="/iletisimpaneli" class="shadow btn btn-success btn-lg btn-block">SMS Panel</a> <a href="/aidatpaneli" class="shadow btn btn-success btn-lg btn-block">Donations Panel</a> <br /> <a href="/" class="shadow btn btn-success btn-lg btn-block">BACK</a> <a href="/logout" class="shadow btn btn-success btn-lg btn-block">SIGN OUT</a> </div> </div> {% endblock %}
AlperSakarya/gorevli
templates/gorevli-paneli.html
HTML
mit
581
// // Generated by class-dump 3.5 (64 bit). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard. // #import <SpriteKit/SKNoiseFieldNode.h> @interface SKTurbulenceFieldNode : SKNoiseFieldNode { } - (void)encodeWithCoder:(id)arg1; - (id)initWithCoder:(id)arg1; - (id)init; - (void)_initialize; - (id)_descriptionClassName; @end
wczekalski/Distraction-Free-Xcode-plugin
Archived/v1/WCDistractionFreeXcodePlugin/Headers/SharedFrameworks/SpriteKit/SKTurbulenceFieldNode.h
C
mit
369
__author__ = 'heddevanderheide' # Django specific from django.conf.urls import patterns, include, url urlpatterns = patterns('', url('', include('fabric_interface.urls')) )
Hedde/fabric_interface
src/main/urls.py
Python
mit
179
using System.Runtime.InteropServices; namespace Meziantou.Framework.Win32.Natives; [StructLayout(LayoutKind.Explicit)] internal struct JOBOBJECT_INFO { [FieldOffset(0)] public JOBOBJECT_EXTENDED_LIMIT_INFORMATION32 ExtendedLimits32; [FieldOffset(0)] public JOBOBJECT_EXTENDED_LIMIT_INFORMATION64 ExtendedLimits64; public static JOBOBJECT_INFO From(JobObjectLimits limits) { var info = new JOBOBJECT_INFO(); if (Environment.Is64BitProcess) { info.ExtendedLimits64.BasicLimits.ActiveProcessLimit = limits.ActiveProcessLimit; info.ExtendedLimits64.BasicLimits.Affinity = limits.Affinity; info.ExtendedLimits64.BasicLimits.MaximumWorkingSetSize = (uint)limits.MaximumWorkingSetSize; info.ExtendedLimits64.BasicLimits.MinimumWorkingSetSize = (uint)limits.MinimumWorkingSetSize; info.ExtendedLimits64.BasicLimits.PerJobUserTimeLimit = limits.PerJobUserTimeLimit; info.ExtendedLimits64.BasicLimits.PerProcessUserTimeLimit = limits.PerProcessUserTimeLimit; info.ExtendedLimits64.BasicLimits.PriorityClass = limits.PriorityClass; info.ExtendedLimits64.BasicLimits.SchedulingClass = limits.SchedulingClass; info.ExtendedLimits64.ProcessMemoryLimit = limits.ProcessMemoryLimit; info.ExtendedLimits64.JobMemoryLimit = limits.JobMemoryLimit; info.ExtendedLimits64.BasicLimits.LimitFlags = limits.InternalFlags; } else { info.ExtendedLimits32.BasicLimits.ActiveProcessLimit = limits.ActiveProcessLimit; info.ExtendedLimits32.BasicLimits.Affinity = limits.Affinity; info.ExtendedLimits32.BasicLimits.MaximumWorkingSetSize = (uint)limits.MaximumWorkingSetSize; info.ExtendedLimits32.BasicLimits.MinimumWorkingSetSize = (uint)limits.MinimumWorkingSetSize; info.ExtendedLimits32.BasicLimits.PerJobUserTimeLimit = limits.PerJobUserTimeLimit; info.ExtendedLimits32.BasicLimits.PerProcessUserTimeLimit = limits.PerProcessUserTimeLimit; info.ExtendedLimits32.BasicLimits.PriorityClass = limits.PriorityClass; info.ExtendedLimits32.BasicLimits.SchedulingClass = limits.SchedulingClass; info.ExtendedLimits32.ProcessMemoryLimit = (uint)limits.ProcessMemoryLimit; info.ExtendedLimits32.JobMemoryLimit = (uint)limits.JobMemoryLimit; info.ExtendedLimits32.BasicLimits.LimitFlags = limits.InternalFlags; } return info; } }
meziantou/Meziantou.Framework
src/Meziantou.Framework.Win32.Jobs/Natives/JOBOBJECT_INFO.cs
C#
mit
2,557
cd /d %~dp0 spp.exe --debug --verbose=vfs.debug --mode=1024x768 start.js
xxd3vin/spp-sdk
tools/viewmaterial/target/run.bat
Batchfile
mit
72
/* * This file was automatically generated by sel-utils and * released under the MIT License. * * License: https://github.com/sel-project/sel-utils/blob/master/LICENSE * Repository: https://github.com/sel-project/sel-utils * Generated from https://github.com/sel-project/sel-utils/blob/master/xml/protocol/pocket102.xml */ package sul.protocol.pocket102.play; import sul.utils.*; public class AddHangingEntity extends Packet { public static final byte ID = (byte)17; public static final boolean CLIENTBOUND = true; public static final boolean SERVERBOUND = false; @Override public int getId() { return ID; } public long entityId; public long runtimeId; public sul.protocol.pocket102.types.BlockPosition position; public int unknown3; public AddHangingEntity() {} public AddHangingEntity(long entityId, long runtimeId, sul.protocol.pocket102.types.BlockPosition position, int unknown3) { this.entityId = entityId; this.runtimeId = runtimeId; this.position = position; this.unknown3 = unknown3; } @Override public int length() { return Buffer.varlongLength(entityId) + Buffer.varlongLength(runtimeId) + position.length() + Buffer.varintLength(unknown3) + 1; } @Override public byte[] encode() { this._buffer = new byte[this.length()]; this.writeBigEndianByte(ID); this.writeVarlong(entityId); this.writeVarlong(runtimeId); this.writeBytes(position.encode()); this.writeVarint(unknown3); return this.getBuffer(); } @Override public void decode(byte[] buffer) { this._buffer = buffer; readBigEndianByte(); entityId=this.readVarlong(); runtimeId=this.readVarlong(); position=new sul.protocol.pocket102.types.BlockPosition(); position._index=this._index; position.decode(this._buffer); this._index=position._index; unknown3=this.readVarint(); } public static AddHangingEntity fromBuffer(byte[] buffer) { AddHangingEntity ret = new AddHangingEntity(); ret.decode(buffer); return ret; } @Override public String toString() { return "AddHangingEntity(entityId: " + this.entityId + ", runtimeId: " + this.runtimeId + ", position: " + this.position.toString() + ", unknown3: " + this.unknown3 + ")"; } }
sel-utils/java
src/main/java/sul/protocol/pocket102/play/AddHangingEntity.java
Java
mit
2,186
{% extends 'theme/base.html' %} {% block header_secondary %} {# No secondary header. #} {% endblock %} {% block section_main_content %} <div class="posts"> {% for post in post_list %} {% with listpage = True %} {% include 'theme/_single_post.html' %} {% endwith %} {% endfor %} </div> <div class="row archives"> <div class="small-12 columns post-links"> <ul class="row"> <li class="small-6 medium-4 columns text-left"> {% if has_next %} <a href="{{ urlname('listpage', (slice_num + 1)) }}">← older posts</a> {% else %} &nbsp; {% endif %} </li> <li class="small-6 medium-4 medium-push-4 columns text-right"> {% if has_previous %} <a href="{{ urlname('listpage', (slice_num - 1)) }}">newer posts →</a> {% else %} &nbsp; {% endif %} </li> <li class="small-12 medium-4 medium-pull-4 small-centered columns text-center"> <a href="{{ urlname('archives') }}"> &ndash; archives &ndash; </a> </li> </ul> </div> </div> {% endblock %}
tylerbutler/engineer
engineer/_themes/dark_rainbow/templates/theme/post_list.html
HTML
mit
1,378
Modernizr.addTest("csspositionsticky",function(){var e="position:",t="sticky",n=document.createElement("modernizr"),r=n.style;return r.cssText=e+Modernizr._prefixes.join(t+";"+e).slice(0,-e.length),r.position.indexOf(t)!==-1});
camoconnell/jasper
js/dist/bower_components/modernizr/feature-detects/css-positionsticky.js
JavaScript
mit
227
'use strict'; describe('Protractor Demo App', function() { // it('should add a todo', function() { // browser.get('https://angularjs.org'); // browser.sleep(5000); // element(by.model('todoList.todoText')).sendKeys('write first protractor test'); // element(by.css('[value="add"]')).click(); // browser.sleep(5000); // var todoList = element.all(by.repeater('todo in todoList.todos')); // expect(todoList.count()).toEqual(3); // expect(todoList.get(2).getText()).toEqual('write first protractor test'); // // You wrote your first test, cross it off the list // todoList.get(2).element(by.css('input')).click(); // var completedAmount = element.all(by.css('.done-true')); // expect(completedAmount.count()).toEqual(2); // browser.sleep(10000); // }); it('should take a quiz' ,function () { //browser.get('http://biotility.herokuapp.com/'); browser.get('http://localhost:3000/'); browser.sleep(2000); element(by.css('[value="Applications_quiz"]')).click(); browser.sleep(1000); element(by.css('[value="start"]')).click(); browser.sleep(1000); element(by.css('[value="1"]')).click(); browser.sleep(2000); element(by.css('[value="next"]')).click(); element(by.css('[value="3"]')).click(); browser.sleep(2000); element(by.css('[value="next"]')).click(); element(by.css('[value="1"]')).click(); browser.sleep(2000); element(by.css('[value="next"]')).click(); element(by.css('[value="T"]')).click(); browser.sleep(2000); element(by.css('[value="next"]')).click(); element(by.css('[value="finished"]')).click(); browser.sleep(2000); // var score = element(by.class('results-s')); // //expect(score.value).toEqual(4); // //var score = angular // expect(score.getText()).toEqual('You got 4 / 4 questions correct.'); // browser.sleep(2000); }); // beforeEach(module( ApplicationConfiguration.registerModule('quiz') )); // var $controller; // beforeEach(inject(function(_$controller_){ // // The injector unwraps the underscores (_) from around the parameter names when matching // $controller = _$controller_; // })); // describe('$QuizController', function() { // it('sets the strength to "strong" if the password length is >8 chars', function() { // var $scope = {}; // var controller = $controller('PasswordController', { $scope: $scope }); // $scope.password = 'longerthaneightchars'; // $scope.grade(); // expect($scope.strength).toEqual('strong'); // }); // }); });
SoftwareEngineering5c/Biotility
modules/quiz/tests/e2e/quiz.e2e.tests.js
JavaScript
mit
2,664
<!DOCTYPE html> <html> <head> <title>MoMoKo.in - momoko | MoMoKo.in | 丸子家.在内</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <link rel="stylesheet" href="http://MOMOKO.in/theme/css/bootstrap.min.css" type="text/css" /> <link rel="stylesheet" href="http://MOMOKO.in/theme/css/bootstrap-responsive.min.css" type="text/css" /> <link rel="stylesheet" href="http://MOMOKO.in/theme/css/main.css" type="text/css" /> <link href="http://MOMOKO.in/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="丸子家.在内 Atom Feed" /> <script type="text/javascript" src="http://cdn.staticfile.org/jquery/2.1.0/jquery.min.js"></script> </head> <body id="index"> <div class="row-fluid"> <div class="span10 offset1"> <header id="banner" > <h1><!--MoMoKo.in --> <a href="http://MOMOKO.in/"> M<button class="btn disabled btn-danger">O</button>M<button class="btn disabled btn-danger">O</button>K<button class="btn disabled btn-primary">O</button>.in <sup>丸子家.在内</sup> </a> </h1> <nav class="navbar"> <div class="navbar-inner"> <ul class="nav"> <li ><a href="http://MOMOKO.in/events/index.html">Events</a></li> <li ><a href="http://MOMOKO.in/family/index.html">Family</a></li> <li ><a href="http://MOMOKO.in/niuniu/index.html">NiuNiu</a></li> </ul> <!-- --> </div> </nav> </header><!-- /#banner --> </div> </div> <div class="row-fluid"> <div class="span10 offset1"> <div class="row-fluid"> <section> <ol id="posts-list" class="hfeed" start="0"> <li> <article> <header> <h1 class="entry-title"> <a href="http://MOMOKO.in/events/summer-15-eating.html" rel="bookmark" title="Permalink to 夏早不重样儿"> 夏早不重样儿 </a> </h1> </header> <div class="entry-content"> <footer class="post-info"> <address class="vcard author"> by <a class="url fn" href="http://MOMOKO.in/author/momoko.html">momoko</a> </address> in <a href="http://MOMOKO.in/events/index.html">Events</a> on 2015-08-12 | <a href="http://MOMOKO.in/events/summer-15-eating.html#disqus_thread">comments</a> </footer><!-- /.post-info --> <h2>起因</h2> <p>7.16~8.12</p> <p>主厨 ~ <img alt="主厨" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-0-chef.jpg?imageView2/2/w/240"> 目测 <code>牛妞</code> <img alt="niuniu" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-0-niuniu.jpg?imageView2/2/w/240"></p> <p>有点儿兽...</p> <h2>于是</h2> <ul> <li>Day28/nn2276<ul> <li><img alt="nn2276" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-28-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2276" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-28-1.jpg?imageView2/2/w/240"></li> <li>嗯哼,修行圆满: <code>暑假早餐不重样儿</code> 明年继续!</li> </ul> </li> <li>Day27/nn2275<ul> <li><img alt="nn2275" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-27-0.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day26/nn2274<ul> <li><img alt="nn2274" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-26-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2274" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-26-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day25/nn2273<ul> <li><img alt="nn2273" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-25-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2273" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-25-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day24/nn2272<ul> <li><img alt="nn2272" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-24-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2272" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-24-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day23/nn2271<ul> <li><img alt="nn2271" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-23-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2271" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-23-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day22/nn2270<ul> <li><img alt="nn2270" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-22-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2270" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-22-1.jpg?imageView2/2/w/240"></li> <li><img alt="nn2270" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-22-2.jpg?imageView2/2/w/240"><ul> <li>偷偷自制的百香果飮</li> </ul> </li> </ul> </li> <li>Day21/nn2269<ul> <li><img alt="nn2269" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-21-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2269" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-21-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day20/nn2268<ul> <li><img alt="nn2268" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-20-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2268" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-20-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day19/nn2267<ul> <li><img alt="nn2267" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-19-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2267" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-19-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day18/nn2265<ul> <li><img alt="nn2265" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-18-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2265" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-18-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day17/nn2264<ul> <li><img alt="nn2264" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-17-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2264" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-17-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day16/nn2263<ul> <li><img alt="nn2263" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-16-0.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day15/nn2262<ul> <li><img alt="nn2262" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-15-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2262" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-15-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day14/nn2261<ul> <li><img alt="nn2261" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-14-0.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day13/nn2260<ul> <li><img alt="nn2260" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-13-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2260" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-13-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day12/nn2259<ul> <li><img alt="nn2259" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-12-0.jpg?imageView2/2/w/240"></li> <li><img alt="nn2259" src="http://momoko.zoomquiet.top/niuniu-albums/15summer/summer-12-1.jpg?imageView2/2/w/240"></li> </ul> </li> <li>Day11 …</li></ul> <p class="readmore"> <a class="btn btn-info" href="http://MOMOKO.in/events/summer-15-eating.html">Read more...</a> </p> </div><!-- /.entry-content --> <hr/> </article> </li> </ol><!-- /#posts-list --> </section><!-- /#content --> <!-- for clean side bar full contents --> <div class="span10"> </div> </div> </div> </div> <footer id="site-footer"> <div class="row-fluid"> <div class="span10 offset1"> <hr/> <section id="sidebar"> <div> <h6>Social</h6> <ul> <li><a href="http://MOMOKO.in/feeds/all.atom.xml" type="application/atom+xml" rel="alternate">atom feed</a></li> <li><a href="https://github.com/PyConChina">GitHub</a></li> <li><a href="http://weekly.pychina.org">Weekly</a></li> <li><a href="http://news.pychina.org">News</a></li> <li><a href="http://MOMOKO.in/feeds/all.atom.xml">rss</a></li> <li><a href="http://MOMOKO.in/archives.html">Archives</a></li> <li><a href="https://gitcafe.com/CPyUG">CPyUG</a></li> <li><a href="http://wiki.woodpecker.org.cn/moin/CPUG">Wiki</a></li> <li><a href="http://weibo.com/pyconcn">weibo</a></li> <li><a href="http://weibo.com/openbookproject">O.B.P</a></li> </ul> </div><!-- /.social --> </section><!-- /#sidebar --> <hr/> <address> <p> This blog is proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>. </p> <p> <a href="http://github.com/jsliang/pelican-fresh/">Fresh</a> is a responsive theme designed by <a href="http://jsliang.com/">jsliang</a>. Special thanks to <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a> and <a href="http://twitter.github.com/bootstrap">Twitter Bootstrap</a>. </p> </address> </div> </div> </footer> <script type="text/javascript"> var disqus_shortname = 'momokoin'; (function () { var s = document.createElement('script'); s.async = true; s.type = 'text/javascript'; s.src = 'http://' + disqus_shortname + '.disqus.com/count.js'; (document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s); }()); </script> <script src="http://MOMOKO.in/theme/js/bootstrap.min.js"></script> </body> </html>
momokowan/momokowan.github.io
author/momoko.html
HTML
mit
11,077
namespace ContactSample.Models { public enum BusinessAreaEnum { Others = 0, CallCenter = 1, PostSales = 2, PreSales = 3, Delivery = 4 } }
GlaucoGodoi/AspNet-MVC5-Angular
ContactSample/Models/BusinessAreaEnum.cs
C#
mit
192
import { Injectable } from '@angular/core'; import { ModelConstructor, BaseModel } from '../../shared/models/base/base-model'; import { BaseRepository } from 'app/core/repositories/base-repository'; import { ViewModelConstructor, BaseViewModel } from 'app/site/base/base-view-model'; /** * Unifies the ModelConstructor and ViewModelConstructor. */ interface UnifiedConstructors { COLLECTIONSTRING: string; new (...args: any[]): any; } /** * Every types supported: (View)ModelConstructors, repos and collectionstrings. */ type TypeIdentifier = UnifiedConstructors | BaseRepository<any, any> | string; /** * Registeres the mapping between collection strings, models constructors, view * model constructors and repositories. * All models need to be registered! */ @Injectable({ providedIn: 'root' }) export class CollectionStringMapperService { /** * Maps collection strings to mapping entries */ private collectionStringMapping: { [collectionString: string]: [ ModelConstructor<BaseModel>, ViewModelConstructor<BaseViewModel>, BaseRepository<BaseViewModel, BaseModel> ]; } = {}; public constructor() {} /** * Registers the combination of a collection string, model, view model and repository * @param collectionString * @param model */ public registerCollectionElement<V extends BaseViewModel, M extends BaseModel>( collectionString: string, model: ModelConstructor<M>, viewModel: ViewModelConstructor<V>, repository: BaseRepository<V, M> ): void { this.collectionStringMapping[collectionString] = [model, viewModel, repository]; } /** * @param obj The object to get the collection string from. * @returns the collectionstring */ public getCollectionString(obj: TypeIdentifier): string { if (typeof obj === 'string') { return obj; } else { return obj.COLLECTIONSTRING; } } /** * @param obj The object to get the model constructor from. * @returns the model constructor */ public getModelConstructor<M extends BaseModel>(obj: TypeIdentifier): ModelConstructor<M> { return this.collectionStringMapping[this.getCollectionString(obj)][0] as ModelConstructor<M>; } /** * @param obj The object to get the view model constructor from. * @returns the view model constructor */ public getViewModelConstructor<M extends BaseViewModel>(obj: TypeIdentifier): ViewModelConstructor<M> { return this.collectionStringMapping[this.getCollectionString(obj)][1] as ViewModelConstructor<M>; } /** * @param obj The object to get the repository from. * @returns the repository */ public getRepository<V extends BaseViewModel, M extends BaseModel>(obj: TypeIdentifier): BaseRepository<V, M> { return this.collectionStringMapping[this.getCollectionString(obj)][2] as BaseRepository<V, M>; } }
emanuelschuetze/OpenSlides
client/src/app/core/core-services/collectionStringMapper.service.ts
TypeScript
mit
3,031
#include "frame/src/cframe.h" double frame_hamiltonian(CFrameType *fr, double t, double *qp, int n_dim) { double v = (fr->energy)(t, (fr->parameters), qp, n_dim); return v; } void frame_gradient(CFrameType *fr, double t, double *qp, int n_dim, double *dH) { (fr->gradient)(t, (fr->parameters), qp, n_dim, dH); } void frame_hessian(CFrameType *fr, double t, double *qp, int n_dim, double *d2H) { // TODO: not implemented!! // TODO: can I just add in the terms from the frame here? // (fr->hessian)(t, (fr->parameters), qp, n_dim, d2H); }
adrn/gala
gala/potential/frame/src/cframe.c
C
mit
564
# Angular File Upload ## v1.2.0 * added grunt watch task. Please use ```grunt watch``` to automatically build angular-file-upload.* files for easier development * imported ngThumb directive in angularFileUpload moudule * if ngThumb is used under under a uploader directive then the thumbnails will be blured according to upload status ## Added support for socket.io-stream Use as normal passing your socketJsClaient client to fileuploader object **Client Side** You may want to have angular js service as in: ```javascript .service('fileService', function (FileUploader, socket) { var uploader = new FileUploader({ socketJsClient : socket }); uploader.filters.push({ name: 'customFilter', fn: function(item /*{File|FileLikeObject}*/, options) { return this.queue.length < 10; } }); return uploader; }); ``` where the socket service is something like ```javascript .factory('socket', function(socketFactory) { // socket.io now auto-configures its connection when we ommit a connection url var ioSocket = io('', { // Send auth token on connection, you will need to DI the Auth service above // 'query': 'token=' + Auth.getToken() path: '/socket.io-client' }); var socket = socketFactory({ ioSocket: ioSocket }); return { socket: socket, /** * Register listeners to sync an array with updates on a model * * Takes the array we want to sync, the model name that socket updates are sent from, * and an optional callback function after new items are updated. * * @param {String} modelName * @param {Array} array * @param {Function} cb */ syncUpdates: function (modelName, array, cb) { cb = cb || angular.noop; /** * Syncs item creation/updates on 'model:save' */ socket.on(modelName + ':save', function (item) { var oldItem = _.find(array, {_id: item._id}); var index = array.indexOf(oldItem); var event = 'created'; // replace oldItem if it exists // otherwise just add item to the collection if (oldItem) { array.splice(index, 1, item); event = 'updated'; } else { array.push(item); } cb(event, item, array); }); /** * Syncs removed items on 'model:remove' */ socket.on(modelName + ':remove', function (item) { var event = 'deleted'; _.remove(array, {_id: item._id}); cb(event, item, array); }); }, /** * Removes listeners for a models updates on the socket * * @param modelName */ unsyncUpdates: function (modelName) { socket.removeAllListeners(modelName + ':save'); socket.removeAllListeners(modelName + ':remove'); }, /** * Send a Stream to the server * * @param {file} the file to upload * @param {Object} metadata */ send : function(file, metadata) { metadata = angular.extend(metadata || {}, { name : file.name, size : file.size }); console.log('Streaming : ', metadata, socket); var stream = ss.createStream(); // upload a file to the server. ss(socket).emit('stream', stream, metadata); ss.createBlobReadStream(file).pipe(stream); return stream; } }; }); ``` **Server Side** You'll need a working instance of Socket.io with socket.io-stream processing incoming stream as in: ```javascript // Got stream from client ss(socket).on('stream', function(stream, metadata) { console.info('Got Stream with metadata: ', metadata); var itemHash = metadata.hash; var size = 0; var progress = 0; stream.on('data', function(chunk) { size += chunk.length; progress = Math.floor(size / metadata.size * 100); socket.emit('progress', { itemKey : itemHash, tx : progress }); }); stream.on('end', function() { console.log('File uploaded successfully'); socket.emit('upload-done', { itemKey : itemHash }); }) }); ``` ## Added support for binary js upload **Client Side** Use as normal but passing your binaryJs client to the fileUploader object as in ```javascript var binaryJsClient = new BinaryClient('ws://localhost:9001'); var uploader = $scope.uploader = new FileUploader({ binaryJsClient : binaryJsClient }); ``` **Server Side** You'll need a working instance of BinaryJs and then you may want to process the incoming stream as in ```javascript client.on('stream', function(stream, meta) { console.log('Received stream: ', stream); console.log('With meta: ', meta); // store stream // var file = fs.createWriteStream('/tmp/' + meta.name); stream.pipe(file); // // Send progress back stream.on('data', function(data){ var progress = {rx: data.length / meta.size}; console.log('Data received: %d', progress.rx); stream.write(progress); }); }); ``` For detailed informations on how to use [BinaryJs](https://github.com/binaryjs/binaryjs) ## About **Angular File Upload** is a module for the [AngularJS](http://angularjs.org/) framework. Supports drag-n-drop upload, upload progress, validation filters and a file upload queue. It supports native HTML5 uploads, but degrades to a legacy iframe upload method for older browsers. Works with any server side platform which supports standard HTML form uploads. When files are selected or dropped into the component, one or more filters are applied. Files which pass all filters are added to the queue and are ready to be uploaded. You could find this module in bower like [_angular file upload_](http://bower.io/search/?q=angular%20file). ## Demos 1. [Simple example](http://nervgh.github.io/pages/angular-file-upload/examples/simple) 2. [Uploads only images (with canvas preview)](http://nervgh.github.io/pages/angular-file-upload/examples/image-preview) 3. [Without bootstrap example](http://nervgh.github.io/pages/angular-file-upload/examples/without-bootstrap) ## More Info 1. [Introduction](https://github.com/nervgh/angular-file-upload/wiki/Introduction) 2. [Module API](https://github.com/nervgh/angular-file-upload/wiki/Module-API) 3. [FAQ](https://github.com/nervgh/angular-file-upload/wiki/FAQ) 4. [Migrate from 0.x.x to 1.x.x](https://github.com/nervgh/angular-file-upload/wiki/Migrate-from-0.x.x-to-1.x.x) 5. [RubyGem](https://github.com/marthyn/angularjs-file-upload-rails)
davidecavaliere/angular-file-upload
README.md
Markdown
mit
6,812
<?php namespace ModuleGenerator\PhpGenerator\WidgetName; final class WidgetNameDataTransferObject { /** @var string */ public $name; /** @var WidgetName|null */ private $widgetNameClass; public function __construct(WidgetName $widgetName = null) { $this->widgetNameClass = $widgetName; if (!$this->widgetNameClass instanceof WidgetName) { return; } $this->name = $this->widgetNameClass->getName(); } public function hasExistingWidgetName(): bool { return $this->widgetNameClass instanceof WidgetName; } public function getWidgetNameClass(): WidgetName { return $this->widgetNameClass; } }
carakas/fork-cms-module-generator
src/PhpGenerator/WidgetName/WidgetNameDataTransferObject.php
PHP
mit
709
<?php namespace jeus\QuickstrikeBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Deck * * @ORM\Table(name="quickstrike_deck") * @ORM\Entity(repositoryClass="jeus\QuickstrikeBundle\Repository\DeckRepository") */ class Deck { const NOMBRE_CARTE_PAR_DECK = 60; /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="nom", type="string", length=50) */ private $nom; /** * @var boolean * * @ORM\Column(name="valide", type="boolean") */ private $valide; /** * @ORM\ManyToOne(targetEntity="jeus\JoueurBundle\Entity\Joueur", inversedBy="Decks") */ protected $joueur; /** * @ORM\OneToOne(targetEntity="jeus\QuickstrikeBundle\Entity\Carte") * @ORM\JoinColumn(nullable=true) */ protected $chamberRecto; /** * @ORM\OneToOne(targetEntity="jeus\QuickstrikeBundle\Entity\Carte") * @ORM\JoinColumn(nullable=true) */ protected $chamberVerso; /** * @ORM\OneToOne(targetEntity="jeus\QuickstrikeBundle\Entity\Carte") * @ORM\JoinColumn(nullable=true) */ protected $CarteDepart; /** * @ORM\OneToMany(targetEntity="jeus\QuickstrikeBundle\Entity\CarteDeck", mappedBy="Deck", cascade={"remove"}) * @ORM\JoinColumn(nullable=true) */ protected $Cartes; /** * Constructor */ public function __construct() { $this->Cartes = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set nom * * @param string $nom * @return Deck */ public function setNom($nom) { $this->nom = $nom; return $this; } /** * Get nom * * @return string */ public function getNom() { return $this->nom; } /** * Set valide * * @param boolean $valide * @return Deck */ public function setValide($valide) { $this->valide = $valide; return $this; } /** * Get valide * * @return boolean */ public function getValide() { return $this->valide; } /** * Set joueur * * @param \jeus\JoueurBundle\Entity\Joueur $joueur * @return Deck */ public function setJoueur(\jeus\JoueurBundle\Entity\Joueur $joueur) { $this->joueur = $joueur; return $this; } /** * Get joueur * * @return \jeus\JoueurBundle\Entity\Joueur */ public function getJoueur() { return $this->joueur; } /** * Set chamberRecto * * @param \jeus\QuickstrikeBundle\Entity\Carte $chamberRecto * @return Deck */ public function setChamberRecto(\jeus\QuickstrikeBundle\Entity\Carte $chamberRecto) { $this->chamberRecto = $chamberRecto; return $this; } /** * Get chamberRecto * * @return \jeus\QuickstrikeBundle\Entity\Carte */ public function getChamberRecto() { return $this->chamberRecto; } /** * Set chamberVerso * * @param \jeus\QuickstrikeBundle\Entity\Carte $chamberVerso * @return Deck */ public function setChamberVerso(\jeus\QuickstrikeBundle\Entity\Carte $chamberVerso) { $this->chamberVerso = $chamberVerso; return $this; } /** * Get chamberVerso * * @return \jeus\QuickstrikeBundle\Entity\Carte */ public function getChamberVerso() { return $this->chamberVerso; } /** * Set CarteDepart * * @param \jeus\QuickstrikeBundle\Entity\Carte $CarteDepart * @return Deck */ public function setCarteDepart(\jeus\QuickstrikeBundle\Entity\Carte $CarteDepart) { $this->CarteDepart = $CarteDepart; return $this; } /** * Get CarteDepart * * @return \jeus\QuickstrikeBundle\Entity\Carte */ public function getCarteDepart() { return $this->CarteDepart; } /** * Add carte * * @param \jeus\QuickstrikeBundle\Entity\CarteDeck $carte * @return Deck */ public function addCarte(\jeus\QuickstrikeBundle\Entity\CarteDeck $carte) { $this->Cartes[] = $carte; return $this; } /** * Remove carte * * @param \jeus\QuickstrikeBundle\Entity\CarteDeck $carte * @return Carte */ public function removeCarte(\jeus\QuickstrikeBundle\Entity\CarteDeck $carte) { $this->Cartes->removeElement($carte); return $this; } /** * Get cartes * * @return \jeus\QuickstrikeBundle\Entity\CarteDeck */ public function getCartes() { return $this->Cartes; } public function carteAjoutable(\jeus\QuickstrikeBundle\Entity\CarteDeck $CarteDeck) { $erreur = ''; //return $erreur; if ($CarteDeck->getCarte()->getTypeCarte()->getTag() == 'CHAMBER') { foreach ($this->getCartes() as $CarteDeckEnCours) { if ( ($CarteDeck->getId() != $CarteDeckEnCours->getId()) && ($CarteDeckEnCours->getCarte()->getTypeCarte()->getTag() == 'CHAMBER') ) { $erreur = 'Une chamber maximum par deck'; } } } else { $CarteDeckChamber = null; foreach ($this->getCartes() as $CarteDeckEnCours) { if ($CarteDeckEnCours->getCarte()->getTypeCarte()->getTag() == 'CHAMBER') { $CarteDeckChamber = $CarteDeckEnCours; break; } } if ($CarteDeckChamber == null) $erreur = "Vous devez choisir une chamber avant de rajouter d'autre carte"; if ( ($erreur == '') && ($CarteDeck->getCarte()->getPersonnageChamber() != '') && ($CarteDeck->getCarte()->getPersonnageChamber() != $CarteDeckChamber->getCarte()->getPersonnageChamber()) ) { $erreur = "Cette carte est à jouer avec " . $CarteDeck->getCarte()->getPersonnageChamber(); } if ($erreur == '') { $tableauTraits = array(); foreach ($CarteDeckChamber->getCarte()->getTraitCartes() as $TraitCarte) { $tableauTraits[] = $TraitCarte->getId(); } foreach ($CarteDeck->getCarte()->getTraitCartes() as $TraitCarte) { if ((!in_array($TraitCarte->getId(), $tableauTraits)) && ($TraitCarte->getTag()!='NEUTRE')) { $erreur = "Cette carte n'a pas le bon trait"; break; } } } if ($erreur == '') { $nombre = 0; foreach ($this->getCartes() as $CarteDeckEnCours) { if ( ($CarteDeckEnCours->getId() != $CarteDeck->getId()) && ($CarteDeckEnCours->getCarte()->getId() == $CarteDeck->getCarte()->getId()) ) { $nombre++; } } if ($nombre >= 4) $erreur = "Vous avez déjà le maximum d'exemplaire pour cette carte"; } } return $erreur; } public function isValide() { $avertissement = ''; //return $avertissement; $Chamber = null; $nombreCarte = null; foreach ($this->getCartes() as $CarteDeckEnCours) { if ($CarteDeckEnCours->getCarte()->getTypeCarte()->getTag() == 'CHAMBER') { $Chamber = $CarteDeckEnCours; } else { $nombreCarte++; } } if ($Chamber == null) $avertissement = "Il faut une Chamber dans le deck"; if ($nombreCarte != self::NOMBRE_CARTE_PAR_DECK) { $avertissement = $nombreCarte." Un deck doit contenir ".self::NOMBRE_CARTE_PAR_DECK." cartes"; } $this->setValide ($avertissement==''); return $avertissement; } }
jsmagghe/tcg
src/jeus/QuickstrikeBundle/Entity/Deck.php
PHP
mit
8,513
# frozen_string_literal: true module Svelte # Version VERSION = '0.3.0' end
notonthehighstreet/svelte
lib/svelte/version.rb
Ruby
mit
81
package com.github.ompc.greys.core; import com.github.ompc.greys.core.util.AliEagleEyeUtils; import com.github.ompc.greys.core.util.GaMethod; import com.github.ompc.greys.core.util.LazyGet; /** * 通知点 */ public final class Advice { public final ClassLoader loader; private final LazyGet<Class<?>> clazzRef; private final LazyGet<GaMethod> methodRef; private final LazyGet<String> aliEagleEyeTraceIdRef; public final Object target; public final Object[] params; public final Object returnObj; public final Throwable throwExp; private final static int ACCESS_BEFORE = 1; private final static int ACCESS_AFTER_RETUNING = 1 << 1; private final static int ACCESS_AFTER_THROWING = 1 << 2; public final boolean isBefore; public final boolean isThrow; public final boolean isReturn; public final boolean isThrowing; public final boolean isReturning; // 回放过程processId // use for TimeTunnelCommand.doPlay() // public final Integer playIndex; /** * for finish * * @param loader 类加载器 * @param clazzRef 类 * @param methodRef 方法 * @param target 目标类 * @param params 调用参数 * @param returnObj 返回值 * @param throwExp 抛出异常 * @param access 进入场景 */ private Advice( ClassLoader loader, LazyGet<Class<?>> clazzRef, LazyGet<GaMethod> methodRef, Object target, Object[] params, Object returnObj, Throwable throwExp, int access) { this.loader = loader; this.clazzRef = clazzRef; this.methodRef = methodRef; this.aliEagleEyeTraceIdRef = lazyGetAliEagleEyeTraceId(loader); this.target = target; this.params = params; this.returnObj = returnObj; this.throwExp = throwExp; isBefore = (access & ACCESS_BEFORE) == ACCESS_BEFORE; isThrow = (access & ACCESS_AFTER_THROWING) == ACCESS_AFTER_THROWING; isReturn = (access & ACCESS_AFTER_RETUNING) == ACCESS_AFTER_RETUNING; this.isReturning = isReturn; this.isThrowing = isThrow; // playIndex = PlayIndexHolder.getInstance().get(); } // 获取阿里巴巴中间件鹰眼ID private LazyGet<String> lazyGetAliEagleEyeTraceId(final ClassLoader loader) { return new LazyGet<String>() { @Override protected String initialValue() throws Throwable { return AliEagleEyeUtils.getTraceId(loader); } }; } /** * 构建Before通知点 */ public static Advice newForBefore( ClassLoader loader, LazyGet<Class<?>> clazzRef, LazyGet<GaMethod> methodRef, Object target, Object[] params) { return new Advice( loader, clazzRef, methodRef, target, params, null, //returnObj null, //throwExp ACCESS_BEFORE ); } /** * 构建正常返回通知点 */ public static Advice newForAfterRetuning( ClassLoader loader, LazyGet<Class<?>> clazzRef, LazyGet<GaMethod> methodRef, Object target, Object[] params, Object returnObj) { return new Advice( loader, clazzRef, methodRef, target, params, returnObj, null, //throwExp ACCESS_AFTER_RETUNING ); } /** * 构建抛异常返回通知点 */ public static Advice newForAfterThrowing( ClassLoader loader, LazyGet<Class<?>> clazzRef, LazyGet<GaMethod> methodRef, Object target, Object[] params, Throwable throwExp) { return new Advice( loader, clazzRef, methodRef, target, params, null, //returnObj throwExp, ACCESS_AFTER_THROWING ); } /** * 获取Java类 * * @return Java Class */ public Class<?> getClazz() { return clazzRef.get(); } /** * 获取Java方法 * * @return Java Method */ public GaMethod getMethod() { return methodRef.get(); } /** * 本次调用是否支持阿里巴巴中间件鹰眼系统 * * @return true:支持;false:不支持; */ public boolean isAliEagleEyeSupport() { return AliEagleEyeUtils.isEagleEyeSupport(aliEagleEyeTraceIdRef.get()); } /** * 获取本次调用阿里巴巴中间件鹰眼跟踪号 * * @return 本次调用阿里巴巴中间件鹰眼跟踪号 */ public String getAliEagleEyeTraceId() { return aliEagleEyeTraceIdRef.get(); } /** * 本次调用是否支持中间件跟踪<br/> * 在很多大公司中,会有比较多的中间件调用链路渲染技术用来记录和支撑分布式调用场景下的系统串联<br/> * 用于串联各个系统调用的一般是一个全局唯一的跟踪号,如果当前调用支持被跟踪,则返回true;<br/> * <p> * 在阿里中,进行跟踪的调用号被称为EagleEye * * @return true:支持被跟踪;false:不支持 */ public boolean isTraceSupport() { return GlobalOptions.isEnableTraceId && isAliEagleEyeSupport(); } /** * {{@link #getAliEagleEyeTraceId()}} 的别名,方便命令行使用 * * @return 本次调用的跟踪号 */ public String getTraceId() { return getAliEagleEyeTraceId(); } }
yuweijun/learning-programming
linux/greys/core/src/main/java/com/github/ompc/greys/core/Advice.java
Java
mit
5,911
/********************************************************************** This source file is a part of Demi3D __ ___ __ __ __ | \|_ |\/|| _)| \ |__/|__| || __)|__/ Copyright (c) 2013-2014 Demi team https://github.com/wangyanxing/Demi3D Released under the MIT License https://github.com/wangyanxing/Demi3D/blob/master/License.txt ***********************************************************************/ #ifndef DiDrvGLPlugin_h__ #define DiDrvGLPlugin_h__ #include "GLPrerequisites.h" #include "EnginePlugin.h" namespace Demi { class DI_GLDRV_API DiDrvGLPlugin : public DiPlugin { public: DiDrvGLPlugin(); ~DiDrvGLPlugin(){} public: const DiString& GetName() const; DI_PLUGIN void Install(); DI_PLUGIN void Uninstall(); private: DI_PLUGIN DiGLDriver* mDriver; }; } #endif
wangyanxing/Demi3D
src/demi/drvGL/DrvGLPlugin.h
C
mit
876
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>persistent-union-find: 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.11.1 / persistent-union-find - 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> persistent-union-find <small> 8.10.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2020-08-20 03:22:08 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2020-08-20 03:22:08 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.11.1 Formal proof management system num 1.3 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.10.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.10.0 Official release 4.10.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/http://www.lri.fr/~filliatr/puf/&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/PersistentUnionFind&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.10&quot; &amp; &lt; &quot;8.11~&quot;} ] tags: [ &quot;keyword: program verification&quot; &quot;keyword: union-find&quot; &quot;keyword: data structures&quot; &quot;keyword: Tarjan&quot; &quot;category: Computer Science/Decision Procedures and Certified Algorithms/Correctness proofs of algorithms&quot; ] authors: [ &quot;Jean-Christophe Filliâtre&quot; ] bug-reports: &quot;https://github.com/coq-contribs/persistent-union-find/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/persistent-union-find.git&quot; synopsis: &quot;Persistent Union Find&quot; description: &quot;&quot;&quot; Correctness proof of the Ocaml implementation of a persistent union-find data structure. See http://www.lri.fr/~filliatr/puf/ for more details.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/persistent-union-find/archive/v8.10.0.tar.gz&quot; checksum: &quot;md5=9d860c3649cb724e3f5e513d1b1ff60b&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-persistent-union-find.8.10.0 coq.8.11.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.11.1). The following dependencies couldn&#39;t be met: - coq-persistent-union-find -&gt; coq &lt; 8.11~ -&gt; ocaml &lt; 4.10 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-persistent-union-find.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"> <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.0-2.0.6/released/8.11.1/persistent-union-find/8.10.0.html
HTML
mit
7,058
import convexpress from "convexpress"; import * as config from "config"; const options = { info: { title: "lk-app-back", version: "1.0.2" }, host: config.HOST }; export default convexpress(options) .serveSwagger() .convroute(require("api/buckets/post")) .convroute(require("api/deployments/post"));
lk-architecture/lk-app-back
src/api/index.js
JavaScript
mit
342
import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; public class Parameters { private ArrayList<Point> data = new ArrayList<Point>(); public Parameters(String path) { readData(path); } public String plot(Integer n) { String plot = "["; Double[] kdist = kdistance(n); ArrayList<Double> plotter = new ArrayList<Double>(); for(int i = 0 ; i < kdist.length ; i++) { plotter.add(kdist[i]); } Collections.sort(plotter); for(int i = 0 ; i < kdist.length ; i++) { plot += plotter.get(i) + " "; } plot = plot.substring(0, plot.length() - 1) + "]"; System.out.println(plot); return plot; } @SuppressWarnings("unchecked") public Double[] kdistance(Integer n) { ArrayList<Point> points = (ArrayList<Point>) data.clone(); Double[][] dists = distances(points); Double[] kdist = new Double[dists.length]; for(int i = 0 ; i < kdist.length ; i++) { kdist[i] = kdist(dists[i], n); } return kdist; } private Double kdist(Double[] vector, Integer n) { ArrayList<Double> temp = new ArrayList<Double>(); for(int i = 0 ; i < vector.length ; i++) { temp.add(vector[i]); } Collections.sort(temp); return temp.get(n); } private Double[][] distances(ArrayList<Point> points) { Double[][] dists = new Double[points.size()][points.size()]; for(int a = 0 ; a < dists.length ; a++) { Point one = points.get(a); for(int b = 0 ; b < dists[0].length ; b++) { Point two = points.get(b); dists[a][b] = new Double(two.distance(one)); } } return dists; } private void readData(String path) { try { BufferedReader br = new BufferedReader(new FileReader(new File(path))); String line = ""; while( (line = br.readLine()) != null ) { String[] aux = line.split("\t"); Double[] coord = new Double[aux.length]; for(int i = 0 ; i < aux.length ; i++) { coord[i] = new Double(aux[i]); } data.add(new Point(coord)); } br.close(); } catch (FileNotFoundException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } } public static void main(String[] args) { Parameters param = new Parameters("C:\\Git\\DataMiningProject\\DBSCAN\\conjunto_agrupamento.data.txt"); param.plot(4); } }
lucasbrunialti/DataMiningProject
DBSCAN/Parameters.java
Java
mit
2,493
var multipart = require('./'); var test = require('tape'); test('produces valid mime multipart archive', function(t) { t.plan(1); var content1 = { content: 'thug', mime: 'text/upstart-job', encoding: 'ascii' }; var content2 = { content: 'life' }; var expected = 'From: nobody Thu Apr 09 2015 14:24:54 GMT+0200\r\nMIME-Version: 1.0\r\nContent-Type: multipart/mixed; boundary="4987e8f2-34a1-41a5-a4aa-3bfc3398651d"\r\n\r\n--4987e8f2-34a1-41a5-a4aa-3bfc3398651d\r\nMIME-Version: 1.0\r\nContent-Type: text/upstart-job; charset="ascii"\r\nContent-Transfer-Encoding: 7bit\r\nContent-Disposition: attachment; filename="file0"\r\n\r\nthug\r\n--4987e8f2-34a1-41a5-a4aa-3bfc3398651d\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset="utf-8"\r\nContent-Transfer-Encoding: 7bit\r\nContent-Disposition: attachment; filename="file1"\r\n\r\nlife\r\n--4987e8f2-34a1-41a5-a4aa-3bfc3398651d--'; var result = multipart.generate([content1, content2], { boundary: '4987e8f2-34a1-41a5-a4aa-3bfc3398651d', from: 'nobody Thu Apr 09 2015 14:24:54 GMT+0200' }); t.equal(result, expected); }); test('custom-fields', function(t) { t.plan(1); var part = { content: 'thug', mime: 'text/upstart-job', encoding: 'koi8-r', filename: 'thug.txt', }; var expected = 'From: nobody Thu Apr 09 2015 14:24:54 GMT+0200\r\nMIME-Version: 1.0\r\nContent-Type: multipart/mixed; boundary="4987e8f2-34a1-41a5-a4aa-3bfc3398651d"\r\n\r\npreamble\r\n--4987e8f2-34a1-41a5-a4aa-3bfc3398651d\r\nMIME-Version: 1.0\r\nContent-Type: text/upstart-job; charset="koi8-r"\r\nContent-Transfer-Encoding: 7bit\r\nContent-Disposition: attachment; filename="thug.txt"\r\n\r\nthug\r\n--4987e8f2-34a1-41a5-a4aa-3bfc3398651d--\r\nepilogue'; var result = multipart.generate([part], { boundary: '4987e8f2-34a1-41a5-a4aa-3bfc3398651d', from: 'nobody Thu Apr 09 2015 14:24:54 GMT+0200', preamble: 'preamble', epilogue: 'epilogue', }); t.equal(result, expected); });
sergi/mime-multipart
test.js
JavaScript
mit
1,995
export default class FormController { constructor($stateParams, $state, EquipamentoServico, Notification) { this.record = {} this.title = 'Adicionando registro' this._service = EquipamentoServico if ($stateParams.id) { this.title = 'Editando registro' this._service.findById($stateParams.id) .then(data => { this.record = data }) } this._state = $state this._notify = Notification } save() { this._service.save(this.record) .then(resp => { this._notify.success('Registro salvo com sucesso!') this._state.go('equipamento.list') }).catch(erro => { this._notify.error('Erro ao salvar o registro!') console.log(erro) }) } } FormController.$inject = ['$stateParams', '$state', 'EquipamentoServico', 'Notification']
lucionei/chamadotecnico
chamadosTecnicosFinal-app/src/app/equipamentos/form.controller.js
JavaScript
mit
977
using System; using System.IO; using System.Linq; using NUnit.Framework; using Xamarin.UITest; using Xamarin.UITest.iOS; using Xamarin.UITest.Queries; namespace MessageBarUITests { [TestFixture] public class Tests { iOSApp app; [SetUp] public void BeforeEachTest() { // TODO: If the iOS app being tested is included in the solution then open // the Unit Tests window, right click Test Apps, select Add App Project // and select the app projects that should be tested. // // The iOS project should have the Xamarin.TestCloud.Agent NuGet package // installed. To start the Test Cloud Agent the following code should be // added to the FinishedLaunching method of the AppDelegate: // // #if ENABLE_TEST_CLOUD // Xamarin.Calabash.Start(); // #endif app = ConfigureApp .iOS // TODO: Update this path to point to your iOS app and uncomment the // code if the app is not included in the solution. //.AppBundle ("../../../iOS/bin/iPhoneSimulator/Debug/MessageBarUITests.iOS.app") .StartApp(); } [Test] public void WhenTappedOnTheInfoButtonShowInformationMessage() { app.Tap("Show Info"); app.Screenshot("Before messagebar"); app.WaitForElement(e => e.Id("MessageBar")); app.Screenshot("Messagebar dispalyed"); var title = app.Query(e => e.Id("MessageBar").Invoke("Title")).FirstOrDefault(); var text = app.Query(e => e.Id("MessageBar").Invoke("Description")).FirstOrDefault(); var type = app.Query(e => e.Id("MessageBar").Invoke("MessageType")).FirstOrDefault(); Assert.AreEqual("Info", title); Assert.AreEqual("This is information", text); Assert.AreEqual(type, 2); } [Test] public void GivenAMessageWhenTappedThenDismissTheMessageBar(){ app.Tap("Show Info"); app.WaitForElement(e => e.Id("MessageBar")); app.Screenshot("Messagebar dispalyed"); app.Tap(e => e.Id("MessageBar")); app.Screenshot("Messagebar dismissed"); //var expectedCount = app.Query(e => e.Id("MessageBar")).Count(); //Assert.AreEqual(0, expectedCount, "Mesagebar still visible"); } } }
prashantvc/Xamarin.iOS-MessageBar
MessageBarUITests/Tests.cs
C#
mit
2,113
<?php namespace luya\admin\aws; use Yii; use yii\base\InvalidConfigException; use Flow\Config; use Flow\Request; use Flow\File; use luya\helpers\FileHelper; use luya\admin\helpers\Storage; use luya\admin\ngrest\base\ActiveWindow; /** * Flow Uploader ActiveWindow enables multi image upload with chunck ability. * * The Flow ActiveWindow will not store any data in the filemanager as its thought to be used in large image upload * scenarios like galleries. The image are chuncked into parts in order to enable large image uploads. * * Example use: * * ```php * public function ngRestActiveWindows() * { * return [ * ['class' => \luya\admin\aws\FlowActiveWindow::class, 'label' => 'My Gallery'], * ]; * } * ``` * * The attached model class must implement the interface {{\luya\admin\aws\FlowActiveWindowInterface}} in order to interact with thw Activ Window. * * There is also a helper Trait {{\luya\admin\aws\FlowActiveWindowTrait}} you can include in order to work with a relation table. * * @author Basil Suter <basil@nadar.io> * @since 1.0.0 */ class FlowActiveWindow extends ActiveWindow { /** * @var string The name of the module where the active windows is located in order to finde the view path. */ public $module = '@admin'; /** * @inheritdoc */ public function index() { return $this->render('index'); } /** * @inheritdoc */ public function defaultLabel() { return 'Flow Uploader'; } /** * @inheritdoc */ public function defaultIcon() { return 'cloud_upload'; } /** * @inheritdoc */ public function getModel() { $model = parent::getModel(); if (!$model instanceof FlowActiveWindowInterface) { throw new InvalidConfigException("The model ".$this->model->className()."which attaches the FlowActiveWindow must be an instance of luya\admin\aws\FlowActiveWindowInterface."); } return $model; } /** * Returns a list of uploaded images. * * @return array */ public function callbackList() { $data = $this->model->flowListImages(); $images = []; foreach (Yii::$app->storage->findImages(['in', 'id', $data]) as $item) { $images[$item->id] = $item->applyFilter('small-crop')->toArray(); } return $this->sendSuccess('list loaded', [ 'images' => $images, ]); } /** * Remove a given image from the collection. * * @param integer $imageId * @return array */ public function callbackRemove($imageId) { $image = Yii::$app->storage->getImage($imageId); if ($image) { $this->model->flowDeleteImage($image); if (Storage::removeImage($image->id, true)) { return $this->sendSuccess('image has been removed'); } } return $this->sendError('Unable to remove this image'); } /** * Flow Uploader Upload. * * @return string */ public function callbackUpload() { $config = new Config(); $config->setTempDir($this->getTempFolder()); $file = new File($config); $request = new Request(); if ($_SERVER['REQUEST_METHOD'] === 'GET') { if ($file->checkChunk()) { header("HTTP/1.1 200 Ok"); } else { header("HTTP/1.1 204 No Content"); exit; } } else { if ($file->validateChunk()) { $file->saveChunk(); } else { // error, invalid chunk upload request, retry header("HTTP/1.1 400 Bad Request"); exit; } } if ($file->validateFile() && $file->save($this->getUploadFolder() . '/'.$request->getFileName())) { // File upload was completed $file = Yii::$app->storage->addFile($this->getUploadFolder() . '/'.$request->getFileName(), $request->getFileName(), 0, true); if ($file) { @unlink($this->getUploadFolder() . '/'.$request->getFileName()); $image = Yii::$app->storage->addImage($file->id); if ($image) { $image->applyFilter('small-crop'); $this->model->flowSaveImage($image); return 'done'; } } } else { // This is not a final chunk, continue to upload } } protected function getTempFolder() { $folder = Yii::getAlias('@runtime/flow-cache'); if (!file_exists($folder)) { FileHelper::createDirectory($folder, 0777); } return $folder; } protected function getUploadFolder() { $folder = Yii::getAlias('@runtime/flow-upload'); if (!file_exists($folder)) { FileHelper::createDirectory($folder, 0777); } return $folder; } }
nandes2062/luya
modules/admin/src/aws/FlowActiveWindow.php
PHP
mit
5,238
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>monae: Black list 🏴‍☠️</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 / monae - 0.2.2</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> monae <small> 0.2.2 <span class="label label-default">Black list 🏴‍☠️</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> <div class="alert alert-info" role="alert"> <p>This result is black-listed as it is considered as too hard to reproduce / to solve. If you find a way to fix this package, please make a pull-request to <a class="alert-link" href="https://github.com/coq/opam-coq-archive">github.com/coq/opam-coq-archive</a>. The list of black-listed packages is in <a class="alert-link" href="https://github.com/coq-bench/make-html/blob/master/black_list.rb">black_list.rb</a>.</p> </div> <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;Reynald Affeldt &lt;reynald.affeldt@aist.go.jp&gt;&quot; homepage: &quot;https://github.com/affeldt-aist/monae&quot; dev-repo: &quot;git+https://github.com/affeldt-aist/monae.git&quot; bug-reports: &quot;https://github.com/affeldt-aist/monae/issues&quot; license: &quot;LGPL-2.1-or-later&quot; synopsis: &quot;Monads and equational reasoning in Coq&quot; description: &quot;&quot;&quot; This Coq library contains a hierarchy of monads with their laws used in several examples of monadic equational reasoning.&quot;&quot;&quot; build: [ [make &quot;-j%{jobs}%&quot;] [make &quot;sect5&quot;] [make &quot;-C&quot; &quot;impredicative_set&quot;] ] install: [make &quot;install&quot;] depends: [ &quot;coq&quot; { (&gt;= &quot;8.11&quot; &amp; &lt; &quot;8.13~&quot;) | (= &quot;dev&quot;) } &quot;coq-mathcomp-ssreflect&quot; { (&gt;= &quot;1.11.0&quot; &amp; &lt; &quot;1.13~&quot;) } &quot;coq-mathcomp-fingroup&quot; { (&gt;= &quot;1.11.0&quot; &amp; &lt; &quot;1.13~&quot;) } &quot;coq-mathcomp-algebra&quot; { (&gt;= &quot;1.11.0&quot; &amp; &lt; &quot;1.13~&quot;) } &quot;coq-mathcomp-solvable&quot; { (&gt;= &quot;1.11.0&quot; &amp; &lt; &quot;1.13~&quot;) } &quot;coq-mathcomp-field&quot; { (&gt;= &quot;1.11.0&quot; &amp; &lt; &quot;1.13~&quot;) } &quot;coq-mathcomp-analysis&quot; { (&gt;= &quot;0.3.4&quot; &amp; &lt; &quot;0.3.6~&quot;) } &quot;coq-infotheo&quot; { &gt;= &quot;0.2.1&quot; &amp; &lt; &quot;0.3~&quot;} &quot;coq-paramcoq&quot; { &gt;= &quot;1.1.2&quot; &amp; &lt; &quot;1.2~&quot; } ] tags: [ &quot;keyword:monae&quot; &quot;keyword:effects&quot; &quot;keyword:probability&quot; &quot;keyword:nondeterminism&quot; &quot;logpath:monae&quot; ] authors: [ &quot;Reynald Affeldt&quot; &quot;David Nowak&quot; &quot;Takafumi Saikawa&quot; &quot;Jacques Garrigue&quot; &quot;Celestine Sauvage&quot; &quot;Kazunari Tanaka&quot; ] url { http: &quot;https://github.com/affeldt-aist/monae/archive/0.2.2.tar.gz&quot; checksum: &quot;sha512=a752aa916752306c3ce5231e118d96154633976bcd1062174496c9f74b7d5f216c6d70552f1abcc1ea1b0706708938e6d6ffc8c05b276eec779c80ec90b70660&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-monae.0.2.2 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-monae -&gt; coq &gt;= dev no matching version Your request can&#39;t be satisfied: - No available version of coq satisfies the constraints No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-monae.0.2.2</code></dd> <dt>Return code</dt> <dd>15360</dd> <dt>Output</dt> <dd><pre>The following actions will be performed: - remove coq 8.7.0 &lt;&gt;&lt;&gt; Processing actions &lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt;&lt;&gt; [WARNING] package uninstall script failed at /home/bench/.opam/opam-init/hooks/sandbox.sh remove rm -R /home/bench/.opam/ocaml-base-compiler.4.08.1/lib/coq /home/bench/.opam/ocaml-base-compiler.4.08.1/share/coq: # context 2.0.5 | linux/x86_64 | ocaml-base-compiler.4.08.1 | https://opam.ocaml.org#256e30a1 # path ~/run # command ~/.opam/opam-init/hooks/sandbox.sh remove rm -R /home/bench/.opam/ocaml-base-compiler.4.08.1/lib/coq /home/bench/.opam/ocaml-base-compiler.4.08.1/share/coq # exit-code 1 # env-file ~/.opam/log/coq-16465-9b8556.env # output-file ~/.opam/log/coq-16465-9b8556.out ### output ### # rm: cannot remove &#39;/home/bench/.opam/ocaml-base-compiler.4.08.1/share/coq&#39;: No such file or directory Done. # Run eval $(opam env) to update the current shell environment [ERROR] Sorry, resolution of the request timed out. Try to specify a simpler request, use a different solver, or increase the allowed time by setting OPAMSOLVERTIMEOUT to a bigger value (currently, it is set to 600.0 seconds). </pre></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/monae/0.2.2.html
HTML
mit
9,983
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>paco: 1 m 33 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.13.1 / paco - 4.1.1</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> paco <small> 4.1.1 <span class="label label-success">1 m 33 s 🏆</span> </small> </h1> <p>📅 <em><script>document.write(moment("2021-10-26 18:01:49 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-10-26 18:01:49 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.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 zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;minki.cho@sf.snu.ac.kr&quot; synopsis: &quot;Coq library implementing parameterized coinduction&quot; homepage: &quot;https://github.com/snu-sf/paco/&quot; dev-repo: &quot;git+https://github.com/snu-sf/paco.git&quot; bug-reports: &quot;https://github.com/snu-sf/paco/issues/&quot; authors: [ &quot;Chung-Kil Hur &lt;gil.hur@sf.snu.ac.kr&gt;&quot; &quot;Georg Neis &lt;neis@mpi-sws.org&gt;&quot; &quot;Derek Dreyer &lt;dreyer@mpi-sws.org&gt;&quot; &quot;Viktor Vafeiadis &lt;viktor@mpi-sws.org&gt;&quot; &quot;Minki Cho &lt;minki.cho@sf.snu.ac.kr&gt;&quot; ] license: &quot;BSD-3-Clause&quot; build: [make &quot;-C&quot; &quot;src&quot; &quot;all&quot; &quot;-j%{jobs}%&quot;] install: [make &quot;-C&quot; &quot;src&quot; &quot;-f&quot; &quot;Makefile.coq&quot; &quot;install&quot;] depends: [ &quot;coq&quot; {&gt;= &quot;8.9&quot; &amp; &lt; &quot;8.14~&quot;} ] tags: [ &quot;date:2021-03-24&quot; &quot;category:Computer Science/Programming Languages/Formal Definitions and Theory&quot; &quot;category:Mathematics/Logic&quot; &quot;keyword:co-induction&quot; &quot;keyword:simulation&quot; &quot;keyword:parameterized greatest fixed point&quot; &quot;logpath:Paco&quot; ] url { http: &quot;https://github.com/snu-sf/paco/archive/v4.1.1.tar.gz&quot; checksum: &quot;93857c155f4f9e057348f78a9fb8c718&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-paco.4.1.1 coq.8.13.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-paco.4.1.1 coq.8.13.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>11 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-paco.4.1.1 coq.8.13.1</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>1 m 33 s</dd> </dl> <h2>Installation size</h2> <p>Total: 9 M</p> <ul> <li>741 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacotac_internal.vo</code></li> <li>552 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacotac_internal.glob</code></li> <li>512 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco14.vo</code></li> <li>469 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco13.vo</code></li> <li>428 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco12.vo</code></li> <li>390 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco11.vo</code></li> <li>353 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco10.vo</code></li> <li>318 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco9.vo</code></li> <li>285 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco8.vo</code></li> <li>253 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco7.vo</code></li> <li>222 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco6.vo</code></li> <li>193 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco5.vo</code></li> <li>166 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco4.vo</code></li> <li>141 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco3.vo</code></li> <li>122 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacotac_internal.v</code></li> <li>118 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco2.vo</code></li> <li>117 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paconotation.glob</code></li> <li>115 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco14.glob</code></li> <li>115 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco14.vo</code></li> <li>110 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco13.glob</code></li> <li>106 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco12.glob</code></li> <li>104 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco13.vo</code></li> <li>104 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/examples.vo</code></li> <li>102 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco11.glob</code></li> <li>100 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paconotation_internal.vo</code></li> <li>98 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco10.glob</code></li> <li>96 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco1.vo</code></li> <li>94 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco12.vo</code></li> <li>92 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco9.glob</code></li> <li>90 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco8.glob</code></li> <li>87 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco7.glob</code></li> <li>85 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco11.vo</code></li> <li>85 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco6.glob</code></li> <li>83 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco5.glob</code></li> <li>82 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco4.glob</code></li> <li>81 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco3.glob</code></li> <li>79 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco2.glob</code></li> <li>78 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco1.glob</code></li> <li>77 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco0.glob</code></li> <li>77 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco10.vo</code></li> <li>73 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco0.vo</code></li> <li>73 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paconotation.vo</code></li> <li>68 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco9.vo</code></li> <li>67 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco14.glob</code></li> <li>65 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpacotac.vo</code></li> <li>62 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco13.glob</code></li> <li>61 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/tutorial.vo</code></li> <li>61 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco8.vo</code></li> <li>58 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paconotation_internal.glob</code></li> <li>56 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco12.glob</code></li> <li>53 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco7.vo</code></li> <li>52 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco11.glob</code></li> <li>47 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco10.glob</code></li> <li>46 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco6.vo</code></li> <li>44 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacotac.vo</code></li> <li>42 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco9.glob</code></li> <li>40 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco5.vo</code></li> <li>38 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco8.glob</code></li> <li>35 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco7.glob</code></li> <li>34 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco4.vo</code></li> <li>32 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco6.glob</code></li> <li>30 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco5.glob</code></li> <li>29 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco3.vo</code></li> <li>29 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco14.v</code></li> <li>28 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco13.v</code></li> <li>28 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpacotac.glob</code></li> <li>28 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/tutorial.glob</code></li> <li>28 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco12.v</code></li> <li>27 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco4.glob</code></li> <li>27 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco11.v</code></li> <li>27 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco10.v</code></li> <li>26 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco9.v</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco8.v</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco7.v</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco3.glob</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco6.v</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco2.vo</code></li> <li>25 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco5.v</code></li> <li>24 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco4.v</code></li> <li>24 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/tutorial.v</code></li> <li>24 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco3.v</code></li> <li>24 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco2.v</code></li> <li>24 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco1.v</code></li> <li>24 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpaco0.v</code></li> <li>23 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco2.glob</code></li> <li>23 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/examples.glob</code></li> <li>21 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco1.glob</code></li> <li>21 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco1.vo</code></li> <li>19 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpacotac.v</code></li> <li>19 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco0.glob</code></li> <li>18 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco_internal.vo</code></li> <li>16 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco0.vo</code></li> <li>15 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paconotation.v</code></li> <li>14 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco_internal.glob</code></li> <li>13 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/hpattern.vo</code></li> <li>10 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco14.v</code></li> <li>10 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco13.v</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco12.v</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paconotation_internal.v</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco11.v</code></li> <li>9 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/examples.v</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco10.v</code></li> <li>8 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco9.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco8.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco7.v</code></li> <li>7 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco6.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacotac.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco5.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacotac.glob</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco4.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco3.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco2.v</code></li> <li>6 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco1.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco0.v</code></li> <li>5 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpacoall.vo</code></li> <li>5 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco.vo</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/hpattern.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco_internal.v</code></li> <li>4 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacoall.vo</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/hpattern.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpacoall.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacoall.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/gpacoall.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/pacoall.v</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco.glob</code></li> <li>1 K <code>../ocaml-base-compiler.4.08.1/lib/coq/user-contrib/Paco/paco.v</code></li> </ul> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq-paco.4.1.1</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.13.1/paco/4.1.1.html
HTML
mit
20,593
def add_generic_attachment_columns(t, want_image_columns) t.string :storage_key, :null => false t.string :content_type, :null => false t.integer :size, :null => false t.datetime :created_at, :null => false t.datetime :updated_at t.integer :width, :null => false if want_image_columns t.integer :height, :null => false if want_image_columns end ActiveRecord::Schema.define(:version => 0) do create_table :unprocesseds, :force => true do |t| t.string :original_filename, :null => false add_generic_attachment_columns(t, false) end create_table :images, :force => true do |t| t.string :original_filename, :null => false add_generic_attachment_columns(t, true) end create_table :derived_images, :force => true do |t| t.string :original_type, :null => false t.integer :original_id, :null => false t.string :format_name, :null => false add_generic_attachment_columns(t, true) end create_table :other_images, :force => true do |t| # for testing derived_image owner polymorphism t.string :original_filename, :null => false add_generic_attachment_columns(t, true) end create_table :all_in_one_table_images, :force => true do |t| t.string :original_filename # will be null for deriveds t.string :original_type # will be null for originals t.integer :original_id # ditto t.string :format_name # ditto add_generic_attachment_columns(t, true) end end
willbryant/attachment_saver
test/schema.rb
Ruby
mit
1,565
<!DOCTYPE html> <html> <head> <title>Coffee Maker</title> <meta name="viewport" content="width=device-width"> <!-- styles --> <link href="positron/positron.css" type="text/css" rel="stylesheet"></link> <link href="base.css" type="text/css" rel="stylesheet"></link> <style> </style> <!-- scripts --> <script src="positron/prefixfree.min.js" type="text/javascript"></script> <script src="positron/prefixfree.dynamic-dom.min.js" type="text/javascript"></script> <script src="positron/positron.js" type="text/javascript"></script> </head> <body> <div class="container"> <img src="sensible-app-icon.jpg" width="20%"> <h3>Welcome to your Coffee Maker!</h3> <h5>Last brewed 6 cups of Giant Steps at 12:43pm</h5> <div class="brew-states"> <div p-view="prebrew"> <div class="button" p-action-1="hideview:prebrew" p-action-2="showview:brewing">Start Brew!</div> </div> <div p-view="brewing" class="brewing p-invisible"> Brewing! Coffee will be ready in <span class="timer">3 minutes</span> </div> </div> <section class="alerts" p-view="alerts:"> <div> <label for="old">Alert me when coffee is old</label> <input name="old" id="old" type="checkbox"> </div> <div> <label for="fresh">Alert me when coffee is ready</label> <input name="fresh" id="fresh" type="checkbox"> </div> </section> </div> <div p-view="updated:" class="p-invisible success" p-action="hideview: updated"> Settings saved successfully! </div> <!-- <p-json url="config/get" name="config"> <p-set name="page.devicename" value="$config.name;" context="application"></p-set> <p-json url="properties/get" name="properties"> <h4>Welcome to your $config.name;!</h4> <form p-action-1="(submit) ajaxform" p-action-2="(p-ajaxformsuccess) showview: updated" action="properties/set" method="GET" > <p-list key="properties" name="property"> <p-set name="params.value" value="$property.value;"> <div>$property.name; = <span p-view="property_$property.name;:">$params.value;</span></div> </p-set> <p-if true="$property.type; == integer"> $property.minimum; <input p-action-1="(change) refreshview: property_$property.name;" class="config-integer" name="$property.name;" type="range" value="$property.value;" min="$property.minimum;" max="$property.maximum;" > $property.maximum; </p-if> <p-if true="$property.type; == string"> <input class="config-string" name="$property.name;" type="text" maxlength="$property.maxlength;" value="$property.value;" > </p-if> <p-if true="$property.type; == toggle"> <div class="toggleswitch"> <input type="checkbox" name="$property.name;" class="config-toggle toggleswitch-checkbox" id="$property.name;" checked> <label class="toggleswitch-label" for="$property.name;"> <span class="toggleswitch-inner"></span> <span class="toggleswitch-switch"></span> </label> </div> </p-if> <p-if true="$property.type; == button"> <button class="config-button" name="$property.name;" value="$property.value;">$property.value;</button> </p-if> </p-list> <div> <input name="submit" type="submit" value="submit"> </div> </form> <div p-view="updated:" class="p-invisible"> $page.devicename; updated successfully! </div> </p-json> </p-json> --> </body> </html>
gbraad/sensible
apps/node/coffee/web/index.html
HTML
mit
3,488
class CreateCommentVotes < ActiveRecord::Migration def change create_table :comment_votes do |t| t.boolean :like, null: false t.integer :user_id, null: false t.integer :comment_id, null: false t.timestamps null: false end end end
sayuloveit/rails-hacker-news-jr
hacker_news_jr/db/migrate/20150716211717_create_comment_votes.rb
Ruby
mit
267
<nav class="navbar navbar-darkblue navbar-inverse"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" data-ui-sref="home.first"><img src="images/logo.png"></img></a> <form class="navbar-form navbar-left" role="search"> <div class="form-group"> <ui-select class="input-dark" data-ng-model="headerCtrl.selectedTool" data-theme="bootstrap"> <ui-select-match placeholder="Search for a tool">{{$select.selected.name}}</ui-select-match> <ui-select-choices repeat="list in headerCtrl.tools | filter: $select.search"> <span data-ng-bind-html="list.name | highlight: $select.search"></span> </ui-select-choices> </ui-select> </div> </form> </div> <div id="navbar" class="navbar-collapse collapse"> <ul class="nav navbar-nav navbar-right"> <li data-ng-show="headerCtrl.user"> <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> <span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{headerCtrl.user.username}} <span class="caret"></span> </a> <ul class="dropdown-menu"> <li><a data-ui-sref="home.user({username: headerCtrl.user.username})" data-translate="nav.profile.profile"></a></li> <li><a href="#" data-translate="nav.profile.myTools"></a></li> <li><a href="#" data-translate="nav.profile.myLists"></a></li> <li><a data-ui-sref="home.user.settings({username: headerCtrl.user.username})" data-translate="nav.profile.settings"></a></li> <li><a data-ng-click="headerCtrl.logout()" data-translate="nav.profile.logout"></a></li> </ul> </li> <li data-ng-show="!headerCtrl.user"> <a data-ui-sref="home.authenticate.login" data-translate="nav.login"></a> </li> <li data-ng-show="!headerCtrl.user"> <a data-ui-sref="home.authenticate.register" data-translate="nav.register"></a> </li> <li><a data-ui-sref="home.tools" data-translate="nav.tools"></a></li> <li><a href="" data-translate="nav.lists"></a></li> <li><a href="" data-translate="nav.users"></a></li> </ul> </div> </div> </nav>
gigobyte/MyToolbox
webapp/scripts/home/header.html
HTML
mit
2,470
namespace topCoder { using System; using System.Collections.Generic; class p1 { public void foo() { string[] sp = Console.ReadLine().Split(' '); int n = int.Parse(sp[0]); int m = int.Parse(sp[1]); int k = int.Parse(sp[2]); int[] x = new int[k]; int[] y = new int[k]; for (int i = 0; i < k; i++) { sp = Console.ReadLine().Split(' '); x[i] = int.Parse(sp[0])-1; y[i] = int.Parse(sp[1])-1; } bool[][] b = new bool[n][]; for (int i = 0; i < n; i++) { b[i] = new bool[m]; } int r = 0; for (; r < k; r++) { int xx = x[r]; int yy = y[r]; if (b[xx][yy]) continue; if ( ((xx-1 >= 0 && b[xx-1][yy]) && (xx-1>=0 && yy-1>=0 && b[xx-1][yy-1]) && (yy-1>=0 && b[xx][yy-1])) || ((xx+1 < n && b[xx+1][yy]) && (xx+1 < n && yy+1 < m && b[xx+1][yy+1]) && (yy+1 < m && b[xx][yy+1])) || ((xx-1 >= 0 && b[xx-1][yy]) && (xx-1 >= 0 && yy+1 < m && b[xx-1][yy+1]) && (yy+1 < m && b[xx][yy+1])) || ((yy-1>= 0&& b[xx][yy-1]) && (xx+1 < n && yy-1 >= 0 && b[xx+1][yy-1]) && (xx+1 < n && b[xx+1][yy])) ) break; else b[xx][yy] = true; } if (r >= k) r = -1; Console.WriteLine(r+1); } } }
karunasagark/ps
TopCoder-C#/288/p1.cs
C#
mit
1,194
/* * Qt4 gxcoin GUI. * * W.J. van der Laan 2011-2012 * The Bitcoin Developers 2011-2015 * The Gxcoin Developers 2015 */ #ifndef WALLETSTACK_H #define WALLETSTACK_H #include <QStackedWidget> #include <QMap> #include <boost/shared_ptr.hpp> class GxcoinGUI; class TransactionTableModel; class ClientModel; class WalletModel; class WalletView; class TransactionView; class OverviewPage; class AddressBookPage; class SendCoinsDialog; class SignVerifyMessageDialog; class Notificator; class RPCConsole; class CWalletManager; QT_BEGIN_NAMESPACE class QLabel; class QModelIndex; QT_END_NAMESPACE /* WalletStack class. This class is a container for WalletView instances. It takes the place of centralWidget. It was added to support multiple wallet functionality. It communicates with both the client and the wallet models to give the user an up-to-date view of the current core state. It manages all the wallet views it contains and updates them accordingly. */ class WalletStack : public QStackedWidget { Q_OBJECT public: explicit WalletStack(QWidget *parent = 0); ~WalletStack(); void setGxcoinGUI(GxcoinGUI *gui) { this->gui = gui; } void setClientModel(ClientModel *clientModel) { this->clientModel = clientModel; } bool addWallet(const QString& name, WalletModel *walletModel); bool removeWallet(const QString& name); void removeAllWallets(); bool handleURI(const QString &uri); void showOutOfSyncWarning(bool fShow); private: GxcoinGUI *gui; ClientModel *clientModel; QMap<QString, WalletView*> mapWalletViews; bool bOutOfSync; public slots: void setCurrentWallet(const QString& name); /** Switch to overview (home) page */ void gotoOverviewPage(); /** Switch to history (transactions) page */ void gotoHistoryPage(); /** Switch to address book page */ void gotoAddressBookPage(); /** Switch to receive coins page */ void gotoReceiveCoinsPage(); /** Switch to send coins page */ void gotoSendCoinsPage(QString addr = ""); /** Show Sign/Verify Message dialog and switch to sign message tab */ void gotoSignMessageTab(QString addr = ""); /** Show Sign/Verify Message dialog and switch to verify message tab */ void gotoVerifyMessageTab(QString addr = ""); /** Encrypt the wallet */ void encryptWallet(bool status); /** Backup the wallet */ void backupWallet(); /** Change encrypted wallet passphrase */ void changePassphrase(); /** Ask for passphrase to unlock wallet temporarily */ void unlockWallet(); /** Set the encryption status as shown in the UI. @param[in] status current encryption status @see WalletModel::EncryptionStatus */ void setEncryptionStatus(); }; #endif // WALLETSTACK_H
gxcoin/gxcoin
src/src/qt/walletstack.h
C
mit
2,802
/* ======================================== ID: mathema6 TASK: friday LANG: C++11 (...for USACO solutions) * File Name : friday.cpp * Creation Date : 03-01-2015 * Last Modified : * Created By : Karel Ha <mathemage@gmail.com> * URL : http://cerberus.delosent.com:791/usacoprob2?a=nJinR3Por13&S=friday * Duration : 30 min ==========================================*/ #include <vector> #include <list> #include <map> #include <set> #include <deque> #include <stack> #include <bitset> #include <algorithm> #include <functional> #include <numeric> #include <utility> #include <sstream> #include <iostream> #include <iomanip> #include <cstdio> #include <cmath> #include <cstdlib> #include <ctime> #include <cassert> #include <string> #include <cctype> #include <fstream> #include <unordered_set> #include <unordered_map> using namespace std; #define FOR(I,A,B) for(int I = (A); I < (B); ++I) #define REP(I,N) FOR(I,0,N) #define ALL(A) (A).begin(), (A).end() #define MSG(a) cout << #a << " == " << a << endl; // uncomment following line for debug mode // #define DEBUG bool isLeap(short year) { return (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0); } int main() { ifstream fin ("friday.in"); // 31 28 31 30 31 30 31 31 30 31 30 31 short offset[12] = {3, 0, 3, 2, 3, 2, 3, 3, 2, 3, 2, 3} ; int n; fin >> n; short day = 0; // 13th Jan 1900 vector<int> histogram(7); REP(year,n) { REP(month,12) { histogram[day]++; day += offset[month]; if (month == 1 && isLeap(1900 + year)) day++; day %= 7; } } ofstream fout ("friday.out"); REP(i,7) { fout << histogram[i]; if (i < 6) fout << " "; else fout << endl; } return 0; }
mathemage/CompetitiveProgramming
usaco/train.usaco.org/1.2/friday/friday.cpp
C++
mit
1,781
<!DOCTYPE html> <!--[if IEMobile 7]><html class="iem7 no-js" lang="en" dir="ltr"><![endif]--> <!--[if lt IE 7]><html class="lt-ie9 lt-ie8 lt-ie7 no-js" lang="en" dir="ltr"><![endif]--> <!--[if (IE 7)&(!IEMobile)]><html class="lt-ie9 lt-ie8 no-js" lang="en" dir="ltr"><![endif]--> <!--[if IE 8]><html class="lt-ie9 no-js" lang="en" dir="ltr"><![endif]--> <!--[if (gt IE 8)|(gt IEMobile 7)]><!--> <html class="no-js not-oldie" lang="en" dir="ltr"> <!--<![endif]--> <head> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="HandheldFriendly" content="true" /> <link rel="shortcut icon" href="https://www.epa.gov/sites/all/themes/epa/favicon.ico" type="image/vnd.microsoft.icon" /> <meta name="MobileOptimized" content="width" /> <meta http-equiv="cleartype" content="on" /> <meta http-equiv="ImageToolbar" content="false" /> <meta name="viewport" content="width=device-width" /> <meta name="version" content="20161218" /> <!--googleon: all--> <meta name="DC.description" content="" /> <meta name="DC.title" content="" /> <title> Development of Zero Emission Hexavalent Chromium Plating Process| Research Project Database | Grantee Research Project | ORD | US EPA</title> <!--googleoff: snippet--> <meta name="keywords" content="" /> <link rel="shortlink" href="" /> <link rel="canonical" href="" /> <meta name="DC.creator" content="" /> <meta name="DC.language" content="en" /> <meta name="DC.Subject.epachannel" content="" /> <meta name="DC.type" content="" /> <meta name="DC.date.created" content="" /> <meta name="DC.date.modified" content="2003-04-01" /> <!--googleoff: all--> <link type="text/css" rel="stylesheet" href="https://www.epa.gov/misc/ui/jquery.ui.autocomplete.css" media="all" /> <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/lib/jquery.ui.theme.css" media="all" /> <link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/libraries/template2/s.css" media="all" /> <!--[if lt IE 9]><link type="text/css" rel="stylesheet" href="https://www.epa.gov/sites/all/themes/epa/css/ie.css" media="all" /><![endif]--> <link rel="alternate" type="application/atom+xml" title="EPA.gov All Press Releases" href="https://www.epa.gov/newsreleases/search/rss" /> <link rel="alternate" type="application/atom+xml" title="EPA.gov Headquarters Press Releases" href="https://www.epa.gov/newsreleases/search/rss/field_press_office/headquarters" /> <link rel="alternate" type="application/atom+xml" title="Greenversations, EPA's Blog" href="https://blog.epa.gov/blog/feed/" /> <!--[if lt IE 9]><script src="https://www.epa.gov/sites/all/themes/epa/js/html5.js"></script><![endif]--> <style type="text/css"> /*This style needed for highlight link. Please do not remove*/ .hlText { font-family: "Arial"; color: red; font-weight: bold; font-style: italic; background-color: yellow; } .tblClass { font-size:smaller; min-width: 10%; line-height: normal; } </style> </head> <!-- NOTE, figure out body classes! --> <body class="node-type-(web-area|page|document|webform) (microsite|resource-directory)" > <!-- Google Tag Manager --> <noscript> <iframe src="//www.googletagmanager.com/ns.html?id=GTM-L8ZB" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript> <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-L8ZB');</script> <!-- End Google Tag Manager --> <div class="skip-links"><a href="#main-content" class="skip-link element-invisible element-focusable">Jump to main content</a></div> <header class="masthead clearfix" role="banner"> <img class="site-logo" src="https://www.epa.gov/sites/all/themes/epa/logo.png" alt="" /> <hgroup class="site-name-and-slogan"> <h1 class="site-name"><a href="https://www.epa.gov/" title="Go to the home page" rel="home"><span>US EPA</span></a></h1> <div class="site-slogan">United States Environmental Protection Agency</div> </hgroup> <form class="epa-search" method="get" action="https://search.epa.gov/epasearch/epasearch"> <label class="element-hidden" for="search-box">Search</label> <input class="form-text" placeholder="Search EPA.gov" name="querytext" id="search-box" value=""/> <button class="epa-search-button" id="search-button" type="submit" title="Search">Search</button> <input type="hidden" name="fld" value="" /> <input type="hidden" name="areaname" value="" /> <input type="hidden" name="areacontacts" value="" /> <input type="hidden" name="areasearchurl" value="" /> <input type="hidden" name="typeofsearch" value="epa" /> <input type="hidden" name="result_template" value="2col.ftl" /> <input type="hidden" name="filter" value="sample4filt.hts" /> </form> </header> <section id="main-content" class="main-content clearfix" role="main"> <div class="region-preface clearfix"> <div id="block-pane-epa-web-area-connect" class="block block-pane contextual-links-region"> <ul class="menu utility-menu"> <li class="menu-item"><a href="https://www.epa.gov/research-grants/forms/contact-us-about-research-grants" class="menu-link contact-us">Contact Us</a></li> </ul> </div> </div> <div class="main-column clearfix"> <!--googleon: all--> <div class="panel-pane pane-node-content" > <div class="pane-content"> <div class="node node-page clearfix view-mode-full"> <div class="box multi related-info right clear-right" style="max-width:300px; font-size:14px;"><!--googleoff: index--> <h5 class="pane-title">Project Research Results</h5> <div class="pane-content"> <ul> <li><a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.abstractDetail/abstract/5615/report/F">Final Report</a></li> </ul> <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.publications/abstract/5615">2 publications for this project</a><br /> </div> <!-- RFA Search start --> <h5 class="pane-title">Related Information</h5> <div class="pane-content"> <ul><li><a href="https://www.epa.gov/research-grants/">Research Grants</a></li> <li><a href="https://www.epa.gov/P3">P3: Student Design Competition</a></li> <li><a href="https://www.epa.gov/research-fellowships/">Research Fellowships</a></li> <li><a href="https://www.epa.gov/sbir/">Small Business Innovation Research (SBIR)</a></li> <li><a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/search.welcome">Grantee Research Project Results Search</a></li> </ul> </div> <!-- RFA Search End --><!--googleon: index--> </div> <a name="content"></a> <h2> Development of Zero Emission Hexavalent Chromium Plating Process</h2> <b>EPA Grant Number:</b> R827201<br /> <b>Title:</b> Development of Zero Emission Hexavalent Chromium Plating Process<br /> <b>Investigators:</b> <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.investigatorInfo/investigator/5990"> Melarkode, Ramesh </a> , <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.investigatorInfo/investigator/5991"> Govind, Rakesh </a> , <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.investigatorInfo/investigator/5992"> Grieszmer, Dan </a> <br /> <strong>Institution:</strong> <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.institutionInfo/institution/930"> <b>Harvard University</b> </a> <br /> <strong>Current Institution:</strong> <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.institutionInfo/institution/1695"> <strong>PRD Tech, Inc.</strong> </a> , <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.institutionInfo/institution/4127"> University of Cincinnati </a> <br /> <strong>EPA Project Officer:</strong> <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.investigatorInfo/investigator/62"> Shapiro, Paul </a> <br /> <b>Project Period:</b> April 26, 1999 through March 31, 2001 (Extended to March 31, 2002) <br /> <b>Project Amount:</b> $50,000 <br /> <b>RFA:</b> Exploratory Research - Environmental Engineering (1998) <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.rfatext/rfa_id/171">RFA Text</a>&nbsp;|&nbsp; <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/recipients.display/rfa_id/171">Recipients Lists</a> <br /> <b>Research Category:</b> <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.researchCategory/rc_id/166">Engineering and Environmental Chemistry</a> , <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.researchCategory/rc_id/1175">Sustainability</a> , <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.researchCategory/rc_id/1174">Land and Waste Management</a> <br /> <br> <h3>Description:</h3> <P><B>Abstract Currently Not Available.</B> <p></p> <h3>Publications and Presentations:</h3> Publications have been submitted on this project: <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.publications/abstract/5615">View all 2 publications for this project</a> </p> <h3>Supplemental Keywords:</h3> Sustainable Industry/Business, cleaner production/pollution prevention, hexavalent chromium, cleaner production, zero discharge cycles, clean technology, perfluormembranes, environmentally benign coatings, chromium plating, pollution prevention <p /> <P><h3>Progress and Final Reports:</h3> <a href="https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.abstractDetail/abstract/5615/report/F">Final Report</a><br> </P> </div> </div> </div> <div id="block-epa-og-footer" class="block block-epa-og"> <p class="pagetop"><a href="#content">Top of Page</a></p> <!--googleoff: all--> <p id="epa-og-footer"> The perspectives, information and conclusions conveyed in research project abstracts, progress reports, final reports, journal abstracts and journal publications convey the viewpoints of the principal investigator and may not represent the views and policies of ORD and EPA. Conclusions drawn by the principal investigators have not been reviewed by the Agency. </p> </div> <!--googleoff: all--> </div> </section> <nav class="nav simple-nav simple-main-nav" role="navigation"> <div class="nav__inner"> <h2 class="element-invisible">Main menu</h2> <ul class="menu" role="menu"> <li class="menu-item" id="menu-learn" role="presentation"><a href="https://www.epa.gov/environmental-topics" title="Learn about EPA's environmental topics to help protect the environment in your home, workplace, and community and EPA&#039;s research mission is to conduct leading-edge research and foster the sound use of science and technology." class="menu-link" role="menuitem">Environmental Topics</a></li> <li class="menu-item" id="menu-lawsregs" role="presentation"><a href="https://www.epa.gov/laws-regulations" title="Laws written by Congress provide the authority for EPA to write regulations. Regulations explain the technical, operational, and legal details necessary to implement laws." class="menu-link" role="menuitem">Laws &amp; Regulations</a></li> <li class="menu-item" id="menu-about" role="presentation"><a href="https://www.epa.gov/aboutepa" title="Learn more about: our mission and what we do, how we are organized, and our history." class="menu-link" role="menuitem">About EPA</a></li> </ul> </div> </nav> <footer class="main-footer clearfix" role="contentinfo"> <div class="main-footer__inner"> <div class="region-footer"> <div class="block block-pane block-pane-epa-global-footer"> <div class="row cols-3"> <div class="col size-1of3"> <div class="col__title">Discover.</div> <ul class="menu"> <li><a href="https://www.epa.gov/accessibility">Accessibility</a></li> <li><a href="https://www.epa.gov/aboutepa/administrator-gina-mccarthy">EPA Administrator</a></li> <li><a href="https://www.epa.gov/planandbudget">Budget &amp; Performance</a></li> <li><a href="https://www.epa.gov/contracts">Contracting</a></li> <li><a href="https://www.epa.gov/home/grants-and-other-funding-opportunities">Grants</a></li> <li><a href="https://www.epa.gov/ocr/whistleblower-protections-epa-and-how-they-relate-non-disclosure-agreements-signed-epa-employees">No FEAR Act Data</a></li> <li><a href="https://www.epa.gov/home/privacy-and-security-notice">Privacy and Security</a></li> </ul> </div> <div class="col size-1of3"> <div class="col__title">Connect.</div> <ul class="menu"> <li><a href="https://www.data.gov/">Data.gov</a></li> <li><a href="https://www.epa.gov/office-inspector-general/about-epas-office-inspector-general">Inspector General</a></li> <li><a href="https://www.epa.gov/careers">Jobs</a></li> <li><a href="https://www.epa.gov/newsroom">Newsroom</a></li> <li><a href="https://www.whitehouse.gov/open">Open Government</a></li> <li><a href="http://www.regulations.gov/">Regulations.gov</a></li> <li><a href="https://www.epa.gov/newsroom/email-subscriptions">Subscribe</a></li> <li><a href="https://www.usa.gov/">USA.gov</a></li> <li><a href="https://www.whitehouse.gov/">White House</a></li> </ul> </div> <div class="col size-1of3"> <div class="col__title">Ask.</div> <ul class="menu"> <li><a href="https://www.epa.gov/home/forms/contact-us">Contact Us</a></li> <li><a href="https://www.epa.gov/home/epa-hotlines">Hotlines</a></li> <li><a href="https://www.epa.gov/foia">FOIA Requests</a></li> <li><a href="https://www.epa.gov/home/frequent-questions-specific-epa-programstopics">Frequent Questions</a></li> </ul> <div class="col__title">Follow.</div> <ul class="social-menu"> <li><a class="menu-link social-facebook" href="https://www.facebook.com/EPA">Facebook</a></li> <li><a class="menu-link social-twitter" href="https://twitter.com/epa">Twitter</a></li> <li><a class="menu-link social-youtube" href="https://www.youtube.com/user/USEPAgov">YouTube</a></li> <li><a class="menu-link social-flickr" href="https://www.flickr.com/photos/usepagov">Flickr</a></li> <li><a class="menu-link social-instagram" href="https://instagram.com/epagov">Instagram</a></li> </ul> <p class="last-updated">Last updated on Tuesday, April 1, 2003</p> </div> </div> </div> </div> </div> </footer> <script src="https://www.epa.gov/sites/all/libraries/template2/jquery.js"></script> <script src="https://www.epa.gov/sites/all/libraries/template/js.js"></script> <script src="https://www.epa.gov/sites/all/modules/custom/epa_core/js/alert.js"></script> <script src="https://www.epa.gov/sites/all/modules/contrib/jquery_update/replace/ui/ui/minified/jquery.ui.core.min.js"></script> <script src="https://www.epa.gov/sites/all/modules/contrib/jquery_update/replace/ui/ui/minified/jquery.ui.widget.min.js"></script> <script src="https://www.epa.gov/sites/all/modules/contrib/jquery_update/replace/ui/ui/minified/jquery.ui.position.min.js"></script> <script src="https://www.epa.gov/sites/all/modules/contrib/jquery_update/replace/ui/ui/minified/jquery.ui.autocomplete.min.js"></script> <!--[if lt IE 9]><script src="https://www.epa.gov/sites/all/themes/epa/js/ie.js"></script><![endif]--> <!-- REMOVE if not using --> <script language=javascript> <!-- // Activate cloak // pressing enter will not default submit the first defined button but the programmed defined button function chkCDVal(cdVal) { var isErr = true; try{ var CDParts = cdVal.split(','); var st = CDParts[0]; var cd = CDParts[1]; var objRegExp = new RegExp('[0-9][0-9]'); if (!isNaN(st)) { isErr = false; } if (!objRegExp.test(cd) || (cd.length>3)){ isErr = false; } } catch(err){ isErr = false; } return isErr; } function checkCongDist(cdtxt) { //alert(cdtxt.value); if (!chkCDVal(cdtxt.value)) { alert('Congressional District MUST be in the following format: state, district; example: Virginia, 08'); return false; } else { return true; } } function fnTrapKD(btn, event) { var btn = getObject(btn); if (document.all) { if (event.keyCode == 13) { event.returnValue=false;event.cancel = true;btn.click(); } } else { if (event.which == 13) { event.returnValue=false;event.cancelBubble = true;btn.click(); } } } function CheckFilter() { if (document.searchform.presetTopic.options[document.searchform.presetTopic.selectedIndex].value == 'NA'){ alert('You must select a subtopic. \n This item is not selectable'); document.searchform.presetTopic.options[0].selected = true; } } function openHelpWindow(url,title,scrollable) { var win = window.open(url,"title",'width=300,height=220,left=320,top=150,resizable=1,scrollbars='+scrollable+',menubar=no,status=no'); win.focus(); } function openNewWindow(url,title,scrollable) { var win = window.open(url,"title",'width=300,height=220,left=320,top=150,resizable=1,scrollbars='+scrollable+',menubar=no,status=no'); } function openNewWindow(url,title) { var win = window.open(url,"title",'width=300,height=220,left=320,top=150,resizable=1,scrollbars=no,menubar=no,status=no'); } function openNewMapWindow(url,title) { var win = window.open(url,"title",'width=800,height=450,left=320,top=150,resizable=1,scrollbars=no,menubar=no,status=no'); } function openNoticeWindow(url,title) { var win = window.open(url,"title",'width=300,height=150,left=500,top=150,resizable=1,scrollbars=no,menubar=no,status=no'); } function openNewSearchWindow(site,subj) { title = 'window'; var win = window.open('https://cfpub.epa.gov/ncer_abstracts/index.cfm/fuseaction/display.pubsearch/site/' + site + '/redirect/' + subj,"title",'width=640,height=480,resizable=1,scrollbars=yes,menubar=yes,status=no'); } function autoCheck(name) { document.forms['thisForm'].elements[name].checked = true; } function alertUser() { var ok = alert("This search might take longer than expected. Please refrain from hitting the refresh or reload button on your browser. The search results will appear after the search is complete. Thank you."); } function closePopupWindow(redirectUrl) { opener.location = redirectUrl; opener.focus(); this.close(); } //--> </script> </body> </html>
1wheel/scraping
epa-grants/research/raw/05615.html
HTML
mit
21,068
using System; using System.Collections.Generic; using Microsoft.AspNet.Http; namespace Glimpse.Server { public class GlimpseServerOptions { public bool AllowRemote { get; set; } public string BasePath { get; set; } public Action<IDictionary<string, string>> OverrideResources { get; set; } public Func<HttpContext, bool> AllowClientAccess { get; set; } public Func<HttpContext, bool> AllowAgentAccess { get; set; } } }
peterblazejewicz/Glimpse.Prototype
src/Glimpse.Server.Core/GlimpseServerOptions.cs
C#
mit
478
[![Build Status](https://travis-ci.org/Wrdlbrnft/Searchable-RecyclerView-Demo.svg?branch=master)](https://travis-ci.org/Wrdlbrnft/Searchable-RecyclerView-Demo) You can find a walkthrough of how to implement an app with these features [**on Stack Overflow**](http://stackoverflow.com/a/30429439/2310866). Or if you want to try out the app first you can download it from the Play Store: [![Get it on Google Play](https://developer.android.com/images/brand/en_generic_rgb_wo_60.png)](https://play.google.com/store/apps/details?id=com.github.wrdlbrnft.searchablerecyclerviewdemo)
Wrdlbrnft/Searchable-RecyclerView-Demo
docs/index.md
Markdown
mit
580
<!doctype html> <html lang="en" class="no-js"> <head> <meta charset="utf-8"> <!-- begin SEO --> <title>Students - Fernando Kenji Kamei</title> <meta property="og:locale" content="en-US"> <meta property="og:site_name" content="Fernando Kenji Kamei"> <meta property="og:title" content="Students"> <link rel="canonical" href="https://fkenjikamei.github.io/students/"> <meta property="og:url" content="https://fkenjikamei.github.io/students/"> <meta name="twitter:site" content="@fkenjikamei"> <meta name="twitter:title" content="Students"> <meta name="twitter:description" content="Professor and Software Engineering Researcher"> <meta name="twitter:url" content="https://fkenjikamei.github.io/students/"> <meta name="twitter:card" content="summary"> <script type="application/ld+json"> { "@context" : "http://schema.org", "@type" : "Person", "name" : "Fernando Kenji Kamei", "url" : "https://fkenjikamei.github.io", "sameAs" : null } </script> <!-- end SEO --> <link href="https://fkenjikamei.github.io/feed.xml" type="application/atom+xml" rel="alternate" title="Fernando Kenji Kamei Feed"> <!-- http://t.co/dKP3o1e --> <meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <script> document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js '; </script> <!-- For all browsers --> <link rel="stylesheet" href="https://fkenjikamei.github.io/assets/css/main.css"> <meta http-equiv="cleartype" content="on"> <!-- start custom head snippets --> <link rel="apple-touch-icon" sizes="57x57" href="https://fkenjikamei.github.io/images/apple-touch-icon-57x57.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="60x60" href="https://fkenjikamei.github.io/images/apple-touch-icon-60x60.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="72x72" href="https://fkenjikamei.github.io/images/apple-touch-icon-72x72.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="76x76" href="https://fkenjikamei.github.io/images/apple-touch-icon-76x76.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="114x114" href="https://fkenjikamei.github.io/images/apple-touch-icon-114x114.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="120x120" href="https://fkenjikamei.github.io/images/apple-touch-icon-120x120.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="144x144" href="https://fkenjikamei.github.io/images/apple-touch-icon-144x144.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="152x152" href="https://fkenjikamei.github.io/images/apple-touch-icon-152x152.png?v=M44lzPylqQ"> <link rel="apple-touch-icon" sizes="180x180" href="https://fkenjikamei.github.io/images/apple-touch-icon-180x180.png?v=M44lzPylqQ"> <link rel="icon" type="image/png" href="https://fkenjikamei.github.io/images/favicon-32x32.png?v=M44lzPylqQ" sizes="32x32"> <link rel="icon" type="image/png" href="https://fkenjikamei.github.io/images/android-chrome-192x192.png?v=M44lzPylqQ" sizes="192x192"> <link rel="icon" type="image/png" href="https://fkenjikamei.github.io/images/favicon-96x96.png?v=M44lzPylqQ" sizes="96x96"> <link rel="icon" type="image/png" href="https://fkenjikamei.github.io/images/favicon-16x16.png?v=M44lzPylqQ" sizes="16x16"> <link rel="manifest" href="https://fkenjikamei.github.io/images/manifest.json?v=M44lzPylqQ"> <link rel="mask-icon" href="https://fkenjikamei.github.io/images/safari-pinned-tab.svg?v=M44lzPylqQ" color="#000000"> <link rel="shortcut icon" href="/images/favicon.ico?v=M44lzPylqQ"> <meta name="msapplication-TileColor" content="#000000"> <meta name="msapplication-TileImage" content="https://fkenjikamei.github.io/images/mstile-144x144.png?v=M44lzPylqQ"> <meta name="msapplication-config" content="https://fkenjikamei.github.io/images/browserconfig.xml?v=M44lzPylqQ"> <meta name="theme-color" content="#ffffff"> <link rel="stylesheet" href="https://fkenjikamei.github.io/assets/css/academicons.css"/> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ TeX: { equationNumbers: { autoNumber: "all" } } }); </script> <script type="text/x-mathjax-config"> MathJax.Hub.Config({ tex2jax: { inlineMath: [ ['$','$'], ["\\(","\\)"] ], processEscapes: true } }); </script> <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/latest.js?config=TeX-MML-AM_CHTML' async></script> <!-- end custom head snippets --> </head> <body> <!--[if lt IE 9]> <div class="notice--danger align-center" style="margin: 0;">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</div> <![endif]--> <div class="masthead"> <div class="masthead__inner-wrap"> <div class="masthead__menu"> <nav id="site-nav" class="greedy-nav"> <button><div class="navicon"></div></button> <ul class="visible-links"> <li class="masthead__menu-item masthead__menu-item--lg"><a href="https://fkenjikamei.github.io/">Fernando Kenji Kamei</a></li> <li class="masthead__menu-item"><a href="https://fkenjikamei.github.io/research/">Research</a></li> <li class="masthead__menu-item"><a href="https://fkenjikamei.github.io/students/">Students</a></li> <li class="masthead__menu-item"><a href="https://fkenjikamei.github.io/publications/">Publications</a></li> <li class="masthead__menu-item"><a href="https://fkenjikamei.github.io/portfolio/">Portfolio</a></li> <li class="masthead__menu-item"><a href="https://fkenjikamei.github.io/about/">About</a></li> </ul> <ul class="hidden-links hidden"></ul> </nav> </div> </div> </div> <div id="main" role="main"> <div class="sidebar sticky"> <div itemscope itemtype="http://schema.org/Person"> <div class="author__avatar"> <img src="https://fkenjikamei.github.io/images/profile.png" class="author__avatar" alt="Fernando Kenji Kamei"> </div> <div class="author__content"> <h3 class="author__name">Fernando Kenji Kamei</h3> <p class="author__bio">Professor at IFAL and Ph.D. student at UFPE in Empirical Software Engineering research</p> </div> <div class="author__urls-wrapper"> <button class="btn btn--inverse">Follow</button> <ul class="author__urls social-icons"> <li><i class="fa fa-fw fa-map-marker" aria-hidden="true"></i> Alagoas, Brazil</li> <li><a href="mailto:fernando.kenji@ifal.edu.br"><i class="fas fa-fw fa-envelope" aria-hidden="true"></i> Email</a></li> <li><a href="https://www.researchgate.net/profile/Fernando_Kenji_Kamei"><i class="fab fa-fw fa-researchgate" aria-hidden="true"></i> ResearchGate</a></li> <li><a href="https://twitter.com/fkenjikamei"><i class="fab fa-fw fa-twitter-square" aria-hidden="true"></i> Twitter</a></li> <li><a href="https://github.com/fkenjikamei"><i class="fab fa-fw fa-github" aria-hidden="true"></i> Github</a></li> </ul> </div> </div> </div> <article class="page" itemscope itemtype="http://schema.org/CreativeWork"> <meta itemprop="headline" content="Students"> <div class="page__inner-wrap"> <header> <h1 class="page__title" itemprop="headline">Students </h1> </header> <section class="page__content" itemprop="text"> <h2 id="postgraduate-students">Postgraduate students</h2> <ol> <li>Melquizedequi Cabral dos Santos. <em>O Impacto do Uso das Metodologias Ágeis Scrum e XP na Satisfação dos Stakeholders</em>. Concluded in 2014. Master in Computer Science - Universidade Federal de Pernambuco (UFPE). Co-supervised with Alexandre Vasconcelos.</li> <li>Gustavo Barros Lins. <em>Motivação em Engenharia de Software: uma revisão sistemática</em>. Concluded in 2013. Profissional Master in Software Engineering - Centro de Estudos e Sistemas Avançados do Recife (CESAR SCHOOL). Co-supervised with Felipe Santana Soares Furtado.</li> <li>Breno Tenório Wanderley. <em>Gerenciamento de Riscos em Projetos Ágeis</em>. Concluded in 2012. Specialization in Agile Project Management - Centro de Estudos e Sistemas Avançados do Recife (CESAR SCHOOL).</li> </ol> <h2 id="graduate-students">Graduate students</h2> <ol> <li>Lucas Falcão Pereira. <em>Metodologias Ágeis: Uma investigação sobre benefícios e limitações de uso em Organizações Públicas do Estado de Alagoas</em>. Concluded in 2018. Graduate in Systems Information - Federal Institute of Alagoas (IFAL).</li> </ol> <h2 id="research-mentorship">Research mentorship</h2> <ol> <li>Victor Leandro de Oliveira. <em>Aplicando o método do aprendizado baseado em problemas na construção de uma fábrica de software distribuída</em>. Concluded in 2014. Research mentorship at Federal Institute of Sertão Pernambucano (IF Sertão PE).</li> <li>Justino Emerson Lima Araújo. <em>Aplicando o método de Aprendizado Baseado em Problemas no Ensino de Programação</em>. Concluded in 2013. Research mentorship at Federal Institute of Sertão Pernambucano (IF Sertão PE).</li> <li>Gabriel Sarmento. <em>Investigação empírica sobre o uso de ferramentas de refatoração de código de software</em>. Concluded in 2018. Research mentorship at Federal Institute of Alagoas (IFAL).</li> <li>Georgia Demas. <em>Oportunista - Sistema integrado de interação acadêmica: módulo web</em>. Concluded in 2018. Research mentorship at Federal Institute of Alagoas (IFAL).</li> </ol> </section> <footer class="page__meta"> </footer> </div> </article> </div> <div class="page__footer"> <footer> <!-- start custom footer snippets --> <a href="/sitemap/">Sitemap</a> <!-- end custom footer snippets --> <div class="page__footer-follow"> <ul class="social-icons"> <li><strong>Follow:</strong></li> <li><a href="https://twitter.com/fkenjikamei"><i class="fab fa-twitter-square" aria-hidden="true"></i> Twitter</a></li> <li><a href="http://github.com/fkenjikamei"><i class="fab fa-github" aria-hidden="true"></i> GitHub</a></li> <li><a href="https://fkenjikamei.github.io/feed.xml"><i class="fa fa-fw fa-rss-square" aria-hidden="true"></i> Feed</a></li> </ul> </div> <div class="page__footer-copyright">&copy; 2020 Fernando Kenji Kamei. Powered by <a href="http://jekyllrb.com" rel="nofollow">Jekyll</a> &amp; <a href="https://github.com/academicpages/academicpages.github.io">AcademicPages</a>, a fork of <a href="https://mademistakes.com/work/minimal-mistakes-jekyll-theme/" rel="nofollow">Minimal Mistakes</a>.</div> </footer> </div> <script src="https://fkenjikamei.github.io/assets/js/main.min.js"></script> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', '', 'auto'); ga('send', 'pageview'); </script> </body> </html>
fkenjikamei/fkenjikamei.github.io
_site/students/index.html
HTML
mit
11,912
using System.Diagnostics; namespace NWamp.Messages { /// <summary> /// Message class used to subscribe client to Pub/Sub topic. /// </summary> [DebuggerDisplay("[{Type}, \"{TopicUri}\"]")] public class SubscribeMessage : IMessage { /// <summary> /// Initializes a new instance of the <see cref="SubscribeMessage"/> class. /// </summary> /// <remarks>Use this constructor for serialization only.</remarks> public SubscribeMessage() { } /// <summary> /// Initializes a new instance of the <see cref="SubscribeMessage"/> class. /// </summary> /// <param name="topicUri">URI or CURIE identifying Pub/Sub topic</param> public SubscribeMessage(string topicUri) { TopicUri = topicUri; } /// <summary> /// Gets type of this message: <see cref="MessageTypes.Subscribe"/>. /// </summary> public MessageTypes Type { get { return MessageTypes.Subscribe; } } /// <summary> /// Gets or sets URI or CURIE identifying Pub/Sub topic, message sender want subscribe to. /// </summary> public string TopicUri { get; set; } /// <summary> /// Parses current message to array of objects, ready to serialize it directly into WAMP message frame. /// </summary> public object[] ToArray() { return new object[] { MessageTypes.Subscribe, TopicUri }; } } }
Horusiath/NWamp
NWamp/Messages/SubscribeMessage.cs
C#
mit
1,512
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using System.Linq; using System.Windows; using System.Windows.Controls; using Microsoft.Xaml.Behaviors; namespace MahApps.Metro.Behaviors { /// <summary> /// <para> /// Sets the first TabItem with Visibility="<see cref="Visibility.Visible"/>" as /// the SelectedItem of the TabControl. /// </para> /// <para> /// If there is no visible TabItem, null is set as the SelectedItem /// </para> /// </summary> public class TabControlSelectFirstVisibleTabBehavior : Behavior<TabControl> { protected override void OnAttached() { AssociatedObject.SelectionChanged += OnSelectionChanged; } private void OnSelectionChanged(object sender, SelectionChangedEventArgs args) { List<TabItem> tabItems = AssociatedObject.Items.Cast<TabItem>().ToList(); TabItem selectedItem = AssociatedObject.SelectedItem as TabItem; //if the selected item is visible already, return if (selectedItem != null && selectedItem.Visibility == Visibility.Visible) { return; } //get first visible item TabItem firstVisible = tabItems.FirstOrDefault(t => t.Visibility == Visibility.Visible); if (firstVisible != null) { AssociatedObject.SelectedIndex = tabItems.IndexOf(firstVisible); } else { //there is no visible item //Raises SelectionChanged again one time (second time, oldValue == newValue) AssociatedObject.SelectedItem = null; } } protected override void OnDetaching() { AssociatedObject.SelectionChanged -= OnSelectionChanged; } } }
ye4241/MahApps.Metro
src/MahApps.Metro/Behaviors/TabControlSelectFirstVisibleTabBehavior.cs
C#
mit
2,051
#ifndef __DEFINES_HPP_ #define __DEFINES_HPP_ // Compiler defines #if defined (_MSC_VER) #define FORCE_INLINE __forceinline #elif defined (__GNUG__) #define FORCE_INLINE __attribute__((always_inline)) #elif defined (__clang__) #define FORCE_INLINE __forceinline #endif // Plateform defines #if defined(_WIN32) || defined(_WIN64) #define WINDOWS //#define _CRT_SECURE_NO_WARNINGS #elif defined (__APPLE__) #define APPLE #elif defined (__linux__) #define LINUX #elif defined (__unix__) #define UNIX #else #define UNKNOW_PLATFORM #endif #define FALSE 0 #define TRUE 1 //if(!expr) doesn't work #define ASSERT(expr)\ if(!(expr)) \ throw #define LOG_ASSERT(expr, msg) \ if(!(expr)) { \ DadEngine::Core::LogAssert(msg, __FILE__, __LINE__);\ throw; } #endif //__DEFINES_HPP_
Gotatang/DadEngine_2.0
include/dadengine/core/defines.hpp
C++
mit
801
package iso20022 // Status and reason of an instructed order. type StatusAndReason7 struct { // Status and reason for the transaction. StatusAndReason *Status2Choice `xml:"StsAndRsn"` // Details of the transactions reported. Transaction []*Transaction14 `xml:"Tx,omitempty"` } func (s *StatusAndReason7) AddStatusAndReason() *Status2Choice { s.StatusAndReason = new(Status2Choice) return s.StatusAndReason } func (s *StatusAndReason7) AddTransaction() *Transaction14 { newValue := new(Transaction14) s.Transaction = append(s.Transaction, newValue) return newValue }
fgrid/iso20022
StatusAndReason7.go
GO
mit
580
// Generated by Apple Swift version 3.1 (swiftlang-802.0.53 clang-802.0.42) #pragma clang diagnostic push #if defined(__has_include) && __has_include(<swift/objc-prologue.h>) # include <swift/objc-prologue.h> #endif #pragma clang diagnostic ignored "-Wauto-import" #include <objc/NSObject.h> #include <stdint.h> #include <stddef.h> #include <stdbool.h> #if !defined(SWIFT_TYPEDEFS) # define SWIFT_TYPEDEFS 1 # if defined(__has_include) && __has_include(<uchar.h>) # include <uchar.h> # elif !defined(__cplusplus) || __cplusplus < 201103L typedef uint_least16_t char16_t; typedef uint_least32_t char32_t; # endif typedef float swift_float2 __attribute__((__ext_vector_type__(2))); typedef float swift_float3 __attribute__((__ext_vector_type__(3))); typedef float swift_float4 __attribute__((__ext_vector_type__(4))); typedef double swift_double2 __attribute__((__ext_vector_type__(2))); typedef double swift_double3 __attribute__((__ext_vector_type__(3))); typedef double swift_double4 __attribute__((__ext_vector_type__(4))); typedef int swift_int2 __attribute__((__ext_vector_type__(2))); typedef int swift_int3 __attribute__((__ext_vector_type__(3))); typedef int swift_int4 __attribute__((__ext_vector_type__(4))); typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); #endif #if !defined(SWIFT_PASTE) # define SWIFT_PASTE_HELPER(x, y) x##y # define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) #endif #if !defined(SWIFT_METATYPE) # define SWIFT_METATYPE(X) Class #endif #if !defined(SWIFT_CLASS_PROPERTY) # if __has_feature(objc_class_property) # define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ # else # define SWIFT_CLASS_PROPERTY(...) # endif #endif #if defined(__has_attribute) && __has_attribute(objc_runtime_name) # define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) #else # define SWIFT_RUNTIME_NAME(X) #endif #if defined(__has_attribute) && __has_attribute(swift_name) # define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) #else # define SWIFT_COMPILE_NAME(X) #endif #if defined(__has_attribute) && __has_attribute(objc_method_family) # define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) #else # define SWIFT_METHOD_FAMILY(X) #endif #if defined(__has_attribute) && __has_attribute(noescape) # define SWIFT_NOESCAPE __attribute__((noescape)) #else # define SWIFT_NOESCAPE #endif #if defined(__has_attribute) && __has_attribute(warn_unused_result) # define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) #else # define SWIFT_WARN_UNUSED_RESULT #endif #if !defined(SWIFT_CLASS_EXTRA) # define SWIFT_CLASS_EXTRA #endif #if !defined(SWIFT_PROTOCOL_EXTRA) # define SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_ENUM_EXTRA) # define SWIFT_ENUM_EXTRA #endif #if !defined(SWIFT_CLASS) # if defined(__has_attribute) && __has_attribute(objc_subclassing_restricted) # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA # define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # else # define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA # endif #endif #if !defined(SWIFT_PROTOCOL) # define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA # define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA #endif #if !defined(SWIFT_EXTENSION) # define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) #endif #if !defined(OBJC_DESIGNATED_INITIALIZER) # if defined(__has_attribute) && __has_attribute(objc_designated_initializer) # define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) # else # define OBJC_DESIGNATED_INITIALIZER # endif #endif #if !defined(SWIFT_ENUM) # define SWIFT_ENUM(_type, _name) enum _name : _type _name; enum SWIFT_ENUM_EXTRA _name : _type # if defined(__has_feature) && __has_feature(generalized_swift_name) # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_EXTRA _name : _type # else # define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME) SWIFT_ENUM(_type, _name) # endif #endif #if !defined(SWIFT_UNAVAILABLE) # define SWIFT_UNAVAILABLE __attribute__((unavailable)) #endif #if !defined(SWIFT_UNAVAILABLE_MSG) # define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) #endif #if !defined(SWIFT_AVAILABILITY) # define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) #endif #if !defined(SWIFT_DEPRECATED) # define SWIFT_DEPRECATED __attribute__((deprecated)) #endif #if !defined(SWIFT_DEPRECATED_MSG) # define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) #endif #if defined(__has_feature) && __has_feature(modules) @import UIKit; @import CoreGraphics; #endif #pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" #pragma clang diagnostic ignored "-Wduplicate-method-arg" @class NSCoder; SWIFT_CLASS("_TtC11AdamPodTest8MyButton") @interface MyButton : UIControl - (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; @end #pragma clang diagnostic pop
rajohns08/AdamPodTest
AdamPodTest.framework/Headers/AdamPodTest-Swift.h
C
mit
5,582
<?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\DICOM; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy("all") */ class DischargeTime extends AbstractTag { protected $Id = '0038,0032'; protected $Name = 'DischargeTime'; protected $FullName = 'DICOM::Main'; protected $GroupName = 'DICOM'; protected $g0 = 'DICOM'; protected $g1 = 'DICOM'; protected $g2 = 'Image'; protected $Type = '?'; protected $Writable = false; protected $Description = 'Discharge Time'; }
romainneutron/PHPExiftool
lib/PHPExiftool/Driver/Tag/DICOM/DischargeTime.php
PHP
mit
788
/*License (MIT) Copyright © 2013 Matt Diamond 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. */ (function(window){ var WORKER_PATH = '/static/js/recorderjs/recorderWorker.js'; var Recorder = function(source, cfg){ var config = cfg || {}; var bufferLen = config.bufferLen || 4096; this.context = source.context; if(!this.context.createScriptProcessor){ this.node = this.context.createJavaScriptNode(bufferLen, 2, 2); } else { this.node = this.context.createScriptProcessor(bufferLen, 2, 2); } var worker = new Worker(config.workerPath || WORKER_PATH); worker.postMessage({ command: 'init', config: { sampleRate: this.context.sampleRate } }); var recording = false, currCallback; this.node.onaudioprocess = function(e){ if (!recording) return; worker.postMessage({ command: 'record', buffer: [ e.inputBuffer.getChannelData(0), e.inputBuffer.getChannelData(1) ] }); } this.configure = function(cfg){ for (var prop in cfg){ if (cfg.hasOwnProperty(prop)){ config[prop] = cfg[prop]; } } } this.record = function(){ recording = true; } this.stop = function(){ recording = false; } this.clear = function(){ worker.postMessage({ command: 'clear' }); } this.getBuffers = function(cb) { currCallback = cb || config.callback; worker.postMessage({ command: 'getBuffers' }) } this.exportWAV = function(cb, type){ currCallback = cb || config.callback; type = type || config.type || 'audio/wav'; if (!currCallback) throw new Error('Callback not set'); worker.postMessage({ command: 'exportWAV', type: type }); } this.exportMonoWAV = function(cb, type){ currCallback = cb || config.callback; type = type || config.type || 'audio/wav'; if (!currCallback) throw new Error('Callback not set'); worker.postMessage({ command: 'exportMonoWAV', type: type }); } worker.onmessage = function(e){ var blob = e.data; currCallback(blob); } source.connect(this.node); this.node.connect(this.context.destination); // if the script node is not connected to an output the "onaudioprocess" event is not triggered in chrome. }; Recorder.setupDownload = function(blob, filename){ var url = (window.URL || window.webkitURL).createObjectURL(blob); var link = document.getElementById("save"); link.href = url; link.download = filename || 'output.wav'; } window.Recorder = Recorder; })(window);
gregoryv/record-stuff
static/js/recorderjs/recorder.js
JavaScript
mit
3,692
<!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>UmberGo</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-touch-icon.png"> <!-- Place favicon.ico in the root directory --> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <script src="js/vendor/modernizr-2.8.3.min.js"></script> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="css/bootstrap-theme.min.css"> <link rel="stylesheet" href="css/umber.css"> </head> <body> <div class = "nav-bar"> <div class = "left-menu"> <div class = "left-1"> UmberGo <span class = "glyphicon glyphicon-fire"></span> </div> </div> <div class = "mid-menu"> <div class = "play-umber-go" data-toggle="tooltip" data-placement="bottom" title="Jogar com UmberGO"> <span class = "glyphicon glyphicon-king"></span> </div> <div class = "play-gnu-go" data-toggle="tooltip" data-placement="bottom" title="Jogar com GnuGO"> <span class = "glyphicon glyphicon-queen"></span> </div> <div class = "new-game" data-toggle="tooltip" data-placement="bottom" title="Recomeçar"> <span class = "glyphicon glyphicon-refresh"></span> </div> <div class = "see-score" data-toggle="tooltip" data-placement="bottom" title="Ver pontuação"> <span class = "glyphicon glyphicon-eye-open"></span> </div> <div class = "div-commandGNU"> <div class = "do-command" data-toggle="tooltip" data-placement="bottom" title="Digite um comando"> <span class = "glyphicon glyphicon-comment"></span> </div> </div> </div> </div> <div class = "container"> </div> <div class="modal fade" id = "info-board" data-backdrop="static"> <div class="modal-dialog"> <div class="modal-content" style = "border-radius:0px; max-height:200px; background:rgba(255,255,255,0.9)"> </div> </div> </div> </body> <script src="js/vendor/jquery-1.11.3.min.js"></script> <script src="js/vendor/bootstrap.min.js"></script> <script src="js/vendor/handlebars-v4.0.2.js"></script> <script src="js/plugins.js"></script> <script src="js/core/commons.js"></script> <script src="js/handler/aplicationArc.js"></script> <script src="js/main.js"></script> </html>
Hanor/UmberGO
index.html
HTML
mit
2,944
#![feature(test)] extern crate test; extern crate quantiles; use self::test::Bencher; use quantiles::CKMS; #[bench] fn bench_sequential_insert(b: &mut Bencher) { b.iter(|| { let mut ckms = CKMS::<i64>::new(0.001); for i in 0..10000 { ckms.insert(i); } ckms.query(0.999); }); } #[bench] fn bench_inverted_insert(b: &mut Bencher) { b.iter(|| { let seq = (0..10000).rev(); let mut ckms = CKMS::<i64>::new(0.001); for i in seq { ckms.insert(i); } ckms.query(0.999); }); }
cmsd2/quantiles
benches/insert.rs
Rust
mit
585
/***************************************************** * * Designed and programmed by Mohamed Adam Chaieb. * *****************************************************/ /* Constructs a new tile. */ function Tile(position, level) { this.x = position.x; this.y = position.y; this.level = level; }; /* Updates the position of the tile. */ Tile.prototype.updatePosition = function(position) { this.x = position.x; this.y = position.y; };
mac-adam-chaieb/Isometric-2048
js/tile.js
JavaScript
mit
444
<!DOCTYPE html> <html lang="zh-cn"> <head> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8" > <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="generator" content="前端 - 分享园"> <title>归档: 2015/12 - 前端 - 分享园</title> <meta name="author" content="TommyShao"> <link rel="alternative" type="application/atom+xml" title="RSS" href="/atom.xml"> <meta name="description" content="前端|css|html5|css3|jquery|javascript|nodejs|angular|angularjs|backbone|移动开发"> <meta property="og:type" content="blog"> <meta property="og:title" content="前端 - 分享园"> <meta property="og:url" content="http://tomieric.github.io/archives/2015/12/index.html"> <meta property="og:site_name" content="前端 - 分享园"> <meta property="og:description" content="前端|css|html5|css3|jquery|javascript|nodejs|angular|angularjs|backbone|移动开发"> <meta name="twitter:card" content="summary"> <meta name="twitter:title" content="前端 - 分享园"> <meta name="twitter:description" content="前端|css|html5|css3|jquery|javascript|nodejs|angular|angularjs|backbone|移动开发"> <meta name="twitter:creator" content="@tomieric"> <meta rel="publisher" content="https://plus.google.com/+tomieric"/> <meta property="og:image" content="/assets/images/avatar.jpg"/> <!--STYLES--> <link rel="stylesheet" href="/assets/css/style.min.css" type="text/css"> <!--STYLES END--> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-71323455-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <div id="blog"> <!-- Define author's picture --> <header id="header" data-behavior="1"> <i id="btn-open-sidebar" class="fa fa-lg fa-bars"></i> <h1 class="header-title"> <a class="header-title-link" href="/ ">前端 - 分享园</a> </h1> <a class="header-right-picture " href="/#about"> <img class="header-picture" src="/assets/images/avatar.jpg"/> </a> </header> <!-- Define author's picture --> <nav id="sidebar" data-behavior="1"> <div class="sidebar-profile"> <a href="/#about"> <img class="sidebar-profile-picture" src="/assets/images/avatar.jpg"/> </a> <span class="sidebar-profile-name">TommyShao</span> </div> <ul class="sidebar-buttons"> <li class="sidebar-button"> <a class="sidebar-button-link " href="/ " > <i class="sidebar-button-icon fa fa-lg fa-home"></i> <span class="sidebar-button-desc">首页</span> </a> </li> <li class="sidebar-button"> <a class="sidebar-button-link " href="/all-categories" > <i class="sidebar-button-icon fa fa-lg fa-bookmark"></i> <span class="sidebar-button-desc">分类</span> </a> </li> <li class="sidebar-button"> <a class="sidebar-button-link " href="/all-tags" > <i class="sidebar-button-icon fa fa-lg fa-tags"></i> <span class="sidebar-button-desc">标签</span> </a> </li> <li class="sidebar-button"> <a class="sidebar-button-link " href="/all-archives" > <i class="sidebar-button-icon fa fa-lg fa-archive"></i> <span class="sidebar-button-desc">归档</span> </a> </li> <li class="sidebar-button"> <a class="sidebar-button-link st-search-show-outputs" href="/#search" > <i class="sidebar-button-icon fa fa-lg fa-search"></i> <span class="sidebar-button-desc">搜索</span> </a> </li> </ul> <ul class="sidebar-buttons"> <li class="sidebar-button"> <a class="sidebar-button-link " href="https://github.com/tomieric" target="_blank"> <i class="sidebar-button-icon fa fa-lg fa-github"></i> <span class="sidebar-button-desc">GitHub</span> </a> </li> <li class="sidebar-button"> <a class="sidebar-button-link " href="http://weibo.com/tomieric" target="_blank"> <i class="sidebar-button-icon fa fa-lg fa-weibo"></i> <span class="sidebar-button-desc">微博</span> </a> </li> </ul> <ul class="sidebar-buttons"> <li class="sidebar-button"> <a class="sidebar-button-link " href="/atom.xml" > <i class="sidebar-button-icon fa fa-lg fa-rss"></i> <span class="sidebar-button-desc">RSS</span> </a> </li> </ul> </nav> <div id="main" data-behavior="1" class=" hasCoverMetaIn "> <section class="postShorten-group main-content-wrap"> <article class="postShorten postShorten--thumbnailimg-bottom" itemscope itemType="http://schema.org/BlogPosting"> <div class="postShorten-wrap"> <div class="postShorten-header"> <h1 class="postShorten-title" itemprop="headline"> <a class="link-unstyled" href="/2015/12/13/hello-world/">Hello World</a> </h1> <div class="postShorten-meta"> <time itemprop="datePublished" content="Sun Dec 13 2015 18:09:18 GMT+0800"> 12月 13, 2015 </time> <span>发布在 </span> <a class="category-link" href="/categories/杂谈/">杂谈</a> </div> </div> <div class="postShorten-content" itemprop="articleBody"> <!-- endcontent --><div class="figure figure--fullWidth"><img class="figure-img" src="/assets/images/background.jpg" alt=" A beautiful sunrise"><span class="caption"> A beautiful sunrise</span></div><!-- content --> <p>由于旧博客用<code>airpub.io</code>,多说的账号被<code>CSRF</code>攻击造成大部分博文被注入删除</p> <p>说多了都是泪<del>~~(&gt;_&lt;)</del>~~</p> <p>已经决定了新博客用<code>hexo</code></p> <h3 id="u535A_u5BA2_u5386_u7A0B"><a href="#u535A_u5BA2_u5386_u7A0B" class="headerlink" title="博客历程"></a>博客历程</h3><ul> <li>大学时期用免费asp主机,html模板</li> <li>上班后用博客园</li> <li>为了更多酷炫皮肤,用wordpress</li> <li>打破限制,用免费php主机跑wordpress,买过域名<code>www.fenxiangyuan.com</code></li> <li>累了,用gitpage,静态html,域名过期续不了,换成<code>http://www.get2e.com</code></li> <li>启用<code>airpub</code>,在gitpage上直接动态写文章,不用经常git操作</li> <li>发简历给猎头,猎头说博客东西好少,看了一下原来被攻击,好多文章丢失了,也找不回了,在多说上没有备份</li> <li>决定还是以静态方式,选择hexo因为模板够漂酿。实在没钱买VPS,掏捣nodejs去搭建个博客。</li> </ul> <h3 id="u5173_u4E8E_u535A_u5BA2_u53D1_u5E03"><a href="#u5173_u4E8E_u535A_u5BA2_u53D1_u5E03" class="headerlink" title="关于博客发布"></a>关于博客发布</h3><p>文档看的一头雾水,发布目录只能在hexo项目目录里</p> <p>只能把项目弄到<code>admin</code>目录,<code>hexo deploy</code>生成的<code>public</code>目录,通过<code>gulpfile</code>(工作用这个比较熟)拷贝到根目录并清空<code>public</code>目录。</p> <p>终于搞定了,在一个周末的下午。</p> <p> <a href="/2015/12/13/hello-world/#post-footer" class="postShorten-excerpt_link link"> 评论&分享 </a> </p> </div> </div> </article> <div class="pagination-bar"> <ul class="pagination"> <li class="pagination-number">第 1 页 共 1 页</li> </ul> </div> </section> <footer id="footer" class="main-content-wrap"> <span class="copyrights"> Copyrights &copy; 2012 - 2015 TommyShao. All Rights Reserved. Powered by <a target="_blank" href="https://hexo.io">Hexo</a>. Theme by <a target="_blank" href="http://louisbarranqueiro.github.io/tranquilpeak-hexo-theme/">tranquilpeak</a> </span> </footer> </div> </div> <!-- Define author's picture --> <div id="about"> <div id="about-card"> <div id="about-btn-close"> <i class="fa fa-remove"></i> </div> <img id="about-card-picture" src="/assets/images/avatar.jpg"/> <h4 id="about-card-name">TommyShao</h4> <h5 id="about-card-bio"><p>只想做一位安静切图的美男子</p> </h5> <h5 id="about-card-job"> <i class="fa fa-briefcase"></i> <br/> <p>前端开发工程师</p> </h5> <h5 id="about-card-location"> <i class="fa fa-map-marker"></i> <br/> 中国 广州 </h5> </div> </div> <div id="cover" style="background-image:url('/assets/images/cover.jpg');"></div> </body> <!--SCRIPTS--> <script src="/assets/js/script.min.js" type="text/javascript"></script> <!--SCRIPTS END--> </html>
tomieric/tomieric.github.io
archives/2015/12/index.html
HTML
mit
11,515
<?php /** * Authentication Factory Method * * @package Molajo * @license http://www.opensource.org/licenses/mit-license.html MIT License * @copyright 2014-2015 Amy Stephen. All rights reserved. */ namespace Molajo\Factories\Authentication; use CommonApi\IoC\FactoryInterface; use CommonApi\IoC\FactoryBatchInterface; use Molajo\IoC\FactoryMethod\Base as FactoryMethodBase; use stdClass; /** * Authentication Factory Method * * @author Amy Stephen * @license http://www.opensource.org/licenses/mit-license.html MIT License * @copyright 2014-2015 Amy Stephen. All rights reserved. * @since 1.0.0 */ class AuthenticationFactoryMethod extends FactoryMethodBase implements FactoryInterface, FactoryBatchInterface { /** * Constructor * * @param array $options * * @since 1.0.0 */ public function __construct(array $options = array()) { $options['product_name'] = basename(__DIR__); $options['store_instance_indicator'] = true; $options['product_namespace'] = 'Molajo\\User\\Authentication'; parent::__construct($options); } /** * Retrieve a list of Interface dependencies and return the data ot the controller. * * @return array * @since 1.0.0 * @throws \CommonApi\Exception\RuntimeException */ public function setDependencies(array $reflection = array()) { parent::setDependencies(array()); $options = array(); $this->dependencies['Runtimedata'] = $options; $this->dependencies['Mailer'] = $options; $this->dependencies['Encrypt'] = $options; $this->dependencies['Fieldhandler'] = $options; $this->dependencies['Flashmessage'] = $options; $this->dependencies['Userdata'] = $options; return $this->dependencies; } /** * Set Dependencies for Instantiation * * @return array * @since 1.0.0 * @throws \CommonApi\Exception\RuntimeException */ public function onBeforeInstantiation(array $dependency_values = null) { parent::onBeforeInstantiation($dependency_values); $this->dependencies['Configuration'] = $this->getConfiguration(); return $this->dependencies; } /** * Factory Method Controller triggers the Factory Method to create the Class for the Service * * @return $this * @since 1.0.0 * @throws \CommonApi\Exception\RuntimeException */ public function instantiateClass() { $class = $this->product_namespace; $this->product_result = new $class( $this->dependencies['Userdata'], $this->options['Session'], $this->options['Cookie'], $this->dependencies['Mailer'], $this->options['Messages'], $this->dependencies['Encrypt'], $this->dependencies['Fieldhandler'], $this->dependencies['Configuration'], $_SERVER, $_POST, session_id() ); return $this; } /** * Process Authenticate: * * isGuest * login * isLoggedOn * changePassword, * requestPasswordReset * logout * register * confirmRegistration * * @return $this * @since 1.0.0 * @throws \CommonApi\Exception\RuntimeException */ public function onAfterInstantiation() { $results = $this->{$this->options['action']}(); if (is_object($results)) { $this->redirect($results); } else { $this->options['id'] = (int)$results; } return $this; } /** * Request for array of Factory Methods to be Scheduled * * @return $this * @since 1.0.0 */ public function scheduleFactories() { if (isset($this->schedule_factory_methods['redirect'])) { } else { $options = array(); $options['id'] = $this->options['id']; $options['Userdata'] = $this->dependencies['Userdata']; $options['Session'] = $this->options['Session']; $options['Flashmessage'] = $this->dependencies['Flashmessage']; $options['Cookie'] = $this->options['Cookie']; $options['Runtimedata'] = $this->dependencies['Runtimedata']; $this->schedule_factory_methods['Instantiateuser'] = $options; } return $this->schedule_factory_methods; } /** * Get Configuration * * @return object * @since 1.0.0 */ protected function getConfiguration() { $configuration = new stdClass(); $configuration->authentication_types = array('database'); $configuration->from_email_address = true; $configuration->from_email_name = true; $configuration->max_login_attempts = 10; $configuration->password_alpha_character_required = false; $configuration->password_expiration_days = 0; $configuration->password_lock_out_days = 1; $configuration->password_minimum_password_length = 5; $configuration->password_maximum_password_length = 50; $configuration->password_mixed_case_required = false; $configuration->password_must_not_match_last_password = true; $configuration->password_must_not_match_username = false; $configuration->password_numeric_character_required = false; $configuration->password_send_email_for_password_blocks = false; $configuration->password_special_character_required = false; $configuration->password_email_address_as_username = false; $configuration->session_expires_minutes = 30; $configuration->site_is_offline = false; $application_base_url = $this->dependencies['Runtimedata']->application->base_url; $configuration->url_for_home = $application_base_url; $configuration->url_to_change_password = $application_base_url . '/' . 'password'; $configuration->url_to_login = $application_base_url . '/' . 'login'; $configuration->url_to_registration = $application_base_url . '/' . 'registration'; return $configuration; } /** * Login * * @return $this * @since 1.0.0 */ protected function login() { return $this->product_result->login( $this->options['session_id'], $this->options['username'], $this->options['password'], $this->options['remember'] ); } /** * Is Logged On * * @return $this * @since 1.0.0 */ protected function isLoggedOn() { return $this->product_result->isLoggedOn( $this->options['session_id'], $this->options['username'] ); } /** * Change Password * * @return $this * @since 1.0.0 */ protected function changePassword() { return $this->product_result->changePassword( $this->options['session_id'], $this->options['username'], $this->options['password'], $this->options['new_password'], $this->options['reset_password_code'], $this->options['remember'] ); } /** * Request Password Reset * * @return $this * @since 1.0.0 */ protected function requestPasswordReset() { return $this->product_result->requestPasswordReset( $this->options['session_id'], $this->options['username'] ); } /** * Logout * * @return $this * @since 1.0.0 */ protected function logout() { return $this->product_result->requestPasswordReset( $this->options['session_id'], $this->options['username'] ); } /** * Register * * @return $this * @since 1.0.0 */ protected function register() { return $this->product_result->register( $this->options['session_id'] ); } /** * Confirm Registration * * @return $this * @since 1.0.0 */ protected function confirmRegistration() { return $this->product_result->confirmRegistration( $this->options['session_id'] ); } /** * Request for array of Factory Methods to be Scheduled * * @return $this * @since 1.0.0 */ protected function redirect($redirect_object) { $this->schedule_factory_methods = array(); $options = array(); $options['url'] = $redirect_object->url; $options['status'] = $redirect_object->code; $this->schedule_factory_methods['Redirect'] = $options; return $this; } }
Molajo/User
Factories/Authentication/AuthenticationFactoryMethod.php
PHP
mit
9,336
package main import ( "bytes" "encoding/json" "flag" "fmt" "io" "io/ioutil" "net/http" "os" "os/exec" "path" "time" "github.com/nchern/red/app" color "gopkg.in/fatih/color.v1" ) const ( jsonIndent = " " filenameBase = "query" queryFilename = filenameBase + ".red" outFilename = filenameBase + ".redout" ) var ( editor = env("EDITOR", "vim") editorFlags = env("EDITOR_FLAGS", "-O") appHomePath = path.Join(os.Getenv("HOME"), ".red") queryFilePath = path.Join(appHomePath, queryFilename) outFilePath = path.Join(appHomePath, outFilename) client = &http.Client{ Timeout: 3 * time.Second, } flagCmd = flag.String("c", "edit", "Command to exectue. One of: edit, run, example") flagSourceFile = flag.String("s", queryFilePath, "Source file with queries. Might be under edit in the editor of choice") flagOutputFile = flag.String("o", outFilePath, "File to write query results. '-' means stdout") flagDuplicateStdin = flag.Bool("d", true, "Duplicate query to stdin") // opens the editor of preference to edit requests cmdEdit = "edit" // runs a given query, either from stdin or a query file(TODO: make it accept "-") cmdRun = "run" // prints out example of request file cmdExample = "example" ) func openEditor() error { if _, err := os.Stat(*flagSourceFile); os.IsNotExist(err) { if err := os.MkdirAll(appHomePath, 0700); err != nil { return err } // path/to/whatever does not exist if err := ioutil.WriteFile(queryFilePath, app.MustAsset(app.TemplateAsset), 0644); err != nil { return err } } cmd := exec.Command(editor, *flagSourceFile) cmd.Stdin = os.Stdin cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr return cmd.Run() } func doRequest(req *app.HTTPRequest) (int, []byte, error) { src, err := req.JSON() if err != nil { return 0, nil, err } httpReq, err := http.NewRequest(req.Method, req.URL(), bytes.NewBufferString(src)) if err != nil { return 0, nil, err } httpReq.Header = req.Headers resp, err := client.Do(httpReq) if err != nil { return 0, nil, err } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return 0, nil, err } return resp.StatusCode, tryFormatJSON(body), nil } func runQuery(primaryReader io.Reader, secondryReader io.Reader, out io.Writer) error { request, err := app.ParseRequest(primaryReader) if err != nil { return err } if sel, err := app.TryParseAsync(secondryReader); err == nil { // got the whole query file or it is enough input to use parsed data from stdin if sel.Validate() == nil { request = sel } else { request.URI = sel.URI request.Method = sel.Method request.CopyBodyFrom(sel) } } if err := request.Validate(); err != nil { return err } code, body, err := doRequest(request) if err != nil { return err } if _, err := fmt.Fprintf(out, "#> %d %s %s\n\n", code, request.Method, request.URL()); err != nil { return err } _, err = out.Write(body) return err } func example() error { data := app.MustAsset(app.TemplateAsset) fmt.Fprintln(os.Stdout, string(data)) return nil } func run() error { srcReader, err := os.Open(*flagSourceFile) if err != nil { return err } defer srcReader.Close() w := os.Stdout if *flagOutputFile != "-" { w, err = os.Create(*flagOutputFile) if err != nil { return err } defer w.Close() } var secondary io.Reader = os.Stdin if *flagDuplicateStdin { // TODO: get rid of the logic especially if we can accept "-" from cmd line(see corresponding todo)? // Mirror stdin to stout - this allows processing selections in vim correctly secondary = io.TeeReader(os.Stdin, os.Stdout) } return runQuery(srcReader, secondary, w) } func doCmd() error { switch *flagCmd { case cmdEdit: return openEditor() case cmdExample: return example() case cmdRun: return run() } return fmt.Errorf("Unknown action: %s", *flagCmd) } func main() { flag.Parse() if err := doCmd(); err != nil { if err == app.ErrFormatFailed { os.Exit(1) } switch err := err.(type) { case *exec.ExitError: case *app.JsonifyError: if syntaxErr, ok := err.Inner.(*json.SyntaxError); ok { errorf("Bad JSON query: %s", err) fmt.Fprintf(os.Stderr, "%s\n", color.RedString(err.Highlighted(syntaxErr.Offset))) break } errorf("%s", err) default: errorf("%s", err) } os.Exit(1) } } func errorf(format string, args ...interface{}) { fmt.Fprintf(os.Stderr, "%s ", color.RedString("ERROR")) fmt.Fprintf(os.Stderr, format+"\n", args...) } func notEmpty(val, defaultVal string) string { if val != "" { return val } return defaultVal } func env(key, defaultVal string) string { return notEmpty(os.Getenv(key), defaultVal) } func tryFormatJSON(body []byte) []byte { var out bytes.Buffer if err := json.Indent(&out, body, "", jsonIndent); err != nil { return body } return out.Bytes() }
nchern/red
main.go
GO
mit
4,910
#ifdef WITH_SDL2 #pragma once #include <SDL.h> #include "../Window.hpp" #include "psychic-ui/ApplicationBase.hpp" #if defined(PSYCHIC_UI_WITH_GLAD) #if defined(PSYCHIC_UI_SHARED) && !defined(GLAD_GLAPI_EXPORT) #define GLAD_GLAPI_EXPORT #endif #include <glad/glad.h> #endif #if defined(ANDROID) #include <GLES/gl.h> #elif defined(UNIX) #include <GL/gl.h> #elif defined(APPLE) #include <OpenGL/gl.h> #elif defined(IOS) #include <OpenGLES/ES2/gl.h> #endif namespace psychic_ui { class SDL2SystemWindow; class SDL2Application : public ApplicationBase { friend class SDL2SystemWindow; public: static std::unordered_map<unsigned int, std::unique_ptr<SDL2SystemWindow>> sdl2Windows; void init() override; void mainloop() override; void open(std::shared_ptr<Window> window) override; void close(std::shared_ptr<Window> window) override; void shutdown() override; protected: bool running{false}; void sdl2PollEvents(); }; class SDL2SystemWindow : public SystemWindow { friend class SDL2Application; public: SDL2SystemWindow(SDL2Application *application, std::shared_ptr<Window> window); ~SDL2SystemWindow(); SDL_Window *sdl2Window() const; void handleEvent(const SDL_Event &e); void liveResize(int width, int height); bool render() override; protected: SDL2Application *_sdl2Application{nullptr}; SDL_Window *_sdl2Window{nullptr}; SDL_GLContext _sdl2GlContext{nullptr}; /** * Mapping of internal cursors enum to glfw int cursor */ SDL_Cursor *_cursors[6]; void setTitle(const std::string &title) override; void setFullscreen(bool fullscreen) override; bool getMinimized() const override; void setMinimized(bool minimized) override; bool getMaximized() const override; void setMaximized(bool maximized) override; void setVisible(bool visible) override; void setCursor(int cursor) override; void startDrag() override; void stopDrag() override; void setSize(int width, int height) override; void setPosition(int x, int y) override; void startTextInput() override; void stopTextInput() override; static Mod mapMods(int mods); static Key mapKey(int keycode); }; } #endif
ubald/psychic-ui
psychic-ui/applications/SDL2Application.hpp
C++
mit
2,428
// This software is part of OpenMono, see http://developer.openmono.com // Released under the MIT license, see LICENSE.txt #include "encoder.hpp" #include "constants.hpp" Encoder::Encoder (PinName pinA, PinName pinB) : lastA(0), lastB(0), channelA(pinA), channelB(pinB) { #ifndef EMUNO // Pull up A. CyPins_SetPinDriveMode(pinA, CY_PINS_DM_RES_UP); CyPins_SetPin(pinA); // Pull up B. CyPins_SetPinDriveMode(pinB, CY_PINS_DM_RES_UP); CyPins_SetPin(pinB); #endif reset(); #ifndef EMUNO // Samples every 100µs. ticker.attach_us(this, &Encoder::sample, 100); #endif } void Encoder::reset () { pulses = 0; } int Encoder::getPulses () { return pulses; } void Encoder::sample () { uint8_t a = channelA.read(); uint8_t b = channelB.read();; if (a != lastA || b != lastB) { translate(a, b); lastA = a; lastB = b; } } void Encoder::translate (uint8_t a, uint8_t b) { // 00 -> 01 -> 11 -> 10 -> ... = clockwise rotation. if ( (lastA == 0 && lastB == 0 && a == 0 && b >= 1) || (lastA == 0 && lastB >= 1 && a >= 1 && b >= 1) || (lastA >= 1 && lastB >= 1 && a >= 1 && b == 0) || (lastA >= 1 && lastB == 0 && a == 0 && b == 0) ) { ++pulses; } // 01 -> 00 -> 10 -> 11 -> ... = counter clockwise rotation. else if ( (lastA == 0 && lastB >= 1 && a == 0 && b == 0) || (lastA == 0 && lastB == 0 && a >= 1 && b == 0) || (lastA >= 1 && lastB == 0 && a >= 1 && b >= 1) || (lastA >= 1 && lastB >= 1 && a == 0 && b >= 1) ) { --pulses; } }
getopenmono/pong
encoder.cpp
C++
mit
1,532
Overview -------- Piqi is a universal high-level data definition language. At the moment, it works with 4 different [data formats](/doc/encodings/) including JSON, XML, Protocol Buffers and [Piq](/doc/piq/) and has mappings to [OCaml](/doc/ocaml/), [Erlang](/doc/erlang/) and [Protocol Buffers](/doc/protobuf/) `.proto` definitions. Below is a brief overview of Piqi features. - Piqi supports a rich set of types. primitive types: : boolean, integer, single- and double-precision floating point number, string (Unicode string), binary (byte array) user defined types: : record, variant ([tagged union](http://en.wikipedia.org/wiki/Tagged_union)), enum, list and alias. - Piqi has high-level modules. Piqi modules provide several mechanisms for reusing type definitions from other modules: imports : A module can *import* another module. It allows to use types defined in the imported module in local type definitions. includes : A module can *include* another module to reuse all of its type definitions, imports and extensions as if they where defined locally. - Piqi supports type extensions and data schema evolution. All Piqi types can be extended either directly or through *extensions* mechanism: - more fields can be added to a `record` definition - more options can be added to a `variant` or `enum` definition - more properties can be assigned to an `alias` type Backward and forward schema compatibility can be maintained by using Google Protocol Buffers approach when a unique integer number is assigned to each field in a record (read more about it in Google Protocol Buffers documentation). If schema compatibility is not needed (e.g. during prototyping stage), Piqi can assign field numbers automatically. Piqi can also automatically assign `enum` values. - Piqi is self-defined and portable. Piqi module data structure is [defined](/self-definition/) using the Piqi language itself. As a result, a Piqi module can be converted into a portable JSON, XML or Protocol Buffers representation. One of interesting Piqi properties is that the language implementation takes its own high-level specification, written in Piqi, and parses the language into AST without any hand-written parsing rules -- it is all fully automated. - The Piqi language is extensible. The Piqi language is based on a general-purpose data representation language called [Piq](/doc/piq/). Now, let's look at the following three properties. - Piqi module is just a data structure represented in Piq format (or any other supported portable formats such as JSON), meaning that there's no concrete language syntax. - the Piqi module data structure is described using the same language - the Piqi data definition language supports schema extensions in a backward-compatible way This means that once we extend the Piqi self-specification, we instantly have those extensions in the language: there is no need to design new syntax elements, update parsing code and transform AST into intermediate language. Moreover, the new extensions are fully transparent from the core Piqi implementation standpoint, because extensions are backward-compatible. Piqi borrows many concepts from Google Protocol Buffers which, at the moment, is much better documented than Piqi. It may be useful to get familiar with Protocol Buffers along with reading Piqi documentation. For those who are familiar with Google Protocol Buffers, information about its compatibility with Piqi can be found on [this page](/doc/protobuf/). Some examples of Piqi specifications can be found [here](/examples/). The most complex Piqi specification example is the Piqi [self-specification](/self-definition/). Lexical conventions ------------------- The Piqi language described in the remaining part of the document is based on Piq syntax which is specified [here](/doc/piq/). In addition to general Piq rules, Piqi relies on some extra syntax elements, such as identifiers that are used for type names, field name, option names and so on. Piqi identifier has the following format: <identifier> ::= ['a'-'z' 'A'-'Z'] ['a'-'z' 'A'-'Z' '0'-'9' '-']* Piqi identifiers are case-sensitive. **NOTE:** use of underscore (`_`) characters in Piqi identifiers is not allowed. Hyphens (`-`) should be used instead. Two or more consecutive `-` characters are now allowed. Also, identifiers can not begin and end with `-`. \`true\` and \`false\` are reserved for boolean literals -- they can not be used as identifiers. As you will see in the following sections, this makes them the only keywords in the language. Modules ------- Piqi modules are defined as non-empty files with `.piqi` extensions. A `.piqi` file represents one Piqi module. Piqi modules converted from Google Protocol Buffer specification normally have `.proto.piqi` file extension. `.piqi` and `.proto.piqi` are the only file extensions allowed for Piqi modules. Other extensions are not recognized by [Piqi tools](/doc/tools/). (When the Piqi implementation resolves Piqi types and Piqi module names it searches for files with `.piqi` or `.proto.piqi` extensions using module search paths.) There are also several restrictions to `.piqi` file names, because Piqi module names are usually derived from the file names. See the next section for details. Each Piqi module can contain the following entries: - module name - import directives - include directives - type definitions - type extension directives - function definitions In addition, Piqi module can include one or more `custom-field` top-level properties. They are used to prevent "Unknown field" warning messages about fields that are not natively supported by the Piqi implementation. For example, including .custom-field ocaml-name will tell [Piqi tools](/doc/tools/) to ignore properties like `.ocaml-name "foo"` as they are only meaningful to `piqic ocaml`. ### Module names Piqi module names consist of two parts: *module path* and *local module name*. These parts usually directly correspond to where `.piqi` files are located in the filesystem. For example, module named (or referred as) foo/bar Would be usually defined in file foo/bar.piqi As you can see, the *local module name* is derived from the file name by stripping the `.piqi` extension. A module can explicitly specify its name. For example: .module foo/bar However, explicitly defined module names are rarely useful in practice. Most of time, they will be automatically derived from the location of the `.piqi` file. Piqi module names can be formally described as follows: <module-name> :: <path> | <local-module-name> <local-module-name> ::= ['a'-'z' 'A'-'Z'] ['a'-'z' 'A'-'Z' '0'-'9' '-' '_']* <path> ::= <path-element> | <path> '/' <path-element> <path-element ::= ['a'-'z' 'A'-'Z' '0'-'9' '-' '_' '.']+ NOTE: a <local-module-name> can not contain both `-` and `_` characters. When the Piqi implementation looks for included or imported `.piqi` modules by module names, it looks for files according to configured *search paths* and trying the following rules one by one: 1. `<search-path>/<path>/<local-module-name>.piqi` 2. `<search-path>/<path>/<local-module-name>.proto.piqi` 3. `<search-path>/<path>/<local-module-name>.piqi` with `-` replaced with `_` in <local-module-name> 4. `<search-path>/<module-name>.proto.piqi` with `-` replaced with `_` in <local-module-name> 5. same as 1 but `_` replaced with `-` in <path> 6. same as 2 but `_` replaced with `-` in <path> 7. same as 3 but `_` replaced with `-` in <path> 8. same as 4 but `_` replaced with `-` in <path> Rules 1--4 means that Piqi allows interchangeable use of `_` and `-` in local module names. The recommended style is to use `_` in `.piqi` file names and `-` in imported and included module names. See also the [Style guidelines](#styleguidelines) section below. Rules 5--6 account for additional module path normalization, during which path is changed to include only `-` characters. This may be useful, for example, for using module names as a part of URL strings. ### Module imports *Imports* provides a way to use types defined in other Piqi modules in local type definitions. In order to use other module's types, the module must be first "imported" by using the `import` directive. Import directive defines the following properties: - module name Name of the imported module. - import name (optional) This is a local shorthand for referring types defined in the imported module as `<import-name>/<type-name>`. When not specified, it is implicitly defined as the *local module name* (i.e. the last path segment) of the imported module. **Examples:** .import [ .module example.com/foo ] % overriding implicitly derived import name "foo" with "bar" .import [ .module example.com/foo .name bar ] ### Module includes *Include* mechanism provide a way to reuse type definitions, imports, extensions and all other top-level entries from another module as if they where defined locally. A module can include several other modules to combine their contents together. The `include` directive is used to specify module inclusion. It has only one property which the name of the included module. **Example:** .include [ .module example.com/foo ] ### Extension modules Extension module is a Piqi module that has a second extension in its file name. For example, "m.ocaml.piqi" is an extension module for a regular Piqi module "m.piqi". All operations applicable to regular Piqi modules are also supported for extension modules. The difference is that extension modules can be included automatically in the modules which they extend. For instance, `piqic ocaml` and `piqic erlang` Piqi compilers try to automatically include `<m>.ocaml.piqi` and `<m>.erlang.piqi` respectively for every loaded module `<m>.piqi`. Extension modules are useful for working with third-party Piqi or Protocol Buffers definitions which, for example, may not define necessary OCaml- or Erlang-specific properties in the first place. By using this mechanism, it is possible to take any set of Piqi modules and write custom extensions for them without modifying the original files. After that, extensions can be loaded automatically for all recursively included and imported Piqi modules. Primitive types --------------- `bool` : Boolean type. `int` : `int` type represents signed integers. Supported range for this type is implementation-specific (i.e. depends on a certain Piqi mapping) but normally it should be capable for holding at least 32-bit signed integers. The maximum supported range for `int` type is is defined as `(min(signed 64-bit integer), max(unsigned 64-bit integer))`. In addition to `int`, there are some other variations of integer types supported by default. They are defined as *aliases* of `int` type in Piqi self-definition: [piqi.piqi](http://github.com/alavrik/piqi/blob/dev/piqi/piqi.piqi). Each Piqi mapping should provide support for these types. Below is the full list of Piqi integer types. Their names reflect some properties associated with their binary encoding and language mappings. See for example, [Piqi--Protocol Buffers mapping](/doc/protobuf/). - `int` - `uint` - `int32` - `uint32` - `int64` - `uint64` - `int32-fixed` - `uint32-fixed` - `int64-fixed` - `uint64-fixed` If unsure which integer type to use, it is recommended to use `int`. `uint` can be a little bit more efficient compared to `int` when serialized to binary encoding. `int32`, `uint32`, `int64`, `uint64` are similar to `int` and `uint` but they guarantee the integer ranges associated with these types (32-bit and 64-bit). `float` and `float64` : IEEE 754 double-precision floating point. `float32` : IEEE 754 single-precision floating point. `string` : Unicode string. `binary` : Byte array (sequence of bytes). Special built-in types ---------------------- There are two special built-in types: - `piqi-any` This type represents dynamically typed values in one of the supported portable data format (Protobuf, JSON, XML) or completely untyped JSON and XML. At low level, `piqi-any` maps to the `any` record defined in the Piqi [self-specification](/self-definition/). You can find some Piq examples [here](/examples/#piqi-any_piq). - `piqi` Values of this type are embedded Piqi modules. This type can not be used as a valid *type name* inside type definitions (at least yet). However, it is recognized by Piqi [command-line tools](/doc/tools/) and used in Piq format. User-defined types ------------------ A user-defined defines a new type name that must be unique within the module's local namespace and must not override names of the Piqi built-in primitive types (e.g. `int`, `float`, `string`). Type name must be a valid `identifier`. ### Record Record is a composite data type that contains zero or more *fields* or *flags*. Fields can have the following properties: - `name` (optional) Field name is represented as a valid Piqi `identifier`. Field name can be omitted. In such case it will be implicitly derived from the field's type name. Field names must be unique across all fields for a given record. - `type` (optional) Field type name refer to one of the following: - Built-in type. E.g. `int`, `string`, `bool`, etc. - Another type defined within the current module or included module. - Type imported from another module. In this case *type name* will have the following format: `<import-name>/<type-name>`. Field that doesn't specify *type* is called *flag*. Since instance of such field doesn't have associated value, its presence in the record is meaningful by itself. Therefore the name -- *flag*. Flags must be defined with `optional` field *mode*. - `mode` (optional) Field mode can be specified as one of `required`, `optional` or `repeated`. As follows from their names: - `required` means that exactly one field instance must be present in the record. This is the default. - `optional` field *may* be present or missing in the record. - `repeated` means that *zero or more* instances of the field may be present in the record. - `default` (optional) For `optional` fields it is possible to specify *default value* that can be used as a default field's value when the field is missing in the record representation. The actual use of default value depends on a particular Piqi mapping. Default values are represented as Piq values of the field's type, e.g. integer literals for `int` type. - `code` (optional, used with Protocol Buffer binary format) Usually small integer \> 1 uniquely identifying a field within a record. It must either defined for all fields or for none of the fields. When not defined, Piqi implicitly generates codes by enumerating the fields in the order they are defined in the record. See [Piqi--Protocol Buffers mapping](/doc/protobuf/) for details. - `protobuf-packed` (optional, used with Protocol Buffer binary format) Repeated fields of primitive numeric types (integers, floats, booleans and enums) can be represented in so called "packed" format. This format was introduced in Protocol Buffers 2.3.0 and provides a more compact encoding for repeated primitive types by basically omitting field tags for all fields but the first one and stacking fields values one after another. This is possible because primitive numeric types are self-delimited. In order to use such "packed" representation for a repeated field, specify `.protobuf-packed` as a field property. - `json-name` (optional, used with JSON format) Field name used when data is encoded in JSON. When not specified explicitly, it is derived from Piqi identifiers by replacing `-` characters with `_`. - `deprecated` (optional, experimental) Use this flag to mark fields that are no longer used or supported. Usually, such *deprecated* fields are kept around in the spec because of various considerations related to backward compatibility. **Examples:** % this is a record definition .record [ .name r % record name % required integer field .field [ .name i .type int % NOTE: fields are "required" by default; one can specify it explicitly: %.required ] % optional string field .field [ .name s .type string .optional ] % optional binary field with default value (NOTE: default values may only be % specified for optional fields) .field [ .name b .type binary .optional .default "abc \xff\x00" ] % repeated floating point field .field [ .name f .type float .repeated ] % this is a flag, its presence in the record is meaningful by itself, it % doesn't carry any additional value .field [ .name flag % NOTE: flags must be defined as .optional; obviously, .default value % doesn't make any sense for flags and thus not allowed .optional ] % optional "self" .field [ .name self .type r % here referencing the record we're defining now .optional ] % another optional filed which references type defined below .field [ % NOTE: if field name and type name are the same, field name may % be omitted .type v .optional ] % required field of type "t" imported from module "mod" .field [ .type mod/t ] % repeated integer field represented using "packed" format in binary % encoding .field [ .name p .type int .repeated .protobuf-packed ] ] ### Variant The *Variant* type, also known as [tagged union](http://en.wikipedia.org/wiki/Tagged_union), specifies a set of *options*. Only one *option* instance can form a variant value at a time. For example, a well-known *enum* type is a simple example of variant type. Options define *name* and *type name* properties in the same manner as fields for the *record type*. The same rules and considerations apply for *option name* and *option type name* as for *field name* and *field type name* (see above). **Examples:** % definition of a variant .variant [ .name v .option [ .name i .type int ] .option [ % NOTE: if option name and option type are the same, field name may % be omitted .type r ] .option [ .type e ] % options may not be associated with any types, such options are similar to % those used in enums .option [ .name flag ] % those used in enums .option [ .name l .type v-list % see below ] ] ### Enum Enum is a degenerated case of the variant type. Enum defines options similarly to variant, but enum options don't have types and can't hold values. **Examples:** .enum [ .name e .option [ .name a ] .option [ .name b ] .option [ .name c ] ] .enum [ .name months .option [ .name jan ] .option [ .name feb ] .option [ .name mar ] % ... ] ### List *List type* represents a list of elements where all elements have the same type. **Examples:** % list of v .list [ % NOTE: "-list" suffix is conventional and not strictly required .name v-list .type v ] % list of built-in type .list [ .name int-list .type int ] .list [ .name int-list-list .type int-list ] ### Alias *Alias* defines an alias for some other user-defined, built-in or imported type. **Examples:** % an alias .alias [ .name a .type v ] % just to give an idea of how it can be used .alias [ .name uuid .type binary ] .alias [ .name epoch-seconds .type uint64 ] In Piqi, aliases are also used to assign static properties for types. For instance, all Piqi integer types other than `int` itself are defined as aliases of the built-in `int` type. For example, this is the definition of `int64`: .alias [ .name int64 .type.int .protobuf-type "sint64" % correspondent Protocol Buffers type .protobuf-wire-type.zigzag-varint % type of binary (wire) encoding ] At the moment, there aren't many properties implemented by Piqi, but the concept itself is very powerful. For example, this is how custom formatting functions could be defined using aliases: .alias [ .name epoch-seconds .type uint64 .format.date-time ] .alias [ .name uuid .type binary .format.uuid ] .alias [ .name sha1sum .type binary .format.sha1 ] Extensions ---------- The extensions mechanism allows to add more components and properties to Piqi entries. Extensions can be applied to user-defined types (including records, variants, enums, lists and aliases), fields, options, functions, function parameters and imports. Each extension can have the following properties: - extension target Extension target specifies which Piqi entry to extend. It is a combination of entry type followed by distinct entry name. This is a full list of supported extension targets: - `.typedef <type name>` - `.field <record name>.<field-name>` - `.option <variant or enum name>.<option-name>` - `.import <import name>` - `.function <function name>` Targets can be specified more than once. In such case, several target entries will be extended using the same extension entries. Target must refer to a locally defined Piqi entry or entries included from other modules via `include`. Extensions of imported definitions are not supported. - actual extension entry Extension entry specifies an object that will be added to the *extended* entry as if it was defined there natively. For example, a *field* definition would be a typical extension entry for *record* type. Similarly, *option* entries would be typically used for extending *enum* or *variant* type. For example, we can add a field to a previously defined record: .record [ .name r .field [ .name i .type int ] ] .extend [ .typedef r .with.field [ .name s .type string ] ] Or we could use extension to add an enum clause: .enum [ .name e .option [ a ] ] .extend [ .typedef e .with.option [ .name b ] ] Extending fields, options or function parameters requires a slightly different target specification: .extend [ .field r.i .with.erlang-name "erlang_i" ] .extend [ .option e.b .with.ocaml-name "ocaml_b" ] In the same manner we can add arbitrary properties to variants, lists, aliases, functions and imports. There is a good example that demonstrates the power of Piqi extensions. The Piqi implementation uses this mechanism to extend its own specification with extra features. For example, the following specification extends Piqi to support Protocol Buffers properties: [piqi.protobuf.piqi](/self-definition/#piqi_protobuf_piqi) Similarly, support for OCaml-specific Piqi properties is provided by these two specifications: [piqi.ocaml.piqi](http://github.com/alavrik/piqi/blob/dev/piqic/piqi.ocaml.piqi), [piqi.ocaml-extensions.piqi](http://github.com/alavrik/piqi/blob/dev/piqic/piqi.ocaml-extensions.piqi) Functions --------- The `function` directive provides a way to define abstract functions. Functions were originally introduced for [Piqi-RPC](/doc/piqi-rpc/) that relies on high-level function definitions. Each defined function has a name and 3 types of parameters: *input*, *output* and *error*, all of which are optional. The *error* parameter is a special type of output parameter. It is assumed that when the function is called, only one of *output* or *error* parameters will be returned. It is possible for a function to not have any input or output parameters at all. Such function represents a named synchronous call where the call is meaningful by itself and no parameters are passed in any direction. Input and output function parameters correspond to an arbitrary (primitive or composite) named Piqi data types. That is, Piqi function takes data structure as input parameter, and returns a data structure as output parameter. Examples: % function with no input and output parameters .function [ .name foo ] % function with input, output and error parameters .function [ .name foo .input int .output some-user-defined-type-name .error string ] For extra convenience, function may define an input, output or error types inline without having to define them separately: % function with a record input parameter and primitive output and error .function [ .name bar .input [ .field [ .type int .optional ] ] .output int .error float ] % function with a record input that has a default value .function [ .name baz .input [ .field.record [ .type int .optional .default 10 ] ] ] % function with a variant input parameter .function [ .name v .output.variant [ .option [ .name i .type int ] .option [ .name f .type float ] ] ] % function with an enum error parameter .function [ .name e .error.enum [ .option [ .name a ] .option [ .name b ] ] ] For each defined *input*, *output* or *error* parameter, a correspondent Piqi alias or a composite type gets implicitly defined. Records, variants, lists and enums are generated for inline parameter definitions, aliases are generated for all other types that are referred by name. In case of *input* parameters, the name of the alias or the user-defined type becomes `<function-name>-input`. Similarly, names for *output* and *error* parameters become `<function-name>-output` and `<function-name>-error` respectively. Piqi-light syntax ----------------- Piqi-light syntax is an experimental lightweight EBNF-like read-only notation for Piqi type definitions. It provides a compact way of displaying type definitions while omitting all non-significant properties that may be present in the original Piqi specification. The original Piqi syntax is based on Piq that is optimized for editing convenience and extensibility. But the same properties that make Piqi/Piq such a great format for editing and representing all the features, also make it substantially verbose and uniform. Both verbosity and uniformity make it harder to consume Piqi for informational purposes. Piqi takes a lot of display space and doesn't provide more prominent syntax for important properties such as field names and types which, in the absence of concrete syntax, get the same visual treatment as other less important language properties. On the other hand, in practice, type definitions are rarely modified once initially written. Therefore it is feasible to have a type definition syntax that is optimized for reading. These considerations lead to the idea that, maybe, it is practical to have two highly expressive syntaxes: one being optimized for reading, and another one -- for writing and extensibility. After having both syntaxes implemented, benefits of such division are becoming more obvious. It would be extremely hard to provide an efficient unified language solution for both of these use-cases, especially considering how different the current Piqi and Piqi-light notations are. There is one very important feature that Piqi-light is missing at the moment. It is hand-written comments from the original Piqi specification. Unfortunately, it will remain this way until Piqi obtains a uniform method of writing documentation sections that can be reliably represented and passed to Piqi-light. `.piqi` files can be printed in Piqi-light syntax using `piqi light` [command](/doc/tools/#piqilight) (for the lack of a better name). For examples of Piqi-light syntax visit [Examples](/examples/) and [Self-definition](/self-definition/) pages. All `.piqi` files there have a tab where they are displayed in Piqi-light syntax. Style guidelines ---------------- ### Type, field and option names Although Piqi doesn't enforce certain naming style, it is recommended to use lowercase identifiers instead of "CamelCase"-style identifiers. This way they are more readable and will retain readability while being combined with some future Piqi features. The guiding principle for this rule is that high-level Piqi type definitions should resemble grammar rules. Piqi pretty-printer from [Piqi tools](/doc/tools/) can be used to convert "CamelCase" identifiers to "camel-case" (`piqi pp --normalize <.piqi> file` command). ### Names for `list` type It is recommended to name `list` types by appending `-list` suffix to the original type name. For example, if we wanted to define a list of type `t`, we would name the type `t-list`. Using `*-list` names for non-list types should be avoided. One of possible Piqi future features can rely on that: piqi would recognize `*-list` type names as list types automatically removing the need for defining `list` types manually. ### Naming of `.piqi` files for naming `.piqi` files, it is better use lowercase and `_` as word separator. As with identifiers, the choice of this convention is determined by the fact that is is more universal and popular among various programming languages (and URLs!) than "MixedCase" naming schemes. ### A note about directory paths It is typical for `.piqi` modules to be located in nested directory hierarchies. When this is the case, directory paths become parts of module names. For example, if a Piqi module `bar.piqi` is defined inside directory `foo`, other modules may refer to it as `foo/bar`. Piqi doesn't impose any restriction on how directories should be named. However, future normalization schemes will likely automatically turn directory names to lowercase with `-` being a word separators. Considering future normalization, it is recommenced to name directories using lowercase characters with `-` character as a word separator. This way directory name normalization won't be needed. ### Code formatting Since Piqi is based on Piq syntax, general [Piq](/doc/piq/#styleguidelines) formatting rules apply. Miscellaneous Design Notes -------------------------- - For the sake of better readability and portability Piqi doesn't support nested definitions. - As you may noticed, Piqi type definitions are strictly monomorphic. As with nested definitions, this design decision was driven by portability and simplicity of the Piqi language and its potential mappings. There are many programming languages that don't support parametric polymorphism. On the other hand, the world of practical protocols and portable data is surprisingly monomorphic (with sequences being the only exception). This, in turn, means that the absence of polymorphism at the data definition level is unlikely to ever become a serious practical limitation.
s3team/loop
libtracewrap/libtrace/piqi/piqi/doc/piqi.md
Markdown
mit
32,776
import React from 'react'; import createSvgIcon from './utils/createSvgIcon'; export default createSvgIcon( <g><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z" /></g> , 'InsertLink');
cherniavskii/material-ui
packages/material-ui-icons/src/InsertLink.js
JavaScript
mit
360
<?php namespace Madrasse\AdminBundle\DependencyInjection; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; /** * This is the class that validates and merges configuration from your app/config files * * To learn more see {@link http://symfony.com/doc/current/cookbook/bundles/extension.html#cookbook-bundles-extension-config-class} */ class Configuration implements ConfigurationInterface { /** * {@inheritDoc} */ public function getConfigTreeBuilder() { $treeBuilder = new TreeBuilder(); $rootNode = $treeBuilder->root('madrasse_admin'); // Here you should define the parameters that are allowed to // configure your bundle. See the documentation linked above for // more information on that topic. return $treeBuilder; } }
fardus/madrasse-gestion
src/Madrasse/AdminBundle/DependencyInjection/Configuration.php
PHP
mit
883
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>paco: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.14.0 / paco - 2.0.3</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> paco <small> 2.0.3 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2021-11-01 16:42:58 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-11-01 16:42: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 8.14.0 Formal proof management system dune 2.9.1 Fast, portable, and opinionated build system ocaml 4.12.0 The OCaml compiler (virtual package) ocaml-base-compiler 4.12.0 Official release 4.12.0 ocaml-config 2 OCaml Switch Configuration ocaml-options-vanilla 1 Ensure that OCaml is compiled with no special options enabled 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;paco@sf.snu.ac.kr&quot; version: &quot;2.0.3&quot; homepage: &quot;https://github.com/snu-sf/paco/&quot; dev-repo: &quot;git+https://github.com/snu-sf/paco.git&quot; bug-reports: &quot;https://github.com/snu-sf/paco/issues/&quot; authors: [ &quot;Chung-Kil Hur &lt;gil.hur@sf.snu.ac.kr&gt;&quot; &quot;Georg Neis &lt;neis@mpi-sws.org&gt;&quot; &quot;Derek Dreyer &lt;dreyer@mpi-sws.org&gt;&quot; &quot;Viktor Vafeiadis &lt;viktor@mpi-sws.org&gt;&quot; ] license: &quot;BSD-3&quot; build: [ [make &quot;-C&quot; &quot;src&quot; &quot;all&quot; &quot;-j%{jobs}%&quot;] ] install: [ [make &quot;-C&quot; &quot;src&quot; &quot;-f&quot; &quot;Makefile.coq&quot; &quot;install&quot;] ] remove: [&quot;rm&quot; &quot;-r&quot; &quot;-f&quot; &quot;%{lib}%/coq/user-contrib/Paco&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.6&quot; &amp; &lt; &quot;8.10&quot;} ] synopsis: &quot;Coq library implementing parameterized coinduction&quot; tags: [ &quot;date:2018-02-11&quot; &quot;category:Computer Science/Programming Languages/Formal Definitions and Theory&quot; &quot;category:Mathematics/Logic&quot; &quot;keyword:co-induction&quot; &quot;keyword:simulation&quot; &quot;keyword:parameterized greatest fixed point&quot; ] flags: light-uninstall url { src: &quot;https://github.com/snu-sf/paco/archive/v2.0.3.tar.gz&quot; checksum: &quot;md5=30705f61294a229215149a024060f06d&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-paco.2.0.3 coq.8.14.0</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.14.0). The following dependencies couldn&#39;t be met: - coq-paco -&gt; coq &lt; 8.10 -&gt; ocaml &lt; 4.10 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-paco.2.0.3</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.12.0-2.0.8/released/8.14.0/paco/2.0.3.html
HTML
mit
7,271
<?php /* * This file is part of PHP CS Fixer. * * (c) Fabien Potencier <fabien@symfony.com> * Dariusz Rumiński <dariusz.ruminski@gmail.com> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace PhpCsFixer\Fixer\Phpdoc; use PhpCsFixer\AbstractProxyFixer; /** * @author Graham Campbell <graham@alt-three.com> * @author Dariusz Rumiński <dariusz.ruminski@gmail.com> */ final class PhpdocNoAccessFixer extends AbstractProxyFixer { /** * {@inheritdoc} */ public function getDescription() { return '@access annotations should be omitted from phpdocs.'; } /** * {@inheritdoc} */ protected function createProxyFixer() { $fixer = new GeneralPhpdocAnnotationRemoveFixer(); $fixer->configure(array('access')); return $fixer; } }
julienfalque/PHP-CS-Fixer
src/Fixer/Phpdoc/PhpdocNoAccessFixer.php
PHP
mit
896
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Capercali.Entities { public class Runner : IEntity { public long Id { get; set; } public string FirstName { get; set; } public string LastName { get; set; } public int SiNumber { get; set; } public string Club { get; set; } public string Adress { get; set; } public string PLZ { get; set; } public string Location { get; set; } public string Email { get; set; } } }
yannisgu/capercali
src/Capercali.Entities/Runner.cs
C#
mit
633
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Globalization; using System.Web.Mvc; namespace WMATC.Models { public class Player { [Required] [Key] public int PlayerId { get; set; } public string Name { get; set; } public int? FactionId { get; set; } [ForeignKey("FactionId")] public virtual Faction Faction { get; set; } public string Caster1 { get; set; } [AllowHtml] public string List1 { get; set; } public string Theme1 { get; set; } public string Caster2 { get; set; } [AllowHtml] public string List2 { get; set; } public string Theme2 { get; set; } public int TeamId { get; set; } [ForeignKey("TeamId")] public Team Team { get; set; } } }
ThatRickGuy/WMATC
WMATC/Models/Player.cs
C#
mit
953
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_112-google-v7) on Fri Jul 21 13:02:30 PDT 2017 --> <title>MavenManifestFactory</title> <meta name="date" content="2017-07-21"> <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> <script type="text/javascript" src="../../../script.js"></script> </head> <body> <script type="text/javascript"><!-- try { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="MavenManifestFactory"; } } catch(err) { } //--> var methods = {"i0":10,"i1":10}; var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; var altColor = "altColor"; var rowColor = "rowColor"; var tableTab = "tableTab"; var activeTableTab = "activeTableTab"; </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <div class="topNav"><a name="navbar.top"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.top.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/robolectric/internal/ManifestIdentifier.html" title="class in org.robolectric.internal"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../org/robolectric/internal/ParallelUniverseInterface.html" title="interface in org.robolectric.internal"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/robolectric/internal/MavenManifestFactory.html" target="_top">Frames</a></li> <li><a href="MavenManifestFactory.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">org.robolectric.internal</div> <h2 title="Class MavenManifestFactory" class="title">Class MavenManifestFactory</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>org.robolectric.internal.MavenManifestFactory</li> </ul> </li> </ul> <div class="description"> <ul class="blockList"> <li class="blockList"> <dl> <dt>All Implemented Interfaces:</dt> <dd><a href="../../../org/robolectric/internal/ManifestFactory.html" title="interface in org.robolectric.internal">ManifestFactory</a></dd> </dl> <hr> <br> <pre>public class <span class="typeNameLabel">MavenManifestFactory</span> extends java.lang.Object implements <a href="../../../org/robolectric/internal/ManifestFactory.html" title="interface in org.robolectric.internal">ManifestFactory</a></pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.summary"> <!-- --> </a> <h3>Constructor Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation"> <caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Constructor and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../../org/robolectric/internal/MavenManifestFactory.html#MavenManifestFactory--">MavenManifestFactory</a></span>()</code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="method.summary"> <!-- --> </a> <h3>Method Summary</h3> <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption> <tr> <th class="colFirst" scope="col">Modifier and Type</th> <th class="colLast" scope="col">Method and Description</th> </tr> <tr id="i0" class="altColor"> <td class="colFirst"><code><a href="../../../org/robolectric/manifest/AndroidManifest.html" title="class in org.robolectric.manifest">AndroidManifest</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/internal/MavenManifestFactory.html#create-org.robolectric.internal.ManifestIdentifier-">create</a></span>(<a href="../../../org/robolectric/internal/ManifestIdentifier.html" title="class in org.robolectric.internal">ManifestIdentifier</a>&nbsp;manifestIdentifier)</code>&nbsp;</td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code><a href="../../../org/robolectric/internal/ManifestIdentifier.html" title="class in org.robolectric.internal">ManifestIdentifier</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../../org/robolectric/internal/MavenManifestFactory.html#identify-org.robolectric.annotation.Config-">identify</a></span>(<a href="../../../org/robolectric/annotation/Config.html" title="annotation in org.robolectric.annotation">Config</a>&nbsp;config)</code>&nbsp;</td> </tr> </table> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Object</h3> <code>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li> </ul> </li> </ul> </li> </ul> </div> <div class="details"> <ul class="blockList"> <li class="blockList"> <!-- ========= CONSTRUCTOR DETAIL ======== --> <ul class="blockList"> <li class="blockList"><a name="constructor.detail"> <!-- --> </a> <h3>Constructor Detail</h3> <a name="MavenManifestFactory--"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>MavenManifestFactory</h4> <pre>public&nbsp;MavenManifestFactory()</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <ul class="blockList"> <li class="blockList"><a name="method.detail"> <!-- --> </a> <h3>Method Detail</h3> <a name="identify-org.robolectric.annotation.Config-"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>identify</h4> <pre>public&nbsp;<a href="../../../org/robolectric/internal/ManifestIdentifier.html" title="class in org.robolectric.internal">ManifestIdentifier</a>&nbsp;identify(<a href="../../../org/robolectric/annotation/Config.html" title="annotation in org.robolectric.annotation">Config</a>&nbsp;config)</pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../org/robolectric/internal/ManifestFactory.html#identify-org.robolectric.annotation.Config-">identify</a></code>&nbsp;in interface&nbsp;<code><a href="../../../org/robolectric/internal/ManifestFactory.html" title="interface in org.robolectric.internal">ManifestFactory</a></code></dd> </dl> </li> </ul> <a name="create-org.robolectric.internal.ManifestIdentifier-"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>create</h4> <pre>public&nbsp;<a href="../../../org/robolectric/manifest/AndroidManifest.html" title="class in org.robolectric.manifest">AndroidManifest</a>&nbsp;create(<a href="../../../org/robolectric/internal/ManifestIdentifier.html" title="class in org.robolectric.internal">ManifestIdentifier</a>&nbsp;manifestIdentifier)</pre> <dl> <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> <dd><code><a href="../../../org/robolectric/internal/ManifestFactory.html#create-org.robolectric.internal.ManifestIdentifier-">create</a></code>&nbsp;in interface&nbsp;<code><a href="../../../org/robolectric/internal/ManifestFactory.html" title="interface in org.robolectric.internal">ManifestFactory</a></code></dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar.bottom"> <!-- --> </a> <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> <a name="navbar.bottom.firstrow"> <!-- --> </a> <ul class="navList" title="Navigation"> <li><a href="../../../overview-summary.html">Overview</a></li> <li><a href="package-summary.html">Package</a></li> <li class="navBarCell1Rev">Class</li> <li><a href="package-tree.html">Tree</a></li> <li><a href="../../../deprecated-list.html">Deprecated</a></li> <li><a href="../../../index-all.html">Index</a></li> <li><a href="../../../help-doc.html">Help</a></li> </ul> <div class="aboutLanguage"><script type="text/javascript" src="../../../highlight.pack.js"></script> <script type="text/javascript"><!-- hljs.initHighlightingOnLoad(); //--></script></div> </div> <div class="subNav"> <ul class="navList"> <li><a href="../../../org/robolectric/internal/ManifestIdentifier.html" title="class in org.robolectric.internal"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../../org/robolectric/internal/ParallelUniverseInterface.html" title="interface in org.robolectric.internal"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../../index.html?org/robolectric/internal/MavenManifestFactory.html" target="_top">Frames</a></li> <li><a href="MavenManifestFactory.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
robolectric/robolectric.github.io
javadoc/3.4/org/robolectric/internal/MavenManifestFactory.html
HTML
mit
12,041
from random import randint from django.conf import settings from django.contrib.auth.models import User from django.db import models, connection from django.db.models.aggregates import Avg, Max from polymorphic.models import PolymorphicModel from solo.models import SingletonModel class Judge(PolymorphicModel): name = models.CharField(max_length=30) def __str__(self): return self.name class HumanJudge(Judge): user = models.OneToOneField(to=User, related_name='judge', null=True, default=None) class AutomatedJudge(Judge): ip_address = models.GenericIPAddressField(unique=True) port = models.PositiveIntegerField(default=settings.DEFAULT_JUDGE_PORT) @classmethod def get_random_judge(cls): count = cls.objects.count() random_index = randint(0, count-1) return cls.objects.all()[random_index] class JudgeRequest(models.Model): time = models.DateTimeField(auto_now_add=True) is_closed = models.BooleanField(default=False) feature = models.ForeignKey(to='features.Feature', related_name='judge_requests') team = models.ForeignKey(to='teams.Team', related_name='judge_requests') def __str__(self): return '{} for {}'.format(str(self.team), str(self.feature)) @property def assignee1(self): return self.assignees.first() or None @property def assignee2(self): if self.assignees.count() < 2: return None return self.assignees.last() or None @property def judge1_score(self): return getattr(self.assignee1, 'score', '--') @property def judge2_score(self): return getattr(self.assignee2, 'score', '--') @property def score(self): return self.assignees.aggregate(score=Avg('score'))['score'] or 0 @property def message(self): assignee = self.assignees.first() if not assignee: return "" return str(assignee.message) @property def is_passed(self): if connection.vendor == 'postgresql': from django.contrib.postgres.aggregates import BoolOr agg = BoolOr else: agg = Max return self.assignees.aggregate(is_passed=agg('is_passed'))['is_passed'] or False class JudgeRequestAssignment(models.Model): judge = models.ForeignKey(to=Judge, related_name='assignments') score = models.FloatField(null=True, blank=True) is_passed = models.BooleanField(default=False) judge_request = models.ForeignKey(to=JudgeRequest, related_name='assignees') message = models.TextField(null=True, blank=True) def __str__(self): return '{} assigned to {} with score {}'.format(str(self.judge), str(self.judge_request), str(self.score)) class Config(SingletonModel): day = models.IntegerField(default=1) is_frozen = models.BooleanField(default=False) frozen_scoreboard = models.TextField(default="", blank=True) assign_to_automated_judge = models.BooleanField(default=True) timeout_minutes = models.PositiveIntegerField(default=10)
Kianoosh76/webelopers-scoreboard
jury/models.py
Python
mit
3,183
# Behavioral cloning Teaching Self driving car how to steer in a simulator ## Deriving and designing model An abstraction of pipeline is created in the model.py This allowed me to quickly switch between different architectures. Initially, I tried Nvidia's model: https://images.nvidia.com/content/tegra/automotive/images/2016/solutions/pdf/end-to-end-dl-using-px.pdf with my own recorded data from the keyboard simulator, but it did not produce smooth angles, which led to many 0 zero data points, which in turn led to the neural network getting stuck in a local optima and predicing a constant angle. I tried desperately to avoid this stucking using Dropout and L2 regularization, but of course this did not help, because the problem was in the data. At this point, I also tried VGG16, Comma.ai's model, and my own model based on Comma.ai, but none of them really worked, again because of the data. I then switched to Udacity's data, and although most models performed slightly better, thy were still very far from satisfactory. I then generated additional data using my own ideas and blog posts I found online. The additional images that are getting generated are with augmented brightness or with added shadow. The data augmentation technique I used is taken from here: https://chatbotslife.com/using-augmentation-to-mimic-human-driving-496b569760a9#.xneaoqiwj This improved the behaviour, but was still unsufficient. I then tried lowering the size of the input image, to speed up the computations, as well as adding pooling layers in the feature extraction part of the network. I then recorded data intentionally with mostly images of recovery, about 11000 of them and finetuned Nvidia's model on them. It made a significant improvement in both validation accuracy and the overall behavior of the model. After adding dropout, the model was able to navigate safely through the track. ## Model architecture The final model takes a 64x64x3 input image, performs normalization on it, and then has 2 convolutional layers with 5x5 convolution with 2x2 subsampling, then 3 convolutional layers with 3x3 filter size, then fully connected part, in which we have Dropout. ![Final model](model.png "The final model") ## Training dataset I used my own recorded recover data, to teach the model how to recover when he does wrong, as well as Udacity's data. The recovery data consists of different situations when the car did not position itself in the center, and then comes back. The model was trained with Adam as optimizer, with default learning rate and mean squared error. I also recorded a separate validation dataset, which consisted of one full lap on the track. Images with augmentated brightness and random shadows were generated in the training data generator on the fly. ![Recover](example_recover.jpg "-0.1") ![Recover](example_recover2.jpg "-0.6667")
hristo-vrigazov/behavioral-cloning
README.md
Markdown
mit
2,880
--- layout: post title: "superset开发自定义视图" subtitle: "so hard...or so easy..." date: 2017-07-31 author: "diggzhang" header-img: "img/post-bg-unix-linux.jpg" category: superset tags: - superset --- ## 问题 superset部署好后,我们希望增加一个自定义的视图进去,很明显找不到一个教程去讲这块,官方提供了一个`example issue`: > Q: How do I go about developing a new visualization type? > A: Here’s an example as a Github PR with comments that describe what the different sections of the code do: https://github.com/airbnb/superset/pull/3013 该PR最终实现是`New chart type : Chord Diagrams`,一共修改了8个文件,且每个修改都有针对开发者的commented,只能死扣着这个PR了。八个文件分别是: 1. superset/assets/images/viz_thumbnails/chord.png 2. superset/assets/javascripts/explore/stores/controls.jsx 3. superset/assets/javascripts/explore/stores/visTypes.js 4. superset/assets/package.json 5. superset/assets/visualizations/chord.css 6. superset/assets/visualizations/chord.jsx 7. superset/assets/visualizations/main.js 8. superset/viz.py 从目录上区分`8号`文件肯定是后端handle视图的类,其余7个文件均为前端修改部分。前端部分可以刨去`chord.png`和`package.json`,一个缩略图,然后另一个是添加了`react-alert`依赖。排除干扰因素以后,前端需要研究的是两个部分: 1. `superset/assets/javascripts/explore/stores/*` 2个文件 2. `superset/assets/visualizations/*` 3个文件 ## 原example issue解读 ### controls.jsx `superset/assets/javascripts/explore/stores/controls.jsx` > This file (`controls.jsx`) holds configuration for a "pool" of controls that can be used across visualizations. When creating a new visualization, you'll want to reuse controls that already exist. If the exact control that you need doesn't exist already, you'll want to create it here. > **Note** that type references controls React components defined in `javascripts/explore/component/controls/`. > Also note that controls can be dynamic with `mapStateToProps`, allowing to map anything from the app's state into a prop for the component. This allows in this case to get configuration elements proper to the datasource in this case, but can also be used to change a control based on another control's value. 阅读该comment可以获取的信息是: - `controls.jsx`负责配置一堆针对视图的`controls` - 牵扯到React知识 ### visTypes.js `superset/assets/javascripts/explore/stores/visTypes.js` > This file contains configuration of the new chord viz type. It defines the panels of controls that should render on the left panel of the explore view. > `controlSetRows` references controls defined in controls.jsx, and can have one or two items and that defines how many items will render on that row. > `controlOverrides` allows you to override the control configuration coming from `controls.jsx`. By reusing the same control across visualizations we allow continuity in the sense that the values are carried over when going from a viz type to the next. For instance as you go from one viz type to the next, it's nice to have metrics carried over, though you might want a slightly different label or tooltip in the different contexts, this is what the overrides are for. 阅读该comment可以获取的信息是: - 该文件定义了控制面板应该如何渲染view - `controlSetRows`跟刚刚的`controls.jsx`关联,可以看出到底有哪些行要渲染 - `controlOverrides`用来覆盖`controls.jsx`传来的参数 ### chord.jsx `superset/assets/visualizations/chord.jsx/css` > This function is the heart of this new visualization, the framework will pass it a `slice` and `json` object, and expects you to mutate the dom element referenced in the slice object. It will be called whenever the slice needs to be rendered or re-rendered. Knowing that this function may be called many times, you can use closures here if you want to persists certain things in the module namespace. > The json objects corresponds to the data returned from running your query and related context. To see exactly what you should expect in here you can click the json button in the explore view. > The slice object contains, amongst other things, a reference to the dom element that you should mutate. > `json.data` corresponds exactly to what is returned in the backend `ChordViz.get_data` lower in this PR > On of the things that the slice object exposes isf the information provided by the user controls. The keys of this `slice.formData` object are the control's "id" defined in `controls.jsx` and their values are the ones provided by the user. > The slice object exposes `width()` and `height()` methods that can be useful while rendering your chart. > that function should be exported as the default export for the visualization module 阅读该comment可以获取的信息是: - 敲黑板,核心文件就这个。 - slice这个概念就是我们创建出的新视图呈现在看板上的地方 - superset框架会传 `slice` 和 `json`两个参数到这里来,关联到要渲染的dom - 在`slice`加载和重载的时候都是调用这里 - `json.data`负责接收了后端来的数据`ChordViz.get_data` - `slice.formData`对应着`controls.jsx`里的id - 该`slice`在重渲染的时候预读了一个宽搞值 ### main.js `superset/assets/visualizations/main.js` > simply adding the mapping from the chord visualization type to the appropriate javascript modules. It's possible here to have multiple visualization types target the same module (look at nvd3.js!) 阅读该comment可以获取的信息是: - 在`main.js`里注册刚刚创建的新视图 ### viz.py `superset/viz.py` > This is the backend part of this component, you can derive `BaseViz` or other `BaseViz derivatives` > You need to override `query_obj` and it has to return a query object, which is essentially a Python dict with key/values that are expected by the query method of the connectors. Until this is better documented, you can look at the connector's Datasource query method to get a sense for it. > `get_data` receives a pandas dataframe (df) that correspond to what is returned when applying your query object defined above. The shape of that dataframe is related to what you ask for in that query_obj. > Now whatever get_data returns needs to be json-serializable, and will be made available to the javascript visualization function as payload.data. 阅读该comment可以获取的信息是: - 默认读懂viz.py基本可以搞清楚从后端返回了什么数据,前端逻辑再多也是针对返回的源数据做处理 - 所有视图的基类都是`BaseViz` - 自建的视图处理函数会重写`query_obj`并返回一个object对象 - `get_data`会接收一个pandas的`dataframe`数据格式,至于`dataframe`到底哪些数据内容取决于`query_obj` - 最终由`get_data`返回的对象在前端做json序列化操作后使用 ## 阅读example issue可以习得(猜想)什么 ### 0. `superset/assets/images/viz_thumbnails/` 在`viz_thumbnails`里提供待创建视图的预览图。未来如果自定义了视图,前端提供的预览是从这里取图。 ### 1. `superset/assets/javascripts/explore/stores/` 这里面牵扯到的两个文件`visTypes.js`和`controls.js`,未来如果自定义视图会应用到一些公共配置,这些配置可能是由`controls.js`提供,该文件提供的配置都是跨视图通用的。而`vizTypes.js`承接了精细到视图级别的配置,打开该文件一共有三部分`sectionsToRender/sections/vizTypes`,重点在`vizTypes`中,已有的视图都在这里注册,如果希望新加视图,也从这里添加配置。 ### 2. `superset/assets/visualizations/` 自定义视图的核心部分,从这里创建视图的js或jsx文件,打开文件夹看到的都是视图的具体实现,我们看到的最终渲染效果都是从这里出来的。如果希望做`superset`的二次开发,说白了也就是在这里多加一些自定义的视图文件,这里牵扯到的技术栈主要是以`react/d3/jQuery`三个块为主。这里我姑且先这么理解:新加一个视图,说白也就是这里新引入一个`d3`的视图,然后用`react`做封装方便数据交互,再用`jQuery`修修补补。 在创建了自定义的视图后,最终需要在该目录下的`main.js`注册到`vizMap`参数中,形式是`key: require('自定义视图.js')`,这里的`key`将对应到后端类中的`viz_type`: ```javascript /* eslint-disable global-require */ const vizMap = { area: require('./nvd3_vis.js'), bar: require('./nvd3_vis.js'), ...... }; export default vizMap; ``` ### 3. `superset/viz.py` 最后,无论自定义了怎样的视图,都需要后端提供已经格式化的数据,数据的返回取决于`get_data()`函数,而返回格式取决于前端数据视图渲染所需的格式。所有的自定义视图类,都是基于`BaseViz`,必须定制的部分是: ```python viz_type = "" #用于指明是哪种视图 query_obj #用于查询数据 get_data #用于返回数据 ``` ## CODE 搞起来。直接复制粘贴一个`pivot table`测试是否能验证猜想。虽然是照抄,但也算是开发自定义视图了,变的地方就是给重起个名字叫`privot table plus`。 ### 0. 创建预览图 直接cp一个 ```shell $ cd $SUPERSET_HOME/superset/assets/images/viz_thumbnails $ cp pivot_table.png pivot_table_plus.png ``` ### 1. 添加视图配置 ```shell $ cd $SUPERSET_HOME/superset/assets/javascripts/explore/stores/ $ # 在这里对控制整体的`controls.js`没需求,只在`visTypes.js`里面添加我们自己的视图配置 $ vim visTypes.js ``` 找到`pivot_table`部分的代码,照抄并改名: ```javascript pivot_table: { label: 'Pivot Table', controlPanelSections: [ { label: null, controlSetRows: [ ['groupby', 'columns'], ['metrics', 'pandas_aggfunc'], ['number_format'], ], }, ], }, pivot_table_plus: { label: 'Pivot Table Plus', controlPanelSections: [ { label: null, controlSetRows: [ ['groupby', 'columns'], ['metrics', 'pandas_aggfunc'], ['number_format'], ], }, ], }, ``` ### 2. 增加自定义的视图文件 直接cp一个并改名字,就当你自己写的了: ```shell $ cd $SUPERSET_HOME/superset/assets/visualizations $ cp pivot_table.js pivot_table_plus.js ``` 然后将你“写”好的`pivot_table_plus.js`注册到`main.js`中: ```shell $ cd $SUPERSET_HOME/superset/assets/visualizations $ vim main.js ``` 找到原来的`pivot_table`再照抄一下,修改如下: ```javascript pivot_table: require('./pivot_table.js'), pivot_table_plus: require('./pivot_table_plus.js'), ``` 前端部分我们至此完工,创建一个自定义视图叫`pivot_table_plus`,接下来就是写对应的后端部分。 ### 3. 后端`viz.py` ```shell $ vim $SUPERSET_HOME/superset/viz.py ``` 找到`class PivotTableViz(BaseViz)`把整个类都照抄一下: ```python class PivotTableVizPlus(BaseViz): viz_type = "pivot_table_plus" # 这里对应到前端的main.js verbose_name = _("Pivot Table Plus") credits = 'a <a href="https://github.com/airbnb/superset">Superset</a> original' is_timeseries = False def query_obj(self): ....... def get_data(self, df): ....... ``` 创建好自定义类后,还需到`viz.py`最底部的`viz_types_list`中将自定义类注册进去: ```python viz_types_list = [ TableViz, PivotTableViz, PivotTableVizPlus, ...... ``` 至此大工告成,如果没问题,就可以在`superset`中看到这个所谓的自定义开发的视图了。
diggzhang/diggzhang.github.io
_posts/2017-07-31-superset-developing-new-visiualization.md
Markdown
mit
11,893
/* * LCADeviceRoomba * * MIT License * * Copyright (c) 2016 * * Geoffrey Mastenbroek, geoffrey.mastenbroek@student.hu.nl * Feiko Wielsma, feiko.wielsma@student.hu.nl * Robbin van den Berg, robbin.vandenberg@student.hu.nl * Arnoud den Haring, arnoud.denharing@student.hu.nl * * 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. * */ package com.maschel.lcadevice.roomba.Simulator; import com.maschel.lca.lcadevice.device.Component; import com.maschel.lca.lcadevice.device.Device; import com.maschel.lca.lcadevice.device.actuator.Actuator; import com.maschel.lca.lcadevice.device.sensor.Sensor; import com.maschel.lcadevice.roomba.Arguments; import com.maschel.roomba.RoombaJSSC; import com.maschel.roomba.RoombaJSSCSerial; import com.maschel.roomba.song.RoombaNote; import com.maschel.roomba.song.RoombaNoteDuration; import com.maschel.roomba.song.RoombaSongNote; /* * RoombaDeviceSimulator class * Simulator class that simulates the Roomba device, by generating random values for the sensors/actuators. * Used to hold all the manufacturer implementations of reading the sensors and actuating actuators. * All the Components, Sensors and Actuators are created and added to the rootComponend in the setup() method. */ public class RoombaDeviceSimulator extends Device { private static final RandomGenerator rg = new RandomGenerator(); private static String ID = ""; private static final int SENSOR_UPDATE_INTERVAL = 50; public RoombaDeviceSimulator() { super(ID, SENSOR_UPDATE_INTERVAL); } public void setup() { // Generate random device id ID = rg.nextSessionId(); /* * We use a hierarchical Component model here. * 'roomba' is the main Component, which has a few subcomponents ('motors' and 'battery') * Many basic functions like 'startup' or 'clean' are under the 'roomba' component. * The 'motors' component has different Components under it which represent the different motors of the Roomba. * It also has the 'drive' Actuator directly under it. * */ Component roombaComponent = new Component("roomba"); addComponent(roombaComponent); Component motorsComponent = new Component("motors"); roombaComponent.add(motorsComponent); Component leftMotorComponent = new Component("leftMotorWheel"); Component rightMotorComponent = new Component("rightMotorWheel"); Component mainBrushComponent = new Component("mainBrushMotor"); Component sideBrushComponent = new Component("sideBrushMotor"); roombaComponent.add(leftMotorComponent); roombaComponent.add(rightMotorComponent); roombaComponent.add(mainBrushComponent); roombaComponent.add(sideBrushComponent); Component batteryComponent = new Component("battery"); roombaComponent.add(new Actuator<Void>("clean") { public void actuate(Void args) throws IllegalArgumentException { return; } }); roombaComponent.add(new Actuator<Void>("cleanMax") { public void actuate(Void args) throws IllegalArgumentException { return; } }); roombaComponent.add(new Actuator<Void>("cleanSpot") { public void actuate(Void args) throws IllegalArgumentException { return; } }); roombaComponent.add(new Actuator<Void>("seekDock") { public void actuate(Void args) throws IllegalArgumentException { return; } }); roombaComponent.add(new Actuator<Void>("startup") { public void actuate(Void args) throws IllegalArgumentException { return; } }); roombaComponent.add(new Actuator<Void>("powerOff") { public void actuate(Void args) throws IllegalArgumentException { return; } }); roombaComponent.add(new Actuator<String>("digitLedsAscii") { public void actuate(String args) throws IllegalArgumentException { if(args.length() != 4) { throw new IllegalArgumentException(); } return; } }); roombaComponent.add(new Actuator<String>("playMusic") { public void actuate(String args) throws IllegalArgumentException { return; } }); // Motors motorsComponent.add(new Actuator<Arguments.DriveArguments>("drive") { @Override public void actuate(Arguments.DriveArguments driveArguments) throws IllegalArgumentException { return; } }); motorsComponent.add(new Sensor("distanceTraveled", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(-32768, 32767); } }); leftMotorComponent.add(new Sensor("motorCurrentLeft", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(-32768, 32767); } }); rightMotorComponent.add(new Sensor("motorCurrentRight", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(-32768, 32767); } }); mainBrushComponent.add(new Sensor("motorCurrentMainBrush", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(-32768, 32767); } }); sideBrushComponent.add(new Sensor("motorCurrentSideBrush", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(-32768, 32767); } }); //BatteryComponent batteryComponent.add(new Sensor("chargingState", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(0, 5); } }); batteryComponent.add(new Sensor("batteryVoltage", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(0, 65535); } }); batteryComponent.add(new Sensor("batteryCurrent", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(-32768, 32768) + 1; } }); batteryComponent.add(new Sensor("batteryTemperature", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(-128, 127); } }); batteryComponent.add(new Sensor("batteryCharge", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(0, 65535); } }); batteryComponent.add(new Sensor("batteryCapacity", SENSOR_UPDATE_INTERVAL) { @Override public Integer readSensor() { return rg.randomInteger(0, 65535); } }); roombaComponent.add(batteryComponent); } public void connect() { return; } public void update() { return; } public Boolean deviceReadyForAnalyticDataSync() { return null; } public void disconnect() { return; } }
maschel/LCADeviceRoomba
src/main/java/com/maschel/lcadevice/roomba/Simulator/RoombaDeviceSimulator.java
Java
mit
8,709
// // RCDGroupTableViewCell.h // RCloudMessage // // Created by 杜立召 on 15/3/19. // Copyright (c) 2015年 RongCloud. All rights reserved. // #import <UIKit/UIKit.h> @class RCDGroupInfo; @interface RCDGroupTableViewCell : UITableViewCell /** * * @return cell高度 */ + (CGFloat)cellHeight; /** * 给控件填充数据 * * @param group 设置群组模型 */ - (void)setModel:(RCDGroupInfo *)group; @property(nonatomic, copy) NSString *groupID; /** * 群组名称label */ @property(nonatomic, strong) UILabel *lblGroupName; /** * 群组头像 */ @property(nonatomic, strong) UIImageView *imvGroupPort; /** * 群组id的label */ @property(nonatomic, strong) UILabel *lblGroupId; @end
sunknight/sealtalk-ios
ios-rongimdemo/RCloudMessage/RCDGroupTableViewCell.h
C
mit
718
#pragma once #ifndef LINE_HPP #define LINE_HPP #include <initializer_list> #include <map> #include <string> #include <vector> #include "route.hpp" using RouteName = std::string; using RouteNames = std::vector<RouteName>; using StepsByRoute = std::pair<RouteName, Steps>; using StepsRoutes = std::vector<StepsByRoute>; class Line { public: Route& addRoute(const std::string& rstr) { return routes_[rstr]; } void removeRoute(const std::string& rstr) { routes_.erase(routes_.find(rstr)); } RouteNames getRouteNames() const { return getKeyVector(routes_); } std::string getPlatform(const RouteName& routen, const Stop& stop) const { return routes_.at(routen).getPlatform(stop); } StopSet getStopSet() const; StepsRoutes getForwardStepsRoutes() const; StepsRoutes getBackwardStepsRoutes() const; TimeLine getStopTimes(Day day, const RouteName& routen, const Stop& stop) const { return routes_.at(routen).getStopTimes(day, stop); } TimeLine getStopTimes(Day day, const Stop& stop) const; Time getArriveTime(Day day, const RouteName& routen, const Stop& from, Time leave, const Stop& to) const { return routes_.at(routen).getArriveTime(day, from, leave, to); } std::string getRouteDescription(const RouteName& routen) const { return routes_.at(routen).description(); } private: std::map<RouteName, Route> routes_; }; #endif // LINE_HPP
gonmator/busplan
busplan/line.hpp
C++
mit
1,470
// // SLAFServiceProperty.h // Pods // // Created by sunbeam on 2016/12/22. // // #ifndef SLAFServiceProperty_h #define SLAFServiceProperty_h // API请求类型 typedef enum : NSUInteger { GET = 0, // get POST = 1, // post DOWNLOAD = 2, // 下载 UPLOAD = 3, // 上传 } SLAF_REQUEST_METHOD; // error domain #define SLAF_ERROR_DOMAIN @"slaf_error_domain" // 网络请求系统错误 typedef enum : NSUInteger { NETWORK_TIMEOUT_ERROR = -1, // 网络请求超时 "network request is timeout" BAD_SERVER_RESPONSE_ERROR = -2, // 服务器响应有误 "server response is error" NETWORK_NOT_REACHABLE_ERROR = -3, // 网络不可达 "network is not reachable" REQUEST_RUNING_ERROR = -4, // 当前正在进行网络请求 "network request is busy" REQUEST_METHOD_NOT_SUPPORT = -5, // 当前请求方法不支持 "request method not support" } SLAF_NETWORK_SYSTEM_ERROR; // 请求超时默认设置 #define SLAFRequestTimeoutInterval 10.0f // 设置NSMutableURLRequest header中参数,例如版本号APIVersion,系统默认的 "Content-Type" #define SLAFRequestHeaderParamsKey @"slaf_request_header_params_dict" // 设置NSMutableURLRequest url链接后使用 ? 后接的参数 #define SLAFRequestUrlParamsKey @"slaf_request_url_dict" // 设置NSMutableURLRequest body中请求参数 #define SLAFRequestBodyParamsKey @"slaf_request_body_dict" #endif /* SLAFServiceProperty_h */
sunbeamChen/SunbeamLatestAFService
SunbeamLatestAFService-0.1.19/ios/SunbeamLatestAFService.framework/Versions/A/Headers/SLAFServiceProperty.h
C
mit
1,481
<?php /* * This file is part of the NAD package. * * (c) Ivan Proskuryakov * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace NAD\ResourceBundle\Request; use FOS\RestBundle\Request\RequestBodyParamConverter; use JMS\Serializer\DeserializationContext; use JMS\Serializer\Serializer; use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter as SensioParamConverter; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Doctrine\ORM\EntityManager; use Symfony\Component\Validator\Validator\ValidatorInterface; use NAD\ResourceBundle\Exception\ValidationFailedException; use JMS\Serializer\SerializationContext; /** * Class ParamConverter * * @author Mohammadreza Razzaghi <razzaghi229@gmail.com> */ class ParamConverter extends RequestBodyParamConverter { /** * @var EntityManager */ protected $em; /** * @var EventDispatcherInterface */ private $dispatcher; /** * @param Serializer $serializer * @param EntityManager $entityManager * @param ValidatorInterface $validator * @param EventDispatcherInterface $dispatcher */ public function __construct( Serializer $serializer, EntityManager $entityManager, ValidatorInterface $validator, EventDispatcherInterface $dispatcher ) { parent::__construct($serializer, null, null, $validator, 'error'); $this->em = $entityManager; $this->dispatcher = $dispatcher; } /** * execute * * @param Request $request * @param SensioParamConverter $configuration * * @return bool|mixed */ public function execute(Request $request, SensioParamConverter $configuration) { $name = $configuration->getName(); $options = $configuration->getOptions(); $resolvedClass = $configuration->getClass(); $id = $request->attributes->get('id'); $method = $request->getMethod(); $rawPayload = $request->getContent(); switch (true) { case ('GET' === $method): $convertedValue = $this->loadEntity($resolvedClass, $id, $maxDepth = true); break; case ('DELETE' === $method): $convertedValue = $this->loadEntity($resolvedClass, $id); break; case ('PUT' === $method): $payload = array_merge( array('id' => $id), json_decode($rawPayload, true) ); $convertedValue = $this->updateEntity($resolvedClass, json_encode($payload)); break; case ('POST' === $method): $convertedValue = $this->updateEntity($resolvedClass, $rawPayload); break; } return $convertedValue; } /** * @param $resolvedClass * @param $id * @param $maxDepth * * @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\OptimisticLockException * @throws \Doctrine\ORM\TransactionRequiredException * @throws \Doctrine\ORM\TransactionRequiredException * @throws NotFoundHttpException * * @return mixed $entity */ protected function loadEntity($resolvedClass, $id, $maxDepth = false) { $entity = $this->em->find($resolvedClass, $id); if (null === $entity) { throw new NotFoundHttpException('Not found'); } if ($maxDepth) { $entity = $this->serializer->serialize( $entity, 'json', SerializationContext::create()->enableMaxDepthChecks() ); return json_decode($entity, true); } return $entity; } /** * @param $resolvedClass * @param $rawPayload * * @throws \Doctrine\ORM\ORMException * @throws \Doctrine\ORM\OptimisticLockException * @throws \Doctrine\ORM\TransactionRequiredException * @throws \Doctrine\ORM\TransactionRequiredException * @throws NotFoundHttpException * * @return mixed $entity */ protected function updateEntity($resolvedClass, $rawPayload) { $serializerGroups = isset($options['serializerGroups']) ? $options['serializerGroups'] : null; $deserializationContext = DeserializationContext::create(); if ($serializerGroups) { $deserializationContext ->setGroups($serializerGroups) ; } $convertedValue = $this->serializer->deserialize( $rawPayload, $resolvedClass, 'json' ); $violations = $this->validator->validate($convertedValue); if ($violations->count()) { throw new ValidationFailedException($violations); } return $convertedValue; } }
razzaghi/NAD
src/NAD/ResourceBundle/Request/ParamConverter.php
PHP
mit
5,072