code
stringlengths
3
1.05M
repo_name
stringlengths
4
116
path
stringlengths
4
991
language
stringclasses
9 values
license
stringclasses
15 values
size
int32
3
1.05M
namespace COA.Game.UI.Controls { partial class QuestionSelect { /// <summary> /// Required designer variable. /// </summary> private System.ComponentModel.IContainer components = null; /// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if(disposing && (components != null)) { components.Dispose(); } base.Dispose(disposing); } #region Component Designer generated code /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.questionsTable = new System.Windows.Forms.TableLayoutPanel(); this.structureTable = new System.Windows.Forms.TableLayoutPanel(); this.teamLabel = new System.Windows.Forms.Label(); this.structureTable.SuspendLayout(); this.SuspendLayout(); // // questionsTable // this.questionsTable.ColumnCount = 1; this.questionsTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.questionsTable.Dock = System.Windows.Forms.DockStyle.Fill; this.questionsTable.Location = new System.Drawing.Point(3, 52); this.questionsTable.Name = "questionsTable"; this.questionsTable.RowCount = 1; this.questionsTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.questionsTable.Size = new System.Drawing.Size(484, 435); this.questionsTable.TabIndex = 0; // // structureTable // this.structureTable.ColumnCount = 1; this.structureTable.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); this.structureTable.Controls.Add(this.teamLabel, 0, 0); this.structureTable.Controls.Add(this.questionsTable, 0, 1); this.structureTable.Dock = System.Windows.Forms.DockStyle.Fill; this.structureTable.Location = new System.Drawing.Point(5, 5); this.structureTable.Name = "structureTable"; this.structureTable.RowCount = 2; this.structureTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.structureTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 90F)); this.structureTable.Size = new System.Drawing.Size(490, 490); this.structureTable.TabIndex = 0; // // teamLabel // this.teamLabel.AutoSize = true; this.teamLabel.Dock = System.Windows.Forms.DockStyle.Fill; this.teamLabel.Location = new System.Drawing.Point(3, 0); this.teamLabel.Name = "teamLabel"; this.teamLabel.Size = new System.Drawing.Size(484, 49); this.teamLabel.TabIndex = 1; this.teamLabel.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; // // QuestionSelect // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.Controls.Add(this.structureTable); this.Name = "QuestionSelect"; this.Padding = new System.Windows.Forms.Padding(5); this.Size = new System.Drawing.Size(500, 500); this.structureTable.ResumeLayout(false); this.structureTable.PerformLayout(); this.ResumeLayout(false); } #endregion private System.Windows.Forms.TableLayoutPanel questionsTable; private System.Windows.Forms.TableLayoutPanel structureTable; private System.Windows.Forms.Label teamLabel; } }
svmnotn/cuddly-octo-adventure
Game/UI/Controls/QuestionSelect.Designer.cs
C#
mit
3,812
/** * @license Copyright (c) 2013, Viet Trinh All Rights Reserved. * Available via MIT license. */ /** * A card entity. */ define([ 'framework/entity/base_entity' ], function(BaseEntity) { /** * Constructor. * @param rawObject (optional) * The raw object to create the entity with. */ var Card = function(rawObject) { this.name = null; this.color = null; BaseEntity.call(this, rawObject); return this; }; Card.prototype = new BaseEntity(); BaseEntity.generateProperties(Card); // The card rarities. Card.RARITY = {}; Card.RARITY.MYTHIC = 'M'; Card.RARITY.RARE = 'R'; Card.RARITY.UNCOMMON = 'U'; Card.RARITY.COMMON = 'C'; Card.RARITY.LAND = 'L'; return Card; });
DragonDTG/vex
lib/public/static/scripts/domain/entity/card.js
JavaScript
mit
715
<?php /** * User: Alex Gusev <alex@flancer64.com> */ namespace Praxigento\App\Generic2\Cli\Test\Downline\Init\ReadCsv; /** * Read CSV with downline tree data exported from bonus module and return . */ class Downline { /** Add traits */ use \Praxigento\App\Generic2\Cli\Test\Traits\TReadCsv { readCsvFile as protected; } const A_CUST_ID = \Praxigento\App\Generic2\Cli\Test\Downline\Init::A_CUST_MLM_ID; const A_EMAIL = \Praxigento\App\Generic2\Cli\Test\Downline\Init::A_EMAIL; const A_PARENT_ID = \Praxigento\App\Generic2\Cli\Test\Downline\Init::A_PARENT_MLM_ID; public function do() { $csv = $this->readCsvFile($path = __DIR__ . '/../../../data/downline.csv', 0); $result = []; foreach ($csv as $item) { /* extract read data */ $custMlmId = $item[0]; $parentMlmId = $item[1]; $scheme = $item[2]; // TODO: use it or remove it /* compose working data */ $email = "$custMlmId-migrate@praxigento.com"; if (strlen($parentMlmId) == 0) { /* this is root node */ $parentMlmId = $custMlmId; } $result[$custMlmId] = [ self::A_CUST_ID => $custMlmId, self::A_PARENT_ID => $parentMlmId, self::A_EMAIL => $email ]; } return $result; } }
praxigento/mobi_app_generic_mage2
Cli/Test/Downline/Init/ReadCsv/Downline.php
PHP
mit
1,413
import Ember from 'ember'; import ObjectProxyMixin from '../mixins/object'; export default Ember.ObjectProxy.extend(ObjectProxyMixin, { _storageType: 'session' });
DanielJRaine/employee-forms-auth
node_modules/ember-local-storage/addon/session/object.js
JavaScript
mit
167
<?php namespace webCS\AdminBundle\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class DefaultControllerTest extends WebTestCase { public function testIndex() { $client = static::createClient(); $crawler = $client->request('GET', '/hello/Fabien'); $this->assertTrue($crawler->filter('html:contains("Hello Fabien")')->count() > 0); } }
horobeanu/symfony
src/webCS/AdminBundle/Tests/Controller/DefaultControllerTest.php
PHP
mit
400
package framework; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; /** * Convenience class for dealing with images. * * Creating a pixmap requires a filename that should be a gif, png, or jpg image. * * @author Robert C. Duvall * @author Owen Astrachan * @author Syam Gadde */ public class Pixmap { public static final Dimension DEFAULT_SIZE = new Dimension(300, 300); public static final Color DEFAULT_COLOR = Color.BLACK; public static final String DEFAULT_NAME = "Default"; private String myFileName; private BufferedImage myImage; private Dimension mySize; /** * Create a pixmap with given width and height and filled with given initial color */ public Pixmap (int width, int height, Color color) { createImage(width, height, color); } /** * Create a pixmap from the given local file */ public Pixmap (String fileName) throws IOException { if (fileName == null) { createImage(DEFAULT_SIZE.width, DEFAULT_SIZE.height, DEFAULT_COLOR); } else { read(fileName); } } /** * Returns the file name of this Pixmap (if it exists) */ public String getName () { int index = myFileName.lastIndexOf(File.separator); if (index >= 0) { return myFileName.substring(index + 1); } else { return myFileName; } } /** * Returns the dimensions of the Pixmap. */ public Dimension getSize () { return new Dimension(mySize); } /** * Returns the color of the pixel at the given point in the pixmap. */ public Color getColor (int x, int y) { if (isInBounds(x, y)) { return new Color(myImage.getRGB(x, y)); } else { return DEFAULT_COLOR; } } /** * Paint the image on the canvas */ public void paint (Graphics pen) { pen.drawImage(myImage, 0, 0, mySize.width, mySize.height, null); } // returns true if the given point is a valid Pixmap value. private boolean isInBounds (int x, int y) { return (0 <= x && x < mySize.width) && (0 <= y && y < mySize.height); } // Read the pixmap from the given file. private void read (String fileName) throws IOException { myFileName = fileName; myImage = ImageIO.read(new File(myFileName)); mySize = new Dimension(myImage.getWidth(), myImage.getHeight()); } // convenience function private void createImage (int width, int height, Color color) { myFileName = color.toString(); myImage = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); mySize = new Dimension(width, height); } }
duke-compsci344-spring2015/jogl_jars
src/framework/Pixmap.java
Java
mit
2,891
<table class="table table-hover"> <tr class="info"> <td width="120">Id</td> <td width="20">:</td> <td><?php echo $model->id;?></td> </tr> <tr> <td>Title</td> <td>:</td> <td><?php echo $model->title;?></td> </tr> <tr> <td>Url</td> <td>:</td> <td><?php echo $model->url;?></td> </tr> <tr> <td>Parent Menu</td> <td>:</td> <td><?php echo $model->menu->title;?></td> </tr> <tr> <td>Controller</td> <td>:</td> <td><?php echo $model->controller;?></td> </tr> <tr> <td>Params</td> <td>:</td> <td><?php echo $model->params;?></td> </tr> <tr> <td>Order</td> <td>:</td> <td><?php echo $model->order;?></td> </tr> <tr> <td>Icon</td> <td>:</td> <td><?php echo $model->icon;?></td> </tr> <?php if($this->Model->getTimestamps()):?> <tr> <td>Created</td> <td>:</td> <td><?php echo date("d M Y H:i:s",strtotime($model->created));?></td> </tr> <tr> <td>Updated</td> <td>:</td> <td><?php echo $model->updated?date("d M Y H:i:s",strtotime($model->updated)):"-";?></td> </tr> <?php endif;?> </table>
amrew/nip-igniter
application/views/admin/menu/view.php
PHP
mit
1,057
<?php /** * class Page * * @author Philippe Archambault <philippe.archambault@gmail.com> * @since 0.1 */ class Page extends Record { const TABLE_NAME = 'page'; const STATUS_DRAFT = 1; const STATUS_REVIEWED = 50; const STATUS_PUBLISHED = 100; const STATUS_HIDDEN = 101; public $title; public $slug; public $breadcrumb; public $keywords; public $description; public $parent_id; public $layout_id; public $behavior_id; public $status_id; public $comment_status; public $created_on; public $published_on; public $updated_on; public $created_by_id; public $updated_by_id; public $position; public $is_protected; public $behavior; /* Methods for Record class. */ public function columns() { return array('title', 'slug', 'breadcrumb', 'keywords', 'description', 'parent_id', 'layout_id', 'behavior_id', 'status_id', 'comment_status', 'created_on', 'published_on', 'updated_on', 'created_by_id', 'updated_by_id', 'position', 'is_protected', 'id'); } public function beforeInsert() { $this->created_on = date('Y-m-d H:i:s'); $this->created_by_id = AuthUser::getId(); $this->updated_on = $this->created_on; $this->updated_by_id = $this->created_by_id; if ($this->status_id == Page::STATUS_PUBLISHED) { $this->published_on = date('Y-m-d H:i:s'); } return true; } public function beforeUpdate() { /* TODO: Figure out logic behind xxx_on_time variables $this->created_on = $this->created_on . ' ' . $this->created_on_time; unset($this->created_on_time); */ if (! empty($this->published_on)) { /* $this->published_on = $this->published_on . ' ' . $this->published_on_time; unset($this->published_on_time); */ } else if ($this->status_id == Page::STATUS_PUBLISHED) { $this->published_on = date('Y-m-d H:i:s'); } $this->updated_by_id = AuthUser::getId(); $this->updated_on = date('Y-m-d H:i:s'); return true; } /* Tag related methods. */ public function tags() { return Tag::findByPageId($this->id()); } public function saveTags($tags) { if (is_string($tags)) { $tags = explode(',', $tags); } $tags = array_map('trim', $tags); $tags = array_filter($tags); $current_tags = array(); foreach($this->tags() as $tag) { $current_tags[] = $tag->name(); } // no tag before! no tag now! ... nothing to do! if (count($tags) == 0 && count($current_tags) == 0) { return; } // delete all tags if (count($tags) == 0) { return Record::deleteWhere('PageTag', 'page_id=?', array($this->id)); } else { $old_tags = array_diff($current_tags, $tags); $new_tags = array_diff($tags, $current_tags); // insert all tags in the tag table and then populate the page_tag table foreach ($new_tags as $index => $tag_name) { if (! empty($tag_name)) { // try to get it from tag list, if not we add it to the list if (! $tag = Tag::findByName($tag_name)) { $tag = new Tag(array('name' => trim($tag_name))); } $tag->save(); // create the relation between the page and the tag $tag = new PageTag(array('page_id' => $this->id, 'tag_id' => $tag->id)); $tag->save(); } } // remove all old tag foreach ($old_tags as $index => $tag_name) { // get the id of the tag $tag = Tag::findByName($tag_name); Record::deleteWhere('PageTag', 'page_id=? AND tag_id=?', array($this->id, $tag->id)); $tag->save(); } } } public function updater() { return User::findById($this->updatedById()); } public function creator() { return User::findById($this->createdById()); } public function author() { return $this->creator(); } public function parent() { return Page::findById($this->parentId()); } public function children($params=array(), $include_hidden = false) { if (isset($params['where'])) { $params['where'] .= ' AND '; } else { $params['where'] = ''; } if ($include_hidden) { $params['where'] .= sprintf("parent_id=%d AND status_id>=%d", $this->id(), Page::STATUS_PUBLISHED); } else { $params['where'] .= sprintf("parent_id=%d AND status_id<%d", $this->id(), Page::STATUS_HIDDEN); } $class = __CLASS__; if ($this->behaviorId()) { $class = Behavior::loadPageHack($this->behaviorId()); } return Page::find($params, $class); } public function parts($name=null) { if ($name) { return PagePart::findByNameAndPageId($name, $this->id()); } else { return PagePart::findByPageId($this->id()); } } public function layout() { if ($this->layoutId()) { return Layout::findById($this->layoutId()); } else { return $this->parent()->layout(); } } public function includeSnippet($name) { if ($snippet = Snippet::findByName($name)) { eval('?>' . $snippet->contentHtml()); } } public function url($with_suffix = true) { if ($this->parent()) { if ($with_suffix) { $url = trim($this->parent()->url(false) . '/'. $this->slug(), '/') . URL_SUFFIX; } else { $url = trim($this->parent()->url(false) . '/'. $this->slug(), '/'); } } else { $url = BASE_URL . trim('/'. $this->slug(), '/'); } return $url; } public function link($label=null, $options='') { if ($label == null) { $label = $this->title(); } return sprintf('<a href="%s" title="%s" %s>%s</a>', $this->url(), $this->title(), $options, $label ); } /* TODO: This should have inherit. */ public function hasContent($part) { return $this->parts($part); } public function content($part='body', $inherit=false) { // if part exist we generate the content en execute it! if ($this->parts($part)) { ob_start(); print $part; eval('?>' . $this->parts($part)->contentHtml()); $out = ob_get_contents(); ob_end_clean(); return $out; } else if ($inherit && $this->parent()) { return $this->parent()->content($part, true); } } public static function childrenOf($id) { return self::find(array('where' => 'parent_id='.$id, 'order' => 'position, created_on DESC')); } public static function hasChildren($id) { return (boolean) self::countFrom('Page', 'parent_id = '.(int)$id); } public static function cloneTree($page, $parent_id) { /* This will hold new id of root of cloned tree. */ static $new_root_id = false; /* Clone passed in page. */ $clone = Record::findByIdFrom('Page', $page->id); $clone->parent_id = (int)$parent_id; $clone->id = null; $clone->title .= " (copy)"; $clone->save(); /* Also clone the page parts. */ $page_part = PagePart::findByPageId($page->id); if (count($page_part)) { foreach ($page_part as $part) { $part->page_id = $clone->id; $part->id = null; $part->save(); } } /* This gets set only once even when called recursively. */ if (!$new_root_id) { $new_root_id = $clone->id; } /* Clone and update childrens parent_id to clones new id. */ if (Page::hasChildren($page->id)) { foreach (Page::childrenOf($page->id) as $child) { Page::cloneTree($child, $clone->id); } } return $new_root_id; } /* We need these before PHP 5.3. Older do not have late static binding. */ static function find($params=null, $class=__CLASS__) { /* Assume we should call Record finder. */ if (is_array($params)) { return parent::find($params, $class); } else { /* Maintain BC. Assume string mean find by URI. */ return Page::findByUri($params); } } static function findById($id, $class=__CLASS__) { return parent::findById($id, $class); } static function count($params=null, $class=__CLASS__) { return parent::count($params, $class); } /* These are just a helper finders. */ /* TODO: This should return an array not just one.*/ public static function findBigSister($id, $class=__CLASS__) { $params['where'] = sprintf('parent_id=%d', $id); $params['order'] = 'id DESC'; $sql = Record::buildSql($params, $class); return self::connection()->query($sql, PDO::FETCH_CLASS, $class)->fetch(); } public static function findByParentId($id, $class=__CLASS__) { $params['where'] = sprintf('parent_id=%d', $id); return parent::find($params, $class); } public static function findByUri($uri, $class=__CLASS__) { //print "Page::findByUri($uri)"; $uri = trim($uri, '/'); $has_behavior = false; $urls = array_merge(array(''), explode_uri($uri)); $url = ''; $parent = new Page; $parent->id(0); foreach ($urls as $page_slug) { $url = ltrim($url . '/' . $page_slug, '/'); if ($page = Page::findBySlugAndParentId($page_slug, $parent->id())) { if ($page->behaviorId()) { $has_behavior= true; // add a instance of the behavior with the name of the behavior $params = explode_uri(substr($uri, strlen($url))); print_r($params); $page->behavior(Behavior::load($page->behaviorId(), $page, $params)); return $page; } } else { break; } $parent = $page; } return (!$page && $has_behavior) ? $parent: $page; } public static function findBySlugAndParentId($slug, $parent_id=0, $class=__CLASS__) { /* TODO: Behaviour pagehack seems kludgish. */ $parent = Page::findById($parent_id); if ($parent && $parent->behaviorId()) { $class = Behavior::loadPageHack($parent->behaviorId()); } $params['where'] = sprintf("slug=%s AND parent_id=%d", self::connection()->quote($slug), $parent_id); $sql = Record::buildSql($params, $class); // print_r(self::connection()->query($sql, PDO::FETCH_CLASS, $class)->fetch()); return self::connection()->query($sql, PDO::FETCH_CLASS, $class)->fetch(); } public function show() { if ($this->layout()) { header('Content-Type: '. $this->layout()->contentType() . '; charset=UTF-8'); eval('?>' . $this->layout()->content()); } } /* TODO: Everything below here is just copy / paste. */ public function date($format='%a, %e %b %Y', $which_one='created') { if ($which_one == 'update' || $which_one == 'updated') return strftime($format, strtotime($this->updated_on)); else if ($which_one == 'publish' || $which_one == 'published') return strftime($format, strtotime($this->published_on)); else return strftime($format, strtotime($this->created_on)); } public function breadcrumbs($separator='&gt;') { $url = ''; $path = ''; $paths = explode('/', '/'.$this->slug); $nb_path = count($paths); $out = '<div class="breadcrumb">'."\n"; if ($this->parent) $out .= $this->parent->_inversedBreadcrumbs($separator); return $out . '<span class="breadcrumb-current">'.$this->breadcrumb().'</span></div>'."\n"; } private function _inversedBreadcrumbs($separator) { $out = '<a href="'.$this->url().'" title="'.$this->breadcrumb.'">'.$this->breadcrumb.'</a> <span class="breadcrumb-separator">'.$separator.'</span> '."\n"; if ($this->parent) return $this->parent->_inversedBreadcrumbs($separator) . $out; return $out; } }
albertobraschi/toad
frog/app/models/Page.php
PHP
mit
13,609
<?php /** * Debug Bar Shortcodes - is_closure test. * * @package WordPress\Plugins\Debug Bar Shortcodes * @author Juliette Reinders Folmer <wpplugins_nospam@adviesenzo.nl> * @link https://github.com/jrfnl/Debug-Bar-Shortcodes * @since 1.0 * * @copyright 2013-2016 Juliette Reinders Folmer * @license http://creativecommons.org/licenses/GPL/2.0/ GNU General Public License, version 2 or higher */ if ( ! function_exists( 'debug_bar_shortcodes_is_closure' ) ) { /** * Check if a callback is a closure. * * @param mixed $arg Function name. * * @return bool */ function debug_bar_shortcodes_is_closure( $arg ) { $test = function() { }; $is_closure = ( $arg instanceof $test ); return $is_closure; } }
AndrewM2M/resumeTheme
content/plugins/debug-bar-shortcodes/php53/php5.3-closure-test.php
PHP
mit
765
class Attestify::TestTest < Attestify::Test def test_a_test_with_a_failed_assertion test_class = Class.new(MockTest) do def test_with_failed_assertion assert false end end test = test_class.new(:test_with_failed_assertion) test.run refute test.passed? assert_equal 1, test.assertions.failed assert_equal 0, test.assertions.errored assert_equal 0, test.assertions.passed assert_equal 1, test.assertions.total end def test_a_test_with_a_raised_exception test_class = Class.new(MockTest) do def test_with_raised_exception raise "An error" end end test = test_class.new(:test_with_raised_exception) test.run refute test.passed? assert_equal 0, test.assertions.failed assert_equal 1, test.assertions.errored assert_equal 0, test.assertions.passed assert_equal 0, test.assertions.total end def test_a_test_with_no_failures test_class = Class.new(MockTest) do def test_with_no_failures assert true end end test = test_class.new(:test_with_no_failures) test.run assert test.passed? assert_equal 0, test.assertions.failed assert_equal 0, test.assertions.errored assert_equal 1, test.assertions.passed assert_equal 1, test.assertions.total end def test_a_test_with_multiple_failed_assertions test_class = Class.new(MockTest) do def test_with_multiple_failures assert false assert false end end test = test_class.new(:test_with_multiple_failures) test.run refute test.passed? assert_equal 2, test.assertions.failed assert_equal 0, test.assertions.errored assert_equal 0, test.assertions.passed assert_equal 2, test.assertions.total end def test_a_test_with_mixed_failed_and_passed_assertions test_class = Class.new(MockTest) do def test_with_mixed_passes_and_failures assert false assert true assert false assert true end end test = test_class.new(:test_with_mixed_passes_and_failures) test.run refute test.passed? assert_equal 2, test.assertions.failed assert_equal 0, test.assertions.errored assert_equal 2, test.assertions.passed assert_equal 4, test.assertions.total end def test_a_skipped_test test_class = Class.new(MockTest) do def test_that_is_skipped assert false assert true skip assert false assert true end end test = test_class.new(:test_that_is_skipped) test.run refute test.passed? assert test.skipped? assert_equal 1, test.assertions.failed assert_equal 0, test.assertions.errored assert_equal 1, test.assertions.passed assert_equal 2, test.assertions.total end end
smellsblue/attestify
test/attestify/test_test.rb
Ruby
mit
2,810
#!/usr/bin/env python3 import matplotlib.pyplot as plt from math import sqrt from math import log dx = [1/sqrt(16), 1/sqrt(64), 1/sqrt(256), 1/sqrt(1024)] dx_tri = [1/sqrt(32), 1/sqrt(128), 1/sqrt(512), 1/sqrt(2048)] dx_pert = [0.0270466, 0.0134827, 0.00680914, 0.00367054] dx_fp = [0.122799, 0.081584, 0.0445639, 0.0225922, 0.0113763] fp_actual = 0.0441995 rl2_euler = [0.00059068, 0.000113051, 2.26156e-05, 5.11884e-06] rl2_euler_tri = [0.00101603, 0.000277795, 6.37774e-05, 1.4947e-05] rl2_euler_tri_pert = [0.00053851, 0.000121805, 2.67446e-05, 4.97857e-05] rl2_euler_tri_limited = [0.00234712, 0.000548344, 0.000139978, 3.56414e-05] rl2_euler_lp_tri_limited = [0.00242227, 0.000586065, 0.000140727] rl2_euler_limited = [0.00187271, 0.000435096, 0.000120633, 2.90233e-05] rl2_euler_lp_limited = [0.00180033, 0.000422567, 0.000120477, 2.90644e-05] rl2_ns = [0.000576472, 0.000132735, 7.0506e-05, 6.67272e-05] rl2_ns_fp = [abs(fp_actual - 0.008118), abs(fp_actual - 0.015667), abs(fp_actual - 0.026915), abs(fp_actual - 0.037524), abs(fp_actual - 0.042895)] print("rho euler l2: "+str(log(rl2_euler[2]/rl2_euler[3])/log(dx[2]/dx[3]))) print("rho euler tri l2: "+str(log(rl2_euler_tri[2]/rl2_euler_tri[3])/log(dx_tri[2]/dx_tri[3]))) print("rho euler tri perturbed l2: "+str(log(rl2_euler_tri_pert[1]/rl2_euler_tri_pert[2])/log(dx_pert[1]/dx_pert[2]))) print("rho euler tri limited l2: "+str(log(rl2_euler_tri_limited[2]/rl2_euler_tri_limited[3])/log(dx_tri[2]/dx_tri[3]))) print("rho euler lp tri limited l2: "+str(log(rl2_euler_lp_tri_limited[1]/rl2_euler_lp_tri_limited[2])/log(dx_tri[1]/dx_tri[2]))) print("rho euler limited l2: "+str(log(rl2_euler_limited[2]/rl2_euler_limited[3])/log(dx[2]/dx[3]))) print("rho euler lp limited l2: "+str(log(rl2_euler_lp_limited[2]/rl2_euler_lp_limited[3])/log(dx[2]/dx[3]))) print("rho ns l2: "+str(log(rl2_ns[0]/rl2_ns[1])/log(dx[0]/dx[1]))) print("rho ns end l2: "+str(log(rl2_ns[2]/rl2_ns[3])/log(dx[2]/dx[3]))) print("rho ns fp l2: "+str(log(rl2_ns_fp[0]/rl2_ns_fp[1])/log(dx_fp[0]/dx_fp[1]))) print("rho ns fp end l2: "+str(log(rl2_ns_fp[3]/rl2_ns_fp[4])/log(dx_fp[3]/dx_fp[4]))) plt.figure() hlines = plt.loglog(dx, rl2_euler, dx, rl2_ns, dx, rl2_euler_limited, dx, rl2_euler_lp_limited, dx_tri, rl2_euler_tri, dx_tri, rl2_euler_tri_limited, dx_pert[0:3], rl2_euler_tri_pert[0:3], dx_fp, rl2_ns_fp) plt.rc('text', usetex=True) plt.xlabel("Grid size") plt.ylabel("$L_2$ error") plt.legend(hlines, ["euler", "NS manufactured", "euler scalar limited", "euler lp limited", "euler tri", "euler tri limited", "euler tri pert", "NS flat plate"]) plt.grid(True,which="both") plt.show()
Rob-Rau/EbbCFD
ms_refinement/plot_conv.py
Python
mit
2,727
class Auth { isAuthenticate () { return this.getToken() !== null } setToken (token) { window.localStorage.setItem('access_token', token) } getToken () { return window.localStorage.getItem('access_token') } removeToken () { window.localStorage.removeItem('access_token') } } export default new Auth()
dvt32/cpp-journey
Java/Uni-Ruse/Web Components - Spring Boot & React (Master's Degree)/forum_frontend/src/services/Auth.js
JavaScript
mit
336
using System.Collections.Generic; using System.Web.Mvc.Html; using System.Text.RegularExpressions; using System.Linq.Expressions; namespace System.Web.Mvc { //www.jarrettmeyer.com/post/2995732471/nested-collection-models-in-asp-net-mvc-3 public static class HtmlHelpers { public static IHtmlString LinkToRemoveNestedForm(this HtmlHelper helper, string linkText, string container, string deleteElement) { var js = string.Format("javascript:removeNestedForm(this,'{0}','{1}');return false;", container, deleteElement); var tb = new TagBuilder("a"); tb.Attributes.Add("href", "#"); tb.Attributes.Add("onclick", js); tb.InnerHtml = linkText; var tag = tb.ToString(TagRenderMode.Normal); return MvcHtmlString.Create(tag); } public static MvcHtmlString LinkToAddNestedForm<TModel, TProperty>(this HtmlHelper<TModel> htmlHelper, Expression<Func<TModel, TProperty>> expression, string linkText, string containerElement, string counterElement, string focusPropertyName, object[] argValues = null, string cssClass = null) where TProperty : IEnumerable<object> { // a fake index to replace with a real index long ticks = DateTime.UtcNow.Ticks; // pull the name and type from the passed in expression string collectionProperty = ExpressionHelper.GetExpressionText(expression); var nestedObject = Activator.CreateInstance(typeof(TProperty).GetGenericArguments()[0], argValues); // save the field prefix name so we can reset it when we're doing string oldPrefix = htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix; // if the prefix isn't empty, then prepare to append to it by appending another delimiter if (!string.IsNullOrEmpty(oldPrefix)) { htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix += "."; } // append the collection name and our fake index to the prefix name before rendering htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix += string.Format("{0}[{1}]", collectionProperty, ticks); var focusId = string.Format("#{0}_{1}", htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix.Replace(".", "_").Replace("[", "_").Replace("]", "_"), focusPropertyName); string partial = htmlHelper.EditorFor(x => nestedObject).ToHtmlString(); // done rendering, reset prefix to old name htmlHelper.ViewData.TemplateInfo.HtmlFieldPrefix = oldPrefix; // strip out the fake name injected in (our name was all in the prefix) partial = Regex.Replace(partial, @"[\._]?nestedObject", ""); // encode the output for javascript since we're dumping it in a JS string partial = HttpUtility.JavaScriptStringEncode(partial); // create the link to render var js = string.Format("javascript:addNestedForm('{0}','{1}','{2}','{3}','{4}');return false;", containerElement, counterElement, ticks, partial,focusId); var a = new TagBuilder("a"); a.Attributes.Add("href", "javascript:void(0)"); a.Attributes.Add("onclick", js); if (cssClass != null) { a.AddCssClass(cssClass); } a.InnerHtml = linkText; return MvcHtmlString.Create(a.ToString(TagRenderMode.Normal)); } } }
acapdevila/GestionFacturas
GestionFacturas.Website/Helpers/ListEditorHelper.cs
C#
mit
3,518
'use strict' // import Device from './Device' let Device = require('./Device').Device module.exports = { Device: Device }
swissglider/node-red-device-framework
core/runtime/devices/index.js
JavaScript
mit
125
(function (window, $, _, Concrete) { 'use strict'; /** * Area object, used for managing areas * @param {jQuery} elem The area's HTML element * @param {EditMode} edit_mode The EditMode instance */ var Area = Concrete.Area = function Area(elem, edit_mode) { this.init.apply(this, _(arguments).toArray()); }; Area.prototype = { init: function areaInit(elem, edit_mode) { var my = this; elem.data('Concrete.area', my); Concrete.createGetterSetters.call(my, { id: elem.data('area-id'), active: true, blockTemplate: _(elem.children('script[role=area-block-wrapper]').html()).template(), elem: elem, totalBlocks: 0, enableGridContainer: elem.data('area-enable-grid-container'), handle: elem.data('area-handle'), dragAreas: [], blocks: [], editMode: edit_mode, maximumBlocks: parseInt(elem.data('maximumBlocks'), 10), blockTypes: elem.data('accepts-block-types').split(' '), blockContainer: elem.children('.ccm-area-block-list') }); my.id = my.getId(); my.setTotalBlocks(0); // we also need to update the DOM which this does. }, /** * Handle unbinding. */ destroy: function areaDestroy() { var my = this; if (my.getAttr('menu')) { my.getAttr('menu').destroy(); } my.reset(); }, reset: function areaReset() { var my = this; _(my.getDragAreas()).each(function (drag_area) { drag_area.destroy(); }); _(my.getBlocks()).each(function (block) { block.destroy(); }); my.setBlocks([]); my.setDragAreas([]); my.setTotalBlocks(0); }, bindEvent: function areaBindEvent(event, handler) { return Concrete.EditMode.prototype.bindEvent.apply(this, _(arguments).toArray()); }, scanBlocks: function areaScanBlocks() { var my = this, type, block; my.reset(); my.addDragArea(null); $('div.ccm-block-edit[data-area-id=' + my.getId() + ']', this.getElem()).each(function () { var me = $(this), handle = me.data('block-type-handle'); if (handle === 'core_area_layout') { type = Concrete.Layout; } else { type = Concrete.Block; } block = new type(me, my); my.addBlock(block); }); }, getBlockByID: function areaGetBlockByID(bID) { var my = this; return _.findWhere(my.getBlocks(), {id: bID}); }, getMenuElem: function areaGetMenuElem() { var my = this; return $('[data-area-menu=area-menu-a' + my.getId() + ']'); }, bindMenu: function areaBindMenu() { var my = this, elem = my.getElem(), totalBlocks = my.getTotalBlocks(), $menuElem = my.getMenuElem(), menuHandle; if (totalBlocks > 0) { menuHandle = '#area-menu-footer-' + my.getId(); } else { menuHandle = 'div[data-area-menu-handle=' + my.getId() + ']'; } if (my.getAttr('menu')) { my.getAttr('menu').destroy(); } var menu_config = { 'handle': menuHandle, 'highlightClassName': 'ccm-area-highlight', 'menuActiveClass': 'ccm-area-highlight', 'menu': $('[data-area-menu=' + elem.attr('data-launch-area-menu') + ']') }; if (my.getElem().hasClass('ccm-global-area')) { menu_config.menuActiveClass += " ccm-global-area-highlight"; menu_config.highlightClassName += " ccm-global-area-highlight"; } my.setAttr('menu', new ConcreteMenu(elem, menu_config)); $menuElem.find('a[data-menu-action=add-inline]') .off('click.edit-mode') .on('click.edit-mode', function (e) { // we are going to place this at the END of the list. var dragAreaLastBlock = false; _.each(my.getBlocks(), function (block) { dragAreaLastBlock = block; }); Concrete.event.fire('EditModeBlockAddInline', { area: my, cID: CCM_CID, btID: $(this).data('block-type-id'), arGridMaximumColumns: $(this).attr('data-area-grid-maximum-columns'), event: e, dragAreaBlock: dragAreaLastBlock, btHandle: $(this).data('block-type-handle') }); return false; }); $menuElem.find('a[data-menu-action=edit-container-layout]') .off('click.edit-mode') .on('click.edit-mode', function (e) { // we are going to place this at the END of the list. var $link = $(this); var bID = parseInt($(this).attr('data-container-layout-block-id')); var editor = Concrete.getEditMode(); var block = _.findWhere(editor.getBlocks(), {id: bID}); Concrete.event.fire('EditModeBlockEditInline', { block: block, arGridMaximumColumns: $link.attr('data-area-grid-maximum-columns'), event: e }); return false; }); $menuElem.find('a[data-menu-action=edit-area-design]') .off('click.edit-mode') .on('click.edit-mode', function (e) { e.preventDefault(); ConcreteToolbar.disable(); my.getElem().addClass('ccm-area-inline-edit-disabled'); var postData = { 'arHandle': my.getHandle(), 'cID': CCM_CID }; my.bindEvent('EditModeExitInline', function (e) { Concrete.event.unsubscribe(e); my.getEditMode().destroyInlineEditModeToolbars(); }); $.ajax({ type: 'GET', url: CCM_DISPATCHER_FILENAME + '/ccm/system/dialogs/area/design', data: postData, success: function (r) { var $container = my.getElem(); my.getEditMode().loadInlineEditModeToolbars($container, r); $.fn.dialog.hideLoader(); } }); }); }, /** * Add block to area * @param {Block} block block to add * @param {Block} sub_block The block that should be above the added block * @return {Boolean} Success, always true */ addBlock: function areaAddBlock(block, sub_block) { var my = this; if (sub_block) { return this.addBlockToIndex(block, _(my.getBlocks()).indexOf(sub_block) + 1); } return this.addBlockToIndex(block, my.getBlocks().length); }, setTotalBlocks: function (totalBlocks) { this.setAttr('totalBlocks', totalBlocks); this.getElem().attr('data-total-blocks', totalBlocks); }, /** * Add to specific index, pipes to addBlock * @param {Block} block Block to add * @param {int} index Index to add to * @return {Boolean} Success, always true */ addBlockToIndex: function areaAddBlockToIndex(block, index) { var totalBlocks = this.getTotalBlocks(), blocks = this.getBlocks(), totalHigherBlocks = totalBlocks - index; block.setArea(this); this.setTotalBlocks(totalBlocks + 1); // any blocks with indexes higher than this one need to have them incremented if (totalHigherBlocks > 0) { var updateBlocksArray = []; for (var i = 0; i < blocks.length; i++) { if (i >= index) { updateBlocksArray[i + 1] = blocks[i]; } else { updateBlocksArray[i] = blocks[i]; } } updateBlocksArray[index] = block; this.setBlocks(updateBlocksArray); } else { this.getBlocks()[index] = block; } this.addDragArea(block); // ensure that the DOM attributes are correct block.getElem().attr("data-area-id", this.getId()); return true; }, /** * Remove block from area * @param {Block} block The block to remove. * @return {Boolean} Success, always true. */ removeBlock: function areaRemoveBlock(block) { var my = this, totalBlocks = my.getTotalBlocks(); block.getContainer().remove(); my.setBlocks(_(my.getBlocks()).without(block)); my.setTotalBlocks(totalBlocks - 1); var drag_area = _.first(_(my.getDragAreas()).filter(function (drag_area) { return drag_area.getBlock() === block; })); if (drag_area) { drag_area.getElem().remove(); my.setDragAreas(_(my.getDragAreas()).without(drag_area)); } if (!my.getTotalBlocks()) { // we have to destroy the old menu and create it anew my.bindMenu(); } return true; }, /** * Add a drag area * @param {Block} block The block to add this area below. * @return {DragArea} The added DragArea */ addDragArea: function areaAddDragArea(block) { var my = this, elem, drag_area; if (!block) { if (my.getDragAreas().length) { throw new Error('No block supplied'); } elem = $('<div class="ccm-area-drag-area"/>'); drag_area = new Concrete.DragArea(elem, my, block); my.getBlockContainer().prepend(elem); } else { elem = $('<div class="ccm-area-drag-area"/>'); drag_area = new Concrete.DragArea(elem, my, block); block.getContainer().after(elem); } my.getDragAreas().push(drag_area); return drag_area; }, /** * Find the contending DragArea's * @param {Pep} pep The Pep object from the event. * @param {Block|Stack} block The Block object from the event. * @return {Array} Array of all drag areas that are capable of accepting the block. */ contendingDragAreas: function areaContendingDragAreas(pep, block) { var my = this, max_blocks = my.getMaximumBlocks(); if (block instanceof Concrete.Stack || block.getHandle() === 'core_stack_display') { return _(my.getDragAreas()).filter(function (drag_area) { return drag_area.isContender(pep, block); }); } else if ((max_blocks > 0 && my.getBlocks().length >= max_blocks) || !_(my.getBlockTypes()).contains(block.getHandle())) { return []; } return _(my.getDragAreas()).filter(function (drag_area) { return drag_area.isContender(pep, block); }); } }; }(window, jQuery, _, Concrete));
victorli/cms
concrete/js/build/core/app/edit-mode/area.js
JavaScript
mit
12,327
using System; [Equals(DoNotAddEqualityOperators = true)] public class DoNotReplaceEqualityOperators { public DoNotReplaceEqualityOperators() { Id = Guid.NewGuid(); } public Guid Id { get; } public static bool operator ==(DoNotReplaceEqualityOperators left, DoNotReplaceEqualityOperators right) => true; public static bool operator !=(DoNotReplaceEqualityOperators left, DoNotReplaceEqualityOperators right) => true; }
Fody/Equals
AssemblyToProcess/DoNotReplaceEqualityOperators.cs
C#
mit
455
//= require active_admin/base //= require jquery.nested-fields //= require chosen-jquery //= require bootstrap //= require bootstrap-wysihtml5 //= require ./active_tweaker
atongen/active_tweaker
app/assets/javascripts/active_tweaker/index.js
JavaScript
mit
172
import '../../../../css/rpt/styles.global.css'; import styles from '../../../css/rpt/styles.css'; import React, { Component, PropTypes } from 'react'; import 'react-widgets/lib/less/react-widgets.less'; import DateTimePicker from 'react-widgets/lib/DateTimePicker'; import Multiselect from 'react-widgets/lib/Multiselect'; import { FormGroup,FormControl,HelpBlock,Checkbox,ControlLabel,Label,Row,Col,ListGroup,ListGroupItem,Panel,Table,Button,Glyphicon,ButtonGroup,ButtonToolbar} from 'react-bootstrap'; import { ButtonInput } from 'react-bootstrap'; import * as STATE from "../../../actions/rpt/production/State.js" var dateFormat = require('dateformat'); var Moment = require('moment'); var momentLocalizer = require('react-widgets/lib/localizers/moment'); var classNames = require('classnames'); momentLocalizer(Moment); export default class POWithReceiversDateRange extends React.Component { static propTypes = { ProdRpt: PropTypes.object.isRequired }; constructor(props) { super(props); this.state = { test:this.test.bind(this) }; if ('development'==process.env.NODE_ENV) { } } test(dt,dateStart,dateEnd){ console.log(`dt: ${dt}`); var dtStart = dateFormat(new Date(dt), "mm-dd-yyyy hh:MM:ss"); if ('development'==process.env.NODE_ENV) { console.log(`dtStart=>${dtStart}`); } var dtStartFmt = dateFormat(new Date(dateStart), "mm-dd-yyyy hh:MM:ss"); if ('development'==process.env.NODE_ENV) { console.log(`dtStartFmt=>${dtStartFmt}`); } var dtEndFmt = dateFormat(new Date(dateEnd), "mm-dd-yyyy hh:MM:ss"); if ('development'==process.env.NODE_ENV) { console.log(`dtEndFmt=>${dtEndFmt}`); } } render() { var runAndBackBtn; if(STATE.POWITHRECEIVERS_DATE_RANGE_NOT_READY==this.props.Rpt.state){ runAndBackBtn = <Row> <Col xs={4} >&nbsp;</Col> <Col xs={1}><Button onClick={()=>this.props.poWithReceivers()} bsSize="large" bsStyle="info" disabled>Run</Button></Col> <Col xs={1} >&nbsp;</Col> <Col xs={2}><Button onClick={()=>this.props.setState(STATE.NOT_STARTED)} bsSize="large" bsStyle="warning">Back</Button></Col> <Col xs={3}>&nbsp;</Col> </Row> }else{ runAndBackBtn = <Row> <Col xs={4} >&nbsp;</Col> <Col xs={2}><Button onClick={()=>this.props.poWithReceivers()} bsSize="large" bsStyle="info" >Run</Button></Col> <Col xs={1}><Button onClick={()=>this.props.setState(STATE.NOT_STARTED)} bsSize="large" bsStyle="warning">Back</Button></Col> <Col xs={3}>&nbsp;</Col> </Row> } var pageNoClass = classNames( 'pagination','hidden-xs', 'pull-left' ); var dateHeader; var dateStyle; if(this.props.ProdRpt.openPOWithReceivers.dateHeader.valid){ dateHeader=<h3 style={{textAlign:'center'}}>{this.props.ProdRpt.poWithReceivers.dateHeader.text}</h3> dateStyle='default'; }else{ dateHeader=<h3 style={{textAlign:'center',color:'red !important'}}>{this.props.ProdRpt.openPOWithReceivers.dateHeader.text}</h3> dateStyle='danger'; } return ( <div> <Panel bsStyle={dateStyle} header={dateHeader}> <Row> <Col xs={1} > <h1 style={{marginTop:0}}><Label bsStyle="primary">Start</Label></h1> </Col> <Col xs={8} xsOffset={1} style={{}}> <DateTimePicker onChange={(name,value)=>{ this.state.test(name,this.props.ProdRpt.poWithReceivers.dateStart,this.props.ProdRpt.openPOWithReceivers.dateEnd); this.props.setPOWithReceiversDateStart(name); this.props.poWithReceiversDateRange(); }} defaultValue={this.props.ProdRpt.openPOWithReceivers.dateStart} /> </Col> </Row> <Row> <Col xs={1}> <h1 style={{marginTop:0}}><Label bsStyle="primary">End</Label></h1> </Col> <Col xs={8} xsOffset={1}> <DateTimePicker onChange={(name,value)=>{ this.props.setPOWithReceiversDateEnd(name); this.props.poWithReceiversDateRange(); }} defaultValue={this.props.ProdRpt.poWithReceivers.dateEnd} /> </Col> </Row> </Panel> {runAndBackBtn} </div> ); } }
robogroves/ebp
app/components/rpt/production/POWithReceivers/poWithReceiversDateRange.js
JavaScript
mit
4,407
@extends('admin.base') @extends('admin.sidebar') @section('content') <div class="am-cf am-padding"> <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">用户列表</strong></div> </div> <div class="am-g"> <div class="am-u-sm-12"> @if (count($errors) > 0) <div class="am-alert am-alert-warning" id="login-error" data-am-alert> <button type="button" class="am-close">×</button> <ul> @foreach ($errors->all() as $error) <li>{{ $error }}</li> @endforeach </ul> </div> <script>$('#login-error').alert();</script> @endif <div class="am-cf am-padding user-add"> <form class="am-form am-form-horizontal" method="post" action="{{ URL('admin/user/'.$user->id) }}"> <input name="_method" type="hidden" value="PUT"> <input type="hidden" name="_token" value="{{ csrf_token() }}"> <input type="hidden" name="id" value="{{$user->id}}" > <div class="am-form-group"> <label for="doc-ipt-1" class="am-u-sm-2 am-form-label">用户名</label> <div class="am-u-sm-10"> <input type="text" id="doc-ipt-1" name="name" value="{{$user->name}}" placeholder="输入登录帐号"> </div> </div> <div class="am-form-group"> <label for="doc-ipt-3" class="am-u-sm-2 am-form-label">电子邮件</label> <div class="am-u-sm-10"> <input type="email" id="doc-ipt-3" name="email" value="{{$user->email}}" placeholder="输入电子邮件"> </div> </div> <div class="am-form-group"> <label for="doc-ipt-pwd-2" class="am-u-sm-2 am-form-label">密码</label> <div class="am-u-sm-10"> <input type="password" id="doc-ipt-pwd-2" name="password" placeholder="设置一个密码吧"> </div> </div> <div class="am-form-group"> <label for="doc-ipt-pwd-2" class="am-u-sm-2 am-form-label"></label> <div class="am-u-sm-10"> <button type="submit" class="am-btn am-btn-default">保存</button> </div> </div> <label for="doc-ipt-pwd-2" class="am-u-sm-2 am-form-label"></label> </form> </div> </div> </div> @endsection
involvements/chaxun
resources/views/admin/user_edit.blade.php
PHP
mit
2,119
using System; using System.Buffers; using System.Runtime.InteropServices; namespace System.Net.Libuv { internal class UVBuffer { public readonly static UVBuffer Default = new UVBuffer(); public static UVInterop.alloc_callback_unix AllocateUnixBuffer { get; set; } public static UVInterop.alloc_callback_win AllocWindowsBuffer { get; set; } private UVBuffer() { } static UVBuffer() { AllocateUnixBuffer = OnAllocateUnixBuffer; AllocWindowsBuffer = OnAllocateWindowsBuffer; } static void OnAllocateUnixBuffer(IntPtr memoryBuffer, uint length, out Unix buffer) { var memory = Marshal.AllocHGlobal((int)length); buffer = new Unix(memory, length); } static void OnAllocateWindowsBuffer(IntPtr memoryBuffer, uint length, out Windows buffer) { var memory = Marshal.AllocHGlobal((int)length); buffer = new Windows(memory, length); } [StructLayout(LayoutKind.Sequential)] internal struct Windows { internal uint Length; internal IntPtr Buffer; internal Windows(IntPtr buffer, uint length) { Buffer = buffer; Length = length; } internal void Dispose() { Marshal.FreeHGlobal(Buffer); Length = 0; Buffer = IntPtr.Zero; } } [StructLayout(LayoutKind.Sequential)] internal struct Unix { internal IntPtr Buffer; internal IntPtr Length; internal Unix(IntPtr buffer, uint length) { Buffer = buffer; Length = (IntPtr)length; } internal void Dispose() { Marshal.FreeHGlobal(Buffer); Length = IntPtr.Zero; Buffer = IntPtr.Zero; } } } }
weshaggard/corefxlab
src/System.Net.Libuv/System/Net/Libuv/Buffer.cs
C#
mit
2,051
import sublime, sublime_plugin import os.path import platform def compare_file_names(x, y): if platform.system() == 'Windows' or platform.system() == 'Darwin': return x.lower() == y.lower() else: return x == y class SwitchFileCommand(sublime_plugin.WindowCommand): def run(self, extensions=[]): if not self.window.active_view(): return fname = self.window.active_view().file_name() if not fname: return path = os.path.dirname(fname) base, ext = os.path.splitext(fname) start = 0 count = len(extensions) if ext != "": ext = ext[1:] for i in range(0, len(extensions)): if compare_file_names(extensions[i], ext): start = i + 1 count -= 1 break for i in range(0, count): idx = (start + i) % len(extensions) new_path = base + '.' + extensions[idx] if os.path.exists(new_path): self.window.open_file(new_path) break
koery/win-sublime
Data/Packages/Default/switch_file.py
Python
mit
1,112
/*! Pushy - v0.9.1 - 2013-9-16 * Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions. * https://github.com/christophery/pushy/ * by Christopher Yee */ $(window).load(function () { var e = false; if (/Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent)) { e = true } if (e == false) { menuBtn = $('.menu-btn-left') //css classes to toggle the menu } else { menuBtn = $('.menu-btn-left, .pushy a') //css classes to toggle the menu } $(function() { var pushy = $('.pushy'), //menu css class body = $('body'), container = $('#wrapper'), //container css class container2 = $('section#home'), //container css class push = $('.push-left'), //css class to add pushy capability siteOverlay = $('.site-overlay'), //site overlay pushyClass = "pushy-left pushy-open-left", //menu position & menu open class pushyActiveClass = "pushy-active", //css class to toggle site overlay containerClass = "container-push-left", //container open class pushClass = "push-push-left", //css class to add pushy capability //menuBtn = $('.menu-btn-left'), //css classes to toggle the menu menuSpeed = 200, //jQuery fallback menu speed menuWidth = pushy.width() + "px"; //jQuery fallback menu width function togglePushy(){ body.toggleClass(pushyActiveClass); //toggle site overlay pushy.toggleClass(pushyClass); container.toggleClass(containerClass); container2.toggleClass(containerClass); push.toggleClass(pushClass); //css class to add pushy capability } function openPushyFallback(){ body.addClass(pushyActiveClass); pushy.animate({left: "0px"}, menuSpeed); container.animate({left: menuWidth}, menuSpeed); push.animate({left: menuWidth}, menuSpeed); //css class to add pushy capability } function closePushyFallback(){ body.removeClass(pushyActiveClass); pushy.animate({left: "-" + menuWidth}, menuSpeed); container.animate({left: "0px"}, menuSpeed); push.animate({left: "0px"}, menuSpeed); //css class to add pushy capability } if(Modernizr.csstransforms3d){ //toggle menu menuBtn.click(function() { togglePushy(); }); //close menu when clicking site overlay siteOverlay.click(function(){ togglePushy(); }); }else{ //jQuery fallback pushy.css({left: "-" + menuWidth}); //hide menu by default container.css({"overflow-x": "hidden"}); //fixes IE scrollbar issue //keep track of menu state (open/close) var state = true; //toggle menu menuBtn.click(function() { if (state) { openPushyFallback(); state = false; } else { closePushyFallback(); state = true; } }); //close menu when clicking site overlay siteOverlay.click(function(){ if (state) { openPushyFallback(); state = false; } else { closePushyFallback(); state = true; } }); } }); });
ChekHub/chekhub.github.io
js/pushy_left.js
JavaScript
mit
2,897
/* eslint-env mocha */ /* eslint-disable func-names, prefer-arrow-callback */ import mainContent from '../pageobjects/main-content.page'; import sideNav from '../pageobjects/side-nav.page'; describe.skip('emoji', ()=> { it('opens general', ()=> { sideNav.openChannel('general'); }); it('opens emoji menu', ()=> { mainContent.emojiBtn.click(); }); describe('render', ()=> { it('should show the emoji picker menu', ()=> { mainContent.emojiPickerMainScreen.isVisible().should.be.true; }); it('click the emoji picker people tab', ()=> { mainContent.emojiPickerPeopleIcon.click(); }); it('should show the emoji picker people tab', ()=> { mainContent.emojiPickerPeopleIcon.isVisible().should.be.true; }); it('should show the emoji picker nature tab', ()=> { mainContent.emojiPickerNatureIcon.isVisible().should.be.true; }); it('should show the emoji picker food tab', ()=> { mainContent.emojiPickerFoodIcon.isVisible().should.be.true; }); it('should show the emoji picker activity tab', ()=> { mainContent.emojiPickerActivityIcon.isVisible().should.be.true; }); it('should show the emoji picker travel tab', ()=> { mainContent.emojiPickerTravelIcon.isVisible().should.be.true; }); it('should show the emoji picker objects tab', ()=> { mainContent.emojiPickerObjectsIcon.isVisible().should.be.true; }); it('should show the emoji picker symbols tab', ()=> { mainContent.emojiPickerSymbolsIcon.isVisible().should.be.true; }); it('should show the emoji picker flags tab', ()=> { mainContent.emojiPickerFlagsIcon.isVisible().should.be.true; }); it('should show the emoji picker custom tab', ()=> { mainContent.emojiPickerCustomIcon.isVisible().should.be.true; }); it('should show the emoji picker change tone button', ()=> { mainContent.emojiPickerChangeTone.isVisible().should.be.true; }); it('should show the emoji picker search bar', ()=> { mainContent.emojiPickerFilter.isVisible().should.be.true; }); it('send a smile emoji', ()=> { mainContent.emojiSmile.click(); }); it('the value on the message input should be the same as the emoji clicked', ()=> { mainContent.messageInput.getValue().should.equal(':smile:'); }); it('send the emoji', ()=> { mainContent.addTextToInput(' '); mainContent.sendBtn.click(); }); it('the value on the message should be the same as the emoji clicked', ()=> { mainContent.lastMessage.getText().should.equal('😄'); }); it('adds emoji text to the message input', ()=> { mainContent.addTextToInput(':smile'); }); it('should show the emoji popup bar', ()=> { mainContent.messagePopUp.isVisible().should.be.true; }); it('the emoji popup bar title should be emoji', ()=> { mainContent.messagePopUpTitle.getText().should.equal('Emoji'); }); it('should show the emoji popup bar items', ()=> { mainContent.messagePopUpItems.isVisible().should.be.true; }); it('click the first emoji on the popup list', ()=> { mainContent.messagePopUpFirstItem.click(); }); it('the value on the message input should be the same as the emoji clicked', ()=> { mainContent.messageInput.getValue().should.equal(':smile:'); }); it('send the emoji', ()=> { mainContent.sendBtn.click(); }); it('the value on the message should be the same as the emoji clicked', ()=> { mainContent.lastMessage.getText().should.equal('😄'); }); }); });
karlprieb/Rocket.Chat
tests/steps/5-emoji.js
JavaScript
mit
3,445
<?php /** * Smarty plugin * * @package Smarty * @subpackage PluginsModifier */ /** * Smarty capitalize modifier plugin * * Type: modifier<br> * Name: capitalize<br> * Purpose: capitalize words in the string * * @link * @author Monte Ohrt <monte at ohrt dot com> * @param string $ * @return string */ function smarty_modifier_hours($minutos) { return str_pad((integer)($minutos/60), 2, "0", STR_PAD_LEFT).":".str_pad($minutos%60, 2, "0", STR_PAD_LEFT); } ?>
angelj/AppLightweightFramework
lib/smarty/plugins/modifier.hours.php
PHP
mit
494
<?php namespace REA; class IdValue { protected $id; protected $value; public function __construct($id, $value) { $this->setId($id); $this->setValue($value); } public function setId($id) { $this->id = $id; } public function getId() { return $this->id; } public function setValue($value) { $this->value = $value; } public function getValue() { return $this->value; } public function __toString() { return $this->getValue(); } }
i4ucode/reaxml
src/REA/IdValue.php
PHP
mit
468
import React, { useState } from 'react'; import { UncontrolledAlert } from 'reactstrap'; import Alert from '../../../src/Alert'; export const AlertFadelessExample = (props) => { const [visible, setVisible] = useState(true); const onDismiss = () => setVisible(false); return ( <div> <Alert color="primary" isOpen={visible} toggle={onDismiss} fade={false}> I am a primary alert and I can be dismissed without animating! </Alert> </div> ); } export function UncontrolledAlertFadelessExample() { return ( <div> <UncontrolledAlert color="info" fade={false}> I am an alert and I can be dismissed without animating! </UncontrolledAlert> </div> ); }
reactstrap/reactstrap
stories/examples/AlertFadeless.js
JavaScript
mit
716
/*jshint browser: true, strict: true, undef: true */ /*global define: false */ ( function( window ) { 'use strict'; // class helper functions from bonzo https://github.com/ded/bonzo function classReg( className ) { return new RegExp("(^|\\s+)" + className + "(\\s+|$)"); } // classList support for class management // altho to be fair, the api sucks because it won't accept multiple classes at once var hasClass, addClass, removeClass; if ( 'classList' in document.documentElement ) { hasClass = function( elem, c ) { return elem.classList.contains( c ); }; addClass = function( elem, c ) { elem.classList.add( c ); }; removeClass = function( elem, c ) { elem.classList.remove( c ); }; } else { hasClass = function( elem, c ) { return classReg( c ).test( elem.className ); }; addClass = function( elem, c ) { if ( !hasClass( elem, c ) ) { elem.className = elem.className + ' ' + c; } }; removeClass = function( elem, c ) { elem.className = elem.className.replace( classReg( c ), ' ' ); }; } function toggleClass( elem, c ) { var fn = hasClass( elem, c ) ? removeClass : addClass; fn( elem, c ); } var classie = { // full names hasClass: hasClass, addClass: addClass, removeClass: removeClass, toggleClass: toggleClass, // short names has: hasClass, add: addClass, remove: removeClass, toggle: toggleClass }; // transport if ( typeof define === 'function' && define.amd ) { // AMD define( classie ); } else { // browser global window.classie = classie; } Modernizr.addTest('csstransformspreserve3d', function () { var prop = Modernizr.prefixed('transformStyle'); var val = 'preserve-3d'; var computedStyle; if(!prop) return false; prop = prop.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); Modernizr.testStyles('#modernizr{' + prop + ':' + val + ';}', function (el, rule) { computedStyle = window.getComputedStyle ? getComputedStyle(el, null).getPropertyValue(prop) : ''; }); return (computedStyle === val); }); var support = { transitions : Modernizr.csstransitions, preserve3d : Modernizr.csstransformspreserve3d }, transEndEventNames = { 'WebkitTransition': 'webkitTransitionEnd', 'MozTransition': 'transitionend', 'OTransition': 'oTransitionEnd', 'msTransition': 'MSTransitionEnd', 'transition': 'transitionend' }, transEndEventName = transEndEventNames[ Modernizr.prefixed( 'transition' ) ]; function extend( a, b ) { for( var key in b ) { if( b.hasOwnProperty( key ) ) { a[key] = b[key]; } } return a; } function shuffleMArray( marray ) { var arr = [], marrlen = marray.length, inArrLen = marray[0].length; for(var i = 0; i < marrlen; i++) { arr = arr.concat( marray[i] ); } // shuffle 2 d array arr = shuffleArr( arr ); // to 2d var newmarr = [], pos = 0; for( var j = 0; j < marrlen; j++ ) { var tmparr = []; for( var k = 0; k < inArrLen; k++ ) { tmparr.push( arr[ pos ] ); pos++; } newmarr.push( tmparr ); } return newmarr; } function shuffleArr( array ) { var m = array.length, t, i; // While there remain elements to shuffle… while (m) { // Pick a remaining element… i = Math.floor(Math.random() * m--); // And swap it with the current element. t = array[m]; array[m] = array[i]; array[i] = t; } return array; } function Photostack( el, options ) { this.el = el; this.inner = this.el.querySelector( 'div' ); this.allItems = [].slice.call( this.inner.children ); this.allItemsCount = this.allItems.length; if( !this.allItemsCount ) return; this.items = [].slice.call( this.inner.querySelectorAll( 'figure:not([data-dummy])' ) ); this.itemsCount = this.items.length; // index of the current photo this.current = 0; this.options = extend( {}, this.options ); extend( this.options, options ); this._init(); } Photostack.prototype.options = {}; Photostack.prototype._init = function() { this.currentItem = this.items[ this.current ]; this._addNavigation(); this._getSizes(); this._initEvents(); } Photostack.prototype._addNavigation = function() { // add nav dots this.nav = document.createElement( 'nav' ) var inner = ''; for( var i = 0; i < this.itemsCount; ++i ) { inner += '<span></span>'; } this.nav.innerHTML = inner; this.el.appendChild( this.nav ); this.navDots = [].slice.call( this.nav.children ); } Photostack.prototype._initEvents = function() { var self = this, beforeStep = classie.hasClass( this.el, 'photostack-start' ), open = function() { var setTransition = function() { if( support.transitions ) { classie.addClass( self.el, 'photostack-transition' ); } } if( beforeStep ) { this.removeEventListener( 'click', open ); classie.removeClass( self.el, 'photostack-start' ); setTransition(); } else { self.openDefault = true; setTimeout( setTransition, 25 ); } self.started = true; self._showPhoto( self.current ); }; if( beforeStep ) { this._shuffle(); this.el.addEventListener( 'click', open ); } else { open(); } this.navDots.forEach( function( dot, idx ) { dot.addEventListener( 'click', function() { // rotate the photo if clicking on the current dot if( idx === self.current ) { self._rotateItem(); } else { // if the photo is flipped then rotate it back before shuffling again var callback = function() { self._showPhoto( idx ); } if( self.flipped ) { self._rotateItem( callback ); } else { callback(); } } } ); } ); window.addEventListener( 'resize', function() { self._resizeHandler(); } ); } Photostack.prototype._resizeHandler = function() { var self = this; function delayed() { self._resize(); self._resizeTimeout = null; } if ( this._resizeTimeout ) { clearTimeout( this._resizeTimeout ); } this._resizeTimeout = setTimeout( delayed, 100 ); } Photostack.prototype._resize = function() { var self = this, callback = function() { self._shuffle( true ); } this._getSizes(); if( this.started && this.flipped ) { this._rotateItem( callback ); } else { callback(); } } Photostack.prototype._showPhoto = function( pos ) { if( this.isShuffling ) { return false; } this.isShuffling = true; // if there is something behind.. if( classie.hasClass( this.currentItem, 'photostack-flip' ) ) { this._removeItemPerspective(); classie.removeClass( this.navDots[ this.current ], 'flippable' ); } classie.removeClass( this.navDots[ this.current ], 'current' ); classie.removeClass( this.currentItem, 'photostack-current' ); // change current this.current = pos; this.currentItem = this.items[ this.current ]; classie.addClass( this.navDots[ this.current ], 'current' ); // if there is something behind.. if( this.currentItem.querySelector( '.photostack-back' ) ) { // nav dot gets class flippable classie.addClass( this.navDots[ pos ], 'flippable' ); } // shuffle a bit this._shuffle(); } // display items (randomly) Photostack.prototype._shuffle = function( resize ) { var iter = resize ? 1 : this.currentItem.getAttribute( 'data-shuffle-iteration' ) || 1; if( iter <= 0 || !this.started || this.openDefault ) { iter = 1; } // first item is open by default if( this.openDefault ) { // change transform-origin classie.addClass( this.currentItem, 'photostack-flip' ); this.openDefault = false; this.isShuffling = false; } var overlapFactor = .5, // lines & columns lines = Math.ceil(this.sizes.inner.width / (this.sizes.item.width * overlapFactor) ), columns = Math.ceil(this.sizes.inner.height / (this.sizes.item.height * overlapFactor) ), // since we are rounding up the previous calcs we need to know how much more we are adding to the calcs for both x and y axis addX = lines * this.sizes.item.width * overlapFactor + this.sizes.item.width/2 - this.sizes.inner.width, addY = columns * this.sizes.item.height * overlapFactor + this.sizes.item.height/2 - this.sizes.inner.height, // we will want to center the grid extraX = addX / 2, extraY = addY / 2, // max and min rotation angles maxrot = 35, minrot = -35, self = this, // translate/rotate items moveItems = function() { --iter; // create a "grid" of possible positions var grid = []; // populate the positions grid for( var i = 0; i < columns; ++i ) { var col = grid[ i ] = []; for( var j = 0; j < lines; ++j ) { var xVal = j * (self.sizes.item.width * overlapFactor) - extraX, yVal = i * (self.sizes.item.height * overlapFactor) - extraY, olx = 0, oly = 0; if( self.started && iter === 0 ) { var ol = self._isOverlapping( { x : xVal, y : yVal } ); if( ol.overlapping ) { olx = ol.noOverlap.x; oly = ol.noOverlap.y; var r = Math.floor( Math.random() * 3 ); switch(r) { case 0 : olx = 0; break; case 1 : oly = 0; break; } } } col[ j ] = { x : xVal + olx, y : yVal + oly }; } } // shuffle grid = shuffleMArray(grid); var l = 0, c = 0, cntItemsAnim = 0; self.allItems.forEach( function( item, i ) { // pick a random item from the grid if( l === lines - 1 ) { c = c === columns - 1 ? 0 : c + 1; l = 1; } else { ++l } var randXPos = Math.floor( Math.random() * lines ), randYPos = Math.floor( Math.random() * columns ), gridVal = grid[c][l-1], translation = { x : gridVal.x, y : gridVal.y }, onEndTransitionFn = function() { ++cntItemsAnim; if( support.transitions ) { this.removeEventListener( transEndEventName, onEndTransitionFn ); } if( cntItemsAnim === self.allItemsCount ) { if( iter > 0 ) { moveItems.call(); } else { // change transform-origin classie.addClass( self.currentItem, 'photostack-flip' ); // all done.. self.isShuffling = false; if( typeof self.options.callback === 'function' ) { self.options.callback( self.currentItem ); } } } }; if(self.items.indexOf(item) === self.current && self.started && iter === 0) { self.currentItem.style.WebkitTransform = 'translate(' + self.centerItem.x + 'px,' + self.centerItem.y + 'px) rotate(0deg)'; self.currentItem.style.msTransform = 'translate(' + self.centerItem.x + 'px,' + self.centerItem.y + 'px) rotate(0deg)'; self.currentItem.style.transform = 'translate(' + self.centerItem.x + 'px,' + self.centerItem.y + 'px) rotate(0deg)'; // if there is something behind.. if( self.currentItem.querySelector( '.photostack-back' ) ) { self._addItemPerspective(); } classie.addClass( self.currentItem, 'photostack-current' ); } else { item.style.WebkitTransform = 'translate(' + translation.x + 'px,' + translation.y + 'px) rotate(' + Math.floor( Math.random() * (maxrot - minrot + 1) + minrot ) + 'deg)'; item.style.msTransform = 'translate(' + translation.x + 'px,' + translation.y + 'px) rotate(' + Math.floor( Math.random() * (maxrot - minrot + 1) + minrot ) + 'deg)'; item.style.transform = 'translate(' + translation.x + 'px,' + translation.y + 'px) rotate(' + Math.floor( Math.random() * (maxrot - minrot + 1) + minrot ) + 'deg)'; } if( self.started ) { if( support.transitions ) { item.addEventListener( transEndEventName, onEndTransitionFn ); } else { onEndTransitionFn(); } } } ); }; moveItems.call(); } Photostack.prototype._getSizes = function() { this.sizes = { inner : { width : this.inner.offsetWidth, height : this.inner.offsetHeight }, item : { width : this.currentItem.offsetWidth, height : this.currentItem.offsetHeight } }; // translation values to center an item this.centerItem = { x : this.sizes.inner.width / 2 - this.sizes.item.width / 2, y : this.sizes.inner.height / 2 - this.sizes.item.height / 2 }; } Photostack.prototype._isOverlapping = function( itemVal ) { var dxArea = this.sizes.item.width + this.sizes.item.width / 3, // adding some extra avoids any rotated item to touch the central area dyArea = this.sizes.item.height + this.sizes.item.height / 3, areaVal = { x : this.sizes.inner.width / 2 - dxArea / 2, y : this.sizes.inner.height / 2 - dyArea / 2 }, dxItem = this.sizes.item.width, dyItem = this.sizes.item.height; if( !(( itemVal.x + dxItem ) < areaVal.x || itemVal.x > ( areaVal.x + dxArea ) || ( itemVal.y + dyItem ) < areaVal.y || itemVal.y > ( areaVal.y + dyArea )) ) { // how much to move so it does not overlap? // move left / or move right var left = Math.random() < 0.5, randExtraX = Math.floor( Math.random() * (dxItem/4 + 1) ), randExtraY = Math.floor( Math.random() * (dyItem/4 + 1) ), noOverlapX = left ? (itemVal.x - areaVal.x + dxItem) * -1 - randExtraX : (areaVal.x + dxArea) - (itemVal.x + dxItem) + dxItem + randExtraX, noOverlapY = left ? (itemVal.y - areaVal.y + dyItem) * -1 - randExtraY : (areaVal.y + dyArea) - (itemVal.y + dyItem) + dyItem + randExtraY; return { overlapping : true, noOverlap : { x : noOverlapX, y : noOverlapY } } } return { overlapping : false } } Photostack.prototype._addItemPerspective = function() { classie.addClass( this.el, 'photostack-perspective' ); } Photostack.prototype._removeItemPerspective = function() { classie.removeClass( this.el, 'photostack-perspective' ); classie.removeClass( this.currentItem, 'photostack-flip' ); } Photostack.prototype._rotateItem = function( callback ) { if( classie.hasClass( this.el, 'photostack-perspective' ) && !this.isRotating && !this.isShuffling ) { this.isRotating = true; var self = this, onEndTransitionFn = function() { if( support.transitions && support.preserve3d ) { this.removeEventListener( transEndEventName, onEndTransitionFn ); } self.isRotating = false; if( typeof callback === 'function' ) { callback(); } }; if( this.flipped ) { classie.removeClass( this.navDots[ this.current ], 'flip' ); if( support.preserve3d ) { this.currentItem.style.WebkitTransform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) rotateY(0deg)'; this.currentItem.style.transform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) rotateY(0deg)'; } else { classie.removeClass( this.currentItem, 'photostack-showback' ); } } else { classie.addClass( this.navDots[ this.current ], 'flip' ); if( support.preserve3d ) { this.currentItem.style.WebkitTransform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) translate(' + this.sizes.item.width + 'px) rotateY(-179.9deg)'; this.currentItem.style.transform = 'translate(' + this.centerItem.x + 'px,' + this.centerItem.y + 'px) translate(' + this.sizes.item.width + 'px) rotateY(-179.9deg)'; } else { classie.addClass( this.currentItem, 'photostack-showback' ); } } this.flipped = !this.flipped; if( support.transitions && support.preserve3d ) { this.currentItem.addEventListener( transEndEventName, onEndTransitionFn ); } else { onEndTransitionFn(); } } } // add to global namespace window.Photostack = Photostack; var initPhotoSwipeFromDOM = function (gallerySelector) { // parse slide data (url, title, size ...) from DOM elements // (children of gallerySelector) var parseThumbnailElements = function (el) { var thumbElements = el.childNodes , numNodes = thumbElements.length , items = [] , figureEl , linkEl , size , item; for (var i = 0; i < numNodes; i++) { figureEl = thumbElements[i]; // <figure> element // include only element nodes if (figureEl.nodeType !== 1 || figureEl.nodeName.toUpperCase() !== 'FIGURE') { continue; } linkEl = figureEl.children[0]; // <a> element size = linkEl.getAttribute('data-size').split('x'); // create slide object item = { src: linkEl.getAttribute('href') , w: parseInt(size[0], 10) , h: parseInt(size[1], 10) }; if (figureEl.children.length > 1) { // <figcaption> content item.title = figureEl.children[1].innerHTML; } if (linkEl.children.length > 0) { // <img> thumbnail element, retrieving thumbnail url item.msrc = linkEl.children[0].getAttribute('src'); } item.el = figureEl; // save link to element for getThumbBoundsFn items.push(item); } return items; }; // find nearest parent element var closest = function closest(el, fn) { return el && (fn(el) ? el : closest(el.parentNode, fn)); }; // triggers when user clicks on thumbnail var onThumbnailsClick = function (e) { e = e || window.event; e.preventDefault ? e.preventDefault() : e.returnValue = false; var eTarget = e.target || e.srcElement; // find root element of slide var clickedListItem = closest(eTarget, function (el) { return (el.tagName && el.tagName.toUpperCase() === 'FIGURE' && classie.hasClass( el, 'photostack-current' ) ); }); if (!clickedListItem) { return; } // find index of clicked item by looping through all child nodes // alternatively, you may define index via data- attribute var clickedGallery = clickedListItem.parentNode , childNodes = clickedListItem.parentNode.childNodes , numChildNodes = childNodes.length , nodeIndex = 0 , index; for (var i = 0; i < numChildNodes; i++) { if (childNodes[i].nodeType !== 1) { continue; } if (childNodes[i] === clickedListItem) { index = nodeIndex; break; } nodeIndex++; } if (index >= 0) { // open PhotoSwipe if valid index found openPhotoSwipe(index, clickedGallery); } return false; }; // parse picture index and gallery index from URL (#&pid=1&gid=2) var photoswipeParseHash = function () { var hash = window.location.hash.substring(1) , params = {}; if (hash.length < 5) { return params; } var vars = hash.split('&'); for (var i = 0; i < vars.length; i++) { if (!vars[i]) { continue; } var pair = vars[i].split('='); if (pair.length < 2) { continue; } params[pair[0]] = pair[1]; } if (params.gid) { params.gid = parseInt(params.gid, 10); } return params; }; var openPhotoSwipe = function (index, galleryElement, disableAnimation, fromURL) { var pswpElement = document.querySelectorAll('.pswp')[0] , gallery , options , items; items = parseThumbnailElements(galleryElement); // define options (if needed) options = { // define gallery index (for URL) galleryUID: galleryElement.getAttribute('data-pswp-uid') , getThumbBoundsFn: function (index) { // See Options -> getThumbBoundsFn section of documentation for more info var thumbnail = items[index].el.getElementsByTagName('img')[0], // find thumbnail pageYScroll = window.pageYOffset || document.documentElement.scrollTop , rect = thumbnail.getBoundingClientRect(); return { x: rect.left , y: rect.top + pageYScroll , w: rect.width }; } }; // PhotoSwipe opened from URL if (fromURL) { if (options.galleryPIDs) { // parse real index when custom PIDs are used // http://photoswipe.com/documentation/faq.html#custom-pid-in-url for (var j = 0; j < items.length; j++) { if (items[j].pid == index) { options.index = j; break; } } } else { // in URL indexes start from 1 options.index = parseInt(index, 10) - 1; } } else { options.index = parseInt(index, 10); } // exit if index not found if (isNaN(options.index)) { return; } if (disableAnimation) { options.showAnimationDuration = 0; } // Pass data to PhotoSwipe and initialize it gallery = new PhotoSwipe(pswpElement, PhotoSwipeUI_Default, items, options); gallery.init(); }; // loop through all gallery elements and bind events var galleryElements = document.querySelectorAll(gallerySelector); for (var i = 0, l = galleryElements.length; i < l; i++) { galleryElements[i].setAttribute('data-pswp-uid', i + 1); galleryElements[i].onclick = onThumbnailsClick; } // Parse URL and open gallery if it contains #&pid=3&gid=1 var hashData = photoswipeParseHash(); if (hashData.pid && hashData.gid) { openPhotoSwipe(hashData.pid, galleryElements[hashData.gid - 1], true, true); } }; // execute above function initPhotoSwipeFromDOM('.photostack-container'); })( window );
fauzie/fauzie.github.io
src/js/photostack.js
JavaScript
mit
20,955
package workspace.typeblocking; import java.awt.Point; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.util.ArrayList; import java.util.List; import renderable.RenderableBlock; import workspace.Page; import workspace.WorkspaceEvent; import workspace.WorkspaceListener; import workspace.BlockCanvas.Canvas; import codeblocks.Block; import codeblocks.BlockConnector; /** * The FocusTraversalManager has two function. First, it * maintains a pointer to the block, if any, that has * focus and the corresponding focus point on that block. * If the focus is not on the block, then it must be set * to some point of the block canvas. * * The second primary function of the FocusTraversalManager * is to redirect the focus to the next appropriate block * in a particular stack. One could "traverse" the stack * by moving the focus to one of the following: * 1. the block after * 2. the block before * 3. the next block * 4. the previous block * * The exact definition of what "next", "previous", * "after", and "before" is described in details in * their corresponding method summary. * As a focus manager of the entire system, the class * must maintain particular invariants at all time. * Clients of this module may obtain the focus through * three observer (getter) methods. Clients may also * manualy mutate the focus through three modifier (setter) * methods. * * However, BOTH the value returned in the observer * methods and the value passed in the modifier methods * MUST maintain particular invariants described below. * * These invariants must hold at all time and check reps * should be imposed to ensure that any changes to the * system still holds these crucial invariants. Clients * of this module may assume that the invariants mentioned * below will always hold. * * INVARIANT I. * If the canvas has focus, then the block does not. Thus * 1. focusBlock == Block.null * 2. canvasFocusPoint != null * 3. blockFocusPoint == null * * INVARIANT II. * If the block has focus, then the canvas does not. Thus * 1. focusBlock != Block.null * 2. canvasFocusPoint == null * 3. blockFocusPoint != null * * @specfield focusBlock : Long //block with focus * @specfield canvasFocusPoint : Point //focus point on canvas relative to canvas * @specfield blockFocusPoint : Point //focus point on block relative to block * */ public class FocusTraversalManager implements MouseListener, KeyListener, WorkspaceListener{ /** this.focuspoint: the point on the block with focus */ private Point blockFocusPoint = null; /** this.focuspoint: the point on the block canvas's last mosue click */ private Point canvasFocusPoint = new Point(0,0); /** this.focusblock: the Block ID that currently has focus */ private Long focusBlock = Block.NULL; ///////////////// // Constructor // ///////////////// public FocusTraversalManager(){} /////////////// // Observers // /////////////// /** * @return the block that has focus, if any. * * TODO: finish method documentation */ public Long getFocusBlockID() { //DO NOT REMOVE CHECK REP BELOW!!! //Many client classes depend on this invariant if(invalidBlock(focusBlock)){ //If block is null then, focus should be on block on canvas. //To test this, we must recall that when focus is on block, //the canvas focus point is set to null. if (canvasFocusPoint == null) throw new RuntimeException( "Focus has not yet been set to block"); if (blockFocusPoint != null) throw new RuntimeException( "Focus should be set to block"); }else{ //if block is not null, then we need to make sure the //focus is on the block. To test this, we recall //that when the focus is on the block, the //canvas focus point is set to null if (canvasFocusPoint != null) throw new RuntimeException( "Focus has not yet been set to canvas"); if (blockFocusPoint == null) throw new RuntimeException( "Focus has not been removed from block"); } return focusBlock; } /** * @return point of focus on canvas * * TODO: finish method documentation */ public Point getCanvasPoint(){ //DO NOT REMOVE CHECK REP BELOW!!! //Many client classes depend on this invariant //If focus block is not null, then the focus is //currently set on that instance of the block. //As a result, you may not request the canvas's //focus point because it DOES NOT have focus if(!invalidBlock(focusBlock)) throw new RuntimeException( "May not request canvas's focus point if " + "canvas does not have focus. Focus at: "+focusBlock); if(blockFocusPoint != null ) throw new RuntimeException( "May not request canvas's focus point if " + "canvas does not have focus. Focus at: "+blockFocusPoint); if(canvasFocusPoint == null ) throw new RuntimeException( "May not request canvas's focus point if " + "canvas does not have focus. Canvas focus is null."); //Okay, invariant holds. So return point of focus on canvas. return canvasFocusPoint; } /** * @return point of focus on block * * TODO: finish method documentation */ public Point getBlockPoint(){ //DO NOT REMOVE CHECK REP BELOW!!! //Many client classes depend on this invariant //If focus block is null, then the focus is //currently set on canvas. You may not request //the block's focus point because it DOES NOT have focus if(invalidBlock(focusBlock)) throw new RuntimeException( "May not request block's focus point if " + "block does not have focus. Focus at: "+focusBlock); if(blockFocusPoint == null ) throw new RuntimeException( "May not request block's focus point if " + "block does not have focus. Focus at: "+blockFocusPoint); if(canvasFocusPoint != null ) throw new RuntimeException( "Canvas focus is still valid. May not request" + "block's focus point if block does not have focus."); //Okay, invariant holds. So return point of focus on canvas. return blockFocusPoint; } ////////////////// // Focus Set Up // ////////////////// /** * Sets focus to block * @parem block * * TODO: finish method documentation */ public void setFocus(Block block){ if(block == null){ throw new RuntimeException("Invariant Violated:" + "may not set focus to a null Block instance"); //Please do not remove exception above. This class //and many other classes within the typeblocking //package requires that the following invariant(s) must hold: // MAY NOT SET FOCUS TO NULL BLOCK INSTANCES }else{ setFocus(block.getBlockID()); } } public void setFocus(Long blockID){ if(blockID == null || blockID == Block.NULL || blockID == -1 || Block.getBlock(blockID) == null ){ throw new RuntimeException("Invariant Violated:" + "may not set focus to a null Block instance"); //Please do not remove exception above. This class //and many other classes within the typeblocking //package requires that the following invariant(s) must hold: // MAY NOT SET FOCUS TO NULL BLOCK INSTANCES } //remove focus from old block if one existed if(!invalidBlock(this.focusBlock)){ getBlock(this.focusBlock).setFocus(false); RenderableBlock.getRenderableBlock(this.focusBlock).repaintBlock(); } //set focus block to blockID getBlock(blockID).setFocus(true); RenderableBlock.getRenderableBlock(blockID).requestFocus(); RenderableBlock.getRenderableBlock(blockID).repaintBlock(); //set canvas focus point to be null; canvas no longer has focus this.canvasFocusPoint = null; //set blockfocus point to new value this.blockFocusPoint = new Point(0,0); //set focusblock this.focusBlock = blockID; //System.out.println("FocusManager: Setting focus to block: " + this.focusBlock+", "+this.blockFocusPoint+", "+this.canvasFocusPoint); } /** * Set Focus to canvas at canvasPoint. THE BLOCKID MUST BE BLOCK.NULL!!! * @param canvasPoint * @param blockID * * TODO: finish method documentation */ public void setFocus(Point canvasPoint, Long blockID) { if(blockID == null || blockID == Block.NULL || blockID == -1 || Block.getBlock(blockID) == null ){ //remove focus form old block if one existed if(!invalidBlock(this.focusBlock)){ getBlock(this.focusBlock).setFocus(false); RenderableBlock.getRenderableBlock(this.focusBlock).repaintBlock(); } //set block ID to null this.focusBlock=Block.NULL; //set canvas focus point to canvasPoint this.canvasFocusPoint = canvasPoint; //set block focus point to null this.blockFocusPoint = null; //System.out.println("FocusManager: Setting focus to canvas: " + this.focusBlock+", "+this.blockFocusPoint+", "+this.canvasFocusPoint); }else{ throw new RuntimeException("Invariant Violated:" + "may not set new focus point if focus is on a block"); //Please do not remove exception above. This class //and many other classes within the typeblocking //package requires that the following invariant(s) must hold: // CANVAS POINT MAY NOT BE SET UNLESS BLOCK IS NULL // CANVAS POINT MAY NOT BE SET IF FOCUS IS ON BLOCK } } void setFocus(Point location){ //please do not remove this method or try to //create a method this takes only a point as an argument. //The thing is, it's too tricky to create such a method //and I want to let users who use this method know that //this is a fundalmentally wrong method to invoke. //may not use this method as it does not ensure class invariant will hold throw new RuntimeException("The use of this method is FORBIDDEN"); } ////////////////////////////////////// // Focus Traversal Handling Methods // ////////////////////////////////////// /** * Reassigns the focus to the "next block" of the current focusBlock. * If the current focusblock is at location n of the flatten linear vector * of the block tree structure, then the "next block" is located at n+1. * In other words, the previous block is the parent block of the next * socket of the parent block of the focusblock. * * @requires pointFocusOwner != null && * focusblock.getSockets() != null && * focusblock.getSockets() is not empty * @modifies this.focusblock * @effects this.focusblock now points to the "next block" * as described in method overview; * @returns true if the new focus is on a block that isn't null */ public boolean focusNextBlock() { //return focus to canvas if no focusblock does not exist if(invalidBlock(focusBlock) || !RenderableBlock.getRenderableBlock(focusBlock).isVisible()){ setFocus(canvasFocusPoint, Block.NULL); return false; } //give focus to any preceeding socket of current block Block currentBlock = getBlock(focusBlock); for(BlockConnector socket : currentBlock.getSockets()){ if(socket != null && !invalidBlock(socket.getBlockID())){ //give focus to socket block setFocus(socket.getBlockID()); return true; } } //give focus to after block of current block Long afterBlock = currentBlock.getAfterBlockID(); if(!invalidBlock(afterBlock)){ setFocus(afterBlock); return true; } //current block != null.....invariant checke in getNextNode() Block nextBlock = this.getNextNode(currentBlock); //check invariant if(nextBlock == null) throw new RuntimeException ("Invariant Violated: return value of getNextNode() may not be null"); //set focus setFocus(nextBlock.getBlockID()); return true; } /** * Reassigns the focus to the "previous block" of the current focusBlock. * If the current focusblock is at location n of the flatten linear vector * of the block tree structure, then the "previous block" is located at n-1. * In other words, the previous block is the innermost block of the previous * socket of the parent block of the focusblock. * * @requires pointFocusOwner != null && * focusblock.getSockets() != null && * focusblock.getSockets() is not empty * @modifies this.focusblock * @effects this.focusblock now points to the "previous block" * as described in method overview; * @returns true if the new focus is on a block that isn't null */ public boolean focusPrevBlock() { //return focus to canvas if no focusblock does not exist if(invalidBlock(focusBlock) || !RenderableBlock.getRenderableBlock(focusBlock).isVisible()){ setFocus(canvasFocusPoint, Block.NULL); return false; } Block currentBlock = getBlock(focusBlock); //set plug to be previous block Block previousBlock = getPlugBlock(currentBlock); //if plug is null, set before to be previous block if(previousBlock == null ) previousBlock = getBeforeBlock(currentBlock); //If before is ALSO null, jump to bottom of the stack; if(previousBlock == null){ previousBlock = getBottomRightBlock(currentBlock); }else{ //If at least a plug block OR (but not both) before block exist, //then get innermost block of the previous socket of the previous block //assumes previousBlock.getSockets is not empty, not null Block beforeBlock = previousBlock; //ASSUMPTION BEING MADE: assume that the list below is constructed to //have all the sockets FOLLOWED by FOLLOWED by the after connector //THE ORDER MUST BE KEPT TO WORK CORRECTLY! We cannot use //BlockLinkChecker.getSocketEquivalents because the specification does //not guarantee this precise ordering. Futhermore, an interable //has no defined order. However, as of this writing, the current implementation //of that method does seem to produce this ordering. But we're still not using it. List<BlockConnector> connections = new ArrayList<BlockConnector>(); for(BlockConnector socket : previousBlock.getSockets()){ connections.add(socket); //add sockets } connections.add(previousBlock.getAfterConnector()); //add after connector //now traverse the connections for(BlockConnector connector : connections){ if(connector == null || connector.getBlockID() == Block.NULL || getBlock(connector.getBlockID()) == null){ continue; //if null socket, move on to next socket } if(connector.getBlockID().equals(currentBlock.getBlockID())){ //reached back to current block if(!beforeBlock.getBlockID().equals(previousBlock.getBlockID())){ //if previous block was never updated, go to bottom of stack previousBlock = getBottomRightBlock(previousBlock); } setFocus(previousBlock.getBlockID()); return true; } //update previous block previousBlock = getBlock(connector.getBlockID()); } //so it seems liek all sockets are null (or sockets exist), //so just get the bottom of the stack previousBlock = getBottomRightBlock(previousBlock); } setFocus(previousBlock.getBlockID()); return true; } /** * Gives focus to the first after block down the tree, * that is, the next control block in the stack. * If next control block does not exist, then give * focus to current focusblock. Otherwise, give * focus to block canvas. * @requires focusblock.isMinimized() == false * @modifies this.focusblock * @effects sets this.focusblock to be the first * after block if possible. Otherwise, keep * the focus on the current focusblock. * If focus block is an invalid block, * return focus to the default (block canvas) * @returns true if and only if focus was set to new after block * @expects no wrapping to TopOfStack block, do not use this method for infix blocks */ public boolean focusAfterBlock() { if(invalidBlock(focusBlock) || !RenderableBlock.getRenderableBlock(focusBlock).isVisible()){ //return focus to canvas if no focusblock does not exist setFocus(canvasFocusPoint, Block.NULL); return false; } Block currentBlock = getBlock(focusBlock); while(currentBlock != null){ if(getAfterBlock(currentBlock) != null){ //return focus to before block setFocus(getAfterBlock(currentBlock)); return true; } currentBlock = getPlugBlock(currentBlock); if(currentBlock == null){ //return focus to old block setFocus(focusBlock); return true; } } return true; } /** * Gives focus to the first beforeblock up the tree, * that is, the previous control block in the stack. * If no previous control block exists, then give * focus to current focusblock. Otherwise, give * focus to block canvas. * @requires focusblock.isMinimized() == false * @modifies this.focusblock * @effects sets this.focusblock to be the first * before block if possible. Otherwise, keep * the focus on the current focusblock. * If focus block is an invalid block, * return focus to the default (block canvas) * @returns true if and only if focus was set to new before block * @expects no wrapping to bottom block, do not use this method for infix blocks */ public boolean focusBeforeBlock() { if(invalidBlock(focusBlock) || !RenderableBlock.getRenderableBlock(focusBlock).isVisible()){ //return focus to canvas if no focusblock does not exist setFocus(canvasFocusPoint, Block.NULL); return false; } Block currentBlock = getBlock(focusBlock); while(currentBlock != null){ if(getBeforeBlock(currentBlock) != null){ //return focus to before block setFocus(getBeforeBlock(currentBlock)); return true; } currentBlock = getPlugBlock(currentBlock); if(currentBlock == null){ //return focus to old block setFocus(focusBlock); return false; } } return false; } /////////////////////// // TRAVERSING STACKS // /////////////////////// /** * @requires currentBlock != null * @param currentBlock * @return currentBlock or NON-NULL block that is the next node of currentBlock */ private Block getNextNode(Block currentBlock){ //check invarient if(invalidBlock(currentBlock)) throw new RuntimeException("Invariant Violated: may not resurve over a null instance of currentBlock"); //if plug not null, then let plug be parent of current block Block parentBlock = getBlock(currentBlock.getPlugBlockID()); //otherwise if after not null, then let after be parent of current block if (invalidBlock(parentBlock)) parentBlock = getBlock(currentBlock.getBeforeBlockID()); //if plug and after are both null, then return currentBlock if(invalidBlock(parentBlock)) return currentBlock; //socket index of current block with respect to its parent int i = parentBlock.getSocketIndex(parentBlock.getConnectorTo(currentBlock.getBlockID())); //return socket block of parent if one exist //int i == 0 if not current block not a socket of parent if(i != -1 && i>=0){ for(BlockConnector parentSocket : parentBlock.getSockets()){ if(parentSocket == null || invalidBlock(parentSocket.getBlockID()) || parentBlock.getSocketIndex(parentSocket)<=i){ continue; }else{ return getBlock(parentSocket.getBlockID()); } } } //return afterblock of parent if(invalidBlock(parentBlock.getAfterBlockID())){ return getNextNode(parentBlock); } if(parentBlock.getAfterBlockID().equals(currentBlock.getBlockID())){ return getNextNode(parentBlock); } //This is top of the block, so return currentBlock return getBlock(parentBlock.getAfterBlockID()); } /** * For a given block, returns the outermost (top-leftmost) * block in the stack. * @requires block represented by blockID != null * @param blockID any block in a stack. * @return the outermost block (or Top-of-Stack) * such that the outermost block != null */ Long getTopOfStack(Long blockID) { //check invariant if (blockID == null || blockID == Block.NULL || Block.getBlock(blockID) == null) throw new RuntimeException("Invariant Violated: may not" + "iterate for outermost block over a null instance of Block"); //parentBlock is the topmost block in stack Block parentBlock = null; //go the top most block parentBlock = getBeforeBlock(blockID); if (parentBlock !=null ) return getTopOfStack(parentBlock.getBlockID()); //go to the left most block parentBlock = getPlugBlock(blockID); if(parentBlock != null ) return getTopOfStack(parentBlock.getBlockID()); //check invariant assert parentBlock != null : "Invariant Violated: may not " + "return a null instance of block as the outermost block"; //If we can't traverse any deeper, then this is innermost Block. return blockID; } /** * For a given block, returns the innermost (bottom-rightmost) * block in the substack. * @requires block !=null block.getBlockID != Block.NULL * @param block the top block of the substack. * @return the innermost block in the substack. * such that the innermost block != null */ private Block getBottomRightBlock (Block block) { //check invariant if (block == null || block.getBlockID() == Block.NULL ) throw new RuntimeException("Invariant Violated: may not" + "iterate for innermost block over a null instance of Block"); //returnblock = next deepest node on far right Block returnBlock = null; // find deepest node, that is, bottom most block in stack. returnBlock = getAfterBlock(block); if(returnBlock != null) return getBottomRightBlock(returnBlock); // move to the next socket in line: for(BlockConnector socket : block.getSockets()){//assumes socket!=null Block socketBlock = getBlock(socket.getBlockID()); if(socketBlock !=null ) returnBlock = socketBlock; } if(returnBlock !=null ) return getBottomRightBlock(returnBlock); //check invariant assert returnBlock != null : "Invariant Violated: may not " + "return a null instance of block as the innermost block"; //If we can't traverse any deeper, then this is innermost Block. return block; } ////////////////////// //Convienence Method// ////////////////////// /** * @param block * @return true if and only if block ==null || * block.getBlockID == null && * block.getBLockID == Block.NULL */ private boolean invalidBlock(Block block){ if (block == null) return true; if (block.getBlockID() == null) return true; if (block.getBlockID() == Block.NULL) return true; return false; } private boolean invalidBlock(Long blockID){ if (blockID == null) return true; if (blockID == Block.NULL) return true; if (getBlock(blockID) == null) return true; return false; } /** * All the private methods below follow a similar * specification. They all require that the block * referanced by blockID (or block.getBlockID) is * non-null. If getting a socket block, they * additionally require that 0<socket< # of sockets in block. * All the methods before return a block located * at a block connector corresponding to the name * of the obserser method. * * @requires blockID != Block.Null && block !=null * @returns Block instance located at corresponding * connection or null if non exists */ private Block getBlock(Long blockID) { return Block.getBlock(blockID); } private Block getBeforeBlock(Long blockID) { return getBeforeBlock(getBlock(blockID)); } private Block getBeforeBlock(Block block) { return getBlock(block.getBeforeBlockID()); } private Block getAfterBlock(Block block) { return getBlock(block.getAfterBlockID()); } private Block getPlugBlock(Long blockID) { return getPlugBlock(getBlock(blockID)); } private Block getPlugBlock(Block block) { return getBlock(block.getPlugBlockID()); } /////////////////// // MOUSE METHODS // /////////////////// /** * Action: removes the focus current focused block * and places new focus on e.getSource * @requires e != null * @modifies this.blockFocusOwner && e.getSource * @effects removes focus from this.blockFocusOwner * adds focus to e.getSource iff e.getSource * is instance of BlockCanvas and RenderableBlock */ private void grabFocus(MouseEvent e){ //System.out.println("FocusManager: Mouse Event at ("+ e.getX()+", "+e.getY()+") on "+e.getSource()); if(e.getSource() instanceof Canvas){ //get canvas point Point canvasPoint = e.getPoint(); /* SwingUtilities.convertPoint( (BlockCanvas)e.getSource(), e.getPoint(), ((BlockCanvas)e.getSource()).getCanvas());*/ setFocus(canvasPoint, Block.NULL); ((Canvas)e.getSource()).grabFocus(); }else if(e.getSource() instanceof RenderableBlock){ setFocus(((RenderableBlock)e.getSource()).getBlockID()); ((RenderableBlock)e.getSource()).grabFocus(); } } public void mousePressed(MouseEvent e) {grabFocus(e);} public void mouseReleased(MouseEvent e) {grabFocus(e);} public void mouseEntered(MouseEvent e) {} public void mouseExited(MouseEvent e) {} public void mouseClicked(MouseEvent e) {} /////////////////////////////// // Key Listeners Method // /////////////////////////////// public void keyPressed(KeyEvent e){ KeyInputMap.processKeyChar(e);} public void keyReleased(KeyEvent e){} public void keyTyped(KeyEvent e){} /////////////////////////////// // WORKSPACE LISTENER METHOD // /////////////////////////////// /** * Subscription: BLOCK_ADDED events. * Action: add this.mouselistener to the block referanced by event * @requires block reference in event is not null * @modifies this.blockFocusOwner && event.block * @effects Add this.mouselistener to this.blockFocusOwner * removes focus from this.blockFocusOwner * adds focus to e.getSource iff e.getSource * is instance of BlockCanvas and RenderableBlock */ public void workspaceEventOccurred(WorkspaceEvent event) { switch(event.getEventType()){ case WorkspaceEvent.BLOCK_ADDED: //System.out.println("FocusManager: Block_Added Event at of "+event.getSourceBlockID()+" on "+event.getSourceWidget()); //only add focus manager as listener to blocks added to pages if(!(event.getSourceWidget() instanceof Page)) break; RenderableBlock rb = RenderableBlock.getRenderableBlock(event.getSourceBlockID()); if(rb == null) break; //only add once for(MouseListener l : rb.getMouseListeners()){ if(l.equals(this)){ return; //TODO: this shouldn't return, it should break //but you can't double break in java } } rb.addMouseListener(this); rb.addKeyListener(this); setFocus(event.getSourceBlockID()); rb.grabFocus(); break; } } public String toString() { return "FocusManager: "+blockFocusPoint+" of "+Block.getBlock(focusBlock); } }
boubre/BayouBot
Workspace/src/workspace/typeblocking/FocusTraversalManager.java
Java
mit
26,961
require 'spec_helper' describe Vocaloo do let(:plain_string) { "GOal!" } let(:hyperbolize_string) { "GOOOaaal!" } let(:a4_hyperbolize_string) { "GOOOOaaaal!" } let(:dramatize_string) { "GOal!!!!" } let(:a4_dramatize_string) { "GOal!!!!!" } let(:stringosaur_string) { "GOawrl!" } let(:duplicate_vowels) { "GOOOGLE" } let(:stringosaur_duplicate_vowels) { "GOOOWRGLEWR" } describe '::hyperbolize' do it 'should return a string with double vowels then before' do subject.hyperbolize(plain_string).should == hyperbolize_string end end describe '::hyperbolize(plain_string, { :length => 4 }' do it 'should return a string with quadruple vowels then before' do subject.hyperbolize(plain_string, { :length => 4 }).should == a4_hyperbolize_string end end describe '::dramatize' do it "should return a string that adds with triple '!'" do subject.dramatize(plain_string).should == dramatize_string end end describe '::dramatize(plain_string, { :length => 4 }' do it "should return a string that adds with quadruple '!'" do subject.dramatize(plain_string, { :length => 4 }).should == a4_dramatize_string end end describe '::stringosaur' do it "should return a string that adds dinosaurs lingo" do subject.stringosaur(plain_string).should == stringosaur_string end end describe '::stringosaur' do it "should only apply the transformation in the last sequence vocals" do duplicate_vowels.stringosaur.should == stringosaur_duplicate_vowels end end describe '.In String instance' do describe '#hyperbolize' do it 'should respond to hyperbolize' do plain_string.should be_respond_to(:hyperbolize) end it 'should return hyperbolize string' do plain_string.hyperbolize.should == hyperbolize_string end end describe '#dramatize' do it 'should respond to dramatize' do plain_string.should be_respond_to(:dramatize) end it 'should return dramatize string' do plain_string.dramatize.should == dramatize_string end end describe '#stringosaur' do it 'should respond to stringosaur' do plain_string.should be_respond_to(:stringosaur) end it 'should return stringosaur string' do plain_string.stringosaur.should == stringosaur_string end end end end
donnpebe/vocaloo
spec/vocaloo_spec.rb
Ruby
mit
2,407
<?php call_user_func(function() { if ( ! is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) { throw new \LogicException('Could not find vendor/autoload.php. Did you forget to run "composer install --dev"?'); } require $autoloadFile; \Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists'); });
Gendoria/param-converter-bundle
Tests/bootstrap.php
PHP
mit
351
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1 = require('@angular/core'); var platform_browser_1 = require('@angular/platform-browser'); var forms_1 = require('@angular/forms'); var app_component_1 = require('./app.component'); var people_service_1 = require('./people.service'); var people_list_component_1 = require('./people-list.component'); var person_details_component_1 = require('./person-details.component'); var person_component_1 = require('./+person/person.component'); var http_1 = require('@angular/http'); var angular_datatables_module_1 = require('./shared/modules/datatables/angular-datatables/angular-datatables.module'); var app_routes_1 = require('./app.routes'); var AppModule = (function () { function AppModule() { } AppModule = __decorate([ core_1.NgModule({ imports: [platform_browser_1.BrowserModule, app_routes_1.routing, forms_1.FormsModule, http_1.HttpModule, angular_datatables_module_1.DataTablesModule], declarations: [app_component_1.AppComponent, people_list_component_1.PeopleListComponent, person_details_component_1.PersonDetailsComponent, person_component_1.PersonComponent], bootstrap: [app_component_1.AppComponent], providers: [people_service_1.PeopleService] }), __metadata('design:paramtypes', []) ], AppModule); return AppModule; }()); exports.AppModule = AppModule; //# sourceMappingURL=app.module.js.map
VinhNT23/Angular2Demo1
app/app.module.js
JavaScript
mit
2,170
<?php /** * This file is part of the PropelBundle package. * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. * * @license MIT License */ namespace Propel\PropelBundle\Command; use Propel\PropelBundle\Command\AbstractCommand; use Symfony\Component\Console\Input\InputOption; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; use Symfony\Component\Console\Output\Output; /** * MigrationMigrateCommand. * * @author William DURAND <william.durand1@gmail.com> */ class MigrationMigrateCommand extends AbstractCommand { /** * @see Command */ protected function configure() { $this ->setDescription('Executes the next migrations up') ->setDefinition(array( new InputOption('--up', '', InputOption::VALUE_NONE, 'Executes the next migration up'), new InputOption('--down', '', InputOption::VALUE_NONE, 'Executes the next migration down'), )) ->setHelp(<<<EOT The <info>propel:migration:migrate</info> command checks the version of the database structure, looks for migrations files not yet executed (i.e. with a greater version timestamp), and executes them. <info>php app/console propel:migration:migrate [--up] [--down]</info> <info>php app/console propel:migration:migrate</info> : is the default command, it <comment>executes all</comment> migrations files. <info>php app/console propel:migration:migrate --up</info> : checks the version of the database structure, looks for migrations files not yet executed (i.e. with a greater version timestamp), and <comment>executes the first one</comment> of them. <info>php app/console propel:migration:migrate --down</info> : checks the version of the database structure, and looks for migration files already executed (i.e. with a lower version timestamp). <comment>The last executed migration found is reversed.</comment> EOT ) ->setName('propel:migration:migrate') ; } /** * @see Command * * @throws \InvalidArgumentException When the target directory does not exist */ protected function execute(InputInterface $input, OutputInterface $output) { if ($input->getOption('down')) { $this->callPhing('migration-down'); } elseif ($input->getOption('up')) { $this->callPhing('migration-up'); } else { $this->callPhing('migrate'); } $this->writeSummary($output, 'propel-migration'); } }
mpabon/isgwebapp
vendor/propel/propel-bundle/Propel/PropelBundle/Command/MigrationMigrateCommand.php
PHP
mit
2,649
<?php namespace Drivegal\GalleryFile; abstract class MediaFile extends AbstractFile { protected $originalFilename; protected $cameraMake; protected $cameraModel; public function __construct($id, $title, $thumbnailUrl, $bigThumbnailUrl) { $this->id = $id; $this->title = $title; $this->thumbnailUrl = $thumbnailUrl; $this->bigThumbnailUrl = $bigThumbnailUrl; } /** * @param mixed $cameraMake */ public function setCameraMake($cameraMake) { $this->cameraMake = $cameraMake; } /** * @return mixed */ public function getCameraMake() { return $this->cameraMake; } /** * @param mixed $cameraModel */ public function setCameraModel($cameraModel) { $this->cameraModel = $cameraModel; } /** * @return mixed */ public function getCameraModel() { return $this->cameraModel; } /** * @return string */ public function getCaption() { $caption = ''; if (!$this->description || $this->originalFilename != $this->title) { $caption = $this->title; } if ($caption && $this->description) { $caption .= ' - '; } $caption .= $this->description; return trim($caption); } /** * @param mixed $originalFilename */ public function setOriginalFilename($originalFilename) { $this->originalFilename = $originalFilename; } /** * @return mixed */ public function getOriginalFilename() { return $this->originalFilename; } }
jasongrimes/drivegal
src/Drivegal/GalleryFile/MediaFile.php
PHP
mit
1,673
module TeamsHelper def to_pythagoras_data(r, ra, g) # r :得点 # ra:失点 # g :試合数 return (g.to_f * (r.to_f ** 2 / (r.to_f ** 2 + ra.to_f ** 2))).to_i end end
Shinichi-Nakagawa/no-ball-app-rails
noball/app/helpers/teams_helper.rb
Ruby
mit
188
<?php $strTableName="admin_rights"; $_SESSION["OwnerID"] = $_SESSION["_".$strTableName."_OwnerID"]; $strOriginalTableName="finance_ugrights"; $gstrOrderBy=""; if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by") $gstrOrderBy="order by ".$gstrOrderBy; // alias for 'SQLQuery' object $gSettings = new ProjectSettings("admin_rights"); $gQuery = $gSettings->getSQLQuery(); $eventObj = &$tableEvents["admin_rights"]; $reportCaseSensitiveGroupFields = false; $gstrSQL = $gQuery->gSQLWhere(""); ?>
tony19760619/PHPRunnerProjects
Finance/output/include/admin_rights_variables.php
PHP
mit
521
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Microsoft.Z3; using System.Collections.Generic; using System.Diagnostics; using System.Diagnostics.Contracts; namespace PreposeGestures { public class Validity { public static bool IsInternallyValid( App app, out List<PoseSafetyException> allExceptions, out List<long> elapsedTimes) { allExceptions = new List<PoseSafetyException>(); elapsedTimes = new List<long>(); var result = true; foreach (var gesture in app.Gestures) { List<PoseSafetyException> exceptions = null; var stopwatch = new Stopwatch(); stopwatch.Start(); if (!Validity.IsInternallyValid(gesture, out exceptions)) { result = false; Contract.Assert(exceptions != null); allExceptions.AddRange(exceptions); } stopwatch.Stop(); elapsedTimes.Add(stopwatch.ElapsedMilliseconds); } return result; } public static bool IsInternallyValid(Gesture gesture, out List<PoseSafetyException> exceptions) { bool result = true; exceptions = new List<PoseSafetyException>(); foreach (var step in gesture.Steps) { var pose = step.Pose; Z3Body witness = null; if (!Validity.IsInternallyValid(pose)) { var exception = new PoseSafetyException( "Pose failed internal validity check!", pose, witness ); exceptions.Add(exception); result = false; } } return result; } public static bool IsInternallyValid(Pose pose) { Z3Body input = Z3Body.MkZ3Const(); Z3Body transformed = pose.Transform.Transform(input); // We have to check that the pose is within the default safety restriction IBodyRestriction safe = Safety.DefaultSafetyRestriction(); BoolExpr inputSafe = safe.Evaluate(input); BoolExpr transformedRestricted = pose.Restriction.Evaluate(transformed); // Try to generate a safe witness using the transform BoolExpr outputSafe = safe.Evaluate(transformed); // Check to see if the transform is not satisfiable -- if so, then it is not internally valid BoolExpr expr = Z3.Context.MkAnd(inputSafe, transformedRestricted, outputSafe); SolverCheckResult solverResult = Z3AnalysisInterface.CheckStatus(expr); if (solverResult.Status == Status.SATISFIABLE) { // We can create a witness - therefore the pose must be valid return true; } else if (solverResult.Status == Status.UNKNOWN) { return false; } else { Contract.Assert(solverResult.Status == Status.UNSATISFIABLE); // Pose is not internally valid and as a result there can be no witness created return false; } } public static bool IsInternallyValid( App app, out string errorMessage, out List<long> elapsedTimes) { errorMessage = ""; elapsedTimes = new List<long>(); var result = true; foreach (var gesture in app.Gestures) { var stopwatch = new Stopwatch(); stopwatch.Start(); if (!Validity.IsInternallyValid(gesture, out errorMessage)) { errorMessage = "\tThe gesture " + gesture.Name + " is invalid.\n" + errorMessage; result = false; break; } stopwatch.Stop(); elapsedTimes.Add(stopwatch.ElapsedMilliseconds); } return result; } public static bool IsInternallyValid(Gesture gesture, out string firstBadStep) { firstBadStep = ""; bool result = true; int count = 0; foreach (var step in gesture.Steps) { ++count; var pose = step.Pose; Z3Body witness = null; if (!Validity.IsInternallyValid(pose, out firstBadStep)) { firstBadStep = "\tOn the step " + count + ": " + step.ToString() + ".\n\tOn the statement: " + firstBadStep + ".\n\tThis the first found statement that makes the gesture invalid.\n"; result = false; break; } } return result; } public static bool IsInternallyValid(Pose pose, out string firstBadStatement) { bool result = true; firstBadStatement = ""; Z3Body input = Z3Body.MkZ3Const(); Z3Body transformed = pose.Transform.Transform(input); var restrictions = pose.Restriction.Restrictions; var composite = new CompositeBodyRestriction(); foreach (var restriction in restrictions) { composite.And(restriction); BoolExpr transformedRestricted = composite.Evaluate(transformed); SolverCheckResult solverResult = Z3AnalysisInterface.CheckStatus(transformedRestricted); if(solverResult.Status == Status.UNSATISFIABLE) { firstBadStatement = restriction.ToString(); result = false; break; } } return result; } } }
lsfcin/prepose
Z3Experiments/Z3Experiments/Gestures/Analysis/Validity.cs
C#
mit
6,077
/* * The MIT License (MIT) * * Copyright (c) 2015 Rodrigo Quesada <rodrigoquesada.dev@gmail.com> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package com.rodrigodev.xgen4j.generators; import com.rodrigodev.xgen4j.GenerationOptions; import com.rodrigodev.xgen4j.model.common.clazz.ErrorExceptionClassFilePair; import com.rodrigodev.xgen4j.model.error.ErrorClassFile; import com.rodrigodev.xgen4j.model.error.ErrorClassWriter; import com.rodrigodev.xgen4j.model.error.configuration.definition.ErrorDefinition; import com.rodrigodev.xgen4j.model.error.configuration.definition.RootErrorDefinition; import com.rodrigodev.xgen4j.model.error.exception.ExceptionClassFile; import com.rodrigodev.xgen4j.model.error.exception.ExceptionClassWriter; import lombok.Getter; import lombok.NonNull; import lombok.experimental.Accessors; import lombok.experimental.FieldDefaults; import lombok.experimental.NonFinal; import javax.inject.Inject; import java.util.ArrayList; import java.util.List; import java.util.Optional; /** * Created by Rodrigo Quesada on 13/07/15. */ @FieldDefaults(makeFinal = true) @Accessors(fluent = true) public class ErrorClassesGenerator extends ClassesGenerator { public static class InjectedFields { @Inject ErrorClassWriter errorClassWriter; @Inject ExceptionClassWriter exceptionClassWriter; @Inject public InjectedFields() { } } private InjectedFields inj; private RootErrorDefinition rootError; @NonFinal private Optional<ErrorClassFile> rootErrorClassFile; @NonFinal private Optional<ExceptionClassFile> rootExceptionClassFile; @Getter private List<ErrorExceptionClassFilePair> errorExceptionPairs; private GenerationOptions options; protected ErrorClassesGenerator( @NonNull InjectedFields injectedFields, String sourceDirPath, @NonNull RootErrorDefinition rootError, @NonNull GenerationOptions options ) { super(sourceDirPath); this.inj = injectedFields; this.rootError = rootError; this.rootErrorClassFile = Optional.empty(); this.rootExceptionClassFile = Optional.empty(); this.errorExceptionPairs = new ArrayList<>(); this.options = options; } public ErrorClassFile rootErrorClassFile() { return rootErrorClassFile.get(); } public ExceptionClassFile rootExceptionClassFile() { return rootExceptionClassFile.get(); } @Override public void generate() { generate(rootError, Optional.empty(), Optional.empty()); } private void generate( ErrorDefinition error, Optional<ErrorClassFile> parentErrorClassFile, Optional<ExceptionClassFile> parentExceptionClassFile ) { ExceptionClassFile exceptionClassFile = inj.exceptionClassWriter.write( sourceDirPath, rootExceptionClassFile, error, parentExceptionClassFile, options ); ErrorClassFile errorClassFile = inj.errorClassWriter.write( sourceDirPath, rootErrorClassFile, rootExceptionClassFile, error, exceptionClassFile, parentErrorClassFile ); if (!rootErrorClassFile.isPresent()) { rootErrorClassFile = Optional.of(errorClassFile); rootExceptionClassFile = Optional.of(exceptionClassFile); } errorExceptionPairs.add(new ErrorExceptionClassFilePair(errorClassFile, exceptionClassFile)); ErrorDefinition[] subErrors = error.errors(); for (ErrorDefinition subError : subErrors) { generate( subError, Optional.of(errorClassFile), Optional.of(exceptionClassFile) ); } } }
RodrigoQuesadaDev/XGen4J
xgen4j/src/main/java/com/rodrigodev/xgen4j/generators/ErrorClassesGenerator.java
Java
mit
4,876
#include <gbVk/Fence.hpp> #include <gbVk/Exceptions.hpp> #include <gbBase/Assert.hpp> namespace GHULBUS_VULKAN_NAMESPACE { Fence::Fence(VkDevice logical_device, VkFence fence) :m_fence(fence), m_device(logical_device) { } Fence::~Fence() { if(m_fence) { vkDestroyFence(m_device, m_fence, nullptr); } } Fence::Fence(Fence&& rhs) :m_fence(rhs.m_fence), m_device(rhs.m_device) { rhs.m_fence = nullptr; rhs.m_device = nullptr; } VkFence Fence::getVkFence() { return m_fence; } Fence::Status Fence::getStatus() { VkResult res = vkGetFenceStatus(m_device, m_fence); if(res == VK_NOT_READY) { return Status::NotReady; } checkVulkanError(res, "Error in vkGetFenceStatus."); return Status::Ready; } void Fence::wait() { auto const status = wait_for(std::chrono::nanoseconds::max()); GHULBUS_ASSERT(status == Status::Ready); } Fence::Status Fence::wait_for(std::chrono::nanoseconds timeout) { VkResult res = vkWaitForFences(m_device, 1, &m_fence, VK_TRUE, timeout.count()); if(res == VK_NOT_READY) { return Status::NotReady; } checkVulkanError(res, "Error in vkWaitForFences."); return Status::Ready; } void Fence::reset() { VkResult res = vkResetFences(m_device, 1, &m_fence); checkVulkanError(res, "Error in vkResetFences."); } }
ComicSansMS/GhulbusVulkan
src/Fence.cpp
C++
mit
1,304
import sys import mechanize import re import json import time import urllib import dogcatcher import HTMLParser import os h = HTMLParser.HTMLParser() cdir = os.path.dirname(os.path.abspath(__file__)) + "/" tmpdir = cdir + "tmp/" voter_state = "SC" source = "State" result = [("authory_name", "first_name", "last_name", "county_name", "fips", "street", "city", "address_state", "zip_code", "po_street", "po_city", "po_state", "po_zip_code", "reg_authority_name", "reg_first", "reg_last", "reg_street", "reg_city", "reg_state", "reg_zip_code", "reg_po_street", "reg_po_city", "reg_po_state", "reg_po_zip_code", "reg_phone", "reg_fax", "reg_email", "reg_website", "reg_hours", "phone", "fax", "email", "website", "hours", "voter_state", "source", "review")] #Every county is on a different webpage so we have to cycle through them all. #To do so, we go elsewhere, extract a list of counties, then later grab a series of web pages based on that list. #(Writing it to a file isn't strictly necessary, but saves some time down the line.) file_path = tmpdir + "south_carolina-counties.html" url = "http://www.scvotes.org/how_to_register_absentee_voting" data = urllib.urlopen(url).read() output = open(file_path,"w") output.write(data) output.close() data = open(file_path).read() #First, we trim the counties page to the minimum needed information, which starts at the list of per-county links. data = data.partition("<a href=\"/how_to_register_absentee_voting/abbeville\" class=\"page-next\"")[0] #For each county, we grab a URL ender (county_links) and the county name, as represented in the URL (county_links_names). county_link_re = re.compile("(/how_to_register_absentee_voting/.+?)\">") county_link_name_re = re.compile("/how_to_register_absentee_voting/(.+?)\">") county_links = county_link_re.findall(data) county_link_names = county_link_name_re.findall(data) #Once we have those in place, we start setting up regexes that are used in cleaning individual counties. county_name_re = re.compile(">([^<>]+? County) .+?<[pbr /]>") relevant_re = re.compile("(<div class=\"content.+?)<!-- end content", re.DOTALL) phone_re =re.compile(">[^x]*?(\(*\d{3}\)*[ -]*\d{3}-.+?)[<F]") phone_format_re = re.compile("(\(*\d{3}\)* *\d{3}-\d{4})") area_code_re = re.compile("\(\d{3}\) ") digit_re = re.compile("\d") fax_re = re.compile("Fax.+?(\(*\d{3}\)*.+?)<") official_name_1_re = re.compile("Director[</u>]* *[:-] *([A-Za-z\. -]+).+?<") official_name_2_re = re.compile("<[br /p]*>([A-Za-z\. -]+?)<[^<>]*><[^<>]*>[Email: ]*<a href=\"mailto:") official_name_3_re = re.compile("<[br /p]*>([A-Za-z\. -]+?)<[^<>]*><[^<>]*><[^<>]*><a href=\"mailto:") official_name_4_re = re.compile("<[br /p]*>([A-Za-z\. -]+?)<[^<>]*><[^<>]*><[^<>]*><a href=\"/files") official_name_5_re = re.compile(">([A-Za-z\. -]+?), [^<>]*?Director") official_name_6_re = re.compile("Fax .+?<[^<>]*><[^<>]*>([A-Za-z\. -]+?)<") website_re = re.compile("a href=\"(h.+?)\"") #email_re = re.compile("mailto:%*2*0*(.+?) *\".*?>") email_re = re.compile("[A-Za-z\.-]+?@[A-Za-z\.-]+") email_junk_re = re.compile("@[^<>]+?\.[cg]o[mv](.*?)<") font_re = re.compile("</*font.+?>") style_re = re.compile("(style.+?\")>") span_re = re.compile("</*span.+?>") w_re = re.compile("</*w:.+?>") u_re = re.compile("</*u>") m_re = re.compile("</*m:.+?>") set_re = re.compile("{.+?}") comment_re = re.compile("<!--.+?>") charleston_re = re.compile(" [A-Z][A-Z](.+?)\d{5}[\d-]*") richland_fix_re = re.compile("Military and Overseas Correspondence.+?</a>") address_re = re.compile("<[br p/]*>([^<>]*\d[^>]+?<.+?\d{5}[\d-]*) *<[brp/ ]*>") csz_re = re.compile("[\d>] *([A-Za-z \.]+?,* [A-Z][A-Z] +\d{5}[\d-]*)") po_re = re.compile("(P*o*s*t* *Of*i*c*e* .+?)<") city_re = re.compile("(.+?),* [A-Z][A-Z] ") state_re = re.compile(" ([A-Z][A-Z]) ") zip_re = re.compile("\d{5}[\d-]*") zip_mod_re = re.compile("\(\d{5}[\d-]*\)") mailing_region_re = re.compile("Mailing Address.+?[A-Z][A-Z] \d{5}[\d-]* *<[brp/ ]*>") for link in county_links: authority_name, first_name, last_name, county_name, town_name, fips, street, city, address_state, zip_code, po_street, po_city, po_state, po_zip_code, reg_authority_name, reg_first, reg_last, reg_street, reg_city, reg_state, reg_zip_code, reg_po_street, reg_po_city, reg_po_state, reg_po_zip_code, reg_phone, reg_fax, reg_email, reg_website, reg_hours, phone, fax, email, website, hours, review = dogcatcher.begin(voter_state) link_name = county_link_names[county_links.index(link)] file_name = tmpdir + link_name + "-sc-clerks.html" url = "http://www.scvotes.org" + link data = urllib.urlopen(url).read() output = open(file_name,"w") output.write(data) output.close() county = open(file_name).read() #Trimming the county. county = relevant_re.findall(county)[0] #There are a tremendous number of useless HTML tags or county-specific fixes. This code cleans them up so we don't have to deal with them elsewhere. for junk in email_junk_re.findall(county): county = county.replace(junk,"") for font in font_re.findall(county): county = county.replace(font,"") for style in style_re.findall(county): county = county.replace(style,"") for span in span_re.findall(county): county = county.replace(span,"") for w in w_re.findall(county): county = county.replace(w,"") for u in u_re.findall(county): county = county.replace(u,"") for m in m_re.findall(county): county = county.replace(m,"") for comment in comment_re.findall(county): county = county.replace(comment,"") for s in set_re.findall(county): county = county.replace(s,"") for item in charleston_re.findall(county): county = county.replace(item," ") for item in richland_fix_re.findall(county): county = county.replace(item," ") #fixing errors in Dillon, Florence, and Newberry Counties county = county.replace("sedwardsvr17","<a href=\"mailto:sedwardsvr17@aol.com\"").replace("%3",":").replace("%40","@").replace("brogers","<a href=\"mailto:brogers@newberrycounty.net\"") county_name = county_name_re.findall(county)[0].replace(" County","").strip() print "__________________________________" #unique case in Aiken County: if county_name == "Aiken County": reg_email = "cholland@aikencountysc.gov" county.replace("cholland@aikencountysc.gov","") phone = dogcatcher.find_phone(phone_re, county) for item in phone_re.findall(county): county = county.replace(item, "") #Many of the fax numbers don't have area codes. So we grab the first area code we find in the block of phone numbers and give it to the fax number. area_code = area_code_re.findall(phone)[0] fax = dogcatcher.find_phone(fax_re, county, area_code) for item in fax_re.findall(county): county = county.replace(item, "") county = county.replace("Fax", "") #unique case in Greenwood County, which gives a separate phone number for registration-related contacts: if county_name == "Greenwood County": phone = "(864) 942-3152, (864) 942-3153, (864) 942-5667" fax = "(804) 942-5664" county = county.replace(phone,"").replace(fax,"") reg_phone = "(864) 942-8585" county.replace("(864) 942-8585","") reg_fax = "(846) 942-5664" county.replace("942-5664","") #Some counties have a registration-only email address. In those counties, the absentee email has "absentee" in it. #Websites have similar problems print county email = dogcatcher.find_emails(email_re, county) if "absentee" in email: emails = email.split(", ") email = "" for item in emails: county = county.replace(item, "") if "absentee" in item: email = email + ", " + item else: reg_email = reg_email + ", " + item email = email.strip(", ") reg_email = reg_email.strip(", ") else: for item in email_re.findall(county): county = county.replace(item, "") website = dogcatcher.find_website(website_re, county) if "absentee" in website: websites = website.split(", ") website = "" for item in websites: county = county.replace(item, "") if "absentee" in item: website = website + ", " + item else: reg_website = reg_website + ", " + item else: for item in website_re.findall(county): county = county.replace(item, "") website = website.strip(", ") reg_website = reg_website.strip(", ") print [email] #There are many forms the official's name can take. This tries all of them. if official_name_1_re.findall(county): official_name = official_name_1_re.findall(county)[0].strip() elif official_name_2_re.findall(county): official_name = official_name_2_re.findall(county)[0].strip() elif official_name_3_re.findall(county): official_name = official_name_3_re.findall(county)[0].strip() elif official_name_4_re.findall(county): official_name = official_name_4_re.findall(county)[0].strip() elif official_name_5_re.findall(county): official_name = official_name_5_re.findall(county)[0].strip() elif official_name_6_re.findall(county): official_name = official_name_6_re.findall(county)[0].strip() else: official_name = "" if official_name: first_name, last_name, review = dogcatcher.split_name(official_name, review) county = county.replace(official_name,"") print "++++++++++++++++++++++++++++++++++++++" if county_name == "Charleston County": county = county.replace("Post Office","Mailing Address:<> Post Office") #Some counties don't put a marked "Mailing Address" section, but do have a separate mailing address. #So first, we check whether the county has "Mailing Address" in it. if "Mailing Address" not in county: #This section finds the full address. After finding the address, it identifies a city/state/zip (csz) combination and a PO Box number if that exists. #It removes both the CSZ and the PO Address (if it exists) from the full address, leaving behind a street address with some garbage. #It then cleans up the street address and pulls the city, state, and zip out of the csz, and assigns them as appropriate to the street address and state. address = address_re.findall(county)[0] csz = csz_re.findall(address)[0] address = address.replace(csz,"") try: po_street = po_re.findall(address)[0].replace("</b><p>","") except: po_street = "" street = address.replace(po_street,"").replace(csz,"").replace("</b><p>","") street = street.replace("<p>",", ").replace("</p>",", ").replace("<br />",", ").replace(",,",", ").replace(" ,",",").replace(",,",", ").replace(", , ",", ").strip(" /,") if po_street: po_city = city_re.findall(csz)[0] po_state = state_re.findall(csz)[0] po_zip_code = zip_re.findall(csz)[0] if street: city = city_re.findall(csz)[0] address_state = state_re.findall(csz)[0] zip_code = zip_re.findall(csz)[0] else: #If there's an explicitly stated mailing address, we find it, and then pull the mailing address out of it. #At the same time, we cut the mailing address out of the entire county and find a physical address in what's left of the county. #We then clean both of those addresses appropriately. mailing_region = mailing_region_re.findall(county)[0] county = county.replace(mailing_region,"") mailing_addresss = address_re.findall(mailing_region)[0] po_street = po_re.findall(mailing_addresss)[0] csz = csz_re.findall(mailing_addresss)[0] po_city = city_re.findall(csz)[0] po_state = state_re.findall(csz)[0] po_zip_code = zip_re.findall(csz)[0] address = address_re.findall(county)[0] csz = csz_re.findall(address)[0] street = address.replace(csz,"").replace("</b><p>","") street = street.replace("<p>",", ").replace("</p>",", ").replace("<br />",", ").replace(",,",", ").replace(" ,",",").replace(",,",", ").replace(", , ",", ").strip(" /,") city = city_re.findall(csz)[0] address_state = state_re.findall(csz)[0] zip_code = zip_re.findall(csz)[0] #Some of the addresses have a more detailed zip code appended to the street address or po_street. #This checks for that, reassigns the and removes it if it appears. if zip_mod_re.findall(street): zip_code = zip_mod_re.findall(street)[0].strip("()") street = street.replace(zip_code,"").strip(" ()") if zip_mod_re.findall(po_street): po_zip_code = zip_mod_re.findall(po_street)[0].strip("()") po_street = po_street.replace(zip_code,"").strip(" ()") fips = dogcatcher.find_fips(county_name, voter_state) result.append([authority_name, first_name, last_name, county_name, fips, street, city, address_state, zip_code, po_street, po_city, po_state, po_zip_code, reg_authority_name, reg_first, reg_last, reg_street, reg_city, reg_state, reg_zip_code, reg_po_street, reg_po_city, reg_po_state, reg_po_zip_code, reg_phone, reg_fax, reg_email, reg_website, reg_hours, phone, fax, email, website, hours, voter_state, source, review]) #This outputs the results to a separate text file. dogcatcher.output(result, voter_state, cdir)
democracyworks/dog-catcher
south_carolina.py
Python
mit
12,842
import { div } from '../core/dom-api'; import { urls } from '../urls'; const commentsSort = (a, b) => { if (a.time < b.time) return -1; if (a.time > b.time) return 1; return 0; }; const commentElement = (data) => { let replies = data && data.comments && data.comments.length && data.comments .sort(commentsSort) .map(item => commentElement(item)); return`<div class="comment"> <div class="details"> <div class="user">${data.user}</div> <div class="time">${data.time_ago}</div> </div> <div class="content"> ${data.content} </div> ${replies ? replies.join('') : ''} </div>`; }; const commentsElement = (comments) => { return `<div class="comments">${comments.length && comments.sort(commentsSort).map(data => commentElement(data)).join('')}</div>`; }; export const CommentsView = (props) => { let template; let data; let timeoutId; const loadData = () => { fetch(urls.item(props.routeParams.id)) .then(res => res.json()) .then(res => { data = res; render(); }); }; function createTemplate() { let hasComments = data.comments.length; let commentsContent = commentsElement(data.comments); let url = data.url; url = url.indexOf('item') === 0 ? '/' + url : url; // Set the title document.querySelector('title').innerText = `${data.title} | Vanilla Hacker News PWA`; // Clear timeout if (timeoutId) clearTimeout(timeoutId); return div({ className: 'item-view' }, ` <a class="title" href="${url}" target="_blank"> <h1>${data.title}<span>&#x2197;</span></h1> </a> <div class="subtitle ${data.type}"> <div class="user">${data.user}</div> <div class="time-ago">${data.time_ago}</div> <div class="stars">${data.points} <span>★</span></div> </div> <div class="content"> ${data.content || 'No content'} </div> <div class="comments"> <div class="subtitle">${hasComments ? 'Comments' : 'No coments'}</div> ${commentsContent} </div> `); } function createFirstTemplate() { const firstTemplate = div({ className: 'item-view' }, '<div class="content-loading">Loading content</div>'); timeoutId = setTimeout(() => { firstTemplate.querySelector('.content-loading').innerHTML += '<br/>...<br/>Looks like it takes longer than expected'; scheduleLongerTimeout(firstTemplate); }, 1e3); return firstTemplate; } function scheduleLongerTimeout(el) { timeoutId = setTimeout(() => { el.querySelector('.content-loading').innerHTML += '</br>...<br/>It\'s been over 2 seconds now, content should be arriving soon'; }, 1500); } function render() { if (!!template.parentElement) { let newTemplate = createTemplate(); template.parentElement.replaceChild(newTemplate, template); template = newTemplate; } } template = createFirstTemplate(); loadData(); return template; };
cristianbote/hnpwa-vanilla
public/views/comments-view.js
JavaScript
mit
3,407
#include <nan.h> using namespace v8; NAN_METHOD(Length) { Nan::MaybeLocal<String> maybeStr = Nan::To<String>(info[0]); v8::Local<String> str; if(maybeStr.ToLocal(&str) == false) { Nan::ThrowError("Error converting first argument to string"); } int len = strlen(*String::Utf8Value(str)); info.GetReturnValue().Set(len); } NAN_MODULE_INIT(Init) { Nan::Set(target, Nan::New("length").ToLocalChecked(), Nan::GetFunction(Nan::New<FunctionTemplate>(Delay)).ToLocalChecked()); } NODE_MODULE(myaddon, Init)
SomeoneWeird/goingnative
exercises/its_a_twoway_street/solution/myaddon.cc
C++
mit
530
//package com.darktalker.cordova.webviewsetting; package com.bluechatbox.android.displaysize; import org.apache.cordova.CordovaPlugin; import org.apache.cordova.CordovaWebView; import org.apache.cordova.CordovaInterface; import org.apache.cordova.CallbackContext; import org.json.JSONArray; import org.json.JSONException; import android.os.Build; import android.util.Log; import android.view.Display; import android.view.WindowManager; import android.content.Context; import android.graphics.Point; public class DisplaySize extends CordovaPlugin { private CordovaWebView webView; private static final String LOG_TAG = "DisplaySize"; @Override public void initialize(final CordovaInterface cordova, CordovaWebView webView) { this.webView = webView; super.initialize(cordova, webView); } @Override public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { if ("get".equals(action)) { Context ctx = this.cordova.getActivity().getApplicationContext(); Display display = ((WindowManager) ctx.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay(); Point size = new Point(); display.getSize(size); int width = size.x; int height = size.y; callbackContext.success(Integer.toString(width) + '-' + Integer.toString(height)); return true; } return false; // Returning false results in a "MethodNotFound" error. } }
tysjiang/displaysize
src/android/DisplaySize.java
Java
mit
1,630
using System; using System.Net.WebSockets; using System.Text; using System.Threading; using System.Threading.Tasks; using CoinAPI.WebSocket.V1.DataModels; using Utf8Json; namespace CoinAPI.WebSocket.V1.Testing { public class CoinApiWsClientReconnect : CoinApiWsClient { public CoinApiWsClientReconnect(bool isSandbox = false) : base(isSandbox) { } public void ForceReconnectUsedOnlyTestPurpose() { try { _client.CloseAsync(WebSocketCloseStatus.NormalClosure, nameof(ForceReconnectUsedOnlyTestPurpose), CancellationToken.None).Wait(); } catch (Exception ex) { OnError(ex); } } } }
coinapi/coinapi-sdk
data-api/csharp-ws/CoinAPI.WebSocket.V1/Testing/CoinApiWsClientReconnect.cs
C#
mit
749
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("SPDisposeCheckRules")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("SPDisposeCheckRules")] [assembly: AssemblyCopyright("Copyright © 2013")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("73f82c2e-7138-4944-9220-43a6964f7602")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("2.0.0.0")] [assembly: AssemblyFileVersion("2.0.0.0")]
rroman81/spdisposecheck2013
SPDisposeCheckRules/Properties/AssemblyInfo.cs
C#
mit
1,414
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using System.Collections; using System.Collections.Generic; namespace Microsoft.Build.Evaluation { /// <summary> /// Splits an expression into fragments at semicolons, except where the /// semicolons are in a macro or separator expression. /// Fragments are trimmed and empty fragments discarded. /// </summary> /// <remarks> /// These complex cases prevent us from doing a simple split on ';': /// (1) Macro expression: @(foo->'xxx;xxx') /// (2) Separator expression: @(foo, 'xxx;xxx') /// (3) Combination: @(foo->'xxx;xxx', 'xxx;xxx') /// We must not split on semicolons in macro or separator expressions like these. /// </remarks> internal struct SemiColonTokenizer : IEnumerable<string> { private readonly string _expression; public SemiColonTokenizer(string expression) { _expression = expression; } public Enumerator GetEnumerator() => new Enumerator(_expression); IEnumerator<string> IEnumerable<string>.GetEnumerator() => GetEnumerator(); IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); internal struct Enumerator : IEnumerator<string> { private readonly string _expression; private string _current; private int _index; public Enumerator(string expression) { _expression = expression; _index = 0; _current = default(string); } public string Current { get { return _current; } } object IEnumerator.Current => Current; public void Dispose() { } public bool MoveNext() { int segmentStart = _index; bool insideItemList = false; bool insideQuotedPart = false; string segment; // Walk along the string, keeping track of whether we are in an item list expression. // If we hit a semi-colon or the end of the string and we aren't in an item list, // add the segment to the list. for (; _index < _expression.Length; _index++) { switch (_expression[_index]) { case ';': if (!insideItemList) { // End of segment, so add it to the list segment = GetExpressionSubstring(segmentStart, _index - segmentStart); if (segment != null) { _current = segment; return true; } // Move past this semicolon segmentStart = _index + 1; } break; case '@': // An '@' immediately followed by a '(' is the start of an item list if (_expression.Length > _index + 1 && _expression[_index + 1] == '(') { // Start of item expression insideItemList = true; } break; case ')': if (insideItemList && !insideQuotedPart) { // End of item expression insideItemList = false; } break; case '\'': if (insideItemList) { // Start or end of quoted expression in item expression insideQuotedPart = !insideQuotedPart; } break; } } // Reached the end of the string: what's left is another segment _current = GetExpressionSubstring(segmentStart, _expression.Length - segmentStart); return _current != null; } public void Reset() { _current = default(string); _index = 0; } /// <summary> /// Returns a whitespace-trimmed and possibly interned substring of the expression. /// </summary> /// <param name="startIndex">Start index of the substring.</param> /// <param name="length">Length of the substring.</param> /// <returns>Equivalent to _expression.Substring(startIndex, length).Trim() or null if the trimmed substring is empty.</returns> private string GetExpressionSubstring(int startIndex, int length) { int endIndex = startIndex + length; while (startIndex < endIndex && char.IsWhiteSpace(_expression[startIndex])) { startIndex++; } while (startIndex < endIndex && char.IsWhiteSpace(_expression[endIndex - 1])) { endIndex--; } if (startIndex < endIndex) { var target = new SubstringInternTarget(_expression, startIndex, endIndex - startIndex); return OpportunisticIntern.InternableToString(target); } return null; } } } }
cdmihai/msbuild
src/Build/Evaluation/SemiColonTokenizer.cs
C#
mit
5,943
'use strict'; var assert = require('assert'); var resource = require('../resource'); exports.Person = resource.create('Person', {api: 'person', version: 2}) .extend({ flag: function(options){ return this.constructor.post('/people/' + this.id + '/flag', options); } }, { find: function(options){ options = options || {}; assert(options.email, 'An email must be provided'); return this.get('/people/find', options); } });
clearbit/clearbit-node
src/enrichment/person.js
JavaScript
mit
473
<?php /** * Created by DP-Webtechnics. * Rights are property of DP-Webtechnics */ function redirect($location, $statuscode = "303") { if(REDIRECT_FROM_ROOT && strpos($location, 'http') !== 0){ if(!preg_match('/^([\/])/', $location)){ $location = '/'.$location; } if(REDIRECT_ADD_LANG && !preg_match('/^([\/]{0,1})(nl|NL|fr|FR|en|EN)/', $location)){ $location = '/'.REQUEST_LANG. $location; } } //http_response_code($statuscode); header('Location: '.$location, true, $statuscode); exit(); } function showError($statuscode) { if(in_array($statuscode, array('404', '403', '500'))){ //http_response_code($statuscode); print sysview('error_'.$statuscode); exit(); } }
dieterpollier/loxodo
src/Helpers/response.php
PHP
mit
778
#pragma once //! Include the SDL2_Engine objects #include "../__LibraryManagement.hpp" #include "../Utilities/IGlobal.hpp" #include "../Utilities/TypeID.hpp" namespace SDL2_Engine { //! Prototype the Scene Manager Initialiser object namespace Initialisation { struct SceneManagerInitialiser; } namespace Scenes { //! Prototype the ISceneBase object class ISceneBase; /* * Name: SceneManager * Author: Mitchell Croft * Created: 11/10/2017 * Modified: 06/11/2017 * * Purpose: * Provide an interface for controlling the updating and rendering of * 'scenes' throughout the runtime of the program **/ class SDL2_LIB_INC SceneManager : public Utilities::IGlobal { public: ///////////////////////////////////////////////////////////////////////////////////////////////////// ////////----------------------------------Management Functions-------------------------------//////// ///////////////////////////////////////////////////////////////////////////////////////////////////// /* SceneManager : addScene - Add a new Scene of a specified type with specified values Created: 11/10/2017 Modified: 11/10/2017 Template T - The type of Scene to create Template TArgs - A parameter pack of types used to setup the new Scene param[in] pArgs - A parameter pack of values used to setup the new Scene return bool - Returns true if the Scene was successfully created and introduced to the Manager */ template<typename T, typename ... TArgs> inline bool addScene(TArgs ... pArgs) { //Ensure the template is of the correct type static_assert(std::is_base_of<ISceneBase, T>::value, "Can not add a type that is not a subclass of ISceneBase as a new Scene in the Scene Manager"); //Initialise the new Scene return initialiseScene(new T(pArgs...), Utilities::typeToID<T>()); } /* SceneManager : retrieveScene - Retrieve the first active Scene of the specified type Created: 06/11/2017 Modified: 06/11/2017 Template T - The type of Scene to retrieve return T* - Returns a pointer to the first Scene of type T or nullptr if not found */ template<typename T> inline T* retrieveScene() { //Ensure the template is of the correct type static_assert(std::is_base_of<ISceneBase, T>::value, "Can not retrieve a type that is not a subclass of ISceneBase from the Scene Manager"); //Find the Scene return (T*)retrieveScene(Utilities::typeToID<T>()); } /* SceneManager : retrieveScene - Retrieve the first active Scene of the specified type Created: 06/11/2017 Modified: 06/11/2017 param[in] pID - The Type ID of the Scene to retrieve return ISceneBase* - Returns a pointer to the first active Scene of with a matching typeID or nullptr if not found */ ISceneBase* retrieveScene(const Utilities::typeID& pID); /* SceneManager : removeScene - Flag the first Scene of the specified type for removal Created: 11/10/2017 Modified: 11/10/2017 Template T - The type of Scene to remove return bool - Returns true if a Scene of the specified type was flagged */ template<typename T> inline bool removeScene() { //Ensure the template is of the correct type static_assert(std::is_base_of<ISceneBase, T>::value, "Can not remove a type that is not a subclass of ISceneBase from the Scene Manager"); return removeScene(Utilities::typeToID<T>()); } /* SceneManager : removeScene - Flag the first scene of the specified type for removal Created: 11/10/2017 Modified: 11/10/2017 param[in] pID - The Type ID of the Scene to remove return bool - Returns true if a Scene of the specified type was flagged */ bool removeScene(const Utilities::typeID& pID); /* SceneManager : removeScenes - Flag all scenes of the specified type for removal Created: 11/10/2017 Modified: 11/10/2017 Template T - The type of Scene to remove return bool - Returns true if a Scene of the specified type was flagged */ template<typename T> inline bool removeScenes() { //Ensure the template is of the correct type static_assert(std::is_base_of<ISceneBase, T>::value, "Can not remove a type that is not a subclass of ISceneBase from the Scene Manager"); return removeScenes(Utilities::typeToID<T>()); } /* SceneManager : removeScenes - Flag of scenes of the specified type for removal Created: 11/10/2017 Modified: 11/10/2017 param[in] pID - The Type ID of the Scene to remove return bool - Returns true if a Scene of the specified type was flagged */ bool removeScenes(const Utilities::typeID& pID); /* SceneManager : quit - Flag to the program that it should terminate Created: 11/10/2017 Modified: 11/10/2017 */ void quit(); ///////////////////////////////////////////////////////////////////////////////////////////////////// ////////-------------------------------------Data Accessors----------------------------------//////// ///////////////////////////////////////////////////////////////////////////////////////////////////// /* SceneManager : isRunning - Get the running flag of the program Created: 11/10/2017 Modified: 11/10/2017 return const bool& - Returns a constant reference to the running flag */ const bool& isRunning() const; ///////////////////////////////////////////////////////////////////////////////////////////////////// ////////--------------------------------Construction/Destruction-----------------------------//////// ///////////////////////////////////////////////////////////////////////////////////////////////////// /* SceneManager : Constructor - Initialise with default values Created: 11/10/2017 Modified: 11/10/2017 param[in] pSetup - Defines how the Scene Manager should be setup */ SceneManager(Initialisation::SceneManagerInitialiser* pSetup); /* SceneManager : createInterface - Verify and setup starting information Created: 11/10/2017 Modified: 11/10/2017 return bool - Returns true if the Resources Manager was setup correctly */ bool createInterface() override; /* SceneManager : destroyInterface - Deallocate internal memory allocated Created: 11/10/2017 Modified: 11/10/2017 */ void destroyInterface() override; /* SceneManager : update - Update and render the contained Scenes Created: 11/10/2017 Modified: 02/11/2017 */ void update() override; private: //! Define the internal protected elements for the Renderer struct SceneManagerInternalData; SceneManagerInternalData* mData; //! Initialise a new scene bool initialiseScene(ISceneBase* pScene, const Utilities::typeID& pID); }; } }
MitchCroft/SDL2_Engine
SDL2_Engine/Projects/SDL2_Engine/src/Scenes/SceneManager.hpp
C++
mit
6,822
var opn = require('opn'); console.log('打开二维码...') // Opens the image in the default image viewer opn('static/img/qr.jpg').then(() => { console.log('关闭二维码!') });
doterlin/wechat-robot
src/lib/open.js
JavaScript
mit
185
<?php return array( 'number.decimals_separator' => ',', 'number.thousands_separator' => ' ', 'None' => 'Tidak satupun', 'Edit' => 'Edit', 'Remove' => 'Hapus', 'Yes' => 'Ya', 'No' => 'Tidak', 'cancel' => 'batal', 'or' => 'atau', 'Yellow' => 'Kuning', 'Blue' => 'Biru', 'Green' => 'Hijau', 'Purple' => 'Ungu', 'Red' => 'Merah', 'Orange' => 'Jingga', 'Grey' => 'Abu-abu', 'Brown' => 'Coklat', 'Deep Orange' => 'Oranye', 'Dark Grey' => 'Abu-abu Gelap', 'Pink' => 'Merah Muda', 'Teal' => 'Teal', 'Cyan' => 'Sian', 'Lime' => 'Lime', 'Light Green' => 'Hijau Muda', 'Amber' => 'Amber', 'Save' => 'Simpan', 'Login' => 'Masuk', 'Official website:' => 'Situs resmi:', 'Unassigned' => 'Belum ditugaskan', 'View this task' => 'Lihat tugas ini', 'Remove user' => 'Hapus pengguna', 'Do you really want to remove this user: "%s"?' => 'Anda yakin mau menghapus pengguna ini: "%s"?', 'All users' => 'Semua pengguna', 'Username' => 'Nama pengguna', 'Password' => 'Kata sandi', 'Administrator' => 'Administrator', 'Sign in' => 'Masuk', 'Users' => 'Pengguna', 'Forbidden' => 'Terlarang', 'Access Forbidden' => 'Akses Dilarang', 'Edit user' => 'Edit pengguna', 'Logout' => 'Keluar', 'Bad username or password' => 'Nama pengguna atau password salah', 'Edit project' => 'Edit proyek', 'Name' => 'Nama', 'Projects' => 'Proyek', 'No project' => 'Tidak ada proyek', 'Project' => 'Proyek', 'Status' => 'Status', 'Tasks' => 'Tugas', 'Board' => 'Papan', 'Actions' => 'Tindakan', 'Inactive' => 'Non Aktif', 'Active' => 'Aktif', 'Unable to update this board.' => 'Tidak dapat memperbarui papan ini', 'Disable' => 'Nonaktifkan', 'Enable' => 'Aktifkan', 'New project' => 'Proyek baru', 'Do you really want to remove this project: "%s"?' => 'Apakah Anda yakin mau menghapus proyek ini: "%s"?', 'Remove project' => 'Hapus proyek', 'Edit the board for "%s"' => 'Edit papan untuk "%s"', 'Add a new column' => 'Tambah kolom baru', 'Title' => 'Judul', 'Assigned to %s' => 'Ditugaskan kepada %s', 'Remove a column' => 'Hapus kolom', 'Unable to remove this column.' => 'Tidak dapat menghapus kolom ini.', 'Do you really want to remove this column: "%s"?' => 'Apakah Anda yakin mau menghapus kolom ini: "%s"?', 'Settings' => 'Pengaturan', 'Application settings' => 'Pengaturan aplikasi', 'Language' => 'Bahasa', 'Webhook token:' => 'Token Webhook:', 'API token:' => 'Token API:', 'Database size:' => 'Ukuran database:', 'Download the database' => 'Unduh database', 'Optimize the database' => 'Optimasi database', '(VACUUM command)' => '(Perintah VACUUM)', '(Gzip compressed Sqlite file)' => '(File Sqlite yang terkompress Gzip)', 'Close a task' => 'Tutup tugas', 'Column' => 'Kolom', 'Color' => 'Warna', 'Assignee' => 'Orang yang ditugaskan', 'Create another task' => 'Buat tugas lain', 'New task' => 'Tugas baru', 'Open a task' => 'Buka tugas', 'Do you really want to open this task: "%s"?' => 'Apakah Anda yakin mau membuka tugas ini: "%s"?', 'Back to the board' => 'Kembali ke papan', 'There is nobody assigned' => 'Tidak ada orang yand ditugaskan', 'Column on the board:' => 'Kolom di dalam papan:', 'Close this task' => 'Tutup tugas ini', 'Open this task' => 'Buka tugas ini', 'There is no description.' => 'Tidak ada deskripsi.', 'Add a new task' => 'Tambah tugas baru', 'The username is required' => 'Nama pengguna dibutuhkan', 'The maximum length is %d characters' => 'Panjang maksimum adalah %d karakter', 'The minimum length is %d characters' => 'Panjang minimum adalah %d karakter', 'The password is required' => 'Password dibutuhkan', 'This value must be an integer' => 'Nilai ini harus integer', 'The username must be unique' => 'Nama pengguna harus unik', 'The user id is required' => 'ID pengguna diperlukan', 'Passwords don\'t match' => 'Password tidak cocok', 'The confirmation is required' => 'Konfirmasi diperlukan', 'The project is required' => 'Proyek diperlukan', 'The id is required' => 'ID diperlukan', 'The project id is required' => 'ID proyek diperlukan', 'The project name is required' => 'Nama proyek diperlukan', 'The title is required' => 'Judul diperlukan', 'Settings saved successfully.' => 'Pengaturan berhasil disimpan.', 'Unable to save your settings.' => 'Tidak dapat menyimpan pengaturan anda.', 'Database optimization done.' => 'Optimasi database selesai.', 'Your project has been created successfully.' => 'Proyek anda berhasil dibuat.', 'Unable to create your project.' => 'Tidak dapat membuat proyek anda.', 'Project updated successfully.' => 'Proyek berhasil diperbarui.', 'Unable to update this project.' => 'Tidak dapat memperbarui proyek ini.', 'Unable to remove this project.' => 'Tidak dapat menghapus proyek ini.', 'Project removed successfully.' => 'Proyek berhasil dihapus.', 'Project activated successfully.' => 'Proyek berhasil diaktifkan.', 'Unable to activate this project.' => 'Tidak dapat mengaktifkan proyek ini.', 'Project disabled successfully.' => 'Proyek berhasil dinonaktifkan.', 'Unable to disable this project.' => 'Tidak dapat menonaktifkan proyek ini.', 'Unable to open this task.' => 'Tidak dapat membuka tugas ini.', 'Task opened successfully.' => 'Tugas berhasil dibuka.', 'Unable to close this task.' => 'Tidak dapat menutup tugas ini.', 'Task closed successfully.' => 'Tugas berhasil ditutup.', 'Unable to update your task.' => 'Tidak dapat memperbarui tugas ini.', 'Task updated successfully.' => 'Tugas berhasil diperbarui.', 'Unable to create your task.' => 'Tidak dapat membuat tugas anda.', 'Task created successfully.' => 'Tugas berhasil dibuat.', 'User created successfully.' => 'Pengguna berhasil dibuat.', 'Unable to create your user.' => 'Tidak dapat membuat pengguna Anda.', 'User updated successfully.' => 'Pengguna berhasil diperbarui.', 'User removed successfully.' => 'Pengguna berhasil dihapus.', 'Unable to remove this user.' => 'Tidak dapat menghapus pengguna ini.', 'Board updated successfully.' => 'Papan berhasil diperbaharui.', 'Ready' => 'Siap', 'Backlog' => 'Tertunda', 'Work in progress' => 'Sedang dalam pengerjaan', 'Done' => 'Selesai', 'Application version:' => 'Versi aplikasi:', 'Id' => 'ID', 'Public link' => 'Tautan publik', 'Timezone' => 'Zona waktu', 'Sorry, I didn\'t find this information in my database!' => 'Maaf, saya tidak dapat menemukan informasi ini dalam database saya!', 'Page not found' => 'Halaman tidak ditemukan', 'Complexity' => 'Kompleksitas', 'Task limit' => 'Batas tugas', 'Task count' => 'Jumlah tugas', 'User' => 'Pengguna', 'Comments' => 'Komentar', 'Comment is required' => 'Komentar dibutuhkan', 'Comment added successfully.' => 'Komentar berhasil ditambahkan.', 'Unable to create your comment.' => 'Tidak dapat menambahkan komentar Anda.', 'Due Date' => 'Batas Tanggal Terakhir', 'Invalid date' => 'Tanggal tidak sesuai', 'Automatic actions' => 'Tindakan otomatis', 'Your automatic action has been created successfully.' => 'Tindakan otomatis Anda berhasil dibuat.', 'Unable to create your automatic action.' => 'Tidak dapat membuat tindakan otomatis Anda.', 'Remove an action' => 'Hapus tindakan', 'Unable to remove this action.' => 'Tidak dapat menghapus tindakan ini.', 'Action removed successfully.' => 'Tindakan berhasil dihapus.', 'Automatic actions for the project "%s"' => 'Tindakan otomatis untuk proyek ini "%s"', 'Add an action' => 'Tambah tindakan', 'Event name' => 'Nama acara', 'Action' => 'Tindakan', 'Event' => 'Acara', 'When the selected event occurs execute the corresponding action.' => 'Ketika acara yang dipilih terjadi, tindakan yang berhubungan dengan acara akan dieksekusi.', 'Next step' => 'Langkah selanjutnya', 'Define action parameters' => 'Definisi parameter tindakan', 'Do you really want to remove this action: "%s"?' => 'Apakah Anda yakin mau menghapus tindakan ini: "%s"?', 'Remove an automatic action' => 'Hapus tindakan otomatis', 'Assign the task to a specific user' => 'Berikan tugas pada pengguna tertentu', 'Assign the task to the person who does the action' => 'Berikan tugas pada orang yang melakukan tindakan', 'Duplicate the task to another project' => 'Duplikasi tugas ke proyek lain', 'Move a task to another column' => 'Pindahkan tugas ke kolom lain', 'Task modification' => 'Modifikasi tugas', 'Task creation' => 'Membuat tugas', 'Closing a task' => 'Menutup tugas', 'Assign a color to a specific user' => 'Menetapkan warna untuk pengguna tertentu', 'Position' => 'Posisi', 'Duplicate to another project' => 'Duplikasi ke proyek lain', 'Duplicate' => 'Duplikat', 'Link' => 'tautan', 'Comment updated successfully.' => 'Komentar berhasil diperbarui.', 'Unable to update your comment.' => 'Tidak dapat memperbarui komentar Anda.', 'Remove a comment' => 'Hapus komentar', 'Comment removed successfully.' => 'Komentar berhasil dihapus.', 'Unable to remove this comment.' => 'Tidak dapat menghapus komentar ini.', 'Do you really want to remove this comment?' => 'Apakah Anda yakin mau menghapus komentar ini?', 'Current password for the user "%s"' => 'Password saat ini untuk pengguna "%s"', 'The current password is required' => 'Password saat ini diperlukan', 'Wrong password' => 'Password salah', 'Unknown' => 'Tidak diketahui', 'Last logins' => 'Masuk terakhir', 'Login date' => 'Tanggal masuk', 'Authentication method' => 'Metode otentifikasi', 'IP address' => 'Alamat IP', 'User agent' => 'Agen pengguna', 'Persistent connections' => 'Koneksi tetap', 'No session.' => 'Tidak ada sesi.', 'Expiration date' => 'Tanggal kadaluarsa', 'Remember Me' => 'Ingat Saya', 'Creation date' => 'Tanggal pembuatan', 'Everybody' => 'Semua orang', 'Open' => 'Terbuka', 'Closed' => 'Ditutup', 'Search' => 'Cari', 'Nothing found.' => 'Tidak ditemukan.', 'Due date' => 'Batas tanggal terakhir', 'Description' => 'Deskripsi', '%d comments' => '%d komentar', '%d comment' => '%d komentar', 'Email address invalid' => 'Alamat email tidak sesuai', 'Your external account is not linked anymore to your profile.' => 'Akun eksternal Anda tidak lagi terhubung ke profil anda.', 'Unable to unlink your external account.' => 'Tidak dapat memutuskan akun eksternal Anda.', 'External authentication failed' => 'Otentifikasi eksternal gagal', 'Your external account is linked to your profile successfully.' => 'Akun eksternal Anda berhasil dihubungkan ke profil anda.', 'Email' => 'Email', 'Task removed successfully.' => 'Tugas berhasil dihapus.', 'Unable to remove this task.' => 'Tidak dapat menghapus tugas ini.', 'Remove a task' => 'Hapus tugas', 'Do you really want to remove this task: "%s"?' => 'Apakah Anda yakin mau menghapus tugas ini: "%s"?', 'Assign automatically a color based on a category' => 'Otomatis menetapkan warna berdasarkan kategori', 'Assign automatically a category based on a color' => 'Otomatis menetapkan kategori berdasarkan warna', 'Task creation or modification' => 'Tugas dibuat atau di modifikasi', 'Category' => 'Kategori', 'Category:' => 'Kategori:', 'Categories' => 'Kategori', 'Your category has been created successfully.' => 'Kategori Anda berhasil dibuat.', 'This category has been updated successfully.' => 'Kategori Anda berhasil diperbarui.', 'Unable to update this category.' => 'Tidak dapat memperbarui kategori Anda.', 'Remove a category' => 'Hapus kategori', 'Category removed successfully.' => 'Kategori berhasil dihapus.', 'Unable to remove this category.' => 'Tidak dapat menghapus kategori ini.', 'Category modification for the project "%s"' => 'Modifikasi kategori untuk proyek "%s"', 'Category Name' => 'Nama Kategori', 'Add a new category' => 'Tambah kategori baru', 'Do you really want to remove this category: "%s"?' => 'Apakah Anda yakin mau menghapus kategori ini: "%s"?', 'All categories' => 'Semua kategori', 'No category' => 'Tidak ada kategori', 'The name is required' => 'Nama diperlukan', 'Remove a file' => 'Hapus berkas', 'Unable to remove this file.' => 'Tidak dapat menghapus berkas ini.', 'File removed successfully.' => 'Berkas berhasil dihapus.', 'Attach a document' => 'Lampirkan dokumen', 'Do you really want to remove this file: "%s"?' => 'Apakah Anda yakin akan menghapus berkas ini: "%s"?', 'Attachments' => 'Lampiran', 'Edit the task' => 'Edit tugas', 'Add a comment' => 'Tambahkan komentar', 'Edit a comment' => 'Edit komentar', 'Summary' => 'Ringkasan', 'Time tracking' => 'Pelacakan waktu', 'Estimate:' => 'Estimasi:', 'Spent:' => 'Menghabiskan:', 'Do you really want to remove this sub-task?' => 'Apakah Anda yakin mau menghapus sub-tugas ini?', 'Remaining:' => 'Tersisa:', 'hours' => 'jam', 'estimated' => 'perkiraan', 'Sub-Tasks' => 'Sub-tugas', 'Add a sub-task' => 'Tambahkan sub-tugas', 'Original estimate' => 'Perkiraan semula', 'Create another sub-task' => 'Tambahkan sub-tugas lainnya', 'Time spent' => 'Waktu yang dihabiskan', 'Edit a sub-task' => 'Edit sub-tugas', 'Remove a sub-task' => 'Hapus sub-tugas', 'The time must be a numeric value' => 'Waktu harus berupa angka', 'Todo' => 'Yang harus dilakukan', 'In progress' => 'Dalam proses', 'Sub-task removed successfully.' => 'Sub-tugas berhasil dihapus.', 'Unable to remove this sub-task.' => 'Tidak dapat menghapus sub-tugas.', 'Sub-task updated successfully.' => 'Sub-tugas berhasil diperbarui.', 'Unable to update your sub-task.' => 'Tidak dapat memperbarui sub-tugas Anda.', 'Unable to create your sub-task.' => 'Tidak dapat membuat sub-tugas Anda.', 'Maximum size: ' => 'Ukuran maksimum: ', 'Display another project' => 'Lihat proyek lain', 'Created by %s' => 'Dibuat oleh %s', 'Tasks Export' => 'Ekspor Tugas', 'Start Date' => 'Tanggal Mulai', 'Execute' => 'Eksekusi', 'Task Id' => 'ID Tugas', 'Creator' => 'Pembuat', 'Modification date' => 'Tanggal modifikasi', 'Completion date' => 'Tanggal penyelesaian', 'Clone' => 'Klon', 'Project cloned successfully.' => 'Kloning proyek berhasil.', 'Unable to clone this project.' => 'Tidak dapat mengkloning proyek.', 'Enable email notifications' => 'Aktifkan pemberitahuan dari email', 'Task position:' => 'Posisi tugas:', 'The task #%d has been opened.' => 'Tugas #%d telah dibuka.', 'The task #%d has been closed.' => 'Tugas #%d telah ditutup.', 'Sub-task updated' => 'Sub-tugas diperbarui', 'Title:' => 'Judul:', 'Status:' => 'Status:', 'Assignee:' => 'Ditugaskan ke:', 'Time tracking:' => 'Pelacakan waktu:', 'New sub-task' => 'Sub-tugas baru', 'New attachment added "%s"' => 'Lampiran baru ditambahkan "%s"', 'New comment posted by %s' => 'Komentar baru ditambahkan oleh %s', 'New comment' => 'Komentar baru', 'Comment updated' => 'Komentar diperbarui', 'New subtask' => 'Sub-tugas baru', 'I only want to receive notifications for these projects:' => 'Saya ingin menerima pemberitahuan hanya untuk proyek-proyek yang dipilih :', 'view the task on Kanboard' => 'lihat tugas di Kanboard', 'Public access' => 'Akses publik', 'Disable public access' => 'Nonaktifkan akses publik', 'Enable public access' => 'Aktifkan akses publik', 'Public access disabled' => 'Akses publik dinonaktifkan', 'Move the task to another project' => 'Pindahkan tugas ke proyek lain', 'Move to another project' => 'Pindahkan ke proyek lain', 'Do you really want to duplicate this task?' => 'Apakah Anda yakin mau menduplikasi tugas ini?', 'Duplicate a task' => 'Duplikasi tugas', 'External accounts' => 'Akun eksternal', 'Account type' => 'Tipe akun', 'Local' => 'Lokal', 'Remote' => 'Jarak Jauh', 'Enabled' => 'Aktif', 'Disabled' => 'Nonaktif', // 'Login:' => '', // 'Full Name:' => '', 'Email:' => 'Email:', 'Notifications:' => 'Pemberitahuan:', 'Notifications' => 'Pemberitahuan', 'Account type:' => 'Tipe akun:', 'Edit profile' => 'Edit profil', 'Change password' => 'Ganti password', 'Password modification' => 'Modifikasi password', 'External authentications' => 'Otentifikasi eksternal', 'Never connected.' => 'Tidak pernah terhubung.', 'No external authentication enabled.' => 'Tidak ada otentifikasi eksternal yang aktif.', 'Password modified successfully.' => 'Password berhasil dimodifikasi.', 'Unable to change the password.' => 'Tidak dapat mengganti kata sandi.', 'Change category' => 'Ganti kategori', '%s updated the task %s' => '%s memperbarui tugas %s', '%s opened the task %s' => '%s membuka tugas %s', '%s moved the task %s to the position #%d in the column "%s"' => '%s memindahkan tugas %s ke posisi #%d dalam kolom "%s"', '%s moved the task %s to the column "%s"' => '%s memindahkan tugas %s ke kolom "%s"', '%s created the task %s' => '%s membuat tugas %s', '%s closed the task %s' => '%s menutup tugas %s', '%s created a subtask for the task %s' => '%s membuat sub-tugas untuk tugas %s', '%s updated a subtask for the task %s' => '%s memperbarui sub-tugas untuk tugas %s', 'Assigned to %s with an estimate of %s/%sh' => 'Ditugaskan pada %s dengan perkiraan %s/%sh', 'Not assigned, estimate of %sh' => 'Tidak ada yang ditugaskan, perkiraan %sh', '%s updated a comment on the task %s' => '%s memperbarui komentar pada tugas %s', '%s commented the task %s' => '%s memberikan komentar pada tugas %s', '%s\'s activity' => 'Aktifitas dari %s', 'RSS feed' => 'Umpan RSS', '%s updated a comment on the task #%d' => '%s memperbarui komentar pada tugas #%d', '%s commented on the task #%d' => '%s memberikan komentar pada tugas #%d', '%s updated a subtask for the task #%d' => '%s memperbarui sub-tugas untuk tugas #%d', '%s created a subtask for the task #%d' => '%s membuat sub-tugas untuk tugas #%d', '%s updated the task #%d' => '%s memperbarui tugas #%d', '%s created the task #%d' => '%s membuat tugas #%d', '%s closed the task #%d' => '%s menutup tugas #%d', '%s opened the task #%d' => '%s membuka tugas #%d', 'Activity' => 'Aktifitas', 'Default values are "%s"' => 'Nilai default adalah "%s"', 'Default columns for new projects (Comma-separated)' => 'Kolom default untuk proyek baru (dipisahkan dengan koma)', 'Task assignee change' => 'Ganti orang yang ditugaskan', '%s changed the assignee of the task #%d to %s' => '%s mengganti orang yang ditugaskan dari tugas #%d ke %s', '%s changed the assignee of the task %s to %s' => '%s mengganti orang yang ditugaskan dari tugas %s ke %s', 'New password for the user "%s"' => 'Password baru untuk pengguna "%s"', 'Choose an event' => 'Pilih acara', 'Create a task from an external provider' => 'Buat tugas dari penyedia eksternal', 'Change the assignee based on an external username' => 'Ganti penugasan berdasarkan nama pengguna eksternal', 'Change the category based on an external label' => 'Ganti kategori berdasarkan label eksternal', 'Reference' => 'Referensi', 'Label' => 'Label', 'Database' => 'Database', 'About' => 'Tentang', 'Database driver:' => 'Driver database:', 'Board settings' => 'Pengaturan papan', 'Webhook settings' => 'Pengaturan Webhook', 'Reset token' => 'Reset token', 'API endpoint:' => 'API endpoint :', 'Refresh interval for personal board' => 'Interval pembaruan untuk papan pribadi', 'Refresh interval for public board' => 'Interval pembaruan untuk papan publik', 'Task highlight period' => 'Periode penyorotan tugas', 'Period (in second) to consider a task was modified recently (0 to disable, 2 days by default)' => 'Periode (dalam detik) untuk mempertimbangkan tugas yang baru dimodifikasi (0 untuk menonaktifkan, default 2 hari)', 'Frequency in second (60 seconds by default)' => 'Frekuensi dalam detik (default 60 detik)', 'Frequency in second (0 to disable this feature, 10 seconds by default)' => 'Frekuensi dalam detik (0 untuk menonaktifkan fitur ini, default 10 detik)', 'Application URL' => 'URL Aplikasi', 'Token regenerated.' => 'Token diregenerasi.', 'Date format' => 'Format tanggal', 'ISO format is always accepted, example: "%s" and "%s"' => 'Format ISO selalu diterima, contoh: "%s" dan "%s"', 'New personal project' => 'Proyek pribadi baru', 'This project is personal' => 'Proyek ini pribadi', 'Add' => 'Tambah', 'Start date' => 'Tanggal mulai', 'Time estimated' => 'Perkiraan waktu', 'There is nothing assigned to you.' => 'Tidak ada tugas yang diberikan pada Anda.', 'My tasks' => 'Tugas saya', 'Activity stream' => 'Arus aktifitas', 'Dashboard' => 'Dasbor', 'Confirmation' => 'Konfirmasi', 'Webhooks' => 'Webhooks', 'API' => 'API', 'Create a comment from an external provider' => 'Buat komentar dari penyedia eksternal', 'Project management' => 'Manajemen proyek', 'Columns' => 'Kolom', 'Task' => 'Tugas', 'Percentage' => 'Persentasi', 'Number of tasks' => 'Jumlah dari tugas', 'Task distribution' => 'Pembagian tugas', 'Analytics' => 'Analitik', 'Subtask' => 'Sub-tugas', 'User repartition' => 'Partisi ulang pengguna', 'Clone this project' => 'Klon proyek ini', 'Column removed successfully.' => 'Kolom berhasil dihapus.', 'Not enough data to show the graph.' => 'Tidak cukup data untuk menampilkan grafik.', 'Previous' => 'Sebelumnya', 'The id must be an integer' => 'ID harus integer', 'The project id must be an integer' => 'ID proyek harus integer', 'The status must be an integer' => 'Status harus integer', 'The subtask id is required' => 'ID sub-tugas diperlukan', 'The subtask id must be an integer' => 'ID sub-tugas harus integer', 'The task id is required' => 'ID tugas diperlukan', 'The task id must be an integer' => 'ID tugas harus integer', 'The user id must be an integer' => 'ID user harus integer', 'This value is required' => 'Nilai ini diperlukan', 'This value must be numeric' => 'Nilai ini harus angka', 'Unable to create this task.' => 'Tidak dapat membuat tugas ini', 'Cumulative flow diagram' => 'Diagram alir kumulatif', 'Daily project summary' => 'Ringkasan proyek harian', 'Daily project summary export' => 'Ekspor ringkasan proyek harian', 'Exports' => 'Ekspor', 'This export contains the number of tasks per column grouped per day.' => 'Ekspor ini berisi jumlah dari tugas per kolom yang dikelompokan per hari.', 'Active swimlanes' => 'Swimlanes aktif', 'Add a new swimlane' => 'Tambah swimlane baru', 'Default swimlane' => 'Swimlane default', 'Do you really want to remove this swimlane: "%s"?' => 'Apakah Anda yakin mau menghapus swimlane ini: "%s"?', 'Inactive swimlanes' => 'Swimlanes tidak aktif', 'Remove a swimlane' => 'Hapus swimlane', 'Swimlane modification for the project "%s"' => 'Modifikasi swimlane untuk proyek "%s"', 'Swimlane removed successfully.' => 'Swimlane berhasil dihapus.', 'Swimlanes' => 'Swimlanes', 'Swimlane updated successfully.' => 'Swimlane berhasil diperbarui.', 'Unable to remove this swimlane.' => 'Tidak dapat menghapus swimlane ini.', 'Unable to update this swimlane.' => 'Tidak dapat memperbarui swimlane ini.', 'Your swimlane has been created successfully.' => 'Swimlane Anda berhasil dibuat.', 'Example: "Bug, Feature Request, Improvement"' => 'Contoh: "Bug, Permintaan Fitur, Peningkatan"', 'Default categories for new projects (Comma-separated)' => 'Kategori default untuk proyek baru (dipisahkan dengan koma)', 'Integrations' => 'Integrasi', 'Integration with third-party services' => 'Integrasi dengan layanan pihak ketiga', 'Subtask Id' => 'ID Sub-tugas', 'Subtasks' => 'Sub-tugas', 'Subtasks Export' => 'Ekspor Sub-tugas', 'Task Title' => 'Judul Tugas', 'Untitled' => 'Tanpa Nama', 'Application default' => 'Default aplikasi', 'Language:' => 'Bahasa:', 'Timezone:' => 'Zona waktu:', 'All columns' => 'Semua kolom', 'Next' => 'Selanjutnya', '#%d' => '#%d', 'All swimlanes' => 'Semua swimlane', 'All colors' => 'Semua warna', 'Moved to column %s' => 'Pindah ke kolom %s', 'User dashboard' => 'Dasbor pengguna', 'Allow only one subtask in progress at the same time for a user' => 'Izinkan hanya satu sub-tugas dalam proses secara bersamaan untuk satu pengguna', 'Edit column "%s"' => 'Edit kolom "%s"', 'Select the new status of the subtask: "%s"' => 'Pilih status baru untuk sub-tugas: "%s"', 'Subtask timesheet' => 'Absen sub-tugas', 'There is nothing to show.' => 'Tidak ada yang bisa diperlihatkan.', 'Time Tracking' => 'Pelacakan Waktu', 'You already have one subtask in progress' => 'Anda sudah memiliki satu sub-tugas dalam proses', 'Which parts of the project do you want to duplicate?' => 'Bagian proyek mana yang ingin Anda duplikasi?', 'Disallow login form' => 'Larang formulir masuk', 'Start' => 'Mulai', 'End' => 'Selesai', 'Task age in days' => 'Usia tugas dalam hari', 'Days in this column' => 'Hari dalam kolom ini', '%dd' => '%dd', 'Add a new link' => 'Tambah tautan baru', 'Do you really want to remove this link: "%s"?' => 'Apakah Anda yakin mau menghapus tautan ini: "%s"?', 'Do you really want to remove this link with task #%d?' => 'Apakah Anda yakin mau menghapus tautan ini dengan tugas #%d ?', 'Field required' => 'Bidang dibutuhkan', 'Link added successfully.' => 'Tautan berhasil ditambahkan.', 'Link updated successfully.' => 'Tautan berhasil diperbarui.', 'Link removed successfully.' => 'Tautan berhasil dihapus.', 'Link labels' => 'Label tautan', 'Link modification' => 'Modifikasi tautan', 'Opposite label' => 'Label berlawanan', 'Remove a link' => 'Hapus tautan', 'The labels must be different' => 'Label harus berbeda', 'There is no link.' => 'Tidak ada tautan.', 'This label must be unique' => 'Label ini harus unik', 'Unable to create your link.' => 'Tidak dapat membuat tautan Anda.', 'Unable to update your link.' => 'Tidak dapat memperbarui tautan Anda.', 'Unable to remove this link.' => 'Tidak dapat menghapus tautan ini.', 'relates to' => 'berhubungan dengan', 'blocks' => 'blokir', 'is blocked by' => 'diblokir oleh', 'duplicates' => 'duplikat', 'is duplicated by' => 'diduplikasi oleh', 'is a child of' => 'anak dari', 'is a parent of' => 'induk dari', 'targets milestone' => 'target batu pijakan', 'is a milestone of' => 'adalah batu pijakan dari', 'fixes' => 'perbaikan', 'is fixed by' => 'diperbaiki oleh', 'This task' => 'Tugas ini', '<1h' => '<1h', '%dh' => '%dh', 'Expand tasks' => 'Perluas tugas', 'Collapse tasks' => 'Tutup tugas', 'Expand/collapse tasks' => 'Perluas/tutup tugas', 'Close dialog box' => 'Tutup kotak dialog', 'Submit a form' => 'Kirim formulir', 'Board view' => 'Tampilan papan', 'Keyboard shortcuts' => 'Pintasan keyboard', 'Open board switcher' => 'Buka switcher papan', 'Application' => 'Aplikasi', 'Compact view' => 'Tampilan kompak', 'Horizontal scrolling' => 'Gulir horizontal', 'Compact/wide view' => 'Tampilan kompak/lebar', 'Currency' => 'Mata uang', 'Personal project' => 'Proyek pribadi', 'AUD - Australian Dollar' => 'AUD - Dolar Australia', 'CAD - Canadian Dollar' => 'CAD - Dolar Kanada', 'CHF - Swiss Francs' => 'CHF - Francs Swiss', 'Custom Stylesheet' => 'Kustomisasi CSS', 'EUR - Euro' => 'EUR - Euro', 'GBP - British Pound' => 'GBP - Poundsterling Inggris', 'INR - Indian Rupee' => 'INR - Rupe India', 'JPY - Japanese Yen' => 'JPY - Yen Jepang', 'NZD - New Zealand Dollar' => 'NZD - Dolar Selandia baru', 'RSD - Serbian dinar' => 'RSD - Dinar Serbia', // 'CNY - Chinese Yuan' => '', 'USD - US Dollar' => 'USD - Dolar Amerika', // 'VES - Venezuelan Bolívar' => '', 'Destination column' => 'Kolom tujuan', 'Move the task to another column when assigned to a user' => 'Pindahkan tugas ke kolom lain saat ditugaskan ke pengguna', 'Move the task to another column when assignee is cleared' => 'Pindahkan tugas ke kolom lain saat orang yang ditugaskan kosong', 'Source column' => 'Sumber kolom', 'Transitions' => 'Transisi', 'Executer' => 'Eksekusi', 'Time spent in the column' => 'Waktu yang dihabiskan dalam kolom', 'Task transitions' => 'Transisi tugas', 'Task transitions export' => 'Ekspor transisi tugas', 'This report contains all column moves for each task with the date, the user and the time spent for each transition.' => 'Laporan ini berisi semua kolom yang pindah untuk setiap tugas dengan tanggal, pengguna dan waktu yang dihabiskan untuk setiap transisi.', 'Currency rates' => 'Nilai tukar mata uang', 'Rate' => 'Tarif', 'Change reference currency' => 'Ganti referensi mata uang', 'Reference currency' => 'Referensi mata uang', 'The currency rate has been added successfully.' => 'Nilai tukar mata uang berhasil ditambahkan.', 'Unable to add this currency rate.' => 'Tidak dapat menambahkan nilai tukar mata uang', 'Webhook URL' => 'URL Webhook', '%s removed the assignee of the task %s' => '%s menghapus penugasan dari tugas %s', 'Information' => 'Informasi', 'Check two factor authentication code' => 'Cek dua faktor kode otentifikasi', 'The two factor authentication code is not valid.' => 'Kode dua faktor kode otentifikasi tidak sesuai.', 'The two factor authentication code is valid.' => 'Kode dua faktor kode otentifikasi sesuai.', 'Code' => 'Kode', 'Two factor authentication' => 'Dua faktor otentifikasi', 'This QR code contains the key URI: ' => 'Kode QR ini mengandung kunci URI: ', 'Check my code' => 'Periksa kode saya', 'Secret key: ' => 'Kunci rahasia: ', 'Test your device' => 'Uji perangkat Anda', 'Assign a color when the task is moved to a specific column' => 'Tetapkan warna ketika tugas tersebut dipindahkan ke kolom tertentu', '%s via Kanboard' => '%s via Kanboard', 'Burndown chart' => 'Grafik Burndown', 'This chart show the task complexity over the time (Work Remaining).' => 'Grafik ini menunjukkan kompleksitas tugas dari waktu ke waktu (Sisa Pekerjaan).', 'Screenshot taken %s' => 'Screenshot diambil %s', 'Add a screenshot' => 'Tambah screenshot', 'Take a screenshot and press CTRL+V or ⌘+V to paste here.' => 'Ambil screenshot dan tekan CTRL+V atau ⌘+V untuk ditempel di sini.', 'Screenshot uploaded successfully.' => 'Screenshot berhasil diunggah.', 'SEK - Swedish Krona' => 'SEK - Krona Swedia', 'Identifier' => 'Identifier', 'Disable two factor authentication' => 'Matikan dua faktor otentifikasi', 'Do you really want to disable the two factor authentication for this user: "%s"?' => 'Apakah Anda yakin mau mematikan dua faktor otentifikasi untuk pengguna ini: "%s"?', 'Edit link' => 'Edit tautan', 'Start to type task title...' => 'Mulai mengetik judul tugas...', 'A task cannot be linked to itself' => 'Tugas tidak dapat dikaitkan dengan dirinya sendiri', 'The exact same link already exists' => 'Tautan yang sama persis sudah ada', 'Recurrent task is scheduled to be generated' => 'Tugas berulang dijadwalkan untuk di generate', 'Score' => 'Skor', 'The identifier must be unique' => 'Identifier harus unik', 'This linked task id doesn\'t exists' => 'ID tugas terkait tidak ada', 'This value must be alphanumeric' => 'Nilai harus alfanumerik', 'Edit recurrence' => 'Edit pengulangan', 'Generate recurrent task' => 'Generate tugas berulang', 'Trigger to generate recurrent task' => 'Pemicu untuk menghasilkan tugas berulang', 'Factor to calculate new due date' => 'Faktor untuk menghitung tanggal jatuh tempo baru', 'Timeframe to calculate new due date' => 'Jangka waktu untuk menghitung tanggal jatuh tempo baru', 'Base date to calculate new due date' => 'Tanggal dasar untuk menghitung tanggal jatuh tempo baru', 'Action date' => 'Tanggal aksi', 'Base date to calculate new due date: ' => 'Tanggal dasar untuk menghitung tanggal jatuh tempo baru: ', 'This task has created this child task: ' => 'Tugas ini telah membuat tugas anak ini: ', 'Day(s)' => 'Hari', 'Existing due date' => 'Batas waktu yang ada', 'Factor to calculate new due date: ' => 'Faktor untuk menghitung tanggal jatuh tempo baru: ', 'Month(s)' => 'Bulan', 'This task has been created by: ' => 'Tugas ini telah dibuat oleh: ', 'Recurrent task has been generated:' => 'Tugas berulang telah di generate:', 'Timeframe to calculate new due date: ' => 'Jangka waktu untuk menghitung tanggal jatuh tempo baru: ', 'Trigger to generate recurrent task: ' => 'Pemicu untuk menghasilkan tugas berulang: ', 'When task is closed' => 'Saat tugas ditutup', 'When task is moved from first column' => 'Saat tugas dipindahkan dari kolom pertama', 'When task is moved to last column' => 'Saat tugas dipindahkan ke kolom terakhir', 'Year(s)' => 'Tahun', 'Project settings' => 'Pengaturan proyek', 'Automatically update the start date' => 'Otomatis memperbarui tanggal permulaan', 'iCal feed' => 'Umpan iCal', 'Preferences' => 'Preferensi', 'Security' => 'Keamanan', 'Two factor authentication disabled' => 'Otentifikasi dua faktor dimatikan', 'Two factor authentication enabled' => 'Otentifikasi dua faktor dihidupkan', 'Unable to update this user.' => 'Tidak dapat memperbarui pengguna ini.', 'There is no user management for personal projects.' => 'Tidak ada manajemen pengguna untuk proyek-proyek pribadi.', 'User that will receive the email' => 'Pengguna yang akan menerima email', 'Email subject' => 'Subyek Email', 'Date' => 'Tanggal', 'Add a comment log when moving the task between columns' => 'Menambahkan log komentar ketika memindahkan tugas antara kolom', 'Move the task to another column when the category is changed' => 'Pindahkan tugas ke kolom lain ketika kategori berubah', 'Send a task by email to someone' => 'Kirim tugas melalui email ke seseorang', 'Reopen a task' => 'Buka kembali tugas', 'Notification' => 'Pemberitahuan', '%s moved the task #%d to the first swimlane' => '%s memindahkan tugas #%d ke swimlane pertama', 'Swimlane' => 'Swimlane', '%s moved the task %s to the first swimlane' => '%s memindahkan tugas %s ke swimlane pertama', '%s moved the task %s to the swimlane "%s"' => '%s memindahkan tugas %s ke swimlane "%s"', 'This report contains all subtasks information for the given date range.' => 'Laporan ini berisi semua informasi sub-tugas untuk rentang tanggal tertentu.', 'This report contains all tasks information for the given date range.' => 'Laporan ini berisi semua informasi tugas untuk rentang tanggal tertentu.', 'Project activities for %s' => 'Aktifitas proyek untuk "%s"', 'view the board on Kanboard' => 'lihat papan di Kanboard', 'The task has been moved to the first swimlane' => 'Tugas telah dipindahkan ke swimlane pertama', 'The task has been moved to another swimlane:' => 'Tugas telah dipindahkan ke swimlane lain:', 'New title: %s' => 'Judul baru: %s', 'The task is not assigned anymore' => 'Tugas tidak ditugaskan lagi', 'New assignee: %s' => 'Penerima baru: %s', 'There is no category now' => 'Tidak ada kategori untuk saat ini', 'New category: %s' => 'Kategori baru: %s', 'New color: %s' => 'Warna baru: %s', 'New complexity: %d' => 'Kompleksitas baru: %d', 'The due date has been removed' => 'Tanggal jatuh tempo telah dihapus', 'There is no description anymore' => 'Tidak ada deskripsi lagi', 'Recurrence settings has been modified' => 'Pengaturan pengulangan telah dimodifikasi', 'Time spent changed: %sh' => 'Waktu yang dihabiskan telah diganti: %sh', 'Time estimated changed: %sh' => 'Perkiraan waktu telah diganti: %sh', 'The field "%s" has been updated' => 'Bidang "%s" telah diperbarui', 'The description has been modified:' => 'Deskripsi telah dimodifikasi', 'Do you really want to close the task "%s" as well as all subtasks?' => 'Apakah Anda yakin mau menutup tugas "%s" beserta semua sub-tugasnya?', 'I want to receive notifications for:' => 'Saya ingin menerima pemberitahuan untuk:', 'All tasks' => 'Semua tugas', 'Only for tasks assigned to me' => 'Hanya untuk tugas yang ditugaskan ke saya', 'Only for tasks created by me' => 'Hanya untuk tugas yang dibuat oleh saya', 'Only for tasks created by me and tasks assigned to me' => 'Hanya untuk tugas yang dibuat oleh saya dan ditugaskan ke saya', '%%Y-%%m-%%d' => '%%d/%%m/%%Y', 'Total for all columns' => 'Total untuk semua kolom', 'You need at least 2 days of data to show the chart.' => 'Anda memerlukan setidaknya 2 hari dari data yang menunjukkan grafik.', '<15m' => '<15m', '<30m' => '<30m', 'Stop timer' => 'Hentikan timer', 'Start timer' => 'Mulai timer', 'My activity stream' => 'Aliran kegiatan saya', 'Search tasks' => 'Cari tugas', 'Reset filters' => 'Reset saringan', 'My tasks due tomorrow' => 'Tugas saya yang berakhir besok', 'Tasks due today' => 'Tugas yang berakhir hari ini', 'Tasks due tomorrow' => 'Tugas yang berakhir besok', 'Tasks due yesterday' => 'Tugas yang berakhir kemarin', 'Closed tasks' => 'Tugas yang ditutup', 'Open tasks' => 'Tugas terbuka', 'Not assigned' => 'Tidak ditugaskan', 'View advanced search syntax' => 'Lihat sintaks pencarian lanjutan', 'Overview' => 'Ringkasan', 'Board/Calendar/List view' => 'Tampilan Papan/Kalender/Daftar', 'Switch to the board view' => 'Beralih ke tampilan papan', 'Switch to the list view' => 'Beralih ke tampilan daftar', 'Go to the search/filter box' => 'Pergi ke kotak pencarian/saringan', 'There is no activity yet.' => 'Belum ada aktifitas.', 'No tasks found.' => 'Tidak ada tugas yang ditemukan.', 'Keyboard shortcut: "%s"' => 'Pintasan keyboard: "%s"', 'List' => 'Daftar', 'Filter' => 'Saringan', 'Advanced search' => 'Pencarian lanjutan', 'Example of query: ' => 'Contoh dari query : ', 'Search by project: ' => 'Cari berdasarkan proyek: ', 'Search by column: ' => 'Cari berdasarkan kolom: ', 'Search by assignee: ' => 'Cari berdasarkan penerima tugas: ', 'Search by color: ' => 'Cari berdasarkan warna: ', 'Search by category: ' => 'Cari berdasarkan kategori: ', 'Search by description: ' => 'Cari berdasarkan deskripsi: ', 'Search by due date: ' => 'Cari berdasarkan tanggal jatuh tempo: ', 'Average time spent in each column' => 'Rata-rata waktu yang dihabiskan dalam setiap kolom', 'Average time spent' => 'Rata-rata waktu yang dihabiskan', 'This chart shows the average time spent in each column for the last %d tasks.' => 'Grafik ini menunjukkan rata-rata waktu yang dihabiskan dalam setiap kolom untuk %d tugas terakhir.', 'Average Lead and Cycle time' => 'Rata-rata Lead dan Cycle time', 'Average lead time: ' => 'Rata-rata lead time: ', 'Average cycle time: ' => 'Rata-rata cycle time: ', 'Cycle Time' => 'Cycle Time', 'Lead Time' => 'Lead Time', 'This chart shows the average lead and cycle time for the last %d tasks over the time.' => 'Grafik ini menunjukkan rata-rata waktu lead dan cycle time untuk %d tugas terakhir dari waktu ke waktu.', 'Average time into each column' => 'Rata-rata waktu ke setiap kolom', 'Lead and cycle time' => 'Lead dan cycle time', 'Lead time: ' => 'Lead time: ', 'Cycle time: ' => 'Cycle time: ', 'Time spent in each column' => 'Waktu yang dihabiskan di setiap kolom', 'The lead time is the duration between the task creation and the completion.' => 'Lead time adalah durasi antara pembuatan tugas dan penyelesaian.', 'The cycle time is the duration between the start date and the completion.' => 'Cycle time adalah durasi antara tanggal mulai dan tanggal penyelesaian.', 'If the task is not closed the current time is used instead of the completion date.' => 'Jika tugas tidak ditutup, waktu saat ini akan digunakan sebagai pengganti tanggal penyelesaian.', 'Set the start date automatically' => 'Secara otomatis mengatur tanggal mulai', 'Edit Authentication' => 'Edit Otentifikasi', 'Remote user' => 'Pengguna jauh', 'Remote users do not store their password in Kanboard database, examples: LDAP, Google and Github accounts.' => 'Pengguna jauh tidak menyimpan kata sandi mereka dalam basis data Kanboard, contoh: akun LDAP, Google dan Github.', 'If you check the box "Disallow login form", credentials entered in the login form will be ignored.' => 'Jika anda mencentang kotak "Larang formulir login", kredensial masuk ke formulis login akan diabaikan.', 'Default task color' => 'Warna tugas default', 'This feature does not work with all browsers.' => 'Fitur ini tidak dapat digunakan di semua peramban', 'There is no destination project available.' => 'Tidak ada tujuan proyek yang tersedia.', 'Trigger automatically subtask time tracking' => 'Otomatis memicu pelacakan waktu untuk sub-tugas', 'Include closed tasks in the cumulative flow diagram' => 'Sertakan tugas yang ditutup dalam diagram alir kumulatif', 'Current swimlane: %s' => 'Swimlane saat ini: %s', 'Current column: %s' => 'Kolom saat ini: %s', 'Current category: %s' => 'Kategori saat ini: %s', 'no category' => 'tidak ada kategori', 'Current assignee: %s' => 'Orang yang ditugaskan saat ini: %s', 'not assigned' => 'belum ditugaskan', 'Author:' => 'Penulis:', 'contributors' => 'kontributor', 'License:' => 'Lisensi:', 'License' => 'Lisensi', 'Enter the text below' => 'Masukkan teks di bawah', 'Start date:' => 'Tanggal mulai:', 'Due date:' => 'Batas waktu:', 'People who are project managers' => 'Orang-orang yang menjadi manajer proyek', 'People who are project members' => 'Orang-orang yang menjadi anggota proyek', 'NOK - Norwegian Krone' => 'NOK - Krone Norwegia', 'Show this column' => 'Perlihatkan kolom ini', 'Hide this column' => 'Sembunyikan kolom ini', 'End date' => 'Waktu berakhir', 'Users overview' => 'Ringkasan pengguna', 'Members' => 'Anggota', 'Shared project' => 'Proyek bersama', 'Project managers' => 'Manajer proyek', 'Projects list' => 'Daftar proyek', 'End date:' => 'Waktu berakhir:', 'Change task color when using a specific task link' => 'Ganti warna tugas ketika menggunakan tautan tugas yang spesifik', 'Task link creation or modification' => 'Tautan pembuatan atau modifikasi tugas ', 'Milestone' => 'Milestone', 'Reset the search/filter box' => 'Reset kotak pencarian/saringan', 'Documentation' => 'Dokumentasi', 'Author' => 'Penulis', 'Version' => 'Versi', 'Plugins' => 'Plugin', 'There is no plugin loaded.' => 'Tidak ada plugin yang dimuat', 'My notifications' => 'Notifikasi saya', 'Custom filters' => 'Saringan kustom', 'Your custom filter has been created successfully.' => 'Saringan kustom Anda berhasil dibuat', 'Unable to create your custom filter.' => 'Tidak dapat membuat saringan kustom', 'Custom filter removed successfully.' => 'Saringan kustom berhasil dihapus', 'Unable to remove this custom filter.' => 'Tidak dapat menghapus saringan kustom', 'Edit custom filter' => 'Edit saringan kustom', 'Your custom filter has been updated successfully.' => 'Saringan kustom Anda berhasil diperbarui', 'Unable to update custom filter.' => 'Tidak dapat memperbarui saringan kustom', 'Web' => 'Web', 'New attachment on task #%d: %s' => 'Lampiran baru pada tugas #%d: %s', 'New comment on task #%d' => 'Komentar baru pada tugas #%d', 'Comment updated on task #%d' => 'Komentar diperbarui pada tugas #%d', 'New subtask on task #%d' => 'Sub-tugas baru pada tugas #%d', 'Subtask updated on task #%d' => 'Sub-tugas diperbarui pada tugas #%d', 'New task #%d: %s' => 'Tugas baru #%d: %s', 'Task updated #%d' => 'Tugas diperbarui #%d', 'Task #%d closed' => 'Tugas #%d ditutup', 'Task #%d opened' => 'Tugas #%d dibuka', 'Column changed for task #%d' => 'Kolom diganti untuk tugas #%d', 'New position for task #%d' => 'Posisi baru untuk tugas #%d', 'Swimlane changed for task #%d' => 'Swimlane diganti untuk tugas #%d', 'Assignee changed on task #%d' => 'Orang yang ditugaskan diganti pada tugas #%d', '%d overdue tasks' => '%d tugas kadaluarsa', 'Task #%d is overdue' => 'Tugas #%d sudah kadaluarsa', 'No notification.' => 'Tidak ada notifikasi baru', 'Mark all as read' => 'Tandai semua sebagai sudah dibaca', 'Mark as read' => 'Tandai sebagai sudah dibaca', 'Total number of tasks in this column across all swimlanes' => 'Total tugas di kolom ini untuk semua swimlane', 'Collapse swimlane' => 'Tutup swimlane', 'Expand swimlane' => 'Perluas swimlane', 'Add a new filter' => 'Tambah saringan baru', 'Share with all project members' => 'Bagikan dengan semua anggota proyek', 'Shared' => 'Dibagikan', 'Owner' => 'Pemilik', 'Unread notifications' => 'Notifikasi belum terbaca', 'Notification methods:' => 'Metode pemberitahuan', 'Unable to read your file' => 'Tidak dapat membaca berkas Anda', '%d task(s) have been imported successfully.' => '%d tugas telah berhasil di impor', 'Nothing has been imported!' => 'Tidak ada yang dapat di impor', 'Import users from CSV file' => 'Impor pengguna dari berkas CSV', '%d user(s) have been imported successfully.' => '%d pengguna telah berhasil di impor', 'Comma' => 'Koma', 'Semi-colon' => 'Titik Koma', 'Tab' => 'Tab', 'Vertical bar' => 'Bar vertikal', 'Double Quote' => 'Kutip Ganda', 'Single Quote' => 'Kutip Satu', '%s attached a file to the task #%d' => '%s berkas dilampirkan untuk tugas #%d', 'There is no column or swimlane activated in your project!' => 'Tidak ada kolom atau swimlane aktif untuk proyek Anda', 'Append filter (instead of replacement)' => 'Tambahkan saringan (ketimbang pengganti)', 'Append/Replace' => 'Tambah/Ganti', 'Append' => 'Tambahkan', 'Replace' => 'Ganti', 'Import' => 'Impor', 'Change sorting' => 'ubah pengurutan', 'Tasks Importation' => 'Importasi Tugas', 'Delimiter' => 'Pembatas', 'Enclosure' => 'Lampiran', 'CSV File' => 'Berkas CSV', 'Instructions' => 'Intruksi', 'Your file must use the predefined CSV format' => 'Berkas Anda harus menggunakan format CSV yang telah ditetapkan', 'Your file must be encoded in UTF-8' => 'Berkas anda harus di kodekan dalam bentuk UTF-8', 'The first row must be the header' => 'Baris pertama harus header', 'Duplicates are not verified for you' => 'Duplikasi tidak diverifikasikan untuk Anda', 'The due date must use the ISO format: YYYY-MM-DD' => 'Tanggal jatuh tempo harus menggunakan format ISO: YYYY-MM-DD', 'Download CSV template' => 'Unduh template CSV', 'No external integration registered.' => 'Tidak ada integrasi eksternal yang terdaftar', 'Duplicates are not imported' => 'Duplikasi tidak diimpor', 'Usernames must be lowercase and unique' => 'Nama pengguna harus huruf kecil dan unik', 'Passwords will be encrypted if present' => 'Kata sandi akan di enkripsi jika ada', '%s attached a new file to the task %s' => '%s melampirkan berkas baru untuk tugas %s', 'Link type' => 'Tipe tautan', 'Assign automatically a category based on a link' => 'Otomatis menetapkan kategori berdasarkan tautan', 'BAM - Konvertible Mark' => 'BAM - Konvertible Mark', 'Assignee Username' => 'Nama pengguna orang yang ditugaskan', 'Assignee Name' => 'Nama orang yang ditugaskan', 'Groups' => 'Grup', 'Members of %s' => 'Anggota dari %s', 'New group' => 'Grup baru', 'Group created successfully.' => 'Grup berhasil dibuat', 'Unable to create your group.' => 'Tidak dapat membuat grup Anda', 'Edit group' => 'Edit grup', 'Group updated successfully.' => 'Grup berhasil diperbarui', 'Unable to update your group.' => 'Tidak dapat memperbarui grup anda', 'Add group member to "%s"' => 'Tambahkan anggota grup ke "%s"', 'Group member added successfully.' => 'Anggota grup berhasil ditambahkan', 'Unable to add group member.' => 'Tidak dapat menambahkan anggota grup', 'Remove user from group "%s"' => 'Hapus pengguna dari grup "%s"', 'User removed successfully from this group.' => 'Pengguna berhasil dihapus dari grup ini', 'Unable to remove this user from the group.' => 'Tidak dapat menghapus pengguna ini dari grup', 'Remove group' => 'Hapus grup', 'Group removed successfully.' => 'Grup berhasil dihapus', 'Unable to remove this group.' => 'Tidak dapat menghapus grup ini', 'Project Permissions' => 'Izin Proyek', 'Manager' => 'Manajer', 'Project Manager' => 'Manajer Proyek', 'Project Member' => 'Anggota Proyek', 'Project Viewer' => 'Penonton Proyek', 'Your account is locked for %d minutes' => 'Akun anda dikunci untuk %d menit', 'Invalid captcha' => 'Captcha tidak sesuai', 'The name must be unique' => 'Nama harus unik', 'View all groups' => 'Lihat semua grup', 'There is no user available.' => 'Tidak ada pengguna yang tersedia', 'Do you really want to remove the user "%s" from the group "%s"?' => 'Anda yakin mau menghapus pengguna "%s" dari grup "%s"?', 'There is no group.' => 'Tidak ada grup', 'Add group member' => 'Tambah anggota grup', 'Do you really want to remove this group: "%s"?' => 'Anda yakin mau menghapus grup ini: "%s"?', 'There is no user in this group.' => 'Tidak ada pengguna dalam grup ini', 'Permissions' => 'Izin', 'Allowed Users' => 'Pengguna Yang Diizinkan', 'No specific user has been allowed.' => 'Tidak ada user yang diperbolehkan secara khusus', 'Role' => 'Peran', 'Enter user name...' => 'Masukkan nama pengguna...', 'Allowed Groups' => 'Grup Yang Diizinkan', 'No group has been allowed.' => 'Tidak ada grup yang diperbolehkan secara khusus', 'Group' => 'Grup', 'Group Name' => 'Nama Grup', 'Enter group name...' => 'Masukkan nama grup...', 'Role:' => 'Peran:', 'Project members' => 'Anggota proyek', '%s mentioned you in the task #%d' => '%s menyebut Anda dalam tugas #%d', '%s mentioned you in a comment on the task #%d' => '%s menyebut Anda dalam komentar pada tugas #%d', 'You were mentioned in the task #%d' => 'Anda disebutkan dalam tugas #%d', 'You were mentioned in a comment on the task #%d' => 'Anda disebutkan dalam komentar pada tugas #%d', 'Estimated hours: ' => 'Estimasi jam: ', 'Actual hours: ' => 'Jam sebenarnya: ', 'Hours Spent' => 'Jam dihabiskan', 'Hours Estimated' => 'Jam diperkirakan', 'Estimated Time' => 'Waktu Estimasi', 'Actual Time' => 'Waktu Sebenarnya', 'Estimated vs actual time' => 'Estimasi vs waktu sebenarnya', 'RUB - Russian Ruble' => 'RUB - Rubel Rusia', 'Assign the task to the person who does the action when the column is changed' => 'Berikan tugas pada orang yang melakukan tindakan saat kolom diganti', 'Close a task in a specific column' => 'Tutup tugas di kolom tertentu', 'Time-based One-time Password Algorithm' => 'Algoritma Password Satu-Kali Berbasis-Waktu', 'Two-Factor Provider: ' => 'Penyedia Dua-Faktor', 'Disable two-factor authentication' => 'Nonaktifkan otentikasi dua-faktor', 'Enable two-factor authentication' => 'Aktifkan otentikasi dua-faktor', 'There is no integration registered at the moment.' => 'Tidak ada integrasi yang didaftarkan untuk saat ini', 'Password Reset for Kanboard' => 'Reset Password untuk Kanboard', 'Forgot password?' => 'Lupa password?', 'Enable "Forget Password"' => 'Aktifkan "Lupa Password"', 'Password Reset' => 'Reset Password', 'New password' => 'Password baru', 'Change Password' => 'Ganti Password', 'To reset your password click on this link:' => 'Untuk reset password Anda klik tautan ini:', 'Last Password Reset' => 'Reset Password Terakhir', 'The password has never been reinitialized.' => 'Password tidak pernah di inisialisasi ulang', 'Creation' => 'Pembuatan', 'Expiration' => 'Kadaluarsa', 'Password reset history' => 'Sejarah reset password', 'All tasks of the column "%s" and the swimlane "%s" have been closed successfully.' => 'Semua tugas dalam kolom "%s" dan swimlane "%s" telah berhasil ditutup', 'Do you really want to close all tasks of this column?' => 'Apakah Anda yakin mau menutup semua tugas dalam kolom ini?', '%d task(s) in the column "%s" and the swimlane "%s" will be closed.' => '%d tugas dalam kolom "%s" dan swimlane "%s" akan ditutup.', 'Close all tasks of this column' => 'Tutup semua tugas dalam kolom ini', 'No plugin has registered a project notification method. You can still configure individual notifications in your user profile.' => 'Tidak ada plugin yang mendaftarkan metode pemberitahuan proyek. Anda masih bisa mengatur pemberitahuan individu di dalam profil pengguna Anda.', 'My dashboard' => 'Dasbor saya', 'My profile' => 'Profil saya', 'Project owner: ' => 'Pemilik proyek', 'The project identifier is optional and must be alphanumeric, example: MYPROJECT.' => 'Identifier proyek adalah opsional dan harus alfanumerik, contoh: MYPROJECT.', 'Project owner' => 'Pemilik proyek', 'Personal projects do not have users and groups management.' => 'Proyek pribadi tidak memiliki manajemen pengguna dan grup', 'There is no project member.' => 'Tidak ada anggota proyek', 'Priority' => 'Prioritas', 'Task priority' => 'Prioritas tugas', 'General' => 'Umum', 'Dates' => 'Tanggal', 'Default priority' => 'Prioritas default', 'Lowest priority' => 'Prioritas terendah', 'Highest priority' => 'Prioritas tertinggi', 'Close a task when there is no activity' => 'Tutup tugas jika tidak ada aktifitas', 'Duration in days' => 'Durasi dalam hari', 'Send email when there is no activity on a task' => 'Kirim email jika tidak ada aktifitas dalam tugas', 'Unable to fetch link information.' => 'Tidak dapat mengambil informasi tautan', 'Daily background job for tasks' => 'Tugas latar belakang harian untuk tugas', 'Auto' => 'Otomatis', 'Related' => 'Terkait', 'Attachment' => 'Lampiran', 'Title not found' => 'Judul tidak ditemukan', 'Web Link' => 'Tautan web', 'External links' => 'Tautan eksternal', 'Add external link' => 'Tambah tautan eksternal', 'Type' => 'Tipe', 'Dependency' => 'Ketergantungan', 'Add internal link' => 'Tambah tautan internal', 'Add a new external link' => 'Tambah tautan eksternal baru', 'Edit external link' => 'Rubah tautan eksternal', 'External link' => 'Tautan eksternal', 'Copy and paste your link here...' => 'Copy dan paste tautan anda di sini...', 'URL' => 'URL', 'Internal links' => 'Tautan internal', 'Assign to me' => 'Tugaskan ke saya', 'Me' => 'Saya', 'Do not duplicate anything' => 'Jangan menduplikasi apapun', 'Projects management' => 'Manajemen proyek', 'Users management' => 'Manajemen pengguna', 'Groups management' => 'Manajemen grup', 'Create from another project' => 'Buat dari proyek lain', 'open' => 'buka', 'closed' => 'tutup', 'Priority:' => 'Prioritas', 'Reference:' => 'Referensi', 'Complexity:' => 'Kompleksitas', 'Swimlane:' => 'Swimlane', 'Column:' => 'Kolom:', 'Position:' => 'Posisi:', 'Creator:' => 'Pembuat:', 'Time estimated:' => 'Estimasi waktu:', '%s hours' => '%s jam', 'Time spent:' => 'Waktu yang dihabiskan', 'Created:' => 'Dibuat:', 'Modified:' => 'Dimodifikasi:', 'Completed:' => 'Selesai:', 'Started:' => 'Dimulai:', 'Moved:' => 'Dipindahkan:', 'Task #%d' => 'Tugas #%d', 'Time format' => 'Format waktu', 'Start date: ' => 'Tanggal mulai: ', 'End date: ' => 'Tanggal berakhir: ', 'New due date: ' => 'Tanggal jatuh tempo baru: ', 'Start date changed: ' => 'Tanggal mulai diganti: ', 'Disable personal projects' => 'Nonaktifkan proyek pribadi', 'Do you really want to remove this custom filter: "%s"?' => 'Apakah Anda yakin mau menghapus saringan kustom: "%s"?', 'Remove a custom filter' => 'Hapus saringan kustom', 'User activated successfully.' => 'Pengguna berhasil diaktifkan.', 'Unable to enable this user.' => 'Tidak dapat mengaktifkan pengguna ini.', 'User disabled successfully.' => 'Pengguna berhasil dinonaktifkan.', 'Unable to disable this user.' => 'Tidak dapat menonaktifkan pengguna ini.', 'All files have been uploaded successfully.' => 'Semua berkas berhasil di unggah.', 'The maximum allowed file size is %sB.' => 'Maksimum ukuran berkas yang diiziinkan adalah %sB.', 'Drag and drop your files here' => 'Drag and drop file Anda di sini', 'choose files' => 'pilih berkas', 'View profile' => 'Lihat profil', 'Two Factor' => 'Dua Faktor', 'Disable user' => 'Nonaktifkan pengguna', 'Do you really want to disable this user: "%s"?' => 'Anda yakin mau menonaktifkan pengguna ini: "%s"?', 'Enable user' => 'Aktifkan pengguna', 'Do you really want to enable this user: "%s"?' => 'Anda yakin mau mengaktifkan pengguna ini: "%s"?', 'Download' => 'Unduh', 'Uploaded: %s' => 'Diunggah: %s', 'Size: %s' => 'Ukuran: %s', 'Uploaded by %s' => 'Diunggah oleh %s', 'Filename' => 'Nama berkas', 'Size' => 'Ukuran', 'Column created successfully.' => 'Kolom berhasil dibuat.', 'Another column with the same name exists in the project' => 'Ada kolom lain dengan nama yang sama di proyek ini', 'Default filters' => 'Saringan default', 'Your board doesn\'t have any columns!' => 'Papan Anda tidak memiliki kolom!', 'Change column position' => 'Ganti posisi kolom', 'Switch to the project overview' => 'Pindah ke ringkasan proyek', 'User filters' => 'Saringan pengguna', 'Category filters' => 'Saringan kategori', 'Upload a file' => 'Unggah berkas', 'View file' => 'Lihat berkas', 'Last activity' => 'Aktivitas terakhir', 'Change subtask position' => 'Ganti posisi sub-tugas', 'This value must be greater than %d' => 'Nilai ini harus lebih besar dari %d', 'Another swimlane with the same name exists in the project' => 'Swimlane lain dengan nama yang sama sudah ada di proyek ini', 'Example: https://example.kanboard.org/ (used to generate absolute URLs)' => 'Contoh: https://contoh.kanboard.org/ (digunakan untuk menghasilkan URL yang absolut', 'Actions duplicated successfully.' => 'Tindakan berhasil di duplikasi.', 'Unable to duplicate actions.' => 'Tidak bisa menduplikasi tindakan.', 'Add a new action' => 'Tambahkan tindakan baru', 'Import from another project' => 'Impor dari proyek lain', 'There is no action at the moment.' => 'Belum ada tindakan pada saat ini.', 'Import actions from another project' => 'Impor tindakan dari proyek lain', 'There is no available project.' => 'Tidak ada proyek yang tersedia', 'Local File' => 'Berkas Lokal', 'Configuration' => 'Konfigurasi', 'PHP version:' => 'Versi PHP:', 'PHP SAPI:' => 'PHP SAPI:', 'OS version:' => 'Versi sistem operasi:', 'Database version:' => 'Versi database:', 'Browser:' => 'Peramban:', 'Task view' => 'Tampilan Tugas', 'Edit task' => 'Edit tugas', 'Edit description' => 'Edit deskripsi', 'New internal link' => 'Tautan internal baru', 'Display list of keyboard shortcuts' => 'Tampilkan daftar pintasan keyboard', 'Avatar' => 'Avatar', 'Upload my avatar image' => 'Unggah foto avatar saya', 'Remove my image' => 'Hapus foto saya', 'The OAuth2 state parameter is invalid' => 'Status parameter OAuth2 tidak sesuai', 'User not found.' => 'Pengguna tidak ditemukan.', 'Search in activity stream' => 'Cari di saluran aktivitas', 'My activities' => 'Aktivitas saya', 'Activity until yesterday' => 'Aktivitas sampai kemarin', 'Activity until today' => 'Aktivitas sampai hari ini', 'Search by creator: ' => 'Cari berdasarkan pembuat: ', 'Search by creation date: ' => 'Cari berdasarkan tanggal pembuatan: ', 'Search by task status: ' => 'Cari berdasarkanstatus tugas: ', 'Search by task title: ' => 'Cari berdasarkan judul tugas: ', 'Activity stream search' => 'Pencarian saluran aktivitas', 'Projects where "%s" is manager' => 'Proyek dimana "%s" adalah manajernya', 'Projects where "%s" is member' => 'Proyek dimana "%s" adalah anggotanya', 'Open tasks assigned to "%s"' => 'Tugas terbuka ditugaskan pada "%s"', 'Closed tasks assigned to "%s"' => 'Tugas tertutup ditugaskan pada "%s"', 'Assign automatically a color based on a priority' => 'Berikan warna otomatis berdasarkan prioritas', 'Overdue tasks for the project(s) "%s"' => 'Tugas yang kadaluarsa untuk proyek "%s"', 'Upload files' => 'Unggah berkas', 'Installed Plugins' => 'Plugin terpasang', 'Plugin Directory' => 'Direktori Plugin', 'Plugin installed successfully.' => 'Plugin berhasil dipasang.', 'Plugin updated successfully.' => 'Plugin berhasil diperbarui.', 'Plugin removed successfully.' => 'Plugin berhasil dihapus.', 'Subtask converted to task successfully.' => 'Sub-tugas berhasil diubah menjadi tugas.', 'Unable to convert the subtask.' => 'Tidak dapat mengubah sub-tugas.', 'Unable to extract plugin archive.' => 'Tidak bisa mengekstrak arsip plugin.', 'Plugin not found.' => 'Plugin tidak ditemukan.', 'You don\'t have the permission to remove this plugin.' => 'Anda tidak memiliki izin untuk menghapus plugin ini.', 'Unable to download plugin archive.' => 'Tidak dapat mengunduh arsip plugin.', 'Unable to write temporary file for plugin.' => 'Tidak dapat menulis berkas sementara untuk plugin.', 'Unable to open plugin archive.' => 'Tidak dapat membuka arsip plugin.', 'There is no file in the plugin archive.' => 'Tidak ada berkas di dalam arsip plugin.', 'Create tasks in bulk' => 'Buat tugas sekaligus', 'Your Kanboard instance is not configured to install plugins from the user interface.' => 'Instalasi Kanboard Anda tidak diatur untuk memasang plugin dari antar muka pengguna.', 'There is no plugin available.' => 'Tidak ada plugin yang tersedia.', 'Install' => 'Pasang', 'Update' => 'Perbarui', 'Up to date' => 'Terbaru', 'Not available' => 'Tidak tersedia', 'Remove plugin' => 'Hapus plugin', 'Do you really want to remove this plugin: "%s"?' => 'Anda yakin ingin menghapus plugin ini: "%s"?', 'Uninstall' => 'Lepaskan', 'Listing' => 'Daftar', 'Metadata' => 'Metadata', 'Manage projects' => 'Atur proyek', 'Convert to task' => 'Ubah menjadi tugas', 'Convert sub-task to task' => 'Ubah sub-tugas menjadi tugas', 'Do you really want to convert this sub-task to a task?' => 'Anda yakin ingin mengubah sub-tugas ini menjadi tugas?', 'My task title' => 'Judul tugas saya', 'Enter one task by line.' => 'Masukkan satu tugas berdasarkan baris.', 'Number of failed login:' => 'Jumlah login yang gagal:', 'Account locked until:' => 'Akun terkunci hingga:', 'Email settings' => 'Pengaturan email', 'Email sender address' => 'Alamat pengirim email', 'Email transport' => 'Transportasi email', 'Webhook token' => 'Token Webhook', 'Project tags management' => 'Manajemen tag proyek', 'Tag created successfully.' => 'Tag berhasil dibuat.', 'Unable to create this tag.' => 'Tidak dapat membuat tag ini.', 'Tag updated successfully.' => 'Tag berhasil diperbarui', 'Unable to update this tag.' => 'Tidak dapat memperbarui tag ini.', 'Tag removed successfully.' => 'Tag berhasil dihapus.', 'Unable to remove this tag.' => 'Tidak dapat menghapus tag ini.', 'Global tags management' => 'Manajemen tag global', 'Tags' => 'Tag', 'Tags management' => 'Manajemen tag', 'Add new tag' => 'Tambah tag baru', 'Edit a tag' => 'Edit tag', 'Project tags' => 'Tag proyek', 'There is no specific tag for this project at the moment.' => 'Saat ini tidak ada tag yang spesifik pada proyek ini.', 'Tag' => 'Tag', 'Remove a tag' => 'Hapus tag', 'Do you really want to remove this tag: "%s"?' => 'Anda yakin ingin menghapus tag ini: "%s"?', 'Global tags' => 'Tag global', 'There is no global tag at the moment.' => 'Saat ini tidak ada tag global.', 'This field cannot be empty' => 'Bidang ini tidak boleh kosong', 'Close a task when there is no activity in a specific column' => 'Tutup tugas saat tidak ada aktivitas di kolom tertentu', '%s removed a subtask for the task #%d' => '%s menghapus sub-tugas untuk tugas #%d', '%s removed a comment on the task #%d' => '%s menghapus komentar pada tugas #%d', 'Comment removed on task #%d' => 'Komentar dihapus pada tugas #%d', 'Subtask removed on task #%d' => 'Sub-tugas dihapus pada tugas #%d', 'Hide tasks in this column in the dashboard' => 'Sembunyikan tugas-tugas di kolom ini di dasbor', '%s removed a comment on the task %s' => '%s menghapus komentar pada tugas %s', '%s removed a subtask for the task %s' => '%s menghapus sub-tugas untuk tugas %s', 'Comment removed' => 'Komentar dihapus', 'Subtask removed' => 'Sub-tugas dihapus', '%s set a new internal link for the task #%d' => '%s memasang tautan internal baru untuk tugas #%d', '%s removed an internal link for the task #%d' => '%s menghapus tautan internal untuk tugas #%d', 'A new internal link for the task #%d has been defined' => 'Tautan internal baru untuk tugas #%d telah ditentukan', 'Internal link removed for the task #%d' => 'Tautan internal untuk tugas #%d telah dihapus', '%s set a new internal link for the task %s' => '%s memasang tautan internal baru untuk tugas %s', '%s removed an internal link for the task %s' => '%s menghapus tautan internal untuk tugas %s', 'Automatically set the due date on task creation' => 'Otomatis memasang tanggal kadaluarsa saat pembuatan tugas', 'Move the task to another column when closed' => 'Pindahkan tugas ke kolom lain saat ditutup', 'Move the task to another column when not moved during a given period' => 'Pindahkan tugas ke kolom lain saat tidak dipindahkan selama periode yang diberikan', 'Dashboard for %s' => 'Dasbor untuk %s', 'Tasks overview for %s' => 'Ringkasan tugas-tugas untuk %s', 'Subtasks overview for %s' => 'Ringkasan sub-tugas untuk %s', 'Projects overview for %s' => 'Ringkasan proyek untuk %s', 'Activity stream for %s' => 'Arus aktivitas untuk %s', 'Assign a color when the task is moved to a specific swimlane' => 'Berikan warna saat tugas dipindahkan ke swimlane tertentu', 'Assign a priority when the task is moved to a specific swimlane' => 'Berikan prioritas saat tugas dipindahkan ke swimlane tertentu', 'User unlocked successfully.' => 'Berhasil membuka blokir pengguna.', 'Unable to unlock the user.' => 'Tidak bisa membuka blokir pengguna.', 'Move a task to another swimlane' => 'Pindahkan tugas ke swimlane lain', 'Creator Name' => 'Nama Pembuat', 'Time spent and estimated' => 'Waktu yang dihabiskan dan diperkirakan', 'Move position' => 'Pindahkan posisi', 'Move task to another position on the board' => 'Pindahkan tugas ke posisi lain di dalam papan', 'Insert before this task' => 'Masukkan sebelum tugas ini', 'Insert after this task' => 'Masukkan setelah tugas ini', 'Unlock this user' => 'Buka pengguna ini', 'Custom Project Roles' => 'Peran Proyek Kustom', 'Add a new custom role' => 'Tambahkan peran kustom baru', 'Restrictions for the role "%s"' => 'Batasan untuk peran "%s"', 'Add a new project restriction' => 'Tambahkan batasan proyek baru', 'Add a new drag and drop restriction' => 'Tambahkan batasan drag and drop baru', 'Add a new column restriction' => 'Tambahkan batasan kolom baru', 'Edit this role' => 'Edit peran ini', 'Remove this role' => 'Hapus peran ini', 'There is no restriction for this role.' => 'Tidak ada batasan untuk peran ini.', 'Only moving task between those columns is permitted' => 'Hanya diizinkan untuk memindahkan tugas diantara kolom-kolom tersebut', 'Close a task in a specific column when not moved during a given period' => 'Tutup tugas pada kolom tertentu saat tidak dipindahkan pada periode yang diberikan', 'Edit columns' => 'Edit kolom', 'The column restriction has been created successfully.' => 'Batasan kolom berhasil dibuat.', 'Unable to create this column restriction.' => 'Tidak dapat membuat batasan kolom ini.', 'Column restriction removed successfully.' => 'Batasan kolom berhasil dihapus.', 'Unable to remove this restriction.' => 'Gagal menghapus batasan ini.', 'Your custom project role has been created successfully.' => 'Peran kustom proyek Anda berhasil dibuat.', 'Unable to create custom project role.' => 'Tidak dapat membuat peran proyek kustom.', 'Your custom project role has been updated successfully.' => 'Peran proyek kustom Anda berhasil diperbarui.', 'Unable to update custom project role.' => 'Tidak dapat memperbarui peran kustom proyek', 'Custom project role removed successfully.' => 'Peran kustom proyek berhasil dihapus.', 'Unable to remove this project role.' => 'Tidak dapat menghapus peran proyek ini.', 'The project restriction has been created successfully.' => 'Batasan proyek ini berhasil dibuat.', 'Unable to create this project restriction.' => 'Tidak dapat membuat batasan proyek ini.', 'Project restriction removed successfully.' => 'Batasan proyek berhasil dihapus.', 'You cannot create tasks in this column.' => 'Anda tidak dapat membuat tugas di kolom ini.', 'Task creation is permitted for this column' => 'Pembuatan tugas diizinkan untuk kolom ini', 'Closing or opening a task is permitted for this column' => 'Penutupan atau pembukaan tugas diizinkan untuk kolom ini', 'Task creation is blocked for this column' => 'Pembuatan tugas diblokir dari kolom ini', 'Closing or opening a task is blocked for this column' => 'Penutupan atau pembukaan tugas diblokir di kolom ini', 'Task creation is not permitted' => 'Oembuatan tugas tidak diizinkan', 'Closing or opening a task is not permitted' => 'Penutupan atau pembukaan tugas tidak diizinkan', 'New drag and drop restriction for the role "%s"' => 'Larangan drag and drop baru untuk peran "%s"', 'People belonging to this role will be able to move tasks only between the source and the destination column.' => 'Orang-orang dengan peran ini dapat memindahkan tugas diantara kolom sumber dan destinasi.', 'Remove a column restriction' => 'Hapus pembatasan kolom', 'Do you really want to remove this column restriction: "%s" to "%s"?' => 'Anda yakin ingin menghapus pembatasan kolom ini: "%s" ke "%s"?', 'New column restriction for the role "%s"' => 'Kolom pembatasan baru untuk peran "%s"', 'Rule' => 'Aturan', 'Do you really want to remove this column restriction?' => 'Anda yakin ingin menghapus pembatasan kolom ini?', 'Custom roles' => 'Peran kustom', 'New custom project role' => 'Peran kustom proyek baru', 'Edit custom project role' => 'Edit peran kustom proyek', 'Remove a custom role' => 'Hapus peran kustom', 'Do you really want to remove this custom role: "%s"? All people assigned to this role will become project member.' => 'Anda yakin ingin menghapus peran kustom ini: "%s"? Semua orang yang memiliki peran ini akan berubah menjadi anggota proyek.', 'There is no custom role for this project.' => 'Tidak ada peran kustom untuk proyek ini.', 'New project restriction for the role "%s"' => 'Batasan proyek baru untuk peran "%s"', 'Restriction' => 'Pembatasan', 'Remove a project restriction' => 'Hapus batasan proyek', 'Do you really want to remove this project restriction: "%s"?' => 'Anda yakin ingin menghapus pembatasan proyek ini: "%s"?', 'Duplicate to multiple projects' => 'Duplikasikan ke banyak proyek', 'This field is required' => 'Bidang ini dibutuhkan', 'Moving a task is not permitted' => 'Memindahkan tugas tidak diizinkan', 'This value must be in the range %d to %d' => 'Nilai ini harus berkisar antara %d hingga %d', 'You are not allowed to move this task.' => 'Anda tidak diizinkan untuk memindahkan tugas ini.', 'API User Access' => 'API Akses Pengguna', 'Preview' => 'Pratinjau', 'Write' => 'Tulis', 'Write your text in Markdown' => 'Tuliskan teks Anda di Markdown', 'No personal API access token registered.' => 'Tidak ada token akses API personal yang terdaftar.', 'Your personal API access token is "%s"' => 'Token akses API personal Anda adalah "%s"', 'Remove your token' => 'Hapus token Anda', 'Generate a new token' => 'Generate token baru', 'Showing %d-%d of %d' => 'Menampilkan %d-%d of %d', 'Outgoing Emails' => 'Email Keluar', 'Add or change currency rate' => 'Tambah atau ubah nilai mata uang', 'Reference currency: %s' => 'referensi Mata uang: %s', 'Add custom filters' => 'Tambahkan filter khusus', 'Export' => 'Export', 'Add link label' => 'Tambahkan label tautan', 'Incompatible Plugins' => 'Plugin Tidak Kompatibel', 'Compatibility' => 'Kesesuaian', 'Permissions and ownership' => 'Izin dan kepemilikan', 'Priorities' => 'Prioritas', 'Close this window' => 'Tutup jendela ini', 'Unable to upload this file.' => 'Tidak dapat mengupload file ini.', 'Import tasks' => 'Impor tugas', 'Choose a project' => 'Pilih sebuah proyek', 'Profile' => 'Profil', 'Application role' => 'Peran aplikasi', '%d invitations were sent.' => '%d undangan telah dikirim.', '%d invitation was sent.' => '%d undangan telah dikirim.', 'Unable to create this user.' => 'Tidak dapat membuat pengguna.', 'Kanboard Invitation' => 'Undangan Kanboard', 'Visible on dashboard' => 'Terlihat pada dashboard', 'Created at:' => 'Dibuat pada:', 'Updated at:' => 'Diperbarui pada:', 'There is no custom filter.' => 'Tidak ada filter khusus.', 'New User' => 'Pengguna Baru', 'Authentication' => 'Otentikasi', 'If checked, this user will use a third-party system for authentication.' => 'Jika dicentang, pengguna ini akan menggunakan sistem pihak ketiga untuk otentikasi.', 'The password is necessary only for local users.' => 'Kata sandi hanya diperlukan untuk pengguna lokal.', 'You have been invited to register on Kanboard.' => 'Anda telah diundang untuk mendaftar di Kanboard.', 'Click here to join your team' => 'Klik di sini untuk bergabung dengan tim Anda', 'Invite people' => 'Undang orang', 'Emails' => 'Email', 'Enter one email address by line.' => 'Masukkan satu alamat email per baris.', 'Add these people to this project' => 'Tambahkan orang-orang ini ke proyek ini', 'Add this person to this project' => 'Tambahkan orang ini ke proyek ini', 'Sign-up' => 'Daftar', 'Credentials' => 'Credential', 'New user' => 'Pengguna baru', 'This username is already taken' => 'Nama pengguna ini sudah dipakai', 'A link to reset your password has been sent by email.' => 'Tautan untuk mengatur ulang kata sandi anda telah dikirim melalui email.', 'Your profile must have a valid email address.' => 'Profil Anda harus memiliki alamat email yang valid.', 'Unfortunately, we are unable to reset your password. Did you enter a valid username? Do you have an email address in your profile?' => 'Sayangnya, kami tidak dapat mengatur ulang kata sandi Anda. Apakah Anda memasukkan nama pengguna yang valid? Apakah Anda memiliki alamat email di profil Anda?', 'TRL - Turkish Lira' => 'TRL - Lira Turki', 'The project email is optional and could be used by several plugins.' => 'Email proyek adalah opsional dan dapat digunakan oleh beberapa plugin.', 'The project email must be unique across all projects' => 'Email proyek harus unik di semua proyek', 'The email configuration has been disabled by the administrator.' => 'Konfigurasi email telah dinonaktifkan oleh administrator.', 'Close this project' => 'Tutup proyek ini', 'Open this project' => 'Buka proyek ini', 'Close a project' => 'Tutup proyek', 'Do you really want to close this project: "%s"?' => 'Anda yakin ingin menutup proyek ini: "%s"?', 'Reopen a project' => 'Buka kembali proyek', 'Do you really want to reopen this project: "%s"?' => 'Anda yakin ingin membuka kembali proyek ini: "%s"?', 'This project is open' => 'Proyek ini terbuka', 'This project is closed' => 'Proyek ini ditutup', 'Unable to upload files, check the permissions of your data folder.' => 'Tidak dapat mengunggah file, periksa izin folder data Anda.', 'Another category with the same name exists in this project' => 'Kategori lain dengan nama yang sama ada dalam proyek ini', 'Comment sent by email successfully.' => 'Komentar berhasil dikirim melalui email.', 'Sent by email to "%s" (%s)' => 'Dikirim melalui email ke "%s" (%s)', 'Unable to read uploaded file.' => 'Tidak dapat membaca file yang diunggah.', 'Database uploaded successfully.' => 'Database berhasil diunggah.', 'Task sent by email successfully.' => 'Tugas berhasil dikirim melalui email.', 'There is no category in this project.' => 'Tidak ada kategori dalam proyek ini.', 'Send by email' => 'Kirim melalui email', 'Create and send a comment by email' => 'Buat dan kirim komentar melalui email', 'Subject' => 'Subjek', 'Upload the database' => 'Unggah database', 'You could upload the previously downloaded Sqlite database (Gzip format).' => 'Anda dapat mengunggah basis data Sqlite yang diunduh sebelumnya (format Gzip).', 'Database file' => 'File database', 'Upload' => 'Unggah', 'Your project must have at least one active swimlane.' => 'Proyek Anda harus memiliki setidaknya satu swimlane aktif.', 'Project: %s' => 'Proyek: %s', 'Automatic action not found: "%s"' => 'Tindakan otomatis tidak ditemukan: "%s', '%d projects' => '%d proyek', '%d project' => '%d proyek', 'There is no project.' => 'Tidak ada proyek', 'Sort' => 'Urutkan', 'Project ID' => 'ID Proyek', 'Project name' => 'Nama proyek', 'Public' => 'Publik', 'Personal' => 'Pribadi', '%d tasks' => '%d tugas', '%d task' => '%d tugas', 'Task ID' => 'ID Tugas', 'Assign automatically a color when due date is expired' => 'Tetapkan warna secara otomatis ketika tanggal jatuh tempo kadaluarsa', 'Total score in this column across all swimlanes' => 'Skor total di kolom ini di semua swimlanes', 'HRK - Kuna' => 'HRK - Kuna', 'ARS - Argentine Peso' => 'ARS - Peso Argentina', 'COP - Colombian Peso' => 'COP - Peso Kolombia', '%d groups' => '%d grup', '%d group' => '%d grup', 'Group ID' => 'ID Grup', 'External ID' => 'ID External', '%d users' => '%d pengguna', '%d user' => '%d pengguna', 'Hide subtasks' => 'Sembunyikan subtugas', 'Show subtasks' => 'Tampilkan subtugas', 'Authentication Parameters' => 'Parameter Otentikasi', 'API Access' => 'Akses API', 'No users found.' => 'Tidak ada pengguna yang ditemukan.', 'User ID' => 'ID Pengguna', 'Notifications are activated' => 'Notifikasi diaktifkan', 'Notifications are disabled' => 'Notifikasi dinonaktifkan', 'User disabled' => 'Pengguna dinonaktifkan', '%d notifications' => '%d notifikasi', '%d notification' => '%d notifikasi', 'There is no external integration installed.' => 'Tidak ada integrasi eksternal yang terpasang.', 'You are not allowed to update tasks assigned to someone else.' => 'Anda tidak diizinkan untuk memperbarui tugas yang diberikan kepada orang lain.', 'You are not allowed to change the assignee.' => 'Anda tidak diizinkan untuk mengubah penerima.', 'Task suppression is not permitted' => 'Penindasan tugas tidak diizinkan', 'Changing assignee is not permitted' => 'Tidak diizinkan mengubah penerima', 'Update only assigned tasks is permitted' => 'Perbarui hanya tugas yang diizinkan', 'Only for tasks assigned to the current user' => 'Hanya untuk tugas yang diberikan kepada pengguna saat ini', 'My projects' => 'Proyek saya', 'You are not a member of any project.' => 'Anda bukan anggota proyek mana pun.', 'My subtasks' => 'Subtugas saya', '%d subtasks' => '%d subtugas', '%d subtask' => '%d subtugas', 'Only moving task between those columns is permitted for tasks assigned to the current user' => 'Hanya memindahkan tugas di antara kolom-kolom yang diizinkan untuk tugas yang diberikan kepada pengguna saat ini', '[DUPLICATE]' => '[DUPLIKAT]', 'DKK - Danish Krona' => 'DKK - Krona Denmark', 'Remove user from group' => 'Hapus pengguna dari grup', 'Assign the task to its creator' => 'Tetapkan tugas untuk pembuatnya', 'This task was sent by email to "%s" with subject "%s".' => 'Tugas ini dikirim melalui email ke "%s" dengan subjek "%s".', 'Predefined Email Subjects' => 'Default Subjek Email', 'Write one subject by line.' => 'Tulis satu subjek per baris.', 'Create another link' => 'Buat tautan lain', 'BRL - Brazilian Real' => 'BRL - Real Brasil', 'Add a new Kanboard task' => 'Tambahkan tugas Kanboard baru', 'Subtask not started' => 'Subtugas belum dimulai', 'Subtask currently in progress' => 'Subtugas sedang dalam proses', 'Subtask completed' => 'Subtugas selesai', 'Subtask added successfully.' => 'Subtugas berhasil ditambahkan.', '%d subtasks added successfully.' => '%d subtugas berhasil ditambahkan.', 'Enter one subtask by line.' => 'Masukkan satu subtugas per baris.', 'Predefined Contents' => 'Default konten', 'Predefined contents' => 'Default konten', 'Predefined Task Description' => 'Default Deskripsi Tugas', 'Do you really want to remove this template? "%s"' => 'Anda yakin ingin menghapus template ini? "%s"', 'Add predefined task description' => 'Tambahkan deskripsi tugas default', 'Predefined Task Descriptions' => 'Default deskripsi tugas', 'Template created successfully.' => 'Template berhasil dibuat.', 'Unable to create this template.' => 'Tidak dapat membuat template ini.', 'Template updated successfully.' => 'Template berhasil diperbarui.', 'Unable to update this template.' => 'Tidak dapat memperbarui template ini.', 'Template removed successfully.' => 'Template berhasil dihapus.', 'Unable to remove this template.' => 'Tidak dapat menghapus template ini.', 'Template for the task description' => 'Template untuk deskripsi tugas', 'The start date is greater than the end date' => 'Tanggal mulai lebih besar dari tanggal akhir', 'Tags must be separated by a comma' => 'Tag harus dipisahkan dengan koma', 'Only the task title is required' => 'Hanya judul tugas yang dibutuhkan', 'Creator Username' => 'Nama Pengguna Pembuat', 'Color Name' => 'Nama Warna', 'Column Name' => 'Nama Kolom', 'Swimlane Name' => 'Nama Swimlane', 'Time Estimated' => 'Perkiraan Waktu', 'Time Spent' => 'Waktu yang dihabiskan', 'External Link' => 'Tautan Eksternal', 'This feature enables the iCal feed, RSS feed and the public board view.' => 'Fitur ini mengaktifkan umpan iCal, umpan RSS, dan tampilan papan publik.', 'Stop the timer of all subtasks when moving a task to another column' => 'Hentikan timer semua subtugas saat memindahkan tugas ke kolom lain', 'Subtask Title' => 'Judul Subtugas', 'Add a subtask and activate the timer when moving a task to another column' => 'Tambahkan subtugas dan aktifkan pengatur waktu saat memindahkan tugas ke kolom lain', 'days' => 'hari', 'minutes' => 'menit', 'seconds' => 'detik', 'Assign automatically a color when preset start date is reached' => 'Tetapkan warna secara otomatis ketika tanggal mulai preset tercapai', 'Move the task to another column once a predefined start date is reached' => 'Pindahkan tugas ke kolom lain setelah tanggal mulai yang ditentukan tercapai', 'This task is now linked to the task %s with the relation "%s"' => 'Tugas ini sekarang ditautkan ke tugas %s dengan relasi "%s"', 'The link with the relation "%s" to the task %s has been removed' => 'Tautan dengan relasi "%s" ke tugas %s telah dihapus', 'Custom Filter:' => 'Kustomisasi Filter:', 'Unable to find this group.' => 'Tidak dapat menemukan grup ini.', '%s moved the task #%d to the column "%s"' => '%s memindahkan tugas #%d ke kolom "%s"', '%s moved the task #%d to the position %d in the column "%s"' => '%s memindahkan tugas #%d ke posisi %d di kolom "%s"', '%s moved the task #%d to the swimlane "%s"' => '%s memindahkan tugas #%d ke swimlane "%s"', '%sh spent' => '%sh menghabiskan', '%sh estimated' => '%sh perkiraan', 'Select All' => 'Pilih Semua', 'Unselect All' => 'Batal Pilih Semua', 'Apply action' => 'Terapkan tindakan', 'Move selected tasks to another column' => 'Pindahkan tugas yang dipilih ke kolom lain', 'Edit tasks in bulk' => 'Edit tugas secara massal', 'Choose the properties that you would like to change for the selected tasks.' => 'Pilih properti yang ingin Anda ubah untuk tugas yang dipilih.', 'Configure this project' => 'Konfigurasi proyek ini', 'Start now' => 'Mulai sekarang', '%s removed a file from the task #%d' => '%s menghapus file dari tugas #%d', 'Attachment removed from task #%d: %s' => 'Lampiran dihapus dari tugas #%d: %s', 'No color' => 'Tanpa warna', 'Attachment removed "%s"' => 'Lampiran dihapus "%s"', '%s removed a file from the task %s' => '%s menghapus file dari tugas %s', 'Move the task to another swimlane when assigned to a user' => 'Pindahkan tugas ke swimlane lain ketika ditugaskan ke pengguna', 'Destination swimlane' => 'Swimlane tujuan', 'Assign a category when the task is moved to a specific swimlane' => 'Tetapkan kategori ketika tugas dipindahkan ke swimlane tertentu', 'Move the task to another swimlane when the category is changed' => 'Pindahkan tugas ke swimlane lain saat kategorinya diubah', 'Reorder this column by priority (ASC)' => 'Susun ulang kolom ini berdasarkan prioritas (ASC)', 'Reorder this column by priority (DESC)' => 'Susun ulang kolom ini berdasarkan prioritas (DESC)', 'Reorder this column by assignee and priority (ASC)' => 'Susun ulang kolom ini menurut penerima tugas dan prioritas (ASC)', 'Reorder this column by assignee and priority (DESC)' => 'Susun ulang kolom ini menurut penerima tugas dan prioritas (DESC)', 'Reorder this column by assignee (A-Z)' => 'Susun ulang kolom ini oleh penerima tugas (A-Z)', 'Reorder this column by assignee (Z-A)' => 'Susun ulang kolom ini oleh penerima tugas (Z-A)', 'Reorder this column by due date (ASC)' => 'Susun ulang kolom ini sebelum tanggal jatuh tempo (ASC)', 'Reorder this column by due date (DESC)' => 'Susun ulang kolom ini berdasarkan tanggal jatuh tempo (DESC)', '%s moved the task #%d "%s" to the project "%s"' => '%s memindahkan tugas #%d "%s" ke proyek "%s"', 'Task #%d "%s" has been moved to the project "%s"' => 'Task #%d "%s" telah dipindahkan ke proyek "%s"', 'Move the task to another column when the due date is less than a certain number of days' => 'Pindahkan tugas ke kolom lain ketika batas waktu kurang dari jumlah hari tertentu', 'Automatically update the start date when the task is moved away from a specific column' => 'Secara otomatis memperbarui tanggal mulai ketika tugas dipindahkan dari kolom tertentu', 'HTTP Client:' => 'HTTP Client:', 'Assigned' => 'Ditugaskan', 'Task limits apply to each swimlane individually' => 'Batas tugas berlaku untuk setiap swimlane secara individual', 'Column task limits apply to each swimlane individually' => 'Batas tugas kolom berlaku untuk setiap swimlane secara individual', 'Column task limits are applied to each swimlane individually' => 'Batas tugas kolom diterapkan ke setiap swimlane secara individual', 'Column task limits are applied across swimlanes' => 'Batas tugas kolom diterapkan di seluruh swimlanes', 'Task limit: ' => 'Batas tugas:', 'Change to global tag' => 'Ubah ke tag global', 'Do you really want to make the tag "%s" global?' => 'Anda yakin ingin menjadikan tag "%s" global?', 'Enable global tags for this project' => 'Aktifkan tag global untuk proyek ini', 'Group membership(s):' => 'Keanggotaan grup:', '%s is a member of the following group(s): %s' => '%s adalah anggota dari grup berikut: %s', '%d/%d group(s) shown' => '%d/%d grup ditampilkan', 'Subtask creation or modification' => 'Pembuatan atau modifikasi subtugas', 'Assign the task to a specific user when the task is moved to a specific swimlane' => 'Tetapkan tugas ke pengguna tertentu saat tugas dipindahkan ke swimlane tertentu', 'Comment' => 'Komentar', 'Collapse vertically' => 'Ciutkan secara vertikal', 'Expand vertically' => 'Bentangkan secara vertikal', // 'MXN - Mexican Peso' => '', // 'Estimated vs actual time per column' => '', // 'HUF - Hungarian Forint' => '', 'XBT - Bitcoin' => 'XBT - Bitcoin', // 'You must select a file to upload as your avatar!' => '', // 'The file you uploaded is not a valid image! (Only *.gif, *.jpg, *.jpeg and *.png are allowed!)' => '', );
libin/kanboard
app/Locale/id_ID/translations.php
PHP
mit
90,531
<?php defined('BASEPATH') OR exit('No direct script access allowed'); /** * Class Cause */ class Cause extends Private_Controller { private $_redirect_url; private $_uid; /** * Constructor */ function __construct() { parent::__construct(); // load the language file $this->lang->load('cause'); // load the model files $this->load->model('cause_model'); // set constants define('REFERRER', "referrer"); define('THIS_URL', base_url('address')); // use the url in session (if available) to return to the previous filter/sorted/paginated list if ($this->session->userdata(REFERRER)) { $this->_redirect_url = $this->session->userdata(REFERRER); } else { $this->_redirect_url = THIS_URL; } // get logged in user's detail $logged_in_user = $this->session->userdata('logged_in'); if ($logged_in_user['id']) { $this->_uid = $logged_in_user['id']; } else { $this->_uid = NULL; } } /************************************************************************************** * PUBLIC FUNCTIONS **************************************************************************************/ public function add_step_1() { // validators if ($this->validate_form_step_1() == TRUE) { $saved = $this->cause_model->add_step_1($this->input->post()); // set message if ($saved) { $this->session->set_flashdata('message', lang('cause m saved')); } else { $this->session->set_flashdata('error', lang('core error save')); } $this->_redirect_url = base_url('cause/edit_step_2/' . $saved); redirect($this->_redirect_url); } $data = array( 'uid' => $this->_uid, 'page_title' => lang('cause add title'), 'cause_id' => NULL, // null in case of new add, int if edit 'cancel' => $this->_redirect_url, 'cause' => NULL, ); // load views $this->public_view('cause/add_step_1', $data); } public function edit_step_2( $id = NULL ) { $cause_id = ($id == NULL) ? $this->uri->segment(3) : $id; // if user is not the creator of this cause, shoot him up if ( ! $this->cause_model->is_crud_authorized($this->_uid, $cause_id)) redirect($this->_redirect_url); // validators if ($this->validate_form_step_2() == TRUE) { $saved = $this->cause_model->update($this->input->post()); // set message if ($saved) { $this->session->set_flashdata('message', lang('cause m updated')); } else { $this->session->set_flashdata('error', lang('core error save')); } $this->_redirect_url = base_url('cause/edit_step_3/' . $saved); redirect($this->_redirect_url); } $data = array( 'uid' => $this->_uid, 'cause_id' => $cause_id, 'cancel' => $this->_redirect_url, 'cause' => $this->cause_model->get_cause_by_id($cause_id), 'page_title' => lang('cause edit title') ); // load views $this->public_view('cause/add_step_2', $data); } public function edit_step_3($id = NULL) { $cause_id = ($id == NULL) ? $this->uri->segment(3) : $id; // if user is not the creator of this cause, shoot him up if ( ! $this->cause_model->is_crud_authorized($this->_uid, $cause_id)) redirect($this->_redirect_url); // validators if ($this->validate_form_step_3() == TRUE) { $saved = $this->cause_model->update($this->input->post()); // set message if ($saved) { $this->session->set_flashdata('message', lang('cause m updated')); } else { $this->session->set_flashdata('error', lang('core error save')); } $this->_redirect_url = base_url('cause/view/' . $saved); redirect($this->_redirect_url); } $data = array( 'uid' => $this->_uid, 'cause_id' => $cause_id, 'cancel' => $this->_redirect_url, 'cause' => $this->cause_model->get_cause_by_id($cause_id), 'page_title' => lang('cause edit title') ); // load views $this->public_view('cause/add_step_3', $data); } /* * Displays recent posts by other users * */ public function recent($last_id = NULL) { $last_id = (($last_id == NULL) OR ($this->uri->segment(3))) ? $this->uri->segment(3) : NULL; $res_data = $this->cause_model->get_recents($last_id); // make the result array cleaner by stripping away the last id and assigning it to another var $last_id = $res_data['last_id']; // initial last id val changed here unset($res_data['last_id']); $data['causes'] = $res_data; $data['last_id'] = $last_id; $this->load->view('cause/single_entry', $data); } public function index() { $data['page_title'] = 'Apply for a Cause'; $this->public_view('cause/index', $data); } public function view( $id = NULL ) { $cause_id = (($id == NULL) OR ($this->uri->segment(3))) ? $this->uri->segment(3) : NULL; // make sure we have a numeric id if ( !is_null($id) OR is_numeric($id)) { $cause = $this->cause_model->get_cause_by_id($cause_id); } $data = array( 'uid' => $this->_uid, 'cause_id' => $cause_id, 'cause' => $cause, 'page_title' => $cause['cause_title'] ); // load views $this->public_view('cause/view', $data); } // TODO: Not implemented yet public function supporters($id = NULL) { $cause_id = (($id == NULL) OR ($this->uri->segment(3))) ? $this->uri->segment(3) : NULL; // make sure we have a numeric id if ( !is_null($id) OR is_numeric($id)) { $cause = $this->cause_model->get_cause_by_id($cause_id); } $data = array( 'uid' => $this->_uid, 'cause_id' => $cause_id, 'cause' => $cause, 'page_title' => $cause['cause_title'], ); // load views $this->public_view('cause/supporters', $data); } private function validate_form_step_1() { // validators $this->form_validation->set_error_delimiters($this->config->item('error_delimeter_left'), $this->config->item('error_delimeter_right')); $this->form_validation->set_rules('cause_addr_line', lang('cause input addr_line_1'), 'trim'); $this->form_validation->set_rules('cause_addr_area', lang('cause input cause_addr_area'), 'trim'); $this->form_validation->set_rules('cause_addr_city', lang('cause input cause_addr_city'), 'required|trim'); $this->form_validation->set_rules('cause_addr_state', lang('cause input cause_addr_state'), 'trim'); $this->form_validation->set_rules('cause_addr_country', lang('cause input cause_addr_country'), 'required|trim'); $this->form_validation->set_rules('cause_title', lang('cause input cause_title'), 'required|trim'); $this->form_validation->set_rules('cause_desc', lang('cause input cause_desc'), 'required|trim'); if ($this->form_validation->run() == TRUE) return TRUE; return FALSE; } private function validate_form_step_2() { // validators $this->form_validation->set_error_delimiters($this->config->item('error_delimeter_left'), $this->config->item('error_delimeter_right')); $this->form_validation->set_rules('to_addr_line', lang('cause input addr_line_1'), 'trim'); $this->form_validation->set_rules('to_addr_area', lang('cause input to_addr_area'), 'trim'); $this->form_validation->set_rules('to_addr_city', lang('cause input to_addr_city'), 'required|trim'); $this->form_validation->set_rules('to_addr_state', lang('cause input to_addr_state'), 'trim'); $this->form_validation->set_rules('to_addr_country', lang('cause input to_addr_country'), 'required|trim'); $this->form_validation->set_rules('to_apt', lang('cause input to_apt'), 'trim'); $this->form_validation->set_rules('to_name', lang('cause input to_name'), 'trim'); $this->form_validation->set_rules('to_sec', lang('cause input to_sec'), 'trim'); $this->form_validation->set_rules('to_org', lang('cause input to_org'), 'required|trim'); $this->form_validation->set_rules('cause_id', 'Cause ID', 'required|numeric'); if ($this->form_validation->run() == TRUE) return TRUE; return FALSE; } private function validate_form_step_3() { // validators $this->form_validation->set_error_delimiters($this->config->item('error_delimeter_left'), $this->config->item('error_delimeter_right')); $this->form_validation->set_rules('tags', lang('cause input tags'), 'trim'); if ($this->form_validation->run() == TRUE) return TRUE; return FALSE; } /** * Delete an cause * * @param int $id */ function delete() { // TODO: delete is not working. Moving on $id = $this->uri->segment(3); // make sure we have a numeric id if (!is_null($id) OR !is_numeric($id)) { // if cause belongs to the user if ($this->cause_model->is_created_by_user($this->_uid, $id)) { $delete = $this->cause_model->delete_address($id); if ($delete) { $this->session->set_flashdata('message', lang('cause msg deleted')); } else { $this->session->set_flashdata('error', lang('cause error deletefail')); } } else { $this->session->set_flashdata('error', lang('cause error belong')); } } else { $this->session->set_flashdata('error', lang('cause id required')); } // return to list and display message redirect($this->_redirect_url); } }
tanimkg/batichalan
application/controllers/Cause.php
PHP
mit
10,414
//= require "dep3-1-1.js, dep3.js"
marcbaechinger/resolve
specs/samples/dep3-1.js
JavaScript
mit
34
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("02GetLargestNumber")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("02GetLargestNumber")] [assembly: AssemblyCopyright("Copyright © 2016")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("3af935b0-e086-4848-bd06-a4f230f70112")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
kaneva91/belongs-to-kali
Telerik Academy/C#/2.C#Advanced/Homeworks/03Methods/02GetLargestNumber/Properties/AssemblyInfo.cs
C#
mit
1,412
function init_map(field_id) { //console.log(field_id); } /*acf.fields.address = acf.field.extend({ type: 'address', $el: null, $input: null, status: '', // '', 'loading', 'ready' geocoder: false, map: false, maps: {}, pending: $(), actions: { 'ready': 'initialize' }, initialize: function () { console.log('init'); } });*/ (function ($) { function initialize_field($el) { console.log('init hook'); console.log($el); initMap($el); } if (typeof acf.add_action !== 'undefined') { /* * ready append (ACF5) * * These are 2 events which are fired during the page load * ready = on page load similar to $(document).ready() * append = on new DOM elements appended via repeater field * * @type event * @date 20/07/13 * * @param $el (jQuery selection) the jQuery element which contains the ACF fields * @return n/a */ acf.add_action('ready append', function ($el) { // search $el for fields of type 'FIELD_NAME' acf.get_fields({type: 'address'}, $el).each(function () { initialize_field($(this)); }); }); } else { /* * acf/setup_fields (ACF4) * * This event is triggered when ACF adds any new elements to the DOM. * * @type function * @since 1.0.0 * @date 01/01/12 * * @param event e: an event object. This can be ignored * @param Element postbox: An element which contains the new HTML * * @return n/a */ $(document).on('acf/setup_fields', function (e, postbox) { $(postbox).find('.field[data-field_type="address"]').each(function () { initialize_field($(this)); }); }); } function initMap($mapElement) { ymaps.ready(function () { /** * Массив сохраняемых данных * * address - краткий адрес, без города * addressFull - полный адрес, с городом * coordinates - координаты адреса * coordinatesMetro - координаты ближайшей станции метро * metroDist - расстояние до ближайшей станции метро (в метрах) * addressMetro - адрес ближайшей станции метро * addressMetroFull - полный адрес ближайшей станции метро * metroLine - ближайшая линия метро, формат line_{number} * * @type {{}} */ var field = {}; /** * Центр карты и координаты метки по умолчанию * @type {number[]} */ var centerMap = [55.753994, 37.622093]; /** * Карта * @type {undefined} */ var addressMap = undefined; /** * Метка * @type {ymaps.GeoObject} */ var geoPoint = new ymaps.GeoObject({ geometry: { type: "Point", coordinates: centerMap } }, { preset: 'islands#blackStretchyIcon', draggable: true }); geoPoint.events.add('dragend', function () { changeLocation(); }); /** * Кнопка определения местоположения * @type {GeolocationButton} */ var geolocationButton = new GeolocationButton({ data: { image: btn.img, title: 'Определить местоположение' }, geolocationOptions: { enableHighAccuracy: true, noPlacemark: false, point: geoPoint, afterSearch: function () { changeLocation() } } }, { selectOnClick: false }); /** * Строка поиска адреса * @type {ymaps.control.SearchControl} */ var searchControl = new ymaps.control.SearchControl({ noPlacemark: true }); searchControl.events.add('resultselect', function (e) { var index = e.get("resultIndex"); var result = searchControl.getResult(index); result.then(function (res) { var geo = res.geometry.getCoordinates(); geoPoint.geometry.setCoordinates(geo); changeLocation(); }); }); /** * Кнопка для поиска ближайшего метро * @type {Button} */ var button = new ymaps.control.Button({ data: { image: btn.metro, title: 'Найти ближайшее метро' } }, { selectOnClick: false }); button.events.add('click', function () { findMetro(); }); /** * Поиск ближайшего метро */ function findMetro() { ymaps.geocode(field.coordinates, { kind: 'metro', results: 1 }).then(function (res) { if (res.geoObjects.getLength()) { var m0 = res.geoObjects.get(0); var coords = m0.geometry.getCoordinates(); field.coordinatesMetro = coords; var dist = ymaps.coordSystem.geo.getDistance(field.coordinates, coords); field.metroDist = Math.round(dist).toFixed(0); res.geoObjects.options.set('preset', 'twirl#metroMoscowIcon'); addressMap.geoObjects.add(res.geoObjects); var getObject = res.geoObjects.get(0); field.addressMetro = getObject.properties.get('name'); field.addressMetroFull = getObject.properties.get('text').replace('Россия,', '').trim(); $('.metro-row').show(); $('input[name="metro"]').val(field.addressMetro); $('input[name="metro_full"]').val(field.addressMetroFull); $('input[name="metro_dist"]').val(field.metroDist); var metroLine = colorMetro(field.addressMetroFull); if (metroLine != undefined) field.metroLine = metroLine; } }); } /** * Событие при смене координат */ function changeLocation() { var coord = geoPoint.geometry.getCoordinates(); field.coordinates = coord; ymaps.geocode(coord).then(function (res) { var getObject = res.geoObjects.get(0); field.address = getObject.properties.get('name'); field.addressFull = getObject.properties.get('text').replace('Россия,', '').trim(); updateField(); }); } /** * Обновление полей с адресом */ function updateField() { $('input[name="address"]').val(field.address); $('input[name="address_full"]').val(field.addressFull); } /** * Загрузка данных */ function loadField() { //field = JSON.parse($('#acf-address-input').val()); updateField(); var loadCoord = (field.coordinates != undefined) ? field.coordinates : centerMap; var loadZoom = (field.zoom != undefined) ? field.zoom : 10; geoPoint.geometry.setCoordinates(loadCoord); addressMap.setCenter(loadCoord); addressMap.setZoom(loadZoom); if (field.addressMetro != undefined || field.addressMetroFull != undefined) { $('.metro-row').show(); $('input[name="metro"]').val(field.addressMetro); $('input[name="metro_full"]').val(field.addressMetroFull); $('input[name="metro_dist"]').val(field.metroDist); } } /** * Возвращает номер линии метро * * @param metro * @returns {*} */ function colorMetro(metro) { var metroArray = metro.split(','); if (metroArray.length >= 3) { metro = metroArray[2].replace('линия', '').trim(); } else return undefined; var moscowMetro = {}; moscowMetro['Сокольническая'] = 'line_1'; moscowMetro['Замоскворецкая'] = 'line_2'; moscowMetro['Арбатско-Покровская'] = 'line_3'; moscowMetro['Филёвская'] = 'line_4'; moscowMetro['Кольцевая'] = 'line_5'; moscowMetro['Калужско-Рижская'] = 'line_6'; moscowMetro['Таганско-Краснопресненская'] = 'line_7'; moscowMetro['Калининско-Солнцевская'] = 'line_8'; moscowMetro['Калининская'] = 'line_8'; moscowMetro['Серпуховско-Тимирязевская'] = 'line_9'; moscowMetro['Люблинско-Дмитровская'] = 'line_10'; moscowMetro['Каховская'] = 'line_11'; moscowMetro['Бутовская'] = 'line_12'; return moscowMetro[metro]; } $('.address-btn-cancel').click(function () { tb_remove(); }); $('#address-btn-ok').click(function () { $('#acf-address-input').val(JSON.stringify(field)); $('#acf-address-display').val(field.addressFull); tb_remove(); }); $('#acf-address-btn').click(function () { if (addressMap != undefined) addressMap.destroy(); addressMap = new ymaps.Map($mapElement, { center: centerMap, zoom: 9, behaviors: ['default', 'scrollZoom'] }); addressMap.events.add('boundschange', function (e) { var zoom = e.get("newZoom"); field.zoom = zoom; }); addressMap.controls .add(geolocationButton, {top: 5, left: 100}) .add('zoomControl') .add('typeSelector', {top: 5, right: 5}) .add(button, {top: 5, left: 65}) .add(searchControl, {top: 5, left: 200}); addressMap.geoObjects.add(geoPoint); loadField(); }); $('#acf-address-clear').click(function () { field = {}; $('.metro-row').hide(); $('#acf-address-display').val(''); $('#acf-address-display').val(''); $('input[name="metro"]').val(''); $('input[name="metro_full"]').val(''); $('input[name="metro_dist"]').val(''); }); $('#acf-address-display').click(function () { $('#acf-address-btn').trigger('click'); }); field = JSON.parse($('#acf-address-input').val()); $('#acf-address-display').val(field.addressFull); }); } })(jQuery);
constlab/acf-address
js/acf-address.js
JavaScript
mit
13,011
#include "util/mapper.h" #include "method.h" namespace frost { cstr_map_t<http_method> http_method_assist::_desc; // frost::unordered_map<std::string, http_method> http_method_assist::_desc // = mapper<std::string, http_method>() // ("OPTIONS", http_method::OPTIONS) // ("GET", http_method::GET) // ("HEAD", http_method::HEAD) // ("POST", http_method::POST) // ("PUT", http_method::PUT) // ("DELETE", http_method::DELETE) // ("TRACE", http_method::TRACE) // ("CONNECT", http_method::CONNECT) // ; }
igorcoding/frost
frost/http/method.cc
C++
mit
673
<?php /* * @package YouTech Shortcodes * @author YouTech Company http://smartaddons.com/ * @copyright Copyright (C) 2015 YouTech Company * @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL */ defined('_JEXEC') or die; function ShowcaseYTShortcode($atts = null, $content = null) { $atts = ytshortcode_atts(array( 'source' => '', 'limit' => 12, 'loading_animation' => 'default', 'filter_animation' => 'rotateSides', 'caption_style' => 'overlayBottomPush', 'horizontal_gap' => 10, 'vertical_gap' => 10, 'filter' => 'yes', 'filter_deeplink' => 'no', 'page_deeplink' => 'no', 'popup_position' => 'below', 'popup_category' => 'yes', 'popup_date' => 'yes', 'popup_image' => 'yes', 'large' => 4, 'medium' => 3, 'small' => 1, 'thumb_width' => 640, 'thumb_height' => 480, 'class' => '' ), $atts, 'showcase'); $slides = (array) get_slides($atts); $id = uniqid('ytsc').rand().time(); $intro_text=''; $title = ''; $return = ''; $atts['filter_deeplink'] = ($atts['filter_deeplink'] === 'yes') ? 'true' : 'false'; $atts['page_deeplink'] = ($atts['page_deeplink'] === 'yes') ? 'true' : 'false'; if ( count($slides) ) { $return .= '<div id="' . $id . '" class="yt-showcase" data-scid="' . $id . '" data-loading_animation="'.$atts['loading_animation'].'" data-filter_animation="'.$atts['filter_animation'].'" data-caption_style="'.$atts['caption_style'].'" data-horizontal_gap="'.intval($atts['horizontal_gap']).'" data-vertical_gap="'.intval($atts['vertical_gap']).'" data-popup_position="'.$atts['popup_position'].'" data-large="'.$atts['large'].'" data-medium="'.$atts['medium'].'" data-small="'.$atts['small'].'" data-filter_deeplink="'.$atts['filter_deeplink'].'" data-page_deeplink="'.$atts['page_deeplink'].'" >'; if ($atts['filter'] !== 'no') { $return .= '<div id="' . $id . '_filter" class="cbp-l-filters-dropdown"> <div class="cbp-l-filters-dropdownWrap"> <div class="cbp-l-filters-dropdownHeader">Sort Showcase</div> <div class="cbp-l-filters-dropdownList"> <div data-filter="*" class="cbp-filter-item-active cbp-filter-item"> All Items (<div class="cbp-filter-counter"></div> items) </div>'; $category = array(); foreach ((array) $slides as $slide) { if (in_array($slide['category'], $category) ) { continue; } $category[] = $slide['category']; $return .= '<div class="cbp-filter-item" data-filter=".' . str_replace(' ', '-', strtolower($slide['category'])).'">'.$slide['category'].' (<div class="cbp-filter-counter"></div> items)</div>'; } $return .='</div> </div> </div>'; } $return .= '<div id="' . $id . '_container" class="cbp-l-grid-gallery">'; $limit = 1; foreach ((array) $slides as $slide) { $thumb_url = yt_image_resize($slide['image'], $atts['thumb_width'], $atts['thumb_height'], 95); // Title condition if($slide['title']) $title = stripslashes($slide['title']); $category = str_replace(' ', '-', strtolower($slide['category'])); $itemid = uniqid().rand().time(); $return .= ' <div class="cbp-item '.$category.' motion"> <a href="'.$slide['link'].'" class="cbp-caption cbp-singlePageInline" data-title="'.$title.' // '.$slide['category'].'"> <div class="cbp-caption-defaultWrap">'; if($slide['image']){ $return .= '<img src="'. yt_image_media($thumb_url['url']) .'" alt="'. $title .'">'; }else { $return .= '<img src="'. yt_image_media(JURI::base().'plugins/system/ytshortcodes/assets/images/URL_IMAGES.png').'" alt="'. $title .'" width="640" height="480" />'; } $return .= '</div> <div class="cbp-caption-activeWrap"> <div class="cbp-l-caption-alignLeft"> <div class="cbp-l-caption-body"> <div class="cbp-l-caption-title">'. $title .'</div> <div class="cbp-l-caption-desc">'.$slide['category'].'</div> </div> </div> </div> </a> </div>'; if ($limit++ == $atts['limit']) break; } $return .= '</div><div class="clearfix"></div>'; $return .= '<div id="'.$id.'_inlinecontents" style="display: none;">'; foreach ((array) $slides as $slide) { $date = JHTML::_('date', $slide['created'], JText::_('DATE_FORMAT_LC3')); $textImg = yt_all_images($slide['fulltext']); $return .= ' <div> <div class="cbp-l-inline"> <div class="cbp-l-inline-left">'; if ($atts['popup_image'] === 'yes' and ($textImg != null)) { $return .=' <div class="cbp-slider"> <ul class="cbp-slider-wrap"> <li class="cbp-slider-item"><img src="'.yt_image_media($slide['image']).'" alt="'.$slide['title'].'"></li>'; foreach ($textImg as $img) { $return .= '<li class="cbp-slider-item"><img src="'.yt_image_media($img).'" alt="'.$slide['title'].'"></li>'; } $return .='</ul> </div>'; } elseif ($atts['popup_image'] === 'yes') { $return .='<img src="'.yt_image_media($slide['image']).'" alt="'.$slide['title'].'">'; } $return .= '</div> <div class="cbp-l-inline-right"> <div class="cbp-l-inline-title">'. $slide['title'] .'</div> <div class="cbp-l-inline-subtitle">'.$slide['category'].' // '.$date.'</div> <div class="cbp-l-inline-desc">'.parse_shortcode(str_replace(array("<br/>", "<br>", "<br />"), " ", $slide['introtext'])).'</div> <a href="'.$slide['link'].'" class="cbp-l-inline-view">View Details</a> </div> </div> </div>'; } $return .='</div></div>'; JHtml::stylesheet(JUri::base()."plugins/system/ytshortcodes/shortcodes/showcase/css/cubeportfolio.min.css",'text/css'); JHtml::stylesheet(JUri::base()."plugins/system/ytshortcodes/shortcodes/showcase/css/showcase.css",'text/css'); JHtml::stylesheet(JUri::base()."plugins/system/ytshortcodes/assets/css/magnific-popup.css",'text/css'); JHtml::_('jquery.framework'); JHtml::script("plugins/system/ytshortcodes/assets/js/magnific-popup.js"); JHtml::script("plugins/system/ytshortcodes/shortcodes/showcase/js/cubeportfolio.min.js"); JHtml::script("plugins/system/ytshortcodes/shortcodes/showcase/js/showcase.js"); } else $return = yt_alert_box('Error: Something wrong there, please check your showcase source.', 'warning'); return $return; } ?>
yaelduckwen/lo_imaginario
web2/plugins/system/ytshortcodes/shortcodes/showcase/shortcode.php
PHP
mit
8,661
/* * The MIT License * * Copyright 2016 Ahseya. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ package com.github.horrorho.inflatabledonkey.cloud.clients; import com.github.horrorho.inflatabledonkey.cloudkitty.CloudKitty; import com.github.horrorho.inflatabledonkey.cloudkitty.operations.RecordRetrieveRequestOperations; import com.github.horrorho.inflatabledonkey.data.backup.Device; import com.github.horrorho.inflatabledonkey.data.backup.DeviceID; import com.github.horrorho.inflatabledonkey.data.backup.DeviceFactory; import com.github.horrorho.inflatabledonkey.protobuf.CloudKit; import java.io.IOException; import java.util.Collection; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import javax.annotation.concurrent.Immutable; import org.apache.http.client.HttpClient; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * * @author Ahseya */ @Immutable public final class DeviceClient { private static final Logger logger = LoggerFactory.getLogger(DeviceClient.class); public static List<Device> apply(HttpClient httpClient, CloudKitty kitty, Collection<DeviceID> devices) throws IOException { List<String> deviceList = devices.stream() .map(Object::toString) .collect(Collectors.toList()); List<CloudKit.RecordRetrieveResponse> responses = RecordRetrieveRequestOperations.get(kitty, httpClient, "mbksync", deviceList); return devices(responses); } static List<Device> devices(List<CloudKit.RecordRetrieveResponse> responses) { logger.debug("-- devices() - responses: {}", responses); return responses .stream() .map(CloudKit.RecordRetrieveResponse::getRecord) .map(DeviceFactory::from) .filter(Optional::isPresent) .map(Optional::get) .collect(Collectors.toList()); } }
horrorho/InflatableDonkey
src/main/java/com/github/horrorho/inflatabledonkey/cloud/clients/DeviceClient.java
Java
mit
3,000
<?php return array ( 'id' => 'infocus_m512_ver1', 'fallback' => 'generic_android_ver4_4', 'capabilities' => array ( 'mobile_browser_version' => '39', 'model_name' => 'M512', 'brand_name' => 'Infocus', 'physical_screen_height' => '111', 'physical_screen_width' => '63', 'resolution_width' => '720', 'resolution_height' => '1280', 'nfc_support' => 'true', ), );
cuckata23/wurfl-data
data/infocus_m512_ver1.php
PHP
mit
403
package proxy import ( "log" "strconv" "../util" ) func (s *ProxyServer) handleGetWorkRPC(cs *Session, diff, id string) (reply []string, errorReply *ErrorReply) { t := s.currentBlockTemplate() if len(t.Header) == 0 { return nil, &ErrorReply{Code: -1, Message: "Work not ready"} } targetHex := t.Target if !s.rpc().Pool { minerDifficulty, err := strconv.ParseFloat(diff, 64) if err != nil { log.Printf("Invalid difficulty %v from %v@%v ", diff, id, cs.ip) minerDifficulty = 5 } targetHex = util.MakeTargetHex(minerDifficulty) } reply = []string{t.Header, t.Seed, targetHex} return } func (s *ProxyServer) handleSubmitRPC(cs *Session, diff string, id string, params []string) (reply bool, errorReply *ErrorReply) { miner, ok := s.miners.Get(id) if !ok { miner = NewMiner(id, cs.ip) s.registerMiner(miner) } t := s.currentBlockTemplate() reply = miner.processShare(s, t, diff, params) return } func (s *ProxyServer) handleSubmitHashrate(cs *Session, req *JSONRpcReq) bool { reply, _ := s.rpc().SubmitHashrate(req.Params) return reply } func (s *ProxyServer) handleUnknownRPC(cs *Session, req *JSONRpcReq) *ErrorReply { log.Printf("Unknown RPC method: %v", req) return &ErrorReply{Code: -1, Message: "Invalid method"} }
sammy007/ether-proxy
proxy/handlers.go
GO
mit
1,265
<?php namespace Budget\Utils; // Pimple dependencies use \Pimple\Container; // PSR-7 (HTTP Messaging) dependencies use Psr\Http\Message\RequestInterface; // PSR-3 (logger) dependencies use \Psr\Log\LoggerAwareInterface; use \Psr\Log\LoggerAwareTrait; // From `charcoal-app` // use \Charcoal\App\Template\AbstractTemplate; use \Charcoal\App\AppConfig; // Module `charcoal-config` dependencies use \Charcoal\Config\AbstractEntity; // From `charcoal-core` // use \Charcoal\Model\ModelLoader; // Model Aware use Budget\Support\Traits\ModelAwareTrait; use Budget\Support\Interfaces\ModelAwareInterface; // Config Aware use Budget\Support\Traits\ConfigAwareTrait; use Budget\Support\Interfaces\ConfigAwareInterface; /** * Helper * Basic helper to handle all Charcoal interactions */ class CharcoalHelper extends AbstractEntity implements ConfigAwareInterface, LoggerAwareInterface, ModelAwareInterface { use ConfigAwareTrait; use LoggerAwareTrait; use ModelAwareTrait; /** * @param Container $container The dependencies. */ public function __construct(Container $container) { $this->setDependencies($container); } /** * Initialize the template with a request. * * @param RequestInterface $request The request to intialize. * @return boolean */ public function init(RequestInterface $request) { // This method is a stub. Reimplement in children methods to ensure template initialization. return true; } /** * Give an opportunity to children classes to inject dependencies from a Pimple Container. * * Does nothing by default, reimplement in children classes. * * The `$container` DI-container (from `Pimple`) should not be saved or passed around, only to be used to * inject dependencies (typically via setters). * * @param Container $container A dependencies container instance. * @return void */ public function setDependencies(Container $dependencies) { // ConfigAwareTrait $this->setAppConfig($dependencies['config']); // ModelAwareTrait $this->setModelFactory($dependencies['model/factory']); } }
dominiclord/budget-app
src/Budget/Utils/CharcoalHelper.php
PHP
mit
2,226
import { combineReducers } from 'redux' import userInfo from './userInfo' import userFeed from './userFeed' import popularFeed from './popularFeed' export default combineReducers({ userInfo, userFeed, popularFeed })
anzorb/pumpapp
src/reducers/index.js
JavaScript
mit
222
package modelos; /** * * Clase contenedora para un banco * * @author jesus * */ public class Banco { public long bid; public String nombre, numero; public boolean activo; public Banco() {} public Banco(long bid, String nombre, String numero, boolean activo) { this.bid = bid; this.nombre = nombre; this.numero = numero; this.activo = activo; } }
Jesus-Gonzalez/jeecommerce
src/jeecommerce modelos/src/modelos/Banco.java
Java
mit
383
/* comment */ var g = 1, i = 2, j = 2/* *//1+g+"\/*"/i, x = 3, a = 2/1/g, b = (i)/i/i/* */, s = 'aaa\ bbb\ ccc'; var z = 1;
polygonplanet/Chiffon
tests/fixtures/tokenize/loc/test-0002.js
JavaScript
mit
127
<?php namespace Coreplex\Meta\Eloquent; use Coreplex\Meta\Contracts\Repository as Contract; use Coreplex\Meta\Contracts\Variant; use Coreplex\Meta\Exceptions\MetaGroupNotFoundException; class Repository implements Contract { /** * Find a meta group by it's identifier * * @param mixed $identifier * @param Variant $variant * @return \Coreplex\Meta\Contracts\Group|null * @throws MetaGroupNotFoundException */ public function find($identifier, Variant $variant = null) { if ($variant) { if ($meta = Meta::where('identifier', $identifier) ->where('variant_id', $variant->getKey()) ->where('variant_type', $variant->getType()) ->first() ) { return $meta; } } else { if ($meta = Meta::where('identifier', $identifier)->first()) { return $meta; } } throw new MetaGroupNotFoundException('A meta group with the identifier "' . $identifier . '" could not be found.'); } /** * Get the default meta group if one exists * * @return \Coreplex\Meta\Contracts\Group|null */ public function defaultGroup() { return Meta::defaultGroup(); } }
coreplex/meta
src/Eloquent/Repository.php
PHP
mit
1,335
# encoding: utf-8 # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is # regenerated. module Azure::IotHub::Mgmt::V2017_07_01 module Models # # The properties of the EventHubConsumerGroupInfo object. # class EventHubConsumerGroupInfo include MsRestAzure # @return [Hash{String => String}] The tags. attr_accessor :tags # @return [String] The Event Hub-compatible consumer group identifier. attr_accessor :id # @return [String] The Event Hub-compatible consumer group name. attr_accessor :name # # Mapper for EventHubConsumerGroupInfo class as Ruby Hash. # This will be used for serialization/deserialization. # def self.mapper() { client_side_validation: true, required: false, serialized_name: 'EventHubConsumerGroupInfo', type: { name: 'Composite', class_name: 'EventHubConsumerGroupInfo', model_properties: { tags: { client_side_validation: true, required: false, serialized_name: 'tags', type: { name: 'Dictionary', value: { client_side_validation: true, required: false, serialized_name: 'StringElementType', type: { name: 'String' } } } }, id: { client_side_validation: true, required: false, serialized_name: 'id', type: { name: 'String' } }, name: { client_side_validation: true, required: false, serialized_name: 'name', type: { name: 'String' } } } } } end end end end
Azure/azure-sdk-for-ruby
management/azure_mgmt_iot_hub/lib/2017-07-01/generated/azure_mgmt_iot_hub/models/event_hub_consumer_group_info.rb
Ruby
mit
2,127
<?php use yii\helpers\Html; use yii\widgets\DetailView; /* @var $this yii\web\View */ /* @var $model lo\plugins\models\Plugin */ $this->title = $model->name; $this->params['breadcrumbs'][] = ['label' => Yii::t('plugin', 'Items'), 'url' => ['index']]; $this->params['breadcrumbs'][] = $this->title; ?> <div class="item-view"> <p> <?= Html::a(Yii::t('plugin', 'Update'), ['update', 'id' => $model->id], ['class' => 'btn btn-primary']) ?> <?= Html::a(Yii::t('plugin', 'Delete'), ['delete', 'id' => $model->id], [ 'class' => 'btn btn-danger', 'data' => [ 'confirm' => Yii::t('plugin', 'Are you sure you want to delete this item?'), 'method' => 'post', ], ]) ?> </p> <?= DetailView::widget([ 'model' => $model, 'attributes' => [ 'id', 'name', 'url:url', 'version', 'text:ntext', 'author', 'author_url:url', 'status', ], ]) ?> </div>
loveorigami/yii2-plugins-system
src/views/plugin/view.php
PHP
mit
1,062
<?xml version="1.0" ?><!DOCTYPE TS><TS language="sq" version="2.1"> <context> <name>AboutDialog</name> <message> <location filename="../forms/aboutdialog.ui" line="+14"/> <source>About breakout</source> <translation type="unfinished"/> </message> <message> <location line="+39"/> <source>&lt;b&gt;breakout&lt;/b&gt; version</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Copyright © 2009-2014 The Bitcoin developers Copyright © 2012-2014 The NovaCoin developers Copyright © 2014 The breakout developers</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source> This is experimental software. Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php. This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressBookPage</name> <message> <location filename="../forms/addressbookpage.ui" line="+14"/> <source>Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <source>Double-click to edit address or label</source> <translation>Klikoni 2 herë për të ndryshuar adressën ose etiketën</translation> </message> <message> <location line="+27"/> <source>Create a new address</source> <translation>Krijo një adresë të re</translation> </message> <message> <location line="+14"/> <source>Copy the currently selected address to the system clipboard</source> <translation>Kopjo adresën e zgjedhur në memorjen e sistemit </translation> </message> <message> <location line="-11"/> <source>&amp;New Address</source> <translation type="unfinished"/> </message> <message> <location line="-46"/> <source>These are your breakout addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source> <translation type="unfinished"/> </message> <message> <location line="+60"/> <source>&amp;Copy Address</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Show &amp;QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sign a message to prove you own a breakout address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sign &amp;Message</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Delete the currently selected address from the list</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Verify a message to ensure it was signed with a specified breakout address</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>&amp;Delete</source> <translation>&amp;Fshi</translation> </message> <message> <location filename="../addressbookpage.cpp" line="+65"/> <source>Copy &amp;Label</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Edit</source> <translation type="unfinished"/> </message> <message> <location line="+250"/> <source>Export Address Book Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Skedar i ndarë me pikëpresje(*.csv)</translation> </message> <message> <location line="+13"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> </context> <context> <name>AddressTableModel</name> <message> <location filename="../addresstablemodel.cpp" line="+144"/> <source>Label</source> <translation>Etiketë</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresë</translation> </message> <message> <location line="+36"/> <source>(no label)</source> <translation>(pa etiketë)</translation> </message> </context> <context> <name>AskPassphraseDialog</name> <message> <location filename="../forms/askpassphrasedialog.ui" line="+26"/> <source>Passphrase Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Enter passphrase</source> <translation>Futni frazkalimin</translation> </message> <message> <location line="+14"/> <source>New passphrase</source> <translation>Frazkalim i ri</translation> </message> <message> <location line="+14"/> <source>Repeat new passphrase</source> <translation>Përsërisni frazkalimin e ri</translation> </message> <message> <location line="+33"/> <source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>For staking only</source> <translation type="unfinished"/> </message> <message> <location filename="../askpassphrasedialog.cpp" line="+35"/> <source>Enter the new passphrase to the wallet.&lt;br/&gt;Please use a passphrase of &lt;b&gt;10 or more random characters&lt;/b&gt;, or &lt;b&gt;eight or more words&lt;/b&gt;.</source> <translation>Futni frazkalimin e ri në portofol.&lt;br/&gt;Ju lutemi përdorni një frazkalim prej&lt;b&gt;10 ose më shumë shkronjash të rastësishme&lt;b/&gt;, ose tetë apo më shumë fjalë&lt;/b&gt;.</translation> </message> <message> <location line="+1"/> <source>Encrypt wallet</source> <translation>Enkripto portofolin</translation> </message> <message> <location line="+7"/> <source>This operation needs your wallet passphrase to unlock the wallet.</source> <translation>Ky veprim ka nevojë per frazkalimin e portofolit tuaj që të ç&apos;kyç portofolin.</translation> </message> <message> <location line="+5"/> <source>Unlock wallet</source> <translation>ç&apos;kyç portofolin.</translation> </message> <message> <location line="+3"/> <source>This operation needs your wallet passphrase to decrypt the wallet.</source> <translation>Ky veprim kërkon frazkalimin e portofolit tuaj që të dekriptoj portofolin.</translation> </message> <message> <location line="+5"/> <source>Decrypt wallet</source> <translation>Dekripto portofolin</translation> </message> <message> <location line="+3"/> <source>Change passphrase</source> <translation>Ndrysho frazkalimin</translation> </message> <message> <location line="+1"/> <source>Enter the old and new passphrase to the wallet.</source> <translation>Futni frazkalimin e vjetër dhe të ri në portofol. </translation> </message> <message> <location line="+46"/> <source>Confirm wallet encryption</source> <translation>Konfirmoni enkriptimin e portofolit</translation> </message> <message> <location line="+1"/> <source>Warning: If you encrypt your wallet and lose your passphrase, you will &lt;b&gt;LOSE ALL OF YOUR COINS&lt;/b&gt;!</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Are you sure you wish to encrypt your wallet?</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source> <translation type="unfinished"/> </message> <message> <location line="+103"/> <location line="+24"/> <source>Warning: The Caps Lock key is on!</source> <translation type="unfinished"/> </message> <message> <location line="-133"/> <location line="+60"/> <source>Wallet encrypted</source> <translation>Portofoli u enkriptua</translation> </message> <message> <location line="-58"/> <source>breakout will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+7"/> <location line="+44"/> <location line="+6"/> <source>Wallet encryption failed</source> <translation>Enkriptimi i portofolit dështoi</translation> </message> <message> <location line="-56"/> <source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source> <translation>Enkriptimi i portofolit dështoi për shkak të një gabimi të brëndshëm. portofoli juaj nuk u enkriptua.</translation> </message> <message> <location line="+7"/> <location line="+50"/> <source>The supplied passphrases do not match.</source> <translation>Frazkalimet e plotësuara nuk përputhen.</translation> </message> <message> <location line="-38"/> <source>Wallet unlock failed</source> <translation>ç&apos;kyçja e portofolit dështoi</translation> </message> <message> <location line="+1"/> <location line="+12"/> <location line="+19"/> <source>The passphrase entered for the wallet decryption was incorrect.</source> <translation>Frazkalimi i futur për dekriptimin e portofolit nuk ishte i saktë.</translation> </message> <message> <location line="-20"/> <source>Wallet decryption failed</source> <translation>Dekriptimi i portofolit dështoi</translation> </message> <message> <location line="+14"/> <source>Wallet passphrase was successfully changed.</source> <translation type="unfinished"/> </message> </context> <context> <name>BitcoinGUI</name> <message> <location filename="../bitcoingui.cpp" line="+282"/> <source>Sign &amp;message...</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>Synchronizing with network...</source> <translation>Duke u sinkronizuar me rrjetin...</translation> </message> <message> <location line="-319"/> <source>&amp;Overview</source> <translation>&amp;Përmbledhje</translation> </message> <message> <location line="+1"/> <source>Show general overview of wallet</source> <translation>Trego një përmbledhje te përgjithshme të portofolit</translation> </message> <message> <location line="+17"/> <source>&amp;Transactions</source> <translation>&amp;Transaksionet</translation> </message> <message> <location line="+1"/> <source>Browse transaction history</source> <translation>Shfleto historinë e transaksioneve</translation> </message> <message> <location line="+5"/> <source>&amp;Address Book</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit the list of stored addresses and labels</source> <translation type="unfinished"/> </message> <message> <location line="-13"/> <source>&amp;Receive BRO</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show the list of addresses for receiving payments</source> <translation type="unfinished"/> </message> <message> <location line="-7"/> <source>&amp;Send BRO</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>E&amp;xit</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Quit application</source> <translation>Mbyllni aplikacionin</translation> </message> <message> <location line="+6"/> <source>Show information about breakout</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>About &amp;Qt</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about Qt</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Options...</source> <translation>&amp;Opsione</translation> </message> <message> <location line="+4"/> <source>&amp;Encrypt Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Backup Wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>&amp;Change Passphrase...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+259"/> <source>~%n block(s) remaining</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Downloaded %1 of %2 blocks of transaction history (%3% done).</source> <translation type="unfinished"/> </message> <message> <location line="-256"/> <source>&amp;Export...</source> <translation type="unfinished"/> </message> <message> <location line="-64"/> <source>Send BRO to a breakout address</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Modify configuration options for breakout</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Export the data in the current tab to a file</source> <translation type="unfinished"/> </message> <message> <location line="-14"/> <source>Encrypt or decrypt wallet</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup wallet to another location</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Change the passphrase used for wallet encryption</source> <translation>Ndrysho frazkalimin e përdorur per enkriptimin e portofolit</translation> </message> <message> <location line="+10"/> <source>&amp;Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Open debugging and diagnostic console</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>&amp;Verify message...</source> <translation type="unfinished"/> </message> <message> <location line="-202"/> <source>breakout</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+180"/> <source>&amp;About breakout</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>&amp;Show / Hide</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Unlock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>&amp;Lock Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Lock wallet</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>&amp;File</source> <translation>&amp;Skedar</translation> </message> <message> <location line="+8"/> <source>&amp;Settings</source> <translation>&amp;Konfigurimet</translation> </message> <message> <location line="+8"/> <source>&amp;Help</source> <translation>&amp;Ndihmë</translation> </message> <message> <location line="+12"/> <source>Tabs toolbar</source> <translation>Shiriti i mjeteve</translation> </message> <message> <location line="+8"/> <source>Actions toolbar</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+9"/> <source>[testnet]</source> <translation>[testo rrjetin]</translation> </message> <message> <location line="+0"/> <location line="+60"/> <source>breakout client</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+75"/> <source>%n active connection(s) to breakout network</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+40"/> <source>Downloaded %1 blocks of transaction history.</source> <translation type="unfinished"/> </message> <message> <location line="+413"/> <source>Staking.&lt;br&gt;Your weight is %1&lt;br&gt;Network weight is %2&lt;br&gt;Expected time to earn reward is %3</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Not staking because wallet is locked</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because wallet is syncing</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Not staking because you don&apos;t have mature coins</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-403"/> <source>%n second(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="-312"/> <source>About breakout card</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show information about breakout card</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>&amp;Unlock Wallet...</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+297"/> <source>%n minute(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s) ago</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Up to date</source> <translation>I azhornuar</translation> </message> <message> <location line="+7"/> <source>Catching up...</source> <translation>Duke u azhornuar...</translation> </message> <message> <location line="+10"/> <source>Last received block was generated %1.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>This transaction requires a fee based on the services it uses. You may send it for a fee of %1 BRO, which rewards all users of the Breakout network as a result of your usage. Do you want to pay this fee?</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+27"/> <source>Sent transaction</source> <translation>Dërgo transaksionin</translation> </message> <message> <location line="+1"/> <source>Incoming transaction</source> <translation>Transaksion në ardhje</translation> </message> <message> <location line="+1"/> <source>Date: %1 Amount: %2 Type: %3 Address: %4 </source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <location line="+15"/> <source>URI handling</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <location line="+15"/> <source>URI can not be parsed! This can be caused by an invalid breakout address or malformed URI parameters.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;unlocked&lt;/b&gt;</source> <translation>Portofoli po &lt;b&gt; enkriptohet&lt;/b&gt; dhe është &lt;b&gt; i ç&apos;kyçur&lt;/b&gt;</translation> </message> <message> <location line="+10"/> <source>Wallet is &lt;b&gt;encrypted&lt;/b&gt; and currently &lt;b&gt;locked&lt;/b&gt;</source> <translation>Portofoli po &lt;b&gt; enkriptohet&lt;/b&gt; dhe është &lt;b&gt; i kyçur&lt;/b&gt;</translation> </message> <message> <location line="+25"/> <source>Backup Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Wallet Data (*.dat)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Backup Failed</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>There was an error trying to save the wallet data to the new location.</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+76"/> <source>%n second(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n minute(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n hour(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message numerus="yes"> <location line="+4"/> <source>%n day(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+18"/> <source>Not staking</source> <translation type="unfinished"/> </message> <message> <location filename="../bitcoin.cpp" line="+109"/> <source>A fatal error occurred. breakout can no longer continue safely and will quit.</source> <translation type="unfinished"/> </message> </context> <context> <name>ClientModel</name> <message> <location filename="../clientmodel.cpp" line="+90"/> <source>Network Alert</source> <translation type="unfinished"/> </message> </context> <context> <name>CoinControlDialog</name> <message> <location filename="../forms/coincontroldialog.ui" line="+14"/> <source>Coin Control</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+48"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="+551"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location filename="../forms/coincontroldialog.ui" line="+51"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change:</source> <translation type="unfinished"/> </message> <message> <location line="+69"/> <source>(un)select all</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Tree mode</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>List mode</source> <translation type="unfinished"/> </message> <message> <location line="+45"/> <source>Amount</source> <translation>Sasia</translation> </message> <message> <location line="+5"/> <source>Label</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Address</source> <translation>Adresë</translation> </message> <message> <location line="+5"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+5"/> <source>Confirmations</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Priority</source> <translation type="unfinished"/> </message> <message> <location filename="../coincontroldialog.cpp" line="-515"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+26"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+317"/> <source>highest</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium-high</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>low-medium</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>low</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>lowest</source> <translation type="unfinished"/> </message> <message> <location line="+155"/> <source>DUST</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>yes</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>This label turns red, if the transaction size is bigger than 10000 bytes. This means a fee of at least %1 per kb is required. Can vary +/- 1 Byte per input.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Transactions with higher priority get more likely into a block. This label turns red, if the priority is smaller than &quot;medium&quot;. This means a fee of at least %1 per kb is required.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if any recipient receives an amount smaller than %1. This means a fee of at least %2 is required. Amounts below 0.546 times the minimum relay fee are shown as DUST.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This label turns red, if the change is smaller than %1. This means a fee of at least %2 is required.</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+66"/> <source>(no label)</source> <translation>(pa etiketë)</translation> </message> <message> <location line="-9"/> <source>change from %1 (%2)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>(change)</source> <translation type="unfinished"/> </message> </context> <context> <name>EditAddressDialog</name> <message> <location filename="../forms/editaddressdialog.ui" line="+14"/> <source>Edit Address</source> <translation>Ndrysho Adresën</translation> </message> <message> <location line="+11"/> <source>&amp;Label</source> <translation>&amp;Etiketë</translation> </message> <message> <location line="+10"/> <source>The label associated with this address book entry</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Address</source> <translation>&amp;Adresa</translation> </message> <message> <location line="+10"/> <source>The address associated with this address book entry. This can only be modified for sending addresses.</source> <translation type="unfinished"/> </message> <message> <location filename="../editaddressdialog.cpp" line="+20"/> <source>New receiving address</source> <translation>Adresë e re pritëse</translation> </message> <message> <location line="+4"/> <source>New sending address</source> <translation>Adresë e re dërgimi</translation> </message> <message> <location line="+3"/> <source>Edit receiving address</source> <translation>Ndrysho adresën pritëse</translation> </message> <message> <location line="+4"/> <source>Edit sending address</source> <translation>ndrysho adresën dërguese</translation> </message> <message> <location line="+76"/> <source>The entered address &quot;%1&quot; is already in the address book.</source> <translation>Adresa e dhënë &quot;%1&quot; është e zënë në librin e adresave. </translation> </message> <message> <location line="-5"/> <source>The entered address &quot;%1&quot; is not a valid breakout address.</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Could not unlock wallet.</source> <translation>Nuk mund të ç&apos;kyçet portofoli.</translation> </message> <message> <location line="+5"/> <source>New key generation failed.</source> <translation>Krijimi i çelësit të ri dështoi.</translation> </message> </context> <context> <name>GUIUtil::HelpMessageBox</name> <message> <location filename="../guiutil.cpp" line="+420"/> <location line="+12"/> <source>breakout-Qt</source> <translation type="unfinished"/> </message> <message> <location line="-12"/> <source>version</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>UI options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set language, for example &quot;de_DE&quot; (default: system locale)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Start minimized</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show splash screen on startup (default: 1)</source> <translation type="unfinished"/> </message> </context> <context> <name>OptionsDialog</name> <message> <location filename="../forms/optionsdialog.ui" line="+14"/> <source>Options</source> <translation>Opsionet</translation> </message> <message> <location line="+16"/> <source>&amp;Main</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Optional transaction fee per kB that helps make sure your transactions are processed quickly. Most transactions are 1 kB. Fee 0.01 recommended.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Pay transaction &amp;fee</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Reserved amount does not participate in staking and is therefore spendable at any time.</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Reserve</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Automatically start breakout after logging in to the system.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Start breakout on system login</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Detach block and address databases at shutdown. This means they can be moved to another data directory, but it slows down shutdown. The wallet is always detached.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Detach databases at shutdown</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Network</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Automatically open the breakout client port on the router. This only works when your router supports UPnP and it is enabled.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Map port using &amp;UPnP</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Connect to the breakout network through a SOCKS proxy (e.g. when connecting through Tor).</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Connect through SOCKS proxy:</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Proxy &amp;IP:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>IP address of the proxy (e.g. 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Port:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Port of the proxy (e.g. 9050)</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>SOCKS &amp;Version:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>SOCKS version of the proxy (e.g. 5)</source> <translation type="unfinished"/> </message> <message> <location line="+36"/> <source>&amp;Window</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Show only a tray icon after minimizing the window.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Minimize to the tray instead of the taskbar</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Minimize instead of exit the application when the window is closed. When this option is enabled, the application will be closed only after selecting Quit in the menu.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>M&amp;inimize on close</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>&amp;Display</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>User Interface &amp;language:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>The user interface language can be set here. This setting will take effect after restarting breakout.</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>&amp;Unit to show amounts in:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Choose the default subdivision unit to show in the interface and when sending coins.</source> <translation type="unfinished"/> </message> <message> <location line="+9"/> <source>Whether to show breakout addresses in the transaction list or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Display addresses in transaction list</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Whether to show coin control features or not.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Display coin &amp;control features (experts only!)</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;OK</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>&amp;Cancel</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>&amp;Apply</source> <translation type="unfinished"/> </message> <message> <location filename="../optionsdialog.cpp" line="+55"/> <source>default</source> <translation type="unfinished"/> </message> <message> <location line="+149"/> <location line="+9"/> <source>Warning</source> <translation type="unfinished"/> </message> <message> <location line="-9"/> <location line="+9"/> <source>This setting will take effect after restarting breakout.</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The supplied proxy address is invalid.</source> <translation type="unfinished"/> </message> </context> <context> <name>OverviewPage</name> <message> <location filename="../forms/overviewpage.ui" line="+14"/> <source>Form</source> <translation>Formilarë</translation> </message> <message> <location line="+33"/> <location line="+231"/> <source>The displayed information may be out of date. Your wallet automatically synchronizes with the breakout network after a connection is established, but this process has not completed yet.</source> <translation type="unfinished"/> </message> <message> <location line="-160"/> <source>Stake:</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Unconfirmed:</source> <translation type="unfinished"/> </message> <message> <location line="-107"/> <source>Wallet</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Spendable:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current spendable balance</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>Immature:</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>Mined balance that has not yet matured</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Total:</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Your current total balance</source> <translation type="unfinished"/> </message> <message> <location line="+46"/> <source>&lt;b&gt;Recent transactions&lt;/b&gt;</source> <translation>&lt;b&gt;Transaksionet e fundit&lt;/b&gt;</translation> </message> <message> <location line="-108"/> <source>Total of transactions that have yet to be confirmed, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Total of coins that was staked, and do not yet count toward the current balance</source> <translation type="unfinished"/> </message> <message> <location filename="../overviewpage.cpp" line="+113"/> <location line="+1"/> <source>out of sync</source> <translation type="unfinished"/> </message> </context> <context> <name>QRCodeDialog</name> <message> <location filename="../forms/qrcodedialog.ui" line="+14"/> <source>QR Code Dialog</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>Request Payment</source> <translation type="unfinished"/> </message> <message> <location line="+56"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>Label:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Message:</source> <translation type="unfinished"/> </message> <message> <location line="+71"/> <source>&amp;Save As...</source> <translation type="unfinished"/> </message> <message> <location filename="../qrcodedialog.cpp" line="+62"/> <source>Error encoding URI into QR Code.</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>The entered amount is invalid, please check.</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Resulting URI too long, try to reduce the text for label / message.</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Save QR Code</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>PNG Images (*.png)</source> <translation type="unfinished"/> </message> </context> <context> <name>RPCConsole</name> <message> <location filename="../forms/rpcconsole.ui" line="+46"/> <source>Client name</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+23"/> <location line="+26"/> <location line="+23"/> <location line="+23"/> <location line="+36"/> <location line="+53"/> <location line="+23"/> <location line="+23"/> <location filename="../rpcconsole.cpp" line="+348"/> <source>N/A</source> <translation type="unfinished"/> </message> <message> <location line="-217"/> <source>Client version</source> <translation type="unfinished"/> </message> <message> <location line="-45"/> <source>&amp;Information</source> <translation type="unfinished"/> </message> <message> <location line="+68"/> <source>Using OpenSSL version</source> <translation type="unfinished"/> </message> <message> <location line="+49"/> <source>Startup time</source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>Network</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Number of connections</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>On testnet</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Block chain</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Current number of blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Estimated total blocks</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Last block time</source> <translation type="unfinished"/> </message> <message> <location line="+52"/> <source>&amp;Open</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Command-line options</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Show the breakout-Qt help message to get a list with possible breakout command-line options.</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>&amp;Show</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>&amp;Console</source> <translation type="unfinished"/> </message> <message> <location line="-260"/> <source>Build date</source> <translation type="unfinished"/> </message> <message> <location line="-104"/> <source>breakout - Debug window</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>breakout Core</source> <translation type="unfinished"/> </message> <message> <location line="+279"/> <source>Debug log file</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Open the breakout debug log file from the current data directory. This can take a few seconds for large log files.</source> <translation type="unfinished"/> </message> <message> <location line="+102"/> <source>Clear console</source> <translation type="unfinished"/> </message> <message> <location filename="../rpcconsole.cpp" line="-33"/> <source>Welcome to the breakout RPC console.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use up and down arrows to navigate history, and &lt;b&gt;Ctrl-L&lt;/b&gt; to clear screen.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Type &lt;b&gt;help&lt;/b&gt; for an overview of available commands.</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsDialog</name> <message> <location filename="../forms/sendcoinsdialog.ui" line="+14"/> <location filename="../sendcoinsdialog.cpp" line="+182"/> <location line="+5"/> <location line="+5"/> <location line="+5"/> <location line="+6"/> <location line="+5"/> <location line="+5"/> <source>Send Coins</source> <translation>Dërgo Monedha</translation> </message> <message> <location line="+76"/> <source>Coin Control Features</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Inputs...</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>automatically selected</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>Insufficient funds!</source> <translation type="unfinished"/> </message> <message> <location line="+77"/> <source>Quantity:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+35"/> <source>0</source> <translation type="unfinished"/> </message> <message> <location line="-19"/> <source>Bytes:</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Amount:</source> <translation type="unfinished"/> </message> <message> <location line="+22"/> <location line="+86"/> <location line="+86"/> <location line="+32"/> <source>0.00 hack</source> <translation type="unfinished"/> </message> <message> <location line="-191"/> <source>Priority:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>medium</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Low Output:</source> <translation type="unfinished"/> </message> <message> <location line="+19"/> <source>no</source> <translation type="unfinished"/> </message> <message> <location line="+32"/> <source>After Fee:</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>Change</source> <translation type="unfinished"/> </message> <message> <location line="+50"/> <source>custom change address</source> <translation type="unfinished"/> </message> <message> <location line="+106"/> <source>Send to multiple recipients at once</source> <translation>Dërgo marrësve të ndryshëm njëkohësisht</translation> </message> <message> <location line="+3"/> <source>Add &amp;Recipient</source> <translation type="unfinished"/> </message> <message> <location line="+20"/> <source>Remove all transaction fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Balance:</source> <translation>Balanca:</translation> </message> <message> <location line="+16"/> <source>123.456 hack</source> <translation type="unfinished"/> </message> <message> <location line="+31"/> <source>Confirm the send action</source> <translation>Konfirmo veprimin e dërgimit</translation> </message> <message> <location line="+3"/> <source>S&amp;end</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsdialog.cpp" line="-173"/> <source>Enter a breakout address (e.g. breakoutfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>Copy quantity</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy after fee</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy bytes</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy priority</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy low output</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy change</source> <translation type="unfinished"/> </message> <message> <location line="+86"/> <source>&lt;b&gt;%1&lt;/b&gt; to %2 (%3)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Confirm send coins</source> <translation>konfirmo dërgimin e monedhave</translation> </message> <message> <location line="+1"/> <source>Are you sure you want to send %1?</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source> and </source> <translation type="unfinished"/> </message> <message> <location line="+29"/> <source>The recipient address is not valid, please recheck.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The amount to pay must be larger than 0.</source> <translation>Shuma e paguar duhet të jetë më e madhe se 0.</translation> </message> <message> <location line="+5"/> <source>The amount exceeds your balance.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>The total exceeds your balance when the %1 transaction fee is included.</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Duplicate address found, can only send to each address once per send operation.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: Transaction creation failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="+251"/> <source>WARNING: Invalid breakout address</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <source>(no label)</source> <translation>(pa etiketë)</translation> </message> <message> <location line="+4"/> <source>WARNING: unknown change address</source> <translation type="unfinished"/> </message> </context> <context> <name>SendCoinsEntry</name> <message> <location filename="../forms/sendcoinsentry.ui" line="+14"/> <source>Form</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>A&amp;mount:</source> <translation>Sh&amp;uma:</translation> </message> <message> <location line="+13"/> <source>Pay &amp;To:</source> <translation>Paguaj &amp;drejt:</translation> </message> <message> <location line="+24"/> <location filename="../sendcoinsentry.cpp" line="+25"/> <source>Enter a label for this address to add it to your address book</source> <translation>Krijoni një etiketë për këtë adresë që t&apos;ja shtoni librit të adresave</translation> </message> <message> <location line="+9"/> <source>&amp;Label:</source> <translation>&amp;Etiketë:</translation> </message> <message> <location line="+18"/> <source>The address to send the payment to (e.g. breakoutfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Choose address from address book</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="+7"/> <source>Paste address from clipboard</source> <translation>Ngjit nga memorja e sistemit</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+7"/> <source>Remove this recipient</source> <translation type="unfinished"/> </message> <message> <location filename="../sendcoinsentry.cpp" line="+1"/> <source>Enter a breakout address (e.g. breakoutfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> </context> <context> <name>SignVerifyMessageDialog</name> <message> <location filename="../forms/signverifymessagedialog.ui" line="+14"/> <source>Signatures - Sign / Verify a Message</source> <translation type="unfinished"/> </message> <message> <location line="+13"/> <location line="+124"/> <source>&amp;Sign Message</source> <translation type="unfinished"/> </message> <message> <location line="-118"/> <source>You can sign messages with your addresses to prove you own them. Be careful not to sign anything vague, as phishing attacks may try to trick you into signing your identity over to them. Only sign fully-detailed statements you agree to.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>The address to sign the message with (e.g. breakoutfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+10"/> <location line="+203"/> <source>Choose an address from the address book</source> <translation type="unfinished"/> </message> <message> <location line="-193"/> <location line="+203"/> <source>Alt+A</source> <translation>Alt+A</translation> </message> <message> <location line="-193"/> <source>Paste address from clipboard</source> <translation>Ngjit nga memorja e sistemit</translation> </message> <message> <location line="+10"/> <source>Alt+P</source> <translation>Alt+P</translation> </message> <message> <location line="+12"/> <source>Enter the message you want to sign here</source> <translation type="unfinished"/> </message> <message> <location line="+24"/> <source>Copy the current signature to the system clipboard</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>Sign the message to prove you own this breakout address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all sign message fields</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <location line="+146"/> <source>Clear &amp;All</source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <location line="+70"/> <source>&amp;Verify Message</source> <translation type="unfinished"/> </message> <message> <location line="-64"/> <source>Enter the signing address, message (ensure you copy line breaks, spaces, tabs, etc. exactly) and signature below to verify the message. Be careful not to read more into the signature than what is in the signed message itself, to avoid being tricked by a man-in-the-middle attack.</source> <translation type="unfinished"/> </message> <message> <location line="+21"/> <source>The address the message was signed with (e.g. breakoutfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="+40"/> <source>Verify the message to ensure it was signed with the specified breakout address</source> <translation type="unfinished"/> </message> <message> <location line="+17"/> <source>Reset all verify message fields</source> <translation type="unfinished"/> </message> <message> <location filename="../signverifymessagedialog.cpp" line="+27"/> <location line="+3"/> <source>Enter a breakout address (e.g. breakoutfwYhBmGXcFP2Po1NpRUEiK8km2)</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Click &quot;Sign Message&quot; to generate signature</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Enter breakout signature</source> <translation type="unfinished"/> </message> <message> <location line="+82"/> <location line="+81"/> <source>The entered address is invalid.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+8"/> <location line="+73"/> <location line="+8"/> <source>Please check the address and try again.</source> <translation type="unfinished"/> </message> <message> <location line="-81"/> <location line="+81"/> <source>The entered address does not refer to a key.</source> <translation type="unfinished"/> </message> <message> <location line="-73"/> <source>Wallet unlock was cancelled.</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Private key for the entered address is not available.</source> <translation type="unfinished"/> </message> <message> <location line="+12"/> <source>Message signing failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message signed.</source> <translation type="unfinished"/> </message> <message> <location line="+59"/> <source>The signature could not be decoded.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <location line="+13"/> <source>Please check the signature and try again.</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>The signature did not match the message digest.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Message verification failed.</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Message verified.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionDesc</name> <message> <location filename="../transactiondesc.cpp" line="+19"/> <source>Open until %1</source> <translation>Hapur deri më %1</translation> </message> <message numerus="yes"> <location line="-2"/> <source>Open for %n block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+8"/> <source>conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/offline</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>%1/unconfirmed</source> <translation>%1/I pakonfirmuar</translation> </message> <message> <location line="+2"/> <source>%1 confirmations</source> <translation>%1 konfirmimet</translation> </message> <message> <location line="+18"/> <source>Status</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="+7"/> <source>, broadcast through %n node(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+4"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+7"/> <source>Source</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Generated</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <location line="+17"/> <source>From</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <location line="+22"/> <location line="+58"/> <source>To</source> <translation type="unfinished"/> </message> <message> <location line="-77"/> <location line="+2"/> <source>own address</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>label</source> <translation type="unfinished"/> </message> <message> <location line="+37"/> <location line="+12"/> <location line="+45"/> <location line="+17"/> <location line="+30"/> <source>Credit</source> <translation type="unfinished"/> </message> <message numerus="yes"> <location line="-102"/> <source>matures in %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+2"/> <source>not accepted</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <location line="+8"/> <location line="+15"/> <location line="+30"/> <source>Debit</source> <translation type="unfinished"/> </message> <message> <location line="-39"/> <source>Transaction fee</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Net amount</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Message</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Comment</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Generated coins must mature 510 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to &quot;not accepted&quot; and it won&apos;t be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Debug information</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Transaction</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Inputs</source> <translation type="unfinished"/> </message> <message> <location line="+23"/> <source>Amount</source> <translation>Sasia</translation> </message> <message> <location line="+1"/> <source>true</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>false</source> <translation type="unfinished"/> </message> <message> <location line="-211"/> <source>, has not been successfully broadcast yet</source> <translation>, nuk është transmetuar me sukses deri tani</translation> </message> <message> <location line="+35"/> <source>unknown</source> <translation>i/e panjohur</translation> </message> </context> <context> <name>TransactionDescDialog</name> <message> <location filename="../forms/transactiondescdialog.ui" line="+14"/> <source>Transaction details</source> <translation>Detajet e transaksionit</translation> </message> <message> <location line="+6"/> <source>This pane shows a detailed description of the transaction</source> <translation>Ky panel tregon një përshkrim të detajuar të transaksionit</translation> </message> </context> <context> <name>TransactionTableModel</name> <message> <location filename="../transactiontablemodel.cpp" line="+226"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+0"/> <source>Type</source> <translation>Lloji</translation> </message> <message> <location line="+0"/> <source>Address</source> <translation>Adresë</translation> </message> <message> <location line="+0"/> <source>Amount</source> <translation>Sasia</translation> </message> <message> <location line="+60"/> <source>Open until %1</source> <translation>Hapur deri më %1</translation> </message> <message> <location line="+12"/> <source>Confirmed (%1 confirmations)</source> <translation>I/E konfirmuar(%1 konfirmime)</translation> </message> <message numerus="yes"> <location line="-15"/> <source>Open for %n more block(s)</source> <translation type="unfinished"><numerusform></numerusform><numerusform></numerusform></translation> </message> <message> <location line="+6"/> <source>Offline</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Unconfirmed</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Confirming (%1 of %2 recommended confirmations)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Conflicted</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Immature (%1 confirmations, will be available after %2)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>This block was not received by any other nodes and will probably not be accepted!</source> <translation>Ky bllok është marrë nga ndonjë nyje dhe ka shumë mundësi të mos pranohet! </translation> </message> <message> <location line="+3"/> <source>Generated but not accepted</source> <translation>I krijuar por i papranuar</translation> </message> <message> <location line="+42"/> <source>Received with</source> <translation>Marrë me</translation> </message> <message> <location line="+2"/> <source>Received from</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Sent to</source> <translation>Dërguar drejt</translation> </message> <message> <location line="+2"/> <source>Payment to yourself</source> <translation>Pagesë ndaj vetvetes</translation> </message> <message> <location line="+2"/> <source>Mined</source> <translation>Minuar</translation> </message> <message> <location line="+38"/> <source>(n/a)</source> <translation>(p/a)</translation> </message> <message> <location line="+190"/> <source>Transaction status. Hover over this field to show number of confirmations.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Date and time that the transaction was received.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Type of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Destination address of transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Amount removed from or added to balance.</source> <translation type="unfinished"/> </message> </context> <context> <name>TransactionView</name> <message> <location filename="../transactionview.cpp" line="+55"/> <location line="+16"/> <source>All</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Today</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This week</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Last month</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>This year</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Range...</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Received with</source> <translation>Marrë me</translation> </message> <message> <location line="+2"/> <source>Sent to</source> <translation>Dërguar drejt</translation> </message> <message> <location line="+2"/> <source>To yourself</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Mined</source> <translation>Minuar</translation> </message> <message> <location line="+1"/> <source>Other</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Enter address or label to search</source> <translation type="unfinished"/> </message> <message> <location line="+7"/> <source>Min amount</source> <translation type="unfinished"/> </message> <message> <location line="+34"/> <source>Copy address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Copy transaction ID</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Edit label</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Show transaction details</source> <translation type="unfinished"/> </message> <message> <location line="+144"/> <source>Export Transaction Data</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Comma separated file (*.csv)</source> <translation>Skedar i ndarë me pikëpresje(*.csv)</translation> </message> <message> <location line="+8"/> <source>Confirmed</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Date</source> <translation>Data</translation> </message> <message> <location line="+1"/> <source>Type</source> <translation>Lloji</translation> </message> <message> <location line="+1"/> <source>Label</source> <translation>Etiketë</translation> </message> <message> <location line="+1"/> <source>Address</source> <translation>Adresë</translation> </message> <message> <location line="+1"/> <source>Amount</source> <translation>Sasia</translation> </message> <message> <location line="+1"/> <source>ID</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error exporting</source> <translation type="unfinished"/> </message> <message> <location line="+0"/> <source>Could not write to file %1.</source> <translation type="unfinished"/> </message> <message> <location line="+100"/> <source>Range:</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>to</source> <translation type="unfinished"/> </message> </context> <context> <name>WalletModel</name> <message> <location filename="../walletmodel.cpp" line="+206"/> <source>Sending...</source> <translation type="unfinished"/> </message> </context> <context> <name>bitcoin-core</name> <message> <location filename="../bitcoinstrings.cpp" line="+33"/> <source>breakout version</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Usage:</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send command to -server or breakoutd</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>List commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Get help for a command</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Options:</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify configuration file (default: breakout.conf)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify pid file (default: breakoutd.pid)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Specify wallet file (within data directory)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Specify data directory</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Set database cache size in megabytes (default: 25)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set database disk log size in megabytes (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>Listen for connections on &lt;port&gt; (default: 15714 or testnet: 25714)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maintain at most &lt;n&gt; connections to peers (default: 125)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Connect to a node to retrieve peer addresses, and disconnect</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Specify your own public address</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Bind to given address. Use [host]:port notation for IPv6</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Stake your coins to support network and gain reward (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Threshold for disconnecting misbehaving peers (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source> <translation type="unfinished"/> </message> <message> <location line="-44"/> <source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Detach block and address databases. Increases shutdown time (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source> <translation type="unfinished"/> </message> <message> <location line="-87"/> <source>Listen for JSON-RPC connections on &lt;port&gt; (default: 15715 or testnet: 25715)</source> <translation type="unfinished"/> </message> <message> <location line="-11"/> <source>Accept command line and JSON-RPC commands</source> <translation type="unfinished"/> </message> <message> <location line="+101"/> <source>Error: Transaction creation failed </source> <translation type="unfinished"/> </message> <message> <location line="-5"/> <source>Error: Wallet locked, unable to create transaction </source> <translation type="unfinished"/> </message> <message> <location line="-8"/> <source>Importing blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Importing bootstrap blockchain data file.</source> <translation type="unfinished"/> </message> <message> <location line="-88"/> <source>Run in the background as a daemon and accept commands</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Use the test network</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Accept connections from outside (default: 1 if no -proxy or -connect)</source> <translation type="unfinished"/> </message> <message> <location line="-38"/> <source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source> <translation type="unfinished"/> </message> <message> <location line="+117"/> <source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source> <translation type="unfinished"/> </message> <message> <location line="-20"/> <source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+61"/> <source>Warning: Please check that your computer&apos;s date and time are correct! If your clock is wrong breakout will not work properly.</source> <translation type="unfinished"/> </message> <message> <location line="-31"/> <source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source> <translation type="unfinished"/> </message> <message> <location line="-18"/> <source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source> <translation type="unfinished"/> </message> <message> <location line="-30"/> <source>Attempt to recover private keys from a corrupt wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Block creation options:</source> <translation type="unfinished"/> </message> <message> <location line="-62"/> <source>Connect only to the specified node(s)</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Discover own IP address (default: 1 when listening and no -externalip)</source> <translation type="unfinished"/> </message> <message> <location line="+94"/> <source>Failed to listen on any port. Use -listen=0 if you want this.</source> <translation type="unfinished"/> </message> <message> <location line="-90"/> <source>Find peers using DNS lookup (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync checkpoints policy (default: strict)</source> <translation type="unfinished"/> </message> <message> <location line="+83"/> <source>Invalid -tor address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Invalid amount for -reservebalance=&lt;amount&gt;</source> <translation type="unfinished"/> </message> <message> <location line="-82"/> <source>Maximum per-connection receive buffer, &lt;n&gt;*1000 bytes (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Maximum per-connection send buffer, &lt;n&gt;*1000 bytes (default: 1000)</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Only connect to nodes in network &lt;net&gt; (IPv4, IPv6 or Tor)</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Output extra debugging information. Implies all other -debug* options</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Output extra network debugging information</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Prepend debug output with timestamp</source> <translation type="unfinished"/> </message> <message> <location line="+35"/> <source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source> <translation type="unfinished"/> </message> <message> <location line="-74"/> <source>Select the version of socks proxy to use (4-5, default: 5)</source> <translation type="unfinished"/> </message> <message> <location line="+41"/> <source>Send trace/debug info to console instead of debug.log file</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send trace/debug info to debugger</source> <translation type="unfinished"/> </message> <message> <location line="+28"/> <source>Set maximum block size in bytes (default: 250000)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Set minimum block size in bytes (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="-29"/> <source>Shrink debug.log file on client startup (default: 1 when no -debug)</source> <translation type="unfinished"/> </message> <message> <location line="-42"/> <source>Specify connection timeout in milliseconds (default: 5000)</source> <translation type="unfinished"/> </message> <message> <location line="+109"/> <source>Unable to sign checkpoint, wrong checkpointkey? </source> <translation type="unfinished"/> </message> <message> <location line="-80"/> <source>Use UPnP to map the listening port (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Use UPnP to map the listening port (default: 1 when listening)</source> <translation type="unfinished"/> </message> <message> <location line="-25"/> <source>Use proxy to reach tor hidden services (default: same as -proxy)</source> <translation type="unfinished"/> </message> <message> <location line="+42"/> <source>Username for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+47"/> <source>Verifying database integrity...</source> <translation type="unfinished"/> </message> <message> <location line="+57"/> <source>WARNING: syncronized checkpoint violation detected, but skipped!</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Warning: Disk space is low!</source> <translation type="unfinished"/> </message> <message> <location line="-2"/> <source>Warning: This version is obsolete, upgrade required!</source> <translation type="unfinished"/> </message> <message> <location line="-48"/> <source>wallet.dat corrupt, salvage failed</source> <translation type="unfinished"/> </message> <message> <location line="-54"/> <source>Password for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="-84"/> <source>%s, you must set a rpcpassword in the configuration file: %s It is recommended you use the following random password: rpcuser=breakoutrpc rpcpassword=%s (you do not need to remember this password) The username and password MUST NOT be the same. If the file does not exist, create it with owner-readable-only file permissions. It is also recommended to set alertnotify so you are notified of problems; for example: alertnotify=echo %%s | mail -s &quot;breakout Alert&quot; admin@foo.com </source> <translation type="unfinished"/> </message> <message> <location line="+51"/> <source>Find peers using internet relay chat (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+15"/> <source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source> <translation type="unfinished"/> </message> <message> <location line="+16"/> <source>Allow JSON-RPC connections from specified IP address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Send commands to node running on &lt;ip&gt; (default: 127.0.0.1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Require a confirmations for change (default: 0)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Upgrade wallet to latest format</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Set key pool size to &lt;n&gt; (default: 100)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescan the block chain for missing wallet transactions</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>How many blocks to check at startup (default: 2500, 0 = all)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>How thorough the block verification is (0-6, default: 1)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Imports blocks from external blk000?.dat file</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Use OpenSSL (https) for JSON-RPC connections</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server certificate file (default: server.cert)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Server private key (default: server.pem)</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source> <translation type="unfinished"/> </message> <message> <location line="+53"/> <source>Error: Wallet unlocked for staking only, unable to create transaction.</source> <translation type="unfinished"/> </message> <message> <location line="+18"/> <source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source> <translation type="unfinished"/> </message> <message> <location line="-158"/> <source>This help message</source> <translation type="unfinished"/> </message> <message> <location line="+95"/> <source>Wallet %s resides outside data directory %s.</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot obtain a lock on data directory %s. breakout is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-98"/> <source>breakout</source> <translation type="unfinished"/> </message> <message> <location line="+140"/> <source>Unable to bind to %s on this computer (bind returned error %d, %s)</source> <translation type="unfinished"/> </message> <message> <location line="-130"/> <source>Connect through socks proxy</source> <translation type="unfinished"/> </message> <message> <location line="+3"/> <source>Allow DNS lookups for -addnode, -seednode and -connect</source> <translation type="unfinished"/> </message> <message> <location line="+122"/> <source>Loading addresses...</source> <translation type="unfinished"/> </message> <message> <location line="-15"/> <source>Error loading blkindex.dat</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Error loading wallet.dat: Wallet corrupted</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Error loading wallet.dat: Wallet requires newer version of breakout</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Wallet needed to be rewritten: restart breakout to complete</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Error loading wallet.dat</source> <translation type="unfinished"/> </message> <message> <location line="-16"/> <source>Invalid -proxy address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown network specified in -onlynet: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-1"/> <source>Unknown -socks proxy version requested: %i</source> <translation type="unfinished"/> </message> <message> <location line="+4"/> <source>Cannot resolve -bind address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+2"/> <source>Cannot resolve -externalip address: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="-24"/> <source>Invalid amount for -paytxfee=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+44"/> <source>Error: could not start node</source> <translation type="unfinished"/> </message> <message> <location line="+11"/> <source>Sending...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Invalid amount</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Insufficient funds</source> <translation type="unfinished"/> </message> <message> <location line="-34"/> <source>Loading block index...</source> <translation type="unfinished"/> </message> <message> <location line="-103"/> <source>Add a node to connect to and attempt to keep the connection open</source> <translation type="unfinished"/> </message> <message> <location line="+122"/> <source>Unable to bind to %s on this computer. breakout is probably already running.</source> <translation type="unfinished"/> </message> <message> <location line="-97"/> <source>Fee per KB to add to transactions you send</source> <translation type="unfinished"/> </message> <message> <location line="+55"/> <source>Invalid amount for -mininput=&lt;amount&gt;: &apos;%s&apos;</source> <translation type="unfinished"/> </message> <message> <location line="+25"/> <source>Loading wallet...</source> <translation type="unfinished"/> </message> <message> <location line="+8"/> <source>Cannot downgrade wallet</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot initialize keypool</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Cannot write default address</source> <translation type="unfinished"/> </message> <message> <location line="+1"/> <source>Rescanning...</source> <translation type="unfinished"/> </message> <message> <location line="+5"/> <source>Done loading</source> <translation type="unfinished"/> </message> <message> <location line="-167"/> <source>To use the %s option</source> <translation type="unfinished"/> </message> <message> <location line="+14"/> <source>Error</source> <translation type="unfinished"/> </message> <message> <location line="+6"/> <source>You must set rpcpassword=&lt;password&gt; in the configuration file: %s If the file does not exist, create it with owner-readable-only file permissions.</source> <translation type="unfinished"/> </message> </context> </TS>
BreakoutCoin/Breakout-Chain-Client
src/qt/locale/bitcoin_sq.ts
TypeScript
mit
109,980
export const MAIN = { APP: { BRAND: 'My Job Glasses' } };
vibesharing/MJG-Angular2
src/app/shared/constant/main.ts
TypeScript
mit
74
/***************************************************************************************************************************************** Author: Michael Shoots Email: michael.shoots@live.com Project: Open Space 4x License: MIT License Notes: ******************************************************************************************************************************************/ using UnityEngine; using System.Collections.Generic; public class EmpireScrollList : ScrollListBase { List<EmpireListEntry> EmpireEntries = new List<EmpireListEntry>(); EmpireListEntry.ButtonPress LoadEmpireDefinition; public EmpireScrollList(Rect rect, EmpireListEntry.ButtonPress loadEmpireDefinition) { ScrollWindowRect = rect; LoadEmpireDefinition = loadEmpireDefinition; ScrollViewRect = new Rect(0, 0, ScrollWindowRect.width * 0.9f, ScrollWindowRect.height * 5f); ListEntrySize = new Vector2(ScrollViewRect.width, ScrollWindowRect.height * 0.125f); RebuildList(); } public void Draw() { GUI.Box(ScrollWindowRect, ""); ScrollPosition = GUI.BeginScrollView(ScrollWindowRect, ScrollPosition, ScrollViewRect); foreach (EmpireListEntry entry in EmpireEntries) { entry.Draw(SelectionIndex); } GUI.EndScrollView(); } public void AddEmpireListEntry(EmpireDefinition empire) { Rect rect = new Rect(new Vector2(0, EmpireEntries.Count * ListEntrySize.y), ListEntrySize); EmpireEntries.Add(new EmpireListEntry(rect, EmpireEntries.Count, empire, ChangeSelectionIndex, LoadEmpireDefinition)); } public void RebuildList() { EmpireEntries.Clear(); //foreach (KeyValuePair<string, EmpireDefinition> entry in ResourceManager.Empires) //{ //AddEmpireListEntry(entry.Value); //} ScrollViewRect.height = Mathf.Max(EmpireEntries.Count * ListEntrySize.y, ScrollWindowRect.height * 1.05f); } public void LoadFirstEmpire() { if (EmpireEntries.Count > 0) { LoadEmpireDefinition(EmpireEntries[0].GetDefinition()); } } }
McShooterz/OpenSpace4x
Assets/Scripts/Screens/ScreenComponents/EmpireScrollList.cs
C#
mit
2,178
import React, { Component } from "react"; import formatter from "../formatter"; const labelStyle = { fg: "magenta", bold: true }; class RequestBreakdown extends Component { scroll(amount) { // nope } render() { const { respTime, sqlTime, renderingTime } = this.props.data; return ( <box top={0} height="100%-2" left={0} width="100%-2"> <box top={1} height={1} left={0} width={19} content=" Response Time : " style={labelStyle} /> <box top={1} height={1} left={19} width="100%-19" content={formatter.ms(respTime)} /> <box top={2} height={1} left={0} width={29} content=" ===========================" /> <box top={3} height={1} left={0} width={19} content=" SQL Time : " style={labelStyle} /> <box top={3} height={1} left={19} width="100%-19" content={formatter.ms(sqlTime)} /> <box top={4} height={1} left={0} width={19} content=" Rendering Time : " style={labelStyle} /> <box top={4} height={1} left={19} width="100%-19" content={formatter.ms(renderingTime)} /> <box top={5} height={1} left={0} width={19} content=" Others : " style={labelStyle} /> <box top={5} height={1} left={19} width="100%-19" content={formatter.ms(respTime - sqlTime - renderingTime)} /> </box> ); } } export default RequestBreakdown;
y-takey/rails-dashboard
src/components/RequestBreakdown.js
JavaScript
mit
1,341
const DrawCard = require('../../drawcard.js'); const { CardTypes } = require('../../Constants'); class AsakoTsuki extends DrawCard { setupCardAbilities(ability) { this.reaction({ title: 'Honor a scholar character', when: { onClaimRing: event => event.conflict && event.conflict.hasElement('water') }, target: { cardType: CardTypes.Character, cardCondition: card => card.hasTrait('scholar'), gameAction: ability.actions.honor() } }); } } AsakoTsuki.id = 'asako-tsuki'; module.exports = AsakoTsuki;
jeremylarner/ringteki
server/game/cards/02.6-MotE/AsakoTsuki.js
JavaScript
mit
648
<?php /** * Recent Changes Block * * This block will print a list of recent changes * * phpGedView: Genealogy Viewer * Copyright (C) 2002 to 2009 PGV Development Team. All rights reserved. * * 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 * * @package PhpGedView * @subpackage Blocks * @version $Id: recent_changes.php 6578 2009-12-20 09:51:08Z volschin $ */ if (!defined('PGV_PHPGEDVIEW')) { header('HTTP/1.0 403 Forbidden'); exit; } define('PGV_RECENT_CHANGES_PHP', ''); $PGV_BLOCKS["print_recent_changes"]["name"] = $pgv_lang["recent_changes_block"]; $PGV_BLOCKS["print_recent_changes"]["descr"] = "recent_changes_descr"; $PGV_BLOCKS["print_recent_changes"]["canconfig"]= true; $PGV_BLOCKS["print_recent_changes"]["config"] = array( "cache"=>1, "days"=>30, "hide_empty"=>"no" ); //-- Recent Changes block //-- this block prints a list of changes that have occurred recently in your gedcom function print_recent_changes($block=true, $config="", $side, $index) { global $pgv_lang, $ctype; global $PGV_IMAGE_DIR, $PGV_IMAGES, $PGV_BLOCKS; $block = true; // Always restrict this block's height if (empty($config)) $config = $PGV_BLOCKS["print_recent_changes"]["config"]; if ($config["days"]<1) $config["days"] = 30; if (isset($config["hide_empty"])) $HideEmpty = $config["hide_empty"]; else $HideEmpty = "no"; $found_facts=get_recent_changes(client_jd()-$config['days']); // Start output if (count($found_facts)==0 and $HideEmpty=="yes") return false; // Print block header $id="recent_changes"; $title = print_help_link("recent_changes_help", "qm","",false,true); if ($PGV_BLOCKS["print_recent_changes"]["canconfig"]) { if ($ctype=="gedcom" && PGV_USER_GEDCOM_ADMIN || $ctype=="user" && PGV_USER_ID) { if ($ctype=="gedcom") { $name = PGV_GEDCOM; } else { $name = PGV_USER_NAME; } $title .= "<a href=\"javascript: configure block\" onclick=\"window.open('".encode_url("index_edit.php?name={$name}&ctype={$ctype}&action=configure&side={$side}&index={$index}")."', '_blank', 'top=50,left=50,width=600,height=350,scrollbars=1,resizable=1'); return false;\">"; $title .= "<img class=\"adminicon\" src=\"$PGV_IMAGE_DIR/".$PGV_IMAGES["admin"]["small"]."\" width=\"15\" height=\"15\" border=\"0\" alt=\"".$pgv_lang["config_block"]."\" /></a>"; } } $title .= $pgv_lang["recent_changes"]; $content = ""; // Print block content $pgv_lang["global_num1"] = $config["days"]; // Make this visible if (count($found_facts)==0) { $content .= print_text("recent_changes_none",0,1); } else { $content .= print_text("recent_changes_some",0,1); // sortable table require_once PGV_ROOT.'includes/functions/functions_print_lists.php'; ob_start(); print_changes_table($found_facts); $content .= ob_get_clean(); } global $THEME_DIR; if ($block) { require $THEME_DIR.'templates/block_small_temp.php'; } else { require $THEME_DIR.'templates/block_main_temp.php'; } } function print_recent_changes_config($config) { global $pgv_lang, $ctype, $PGV_BLOCKS; if (empty($config)) $config = $PGV_BLOCKS["print_recent_changes"]["config"]; if (!isset($config["cache"])) $config["cache"] = $PGV_BLOCKS["print_recent_changes"]["config"]["cache"]; print "<tr><td class=\"descriptionbox wrap width33\">".$pgv_lang["days_to_show"]."</td>";?> <td class="optionbox"> <input type="text" name="days" size="2" value="<?php print $config["days"]; ?>" /> </td></tr> <?php print "<tr><td class=\"descriptionbox wrap width33\">".$pgv_lang["show_empty_block"]."</td>";?> <td class="optionbox"> <select name="hide_empty"> <option value="no"<?php if ($config["hide_empty"]=="no") print " selected=\"selected\"";?>><?php print $pgv_lang["no"]; ?></option> <option value="yes"<?php if ($config["hide_empty"]=="yes") print " selected=\"selected\"";?>><?php print $pgv_lang["yes"]; ?></option> </select> </td></tr> <tr><td colspan="2" class="optionbox wrap"> <span class="error"><?php print $pgv_lang["hide_block_warn"]; ?></span> </td></tr> <?php // Cache file life if ($ctype=="gedcom") { print "<tr><td class=\"descriptionbox wrap width33\">"; print_help_link("cache_life_help", "qm"); print $pgv_lang["cache_life"]; print "</td><td class=\"optionbox\">"; print "<input type=\"text\" name=\"cache\" size=\"2\" value=\"".$config["cache"]."\" />"; print "</td></tr>"; } } ?>
fweber1/Annies-Ancestors
PhpGedView/blocks/recent_changes.php
PHP
mit
5,171
import pytest from everest.repositories.rdb.testing import check_attributes from everest.repositories.rdb.testing import persist from thelma.tests.entity.conftest import TestEntityBase class TestExperimentEntity(TestEntityBase): def test_init(self, experiment_fac): exp = experiment_fac() check_attributes(exp, experiment_fac.init_kw) assert len(exp.experiment_racks) == 0 @pytest.mark.parametrize('kw1,kw2,result', [(dict(id=-1), dict(id=-1), True), (dict(id=-1), dict(id=-2), False)]) def test_equality(self, experiment_fac, experiment_design_fac, plate_fac, kw1, kw2, result): ed1 = experiment_design_fac(**kw1) ed2 = experiment_design_fac(**kw2) rack1 = plate_fac(**kw1) rack2 = plate_fac(**kw2) exp1 = experiment_fac(experiment_design=ed1, source_rack=rack1) exp2 = experiment_fac(experiment_design=ed2, source_rack=rack2) exp3 = experiment_fac(experiment_design=ed2, source_rack=rack1) exp4 = experiment_fac(experiment_design=ed1, source_rack=rack2) assert (exp1 == exp2) is result assert (exp1 == exp3) is result assert (exp1 == exp4) is result def test_persist(self, nested_session, experiment_fac, experiment_job_fac): exp = experiment_fac() # FIXME: Working around the circular dependency of experiment and # experiment job here. exp_job = experiment_job_fac(experiments=[exp]) kw = experiment_fac.init_kw kw['job'] = exp.job exp.job = exp_job persist(nested_session, exp, kw, True) class TestExperimentRackEntity(TestEntityBase): def test_init(self, experiment_rack_fac): exp_r = experiment_rack_fac() check_attributes(exp_r, experiment_rack_fac.init_kw) class TestExperimentDesignEntity(TestEntityBase): def test_init(self, experiment_design_fac): exp_dsgn = experiment_design_fac() check_attributes(exp_dsgn, experiment_design_fac.init_kw) def test_persist(self, nested_session, experiment_design_fac): exp_design = experiment_design_fac() persist(nested_session, exp_design, experiment_design_fac.init_kw, True) class TestExperimentDesignRackEntity(TestEntityBase): def test_init(self, experiment_design_rack_fac): exp_dr = experiment_design_rack_fac() check_attributes(exp_dr, experiment_design_rack_fac.init_kw) class TestExperimentMetadataEntity(TestEntityBase): def test_init(self, experiment_metadata_fac): em = experiment_metadata_fac() check_attributes(em, experiment_metadata_fac.init_kw) @pytest.mark.parametrize('kw1,kw2,result', [(dict(label='em1'), dict(label='em1'), True), (dict(label='em1'), dict(label='em2'), False)]) def test_equality(self, subproject_fac, experiment_metadata_fac, kw1, kw2, result): sp1 = subproject_fac(**kw1) sp2 = subproject_fac(**kw2) em1 = experiment_metadata_fac(subproject=sp1, **kw1) em2 = experiment_metadata_fac(subproject=sp2, **kw2) assert (em1 == em2) is result def test_persist(self, nested_session, experiment_metadata_fac): exp_metadata = experiment_metadata_fac() persist(nested_session, exp_metadata, experiment_metadata_fac.init_kw, True)
helixyte/TheLMA
thelma/tests/entity/test_experiment.py
Python
mit
3,511
using System; using Microsoft.AspNetCore.Builder; using Microsoft.Extensions.Logging; using Microsoft.Extensions.DependencyInjection; using PhoenixDiary.Utilities.AspNetCore.Middleware.EnableRequestRewind; using PhoenixDiary.Utilities.AspNetCore.Middleware.EnableResponseReading; namespace PhoenixDiary.Utilities.AspNetCore.Middleware.RequestResponseLogger { public static class RequestResponseLoggerExtensions { /// <summary> /// Adds a middleware to the pipeline which allows request body rewind. /// </summary> /// <param name="app"></param> /// <param name="options">Logger options. Pass null to use defaults</param> /// <returns></returns> public static IApplicationBuilder UseRequestResponseLogger(this IApplicationBuilder app, [CanBeNull] RequestResponseLoggerOptions options = null) { if (app == null) throw new ArgumentNullException(nameof(app)); if (options == null) { options = new RequestResponseLoggerOptions() { Filter = new RequestWebApiFilter(), Printer = new RequestResponseLoggerPrinter(app.ApplicationServices.GetRequiredService<ILogger<RequestResponseLoggerPrinter>>()) }; } // Add middleware to allow response / request reading app.UseEnableRequestRewind(); app.UseEnableResponseReading(); return app.UseMiddleware<RequestResponseLoggerMiddleware>(options); } } }
vphoenix1972/PhoenixDiary
src/PhoenixDiary.Utilities.AspNetCore/Middleware/RequestResponseLogger/RequestResponseLoggerExtensions.cs
C#
mit
1,575
import java.util.*; public class ejemplo2 { public static void main(String[] args) { Scanner reader = new Scanner(System.in); int n1; int n2; int suma; System.out.print("Ingrese el 1er numero: "); n1 = reader.nextInt(); System.out.print("Ingrese el 2do numero: "); n2 = reader.nextInt(); suma = n1 + n2; System.out.println("suma de " + n1 + " y " + n2 + " es " + suma); System.exit(0); } }
sancas/JAVA-UDB
Practica 1/ejemplo2.java
Java
mit
418
const baseStyle = { opacity: 0.6, borderColor: "inherit", } const variantSolid = { borderStyle: "solid", } const variantDashed = { borderStyle: "dashed", } const variants = { solid: variantSolid, dashed: variantDashed, } const defaultProps = { variant: "solid", } export default { baseStyle, variants, defaultProps, }
UgnisSoftware/ugnis
src/theme/src/components/divider.ts
TypeScript
mit
343
import DndStatus from 'ringcentral-integration/modules/Presence/dndStatus'; import i18n from './i18n'; export function getPresenceStatusName( presenceStatus, dndStatus, currentLocale, ) { if (dndStatus === DndStatus.doNotAcceptAnyCalls) { return i18n.getString(dndStatus, currentLocale); } return i18n.getString(presenceStatus, currentLocale); }
ringcentral/ringcentral-js-widget
packages/ringcentral-widgets/lib/getPresenceStatusName/index.js
JavaScript
mit
363
package com.yet.spring.core.loggers; import java.util.ArrayList; import java.util.List; import com.yet.spring.core.beans.Event; public class CacheFileEventLogger extends FileEventLogger { private int cacheSize; private List<Event> cache; public CacheFileEventLogger(String filename, int cacheSize) { super(filename); this.cacheSize = cacheSize; this.cache = new ArrayList<Event>(cacheSize); } public void destroy() { if ( ! cache.isEmpty()) { writeEventsFromCache(); } } @Override public void logEvent(Event event) { cache.add(event); if (cache.size() == cacheSize) { writeEventsFromCache(); cache.clear(); } } private void writeEventsFromCache() { cache.stream().forEach(super::logEvent); } }
yuriytkach/spring-basics-course-project
src/main/java/com/yet/spring/core/loggers/CacheFileEventLogger.java
Java
mit
748
package main import ( "flag" "github.com/katherinealbany/rodentia/logger" "os" "os/exec" ) var ( log = logger.New("main") dir string repo string build string stable string release string force string push string ) func init() { flag.StringVar(&dir, "dir", ".", "build directory") flag.StringVar(&repo, "repo", "katherinealbany", "docker registry repository") flag.StringVar(&build, "build", "latest", "build tag") flag.StringVar(&stable, "stable", "stable", "stable build tag") flag.StringVar(&release, "release", "v1.0.0", "release version") flag.StringVar(&force, "force", "false", "force the matter!") flag.StringVar(&push, "push", "true", "push after build") } func main() { log.Info("Parsing...") flag.Parse() log.Debug("dir =", dir) log.Debug("repo =", repo) log.Debug("build =", build) log.Debug("stable =", stable) log.Debug("release =", release) log.Debug("force =", force) log.Debug("push =", push) cmd := exec.Command("docker", "version") cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr log.Debug("Starting...") if err := cmd.Start(); err != nil { log.Fatal(err) } log.Info("Running...") if err := cmd.Wait(); err != nil { log.Fatal(err) } }
katherinealbany/janus
main.go
GO
mit
1,230
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("DataAccess")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("DataAccess")] [assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("9d0058e6-5dc0-4cdb-8d08-d691885d537f")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")]
alipha/FFRK
Stats/DataAccess/Properties/AssemblyInfo.cs
C#
mit
1,396
/** * This software is released as part of the Pumpernickel project. * * All com.pump resources in the Pumpernickel project are distributed under the * MIT License: * https://raw.githubusercontent.com/mickleness/pumpernickel/master/License.txt * * More information about the Pumpernickel project is available here: * https://mickleness.github.io/pumpernickel/ */ package com.pump.plaf; import java.awt.Color; import java.awt.Dimension; import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; import javax.swing.JComponent; /** * A <code>ThrobberUI</code> showing 3 circles pulsing outward that also move in * a clockwise rotation. * <p> * <table summary="Sample Animations of PulsingCirclesThrobberUI" cellpadding="10"> * <tr> * <td><img src= * "https://raw.githubusercontent.com/mickleness/pumpernickel/master/resources/throbber/PulsingCirclesThrobberUI.gif" * alt="PulsingCirclesThrobberUI"></td> * <td><img src= * "https://raw.githubusercontent.com/mickleness/pumpernickel/master/resources/throbber/PulsingCirclesThrobberUIx2.gif" * alt="PulsingCirclesThrobberUI, Magnified 2x"></td> * <td><img src= * "https://raw.githubusercontent.com/mickleness/pumpernickel/master/resources/throbber/PulsingCirclesThrobberUIx4.gif" * alt="PulsingCirclesThrobberUI, Magnified 4x"></td> * </tr> * </table> * <p> * On installation: the component's foreground is set to dark gray, but if that * is changed then that color is used to render this animation. * <P> * The default period for this animation is 750, but you can modify this with * the period client properties {@link ThrobberUI#PERIOD_KEY} or * {@link ThrobberUI#PERIOD_MULTIPLIER_KEY}. * */ public class PulsingCirclesThrobberUI extends ThrobberUI { /** * The default duration (in ms) it takes to complete a cycle. */ public static final int DEFAULT_PERIOD = 750; public PulsingCirclesThrobberUI() { super(1000 / 24); } @Override protected synchronized void paintForeground(Graphics2D g, JComponent jc, Dimension size, Float fixedFraction) { float f; if (fixedFraction != null) { f = fixedFraction; } else { int p = getPeriod(jc, DEFAULT_PERIOD); float t = System.currentTimeMillis() % p; f = t / p; } boolean spiral = false; double maxDotSize = spiral ? 2 : 2.2; Color color = jc == null ? getDefaultForeground() : jc.getForeground(); g.setColor(color); for (int a = 0; a < 8; a++) { double z = a / 8.0; double r = spiral ? 6 * ((z - f + 1) % 1) : 6; double x = size.width / 2 + r * Math.cos(Math.PI * 2 * z); double y = size.width / 2 + r * Math.sin(Math.PI * 2 * z); double k = maxDotSize * ((z - f + 1) % 1); Ellipse2D dot = new Ellipse2D.Double(x - k, y - k, 2 * k, 2 * k); g.fill(dot); } } @Override public Dimension getPreferredSize() { return new Dimension(16, 16); } @Override public Color getDefaultForeground() { return Color.darkGray; } }
mickleness/pumpernickel
src/main/java/com/pump/plaf/PulsingCirclesThrobberUI.java
Java
mit
2,926
package util; import java.util.Timer; /** * Created by asusss on 11.12.2015. */ public interface TimerListener { public void onTimeOut(); public void onTick (int elapsedTime); }
oguzbilgener/cs319-project
src/main/java/util/TimerListener.java
Java
mit
193
package foodtruck.geolocation; import java.lang.annotation.Retention; import java.lang.annotation.Target; import com.google.inject.BindingAnnotation; import static java.lang.annotation.ElementType.FIELD; import static java.lang.annotation.ElementType.METHOD; import static java.lang.annotation.ElementType.PARAMETER; import static java.lang.annotation.RetentionPolicy.RUNTIME; /** * @author aviolette * @since 5/19/16 */ @BindingAnnotation @Target({FIELD, PARAMETER, METHOD}) @Retention(RUNTIME) @interface GoogleServerApiKey { }
aviolette/foodtrucklocator
main/src/main/java/foodtruck/geolocation/GoogleServerApiKey.java
Java
mit
537
""" virtstrap.log ------------- Provides a central logging facility. It is used to record log info and report both to a log file and stdout """ import sys import logging import traceback CLINT_AVAILABLE = True try: from clint.textui import puts, colored except: # Clint is still not stable enough yet to just import with so much # trust, but I really like colored output. So we'll give it a shot # and if it doesn't work we will just do something else. CLINT_AVAILABLE = False def get_logging_level(level): logging_level = None if isinstance(level, (str, unicode)): level = level.upper() try: logging_level = getattr(logging, level.upper()) except AttributeError: raise AttributeError('Tried to grab logging level "%s"' ' but it does not exist' % level) elif isinstance(level, int): # Do nothing logging_level = level else: raise TypeError('Invalid logging level. Must be string or int %s' % str(level)) return logging_level class VirtstrapLogger(object): """Custom logger for use with virtstrap It'll allow the logger to store logged data before a log file is setup. It is meant to be used globally. """ def __init__(self): self._handlers = [] self._log_lines = [] #storage before any handlers appear def add_handler(self, handler): self._handlers.append(handler) log_lines = self._log_lines for level, message in log_lines: self.log(level, message, new_line=False) self._log_lines = [] def debug(self, message, **kwargs): self.log('debug', message, **kwargs) def error(self, message, **kwargs): self.log('error', message, **kwargs) def info(self, message, **kwargs): self.log('info', message, **kwargs) def warning(self, message, **kwargs): self.log('warning', message, **kwargs) def critical(self, message, **kwargs): self.log('critical', message, **kwargs) def exception(self, message, **kwargs): exception_str = self._get_exception_str() self.log('error', '%s\n%s' % (message, exception_str)) def debug_exception(self, message, **kwargs): """Stores exception except using the debug level""" exception_str = self._get_exception_str() self.log('debug', '%s\n%s' % (message, exception_str)) def _get_exception_str(self): exception_info = sys.exc_info() exception_lines = traceback.format_exception(*exception_info) exception_str = ''.join(exception_lines) return exception_str def log(self, level, message, new_line=True): if new_line: message = "%s\n" % message handlers = self._handlers if not handlers: self._log_lines.append((level, message)) else: for handler in handlers: handler.log(level, message) def close(self): handlers = self._handlers for handler in handlers: close = getattr(handler, 'close') if close: close() class VirtstrapLogHandler(object): def __init__(self, level='debug'): self._level = get_logging_level(level) def set_level(self, level): self._level = get_logging_level(level) def log(self, level, message): current_level = get_logging_level(level) if current_level >= self._level: self.emit(level, message) def emit(self, level, message): raise NotImplementedError('Please implement an emit method') def close(self): pass class ConsoleLogHandler(VirtstrapLogHandler): def emit(self, level, message): sys.stdout.write(message) class ColoredConsoleLogHandler(VirtstrapLogHandler): level_colors = { "DEBUG": "green", "INFO": "black", "WARNING": "yellow", "CRITICAL": "purple", "ERROR": "red", "EXCEPTION": "red", } def emit(self, level, output): color = self.level_colors.get(level, "black") colored_function = getattr(colored, color, lambda text: text) colored_output = colored_function(output) puts(colored_output) class FileLogHandler(VirtstrapLogHandler): """File Log Handler that uses built in logging to log""" def __init__(self, filename): self._file = open(filename, 'a') def emit(self, level, message): if self._file: self._file.write(message) def close(self): self._file.close() self._file = None class VirtstrapConsoleLogHandler(logging.Handler): def __init__(self, outputter): self._outputter = outputter logging.Handler.__init__(self) def emit(self, record): outputter = self._outputter output_string = self.format(record) outputter.write(output_string, record.levelname) class ConsoleLogOutputter(object): def write(self, output, level): print(output) class ColoredConsoleLogOutputter(ConsoleLogOutputter): level_colors = { "DEBUG": "green", "INFO": "black", "WARNING": "yellow", "CRITICAL": "purple", "ERROR": "red", "EXCEPTION": "red", } def write(self, output, level): color = self.level_colors.get(level, "black") colored_function = getattr(colored, color, lambda text: text) colored_output = colored_function(output) puts(colored_output) logger = VirtstrapLogger() VERBOSITY_LEVELS = { 0: None, 1: logging.WARNING, 2: logging.INFO, 3: logging.DEBUG, } def setup_logger(verbosity, no_colored_output=False, log_file=None): """Sets up the logger for the program. DO NOT USE DIRECTLY IN COMMANDS""" verbosity_level = VERBOSITY_LEVELS.get(verbosity, logging.INFO) if log_file: file_handler = FileLogHandler(log_file) # The file should log all things to be used for error reporting file_handler.set_level(logging.DEBUG) logger.add_handler(file_handler) if not verbosity_level: return console_handler = ConsoleLogHandler() if CLINT_AVAILABLE: console_handler = ColoredConsoleLogHandler() console_handler.set_level(verbosity_level) logger.add_handler(console_handler)
ravenac95/virtstrap
virtstrap-core/virtstrap/log.py
Python
mit
6,365
package surge import ( "fmt" "time" ) type applyCallback func(gwy NodeRunnerInterface, flow FlowInterface) //======================================================================== // // type FlowInterface // //======================================================================== type FlowInterface interface { String() string setOneArg(a interface{}) unicast() bool // more accessors GetCid() int64 GetSid() int64 GetTio() TioInterface GetRb() RateBucketInterface GetRepnum() int getbw() int64 setbw(bw int64) getoffset() int64 setoffset(ev *ReplicaDataEvent) incoffset(add int) bytesToWrite(ev *ReplicaDataEvent) int } //======================================================================== // // type Flow (short-lived: duration = <control> <one chunk> <ack>) // //======================================================================== type Flow struct { from NodeRunnerInterface to NodeRunnerInterface togroup GroupInterface cid int64 sid int64 tio TioInterface rb RateBucketInterface // refill at the tobandwidth rate tobandwidth int64 // bits/sec timeTxDone time.Time // time the last byte of the current packet is sent extension interface{} // protocol-specific flow extension offset int64 totalbytes int64 repnum int // replica num } //======================================================================== // c-tors and helpers //======================================================================== func NewFlow(f NodeRunnerInterface, chunkid int64, args ...interface{}) *Flow { printid := uqrand(chunkid) flow := &Flow{ from: f, cid: chunkid, sid: printid} for i := 0; i < len(args); i++ { flow.setOneArg(args[i]) } // must be the flow initiating tio if flow.tio.GetFlow() == nil { flow.tio.SetFlow(flow) } return flow } func (flow *Flow) setOneArg(a interface{}) { switch a.(type) { case int: flow.repnum = a.(int) case TioInterface: flow.tio = a.(TioInterface) case NodeRunnerInterface: flow.to = a.(NodeRunnerInterface) case GroupInterface: flow.togroup = a.(GroupInterface) default: assert(false, fmt.Sprintf("unexpected type: %#v", a)) } } func (flow *Flow) unicast() bool { return flow.to != nil && flow.togroup == nil } func (flow *Flow) String() string { f := flow.from.String() bwstr := fmt.Sprintf("%.2f", float64(flow.tobandwidth)/1000.0/1000.0/1000.0) var cstr string if flow.repnum != 0 { cstr = fmt.Sprintf("c#%d(%d)", flow.sid, flow.repnum) } else { cstr = fmt.Sprintf("c#%d", flow.sid) } if flow.unicast() { t := flow.to.String() return fmt.Sprintf("[flow %s=>%s[%s],offset=%d,bw=%sGbps]", f, t, cstr, flow.offset, bwstr) } t := flow.togroup.String() return fmt.Sprintf("[flow %s=>%s[%s],offset=%d,bw=%sGbps]", f, t, cstr, flow.offset, bwstr) } func (flow *Flow) getbw() int64 { return flow.tobandwidth } func (flow *Flow) setbw(bw int64) { flow.tobandwidth = bw } func (flow *Flow) getoffset() int64 { return flow.offset } func (flow *Flow) setoffset(ev *ReplicaDataEvent) { flow.offset = ev.offset } func (flow *Flow) incoffset(add int) { flow.offset += int64(add) } func (flow *Flow) GetCid() int64 { return flow.cid } func (flow *Flow) GetSid() int64 { return flow.sid } func (flow *Flow) GetTio() TioInterface { return flow.tio.GetTio() } func (flow *Flow) GetRb() RateBucketInterface { return flow.rb } func (flow *Flow) GetRepnum() int { return flow.repnum } func (flow *Flow) bytesToWrite(ev *ReplicaDataEvent) int { if flow.offset < flow.totalbytes { return 0 } return int(flow.totalbytes) } //======================================================================== // // type FlowLong (long-lived unicast flow) // //======================================================================== type FlowLong struct { from NodeRunnerInterface to NodeRunnerInterface rb RateBucketInterface // refill at the tobandwidth rate tobandwidth int64 // bits/sec offset int64 // transmitted bytes timeTxDone time.Time // time the last byte of the current packet is sent } func (flow *FlowLong) setOneArg(a interface{}) { } func (flow *FlowLong) unicast() bool { return true } func (flow *FlowLong) String() string { f := flow.from.String() bwstr := fmt.Sprintf("%.2f", float64(flow.tobandwidth)/1000.0/1000.0/1000.0) t := flow.to.String() return fmt.Sprintf("[flow %s=>%s,bw=%sGbps]", f, t, bwstr) } func (flow *FlowLong) getbw() int64 { return flow.tobandwidth } func (flow *FlowLong) setbw(bw int64) { flow.tobandwidth = bw } func (flow *FlowLong) GetRb() RateBucketInterface { return flow.rb } func (flow *FlowLong) incoffset(add int) { flow.offset += int64(add) } // FIXME: remove from interface func (flow *FlowLong) getoffset() int64 { return 0 } func (flow *FlowLong) setoffset(ev *ReplicaDataEvent) { assert(false) } func (flow *FlowLong) GetCid() int64 { return 0 } func (flow *FlowLong) GetSid() int64 { return 0 } func (flow *FlowLong) GetTio() TioInterface { return nil } func (flow *FlowLong) GetRepnum() int { return 0 } func (flow *FlowLong) bytesToWrite(ev *ReplicaDataEvent) int { return 0 } //======================================================================== // // FlowDir - container: unidirectional flows many-others => myself // //======================================================================== type FlowDir struct { node NodeRunnerInterface flows map[NodeRunnerInterface]FlowInterface } func NewFlowDir(r NodeRunnerInterface, num int) *FlowDir { flows := make(map[NodeRunnerInterface]FlowInterface, num) return &FlowDir{r, flows} } func (fdir *FlowDir) insertFlow(flow *Flow) { assert(flow.unicast()) if fdir.node == flow.from { fdir.flows[flow.to] = flow } else { assert(fdir.node == flow.to) fdir.flows[flow.from] = flow } } func (fdir *FlowDir) deleteFlow(r NodeRunnerInterface) { delete(fdir.flows, r) } func (fdir *FlowDir) count() int { return len(fdir.flows) } func (fdir *FlowDir) get(r NodeRunnerInterface, mustexist bool) FlowInterface { flow, ok := fdir.flows[r] if ok { return flow } if mustexist { n := fdir.node.String() other := r.String() assertstr := fmt.Sprintf("flow %s<...>%s does not exist", n, other) assert(false, assertstr) } return nil } func (fdir *FlowDir) apply(f applyCallback) { for r, flow := range fdir.flows { f(r, flow) } }
hqr/surge
flow.go
GO
mit
6,742
<?php declare(strict_types=1); namespace OAuth2Framework\Component\OpenIdConnect\UserInfo\Claim; use OAuth2Framework\Component\Core\UserAccount\UserAccount; final class GivenName implements Claim { private const CLAIM_NAME = 'given_name'; public function name(): string { return self::CLAIM_NAME; } public function isAvailableForUserAccount(UserAccount $userAccount, ?string $claimLocale): bool { return $userAccount->has($this->getComputedClaimName($claimLocale)); } public function getForUserAccount(UserAccount $userAccount, ?string $claimLocale) { return $userAccount->get($this->getComputedClaimName($claimLocale)); } private function getComputedClaimName(?string $claimLocale): string { return $claimLocale !== null ? sprintf('%s#%s', self::CLAIM_NAME, $claimLocale) : self::CLAIM_NAME; } }
OAuth2-Framework/oauth2-framework
src/Component/OpenIdConnect/UserInfo/Claim/GivenName.php
PHP
mit
889
<?php namespace Pablodip\Riposti\Infrastructure\Symfony\Bundle; use Pablodip\Riposti\Infrastructure\Symfony\DependencyInjection\RipostiExtension; use Symfony\Component\HttpKernel\Bundle\Bundle; class PablodipRipostiBundle extends Bundle { public function getContainerExtension() { return new RipostiExtension(); } }
pablodip/riposti
src/Infrastructure/Symfony/Bundle/PablodipRipostiBundle.php
PHP
mit
339
from ...utils.tests import base as base from ...utils.tests import mpi as mpit # key order: dataset; epsilon; C __REFERENCE_RESULTS__ = { "dryrun": { 0.1: { 0.1: { "accuracy": 1-0.9300, }, 1: { "accuracy": 1-0.9300, }, 10: { "accuracy": 1-0.9300, }, }, }, "glass": { 0.001: { 0.1: { "accuracy": 1-0.6667, }, 1: { "accuracy": 1-0.6190, }, 10: { "accuracy": 1-0.3333, }, }, }, "iris": { 0.001: { 0.1: { "accuracy": 1-0.1333, }, 1: { "accuracy": 1-0.2667, }, 10: { "accuracy": 1-0.2667, }, }, }, "news20": { 0.001: { 0.1: { "accuracy": 1-0.2923, }, 1: { "accuracy": 1-0.2297, }, 10: { "accuracy": 1-0.1615, }, }, }, } def do_llwmr_tsd(options_update={}, mpi_comm=None, datasets=None, reference=True): solver_id = "llw_mr_sparse" # default options options = { "epsilon": 0.001, "C": 10**-1, "mpi_comm": mpi_comm, } options.update(options_update) reference_results = __REFERENCE_RESULTS__ if reference is False: reference_results = None base._do_test_small_datasets(solver_id, options, datasets=datasets, reference_results=reference_results, mpi_comm=mpi_comm) pass def do_llwmr_tld(options_update={}, mpi_comm=None, datasets=None, reference=True): solver_id = "llw_mr_sparse" # default options options = { "epsilon": 0.1, "C": 10**-1, "mpi_comm": mpi_comm, } options.update(options_update) tolerance = 0.01 reference_results = __REFERENCE_RESULTS__ if reference is False: reference_results = None base._do_test_large_datasets(solver_id, options, datasets=datasets, reference_results=reference_results, mpi_comm=mpi_comm, tolerance=tolerance) pass ############################################################################### # ............................................................................. # BASE SOLVER TESTS # ............................................................................. ############################################################################### ############################################################################### # Running default config def test_default_sd(): do_llwmr_tsd() @base.testattr("slow") def test_default_ld(): do_llwmr_tld() ############################################################################### # Parameter C and max_iter @base.testattr("slow") def test_C_1_sd(): do_llwmr_tsd({"C": 10**0}) @base.testattr("slow") def test_C_1_ld(): do_llwmr_tld({"C": 10**0}) @base.testattr("slow") def test_C_10_sd(): do_llwmr_tsd({"C": 10**1, "max_iter": 10000}) @base.testattr("slow") def test_C_10_ld(): do_llwmr_tld({"C": 10**1, "max_iter": 10000}) ############################################################################### # Parameter epsilon def test_small_epsilon_sd(): do_llwmr_tsd({"epsilon": 0.0001}, reference=False) @base.testattr("slow") def test_small_epsilon_ld(): do_llwmr_tld({"epsilon": 0.01}, reference=False) ############################################################################### # Parameter shuffle def test_no_shuffle_sd(): do_llwmr_tsd({"shuffle": False}) @base.testattr("slow") def test_no_shuffle_ld(): do_llwmr_tld({"shuffle": False}) ############################################################################### # Parameter seed def test_seed_12345_sd(): do_llwmr_tsd({"seed": 12345}) @base.testattr("slow") def test_seed_12345_ld(): do_llwmr_tld({"seed": 12345}) ############################################################################### # Parameter dtype @base.testattr("slow") def test_dtype_float32_sd(): do_llwmr_tsd({"dtype": "float32"}) @base.testattr("slow") def test_dtype_float32_ld(): do_llwmr_tld({"dtype": "float32"}) @base.testattr("slow") def test_dtype_float64_sd(): do_llwmr_tsd({"dtype": "float64"}) @base.testattr("slow") def test_dtype_float64_ld(): do_llwmr_tld({"dtype": "float64"}) ############################################################################### # Parameter idtype @base.testattr("slow") def test_idtype_uint32_sd(): do_llwmr_tsd({"idtype": "uint32"}) @base.testattr("slow") def test_idtype_uint32_ld(): do_llwmr_tld({"idtype": "uint32"}) @base.testattr("slow") def test_idtype_uint64_sd(): do_llwmr_tsd({"idtype": "uint64"}) @base.testattr("slow") def test_idtype_uint64_ld(): do_llwmr_tld({"idtype": "uint64"}) ############################################################################### # Parameter nr_threads def test_nr_threads_2_sd(): do_llwmr_tsd({"nr_threads": 2}) @base.testattr("slow") def test_nr_threads_2_ld(): do_llwmr_tld({"nr_threads": 2}) def test_nr_threads_5_sd(): do_llwmr_tsd({"nr_threads": 5}) @base.testattr("slow") def test_nr_threads_5_ld(): do_llwmr_tld({"nr_threads": 5}) ############################################################################### # ............................................................................. # LLW SOLVER TESTS # ............................................................................. ############################################################################### ############################################################################### # Parameter folds def test_folds_2_sd(): do_llwmr_tsd({"folds": 2}) @base.testattr("slow") def test_folds_2_ld(): do_llwmr_tld({"folds": 2}) def test_folds_5_sd(): do_llwmr_tsd({"folds": 5}) @base.testattr("slow") def test_folds_5_ld(): do_llwmr_tld({"folds": 5}) ############################################################################### # Parameter variant def test_variant_1_sd(): do_llwmr_tsd({"variant": 1}) @base.testattr("slow") def test_variant_1_ld(): do_llwmr_tld({"variant": 1}) ############################################################################### # Parameter shrinking def test_shrinking_1_sd(): do_llwmr_tsd({"shrinking": 1}) @base.testattr("slow") def test_shrinking_1_ld(): do_llwmr_tld({"shrinking": 1}) ############################################################################### # Spreading computation with openmpi @mpit.wrap(2) def test_nr_proc_2_sd(comm): do_llwmr_tsd({}, comm) @base.testattr("slow") @mpit.wrap(2) def test_nr_proc_2_ld(comm): do_llwmr_tld({}, comm) @mpit.wrap(3) def test_nr_proc_3_sd(comm): do_llwmr_tsd({}, comm) @base.testattr("slow") @mpit.wrap(3) def test_nr_proc_3_ld(comm): do_llwmr_tld({}, comm)
albermax/xcsvm
xcsvm/xcsvm/tests/solvers/llwmr.py
Python
mit
7,407
<?php $attributes = array('class' => '', 'id' => '_item'); echo form_open_multipart($form_action, $attributes); ?> <?php if(isset($items)){ ?> <input id="id" type="hidden" name="id" value="<?php echo $items->id;?>" /> <?php } ?> <div class="form-group"> <label for="name"><?php echo $this->lang->line('item_application_name');?></label> <input id="name" name="name" type="text" class="required form-control" value="<?php if(isset($items)){ echo $items->name; } ?>" required/> </div> <div class="form-group"> <label for="value"><?php echo $this->lang->line('application_value');?></label> <div class="input-group"> <span class="input-group-addon"><?php echo $core_settings->currency; ?></span> <input id="value" type="text" name="value" class="required form-control number" value="<?php if(isset($items)){ echo $items->value; } ?>" required/> </div> </div> <input id="type" type="hidden" name="type" value="<?php if(isset($items)){ echo $items->type; } ?>" /> <div class="form-group"> <label for="description"><?php echo $this->lang->line('item_application_description');?></label> <textarea id="description" class="form-control" name="description"><?php if(isset($items)){ echo $items->description; } ?></textarea> </div> <div class="form-group"> <label for="sku"><?php echo $this->lang->line('item_application_sku');?> *</label> <input id="sku" type="text" name="sku" class="required form-control" value="<?php if(isset($items)){echo $items->sku;} ?>" required /> </div> <div class="form-group"> <label for="inactive"><?php echo $this->lang->line('application_status');?></label> <?php $options = array(); $options['0'] = 'Active'; $options['1'] = 'Inactive'; if(isset($items)){$status_selected = $items->inactive;}else{$status_selected = "0";} echo form_dropdown('inactive', $options, $status_selected, 'style="width:100%" class="chosen-select"');?> </div> <div class="form-group"> <label for="userfile"><?php echo $this->lang->line('item_application_file');?> *</label><div> <input id="uploadFile" class="form-control required uploadFile" placeholder="<?php if(isset($items)){ echo $items->photo; }else{ echo "Choose File";} ?>" disabled="disabled" required /> <div class="fileUpload btn btn-primary"> <span><i class="fa fa-upload"></i><span class="hidden-xs"> <?php echo $this->lang->line('application_select');?></span></span> <input id="uploadBtn" type="file" name="userfile" class="upload item-new" /> </div> </div> </div> <div class="modal-footer"> <input type="submit" name="send" class="btn btn-primary" value="<?php echo $this->lang->line('application_save');?>"/> <a class="btn" data-dismiss="modal"><?php echo $this->lang->line('application_close');?></a> </div> <?php echo form_close(); ?>
imranweb7/msitc-erp
application/views/blueline/invoices/_items.php
PHP
mit
3,083
const test = require('tape') const MinHeap = require('./MinHeap') test('find returns null in empty heap', assert => { const heap = new MinHeap() assert.equal(heap.findMin(), null) assert.end() }) test('length is 0 in empty heap', assert => { const heap = new MinHeap() assert.equal(heap.length, 0) assert.end() }) test('length is updated when items added', assert => { const heap = new MinHeap() heap.insert(1) heap.insert(2) heap.insert(10) assert.equal(heap.length, 3) assert.end() }) test('length is updated when items removed', assert => { const heap = new MinHeap() heap.insert(1) heap.insert(2) heap.insert(10) heap.extractMin() heap.extractMin() assert.equal(heap.length, 1) assert.end() }) test('min item is replaced with given item', assert => { const heap = new MinHeap() heap.insert(1) heap.insert(2) heap.insert(3) assert.equal(heap.findMin(), 1) assert.equal(heap.length, 3) heap.replace(4) assert.equal(heap.findMin(), 2) assert.equal(heap.length, 3) assert.equal(heap.extractMin(), 2) assert.equal(heap.extractMin(), 3) assert.equal(heap.extractMin(), 4) assert.end() }) test('find returns min item from heap', assert => { const heap = new MinHeap() heap.insert(3) heap.insert(1) heap.insert(10) assert.equal(heap.length, 3) assert.equal(heap.findMin(), 1) assert.equal(heap.length, 3) assert.end() }) test('extract returns min item from heap', assert => { const heap = new MinHeap() heap.insert(9) heap.insert(8) heap.insert(7) heap.insert(6) heap.insert(5) heap.insert(4) heap.insert(3) heap.insert(2) heap.insert(2) heap.insert(2) heap.insert(1) assert.equal(heap.extractMin(), 1) assert.equal(heap.extractMin(), 2) assert.equal(heap.extractMin(), 2) assert.equal(heap.extractMin(), 2) assert.equal(heap.extractMin(), 3) assert.equal(heap.extractMin(), 4) assert.equal(heap.extractMin(), 5) assert.equal(heap.extractMin(), 6) assert.equal(heap.extractMin(), 7) assert.equal(heap.extractMin(), 8) assert.equal(heap.extractMin(), 9) assert.equal(heap.extractMin(), null) assert.equal(heap.extractMin(), null) assert.end() }) test('heap can be iterated', assert => { const heap = new MinHeap() heap.insert(5) heap.insert(0) heap.insert(3) heap.insert(2) heap.insert(4) heap.insert(1) assert.deepEqual([...heap], [0, 1, 2, 3, 4, 5]) assert.end() }) test('heap is created from given array', assert => { const input = [5, 6, 3, 1, 2, 0, 4] const heap = new MinHeap(input) assert.deepEqual([...heap], [0, 1, 2, 3, 4, 5, 6]) assert.deepEqual(input, [5, 6, 3, 1, 2, 0, 4]) // input data should not be modified assert.end() }) test('sort random data with heap', assert => { const input = [] for (let i = 0; i < 1e5; i++) { const item = Math.floor(Math.random() * 1e4) input.push(item) } const heap = new MinHeap(input) assert.deepEqual([...heap], input.sort((a, b) => a - b)) assert.end() })
ayastreb/cs101
src/DataStructures/MinHeap.test.js
JavaScript
mit
3,005
require 'active_mocker/mock' class TeamMock < ActiveMocker::Mock::Base created_with('1.8.3') class << self def attributes @attributes ||= HashWithIndifferentAccess.new({"id"=>nil, "name"=>nil, "created_at"=>nil, "updated_at"=>nil, "user_id"=>nil, "domain"=>nil, "webhook"=>nil}).merge(super) end def types @types ||= ActiveMocker::Mock::HashProcess.new({ id: Fixnum, name: String, created_at: DateTime, updated_at: DateTime, user_id: Fixnum, domain: String, webhook: String }, method(:build_type)).merge(super) end def associations @associations ||= {:user=>nil, :teamgifs=>nil, :gifs=>nil}.merge(super) end def associations_by_class @associations_by_class ||= {"User"=>{:belongs_to=>[:user]}, "Teamgif"=>{:has_many=>[:teamgifs]}, "Gif"=>{:has_many=>[:gifs]}}.merge(super) end def mocked_class "Team" end private :mocked_class def attribute_names @attribute_names ||= ["id", "name", "created_at", "updated_at", "user_id", "domain", "webhook"] | super end def primary_key "id" end def abstract_class? false end def table_name "teams" || super end end ################################## # Attributes getter/setters # ################################## def id read_attribute(:id) end def id=(val) write_attribute(:id, val) end def name read_attribute(:name) end def name=(val) write_attribute(:name, val) end def created_at read_attribute(:created_at) end def created_at=(val) write_attribute(:created_at, val) end def updated_at read_attribute(:updated_at) end def updated_at=(val) write_attribute(:updated_at, val) end def user_id read_attribute(:user_id) end def user_id=(val) write_attribute(:user_id, val) end def domain read_attribute(:domain) end def domain=(val) write_attribute(:domain, val) end def webhook read_attribute(:webhook) end def webhook=(val) write_attribute(:webhook, val) end ################################## # Associations # ################################## # belongs_to def user read_association(:user) || write_association(:user, classes('User').try{ |k| k.find_by(id: user_id)}) end def user=(val) write_association(:user, val) ActiveMocker::Mock::BelongsTo.new(val, child_self: self, foreign_key: :user_id).item end def build_user(attributes={}, &block) association = classes('User').try(:new, attributes, &block) write_association(:user, association) unless association.nil? end def create_user(attributes={}, &block) association = classes('User').try(:create,attributes, &block) write_association(:user, association) unless association.nil? end alias_method :create_user!, :create_user # has_many def teamgifs read_association(:teamgifs, -> { ActiveMocker::Mock::HasMany.new([],foreign_key: 'team_id', foreign_id: self.id, relation_class: classes('Teamgif'), source: '') }) end def teamgifs=(val) write_association(:teamgifs, ActiveMocker::Mock::HasMany.new(val, foreign_key: 'team_id', foreign_id: self.id, relation_class: classes('Teamgif'), source: '')) end def gifs read_association(:gifs, -> { ActiveMocker::Mock::HasMany.new([],foreign_key: 'gif_id', foreign_id: self.id, relation_class: classes('Gif'), source: '') }) end def gifs=(val) write_association(:gifs, ActiveMocker::Mock::HasMany.new(val, foreign_key: 'gif_id', foreign_id: self.id, relation_class: classes('Gif'), source: '')) end module Scopes include ActiveMocker::Mock::Base::Scopes end extend Scopes class ScopeRelation < ActiveMocker::Mock::Association include TeamMock::Scopes end private def self.new_relation(collection) TeamMock::ScopeRelation.new(collection) end public ################################## # Model Methods # ################################## end
slashrocket/reactif
spec/mocks/team_mock.rb
Ruby
mit
4,031
<?php /* * @author M2E Pro Developers Team * @copyright M2E LTD * @license Commercial use is forbidden */ class Ess_M2ePro_Model_Resource_Ebay_Template_Category_Collection extends Ess_M2ePro_Model_Resource_Collection_Abstract { //######################################## public function _construct() { parent::_construct(); $this->_init('M2ePro/Ebay_Template_Category'); } //######################################## /** * @param $primaryCategoriesData * @return Ess_M2ePro_Model_Ebay_Template_Category[] */ public function getItemsByPrimaryCategories($primaryCategoriesData) { $conn = $this->getConnection(); $where = ''; foreach ($primaryCategoriesData as $categoryData) { $where && $where .= ' OR '; $categoryData['category_main_id'] = (int)$categoryData['category_main_id']; $categoryData['marketplace_id'] = (int)$categoryData['marketplace_id']; $where .= "(marketplace_id = {$categoryData['marketplace_id']} AND"; $where .= " category_main_id = {$categoryData['category_main_id']} AND"; $where .= " category_main_mode = {$conn->quote($categoryData['category_main_mode'])} AND"; $where .= " category_main_attribute = {$conn->quote($categoryData['category_main_attribute'])}) "; } $this->getSelect()->where($where); $this->getSelect()->order('create_date DESC'); $templates = array(); /** @var $template Ess_M2ePro_Model_Ebay_Template_Category */ foreach ($this->getItems() as $template) { if ($template['category_main_mode'] == Ess_M2ePro_Model_Ebay_Template_Category::CATEGORY_MODE_EBAY) { $key = $template['category_main_id']; } else { $key = $template['category_main_attribute']; } if (isset($templates[$key])) { continue; } $templates[$key] = $template; } return $templates; } //######################################## }
portchris/NaturalRemedyCompany
src/app/code/community/Ess/M2ePro/Model/Resource/Ebay/Template/Category/Collection.php
PHP
mit
2,128
let fs = require('fs'); let path = require('path'); let moviesData = require('../config/database'); module.exports = (req, res) => { if(req.headers.statusheader === "Full") { fs.readFile("./views/status.html", (err, data) => { if(err) { console.log(err); res.writeHead(404); res.write('404 Not Found'); res.end(); } res.writeHead(200, { 'Content-Type': 'text/html' }); let imagesCount = moviesData.getMovies().length; data = data.toString().replace('{content}', `There are currently ${imagesCount} images.`); res.write(data); res.end(); }) } else { return true; } }
Martotko/JS-Web
ExpressJS/03.Exercises-NodeJS-Web-Server-Development-Tools/handlers/statusHeader.js
JavaScript
mit
780
// 这里为了不和nodejs 内部已经定义好的接口冲突,这里接口前我都加一个I // 同步迭代器对象接口 // 同步迭代结果 interface IIterationResult<T> { value: T; done: boolean; } // 同步迭代器对象 interface IIterator<T> { next(value?: any): IIterationResult<T>; return?(value?: any): IIterationResult<T>; throw?(e?: any): IIterationResult<T>; } // 同步可迭代对象 interface IIterable<T> { [Symbol.iterator](): IIterator<T>; } // [同步生成器对象] 既是同步可迭代对象又是同步迭代器对象 // 非常巧妙的实现 interface IIterableIterator<T> extends IIterator<T> { [Symbol.iterator](): IIterableIterator<T>; } // 异步迭代器对象接口 // 怎么写?
singcl/mhd-awesome
src/md/iterator_vs_async_iterator.ts
TypeScript
mit
757
using FingerMovingSimulation.Core.Hands.Colemak.Fingers.Right; using MiscUtil; namespace FingerMovingSimulation.Infrastructure.Hands.Colemak.Fingers.Right.IndexFinger { internal class LKeyState : IRightIndexFingerKeyState { private readonly RightIndexFinger rightIndexFinger; public LKeyState(RightIndexFinger rightIndexFinger) { this.rightIndexFinger = rightIndexFinger; } public string CurrentKey { get { return "l"; } } public double PressD7() { rightIndexFinger.CurrentKeyState = rightIndexFinger.D7KeyState; return 1; } public double PressL() { return 0; } public double PressN() { rightIndexFinger.CurrentKeyState = rightIndexFinger.NKeyState; return 1; } public double PressM() { rightIndexFinger.CurrentKeyState = rightIndexFinger.MKeyState; return 2; } public double PressD6() { rightIndexFinger.CurrentKeyState = rightIndexFinger.D6KeyState; return 3.Sqrt(); } public double PressJ() { rightIndexFinger.CurrentKeyState = rightIndexFinger.JKeyState; return 1; } public double PressH() { rightIndexFinger.CurrentKeyState = rightIndexFinger.HKeyState; return 1; } public double PressK() { rightIndexFinger.CurrentKeyState = rightIndexFinger.KKeyState; return 3.Sqrt(); } } }
sonbua/Sonak
legacy/CountFingerReachingWhenTexting/FingerMovingSimulation/Infrastructure/Hands/Colemak/Fingers/Right/IndexFinger/LKeyState.cs
C#
mit
1,659
from __future__ import print_function from eventlet import hubs from eventlet.support import greenlets as greenlet __all__ = ['Event'] class NOT_USED: def __repr__(self): return 'NOT_USED' NOT_USED = NOT_USED() class Event(object): """An abstraction where an arbitrary number of coroutines can wait for one event from another. Events are similar to a Queue that can only hold one item, but differ in two important ways: 1. calling :meth:`send` never unschedules the current greenthread 2. :meth:`send` can only be called once; create a new event to send again. They are good for communicating results between coroutines, and are the basis for how :meth:`GreenThread.wait() <eventlet.greenthread.GreenThread.wait>` is implemented. >>> from eventlet import event >>> import eventlet >>> evt = event.Event() >>> def baz(b): ... evt.send(b + 1) ... >>> _ = eventlet.spawn_n(baz, 3) >>> evt.wait() 4 """ _result = None _exc = None def __init__(self): self._waiters = set() self.reset() def __str__(self): params = (self.__class__.__name__, hex(id(self)), self._result, self._exc, len(self._waiters)) return '<%s at %s result=%r _exc=%r _waiters[%d]>' % params def reset(self): # this is kind of a misfeature and doesn't work perfectly well, # it's better to create a new event rather than reset an old one # removing documentation so that we don't get new use cases for it assert self._result is not NOT_USED, 'Trying to re-reset() a fresh event.' self._result = NOT_USED self._exc = None def ready(self): """ Return true if the :meth:`wait` call will return immediately. Used to avoid waiting for things that might take a while to time out. For example, you can put a bunch of events into a list, and then visit them all repeatedly, calling :meth:`ready` until one returns ``True``, and then you can :meth:`wait` on that one.""" return self._result is not NOT_USED def has_exception(self): return self._exc is not None def has_result(self): return self._result is not NOT_USED and self._exc is None def poll(self, notready=None): if self.ready(): return self.wait() return notready # QQQ make it return tuple (type, value, tb) instead of raising # because # 1) "poll" does not imply raising # 2) it's better not to screw up caller's sys.exc_info() by default # (e.g. if caller wants to calls the function in except or finally) def poll_exception(self, notready=None): if self.has_exception(): return self.wait() return notready def poll_result(self, notready=None): if self.has_result(): return self.wait() return notready def wait(self): """Wait until another coroutine calls :meth:`send`. Returns the value the other coroutine passed to :meth:`send`. >>> from eventlet import event >>> import eventlet >>> evt = event.Event() >>> def wait_on(): ... retval = evt.wait() ... print("waited for {0}".format(retval)) >>> _ = eventlet.spawn(wait_on) >>> evt.send('result') >>> eventlet.sleep(0) waited for result Returns immediately if the event has already occured. >>> evt.wait() 'result' """ current = greenlet.getcurrent() if self._result is NOT_USED: self._waiters.add(current) try: return hubs.get_hub().switch() finally: self._waiters.discard(current) if self._exc is not None: current.throw(*self._exc) return self._result def send(self, result=None, exc=None): """Makes arrangements for the waiters to be woken with the result and then returns immediately to the parent. >>> from eventlet import event >>> import eventlet >>> evt = event.Event() >>> def waiter(): ... print('about to wait') ... result = evt.wait() ... print('waited for {0}'.format(result)) >>> _ = eventlet.spawn(waiter) >>> eventlet.sleep(0) about to wait >>> evt.send('a') >>> eventlet.sleep(0) waited for a It is an error to call :meth:`send` multiple times on the same event. >>> evt.send('whoops') Traceback (most recent call last): ... AssertionError: Trying to re-send() an already-triggered event. Use :meth:`reset` between :meth:`send` s to reuse an event object. """ assert self._result is NOT_USED, 'Trying to re-send() an already-triggered event.' self._result = result if exc is not None and not isinstance(exc, tuple): exc = (exc, ) self._exc = exc hub = hubs.get_hub() for waiter in self._waiters: hub.schedule_call_global( 0, self._do_send, self._result, self._exc, waiter) def _do_send(self, result, exc, waiter): if waiter in self._waiters: if exc is None: waiter.switch(result) else: waiter.throw(*exc) def send_exception(self, *args): """Same as :meth:`send`, but sends an exception to waiters. The arguments to send_exception are the same as the arguments to ``raise``. If a single exception object is passed in, it will be re-raised when :meth:`wait` is called, generating a new stacktrace. >>> from eventlet import event >>> evt = event.Event() >>> evt.send_exception(RuntimeError()) >>> evt.wait() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "eventlet/event.py", line 120, in wait current.throw(*self._exc) RuntimeError If it's important to preserve the entire original stack trace, you must pass in the entire :func:`sys.exc_info` tuple. >>> import sys >>> evt = event.Event() >>> try: ... raise RuntimeError() ... except RuntimeError: ... evt.send_exception(*sys.exc_info()) ... >>> evt.wait() Traceback (most recent call last): File "<stdin>", line 1, in <module> File "eventlet/event.py", line 120, in wait current.throw(*self._exc) File "<stdin>", line 2, in <module> RuntimeError Note that doing so stores a traceback object directly on the Event object, which may cause reference cycles. See the :func:`sys.exc_info` documentation. """ # the arguments and the same as for greenlet.throw return self.send(None, args)
sbadia/pkg-python-eventlet
eventlet/event.py
Python
mit
7,095
/** * js-borschik-include * =================== * * Собирает *js*-файлы инклудами борщика, сохраняет в виде `?.js`. * Технология нужна, если в исходных *js*-файлах используются инклуды борщика. * * В последствии, получившийся файл `?.js` следует раскрывать с помощью технологии `borschik`. * * **Опции** * * * *String* **target** — Результирующий таргет. Обязательная опция. * * *String* **filesTarget** — files-таргет, на основе которого получается список исходных файлов * (его предоставляет технология `files`). По умолчанию — `?.files`. * * *String[]* **sourceSuffixes** — суффиксы файлов, по которым строится files-таргет. По умолчанию — ['js']. * * **Пример** * * ```javascript * nodeConfig.addTechs([ * [ require('enb-borschik/techs/js-borschik-include') ], * [ require('enb-borschik/techs/borschik'), { * source: '?.js', * target: '_?.js' * } ]); * ]); * ``` */ module.exports = require('enb/lib/build-flow').create() .name('js-borschik-include') .target('target', '?.js') .useFileList(['js']) .builder(function (files) { var node = this.node; return files.map(function (file) { return '/*borschik:include:' + node.relativePath(file.fullname) + '*/'; }).join('\n'); }) .createTech();
zlebnik/enb-borschik
techs/js-borschik-include.js
JavaScript
mit
1,671
from PyQt4 import QtCore, QtGui from components.propertyeditor.Property import Property from components.RestrictFileDialog import RestrictFileDialog from PyQt4.QtCore import * from PyQt4.QtGui import * import sys, os class QPropertyModel(QtCore.QAbstractItemModel): def __init__(self, parent): super(QPropertyModel, self).__init__(parent) self.rootItem = Property("Root", "Root", 0, None); def index (self, row, column, parent): parentItem = self.rootItem; if (parent.isValid()): parentItem = parent.internalPointer() if (row >= parentItem.childCount() or row < 0): return QtCore.QModelIndex(); return self.createIndex(row, column, parentItem.child(row)) def getIndexForNode(self, node): return self.createIndex(node.row(), 1, node) def getPropItem(self, name, parent=None): if(parent == None): parent = self.rootItem for item in parent.childItems: if(item.name == name): return item return None def headerData (self, section, orientation, role) : if (orientation == QtCore.Qt.Horizontal and role == QtCore.Qt.DisplayRole) : if (section == 0) : return "Property" elif (section == 1) : return "Value" return None # QtCore.QVariant(); def flags (self, index ): if (not index.isValid()): return QtCore.Qt.ItemIsEnabled; item = index.internalPointer(); if (index.column() == 0): return QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsSelectable # only allow change of value attribute if (item.isRoot()): return QtCore.Qt.ItemIsEnabled; elif (item.readOnly): return QtCore.Qt.ItemIsDragEnabled else: return QtCore.Qt.ItemIsDragEnabled | QtCore.Qt.ItemIsEnabled | QtCore.Qt.ItemIsEditable; def parent(self, index): if not index.isValid(): return QtCore.QModelIndex() childItem = index.internalPointer() parentItem = childItem.parentItem if parentItem == None or parentItem == self.rootItem: return QtCore.QModelIndex() return self.createIndex(parentItem.childCount(), 0, parentItem) def rowCount ( self, parent ): parentItem = self.rootItem; if (parent.isValid()): parentItem = parent.internalPointer() return len(parentItem.childItems) def columnCount (self, parent): return 2 def data (self, index, role): if (not index.isValid()): return None item = index.internalPointer() if(item.editor_type == Property.IMAGE_EDITOR): if (index.column() == 0) and ( role == QtCore.Qt.ToolTipRole or role == QtCore.Qt.DecorationRole or role == QtCore.Qt.DisplayRole or role == QtCore.Qt.EditRole): return item.label.replace('_', ' '); if (index.column() == 1): if(role == QtCore.Qt.DecorationRole): if(item.value['icon'] != None and not item.value['icon'].isNull()): return item.value['icon'].scaled(18, 18) else: return None if(role == QtCore.Qt.DisplayRole): return item.value['url'] if(role == QtCore.Qt.EditRole): return item.value else: if(role == QtCore.Qt.ToolTipRole or role == QtCore.Qt.DecorationRole or role == QtCore.Qt.DisplayRole or role == QtCore.Qt.EditRole): if (index.column() == 0): return item.label.replace('_', ' '); if (index.column() == 1): return item.value if(role == QtCore.Qt.BackgroundRole): if (item.isRoot()): return QtGui.QApplication.palette("QTreeView").brush(QtGui.QPalette.Normal, QtGui.QPalette.Button).color(); return None def getItem(self, index): if index.isValid(): item = index.internalPointer() if item: return item return self.rootItem def insertRows(self, position, rows, parent=QtCore.QModelIndex()): parentItem = self.getItem(parent) self.beginInsertRows(parent, position, position + rows - 1) for row in range(rows): success = parentItem.insertChild(position+row) != None self.endInsertRows() return success def removeRows(self, position, rows, parent=QtCore.QModelIndex()): parentItem = self.getItem(parent) self.beginRemoveRows(parent, position, position + rows - 1) success = parentItem.removeChildren(position, rows) self.endRemoveRows() return success # edit methods def setData(self, index, value, role = QtCore.Qt.EditRole): if (index.isValid() and role == Qt.EditRole): item = index.internalPointer() item.setValue(value) self.dataChanged.emit(index, index) return True; return False def import_module_from_file(self, full_path_to_module): """ Import a module given the full path/filename of the .py file Python 3.4 """ module = None # Get module name and path from full path module_dir, module_file = os.path.split(full_path_to_module) module_name, module_ext = os.path.splitext(module_file) if(sys.version_info >= (3,4)): import importlib # Get module "spec" from filename spec = importlib.util.spec_from_file_location(module_name,full_path_to_module) module = spec.loader.load_module() else: import imp module = imp.load_source(module_name,full_path_to_module) return module def getModuleFuncList(self, module_name): import inspect func_list = [] if(module_name != ''): try: module_name = os.getcwd() + '\\' + module_name module = self.import_module_from_file(module_name) all_functions = inspect.getmembers(module, inspect.isfunction) for function in all_functions: func_list.append(function[0]) except: pass return func_list def getModuleName(self, editor): module_name = QFileDialog.getOpenFileName(None, 'Open File', '.', "All file(*.*);;Python (*.py)") module_name = os.path.relpath(module_name, os.getcwd()) if (module_name == ''): return prop_root = self.getPropItem('properties') module_name_prop= self.getPropItem('module_name', prop_root) module_name_prop.setValue(module_name) module_name_index = self.getIndexForNode(module_name_prop) self.dataChanged.emit(module_name_index, module_name_index) function_name_prop= self.getPropItem('function_name', prop_root) function_name_prop.editor_type = Property.COMBO_BOX_EDITOR function_name_prop.editor_data = self.getModuleFuncList(module_name) function_name_index = self.getIndexForNode(function_name_prop) self.dataChanged.emit(function_name_index, function_name_index)
go2net/PythonBlocks
components/propertyeditor/QPropertyModel.py
Python
mit
7,747
require 'active_support/core_ext/string/inflections' require 'formulaic/version' require 'formulaic/errors' require 'formulaic/label' require 'formulaic/inputs' require 'formulaic/form' require 'formulaic/dsl' module Formulaic end
snipsnap/formulaic
lib/formulaic.rb
Ruby
mit
232
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using DifferAnt.ViewModels; using DifferAnt.Views; using DifferAnt.Models; using DifferAnt.Parsers; using System.IO; namespace DifferAnt { internal class DifferAntWindow : Window { public DifferAntWindow() { Title = "DifferAnt"; ChangeList changeList = null; IParser parser = new GitParser(); using (Stream stdin = Console.OpenStandardInput()) { changeList = parser.ParseChangeList(stdin); } // for testing, add some dummy values if none were found in stdout if(changeList.Count == 0) { changeList.Add(new Change() { Kind = ChangeKind.Add, Path = "//depot/proj1/src/A.cs" }); changeList.Add(new Change() { Kind = ChangeKind.Add, Path = "//depot/proj1/src/B.cs" }); changeList.Add(new Change() { Kind = ChangeKind.Edit, Path = "//depot/proj1/src/One.cs" }); changeList.Add(new Change() { Kind = ChangeKind.Edit, Path = "//depot/proj1/src/Three.cs" }); changeList.Add(new Change() { Kind = ChangeKind.Edit, Path = "//depot/proj1/src/Two.cs" }); changeList.Add(new Change() { Kind = ChangeKind.Edit, Path = "//depot/proj1/src/WonHundred.cs" }); changeList.Add(new Change() { Kind = ChangeKind.Remove, Path = "//depot/proj1/src/Foo.cs" }); }; ChangeListViewModel changeLineList = new ChangeListViewModel(changeList); ChangeListView view = new ChangeListView(); Content = view; view.DataContext = changeLineList; } } }
Russ43/DifferAnt
src/DifferAnt/DifferAntWindow.cs
C#
mit
1,793