code
stringlengths
4
991k
repo_name
stringlengths
6
116
path
stringlengths
4
249
language
stringclasses
30 values
license
stringclasses
15 values
size
int64
4
991k
input_ids
listlengths
502
502
token_type_ids
listlengths
502
502
attention_mask
listlengths
502
502
labels
listlengths
502
502
/******************************************************************************* * CogTool Copyright Notice and Distribution Terms * CogTool 1.3, Copyright (c) 2005-2013 Carnegie Mellon University * This software is distributed under the terms of the FSF Lesser * Gnu Public License (see LGPL.txt). * * CogTool is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation; either version 2.1 of the License, or * (at your option) any later version. * * CogTool is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with CogTool; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * CogTool makes use of several third-party components, with the * following notices: * * Eclipse SWT version 3.448 * Eclipse GEF Draw2D version 3.2.1 * * Unless otherwise indicated, all Content made available by the Eclipse * Foundation is provided to you under the terms and conditions of the Eclipse * Public License Version 1.0 ("EPL"). A copy of the EPL is provided with this * Content and is also available at http://www.eclipse.org/legal/epl-v10.html. * * CLISP version 2.38 * * Copyright (c) Sam Steingold, Bruno Haible 2001-2006 * This software is distributed under the terms of the FSF Gnu Public License. * See COPYRIGHT file in clisp installation folder for more information. * * ACT-R 6.0 * * Copyright (c) 1998-2007 Dan Bothell, Mike Byrne, Christian Lebiere & * John R Anderson. * This software is distributed under the terms of the FSF Lesser * Gnu Public License (see LGPL.txt). * * Apache Jakarta Commons-Lang 2.1 * * This product contains software developed by the Apache Software Foundation * (http://www.apache.org/) * * jopt-simple version 1.0 * * Copyright (c) 2004-2013 Paul R. Holser, Jr. * * 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. * * Mozilla XULRunner 1.9.0.5 * * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/. * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * * The J2SE(TM) Java Runtime Environment version 5.0 * * Copyright 2009 Sun Microsystems, Inc., 4150 * Network Circle, Santa Clara, California 95054, U.S.A. All * rights reserved. U.S. * See the LICENSE file in the jre folder for more information. ******************************************************************************/ package edu.cmu.cs.hcii.cogtool.uimodel; import edu.cmu.cs.hcii.cogtool.model.CheckBox; public class GraphicalCheckBox extends GraphicalGridButton { public GraphicalCheckBox(CheckBox c, int color, boolean useToolTip, int rolloverCursor, FrameUIModel displayComputer, WidgetFigureSupport spt, DefaultSEUIModel ovr) { super(c, color, useToolTip, rolloverCursor, displayComputer, spt, ovr); } }
cogtool/cogtool
java/edu/cmu/cs/hcii/cogtool/uimodel/GraphicalCheckBox.java
Java
lgpl-2.1
4,751
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# Astelma R. Brown ex Ker-Gawler, 1821 GENUS #### Status ACCEPTED #### According to IRMNG Homonym List #### Published in null #### Original name null ### Remarks null
mdoering/backbone
life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Astelma/README.md
Markdown
apache-2.0
171
[ 30522, 1001, 2004, 9834, 2863, 1054, 1012, 2829, 4654, 17710, 2099, 1011, 11721, 13668, 2121, 1010, 11723, 3562, 1001, 1001, 1001, 1001, 3570, 3970, 1001, 1001, 1001, 1001, 2429, 2000, 20868, 2213, 3070, 24004, 4890, 2213, 2862, 1001, 1001,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package myactivity.danieltilley.ie.myactivity; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
Daniel-Tilley/SimpleAndroidApps
MyActivity/app/src/test/java/myactivity/danieltilley/ie/myactivity/ExampleUnitTest.java
Java
mit
330
[ 30522, 7427, 2026, 18908, 7730, 1012, 3817, 28345, 3240, 1012, 29464, 1012, 2026, 18908, 7730, 1025, 12324, 8917, 1012, 12022, 4183, 1012, 3231, 1025, 12324, 10763, 8917, 1012, 12022, 4183, 1012, 20865, 1012, 1008, 1025, 1013, 1008, 1008, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright (C) 1999 Lars Knoll (knoll@kde.org) Copyright (C) 2006, 2008, 2015 Apple Inc. All rights reserved. Copyright (c) 2012, Google Inc. All rights reserved. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #pragma once #include "Length.h" #include "RectEdges.h" #include "WritingMode.h" namespace WebCore { class LengthBox : public RectEdges<Length> { public: LengthBox() : LengthBox(Auto) { } explicit LengthBox(LengthType type) : RectEdges(Length(type), Length(type), Length(type), Length(type)) { } explicit LengthBox(int v) : RectEdges(Length(v, Fixed), Length(v, Fixed), Length(v, Fixed), Length(v, Fixed)) { } LengthBox(int top, int right, int bottom, int left) : RectEdges(Length(top, Fixed), Length(right, Fixed), Length(bottom, Fixed), Length(left, Fixed)) { } LengthBox(Length&& top, Length&& right, Length&& bottom, Length&& left) : RectEdges { WTFMove(top), WTFMove(right), WTFMove(bottom), WTFMove(left) } { } bool isZero() const { return top().isZero() && right().isZero() && bottom().isZero() && left().isZero(); } }; using LayoutBoxExtent = RectEdges<LayoutUnit>; using FloatBoxExtent = RectEdges<float>; WTF::TextStream& operator<<(WTF::TextStream&, const LengthBox&); WEBCORE_EXPORT WTF::TextStream& operator<<(WTF::TextStream&, const FloatBoxExtent&); } // namespace WebCore
teamfx/openjfx-8u-dev-rt
modules/web/src/main/native/Source/WebCore/platform/LengthBox.h
C
gpl-2.0
2,181
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2639, 16357, 14161, 14511, 1006, 14161, 14511, 1030, 1047, 3207, 1012, 8917, 1007, 9385, 1006, 1039, 1007, 2294, 1010, 2263, 1010, 2325, 6207, 4297, 1012, 2035, 2916, 9235, 1012, 9385, 1006, 1039, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /* Smarty version Smarty-3.1.8, created on 2013-10-06 21:46:04 compiled from "/homez.151/thenailk/www/administrator/themes/default/template/controllers/customers/helpers/view/view.tpl" */ ?> <?php /*%%SmartyHeaderCode:19467569315251bdfc07da60-89803074%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed'); $_valid = $_smarty_tpl->decodeProperties(array ( 'file_dependency' => array ( '637de6f7b8ae7c6ad4f4dd57a305d015f7e6ee0b' => array ( 0 => '/homez.151/thenailk/www/administrator/themes/default/template/controllers/customers/helpers/view/view.tpl', 1 => 1360316334, 2 => 'file', ), '68aefcfb094b3a4f62d7beb35356876059baa5c3' => array ( 0 => '/homez.151/thenailk/www/administrator/themes/default/template/helpers/view/view.tpl', 1 => 1360316293, 2 => 'file', ), ), 'nocache_hash' => '19467569315251bdfc07da60-89803074', 'function' => array ( ), 'variables' => array ( 'show_toolbar' => 0, 'toolbar_btn' => 0, 'toolbar_scroll' => 0, 'title' => 0, 'name_controller' => 0, 'hookName' => 0, ), 'has_nocache_code' => false, 'version' => 'Smarty-3.1.8', 'unifunc' => 'content_5251bdfcebada0_73787312', ),false); /*/%%SmartyHeaderCode%%*/?> <?php if ($_valid && !is_callable('content_5251bdfcebada0_73787312')) {function content_5251bdfcebada0_73787312($_smarty_tpl) {?> <?php if ($_smarty_tpl->tpl_vars['show_toolbar']->value){?> <?php echo $_smarty_tpl->getSubTemplate ("toolbar.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array('toolbar_btn'=>$_smarty_tpl->tpl_vars['toolbar_btn']->value,'toolbar_scroll'=>$_smarty_tpl->tpl_vars['toolbar_scroll']->value,'title'=>$_smarty_tpl->tpl_vars['title']->value), 0);?> <?php }?> <div class="leadin"></div> <script type="text/javascript"> function saveCustomerNote() { $('#note_feedback').html('<img src="../img/loader.gif" alt="" />').show(); var noteContent = $('#noteContent').val(); $.ajax({ type: "POST", url: "index.php", data: "token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCustomers'),$_smarty_tpl);?> &tab=AdminCustomers&ajax=1&action=updateCustomerNote&id_customer=<?php echo $_smarty_tpl->tpl_vars['customer']->value->id;?> &note="+noteContent, async : true, success: function(r) { $('#note_feedback').html('').hide(); if (r == 'ok') { $('#note_feedback').html("<b style='color:green'><?php echo smartyTranslate(array('s'=>'Your note has been saved'),$_smarty_tpl);?> </b>").fadeIn(400); $('#submitCustomerNote').attr('disabled', true); } else if (r == 'error:validation') $('#note_feedback').html("<b style='color:red'>(<?php echo smartyTranslate(array('s'=>'Error: your note is not valid'),$_smarty_tpl);?> </b>").fadeIn(400); else if (r == 'error:update') $('#note_feedback').html("<b style='color:red'><?php echo smartyTranslate(array('s'=>'Error: cannot save your note'),$_smarty_tpl);?> </b>").fadeIn(400); $('#note_feedback').fadeOut(3000); } }); } </script> <div id="container-customer"> <div class="info-customer-left"> <div style="float: right"> <a href="<?php echo $_smarty_tpl->tpl_vars['current']->value;?> &updatecustomer&id_customer=<?php echo $_smarty_tpl->tpl_vars['customer']->value->id;?> &token=<?php echo $_smarty_tpl->tpl_vars['token']->value;?> "> <img src="../img/admin/edit.gif" /> </a> </div> <span style="font-size: 14px;"> <?php echo $_smarty_tpl->tpl_vars['customer']->value->firstname;?> <?php echo $_smarty_tpl->tpl_vars['customer']->value->lastname;?> </span> <img src="<?php echo $_smarty_tpl->tpl_vars['gender_image']->value;?> " style="margin-bottom: 5px" /><br /> <a href="mailto:<?php echo $_smarty_tpl->tpl_vars['customer']->value->email;?> " style="text-decoration: underline; color:#268CCD;"><?php echo $_smarty_tpl->tpl_vars['customer']->value->email;?> </a> <br /><br /> <?php echo smartyTranslate(array('s'=>'ID:'),$_smarty_tpl);?> <?php echo sprintf("%06d",$_smarty_tpl->tpl_vars['customer']->value->id);?> <br /> <?php echo smartyTranslate(array('s'=>'Registration date:'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['registration_date']->value;?> <br /> <?php echo smartyTranslate(array('s'=>'Last visit:'),$_smarty_tpl);?> <?php if ($_smarty_tpl->tpl_vars['customer_stats']->value['last_visit']){?><?php echo $_smarty_tpl->tpl_vars['last_visit']->value;?> <?php }else{ ?><?php echo smartyTranslate(array('s'=>'never'),$_smarty_tpl);?> <?php }?><br /> <?php if ($_smarty_tpl->tpl_vars['count_better_customers']->value!='-'){?><?php echo smartyTranslate(array('s'=>'Rank: #'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['count_better_customers']->value;?> <br /><?php }?> <?php if ($_smarty_tpl->tpl_vars['shop_is_feature_active']->value){?><?php echo smartyTranslate(array('s'=>'Shop:'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['name_shop']->value;?> <br /><?php }?> </div> <div class="info-customer-right"> <div style="float: right"> <a href="<?php echo $_smarty_tpl->tpl_vars['current']->value;?> &addcustomer&id_customer=<?php echo $_smarty_tpl->tpl_vars['customer']->value->id;?> &token=<?php echo $_smarty_tpl->tpl_vars['token']->value;?> "> <img src="../img/admin/edit.gif" /> </a> </div> <?php echo smartyTranslate(array('s'=>'Newsletter:'),$_smarty_tpl);?> <?php if ($_smarty_tpl->tpl_vars['customer']->value->newsletter){?><img src="../img/admin/enabled.gif" /><?php }else{ ?><img src="../img/admin/disabled.gif" /><?php }?><br /> <?php echo smartyTranslate(array('s'=>'Opt-in:'),$_smarty_tpl);?> <?php if ($_smarty_tpl->tpl_vars['customer']->value->optin){?><img src="../img/admin/enabled.gif" /><?php }else{ ?><img src="../img/admin/disabled.gif" /><?php }?><br /> <?php echo smartyTranslate(array('s'=>'Age:'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['customer_stats']->value['age'];?> <?php if (isset($_smarty_tpl->tpl_vars['customer']->value->birthday['age'])){?>(<?php echo $_smarty_tpl->tpl_vars['customer_birthday']->value;?> )<?php }else{ ?><?php echo smartyTranslate(array('s'=>'unknown'),$_smarty_tpl);?> <?php }?><br /><br /> <?php echo smartyTranslate(array('s'=>'Last update:'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['last_update']->value;?> <br /> <?php echo smartyTranslate(array('s'=>'Status:'),$_smarty_tpl);?> <?php if ($_smarty_tpl->tpl_vars['customer']->value->active){?><img src="../img/admin/enabled.gif" /><?php }else{ ?><img src="../img/admin/disabled.gif" /><?php }?> <?php if ($_smarty_tpl->tpl_vars['customer']->value->isGuest()){?> <div> <?php echo smartyTranslate(array('s'=>'This customer is registered as'),$_smarty_tpl);?> <b><?php echo smartyTranslate(array('s'=>'guest'),$_smarty_tpl);?> </b> <?php if (!$_smarty_tpl->tpl_vars['customer_exists']->value){?> <form method="post" action="index.php?tab=AdminCustomers&id_customer=<?php echo $_smarty_tpl->tpl_vars['customer']->value->id;?> &token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCustomers'),$_smarty_tpl);?> "> <input type="hidden" name="id_lang" value="<?php echo $_smarty_tpl->tpl_vars['id_lang']->value;?> " /> <p class="center"><input class="button" type="submit" name="submitGuestToCustomer" value="<?php echo smartyTranslate(array('s'=>'Transform to customer account'),$_smarty_tpl);?> " /></p> <?php echo smartyTranslate(array('s'=>'This feature generates a random password and sends an e-mail to the customer'),$_smarty_tpl);?> </form> <?php }else{ ?> </div><div><b style="color:red;"><?php echo smartyTranslate(array('s'=>'A registered customer account already exists with this e-mail address'),$_smarty_tpl);?> </b> <?php }?> </div> <?php }?> </div> <div class="clear"></div> <div class="separation"></div> <div> <h2> <img src="../img/admin/cms.gif" /> <?php echo smartyTranslate(array('s'=>'Add a private note'),$_smarty_tpl);?> </h2> <p><?php echo smartyTranslate(array('s'=>'This note will be displayed to all employees but not to the customer.'),$_smarty_tpl);?> </p> <form action="ajax.php" method="post" onsubmit="saveCustomerNote();return false;" id="customer_note"> <textarea name="note" id="noteContent" style="width:600px;height:100px" onkeydown="$('#submitCustomerNote').removeAttr('disabled');"><?php echo $_smarty_tpl->tpl_vars['customer_note']->value;?> </textarea><br /> <input type="submit" id="submitCustomerNote" class="button" value="<?php echo smartyTranslate(array('s'=>' Save '),$_smarty_tpl);?> " style="float:left;margin-top:5px" disabled="disabled" /> <span id="note_feedback" style="position:relative; top:10px; left:10px;"></span> </form> </div> <div class="clear"></div> <div class="separation"></div> <h2><?php echo smartyTranslate(array('s'=>'Messages'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['messages']->value);?> )</h2> <?php if (count($_smarty_tpl->tpl_vars['messages']->value)){?> <table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <tr> <th class="center"><?php echo smartyTranslate(array('s'=>'Status'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Message'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Sent on'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['message'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['message']->_loop = false; $_from = $_smarty_tpl->tpl_vars['messages']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['message']->key => $_smarty_tpl->tpl_vars['message']->value){ $_smarty_tpl->tpl_vars['message']->_loop = true; ?> <tr> <td><?php echo $_smarty_tpl->tpl_vars['message']->value['status'];?> </td> <td> <a href="index.php?tab=AdminCustomerThreads&id_customer_thread=<?php echo $_smarty_tpl->tpl_vars['message']->value['id_customer_thread'];?> &viewcustomer_thread&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCustomerThreads'),$_smarty_tpl);?> "> <?php echo $_smarty_tpl->tpl_vars['message']->value['message'];?> ... </a> </td> <td><?php echo $_smarty_tpl->tpl_vars['message']->value['date_add'];?> </td> </tr> <?php } ?> </table> <div class="clear">&nbsp;</div> <?php }else{ ?> <?php echo smartyTranslate(array('s'=>'%1$s %2$s has never contacted you','sprintf'=>array($_smarty_tpl->tpl_vars['customer']->value->firstname,$_smarty_tpl->tpl_vars['customer']->value->lastname)),$_smarty_tpl);?> <?php }?> <div><?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>"displayAdminCustomers",'id_customer'=>$_smarty_tpl->tpl_vars['customer']->value->id),$_smarty_tpl);?> </div> <div class="clear">&nbsp;</div> <h2> <?php echo smartyTranslate(array('s'=>'Groups'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['groups']->value);?> ) <a href="<?php echo $_smarty_tpl->tpl_vars['current']->value;?> &addcustomer&id_customer=<?php echo $_smarty_tpl->tpl_vars['customer']->value->id;?> &token=<?php echo $_smarty_tpl->tpl_vars['token']->value;?> "> <img src="../img/admin/edit.gif" /> </a> </h2> <?php if ($_smarty_tpl->tpl_vars['groups']->value&&count($_smarty_tpl->tpl_vars['groups']->value)){?> <table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <colgroup> <col width="10px"> <col width=""> <col width="70px"> </colgroup> <tr> <th height="39px" class="right"><?php echo smartyTranslate(array('s'=>'ID'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Name'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Actions'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['group'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['group']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['groups']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['group']->key => $_smarty_tpl->tpl_vars['group']->value){ $_smarty_tpl->tpl_vars['group']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['group']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?> style="cursor: pointer" onclick="document.location = '?tab=AdminGroups&id_group=<?php echo $_smarty_tpl->tpl_vars['group']->value['id_group'];?> &viewgroup&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminGroups'),$_smarty_tpl);?> '"> <td class="center"><?php echo $_smarty_tpl->tpl_vars['group']->value['id_group'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['group']->value['name'];?> </td> <td align="center"><a href="?tab=AdminGroups&id_group=<?php echo $_smarty_tpl->tpl_vars['group']->value['id_group'];?> &viewgroup&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminGroups'),$_smarty_tpl);?> "><img src="../img/admin/details.gif" /></a></td> </tr> <?php } ?> </table> <?php }?> <div class="clear">&nbsp;</div> <h2><?php echo smartyTranslate(array('s'=>'Orders'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['orders']->value);?> )</h2> <?php if ($_smarty_tpl->tpl_vars['orders']->value&&count($_smarty_tpl->tpl_vars['orders']->value)){?> <?php $_smarty_tpl->tpl_vars['count_ok'] = new Smarty_variable(count($_smarty_tpl->tpl_vars['orders_ok']->value), null, 0);?> <?php if ($_smarty_tpl->tpl_vars['count_ok']->value){?> <div> <h3 style="color:green;font-weight:700"> <?php echo smartyTranslate(array('s'=>'Valid orders:'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['count_ok']->value;?> <?php echo smartyTranslate(array('s'=>'for'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['total_ok']->value;?> </h3> <table cellspacing="0" cellpadding="0" class="table" style="width:100%; text-align:left;"> <colgroup> <col width="10px"> <col width="100px"> <col width="100px"> <col width=""> <col width="50px"> <col width="80px"> <col width="70px"> </colgroup> <tr> <th height="39px" class="center"><?php echo smartyTranslate(array('s'=>'ID'),$_smarty_tpl);?> </th> <th class="left"><?php echo smartyTranslate(array('s'=>'Date'),$_smarty_tpl);?> </th> <th class="left"><?php echo smartyTranslate(array('s'=>'Payment'),$_smarty_tpl);?> </th> <th class="left"><?php echo smartyTranslate(array('s'=>'State'),$_smarty_tpl);?> </th> <th class="left"><?php echo smartyTranslate(array('s'=>'Products'),$_smarty_tpl);?> </th> <th class="left"><?php echo smartyTranslate(array('s'=>'Total spent'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Actions'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['order'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['order']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['orders_ok']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['order']->key => $_smarty_tpl->tpl_vars['order']->value){ $_smarty_tpl->tpl_vars['order']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['order']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?> style="cursor: pointer" onclick="document.location = '?tab=AdminOrders&id_order=<?php echo $_smarty_tpl->tpl_vars['order']->value['id_order'];?> &vieworder&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?> '"> <td class="center"><?php echo $_smarty_tpl->tpl_vars['order']->value['id_order'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['order']->value['date_add'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['order']->value['payment'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['order']->value['order_state'];?> </td> <td align="right"><?php echo $_smarty_tpl->tpl_vars['order']->value['nb_products'];?> </td> <td align="right"><?php echo $_smarty_tpl->tpl_vars['order']->value['total_paid_real'];?> </td> <td align="center"><a href="?tab=AdminOrders&id_order=<?php echo $_smarty_tpl->tpl_vars['order']->value['id_order'];?> &vieworder&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?> "><img src="../img/admin/details.gif" /></a></td> </tr> <?php } ?> </table> </div> <?php }?> <?php $_smarty_tpl->tpl_vars['count_ko'] = new Smarty_variable(count($_smarty_tpl->tpl_vars['orders_ko']->value), null, 0);?> <?php if ($_smarty_tpl->tpl_vars['count_ko']->value){?> <div> <h3 style="color:red;font-weight:normal;"><?php echo smartyTranslate(array('s'=>'Invalid orders:'),$_smarty_tpl);?> <?php echo $_smarty_tpl->tpl_vars['count_ko']->value;?> </h3> <table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <colgroup> <col width="10px"> <col width="100px"> <col width=""> <col width=""> <col width="100px"> <col width="100px"> <col width="52px"> </colgroup> <tr> <th height="39px" class="center"><?php echo smartyTranslate(array('s'=>'ID'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Date'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Payment'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'State'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Products'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Total spent'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Actions'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['order'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['order']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['orders_ko']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['order']->key => $_smarty_tpl->tpl_vars['order']->value){ $_smarty_tpl->tpl_vars['order']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['order']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?> style="cursor: pointer" onclick="document.location = '?tab=AdminOrders&id_order=<?php echo $_smarty_tpl->tpl_vars['order']->value['id_order'];?> &vieworder&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?> '"> <td class="center"><?php echo $_smarty_tpl->tpl_vars['order']->value['id_order'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['order']->value['date_add'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['order']->value['payment'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['order']->value['order_state'];?> </td> <td align="right"><?php echo $_smarty_tpl->tpl_vars['order']->value['nb_products'];?> </td> <td align="right"><?php echo $_smarty_tpl->tpl_vars['order']->value['total_paid_real'];?> </td> <td align="center"><a href="?tab=AdminOrders&id_order=<?php echo $_smarty_tpl->tpl_vars['order']->value['id_order'];?> &vieworder&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?> "><img src="../img/admin/details.gif" /></a></td> </tr> <?php } ?> </table> </div> <div class="clear">&nbsp;</div> <?php }?> <?php }else{ ?> <?php echo smartyTranslate(array('s'=>'%1$s %2$s has not placed any orders yet','sprintf'=>array($_smarty_tpl->tpl_vars['customer']->value->firstname,$_smarty_tpl->tpl_vars['customer']->value->lastname)),$_smarty_tpl);?> <?php }?> <?php if ($_smarty_tpl->tpl_vars['products']->value&&count($_smarty_tpl->tpl_vars['products']->value)){?> <div class="clear">&nbsp;</div> <h2><?php echo smartyTranslate(array('s'=>'Products'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['products']->value);?> )</h2> <table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <colgroup> <col width="50px"> <col width=""> <col width="60px"> <col width="70px"> </colgroup> <tr> <th height="39px" class="center"><?php echo smartyTranslate(array('s'=>'Date'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Name'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Quantity'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Actions'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['product'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['product']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['products']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['product']->key => $_smarty_tpl->tpl_vars['product']->value){ $_smarty_tpl->tpl_vars['product']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['product']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?> style="cursor: pointer" onclick="document.location = '?tab=AdminOrders&id_order=<?php echo $_smarty_tpl->tpl_vars['product']->value['id_order'];?> &vieworder&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?> '"> <td><?php echo $_smarty_tpl->tpl_vars['product']->value['date_add'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['product']->value['product_name'];?> </td> <td align="right"><?php echo $_smarty_tpl->tpl_vars['product']->value['product_quantity'];?> </td> <td align="center"><a href="?tab=AdminOrders&id_order=<?php echo $_smarty_tpl->tpl_vars['product']->value['id_order'];?> &vieworder&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminOrders'),$_smarty_tpl);?> "><img src="../img/admin/details.gif" /></a></td> </tr> <?php } ?> </table> <?php }?> <div class="clear">&nbsp;</div> <h2><?php echo smartyTranslate(array('s'=>'Addresses'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['addresses']->value);?> )</h2> <?php if (count($_smarty_tpl->tpl_vars['addresses']->value)){?> <table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <colgroup> <col width="120px"> <col width="120px"> <col width=""> <col width="100px"> <col width="170px"> <col width="70px"> </colgroup> <tr> <th height="39px"><?php echo smartyTranslate(array('s'=>'Company'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Name'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Address'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Country'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Phone number(s)'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Actions'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['address'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['address']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['addresses']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['address']->key => $_smarty_tpl->tpl_vars['address']->value){ $_smarty_tpl->tpl_vars['address']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['address']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?>> <td><?php if ($_smarty_tpl->tpl_vars['address']->value['company']){?><?php echo $_smarty_tpl->tpl_vars['address']->value['company'];?> <?php }else{ ?>--<?php }?></td> <td><?php echo $_smarty_tpl->tpl_vars['address']->value['firstname'];?> <?php echo $_smarty_tpl->tpl_vars['address']->value['lastname'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['address']->value['address1'];?> <?php if ($_smarty_tpl->tpl_vars['address']->value['address2']){?><?php echo $_smarty_tpl->tpl_vars['address']->value['address2'];?> <?php }?> <?php echo $_smarty_tpl->tpl_vars['address']->value['postcode'];?> <?php echo $_smarty_tpl->tpl_vars['address']->value['city'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['address']->value['country'];?> </td> <td class="right"> <?php if ($_smarty_tpl->tpl_vars['address']->value['phone']){?> <?php echo $_smarty_tpl->tpl_vars['address']->value['phone'];?> <?php if ($_smarty_tpl->tpl_vars['address']->value['phone_mobile']){?><br /><?php echo $_smarty_tpl->tpl_vars['address']->value['phone_mobile'];?> <?php }?> <?php }else{ ?> <?php if ($_smarty_tpl->tpl_vars['address']->value['phone_mobile']){?><br /><?php echo $_smarty_tpl->tpl_vars['address']->value['phone_mobile'];?> <?php }else{ ?>--<?php }?> <?php }?> </td> <td align="center"> <a href="?tab=AdminAddresses&id_address=<?php echo $_smarty_tpl->tpl_vars['address']->value['id_address'];?> &addaddress&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminAddresses'),$_smarty_tpl);?> "><img src="../img/admin/edit.gif" /></a> <a href="?tab=AdminAddresses&id_address=<?php echo $_smarty_tpl->tpl_vars['address']->value['id_address'];?> &deleteaddress&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminAddresses'),$_smarty_tpl);?> "><img src="../img/admin/delete.gif" /></a> </td> </tr> <?php } ?> </table> <?php }else{ ?> <?php echo smartyTranslate(array('s'=>'%1$s %2$s has not registered any addresses yet','sprintf'=>array($_smarty_tpl->tpl_vars['customer']->value->firstname,$_smarty_tpl->tpl_vars['customer']->value->lastname)),$_smarty_tpl);?> <?php }?> <div class="clear">&nbsp;</div> <h2><?php echo smartyTranslate(array('s'=>'Vouchers'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['discounts']->value);?> )</h2> <?php if (count($_smarty_tpl->tpl_vars['discounts']->value)){?> <table cellspacing="0" cellpadding="0" class="table"> <tr> <th><?php echo smartyTranslate(array('s'=>'ID'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Code'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Name'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Status'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Actions'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['discount'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['discount']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['discounts']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['discount']->key => $_smarty_tpl->tpl_vars['discount']->value){ $_smarty_tpl->tpl_vars['discount']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['discount']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?>> <td align="center"><?php echo $_smarty_tpl->tpl_vars['discount']->value['id_cart_rule'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['discount']->value['code'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['discount']->value['name'];?> </td> <td align="center"><img src="../img/admin/<?php if ($_smarty_tpl->tpl_vars['discount']->value['active']){?>enabled.gif<?php }else{ ?>disabled.gif<?php }?>" alt="<?php echo smartyTranslate(array('s'=>'Status'),$_smarty_tpl);?> " title="<?php echo smartyTranslate(array('s'=>'Status'),$_smarty_tpl);?> " /></td> <td align="center"> <a href="?tab=AdminCartRules&id_cart_rule=<?php echo $_smarty_tpl->tpl_vars['discount']->value['id_cart_rule'];?> &addcart_rule&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCartRules'),$_smarty_tpl);?> "><img src="../img/admin/edit.gif" /></a> <a href="?tab=AdminCartRules&id_cart_rule=<?php echo $_smarty_tpl->tpl_vars['discount']->value['id_cart_rule'];?> &deletecart_rule&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCartRules'),$_smarty_tpl);?> "><img src="../img/admin/delete.gif" /></a> </td> </tr> <?php } ?> </table> <?php }else{ ?> <?php echo smartyTranslate(array('s'=>'%1$s %2$s has no discount vouchers','sprintf'=>array($_smarty_tpl->tpl_vars['customer']->value->firstname,$_smarty_tpl->tpl_vars['customer']->value->lastname)),$_smarty_tpl);?> . <?php }?> <div class="clear">&nbsp;</div> <div> <h2><?php echo smartyTranslate(array('s'=>'Carts'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['carts']->value);?> )</h2> <?php if ($_smarty_tpl->tpl_vars['carts']->value&&count($_smarty_tpl->tpl_vars['carts']->value)){?> <table cellspacing="0" cellpadding="0" class="table" style="width:100%"> <colgroup> <col width="50px"> <col width="150px"> <col width=""> <col width="70px"> <col width="50px"> </colgroup> <tr> <th height="39px" class="center"><?php echo smartyTranslate(array('s'=>'ID'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Date'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Carrier'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Total'),$_smarty_tpl);?> </th> <th class="center"><?php echo smartyTranslate(array('s'=>'Actions'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['cart'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['cart']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['carts']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['cart']->key => $_smarty_tpl->tpl_vars['cart']->value){ $_smarty_tpl->tpl_vars['cart']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['cart']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?> style="cursor: pointer" onclick="document.location = '?tab=AdminCarts&id_cart=<?php echo $_smarty_tpl->tpl_vars['cart']->value['id_cart'];?> &viewcart&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCarts'),$_smarty_tpl);?> '"> <td class="center"><?php echo $_smarty_tpl->tpl_vars['cart']->value['id_cart'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['cart']->value['date_add'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['cart']->value['name'];?> </td> <td align="right"><?php echo $_smarty_tpl->tpl_vars['cart']->value['total_price'];?> </td> <td align="center"><a href="index.php?tab=AdminCarts&id_cart=<?php echo $_smarty_tpl->tpl_vars['cart']->value['id_cart'];?> &viewcart&token=<?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['getAdminToken'][0][0]->getAdminTokenLiteSmarty(array('tab'=>'AdminCarts'),$_smarty_tpl);?> "><img src="../img/admin/details.gif" /></a></td> </tr> <?php } ?> </table> <?php }else{ ?> <?php echo smartyTranslate(array('s'=>'No cart available'),$_smarty_tpl);?> . <?php }?> </div> <?php if (count($_smarty_tpl->tpl_vars['interested']->value)){?> <div> <h2><?php echo smartyTranslate(array('s'=>'Products'),$_smarty_tpl);?> (<?php echo count($_smarty_tpl->tpl_vars['interested']->value);?> )</h2> <table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <colgroup> <col width="10px"> <col width=""> <col width="50px"> </colgroup> <?php $_smarty_tpl->tpl_vars['p'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['p']->_loop = false; $_smarty_tpl->tpl_vars['key'] = new Smarty_Variable; $_from = $_smarty_tpl->tpl_vars['interested']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['p']->key => $_smarty_tpl->tpl_vars['p']->value){ $_smarty_tpl->tpl_vars['p']->_loop = true; $_smarty_tpl->tpl_vars['key']->value = $_smarty_tpl->tpl_vars['p']->key; ?> <tr <?php if ($_smarty_tpl->tpl_vars['key']->value%2){?>class="alt_row"<?php }?> style="cursor: pointer" onclick="document.location = '<?php echo $_smarty_tpl->tpl_vars['p']->value['url'];?> '"> <td><?php echo $_smarty_tpl->tpl_vars['p']->value['id'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['p']->value['name'];?> </td> <td align="center"><a href="<?php echo $_smarty_tpl->tpl_vars['p']->value['url'];?> "><img src="../img/admin/details.gif" /></a></td> </tr> <?php } ?> </table> </div> <?php }?> <div class="clear">&nbsp;</div> <?php if (count($_smarty_tpl->tpl_vars['connections']->value)){?> <h2><?php echo smartyTranslate(array('s'=>'Last connections'),$_smarty_tpl);?> </h2> <table cellspacing="0" cellpadding="0" class="table" style="width:100%;"> <colgroup> <col width="150px"> <col width="100px"> <col width="100px"> <col width=""> <col width="150px"> </colgroup> <tr> <th height="39px;"><?php echo smartyTranslate(array('s'=>'Date'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Pages viewed'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Total time'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'Origin'),$_smarty_tpl);?> </th> <th><?php echo smartyTranslate(array('s'=>'IP Address'),$_smarty_tpl);?> </th> </tr> <?php $_smarty_tpl->tpl_vars['connection'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['connection']->_loop = false; $_from = $_smarty_tpl->tpl_vars['connections']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['connection']->key => $_smarty_tpl->tpl_vars['connection']->value){ $_smarty_tpl->tpl_vars['connection']->_loop = true; ?> <tr> <td><?php echo $_smarty_tpl->tpl_vars['connection']->value['date_add'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['connection']->value['pages'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['connection']->value['time'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['connection']->value['http_referer'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['connection']->value['ipaddress'];?> </td> </tr> <?php } ?> </table> <div class="clear">&nbsp;</div> <?php }?> <?php if (count($_smarty_tpl->tpl_vars['referrers']->value)){?> <h2><?php echo smartyTranslate(array('s'=>'Referrers'),$_smarty_tpl);?> </h2> <table cellspacing="0" cellpadding="0" class="table"> <tr> <th style="width: 200px"><?php echo smartyTranslate(array('s'=>'Date'),$_smarty_tpl);?> </th> <th style="width: 200px"><?php echo smartyTranslate(array('s'=>'Name'),$_smarty_tpl);?> </th> <?php if ($_smarty_tpl->tpl_vars['shop_is_feature_active']->value){?><th style="width: 200px"><?php echo smartyTranslate(array('s'=>'Shop'),$_smarty_tpl);?> </th><?php }?> </tr> <?php $_smarty_tpl->tpl_vars['referrer'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['referrer']->_loop = false; $_from = $_smarty_tpl->tpl_vars['referrers']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');} foreach ($_from as $_smarty_tpl->tpl_vars['referrer']->key => $_smarty_tpl->tpl_vars['referrer']->value){ $_smarty_tpl->tpl_vars['referrer']->_loop = true; ?> <tr> <td><?php echo $_smarty_tpl->tpl_vars['referrer']->value['date_add'];?> </td> <td><?php echo $_smarty_tpl->tpl_vars['referrer']->value['name'];?> </td> <?php if ($_smarty_tpl->tpl_vars['shop_is_feature_active']->value){?><td><?php echo $_smarty_tpl->tpl_vars['referrer']->value['shop_name'];?> </td><?php }?> </tr> <?php } ?> </table> <?php }?> <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>'displayAdminView'),$_smarty_tpl);?> <?php if (isset($_smarty_tpl->tpl_vars['name_controller']->value)){?> <?php $_smarty_tpl->_capture_stack[0][] = array('hookName', 'hookName', null); ob_start(); ?>display<?php echo ucfirst($_smarty_tpl->tpl_vars['name_controller']->value);?> View<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents()); if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents()); Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean(); } else $_smarty_tpl->capture_error();?> <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>$_smarty_tpl->tpl_vars['hookName']->value),$_smarty_tpl);?> <?php }elseif(isset($_GET['controller'])){?> <?php $_smarty_tpl->_capture_stack[0][] = array('hookName', 'hookName', null); ob_start(); ?>display<?php echo htmlentities(ucfirst($_GET['controller']));?> View<?php list($_capture_buffer, $_capture_assign, $_capture_append) = array_pop($_smarty_tpl->_capture_stack[0]); if (!empty($_capture_buffer)) { if (isset($_capture_assign)) $_smarty_tpl->assign($_capture_assign, ob_get_contents()); if (isset( $_capture_append)) $_smarty_tpl->append( $_capture_append, ob_get_contents()); Smarty::$_smarty_vars['capture'][$_capture_buffer]=ob_get_clean(); } else $_smarty_tpl->capture_error();?> <?php echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['hook'][0][0]->smartyHook(array('h'=>$_smarty_tpl->tpl_vars['hookName']->value),$_smarty_tpl);?> <?php }?> <?php }} ?>
timetre/tnk
web/store/cache/smarty/compile/637de6f7b8ae7c6ad4f4dd57a305d015f7e6ee0b.file.view.tpl.php
PHP
mit
39,761
[ 30522, 1026, 1029, 25718, 1013, 1008, 6047, 2100, 2544, 6047, 2100, 1011, 1017, 1012, 1015, 1012, 1022, 1010, 2580, 2006, 2286, 1011, 2184, 1011, 5757, 2538, 1024, 4805, 1024, 5840, 9227, 2013, 1000, 1013, 2188, 2480, 1012, 16528, 1013, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
'use strict'; // event // eventType - 'dragStart', 'drag', 'dragStop' // pos - absolute pos, // returnCallback var app = angular.module('utilsDrag', []); app.directive('utilsDrag', function ( ) { return { restrict: 'A', scope: { dragCallback: '&utilsDrag' }, replace: true, controller: [ '$scope', '$rootScope', function ( $scope ) { window.ud = $scope; $scope.dragElement = U; $scope.dragStartPosition = U; $scope.returnCallback = function () { $scope.dragElement.css( $scope.dragStartPosition ); } }], link: function ( scope, element ) { var cursorTop = $(element).height() / 2; var cursorLeft = $(element).width() / 2; function getCursorPosition ( topLeft, event ) { // console.log( 'event: ', event ); // var eventPos = getEventPos( event ); var x = event.pageX; var y = event.pageY; return { x: x, y: y }; } $(element).draggable( { cursorAt: { top: cursorTop, left: cursorLeft }, start: function ( event, ui ) { scope.dragElement = $(this); scope.dragElement.css('pointer-events', 'none'); var startDragging = scope.dragCallback( { event: event, eventType: 'dragStart', pos: getCursorPosition( ui.position, event ), returnCallback: scope.returnCallback }); scope.dragStartPosition = ui.position; }, drag: function( event, ui ) { var drag = scope.dragCallback( { event: event, eventType: 'drag', pos: getCursorPosition( ui.position, event ), returnCallback: scope.returnCallback }); if ( drag ) return false; }, stop: function ( event, ui ) { var stopDragging = scope.dragCallback( { event: event, eventType: 'dragStop', pos: getCursorPosition( ui.position, event ), returnCallback: scope.returnCallback }); scope.dragElement.css('pointer-events', 'all'); } }); } }; });
nangelova/utils-drag
utils-drag.js
JavaScript
mit
3,120
[ 30522, 1005, 2224, 9384, 1005, 1025, 1013, 1013, 2724, 1013, 1013, 2724, 13874, 1011, 1005, 8011, 14117, 2102, 1005, 1010, 1005, 8011, 1005, 1010, 1005, 8011, 16033, 2361, 1005, 1013, 1013, 13433, 2015, 1011, 7619, 13433, 2015, 1010, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package org.antbear.jee.spring.jdbc; import org.antbear.jee.spring.jdbc.dataaccess.CustomerDao; import org.antbear.jee.spring.jdbc.dataaccess.OrderDao; import org.antbear.jee.spring.jdbc.dataaccess.OrderPositionDao; import org.antbear.jee.spring.jdbc.dataaccess.ProductDao; import org.antbear.jee.spring.jdbc.domain.Customer; import org.antbear.jee.spring.jdbc.domain.Order; import org.antbear.jee.spring.jdbc.domain.OrderPosition; import org.antbear.jee.spring.jdbc.domain.Product; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.List; @Component public class App { private final static Logger log = LoggerFactory.getLogger(App.class); @Autowired private CustomerDao customerDao; @Autowired private OrderDao orderDao; @Autowired private OrderPositionDao orderPositionDao; @Autowired private ProductDao productDao; public void businessMethod() { for (final Customer customer : customerDao.findAll()) { log.debug(customer.toString()); final List<Order> orders = orderDao.findByCustomer(customer.getId()); for (final Order order : orders) { log.debug(order.toString()); final List<OrderPosition> orderPositions = orderPositionDao.findByOrder(order.getId()); for (final OrderPosition orderPosition : orderPositions) { log.debug(orderPosition.toString()); final Product product = productDao.findById(orderPosition.getProductId()); log.debug(product.toString()); } } } } }
bwolf/je-misc-samples
spring/spring-jdbc-first/src/main/java/org/antbear/jee/spring/jdbc/App.java
Java
apache-2.0
1,747
[ 30522, 7427, 8917, 1012, 14405, 4783, 2906, 1012, 15333, 2063, 1012, 3500, 1012, 26219, 9818, 1025, 12324, 8917, 1012, 14405, 4783, 2906, 1012, 15333, 2063, 1012, 3500, 1012, 26219, 9818, 1012, 2951, 6305, 9623, 2015, 1012, 8013, 2850, 2080...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import Ember from 'ember'; export default Ember.Component.extend({ colorMap: { running: 'green', waiting: 'orange', terminated: 'red' }, getStatusByName(name) { let retval = null; Ember.$.each(this.get('containerStatuses'), (i, containerStatus) => { if (name === containerStatus.name) { retval = containerStatus; return; } }); return retval; }, items: Ember.computed('containers', 'containerStatuses', function() { let items = []; this.get('containers').map((container) => { let status = this.getStatusByName(container.name); let state = Object.keys(status.state)[0], stateLabel = state.capitalize(), stateColor = this.colorMap[state], readyLabel = status.ready ? 'Ready' : 'Not ready', readyColor = status.ready ? 'green': 'orange'; items.push({ container, status, stateLabel, stateColor, readyLabel, readyColor }); }); return items; }) });
holandes22/kube-admin
app/components/pod-containers/component.js
JavaScript
mit
987
[ 30522, 12324, 7861, 5677, 2013, 1005, 7861, 5677, 1005, 1025, 9167, 12398, 7861, 5677, 1012, 6922, 1012, 7949, 1006, 1063, 3609, 2863, 2361, 1024, 1063, 2770, 1024, 1005, 2665, 1005, 1010, 3403, 1024, 1005, 4589, 1005, 1010, 12527, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# # Author:: Adam Jacob (<adam@opscode.com>) # Copyright:: Copyright (c) 2008 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # class Chef class Provider attr_accessor :node, :new_resource, :current_resource def initialize(node, new_resource) @node = node @new_resource = new_resource @current_resource = nil end def load_current_resource raise Chef::Exceptions::Override, "You must override load_current_resource in #{self.to_s}" end def action_nothing Chef::Log.debug("Doing nothing for #{@new_resource.to_s}") true end end end
raphael/chef
chef/lib/chef/provider.rb
Ruby
apache-2.0
1,178
[ 30522, 1001, 1001, 3166, 1024, 1024, 4205, 6213, 1006, 1026, 4205, 1030, 23092, 16044, 1012, 4012, 1028, 1007, 1001, 9385, 1024, 1024, 9385, 1006, 1039, 1007, 2263, 23092, 16044, 1010, 4297, 1012, 1001, 6105, 1024, 1024, 15895, 6105, 1010, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
namespace Zu.ChromeDevTools.IndexedDB { using Newtonsoft.Json; /// <summary> /// Delete a range of entries from an object store /// </summary> public sealed class DeleteObjectStoreEntriesCommand : ICommand { private const string ChromeRemoteInterface_CommandName = "IndexedDB.deleteObjectStoreEntries"; [JsonIgnore] public string CommandName { get { return ChromeRemoteInterface_CommandName; } } /// <summary> /// Gets or sets the securityOrigin /// </summary> [JsonProperty("securityOrigin")] public string SecurityOrigin { get; set; } /// <summary> /// Gets or sets the databaseName /// </summary> [JsonProperty("databaseName")] public string DatabaseName { get; set; } /// <summary> /// Gets or sets the objectStoreName /// </summary> [JsonProperty("objectStoreName")] public string ObjectStoreName { get; set; } /// <summary> /// Range of entry keys to delete /// </summary> [JsonProperty("keyRange")] public KeyRange KeyRange { get; set; } } public sealed class DeleteObjectStoreEntriesCommandResponse : ICommandResponse<DeleteObjectStoreEntriesCommand> { } }
ToCSharp/AsyncChromeDriver
ChromeDevToolsClient/IndexedDB/DeleteObjectStoreEntriesCommand.cs
C#
apache-2.0
1,488
[ 30522, 3415, 15327, 16950, 1012, 18546, 24844, 3406, 27896, 1012, 25331, 18939, 1063, 2478, 8446, 6499, 6199, 1012, 1046, 3385, 1025, 1013, 1013, 1013, 1026, 12654, 1028, 1013, 1013, 1013, 3972, 12870, 1037, 2846, 1997, 10445, 2013, 2019, 4...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
### 2019-02-04 #### python * [vietnguyen91/ASCII-generator (309s/45f)](https://github.com/vietnguyen91/ASCII-generator) : ASCII generator (image to text, image to image, video to video) * [stanfordnlp/stanfordnlp (888s/73f)](https://github.com/stanfordnlp/stanfordnlp) : Official Stanford NLP Python Library for Many Human Languages * [donnemartin/system-design-primer (56,374s/8,163f)](https://github.com/donnemartin/system-design-primer) : Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards. * [j3ssie/IPOsint (85s/12f)](https://github.com/j3ssie/IPOsint) : Discovery IP Address of the target * [3b1b/manim (6,359s/770f)](https://github.com/3b1b/manim) : Animation engine for explanatory math videos * [vinta/awesome-python (61,020s/11,871f)](https://github.com/vinta/awesome-python) : A curated list of awesome Python frameworks, libraries, software and resources * [caronc/apprise (1,635s/41f)](https://github.com/caronc/apprise) : Apprise - Push Notifications that work with just about every platform! * [davidtavarez/pwndb (86s/18f)](https://github.com/davidtavarez/pwndb) : Search for leaked credentials * [TheAlgorithms/Python (21,279s/5,915f)](https://github.com/TheAlgorithms/Python) : All Algorithms implemented in Python * [home-assistant/home-assistant (21,069s/6,091f)](https://github.com/home-assistant/home-assistant) : 🏡 Open source home automation that puts local control and privacy first * [toddmotto/public-apis (47,122s/4,898f)](https://github.com/toddmotto/public-apis) : A collective list of free APIs for use in software and web development. * [tensorflow/models (47,974s/29,269f)](https://github.com/tensorflow/models) : Models and examples built with TensorFlow * [django/django (39,268s/16,925f)](https://github.com/django/django) : The Web framework for perfectionists with deadlines. * [bourdakos1/tfjs-object-detection-training (125s/30f)](https://github.com/bourdakos1/tfjs-object-detection-training) : 🐝 * [mahmoud/awesome-python-applications (6,313s/956f)](https://github.com/mahmoud/awesome-python-applications) : 💿 Free software that works great, and also happens to be open-source Python. * [rg3/youtube-dl (46,835s/8,133f)](https://github.com/rg3/youtube-dl) : Command-line program to download videos from YouTube.com and other video sites * [keras-team/keras (37,942s/14,481f)](https://github.com/keras-team/keras) : Deep Learning for humans * [deepfakes/faceswap (9,155s/2,773f)](https://github.com/deepfakes/faceswap) : Non official project based on original /r/Deepfakes thread. Many thanks to him! * [matterport/Mask_RCNN (10,071s/4,286f)](https://github.com/matterport/Mask_RCNN) : Mask R-CNN for object detection and instance segmentation on Keras and TensorFlow * [google/jax (3,128s/153f)](https://github.com/google/jax) : Composable transformations of Python+NumPy programs: differentiate, vectorize, JIT to GPU/TPU, and more * [scikit-learn/scikit-learn (33,165s/16,281f)](https://github.com/scikit-learn/scikit-learn) : scikit-learn: machine learning in Python * [ageitgey/face_recognition (20,695s/5,296f)](https://github.com/ageitgey/face_recognition) : The world's simplest facial recognition api for Python and the command line * [yodaos-project/yodaos (617s/76f)](https://github.com/yodaos-project/yodaos) : AI OS for Web Community * [python/cpython (22,210s/8,465f)](https://github.com/python/cpython) : The Python programming language * [google-research/bert (11,761s/2,396f)](https://github.com/google-research/bert) : TensorFlow code and pre-trained models for BERT #### go * [derailed/k9s (187s/7f)](https://github.com/derailed/k9s) : 🐶 Kubernetes CLI To Manage Your Clusters In Style! * [uber/aresdb (1,206s/52f)](https://github.com/uber/aresdb) : A GPU-powered real-time analytics storage and query engine. * [urfave/cli (9,857s/837f)](https://github.com/urfave/cli) : A simple, fast, and fun package for building command line apps in Go * [joewalnes/websocketd (13,102s/708f)](https://github.com/joewalnes/websocketd) : Turn any program that uses STDIN/STDOUT into a WebSocket server. Like inetd, but for WebSockets. * [skanehira/docui (208s/10f)](https://github.com/skanehira/docui) : TUI Tool for Docker * [gohugoio/hugo (32,330s/3,701f)](https://github.com/gohugoio/hugo) : The world’s fastest framework for building websites. * [golang/go (52,746s/7,256f)](https://github.com/golang/go) : The Go programming language * [syncthing/syncthing (24,020s/2,020f)](https://github.com/syncthing/syncthing) : Open Source Continuous File Synchronization * [purpleidea/mgmt (1,649s/189f)](https://github.com/purpleidea/mgmt) : Next generation distributed, event-driven, parallel config management! * [FiloSottile/mkcert (17,161s/603f)](https://github.com/FiloSottile/mkcert) : A simple zero-config tool to make locally trusted development certificates with any names you'd like. * [kubernetes/kubernetes (47,762s/16,566f)](https://github.com/kubernetes/kubernetes) : Production-Grade Container Scheduling and Management * [usefathom/fathom (3,896s/158f)](https://github.com/usefathom/fathom) : Fathom. Simple, trustworthy website analytics. Built with Golang & Preact. * [hunterloftis/oneweekend (75s/4f)](https://github.com/hunterloftis/oneweekend) : Ray Tracing book series implemented in Golang, chapter-by-chapter * [ncw/rclone (12,752s/998f)](https://github.com/ncw/rclone) : "rsync for cloud storage" - Google Drive, Amazon Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Cloudfiles, Google Cloud Storage, Yandex Files * [tinygo-org/tinygo (1,774s/61f)](https://github.com/tinygo-org/tinygo) : Go compiler for small devices, based on LLVM. * [go-gitea/gitea (12,219s/1,284f)](https://github.com/go-gitea/gitea) : Git with a cup of tea, painless self-hosted git service * [google/stenographer (1,229s/130f)](https://github.com/google/stenographer) : Stenographer is a packet capture solution which aims to quickly spool all packets to disk, then provide simple, fast access to subsets of those packets. Discussion/announcements at stenographer@googlegroups.com * [drk1wi/Modlishka (1,487s/266f)](https://github.com/drk1wi/Modlishka) : Modlishka. Reverse Proxy. Phishing NG. * [grafana/loki (5,220s/213f)](https://github.com/grafana/loki) : Like Prometheus, but for logs. * [avelino/awesome-go (39,595s/5,138f)](https://github.com/avelino/awesome-go) : A curated list of awesome Go frameworks, libraries and software * [bxcodec/faker (547s/37f)](https://github.com/bxcodec/faker) : Go (Golang) Fake Data Generator for Struct * [junegunn/fzf (19,397s/746f)](https://github.com/junegunn/fzf) : 🌸 A command-line fuzzy finder * [bettercap/bettercap (3,898s/358f)](https://github.com/bettercap/bettercap) : The Swiss Army knife for 802.11, BLE and Ethernet networks reconnaissance and MITM attacks. * [v2ray/v2ray-core (13,097s/2,890f)](https://github.com/v2ray/v2ray-core) : A platform for building proxies to bypass network restrictions. * [mholt/caddy (20,342s/1,591f)](https://github.com/mholt/caddy) : Fast, cross-platform HTTP/2 web server with automatic HTTPS #### swift * [Ramotion/folding-cell (8,915s/1,050f)](https://github.com/Ramotion/folding-cell) : 📃 FoldingCell is an expanding content cell with animation made by @Ramotion - https://dev.ramotion.com/gthbr * [iina/iina (17,125s/1,279f)](https://github.com/iina/iina) : The modern video player for macOS. * [IdeasOnCanvas/Aiolos (1,034s/35f)](https://github.com/IdeasOnCanvas/Aiolos) : A floating panel for your iOS Apps * [tailec/ios-architecture (176s/12f)](https://github.com/tailec/ios-architecture) : A collection of iOS architectures - MVC, MVVM, MVVM+RxSwift, VIPER, RIBs and many others * [Ramotion/swift-ui-animation-components-and-libraries (1,667s/161f)](https://github.com/Ramotion/swift-ui-animation-components-and-libraries) : Swift UI libraries, iOS components and animations by @Ramotion - https://dev.ramotion.com/gthbr * [app-developers/top (1,185s/71f)](https://github.com/app-developers/top) : Top App Developers - February 2019 * [vsouza/awesome-ios (29,614s/4,921f)](https://github.com/vsouza/awesome-ios) : A curated list of awesome iOS ecosystem, including Objective-C and Swift Projects * [JohnCoates/Aerial (13,427s/739f)](https://github.com/JohnCoates/Aerial) : Apple TV Aerial Screensaver for Mac * [yagiz/Bagel (1,883s/75f)](https://github.com/yagiz/Bagel) : a little native network debugging tool for iOS * [HeroTransitions/Hero (15,893s/1,241f)](https://github.com/HeroTransitions/Hero) : Elegant transition library for iOS & tvOS * [dkhamsing/open-source-ios-apps (19,184s/3,164f)](https://github.com/dkhamsing/open-source-ios-apps) : 📱 Collaborative List of Open-Source iOS Apps * [twostraws/SwiftOnSundays (58s/2f)](https://github.com/twostraws/SwiftOnSundays) : Completed projects for the Swift on Sundays livestream series * [raywenderlich/swift-algorithm-club (19,430s/3,221f)](https://github.com/raywenderlich/swift-algorithm-club) : Algorithms and data structures in Swift, with explanations! * [onevcat/Kingfisher (13,511s/1,474f)](https://github.com/onevcat/Kingfisher) : A lightweight, pure-Swift library for downloading and caching images from the web. * [SnapKit/SnapKit (14,365s/1,379f)](https://github.com/SnapKit/SnapKit) : A Swift Autolayout DSL for iOS & OS X * [IvanVorobei/SPPermission (2,530s/166f)](https://github.com/IvanVorobei/SPPermission) : Simple request permission with native UI and interactive animation * [Alamofire/Alamofire (30,081s/5,354f)](https://github.com/Alamofire/Alamofire) : Elegant HTTP Networking in Swift * [LeoMobileDeveloper/ios-developer-tools (462s/42f)](https://github.com/LeoMobileDeveloper/ios-developer-tools) : A collection of tools that an iOS developer should know. * [ReactiveX/RxSwift (15,522s/2,553f)](https://github.com/ReactiveX/RxSwift) : Reactive Programming in Swift * [Juanpe/SkeletonView (6,719s/441f)](https://github.com/Juanpe/SkeletonView) : An elegant way to show users that something is happening and also prepare them to which contents he is waiting * [isavynskyi/LayoutInspector (275s/9f)](https://github.com/isavynskyi/LayoutInspector) : Tool to debug layouts directly on iOS devices: inspect layers in 3D and debug each visible view attributes * [danielgindi/Charts (20,207s/3,892f)](https://github.com/danielgindi/Charts) : Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart. * [matteocrippa/awesome-swift (16,483s/2,314f)](https://github.com/matteocrippa/awesome-swift) : A collaborative list of awesome Swift libraries and resources. Feel free to contribute! * [exyte/Macaw (4,109s/317f)](https://github.com/exyte/Macaw) : Powerful and easy-to-use vector graphics Swift library with SVG support * [mxcl/Path.swift (479s/12f)](https://github.com/mxcl/Path.swift) : Delightful, robust, cross-platform and chainable file-pathing functions. #### ruby * [amatsuda/heavens_door (362s/9f)](https://github.com/amatsuda/heavens_door) : Capybara test scenario recorder for Rails * [Homebrew/brew (16,129s/3,577f)](https://github.com/Homebrew/brew) : 🍺 The missing package manager for macOS (or Linux) * [komeiji-satori/Dress (6,467s/844f)](https://github.com/komeiji-satori/Dress) : 好耶 是女装 * [Linuxbrew/homebrew-core (329s/164f)](https://github.com/Linuxbrew/homebrew-core) : 🍻🐧 Core formulae for the Linuxbrew package manager * [Linuxbrew/brew (2,419s/211f)](https://github.com/Linuxbrew/brew) : 🍺🐧 The Homebrew package manager for Linux * [jekyll/jekyll (36,736s/8,024f)](https://github.com/jekyll/jekyll) : 🌐 Jekyll is a blog-aware static site generator in Ruby * [rails/rails (42,042s/16,976f)](https://github.com/rails/rails) : Ruby on Rails * [twalpole/apparition (45s/2f)](https://github.com/twalpole/apparition) : Capybara driver for Chrome using CDP * [rapid7/metasploit-framework (15,103s/7,730f)](https://github.com/rapid7/metasploit-framework) : Metasploit Framework * [tootsuite/mastodon (16,577s/2,935f)](https://github.com/tootsuite/mastodon) : Your self-hosted, globally interconnected microblogging community * [Homebrew/homebrew-core (5,192s/5,737f)](https://github.com/Homebrew/homebrew-core) : 🍻 Default formulae for the missing package manager for macOS * [discourse/discourse (27,309s/6,327f)](https://github.com/discourse/discourse) : A platform for community discussion. Free, open, simple. * [bayandin/awesome-awesomeness (23,568s/2,965f)](https://github.com/bayandin/awesome-awesomeness) : A curated list of awesome awesomeness * [grosser/parallel (3,119s/205f)](https://github.com/grosser/parallel) : Ruby: parallel processing made simple and fast * [fastlane/fastlane (24,387s/3,716f)](https://github.com/fastlane/fastlane) : 🚀 The easiest way to automate building and releasing your iOS and Android apps * [fxn/zeitwerk (294s/3f)](https://github.com/fxn/zeitwerk) : Efficient and thread-safe code loader for Ruby * [saasbook/hw-ruby-intro (65s/2,880f)](https://github.com/saasbook/hw-ruby-intro) : Ruby Introduction Assignment for Agile Development using Ruby on Rails * [citation-style-language/styles (1,542s/2,125f)](https://github.com/citation-style-language/styles) : Official repository for Citation Style Language (CSL) citation styles. * [saasbook/hw-sinatra-saas-hangperson (24s/1,509f)](https://github.com/saasbook/hw-sinatra-saas-hangperson) : * [Homebrew/homebrew-cask-fonts (1,206s/265f)](https://github.com/Homebrew/homebrew-cask-fonts) : 🖋 Casks of F🅾𝓝𝐓𝚂 * [Foodcritic/foodcritic (417s/168f)](https://github.com/Foodcritic/foodcritic) : Lint tool for Chef cookbooks. * [premailer/css_parser (208s/92f)](https://github.com/premailer/css_parser) : Ruby CSS Parser * [github/licensed (416s/41f)](https://github.com/github/licensed) : A Ruby gem to cache and verify the licenses of dependencies * [bigbluebutton/greenlight (42s/114f)](https://github.com/bigbluebutton/greenlight) : A really simple end-user interface for your BigBlueButton server. * [mu29/danbi (122s/182f)](https://github.com/mu29/danbi) : 오픈 소스 게임 엔진 #### javascript * [nextapps-de/flexsearch (1,292s/20f)](https://github.com/nextapps-de/flexsearch) : Next-Generation full text search library for Browser and Node.js * [tyroprogrammer/learn-react-app (1,817s/110f)](https://github.com/tyroprogrammer/learn-react-app) : Application that will help you learn React fundamentals. Install this application locally - there's tutorial, code snippets and exercises. The main objective of this project is to help you get off the ground with React! * [vadimdemedes/ink (8,320s/181f)](https://github.com/vadimdemedes/ink) : 🌈 React for interactive command-line apps * [justinribeiro/speedometer-pwa (129s/4f)](https://github.com/justinribeiro/speedometer-pwa) : A tiny no-frills speedometer progressive web app based on Geolocation API, AmbientLightSensor API, and WakeLock API. * [gothinkster/realworld (22,334s/1,472f)](https://github.com/gothinkster/realworld) : "The mother of all demo apps" — Exemplary fullstack Medium.com clone powered by React, Angular, Node, Django, and many more 🏅 * [ksky521/nodeppt (5,612s/1,489f)](https://github.com/ksky521/nodeppt) : This is probably the best web presentation tool so far! * [myliang/x-spreadsheet (3,124s/158f)](https://github.com/myliang/x-spreadsheet) : A web-based JavaScript(canvas) spreadsheet * [facebook/react (121,371s/21,996f)](https://github.com/facebook/react) : A declarative, efficient, and flexible JavaScript library for building user interfaces. * [vuejs/vue (126,974s/18,106f)](https://github.com/vuejs/vue) : 🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web. * [Annihil/github-spray (275s/11f)](https://github.com/Annihil/github-spray) : 👾Draw on your GitHub contribution graph ░▒▓█ * [mohitk05/react-insta-stories (66s/2f)](https://github.com/mohitk05/react-insta-stories) : A React component for Instagram like stories * [nukeop/nuclear (4,000s/266f)](https://github.com/nukeop/nuclear) : Desktop music player for streaming from free sources * [facebook/create-react-app (63,025s/13,829f)](https://github.com/facebook/create-react-app) : Set up a modern web app by running one command. * [antonmedv/fx (6,636s/215f)](https://github.com/antonmedv/fx) : Command-line tool and terminal JSON viewer 🔥 * [knsv/mermaid (22,010s/1,268f)](https://github.com/knsv/mermaid) : Generation of diagram and flowchart from text in a similar manner as markdown * [facebook/react-native (73,495s/16,375f)](https://github.com/facebook/react-native) : A framework for building native apps with React. * [gatsbyjs/gatsby (31,100s/4,109f)](https://github.com/gatsbyjs/gatsby) : Build blazing fast, modern apps and websites with React * [mozilla/readability (1,900s/250f)](https://github.com/mozilla/readability) : A standalone version of the readability lib * [gaearon/overreacted.io (2,732s/369f)](https://github.com/gaearon/overreacted.io) : Personal blog by Dan Abramov. * [leonardomso/33-js-concepts (25,397s/2,287f)](https://github.com/leonardomso/33-js-concepts) : 📜 33 concepts every JavaScript developer should know. * [trekhleb/javascript-algorithms (43,830s/5,902f)](https://github.com/trekhleb/javascript-algorithms) : 📝 Algorithms and data structures implemented in JavaScript with explanations and links to further readings * [i0natan/nodebestpractices (24,828s/1,819f)](https://github.com/i0natan/nodebestpractices) : The largest Node.js best practices list (January 2019) * [didi/chameleon (1,703s/99f)](https://github.com/didi/chameleon) : 真正专注于让一套代码运行多端的开发框架,提供标准的MVVM架构开发模式统一各类终端 * [airbnb/javascript (81,322s/15,519f)](https://github.com/airbnb/javascript) : JavaScript Style Guide * [nodejs/node (57,857s/12,806f)](https://github.com/nodejs/node) : Node.js JavaScript runtime ✨🐢🚀✨ #### objective-c * [sequelpro/sequelpro (6,008s/523f)](https://github.com/sequelpro/sequelpro) : MySQL/MariaDB database management for macOS * [expo/expo (5,174s/486f)](https://github.com/expo/expo) : The Expo platform for making cross-platform mobile apps * [airbnb/lottie-ios (16,118s/2,184f)](https://github.com/airbnb/lottie-ios) : An iOS library to natively render After Effects vector animations * [MacPass/MacPass (4,531s/327f)](https://github.com/MacPass/MacPass) : A native OS X KeePass client * [google/promises (2,444s/125f)](https://github.com/google/promises) : Promises is a modern framework that provides a synchronization construct for Swift and Objective-C. * [chirag04/react-native-mail (339s/160f)](https://github.com/chirag04/react-native-mail) : A wrapper on top of MFMailComposeViewController from iOS and Mail Intent on android * [material-components/material-components-ios (3,130s/504f)](https://github.com/material-components/material-components-ios) : Modular and customizable Material Design UI components for iOS * [underscopeio/react-native-facebook-account-kit (255s/100f)](https://github.com/underscopeio/react-native-facebook-account-kit) : Facebook Account Kit SDK wrapper for React Native * [apptreesoftware/flutter_barcode_reader (131s/75f)](https://github.com/apptreesoftware/flutter_barcode_reader) : A flutter plugin for reading 2D barcodes and QR codes. * [react-native-sensors/react-native-sensors (395s/97f)](https://github.com/react-native-sensors/react-native-sensors) : A developer friendly approach for sensors in React Native * [videolan/vlckit (79s/25f)](https://github.com/videolan/vlckit) : libvlc bindings for OS X, iOS and tvOS in Objective-C, official mirror * [master-atul/react-native-exception-handler (585s/53f)](https://github.com/master-atul/react-native-exception-handler) : A react native module that lets you to register a global error handler that can capture fatal/non fatal uncaught exceptions. * [renzifeng/ZFPlayer (5,183s/1,220f)](https://github.com/renzifeng/ZFPlayer) : Support customization of any player SDK and control layer(支持定制任何播放器SDK和控制层) * [apache/cordova-plugin-statusbar (483s/328f)](https://github.com/apache/cordova-plugin-statusbar) : Apache Cordova * [muhku/FreeStreamer (1,759s/380f)](https://github.com/muhku/FreeStreamer) : A low-memory footprint streaming audio player for iOS and OS X * [AFNetworking/AFNetworking (31,896s/9,722f)](https://github.com/AFNetworking/AFNetworking) : A delightful networking framework for iOS, macOS, watchOS, and tvOS. * [SDWebImage/SDWebImage (21,016s/5,342f)](https://github.com/SDWebImage/SDWebImage) : Asynchronous image downloader with cache support as a UIImageView category * [BradLarson/GPUImage (18,305s/4,370f)](https://github.com/BradLarson/GPUImage) : An open source iOS framework for GPU-based image and video processing * [SnapKit/Masonry (17,122s/3,081f)](https://github.com/SnapKit/Masonry) : Harness the power of AutoLayout NSLayoutConstraints with a simplified, chainable and expressive syntax. Supports iOS and OSX Auto Layout * [jdg/MBProgressHUD (15,051s/3,432f)](https://github.com/jdg/MBProgressHUD) : MBProgressHUD + Customizations * [realm/realm-cocoa (12,891s/1,656f)](https://github.com/realm/realm-cocoa) : Realm is a mobile database: a replacement for Core Data & SQLite * [ccgus/fmdb (12,862s/2,762f)](https://github.com/ccgus/fmdb) : A Cocoa / Objective-C wrapper around SQLite * [ibireme/YYKit (12,796s/3,367f)](https://github.com/ibireme/YYKit) : A collection of iOS components. * [hackiftekhar/IQKeyboardManager (12,649s/2,023f)](https://github.com/hackiftekhar/IQKeyboardManager) : Codeless drop-in universal library allows to prevent issues of keyboard sliding up and cover UITextField/UITextView. Neither need to write any code nor any setup required and much more. * [CoderMJLee/MJRefresh (12,512s/3,443f)](https://github.com/CoderMJLee/MJRefresh) : An easy way to use pull-to-refresh.
henson/Scraper
2019/02/2019-02-04.md
Markdown
apache-2.0
21,902
[ 30522, 1001, 1001, 1001, 10476, 1011, 6185, 1011, 5840, 1001, 1001, 1001, 1001, 18750, 1008, 1031, 19710, 3070, 26230, 2368, 2683, 2487, 1013, 2004, 6895, 2072, 1011, 13103, 1006, 25048, 2015, 1013, 3429, 2546, 1007, 1033, 1006, 16770, 1024...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# encoding: utf-8 require "bprum_shop_api/version" require 'bcrypt' require 'json' module BprumShopApi class Api def initialize(my_key,remote_key,remote_path,remote_host,remote_port=80,charset='utf-8') @my_key = my_key @remote_port = remote_port @remote_key = remote_key @remote_path = remote_path @remote_host = remote_host @charset = charset @number_of_message = 0 @out_file = File.open('log/api.log','a') log_write("API class initializied") end def log_write(message) @number_of_message += 1 puts @number_of_message.to_s + ": \t" + message + " - in: "+Time.now.to_s+" \n" @out_file.write( @number_of_message.to_s + ": \t" + message + "\n") end def checkRequest(request) begin log_write("cheking request: \n\t|type::"+request.class.to_s+" \n\t|content::"+request.to_s) parsed=JSON.parse(request.force_encoding('UTF-8')) log_write("respond JSON is:\n"+parsed.inspect) arr=parsed["request_body"].sort log_write("sorted content:\n"+arr.inspect) #order_hash=arr.to_h order_hash=arr.inject({}) do |r, s| r.merge!({s[0] => s[1]}) end mysign=Digest::SHA2.hexdigest(order_hash.to_json+@my_key).to_s log_write("signature of this request must be:\n"+mysign) log_write("signature of this request:\n"+parsed["sign"]) if mysign==parsed["sign"] log_write("this request is valid") return parsed["request_body"] else log_write("this request is invalid") false end rescue Exception => e log_write("fatal "+e.message+"::\n"+e.backtrace.join("\n")) end end def signRequest(params) log_write("now generating signature for new request") arr=params[:request_body].sort params[:request_body]=arr.to_h Digest::SHA2.hexdigest(params[:request_body].to_json+@remote_key).to_s end def requestProcessor(params) hash=params hash[:sign]=signRequest(params) hash=hash.to_json result={} Net::HTTP.start(@remote_host) do |http| req = Net::HTTP::Post.new(@remote_path,initheader = {'Content-Type' =>'application/json','Encoding'=>'utf-8'}) req.body = hash begin response = http.request(req) if response.class.to_s == 'Net::HTTPOK' puts response.inspect puts response.value puts "returned BODY is:",response.body result = JSON.parse(response.body) else puts response.inspect end rescue result["access"]="unknow" result["reason"]="connection lost" end end if result["access"]=="granted" or result["access"]=="unknow" result elsif result["access"]=="denied" result else false end end end end
nottewae/bprum_shop_api
lib/bprum_shop_api.rb
Ruby
mit
2,939
[ 30522, 1001, 17181, 1024, 21183, 2546, 1011, 1022, 5478, 1000, 17531, 6824, 1035, 4497, 1035, 17928, 1013, 2544, 1000, 5478, 1005, 4647, 2854, 13876, 1005, 5478, 1005, 1046, 3385, 1005, 11336, 17531, 6824, 22231, 4502, 8197, 2465, 17928, 13...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE TS> <TS version="2.0" language="hi_IN"> <defaultcodec>UTF-8</defaultcodec> <context> <name>NdefManager</name> <message> <location filename="../ndefmanager.cpp" line="95"/> <location filename="../ndefmanager.cpp" line="321"/> <source>NFC hardware is available but currently switched off.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="97"/> <location filename="../ndefmanager.cpp" line="313"/> <source>NFC is supported and switched on.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="102"/> <source>Update device firmware to enable NFC support.</source> <translation>यह अनुप्रयोग चलाने के लिए कृपया अपनी डिवाइस फार्मबेयार अपडेट करें</translation> </message> <message> <location filename="../ndefmanager.cpp" line="106"/> <source>NFC not supported by this device.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="305"/> <source>NFC is not currently supported.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="309"/> <source>NFC is supported, but the current mode is unknown at this time.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="317"/> <source>NFC hardware is available and currently in card emulation mode.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="337"/> <source>Unable to query NFC feature support.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="341"/> <source>Unable to query device software version.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="345"/> <source>Unable to request NFC mode change notifications.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="349"/> <source>NFC mode change notification was received, but caused an error.</source> <translation type="unfinished"></translation> </message> <message> <location filename="../ndefmanager.cpp" line="353"/> <source>Unable to retrieve current NFC mode.</source> <translation type="unfinished"></translation> </message> </context> </TS>
andijakl/nfccorkboard
loc/NfcCorkboard_hi.ts
TypeScript
gpl-3.0
3,041
[ 30522, 1026, 1029, 20950, 2544, 1027, 1000, 1015, 1012, 1014, 1000, 17181, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1029, 1028, 1026, 999, 9986, 13874, 24529, 1028, 1026, 24529, 2544, 1027, 1000, 1016, 1012, 1014, 1000, 2653, 1027, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// =============================================================================== // Website: https://yi.team/ // Copyright © Yi.TEAM. All rights reserved. // =============================================================================== using System; using System.IO; using System.Security.Cryptography; using System.Text; namespace Yisoft.Framework.Security.Cryptography { /// <summary> /// 提供对基于哈希的消息验证代码 (HMAC) 的常用操作的封装。 /// </summary> public static class HMACHelper { /// <summary> /// 计算指定字节数组的哈希值。 /// </summary> /// <typeparam name="T">指定一个 <see cref="HMAC"/> 算法的实现。</typeparam> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <returns>计算所得的哈希代码。</returns> public static byte[] ComputeHash<T>(Stream input, byte[] key) where T : HMAC, new() { using (var s = new T()) { s.Key = key; return s.ComputeHash(input); } } /// <summary> /// 计算指定字节数组的哈希值。 /// </summary> /// <typeparam name="T">指定一个 <see cref="HMAC"/> 算法的实现。</typeparam> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <returns>计算所得的哈希代码。</returns> public static byte[] ComputeHash<T>(byte[] input, byte[] key) where T : HMAC, new() { using (var s = new T()) { s.Key = key; return s.ComputeHash(input); } } /// <summary> /// 计算指定字节数组的哈希值。 /// </summary> /// <typeparam name="T">指定一个 <see cref="HMAC"/> 算法的实现。</typeparam> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <param name="lowerCase">表示输出是否应为小写形式的 <see cref="bool"/>,默认为 false。</param> /// <param name="encoding">字符编码,默认使用 <see cref="Encoding.UTF8"/>。</param> /// <returns>返回表示计算所得的哈希代码的字符串。</returns> public static string ComputeHash<T>(string input, string key, bool lowerCase = true, Encoding encoding = null) where T : HMAC, new() { if (encoding == null) encoding = Encoding.UTF8; var hashValue = BitConverter.ToString(ComputeHash<T>(encoding.GetBytes(input), encoding.GetBytes(key))); return lowerCase ? hashValue.ToLower() : hashValue; } /// <summary> /// 使用 <see cref="HMACMD5"/> 计算指定字节数组的哈希值。 /// </summary> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <param name="lowerCase">表示输出是否应为小写形式的 <see cref="bool"/>,默认为 false。</param> /// <param name="encoding">字符编码,默认使用 <see cref="Encoding.UTF8"/>。</param> /// <returns>返回表示计算所得的哈希代码的字符串。</returns> public static string HMACMD5(string input, string key, bool lowerCase = true, Encoding encoding = null) { return ComputeHash<HMACMD5>(input, key, lowerCase, encoding); } /// <summary> /// 使用 <see cref="HMACSHA1"/> 计算指定字节数组的哈希值。 /// </summary> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <param name="lowerCase">表示输出是否应为小写形式的 <see cref="bool"/>,默认为 false。</param> /// <param name="encoding">字符编码,默认使用 <see cref="Encoding.UTF8"/>。</param> /// <returns>返回表示计算所得的哈希代码的字符串。</returns> public static string HMACSHA1(string input, string key, bool lowerCase = true, Encoding encoding = null) { return ComputeHash<HMACSHA1>(input, key, lowerCase, encoding); } /// <summary> /// 使用 <see cref="HMACSHA256"/> 计算指定字节数组的哈希值。 /// </summary> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <param name="lowerCase">表示输出是否应为小写形式的 <see cref="bool"/>,默认为 false。</param> /// <param name="encoding">字符编码,默认使用 <see cref="Encoding.UTF8"/>。</param> /// <returns>返回表示计算所得的哈希代码的字符串。</returns> public static string HMACSHA256(string input, string key, bool lowerCase = true, Encoding encoding = null) { return ComputeHash<HMACSHA256>(input, key, lowerCase, encoding); } /// <summary> /// 使用 <see cref="HMACSHA384"/> 计算指定字节数组的哈希值。 /// </summary> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <param name="lowerCase">表示输出是否应为小写形式的 <see cref="bool"/>,默认为 false。</param> /// <param name="encoding">字符编码,默认使用 <see cref="Encoding.UTF8"/>。</param> /// <returns>返回表示计算所得的哈希代码的字符串。</returns> public static string HMACSHA384(string input, string key, bool lowerCase = true, Encoding encoding = null) { return ComputeHash<HMACSHA384>(input, key, lowerCase, encoding); } /// <summary> /// 使用 <see cref="HMACSHA512"/> 计算指定字节数组的哈希值。 /// </summary> /// <param name="input">要计算其哈希代码的输入。</param> /// <param name="key">加密的机密密钥。密钥的长度不限,但如果超过 64 个字节,就会对其进行哈希计算(使用 SHA-1),以派生一个 64 个字节的密钥。因此,建议的密钥大小为 64 个字节。</param> /// <param name="lowerCase">表示输出是否应为小写形式的 <see cref="bool"/>,默认为 false。</param> /// <param name="encoding">字符编码,默认使用 <see cref="Encoding.UTF8"/>。</param> /// <returns>返回表示计算所得的哈希代码的字符串。</returns> public static string HMACSHA512(string input, string key, bool lowerCase = true, Encoding encoding = null) { return ComputeHash<HMACSHA512>(input, key, lowerCase, encoding); } } }
yisoft-dotnet/framework
src/Yisoft.Framework/Security/Cryptography/HMACHelper.cs
C#
apache-2.0
8,406
[ 30522, 1013, 1013, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 102...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2011 MOPAS(Ministry of Public Administration and Security). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package egovframework.rte.tex.com.service; import egovframework.rte.tex.mbr.service.MemberVO; /** * 메일기능에 관한 인터페이스를 정의한다. * @author 실행환경 개발팀 신혜연 * @since 2011.06.07 * @version 1.0 * @see <pre> * == 개정이력(Modification Information) == * * 수정일 수정자 수정내용 * ------- -------- --------------------------- * 2011.06.07 신혜연 최초 생성 * * </pre> */ public interface EgovMailService { /** * 회원 정보를 사용하여 회원에게 메일을 전송한다. * @param vo * @return 메일전송 여부 */ public boolean sendEmailTo(MemberVO vo); }
SunghyunLim/easyCompany3
src/main/java/egovframework/rte/tex/com/service/EgovMailService.java
Java
apache-2.0
1,369
[ 30522, 1013, 1008, 1008, 9385, 2249, 9587, 19707, 1006, 3757, 1997, 2270, 3447, 1998, 3036, 1007, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 30524, 1012, 15895, 1012, 8917, 1013, 15943, 1013, 6105, 1011, 1016, 1012, 1014, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- layout: page title: "Brian Donald Kelly" comments: true description: "blanks" keywords: "Brian Donald Kelly,CU,Boulder" --- <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script> <!-- <script src="../assets/js/highcharts.js"></script> --> <style type="text/css">@font-face { font-family: "Bebas Neue"; src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype"); } h1.Bebas { font-family: "Bebas Neue", Verdana, Tahoma; } </style> </head> #### TEACHING INFORMATION **College**: College of Music **Classes taught**: MUEL 4081, MUSC 4081, MUSC 4111 #### MUEL 4081: Introduction to Music Technology **Terms taught**: Fall 2014, Spring 2015, Spring 2016 **Instructor rating**: 5.94 **Standard deviation in instructor rating**: 0.05 **Average grade** (4.0 scale): 3.74 **Standard deviation in grades** (4.0 scale): 0.16 **Average workload** (raw): 2.82 **Standard deviation in workload** (raw): 0.51 #### MUSC 4081: Introduction to Music Technology **Terms taught**: Fall 2014, Spring 2015, Spring 2016 **Instructor rating**: 5.74 **Standard deviation in instructor rating**: 0.31 **Average grade** (4.0 scale): 3.8 **Standard deviation in grades** (4.0 scale): 0.07 **Average workload** (raw): 2.25 **Standard deviation in workload** (raw): 0.14 #### MUSC 4111: Composing at the Computer **Terms taught**: Fall 2015 **Instructor rating**: 5.57 **Standard deviation in instructor rating**: 0.0 **Average grade** (4.0 scale): 3.89 **Standard deviation in grades** (4.0 scale): 0.0 **Average workload** (raw): 2.38 **Standard deviation in workload** (raw): 0.0
nikhilrajaram/nikhilrajaram.github.io
instructors/Brian_Donald_Kelly.md
Markdown
mit
1,774
[ 30522, 1011, 1011, 1011, 9621, 1024, 3931, 2516, 1024, 1000, 4422, 6221, 5163, 1000, 7928, 1024, 2995, 6412, 1024, 1000, 8744, 2015, 1000, 3145, 22104, 1024, 1000, 4422, 6221, 5163, 1010, 12731, 1010, 13264, 1000, 1011, 1011, 1011, 1026, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#!/usr/bin/env julia using ArgParse s = ArgParseSettings() @add_arg_table s begin "config" help = "a YAML configuration file" default = "config.yaml" end parsed_args = parse_args(ARGS, s) import YAML config = YAML.load(open(parsed_args["config"])) # Make some diagnostic plots to show what the model looks like in analytic terms using DiskJockey.tmodel using DiskJockey.constants import PyPlot.plt using LaTeXStrings # velocity structure function plot_vel(pars::Parameters, grid) vels = DiskJockey.tmodel.velocity(grid.rs, pars) .* 1e-5 # convert from cm/s to km/s fig = plt[:figure]() ax = fig[:add_subplot](111) ax[:semilogx](rr, vels) # Now, go overlay small grey lines vertically for cell_edge in grid.Rs/AU ax[:axvline](cell_edge, color="0.5", lw=0.4) end ax[:set_ylabel](L"$v_\phi$ [km/s]") ax[:set_xlabel](L"$r$ [AU]") fig[:subplots_adjust](left=0.15, bottom=0.15, right=0.85) plt[:savefig]("velocity.png") end # temperature structure function plot_temp(pars::Parameters, grid) temps = DiskJockey.tmodel.temperature(grid.rs, pars) fig = plt[:figure]() ax = fig[:add_subplot](111) ax[:semilogx](rr, temps) # Now, go overlay small grey lines vertically for cell_edge in grid.Rs/AU ax[:axvline](cell_edge, color="0.5", lw=0.4) end ax[:set_ylabel](L"$T$ [K]") ax[:set_xlabel](L"$r$ [AU]") fig[:subplots_adjust](left=0.15, bottom=0.15, right=0.85) plt[:savefig]("temperature.png") end # scale height function plot_height(pars::Parameters, grid) heights = DiskJockey.tmodel.Hp(grid.rs, pars) ./ AU fig = plt[:figure]() ax = fig[:add_subplot](111) ax[:semilogx](rr, heights) ax[:set_ylabel](L"$H_p$ [AU]") ax[:set_xlabel](L"$r$ [AU]") fig[:subplots_adjust](left=0.15, bottom=0.15, right=0.85) plt[:savefig]("scale_height.png") end function plot_surface_density(pars::Parameters, grid) # Sigmas = DiskJockey.model.Sigma(grid.rs, pars) fig = plt[:figure]() ax = fig[:add_subplot](111) Sigmas = Array(Float64, grid.nr) for i=1:grid.nr Sigmas[i] = DiskJockey.tmodel.Sigma(grid.rs[i], pars) end ax[:loglog](rr, Sigmas) # Now, go overlay small grey lines vertically for cell_edge in grid.Rs/AU ax[:axvline](cell_edge, color="0.5", lw=0.4) end ax[:set_ylabel](L"$\Sigma\, [\mathrm{g/cm}^2]$") ax[:set_xlabel](L"$r$ [AU]") fig[:subplots_adjust](left=0.15, bottom=0.15, right=0.85) plt[:savefig]("surface_density.png") end # density structure function plot_dens(pars::Parameters, grid) # Instead of spherical coordinates, do this with cartesian nz = 64 zs = linspace(0.0, 420 * AU, nz) zz = zs./AU nr = grid.nr rs = grid.rs xx = Array(Float64, (nz, nr)) yy = Array(Float64, (nz, nr)) rhos = Array(Float64, (nz, nr)) for i=1:nz xx[i, :] = rr end for j=1:nr yy[:, j] = zz end for i=1:nz for j=1:nr rhos[i,j] = tmodel.rho_gas(grid.rs[j], zs[i], pars) end end nlog = log10(rhos/(mu_gas * m_H)) levels = Float64[0.0, 1.0, 2.0, 3.0, 4.0, 5, 6, 7, 8, 9] fig = plt[:figure]() ax = fig[:add_subplot](111) ax[:set_ylabel](L"$z$ [AU]") ax[:set_xlabel](L"$r$ [AU]") #ticks = np.linspace(0, np.max(cov), num=6) #cb.set_ticks(ticks) #cb.set_ticks(MaxNLocator(nbins=5)) #Plot the contoured density in cylindrical coordinates, then plot the spherical grid on top of it? # Do this by plotting a bunch of lines # First, the radial lines # Basically, each of these originates from x = 0, z = 0, and has a slope of theta # for theta in (pi/2 - grid.Thetas) # slope = tan(theta) # ax[:plot](rr, slope .* rr, "k", lw=0.1) # end # # # Arcs # xs = Array(Float64, (grid.ntheta + 1)) # ys = Array(Float64, (grid.ntheta + 1)) # # for r in rr # for (i, theta) in enumerate(pi/2 - grid.Thetas) # xs[i] = cos(theta) * r # ys[i] = sin(theta) * r # end # ax[:plot](xs, ys, "k", lw=0.1) # end # # ax[:set_ylim](0, maximum(zz)) img = ax[:contourf](xx, yy, nlog, levels=levels) ax[:set_xscale]("log") # Now, go overlay small grey lines vertically for cell_edge in grid.Rs/AU ax[:axvline](cell_edge, color="0.5", lw=0.4) end fig[:subplots_adjust](left=0.15, bottom=0.15, right=0.77) cax = fig[:add_axes]([0.82, 0.22, 0.03, 0.65]) cb = fig[:colorbar](img, cax=cax) plt[:savefig]("density.png") end pp = config["parameters"] params = ["M_star", "r_in", "r_out", "T_10", "q", "gamma", "logM_gas", "ksi", "dpc", "incl", "PA", "vel", "mu_RA", "mu_DEC"] nparam = length(params) starting_param = Array(Float64, nparam) for i=1:nparam starting_param[i] = pp[params[i]][1] end starting_param[7] = 10^starting_param[7] pars = Parameters(starting_param...) grd = config["grid"] grid = Grid(grd["nr"], grd["ntheta"], grd["r_in"], grd["r_out"], true) # The cell centers const global rr = grid.rs ./ AU # convert to AU plot_vel(pars, grid) plot_temp(pars, grid) plot_height(pars, grid) plot_dens(pars, grid) plot_surface_density(pars, grid)
iancze/JudithExcalibur
attic/plot_tstructure.jl
Julia
mit
5,278
[ 30522, 1001, 999, 1013, 2149, 2099, 1013, 8026, 1013, 4372, 2615, 6423, 2478, 12098, 30524, 2015, 1006, 1007, 1030, 5587, 1035, 12098, 2290, 1035, 2795, 1055, 4088, 1000, 9530, 8873, 2290, 1000, 2393, 1027, 1000, 1037, 8038, 19968, 9563, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * * Copyright (C) 2010 NXP Semiconductors * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include <linux/nfc/pn547_lge.h> #include <linux/nfc/pn547_lge_hwadapter.h> #include <linux/of_gpio.h> #include <linux/wakelock.h> #define NFC_POWER_OFF false #define NFC_POWER_ON true #define NFC_PACKET_HEADER false #define NFC_PACKET_DATA true #define MAX_BUFFER_SIZE 512 #define pn547_RESET_CMD 0 #define pn547_DOWNLOAD_CMD 1 #ifdef CONFIG_LGE_NFC_SET_IRQ_WAKEUP static bool sIrqState = false; #endif static bool sReadSequence = NFC_PACKET_HEADER; static bool sPowerState = NFC_POWER_OFF; static struct i2c_client *pn547_client; struct wake_lock nfc_wake_lock; static void pn547_parse_dt(struct device *dev, struct pn547_dev *pn547_dev) { struct device_node *np = dev->of_node; /* irq gpio info */ pn547_dev->ven_gpio = of_get_named_gpio_flags(np, "nxp,gpio_ven", 0, NULL); pn547_dev->firm_gpio = of_get_named_gpio_flags(np, "nxp,gpio_mode", 0, NULL); pn547_dev->irq_gpio = of_get_named_gpio_flags(np, "nxp,gpio_irq", 0, NULL); } static void pn547_disable_irq(struct pn547_dev *pn547_dev) { unsigned long flags; spin_lock_irqsave(&pn547_dev->irq_enabled_lock, flags); if (pn547_dev->irq_enabled) { disable_irq_nosync(pn547_get_irq_pin(pn547_dev)); disable_irq_wake(pn547_get_irq_pin(pn547_dev)); pn547_dev->irq_enabled = false; } spin_unlock_irqrestore(&pn547_dev->irq_enabled_lock, flags); } static void pn547_enable_irq(struct pn547_dev *pn547_dev) { unsigned long flags; spin_lock_irqsave(&pn547_dev->irq_enabled_lock, flags); if (!pn547_dev->irq_enabled) { pn547_dev->irq_enabled = true; enable_irq(pn547_dev->client->irq); enable_irq_wake(pn547_dev->client->irq); } spin_unlock_irqrestore(&pn547_dev->irq_enabled_lock, flags); } static irqreturn_t pn547_dev_irq_handler(int irq, void *dev_id) { struct pn547_dev *pn547_dev = dev_id; unsigned long flags; unsigned int irq_gpio_val; irq_gpio_val = gpio_get_value(pn547_dev->irq_gpio); if (irq_gpio_val == 0) { pr_err("%s called, IRQ GPIO == %d\n", __func__, irq_gpio_val); return 0; } if (sPowerState == NFC_POWER_ON) { spin_lock_irqsave(&pn547_dev->irq_enabled_lock, flags); pn547_dev->count_irq++; spin_unlock_irqrestore(&pn547_dev->irq_enabled_lock, flags); /* Wake up waiting readers */ wake_up(&pn547_dev->read_wq); wake_lock(&nfc_wake_lock); //pr_err("%s: wake_lock (%d)\n", __func__, pn547_dev->count_irq); // for debug } else { pr_err("%s, NFC IRQ Triggered during NFC OFF\n", __func__); } // return IRQ_HANDLED; } static ssize_t pn547_dev_read(struct file *filp, char __user *buf, size_t count, loff_t *offset) { struct pn547_dev *pn547_dev = filp->private_data; static char tmp[MAX_BUFFER_SIZE]; static unsigned char nErrorCnt = 0; int ret; int irq_gpio_val = 0; unsigned long flags; if (count > MAX_BUFFER_SIZE) count = MAX_BUFFER_SIZE; //pr_err("%s : reading %zu bytes.\n", __func__, count); // for debug irq_gpio_val = gpio_get_value(pn547_dev->irq_gpio); if (sReadSequence == NFC_PACKET_HEADER) { ret = wait_event_interruptible(pn547_dev->read_wq, pn547_dev->count_irq > 0); //pr_err("%s: pass wait_event_interruptible (%d)\n", __func__, pn547_dev->count_irq); // for debug if (ret == -ERESTARTSYS) { if (pn547_dev->count_irq <= 0) { //pr_err("%s: pass wait_event_interruptible by signal. Skip!\n", __func__); // for debug return -ENOTCONN; } } else { //pr_err("%s: pass wait_event_interruptible by condition (%d)\n", __func__, pn547_dev->count_irq); // for debug } //pr_err("%s: Read Header\n", __func__); // for debug } else { //pr_err("%s: Read data\n", __func__); // for debug } /* Read data */ mutex_lock(&pn547_dev->read_mutex); memset(tmp, 0x00, MAX_BUFFER_SIZE); ret = i2c_master_recv(pn547_dev->client, tmp, count); mutex_unlock(&pn547_dev->read_mutex); if (count == 0) { pr_err("%s: reading 0 bytes! skip! (%d)\n", __func__, ret); goto skip; } if (ret < 0) { pr_err("%s: i2c_master_recv returned %d\n", __func__, ret); if (ret == -ENOTCONN) { if (nErrorCnt >= 2) { pr_err("%s: discount IRQ due to 3 times %d\n", __func__, -ENOTCONN); nErrorCnt = 0; goto skip; } else { nErrorCnt++; } } return ret; } if (ret > count) { pr_err("%s: received too many bytes from i2c (%d)\n", __func__, ret); return -EIO; } if (copy_to_user(buf, tmp, ret)) { pr_warning("%s : failed to copy to user space\n", __func__); return -EFAULT; } nErrorCnt = 0; //pr_err("%s: i2c_master_recv success (%d)\n", __func__, ret); // for debug if (sReadSequence == NFC_PACKET_HEADER) { if (ret == count) { sReadSequence = NFC_PACKET_DATA; } else { pr_err("%s: received lesser bytes(%d) than desired(%d).\n", __func__, ret, count); } } else { skip: sReadSequence = NFC_PACKET_HEADER; spin_lock_irqsave(&pn547_dev->irq_enabled_lock, flags); if (pn547_dev->count_irq > 0) { pn547_dev->count_irq--; //pr_err("%s: current count_irq = %d\n", __func__, pn547_dev->count_irq); // for debug } if (pn547_dev->count_irq == 0) { wake_unlock(&nfc_wake_lock); //pr_err("%s: wake_unlock\n", __func__); // for debug } spin_unlock_irqrestore(&pn547_dev->irq_enabled_lock, flags); } return ret; } static ssize_t pn547_dev_write(struct file *filp, const char __user *buf, size_t count, loff_t *offset) { struct pn547_dev *pn547_dev; static char tmp[MAX_BUFFER_SIZE]; int ret; pn547_dev = filp->private_data; if (count > MAX_BUFFER_SIZE) count = MAX_BUFFER_SIZE; memset(tmp, 0x00, MAX_BUFFER_SIZE); if (copy_from_user(tmp, buf, count)) { pr_err(PN547_DRV_NAME ":%s : failed to copy from user space\n", __func__); return -EFAULT; } pr_debug("%s : writing %zu bytes.\n", __func__, count); /* Write data */ dprintk(PN547_DRV_NAME ":write: pn547_write len=:%d\n", count); mutex_lock(&pn547_dev->read_mutex); ret = i2c_master_send(pn547_dev->client, tmp, count); if (ret != count) { pr_err("%s : i2c_master_send returned %d\n", __func__, ret); ret = -EIO; } mutex_unlock(&pn547_dev->read_mutex); return ret; } static int pn547_dev_open(struct inode *inode, struct file *filp) { struct pn547_dev *pn547_dev = i2c_get_clientdata(pn547_client); filp->private_data = pn547_dev; pn547_dev->count_irq = 0; pn547_enable_irq(pn547_dev); pr_debug("%s : %d,%d\n", __func__, imajor(inode), iminor(inode)); return 0; } static long pn547_dev_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) { struct pn547_dev *pn547_dev = filp->private_data; unsigned long flags; switch (cmd) { case pn547_SET_PWR: if (arg == 2) { /* power on with firmware download (requires hw reset) */ dprintk(PN547_DRV_NAME ":%s power on with firmware\n", __func__); gpio_set_value(pn547_dev->ven_gpio, 1); gpio_set_value(pn547_dev->firm_gpio, 1); msleep(10); gpio_set_value(pn547_dev->ven_gpio, 0); msleep(10); gpio_set_value(pn547_dev->ven_gpio, 1); msleep(10); } else if (arg == 1) { /* power on */ dprintk(PN547_DRV_NAME ":%s power on\n", __func__); if (sPowerState == NFC_POWER_OFF) { gpio_set_value(pn547_dev->firm_gpio, 0); gpio_set_value(pn547_dev->ven_gpio, 1); msleep(10); spin_lock_irqsave(&pn547_dev->irq_enabled_lock, flags); #ifdef CONFIG_LGE_NFC_SET_IRQ_WAKEUP if (sIrqState == false) { irq_set_irq_wake(pn547_dev->client->irq,1); sIrqState = true; dprintk(PN547_DRV_NAME ":%s enable IRQ\n", __func__); } else { pr_err("%s IRQ is already enabled!\n", __func__); } #endif //pr_err("%s NFC_POWER_ON\n", __func__); // for debug sPowerState = NFC_POWER_ON; sReadSequence = NFC_PACKET_HEADER; spin_unlock_irqrestore(&pn547_dev->irq_enabled_lock, flags); } else { pr_err("%s NFC is alread On!\n", __func__); } } else if (arg == 0) { /* power off */ dprintk(PN547_DRV_NAME ":%s power off\n", __func__); if (sPowerState == NFC_POWER_ON) { gpio_set_value(pn547_dev->firm_gpio, 0); gpio_set_value(pn547_dev->ven_gpio, 0); msleep(10); spin_lock_irqsave(&pn547_dev->irq_enabled_lock, flags); #ifdef CONFIG_LGE_NFC_SET_IRQ_WAKEUP if (sIrqState == true) { irq_set_irq_wake(pn547_dev->client->irq,0); sIrqState = false; dprintk(PN547_DRV_NAME ":%s disable IRQ\n", __func__); } else { pr_err("%s IRQ is already disabled!\n", __func__); } #endif if (pn547_dev->count_irq > 0) { pr_err("%s: Clear IRQ(%d)\n", __func__, pn547_dev->count_irq); pn547_dev->count_irq = 0; wake_unlock(&nfc_wake_lock); } //pr_err("%s NFC_POWER_OFF\n", __func__); // for debug sPowerState = NFC_POWER_OFF; sReadSequence = NFC_PACKET_HEADER; spin_unlock_irqrestore(&pn547_dev->irq_enabled_lock, flags); } else { pr_err("%s NFC is alread Off!\n", __func__); } } else { pr_err("%s bad arg %ld\n", __func__, arg); return -EINVAL; } break; case pn547_HW_REVISION: { return pn547_get_hw_revision(); } default: pr_err("%s bad ioctl %d\n", __func__, cmd); return -EINVAL; } return 0; } static const struct file_operations pn547_dev_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = pn547_dev_read, .write = pn547_dev_write, .open = pn547_dev_open, .unlocked_ioctl = pn547_dev_unlocked_ioctl, }; static int pn547_probe(struct i2c_client *client, const struct i2c_device_id *id) { int ret; struct pn547_dev *pn547_dev = NULL; pn547_client = client; dprintk(PN547_DRV_NAME ": pn547_probe() start\n"); pn547_dev = kzalloc(sizeof(*pn547_dev), GFP_KERNEL); if (pn547_dev == NULL) { dev_err(&client->dev, "failed to allocate memory for module data\n"); ret = -ENOMEM; goto err_exit; } pn547_parse_dt(&client->dev, pn547_dev); pn547_dev->client = client; dprintk(PN547_DRV_NAME ":IRQ : %d\nVEN : %d\nFIRM : %d\n", pn547_dev->irq_gpio, pn547_dev->ven_gpio, pn547_dev->firm_gpio); ret = gpio_request(pn547_dev->irq_gpio, "nfc_int"); if (ret) { dprintk(PN547_DRV_NAME ":pn547_probe() : nfc_int request failed!\n"); goto err_int; } ret = gpio_request(pn547_dev->ven_gpio, "nfc_ven"); if (ret) { dprintk(PN547_DRV_NAME ":pn547_probe() : nfc_ven request failed!\n"); goto err_ven; } ret = gpio_request(pn547_dev->firm_gpio, "nfc_firm"); if (ret) { dprintk(PN547_DRV_NAME ":pn547_probe() : nfc_firm request failed!\n"); goto err_firm; } pn547_gpio_enable(pn547_dev); ret = gpio_direction_output(pn547_dev->ven_gpio,1); ret = gpio_direction_output(pn547_dev->firm_gpio,0); ret = gpio_direction_input(pn547_dev->irq_gpio); /* init mutex and queues */ init_waitqueue_head(&pn547_dev->read_wq); mutex_init(&pn547_dev->read_mutex); spin_lock_init(&pn547_dev->irq_enabled_lock); pn547_dev->pn547_device.minor = MISC_DYNAMIC_MINOR; pn547_dev->pn547_device.name = PN547_DRV_NAME; pn547_dev->pn547_device.fops = &pn547_dev_fops; ret = misc_register(&pn547_dev->pn547_device); if (ret) { pr_err("%s : misc_register failed\n", __FILE__); goto err_misc_register; } wake_lock_init(&nfc_wake_lock, WAKE_LOCK_SUSPEND, "NFCWAKE"); /* request irq. the irq is set whenever the chip has data available * for reading. it is cleared when all data has been read. */ pr_info("%s : requesting IRQ %d\n", __func__, client->irq); pn547_dev->irq_enabled = true; ret = request_irq(pn547_gpio_to_irq(pn547_dev), pn547_dev_irq_handler, IRQF_TRIGGER_RISING|IRQF_NO_SUSPEND, client->name, pn547_dev); if (ret) { dev_err(&client->dev, "request_irq failed\n"); goto err_request_irq_failed; } enable_irq_wake(pn547_get_irq_pin(pn547_dev)); pn547_disable_irq(pn547_dev); i2c_set_clientdata(client, pn547_dev); dprintk(PN547_DRV_NAME ": pn547_probe() end\n"); return 0; err_request_irq_failed: misc_deregister(&pn547_dev->pn547_device); err_misc_register: mutex_destroy(&pn547_dev->read_mutex); gpio_free(pn547_dev->firm_gpio); err_firm: gpio_free(pn547_dev->ven_gpio); err_ven: gpio_free(pn547_dev->irq_gpio); err_int: kfree(pn547_dev); err_exit: pr_err(PN547_DRV_NAME ": pn547_dev is null\n"); pr_err(PN547_DRV_NAME ": pn547_probe() end with error!\n"); return ret; } static __devexit int pn547_remove(struct i2c_client *client) { struct pn547_dev *pn547_dev; pn547_dev = i2c_get_clientdata(client); free_irq(pn547_gpio_to_irq(pn547_dev), pn547_dev); misc_deregister(&pn547_dev->pn547_device); mutex_destroy(&pn547_dev->read_mutex); gpio_free(pn547_dev->firm_gpio); gpio_free(pn547_dev->ven_gpio); gpio_free(pn547_dev->irq_gpio); kfree(pn547_dev); return 0; } static void pn547_shutdown(struct i2c_client *client) { struct pn547_dev *pn547_dev; // Get PN547 Device Structure data pn547_dev = i2c_get_clientdata(client); pn547_shutdown_cb(pn547_dev); return; } static const struct i2c_device_id pn547_id[] = { { PN547_DRV_NAME, 0 }, { } }; static struct of_device_id pn547_match_table[] = { { .compatible = "nxp,pn547",}, { }, }; static struct i2c_driver pn547_driver = { .driver = { .owner = THIS_MODULE, .name = PN547_DRV_NAME, .of_match_table = pn547_match_table, }, .probe = pn547_probe, .remove = __devexit_p(pn547_remove), .shutdown = pn547_shutdown, .id_table = pn547_id, }; /* * module load/unload record keeping */ static int __init pn547_dev_init(void) { int ret = 0; pr_info("Loading PN547 driver\n"); ret = i2c_add_driver(&pn547_driver); if (ret < 0) { printk("[NFC]failed to i2c_add_driver\n"); } pr_info("Loading PN547 driver Success! \n"); return ret; } module_init(pn547_dev_init); static void __exit pn547_dev_exit(void) { pr_info("Unloading PN547 driver\n"); i2c_del_driver(&pn547_driver); } module_exit(pn547_dev_exit); MODULE_DEVICE_TABLE(i2c, pn547_id); MODULE_AUTHOR("Sylvain Fonteneau"); MODULE_DESCRIPTION("NFC PN547 driver"); MODULE_LICENSE("GPL");
invisiblek/android_kernel_lge_v4xx
drivers/nfc/pn547_lge.c
C
gpl-2.0
16,643
[ 30522, 1013, 1008, 1008, 1008, 9385, 1006, 1039, 1007, 2230, 1050, 2595, 2361, 20681, 2015, 1008, 1008, 2023, 2565, 2003, 2489, 4007, 1025, 2017, 2064, 2417, 2923, 3089, 8569, 2618, 2009, 1998, 1013, 2030, 19933, 1008, 2009, 2104, 1996, 3...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML> <HEAD> <meta name="author" content="Aurelio Jargas www.aurelio.net"> <META NAME="generator" CONTENT="http://txt2tags.org"> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"> <LINK REL="stylesheet" TYPE="text/css" HREF="inc/site.css"> <LINK REL="stylesheet" TYPE="text/css" HREF="online.css"> <LINK REL="stylesheet" TYPE="text/css" HREF="markitup/skins/markitup/style.css"> <LINK REL="stylesheet" TYPE="text/css" HREF="markitup/sets/default/style.css"> <TITLE>txt2tags online</TITLE> <link rel="icon" type="image/png" href="/favicon.png"> </HEAD> <BODY id="online"> <DIV CLASS="header" ID="header"> <h1><a href="/">txt2tags</a></h1> <H3>Free online conversion</H3> </DIV> <DIV CLASS="body" ID="body"> <div id="sidebar"> Hot <ul> <li id="menuonline"><a href="./online.php">Txt2tags Online</a></li> <li id="menumarkup"><a href="./markup.html">Markup Demo</a></li> </ul> About <ul> <!-- <li id="menuhome"><a href="/">Home</a></li> --> <li id="menufeatures"><a href="./features.html">Features</a></li> <li id="menusample"><a href="./sample.html">Example</a></li> <li id="menushots"><a href="./shots.html">Screenshots</a></li> <li id="menudocs"><a href="./docs.html">Documentation</a></li> <li id="menutips"><a href="./tips.html">Tips &amp; Tricks</a></li> <!-- <li id="menuoldnews"><a href="./misc/oldnews.html">Old News</a></li> --> </ul> Code <ul> <li id="menudownload"><a href="./download.html">Download</a></li> <li id="menuchangelog"><a href="./changelog.html">Changelog</a></li> <li id="menutools"><a href="./tools.html">Tools</a></li> <li><a href="http://bugs.txt2tags.org">Bug tracker</a></li> <li><a href="http://svn.txt2tags.org">SVN</a></li> </ul> Community <ul> <li id="menuwiki"><a href="http://wiki.txt2tags.org">Wiki</a></li> <li id="menublog"><a href="http://txt2tags.wordpress.com">Blog</a></li> <li id="menuteam"><a href="./team/index.html">The Team</a></li> <li id="menuchildren"><a href="./children.html">The Children</a></li> <li id="menucomments"><a href="http://txt2tags.wordpress.com/user-comments/">User Comments</a></li> <li id="menuart"><a href="./art.html">Artwork</a></li> </ul> Social <ul> <li id="menuml"><a href="./ml.html">Mailing List</a></li> <li><a href="http://www.facebook.com/pages/txt2tags/335201827209">Facebook</a></li> <li><a href="http://twitter.com/aureliojargas">twitter</a></li> <!-- <li><a href="http://www.orkut.com.br/Main#Community?cmm=87935">Orkut</a></li> --> <li><a href="http://identi.ca/group/txt2tags">identi.ca</a></li> </ul> <P> <A HREF="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&amp;business=verde%40aurelio%2enet&amp;item_name=txt2tags%20donation&amp;no_shipping=1&amp;return=http%3a%2f%2faurelio%2enet%2fdonate%2dthanks%2ehtml&amp;cn=&amp;tax=0&amp;currency_code=USD&amp;bn=PP%2dDonationsBF&amp;charset=UTF%2d8"><IMG ALIGN="middle" SRC="img/donate.png" BORDER="0" alt="DONATE"></A> </P> </div> <?php include("script_markitup.php"); ?> <H2>Txt2tags Online</H2> <UL> <LI>Play with txt2tags even before downloading it. Now you can also try the <A HREF="txt2tags.form.php">php implementation of txt2tags online</A>. <P></P> <LI>You can alter the text source or type/paste your own. <P></P> <LI>The <A HREF="online.phps">PHP sources</A> are available, you can customize it and use on your intranet. </UL> <?php require("online.phps"); ?> <p><a href="#" class="toggle">Click this link to <span>remove markItUp!</span></a> in this demo</p>. <UL> <LI>See full live preview of the MarkItUp effect on <A HREF="http://etxt2tags.appspot.com/">http://etxt2tags.appspot.com/</A> </UL> </div><div id="footer"> <P> <IMG ALIGN="middle" SRC="img/t2tpowered-white.png" BORDER="0" ALT=""> </P> <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-sa/3.0/80x15.png"></a> <P> Last modified on 27 August 2012 at 16:10 (<A HREF="online.t2t">See sources</A>, <A HREF="http://validator.w3.org/check?uri=referer">Validate HTML</A>) </P> </div><div id="fake"> <!-- Google Analytics code --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-280222-14']); _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> </DIV> <!-- html code generated by txt2tags 2.6.1051 (http://txt2tags.org) --> <!-- cmdline: txt2tags online.t2t --> </BODY></HTML>
farvardin/txt2tags-test
website/online.php
PHP
gpl-2.0
4,817
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 1014, 17459, 1013, 1013, 4372, 1000, 1028, 1026, 16129, 1028, 1026, 2132, 1028, 1026, 18804, 2171, 1027, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (C) 2009 University of Southern California and * Andrew D. Smith * * Authors: Andrew D. Smith * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "FileIterator.hpp" #include "GenomicRegion.hpp" #include "MappedRead.hpp" #include <iostream> using std::istream; using std::vector; using std::string; /* THIS FUNCTION FILLS A BUFFER FOR GenomicRegion OBJECTS */ void fill_buffer(std::ifstream &in, const size_t buffer_start, vector<GenomicRegion> &buffer) { GenomicRegion tmp; size_t i = buffer_start; assert(buffer_start <= buffer.size()); for (; i != buffer.size() && !in.eof(); ++i) { in >> tmp; buffer[i].swap(tmp); in.peek(); } if (i < buffer.size()) buffer.erase(buffer.begin() + i, buffer.end()); } /* THIS FUNCTION FILLS A BUFFER FOR THE ACTUAL READS, REPRESENTED AS * STRINGS, AND MUST BE IN A FASTA FORMAT FILE */ void fill_buffer(std::ifstream &in, const size_t buffer_start, vector<string> &buffer) { string tmp; size_t i = buffer_start; for (; i != buffer.size() && !in.eof(); ++i) { // the read name... in >> tmp; // DANGER: assumes that the name of the read has no // spaces in it!! // the read itself: in >> buffer[i]; in.peek(); } if (i < buffer.size()) buffer.erase(buffer.begin() + i, buffer.end()); } /* THIS FUNCTION FILLS A BUFFER FOR THE ACTUAL READS, REPRESENTED AS * RECORDS IN A FASTQ FILE, INCLUDING THE QUALITY SCORES */ void fill_buffer(std::ifstream &in, const size_t buffer_start, vector<FASTQRecord> &buffer) { string tmp, read_seq, scores_seq; size_t i = buffer_start; for (; i != buffer.size() && !in.eof(); ++i) { // the read name... in >> tmp; // DANGER: assumes that the name of the read has no // spaces in it!! // the read itself: in >> read_seq; in >> tmp; in >> scores_seq; buffer[i] = std::make_pair(read_seq, scores_seq); in.peek(); } if (i < buffer.size()) buffer.erase(buffer.begin() + i, buffer.end()); } /* THIS FUNCTION FILLS A BUFFER FOR THE ACTUAL READS, REPRESENTED AS * RECORDS IN A FASTQ FILE, INCLUDING THE QUALITY SCORES */ void fill_buffer(std::ifstream &in, const size_t buffer_start, vector<MappedRead> &buffer) { size_t i = buffer_start; for (; i != buffer.size() && !in.eof(); ++i) { in >> buffer[i]; in.peek(); } if (i < buffer.size()) buffer.erase(buffer.begin() + i, buffer.end()); }
timydaley/dean_cylindrical_tranform
smithlab_cpp/FileIterator.cpp
C++
gpl-2.0
3,126
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2268, 2118, 1997, 2670, 2662, 1998, 1008, 4080, 1040, 1012, 3044, 1008, 1008, 6048, 1024, 4080, 1040, 1012, 3044, 1008, 1008, 2023, 2565, 2003, 2489, 4007, 1024, 2017, 2064, 2417, 2923, 308...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
BeginningDev ============ Beginning Development Initiatives
jellydevext/BeginningDev
README.md
Markdown
gpl-2.0
61
[ 30522, 2927, 24844, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 1027, 2927, 2458, 11107, 102, 0, 0, 0, 30524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (c) 2008, Christophe Delory * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY CHRISTOPHE DELORY ``AS IS'' AND ANY * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL CHRISTOPHE DELORY BE LIABLE FOR ANY * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package christophedelory.playlist.wpl; /** * Contains the elements that define the contents of a playlist. * The contents of a playlist are organized within a seq element that is contained within the body element. * Typically there is either one seq element that defines a static set of media items and contains media elements, * or there is one that defines a dynamic set of media items and contains a smartPlaylist element. * <br> * Windows Media Player 9 Series or later. * @version $Revision: 92 $ * @author Christophe Delory * @castor.class xml="body" */ public class Body { /** * The body sequence. */ private Seq _seq = new Seq(); /** * Returns the body sequence. * @return a sequence. Shall not be <code>null</code>. * @see #setSeq * @castor.field * get-method="getSeq" * set-method="setSeq" * required="true" * @castor.field-xml * name="seq" * node="element" */ public Seq getSeq() { return _seq; } /** * Initializes the body sequence. * @param seq a sequence. Shall not be <code>null</code>. * @throws NullPointerException if <code>seq</code> is <code>null</code>. * @see #getSeq */ public void setSeq(final Seq seq) { if (seq == null) { throw new NullPointerException("No body sequence"); } _seq = seq; } }
wenerme/Lizzy
src/java/christophedelory/playlist/wpl/Body.java
Java
bsd-2-clause
2,760
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2263, 1010, 23978, 3972, 10253, 1008, 2035, 2916, 9235, 1012, 1008, 1008, 25707, 1998, 2224, 1999, 3120, 1998, 12441, 3596, 1010, 2007, 2030, 2302, 1008, 14080, 1010, 2024, 7936, 3024, 2008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#!/bin/sh tar -xf $INPUT_CODE && mv ping /ping cd /ping && npm install
di-unipi-socc/TosKeriser
data/examples/ping_pong-app/ping_pong/scripts/ping/create.sh
Shell
mit
73
[ 30522, 1001, 999, 1013, 8026, 1013, 14021, 16985, 1011, 1060, 2546, 1002, 7953, 1035, 3642, 1004, 1004, 19842, 17852, 1013, 17852, 3729, 1013, 17852, 1004, 1004, 27937, 2213, 16500, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
"""Add timetable related tables Revision ID: 33a1d6f25951 Revises: 225d0750c216 Create Date: 2015-11-25 14:05:51.856236 """ import sqlalchemy as sa from alembic import op from indico.core.db.sqlalchemy import PyIntEnum, UTCDateTime from indico.modules.events.timetable.models.entries import TimetableEntryType # revision identifiers, used by Alembic. revision = '33a1d6f25951' down_revision = '225d0750c216' def upgrade(): # Break op.create_table( 'breaks', sa.Column('id', sa.Integer(), nullable=False), sa.Column('title', sa.String(), nullable=False), sa.Column('description', sa.Text(), nullable=False), sa.Column('duration', sa.Interval(), nullable=False), sa.Column('text_color', sa.String(), nullable=False), sa.Column('background_color', sa.String(), nullable=False), sa.Column('room_name', sa.String(), nullable=False), sa.Column('inherit_location', sa.Boolean(), nullable=False), sa.Column('address', sa.Text(), nullable=False), sa.Column('venue_id', sa.Integer(), nullable=True, index=True), sa.Column('venue_name', sa.String(), nullable=False), sa.Column('room_id', sa.Integer(), nullable=True, index=True), sa.CheckConstraint("(room_id IS NULL) OR (venue_name = '' AND room_name = '')", name='no_custom_location_if_room'), sa.CheckConstraint("(venue_id IS NULL) OR (venue_name = '')", name='no_venue_name_if_venue_id'), sa.CheckConstraint("(room_id IS NULL) OR (venue_id IS NOT NULL)", name='venue_id_if_room_id'), sa.CheckConstraint("NOT inherit_location OR (venue_id IS NULL AND room_id IS NULL AND venue_name = '' AND " "room_name = '' AND address = '')", name='inherited_location'), sa.CheckConstraint("(text_color = '') = (background_color = '')", name='both_or_no_colors'), sa.CheckConstraint("text_color != '' AND background_color != ''", name='colors_not_empty'), sa.ForeignKeyConstraint(['room_id'], ['roombooking.rooms.id']), sa.ForeignKeyConstraint(['venue_id'], ['roombooking.locations.id']), sa.ForeignKeyConstraint(['venue_id', 'room_id'], ['roombooking.rooms.location_id', 'roombooking.rooms.id']), sa.PrimaryKeyConstraint('id'), schema='events' ) # TimetableEntry op.create_table( 'timetable_entries', sa.Column('id', sa.Integer(), nullable=False), sa.Column('event_id', sa.Integer(), nullable=False, index=True), sa.Column('parent_id', sa.Integer(), nullable=True, index=True), sa.Column('session_block_id', sa.Integer(), nullable=True, index=True, unique=True), sa.Column('contribution_id', sa.Integer(), nullable=True, index=True, unique=True), sa.Column('break_id', sa.Integer(), nullable=True, index=True, unique=True), sa.Column('type', PyIntEnum(TimetableEntryType), nullable=False), sa.Column('start_dt', UTCDateTime, nullable=False), sa.Index('ix_timetable_entries_start_dt_desc', sa.text('start_dt DESC')), sa.CheckConstraint('type != 1 OR parent_id IS NULL', name='valid_parent'), sa.CheckConstraint('type != 1 OR (contribution_id IS NULL AND break_id IS NULL AND ' 'session_block_id IS NOT NULL)', name='valid_session_block'), sa.CheckConstraint('type != 2 OR (session_block_id IS NULL AND break_id IS NULL AND ' 'contribution_id IS NOT NULL)', name='valid_contribution'), sa.CheckConstraint('type != 3 OR (contribution_id IS NULL AND session_block_id IS NULL AND ' 'break_id IS NOT NULL)', name='valid_break'), sa.ForeignKeyConstraint(['break_id'], ['events.breaks.id']), sa.ForeignKeyConstraint(['contribution_id'], ['events.contributions.id']), sa.ForeignKeyConstraint(['event_id'], ['events.events.id']), sa.ForeignKeyConstraint(['parent_id'], ['events.timetable_entries.id']), sa.ForeignKeyConstraint(['session_block_id'], ['events.session_blocks.id']), sa.PrimaryKeyConstraint('id'), schema='events' ) def downgrade(): op.drop_table('timetable_entries', schema='events') op.drop_table('breaks', schema='events')
belokop/indico_bare
migrations/versions/201511251405_33a1d6f25951_add_timetable_related_tables.py
Python
gpl-3.0
4,295
[ 30522, 1000, 1000, 1000, 5587, 23839, 3141, 7251, 13921, 8909, 1024, 3943, 27717, 2094, 2575, 2546, 17788, 2683, 22203, 7065, 13087, 1024, 14993, 2094, 2692, 23352, 2692, 2278, 17465, 2575, 3443, 3058, 1024, 2325, 1011, 2340, 1011, 2423, 24...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# frankie - a plugin for sinatra that integrates with the facebooker gem # # written by Ron Evans (http://www.deadprogrammersociety.com) # # based on merb_facebooker (http://github.com/vanpelt/merb_facebooker) # and the Rails classes in Facebooker (http://facebooker.rubyforge.org/) from Mike Mangino, Shane Vitarana, & Chad Fowler # require 'sinatra/base' require 'yaml' require 'uri' gem 'mmangino-facebooker' require 'facebooker' module Sinatra module Frankie module Loader def load_facebook_config(file, env=:development) if File.exist?(file) yaml = YAML.load_file(file)[env.to_s] ENV['FACEBOOK_API_KEY'] = yaml['api_key'] ENV['FACEBOOK_SECRET_KEY'] = yaml['secret_key'] ENV['FACEBOOKER_RELATIVE_URL_ROOT'] = yaml['canvas_page_name'] end end end module Helpers def facebook_session @facebook_session end def facebook_session_parameters {:fb_sig_session_key=>params["fb_sig_session_key"]} end def set_facebook_session session_set = session_already_secured? || secure_with_token! || secure_with_facebook_params! if session_set capture_facebook_friends_if_available! Facebooker::Session.current = facebook_session end session_set end def facebook_params @facebook_params ||= verified_facebook_params end def session_already_secured? (@facebook_session = session[:facebook_session]) && session[:facebook_session].secured? end def secure_with_token! if params['auth_token'] @facebook_session = new_facebook_session @facebook_session.auth_token = params['auth_token'] @facebook_session.secure! session[:facebook_session] = @facebook_session end end def secure_with_facebook_params! return unless request_is_for_a_facebook_canvas? if ['user', 'session_key'].all? {|element| facebook_params[element]} @facebook_session = new_facebook_session @facebook_session.secure_with!(facebook_params['session_key'], facebook_params['user'], facebook_params['expires']) session[:facebook_session] = @facebook_session end end def create_new_facebook_session_and_redirect! session[:facebook_session] = new_facebook_session throw :halt, do_redirect(session[:facebook_session].login_url) unless @installation_required end def new_facebook_session Facebooker::Session.create(Facebooker::Session.api_key, Facebooker::Session.secret_key) end def capture_facebook_friends_if_available! return unless request_is_for_a_facebook_canvas? if friends = facebook_params['friends'] facebook_session.user.friends = friends.map do |friend_uid| Facebooker::User.new(friend_uid, facebook_session) end end end def blank?(value) (value == '0' || value.nil? || value == '') end def verified_facebook_params facebook_sig_params = params.inject({}) do |collection, pair| collection[pair.first.sub(/^fb_sig_/, '')] = pair.last if pair.first[0,7] == 'fb_sig_' collection end verify_signature(facebook_sig_params, params['fb_sig']) facebook_sig_params.inject(Hash.new) do |collection, pair| collection[pair.first] = facebook_parameter_conversions[pair.first].call(pair.last) collection end end # 48.hours.ago in sinatra def earliest_valid_session now = Time.now now -= (60 * 60 * 48) now end def verify_signature(facebook_sig_params,expected_signature) raw_string = facebook_sig_params.map{ |*args| args.join('=') }.sort.join actual_sig = Digest::MD5.hexdigest([raw_string, Facebooker::Session.secret_key].join) raise Facebooker::Session::IncorrectSignature if actual_sig != expected_signature raise Facebooker::Session::SignatureTooOld if Time.at(facebook_sig_params['time'].to_f) < earliest_valid_session true end def facebook_parameter_conversions @facebook_parameter_conversions ||= Hash.new do |hash, key| lambda{|value| value} end.merge('time' => lambda{|value| Time.at(value.to_f)}, 'in_canvas' => lambda{|value| !blank?(value)}, 'added' => lambda{|value| !blank?(value)}, 'expires' => lambda{|value| blank?(value) ? nil : Time.at(value.to_f)}, 'friends' => lambda{|value| value.split(/,/)} ) end def do_redirect(*args) if request_is_for_a_facebook_canvas? fbml_redirect_tag(args) else redirect args[0] end end def fbml_redirect_tag(url) "<fb:redirect url=\"#{url}\" />" end def request_is_for_a_facebook_canvas? return false if params["fb_sig_in_canvas"].nil? params["fb_sig_in_canvas"] == "1" end def application_is_installed? facebook_params['added'] end def ensure_authenticated_to_facebook set_facebook_session || create_new_facebook_session_and_redirect! end def ensure_application_is_installed_by_facebook_user @installation_required = true authenticated_and_installed = ensure_authenticated_to_facebook && application_is_installed? application_is_not_installed_by_facebook_user unless authenticated_and_installed authenticated_and_installed end def application_is_not_installed_by_facebook_user throw :halt, do_redirect(session[:facebook_session].install_url) end def set_fbml_format params['format']="fbml" if request_is_for_a_facebook_canvas? end def fb_url_for(url) url = "" if url == "/" url = URI.escape(url) return url if !request_is_for_a_facebook_canvas? "http://apps.facebook.com/#{ENV['FACEBOOKER_RELATIVE_URL_ROOT']}/#{url}" end def do_redirect(*args) if request_is_for_a_facebook_canvas? fbml_redirect_tag(args[0]) else redirect args[0] end end def self.registered(app) app.register Loader app.helpers Helpers end end end
jsmestad/frankie
lib/frankie.rb
Ruby
mit
6,584
[ 30522, 1001, 12784, 1011, 1037, 13354, 2378, 2005, 19643, 2008, 17409, 2015, 2007, 1996, 9130, 2121, 17070, 1001, 1001, 2517, 2011, 6902, 6473, 1006, 8299, 1024, 1013, 1013, 7479, 1012, 2757, 21572, 13113, 16862, 10085, 2666, 3723, 1012, 40...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# UVaProblems Python code for UVa problems (https://uva.onlinejudge.org)
gustavo94/UVaProblems
README.md
Markdown
mit
73
[ 30522, 1001, 23068, 9331, 3217, 3468, 5244, 18750, 3642, 2005, 23068, 2050, 3471, 1006, 16770, 1024, 1013, 1013, 23068, 2050, 1012, 3784, 9103, 11818, 1012, 8917, 1007, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
define('jqueryui/tabs', ['jquery','jqueryui/core','jqueryui/widget'], function (jQuery) { /* * jQuery UI Tabs 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Tabs * * Depends: * jquery.ui.core.js * jquery.ui.widget.js */ (function( $, undefined ) { var tabId = 0, listId = 0; function getNextTabId() { return ++tabId; } function getNextListId() { return ++listId; } $.widget( "ui.tabs", { options: { add: null, ajaxOptions: null, cache: false, cookie: null, // e.g. { expires: 7, path: '/', domain: 'jquery.com', secure: true } collapsible: false, disable: null, disabled: [], enable: null, event: "click", fx: null, // e.g. { height: 'toggle', opacity: 'toggle', duration: 200 } idPrefix: "ui-tabs-", load: null, panelTemplate: "<div></div>", remove: null, select: null, show: null, spinner: "<em>Loading&#8230;</em>", tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>" }, _create: function() { this._tabify( true ); }, _setOption: function( key, value ) { if ( key == "selected" ) { if (this.options.collapsible && value == this.options.selected ) { return; } this.select( value ); } else { this.options[ key ] = value; this._tabify(); } }, _tabId: function( a ) { return a.title && a.title.replace( /\s/g, "_" ).replace( /[^\w\u00c0-\uFFFF-]/g, "" ) || this.options.idPrefix + getNextTabId(); }, _sanitizeSelector: function( hash ) { // we need this because an id may contain a ":" return hash.replace( /:/g, "\\:" ); }, _cookie: function() { var cookie = this.cookie || ( this.cookie = this.options.cookie.name || "ui-tabs-" + getNextListId() ); return $.cookie.apply( null, [ cookie ].concat( $.makeArray( arguments ) ) ); }, _ui: function( tab, panel ) { return { tab: tab, panel: panel, index: this.anchors.index( tab ) }; }, _cleanup: function() { // restore all former loading tabs labels this.lis.filter( ".ui-state-processing" ) .removeClass( "ui-state-processing" ) .find( "span:data(label.tabs)" ) .each(function() { var el = $( this ); el.html( el.data( "label.tabs" ) ).removeData( "label.tabs" ); }); }, _tabify: function( init ) { var self = this, o = this.options, fragmentId = /^#.+/; // Safari 2 reports '#' for an empty hash this.list = this.element.find( "ol,ul" ).eq( 0 ); this.lis = $( " > li:has(a[href])", this.list ); this.anchors = this.lis.map(function() { return $( "a", this )[ 0 ]; }); this.panels = $( [] ); this.anchors.each(function( i, a ) { var href = $( a ).attr( "href" ); // For dynamically created HTML that contains a hash as href IE < 8 expands // such href to the full page url with hash and then misinterprets tab as ajax. // Same consideration applies for an added tab with a fragment identifier // since a[href=#fragment-identifier] does unexpectedly not match. // Thus normalize href attribute... var hrefBase = href.split( "#" )[ 0 ], baseEl; if ( hrefBase && ( hrefBase === location.toString().split( "#" )[ 0 ] || ( baseEl = $( "base" )[ 0 ]) && hrefBase === baseEl.href ) ) { href = a.hash; a.href = href; } // inline tab if ( fragmentId.test( href ) ) { self.panels = self.panels.add( self.element.find( self._sanitizeSelector( href ) ) ); // remote tab // prevent loading the page itself if href is just "#" } else if ( href && href !== "#" ) { // required for restore on destroy $.data( a, "href.tabs", href ); // TODO until #3808 is fixed strip fragment identifier from url // (IE fails to load from such url) $.data( a, "load.tabs", href.replace( /#.*$/, "" ) ); var id = self._tabId( a ); a.href = "#" + id; var $panel = self.element.find( "#" + id ); if ( !$panel.length ) { $panel = $( o.panelTemplate ) .attr( "id", id ) .addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ) .insertAfter( self.panels[ i - 1 ] || self.list ); $panel.data( "destroy.tabs", true ); } self.panels = self.panels.add( $panel ); // invalid tab href } else { o.disabled.push( i ); } }); // initialization from scratch if ( init ) { // attach necessary classes for styling this.element.addClass( "ui-tabs ui-widget ui-widget-content ui-corner-all" ); this.list.addClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ); this.lis.addClass( "ui-state-default ui-corner-top" ); this.panels.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom" ); // Selected tab // use "selected" option or try to retrieve: // 1. from fragment identifier in url // 2. from cookie // 3. from selected class attribute on <li> if ( o.selected === undefined ) { if ( location.hash ) { this.anchors.each(function( i, a ) { if ( a.hash == location.hash ) { o.selected = i; return false; } }); } if ( typeof o.selected !== "number" && o.cookie ) { o.selected = parseInt( self._cookie(), 10 ); } if ( typeof o.selected !== "number" && this.lis.filter( ".ui-tabs-selected" ).length ) { o.selected = this.lis.index( this.lis.filter( ".ui-tabs-selected" ) ); } o.selected = o.selected || ( this.lis.length ? 0 : -1 ); } else if ( o.selected === null ) { // usage of null is deprecated, TODO remove in next release o.selected = -1; } // sanity check - default to first tab... o.selected = ( ( o.selected >= 0 && this.anchors[ o.selected ] ) || o.selected < 0 ) ? o.selected : 0; // Take disabling tabs via class attribute from HTML // into account and update option properly. // A selected tab cannot become disabled. o.disabled = $.unique( o.disabled.concat( $.map( this.lis.filter( ".ui-state-disabled" ), function( n, i ) { return self.lis.index( n ); }) ) ).sort(); if ( $.inArray( o.selected, o.disabled ) != -1 ) { o.disabled.splice( $.inArray( o.selected, o.disabled ), 1 ); } // highlight selected tab this.panels.addClass( "ui-tabs-hide" ); this.lis.removeClass( "ui-tabs-selected ui-state-active" ); // check for length avoids error when initializing empty list if ( o.selected >= 0 && this.anchors.length ) { self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) ).removeClass( "ui-tabs-hide" ); this.lis.eq( o.selected ).addClass( "ui-tabs-selected ui-state-active" ); // seems to be expected behavior that the show callback is fired self.element.queue( "tabs", function() { self._trigger( "show", null, self._ui( self.anchors[ o.selected ], self.element.find( self._sanitizeSelector( self.anchors[ o.selected ].hash ) )[ 0 ] ) ); }); this.load( o.selected ); } // clean up to avoid memory leaks in certain versions of IE 6 // TODO: namespace this event $( window ).bind( "unload", function() { self.lis.add( self.anchors ).unbind( ".tabs" ); self.lis = self.anchors = self.panels = null; }); // update selected after add/remove } else { o.selected = this.lis.index( this.lis.filter( ".ui-tabs-selected" ) ); } // update collapsible // TODO: use .toggleClass() this.element[ o.collapsible ? "addClass" : "removeClass" ]( "ui-tabs-collapsible" ); // set or update cookie after init and add/remove respectively if ( o.cookie ) { this._cookie( o.selected, o.cookie ); } // disable tabs for ( var i = 0, li; ( li = this.lis[ i ] ); i++ ) { $( li )[ $.inArray( i, o.disabled ) != -1 && // TODO: use .toggleClass() !$( li ).hasClass( "ui-tabs-selected" ) ? "addClass" : "removeClass" ]( "ui-state-disabled" ); } // reset cache if switching from cached to not cached if ( o.cache === false ) { this.anchors.removeData( "cache.tabs" ); } // remove all handlers before, tabify may run on existing tabs after add or option change this.lis.add( this.anchors ).unbind( ".tabs" ); if ( o.event !== "mouseover" ) { var addState = function( state, el ) { if ( el.is( ":not(.ui-state-disabled)" ) ) { el.addClass( "ui-state-" + state ); } }; var removeState = function( state, el ) { el.removeClass( "ui-state-" + state ); }; this.lis.bind( "mouseover.tabs" , function() { addState( "hover", $( this ) ); }); this.lis.bind( "mouseout.tabs", function() { removeState( "hover", $( this ) ); }); this.anchors.bind( "focus.tabs", function() { addState( "focus", $( this ).closest( "li" ) ); }); this.anchors.bind( "blur.tabs", function() { removeState( "focus", $( this ).closest( "li" ) ); }); } // set up animations var hideFx, showFx; if ( o.fx ) { if ( $.isArray( o.fx ) ) { hideFx = o.fx[ 0 ]; showFx = o.fx[ 1 ]; } else { hideFx = showFx = o.fx; } } // Reset certain styles left over from animation // and prevent IE's ClearType bug... function resetStyle( $el, fx ) { $el.css( "display", "" ); if ( !$.support.opacity && fx.opacity ) { $el[ 0 ].style.removeAttribute( "filter" ); } } // Show a tab... var showTab = showFx ? function( clicked, $show ) { $( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" ); $show.hide().removeClass( "ui-tabs-hide" ) // avoid flicker that way .animate( showFx, showFx.duration || "normal", function() { resetStyle( $show, showFx ); self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) ); }); } : function( clicked, $show ) { $( clicked ).closest( "li" ).addClass( "ui-tabs-selected ui-state-active" ); $show.removeClass( "ui-tabs-hide" ); self._trigger( "show", null, self._ui( clicked, $show[ 0 ] ) ); }; // Hide a tab, $show is optional... var hideTab = hideFx ? function( clicked, $hide ) { $hide.animate( hideFx, hideFx.duration || "normal", function() { self.lis.removeClass( "ui-tabs-selected ui-state-active" ); $hide.addClass( "ui-tabs-hide" ); resetStyle( $hide, hideFx ); self.element.dequeue( "tabs" ); }); } : function( clicked, $hide, $show ) { self.lis.removeClass( "ui-tabs-selected ui-state-active" ); $hide.addClass( "ui-tabs-hide" ); self.element.dequeue( "tabs" ); }; // attach tab event handler, unbind to avoid duplicates from former tabifying... this.anchors.bind( o.event + ".tabs", function() { var el = this, $li = $(el).closest( "li" ), $hide = self.panels.filter( ":not(.ui-tabs-hide)" ), $show = self.element.find( self._sanitizeSelector( el.hash ) ); // If tab is already selected and not collapsible or tab disabled or // or is already loading or click callback returns false stop here. // Check if click handler returns false last so that it is not executed // for a disabled or loading tab! if ( ( $li.hasClass( "ui-tabs-selected" ) && !o.collapsible) || $li.hasClass( "ui-state-disabled" ) || $li.hasClass( "ui-state-processing" ) || self.panels.filter( ":animated" ).length || self._trigger( "select", null, self._ui( this, $show[ 0 ] ) ) === false ) { this.blur(); return false; } o.selected = self.anchors.index( this ); self.abort(); // if tab may be closed if ( o.collapsible ) { if ( $li.hasClass( "ui-tabs-selected" ) ) { o.selected = -1; if ( o.cookie ) { self._cookie( o.selected, o.cookie ); } self.element.queue( "tabs", function() { hideTab( el, $hide ); }).dequeue( "tabs" ); this.blur(); return false; } else if ( !$hide.length ) { if ( o.cookie ) { self._cookie( o.selected, o.cookie ); } self.element.queue( "tabs", function() { showTab( el, $show ); }); // TODO make passing in node possible, see also http://dev.jqueryui.com/ticket/3171 self.load( self.anchors.index( this ) ); this.blur(); return false; } } if ( o.cookie ) { self._cookie( o.selected, o.cookie ); } // show new tab if ( $show.length ) { if ( $hide.length ) { self.element.queue( "tabs", function() { hideTab( el, $hide ); }); } self.element.queue( "tabs", function() { showTab( el, $show ); }); self.load( self.anchors.index( this ) ); } else { throw "jQuery UI Tabs: Mismatching fragment identifier."; } // Prevent IE from keeping other link focussed when using the back button // and remove dotted border from clicked link. This is controlled via CSS // in modern browsers; blur() removes focus from address bar in Firefox // which can become a usability and annoying problem with tabs('rotate'). if ( $.browser.msie ) { this.blur(); } }); // disable click in any case this.anchors.bind( "click.tabs", function(){ return false; }); }, _getIndex: function( index ) { // meta-function to give users option to provide a href string instead of a numerical index. // also sanitizes numerical indexes to valid values. if ( typeof index == "string" ) { index = this.anchors.index( this.anchors.filter( "[href$=" + index + "]" ) ); } return index; }, destroy: function() { var o = this.options; this.abort(); this.element .unbind( ".tabs" ) .removeClass( "ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible" ) .removeData( "tabs" ); this.list.removeClass( "ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all" ); this.anchors.each(function() { var href = $.data( this, "href.tabs" ); if ( href ) { this.href = href; } var $this = $( this ).unbind( ".tabs" ); $.each( [ "href", "load", "cache" ], function( i, prefix ) { $this.removeData( prefix + ".tabs" ); }); }); this.lis.unbind( ".tabs" ).add( this.panels ).each(function() { if ( $.data( this, "destroy.tabs" ) ) { $( this ).remove(); } else { $( this ).removeClass([ "ui-state-default", "ui-corner-top", "ui-tabs-selected", "ui-state-active", "ui-state-hover", "ui-state-focus", "ui-state-disabled", "ui-tabs-panel", "ui-widget-content", "ui-corner-bottom", "ui-tabs-hide" ].join( " " ) ); } }); if ( o.cookie ) { this._cookie( null, o.cookie ); } return this; }, add: function( url, label, index ) { if ( index === undefined ) { index = this.anchors.length; } var self = this, o = this.options, $li = $( o.tabTemplate.replace( /#\{href\}/g, url ).replace( /#\{label\}/g, label ) ), id = !url.indexOf( "#" ) ? url.replace( "#", "" ) : this._tabId( $( "a", $li )[ 0 ] ); $li.addClass( "ui-state-default ui-corner-top" ).data( "destroy.tabs", true ); // try to find an existing element before creating a new one var $panel = self.element.find( "#" + id ); if ( !$panel.length ) { $panel = $( o.panelTemplate ) .attr( "id", id ) .data( "destroy.tabs", true ); } $panel.addClass( "ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide" ); if ( index >= this.lis.length ) { $li.appendTo( this.list ); $panel.appendTo( this.list[ 0 ].parentNode ); } else { $li.insertBefore( this.lis[ index ] ); $panel.insertBefore( this.panels[ index ] ); } o.disabled = $.map( o.disabled, function( n, i ) { return n >= index ? ++n : n; }); this._tabify(); if ( this.anchors.length == 1 ) { o.selected = 0; $li.addClass( "ui-tabs-selected ui-state-active" ); $panel.removeClass( "ui-tabs-hide" ); this.element.queue( "tabs", function() { self._trigger( "show", null, self._ui( self.anchors[ 0 ], self.panels[ 0 ] ) ); }); this.load( 0 ); } this._trigger( "add", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); return this; }, remove: function( index ) { index = this._getIndex( index ); var o = this.options, $li = this.lis.eq( index ).remove(), $panel = this.panels.eq( index ).remove(); // If selected tab was removed focus tab to the right or // in case the last tab was removed the tab to the left. if ( $li.hasClass( "ui-tabs-selected" ) && this.anchors.length > 1) { this.select( index + ( index + 1 < this.anchors.length ? 1 : -1 ) ); } o.disabled = $.map( $.grep( o.disabled, function(n, i) { return n != index; }), function( n, i ) { return n >= index ? --n : n; }); this._tabify(); this._trigger( "remove", null, this._ui( $li.find( "a" )[ 0 ], $panel[ 0 ] ) ); return this; }, enable: function( index ) { index = this._getIndex( index ); var o = this.options; if ( $.inArray( index, o.disabled ) == -1 ) { return; } this.lis.eq( index ).removeClass( "ui-state-disabled" ); o.disabled = $.grep( o.disabled, function( n, i ) { return n != index; }); this._trigger( "enable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); return this; }, disable: function( index ) { index = this._getIndex( index ); var self = this, o = this.options; // cannot disable already selected tab if ( index != o.selected ) { this.lis.eq( index ).addClass( "ui-state-disabled" ); o.disabled.push( index ); o.disabled.sort(); this._trigger( "disable", null, this._ui( this.anchors[ index ], this.panels[ index ] ) ); } return this; }, select: function( index ) { index = this._getIndex( index ); if ( index == -1 ) { if ( this.options.collapsible && this.options.selected != -1 ) { index = this.options.selected; } else { return this; } } this.anchors.eq( index ).trigger( this.options.event + ".tabs" ); return this; }, load: function( index ) { index = this._getIndex( index ); var self = this, o = this.options, a = this.anchors.eq( index )[ 0 ], url = $.data( a, "load.tabs" ); this.abort(); // not remote or from cache if ( !url || this.element.queue( "tabs" ).length !== 0 && $.data( a, "cache.tabs" ) ) { this.element.dequeue( "tabs" ); return; } // load remote from here on this.lis.eq( index ).addClass( "ui-state-processing" ); if ( o.spinner ) { var span = $( "span", a ); span.data( "label.tabs", span.html() ).html( o.spinner ); } this.xhr = $.ajax( $.extend( {}, o.ajaxOptions, { url: url, success: function( r, s ) { self.element.find( self._sanitizeSelector( a.hash ) ).html( r ); // take care of tab labels self._cleanup(); if ( o.cache ) { $.data( a, "cache.tabs", true ); } self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) ); try { o.ajaxOptions.success( r, s ); } catch ( e ) {} }, error: function( xhr, s, e ) { // take care of tab labels self._cleanup(); self._trigger( "load", null, self._ui( self.anchors[ index ], self.panels[ index ] ) ); try { // Passing index avoid a race condition when this method is // called after the user has selected another tab. // Pass the anchor that initiated this request allows // loadError to manipulate the tab content panel via $(a.hash) o.ajaxOptions.error( xhr, s, index, a ); } catch ( e ) {} } } ) ); // last, so that load event is fired before show... self.element.dequeue( "tabs" ); return this; }, abort: function() { // stop possibly running animations this.element.queue( [] ); this.panels.stop( false, true ); // "tabs" queue must not contain more than two elements, // which are the callbacks for the latest clicked tab... this.element.queue( "tabs", this.element.queue( "tabs" ).splice( -2, 2 ) ); // terminate pending requests from other tabs if ( this.xhr ) { this.xhr.abort(); delete this.xhr; } // take care of tab labels this._cleanup(); return this; }, url: function( index, url ) { this.anchors.eq( index ).removeData( "cache.tabs" ).data( "load.tabs", url ); return this; }, length: function() { return this.anchors.length; } }); $.extend( $.ui.tabs, { version: "1.8.16" }); /* * Tabs Extensions */ /* * Rotate */ $.extend( $.ui.tabs.prototype, { rotation: null, rotate: function( ms, continuing ) { var self = this, o = this.options; var rotate = self._rotate || ( self._rotate = function( e ) { clearTimeout( self.rotation ); self.rotation = setTimeout(function() { var t = o.selected; self.select( ++t < self.anchors.length ? t : 0 ); }, ms ); if ( e ) { e.stopPropagation(); } }); var stop = self._unrotate || ( self._unrotate = !continuing ? function(e) { if (e.clientX) { // in case of a true click self.rotate(null); } } : function( e ) { t = o.selected; rotate(); }); // start rotation if ( ms ) { this.element.bind( "tabsshow", rotate ); this.anchors.bind( o.event + ".tabs", stop ); rotate(); // stop rotation } else { clearTimeout( self.rotation ); this.element.unbind( "tabsshow", rotate ); this.anchors.unbind( o.event + ".tabs", stop ); delete this._rotate; delete this._unrotate; } return this; } }); })( jQuery ); });
ticup/SynerJ
public/libs/jquery-ui-require/jqueryui/tabs.js
JavaScript
mit
21,339
[ 30522, 9375, 1006, 1005, 1046, 4226, 2854, 10179, 1013, 21628, 2015, 1005, 1010, 1031, 1005, 1046, 4226, 2854, 1005, 1010, 1005, 1046, 4226, 2854, 10179, 1013, 4563, 1005, 1010, 1005, 1046, 4226, 2854, 10179, 1013, 15536, 24291, 1005, 1033,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php // This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /** * Cancel an order * * @package order * @copyright 2013 Antonio Espinosa <aespinosa@teachnova.com> * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ require_once('../../../config.php'); require_once($CFG->dirroot . '/local/order/registry/lib.php'); require_once($CFG->dirroot . '/local/order/admin/lib.php'); $orderid = required_param('orderid', PARAM_INT); $return = optional_param('return', '/', PARAM_URL); $confirm = optional_param('confirm', 0, PARAM_BOOL); require_login(SITEID, false); local_order_require_capability('manage'); $returnurl = new moodle_url($return); $order = local_order::read($orderid); if (empty($order)) { redirect($returnurl, $this->get_string('error_order_not_found')); } $PAGE->set_context(context_system::instance()); $PAGE->set_pagelayout('standard'); $pageurl = new moodle_url('/local/order/admin/order_cancel.php', array('orderid' => $orderid, 'return' => $return, 'confirm' => $confirm)); $PAGE->set_url($pageurl); $PAGE->set_title(get_string('title_admin_order_cancel', 'local_order')); $PAGE->set_heading(get_string('heading_admin_order_cancel', 'local_order')); $confirmurl = new moodle_url('/local/order/admin/order_cancel.php', array('orderid' => $orderid, 'return' => $return, 'confirm' => 1)); if ($confirm and confirm_sesskey()) { // Validate order $errors = $order->cancel(); if (empty($errors)) { redirect($returnurl, get_string('order_cancelled', 'local_order')); } else { $errormsg = $this->get_string('error_order_can_not_cancel'); foreach ($errors as $error) { $errormsg .= $this->get_string('error_order_can_not_cancel_by_error', $error); } redirect($returnurl, $errormsg); } } else { // Ask for comfirmation echo $OUTPUT->header(); echo $OUTPUT->box_start('', 'local_order'); echo $OUTPUT->heading(get_string('heading_admin_order_cancel', 'local_order')); $formcontinue = new single_button($confirmurl, get_string('yes')); $formcancel = new single_button($returnurl, get_string('no'), 'get'); $strorder = new StdClass(); $strorder->uniqueid = $order->entry->uniqueid; echo $OUTPUT->confirm(get_string('confirmation_cancel', 'local_order', $strorder), $formcontinue, $formcancel); echo $OUTPUT->box_end(); echo $OUTPUT->footer(); }
Cohaerentis/moodle_local_order
admin/order_cancel.php
PHP
gpl-3.0
3,226
[ 30522, 1026, 1029, 25718, 1013, 1013, 2023, 5371, 2003, 2112, 1997, 6888, 2571, 1011, 8299, 1024, 1013, 1013, 6888, 2571, 1012, 8917, 1013, 1013, 1013, 1013, 1013, 6888, 2571, 2003, 2489, 4007, 1024, 2017, 2064, 2417, 2923, 3089, 8569, 26...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# -*- encoding: utf-8 -*- # Copyright (c) Microsoft Corporation # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY # IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR # PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. # # See the Apache Version 2.0 License for specific language governing # permissions and limitations under the License. require File.expand_path('../../spec_helper', __FILE__) describe Plangrade::Resources::Base do class DummyModel < Plangrade::Resources::Base attr_accessor_deffered :name, :email end class Plangrade::Client def update_dummy_model(id, opts={}) put("/api/v1/dummy_models/#{id}", opts) end end before :all do Plangrade.configure do |conf| conf.access_token = 'TolNOFka9Uls2DxahNi78A' end end after :all do Plangrade.reset! end context 'new user object with id' do subject { DummyModel.new(:id => 42) } describe "#id" do it 'should be 42' do expect(subject.id).to eq 42 end end describe "#id=" do it 'sets id' do subject.send(:"id=", 2) expect(subject.id).to eq 2 end end describe "#new_record?" do it 'returns false' do expect(subject.new_record?).to eq false end end describe "#modified?" do context 'new model and no changes' do it 'returns false' do model = DummyModel.new(:name => 'jim', :email => 'compliance@plangrade.com') expect(model.modified?).to eq false end end context 'new model and no changes' do it 'returns false' do model = DummyModel.new(:name => 'mary', :email => 'support@plangrade.com') model.name = 'jim' model.email = 'compliance@plangrade.com' expect(model.modified?).to eq false end end context 'persisted model and no changes' do it 'returns true' do model = DummyModel.new(:id => 12, :name => 'jim', :email => 'compliance@plangrade.com') expect(model.modified?).to eq false end end context 'persisted model and changes' do it 'returns true' do model = DummyModel.new(:id => 42, :name => 'jim', :email => 'compliance@plangrade.com') model.name = 'smithy' expect(model.modified?).to eq true end end end describe "#changes" do it 'returns empty hash' do expect(subject.changes).to eq({}) end end describe "#save" do it 'returns true' do stub_request(:put, "https://plangrade.com/api/v1/dummy_models/42").with( :body => {"name"=>"smithy"}, :headers => { 'Accept' =>'application/json', 'Authorization'=>'Bearer TolNOFka9Uls2DxahNi78A', 'Content-Type' =>'application/x-www-form-urlencoded', 'User-Agent' =>"Plangrade Ruby Gem #{Plangrade::Ruby::VERSION}"}) model = DummyModel.new(:id => 42, :name => 'jim', :email => 'compliance@plangrade.com') model.name = 'smithy' model.save end end describe "#base_name" do it 'returns true' do expect(subject.base_name).to eq 'dummy_model' end end describe "setters" do it 'should update modified attributes hash' do subject end end describe "#save" do context 'unmodified model' do it 'does nothing' do expect(subject.save).to eq subject end end context 'modified model' do subject { DummyModel.new(:id => 42, :name => 'john', :email => 'compliance@plangrade.com') } it 'should update model' do api_handler = double("ApiHandler") expect(api_handler).to receive(:update_dummy_model).with(42, hash_including( :name =>'john', :email => 'support@plangrade.com') ).and_return(double('Response', :success? => true, :created? => true, :body => {:id => 2})) allow(subject).to receive_message_chain(:api_handler).and_return(api_handler) subject.name = 'john' subject.email = 'support@plangrade.com' subject.save end end context 'unmodified new model' do subject { DummyModel.new(:name => 'jim', :email => 'compliance@plangrade.com') } it 'should do nothing' do api_handler = double("ApiHandler") expect(api_handler).to receive(:create_dummy_model).with( hash_including(:name =>'jim', :email => 'compliance@plangrade.com') ).and_return(double('Response', :success? => true, :created? => true, :body => {:id => '2'})) allow(subject).to receive_message_chain(:api_handler).and_return(api_handler) subject.save end end context 'modified new model' do subject { DummyModel.new(:name => 'jim', :email => 'compliance@plangrade.com') } it 'should create model' do api_handler = double("ApiHandler") expect(api_handler).to receive(:create_dummy_model).with({ :name =>'john', :email => 'compliance@plangrade.com' }).and_return(double('Response', :success? => true, :created? => true, :body => {:id => 2})) allow(subject).to receive_message_chain(:api_handler).and_return(api_handler) subject.name = 'john' subject.save end end end end end
plangrade/plangrade-ruby
spec/resources/base_spec.rb
Ruby
mit
5,799
[ 30522, 1001, 1011, 1008, 1011, 17181, 1024, 21183, 2546, 1011, 1022, 1011, 1008, 1011, 1001, 9385, 1006, 1039, 1007, 7513, 3840, 1001, 2035, 2916, 9235, 1012, 1001, 1001, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#ifndef __DE_CLOCK_H__ #define __DE_CLOCK_H__ #include "ebios_de.h" typedef enum { CLK_NONE = 0, SYS_CLK_PLL3 = 1, SYS_CLK_PLL7 = 2, SYS_CLK_PLL9 = 3, SYS_CLK_PLL10 = 4, SYS_CLK_PLL3X2 = 5, SYS_CLK_PLL6 = 6, SYS_CLK_PLL6x2 = 7, SYS_CLK_PLL7X2 = 8, SYS_CLK_MIPIPLL = 9, MOD_CLK_DEBE0 = 16, MOD_CLK_DEBE1 = 17, MOD_CLK_DEFE0 = 18, MOD_CLK_DEFE1 = 19, MOD_CLK_LCD0CH0 = 20, MOD_CLK_LCD0CH1 = 21, MOD_CLK_LCD1CH0 = 22, MOD_CLK_LCD1CH1 = 23, MOD_CLK_HDMI = 24, MOD_CLK_HDMI_DDC = 25, MOD_CLK_MIPIDSIS = 26, MOD_CLK_MIPIDSIP = 27, MOD_CLK_IEPDRC0 = 28, MOD_CLK_IEPDRC1 = 29, MOD_CLK_IEPDEU0 = 30, MOD_CLK_IEPDEU1 = 31, MOD_CLK_LVDS = 32, MOD_CLK_EDP = 33, MOD_CLK_DEBE2 = 34, MOD_CLK_DEFE2 = 35, MOD_CLK_SAT0 = 36, MOD_CLK_SAT1 = 37, MOD_CLK_SAT2 = 38, MOD_CLK_MERGE = 39, }__disp_clk_id_t; typedef struct { __disp_clk_id_t id; /* clock id */ char *name; /* clock name */ char *src_name; u32 freq; struct clk *hdl; }__disp_clk_t; extern __disp_clk_t disp_clk_pll_tbl[3]; extern __disp_clk_t disp_clk_mod_tbl[8]; #endif //__DE_CLOCK_H__
willemwouters/orangepi_kernel
drivers/video/sunxi/disp/de/lowlevel_sun8iw5/de_clock.h
C
gpl-2.0
1,114
[ 30522, 1001, 2065, 13629, 2546, 1035, 1035, 2139, 1035, 5119, 1035, 1044, 1035, 1035, 1001, 9375, 1035, 1035, 2139, 1035, 5119, 1035, 1044, 1035, 1035, 1001, 2421, 1000, 1041, 26282, 2015, 1035, 2139, 1012, 1044, 1000, 21189, 12879, 4372, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
When /^I change the pseud "([^\"]*)" to "([^\"]*)"/ do |old_pseud, new_pseud| step %{I edit the pseud "#{old_pseud}"} fill_in("Name", with: new_pseud) click_button("Update") end When /^I edit the pseud "([^\"]*)"/ do |pseud| p = Pseud.where(name: pseud, user_id: User.current_user.id).first visit edit_user_pseud_path(User.current_user, p) end When /^I add the pseud "([^\"]*)"/ do |pseud| visit new_user_pseud_path(User.current_user) fill_in("Name", with: pseud) click_button("Create") end When(/^I delete the pseud "([^\"]*)"$/) do |pseud| visit user_pseuds_path(User.current_user) click_link("delete_#{pseud}") end
tuff/otwarchive
features/step_definitions/pseud_steps.rb
Ruby
gpl-2.0
643
[ 30522, 2043, 1013, 1034, 1045, 2689, 1996, 8827, 13765, 2094, 1000, 1006, 1031, 1034, 1032, 1000, 1033, 1008, 1007, 1000, 2000, 1000, 1006, 1031, 1034, 1032, 1000, 1033, 1008, 1007, 1000, 1013, 2079, 1064, 2214, 1035, 8827, 13765, 2094, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright (c) 2013, Colorado State University All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This software is provided by the copyright holders and contributors "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright holder or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. */ package galileo.net; import java.io.IOException; import java.net.Socket; import java.nio.BufferUnderflowException; import java.nio.ByteBuffer; import java.nio.channels.CancelledKeyException; import java.nio.channels.SelectionKey; import java.nio.channels.Selector; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import java.util.logging.Logger; /** * Provides an abstract implementation for consuming and publishing messages on * both the server and client side. * * @author malensek */ public abstract class MessageRouter implements Runnable { protected static final Logger logger = Logger.getLogger("galileo"); /** The size (in bytes) of the message prefix used in the system. */ public static final int PREFIX_SZ = Integer.SIZE / Byte.SIZE; /** The default read buffer size is 8 MB. */ public static final int DEFAULT_READ_BUFFER_SIZE = 8388608; /** The default write queue allows 100 items to be inserted before it * starts blocking. This prevents situations where the MessageRouter is * overwhelmed by an extreme number of write requests, exhausting available * resources. */ public static final int DEFAULT_WRITE_QUEUE_SIZE = 100; /** System property that overrides the read buffer size. */ public static final String READ_BUFFER_PROPERTY = "galileo.net.MessageRouter.readBufferSize"; /** System property that overrides the write queue maximum size. */ public static final String WRITE_QUEUE_PROPERTY = "galileo.net.MessageRouter.writeQueueSize"; /** Flag used to determine whether the Selector thread should run */ protected boolean online; private List<MessageListener> listeners = new ArrayList<>(); protected Selector selector; protected int readBufferSize; protected int writeQueueSize; private ByteBuffer readBuffer; protected ConcurrentHashMap<SelectionKey, Integer> changeInterest = new ConcurrentHashMap<>(); public MessageRouter() { this(DEFAULT_READ_BUFFER_SIZE, DEFAULT_WRITE_QUEUE_SIZE); } public MessageRouter(int readBufferSize, int maxWriteQueueSize) { String readSz = System.getProperty(READ_BUFFER_PROPERTY); if (readSz == null) { this.readBufferSize = readBufferSize; } else { this.readBufferSize = Integer.parseInt(readSz); } String queueSz = System.getProperty(WRITE_QUEUE_PROPERTY); if (queueSz == null) { this.writeQueueSize = maxWriteQueueSize; } else { this.writeQueueSize = Integer.parseInt(queueSz); } readBuffer = ByteBuffer.allocateDirect(this.readBufferSize); } /** * As long as the MessageRouter is online, monitor connection operations * through the Selector instance. */ @Override public void run() { while (online) { try { updateInterestOps(); processSelectionKeys(); } catch (IOException e) { logger.log(Level.WARNING, "Error in selector thread", e); } } } /** * Updates interest sets for any SelectionKey instances that require * changes. This allows external threads to queue up changes to the * interest sets that will be fulfilled by the selector thread. */ protected void updateInterestOps() { Iterator<SelectionKey> it = changeInterest.keySet().iterator(); while (it.hasNext()) { SelectionKey key = it.next(); if (key.isValid()) { SocketChannel channel = (SocketChannel) key.channel(); if (channel.isConnected() == false || channel.isRegistered() == false) { continue; } key.interestOps(changeInterest.get(key)); } changeInterest.remove(key); } } /** * Performs a select operation, and then processes the resulting * SelectionKey set based on interest ops. */ protected void processSelectionKeys() throws IOException { selector.select(); Iterator<SelectionKey> keys = selector.selectedKeys().iterator(); while (keys.hasNext()) { SelectionKey key = keys.next(); keys.remove(); if (key.isValid() == false) { continue; } try { if (key.isAcceptable()) { accept(key); continue; } if (key.isConnectable()) { connect(key); continue; } if (key.isWritable()) { write(key); } if (key.isReadable()) { read(key); } } catch (CancelledKeyException e) { /* SelectionKey was cancelled by another thread. */ continue; } } } /** * Accepts new connections. * * @param key The SelectionKey for the connecting client. */ protected void accept(SelectionKey key) throws IOException { ServerSocketChannel servSocket = (ServerSocketChannel) key.channel(); SocketChannel channel = servSocket.accept(); logger.info("Accepted connection: " + getClientString(channel)); TransmissionTracker tracker = new TransmissionTracker(writeQueueSize); channel.configureBlocking(false); channel.register(selector, SelectionKey.OP_READ, tracker); dispatchConnect(getDestination(channel)); } /** * Finishes setting up a connection on a SocketChannel. * * @param key SelectionKey for the SocketChannel. */ protected void connect(SelectionKey key) { try { SocketChannel channel = (SocketChannel) key.channel(); if (channel.finishConnect()) { TransmissionTracker tracker = TransmissionTracker.fromKey(key); if (tracker.hasPendingData() == false) { changeInterest.put(key, SelectionKey.OP_READ); } else { /* Data has already been queued up; start writing */ changeInterest.put(key, SelectionKey.OP_READ | SelectionKey.OP_WRITE); } } dispatchConnect(getDestination(channel)); } catch (IOException e) { logger.log(Level.INFO, "Connection finalization failed", e); disconnect(key); } } /** * Read data from a SocketChannel. * * @param key SelectionKey for the SocketChannel. */ protected void read(SelectionKey key) { SocketChannel channel = (SocketChannel) key.channel(); readBuffer.clear(); int bytesRead = 0; try { /* Read data from the channel */ while ((bytesRead = channel.read(readBuffer)) > 0) { readBuffer.flip(); processIncomingMessage(key); } } catch (IOException e) { logger.log(Level.FINE, "Abnormal remote termination", e); disconnect(key); return; } catch (BufferUnderflowException e) { /* Incoming packets lied about their size! */ logger.log(Level.WARNING, "Incoming packet size mismatch", e); } if (bytesRead == -1) { /* Connection was terminated by the client. */ logger.fine("Reached EOF in channel input stream"); disconnect(key); return; } } /** * Process data received from a client SocketChannel. This method is * chiefly concerned with processing incoming data streams into * GalileoMessage packets to be consumed by the system. * * @param key SelectionKey for the client. */ protected void processIncomingMessage(SelectionKey key) { TransmissionTracker transmission = TransmissionTracker.fromKey(key); if (transmission.expectedBytes == 0) { /* We don't know how much data the client is sending yet. * Read the message prefix to determine the payload size. */ boolean ready = readPrefix(readBuffer, transmission); /* Check if we have read the payload size prefix yet. If * not, then we're done for now. */ if (ready == false) { return; } } int readSize = transmission.expectedBytes - transmission.readPointer; if (readSize > readBuffer.remaining()) { readSize = readBuffer.remaining(); } readBuffer.get(transmission.payload, transmission.readPointer, readSize); transmission.readPointer += readSize; if (transmission.readPointer == transmission.expectedBytes) { /* The payload has been read */ GalileoMessage msg = new GalileoMessage( transmission.payload, new MessageContext(this, key)); dispatchMessage(msg); transmission.resetCounters(); if (readBuffer.hasRemaining()) { /* There is another payload to read */ processIncomingMessage(key); /* Note: this process continues until we reach the end of the * buffer. Not doing so would cause us to lose data. */ } } } /** * Read the payload size prefix from a channel. * Each message in Galileo is prefixed with a payload size field; this is * read to allocate buffers for the incoming message. * * @return true if the payload size has been determined; false otherwise. */ protected static boolean readPrefix(ByteBuffer buffer, TransmissionTracker transmission) { /* Make sure the prefix hasn't already been read. */ if (transmission.expectedBytes != 0) { return true; } /* Can we determine the payload size in one shot? (we must read at least * PREFIX_SZ bytes) */ if (transmission.prefixPointer == 0 && buffer.remaining() >= PREFIX_SZ) { transmission.expectedBytes = buffer.getInt(); transmission.allocatePayload(); return true; } else { /* Keep reading until we have at least PREFIX_SZ bytes to determine * the payload size. */ int prefixLeft = PREFIX_SZ - transmission.prefixPointer; if (buffer.remaining() < prefixLeft) { prefixLeft = buffer.remaining(); } buffer.get(transmission.prefix, transmission.prefixPointer, prefixLeft); transmission.prefixPointer += prefixLeft; if (transmission.prefixPointer >= PREFIX_SZ) { ByteBuffer buf = ByteBuffer.wrap(transmission.prefix); transmission.expectedBytes = buf.getInt(); transmission.allocatePayload(); return true; } } return false; } /** * Wraps a given message in a {@link ByteBuffer}, including the payload size * prefix. Data produced by this method will be subsequently read by the * readPrefix() method. */ protected static ByteBuffer wrapWithPrefix(GalileoMessage message) { int messageSize = message.getPayload().length; ByteBuffer buffer = ByteBuffer.allocate(messageSize + 4); buffer.putInt(messageSize); buffer.put(message.getPayload()); buffer.flip(); return buffer; } /** * Adds a message to the pending write queue for a particular SelectionKey * and submits a change request for its interest set. Pending data is placed * in a blocking queue, so this function may block to prevent queueing an * excessive amount of data. * <p> * The system property <em>galileo.net.MessageRouter.writeQueueSize</em> * tunes the maximum amount of data that can be queued. * * @param key SelectionKey for the channel. * @param message GalileoMessage to publish on the channel. * * @return {@link Transmission} instance representing the send operation. */ public Transmission sendMessage(SelectionKey key, GalileoMessage message) throws IOException { //TODO reduce the visibility of this method to protected if (this.isOnline() == false) { throw new IOException("MessageRouter is not online."); } TransmissionTracker tracker = TransmissionTracker.fromKey(key); ByteBuffer payload = wrapWithPrefix(message); Transmission trans = null; try { tracker.queueOutgoingData(payload); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IOException("Interrupted while waiting to queue data"); } changeInterest.put(key, SelectionKey.OP_READ | SelectionKey.OP_WRITE); selector.wakeup(); return trans; } /** * When a {@link SelectionKey} is writable, push as much pending data * out on the channel as possible. * * @param key {@link SelectionKey} of the channel to write to. */ private void write(SelectionKey key) { TransmissionTracker tracker = TransmissionTracker.fromKey(key); SocketChannel channel = (SocketChannel) key.channel(); while (tracker.hasPendingData() == true) { Transmission trans = tracker.getNextTransmission(); ByteBuffer buffer = trans.getPayload(); if (buffer == null) { break; } int written = 0; while (buffer.hasRemaining()) { try { written = channel.write(buffer); } catch (IOException e) { /* Broken pipe */ disconnect(key); return; } if (buffer.hasRemaining() == false) { /* Done writing */ tracker.transmissionFinished(); } if (written == 0) { /* Return now, to keep our OP_WRITE interest op set. */ return; } } } /* At this point, the queue is empty. */ key.interestOps(SelectionKey.OP_READ); return; } /** * Handle termination of connections. * * @param key The SelectionKey of the SocketChannel that has disconnected. */ protected void disconnect(SelectionKey key) { if (key.isValid() == false) { return; } SocketChannel channel = (SocketChannel) key.channel(); NetworkDestination destination = getDestination(channel); logger.info("Terminating connection: " + destination.toString()); try { key.cancel(); key.channel().close(); } catch (IOException e) { logger.log(Level.WARNING, "Failed to disconnect channel", e); } dispatchDisconnect(destination); } /** * Adds a message listener (consumer) to this MessageRouter. Listeners * receive messages that are published by this MessageRouter. * * @param listener {@link MessageListener} that will consume messages * published by this MessageRouter. */ public void addListener(MessageListener listener) { listeners.add(listener); } /** * Dispatches a message to all listening consumers. * * @param message {@link GalileoMessage} to dispatch. */ protected void dispatchMessage(GalileoMessage message) { for (MessageListener listener : listeners) { listener.onMessage(message); } } /** * Informs all listening consumers that a connection to a remote endpoint * has been made. */ protected void dispatchConnect(NetworkDestination endpoint) { for (MessageListener listener : listeners) { listener.onConnect(endpoint); } } /** * Informs all listening consumers that a connection to a remote endpoint * has been terminated. */ protected void dispatchDisconnect(NetworkDestination endpoint) { for (MessageListener listener : listeners) { listener.onDisconnect(endpoint); } } /** * Determines whether or not this MessageRouter is online. As long as the * router is online, the selector thread will continue to run. * * @return true if the MessageRouter instance is online and running. */ public boolean isOnline() { return this.online; } /** * Determines a connection's hostname and port, then concatenates the two * values, separated by a colon (:). * * @param channel Channel to get client information about. */ protected static String getClientString(SocketChannel channel) { Socket socket = channel.socket(); return socket.getInetAddress().getHostName() + ":" + socket.getPort(); } /** * Determines a connection's endpoint information (hostname and port) and * encapsulates them in a {@link NetworkDestination}. * * @param channel The SocketChannel of the network endpoint. * * @return NetworkDestination representation of the endpoint. */ protected static NetworkDestination getDestination(SocketChannel channel) { Socket socket = channel.socket(); return new NetworkDestination( socket.getInetAddress().getHostName(), socket.getPort()); } }
CameronTolooee/galileo
src/galileo/net/MessageRouter.java
Java
bsd-2-clause
19,491
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2286, 1010, 5169, 2110, 2118, 2035, 2916, 9235, 1012, 25707, 1998, 2224, 1999, 3120, 1998, 12441, 3596, 1010, 2007, 2030, 2302, 14080, 1010, 2024, 7936, 3024, 2008, 1996, 2206, 3785, 2024, 2777, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Created by Samuel Schmid on 23.03.14. * * Class for Database Handling * * Containing * - App Config * - Database Information * * @type {Database} */ module.exports = Database; Array.prototype.contains = function(obj) { var i = this.length; while (i--) { if (this[i] === obj) { return true; } } return false; } String.prototype.replaceAll = function(target, replacement) { return this.split(target).join(replacement); }; function Database(grunt) { this.grunt = grunt; this.appconfig = grunt.config().appconfig; this.db = this.appconfig.db; } /** * delete Database Schemes of Docs * * @param docs */ Database.prototype.deleteSchemes = function(docs) { var grunt = this.grunt; grunt.log.debug("start "); if(docs.docs.length > 0) { var firstDoc = docs.docs[0]; var rootfolder = firstDoc.schemefolder.split("/")[0]; grunt.log.debug("Database: delete files in folder:" + rootfolder); grunt.file.delete(rootfolder); } else { grunt.log.debug("Empty"); return; } } /** * create Database Schemes for Docs * * @param docs */ Database.prototype.createSchemes = function(docs) { var grunt = this.grunt; if(this.db.name === "mongodb") { if(this.db.provider === "mongoose") { grunt.log.write("start writing schemes for database " + this.db.name + " and provider "+this.db.provider + "."); var Provider = require('./providers/mongoose/mongoose-provider.js'); var provider = new Provider(grunt); for(var i=0;i<docs.docs.length;i++) { var doc = docs.docs[i]; if(doc.json.type.endsWith('.abstract')) { provider.writeAbstractScheme(doc); } } for(var i=0;i<docs.docs.length;i++) { var doc = docs.docs[i]; if(!doc.json.type.endsWith('.apidescription') && !doc.json.type.endsWith('.abstract')) { provider.writeScheme(doc); } } provider.writeLib(); } else { grunt.log.write("cannot create schemes for database " + this.db.name + ", because there we can't use the provider "+this.db.provider+" for it."); } } else { grunt.log.write("cannot create schemes for database " + this.db.name + ", because there is no provider for it."); } }
veith/restapiexpress
grunt/database/database.js
JavaScript
mit
2,478
[ 30522, 1013, 1008, 1008, 1008, 2580, 2011, 5212, 8040, 26837, 2094, 2006, 2603, 1012, 6021, 1012, 2403, 1012, 1008, 1008, 2465, 2005, 7809, 8304, 1008, 1008, 4820, 1008, 1011, 10439, 9530, 8873, 2290, 1008, 1011, 7809, 2592, 1008, 1008, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import json import sublime import sublime_plugin from .edit import Edit class PawnBuildPathCommand(sublime_plugin.TextCommand): def run(self, edit): self.view.window().show_input_panel( "Working directory that contains pawncc.exe", "C:\\Pawno\\", self.onPawnPathDone, None, None ) def onPawnPathDone(self, path): view = self.view.window().new_file() path = path.replace("\\", "/") obj = { "cmd": [ "pawncc.exe", "$file", "-o$file_path/$file_base_name", "-;+", "-(+", "-d3" ], "file_regex": r"(.*?)\(([0-9]*)[- 0-9]*\)", "selector": "source.pwn", "working_dir": path } with Edit(view) as edit: edit.insert(0, json.dumps(obj, indent=4)) view.set_name("Pawn.sublime-build") view.run_command("save")
Southclaw/pawn-sublime-language
PawnBuildPath.py
Python
mit
1,010
[ 30522, 12324, 1046, 3385, 12324, 28341, 12324, 28341, 1035, 13354, 2378, 2013, 1012, 10086, 12324, 10086, 2465, 19175, 8569, 4014, 18927, 8988, 9006, 2386, 2094, 1006, 28341, 1035, 13354, 2378, 1012, 3793, 9006, 2386, 2094, 1007, 1024, 13366,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php class SV_OptimizedListQueries_Dark_PostRating_Model extends XFCP_SV_OptimizedListQueries_Dark_PostRating_Model { public function getRatingsForContentUser($userId, array $fetchOptions = []) { $options = XenForo_Application::get('options'); $limitOptions = $this->prepareLimitFetchOptions($fetchOptions); $optimisedLimit = ''; if ($limitOptions['offset'] === 0) { $optimisedLimit = 'LIMIT ' . $limitOptions['limit']; } // With the addition of the union for xf likes this is not a very nice query, but still within acceptable performance bounds IMHO considering how rarely it will run. // Edit: This query is now much nicer for the first page of results, which is very likely the only page users will ever bother looking at. return $this->fetchAllKeyed( 'SELECT * FROM (' . $this->limitQueryResults( ' ( SELECT pr.*, "post" as content_type, pr.post_id as content_id, pr.user_id as rating_user_id FROM dark_postrating pr WHERE pr.rated_user_id=? and pr.rating <> ? ORDER BY pr.date DESC ' . $optimisedLimit . ' ) UNION ALL ( SELECT liked_content.like_id as id, liked_content.content_id as post_id, liked_content.like_user_id as user_id, liked_content.content_user_id as rated_user_id, ? as rating, liked_content.like_date as date, liked_content.content_type, liked_content.content_id, liked_content.like_user_id as rating_user_id FROM xf_liked_content AS liked_content WHERE 1 = ? and liked_content.content_user_id = ? and liked_content.content_type = \'post\' ORDER BY liked_content.like_date DESC ' . $optimisedLimit . ' ) ORDER BY date DESC ', $limitOptions['limit'], $limitOptions['offset'] ) . ' ) ratings INNER JOIN xf_user AS user ON (user.user_id = ratings.rating_user_id)', 'id', [$userId, $options->dark_postrating_like_id, $options->dark_postrating_like_id, $options->dark_postrating_like_id > 0 ? 1 : 0, $userId] ); } public function getRatingsByContentUser($userId, array $fetchOptions = []) { $options = XenForo_Application::get('options'); $limitOptions = $this->prepareLimitFetchOptions($fetchOptions); $optimisedLimit = ''; if ($limitOptions['offset'] === 0) { $optimisedLimit = 'LIMIT ' . $limitOptions['limit']; } // See above thoughts on query performance (getRatingsForContentUser) return $this->fetchAllKeyed( 'SELECT * FROM (' . $this->limitQueryResults( ' ( SELECT pr.*, "post" as content_type, pr.post_id as content_id, pr.user_id as rating_user_id FROM dark_postrating pr WHERE pr.user_id=? and pr.rating <> ? ORDER BY pr.date DESC ' . $optimisedLimit . ' ) UNION ALL ( SELECT liked_content.like_id as id, liked_content.content_id as post_id, liked_content.like_user_id as user_id, liked_content.content_user_id as rated_user_id, ? as rating, liked_content.like_date as date, liked_content.content_type, liked_content.content_id, liked_content.like_user_id as rating_user_id FROM xf_liked_content AS liked_content WHERE 1 = ? and liked_content.like_user_id = ? and liked_content.content_type = \'post\' ORDER BY liked_content.like_date DESC ' . $optimisedLimit . ' ) ORDER BY date DESC ', $limitOptions['limit'], $limitOptions['offset'] ) . ' ) ratings INNER JOIN xf_user AS user ON (user.user_id = ratings.rated_user_id)', 'id', [$userId, $options->dark_postrating_like_id, $options->dark_postrating_like_id, $options->dark_postrating_like_id > 0 ? 1 : 0, $userId] ); } } // ******************** FOR IDE AUTO COMPLETE ******************** if (false) { class XFCP_SV_OptimizedListQueries_Dark_PostRating_Model extends Dark_PostRating_Model {} }
Xon/XenForo-OptimizedListQueries
upload/library/SV/OptimizedListQueries/Dark/PostRating/Model.php
PHP
mit
4,503
[ 30522, 1026, 1029, 25718, 2465, 17917, 1035, 23569, 27605, 5422, 9863, 4226, 5134, 1035, 2601, 1035, 2695, 15172, 1035, 2944, 8908, 1060, 11329, 2361, 1035, 17917, 1035, 23569, 27605, 5422, 9863, 4226, 5134, 1035, 2601, 1035, 2695, 15172, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright 2020 University of Toronto This file is part of TMG-Framework for XTMF2. TMG-Framework for XTMF2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. TMG-Framework for XTMF2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with TMG-Framework for XTMF2. If not, see <http://www.gnu.org/licenses/>. */ using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.IO; using TMG; using TMG.Frameworks.Data.Processing.AST; using TMG.Processing; using TMG.Test.Utilities; namespace TMG.Test.Processing { [TestClass] public class TestAppendMatrixValueToCSV { [TestMethod] public void AppendMatrixValueToCSV() { string csvFileName = Path.GetTempFileName(); string processedCsvFileName = Path.GetTempFileName(); try { var zoneSystem = MapHelper.LoadMap(64); var matrix = new Matrix(zoneSystem, zoneSystem); // Setup matrix matrix.GetFromSparseIndexes(5, 2) = 10; matrix.GetFromSparseIndexes(2, 5) = 11; matrix.GetFromSparseIndexes(10, 4) = 12; matrix.GetFromSparseIndexes(4, 10) = 13; // Setup CSV using (var writer = new StreamWriter(csvFileName)) { writer.WriteLine("O,D,OtherData"); writer.WriteLine("5,2,ABC"); writer.WriteLine("2,5,DEF"); writer.WriteLine("10,4,GHI"); writer.WriteLine("4,10,GHI"); } using (var readStream = Helper.CreateReadStreamFromFile(csvFileName)) using (var writeStream = Helper.CreateWriteStreamFromFile(processedCsvFileName)) { // Run append AppendMatrixValueToCSV appendModule = new AppendMatrixValueToCSV() { Name = "Append", Matrix = Helper.CreateParameter(matrix, "Matrix"), RowIndex = Helper.CreateParameter(0), ColumnIndex = Helper.CreateParameter(1), ColumnName = Helper.CreateParameter("MatrixValue"), InputStream = Helper.CreateParameter(readStream, "Reader"), OutputStream = Helper.CreateParameter(writeStream, "Writer") }; appendModule.Invoke(); } // Test Results using (var reader = new StreamReader(processedCsvFileName)) { Assert.AreEqual("O,D,OtherData,MatrixValue", reader.ReadLine()); Assert.AreEqual("5,2,ABC,10", reader.ReadLine()); Assert.AreEqual("2,5,DEF,11", reader.ReadLine()); Assert.AreEqual("10,4,GHI,12", reader.ReadLine()); Assert.AreEqual("4,10,GHI,13", reader.ReadLine()); Assert.AreEqual(null, reader.ReadLine()); } } finally { if (File.Exists(csvFileName)) { File.Delete(csvFileName); } if (File.Exists(processedCsvFileName)) { File.Delete(processedCsvFileName); } } } } }
TravelModellingGroup/TMG-Framework
TMG-Framework/tests/TMG-Framework.Test/Processing/TestAppendMatrixValueToCSV.cs
C#
gpl-3.0
3,944
[ 30522, 1013, 1008, 9385, 12609, 2118, 1997, 4361, 2023, 5371, 2003, 2112, 1997, 1056, 24798, 1011, 7705, 2005, 1060, 21246, 2546, 2475, 1012, 1056, 24798, 1011, 7705, 2005, 1060, 21246, 2546, 2475, 2003, 2489, 4007, 1024, 2017, 2064, 2417, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
version https://git-lfs.github.com/spec/v1 oid sha256:19eb3ffef04271f29432990f05ab086d7741a17b915b1703347b21f79b44cef2 size 2655
yogeshsaroya/new-cdnjs
ajax/libs/yui/3.15.0/calendarnavigator/assets/skins/night/calendarnavigator.css
CSS
mit
129
[ 30522, 2544, 16770, 1024, 1013, 1013, 21025, 2102, 1011, 1048, 10343, 1012, 21025, 2705, 12083, 1012, 4012, 1013, 28699, 1013, 1058, 2487, 1051, 3593, 21146, 17788, 2575, 1024, 2539, 15878, 2509, 16020, 2546, 2692, 20958, 2581, 2487, 2546, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// Copyright (c) 2015 Elements of Programming Interviews. All rights reserved. package com.epi; import java.util.Random; public class RabinKarp { // @include // Returns the index of the first character of the substring if found, -1 // otherwise. public static int rabinKarp(String t, String s) { if (s.length() > t.length()) { return -1; // s is not a substring of t. } final int BASE = 26; int tHash = 0, sHash = 0; // Hash codes for the substring of t and s. int powerS = 1; // BASE^|s|. for (int i = 0; i < s.length(); i++) { powerS = i > 0 ? powerS * BASE : 1; tHash = tHash * BASE + t.charAt(i); sHash = sHash * BASE + s.charAt(i); } for (int i = s.length(); i < t.length(); i++) { // Checks the two substrings are actually equal or not, to protect // against hash collision. if (tHash == sHash && t.substring(i - s.length(), i).equals(s)) { return i - s.length(); // Found a match. } // Uses rolling hash to compute the new hash code. tHash -= t.charAt(i - s.length()) * powerS; tHash = tHash * BASE + t.charAt(i); } // Tries to match s and t.substring(t.length() - s.length()). if (tHash == sHash && t.substring(t.length() - s.length()).equals(s)) { return t.length() - s.length(); } return -1; // s is not a substring of t. } // @exclude private static int checkAnswer(String t, String s) { for (int i = 0; i + s.length() - 1 < t.length(); ++i) { boolean find = true; for (int j = 0; j < s.length(); ++j) { if (t.charAt(i + j) != s.charAt(j)) { find = false; break; } } if (find) { return i; } } return -1; // No matching. } private static String randString(int len) { Random r = new Random(); StringBuilder ret = new StringBuilder(len); while (len-- > 0) { ret.append((char)(r.nextInt(26) + 'a')); } return ret.toString(); } private static void smallTest() { assert(rabinKarp("GACGCCA", "CGC") == 2); assert(rabinKarp("GATACCCATCGAGTCGGATCGAGT", "GAG") == 10); assert(rabinKarp("FOOBARWIDGET", "WIDGETS") == -1); assert(rabinKarp("A", "A") == 0); assert(rabinKarp("A", "B") == -1); assert(rabinKarp("A", "") == 0); assert(rabinKarp("ADSADA", "") == 0); assert(rabinKarp("", "A") == -1); assert(rabinKarp("", "AAA") == -1); assert(rabinKarp("A", "AAA") == -1); assert(rabinKarp("AA", "AAA") == -1); assert(rabinKarp("AAA", "AAA") == 0); assert(rabinKarp("BAAAA", "AAA") == 1); assert(rabinKarp("BAAABAAAA", "AAA") == 1); assert(rabinKarp("BAABBAABAAABS", "AAA") == 8); assert(rabinKarp("BAABBAABAAABS", "AAAA") == -1); assert(rabinKarp("FOOBAR", "BAR") > 0); } public static void main(String args[]) { smallTest(); if (args.length == 2) { String t = args[0]; String s = args[1]; System.out.println("t = " + t); System.out.println("s = " + s); assert(checkAnswer(t, s) == rabinKarp(t, s)); } else { Random r = new Random(); for (int times = 0; times < 10000; ++times) { String t = randString(r.nextInt(1000) + 1); String s = randString(r.nextInt(20) + 1); System.out.println("t = " + t); System.out.println("s = " + s); assert(checkAnswer(t, s) == rabinKarp(t, s)); } } } }
adnanaziz/epicode
java/src/main/java/com/epi/RabinKarp.java
Java
mit
3,435
[ 30522, 1013, 1013, 9385, 1006, 1039, 1007, 2325, 3787, 1997, 4730, 7636, 1012, 2035, 2916, 9235, 1012, 7427, 4012, 1012, 4958, 2072, 1025, 12324, 9262, 1012, 21183, 4014, 1012, 6721, 1025, 2270, 2465, 10958, 8428, 6673, 2361, 1063, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Funambol is a mobile platform developed by Funambol, Inc. * Copyright (C) 2003 - 2007 Funambol, Inc. * * This program is free software; you can redistribute it and/or modify it under * the terms of the GNU Affero General Public License version 3 as published by * the Free Software Foundation with the addition of the following permission * added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED * WORK IN WHICH THE COPYRIGHT IS OWNED BY FUNAMBOL, FUNAMBOL DISCLAIMS THE * WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU Affero General Public License * along with this program; if not, see http://www.gnu.org/licenses or write to * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, * MA 02110-1301 USA. * * You can contact Funambol, Inc. headquarters at 643 Bair Island Road, Suite * 305, Redwood City, CA 94063, USA, or at email address info@funambol.com. * * The interactive user interfaces in modified source and object code versions * of this program must display Appropriate Legal Notices, as required under * Section 5 of the GNU Affero General Public License version 3. * * In accordance with Section 7(b) of the GNU Affero General Public License * version 3, these Appropriate Legal Notices must retain the display of the * "Powered by Funambol" logo. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display * the words "Powered by Funambol". */ package com.funambol.common.pim.model.contact; import com.funambol.common.pim.model.common.Property; import com.funambol.common.pim.model.common.TypifiedPluralProperty; import com.funambol.util.Base64; import java.util.ArrayList; import java.util.List; /** * An object containing the personal details of a contact */ public class PersonalDetail extends ContactDetail { private List<TypifiedPluralProperty> photos; private Property geo; private String spouse; private String children; private String anniversary; private String birthday; private String gender; private String hobbies; /** * Creates an empty list of personal details */ public PersonalDetail() { super(); photos = new ArrayList<TypifiedPluralProperty>(); geo = new Property(); spouse = null; children = null; anniversary = null; birthday = null; gender = null; hobbies = null; } /** * Returns the geo for this Personal Detail * * @return the geo for this Personal Detail */ public Property getGeo() { return geo; } /** * Returns the spouse for this Personal Detail * * @return the spouse for this Personal Detail */ public String getSpouse() { return spouse; } /** * Returns the children for this Personal Detail * * @return the children for this Personal Detail */ public String getChildren() { return children; } /** * Returns the anniversary for this Personal Detail * * @return the anniversary for this Personal Detail */ public String getAnniversary() { return anniversary; } /** * Returns the birthday for this Personal Detail * * @return the birthday for this Personal Detail */ public String getBirthday() { return birthday; } /** * Returns the gender for this Personal Detail * * @return the gender for this Personal Detail */ public String getGender() { return gender; } /** * Returns the photos for this Personal Detail * * @return the photos for this Personal Detail * @deprecated Since v65, use getPhotoObjects and setPhotoObjects */ public List<TypifiedPluralProperty> getPhotos() { return photos; } /** * Returns the photos as <code>Photo</code> and not just as Property * @return the photo for this Personal Detail */ public List<Photo> getPhotoObjects() { if (photos == null || photos.isEmpty()) { return null; } List<Photo> photoObjects = new ArrayList<Photo>(); for(TypifiedPluralProperty photo : photos) { if(photo != null) { Photo photoObject = new Photo(); photoObject.setPreferred(photo.isPreferred()); String type = photo.getPropertyType(); String value = photo.getPropertyValueAsString(); if (value == null || value.length() == 0) { photoObjects.add(photoObject); continue; } photoObject.setType(type); String encoding = photo.getEncoding(); String valueType = photo.getValue(); Object oValue = null; if ("B".equalsIgnoreCase(encoding) || "BASE64".equalsIgnoreCase(encoding)) { if (value != null && value.length() > 0) { oValue = Base64.decode(value); } else { oValue = new byte[0]; } } else { oValue = value; } if ("URL".equalsIgnoreCase(valueType)) { if (oValue instanceof byte[]) { // // really strange....an url sent in base 64 // photoObject.setUrl(new String((byte[])oValue)); } else { photoObject.setUrl((String)oValue); } } else { photoObject.setImage((byte[])oValue); } photoObjects.add(photoObject); } } return photoObjects; } /** * Sets the geo for this Personal Detail * * @param geo the geo to set */ public void setGeo(Property geo) { this.geo = geo; } /** * Sets the spouse for this Personal Detail * * @param spouse the spouse to set */ public void setSpouse (String spouse) { this.spouse = spouse; } /** * Sets the children for this Personal Detail * * @param children the children to set */ public void setChildren (String children) { this.children = children; } /** * Sets the anniversary for this Personal Detail * * @param anniversary the anniversary to set */ public void setAnniversary (String anniversary) { this.anniversary = anniversary; } /** * Sets the birthday for this Personal Detail * * @param birthday the spouse to set */ public void setBirthday (String birthday) { this.birthday = birthday; } /** * Sets the gender for this Personal Detail * * @param gender the gender to set */ public void setGender (String gender) { this.gender = gender; } /** * Getter for property hobbies. * @return Value of property hobbies. */ public java.lang.String getHobbies() { return hobbies; } /** * Setter for property hobbies. * @param hobbies New value of property hobbies. */ public void setHobbies(java.lang.String hobbies) { this.hobbies = hobbies; } /** * Sets the photos * @param photo New value of property photo. */ public void setPhotos(List<TypifiedPluralProperty> photos) { this.photos = photos; } /** * Add a new photo * @param photo New value of property photo. */ public void addPhoto(TypifiedPluralProperty photo) { if (photo == null) { return; } photos.add(photo); } /** * Add a new Photo object * @param photo New value of property photo. */ public void addPhotoObject(Photo photoObject) { if (photoObject == null) { return; } TypifiedPluralProperty photo = new TypifiedPluralProperty(); photo.setType(photoObject.getType()); photo.setPreferred(photoObject.isPreferred()); if (photoObject.getUrl() != null && photoObject.getUrl().length() > 0) { photo.setValue("URL"); photo.setPropertyValue(photoObject.getUrl()); } else { if (photoObject.getImage() != null && photoObject.getImage().length > 0) { String b64 = new String(Base64.encode(photoObject.getImage())); photo.setPropertyValue(b64); photo.setEncoding("BASE64"); // // The charset must be null since: // 1. it is useless since the content is in base64 // 2. on some Nokia phone it doesn't work since for some reason the phone // adds a new photo and the result is that a contact has two photos // Examples of wrong phones: Nokia N91, 7610, 6630 // photo.setCharset(null); } else { photo.setPropertyValue(""); } } addPhoto(photo); } }
zhangdakun/funasyn
externals/java-sdk/pim/src/main/java-se/com/funambol/common/pim/model/contact/PersonalDetail.java
Java
agpl-3.0
9,634
[ 30522, 1013, 1008, 1008, 4569, 3286, 14956, 2003, 1037, 4684, 4132, 2764, 2011, 4569, 3286, 14956, 1010, 4297, 1012, 1008, 9385, 1006, 1039, 1007, 2494, 1011, 2289, 4569, 3286, 14956, 1010, 4297, 1012, 1008, 1008, 2023, 2565, 2003, 2489, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using System; using System.ComponentModel.Composition; using System.Reflection; using Grabacr07.KanColleViewer.Composition; using saga.voiceroid; namespace saga.kancolle { [Export(typeof(IPlugin))] [InheritedExport(typeof(INotifier))] [ExportMetadata("Guid", "648b55ff-92a2-4c4a-8bb9-7f9edaa999df")] [ExportMetadata("Title", "VoiceroidNotifier")] [ExportMetadata("Description", "Voiceroidを使用して通知します。")] [ExportMetadata("Version", "1.3.1")] [ExportMetadata("Author", "@saga_dash")] public class VoiceroidNotifier : IPlugin, INotifier, IDisposable { //private static List<VoiceroidNotify> voiceroid = new List<VoiceroidNotify>(); private static WorkerThread thread; private Boolean firstFlag = true; private SettingsViewModel viewmodel; public void Initialize() { // インスタンス化 Assembly m = Assembly.LoadFrom("Plugins/VoiceroidNotifyCore.dll"); Type VoiceroidFactory4Win7 = m.GetType("saga.voiceroid.VoiceroidFactory4Win7"); VoiceroidInfo[] info = (VoiceroidInfo[])(VoiceroidFactory4Win7.GetMethod("CreateAll").Invoke(null, null)); viewmodel = new SettingsViewModel(info); thread = new WorkerThread(); } public void Notify(INotification notification) { if (firstFlag) { var dispatcher = System.Windows.Application.Current.Dispatcher; if (dispatcher.CheckAccess()) { ShowDialog(); } else { dispatcher.Invoke(() => ShowDialog()); } firstFlag = false; } thread.Add(delegate() { Run(notification.Body); // System.Threading.Thread.Sleep(300); }); } private void ShowDialog() { System.Windows.Window window = new System.Windows.Window { Content = this.GetSettingsView(), Width = 300, Height = 200 }; window.ShowDialog(); } private void Run(string message) { try { Assembly m = Assembly.LoadFrom("Plugins/VoiceroidNotifyCore.dll"); VoiceroidNotify voiceroid = (VoiceroidNotify)Activator.CreateInstance(m.GetType("saga.voiceroid.VoiceroidNotify4Win7"), new object[] { "dic/ipadic", viewmodel.SelectedVoiceroid }); voiceroid.SetPlayText(message); voiceroid.Play(); } catch (Exception e) { System.Diagnostics.Debug.WriteLine(e.Message); } } public object GetSettingsView() { return new SettingsView { DataContext = this.viewmodel,}; } public void Dispose() { } } }
saga-dash/VoiceriodNotifier4KanColleViewer
VoiceroidNotifier.cs
C#
apache-2.0
3,005
[ 30522, 2478, 2291, 1025, 2478, 2291, 1012, 6922, 5302, 9247, 1012, 5512, 1025, 2478, 2291, 1012, 9185, 1025, 2478, 6723, 6305, 2099, 2692, 2581, 1012, 22827, 26895, 6777, 2666, 13777, 1012, 5512, 1025, 2478, 12312, 1012, 2376, 22943, 1025, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><title>Python: module feedio.UI.addTopic_ui</title> </head><body bgcolor="#f0f0f8"> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading"> <tr bgcolor="#7799ee"> <td valign=bottom>&nbsp;<br> <font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="feedio.html"><font color="#ffffff">feedio</font></a>.<a href="feedio.UI.html"><font color="#ffffff">UI</font></a>.addTopic_ui</strong></big></big></font></td ><td align=right valign=bottom ><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/home/ceevee/play ground/feedIO/feedio/UI/addTopic_ui.py">/home/ceevee/play ground/feedIO/feedio/UI/addTopic_ui.py</a></font></td></tr></table> <p><tt>#&nbsp;-*-&nbsp;coding:&nbsp;utf-8&nbsp;-*-</tt></p> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#aa55cc"> <td colspan=3 valign=bottom>&nbsp;<br> <font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr> <tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td> <td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="PyQt4.QtCore.html">PyQt4.QtCore</a><br> </td><td width="25%" valign=top><a href="PyQt4.QtGui.html">PyQt4.QtGui</a><br> </td><td width="25%" valign=top><a href="feedio.UI.feedIOicons_rc.html">feedio.UI.feedIOicons_rc</a><br> </td><td width="25%" valign=top></td></tr></table></td></tr></table><p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ee77aa"> <td colspan=3 valign=bottom>&nbsp;<br> <font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr> <tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td> <td width="100%"><dl> <dt><font face="helvetica, arial"><a href="__builtin__.html#object">__builtin__.object</a> </font></dt><dd> <dl> <dt><font face="helvetica, arial"><a href="feedio.UI.addTopic_ui.html#Ui_addTopic">Ui_addTopic</a> </font></dt></dl> </dd> </dl> <p> <table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section"> <tr bgcolor="#ffc8d8"> <td colspan=3 valign=bottom>&nbsp;<br> <font color="#000000" face="helvetica, arial"><a name="Ui_addTopic">class <strong>Ui_addTopic</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr> <tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td> <td width="100%">Methods defined here:<br> <dl><dt><a name="Ui_addTopic-retranslateUi"><strong>retranslateUi</strong></a>(self, addTopic)</dt></dl> <dl><dt><a name="Ui_addTopic-setupUi"><strong>setupUi</strong></a>(self, addTopic)</dt></dl> <hr> Data descriptors defined here:<br> <dl><dt><strong>__dict__</strong></dt> <dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd> </dl> <dl><dt><strong>__weakref__</strong></dt> <dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd> </dl> </td></tr></table></td></tr></table> </body></html>
seejay/feedIO
doc/feedio.UI.addTopic_ui.html
HTML
gpl-3.0
3,209
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 1014, 17459, 1013, 1013, 4372, 1000, 1028, 1026, 16129, 1028, 1026, 2132, 1028, 1026, 2516, 1028, 18750, 1024,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
module Spree class PaypalAdaptiveCheckout < ActiveRecord::Base end end
lemboy/spree_paypal_adaptive
app/models/spree/paypal_adaptive_checkout.rb
Ruby
bsd-3-clause
79
[ 30522, 11336, 11867, 9910, 2465, 3477, 19636, 2850, 24971, 5403, 19665, 4904, 1026, 3161, 2890, 27108, 2094, 1024, 1024, 2918, 2203, 2203, 102, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Copyright 2013 Cloudera Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.cloudera.cdk.data.hbase; import com.cloudera.cdk.data.DatasetReader; import com.cloudera.cdk.data.DatasetWriter; import com.cloudera.cdk.data.FieldPartitioner; import com.cloudera.cdk.data.PartitionKey; import com.cloudera.cdk.data.PartitionStrategy; import com.cloudera.cdk.data.View; import com.cloudera.cdk.data.spi.AbstractRangeView; import com.cloudera.cdk.data.spi.StorageKey; import com.cloudera.cdk.data.spi.Marker; import com.cloudera.cdk.data.spi.MarkerRange; import java.util.List; class DaoView<E> extends AbstractRangeView<E> { private final DaoDataset<E> dataset; DaoView(DaoDataset<E> dataset) { super(dataset); this.dataset = dataset; } private DaoView(DaoView<E> view, MarkerRange range) { super(view, range); this.dataset = view.dataset; } @Override protected DaoView<E> newLimitedCopy(MarkerRange newRange) { return new DaoView<E>(this, newRange); } @Override public DatasetReader<E> newReader() { return dataset.getDao().getScanner(toPartitionKey(range.getStart()), range.getStart().isInclusive(), toPartitionKey(range.getEnd()), range.getEnd().isInclusive()); } @Override public DatasetWriter<E> newWriter() { final DatasetWriter<E> wrappedWriter = dataset.getDao().newBatch(); final StorageKey partitionStratKey = new StorageKey(dataset.getDescriptor().getPartitionStrategy()); // Return a dataset writer that checks on write that an entity is within the // range of the view return new DatasetWriter<E>() { @Override public void open() { wrappedWriter.open(); } @Override public void write(E entity) { StorageKey key = partitionStratKey.reuseFor(entity); if (!range.contains(key)) { throw new IllegalArgumentException("View does not contain entity: " + entity); } wrappedWriter.write(entity); } @Override public void flush() { wrappedWriter.flush(); } @Override public void close() { wrappedWriter.close(); } @Override public boolean isOpen() { return wrappedWriter.isOpen(); } }; } @Override public Iterable<View<E>> getCoveringPartitions() { // TODO: use HBase InputFormat to construct splits throw new UnsupportedOperationException("getCoveringPartitions is not yet " + "supported."); } @SuppressWarnings("deprecation") private PartitionKey toPartitionKey(MarkerRange.Boundary boundary) { if (boundary == null || boundary.getBound() == null) { return null; } return keyFor(dataset.getDescriptor().getPartitionStrategy(), boundary.getBound()); } @Deprecated @SuppressWarnings("unchecked") static PartitionKey keyFor(PartitionStrategy strategy, Marker marker) { final List<FieldPartitioner> partitioners = strategy.getFieldPartitioners(); final Object[] values = new Object[partitioners.size()]; for (int i = 0, n = partitioners.size(); i < n; i += 1) { final FieldPartitioner fp = partitioners.get(i); values[i] = marker.valueFor(fp); } return strategy.partitionKey(values); } }
cloudera/cdk
cdk-data/cdk-data-hbase/src/main/java/com/cloudera/cdk/data/hbase/DaoView.java
Java
apache-2.0
3,792
[ 30522, 1013, 1008, 1008, 1008, 9385, 2286, 6112, 6906, 4297, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1008, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 12...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- id: bad87fee1348bd9aedf0887a title: Headline with the h2 Element challengeType: 0 videoUrl: '' localeTitle: العنوان مع عنصر h2 --- ## Description undefined ## Instructions <section id="instructions"> إضافة علامة <code>h2</code> تقول &quot;CatPhotoApp&quot; لإنشاء <code>element</code> HTML ثاني أسفل عنصر <code>h1</code> &quot;Hello World&quot;. </section> ## Tests <section id='tests'> ```yml tests: - text: قم بإنشاء عنصر <code>h2</code> . testString: 'assert(($("h2").length > 0), "Create an <code>h2</code> element.");' - text: '' testString: 'assert(code.match(/<\/h2>/g) && code.match(/<\/h2>/g).length === code.match(/<h2>/g).length, "Make sure your <code>h2</code> element has a closing tag.");' - text: '' testString: 'assert.isTrue((/cat(\s)?photo(\s)?app/gi).test($("h2").text()), "Your <code>h2</code> element should have the text "CatPhotoApp".");' - text: يجب أن يحتوي عنصر <code>h1</code> على النص &quot;Hello World&quot;. testString: 'assert.isTrue((/hello(\s)+world/gi).test($("h1").text()), "Your <code>h1</code> element should have the text "Hello World".");' ``` </section> ## Challenge Seed <section id='challengeSeed'> <div id='html-seed'> ```html <h1>Hello World</h1> ``` </div> </section> ## Solution <section id='solution'> ```js // solution required ``` </section>
otavioarc/freeCodeCamp
curriculum/challenges/arabic/01-responsive-web-design/basic-html-and-html5/headline-with-the-h2-element.arabic.md
Markdown
bsd-3-clause
1,413
[ 30522, 1011, 1011, 1011, 8909, 1024, 2919, 2620, 2581, 7959, 2063, 17134, 18139, 2497, 2094, 2683, 6679, 20952, 2692, 2620, 2620, 2581, 2050, 2516, 1024, 17653, 2007, 1996, 1044, 2475, 5783, 4119, 13874, 1024, 1014, 2678, 3126, 2140, 1024, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!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_101) on Wed Dec 14 17:18:32 GMT 2016 --> <title>API Help (ExoPlayer library)</title> <meta name="date" content="2016-12-14"> <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="API Help (ExoPlayer library)"; } } catch(err) { } //--> </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>Package</li> <li>Class</li> <li><a href="overview-tree.html">Tree</a></li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-all.html">Index</a></li> <li class="navBarCell1Rev">Help</li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?help-doc.html" target="_top">Frames</a></li> <li><a href="help-doc.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> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h1 class="title">How This API Document Is Organized</h1> <div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div> </div> <div class="contentContainer"> <ul class="blockList"> <li class="blockList"> <h2>Overview</h2> <p>The <a href="overview-summary.html">Overview</a> page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.</p> </li> <li class="blockList"> <h2>Package</h2> <p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p> <ul> <li>Interfaces (italic)</li> <li>Classes</li> <li>Enums</li> <li>Exceptions</li> <li>Errors</li> <li>Annotation Types</li> </ul> </li> <li class="blockList"> <h2>Class/Interface</h2> <p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p> <ul> <li>Class inheritance diagram</li> <li>Direct Subclasses</li> <li>All Known Subinterfaces</li> <li>All Known Implementing Classes</li> <li>Class/interface declaration</li> <li>Class/interface description</li> </ul> <ul> <li>Nested Class Summary</li> <li>Field Summary</li> <li>Constructor Summary</li> <li>Method Summary</li> </ul> <ul> <li>Field Detail</li> <li>Constructor Detail</li> <li>Method Detail</li> </ul> <p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p> </li> <li class="blockList"> <h2>Annotation Type</h2> <p>Each annotation type has its own separate page with the following sections:</p> <ul> <li>Annotation Type declaration</li> <li>Annotation Type description</li> <li>Required Element Summary</li> <li>Optional Element Summary</li> <li>Element Detail</li> </ul> </li> <li class="blockList"> <h2>Enum</h2> <p>Each enum has its own separate page with the following sections:</p> <ul> <li>Enum declaration</li> <li>Enum description</li> <li>Enum Constant Summary</li> <li>Enum Constant Detail</li> </ul> </li> <li class="blockList"> <h2>Tree (Class Hierarchy)</h2> <p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p> <ul> <li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li> <li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li> </ul> </li> <li class="blockList"> <h2>Deprecated API</h2> <p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p> </li> <li class="blockList"> <h2>Index</h2> <p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p> </li> <li class="blockList"> <h2>Prev/Next</h2> <p>These links take you to the next or previous class, interface, package, or related page.</p> </li> <li class="blockList"> <h2>Frames/No Frames</h2> <p>These links show and hide the HTML frames. All pages are available with or without frames.</p> </li> <li class="blockList"> <h2>All Classes</h2> <p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p> </li> <li class="blockList"> <h2>Serialized Form</h2> <p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p> </li> <li class="blockList"> <h2>Constant Field Values</h2> <p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p> </li> </ul> <span class="emphasizedPhrase">This help file applies to API documentation generated using the standard doclet.</span></div> <!-- ======= 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>Package</li> <li>Class</li> <li><a href="overview-tree.html">Tree</a></li> <li><a href="deprecated-list.html">Deprecated</a></li> <li><a href="index-all.html">Index</a></li> <li class="navBarCell1Rev">Help</li> </ul> </div> <div class="subNav"> <ul class="navList"> <li>Prev</li> <li>Next</li> </ul> <ul class="navList"> <li><a href="index.html?help-doc.html" target="_top">Frames</a></li> <li><a href="help-doc.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> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
amzn/exoplayer-amazon-port
docs/doc/reference-v1/help-doc.html
HTML
apache-2.0
8,253
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
@* overviewcar.scala.html * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Copyright Ⓒ 2014-2015 Universiteit Gent * * This file is part of the Degage Web Application * * Corresponding author (see also AUTHORS.txt) * * Kris Coolsaet * Department of Applied Mathematics, Computer Science and Statistics * Ghent University * Krijgslaan 281-S9 * B-9000 GENT Belgium * * The Degage Web Application is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The Degage Web Application is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with the Degage Web Application (file LICENSE.txt in the * distribution). If not, see http://www.gnu.org/licenses/. *@ @(form: Form[Calendars.CarDateData], ofc: Calendars.OverviewForCar) @scripts={ @js.userpicker() @js.datetimepicker() @js.usesajax() @js.ajaxCarData() } @stdlayout("Beschikbaarheid auto", sheets("reservationtable"), scripts) { @cardatepanel(form,routes.Calendars.overviewCarPost()) @overviewForCarPanel("Beschikbare perioden", "fa-calendar", ofc, percentage=10){ @* no header. *@ }{ @* no footer. *@ } }
kcoolsae/Degage
webapp/app/views/calendars/overviewcar.scala.html
HTML
agpl-3.0
1,593
[ 30522, 1030, 1008, 19184, 10010, 1012, 26743, 1012, 16129, 1008, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, 1066, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package org.locke.biokit.biology.genetics.bases.ambiguous; import org.locke.biokit.biology.genetics.Base; public class Any extends Base { @Override public char asCharacter() { return 'N'; } }
jonathanlocke/biokit
src/main/java/org/locke/biokit/biology/genetics/bases/ambiguous/Any.java
Java
apache-2.0
200
[ 30522, 7427, 8917, 1012, 18343, 1012, 16012, 23615, 1012, 7366, 1012, 14471, 1012, 7888, 1012, 20080, 1025, 12324, 8917, 1012, 18343, 1012, 16012, 23615, 1012, 7366, 1012, 14471, 1012, 2918, 1025, 2270, 2465, 2151, 8908, 2918, 1063, 1030, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading; using System.Threading.Tasks; namespace Treorisoft.Net.Utilities { /// <summary> /// Provides properties and instance methods for sending files over a <see cref="Winsock"/> objects. /// </summary> [Serializable] public class FileData : ISerializable { /// <summary> /// Initializes a new instance of the <see cref="FileData"/> class. /// </summary> /// <param name="info">A <see cref="FileInfo"/> object that contains data about the file.</param> public FileData(FileInfo info) { Guid = Guid.NewGuid(); FileName = info.Name; FileSize = info.Length; Info = info; } /// <summary> /// Initializes a new instance of the <see cref="FileData"/> class with serialized data. /// </summary> /// <param name="info">The object that holds the serialized object data.</param> /// <param name="context">The contextual information about the source or destination.</param> protected FileData(SerializationInfo info, StreamingContext context) { Guid = (Guid)info.GetValue("guid", typeof(Guid)); FileName = info.GetString("filename"); FileSize = info.GetInt64("filesize"); } /// <summary> /// Implements the <see cref="ISerializable"/> interface and returns the data needed to serialize the <see cref="FileData"/> object. /// </summary> /// <param name="info">A SerializationInfo object containing information required to serialize the FileData object.</param> /// <param name="context">A StreamingContext object containing the source and destination of the serialized stream associated with the FileData object.</param> public virtual void GetObjectData(SerializationInfo info, StreamingContext context) { info.AddValue("guid", Guid); info.AddValue("filename", FileName); info.AddValue("filesize", FileSize); } /// <summary> /// Gets a <see cref="Guid"/> identifier for the file. /// </summary> public Guid Guid { get; private set; } /// <summary> /// Gets the name of the file. /// </summary> public string FileName { get; private set; } /// <summary> /// Gets the size, in bytes, of the file. /// </summary> public long FileSize { get; private set; } /// <summary> /// Gets the <see cref="FileInfo"/> of the file being transmitted. /// </summary> /// <remarks> /// During sending this contains the details of the actual file being transmitted. /// During receiving this contains the details of a temporary file, that upon arrival can be moved to another location. /// </remarks> public FileInfo Info { get; internal set; } #region Sending/Receiving Helpers /// <summary> /// Field backing the SyncRoot property. /// </summary> internal object _syncRoot = null; /// <summary> /// Field backing the MetaSize property. /// </summary> internal static int _fileDataMetaSize = -1; /// <summary> /// Gets an object that can be used to synchronize access to the file being read/written. /// </summary> private object SyncRoot { get { if (_syncRoot == null) Interlocked.CompareExchange(ref _syncRoot, new object(), null); return _syncRoot; } } /// <summary> /// Gets a value the estimates the size of an empty <see cref="FileDataPart"/> object. /// </summary> internal static int MetaSize { get { if (_fileDataMetaSize < 0) _fileDataMetaSize = EstimatePartSize(0) + 1; return _fileDataMetaSize; } } /// <summary> /// Gets an estimate of a <see cref="FileDataPart"/> object of the specified data size. /// </summary> /// <param name="size">The size of the data that should be used in the size estimate.</param> /// <returns>The estimated size, in bytes, of a serialized <see cref="FileDataPart"/>.</returns> internal static int EstimatePartSize(int size) { return EstimatePartSize(Guid.Empty, long.MaxValue, size); } /// <summary> /// Gets an estimate of a <see cref="FileDataPart"/>. /// </summary> /// <param name="guid">The <see cref="Guid"/> that should be used in the size estimate.</param> /// <param name="start">The start position that should be used in the size estimate.</param> /// <param name="size">The size of the data that should be used in the size estimate.</param> /// <returns>The estimated size, in bytes, of a serialized <see cref="FileDataPart"/>.</returns> internal static int EstimatePartSize(Guid guid, long start, int size) { var part = new FileDataPart(guid, start, new byte[size]); var bytes = ObjectPacker.Pack(part); return bytes.Length + PacketHeader.HeaderSize(bytes.Length); } #endregion #region Sending /// <summary> /// Gets the total number of bytes sent. /// </summary> internal long SentBytes { get; set; } = 0; /// <summary> /// Gets a boolean value indicating whether if the file has been completely sent or not. /// </summary> internal bool SendCompleted { get { return (SentBytes == FileSize); } } /// <summary> /// Gets the next <see cref="FileDataPart"/> that will be sent over the network. /// </summary> /// <param name="bufferSize">The size of the buffer and amount of data to return.</param> /// <returns>The bufferSize is adjusted by an estimate of how large the metadata would be, so that the size of the serialized <see cref="FileDataPart"/> should be the same as the bufferSize.</returns> internal FileDataPart GetNextPart(int bufferSize) { if (SendCompleted) return null; if (Info == null) throw new NullReferenceException("File information not found."); if (!Info.Exists) throw new FileNotFoundException(Info.FullName); bufferSize -= MetaSize; byte[] buffer = new byte[bufferSize]; lock (SyncRoot) { using (FileStream fs = new FileStream(Info.FullName, FileMode.Open, FileAccess.Read)) { fs.Seek(SentBytes, SeekOrigin.Begin); int readSize = fs.Read(buffer, 0, bufferSize); byte[] sizedBuffer = ArrayMethods.Shrink(ref buffer, readSize); var part = new FileDataPart(Guid, SentBytes, sizedBuffer); SentBytes += readSize; return part; } } } /// <summary> /// Gets the total size of all the parts of the file at the given buffer size. /// </summary> /// <param name="bufferSize">The size of the buffer and amount of data to estimate with.</param> /// <returns> /// This routine is used by <see cref="SendProgress"/> to help determine the total number of bytes to send, and therefore also the percent completed. /// The bufferSize is adjusted by an estimate of how large the metadata would be, so that the size of the serialized <see cref="FileDataPart"/> should be the same as the bufferSize. /// </returns> internal long GetTotalPartSize(int bufferSize) { long sum = 0; foreach (int size in GetPartSizes(bufferSize)) sum += size; return sum; } /// <summary> /// Gets the sizes of all the parts of the file at the given buffer size. /// </summary> /// <param name="bufferSize">The size of the buffer and amount of data to estimate with.</param> /// <returns> /// Returns an IEnumerable containing the sizes of all the different parts of the file - including the <see cref="FileData"/> header. /// </returns> internal IEnumerable<int> GetPartSizes(int bufferSize) { if (Info == null) throw new NullReferenceException("File information not found."); if (!Info.Exists) throw new FileNotFoundException(Info.FullName); var bytes = ObjectPacker.Pack(this); yield return bytes.Length + PacketHeader.HeaderSize(bytes.Length); bufferSize -= MetaSize; long fileSize = Info.Length; long start = 0; while (fileSize > 0) { if (fileSize > bufferSize) { yield return EstimatePartSize(Guid, start, bufferSize); fileSize -= bufferSize; start += bufferSize; } else { yield return EstimatePartSize(Guid, start, (int)fileSize); fileSize = 0; } } } #endregion #region Receiving /// <summary> /// Gets the total number of received bytes. /// </summary> public long ReceivedBytes { get; private set; } = 0; /// <summary> /// Gets a boolean value indicating if the file has been completely received or not. /// </summary> public bool ReceiveCompleted { get { return (ReceivedBytes == FileSize); } } /// <summary> /// Gets the size of the last received <see cref="FileDataPart"/>. /// </summary> /// <remarks>This is used to help setup the <see cref="ReceiveProgressEventArgs"/> that is raised.</remarks> internal int LastReceivedSize { get; set; } /// <summary> /// Receives the <see cref="FileDataPart"/> into the specified file. /// </summary> /// <param name="fileName">The fully qualified name of the file, or the relative file name. Do not end the path with the directory separator character.</param> /// <param name="part">The <see cref="FileDataPart"/> to be received.</param> internal void ReceivePart(string fileName, FileDataPart part) { ReceivePart(new FileInfo(fileName), part); } /// <summary> /// Receives the <see cref="FileDataPart"/> into the specified file. /// </summary> /// <param name="file">A <see cref="FileInfo"/> object containing the fully qualified name of the file to receiving the data to.</param> /// <param name="part">The <see cref="FileDataPart"/> to be received.</param> internal void ReceivePart(FileInfo file, FileDataPart part) { if (ReceiveCompleted) throw new InvalidOperationException("Receive operation for this file has already been completed."); lock (SyncRoot) { using (FileStream fs = new FileStream(file.FullName, FileMode.OpenOrCreate, FileAccess.Write)) { fs.Seek(part.Start, SeekOrigin.Begin); fs.Write(part.Data, 0, part.Data.Length); } LastReceivedSize = part.Data.Length; ReceivedBytes += part.Data.Length; } } #endregion } }
Borvik/Winsock.Net
Winsock/Utilities/FileData.cs
C#
mit
11,804
[ 30522, 2478, 2291, 1025, 2478, 2291, 1012, 6407, 1012, 12391, 1025, 2478, 2291, 1012, 22834, 1025, 2478, 2291, 1012, 11409, 4160, 1025, 2478, 2291, 1012, 2448, 7292, 1012, 7642, 3989, 1025, 2478, 2291, 1012, 3793, 1025, 2478, 2291, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * Model for DRMCertification */ class DRMAppellation extends BaseDRMAppellation { public function getChildrenNode() { return $this->mentions; } public function getGenre() { return $this->getParentNode(); } public function getCertification() { return $this->getGenre()->getParent()->getParent(); } public function updateDroits($droits) { $merge = array(); foreach ($this->getDroits() as $typedroits => $droit) { $droits->add($typedroits)->add($droit->code)->integreVolume($this->sommeLignes(DRMDroits::getDroitSorties($merge)), $this->sommeLignes(DRMDroits::getDroitEntrees()), $droit->taux, $this->getReportByDroit($droit), $droit->libelle); } } public function getReportByDroit($droit) { $drmPrecedente = $this->getDocument()->getPrecedente(); if ($drmPrecedente->isNew()) { return 0; } else { if ($drmPrecedente->get('droits')->get('douane')->exist($droit->code)) { return $drmPrecedente->get('droits')->get('douane')->get($droit->code)->cumul; } else { return 0; } } } public function getDroit($type) { return $this->getConfig()->getDroitByType($this->getDocument()->getDate(), $type, $this->getInterproKey()); } public function getDroits() { $conf = $this->getConfig(); $droits = array(); foreach ($conf->getDroits($this->getInterproKey()) as $key => $droit) { $droits[$key] = $this->getConfig()->getDroitByType($this->getDocument()->getDate(), $key, $this->getInterproKey()); } return $droits; } public function getInterproKey() { return $this->getDocument()->getInterpro()->get('_id'); } }
24eme/giilda
project/plugins/acVinDRMPlugin/lib/model/DRM/DRMAppellation.class.php
PHP
agpl-3.0
1,838
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 2944, 2005, 2852, 12458, 8743, 9031, 1008, 1013, 2465, 2852, 2863, 27877, 13490, 8908, 2241, 17830, 27877, 13490, 1063, 2270, 3853, 2131, 19339, 7389, 3630, 3207, 1006, 1007, 1063, 2709, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** @ignore */ Kekule.LOCAL_RES = true; Kekule.Localization.setCurrModule("widget"); Kekule.Localization.addResource("zh", "WidgetTexts", { "CAPTION_OK": "确定", "CAPTION_CANCEL": "取消", "CAPTION_YES": "是", "CAPTION_NO": "否", "CAPTION_BROWSE_COLOR": "浏览颜色", "HINT_BROWSE_COLOR": "浏览更多颜色", "S_COLOR_UNSET": "(未设置)", "S_COLOR_DEFAULT": "(缺省值)", "S_COLOR_MIXED": "(多个值)", "S_COLOR_TRANSPARENT": "(透明)", "S_OBJECT_UNSET": "(无)", "S_ITEMS": "条目", "S_OBJECT": "对象", "S_VALUE_UNSET": "(未设置)", "CAPTION_MENU": "Menu", "HINT_MENU": "Open menu", "S_INSPECT_NONE": "(无)", "S_INSPECT_OBJECTS": "({0}个对象)", "S_INSPECT_ID_OBJECT": "{0}: {1}", "S_INSPECT_ANONYMOUS_OBJECT": "({0})", "CAPTION_TOGGLE_TEXTWRAP": "切换文本换行", "CAPTION_INC_TEXT_SIZE": "增大字号", "CAPTION_DEC_TEXT_SIZE": "减小字号", "HINT_TOGGLE_TEXTWRAP": "切换文本是否自动换行", "HINT_INC_TEXT_SIZE": "增大字号", "HINT_DEC_TEXT_SIZE": "减小字号", "HINT_CHOOSE_FONT_FAMILY": "选择字体", "CAPTION_FIRST_PAGE": "首页", "CAPTION_LAST_PAGE": "末页", "CAPTION_PREV_PAGE": "前一页", "CAPTION_NEXT_PAGE": "后一页", "HINT_FIRST_PAGE": "首页", "HINT_LAST_PAGE": "末页", "HINT_PREV_PAGE": "前一页", "HINT_NEXT_PAGE": "后一页", "HINT_CURR_PAGE": "当前页", "MSG_RETRIEVING_DATA": "载入数据…", "CAPTION_DATATABLE_EDIT": "编辑", "CAPTION_DATATABLE_DELETE": "删除", "CAPTION_DATATABLE_INSERT": "插入", "HINT_DATATABLE_EDIT": "编辑数据", "HINT_DATATABLE_DELETE": "删除数据", "HINT_DATATABLE_INSERT": "插入数据", "CAPTION_ADD_CELL": "+", "HINT_ADD_CELL": "添加新单元格", "CAPTION_REMOVE_CELL": "移除", "HINT_REMOVE_CELL": "移除单元格", "CAPTION_CONFIG": "设置…", "HINT_CONFIG": "修改设置" }); Kekule.Localization.addResource("zh", "ChemWidgetTexts", { "CAPTION_CLEAROBJS": "清除", "CAPTION_LOADFILE": "载入…", "CAPTION_LOADDATA": "载入…", "CAPTION_SAVEFILE": "保存…", "CAPTION_ZOOMIN": "放大", "CAPTION_ZOOMOUT": "缩小", "CAPTION_RESETZOOM": "重置缩放", "CAPTION_RESETVIEW": "重置", "CAPTION_ROTATE": "旋转", "CAPTION_ROTATELEFT": "向左旋转", "CAPTION_ROTATERIGHT": "向右旋转", "CAPTION_ROTATEX": "沿X轴旋转", "CAPTION_ROTATEY": "沿Y轴旋转", "CAPTION_ROTATEZ": "沿Z轴旋转", "CAPTION_MOL_DISPLAY_TYPE": "分子显示样式", "CAPTION_SKELETAL": "键线式", "CAPTION_CONDENSED": "缩写式", "CAPTION_WIRE": "单线模型", "CAPTION_STICKS": "棍式模型", "CAPTION_BALLSTICK": "球棍模型", "CAPTION_SPACEFILL": "比例模型", "CAPTION_HIDEHYDROGENS": "显示/隐藏氢原子", "CAPTION_OPENEDITOR": "编辑…", "CAPTION_EDIT_OBJ": "编辑", "HINT_CLEAROBJS": "清除对象", "HINT_LOADFILE": "自文件载入", "HINT_LOADDATA": "载入数据", "HINT_SAVEFILE": "存储到文件", "HINT_ZOOMIN": "放大", "HINT_ZOOMOUT": "缩小", "HINT_RESETZOOM": "重置缩放", "HINT_RESETVIEW": "重置缩放与旋转", "HINT_ROTATE": "旋转", "HINT_ROTATELEFT": "逆时针旋转", "HINT_ROTATERIGHT": "顺时针旋转", "HINT_ROTATEX": "沿X轴旋转", "HINT_ROTATEY": "沿Y轴旋转", "HINT_ROTATEZ": "沿Z轴旋转", "HINT_MOL_DISPLAY_TYPE": "改变分子显示样式", "HINT_SKELETAL": "以键线式显示", "HINT_CONDENSED": "以缩写式显示", "HINT_WIRE": "以单线模型显示", "HINT_STICKS": "以棍式模型显示", "HINT_BALLSTICK": "以球棍模型显示", "HINT_SPACEFILL": "以比例模型显示", "HINT_HIDEHYDROGENS": "模型中显示/隐藏氢原子", "HINT_OPENEDITOR": "编辑当前对象", "CAPTION_NEWDOC": "新建", "CAPTION_UNDO": "撤销", "CAPTION_REDO": "重做", "CAPTION_COPY": "复制", "CAPTION_CUT": "剪切", "CAPTION_PASTE": "粘贴", "CAPTION_CLONE_SELECTION": "克隆选区", "CAPTION_TOGGLE_INSPECTOR": "对象检视器", "CAPTION_MANIPULATE": "选取", "CAPTION_ERASE": "删除", "CAPTION_MOL_BOND": "键", "CAPTION_MOL_BOND_SINGLE": "单键", "CAPTION_MOL_BOND_DOUBLE": "双键", "CAPTION_MOL_BOND_TRIPLE": "三键", "CAPTION_MOL_BOND_WEDGEUP": "实楔线键", "CAPTION_MOL_BOND_WEDGEDOWN": "虚楔线键", "CAPTION_MOL_BOND_CLOSER": "突出(加粗)键", "CAPTION_MOL_BOND_WAVY": "波浪键", "CAPTION_MOL_BOND_DOUBLE_EITHER": "顺或反式双键", "CAPTION_MOL_ATOM": "原子", "CAPTION_MOL_FORMULA": "分子式", "CAPTION_MOL_CHARGE": "电荷", "CAPTION_MOL_CHARGE_CLEAR": "清除电荷", "CAPTION_MOL_CHARGE_POSITIVE": "正电荷", "CAPTION_MOL_CHARGE_NEGATIVE": "负电荷", "CAPTION_MOL_CHARGE_SINGLET": "单线态", "CAPTION_MOL_CHARGE_DOUBLET": "双线态自由基", "CAPTION_MOL_CHARGE_TRIPLET": "三线态", "CAPTION_TEXT_BLOCK": "文本", "CAPTION_REPOSITORY_RING": "环", "CAPTION_REPOSITORY_RING_3": "环丙烷", "CAPTION_REPOSITORY_RING_4": "环丁烷", "CAPTION_REPOSITORY_RING_5": "环戊烷", "CAPTION_REPOSITORY_RING_6": "环己烷", "CAPTION_REPOSITORY_RING_7": "环庚烷", "CAPTION_REPOSITORY_RING_8": "环辛烷", "CAPTION_REPOSITORY_RING_AR_6": "苯", "CAPTION_REPOSITORY_RING_AR_5": "环戊二烯", "CAPTION_REPOSITORY_ARROWLINE": "线段与箭头", "CAPTION_REPOSITORY_GLYPH": "图符", "CAPTION_REPOSITORY_GLYPH_LINE": "直线", "CAPTION_REPOSITORY_GLYPH_OPEN_ARROW_LINE": "开放箭头线", "CAPTION_REPOSITORY_GLYPH_TRIANGLE_ARROW_LINE": "三角箭头线", "CAPTION_REPOSITORY_GLYPH_DI_OPEN_ARROW_LINE": "双向开放箭头线", "CAPTION_REPOSITORY_GLYPH_DI_TRIANGLE_ARROW_LINE": "双向三角箭头线", "CAPTION_REPOSITORY_GLYPH_REV_ARROW_LINE": "可逆箭头线", "CAPTION_REPOSITORY_GLYPH_OPEN_ARROW_DILINE": "开放箭头双线", "CAPTION_REPOSITORY_HEAT_SYMBOL": "加热符号", "CAPTION_REPOSITORY_ADD_SYMBOL": "加号", "CAPTION_PICK_COLOR": "颜色", "CAPTION_TEXT_DIRECTION": "文字方向", "CAPTION_TEXT_DIRECTION_DEFAULT": "缺省", "CAPTION_TEXT_DIRECTION_LTR": "由左至右", "CAPTION_TEXT_DIRECTION_RTL": "由右至左", "CAPTION_TEXT_DIRECTION_TTB": "由上至下", "CAPTION_TEXT_DIRECTION_BTT": "由下至上", "CAPTION_TEXT_HORIZONTAL_ALIGN": "文字水平对齐", "CAPTION_TEXT_VERTICAL_ALIGN": "文字垂直对齐", "CAPTION_TEXT_ALIGN_DEFAULT": "缺省", "CAPTION_TEXT_ALIGN_LEADING": "首对齐", "CAPTION_TEXT_ALIGN_TRAILING": "尾对齐", "CAPTION_TEXT_ALIGN_CENTER": "居中对齐", "CAPTION_TEXT_ALIGN_LEFT": "左对齐", "CAPTION_TEXT_ALIGN_RIGHT": "右对齐", "CAPTION_TEXT_ALIGN_TOP": "上对齐", "CAPTION_TEXT_ALIGN_BOTTOM": "下对齐", "HINT_NEWDOC": "创建新文档", "HINT_UNDO": "撤销", "HINT_REDO": "重做", "HINT_COPY": "将选定对象复制至内部剪贴板", "HINT_CUT": "将选定对象剪切至内部剪贴板", "HINT_PASTE": "自内部剪贴板复制", "HINT_CLONE_SELECTION": "克隆当前选区", "HINT_TOGGLE_INSPECTOR": "显示或隐藏对象检视器", "HINT_MANIPULATE": "选择工具", "HINT_ERASE": "删除工具", "HINT_MOL_BOND": "化学键工具", "HINT_MOL_BOND_SINGLE": "单键", "HINT_MOL_BOND_DOUBLE": "双键", "HINT_MOL_BOND_TRIPLE": "叁键", "HINT_MOL_BOND_WEDGEUP": "实楔线键", "HINT_MOL_BOND_WEDGEDOWN": "虚楔线键", "HINT_MOL_BOND_CLOSER": "突出(加粗)键", "HINT_MOL_BOND_WAVY": "波浪键", "HINT_MOL_BOND_DOUBLE_EITHER": "顺或反式双键", "HINT_MOL_ATOM": "原子工具", "HINT_MOL_FORMULA": "分子式工具", "HINT_MOL_CHARGE": "电荷工具", "HINT_MOL_CHARGE_CLEAR": "清除电荷或自由基", "HINT_MOL_CHARGE_POSITIVE": "正电荷", "HINT_MOL_CHARGE_NEGATIVE": "负电荷", "HINT_MOL_CHARGE_SINGLET": "单线态自由基", "HINT_MOL_CHARGE_DOUBLET": "双线态自由基", "HINT_MOL_CHARGE_TRIPLET": "三线态自由基", "HINT_TEXT_BLOCK": "文字工具", "HINT_REPOSITORY_RING": "环工具", "HINT_REPOSITORY_RING_3": "环丙烷", "HINT_REPOSITORY_RING_4": "环丁烷", "HINT_REPOSITORY_RING_5": "环戊烷", "HINT_REPOSITORY_RING_6": "环己烷", "HINT_REPOSITORY_RING_7": "环庚烷", "HINT_REPOSITORY_RING_8": "环辛烷", "HINT_REPOSITORY_RING_AR_6": "苯", "HINT_REPOSITORY_RING_AR_5": "环戊二烯", "HINT_REPOSITORY_ARROWLINE": "线段与箭头", "HINT_REPOSITORY_GLYPH": "图符", "HINT_REPOSITORY_GLYPH_LINE": "直线", "HINT_REPOSITORY_GLYPH_OPEN_ARROW_LINE": "开放箭头线", "HINT_REPOSITORY_GLYPH_TRIANGLE_ARROW_LINE": "三角箭头线", "HINT_REPOSITORY_GLYPH_DI_OPEN_ARROW_LINE": "双向开放箭头线", "HINT_REPOSITORY_GLYPH_DI_TRIANGLE_ARROW_LINE": "双向三角箭头线", "HINT_REPOSITORY_GLYPH_REV_ARROW_LINE": "可逆箭头线", "HINT_REPOSITORY_GLYPH_OPEN_ARROW_DILINE": "开放箭头双线", "HINT_REPOSITORY_HEAT_SYMBOL": "加热符号", "HINT_REPOSITORY_ADD_SYMBOL": "加号", "HINT_FONTNAME": "设置字体", "HINT_FONTSIZE": "设置字号", "HINT_PICK_COLOR": "选择颜色", "HINT_TEXT_DIRECTION": "设置文字方向", "HINT_TEXT_HORIZONTAL_ALIGN": "设置文字水平对齐方式", "HINT_TEXT_VERTICAL_ALIGN": "设置文字水平垂直方式", "CAPTION_LOADDATA_DIALOG": "载入数据", "CAPTION_DATA_FORMAT": "数据格式:", "CAPTION_DATA_SRC": "在下方输入或粘贴数据:", "CAPTION_LOADDATA_FROM_FILE": "载入文件", "CAPTION_CHOOSEFILEFORMAT": "选择文件格式", "CAPTION_SELECT_FORMAT": "选择格式:", "CAPTION_PREVIEW_FILE_CONTENT": "预览文件内容…", "S_DEF_SAVE_FILENAME": "Unnamed", "CAPTION_ATOMLIST_PERIODIC_TABLE": "更多…", "CAPTION_RGROUP": "取代基", "CAPTION_VARIABLE_ATOM": "(包含)原子列表", "CAPTION_VARIABLE_NOT_ATOM": "(不包含)原子列表", "CAPTION_PSEUDOATOM": "赝原子(Pseudoatom)", "CAPTION_DUMMY_ATOM": "虚原子(Dummy atom)", "CAPTION_HETERO_ATOM": "杂原子", "CAPTION_ANY_ATOM": "任意原子", "CAPTION_PERIODIC_TABLE_DIALOG": "元素周期表", "CAPTION_PERIODIC_TABLE_DIALOG_SEL_ELEM": "选择元素", "CAPTION_PERIODIC_TABLE_DIALOG_SEL_ELEMS": "选择多个元素", "CAPTION_TEXTBLOCK_INIT": "在此输入文字", "LEGEND_CAPTION": "图例", "LEGEND_ELEM_SYMBOL": "元素符号", "LEGEND_ELEM_NAME": "名称", "LEGEND_ATOMIC_NUM": "原子序数", "LEGEND_ATOMIC_WEIGHT": "原子量", "CAPTION_2D": "2D", "CAPTION_3D": "3D", "CAPTION_AUTOSIZE": "自动尺寸", "CAPTION_AUTOFIT": "自动缩放", "CAPTION_SHOWSIZEINFO": "显示尺寸信息", "CAPTION_LABEL_SIZE": "尺寸:", "CAPTION_BACKGROUND_COLOR": "背景颜色:", "CAPTION_WIDTH_HEIGHT": "宽:{0}、高:{1}", "PLACEHOLDER_WIDTH": "宽", "PLACEHOLDER_HEIGHT": "高", "HINT_AUTOSIZE": "图形尺寸是否由对象大小自动调整", "HINT_AUTOFIT": "对象是否填满图形区域", "S_VALUE_DEFAULT": "(缺省)" }); Kekule.Localization.addResource("zh", "ErrorMsg", { "WIDGET_CLASS_NOT_FOUND": "控件类不存在", "WIDGET_CAN_NOT_BIND_TO_ELEM": "控件{0}无法绑定到HTML元素<{1}>", "LOAD_CHEMDATA_FAILED": "载入数据失败", "FILE_API_NOT_SUPPORTED": "您当前的浏览器不支持HTML文件操作,请升级浏览器。", "DRAW_BRIDGE_NOT_SUPPORTED": "您当前的浏览器不支持该绘图功能,请升级浏览器。", "COMMAND_NOT_REVERSIBLE": "命令无法撤销", "PAGE_INDEX_OUTOF_RANGE": "页面超出范围", "FETCH_DATA_TIMEOUT": "加载数据超时", "RENDER_TYPE_CHANGE_NOT_ALLOWED": "渲染类型无法改变", "CAN_NOT_CREATE_EDITOR": "创建编辑器失败", "CAN_NOT_SET_COORD_OF_CLASS": "无法设置对象{0}实例的坐标", "CAN_NOT_SET_DIMENSION_OF_CLASS": "无法设置对象{0}实例的尺寸", "CAN_NOT_MERGE_CONNECTORS": "化学键或连接符无法合并", "NOT_A_VALID_ATOM": "无效的原子", "INVALID_ATOM_SYMBOL": "原子符号无效" });
deepchem/deepchem-gui
gui/static/kekulejs/src/localization/zh/kekule.localize.widget.zh.js
JavaScript
gpl-3.0
12,211
[ 30522, 1013, 1008, 1008, 1030, 8568, 1008, 1013, 17710, 5283, 2571, 1012, 2334, 1035, 24501, 1027, 2995, 1025, 17710, 5283, 2571, 1012, 2334, 3989, 1012, 2275, 10841, 12171, 5302, 8566, 2571, 1006, 1000, 15536, 24291, 1000, 1007, 1025, 1771...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
'use strict'; /** * @ngdoc function * @name networkAnalyzerApp.controller:ConnectionsCtrl * @description * # ConnectionsCtrl * Controller of the networkAnalyzerApp */ angular.module('networkAnalyzerApp') .controller('ConnectionsCtrl', function ($scope) { $scope.awesomeThings = [ 'HTML5 Boilerplate', 'AngularJS', 'Karma' ]; });
ChrisHuston/Network-Analyzer
app/scripts/controllers/connections.js
JavaScript
mit
366
[ 30522, 1005, 2224, 9384, 1005, 1025, 1013, 1008, 1008, 1008, 1030, 12835, 3527, 2278, 3853, 1008, 1030, 2171, 2897, 27953, 2100, 6290, 29098, 1012, 11486, 1024, 7264, 6593, 12190, 1008, 1030, 6412, 1008, 1001, 7264, 6593, 12190, 1008, 11486...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
~function (global) { // status var PENDING = 0, FULFILLED = 1, REJECTED = 2; var Promise = function (fun) { var me = this, resolve = function (val) { me.resolve(val); }, reject = function (val) { me.reject(val); }; me._status = PENDING; me._onFulfilled = null; me._onRejected = null; (typeof fun === 'function') && fun(resolve, reject); }; var fn = Promise.prototype; fn.then = function (resolve, reject) { var pms = new Promise(); this._onFulfilled = function (val) { var ret = resolve ? resolve(val) : val; if (Promise.isPromise(ret)) { ret.then(function (val) { pms.resolve(val); }); } else{ pms.resolve(ret); } }; this._onRejected = function (val) { var ret = reject ? reject(val) : val; pms.reject(ret); }; return pms; } fn.catch = function (reject) { return this.then(null, reject); } fn.resolve = function (val) { if (this._status === PENDING) { this._status = FULFILLED; this._onFulfilled && this._onFulfilled(val); } } fn.reject = function (val) { if (this._status === PENDING) { this._status = REJECTED; this._onRejected && this._onRejected(val); } } fn.all = function (arr) { var pms = new Promise(); var len = arr.length, i = -1, count = 0, results = []; while (++i < len) { ~function (i) { arr[i].then( function (val) { results[i] = val; if (++count === len) { pms.resolve(results); } }, function (val) { pms.reject(val); } ); }(i); } return pms; } fn.resolve = function (obj) { var ret; if (!Promise.isPromise(obj)) { ret = obj; obj = new Promise(); } setTimeout(function () { obj.resolve(ret); }); return obj; } fn.reject = function (obj) { var ret; if (!Promise.isPromise(obj)) { ret = obj; obj = new Promise(); } setTimeout(function () { obj.reject(ret); }); return obj; } fn.isPromise = function (obj) { return obj instanceof Promise; } global.Promise = Promise; try{ module.exports = Promise; } catch (e){} }(this);
Urinx/SomeCodes
Js/promise/promise.js
JavaScript
gpl-2.0
2,941
[ 30522, 1066, 3853, 1006, 3795, 1007, 1063, 1013, 1013, 3570, 13075, 14223, 1027, 1014, 1010, 16829, 1027, 1015, 1010, 5837, 1027, 1016, 1025, 13075, 4872, 1027, 3853, 1006, 4569, 1007, 1063, 13075, 2033, 1027, 2023, 1010, 10663, 1027, 3853,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- layout: page title: "Workshop 1 materials" header: no image: title: "grays_lato_img.gif" permalink: "/info1/" comments: false --- ### Useful info for the day #### Archives Examples from the two data sets used for the Kaggle Challenge on day two are available online: + The [50 voices 50 faces](http://www.sussex.ac.uk/fiftyyears/50voices50faces) is an oral history collection celebrating Sussex University's 50th anniversary + [Sisterhood](http://www.bl.uk/sisterhood) is a set of oral history interviews featuring activists of the Women’s Liberation Movement Both will be introduced by [Margaretta Jolly](http://www.sussex.ac.uk/profiles/16251) ---- #### Python Workbooks The python notebooks and all libraries can be downloaded from the HAL Git repo [https://github.com/algolistening/distantListening](https://github.com/algolistening/distantListening). You will need to install [Dockerfile](https://docs.docker.com/), set it running, then run start.sh which will launch the notebook. You can then access it at localhost:8888 (it should provide a URL for the first visit). Thanks to [Parag Mital](http://www.algorithmiclistening.org/participants/#KM) for setting this up for us. ----
ecila/HALblog
pages/materials1.md
Markdown
mit
1,221
[ 30522, 1011, 1011, 1011, 9621, 1024, 3931, 2516, 1024, 1000, 8395, 1015, 4475, 1000, 20346, 1024, 2053, 3746, 1024, 2516, 1024, 1000, 3897, 2015, 1035, 2474, 3406, 1035, 10047, 2290, 1012, 21025, 2546, 1000, 2566, 9067, 19839, 1024, 1000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php get_header(); ?> <div class="row"> <div class="span8"> <h1>News</h1> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2> <p><em><?php the_time('l, F jS, Y'); ?></em></p> <hr> <?php endwhile; else: ?> <p><?php _e('Sorry, there are no posts.'); ?></p> <?php endif; ?> </div> <div class="span4"> <?php get_sidebar(); ?> </div> </div> <?php get_footer(); ?>
samsonayalew/etg
wp-content/themes/etg-second/home.php
PHP
mit
507
[ 30522, 1026, 1029, 25718, 2131, 1035, 20346, 1006, 1007, 1025, 1029, 1028, 1026, 4487, 2615, 2465, 1027, 1000, 5216, 1000, 1028, 1026, 4487, 2615, 2465, 1027, 1000, 8487, 2620, 1000, 1028, 1026, 1044, 2487, 1028, 2739, 1026, 1013, 1044, 2...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import 'rxjs/add/operator/map'; import {Injectable} from '@angular/core'; import {Http, RequestMethod} from '@angular/http'; import {Observable} from 'rxjs/Observable'; import {Cube} from '../models/cube'; import 'rxjs/add/operator/mergeMap'; import {Algorithm} from '../models/analysis/algorithm'; import {Input, InputTypes} from '../models/analysis/input'; import {Output, OutputTypes} from '../models/analysis/output'; import {environment} from '../../environments/environment'; import {ExecutionConfiguration} from '../models/analysis/executionConfiguration'; import {Configuration} from 'jasmine-spec-reporter/built/configuration'; @Injectable() export class AlgorithmsService { private API_DAM_PATH: string = environment.DAMUrl ; constructor(private http: Http) { } getActualCompatibleAlgorithms(): Observable<Algorithm[]> { // console.log(JSON.stringify({time_series: AlgorithmsService.dummyTimeSeries().serialize(), descriptive_statistics: AlgorithmsService.dummyDescriptiveStatistics().serialize(), clustering: AlgorithmsService.dummyClustering().serialize()})); return this.http.get(`${environment.DAMUrl}/services/meta/all`) .map(res => { let algorithms = []; let response = res.json(); for (let key of Object.keys(response)){ let algorithm = new Algorithm().deserialize(response[key]); algorithms.push(algorithm); } return algorithms; }); } getActualCompatibleAlgorithm( algorithmName): Observable<Algorithm> { return this.http.get(`${environment.DAMUrl}/services/meta/${algorithmName}`) .map(res => { let response = res.json(); return new Algorithm().deserialize(response); }); } getTimeSeriesAlgorithm(): Observable<Algorithm> { let that = this; return this.getActualCompatibleAlgorithm('time_series'); } getDescriptiveStatisticsAlgorithm(): Observable<Algorithm> { return this.getActualCompatibleAlgorithm('descriptive_statistics'); } getClusteringAlgorithm(): Observable<Algorithm> { return this.getActualCompatibleAlgorithm('clustering'); } getOutlierDetectionAlgorithm(): Observable<Algorithm> { let that = this; return this.getActualCompatibleAlgorithm('outlier_detection'); /*return Observable.create(function (observer: any) { observer.next(AlgorithmsService.dummyOutlierDetection()); });*/ } getRuleMiningAlgorithm(): Observable<Algorithm> { let that = this; return this.getActualCompatibleAlgorithm('rule_mining'); /*return Observable.create(function (observer: any) { observer.next(AlgorithmsService.dummyOutlierDetection()); });*/ } getAlgorithm(name, cube: Cube): Observable<Algorithm> { switch (name) { case 'time_series': return this.getTimeSeriesAlgorithm(); case 'descriptive_statistics': return this.getDescriptiveStatisticsAlgorithm(); case 'clustering': return this.getClusteringAlgorithm(); case 'outlier_detection': return this.getOutlierDetectionAlgorithm(); case 'rule_mining': return this.getRuleMiningAlgorithm(); default: return this.http.get(`${this.API_DAM_PATH}/${name}`) .map(res => { let response = res.json(); return new Algorithm().deserialize(response); }); } } }
okgreece/indigo
src/app/services/algorithms.ts
TypeScript
mit
3,392
[ 30522, 12324, 1005, 1054, 2595, 22578, 1013, 5587, 1013, 6872, 1013, 4949, 1005, 1025, 12324, 1063, 1999, 20614, 3085, 1065, 2013, 1005, 1030, 16108, 1013, 4563, 1005, 1025, 12324, 1063, 8299, 1010, 5227, 11368, 6806, 2094, 1065, 2013, 1005...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Copyright (c) 2014 Nordic Semiconductor. All Rights Reserved. * * The information contained herein is property of Nordic Semiconductor ASA. * Terms and conditions of usage are described in detail in NORDIC * SEMICONDUCTOR STANDARD SOFTWARE LICENSE AGREEMENT. * * Licensees are granted free, non-transferable use of the information. NO * WARRANTY of ANY KIND is provided. This heading must NOT be removed from * the file. * */ #include <stdbool.h> #include <string.h> #include "app_error.h" #include "ser_config.h" #include "ser_phy.h" #include "ser_hal_transport.h" /** * @brief States of the RX state machine. */ typedef enum { HAL_TRANSP_RX_STATE_CLOSED = 0, HAL_TRANSP_RX_STATE_IDLE, HAL_TRANSP_RX_STATE_RECEIVING, HAL_TRANSP_RX_STATE_DROPPING, HAL_TRANSP_RX_STATE_RECEIVED, HAL_TRANSP_RX_STATE_RECEIVED_PENDING_BUF_REQ, HAL_TRANSP_RX_STATE_RECEIVED_DROPPING, HAL_TRANSP_RX_STATE_MAX }ser_hal_transp_rx_states_t; /** * @brief States of the TX state machine. */ typedef enum { HAL_TRANSP_TX_STATE_CLOSED = 0, HAL_TRANSP_TX_STATE_IDLE, HAL_TRANSP_TX_STATE_TX_ALLOCATED, HAL_TRANSP_TX_STATE_TRANSMITTING, HAL_TRANSP_TX_STATE_TRANSMITTED, HAL_TRANSP_TX_STATE_MAX }ser_hal_transp_tx_states_t; /** * @brief RX state. */ static ser_hal_transp_rx_states_t m_rx_state = HAL_TRANSP_RX_STATE_CLOSED; /** * @brief TX state. */ static ser_hal_transp_tx_states_t m_tx_state = HAL_TRANSP_TX_STATE_CLOSED; /** * @brief Transmission buffer. */ static uint8_t m_tx_buffer[SER_HAL_TRANSPORT_TX_MAX_PKT_SIZE]; /** * @brief Reception buffer. */ static uint8_t m_rx_buffer[SER_HAL_TRANSPORT_RX_MAX_PKT_SIZE]; /** * @brief Callback function handler for Serialization HAL Transport layer events. */ static ser_hal_transport_events_handler_t m_events_handler = NULL; /** * @brief A callback function to be used to handle a PHY module events. This function is called in * an interrupt context. */ static void phy_events_handler(ser_phy_evt_t phy_event) { uint32_t err_code = 0; ser_hal_transport_evt_t hal_transp_event; memset(&hal_transp_event, 0, sizeof (ser_hal_transport_evt_t)); hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_TYPE_MAX; switch (phy_event.evt_type) { case SER_PHY_EVT_TX_PKT_SENT: { if (HAL_TRANSP_TX_STATE_TRANSMITTING == m_tx_state) { m_tx_state = HAL_TRANSP_TX_STATE_TRANSMITTED; err_code = ser_hal_transport_tx_pkt_free(m_tx_buffer); APP_ERROR_CHECK(err_code); /* An event to an upper layer that a packet has been transmitted. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_TX_PKT_SENT; m_events_handler(hal_transp_event); } else { /* Lower layer should not generate this event in current state. */ APP_ERROR_CHECK_BOOL(false); } break; } case SER_PHY_EVT_RX_BUF_REQUEST: { /* An event to an upper layer that a packet is being scheduled to receive or to drop. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_RX_PKT_RECEIVING; /* Receive or drop a packet. */ if (phy_event.evt_params.rx_buf_request.num_of_bytes <= sizeof (m_rx_buffer)) { if (HAL_TRANSP_RX_STATE_IDLE == m_rx_state) { m_events_handler(hal_transp_event); err_code = ser_phy_rx_buf_set(m_rx_buffer); APP_ERROR_CHECK(err_code); m_rx_state = HAL_TRANSP_RX_STATE_RECEIVING; } else if (HAL_TRANSP_RX_STATE_RECEIVED == m_rx_state) { /* It is OK to get know higher layer at this point that we are going to receive * a new packet even though we will start receiving when rx buffer is freed. */ m_events_handler(hal_transp_event); m_rx_state = HAL_TRANSP_RX_STATE_RECEIVED_PENDING_BUF_REQ; } else { /* Lower layer should not generate this event in current state. */ APP_ERROR_CHECK_BOOL(false); } } else { /* There is not enough memory but packet has to be received to dummy location. */ if (HAL_TRANSP_RX_STATE_IDLE == m_rx_state) { m_events_handler(hal_transp_event); err_code = ser_phy_rx_buf_set(NULL); APP_ERROR_CHECK(err_code); m_rx_state = HAL_TRANSP_RX_STATE_DROPPING; } else if (HAL_TRANSP_RX_STATE_RECEIVED == m_rx_state) { m_events_handler(hal_transp_event); err_code = ser_phy_rx_buf_set(NULL); APP_ERROR_CHECK(err_code); m_rx_state = HAL_TRANSP_RX_STATE_RECEIVED_DROPPING; } else { /* Lower layer should not generate this event in current state. */ APP_ERROR_CHECK_BOOL(false); } } break; } case SER_PHY_EVT_RX_PKT_RECEIVED: { if (HAL_TRANSP_RX_STATE_RECEIVING == m_rx_state) { m_rx_state = HAL_TRANSP_RX_STATE_RECEIVED; /* Generate the event to an upper layer. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_RX_PKT_RECEIVED; hal_transp_event.evt_params.rx_pkt_received.p_buffer = phy_event.evt_params.rx_pkt_received.p_buffer; hal_transp_event.evt_params.rx_pkt_received.num_of_bytes = phy_event.evt_params.rx_pkt_received.num_of_bytes; m_events_handler(hal_transp_event); } else { /* Lower layer should not generate this event in current state. */ APP_ERROR_CHECK_BOOL(false); } break; } case SER_PHY_EVT_RX_PKT_DROPPED: { if (HAL_TRANSP_RX_STATE_DROPPING == m_rx_state) { /* Generate the event to an upper layer. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_RX_PKT_DROPPED; m_events_handler(hal_transp_event); m_rx_state = HAL_TRANSP_RX_STATE_IDLE; } else if (HAL_TRANSP_RX_STATE_RECEIVED_DROPPING == m_rx_state) { /* Generate the event to an upper layer. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_RX_PKT_DROPPED; m_events_handler(hal_transp_event); m_rx_state = HAL_TRANSP_RX_STATE_RECEIVED; } else { /* Lower layer should not generate this event in current state. */ APP_ERROR_CHECK_BOOL(false); } break; } case SER_PHY_EVT_RX_OVERFLOW_ERROR: { /* Generate the event to an upper layer. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_PHY_ERROR; hal_transp_event.evt_params.phy_error.error_type = SER_HAL_TRANSP_PHY_ERROR_RX_OVERFLOW; m_events_handler(hal_transp_event); break; } case SER_PHY_EVT_TX_OVERREAD_ERROR: { /* Generate the event to an upper layer. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_PHY_ERROR; hal_transp_event.evt_params.phy_error.error_type = SER_HAL_TRANSP_PHY_ERROR_TX_OVERREAD; m_events_handler(hal_transp_event); break; } case SER_PHY_EVT_HW_ERROR: { /* Generate the event to an upper layer. */ hal_transp_event.evt_type = SER_HAL_TRANSP_EVT_PHY_ERROR; hal_transp_event.evt_params.phy_error.error_type = SER_HAL_TRANSP_PHY_ERROR_HW_ERROR; hal_transp_event.evt_params.phy_error.hw_error_code = phy_event.evt_params.hw_error.error_code; if (HAL_TRANSP_TX_STATE_TRANSMITTING == m_tx_state) { m_tx_state = HAL_TRANSP_TX_STATE_TRANSMITTED; err_code = ser_hal_transport_tx_pkt_free(phy_event.evt_params.hw_error.p_buffer); APP_ERROR_CHECK(err_code); /* An event to an upper layer that a packet has been transmitted. */ } else if (HAL_TRANSP_RX_STATE_RECEIVING == m_rx_state) { m_rx_state = HAL_TRANSP_RX_STATE_RECEIVED; err_code = ser_hal_transport_rx_pkt_free(phy_event.evt_params.hw_error.p_buffer); APP_ERROR_CHECK(err_code); } m_events_handler(hal_transp_event); break; } default: { APP_ERROR_CHECK_BOOL(false); break; } } } uint32_t ser_hal_transport_open(ser_hal_transport_events_handler_t events_handler) { uint32_t err_code = NRF_SUCCESS; if ((HAL_TRANSP_RX_STATE_CLOSED != m_rx_state) || (HAL_TRANSP_TX_STATE_CLOSED != m_tx_state)) { err_code = NRF_ERROR_INVALID_STATE; } else if (NULL == events_handler) { err_code = NRF_ERROR_NULL; } else { /* We have to change states before calling lower layer because ser_phy_open() function is * going to enable interrupts. On success an event from PHY layer can be emitted immediately * after return from ser_phy_open(). */ m_rx_state = HAL_TRANSP_RX_STATE_IDLE; m_tx_state = HAL_TRANSP_TX_STATE_IDLE; m_events_handler = events_handler; /* Initialize a PHY module. */ err_code = ser_phy_open(phy_events_handler); if (NRF_SUCCESS != err_code) { m_rx_state = HAL_TRANSP_RX_STATE_CLOSED; m_tx_state = HAL_TRANSP_TX_STATE_CLOSED; m_events_handler = NULL; if (NRF_ERROR_INVALID_PARAM != err_code) { err_code = NRF_ERROR_INTERNAL; } } } return err_code; } void ser_hal_transport_close(void) { /* Reset generic handler for all events, reset internal states and close PHY module. */ ser_phy_interrupts_disable(); m_rx_state = HAL_TRANSP_RX_STATE_CLOSED; m_tx_state = HAL_TRANSP_TX_STATE_CLOSED; m_events_handler = NULL; ser_phy_close(); } uint32_t ser_hal_transport_rx_pkt_free(uint8_t * p_buffer) { uint32_t err_code = NRF_SUCCESS; ser_phy_interrupts_disable(); if (NULL == p_buffer) { err_code = NRF_ERROR_NULL; } else if (p_buffer != m_rx_buffer) { err_code = NRF_ERROR_INVALID_ADDR; } else if (HAL_TRANSP_RX_STATE_RECEIVED == m_rx_state) { m_rx_state = HAL_TRANSP_RX_STATE_IDLE; } else if (HAL_TRANSP_RX_STATE_RECEIVED_DROPPING == m_rx_state) { m_rx_state = HAL_TRANSP_RX_STATE_DROPPING; } else if (HAL_TRANSP_RX_STATE_RECEIVED_PENDING_BUF_REQ == m_rx_state) { err_code = ser_phy_rx_buf_set(m_rx_buffer); if (NRF_SUCCESS == err_code) { m_rx_state = HAL_TRANSP_RX_STATE_RECEIVING; } else { err_code = NRF_ERROR_INTERNAL; } } else { /* Upper layer should not call this function in current state. */ err_code = NRF_ERROR_INVALID_STATE; } ser_phy_interrupts_enable(); return err_code; } uint32_t ser_hal_transport_tx_pkt_alloc(uint8_t * * pp_memory, uint16_t * p_num_of_bytes) { uint32_t err_code = NRF_SUCCESS; if ((NULL == pp_memory) || (NULL == p_num_of_bytes)) { err_code = NRF_ERROR_NULL; } else if (HAL_TRANSP_TX_STATE_CLOSED == m_tx_state) { err_code = NRF_ERROR_INVALID_STATE; } else if (HAL_TRANSP_TX_STATE_IDLE == m_tx_state) { m_tx_state = HAL_TRANSP_TX_STATE_TX_ALLOCATED; *pp_memory = &m_tx_buffer[0]; *p_num_of_bytes = (uint16_t)sizeof (m_tx_buffer); } else { err_code = NRF_ERROR_NO_MEM; } return err_code; } uint32_t ser_hal_transport_tx_pkt_send(const uint8_t * p_buffer, uint16_t num_of_bytes) { uint32_t err_code = NRF_SUCCESS; /* The buffer provided to this function must be allocated through ser_hal_transport_tx_alloc() * function - this assures correct state and that correct memory buffer is used. */ if (NULL == p_buffer) { err_code = NRF_ERROR_NULL; } else if (0 == num_of_bytes) { err_code = NRF_ERROR_INVALID_PARAM; } else if (p_buffer != m_tx_buffer) { err_code = NRF_ERROR_INVALID_ADDR; } else if (num_of_bytes > sizeof (m_tx_buffer)) { err_code = NRF_ERROR_DATA_SIZE; } else if (HAL_TRANSP_TX_STATE_TX_ALLOCATED == m_tx_state) { ser_phy_interrupts_disable(); err_code = ser_phy_tx_pkt_send(p_buffer, num_of_bytes); if (NRF_SUCCESS == err_code) { m_tx_state = HAL_TRANSP_TX_STATE_TRANSMITTING; } else { if (NRF_ERROR_BUSY != err_code) { err_code = NRF_ERROR_INTERNAL; } } ser_phy_interrupts_enable(); } else { err_code = NRF_ERROR_INVALID_STATE; } return err_code; } uint32_t ser_hal_transport_tx_pkt_free(uint8_t * p_buffer) { uint32_t err_code = NRF_SUCCESS; if (NULL == p_buffer) { err_code = NRF_ERROR_NULL; } else if (p_buffer != m_tx_buffer) { err_code = NRF_ERROR_INVALID_ADDR; } else if ((HAL_TRANSP_TX_STATE_TX_ALLOCATED == m_tx_state) || (HAL_TRANSP_TX_STATE_TRANSMITTED == m_tx_state)) { /* Release TX buffer for use. */ m_tx_state = HAL_TRANSP_TX_STATE_IDLE; } else { err_code = NRF_ERROR_INVALID_STATE; } return err_code; }
dptechnics/Espruino
targetlibs/nrf5x/nrf51_sdk/components/serialization/common/transport/ser_hal_transport.c
C
mpl-2.0
14,414
[ 30522, 1013, 1008, 9385, 1006, 1039, 1007, 2297, 13649, 20681, 1012, 2035, 2916, 9235, 1012, 1008, 1008, 1996, 2592, 4838, 2182, 2378, 2003, 3200, 1997, 13649, 20681, 17306, 1012, 1008, 3408, 1998, 3785, 1997, 8192, 2024, 2649, 1999, 6987, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using Harmony; namespace ResourceReplacer { public static class Patcher { private const string HarmonyId = "boformer.ResourceReplacer"; public static void Apply() { HarmonyInstance.Create(HarmonyId).PatchAll(typeof(Patcher).Assembly); } public static void Revert() { HarmonyInstance.Create(HarmonyId).UnpatchAll(HarmonyId); } } }
boformer/ResourceReplacer
ResourceReplacer/Patcher.cs
C#
mit
408
[ 30522, 2478, 9396, 1025, 3415, 15327, 7692, 2890, 24759, 10732, 2099, 1063, 2270, 10763, 2465, 8983, 2121, 1063, 2797, 9530, 3367, 5164, 9396, 3593, 1027, 1000, 8945, 14192, 2121, 1012, 7692, 2890, 24759, 10732, 2099, 1000, 1025, 2270, 1076...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
namespace BlockEngine.Math { public class Mathx { public static int DivideRoundDown(int numerator, int positiveDivisor) { if (numerator >= 0) { return numerator / positiveDivisor; } else { return (numerator + 1) / positiveDivisor - 1; } } } }
teinemaa/worldgen2d
Assets/BlockEngine/Math/Mathx.cs
C#
mit
386
[ 30522, 3415, 15327, 3796, 13159, 3170, 1012, 8785, 1063, 2270, 2465, 8785, 2595, 1063, 2270, 10763, 20014, 11443, 22494, 4859, 7698, 1006, 20014, 16371, 5017, 8844, 1010, 20014, 3893, 4305, 11365, 2953, 1007, 1063, 2065, 1006, 16371, 5017, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
import { Component, Input } from '@angular/core'; import { Config } from '../../config'; @Component({ selector: 'host-template', styles: [` textarea { width: 400px; height: 100px; } `], template: ` <div *ngIf="hostfile"> <h3>Hosts file:</h3> <input type="checkbox" [(ngModel)]="hostfile.isActive" /><span>Replace host files on all nodes with that template:</span><br /> <textarea [disabled]="!hostfile.isActive" [(ngModel)]="hostfile.template"></textarea> </div> ` }) export class HostTemplateComponent { @Input() hostfile: any; }
mr-raptor/testrunner2
src/app/components/host-template.component/host-template.component.ts
TypeScript
mit
562
[ 30522, 12324, 1063, 6922, 1010, 7953, 1065, 2013, 1005, 1030, 16108, 1013, 4563, 1005, 1025, 12324, 1063, 9530, 8873, 2290, 1065, 2013, 1005, 1012, 1012, 1013, 1012, 1012, 1013, 9530, 8873, 2290, 1005, 1025, 1030, 6922, 1006, 1063, 27000, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/******************************************************* * Copyright (c) 2015, ArrayFire * All rights reserved. * * This file is distributed under 3-clause BSD license. * The complete license agreement can be obtained at: * http://arrayfire.com/licenses/BSD-3-Clause ********************************************************/ #include <af/defines.h> #include <program.hpp> #include <dispatch.hpp> #include <err_opencl.hpp> #include <debug_opencl.hpp> #include <kernel_headers/susan.hpp> #include <memory.hpp> #include <map> #include "config.hpp" using cl::Buffer; using cl::Program; using cl::Kernel; using cl::KernelFunctor; using cl::EnqueueArgs; using cl::LocalSpaceArg; using cl::NDRange; namespace opencl { namespace kernel { static const unsigned THREADS_PER_BLOCK = 256; static const unsigned SUSAN_THREADS_X = 16; static const unsigned SUSAN_THREADS_Y = 16; template<typename T, unsigned radius> void susan(cl::Buffer* out, const cl::Buffer* in, const unsigned in_off, const unsigned idim0, const unsigned idim1, const float t, const float g, const unsigned edge) { try { static std::once_flag compileFlags[DeviceManager::MAX_DEVICES]; static std::map<int, Program*> suProg; static std::map<int, Kernel*> suKernel; int device = getActiveDeviceId(); std::call_once( compileFlags[device], [device] () { const size_t LOCAL_MEM_SIZE = (SUSAN_THREADS_X+2*radius)*(SUSAN_THREADS_Y+2*radius); std::ostringstream options; options << " -D T=" << dtype_traits<T>::getName() << " -D LOCAL_MEM_SIZE=" << LOCAL_MEM_SIZE << " -D BLOCK_X="<< SUSAN_THREADS_X << " -D BLOCK_Y="<< SUSAN_THREADS_Y << " -D RADIUS="<< radius << " -D RESPONSE"; if (std::is_same<T, double>::value || std::is_same<T, cdouble>::value) { options << " -D USE_DOUBLE"; } cl::Program prog; buildProgram(prog, susan_cl, susan_cl_len, options.str()); suProg[device] = new Program(prog); suKernel[device] = new Kernel(*suProg[device], "susan_responses"); }); auto susanOp = KernelFunctor<Buffer, Buffer, unsigned, unsigned, unsigned, float, float, unsigned>(*suKernel[device]); NDRange local(SUSAN_THREADS_X, SUSAN_THREADS_Y); NDRange global(divup(idim0-2*edge, local[0])*local[0], divup(idim1-2*edge, local[1])*local[1]); susanOp(EnqueueArgs(getQueue(), global, local), *out, *in, in_off, idim0, idim1, t, g, edge); } catch (cl::Error err) { CL_TO_AF_ERROR(err); throw; } } template<typename T> unsigned nonMaximal(cl::Buffer* x_out, cl::Buffer* y_out, cl::Buffer* resp_out, const unsigned idim0, const unsigned idim1, const cl::Buffer* resp_in, const unsigned edge, const unsigned max_corners) { unsigned corners_found = 0; try { static std::once_flag compileFlags[DeviceManager::MAX_DEVICES]; static std::map<int, Program*> nmProg; static std::map<int, Kernel*> nmKernel; int device = getActiveDeviceId(); std::call_once( compileFlags[device], [device] () { std::ostringstream options; options << " -D T=" << dtype_traits<T>::getName() << " -D NONMAX"; if (std::is_same<T, double>::value || std::is_same<T, cdouble>::value) { options << " -D USE_DOUBLE"; } cl::Program prog; buildProgram(prog, susan_cl, susan_cl_len, options.str()); nmProg[device] = new Program(prog); nmKernel[device] = new Kernel(*nmProg[device], "non_maximal"); }); cl::Buffer *d_corners_found = bufferAlloc(sizeof(unsigned)); getQueue().enqueueWriteBuffer(*d_corners_found, CL_TRUE, 0, sizeof(unsigned), &corners_found); auto nonMaximalOp = KernelFunctor<Buffer, Buffer, Buffer, Buffer, unsigned, unsigned, Buffer, unsigned, unsigned>(*nmKernel[device]); NDRange local(SUSAN_THREADS_X, SUSAN_THREADS_Y); NDRange global(divup(idim0-2*edge, local[0])*local[0], divup(idim1-2*edge, local[1])*local[1]); nonMaximalOp(EnqueueArgs(getQueue(), global, local), *x_out, *y_out, *resp_out, *d_corners_found, idim0, idim1, *resp_in, edge, max_corners); getQueue().enqueueReadBuffer(*d_corners_found, CL_TRUE, 0, sizeof(unsigned), &corners_found); bufferFree(d_corners_found); } catch (cl::Error err) { CL_TO_AF_ERROR(err); throw; } return corners_found; } } }
ghisvail/arrayfire
src/backend/opencl/kernel/susan.hpp
C++
bsd-3-clause
5,131
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
body { } table { width:90%; } table > td { height:5px; } #snippetsettings { background-color: #F9F9F9; width:100%; float:left; margin-top:30px; } #selection { margin-left:20px; } #smack_microdata_form { margin: 25px; } .enableprofile { background-color:#AC54AA; color:#fff; border-color: #8C489F; border-style: solid; border-width: 1px; cursor: pointer; line-height: normal; margin-right: -4px; padding: 5px; text-align:center; } .disableprofile { background-color: #e6e6e6; background-image: linear-gradient(#fff, #fff 25%, #e6e6e6); background-repeat: no-repeat; border-color: #ccc #ccc #bbb; border-image: none; border-style: solid; border-width: 1px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05); cursor: pointer; line-height: normal; margin-right: -4px; padding: 5px; text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); text-align:center; } #textalign { font-size:15px; font-family:"Open Sans",sans-serif; } #gpluslabel,#snippetenable { border-radius:5px 0px 0px 5px; } #geoloclabel,#snippetdisable { border-radius:0px 5px 5px 0px; } #socialimg { margin: 0 0 0 16px; padding: 1px 1px 13px; } #socialimglabel > input[type="radio"] { margin-top: -20px; } #socialopt { margin-left:35px; min-height:82px; } #posttype > input[type="radio"] { margin-top:1px !important; } /* Support CSS */ #supportmain { background-color: #ffffff; margin-left: 17px; padding: 0 0 10px 10px; width: 96%; } #tdalign { min-width:140px; height:70px; text-align:center; } /*Re-Design of checkbox*/ .socialaccess { width: 80px; height: 26px; background: #0072a4; // background: #333; margin: 20px auto; -webkit-border-radius: 50px; -moz-border-radius: 50px; border-radius: 50px; position: relative; -webkit-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,0.2); -moz-box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,0.2); box-shadow: inset 0px 1px 1px rgba(0,0,0,0.5), 0px 1px 0px rgba(255,255,255,0.2); } .socialaccess:after { content: 'OFF'; font: 12px/26px Arial, sans-serif; // color: #00bf00; color: #fff; position: absolute; right: 10px; z-index: 0; font-weight: bold; text-shadow: 1px 1px 0px rgba(255,255,255,.15); } .socialaccess:before { content: 'ON'; font: 12px/26px Arial, sans-serif; color: #00bf00; color: #fff; position: absolute; left: 10px; z-index: 0; font-weight: bold; } .socialaccess label { display: block; width: 34px; height: 20px; -webkit-border-radius: 50px; -moz-border-radius: 50px; border-radius: 50px; -webkit-transition: all .4s ease; -moz-transition: all .4s ease; -o-transition: all .4s ease; -ms-transition: all .4s ease; transition: all .4s ease; cursor: pointer; position: absolute; top: 3px; left: 3px; z-index: 1; -webkit-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3); -moz-box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3); box-shadow: 0px 2px 5px 0px rgba(0,0,0,0.3); background: #fcfff4; background: -webkit-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); background: -moz-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); background: -o-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); background: -ms-linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); background: linear-gradient(top, #fcfff4 0%, #dfe5d7 40%, #b3bead 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#fcfff4', endColorstr='#b3bead',GradientType=0 ); } .socialaccess input[type=checkbox]:checked + label { left: 43px; } #socialaccessbox { /*gradient background background: #545454; background: -moz-linear-gradient(top, #545454 0%, #545454 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#545454), color-stop(100%,#545454)); background: -webkit-linear-gradient(top, #545454 0%,#545454 100%); background: -o-linear-gradient(top, #545454 0%,#545454 100%); background: -ms-linear-gradient(top, #545454 0%,#545454 100%); background: linear-gradient(to bottom, #545454 0%,#545454 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#545454', endColorstr='#545454',GradientType=0 );*/ //background:#C0C0C0; width:100px; height:100px; //border-radius:5px; float:left; margin-left: 50px; margin-top: 18px; } #disp_posttype > table > tr > td { height:40px; }
kanhaiyasharma/Bestswiss
wp-content/plugins/google-seo-author-snippets/css/style.css
CSS
gpl-2.0
4,348
[ 30522, 2303, 1063, 1065, 2795, 1063, 9381, 1024, 3938, 1003, 1025, 1065, 2795, 1028, 14595, 1063, 4578, 1024, 1019, 2361, 2595, 1025, 1065, 1001, 1055, 3490, 29519, 21678, 8613, 1063, 4281, 1011, 3609, 1024, 1001, 1042, 2683, 2546, 2683, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Asterisk -- An open source telephony toolkit. * * Copyright (C) 2010, Digium, Inc. * * David Vossel <dvossel@digium.com> * * See http://www.asterisk.org for more information about * the Asterisk project. Please do not directly contact * any of the maintainers of this project for assistance; * the project provides a web site, mailing lists and IRC * channels for your use. * * This program is free software, distributed under the terms of * the GNU General Public License Version 2. See the LICENSE file * at the top of the source tree. */ /*! \file * * \brief FrameHooks Architecture * * \author David Vossel <dvossel@digium.com> */ #include "asterisk.h" ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" #include "asterisk/linkedlists.h" #include "asterisk/framehook.h" #include "asterisk/frame.h" struct ast_framehook { struct ast_framehook_interface i; /*! This pointer to ast_channel the framehook is attached to. */ struct ast_channel *chan; /*! the id representing this framehook on a channel */ unsigned int id; /*! when set, this signals the read and write function to detach the hook */ int detach_and_destroy_me; /*! list entry for ast_framehook_list object */ AST_LIST_ENTRY(ast_framehook) list; }; struct ast_framehook_list { unsigned int id_count; AST_LIST_HEAD_NOLOCK(, ast_framehook) list; }; static void framehook_detach_and_destroy(struct ast_framehook *framehook) { struct ast_frame *frame; frame = framehook->i.event_cb(framehook->chan, NULL, AST_FRAMEHOOK_EVENT_DETACHED, framehook->i.data); /* never assume anything about this function. If you can return a frame during * the detached event, then assume someone will. */ if (frame) { ast_frfree(frame); } framehook->chan = NULL; if (framehook->i.destroy_cb) { framehook->i.destroy_cb(framehook->i.data); } ast_free(framehook); } static struct ast_frame *framehook_list_push_event(struct ast_framehook_list *framehooks, struct ast_frame *frame, enum ast_framehook_event event) { struct ast_framehook *framehook; if (!framehooks) { return frame; } AST_LIST_TRAVERSE_SAFE_BEGIN(&framehooks->list, framehook, list) { if (framehook->detach_and_destroy_me) { /* this guy is signaled for destruction */ AST_LIST_REMOVE_CURRENT(list); framehook_detach_and_destroy(framehook); } else { frame = framehook->i.event_cb(framehook->chan, frame, event, framehook->i.data); } } AST_LIST_TRAVERSE_SAFE_END; return frame; } int ast_framehook_attach(struct ast_channel *chan, struct ast_framehook_interface *i) { struct ast_framehook *framehook; struct ast_framehook_list *fh_list; struct ast_frame *frame; if (i->version != AST_FRAMEHOOK_INTERFACE_VERSION) { ast_log(LOG_ERROR, "Version '%hu' of framehook interface not what we compiled against (%hu)\n", i->version, AST_FRAMEHOOK_INTERFACE_VERSION); return -1; } if (!i->event_cb || !(framehook = ast_calloc(1, sizeof(*framehook)))) { return -1; } framehook->i = *i; framehook->chan = chan; /* create the framehook list if it didn't already exist */ if (!ast_channel_framehooks(chan)) { if (!(fh_list = ast_calloc(1, sizeof(*ast_channel_framehooks(chan))))) { ast_free(framehook); return -1; } ast_channel_framehooks_set(chan, fh_list); } framehook->id = ++ast_channel_framehooks(chan)->id_count; AST_LIST_INSERT_TAIL(&ast_channel_framehooks(chan)->list, framehook, list); /* Tell the event callback we're live and rocking */ frame = framehook->i.event_cb(framehook->chan, NULL, AST_FRAMEHOOK_EVENT_ATTACHED, framehook->i.data); /* Never assume anything about this function. If you can return a frame during * the attached event, then assume someone will. */ if (frame) { ast_frfree(frame); } return framehook->id; } int ast_framehook_detach(struct ast_channel *chan, int id) { struct ast_framehook *framehook; int res = -1; if (!ast_channel_framehooks(chan)) { return res; } AST_LIST_TRAVERSE_SAFE_BEGIN(&ast_channel_framehooks(chan)->list, framehook, list) { if (framehook->id == id) { /* we mark for detachment rather than doing explicitly here because * it needs to be safe for this function to be called within the * event callback. If we allowed the hook to actually be destroyed * immediately here, the event callback would crash on exit. */ framehook->detach_and_destroy_me = 1; res = 0; break; } } AST_LIST_TRAVERSE_SAFE_END; return res; } int ast_framehook_list_destroy(struct ast_channel *chan) { struct ast_framehook *framehook; if (!ast_channel_framehooks(chan)) { return 0; } AST_LIST_TRAVERSE_SAFE_BEGIN(&ast_channel_framehooks(chan)->list, framehook, list) { AST_LIST_REMOVE_CURRENT(list); framehook_detach_and_destroy(framehook); } AST_LIST_TRAVERSE_SAFE_END; ast_free(ast_channel_framehooks(chan)); ast_channel_framehooks_set(chan, NULL); return 0; } int ast_framehook_list_is_empty(struct ast_framehook_list *framehooks) { if (!framehooks) { return 1; } return AST_LIST_EMPTY(&framehooks->list) ? 1 : 0; } struct ast_frame *ast_framehook_list_write_event(struct ast_framehook_list *framehooks, struct ast_frame *frame) { return framehook_list_push_event(framehooks, frame, AST_FRAMEHOOK_EVENT_WRITE); } struct ast_frame *ast_framehook_list_read_event(struct ast_framehook_list *framehooks, struct ast_frame *frame) { return framehook_list_push_event(framehooks, frame, AST_FRAMEHOOK_EVENT_READ); }
mehulsbhatt/asterisk
main/framehook.c
C
gpl-2.0
5,460
[ 30522, 1013, 1008, 1008, 2004, 3334, 20573, 1011, 1011, 2019, 2330, 3120, 10093, 13699, 27629, 6994, 23615, 1012, 1008, 1008, 9385, 1006, 1039, 1007, 2230, 1010, 10667, 5007, 1010, 4297, 1012, 1008, 1008, 2585, 24878, 2884, 1026, 1040, 1986...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2019 Serge Rider (serge@jkiss.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jkiss.dbeaver.ui.controls.lightgrid; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Font; import org.eclipse.swt.graphics.GC; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.graphics.Rectangle; import org.jkiss.code.Nullable; import org.jkiss.dbeaver.ui.DBeaverIcons; import org.jkiss.dbeaver.ui.TextUtils; import org.jkiss.dbeaver.ui.UIIcon; import org.jkiss.utils.CommonUtils; /** * Grid column renderer */ class GridColumnRenderer extends AbstractRenderer { public static final int LEFT_MARGIN = 6; public static final int RIGHT_MARGIN = 6; public static final int BOTTOM_MARGIN = 6; public static final int TOP_MARGIN = 6; public static final int ARROW_MARGIN = 6; public static final int IMAGE_SPACING = 3; public static final Image IMAGE_ASTERISK = DBeaverIcons.getImage(UIIcon.SORT_UNKNOWN); public static final Image IMAGE_DESC = DBeaverIcons.getImage(UIIcon.SORT_DECREASE); public static final Image IMAGE_ASC = DBeaverIcons.getImage(UIIcon.SORT_INCREASE); public static final Image IMAGE_FILTER = DBeaverIcons.getImage(UIIcon.FILTER_SMALL); public static final int SORT_WIDTH = IMAGE_DESC.getBounds().width; public static final int FILTER_WIDTH = IMAGE_FILTER.getBounds().width; public GridColumnRenderer(LightGrid grid) { super(grid); } public static Rectangle getSortControlBounds() { return IMAGE_DESC.getBounds(); } public static Rectangle getFilterControlBounds() { return IMAGE_FILTER.getBounds(); } @Nullable protected Image getColumnImage(Object element) { return grid.getLabelProvider().getImage(element); } protected String getColumnText(Object element) { return grid.getLabelProvider().getText(element); } protected String getColumnDescription(Object element) { return grid.getLabelProvider().getDescription(element); } protected Font getColumnFont(Object element) { Font font = grid.getLabelProvider().getFont(element); return font != null ? font : grid.normalFont; } public void paint(GC gc, Rectangle bounds, boolean selected, boolean hovering, Object element) { boolean hasFilters = grid.getContentProvider().isElementSupportsFilter(element); //GridColumn col = grid.getColumnByElement(cell.col); //AbstractRenderer arrowRenderer = col.getSortRenderer(); int sortOrder = grid.getContentProvider().getSortOrder(element); final Rectangle sortBounds = getSortControlBounds(); final Rectangle filterBounds = getFilterControlBounds(); // set the font to be used to display the text. gc.setFont(getColumnFont(element)); boolean flat = true; boolean drawSelected = false; if (flat && (selected || hovering)) { gc.setBackground(grid.getContentProvider().getCellHeaderSelectionBackground(element)); } else { gc.setBackground(grid.getContentProvider().getCellHeaderBackground(element)); } gc.setForeground(grid.getContentProvider().getCellHeaderForeground(element)); gc.fillRectangle(bounds.x, bounds.y, bounds.width, bounds.height); int pushedDrawingOffset = 0; if (drawSelected) { pushedDrawingOffset = 1; } int x = LEFT_MARGIN; Image columnImage = getColumnImage(element); if (columnImage != null) { int y = bounds.y + pushedDrawingOffset + TOP_MARGIN; gc.drawImage(columnImage, bounds.x + x + pushedDrawingOffset, y); x += columnImage.getBounds().width + IMAGE_SPACING; } int width = bounds.width - x; if (sortOrder == SWT.NONE) { width -= RIGHT_MARGIN; } else { width -= ARROW_MARGIN + sortBounds.width; } if (hasFilters) { width -= filterBounds.width; } //gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_FOREGROUND)); int y = bounds.y + TOP_MARGIN; { // Column name String text = getColumnText(element); text = TextUtils.getShortString(grid.fontMetrics, text, width); gc.setFont(grid.normalFont); gc.drawString(text, bounds.x + x + pushedDrawingOffset, y + pushedDrawingOffset, true); } if (sortOrder != SWT.NONE) { if (drawSelected) { sortBounds.x = bounds.x + bounds.width - ARROW_MARGIN - sortBounds.width + 1; sortBounds.y = y; } else { sortBounds.x = bounds.x + bounds.width - ARROW_MARGIN - sortBounds.width; sortBounds.y = y; } sortBounds.x += IMAGE_SPACING; paintSort(gc, sortBounds, sortOrder); } if (hasFilters) { gc.drawImage(IMAGE_FILTER, bounds.x + bounds.width - filterBounds.width - (sortOrder != SWT.NONE ? IMAGE_SPACING + sortBounds.width + 1 : ARROW_MARGIN), y); } { // Draw column description String text = getColumnDescription(element); if (!CommonUtils.isEmpty(text)) { y += TOP_MARGIN + grid.fontMetrics.getHeight(); text = TextUtils.getShortString(grid.fontMetrics, text, width); gc.setFont(grid.normalFont); gc.drawString(text, bounds.x + x + pushedDrawingOffset, y + pushedDrawingOffset, true); } } // Draw border if (!flat) { if (drawSelected) { gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW)); } else { gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_HIGHLIGHT_SHADOW)); } gc.drawLine(bounds.x, bounds.y, bounds.x + bounds.width - 1, bounds.y); gc.drawLine(bounds.x, bounds.y, bounds.x, bounds.y + bounds.height - 1); if (!drawSelected) { gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_LIGHT_SHADOW)); gc.drawLine(bounds.x + 1, bounds.y + 1, bounds.x + bounds.width - 2, bounds.y + 1); gc.drawLine(bounds.x + 1, bounds.y + 1, bounds.x + 1, bounds.y + bounds.height - 2); } if (drawSelected) { gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW)); } else { gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW)); } gc.drawLine(bounds.x + bounds.width - 1, bounds.y, bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); gc.drawLine(bounds.x, bounds.y + bounds.height - 1, bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); if (!drawSelected) { gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_NORMAL_SHADOW)); gc.drawLine(bounds.x + bounds.width - 2, bounds.y + 1, bounds.x + bounds.width - 2, bounds.y + bounds.height - 2); gc.drawLine(bounds.x + 1, bounds.y + bounds.height - 2, bounds.x + bounds.width - 2, bounds.y + bounds.height - 2); } } else { gc.setForeground(getDisplay().getSystemColor(SWT.COLOR_WIDGET_DARK_SHADOW)); gc.drawLine(bounds.x + bounds.width - 1, bounds.y, bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); gc.drawLine(bounds.x, bounds.y + bounds.height - 1, bounds.x + bounds.width - 1, bounds.y + bounds.height - 1); } gc.setFont(grid.normalFont); } public static void paintSort(GC gc, Rectangle bounds, int sort) { switch (sort) { case SWT.DEFAULT: gc.drawImage(IMAGE_ASTERISK, bounds.x, bounds.y); break; case SWT.UP: gc.drawImage(IMAGE_ASC, bounds.x, bounds.y); break; case SWT.DOWN: gc.drawImage(IMAGE_DESC, bounds.x, bounds.y); break; } /* if (isSelected()) { gc.drawLine(bounds.x, bounds.y, bounds.x + 6, bounds.y); gc.drawLine(bounds.x + 1, bounds.y + 1, bounds.x + 5, bounds.y + 1); gc.drawLine(bounds.x + 2, bounds.y + 2, bounds.x + 4, bounds.y + 2); gc.drawPoint(bounds.x + 3, bounds.y + 3); } else { gc.drawPoint(bounds.x + 3, bounds.y); gc.drawLine(bounds.x + 2, bounds.y + 1, bounds.x + 4, bounds.y + 1); gc.drawLine(bounds.x + 1, bounds.y + 2, bounds.x + 5, bounds.y + 2); gc.drawLine(bounds.x, bounds.y + 3, bounds.x + 6, bounds.y + 3); } */ } }
AndrewKhitrin/dbeaver
plugins/org.jkiss.dbeaver.ui.editors.data/src/org/jkiss/dbeaver/ui/controls/lightgrid/GridColumnRenderer.java
Java
apache-2.0
9,778
[ 30522, 1013, 1008, 1008, 16962, 5243, 6299, 1011, 5415, 7809, 3208, 1008, 9385, 1006, 1039, 1007, 2230, 1011, 10476, 21747, 7945, 1006, 21747, 1030, 1046, 14270, 2015, 1012, 8917, 1007, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * Magento * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * http://opensource.org/licenses/osl-3.0.php * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to license@magento.com so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade Magento to newer * versions in the future. If you wish to customize Magento for your * needs please refer to http://www.magento.com for more information. * * @category Mage * @package Mage_Core * @copyright Copyright (c) 2006-2019 Magento, Inc. (http://www.magento.com) * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ class Mage_Core_Model_Layout_Element extends Varien_Simplexml_Element { public function prepare($args) { switch ($this->getName()) { case 'layoutUpdate': break; case 'layout': break; case 'update': break; case 'remove': break; case 'block': $this->prepareBlock($args); break; case 'reference': $this->prepareReference($args); break; case 'action': $this->prepareAction($args); break; default: $this->prepareActionArgument($args); break; } $children = $this->children(); foreach ($this as $child) { $child->prepare($args); } return $this; } public function getBlockName() { $tagName = (string)$this->getName(); if ('block'!==$tagName && 'reference'!==$tagName || empty($this['name'])) { return false; } return (string)$this['name']; } public function prepareBlock($args) { $type = (string)$this['type']; $name = (string)$this['name']; $className = (string)$this['class']; if (!$className) { $className = Mage::getConfig()->getBlockClassName($type); $this->addAttribute('class', $className); } $parent = $this->getParent(); if (isset($parent['name']) && !isset($this['parent'])) { $this->addAttribute('parent', (string)$parent['name']); } return $this; } public function prepareReference($args) { return $this; } public function prepareAction($args) { $parent = $this->getParent(); $this->addAttribute('block', (string)$parent['name']); return $this; } public function prepareActionArgument($args) { return $this; } }
portchris/NaturalRemedyCompany
src/app/code/core/Mage/Core/Model/Layout/Element.php
PHP
mit
2,987
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 17454, 13663, 1008, 1008, 5060, 1997, 6105, 1008, 1008, 2023, 3120, 5371, 2003, 3395, 2000, 1996, 2330, 4007, 6105, 1006, 9808, 2140, 1017, 1012, 1014, 1007, 1008, 2008, 2003, 24378, 2007, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* Taken from bootstrap: https://github.com/twitter/bootstrap/blob/master/less/tooltip.less */ .fade { opacity: 0; -webkit-transition: opacity 0.15s linear; -moz-transition: opacity 0.15s linear; -ms-transition: opacity 0.15s linear; -o-transition: opacity 0.15s linear; transition: opacity 0.15s linear; } .fade.in { opacity: 1; } .tooltip { position: absolute; z-index: 1020; display: block; padding: 5px; font-size: 11px; opacity: 0; filter: alpha(opacity=0); visibility: visible; } .tooltip.in { opacity: 0.8; filter: alpha(opacity=80); } .tooltip.top { margin-top: -2px; } .tooltip.right { margin-left: 2px; } .tooltip.bottom { margin-top: 2px; } .tooltip.left { margin-left: -2px; } .tooltip.top .arrow { bottom: 0; left: 50%; margin-left: -5px; border-top: 5px solid #000000; border-right: 5px solid transparent; border-left: 5px solid transparent; } .tooltip.left .arrow { top: 50%; right: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid #000000; } .tooltip.bottom .arrow { top: 0; left: 50%; margin-left: -5px; border-right: 5px solid transparent; border-bottom: 5px solid #000000; border-left: 5px solid transparent; } .tooltip.right .arrow { top: 50%; left: 0; margin-top: -5px; border-top: 5px solid transparent; border-right: 5px solid #000000; border-bottom: 5px solid transparent; } .tooltip-inner { max-width: 200px; padding: 3px 8px; color: #ffffff; text-align: center; text-decoration: none; background-color: #000000; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; } .arrow { position: absolute; width: 0; height: 0; } .popover { position: absolute; top: 0; left: 0; z-index: 1010; display: none; padding: 5px; } .popover.top { margin-top: -5px; } .popover.right { margin-left: 5px; } .popover.bottom { margin-top: 5px; } .popover.left { margin-left: -5px; } .popover.top .arrow { bottom: 0; left: 50%; margin-left: -5px; border-top: 5px solid #000000; border-right: 5px solid transparent; border-left: 5px solid transparent; } .popover.right .arrow { top: 50%; left: 0; margin-top: -5px; border-top: 5px solid transparent; border-right: 5px solid #000000; border-bottom: 5px solid transparent; } .popover.bottom .arrow { top: 0; left: 50%; margin-left: -5px; border-right: 5px solid transparent; border-bottom: 5px solid #000000; border-left: 5px solid transparent; } .popover.left .arrow { top: 50%; right: 0; margin-top: -5px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 5px solid #000000; } .popover-inner { width: 280px; padding: 3px; overflow: hidden; background: #000000; background: rgba(0, 0, 0, 0.8); -webkit-border-radius: 6px; -moz-border-radius: 6px; border-radius: 6px; -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); } .popover-title { padding: 5px 10px 0px; line-height: 1; background-color: #f5f5f5; border-bottom: 1px solid #eee; -webkit-border-radius: 3px 3px 0 0; -moz-border-radius: 3px 3px 0 0; border-radius: 3px 3px 0 0; margin: 0; } .popover-content { padding: 5px 10px; line-height: 1; background-color: #ffffff; -webkit-border-radius: 0 0 3px 3px; -moz-border-radius: 0 0 3px 3px; border-radius: 0 0 3px 3px; -webkit-background-clip: padding-box; -moz-background-clip: padding-box; background-clip: padding-box; } .popover-content p, .popover-content ul, .popover-content ol { margin-bottom: 0; }
solring/TWCompanyTree
website/static/lib/css/d3-bootstrap-plugins.css
CSS
unlicense
3,823
[ 30522, 1013, 1008, 2579, 2013, 6879, 6494, 2361, 1024, 16770, 1024, 1013, 1013, 21025, 2705, 12083, 1012, 4012, 1013, 10474, 1013, 6879, 6494, 2361, 1013, 1038, 4135, 2497, 1013, 3040, 1013, 2625, 1013, 6994, 25101, 1012, 2625, 1008, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2016 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.rsocket.transport.local; import io.rsocket.transport.ClientTransport; import io.rsocket.transport.ServerTransport; import io.rsocket.uri.UriHandler; import java.net.URI; import java.util.Optional; public class LocalUriHandler implements UriHandler { @Override public Optional<ClientTransport> buildClient(URI uri) { if ("local".equals(uri.getScheme())) { return Optional.of(LocalClientTransport.create(uri.getSchemeSpecificPart())); } return UriHandler.super.buildClient(uri); } @Override public Optional<ServerTransport> buildServer(URI uri) { if ("local".equals(uri.getScheme())) { return Optional.of(LocalServerTransport.create(uri.getSchemeSpecificPart())); } return UriHandler.super.buildServer(uri); } }
qweek/rsocket-java
rsocket-transport-local/src/main/java/io/rsocket/transport/local/LocalUriHandler.java
Java
apache-2.0
1,377
[ 30522, 1013, 1008, 1008, 9385, 2355, 20907, 1010, 4297, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1008, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 12646, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /** * --------------------------------------------------------------------- * GLPI - Gestionnaire Libre de Parc Informatique * Copyright (C) 2015-2021 Teclib' and contributors. * * http://glpi-project.org * * based on GLPI - Gestionnaire Libre de Parc Informatique * Copyright (C) 2003-2014 by the INDEPNET Development Team. * * --------------------------------------------------------------------- * * LICENSE * * This file is part of GLPI. * * GLPI is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * GLPI is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with GLPI. If not, see <http://www.gnu.org/licenses/>. * --------------------------------------------------------------------- */ /** * @since 0.85 */ include ('../inc/includes.php'); header("Content-Type: text/html; charset=UTF-8"); Html::header_nocache(); Session::checkCentralAccess(); // Make a select box if ($_POST['items_id'] && $_POST['itemtype'] && class_exists($_POST['itemtype'])) { $devicetype = $_POST['itemtype']; $linktype = $devicetype::getItem_DeviceType(); if (count($linktype::getSpecificities())) { $keys = array_keys($linktype::getSpecificities()); array_walk($keys, function (&$val) use ($DB) { return $DB->quoteName($val); }); $name_field = new QueryExpression( "CONCAT_WS(' - ', " . implode(', ', $keys) . ")" . "AS ".$DB->quoteName("name") ); } else { $name_field = 'id AS name'; } $result = $DB->request( [ 'SELECT' => ['id', $name_field], 'FROM' => $linktype::getTable(), 'WHERE' => [ $devicetype::getForeignKeyField() => $_POST['items_id'], 'itemtype' => '', ] ] ); echo "<table width='100%'><tr><td>" . __('Choose an existing device') . "</td><td rowspan='2'>" . __('and/or') . "</td><td>" . __('Add new devices') . '</td></tr>'; echo "<tr><td>"; if ($result->count() == 0) { echo __('No unaffected device !'); } else { $devices = []; foreach ($result as $row) { $name = $row['name']; if (empty($name)) { $name = $row['id']; } $devices[$row['id']] = $name; } Dropdown::showFromArray($linktype::getForeignKeyField(), $devices, ['multiple' => true]); } echo "</td><td>"; Dropdown::showNumber('new_devices', ['min' => 0, 'max' => 10]); echo "</td></tr></table>"; }
smartcitiescommunity/Civikmind
ajax/selectUnaffectedOrNewItem_Device.php
PHP
gpl-2.0
2,921
[ 30522, 1026, 1029, 25718, 1013, 1008, 1008, 1008, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 1011, 10...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <HTML> <HEAD> <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <META name="GENERATOR" content="hevea 1.10"> <LINK rel="stylesheet" type="text/css" href="cascmd_fr.css"> <TITLE>Création et modification par affectation</TITLE> </HEAD> <BODY > <A HREF="cascmd_fr562.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A> <A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A> <A HREF="cascmd_fr564.html"><IMG SRC="next_motif.gif" ALT="Next"></A> <HR> <H3 CLASS="subsection"><A NAME="htoc669">6.47.1</A>  Création et modification par affectation</H3><P> On peut donner un nom à une matrice par une affectation, par exemple :<BR> <TT>A:=[[1,2,6],[3,4,8],[1,0,1]]</TT><BR> On a alors accés : à ses éléments, par exemple <TT>A[0,1]</TT> renvoie <TT>2</TT><BR> à ses lignes, par exemple <TT>A[0]</TT> renvoie <TT>[1,2,6]</TT><BR> à ses colonnes, par exemple <TT>A[0..2,1]</TT> renvoie <TT>[2,4,0]</TT><BR> On peut aussi changer la valeurs d’un de ses éléments, par exemple :<BR> <TT>A[0,1]:=5</TT> Ainsi <TT>A</TT> est la matrice <TT>[[1,5,6],[3,4,8],[1,0,1]]</TT><BR> On a alors accés à des sous-matrices, par exemple :<BR> <TT>A[1..2]</TT> renvoie <TT>[[3,4,8],[1,0,1]]</TT> <TT>A[0..2,1..2]</TT> renvoie <TT>[[2,6],[4,8],[0,1]]</TT> <TT>A[0..1,1..2]</TT> renvoie <TT>[[2,6],[4,8]]</TT></P><HR> <A HREF="cascmd_fr562.html"><IMG SRC="previous_motif.gif" ALT="Previous"></A> <A HREF="index.html"><IMG SRC="contents_motif.gif" ALT="Up"></A> <A HREF="cascmd_fr564.html"><IMG SRC="next_motif.gif" ALT="Next"></A> </BODY> </HTML>
hiplayer/giac
giac/giac-1.2.3/doc/fr/cascmd_fr/cascmd_fr563.html
HTML
gpl-2.0
1,686
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 1014, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/**************************************************************************** * * Copyright 2016 Samsung Electronics All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, * either express or implied. See the License for the specific * language governing permissions and limitations under the License. * ****************************************************************************/ /**************************************************************************** * kernel/sched/sched.h * * Copyright (C) 2007-2014 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * 3. Neither the name NuttX nor the names of its contributors may be * used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ****************************************************************************/ #ifndef __SCHED_SCHED_SCHED_H #define __SCHED_SCHED_SCHED_H /**************************************************************************** * Included Files ****************************************************************************/ #include <tinyara/config.h> #include <sys/types.h> #include <stdbool.h> #include <queue.h> #include <sched.h> #ifdef CONFIG_SCHED_CPULOAD #include <tinyara/clock.h> #endif #include <tinyara/kmalloc.h> /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ /* Although task IDs can take the (positive, non-zero) * range of pid_t, the number of tasks that will be supported * at any one time is (artificially) limited by the CONFIG_MAX_TASKS * configuration setting. Limiting the number of tasks speeds certain * OS functions (this is the only limitation in the number of * tasks built into the design). */ #if CONFIG_MAX_TASKS & (CONFIG_MAX_TASKS - 1) #error "Max number of tasks(CONFIG_MAX_TASKS) should be power of 2" #endif /* These are macros to access the current CPU and the current task on a CPU. * These macros are intended to support a future SMP implementation. */ #define current_task(cpu) ((FAR struct tcb_s *)g_readytorun.head) #define this_cpu() (0) #define this_task() (current_task(this_cpu())) /**************************************************************************** * Public Type Definitions ****************************************************************************/ /* This structure defines the format of the hash table that is used to (1) * determine if a task ID is unique, and (2) to map a process ID to its * corresponding TCB. * * NOTE also that CPU load measurement data is retained in his table vs. in * the TCB which would seem to be the more logic place. It is place in the * hash table, instead, to facilitate CPU load adjustments on all threads * during timer interrupt handling. sched_foreach() could do this too, but * this would require a little more overhead. */ struct pidhash_s { FAR struct tcb_s *tcb; /* TCB assigned to this PID */ pid_t pid; /* The full PID value */ #ifdef CONFIG_SCHED_CPULOAD uint32_t ticks[SCHED_NCPULOAD]; /* Number of ticks on this thread */ #endif }; /* This structure defines an element of the g_tasklisttable[]. * This table is used to map a task_state enumeration to the * corresponding task list. */ struct tasklist_s { DSEG volatile dq_queue_t *list; /* Pointer to the task list */ bool prioritized; /* true if the list is prioritized */ }; /**************************************************************************** * Global Variables ****************************************************************************/ /* Declared in os_start.c ***************************************************/ /* The state of a task is indicated both by the task_state field of the TCB * and by a series of task lists. All of these tasks lists are declared * below. Although it is not always necessary, most of these lists are * prioritized so that common list handling logic can be used (only the * g_readytorun, the g_pendingtasks, and the g_waitingforsemaphore lists need * to be prioritized). */ /* This is the list of all tasks that are ready to run. The head of this * list is the currently active task; the tail of this list is always the * IDLE task. */ extern volatile dq_queue_t g_readytorun; /* This is the list of all tasks that are ready-to-run, but cannot be placed * in the g_readytorun list because: (1) They are higher priority than the * currently active task at the head of the g_readytorun list, and (2) the * currently active task has disabled pre-emption. */ extern volatile dq_queue_t g_pendingtasks; /* This is the list of all tasks that are blocked waiting for a semaphore */ extern volatile dq_queue_t g_waitingforsemaphore; /* This is the list of all tasks that are blocked waiting for a signal */ #ifndef CONFIG_DISABLE_SIGNALS extern volatile dq_queue_t g_waitingforsignal; #endif /* This is the list of all tasks that are blocked waiting for a message * queue to become non-empty. */ #ifndef CONFIG_DISABLE_MQUEUE extern volatile dq_queue_t g_waitingformqnotempty; #endif /* This is the list of all tasks that are blocked waiting for a message * queue to become non-full. */ #ifndef CONFIG_DISABLE_MQUEUE extern volatile dq_queue_t g_waitingformqnotfull; #endif /* This is the list of all tasks that are blocking waiting for a page fill */ #ifdef CONFIG_PAGING extern volatile dq_queue_t g_waitingforfill; #endif /* This the list of all tasks that have been initialized, but not yet * activated. NOTE: This is the only list that is not prioritized. */ extern volatile dq_queue_t g_inactivetasks; /* This gives number of alive tasks at any point of time in the system. * If the system is already running CONFIG_MAX_TASKS, Creating new * task is not supported. */ extern volatile uint8_t g_alive_taskcount; /* These are lists of dayed memory deallocations that need to be handled * within the IDLE loop or worker thread. These deallocations get queued * by sched_kufree and sched_kfree() if the OS needs to deallocate memory * while it is within an interrupt handler. */ extern volatile sq_queue_t g_delayed_kufree; #if (defined(CONFIG_BUILD_PROTECTED) || defined(CONFIG_BUILD_KERNEL)) && \ defined(CONFIG_MM_KERNEL_HEAP) extern volatile sq_queue_t g_delayed_kfree; #endif /* This is the value of the last process ID assigned to a task */ extern volatile pid_t g_lastpid; /* The following hash table is used for two things: * * 1. This hash table greatly speeds the determination of a new unique * process ID for a task, and * 2. Is used to quickly map a process ID into a TCB. * * It has the side effects of using more memory and limiting the number * of tasks to CONFIG_MAX_TASKS. */ extern struct pidhash_s g_pidhash[CONFIG_MAX_TASKS]; /* This is a table of task lists. This table is indexed by the task state * enumeration type (tstate_t) and provides a pointer to the associated * static task list (if there is one) as well as a boolean indication as to * if the list is an ordered list or not. */ extern const struct tasklist_s g_tasklisttable[NUM_TASK_STATES]; #ifdef CONFIG_SCHED_CPULOAD /* This is the total number of clock tick counts. Essentially the * 'denominator' for all CPU load calculations. */ extern volatile uint32_t g_cpuload_total[SCHED_NCPULOAD]; #endif /**************************************************************************** * Public Function Prototypes ****************************************************************************/ bool sched_addreadytorun(FAR struct tcb_s *rtrtcb); bool sched_removereadytorun(FAR struct tcb_s *rtrtcb); bool sched_addprioritized(FAR struct tcb_s *newTcb, DSEG dq_queue_t *list); bool sched_mergepending(void); void sched_addblocked(FAR struct tcb_s *btcb, tstate_t task_state); void sched_removeblocked(FAR struct tcb_s *btcb); int sched_setpriority(FAR struct tcb_s *tcb, int sched_priority); #ifdef CONFIG_PRIORITY_INHERITANCE int sched_reprioritize(FAR struct tcb_s *tcb, int sched_priority); #else #define sched_reprioritize(tcb, sched_priority) \ sched_setpriority(tcb, sched_priority) #endif #ifdef CONFIG_SCHED_TICKLESS unsigned int sched_timer_cancel(void); void sched_timer_resume(void); void sched_timer_reassess(void); #else #define sched_timer_cancel() (0) #define sched_timer_resume() #define sched_timer_reassess() #endif #if defined(CONFIG_SCHED_CPULOAD) && !defined(CONFIG_SCHED_CPULOAD_EXTCLK) void weak_function sched_process_cpuload(void); #endif bool sched_verifytcb(FAR struct tcb_s *tcb); int sched_releasetcb(FAR struct tcb_s *tcb, uint8_t ttype); #endif /* __SCHED_SCHED_SCHED_H */
JeonginKim/TizenRT
os/kernel/sched/sched.h
C
apache-2.0
10,483
[ 30522, 1013, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 1008, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!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.5.0_06) on Thu Jan 18 11:09:03 CET 2007 --> <META http-equiv="Content-Type" content="text/html; charset=windows-1252"> <TITLE> Framework </TITLE> <META NAME="keywords" CONTENT="nl.tue.teamwork.appl.framework.Framework class"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { parent.document.title="Framework"; } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <!-- ========= 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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</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 CLASS&nbsp; &nbsp;NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?nl/tue/teamwork/appl/framework/Framework.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="Framework.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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> nl.tue.teamwork.appl.framework</FONT> <BR> Class Framework</H2> <PRE> java.lang.Object <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>nl.tue.teamwork.appl.framework.Framework</B> </PRE> <HR> <DL> <DT><PRE>public class <B>Framework</B><DT>extends java.lang.Object</DL> </PRE> <P> <HR> <P> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../nl/tue/teamwork/appl/framework/Framework.html#Framework()">Framework</A></B>()</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp; <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static&nbsp;void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../nl/tue/teamwork/appl/framework/Framework.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE> <BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD> </TR> </TABLE> &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD> </TR> </TABLE> &nbsp; <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="Framework()"><!-- --></A><H3> Framework</H3> <PRE> public <B>Framework</B>()</PRE> <DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="main(java.lang.String[])"><!-- --></A><H3> main</H3> <PRE> public static void <B>main</B>(java.lang.String[]&nbsp;args)</PRE> <DL> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <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="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</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 CLASS&nbsp; &nbsp;NEXT CLASS</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?nl/tue/teamwork/appl/framework/Framework.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="Framework.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> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
ijlalhussain/LogGenerator
DeclareDesigner/doc/nl/tue/teamwork/appl/framework/Framework.html
HTML
gpl-3.0
9,129
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 16129, 1018, 1012, 5890, 17459, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, 8917, 1013, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// +build !windows package iso import ( "context" "fmt" "reflect" "strconv" "testing" "github.com/hashicorp/packer-plugin-sdk/common" "github.com/hashicorp/packer-plugin-sdk/multistep" packersdk "github.com/hashicorp/packer-plugin-sdk/packer" hypervcommon "github.com/hashicorp/packer/builder/hyperv/common" ) func testConfig() map[string]interface{} { return map[string]interface{}{ "iso_checksum": "md5:0B0F137F17AC10944716020B018F8126", "iso_url": "http://www.packer.io", "shutdown_command": "yes", "ssh_username": "foo", "memory": 64, "disk_size": 256, "disk_block_size": 1, "guest_additions_mode": "none", "disk_additional_size": "50000,40000,30000", common.BuildNameConfigKey: "foo", } } func TestBuilder_ImplementsBuilder(t *testing.T) { var raw interface{} raw = &Builder{} if _, ok := raw.(packersdk.Builder); !ok { t.Error("Builder must implement builder.") } } func TestBuilderPrepare_Defaults(t *testing.T) { var b Builder config := testConfig() _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } if b.config.VMName != "packer-foo" { t.Errorf("bad vm name: %s", b.config.VMName) } } func TestBuilderPrepare_DiskSize(t *testing.T) { var b Builder config := testConfig() delete(config, "disk_size") _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("bad err: %s", err) } if b.config.DiskSize != 40*1024 { t.Fatalf("bad size: %d", b.config.DiskSize) } config["disk_size"] = 256 b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } if b.config.DiskSize != 256 { t.Fatalf("bad size: %d", b.config.DiskSize) } } func TestBuilderPrepare_DiskBlockSize(t *testing.T) { var b Builder config := testConfig() expected_default_block_size := uint(32) expected_min_block_size := uint(0) expected_max_block_size := uint(256) // Test default with empty disk_block_size delete(config, "disk_block_size") _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("bad err: %s", err) } if b.config.DiskBlockSize != expected_default_block_size { t.Fatalf("bad default block size with empty config: %d. Expected %d", b.config.DiskBlockSize, expected_default_block_size) } test_sizes := []uint{0, 1, 32, 256, 512, 1 * 1024, 32 * 1024} for _, test_size := range test_sizes { config["disk_block_size"] = test_size b = Builder{} _, warns, err = b.Prepare(config) if test_size > expected_max_block_size || test_size < expected_min_block_size { if len(warns) > 0 { t.Fatalf("bad, should have no warns: %#v", warns) } if err == nil { t.Fatalf("bad, should have error. disk_block_size=%d outside expected valid range [%d,%d]", test_size, expected_min_block_size, expected_max_block_size) } } else { if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("bad, should not have error: %s", err) } if test_size == 0 { if b.config.DiskBlockSize != expected_default_block_size { t.Fatalf("bad default block size with 0 value config: %d. Expected: %d", b.config.DiskBlockSize, expected_default_block_size) } } else { if b.config.DiskBlockSize != test_size { t.Fatalf("bad block size with 0 value config: %d. Expected: %d", b.config.DiskBlockSize, expected_default_block_size) } } } } } func TestBuilderPrepare_FixedVHDFormat(t *testing.T) { var b Builder config := testConfig() config["use_fixed_vhd_format"] = true config["generation"] = 1 config["skip_compaction"] = true config["differencing_disk"] = false // use_fixed_vhd_format should work with generation = 1, skip_compaction // = true, and differencing_disk = false _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("bad err: %s", err) } //use_fixed_vhd_format should not work with differencing_disk = true config["differencing_disk"] = true b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } config["differencing_disk"] = false //use_fixed_vhd_format should not work with skip_compaction = false config["skip_compaction"] = false b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } config["skip_compaction"] = true //use_fixed_vhd_format should not work with generation = 2 config["generation"] = 2 b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } } func TestBuilderPrepare_FloppyFiles(t *testing.T) { var b Builder config := testConfig() delete(config, "floppy_files") _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("bad err: %s", err) } if len(b.config.FloppyFiles) != 0 { t.Fatalf("bad: %#v", b.config.FloppyFiles) } floppiesPath := "../../test-fixtures/floppies" config["floppy_files"] = []string{fmt.Sprintf("%s/bar.bat", floppiesPath), fmt.Sprintf("%s/foo.ps1", floppiesPath)} b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } expected := []string{fmt.Sprintf("%s/bar.bat", floppiesPath), fmt.Sprintf("%s/foo.ps1", floppiesPath)} if !reflect.DeepEqual(b.config.FloppyFiles, expected) { t.Fatalf("bad: %#v", b.config.FloppyFiles) } } func TestBuilderPrepare_InvalidFloppies(t *testing.T) { var b Builder config := testConfig() config["floppy_files"] = []string{"nonexistent.bat", "nonexistent.ps1"} b = Builder{} _, _, errs := b.Prepare(config) if errs == nil { t.Fatalf("Nonexistent floppies should trigger multierror") } if len(errs.(*packersdk.MultiError).Errors) != 2 { t.Fatalf("Multierror should work and report 2 errors") } } func TestBuilderPrepare_InvalidKey(t *testing.T) { var b Builder config := testConfig() // Add a random key config["i_should_not_be_valid"] = true _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } } func TestBuilderPrepare_ISOChecksum(t *testing.T) { var b Builder config := testConfig() // Test bad config["iso_checksum"] = "" _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } // Test invalid checksum config["iso_checksum"] = "FOo" _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } // Test good config["iso_checksum"] = "md5:0B0F137F17AC10944716020B018F8126" b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } } func TestBuilderPrepare_ISOChecksumType(t *testing.T) { var b Builder config := testConfig() config["iso_checksum"] = "0B0F137F17AC10944716020B018F8126" _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } // Test good config["iso_checksum"] = "mD5:0B0F137F17AC10944716020B018F8126" b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } // Test unknown config["iso_checksum"] = "fake:foo" b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Log("should error in prepare but go-getter doesn't let us validate yet. This will fail before dl.") } // Test none config["iso_checksum"] = "none" b = Builder{} _, warns, err = b.Prepare(config) if len(warns) == 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } } func TestBuilderPrepare_ISOUrl(t *testing.T) { var b Builder config := testConfig() delete(config, "iso_url") delete(config, "iso_urls") // Test both empty config["iso_url"] = "" b = Builder{} _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } // Test iso_url set config["iso_url"] = "http://www.packer.io" b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Errorf("should not have error: %s", err) } expected := []string{"http://www.packer.io"} if !reflect.DeepEqual(b.config.ISOUrls, expected) { t.Fatalf("bad: %#v", b.config.ISOUrls) } // Test both set config["iso_url"] = "http://www.packer.io" config["iso_urls"] = []string{"http://www.packer.io"} b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } // Test just iso_urls set delete(config, "iso_url") config["iso_urls"] = []string{ "http://www.packer.io", "http://www.hashicorp.com", } b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Errorf("should not have error: %s", err) } expected = []string{ "http://www.packer.io", "http://www.hashicorp.com", } if !reflect.DeepEqual(b.config.ISOUrls, expected) { t.Fatalf("bad: %#v", b.config.ISOUrls) } } func TestBuilderPrepare_SizeNotRequiredWhenUsingExistingHarddrive(t *testing.T) { var b Builder config := testConfig() delete(config, "iso_url") delete(config, "iso_urls") delete(config, "disk_size") config["disk_size"] = 1 // Test just iso_urls set but with vhdx delete(config, "iso_url") config["iso_urls"] = []string{ "http://www.packer.io/hdd.vhdx", "http://www.hashicorp.com/dvd.iso", } b = Builder{} _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Errorf("should not have error: %s", err) } expected := []string{ "http://www.packer.io/hdd.vhdx", "http://www.hashicorp.com/dvd.iso", } if !reflect.DeepEqual(b.config.ISOUrls, expected) { t.Fatalf("bad: %#v", b.config.ISOUrls) } // Test just iso_urls set but with vhd delete(config, "iso_url") config["iso_urls"] = []string{ "http://www.packer.io/hdd.vhd", "http://www.hashicorp.com/dvd.iso", } b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Errorf("should not have error: %s", err) } expected = []string{ "http://www.packer.io/hdd.vhd", "http://www.hashicorp.com/dvd.iso", } if !reflect.DeepEqual(b.config.ISOUrls, expected) { t.Fatalf("bad: %#v", b.config.ISOUrls) } } func TestBuilderPrepare_SizeIsRequiredWhenNotUsingExistingHarddrive(t *testing.T) { var b Builder config := testConfig() delete(config, "iso_url") delete(config, "iso_urls") delete(config, "disk_size") config["disk_size"] = 1 // Test just iso_urls set but with vhdx delete(config, "iso_url") config["iso_urls"] = []string{ "http://www.packer.io/os.iso", "http://www.hashicorp.com/dvd.iso", } b = Builder{} _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Errorf("should have error") } expected := []string{ "http://www.packer.io/os.iso", "http://www.hashicorp.com/dvd.iso", } if !reflect.DeepEqual(b.config.ISOUrls, expected) { t.Fatalf("bad: %#v", b.config.ISOUrls) } } func TestBuilderPrepare_MaximumOfSixtyFourAdditionalDisks(t *testing.T) { var b Builder config := testConfig() disks := make([]string, 65) for i := range disks { disks[i] = strconv.Itoa(i) } config["disk_additional_size"] = disks b = Builder{} _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Errorf("should have error") } } func TestBuilderPrepare_CommConfig(t *testing.T) { // Test Winrm { config := testConfig() config["communicator"] = "winrm" config["winrm_username"] = "username" config["winrm_password"] = "password" config["winrm_host"] = "1.2.3.4" var b Builder _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } if b.config.Comm.WinRMUser != "username" { t.Errorf("bad winrm_username: %s", b.config.Comm.WinRMUser) } if b.config.Comm.WinRMPassword != "password" { t.Errorf("bad winrm_password: %s", b.config.Comm.WinRMPassword) } if host := b.config.Comm.Host(); host != "1.2.3.4" { t.Errorf("bad host: %s", host) } } // Test SSH { config := testConfig() config["communicator"] = "ssh" config["ssh_username"] = "username" config["ssh_password"] = "password" config["ssh_host"] = "1.2.3.4" var b Builder _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } if b.config.Comm.SSHUsername != "username" { t.Errorf("bad ssh_username: %s", b.config.Comm.SSHUsername) } if b.config.Comm.SSHPassword != "password" { t.Errorf("bad ssh_password: %s", b.config.Comm.SSHPassword) } if host := b.config.Comm.Host(); host != "1.2.3.4" { t.Errorf("bad host: %s", host) } } } func TestUserVariablesInBootCommand(t *testing.T) { var b Builder config := testConfig() config[common.UserVariablesConfigKey] = map[string]string{"test-variable": "test"} config["boot_command"] = []string{"blah {{user `test-variable`}} blah"} _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Fatalf("should not have error: %s", err) } ui := packersdk.TestUi(t) hook := &packersdk.MockHook{} driver := &hypervcommon.DriverMock{} // Set up the state. state := new(multistep.BasicStateBag) state.Put("config", &b.config) state.Put("driver", driver) state.Put("hook", hook) state.Put("http_port", 0) state.Put("http_ip", "0.0.0.0") state.Put("ui", ui) state.Put("vmName", "packer-foo") step := &hypervcommon.StepTypeBootCommand{ BootCommand: b.config.FlatBootCommand(), SwitchName: b.config.SwitchName, Ctx: b.config.ctx, } ret := step.Run(context.Background(), state) if ret != multistep.ActionContinue { t.Fatalf("should not have error: %#v", ret) } } func TestBuilderPrepare_UseLegacyNetworkAdapter(t *testing.T) { var b Builder config := testConfig() // should be allowed for default config config["use_legacy_network_adapter"] = true b = Builder{} _, warns, err := b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err != nil { t.Errorf("should not have error: %s", err) } // should not be allowed for gen 2 config["generation"] = 2 b = Builder{} _, warns, err = b.Prepare(config) if len(warns) > 0 { t.Fatalf("bad: %#v", warns) } if err == nil { t.Fatal("should have error") } }
ricardclau/packer
builder/hyperv/iso/builder_test.go
GO
mpl-2.0
15,503
[ 30522, 1013, 1013, 1009, 3857, 999, 3645, 7427, 11163, 12324, 1006, 1000, 6123, 1000, 1000, 4718, 2102, 1000, 1000, 8339, 1000, 1000, 2358, 29566, 2078, 2615, 1000, 1000, 5604, 1000, 1000, 21025, 2705, 12083, 1012, 4012, 1013, 23325, 11261,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Buras | Admin</title> <!-- Bootstrap Core CSS --> <link href="<?=base_url('assets/admin/vendor/bootstrap/css/bootstrap.css')?>" rel="stylesheet"> <!-- MetisMenu CSS --> <link href="<?=base_url('assets/admin/vendor/metisMenu/metisMenu.min.css')?>" rel="stylesheet"> <!-- Social Buttons CSS --> <link href="<?=base_url('assets/admin/vendor/bootstrap-social/bootstrap-social.css')?>" rel="stylesheet"> <!-- Custom CSS --> <link href="<?=base_url('assets/admin/dist/css/sb-admin-2.css')?>" rel="stylesheet"> <!-- Morris Charts CSS --> <link href="<?=base_url('assets/admin/vendor/morrisjs/morris.css')?>" rel="stylesheet"> <!-- Custom Fonts --> <link href="<?=base_url('assets/admin/vendor/font-awesome/css/font-awesome.min.css')?>" rel="stylesheet" type="text/css"> <!-- DataTables CSS --> <link href="<?=base_url('assets/admin/vendor/datatables-plugins/dataTables.bootstrap.css')?>" rel="stylesheet"> <!-- DataTables Responsive CSS --> <link href="<?=base_url('assets/admin/vendor/datatables-responsive/dataTables.responsive.css')?>" rel="stylesheet"> <!-- 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/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="row"> <div class="col-md-4 col-md-offset-4"> <div class="login-panel panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Admin Login</h3> </div> <div class="panel-body"> <form id="" class="" role="form" action="<?=base_url('admin/Login/check')?>" method="post"> <fieldset> <div class="form-group"> <input class="form-control" placeholder="ID" name="user_id" type="text" autofocus required> </div> <div class="form-group"> <input class="form-control" placeholder="password" name="user_password" type="password" value="" required> </div> <!-- Remember me --> <!-- <div class="checkbox"> <label> <input name="remember" type="checkbox" value="Remember Me">Remember Me </label> </div> --> <!-- Change this to a button or input when using this as a form --> <button type="submit" class="btn btn-lg btn-success btn-block">로그인</a> </fieldset> </form> </div> </div> </div> </div>
devhwi/CI_Buras
application/views/admin/login.php
PHP
mit
2,939
[ 30522, 1026, 999, 9986, 13874, 16129, 1028, 1026, 16129, 1028, 1026, 2132, 1028, 1026, 18804, 25869, 13462, 1027, 1000, 21183, 2546, 1011, 1022, 1000, 1028, 1026, 18804, 8299, 1011, 1041, 15549, 2615, 1027, 1000, 1060, 1011, 25423, 1011, 11...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright 2017-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.medialive.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** * The settings for a PULL type input. * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/medialive-2017-10-14/InputSource" target="_top">AWS API * Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InputSource implements Serializable, Cloneable, StructuredPojo { /** The key used to extract the password from EC2 Parameter store. */ private String passwordParam; /** * This represents the customer's source URL where stream is pulled from. */ private String url; /** The username for the input source. */ private String username; /** * The key used to extract the password from EC2 Parameter store. * * @param passwordParam * The key used to extract the password from EC2 Parameter store. */ public void setPasswordParam(String passwordParam) { this.passwordParam = passwordParam; } /** * The key used to extract the password from EC2 Parameter store. * * @return The key used to extract the password from EC2 Parameter store. */ public String getPasswordParam() { return this.passwordParam; } /** * The key used to extract the password from EC2 Parameter store. * * @param passwordParam * The key used to extract the password from EC2 Parameter store. * @return Returns a reference to this object so that method calls can be chained together. */ public InputSource withPasswordParam(String passwordParam) { setPasswordParam(passwordParam); return this; } /** * This represents the customer's source URL where stream is pulled from. * * @param url * This represents the customer's source URL where stream is pulled from. */ public void setUrl(String url) { this.url = url; } /** * This represents the customer's source URL where stream is pulled from. * * @return This represents the customer's source URL where stream is pulled from. */ public String getUrl() { return this.url; } /** * This represents the customer's source URL where stream is pulled from. * * @param url * This represents the customer's source URL where stream is pulled from. * @return Returns a reference to this object so that method calls can be chained together. */ public InputSource withUrl(String url) { setUrl(url); return this; } /** * The username for the input source. * * @param username * The username for the input source. */ public void setUsername(String username) { this.username = username; } /** * The username for the input source. * * @return The username for the input source. */ public String getUsername() { return this.username; } /** * The username for the input source. * * @param username * The username for the input source. * @return Returns a reference to this object so that method calls can be chained together. */ public InputSource withUsername(String username) { setUsername(username); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getPasswordParam() != null) sb.append("PasswordParam: ").append(getPasswordParam()).append(","); if (getUrl() != null) sb.append("Url: ").append(getUrl()).append(","); if (getUsername() != null) sb.append("Username: ").append(getUsername()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InputSource == false) return false; InputSource other = (InputSource) obj; if (other.getPasswordParam() == null ^ this.getPasswordParam() == null) return false; if (other.getPasswordParam() != null && other.getPasswordParam().equals(this.getPasswordParam()) == false) return false; if (other.getUrl() == null ^ this.getUrl() == null) return false; if (other.getUrl() != null && other.getUrl().equals(this.getUrl()) == false) return false; if (other.getUsername() == null ^ this.getUsername() == null) return false; if (other.getUsername() != null && other.getUsername().equals(this.getUsername()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPasswordParam() == null) ? 0 : getPasswordParam().hashCode()); hashCode = prime * hashCode + ((getUrl() == null) ? 0 : getUrl().hashCode()); hashCode = prime * hashCode + ((getUsername() == null) ? 0 : getUsername().hashCode()); return hashCode; } @Override public InputSource clone() { try { return (InputSource) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.medialive.model.transform.InputSourceMarshaller.getInstance().marshall(this, protocolMarshaller); } }
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/InputSource.java
Java
apache-2.0
6,848
[ 30522, 1013, 1008, 1008, 9385, 2418, 1011, 16798, 2475, 9733, 1012, 4012, 1010, 4297, 1012, 2030, 2049, 18460, 1012, 2035, 2916, 9235, 1012, 1008, 1008, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
using System; using System.Collections.Generic; using System.Drawing; using System.Globalization; using System.IO; using System.Windows; using System.Windows.Data; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Runtime.InteropServices; namespace Wox { public class ImagePathConverter : IMultiValueConverter { private static Dictionary<string, object> imageCache = new Dictionary<string, object>(); private static ImageSource GetIcon(string fileName) { Icon icon = GetFileIcon(fileName); if (icon == null) icon = Icon.ExtractAssociatedIcon(fileName); if (icon != null) { return System.Windows.Interop.Imaging.CreateBitmapSourceFromHIcon(icon.Handle, new Int32Rect(0, 0, icon.Width, icon.Height), BitmapSizeOptions.FromEmptyOptions()); } return null; } public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture) { object img = null; if (values[0] == null) return null; string path = values[0].ToString(); string pluginDirectory = values[1].ToString(); string fullPath = Path.Combine(pluginDirectory, path); if (imageCache.ContainsKey(fullPath)) { return imageCache[fullPath]; } string resolvedPath = string.Empty; if (!string.IsNullOrEmpty(path) && path.Contains(":\\") && File.Exists(path)) { resolvedPath = path; } else if (!string.IsNullOrEmpty(path) && File.Exists(fullPath)) { resolvedPath = fullPath; } if (resolvedPath.ToLower().EndsWith(".exe") || resolvedPath.ToLower().EndsWith(".lnk")) { img = GetIcon(resolvedPath); } else if (!string.IsNullOrEmpty(resolvedPath) && File.Exists(resolvedPath)) { img = new BitmapImage(new Uri(resolvedPath)); } if (img != null) { imageCache.Add(fullPath, img); } return img; } public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture) { return null; } // http://blogs.msdn.com/b/oldnewthing/archive/2011/01/27/10120844.aspx public static System.Drawing.Icon GetFileIcon(string name) { SHFILEINFO shfi = new SHFILEINFO(); uint flags = SHGFI_SYSICONINDEX; IntPtr himl = SHGetFileInfo(name, FILE_ATTRIBUTE_NORMAL, ref shfi, (uint)System.Runtime.InteropServices.Marshal.SizeOf(shfi), flags); if (himl != IntPtr.Zero) { IntPtr hIcon = ImageList_GetIcon(himl, shfi.iIcon, ILD_NORMAL); System.Drawing.Icon icon = (System.Drawing.Icon)System.Drawing.Icon.FromHandle(hIcon).Clone(); DestroyIcon(hIcon); return icon; } return null; } [DllImport("comctl32.dll", SetLastError = true)] private static extern IntPtr ImageList_GetIcon(IntPtr himl, int i, uint flags); private const int MAX_PATH = 256; [StructLayout(LayoutKind.Sequential)] private struct SHITEMID { public ushort cb; [MarshalAs(UnmanagedType.LPArray)] public byte[] abID; } [StructLayout(LayoutKind.Sequential)] private struct ITEMIDLIST { public SHITEMID mkid; } [StructLayout(LayoutKind.Sequential)] private struct BROWSEINFO { public IntPtr hwndOwner; public IntPtr pidlRoot; public IntPtr pszDisplayName; [MarshalAs(UnmanagedType.LPTStr)] public string lpszTitle; public uint ulFlags; public IntPtr lpfn; public int lParam; public IntPtr iImage; } // Browsing for directory. private const uint BIF_RETURNONLYFSDIRS = 0x0001; private const uint BIF_DONTGOBELOWDOMAIN = 0x0002; private const uint BIF_STATUSTEXT = 0x0004; private const uint BIF_RETURNFSANCESTORS = 0x0008; private const uint BIF_EDITBOX = 0x0010; private const uint BIF_VALIDATE = 0x0020; private const uint BIF_NEWDIALOGSTYLE = 0x0040; private const uint BIF_USENEWUI = (BIF_NEWDIALOGSTYLE | BIF_EDITBOX); private const uint BIF_BROWSEINCLUDEURLS = 0x0080; private const uint BIF_BROWSEFORCOMPUTER = 0x1000; private const uint BIF_BROWSEFORPRINTER = 0x2000; private const uint BIF_BROWSEINCLUDEFILES = 0x4000; private const uint BIF_SHAREABLE = 0x8000; [StructLayout(LayoutKind.Sequential)] private struct SHFILEINFO { public const int NAMESIZE = 80; public IntPtr hIcon; public int iIcon; public uint dwAttributes; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = MAX_PATH)] public string szDisplayName; [MarshalAs(UnmanagedType.ByValTStr, SizeConst = NAMESIZE)] public string szTypeName; }; private const uint SHGFI_ICON = 0x000000100; // get icon private const uint SHGFI_DISPLAYNAME = 0x000000200; // get display name private const uint SHGFI_TYPENAME = 0x000000400; // get type name private const uint SHGFI_ATTRIBUTES = 0x000000800; // get attributes private const uint SHGFI_ICONLOCATION = 0x000001000; // get icon location private const uint SHGFI_EXETYPE = 0x000002000; // return exe type private const uint SHGFI_SYSICONINDEX = 0x000004000; // get system icon index private const uint SHGFI_LINKOVERLAY = 0x000008000; // put a link overlay on icon private const uint SHGFI_SELECTED = 0x000010000; // show icon in selected state private const uint SHGFI_ATTR_SPECIFIED = 0x000020000; // get only specified attributes private const uint SHGFI_LARGEICON = 0x000000000; // get large icon private const uint SHGFI_SMALLICON = 0x000000001; // get small icon private const uint SHGFI_OPENICON = 0x000000002; // get open icon private const uint SHGFI_SHELLICONSIZE = 0x000000004; // get shell size icon private const uint SHGFI_PIDL = 0x000000008; // pszPath is a pidl private const uint SHGFI_USEFILEATTRIBUTES = 0x000000010; // use passed dwFileAttribute private const uint SHGFI_ADDOVERLAYS = 0x000000020; // apply the appropriate overlays private const uint SHGFI_OVERLAYINDEX = 0x000000040; // Get the index of the overlay private const uint FILE_ATTRIBUTE_DIRECTORY = 0x00000010; private const uint FILE_ATTRIBUTE_NORMAL = 0x00000080; private const uint ILD_NORMAL = 0x00000000; [DllImport("Shell32.dll")] private static extern IntPtr SHGetFileInfo( string pszPath, uint dwFileAttributes, ref SHFILEINFO psfi, uint cbFileInfo, uint uFlags ); [DllImport("User32.dll")] private static extern int DestroyIcon(IntPtr hIcon); } }
Rovak/Wox
Wox/ImagePathConverter.cs
C#
mit
7,522
[ 30522, 2478, 2291, 1025, 2478, 2291, 1012, 6407, 1012, 12391, 1025, 2478, 2291, 1012, 5059, 1025, 2478, 2291, 1012, 24370, 1025, 2478, 2291, 1012, 22834, 1025, 2478, 2291, 1012, 3645, 1025, 2478, 2291, 1012, 3645, 1012, 2951, 1025, 2478, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package opennlp.tools.doccat; import java.util.Collection; import java.util.LinkedList; import java.util.Map; /** * Context generator for document categorizer */ class DocumentCategorizerContextGenerator { private FeatureGenerator[] mFeatureGenerators; DocumentCategorizerContextGenerator(FeatureGenerator... featureGenerators) { mFeatureGenerators = featureGenerators; } public String[] getContext(String[] text, Map<String, Object> extraInformation) { Collection<String> context = new LinkedList<>(); for (FeatureGenerator mFeatureGenerator : mFeatureGenerators) { Collection<String> extractedFeatures = mFeatureGenerator.extractFeatures(text, extraInformation); context.addAll(extractedFeatures); } return context.toArray(new String[context.size()]); } }
manjeetk09/GoogleScrapper
opennlp/tools/doccat/DocumentCategorizerContextGenerator.java
Java
gpl-2.0
1,622
[ 30522, 1013, 1008, 1008, 7000, 2000, 1996, 15895, 4007, 3192, 1006, 2004, 2546, 1007, 2104, 2028, 2030, 2062, 1008, 12130, 6105, 10540, 1012, 2156, 1996, 5060, 5371, 5500, 2007, 1008, 2023, 2147, 2005, 3176, 2592, 4953, 9385, 6095, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<html lang="en"> <head> <title>Config Names - Debugging with GDB</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Debugging with GDB"> <meta name="generator" content="makeinfo 4.8"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Installing-GDB.html#Installing-GDB" title="Installing GDB"> <link rel="prev" href="Separate-Objdir.html#Separate-Objdir" title="Separate Objdir"> <link rel="next" href="Configure-Options.html#Configure-Options" title="Configure Options"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <!-- Copyright (C) 1988-2017 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being ``Free Software'' and ``Free Software Needs Free Documentation'', with the Front-Cover Texts being ``A GNU Manual,'' and with the Back-Cover Texts as in (a) below. (a) The FSF's Back-Cover Text is: ``You are free to copy and modify this GNU Manual. Buying copies from GNU Press supports the FSF in developing GNU and promoting software freedom.'' --> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="Config-Names"></a> Next:&nbsp;<a rel="next" accesskey="n" href="Configure-Options.html#Configure-Options">Configure Options</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="Separate-Objdir.html#Separate-Objdir">Separate Objdir</a>, Up:&nbsp;<a rel="up" accesskey="u" href="Installing-GDB.html#Installing-GDB">Installing GDB</a> <hr> </div> <h3 class="section">C.4 Specifying Names for Hosts and Targets</h3> <p>The specifications used for hosts and targets in the <samp><span class="file">configure</span></samp> script are based on a three-part naming scheme, but some short predefined aliases are also supported. The full naming scheme encodes three pieces of information in the following pattern: <pre class="smallexample"> <var>architecture</var>-<var>vendor</var>-<var>os</var> </pre> <p>For example, you can use the alias <code>sun4</code> as a <var>host</var> argument, or as the value for <var>target</var> in a <code>--target=</code><var>target</var> option. The equivalent full name is `<samp><span class="samp">sparc-sun-sunos4</span></samp>'. <p>The <samp><span class="file">configure</span></samp> script accompanying <span class="sc">gdb</span> does not provide any query facility to list all supported host and target names or aliases. <samp><span class="file">configure</span></samp> calls the Bourne shell script <code>config.sub</code> to map abbreviations to full names; you can read the script, if you wish, or you can use it to test your guesses on abbreviations&mdash;for example: <pre class="smallexample"> % sh config.sub i386-linux i386-pc-linux-gnu % sh config.sub alpha-linux alpha-unknown-linux-gnu % sh config.sub hp9k700 hppa1.1-hp-hpux % sh config.sub sun4 sparc-sun-sunos4.1.1 % sh config.sub sun3 m68k-sun-sunos4.1.1 % sh config.sub i986v Invalid configuration `i986v': machine `i986v' not recognized </pre> <p class="noindent"><code>config.sub</code> is also distributed in the <span class="sc">gdb</span> source directory (<samp><span class="file">gdb-7.12.1.20170215-git</span></samp>, for version 7.12.1.20170215-git). </body></html>
ChangsoonKim/STM32F7DiscTutor
toolchain/osx/gcc-arm-none-eabi-6-2017-q1-update/share/doc/gcc-arm-none-eabi/html/gdb/Config-Names.html
HTML
mit
4,042
[ 30522, 1026, 16129, 11374, 1027, 1000, 4372, 1000, 1028, 1026, 2132, 1028, 1026, 2516, 1028, 9530, 8873, 2290, 3415, 1011, 2139, 8569, 12588, 2007, 1043, 18939, 1026, 1013, 2516, 1028, 1026, 18804, 8299, 1011, 1041, 15549, 2615, 1027, 1000,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
// This file was procedurally generated from the following sources: // - src/dstr-binding/ary-ptrn-elem-obj-val-undef.case // - src/dstr-binding/error/cls-expr-meth.template /*--- description: Nested object destructuring with a value of `undefined` (class expression method) esid: sec-class-definitions-runtime-semantics-evaluation es6id: 14.5.16 features: [destructuring-binding] flags: [generated] info: | ClassExpression : class BindingIdentifieropt ClassTail 1. If BindingIdentifieropt is not present, let className be undefined. 2. Else, let className be StringValue of BindingIdentifier. 3. Let value be the result of ClassDefinitionEvaluation of ClassTail with argument className. [...] 14.5.14 Runtime Semantics: ClassDefinitionEvaluation 21. For each ClassElement m in order from methods a. If IsStatic of m is false, then i. Let status be the result of performing PropertyDefinitionEvaluation for m with arguments proto and false. [...] 14.3.8 Runtime Semantics: DefineMethod MethodDefinition : PropertyName ( StrictFormalParameters ) { FunctionBody } [...] 6. Let closure be FunctionCreate(kind, StrictFormalParameters, FunctionBody, scope, strict). If functionPrototype was passed as a parameter then pass its value as the functionPrototype optional argument of FunctionCreate. [...] 9.2.1 [[Call]] ( thisArgument, argumentsList) [...] 7. Let result be OrdinaryCallEvaluateBody(F, argumentsList). [...] 9.2.1.3 OrdinaryCallEvaluateBody ( F, argumentsList ) 1. Let status be FunctionDeclarationInstantiation(F, argumentsList). [...] 9.2.12 FunctionDeclarationInstantiation(func, argumentsList) [...] 23. Let iteratorRecord be Record {[[iterator]]: CreateListIterator(argumentsList), [[done]]: false}. 24. If hasDuplicates is true, then [...] 25. Else, b. Let formalStatus be IteratorBindingInitialization for formals with iteratorRecord and env as arguments. [...] 13.3.3.6 Runtime Semantics: IteratorBindingInitialization BindingElement : BindingPattern Initializeropt 1. If iteratorRecord.[[done]] is false, then [...] e. Else i. Let v be IteratorValue(next). [...] 4. Return the result of performing BindingInitialization of BindingPattern with v and environment as the arguments. 13.3.3.5 Runtime Semantics: BindingInitialization BindingPattern : ObjectBindingPattern 1. Let valid be RequireObjectCoercible(value). 2. ReturnIfAbrupt(valid). ---*/ var C = class { method([{ x }]) {} }; var c = new C(); assert.throws(TypeError, function() { c.method([]); });
sebastienros/jint
Jint.Tests.Test262/test/language/expressions/class/dstr-meth-ary-ptrn-elem-obj-val-undef.js
JavaScript
bsd-2-clause
2,782
[ 30522, 1013, 1013, 2023, 5371, 2001, 24508, 2135, 7013, 2013, 1996, 2206, 4216, 1024, 1013, 1013, 1011, 5034, 2278, 1013, 16233, 16344, 1011, 8031, 1013, 12098, 2100, 1011, 13866, 6826, 1011, 3449, 6633, 1011, 27885, 3501, 1011, 11748, 1011...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- layout: post title: "ASP.NET Core基本原理(7)-日志" subtitle: "ASP.NET Core Fundamentals-Logging" tags: [netcore, fundamentals, logging] --- ASP.NET Core内置了对日志的支持。通过依赖注入请求`ILoggerFactory`或者`ILogger<T>`可以为应用程序添加日志功能。 ## 在应用程序中实现日志 如果请求了`ILoggerFactory`,那么日志记录器(Logger)就必须通过它的`CreateLogger`方法来创建: ```csharp var logger = loggerFactory.CreateLogger("Catch all Endpoint"); logger.LogInformation("No endpoint found for request {path}", context.Request.Path); ``` 当一个Logger被创建时,必须提供一个类别名称。类别名称指定了日志事件的根源。 ![](http://charlie-blog.oss-cn-shanghai.aliyuncs.com/netcore-fundamentals-logging-1.png) 你可以会发现每次你通过浏览器发起网络请求都会产生多条记录,因为浏览器在尝试加载一个页面的时候会发起多个请求。在控制台记录器显示的日志级别(`info`,`fail`等),类别(`[Catch all Endpoint]`),最后是日志消息。 在真实的应用中,你会希望基于应用程序级别添加日志,而不是基于框架级别或者事件。例如,之前创建的应用[创建ASP.NET Core Web API](http://zhuchenglin.me/my-first-web-api-on-mac)。我们来要为其中的各种操作添加日志记录。 API的逻辑被包含在`UserController`中,在它的构造函数通过依赖注入的方式来请求它所需要的服务。理想情况下,类应当像这个例子一样使用它们的构造函数来[显式地定义它们的依赖项](http://deviq.com/explicit-dependencies-principle/)并作为参数传入,而不是请求一个*ILoggerFactory*并显式创建`ILogger`实例。 在`UserController`中演示了另一种在应用中使用Logger的方式 - 通过请求*ILogger\<T>*(其中*T*是请求Logger的类)。 ```csharp [Route("api/[controller]")] public class UserController : Controller { //public IUserRepository UserItems { get; set; } private readonly IUserRepository _userRepository; private readonly ILogger<UserController> _logger; public UserController(IUserRepository userRepository,ILogger<UserController> logger) { _userRepository = userRepository; _logger = logger; } [HttpGet] public IEnumerable<UserItem> GetAll() { _logger.LogInformation("LoggingEvents.LIST_ITEMS","Listing all items"); return _userRepository.GetAll(); } } ``` 在每个控制器动作方法内,通过本地字段*_logger*来记录日志。这种技术并仅限于控制器内,通过依赖注入它能应用于应用程序内的所有服务中。 ## 使用ILogger 如您所见,应用程序可以在类的构造函数中通过请求到`ILogger<T>`的实例,其中`T`是执行日志记录的类型。`UserController`就演示了这个方法。当使用这种技术时,Logger会自动使用该类型的名称作为其类别的名称。通过请求`ILogger<T>`的实例,类自己不需要通过`ILoggerFactory`来创建一个Logger实例。这种方法可以用在任何不需要用到`ILoggerFactory`所提供的额外功能的任何地方。 ## 日志级别 当添加一个日志语句到的应用程序时,你必须指定一个`LogLevel`。日志级别(LogLevel)可以控制应用程序的日志记录输出的详细程序,以及管理不同类型的日志消息到不同的日志记录器的能力。你可能希望记录调试信息到一个本地文件,且把错误消息记录到计算机的事件日志或者数据库中。 ASP.NET Core定义了日志的6种级别,按重要性和严重程序排序如下: * Trace 用于定义最详细的日志消息,通常只对开发人员调试一个问题有价值。这些信息可能包含敏感的应用程序数据,因此不应该用于生产环境。*默认为禁用*。比如:`Credentials: {"User":"someuser", "Password":"P@ssword"}` * Debug 这种信息在开发阶段的短期内比较有用。它包含了一些可能对调试来说有用的信息,但没有长期的价值。默认情况下这是最详细的日志。比如:`Entering method Configure with flag set to true` * Information 这种信息用于跟踪应用程序的一般流程。与`Debug`级别的信息相反,这些日志应该有一定的长期价值,比如:`Request received for path /foo`。 * Warning 这种信息用于程序流中的异常和意外事件。可能包含错误或者其它不会导致程序停止但可能要在日后调查的流程。比如:`Login failed for IP 127.0.0.1`或者`FileNotFoundException for file foo.txt` * Error 当应用程序流程由于某些没有被处理到的异常等停止则需要记录错误日志。这些信息应当指定当前活动或者操作(比如当前的HTTP请求),而不是应用程序范围的故障。比如:`Cannot insert record due to duplicate key violation` * Critical 这种信息用于不可恢复的应用程序错误或系统错误,或者需要立即被关注的灾难性错误。比如:数据丢失、磁盘空间不够等。 `Logging`包为每一个`LogLevel`值提供了Helper扩展方法,允许你去调用。例如,`LogInformation`,而不是更详细的`Log(LogLevel.Information, ...)`。每个`LogLevel`- 扩展方法有多个重载,允许你传递下面的一些或者所有的参数: * string data 记录信息 * EventId eventId 使用数字类型的id来标记日志,这样可将一系列的日志事件彼此相互关联。事件ID应该是静态的,并且特定于正在记录的特定类型的事件。例如,你可能把添加商品到购物车的事件ID标记为1000,然后把完成一次购买的事件ID标记为1001。这样允许你智能过滤并处理日志记录。`EventId`类型可以隐式转换成`int`,所以,你可以传递一个`int`参数。 * string format 日志信息的格式字符串 * object[] args 用于格式化的一组对象。 * Exception error 用于记录的异常实例。 ## 在应用程序中配置日志 为了在ASP.NET Core应用程序中配置日志,你必须在`Startup`类的`Configure`方法中解析`ILoggerFactory`。ASP.NET Core会使用依赖注入自动提供一个`ILoggerFactory`实例。 ```csharp public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory) ``` 一旦你添加一个`ILoggerFactory`作为参数,你就可以在`Configure`方法中通过在Logger Factory上调用方法来配置了一个日志记录器(Logger)。比如调用`loggerFactory.AddConsole`添加控制台日志记录。 ## 原文链接 [Logging](https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging) ## 个人博客 [我的个人博客](http://zhuchenglin.me/)
charliethinker/charliethinker.github.io
_posts/2016-12-07-fundamentals-7-logging.markdown
Markdown
mit
6,820
[ 30522, 1011, 1011, 1011, 9621, 1024, 2695, 2516, 1024, 1000, 2004, 2361, 1012, 5658, 4563, 100, 1876, 1787, 100, 1006, 1021, 1007, 1011, 1864, 1851, 1000, 4942, 3775, 9286, 1024, 1000, 2004, 2361, 1012, 5658, 4563, 8050, 2015, 1011, 30524...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php use dmstr\widgets\Alert; use yii\helpers\Html; /* @var $this \yii\web\View */ /* @var $content string */ $this->title = $this->title . ' [Backend] ' . Yii::$app->params['appName']; dmstr\web\AdminLteAsset::register($this); ?> <?php $this->beginPage() ?> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <?= Html::csrfMetaTags() ?> <title><?= Html::encode($this->title) ?></title> <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'> <!-- Ionicons --> <link href="//code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css" rel="stylesheet" type="text/css"/> <!-- Theme style --> <?php $this->head() ?> <!-- 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/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> <![endif]--> </head> <body class="skin-black"> <?php $this->beginBody() ?> <div class="wrapper"> <header class="main-header"> <!-- Logo --> <a href="<?= \Yii::$app->homeUrl ?>" class="logo"><?= getenv('APP_TITLE') ?></a> <!-- Header Navbar: style can be found in header.less --> <nav class="navbar navbar-static-top" role="navigation"> <!-- Sidebar toggle button--> <a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button"> <span class="sr-only">Toggle navigation</span> </a> <div class="navbar-custom-menu"> <ul class="nav navbar-nav"> <?php if (!\Yii::$app->user->isGuest): ?> <!-- Messages: style can be found in dropdown.less--> <li class="dropdown messages-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-envelope-o"></i> <span class="label label-success">1</span> </a> <ul class="dropdown-menu"> <li class="header">You have 1 notification(s)</li> <li> <!-- inner menu: contains the actual data --> <ul class="menu"> <li> <a href="#"> <i class="ion ion-ios7-people info"></i> Welcome to Phundament 4! </a> </li> </ul> </li> </ul> </li> <li class="dropdown tasks-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="fa fa-flag"></i> <span class="label label-default"><?= count(Yii::$app->urlManager->languages) ?></span> </a> <ul class="dropdown-menu"> <li class="header">Languages</li> <li> <!-- inner menu: contains the actual data --> <ul class="menu"> <?php foreach(Yii::$app->urlManager->languages as $language): ?> <li> <?= Html::a($language,['',Yii::$app->urlManager->languageParam=>$language]) ?> </li> <?php endforeach; ?> </ul> </li> </ul> </li> <!-- User Account: style can be found in dropdown.less --> <li class="dropdown user user-menu"> <a href="#" class="dropdown-toggle" data-toggle="dropdown"> <i class="glyphicon glyphicon-user"></i> <span><?= \Yii::$app->user->identity->username ?> <i class="caret"></i></span> </a> <ul class="dropdown-menu"> <!-- User image --> <li class="user-header bg-light-blue"> <?php echo \cebe\gravatar\Gravatar::widget( [ 'email' => \Yii::$app->user->identity->email, 'options' => [ 'alt' => \Yii::$app->user->identity->username ], 'size' => 128 ] ); ?> <p> <?= \Yii::$app->user->identity->username ?> <small><?= \Yii::$app->user->identity->email ?></small> </p> </li> <!-- Menu Footer--> <li class="user-footer"> <div class="pull-left"> <a href="<?= \yii\helpers\Url::to(['/user/settings/profile']) ?>" class="btn btn-default btn-flat">Profile</a> </div> <div class="pull-right"> <a href="<?= \yii\helpers\Url::to(['/user/security/logout']) ?>" class="btn btn-default btn-flat" data-method="post">Sign out</a> </div> </li> </ul> </li> <?php endif; ?> </ul> </div> </nav> </header> <!-- Left side column. contains the logo and sidebar --> <aside class="main-sidebar"> <!-- sidebar: style can be found in sidebar.less --> <section class="sidebar"> <?= $this->render('_sidebar') ?> </section> <!-- /.sidebar --> </aside> <!-- Right side column. Contains the navbar and content of the page --> <div class="content-wrapper"> <!-- Content Header (Page header) --> <section class="content-header"> <h1> <small><?= $this->title ?></small> </h1> <ol class="breadcrumb"> <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li> <li class="active">Dashboard</li> </ol> </section> <!-- Main content --> <section class="content"> <?= Alert::widget() ?> <?= $content ?> </section> <!-- /.content --> </div> <!-- /.content-wrapper --> <footer class="main-footer"> Powered by <strong><a href="http://phundament.com">Phundament 4</a></strong> </footer> </div> <!-- ./wrapper --> <?php $this->endBody() ?> </body> </html> <?php $this->endPage() ?>
noorafree/makmakan
vendor/dmstr/yii2-adminlte-asset/example-views/phundament/app/layouts/main.php
PHP
bsd-3-clause
7,949
[ 30522, 1026, 1029, 25718, 2224, 1040, 5244, 16344, 1032, 15536, 28682, 1032, 9499, 1025, 2224, 12316, 2072, 1032, 2393, 2545, 1032, 16129, 1025, 1013, 1008, 1030, 13075, 1002, 2023, 1032, 12316, 2072, 1032, 4773, 1032, 3193, 1008, 1013, 101...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# old single process tictactoe game to be rewritten.... import numpy import os class TicTacToePlayer: def __init__(self, playerType, playerName, ttt_game_settings): if playerType not in ['AI', 'Terminal']: raise(ValueError()) self.type=playerType self.name=playerName self.board_size = ttt_game_settings['board_size'] self.nr_of_positions = ttt_game_settings['board_size'][0]*ttt_game_settings['board_size'][1] def playMove(self, board): if self.type == 'AI': return numpy.random.randint(1,self.nr_of_positions+1) elif self.type == 'Terminal': return self.playFromTerminal(board) def playFromTerminal(self,board): os.system('cls' if os.name == 'nt' else 'clear') print(board) while True: try: moveAttempt = input("%s! Play a position (1-%i): " % (self.name, self.nr_of_positions)) if ((1 <= int(moveAttempt) <= self.nr_of_positions)): row = (int(moveAttempt)-1) // self.board_size[1] col = (int(moveAttempt)-1) % self.board_size[1] if board[row,col] == 0: break # valid move! else: print("That position is already taken!") else: print("That is not an integer between 1 and %i!" % self.nr_of_positions) except ValueError: print("That is not an integer!") return int(moveAttempt) def getName(self): return self.name class TicTacToeGame: def __init__(self, player1Name="player1", playerMinus1Name="player2", player1Type="Terminal", playerMinus1Type="Terminal"\ , settings=dict(board_size=(3,3), win_length=3)): self.game, self.board_size, self.win_length = self.initializa_game(settings) self.player1 = TicTacToePlayer(\ playerType=player1Type,\ playerName=player1Name,\ ttt_game_settings=settings) self.playerMinus1 = TicTacToePlayer(\ playerType=playerMinus1Type,\ playerName=playerMinus1Name,\ ttt_game_settings=settings) def getGame(self): return self.game def initializa_game(self,settings): board_size_in = settings['board_size'] win_length = settings['win_length'] board_size = numpy.asarray(board_size_in,dtype='int') if len(board_size) != 2: raise(ValueError('Not a good size!')) if win_length > min(board_size) or not isinstance(win_length, int): raise(ValueError('Not a X in rows config.')) return [], board_size, win_length def getBoard(self): board = numpy.zeros(shape=self.board_size) currPlayerIs1 = True for move in self.game: row = (int(move)-1) // self.board_size[1] col = (int(move)-1) % self.board_size[1] board[row,col] = 1 if currPlayerIs1 else -1 currPlayerIs1 = not currPlayerIs1 return board def playMove(self,move): if int(move) in self.game \ or int(move) > self.board_size[0]*self.board_size[1]: return False #invalid move else: self.game.append(int(move)) return True def play(self): currPlayerIs1 = True while True: moveAttempt = self.player1.playMove(self.getBoard()) if currPlayerIs1 else self.playerMinus1.playMove(self.getBoard()) if self.playMove(moveAttempt): currPlayerIs1 = not currPlayerIs1 gameHasEnded, endMessage = self.checkGameEnded() if gameHasEnded: print(endMessage) print(self.getBoard()) print("Thank you for playing Tic-Tac-Toe!") break def checkWinner(self): board = self.getBoard() lastmove = self.game[-1] row = (int(lastmove)-1) // self.board_size[1] col = (int(lastmove)-1) % self.board_size[1] lastmove = (row,col) currPlayerName = self.player1.getName() if len(self.game) % 2 == 1 else self.playerMinus1.getName() num_N = self.checkStreak(lastmove,'N') num_S = self.checkStreak(lastmove,'S') if 1+num_N + num_S == self.win_length: return True, "%s won!" % currPlayerName num_E = self.checkStreak(lastmove,'E') num_W = self.checkStreak(lastmove,'W') if 1+num_E + num_W == self.win_length: return True, "%s won!" % currPlayerName num_NE = self.checkStreak(lastmove,'NE') num_SW = self.checkStreak(lastmove,'SW') if 1+num_NE + num_SW == self.win_length: return True, "%s won!" % currPlayerName num_SE = self.checkStreak(lastmove,'SE') num_NW = self.checkStreak(lastmove,'NW') if 1+num_SE + num_NW == self.win_length: return True, "%s won!" % currPlayerName return False, "" def checkStreak(self,position,direction): if direction == 'N': parsed_dir = (-1,0) elif direction =='S': parsed_dir = (1,0) elif direction == 'E': parsed_dir = (0,1) elif direction == 'W': parsed_dir = (0,-1) elif direction == 'NW': parsed_dir = (-1,-1) elif direction == 'SW': parsed_dir = (1,-1) elif direction == 'NE': parsed_dir = (-1,1) elif direction == 'SE': parsed_dir = (1,1) next_pos = numpy.asarray(position)+numpy.asarray(parsed_dir) board = self.getBoard() if next_pos[0] <0 or next_pos[1] < 0: return 0 if next_pos[0] >= self.board_size[0] or next_pos[1] >= self.board_size[1]: return 0 player_here = board[position[0],position[1]] next_player = board[next_pos[0],next_pos[1]] if player_here != next_player: return 0 else: return self.checkStreak(next_pos,direction) + 1 def checkGameEnded(self): gameHasEnded, endMessage = self.checkWinner() if not gameHasEnded: if len(self.game) == self.board_size[0]*self.board_size[1]: gameHasEnded = True endMessage = "Its a tie!" return gameHasEnded, endMessage if __name__ == "__main__": ttt_game_settings = dict(board_size=(4,4), win_length=3) myGame = TicTacToeGame(player1Name="Ludvig", playerMinus1Name="PC", playerMinus1Type="AI",settings=ttt_game_settings) myGame.play()
dirrelito/animated-invention
ThreadedTicTacToe/_old/ttt.py
Python
apache-2.0
5,563
[ 30522, 1001, 2214, 2309, 2832, 14841, 25572, 6593, 8913, 2208, 2000, 2022, 2128, 15773, 1012, 1012, 1012, 1012, 12324, 16371, 8737, 2100, 12324, 9808, 2465, 14841, 25572, 6593, 8913, 13068, 2121, 1024, 13366, 1035, 1035, 1999, 4183, 1035, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
jsonp({"cep":"79070534","logradouro":"Rua Parauna","bairro":"Porto Galo","cidade":"Campo Grande","uf":"MS","estado":"Mato Grosso do Sul"});
lfreneda/cepdb
api/v1/79070534.jsonp.js
JavaScript
cc0-1.0
140
[ 30522, 1046, 3385, 2361, 1006, 1063, 1000, 8292, 2361, 1000, 1024, 1000, 6535, 2692, 19841, 22275, 2549, 1000, 1010, 1000, 8833, 12173, 8162, 2080, 1000, 1024, 1000, 21766, 2050, 11498, 9521, 1000, 1010, 1000, 21790, 18933, 1000, 1024, 1000...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
#include <luabind/luabind.hpp> #include "scheduler.h" namespace graphic { void Scheduler::bind(lua_State *L) { using namespace luabind; module_(L, "graphic") [ class_<Scheduler, SchedulerPtr >("Scheduler") .def(constructor<RendererPtr const &>()) .def("add", &Scheduler::add) .def("flush", &Scheduler::flush) .def("get_visible_calls_count", &Scheduler::get_visible_calls_count) .def("get_invisible_calls_count", &Scheduler::get_invisible_calls_count) ]; } }
manvelavetisian/scratch
src/graphic/scheduler_bind.cc
C++
bsd-3-clause
479
[ 30522, 1001, 2421, 1026, 11320, 28518, 4859, 1013, 11320, 28518, 4859, 1012, 6522, 2361, 1028, 1001, 2421, 1000, 6134, 2099, 1012, 1044, 1000, 3415, 15327, 8425, 1063, 11675, 6134, 2099, 1024, 1024, 14187, 1006, 11320, 2050, 1035, 2110, 100...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Definitions etc. for regexp(3) routines. * * Caveat: this is V8 regexp(3) [actually, a reimplementation thereof], * not the System V one. */ #define NSUBEXP 10 typedef struct regexp { char *startp[NSUBEXP]; char *endp[NSUBEXP]; char regstart; /* Internal use only. */ char reganch; /* Internal use only. */ char *regmust; /* Internal use only. */ int regmlen; /* Internal use only. */ char program[1]; /* Unwarranted chumminess with compiler. */ } regexp; extern regexp *regcomp(); extern int regexec(); extern void regsub(); extern void regerror();
ysleu/RTL8685
uClinux-dist/lib/libc/regexp/regexp.h
C
gpl-2.0
574
[ 30522, 1013, 1008, 1008, 15182, 4385, 1012, 2005, 19723, 10288, 2361, 1006, 1017, 1007, 23964, 1012, 1008, 30524, 2361, 1006, 1017, 1007, 1031, 2941, 1010, 1037, 24964, 23344, 3672, 3370, 21739, 1033, 1010, 1008, 2025, 1996, 2291, 1058, 202...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * 检查文件名后缀,判断是否为合法的日志文件 * * @param fileName 文件名字符串 * @returns {bool} 文件名是否合法,true 合法,false 非法 */ function isValidLogFile(fileName) { if(fileName === null || fileName === '') throw new Error('file name empty!'); return (lastValid = /.*\.slf$/.test(fileName)); } var lastValid = false; function wasLastFileNameValid() { return lastValid; } module.exports.isValidLogFile = isValidLogFile; module.exports.wasLastFileNameValid = wasLastFileNameValid;
wangding/demo-code
unit-testing-art/ch02/log-and-notification.js
JavaScript
mit
542
[ 30522, 1013, 1008, 1008, 1008, 100, 100, 1861, 100, 1795, 100, 100, 1989, 100, 100, 100, 100, 100, 1792, 1901, 1916, 1864, 1851, 1861, 100, 1008, 1008, 1030, 11498, 2213, 5371, 18442, 1861, 100, 1795, 100, 100, 100, 1008, 1030, 5651, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
class MetaProperty { constructor (options) { this.type = 'MetaProperty' Object.assign(this, options) } } module.exports = MetaProperty
buxlabs/ast
src/nodes/MetaProperty.js
JavaScript
mit
148
[ 30522, 2465, 18804, 21572, 4842, 3723, 1063, 9570, 2953, 1006, 7047, 1007, 1063, 2023, 1012, 2828, 1027, 1005, 18804, 21572, 4842, 3723, 1005, 4874, 1012, 23911, 1006, 2023, 1010, 7047, 1007, 1065, 1065, 11336, 1012, 14338, 1027, 18804, 215...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
__author__ = 'Autio' from distutils.core import setup import py2exe setup(windows=['ShitCrimson.py'])
ArchBang85/S_Crimson
Setup.py
Python
apache-2.0
104
[ 30522, 1035, 1035, 3166, 1035, 1035, 1027, 1005, 8740, 3775, 2080, 1005, 2013, 4487, 3367, 21823, 4877, 1012, 4563, 12324, 16437, 12324, 1052, 2100, 2475, 10288, 2063, 16437, 1006, 3645, 1027, 1031, 1005, 4485, 26775, 5714, 3385, 1012, 1052...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# # Copyright 2015, SUSE Linux GmbH # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # shared_examples "a request class" do |with_body| before(:each) do Crowbar::Client::Config.configure( Crowbar::Client::Config.defaults.merge( server: "http://crowbar:80" ) ) end it "provides a method value" do expect(subject.method).to( eq(method) ) end it "provides a specific url" do expect(subject.url).to( eq(url) ) end it "provides a valid payload" do expect(subject.content).to( eq(params) ) end it "submits payload to an API" do content = if with_body params else "" end allow(Crowbar::Client::Request::Rest).to receive(:new).and_return( Crowbar::Client::Request::Rest.new( url: url, auth_type: nil ) ) stub_request( method, "http://crowbar:80/#{url}" ).to_return( status: 200, body: "", headers: {} ) subject.process expect( Crowbar::Client::Request::Rest.new(url: url).send( method, content ).code ).to eq(200) end end
crowbar/crowbar-client
spec/support/request_examples.rb
Ruby
apache-2.0
1,652
[ 30522, 1001, 1001, 9385, 2325, 1010, 10514, 3366, 11603, 18289, 1001, 1001, 7000, 2104, 1996, 15895, 6105, 1010, 2544, 1016, 1012, 1014, 1006, 1996, 1000, 6105, 1000, 1007, 1025, 1001, 2017, 2089, 2025, 2224, 2023, 5371, 3272, 1999, 12646, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
phi#id1 > delta:nth-child(1):last-child chi#id2:first-child:nth-last-child(2) + *[number]#id3:nth-child(2):nth-last-child(1) psi:lang(no):first-child:empty + *:lang(no):nth-child(2):empty + omicron:lang(no)#id4 > gamma:lang(no):nth-child(1) > rho:first-child:nth-last-child(2):empty + kappa eta:lang(en)#id5:nth-child(1) + chi[name|="this.nodeValue"]:nth-child(2):last-child > chi[insert$="false"]:nth-last-child(2) ~ alpha[title^="t"]:nth-child(2) {color:green}
frivoal/presto-testo
css/selectors/reftests/tc-419.css
CSS
bsd-3-clause
464
[ 30522, 13569, 1001, 8909, 2487, 1028, 7160, 1024, 23961, 2232, 1011, 2775, 1006, 1015, 1007, 1024, 2197, 1011, 2775, 9610, 1001, 8909, 2475, 1024, 2034, 1011, 2775, 1024, 23961, 2232, 1011, 2197, 1011, 2775, 1006, 1016, 1007, 1009, 1008, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/*! * Diaphanous * https://github.com/Jonic/Diaphanous * @author Jonic Linley <jonic@100yen.co.uk> * @version 0.0.1 * Copyright 2013 Jonic Linley MIT licensed. */ address:before, article:before, aside:before, blockquote:before, body:before, div:before, dl:before, fieldset:before, figcaption:before, figure:before, footer:before, form:before, h1:before, h2:before, h3:before, h4:before, h5:before, h6:before, header:before, html:before, li:before, main:before, ol:before, p:before, section:before, nav:before, ul:before, address:after, article:after, aside:after, blockquote:after, body:after, div:after, dl:after, fieldset:after, figcaption:after, figure:after, footer:after, form:after, h1:after, h2:after, h3:after, h4:after, h5:after, h6:after, header:after, html:after, li:after, main:after, ol:after, p:after, section:after, nav:after, ul:after { content: ''; display: table; } address:after, article:after, aside:after, blockquote:after, body:after, div:after, dl:after, fieldset:after, figcaption:after, figure:after, footer:after, form:after, h1:after, h2:after, h3:after, h4:after, h5:after, h6:after, header:after, html:after, li:after, main:after, ol:after, p:after, section:after, nav:after, ul:after { clear: both; } body { -webkit-text-rendering: optimizeLegibility; -moz-text-rendering: optimizeLegibility; -ms-text-rendering: optimizeLegibility; -o-text-rendering: optimizeLegibility; text-rendering: optimizeLegibility; } body { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; -ms-text-size-adjust: 100%; -o-text-size-adjust: 100%; text-size-adjust: 100%; } *, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; } html { background: #fbfcfc; min-height: 100%; } body { color: #6b6f74; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-size: 18px; font-weight: 400; line-height: 28px; min-height: 100%; min-width: 320; } a { color: #00b5eb; cursor: pointer; text-decoration: none; -webkit-transition: color 300ms ease-in-out; -moz-transition: color 300ms ease-in-out; transition: color 300ms ease-in-out; } a:active, a:focus, a:hover { color: #00b5eb; text-decoration: underline; } address { font-style: normal; } b { font-weight: 700; } blockquote { margin-bottom: 28; } blockquote p:before, blockquote p:after { display: inline-block; font-size: 20px; line-height: 0; } blockquote p:first-child:before { content: '\201C'; } blockquote p:last-of-type { margin: 0; } blockquote p:last-of-type:after { content: '\201D'; } button { border: none; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } cite { display: block; text-align: right; } code { background: #9c9fa2; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; padding: 0 7; } dl { margin-bottom: 28px; } dl dd { margin-left: 28px; } dl dt { margin: 0; } em { font-style: italic; } figure { display: block; margin-bottom: 28px; } figure img { display: block; width: 100%; } figure figcaption { color: #9c9fa2; font-style: italic; } i { font-style: italic; } input { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } h1, .h1, h2, .h2, h3, .h3 { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; font-weight: normal; margin: 0; margin-bottom: 28px; } h1, .h1 { font-size: 26px; } h2, .h2 { font-size: 24px; } h3, .h3 { font-size: 22px; } label { margin: 0; } ol li { list-style: decimal; } ol ol, ol ul { margin-bottom: 0; } blockquote, code, dl, ol, p, pre, td, th, ul { margin: 0; margin-bottom: 28px; } .standfirst { font-size: 20px; } select { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } strong { font-weight: 700; } table { border-collapse: collapse; margin-bottom: 28px; } table td, table th { margin: 0; } textarea { font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; } time { display: inline-block; font-size: 14px; } ul li { list-style: disc; } ul ol, ul ul { margin-bottom: 0; }
Jonic/Diaphanous
public/styles/master.min.css
CSS
mit
4,125
[ 30522, 1013, 1008, 999, 1008, 22939, 21890, 18674, 1008, 16770, 1024, 1013, 1013, 21025, 2705, 12083, 1012, 4012, 1013, 6285, 2594, 1013, 22939, 21890, 18674, 1008, 1030, 3166, 6285, 2594, 11409, 3051, 1026, 6285, 2594, 1030, 2531, 20684, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.openejb.jee.jba.cmp; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "content" }) @XmlRootElement(name = "clean-read-ahead-on-load") public class CleanReadAheadOnLoad { @XmlValue protected String content; /** * Gets the value of the content property. * * @return * possible object is * {@link String } * */ public String getContent() { return content; } /** * Sets the value of the content property. * * @param value * allowed object is * {@link String } * */ public void setContent(String value) { this.content = value; } }
apache/openejb
container/openejb-jee/src/main/java/org/apache/openejb/jee/jba/cmp/CleanReadAheadOnLoad.java
Java
apache-2.0
2,135
[ 30522, 1013, 1008, 1008, 1008, 7000, 2000, 1996, 15895, 4007, 3192, 1006, 2004, 2546, 1007, 2104, 2028, 2030, 2062, 1008, 12130, 6105, 10540, 1012, 2156, 1996, 5060, 5371, 5500, 2007, 1008, 2023, 2147, 2005, 3176, 2592, 4953, 9385, 6095, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /* All Emoncms code is released under the GNU Affero General Public License. See COPYRIGHT.txt and LICENSE.txt. --------------------------------------------------------------------- Emoncms - open source energy visualisation Part of the OpenEnergyMonitor project: http://openenergymonitor.org */ // no direct access defined('EMONCMS_EXEC') or die('Restricted access'); function cossmiccontrol_controller() { global $path, $session, $route; $result = false; // Load html,css,js pages to the client if ($route->format == 'html') { if ($route->action == 'view' && $session['write']) { if ($route->subaction == 'dashboard') $result = view("Modules/cossmiccontrol/Views/summary.php", array()); if ($route->subaction == 'appliances') $result = view("Modules/cossmiccontrol/Views/appliances.php", array()); if ($route->subaction == 'scheduler') $result = view("Modules/cossmiccontrol/Views/scheduler.php", array()); if ($route->subaction == 'history') $result = view("Modules/cossmiccontrol/Views/history.php", array()); if ($route->subaction == 'ranking') $result = view("Modules/cossmiccontrol/Views/ranking.php", array()); } } // JSON API if ($route->format == 'json') { } return array('content'=>$result); }
UbiCollab/PersuasiveCommunities
cossmicvagrant/data/emoncms/Modules/cossmiccontrol/cossmiccontrol_controller.php
PHP
apache-2.0
1,329
[ 30522, 1026, 1029, 25718, 1013, 1008, 2035, 7861, 2239, 27487, 2015, 3642, 2003, 2207, 2104, 1996, 27004, 21358, 7512, 2080, 2236, 2270, 6105, 1012, 2156, 9385, 1012, 19067, 2102, 1998, 6105, 1012, 19067, 2102, 1012, 1011, 1011, 1011, 1011,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
package mg import ( "github.com/cloudfoundry/cli/plugin" "github.com/ArthurHlt/plugin-cf-manifest-generator/mg/manifest" "fmt" "bufio" "os" ) type Step<?php echo ucfirst($stepName); ?> struct { Step } const DEFAULT_<?php echo strtoupper($stepName); ?>= "<?php echo $defaultValue ?>" func NewStep<?php echo ucfirst($stepName); ?>(cliConnection plugin.CliConnection, appManifest *manifest.Manifest) *Step<?php echo ucfirst($stepName); ?>{ step<?php echo ucfirst($stepName); ?> := new(Step<?php echo ucfirst($stepName); ?>) step<?php echo ucfirst($stepName); ?>.appManifest = appManifest step<?php echo ucfirst($stepName); ?>.cliConnection = cliConnection return step<?php echo ucfirst($stepName); ?> } func (s *Step<?php echo ucfirst($stepName); ?>) Run() error { reader := bufio.NewReader(os.Stdin) for true { fmt.Print(fmt.Sprintf("How much instances do you want <%s> ? ", DEFAULT_<?php echo strtoupper($stepName); ?>)) <?php echo $stepName; ?>Bytes, _, err := reader.ReadLine() if err != nil { return err } <?php echo $stepName; ?> := string(<?php echo $stepName; ?>Bytes) if (<?php echo $stepName; ?> == "") { <?php echo $stepName; ?> = DEFAULT_<?php echo strtoupper($stepName); ?> } <?php echo $stepName; ?>, err = s.get<?php echo ucfirst($stepName); ?>(<?php echo $stepName; ?>) if err != nil { showError(err) continue } s.appManifest.<?php echo ucfirst($stepName); ?>(session.AppName, <?php echo $stepName; ?>) break } return nil } func (s *Step<?php echo ucfirst($stepName); ?>) get<?php echo ucfirst($stepName); ?>(<?php echo $stepName; ?> string) (string, error) { return <?php echo $stepName; ?>, nil }
ArthurHlt/plugin-cf-manifest-generator
bin/template/template.php
PHP
mit
1,613
[ 30522, 7427, 11460, 12324, 1006, 1000, 21025, 2705, 12083, 1012, 4012, 1013, 6112, 14876, 8630, 2854, 1013, 18856, 2072, 1013, 13354, 2378, 1000, 1000, 21025, 2705, 12083, 1012, 4012, 1013, 4300, 7317, 2102, 1013, 13354, 2378, 1011, 12935, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?php /* PHP iCal Interface Library Copyright (C) 2005 Gregory Szorc <gregory.szorc@case.edu> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ /** * iCal (RFC 2245) class definition * * PHP version 5 * * @package iCal * @subpackage Parser * @author Gregory Szorc <gregory.szorc@case.edu> * @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1 */ /** * File_iCal_ValueDataTypes emulate the value types defined by RFC 2445. * * Valid ValueDataTypes should derive from this base class. * * @category File * @package iCal */ class File_iCal_ValueDataType { protected $_value; //may or may not be implemented public function getValue() { //might want to overwrite in child classes return $this->_value; } } /** * Implements a binary value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Binary extends File_iCal_ValueDataType { } /** * Implements a boolean value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Boolean extends File_iCal_ValueDataType { public function __construct($s) { if (strcasecmp($s, "true")) { $this->_value = "TRUE"; return; } if (strcasecmp($s, "false")) { $this->_value = "FALSE"; return; } //else trigger_error("Boolean value data type is not \"true\" or \"false\". Value is $s", E_WARNING); } public function getValue() { return $this->_value; } } /** * Implements a calendar user address value type * * @category File * @package iCal */ class File_iCal_ValueDataType_CalendarUserAddress extends File_iCal_ValueDataType { public function __construct($s) { $this->_value = new File_iCal_ValueDataType_URI($s); } public function getValue() { return $this->_value->getValue(); } } /** * Implements a date value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Date extends File_iCal_ValueDataType { private $_year, $_month, $_day; public function __construct($date) { if (strlen($date) != 8) { //throw new Exception("Date data type must be 8 characters in length"); } else { $this->_year = substr($date, 0, 4); $this->_month = substr($date, 4, 2); $this->_day = substr($date, 6, 2); } } //returns YYYYmmdd public function getValue() { return date("Ymd", mktime(0,0,0, $this->_month, $this->_day, $this->_year)); } public function getIntegerValue() { return mktime(0,0,0, $this->_month, $this->_day, $this->_year); } public function setYear($y) { if ($y > 0) { $this->_year = $y; } else { trigger_error("Year must be greater than 0", E_USER_WARNING); } } public function setMonth($m) { if ($m > 0) { $this->_month = $m; } else { trigger_error("Month must be greater than 0", E_USER_WARNING); } } public function setDay($d) { if ($d > 0) { $this->_day = $d; } else { trigger_error("Day must be greater than 0", E_USER_WARNING); } } } /** * Implements a date/time value type * * @category File * @package iCal */ class File_iCal_ValueDataType_DateTime extends File_iCal_ValueDataType { private $_date, $_time; public function __construct($dt) { if (strlen($dt) == 15 || strlen($dt) == 16) { $this->_date = new File_iCal_ValueDataType_Date(substr($dt, 0, 8)); $this->_time = new File_iCal_ValueDataType_Time(substr($dt, 9)); } else { $this->_date = new File_iCal_ValueDataType_Date(date("Ymd", $dt)); $this->_time = new File_iCal_ValueDataType_Time(date("His", $dt)); } } public function getValue() { return $this->_date->getValue() . 'T' . $this->_time->getValue(); } public function getIntegerValue() { return $this->_date->getIntegerValue() + $this->_time->getIntegerValue(); } } /** * Implements a duration value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Duration extends File_iCal_ValueDataType { private $_plusminus; //stores either '+' or '-' private $_length; //duration in seconds public function __construct($d) { if ($d{0} == '+') { $this->_plusminus = '+'; } else if ($d{0} == '-') { $this->_plusminus = '-'; } else//if we have a week identifier { //$this->_plusminus = '+'; $d = '+'.$d; } if ($d{1} != 'P') { trigger_error("Second character of duration value must be a 'P'. Found a '".$d{1}."'.", E_USER_ERROR); } $dur = substr($d, 2); $this->_length = 0; //set default length to 0 seconds $match; //if we have a week identifier if ($w = strpos($dur, 'W')) { if ($i = preg_match('/^.*?(\d+)D/', $dur, $match)) { $this->_length += 7*24*60*60*$match[1]; } else { trigger_error("At least one character before 'W' must be a digit", E_USER_ERROR); } } //if we have a day identifier if ($dee = strpos($dur, 'D')) { if ($i = preg_match('/^.*?(\d+)D/', $dur, $match)) { $this->_length += 24*60*60*$match[1]; } else { trigger_error("At least one character before 'D' must be a digit", E_USER_ERROR); } } //if we have a hour identifier if (strpos($dur, 'H')) { if ($i = preg_match('/^.*?(\d+)H/', $dur, $match)) { $this->_length += 60*60*$match[1]; } else { trigger_error("At least one character before 'H' must be a digit", E_USER_ERROR); } } //if we have a minute identifier if (strpos($dur, 'M')) { if ($i = preg_match('/^.*?(\d+)M/', $dur, $match)) { $this->_length += 60*$match[1]; } else { trigger_error("At least one character before 'M' must be a digit", E_USER_ERROR); } } //if we have a second identifier if (strpos($dur, 'S')) { if ($i = preg_match('/^.*?(\d+)S/', $dur, $match)) { $this->_length += $match[1]; } else { trigger_error("At least one character before 'S' must be a digit", E_USER_ERROR); } } } public function getValue() { $r = $this->_plusminus; $sec = $this->_length % 60; $left = $this->_length; $week = intval($left / (60*60*24*7)); $left -= $week * 60 * 60 *24 * 7; $day = intval($left / (60*60*24)); $left -= $day * 60 * 60 * 24; $hour = intval($left / (60*60)); $left -= $hour * 60*60; $minute = $left / 60; $left -= $minute*60; $r .= 'P'; if ($week) $r .= $week.'W'; if ($day) $r .= $day.'D'; if ($hour || $minute || $sec) $r .= 'T'; if ($hour) $r .= $hour.'H'; if ($minute) $r .= $minute.'M'; if ($sec) $r .= $sec.'S'; return $r; } } /** * Implements a float value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Float extends File_iCal_ValueDataType { public function __construct($s) { $this->_value = $s; } } /** * Implements an integer value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Integer extends File_iCal_ValueDataType { private $_plusminus; public function __construct($s) { if ($s{0} == '-') { $this->_plusminus = '-'; } else if ($s{0} == '+') { $this->_plusminus = '+'; } else { // $this->_plusminus = '+'; $s = '+'.$s; } $num = substr($s, 1); if (ctype_digit($num)) { $this->_value = $num; } else { trigger_error("Integer value must consist of all digits", E_USER_ERROR); } } public function getValue() { return $this->_plusminus . $this->_value; } } /** * Implements a period-of-time value type * * @category File * @package iCal */ class File_iCal_ValueDataType_PeriodOfTime extends File_iCal_ValueDataType { public function __construct($s) { $this->_value = $s; } } /** * Implements a recurrence rule value type * * @category File * @package iCal */ class File_iCal_ValueDataType_RecurrenceRule extends File_iCal_ValueDataType { private $_frequency; private $_until; private $_count; private $_interval; private $_bysecond; private $_byminute; private $_byhour; private $_byday; private $_bymonthday; private $_byyearday; private $_byweekno; private $_bymonth; private $_bysetpos; private $_wkst; //takes string $s public function __construct($s) { if (substr($s, 0, 5) != "FREQ=") { trigger_error("Recurrence rule must begin with \"FREQ\"", E_USER_WARNING); } else { $sc = strpos($s, ';', 5); if (self::isValidFrequency(substr($s, 5, $sc - 5))) { $this->_frequency = substr($s, 5, $sc - 5); $arr = explode(';', substr($s, $sc+1)); $kv = array(); foreach ($arr as $v) { $kv[] = explode('=', $v); } //$kv is an array of two-element arrays (hopefully) foreach ($kv as $v) { if (!is_array($v)) { trigger_error("RRULE value not formatted properly"); } else { switch ($v[0]) { case "UNTIL": if ($this->_count) { trigger_error("RRULE value UNTIL cannot occur with COUNT value", E_USER_ERROR); } else { $this->_until = $v[1]; } break; case "COUNT": if ($this->_until) { trigger_error("RRULE value COUNT cannot occur with UNTIL value", E_USER_ERROR); } else { $this->_count = $v[1]; } break; case "INTERVAL": $this->_interval = $v[1]; break; case "BYDAY": $days = explode(',', $v[1]); $this->_byday = $days; break; case "BYSECOND": $this->_bysecond = explode(',', $v[1]); braek; case "BYMINUTE": $this->_byminute = explode(',', $v[1]); break; case "BYHOUR": $this->_byhour = explode(',', $v[1]); break; case "BYMONTHDAY": $this->_bymonthday = explode(',', $v[1]); break; case "BYYEARDAY": $this->_byyearday = explode(',', $v[1]); break; case "BYWEEKND": $this->_byweeknd = explode(',', $v[1]); break; case "BYMONTH": $this->_bymonth = explode(',' , $v[1]); break; case "BYSETPOS": $this->_bysetpos = explode(',', $v[1]); break; case "WKST": $this->_wkst = $v[1]; break; default: trigger_error("Unknown RRULE value ".$v[0], E_USER_WARNING); } } } } else { trigger_error("Bad frequency descriptor provided for RRULE", E_USER_ERROR); } } } public function getValue() { $r = "FREQ=".$this->_frequency; if ($this->_until) { $r.= ";UNTIL=".$this->_until; } if ($this->_count) { $r .= ";COUNT=".$this->_count; } if ($this->_interval) { $r .= ";INTERVAL=".$this->_interval; } if ($this->_bysecond) { $r .= ";BYSECOND=".implode(',',$this->_bysecond); } if ($this->_byminute) { $r .= ";BYMINUTE=".implode(',', $this->_byminute); } if ($this->_byhour) { $r .= ";BYHOUR=".implode(',', $this->_byhour); } if ($this->_byday) { $r .= ";BYDAY=".implode(',', $this->_byday); } if ($this->_bymonthday) { $r .= ";BYMONTHDAY=".implode(',', $this->_bymonthday); } if ($this->_byyearday) { $r .= ";BYYEARDAY=".implode(',', $this->_byyearday); } if ($this->_byweekno) { $r .= ";BYWEEKNO=".implode(',', $this->_byweekno); } if ($this->_bysetpos) { $r .= ";BYSETPOS=".implode(',', $this->_bysetpos); } if ($this->_wkst) { $r .= ";WKST=".$this->_wkst; } return $r; } //given a frequency string $s, return whether it is valid public static function isValidFrequency($s) { $good = array("SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY", "MONTHLY", "YEARLY"); return in_array($s, $good); } } /** * Implements a text value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Text extends File_iCal_ValueDataType { public function __construct($text) { //need some type verification here $this->_value = $text; } } /** * Implements a time value type * * @category File * @package iCal */ class File_iCal_ValueDataType_Time extends File_iCal_ValueDataType { private $_hour, $_minute, $_second; private $_Z = false; public function __construct($time) { $l = strlen($time); assert($l == 6 || $l == 7); $this->_hour = substr($time, 0, 2); $this->_minute = substr($time, 2, 2); $this->_second = substr($time, 4, 2); if ($l == 7) $this->_Z = true; } public function getValue() { $return = str_pad($this->_hour, 2, '0', STR_PAD_LEFT) . str_pad($this->_minute, 2, '0', STR_PAD_LEFT) . str_pad($this->_second, 2, '0', STR_PAD_LEFT); if ($this->_Z) return $return.'Z'; return $return; } public function getIntegerValue() { return 60*60*$this->_hour + 60*$this->_minute + $this->_second; } public function setHour($h) { assert($h > 0 && $h < 24); $this->_hour = $h; } public function setMinute($m) { assert($m > 0 && $m < 60); $this->_minute = $m; } public function setSecond($s) { assert($s > 0 && $s <= 60); $this->_second = $s; } } /** * Implements a URI value type * * @category File * @package iCal */ class File_iCal_ValueDataType_URI extends File_iCal_ValueDataType { //from http://www.gbiv.com/protocols/uri/rfc/rfc2396.html public static $regexp = "^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?"; public function __construct($v) { if (preg_match(self::$regexp, $v)) { $this->_value = $v; } else { trigger_error("URI $v does not appear to be a valid uri", E_USER_WARNING); } } } /** * Implements a UTC offset value type * * @category File * @package iCal */ class File_iCal_ValueDataType_UTCOffset extends File_iCal_ValueDataType { public function __construct($s) { $this->_value = $s; } }
railfuture/tiki-website
lib/ical/iCal/ValueDataType.php
PHP
lgpl-2.1
17,404
[ 30522, 1026, 1029, 25718, 1013, 1008, 25718, 24582, 2389, 8278, 3075, 9385, 1006, 1039, 1007, 2384, 7296, 1055, 6844, 11890, 1026, 7296, 1012, 1055, 6844, 11890, 1030, 2553, 1012, 3968, 2226, 1028, 2023, 3075, 2003, 2489, 4007, 1025, 2017, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>rb-aem manual | 3. Packing and unpacking data</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style type="text/css" media="all"><!--@import url(../full.css);--></style> </head> <body> <h1><img src="../rb-appscript-logo.png" alt="rb-appscript" title="rb-appscript" /></h1> <!-- top navigation --> <div class="navbar"> <a href="02_apioverview.html">Previous</a> &bull; <a href="index.html">Up</a> &bull; <a href="04_references.html">Next</a> <span> <a href="../appscript-manual/index.html">appscript</a> / <a href="../mactypes-manual/index.html">mactypes</a> / <a href="../osax-manual/index.html">osax</a> / <strong><a href="../aem-manual/index.html">aem</a></strong> </span> </div> <!-- content --> <div id="content"> <h2>3. Packing and unpacking data</h2> <h3>Codecs</h3> <p>The <code>AEM::Codecs</code> class provides methods for converting Ruby data to <code>AE::AEDesc</code> objects, and vice-versa.</p> <pre><code>Codecs Constructor: new Methods: # pack/unpack data pack(data) -- convert Ruby data to an AEDesc; will raise a TypeError if data's type/class is unsupported data : anything Result : AEDesc unpack(desc) -- convert an AEDesc to Ruby data; will return the AEDesc unchanged if it's an unsupported type desc : AEDesc Result : anything # compatibility options add_unit_types(types) -- register custom unit type definitions types : list -- a list of lists, where each sublist is of form [name, code, pack_proc, unpack_proc] or [name, code]; if the packer and unpacker procs are omitted, the AEDesc data is packed/ unpacked as a double-precision float dont_cache_unpacked_specifiers -- by default, object specifier descriptors returned by an application are reused for efficiency; invoke this method to use AppleScript-style behavior instead (i.e. fully unpacking and repacking object specifiers each time) for better compatibility with problem applications pack_strings_as_type(code) -- by default, strings are packed as typeUnicodeText descriptors; some older non-Unicode-aware applications may require text to be supplied as typeChar/typeIntlText descriptors code : String -- four-char code, e.g. KAE::TypeChar (see KAE module for available text types) use_ascii_8bit -- by default, text descriptors are unpacked as Strings with UTF-8 Encoding on Ruby 1.9+; invoke this method to mimic Ruby 1.8-style behavior where Strings contain UTF-8 encoded data and ASCII-8BIT Encoding use_datetime -- by default, dates are unpacked as Time instances; invoke this method to unpack dates as DateTime instances instead</code></pre> <h3>AE types</h3> <p>The Apple Event Manager defines several types for representing type/class names, enumerator names, etc. that have no direct equivalent in Ruby. Accordingly, aem defines several classes to represent these types on the Ruby side. All share a common abstract base class, <code>AETypeBase</code>:</p> <pre><code>AETypeBase -- Abstract base class Constructor: new(code) code : str -- a four-character Apple event code Methods: code Result : str -- Apple event code</code></pre> <p>The four concrete classes are:</p> <pre><code>AEType &lt; AETypeBase -- represents an AE object of typeType AEEnum &lt; AETypeBase -- represents an AE object of typeEnumeration AEProp &lt; AETypeBase -- represents an AE object of typeProperty AEKey &lt; AETypeBase -- represents an AE object of typeKeyword</code></pre> </div> <!-- bottom navigation --> <div class="footer"> <a href="02_apioverview.html">Previous</a> &bull; <a href="index.html">Up</a> &bull; <a href="04_references.html">Next</a> </div> </body> </html>
mattgraham/play-graham
vendor/gems/ruby/1.8/gems/rb-appscript-0.6.1/doc/aem-manual/03_packingandunpackingdata.html
HTML
mit
4,487
[ 30522, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 2278, 1013, 1013, 26718, 2094, 1060, 11039, 19968, 1015, 1012, 1014, 9384, 1013, 1013, 4372, 1000, 1000, 8299, 1024, 1013, 1013, 7479, 1012, 1059, 2509, 1012, ...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
--- layout: page title: "ACCT 4825: Experimental Seminar Statistics" comments: true description: "blanks" keywords: "ACCT,4825,CU,Boulder" --- <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script> <!-- <script src="../assets/js/highcharts.js"></script> --> <style type="text/css">@font-face { font-family: "Bebas Neue"; src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype"); } h1.Bebas { font-family: "Bebas Neue", Verdana, Tahoma; } </style> </head> <body> <div id="container" style="float: right; width: 45%; height: 88%; margin-left: 2.5%; margin-right: 2.5%;"></div> <script language="JavaScript"> $(document).ready(function() { var chart = {type: 'column'}; var title = {text: 'Grade Distribution'}; var xAxis = {categories: ['A','B','C','D','F'],crosshair: true}; var yAxis = {min: 0,title: {text: 'Percentage'}}; var tooltip = {headerFormat: '<center><b><span style="font-size:20px">{point.key}</span></b></center>', pointFormat: '<td style="padding:0"><b>{point.y:.1f}%</b></td>', footerFormat: '</table>',shared: true,useHTML: true}; var plotOptions = {column: {pointPadding: 0.0,borderWidth: 0}}; var credits = {enabled: false};var series= [{name: 'Percent',data: [36.0,60.0,0.0,4.0,0.0,]}]; var json = {}; json.chart = chart; json.title = title; json.tooltip = tooltip; json.xAxis = xAxis; json.yAxis = yAxis; json.series = series; json.plotOptions = plotOptions; json.credits = credits; $('#container').highcharts(json); }); </script> </body> #### GRADE AND WORKLOAD STATISTICS **Percent withdrawn**: 0.0% **Percent incomplete**: 0.0% **Average grade** (4.0 scale): 3.3 **Standard deviation in grades** (4.0 scale): 0.0 **Average workload** (raw): 2.62 **Standard deviation in workload** (raw): 0.0 #### COURSE AND INSTRUCTOR RATINGS/INFORMATION **Average course rating** (6 point scale): 5.32 **Standard deviation in course rating** (6 point scale): 0.0 **Average instructor rating** (6 point scale): 5.86 **Standard deviation in instructor rating** (6 point scale): 0.0 **Instructors**: <a href='../../instructors/Susan_Morley'>Susan Morley</a> #### GENERAL CLASS INFORMATION **Years provided**: Fall 2011 **Credits**: 3 **RAP/Honors class?** Neither **Number of Sections**: 1 **Department**: BADM **College**: Leeds School of Business **Level**: Upper **Activity**: LEC - Lecture
nikhilrajaram/nikhilrajaram.github.io
courses/ACCT-4825.md
Markdown
mit
2,593
[ 30522, 1011, 1011, 1011, 9621, 1024, 3931, 2516, 1024, 1000, 16222, 2102, 4466, 17788, 1024, 6388, 18014, 6747, 1000, 7928, 1024, 2995, 6412, 1024, 1000, 8744, 2015, 1000, 3145, 22104, 1024, 1000, 16222, 2102, 1010, 4466, 17788, 1010, 12731...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- /fasttmp/mkdist-qt-4.3.5-1211793125/qtopia-core-opensource-src-4.3.5/src/qt3support/sql/q3sqlpropertymap.cpp --> <head> <title>Qt 4.3: Q3SqlPropertyMap Class Reference</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://www.trolltech.com/products/qt"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></a></td> <td width="1">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td> <td align="right" valign="top" width="230"><a href="http://www.trolltech.com"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></a></td></tr></table><h1 align="center">Q3SqlPropertyMap Class Reference<br /><sup><sup>[<a href="qt3support.html">Qt3Support</a> module]</sup></sup></h1> <p>The Q3SqlPropertyMap class is used to map widgets to SQL fields. <a href="#details">More...</a></p> <pre> #include &lt;Q3SqlPropertyMap&gt;</pre><p><b>This class is part of the Qt 3 support library.</b> It is provided to keep old source code working. We strongly advise against using it in new code. See <a href="porting4.html#qsqlpropertymap">Porting to Qt 4</a> for more information.</p> <ul> <li><a href="q3sqlpropertymap-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h3>Public Functions</h3> <ul> <li><div class="fn"/><b><a href="q3sqlpropertymap.html#Q3SqlPropertyMap">Q3SqlPropertyMap</a></b> ()</li> <li><div class="fn"/>virtual <b><a href="q3sqlpropertymap.html#dtor.Q3SqlPropertyMap">~Q3SqlPropertyMap</a></b> ()</li> <li><div class="fn"/>void <b><a href="q3sqlpropertymap.html#insert">insert</a></b> ( const QString &amp; <i>classname</i>, const QString &amp; <i>property</i> )</li> <li><div class="fn"/>QVariant <b><a href="q3sqlpropertymap.html#property">property</a></b> ( QWidget * <i>widget</i> )</li> <li><div class="fn"/>void <b><a href="q3sqlpropertymap.html#remove">remove</a></b> ( const QString &amp; <i>classname</i> )</li> <li><div class="fn"/>virtual void <b><a href="q3sqlpropertymap.html#setProperty">setProperty</a></b> ( QWidget * <i>widget</i>, const QVariant &amp; <i>value</i> )</li> </ul> <a name="static-public-members"></a> <h3>Static Public Members</h3> <ul> <li><div class="fn"/>Q3SqlPropertyMap * <b><a href="q3sqlpropertymap.html#defaultMap">defaultMap</a></b> ()</li> <li><div class="fn"/>void <b><a href="q3sqlpropertymap.html#installDefaultMap">installDefaultMap</a></b> ( Q3SqlPropertyMap * <i>map</i> )</li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The Q3SqlPropertyMap class is used to map widgets to SQL fields.</p> <p>The SQL module uses Qt <a href="properties.html">object properties</a> to insert and extract values from editor widgets.</p> <p>This class is used to map editors to SQL fields. This works by associating SQL editor class names to the properties used to insert and extract values to/from the editor.</p> <p>For example, a <a href="qlineedit.html">QLineEdit</a> can be used to edit text strings and other data types in Q3DataTables or Q3SqlForms. Several properties are defined in <a href="qlineedit.html">QLineEdit</a>, but only the <i>text</i> property is used to insert and extract text from a <a href="qlineedit.html">QLineEdit</a>. Both <a href="q3datatable.html">Q3DataTable</a> and <a href="q3sqlform.html">Q3SqlForm</a> use the global Q3SqlPropertyMap for inserting and extracting values to and from an editor widget. The global property map defines several common widgets and properties that are suitable for many applications. You can add and remove widget properties to suit your specific needs.</p> <p>If you want to use custom editors with your <a href="q3datatable.html">Q3DataTable</a> or <a href="q3sqlform.html">Q3SqlForm</a>, you must install your own Q3SqlPropertyMap for that table or form. Example:</p> <pre> Q3SqlPropertyMap *myMap = new Q3SqlPropertyMap(); Q3SqlForm *myForm = new Q3SqlForm(this); MyEditor myEditor(this); <span class="comment"> //</span> Set the Q3SqlForm's record buffer to the update buffer of <span class="comment"> //</span> a pre-existing Q3SqlCursor called 'cur'. myForm-&gt;setRecord(cur-&gt;primeUpdate()); <span class="comment"> //</span> Install the customized map myMap-&gt;insert(&quot;MyEditor&quot;, &quot;content&quot;); myForm-&gt;installPropertyMap(myMap); <span class="comment">//</span> myForm now owns myMap ... <span class="comment"> //</span> Insert a field into the form that uses a myEditor to edit the <span class="comment"> //</span> field 'somefield' myForm-&gt;insert(&amp;myEditor, &quot;somefield&quot;); <span class="comment"> //</span> Update myEditor with the value from the mapped database field myForm-&gt;readFields(); ... <span class="comment"> //</span> Let the user edit the form ... <span class="comment"> //</span> Update the database fields with the values in the form myForm-&gt;writeFields(); ...</pre> <p>You can also replace the global Q3SqlPropertyMap that is used by default. (Bear in mind that Q3SqlPropertyMap takes ownership of the new default map.)</p> <pre> Q3SqlPropertyMap *myMap = new Q3SqlPropertyMap; myMap-&gt;insert(&quot;MyEditor&quot;, &quot;content&quot;); Q3SqlPropertyMap::installDefaultMap(myMap); ...</pre> <p>See also <a href="q3datatable.html">Q3DataTable</a>, <a href="q3sqlform.html">Q3SqlForm</a>, and <a href="q3sqleditorfactory.html">Q3SqlEditorFactory</a>.</p> <hr /> <h2>Member Function Documentation</h2> <h3 class="fn"><a name="Q3SqlPropertyMap"></a>Q3SqlPropertyMap::Q3SqlPropertyMap ()</h3> <p>Constructs a <a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a>.</p> <p>The default property mappings used by Qt widgets are:</p> <p><table align="center" cellpadding="2" cellspacing="1" border="0"> <thead><tr valign="top" class="qt-style"><th>Widgets</th><th>Property</th></tr></thead> <tr valign="top" class="odd"><td><a href="qcheckbox.html">QCheckBox</a>, <a href="qradiobutton.html">QRadioButton</a></td><td>checked</td></tr> <tr valign="top" class="even"><td><a href="qcombobox.html">QComboBox</a>, <a href="q3listbox.html">Q3ListBox</a></td><td>currentItem</td></tr> <tr valign="top" class="odd"><td><a href="q3dateedit.html">Q3DateEdit</a></td><td>date</td></tr> <tr valign="top" class="even"><td><a href="q3datetimeedit.html">Q3DateTimeEdit</a> <a href="qdatetimeedit.html">QDateTimeEdit</a></td><td>dateTime</td></tr> <tr valign="top" class="odd"><td><a href="qtextbrowser.html">QTextBrowser</a></td><td>source</td></tr> <tr valign="top" class="even"><td><a href="qabstractbutton.html">QAbstractButton</a>, <a href="qdial.html">QDial</a>, <a href="qlabel.html">QLabel</a>, <a href="qlineedit.html">QLineEdit</a>, <a href="q3multilineedit.html">Q3MultiLineEdit</a>, <a href="qpushbutton.html">QPushButton</a>, <a href="qtextedit.html">QTextEdit</a>,</td><td>text</td></tr> <tr valign="top" class="odd"><td><a href="q3timeedit.html">Q3TimeEdit</a></td><td>time</td></tr> <tr valign="top" class="even"><td><a href="qlcdnumber.html">QLCDNumber</a>, <a href="qscrollbar.html">QScrollBar</a> <a href="qslider.html">QSlider</a>, <a href="qspinbox.html">QSpinBox</a></td><td>value</td></tr> </table></p> <h3 class="fn"><a name="dtor.Q3SqlPropertyMap"></a>Q3SqlPropertyMap::~Q3SqlPropertyMap ()&nbsp;&nbsp;<tt> [virtual]</tt></h3> <p>Destroys the <a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a>.</p> <p>Note that if the <a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a> is installed with installPropertyMap() the object it was installed into, e.g&#x2e; the <a href="q3sqlform.html">Q3SqlForm</a>, takes ownership and will delete the <a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a> when necessary.</p> <h3 class="fn"><a name="defaultMap"></a>Q3SqlPropertyMap * Q3SqlPropertyMap::defaultMap ()&nbsp;&nbsp;<tt> [static]</tt></h3> <p>Returns the application global <a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a>.</p> <h3 class="fn"><a name="insert"></a>void Q3SqlPropertyMap::insert ( const <a href="qstring.html">QString</a> &amp; <i>classname</i>, const <a href="qstring.html">QString</a> &amp; <i>property</i> )</h3> <p>Insert a new classname/property pair, which is used for custom SQL field editors. There <i>must</i> be a <a href="qobject.html#Q_PROPERTY">Q_PROPERTY</a>() clause in the <i>classname</i> class declaration for the <i>property</i>.</p> <h3 class="fn"><a name="installDefaultMap"></a>void Q3SqlPropertyMap::installDefaultMap ( Q3SqlPropertyMap * <i>map</i> )&nbsp;&nbsp;<tt> [static]</tt></h3> <p>Replaces the global default property map with <i>map</i>. All <a href="q3datatable.html">Q3DataTable</a> and <a href="q3sqlform.html">Q3SqlForm</a> instantiations will use this new map for inserting and extracting values to and from editors. <i><a href="q3sqlpropertymap.html">Q3SqlPropertyMap</a> takes ownership of <i>map</i>, and destroys it when it is no longer needed.</i></p> <h3 class="fn"><a name="property"></a><a href="qvariant.html">QVariant</a> Q3SqlPropertyMap::property ( <a href="qwidget.html">QWidget</a> * <i>widget</i> )</h3> <p>Returns the mapped property of <i>widget</i> as a <a href="qvariant.html">QVariant</a>.</p> <p>See also <a href="q3sqlpropertymap.html#setProperty">setProperty</a>().</p> <h3 class="fn"><a name="remove"></a>void Q3SqlPropertyMap::remove ( const <a href="qstring.html">QString</a> &amp; <i>classname</i> )</h3> <p>Removes <i>classname</i> from the map.</p> <h3 class="fn"><a name="setProperty"></a>void Q3SqlPropertyMap::setProperty ( <a href="qwidget.html">QWidget</a> * <i>widget</i>, const <a href="qvariant.html">QVariant</a> &amp; <i>value</i> )&nbsp;&nbsp;<tt> [virtual]</tt></h3> <p>Sets the property of <i>widget</i> to <i>value</i>.</p> <p>See also <a href="q3sqlpropertymap.html#property">property</a>().</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="30%">Copyright &copy; 2008 <a href="trolltech.html">Trolltech</a></td> <td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="30%" align="right"><div align="right">Qt 4.3.5</div></td> </tr></table></div></address></body> </html>
misizeji/StudyNote_201308
webserver/html/q3sqlpropertymap.html
HTML
mit
10,971
[ 30522, 1026, 1029, 20950, 2544, 1027, 1000, 1015, 1012, 1014, 1000, 17181, 1027, 1000, 11163, 1011, 6070, 28154, 1011, 1015, 1000, 1029, 1028, 1026, 999, 9986, 13874, 16129, 2270, 1000, 1011, 1013, 1013, 1059, 2509, 30524, 1027, 1000, 8299,...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
/* * Copyright (c) 2015 Aysenur Bilgin */ /* * To change this template, choose Tools | Templates * and open the template in the editor. */ package fcc; import fuzzylogic.generic.Resource; import fuzzylogic.generic.Tuple; import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; import java.util.Map; import java.util.TreeMap; /** * FCCResource is a data type finding its own labels * given the range of inputs and also finding the critical values such as the min, max, most prevailing etc. * @author abilgin */ public class FCCResource implements Serializable{ private Map<Double, Integer> experience; //holds the numeric past data as experience in a structured way with the count of occurrences private Map<Integer, String> codebook; private ArrayList<Resource> resources; private Tuple support; private Word linguistics; private double min; private double max; public FCCResource(Word linguisticVarData, Map<Integer, String> codebook, ArrayList<Double> experienceData) { this.linguistics = linguisticVarData; this.experience = new TreeMap<Double,Integer>(); this.codebook = new TreeMap<Integer, String>(); this.codebook.putAll(codebook); this.resources = new ArrayList<Resource>(); this.support = new Tuple(); setAllExperience(experienceData); setAnalytics(); } public FCCResource(FCCResource fccres) { this.experience = new TreeMap<Double, Integer>(); this.experience = fccres.getExperience(); this.codebook = new TreeMap<Integer, String>(); this.codebook = fccres.getCodebook(); this.resources = new ArrayList<Resource>(); this.resources = fccres.getResources(); this.support = new Tuple(fccres.getSupport()); this.linguistics = new Word(fccres.getLinguistics()); this.min = fccres.getMin(); this.max = fccres.getMax(); } /** * Get the raw experience data and store it in a structured way with occurrences * @param rawExperience */ private void setAllExperience(ArrayList<Double> rawExperience) { double val; int count = 0; for (int i = 0; i < rawExperience.size(); i++) { val = rawExperience.get(i); if( !this.experience.containsKey(val)) { this.experience.put(val, 0 ); } this.experience.put(val, this.experience.get(val) + 1); count++; } } public void addToExperience(double val) { if( !this.experience.containsKey(val)) { this.experience.put(val, 0 ); } this.experience.put(val, this.experience.get(val) + 1); resetForAnalytics(); setAnalytics(); } private void setAnalytics() { //find the relevant data from the experience if (!this.experience.isEmpty()) { //find the weighted average double avg = findAverage(); Map<Double, Integer> negTemp = new TreeMap(); Map<Double, Integer> posTemp = new TreeMap(); //divide experience into two perceptions according to the average value for (Double key: this.experience.keySet()) { int value = this.experience.get(key); //if the value is smaller than average put it on the negative perception if (key <= avg) { negTemp.put(key, value); } else { posTemp.put(key, value); } } //then further divide the negative and positive perception into modifiers //the criteria is to break the stream into the number of codebook contents int minnumberofelements = (int) Math.ceil((double)negTemp.size()/(double)codebook.size()); String s; Map<Double, Integer> partialresource = new TreeMap<Double, Integer>(); int counter = 1, modifiercode = 0; for (Map.Entry <Double, Integer> current : negTemp.entrySet()) { partialresource.put(current.getKey(), current.getValue()); //then it is time to change the resource if (counter >= minnumberofelements) { s = (new StringBuilder()).append(codebook.get(modifiercode)).append(" ").append(this.linguistics.getNegPerception()).toString(); this.resources.add(new Resource(s, partialresource)); //System.out.println("FCCResource - resources: "+this.resources.toString()); partialresource = new TreeMap<Double, Integer>(); modifiercode++; counter = 0; } counter++; } //for the last set of resources repeat the operation //if you have not consumed all of the modifiers!! while (codebook.get(modifiercode)!= null) { s = (new StringBuilder()).append(codebook.get(modifiercode)).append(" ").append(this.linguistics.getNegPerception()).toString(); //if the prevailing value is smaller than the previous one //it means that there not enough members in the array //so duplicate the values but not the string if (partialresource.isEmpty()) { partialresource = this.resources.get(this.resources.size()-1).getExperience(); } this.resources.add(new Resource(s, partialresource)); modifiercode++; } //repeat for the right perception minnumberofelements = (int) Math.ceil((double)posTemp.size()/(double)codebook.size()); partialresource = new TreeMap<Double, Integer>(); counter = 1; modifiercode = codebook.size()-1; for (Map.Entry <Double, Integer> current : posTemp.entrySet()) { partialresource.put(current.getKey(), current.getValue()); //then it is time to change the resource if (counter >= minnumberofelements) { s = (new StringBuilder()).append(codebook.get(modifiercode)).append(" ").append(this.linguistics.getPosPerception()).toString(); this.resources.add(new Resource(s, partialresource)); partialresource = new TreeMap<Double, Integer>(); modifiercode--; counter = 0; } counter++; } //for the last set of resources repeat the operation while (codebook.get(modifiercode) != null) { s = (new StringBuilder()).append(codebook.get(modifiercode)).append(" ").append(this.linguistics.getPosPerception()).toString(); if (partialresource.isEmpty()) { partialresource = this.resources.get(this.resources.size()-1).getExperience(); } this.resources.add(new Resource(s, partialresource)); modifiercode--; } reviseAndCorrectRecource(); double mintemp = Double.POSITIVE_INFINITY, maxtemp = Double.NEGATIVE_INFINITY; //try finding the min max from experience not resource for (Double d: this.experience.keySet()) { if(d < mintemp) { mintemp = d; } if(d > maxtemp) { maxtemp = d; } } this.min = mintemp; this.max = maxtemp; this.support = new Tuple(min, max); } } private double findAverage() { double sumnom = 0.0, sumdenom = 0.0; for (Double key : this.experience.keySet()) { sumnom += key * this.experience.get(key); sumdenom += this.experience.get(key); } return sumnom/sumdenom; } public Map<Integer, String> getCodebook() { return this.codebook; } public Map<Double, Integer> getExperience() { return this.experience; } public ArrayList<Resource> getResources() { return this.resources; } public int getNumberofResources() { return this.resources.size(); } public Tuple getSupport() { return this.support; } public double getMin() { return this.min; } public double getMax() { return this.max; } public Word getLinguistics() { return this.linguistics; } @Override public String toString() { String s = ""; s = (new StringBuilder()).append(s).append("FCCResource: ").append(this.experience.toString()).toString(); return s; } private void resetForAnalytics() { this.resources = new ArrayList<Resource>(); this.support = new Tuple(); } /** * Method looks at the resource and tries to differentiate between the values for prevailing numbers * because in the future when they are put into a map, data is lost * also can be regarded as forcing the number of elements to be processed to be the same throughout the entire implementation * the idea is simply assumed to add a dummy value to each */ private void reviseAndCorrectRecource() { boolean duplicateflag = false; Map<Double, Integer> occmap = new TreeMap<Double, Integer>(); for (Resource r: this.resources) { if (!occmap.containsKey(r.getPrevailingValue())) { occmap.put(r.getPrevailingValue(), 0); } else { duplicateflag = true; } occmap.put(r.getPrevailingValue(), occmap.get(r.getPrevailingValue()) + 1); } if (!duplicateflag) { return; } //now correction should be applied //find the values having more than 1 occurrence Iterator<Map.Entry<Double, Integer>> it = occmap.entrySet().iterator(); Map<Double, Integer> occmapcopy = new TreeMap<Double, Integer>(); //create a copy of the map for (Map.Entry<Double, Integer> e: occmap.entrySet()) { occmapcopy.put(e.getKey(), e.getValue()); } Iterator<Map.Entry<Double, Integer>> innerit = occmapcopy.entrySet().iterator(); double prev = -1.0; while (it.hasNext()) { Map.Entry entry = (Map.Entry)it.next(); Map.Entry entryin = (Map.Entry)innerit.next(); double d = (Double)entry.getKey(); if (occmap.get(d) > 1) { //then d has a duplicate //find the value d in resources and adapt it //System.out.println("Duplicate found!!"); for (int i = 0; i < this.resources.size(); i++) { if (d == this.resources.get(i).getPrevailingValue()) { //check whether there is a value after it double afterval, inc; if (it.hasNext()) { entryin = (Map.Entry)innerit.next(); afterval = (Double)entryin.getKey(); inc = (afterval - d) / (2.0D * (occmap.get(d)-1)); for (int j = 0; j < occmap.get(d)-1; j++) { this.resources.get(i+j+1).setPrevailingValue(d+(inc*(j+1))); this.resources.get(i+j+1).setWeightedAvg(d+(inc*(j+1))); } i = i + occmap.get(d)-1; } else { //since this is the last one decrease it //apply the same idea with the prev value inc = (d - prev) / (2.0D * (occmap.get(d)-1)); for (int j = occmap.get(d)-1; j > 0; j--) { this.resources.get(i+j-1).setPrevailingValue(d-(inc*j)); this.resources.get(i+j-1).setWeightedAvg(d-(inc*j)); } i = i + occmap.get(d)-1; } } else { //System.out.println("Do nothing!"); } }//end for //reset the iterator innerit = occmapcopy.entrySet().iterator(); } prev = d; }// end while } }
aysenurbilgin/cww_framework
src/fcc/FCCResource.java
Java
apache-2.0
13,282
[ 30522, 1013, 1008, 1008, 9385, 1006, 1039, 1007, 2325, 1037, 23274, 11231, 2099, 12170, 2140, 11528, 1008, 1013, 1013, 1008, 1008, 2000, 2689, 2023, 23561, 1010, 5454, 5906, 1064, 23561, 2015, 1008, 1998, 2330, 1996, 23561, 1999, 1996, 3559...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
# frozen_string_literal: true name 'travis_packer_templates' maintainer 'Travis CI GmbH' maintainer_email 'contact+travis-packer-templates-cookbook@travis-ci.org' license 'MIT' description 'Installs/Configures travis_packer_templates' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) version '0.1.0' source_url 'https://github.com/travis-ci/packer-templates' issues_url 'https://github.com/travis-ci/packer-templates/issues'
travis-ci/packer-templates
cookbooks/travis_packer_templates/metadata.rb
Ruby
mit
450
[ 30522, 1001, 7708, 1035, 5164, 1035, 18204, 1024, 2995, 2171, 1005, 10001, 1035, 5308, 2121, 1035, 23561, 2015, 1005, 5441, 2121, 1005, 10001, 25022, 18289, 1005, 5441, 2121, 1035, 10373, 1005, 3967, 1009, 10001, 1011, 5308, 2121, 1011, 235...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if SERVER then AddCSLuaFile("shared.lua") end if CLIENT then SWEP.PrintName = "Wrench" SWEP.Slot = 2 SWEP.SlotPos = 1 SWEP.DrawAmmo = false SWEP.DrawCrosshair = false end SWEP.Author = "RedMist" SWEP.Instructions = "Left Click: Fix a car" SWEP.Contact = "" SWEP.Purpose = "" SWEP.ViewModelFOV = 62 SWEP.ViewModelFlip = false SWEP.AnimPrefix = "rpg" SWEP.Spawnable = false SWEP.AdminSpawnable = true SWEP.Primary.ClipSize = -1 SWEP.Primary.DefaultClip = 0 SWEP.Primary.Automatic = false SWEP.Primary.Ammo = "" SWEP.Secondary.ClipSize = -1 SWEP.Secondary.DefaultClip = 0 SWEP.Secondary.Automatic = false SWEP.Secondary.Ammo = "" SWEP.AnimPrefix = "stunstick" SWEP.ViewModel = "models/weapons/v_basebat.mdl" SWEP.WorldModel = "models/weapons/W_basebat.mdl" function SWEP:Initialize() self:SetWeaponHoldType("melee") end function SWEP:PrimaryAttack() self.Owner:SetAnimation(PLAYER_ATTACK1); self.Weapon:EmitSound("npc/vort/claw_swing" .. math.random(1, 2) .. ".wav"); self.Weapon:SendWeaponAnim(ACT_VM_HITCENTER); self.Weapon:SetNextPrimaryFire(CurTime() + 1) self.Weapon:SetNextSecondaryFire(CurTime() + 1) local EyeTrace = self.Owner:GetEyeTrace(); local Distance = self.Owner:EyePos():Distance(EyeTrace.HitPos); if Distance > 75 then return false; end if CLIENT then if(ValidEntity(EyeTrace.Entity) and EyeTrace.Entity:IsVehicle()) then for i=0, 1.3, 0.3 do timer.Simple(i, function() local num = (math.random(1,2) == 1 and math.random(1, 3)) or math.random(5, 8) EyeTrace.Entity:EmitSound("npc/dog/dog_servo" .. num .. ".wav") end) end end else if(ValidEntity(EyeTrace.Entity) and EyeTrace.Entity:IsVehicle() and EyeTrace.Entity:GetTable().CarDamage) then if(EyeTrace.Entity:GetTable().CarDamage > 49 and EyeTrace.Entity.Disabled) then EyeTrace.Entity.Disabled = false; EyeTrace.Entity:SetColor(255, 255, 255, 255); EyeTrace.Entity:Fire('turnon', '', .5) else EyeTrace.Entity:GetTable().CarDamage = math.Clamp(EyeTrace.Entity:GetTable().CarDamage + 5, 0, 54) EyeTrace.Entity:FixTires() for i=0, 1.3, 0.3 do timer.Simple(i, function() if(ValidEntity(EyeTrace.Entity)) then local num = (math.random(1,2) == 1 and math.random(1, 3)) or math.random(5, 8) EyeTrace.Entity:EmitSound("npc/dog/dog_servo" .. num .. ".wav") end end) end local i = (EyeTrace.Entity:GetTable().CarDamage * 4) EyeTrace.Entity:SetColor(math.Clamp(50 + i, 0, 255), math.Clamp(50 + i, 0, 255), math.Clamp(50 + i, 0, 255), 255) end end end end function SWEP:SecondaryAttack() self:PrimaryAttack(); end
msburgess3200/PERP
gamemodes/perp/entities/weapons/car_wrench/shared.lua
Lua
mit
2,641
[ 30522, 2065, 8241, 2059, 5587, 6169, 7630, 10354, 9463, 1006, 1000, 4207, 1012, 11320, 2050, 1000, 1007, 2203, 2065, 7396, 2059, 25430, 13699, 1012, 6140, 18442, 1027, 1000, 16255, 2818, 1000, 25430, 13699, 1012, 10453, 1027, 1016, 25430, 1...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
const uint8_t HEART_OPEN[8] = { B01100110, B10011001, B10000001, B10000001, B01000010, B00100100, B00011000, B00000000 }; const uint8_t HEART_FILLED[8] = { B01100110, B11111111, B11111111, B11111111, B01111110, B00111100, B00011000, B00000000 }; const uint8_t SMILEY_HAPPY[8] = { B00111100, B01000010, B10100101, B10000001, B10100101, B10011001, B01000010, B00111100 }; // https://github.com/willmendesneto/arduino-matrix-8x8/blob/master/libraries/LEDMatrix/7x5/font.h const unsigned char Font[166][7] = { // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // ! { 0b01000, 0b01000, 0b01000, 0b01000, 0b01000, 0b00000, 0b01000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // # { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // $ { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // % { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // & { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // ' { 0b00100, 0b00100, 0b00100, 0b00000, 0b00000, 0b00000, 0b00000 }, // ( { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // ) { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // + { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // - { 0b00000, 0b00000, 0b00000, 0b11110, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, //0 { 0b01110, 0b10001, 0b10011, 0b10101, 0b11001, 0b10001, 0b01110 }, //1 { 0b00100, 0b01100, 0b00100, 0b00100, 0b00100, 0b00100, 0b01110 }, //2 { 0b01110, 0b10001, 0b00001, 0b00010, 0b00100, 0b01000, 0b11111 }, //3 { 0b11111, 0b00010, 0b00100, 0b00010, 0b00001, 0b10001, 0b01110 }, //4 { 0b00010, 0b00110, 0b01010, 0b10010, 0b11111, 0b00010, 0b00010 }, //5 { 0b11111, 0b10000, 0b11111, 0b00001, 0b00001, 0b10001, 0b01110 }, //6 { 0b00110, 0b01000, 0b10000, 0b11110, 0b10001, 0b10001, 0b01110 }, //7 { 0b11111, 0b00001, 0b00010, 0b00100, 0b01000, 0b10000, 0b10000 }, //8 { 0b01110, 0b10001, 0b10001, 0b01110, 0b10001, 0b10001, 0b01110 }, //9 { 0b01110, 0b10001, 0b10001, 0b01111, 0b00001, 0b00010, 0b01100 }, //: { 0b00000, 0b01100, 0b01100, 0b00000, 0b01100, 0b01100, 0b00000 }, //; { 0b00000, 0b01100, 0b01100, 0b00000, 0b01100, 0b00100, 0b01000 }, //< { 0b00010, 0b00100, 0b01000, 0b10000, 0b01000, 0b00100, 0b00010 }, //= { 0b00000, 0b00000, 0b11111, 0b00000, 0b11111, 0b00000, 0b00000 }, //> { 0b01000, 0b00100, 0b00010, 0b00001, 0b00010, 0b00100, 0b01000 }, //? { 0b01110, 0b10001, 0b00001, 0b00010, 0b00100, 0b00000, 0b00100 }, //@ { 0b01110, 0b10001, 0b00001, 0b01101, 0b10101, 0b10101, 0b01110 }, //A { 0b01110, 0b10001, 0b10001, 0b10001, 0b11111, 0b10001, 0b10001 }, //B { 0b11110, 0b10001, 0b10001, 0b11110, 0b10001, 0b10001, 0b11110 }, //C { 0b01110, 0b10001, 0b10000, 0b10000, 0b10000, 0b10001, 0b01110 }, //D { 0b11100, 0b10010, 0b10001, 0b10001, 0b10001, 0b10010, 0b11100 }, //E { 0b11111, 0b10000, 0b10000, 0b11110, 0b10000, 0b10000, 0b11111 }, //F { 0b11111, 0b10000, 0b10000, 0b11110, 0b10000, 0b10000, 0b10000 }, //G { 0b01110, 0b10001, 0b10000, 0b10111, 0b10001, 0b10001, 0b01111 }, //H { 0b10001, 0b10001, 0b10001, 0b11111, 0b10001, 0b10001, 0b10001 }, //I { 0b01110, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100, 0b01110 }, //J { 0b00111, 0b00010, 0b00010, 0b00010, 0b00010, 0b10010, 0b01100 }, //K { 0b10001, 0b10010, 0b10100, 0b11000, 0b10100, 0b10010, 0b10001 }, //L { 0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b10000, 0b11111 }, //M { 0b10001, 0b11011, 0b10101, 0b10101, 0b10001, 0b10001, 0b10001 }, //N { 0b10001, 0b10001, 0b11001, 0b10101, 0b10011, 0b10001, 0b10001 }, //O { 0b01110, 0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b01110 }, //P { 0b11110, 0b10001, 0b10001, 0b11110, 0b10000, 0b10000, 0b10000 }, //Q { 0b01110, 0b10001, 0b10001, 0b10001, 0b10101, 0b10010, 0b01101 }, //R { 0b11110, 0b10001, 0b10001, 0b11110, 0b10100, 0b10010, 0b10001 }, //S { 0b01111, 0b10000, 0b10000, 0b01110, 0b00001, 0b00001, 0b11110 }, //T { 0b11111, 0b10101, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100 }, //U { 0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b01110 }, //V { 0b10001, 0b10001, 0b10001, 0b10001, 0b10001, 0b01010, 0b00100 }, //W { 0b10001, 0b10001, 0b10001, 0b10101, 0b10101, 0b10101, 0b01010 }, //X { 0b10001, 0b10001, 0b01010, 0b00100, 0b01010, 0b10001, 0b10001 }, //Y { 0b10001, 0b10001, 0b10001, 0b01110, 0b00100, 0b00100, 0b00100 }, //Z { 0b11111, 0b00001, 0b00010, 0b00100, 0b01000, 0b10000, 0b11111 }, //[ { 0b01110, 0b01000, 0b01000, 0b01000, 0b01000, 0b01000, 0b01110 }, // { 0b10001, 0b01010, 0b11111, 0b00100, 0b11111, 0b00100, 0b00100 }, //] { 0b01110, 0b00010, 0b00010, 0b00010, 0b00010, 0b00010, 0b01110 }, //^ { 0b00100, 0b01010, 0b10001, 0b00000, 0b00000, 0b00000, 0b00000 }, //_ { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b11111 }, //` { 0b01000, 0b00100, 0b00010, 0b00000, 0b00000, 0b00000, 0b00000 }, //a { 0b00000, 0b00000, 0b01110, 0b00001, 0b01111, 0b10001, 0b01111 }, //b { 0b10000, 0b10000, 0b10110, 0b11001, 0b10001, 0b10001, 0b11110 }, //c { 0b00000, 0b00000, 0b01110, 0b10000, 0b10000, 0b10001, 0b01110 }, //d { 0b00001, 0b00001, 0b01101, 0b10011, 0b10001, 0b10001, 0b01111 }, //e { 0b00000, 0b00000, 0b01110, 0b10001, 0b11111, 0b10000, 0b01110 }, //f { 0b00110, 0b01001, 0b01000, 0b11110, 0b01000, 0b01000, 0b01000 }, //g { 0b00000, 0b01111, 0b10001, 0b10001, 0b01111, 0b00001, 0b01110 }, //h { 0b10000, 0b10000, 0b10110, 0b11001, 0b10001, 0b10001, 0b10001 }, //i { 0b00100, 0b00000, 0b01100, 0b00100, 0b00100, 0b00100, 0b01110 }, //j { 0b00010, 0b00000, 0b00110, 0b00010, 0b00010, 0b10010, 0b01100 }, //k { 0b10000, 0b10000, 0b10010, 0b10100, 0b11000, 0b10100, 0b10010 }, //l { 0b01100, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100, 0b01110 }, //m { 0b00000, 0b00000, 0b11010, 0b10101, 0b10101, 0b10101, 0b10101 }, //n { 0b00000, 0b00000, 0b10110, 0b11001, 0b10001, 0b10001, 0b10001 }, //o { 0b00000, 0b00000, 0b01110, 0b10001, 0b10001, 0b10001, 0b01110 }, //p { 0b00000, 0b00000, 0b11110, 0b10001, 0b11110, 0b10000, 0b10000 }, //q { 0b00000, 0b00000, 0b01101, 0b10011, 0b01111, 0b00001, 0b00001 }, //r { 0b00000, 0b00000, 0b10110, 0b11001, 0b10000, 0b10000, 0b10000 }, //s { 0b00000, 0b00000, 0b01110, 0b10000, 0b01110, 0b00001, 0b11110 }, //t { 0b01000, 0b01000, 0b11111, 0b01000, 0b01000, 0b01001, 0b00110 }, //u { 0b00000, 0b00000, 0b10001, 0b10001, 0b10001, 0b10011, 0b01101 }, //v { 0b00000, 0b00000, 0b10001, 0b10001, 0b10001, 0b01010, 0b00100 }, //w { 0b00000, 0b00000, 0b10001, 0b10001, 0b10101, 0b10101, 0b01010 }, //x { 0b00000, 0b00000, 0b10001, 0b01010, 0b00100, 0b01010, 0b10001 }, //y { 0b00000, 0b00000, 0b10001, 0b10001, 0b01111, 0b00001, 0b01110 }, //z { 0b00000, 0b00000, 0b11111, 0b00010, 0b01000, 0b10000, 0b11111 }, // { { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // | { 0b00100, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100, 0b00100 }, // } { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // DEL { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // Ç { 0b01110, 0b10001, 0b10000, 0b10000, 0b10000, 0b10001, 0b01110 }, // ü { 0b01010, 0b00000, 0b10001, 0b10001, 0b10001, 0b10011, 0b01101 }, // é { 0b00010, 0b00100, 0b01110, 0b10001, 0b11111, 0b10000, 0b01110 }, // â { 0b00100, 0b01010, 0b01110, 0b00001, 0b01111, 0b10001, 0b01111 }, // ä { 0b01010, 0b00000, 0b01110, 0b00001, 0b01111, 0b10001, 0b01111 }, // à { 0b01000, 0b00100, 0b01110, 0b00001, 0b01111, 0b10001, 0b01111 }, // å { 0b00000, 0b00000, 0b01110, 0b00001, 0b01111, 0b10001, 0b01111 }, // ç { 0b00000, 0b00000, 0b01110, 0b10000, 0b10000, 0b10001, 0b01110 }, // ê { 0b00100, 0b01010, 0b01110, 0b10001, 0b11111, 0b10000, 0b01110 }, // ë { 0b01010, 0b00000, 0b01110, 0b10001, 0b11111, 0b10000, 0b01110 }, // è { 0b01000, 0b00100, 0b01110, 0b10001, 0b11111, 0b10000, 0b01110 }, // ï { 0b01010, 0b00000, 0b01100, 0b00100, 0b00100, 0b00100, 0b01110 }, // î { 0b00100, 0b00000, 0b01100, 0b00100, 0b00100, 0b00100, 0b01110 }, // ì { 0b00100, 0b00000, 0b01100, 0b00100, 0b00100, 0b00100, 0b01110 }, // Ä { 0b01110, 0b10001, 0b10001, 0b10001, 0b11111, 0b10001, 0b10001 }, // Å { 0b01110, 0b10001, 0b10001, 0b10001, 0b11111, 0b10001, 0b10001 }, // É { 0b11111, 0b10000, 0b10000, 0b11110, 0b10000, 0b10000, 0b11111 }, // æ { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // Æ { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // ô { 0b00000, 0b00000, 0b01110, 0b10001, 0b10001, 0b10001, 0b01110 }, // ö { 0b01010, 0b00000, 0b01110, 0b10001, 0b10001, 0b10001, 0b01110 }, // ò { 0b00000, 0b00000, 0b01110, 0b10001, 0b10001, 0b10001, 0b01110 }, // û { 0b00000, 0b00000, 0b10001, 0b10001, 0b10001, 0b10011, 0b01101 }, // ù { 0b00000, 0b00000, 0b10001, 0b10001, 0b10001, 0b10011, 0b01101 }, // ÿ { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // Ö { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // Ü { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // {155} { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // {156} { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // {157} { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // {158} { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // {159} { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // á { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // í { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // ó { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // ú { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // ñ { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 }, // Ñ { 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000, 0b00000 } };
tonsmets/WSLedMatrix
esp8266_arduino/statics.h
C
gpl-3.0
17,394
[ 30522, 9530, 3367, 21318, 3372, 2620, 1035, 1056, 2540, 1035, 2330, 1031, 1022, 1033, 1027, 1063, 1038, 24096, 18613, 14526, 2692, 1010, 29491, 8889, 14526, 8889, 2487, 1010, 29491, 8889, 8889, 8889, 2487, 1010, 29491, 8889, 8889, 8889, 248...
[ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...