text
stringlengths
2
100k
meta
dict
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" /> <title>Exceptions @ ImageMagick</title> <meta name="application-name" content="ImageMagick" /> <meta name="description" content="ImageMagick® is a software suite to create, edit, compose, or convert bitmap images. It can read and write images in a variety of formats (over 200) including PNG, JPEG, JPEG-2000, GIF, WebP, Postscript, PDF, and SVG. Use ImageMagick to resize, flip, mirror, rotate, distort, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves." /> <meta name="application-url" content="https://www.imagemagick.org" /> <meta name="generator" content="PHP" /> <meta name="keywords" content="exceptions, ImageMagick, PerlMagick, image processing, image, photo, software, Magick++, OpenMP, convert" /> <meta name="rating" content="GENERAL" /> <meta name="robots" content="INDEX, FOLLOW" /> <meta name="generator" content="ImageMagick Studio LLC" /> <meta name="author" content="ImageMagick Studio LLC" /> <meta name="revisit-after" content="2 DAYS" /> <meta name="resource-type" content="document" /> <meta name="copyright" content="Copyright (c) 1999-2017 ImageMagick Studio LLC" /> <meta name="distribution" content="Global" /> <meta name="magick-serial" content="P131-S030410-R485315270133-P82224-A6668-G1245-1" /> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="google-site-verification" content="_bMOCDpkx9ZAzBwb2kF3PRHbfUUdFj2uO8Jd1AXArz4" /> <link href="exception.html" rel="canonical" /> <link href="../images/wand.png" rel="icon" /> <link href="../images/wand.ico" rel="shortcut icon" /> <link href="assets/magick.css" rel="stylesheet" /> </head> <body> <header> <nav class="navbar navbar-expand-md navbar-dark bg-dark fixed-top"> <a class="navbar-brand" href="../"><img class="d-block" id="logo" name="ImageMagick" alt="ImageMagick" width="32" height="32" src="../images/wand.ico"/></a> <button class="navbar-toggler collapsed" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation"> <span class="navbar-toggler-icon"></span> </button> <div class="navbar-collapse collapse" id="navbarsExampleDefault" style=""> <ul class="navbar-nav mr-auto"> <li class="nav-item "> <a class="nav-link" href="../index.html">Home <span class="sr-only">(current)</span></a> </li> <li class="nav-item "> <a class="nav-link" href="../www/download.html">Download</a> </li> <li class="nav-item "> <a class="nav-link" href="../www/command-line-tools.html">Tools</a> </li> <li class="nav-item "> <a class="nav-link" href="../www/command-line-processing.html">Command-line</a> </li> <li class="nav-item "> <a class="nav-link" href="../www/resources.html">Resources</a> </li> <li class="nav-item "> <a class="nav-link" href="../www/develop.html">Develop</a> </li> <li class="nav-item"> <a class="nav-link" target="_blank" href="https://www.imagemagick.org/discourse-server/">Community</a> </li> </ul> <form class="form-inline my-2 my-lg-0" action="https://www.imagemagick.org/script/search.php"> <input class="form-control mr-sm-2" type="text" name="q" placeholder="Search" aria-label="Search"> <button class="btn btn-outline-success my-2 my-sm-0" type="submit" name="sa">Search</button> </form> </div> </nav> <div class="container"> <script async="async" src="https://localhost/pagead/js/adsbygoogle.js"></script> <ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-3129977114552745" data-ad-slot="6345125851" data-ad-format="auto"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> </header> <main role="main" class="container"> <div class="magick-template"> <div class="magick-header"> <p class="lead magick-description">ImageMagick returns a status of 0 whenever a command or algorithm successfully complete without complaint. A warning code generally is typically just a notice that something unusual occurred but the command or algorithm still completed and most likely the results are still usable. An error means the command or algorithm could not complete as expected and any results are unreliable. A fatal error means the command or algorithm could not complete and the process exits prematurely and no results are returned.</p> <table class="table table-sm table-striped"> <caption>ImageMagick Error and Warning Codes</caption> <tbody> <tr> <th>Domain</th> <th>Description</th> <th>Warning</th> <th>Error</th> <th>Fatal Error</th> </tr> <tr> <td>Success</td> <td>the command or algorithm completed successfully without complaint</td> <td>0</td> <td>0</td> <td>0</td> </tr> <tr> <td>Resource Limit</td> <td>a program resource is exhausted (e.g. not enough memory)</td> <td>300</td> <td>400</td> <td>700</td> </tr> <tr> <td>Type</td> <td>A font is unavailable; a substitution may have occurred</td> <td>305</td> <td>405</td> <td>705</td> </tr> <tr> <td>Option</td> <td>a command-line option was malformed</td> <td>310</td> <td>410</td> <td>710</td> </tr> <tr> <td>Delegate</td> <td>an ImageMagick <i>delegate</i> failed to complete</td> <td>315</td> <td>415</td> <td>715</td> </tr> <tr> <td>Missing Delegate</td> <td>the image type can not be read or written because the appropriate <i>Delegate</i> is missing</td> <td>320</td> <td>420</td> <td>720</td> </tr> <tr> <td>Corrupt Image</td> <td>the image file may be corrupt</td> <td>325</td> <td>425</td> <td>725</td> </tr> <tr> <td>FileOpen</td> <td>the image file could not be opened for reading or writing</td> <td>330</td> <td>430</td> <td>730</td> </tr> <tr> <td>Blob</td> <td>a binary large object could not be allocated, read, or written</td> <td>335</td> <td>435</td> <td>735</td> </tr> <tr> <td>Stream</td> <td>there was a problem reading or writing from a stream</td> <td>340</td> <td>440</td> <td>740</td> </tr> <tr> <td>Cache</td> <td>pixels could not be read or written to the pixel cache</td> <td>345</td> <td>445</td> <td>745</td> </tr> <tr> <td>Coder</td> <td>there was a problem with an image coder</td> <td>350</td> <td>450</td> <td>750</td> </tr> <tr> <td>Module</td> <td>there was a problem with an image module</td> <td>355</td> <td>455</td> <td>755</td> </tr> <tr> <td>Draw</td> <td>a drawing operation failed</td> <td>360</td> <td>460</td> <td>760</td> </tr> <tr> <td>Image</td> <td>the operation could not complete due to an incompatible image</td> <td>365</td> <td>465</td> <td>765</td> </tr> <tr> <td>Wand</td> <td>there was a problem specific to the MagickWand API</td> <td>370</td> <td>470</td> <td>770</td> </tr> <tr> <td>Random</td> <td>there is a problem generating a true or pseudo-random number</td> <td>375</td> <td>475</td> <td>775</td> </tr> <tr> <td>XServer</td> <td>an X resource is unavailable</td> <td>380</td> <td>480</td> <td>780</td> </tr> <tr> <td>Monitor</td> <td>there was a problem activating the progress monitor</td> <td>385</td> <td>485</td> <td>785</td> </tr> <tr> <td>Registry</td> <td>there was a problem getting or setting the registry</td> <td>390</td> <td>490</td> <td>790</td> </tr> <tr> <td>Configure</td> <td>there was a problem getting a configuration file</td> <td>395</td> <td>495</td> <td>795</td> </tr> <tr> <td>Policy</td> <td>a policy denies access to a delegate, coder, filter, path, or resource.</td> <td>399</td> <td>499</td> <td>799</td> </tr> </tbody> </table> </div> </div> </main><!-- /.container --> <footer class="magick-footer"> <p><a href="../www/security-policy.html">Security</a> • <a href="../www/architecture.html">Architecture</a> • <a href="../www/links.html">Related</a> • <a href="../www/sitemap.html">Sitemap</a> <a href="exception.html#"><img class="d-inline" id="logo" alt="And Now a Touch of Magick" width="16" height="16" src="../images/wand.ico"/></a> <a href="http://pgp.mit.edu/pks/lookup?op=get&amp;search=0x89AB63D48277377A">Public Key</a> • <a href="../www/support.html">Donate</a> • <a href="../www/https://www.imagemagick.org/script/contact.php">Contact Us</a> <br/> <small>© 1999-2018 ImageMagick Studio LLC</small></p> </footer> <!-- Javascript assets --> <script src="assets/magick.js" crossorigin="anonymous"></script> <script>window.jQuery || document.write('<script src="assets/jquery.min.js"><\/script>')</script> </body> </html>
{ "pile_set_name": "Github" }
<?php if(!defined('__CP__'))die(); define('LNG_BOTNET', 'Bots'); define('LNG_BOTNET_BOTSACTION', 'Bots action:'); //Фильтр. define('LNG_BOTNET_FILTER_TITLE', 'Filter'); define('LNG_BOTNET_FILTER_BOTS', 'Bots:'); define('LNG_BOTNET_FILTER_BOTNETS', 'Botnets:'); define('LNG_BOTNET_FILTER_IPS', 'IP-addresses:'); define('LNG_BOTNET_FILTER_COUNTRIES', 'Countries:'); define('LNG_BOTNET_FILTER_ALL', '-'); define('LNG_BOTNET_FILTER_NAT', 'NAT status:'); define('LNG_BOTNET_FILTER_NAT_OUTSIDE', 'Outside NAT'); define('LNG_BOTNET_FILTER_NAT_INSIDE', 'Inside NAT'); define('LNG_BOTNET_FILTER_ONLINE', 'Only online bots:'); define('LNG_BOTNET_FILTER_ONLINE_ONLINE', 'Yes'); define('LNG_BOTNET_FILTER_ONLINE_OFFLINE', 'No'); define('LNG_BOTNET_FILTER_NEW', 'Only new bots:'); define('LNG_BOTNET_FILTER_NEW_TRUE', 'Yes'); define('LNG_BOTNET_FILTER_NEW_FALSE', 'No'); define('LNG_BOTNET_FILTER_USED', 'Used status:'); define('LNG_BOTNET_FILTER_USED_TRUE', 'Used'); define('LNG_BOTNET_FILTER_USED_FALSE', 'Not used'); define('LNG_BOTNET_FILTER_COMMENT', 'Comment:'); define('LNG_BOTNET_FILTER_COMMENT_TRUE', 'Exists'); define('LNG_BOTNET_FILTER_COMMENT_FALSE', 'Not exists'); define('LNG_BOTNET_FILTER_RESET', 'Reset form'); define('LNG_BOTNET_FILTER_SUBMIT', 'Accept'); //Список. define('LNG_BOTNET_LIST', 'Result (%s):'); define('LNG_BOTNET_LIST_BOTID', 'Bot ID'); define('LNG_BOTNET_LIST_BOTNET', 'Botnet'); define('LNG_BOTNET_LIST_VERSION', 'Version'); define('LNG_BOTNET_LIST_IPV4', 'IPv4'); define('LNG_BOTNET_LIST_CONTRY', 'Country'); define('LNG_BOTNET_LIST_ONLINETIME', 'Online time'); define('LNG_BOTNET_LIST_LATENCY', 'Latency'); define('LNG_BOTNET_LIST_COMMENT', 'Comment'); define('LNG_BOTNET_LIST_EMPTY', '-- Empty --'); ?>
{ "pile_set_name": "Github" }
Scratchpads Docker ================= Run private instances of scratchpads2 sites; useful for development and deploy. A basic scratchpads infrastructure is made of: - Apache instance with PHP & Drupal - MySQL server - Solr server - Mailserver This directory provides the first three, and recommends a standard image (tianon/exim4) for the last. Requirements ------------ You'll need a recent version of docker installed. Build ----- If you want to work with the development versions of these images you'll have to build them. You can do this by running `./build.sh`, which creates three images with the following tags: - `naturalhistorymuseum/scratchpad`: the apache server - `naturalhistorymuseum/scratchpad-mysql`: the mysql server - `naturalhistorymuseum/scratchpad-solr`: the solr server In addition to these tags, The `scratchpad` image is tagged with the scratchpads source code version and release date: - `naturalhistorymuseum/scratchpad:2.x.x-YYYY-MM-DD` The mysql and solr images are also tagged with the release date: - `naturalhistorymuseum/scratchpad-mysql:YYYY-MM-DD` - `naturalhistorymuseum/scratchpad-solr:YYYY-MM-DD` Usage ----- See each image's readme for more information. Push ----- docker push naturalhistorymuseum/scratchpad-solr docker push naturalhistorymuseum/scratchpad-mysql docker push naturalhistorymuseum/scratchpad Commands -------- docker exec -i -t scratchpads.apache /bin/bash
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <!-- Copyright 2008 The Closure Library Authors. All Rights Reserved. Use of this source code is governed by the Apache License, Version 2.0. See the COPYING file for details. --> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title> Closure Unit Tests - goog.testing.net.XhrIo </title> <script src="../../base.js"> </script> <script> goog.require('goog.testing.net.XhrIoTest'); </script> </head> <body> </body> </html>
{ "pile_set_name": "Github" }
// // Diese Datei wurde mit der JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.5-2 generiert // Siehe <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // �nderungen an dieser Datei gehen bei einer Neukompilierung des Quellschemas verloren. // Generiert: 2014.02.19 um 02:35:56 PM CET // package org.onvif.ver10.media.wsdl; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p> * Java-Klasse f�r anonymous complex type. * * <p> * Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * * <pre> * <complexType> * <complexContent> * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * <sequence> * </sequence> * </restriction> * </complexContent> * </complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "") @XmlRootElement(name = "RemoveVideoEncoderConfigurationResponse") public class RemoveVideoEncoderConfigurationResponse { }
{ "pile_set_name": "Github" }
/* * Copyright 2013 Netflix, Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.netflix.governator.autobind; import com.google.inject.Inject; public class ObjectWithCustomAutoBind { private final MockInjectable injectable; @Inject public ObjectWithCustomAutoBind(@CustomAutoBind(str = "hey", value = 1234) MockInjectable injectable) { this.injectable = injectable; } public MockInjectable getInjectable() { return injectable; } }
{ "pile_set_name": "Github" }
/*global THREE*/ define([ "../internals/is" ], function( is ) { /** * @author Kyle Phillips / haptic-data.com * a bridge between Toxiclibs.js and Three.js * * Three.js does type-checking to ensure that vectors, vertices and faces are of THREE's types * this helps to do that conversion process. */ var ToxiclibsSupport = function(scene){ if(THREE === undefined){ throw new Error("THREE.js has not been loaded"); } this.scene = scene; this.objectDictionary = {}; }; ToxiclibsSupport.createLineGeometry = function(line3d, geometry){ return ToxiclibsSupport.createMeshGeometry({ vertices: [line3d.a, line3d.b] }, geometry); }; /** * create a THREE.Geometry with matching vertices to your triangleMesh * @param {toxi.geom.mesh.TriangleMesh} triangleMesh the toxiclibs.js triangle mesh to convert * @param {THREE.Geometry} [geometry] optional geometry to pass in if you would prefer to update * a geometry instead of create a new one * @returns {THREE.Geometry} */ ToxiclibsSupport.createMeshGeometry = function createMeshGeometry(obj, geometry){ geometry = geometry || new THREE.Geometry(); //create a map where the unique id of the Vertex //references the index in the array var idIndexMap = {}; var v, i, f, len, vertices; //add all vertices vertices = is.Array(obj) ? obj : obj.vertices; len = vertices.length; if( !vertices ){ throw new Error('no vertices found'); } for( i= 0; i<len; i++ ){ v = vertices[i]; geometry.vertices[i] = new THREE.Vector3(v.x, v.y, v.z); idIndexMap[v.id] = i; } if( obj.faces ){ len = obj.faces.length; for( i=0; i<len; i++ ){ f = obj.faces[i]; //normal.y *= -1; //unlike toxiclibs, a face in three.js are indices related to the vertices array geometry.faces[i] = new THREE.Face3( idIndexMap[f.a.id], idIndexMap[f.b.id], idIndexMap[f.c.id], new THREE.Vector3(f.normal.x, f.normal.y, f.normal.z ) ); } } geometry.computeCentroids(); geometry.computeVertexNormals(); return geometry; }; ToxiclibsSupport.createMesh = function(triangleMesh,material){ if(material === undefined){ material = new THREE.MeshBasicMaterial(); } var geometry = ToxiclibsSupport.createMeshGeometry(triangleMesh); return new THREE.Mesh(geometry,material); }; ToxiclibsSupport.createParticle = function(position, materials){ var particle = new THREE.Particle(materials); particle.position.x = position.x; particle.position.y = position.y; particle.position.z = position.z; return particle; }; ToxiclibsSupport.prototype = { addLine: function(line3d, material){ if(material === undefined){ material = new THREE.LineBasicMaterial(); } var geom = ToxiclibsSupport.createLineGeometry(line3d); var line = new THREE.Line(geom,material); this.scene.add(line); return line; }, /** * add a toxiclibs.js mesh to the three.js scene * @param {Object|toxi.geom.mesh.TriangleMesh} obj_or_mesh either an options object or * the toxiclibsjs mesh * -- * @param {toxi.geom.mesh.Trianglemesh} [obj_or_mesh.geometry] the mesh in the options object * @param {THREE.Material} [obj_or_mesh.material] the three.js material for the mesh * @param {boolean} [obj_or_mesh.holdInDictionary] should ToxiclibsSupport hold a reference? * -- * @param {THREE.Material} [threeMaterials] the three.js material for the mesh */ addMesh: function(obj_or_mesh,threeMaterials){ var toxiTriangleMesh; if(arguments.length == 1){ //it needs to be an param object toxiTriangleMesh = obj_or_mesh.geometry; threeMaterials = obj_or_mesh.materials; } else { toxiTriangleMesh = obj_or_mesh; } var threeMesh = this.createMesh(toxiTriangleMesh,threeMaterials); this.scene.add(threeMesh); return threeMesh; }, addParticles: function(positions, material){ if(material === undefined){ material = new THREE.ParticleBasicMaterial(); } positions = is.Array( positions ) ? positions : [ positions ]; var particle = new THREE.Geometry(), pos; for(var i=0,len = positions.length;i<len;i++){ pos = positions[i]; particle.vertices[i] = new THREE.Vector3( pos.x, pos.y, pos.z ); } var particleSystem = new THREE.ParticleSystem(particle,material); this.scene.add(particleSystem); return particle; }, createMeshGeometry: function(triangleMesh){ return ToxiclibsSupport.createMeshGeometry(triangleMesh); }, createMesh: function(triangleMesh,material){ return ToxiclibsSupport.createMesh(triangleMesh,material); } }; return ToxiclibsSupport; });
{ "pile_set_name": "Github" }
<% show_avatar ||= false%> <% if !category.getAvatarUrl.nil? and !show_avatar %> <div class="img-box img-box-categorie" style='background-image: url(<%=category.getAvatarUrl%>)'></div> <% elsif !category.getAvatarUrl.nil? and show_avatar %> <div class="img-box resource-center"> <img src="<%=category.getAvatarUrl%>"/> </div> <% else %> <% thumbs_array = new_category_thumbnail(category) %> <div class="container-img-categorie_0"> <div class="img-box-categorie category_thumb_0" <% if thumbs_array[0] %> style='background-image: url(<%=thumbs_array[0]%>)'<% end %>></div> </div> <div class="container-img-categorie_1"> <div class="img-box-categorie category_thumb_1" <% if thumbs_array[1] %> style='background-image: url(<%=thumbs_array[1]%>)'<% end %>></div> </div> <div class="container-img-categorie_2"> <div class="img-box-categorie category_thumb_2" <% if thumbs_array[2] %> style='background-image: url(<%=thumbs_array[2]%>)'<% end %> ></div> </div> <div class="container-img-categorie_3"> <div class="img-box-categorie category_thumb_3" <% if thumbs_array[3] %> style='background-image: url(<%=thumbs_array[3]%>)'<% end %> ></div> </div> <% end %>
{ "pile_set_name": "Github" }
/* * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * * WSO2 Inc. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.wso2.identity.scenarios.commons; import org.apache.axis2.context.ConfigurationContext; import org.apache.axis2.context.ConfigurationContextFactory; import org.apache.commons.collections.MapUtils; import org.apache.http.client.config.RequestConfig; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.wso2.carbon.authenticator.stub.LoginAuthenticationExceptionException; import org.wso2.carbon.um.ws.api.stub.ClaimValue; import org.wso2.identity.scenarios.commons.clients.login.AuthenticatorClient; import org.wso2.identity.scenarios.commons.clients.usermgt.remote.RemoteUserStoreManagerServiceClient; import org.wso2.identity.scenarios.commons.data.DeploymentDataHolder; import java.rmi.RemoteException; import java.util.Base64; import java.util.Map; import static org.wso2.identity.scenarios.commons.util.Constants.DEFAULT_SOCKET_TIMEOUT_IN_SECONDS; import static org.wso2.identity.scenarios.commons.util.Constants.IS_HTTPS_URL; import static org.wso2.identity.scenarios.commons.util.Constants.IS_SAMPLES_HTTP_URL; /** * Base test case for IS scenario tests. */ public class ScenarioTestBase { private static final Logger LOG = LoggerFactory.getLogger(ScenarioTestBase.class); public static final String ADMIN_USERNAME = "admin"; public static final String ADMIN_PASSWORD = "admin"; public static final String SUPER_TENANT_DOMAIN = "carbon.super"; protected String backendURL; protected String backendServiceURL; protected String webAppHost; protected AuthenticatorClient loginClient; protected String sessionCookie; protected static final String SERVICES = "/services/"; protected ConfigurationContext configContext; /** * This is a utility method to get a deployment detail. * * @return String value of the property identified by the key. */ public static String getDeploymentProperty(String key) { return DeploymentDataHolder.getInstance().getProperties().getProperty(key); } public String getAuthzHeader() { Base64.Encoder encoder = java.util.Base64.getEncoder(); String encodedHeader = encoder.encodeToString(String.join(":", ADMIN_USERNAME, ADMIN_PASSWORD).getBytes()); return String.join(" ", "Basic", encodedHeader); } protected void loginAndObtainSessionCookie() throws LoginAuthenticationExceptionException, RemoteException { loginClient = new AuthenticatorClient(backendServiceURL); sessionCookie = loginClient.login(ADMIN_USERNAME, ADMIN_PASSWORD, null); } protected void loginAndObtainSessionCookie(String username, String password) throws LoginAuthenticationExceptionException, RemoteException { loginClient = new AuthenticatorClient(backendServiceURL); sessionCookie = loginClient.login(username, password, null); } public void init() throws Exception { backendURL = getDeploymentProperty(IS_HTTPS_URL); webAppHost = getDeploymentProperty(IS_SAMPLES_HTTP_URL); backendServiceURL = backendURL + SERVICES; configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(null, null); } public boolean createUser(TestConfig config, RemoteUserStoreManagerServiceClient remoteUSMServiceClient, String profileName) { LOG.info("Creating User " + config.getUser().getUsername()); try { // creating the user remoteUSMServiceClient.addUser(config.getUser().getTenantAwareUsername(), config.getUser().getPassword(), null, getUserClaims(config), profileName, true); } catch (Exception e) { LOG.error("Error while creating the user", e); return false; } return true; } public boolean deleteUser(TestConfig config, RemoteUserStoreManagerServiceClient remoteUSMServiceClient) { LOG.info("Deleting User " + config.getUser().getUsername()); try { remoteUSMServiceClient.deleteUser(config.getUser().getTenantAwareUsername()); } catch (Exception e) { LOG.error("Error while deleting the user", e); return false; } return true; } public CloseableHttpClient createHttpClient(int timeOutInSeconds) { RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(timeOutInSeconds * 1000).build(); return HttpClientBuilder.create().setDefaultRequestConfig(requestConfig).build(); } public CloseableHttpClient createHttpClient() { return createHttpClient(DEFAULT_SOCKET_TIMEOUT_IN_SECONDS); } public ClaimValue[] getUserClaims(TestConfig config) { ClaimValue[] claimValues = null; if (MapUtils.isNotEmpty(config.getUser().getUserClaims())) { Map<String, String> userClaims = config.getUser().getUserClaims(); claimValues = new ClaimValue[userClaims.size()]; int claimNo = 0; for (Map.Entry entry: userClaims.entrySet()) { ClaimValue claimValue = new ClaimValue(); claimValue.setClaimURI(entry.getKey().toString()); claimValue.setValue(entry.getValue().toString()); claimValues[claimNo] = claimValue; claimNo++; } } return claimValues; } }
{ "pile_set_name": "Github" }
/* * This file is part of the SDWebImage package. * (c) Olivier Poitrey <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ #import "SDImageGIFCoder.h" #import "NSImage+Compatibility.h" #import "UIImage+Metadata.h" #import <ImageIO/ImageIO.h> #import "NSData+ImageContentType.h" #import "SDImageCoderHelper.h" #import "SDAnimatedImageRep.h" @interface SDGIFCoderFrame : NSObject @property (nonatomic, assign) NSUInteger index; // Frame index (zero based) @property (nonatomic, assign) NSTimeInterval duration; // Frame duration in seconds @end @implementation SDGIFCoderFrame @end @implementation SDImageGIFCoder { size_t _width, _height; CGImageSourceRef _imageSource; NSData *_imageData; CGFloat _scale; NSUInteger _loopCount; NSUInteger _frameCount; NSArray<SDGIFCoderFrame *> *_frames; BOOL _finished; } - (void)dealloc { if (_imageSource) { CFRelease(_imageSource); _imageSource = NULL; } #if SD_UIKIT [[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; #endif } - (void)didReceiveMemoryWarning:(NSNotification *)notification { if (_imageSource) { for (size_t i = 0; i < _frameCount; i++) { CGImageSourceRemoveCacheAtIndex(_imageSource, i); } } } + (instancetype)sharedCoder { static SDImageGIFCoder *coder; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ coder = [[SDImageGIFCoder alloc] init]; }); return coder; } #pragma mark - Decode - (BOOL)canDecodeFromData:(nullable NSData *)data { return ([NSData sd_imageFormatForImageData:data] == SDImageFormatGIF); } - (UIImage *)decodedImageWithData:(NSData *)data options:(nullable SDImageCoderOptions *)options { if (!data) { return nil; } CGFloat scale = 1; NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor]; if (scaleFactor != nil) { scale = MAX([scaleFactor doubleValue], 1); } #if SD_MAC SDAnimatedImageRep *imageRep = [[SDAnimatedImageRep alloc] initWithData:data]; NSSize size = NSMakeSize(imageRep.pixelsWide / scale, imageRep.pixelsHigh / scale); imageRep.size = size; NSImage *animatedImage = [[NSImage alloc] initWithSize:size]; [animatedImage addRepresentation:imageRep]; return animatedImage; #else CGImageSourceRef source = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); if (!source) { return nil; } size_t count = CGImageSourceGetCount(source); UIImage *animatedImage; BOOL decodeFirstFrame = [options[SDImageCoderDecodeFirstFrameOnly] boolValue]; if (decodeFirstFrame || count <= 1) { animatedImage = [[UIImage alloc] initWithData:data scale:scale]; } else { NSMutableArray<SDImageFrame *> *frames = [NSMutableArray array]; for (size_t i = 0; i < count; i++) { CGImageRef imageRef = CGImageSourceCreateImageAtIndex(source, i, NULL); if (!imageRef) { continue; } float duration = [self sd_frameDurationAtIndex:i source:source]; UIImage *image = [[UIImage alloc] initWithCGImage:imageRef scale:scale orientation:UIImageOrientationUp]; CGImageRelease(imageRef); SDImageFrame *frame = [SDImageFrame frameWithImage:image duration:duration]; [frames addObject:frame]; } NSUInteger loopCount = [self sd_imageLoopCountWithSource:source]; animatedImage = [SDImageCoderHelper animatedImageWithFrames:frames]; animatedImage.sd_imageLoopCount = loopCount; } animatedImage.sd_imageFormat = SDImageFormatGIF; CFRelease(source); return animatedImage; #endif } - (NSUInteger)sd_imageLoopCountWithSource:(CGImageSourceRef)source { NSUInteger loopCount = 1; NSDictionary *imageProperties = (__bridge_transfer NSDictionary *)CGImageSourceCopyProperties(source, nil); NSDictionary *gifProperties = imageProperties[(__bridge NSString *)kCGImagePropertyGIFDictionary]; if (gifProperties) { NSNumber *gifLoopCount = gifProperties[(__bridge NSString *)kCGImagePropertyGIFLoopCount]; if (gifLoopCount != nil) { loopCount = gifLoopCount.unsignedIntegerValue; } } return loopCount; } - (float)sd_frameDurationAtIndex:(NSUInteger)index source:(CGImageSourceRef)source { float frameDuration = 0.1f; CFDictionaryRef cfFrameProperties = CGImageSourceCopyPropertiesAtIndex(source, index, nil); if (!cfFrameProperties) { return frameDuration; } NSDictionary *frameProperties = (__bridge NSDictionary *)cfFrameProperties; NSDictionary *gifProperties = frameProperties[(NSString *)kCGImagePropertyGIFDictionary]; NSNumber *delayTimeUnclampedProp = gifProperties[(NSString *)kCGImagePropertyGIFUnclampedDelayTime]; if (delayTimeUnclampedProp != nil) { frameDuration = [delayTimeUnclampedProp floatValue]; } else { NSNumber *delayTimeProp = gifProperties[(NSString *)kCGImagePropertyGIFDelayTime]; if (delayTimeProp != nil) { frameDuration = [delayTimeProp floatValue]; } } // Many annoying ads specify a 0 duration to make an image flash as quickly as possible. // We follow Firefox's behavior and use a duration of 100 ms for any frames that specify // a duration of <= 10 ms. See <rdar://problem/7689300> and <http://webkit.org/b/36082> // for more information. if (frameDuration < 0.011f) { frameDuration = 0.100f; } CFRelease(cfFrameProperties); return frameDuration; } #pragma mark - Progressive Decode - (BOOL)canIncrementalDecodeFromData:(NSData *)data { return ([NSData sd_imageFormatForImageData:data] == SDImageFormatGIF); } - (instancetype)initIncrementalWithOptions:(nullable SDImageCoderOptions *)options { self = [super init]; if (self) { CFStringRef imageUTType = [NSData sd_UTTypeFromImageFormat:SDImageFormatGIF]; _imageSource = CGImageSourceCreateIncremental((__bridge CFDictionaryRef)@{(__bridge NSString *)kCGImageSourceTypeIdentifierHint : (__bridge NSString *)imageUTType}); CGFloat scale = 1; NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor]; if (scaleFactor != nil) { scale = MAX([scaleFactor doubleValue], 1); } _scale = scale; #if SD_UIKIT [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; #endif } return self; } - (void)updateIncrementalData:(NSData *)data finished:(BOOL)finished { if (_finished) { return; } _imageData = data; _finished = finished; // The following code is from http://www.cocoaintheshell.com/2011/05/progressive-images-download-imageio/ // Thanks to the author @Nyx0uf // Update the data source, we must pass ALL the data, not just the new bytes CGImageSourceUpdateData(_imageSource, (__bridge CFDataRef)data, finished); if (_width + _height == 0) { CFDictionaryRef properties = CGImageSourceCopyPropertiesAtIndex(_imageSource, 0, NULL); if (properties) { CFTypeRef val = CFDictionaryGetValue(properties, kCGImagePropertyPixelHeight); if (val) CFNumberGetValue(val, kCFNumberLongType, &_height); val = CFDictionaryGetValue(properties, kCGImagePropertyPixelWidth); if (val) CFNumberGetValue(val, kCFNumberLongType, &_width); CFRelease(properties); } } // For animated image progressive decoding because the frame count and duration may be changed. [self scanAndCheckFramesValidWithImageSource:_imageSource]; } - (UIImage *)incrementalDecodedImageWithOptions:(SDImageCoderOptions *)options { UIImage *image; if (_width + _height > 0) { // Create the image CGImageRef partialImageRef = CGImageSourceCreateImageAtIndex(_imageSource, 0, NULL); if (partialImageRef) { CGFloat scale = _scale; NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor]; if (scaleFactor != nil) { scale = MAX([scaleFactor doubleValue], 1); } #if SD_UIKIT || SD_WATCH image = [[UIImage alloc] initWithCGImage:partialImageRef scale:scale orientation:UIImageOrientationUp]; #else image = [[UIImage alloc] initWithCGImage:partialImageRef scale:scale orientation:kCGImagePropertyOrientationUp]; #endif CGImageRelease(partialImageRef); image.sd_imageFormat = SDImageFormatGIF; } } return image; } #pragma mark - Encode - (BOOL)canEncodeToFormat:(SDImageFormat)format { return (format == SDImageFormatGIF); } - (NSData *)encodedDataWithImage:(UIImage *)image format:(SDImageFormat)format options:(nullable SDImageCoderOptions *)options { if (!image) { return nil; } if (format != SDImageFormatGIF) { return nil; } NSMutableData *imageData = [NSMutableData data]; CFStringRef imageUTType = [NSData sd_UTTypeFromImageFormat:SDImageFormatGIF]; NSArray<SDImageFrame *> *frames = [SDImageCoderHelper framesFromAnimatedImage:image]; // Create an image destination. GIF does not support EXIF image orientation // The `CGImageDestinationCreateWithData` will log a warning when count is 0, use 1 instead. CGImageDestinationRef imageDestination = CGImageDestinationCreateWithData((__bridge CFMutableDataRef)imageData, imageUTType, frames.count ?: 1, NULL); if (!imageDestination) { // Handle failure. return nil; } NSMutableDictionary *properties = [NSMutableDictionary dictionary]; double compressionQuality = 1; if (options[SDImageCoderEncodeCompressionQuality]) { compressionQuality = [options[SDImageCoderEncodeCompressionQuality] doubleValue]; } properties[(__bridge NSString *)kCGImageDestinationLossyCompressionQuality] = @(compressionQuality); BOOL encodeFirstFrame = [options[SDImageCoderEncodeFirstFrameOnly] boolValue]; if (encodeFirstFrame || frames.count == 0) { // for static single GIF images CGImageDestinationAddImage(imageDestination, image.CGImage, (__bridge CFDictionaryRef)properties); } else { // for animated GIF images NSUInteger loopCount = image.sd_imageLoopCount; NSDictionary *gifProperties = @{(__bridge NSString *)kCGImagePropertyGIFLoopCount : @(loopCount)}; properties[(__bridge NSString *)kCGImagePropertyGIFDictionary] = gifProperties; CGImageDestinationSetProperties(imageDestination, (__bridge CFDictionaryRef)properties); for (size_t i = 0; i < frames.count; i++) { SDImageFrame *frame = frames[i]; float frameDuration = frame.duration; CGImageRef frameImageRef = frame.image.CGImage; NSDictionary *frameProperties = @{(__bridge NSString *)kCGImagePropertyGIFDictionary : @{(__bridge NSString *)kCGImagePropertyGIFDelayTime : @(frameDuration)}}; CGImageDestinationAddImage(imageDestination, frameImageRef, (__bridge CFDictionaryRef)frameProperties); } } // Finalize the destination. if (CGImageDestinationFinalize(imageDestination) == NO) { // Handle failure. imageData = nil; } CFRelease(imageDestination); return [imageData copy]; } #pragma mark - SDAnimatedImageCoder - (nullable instancetype)initWithAnimatedImageData:(nullable NSData *)data options:(nullable SDImageCoderOptions *)options { if (!data) { return nil; } self = [super init]; if (self) { CGImageSourceRef imageSource = CGImageSourceCreateWithData((__bridge CFDataRef)data, NULL); if (!imageSource) { return nil; } BOOL framesValid = [self scanAndCheckFramesValidWithImageSource:imageSource]; if (!framesValid) { CFRelease(imageSource); return nil; } CGFloat scale = 1; NSNumber *scaleFactor = options[SDImageCoderDecodeScaleFactor]; if (scaleFactor != nil) { scale = MAX([scaleFactor doubleValue], 1); } _scale = scale; _imageSource = imageSource; _imageData = data; #if SD_UIKIT [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(didReceiveMemoryWarning:) name:UIApplicationDidReceiveMemoryWarningNotification object:nil]; #endif } return self; } - (BOOL)scanAndCheckFramesValidWithImageSource:(CGImageSourceRef)imageSource { if (!imageSource) { return NO; } NSUInteger frameCount = CGImageSourceGetCount(imageSource); NSUInteger loopCount = [self sd_imageLoopCountWithSource:imageSource]; NSMutableArray<SDGIFCoderFrame *> *frames = [NSMutableArray array]; for (size_t i = 0; i < frameCount; i++) { SDGIFCoderFrame *frame = [[SDGIFCoderFrame alloc] init]; frame.index = i; frame.duration = [self sd_frameDurationAtIndex:i source:imageSource]; [frames addObject:frame]; } _frameCount = frameCount; _loopCount = loopCount; _frames = [frames copy]; return YES; } - (NSData *)animatedImageData { return _imageData; } - (NSUInteger)animatedImageLoopCount { return _loopCount; } - (NSUInteger)animatedImageFrameCount { return _frameCount; } - (NSTimeInterval)animatedImageDurationAtIndex:(NSUInteger)index { if (index >= _frameCount) { return 0; } return _frames[index].duration; } - (UIImage *)animatedImageFrameAtIndex:(NSUInteger)index { CGImageRef imageRef = CGImageSourceCreateImageAtIndex(_imageSource, index, NULL); if (!imageRef) { return nil; } // Image/IO create CGImage does not decode, so we do this because this is called background queue, this can avoid main queue block when rendering(especially when one more imageViews use the same image instance) CGImageRef newImageRef = [SDImageCoderHelper CGImageCreateDecoded:imageRef]; if (!newImageRef) { newImageRef = imageRef; } else { CGImageRelease(imageRef); } #if SD_MAC UIImage *image = [[UIImage alloc] initWithCGImage:newImageRef scale:_scale orientation:kCGImagePropertyOrientationUp]; #else UIImage *image = [[UIImage alloc] initWithCGImage:newImageRef scale:_scale orientation:UIImageOrientationUp]; #endif CGImageRelease(newImageRef); return image; } @end
{ "pile_set_name": "Github" }
const Rx = require('./index'); const GroupSubscription = require('./GroupSubscription'); /** * Rx.Observable.prototype.mergeMap = require('toy-rx/mergeMap'); */ module.exports = function mergeMap(transformFn) { const inObservable = this; const outObservable = Rx.Observable.create(function subscribe(outObserver) { const subscription = new GroupSubscription(); let active = 0; const inObserver = { next: (x) => { try { var inner = transformFn(x); } catch (e) { outObserver.error(e); return; } const innerObserver = { next: (y) => outObserver.next(y), error: (e) => outObserver.error(e), complete: () => { if (--active === 0) { outObserver.complete(); } } } active++; subscription.add(inner.subscribe(innerObserver)); }, error: (e) => { outObserver.error(e); }, complete: () => { if (--active === 0) { outObserver.complete(); } } }; active++; subscription.add(inObservable.subscribe(inObserver)); return subscription; }); return outObservable; }
{ "pile_set_name": "Github" }
/** * Copyright (C) 2001-2020 by RapidMiner and the contributors * * Complete list of developers available at our web site: * * http://rapidminer.com * * This program is free software: you can redistribute it and/or modify it under the terms of the * GNU Affero General Public License as published by the Free Software Foundation, either version 3 * of the License, or (at your option) any later version. * * 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 * Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License along with this program. * If not, see http://www.gnu.org/licenses/. */ package com.rapidminer.connection.gui.model; import org.apache.commons.lang.RandomStringUtils; import org.apache.commons.lang.math.RandomUtils; import org.junit.Assert; import org.junit.Test; /** * Test for {@link ConnectionParameterGroupModel} * @author Jonas Wilms-Pfau * @since 9.3 */ public class ConnectionParameterGroupModelTest { private final String groupName = RandomStringUtils.randomAlphabetic(10); private final String name = RandomStringUtils.randomAlphabetic(10); private final String value = RandomStringUtils.randomAlphabetic(10); private final boolean isEncrypted = RandomUtils.nextBoolean(); private final String injectorName = RandomStringUtils.randomAlphabetic(10); private final boolean isEnabled = RandomUtils.nextBoolean(); @Test public void testConnectionParameterGroupModel() { ConnectionParameterGroupModel model = new ConnectionParameterGroupModel(null, groupName); ConnectionParameterGroupModel clone = model.copyDataOnly(); Assert.assertEquals(groupName, clone.getName()); clone.addOrSetParameter(name, value, !isEncrypted, injectorName, !isEnabled); clone.addOrSetParameter(name, value, isEncrypted, injectorName, isEnabled); ConnectionParameterGroupModel clone2 = clone.copyDataOnly(); clone.removeParameter(name); Assert.assertEquals(0, clone.getParameters().size()); Assert.assertEquals(1, clone2.getParameters().size()); Assert.assertEquals(isEncrypted, clone2.getParameters().get(0).isEncrypted()); Assert.assertTrue(clone2.getParameters().get(0).isInjected()); Assert.assertEquals(isEnabled, clone2.getParameters().get(0).isEnabled()); } }
{ "pile_set_name": "Github" }
#!/bin/bash # Exit hook on subcommand error or unset variable set -eu # Source YNH helpers source /usr/share/yunohost/helpers # Backup destination backup_dir="${1}/data/mail" # Backup mails ynh_backup /var/mail "$backup_dir" 1
{ "pile_set_name": "Github" }
#[doc = "Reader of register CC[%s]"] pub type R = crate::R<u32, super::CC>; #[doc = "Writer for register CC[%s]"] pub type W = crate::W<u32, super::CC>; #[doc = "Register CC[%s] `reset()`'s with value 0"] impl crate::ResetValue for super::CC { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `CC`"] pub type CC_R = crate::R<u16, u16>; #[doc = "Write proxy for field `CC`"] pub struct CC_W<'a> { w: &'a mut W, } impl<'a> CC_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { #[doc = "Bits 0:15 - Channel Compare Value"] #[inline(always)] pub fn cc(&self) -> CC_R { CC_R::new((self.bits & 0xffff) as u16) } } impl W { #[doc = "Bits 0:15 - Channel Compare Value"] #[inline(always)] pub fn cc(&mut self) -> CC_W { CC_W { w: self } } }
{ "pile_set_name": "Github" }
FILE(REMOVE_RECURSE "../msg_gen" "../msg_gen" "../src/quadrotor_msgs/msg" "CMakeFiles/rosbuild_premsgsrvgen" ) # Per-language clean rules from dependency scanning. FOREACH(lang) INCLUDE(CMakeFiles/rosbuild_premsgsrvgen.dir/cmake_clean_${lang}.cmake OPTIONAL) ENDFOREACH(lang)
{ "pile_set_name": "Github" }
ROLE_SYSTEM_DOCUMENT READONLY FOCUSABLE offset:0 ia2_hypertext='<obj0>' ++IA2_ROLE_PARAGRAPH offset:0 offset:18 text-position:super offset:29 ia2_hypertext='This text containssuperscripttext.' ++++ROLE_SYSTEM_STATICTEXT name='This text contains' offset:0 ia2_hypertext='This text contains' ++++ROLE_SYSTEM_STATICTEXT name='superscript' offset:0 text-position:super ia2_hypertext='superscript' ++++ROLE_SYSTEM_STATICTEXT name='text.' offset:0 ia2_hypertext='text.'
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>第 46 章 Mongo Admin UI</title><link rel="stylesheet" type="text/css" href="..//docbook.css" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><meta name="keywords" content="mongodb, mongo" /><meta name="keywords" content="MySQL, PostgreSQL, Oracle, NoSQL, ER, TokyoCabinet/Tyrant, Memcache, Membase, Redis, Flare, Voldemort, LevelDB, MongoDB, GreenSQL, RDBMS, ORDBMS" /><link rel="home" href="../index.html" title="Netkiller Database 手札" /><link rel="up" href="index.html" title="部分 V. MongoDB" /><link rel="prev" href="mongodb.script.html" title="45.15. Javascript 脚本" /><link rel="next" href="mongovue.html" title="46.2. MongoVUE" /></head><body><a xmlns="" href="//www.netkiller.cn/">Home</a> | <a xmlns="" href="//netkiller.github.io/">简体中文</a> | <a xmlns="" href="http://netkiller.sourceforge.net/">繁体中文</a> | <a xmlns="" href="/journal/index.html">杂文</a> | <a xmlns="" href="//www.netkiller.cn/home/donations.html">打赏(Donations)</a> | <a xmlns="" href="https://github.com/netkiller">Github</a> | <a xmlns="" href="http://my.oschina.net/neochen/">OSChina 博客</a> | <a xmlns="" href="https://cloud.tencent.com/developer/column/2078">云社区</a> | <a xmlns="" href="https://yq.aliyun.com/u/netkiller/">云栖社区</a> | <a xmlns="" href="https://www.facebook.com/bg7nyt">Facebook</a> | <a xmlns="" href="http://cn.linkedin.com/in/netkiller/">Linkedin</a> | <a xmlns="" href="https://zhuanlan.zhihu.com/netkiller">知乎专栏</a> | <a xmlns="" href="//www.netkiller.cn/home/video.html">视频教程</a> | <a xmlns="" href="//www.netkiller.cn/home/about.html">About</a><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">第 46 章 Mongo Admin UI</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="mongodb.script.html">上一页</a> </td><th width="60%" align="center">部分 V. MongoDB</th><td width="20%" align="right"> <a accesskey="n" href="mongovue.html">下一页</a></td></tr></table><hr /></div><table xmlns=""><tr><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=watch&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;repo=netkiller.github.io&amp;type=fork&amp;count=true&amp;size=large" height="30" width="170" frameborder="0" scrolling="0" style="width:170px; height: 30px;" allowTransparency="true"></iframe></td><td><iframe src="//ghbtns.com/github-btn.html?user=netkiller&amp;type=follow&amp;count=true&amp;size=large" height="30" width="240" frameborder="0" scrolling="0" style="width:240px; height: 30px;" allowTransparency="true"></iframe></td></tr></table><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a id="mongo.gui"></a>第 46 章 Mongo Admin UI</h2></div></div></div><div class="toc"><p><strong>目录</strong></p><dl class="toc"><dt><span class="section"><a href="mongo.gui.html#rockmongo">46.1. RockMongo</a></span></dt><dt><span class="section"><a href="mongovue.html">46.2. MongoVUE</a></span></dt></dl></div> <p>http://docs.mongodb.org/ecosystem/tools/administration-interfaces/</p> <div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="rockmongo"></a>46.1. RockMongo</h2></div></div></div> <p> <a class="ulink" href="http://code.google.com/p/rock-php/" target="_top">http://code.google.com/p/rock-php/</a> </p> </div> </div><div xmlns="" id="disqus_thread"></div><script xmlns=""> var disqus_config = function () { this.page.url = "http://www.netkiller.cn"; // Replace PAGE_URL with your page's canonical URL variable this.page.identifier = 'netkiller'; // Replace PAGE_IDENTIFIER with your page's unique identifier variable }; (function() { // DON'T EDIT BELOW THIS LINE var d = document, s = d.createElement('script'); s.src = '//netkiller.disqus.com/embed.js'; s.setAttribute('data-timestamp', +new Date()); (d.head || d.body).appendChild(s); })(); </script><noscript xmlns="">Please enable JavaScript to view the <a href="https://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><br xmlns="" /><script xmlns="" type="text/javascript" id="clustrmaps" src="//cdn.clustrmaps.com/map_v2.js?u=r5HG&amp;d=9mi5r_kkDC8uxG8HuY3p4-2qgeeVypAK9vMD-2P6BYM"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="mongodb.script.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="index.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="mongovue.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">45.15. Javascript 脚本 </td><td width="20%" align="center"><a accesskey="h" href="../index.html">起始页</a></td><td width="40%" align="right" valign="top"> 46.2. MongoVUE</td></tr></table></div><script xmlns=""> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-11694057-1', 'auto'); ga('send', 'pageview'); </script><script xmlns="" async="async"> var _hmt = _hmt || []; (function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?93967759a51cda79e49bf4e34d0b0f2c"; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s); })(); </script><script xmlns="" async="async"> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script><script xmlns="" type="text/javascript" src="/js/q.js" async="async"></script></body></html>
{ "pile_set_name": "Github" }
/* Copyright(c) 2016 Panos Karabelas 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. */ #pragma once //= INCLUDES ============== #include <QWidget> #include <QLineEdit> #include <QDoubleValidator> //========================= class DirectusAdjustLabel; class DirectusComboLabelText : public QWidget { Q_OBJECT public: explicit DirectusComboLabelText(QWidget *parent = 0); void Initialize(QString labelText); void AlignLabelToTheLeft(); void AlignLabelToTheRight(); DirectusAdjustLabel* GetLabelWidget(); QLineEdit* GetTextWidget(); float GetAsFloat(); void SetFromFloat(float value); private: DirectusAdjustLabel* m_label; QLineEdit* m_text; QValidator* m_validator; signals: void ValueChanged(); public slots: void TextGotEdited(); };
{ "pile_set_name": "Github" }
// Copyright 2010 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // TODO(gri) consider making this a separate package outside the go directory. package token import ( "fmt" "sort" "sync" ) // ----------------------------------------------------------------------------- // Positions // Position describes an arbitrary source position // including the file, line, and column location. // A Position is valid if the line number is > 0. // type Position struct { Filename string // filename, if any Offset int // offset, starting at 0 Line int // line number, starting at 1 Column int // column number, starting at 1 (character count) } // IsValid returns true if the position is valid. func (pos *Position) IsValid() bool { return pos.Line > 0 } // String returns a string in one of several forms: // // file:line:column valid position with file name // line:column valid position without file name // file invalid position with file name // - invalid position without file name // func (pos Position) String() string { s := pos.Filename if pos.IsValid() { if s != "" { s += ":" } s += fmt.Sprintf("%d:%d", pos.Line, pos.Column) } if s == "" { s = "-" } return s } // Pos is a compact encoding of a source position within a file set. // It can be converted into a Position for a more convenient, but much // larger, representation. // // The Pos value for a given file is a number in the range [base, base+size], // where base and size are specified when adding the file to the file set via // AddFile. // // To create the Pos value for a specific source offset, first add // the respective file to the current file set (via FileSet.AddFile) // and then call File.Pos(offset) for that file. Given a Pos value p // for a specific file set fset, the corresponding Position value is // obtained by calling fset.Position(p). // // Pos values can be compared directly with the usual comparison operators: // If two Pos values p and q are in the same file, comparing p and q is // equivalent to comparing the respective source file offsets. If p and q // are in different files, p < q is true if the file implied by p was added // to the respective file set before the file implied by q. // type Pos int // The zero value for Pos is NoPos; there is no file and line information // associated with it, and NoPos().IsValid() is false. NoPos is always // smaller than any other Pos value. The corresponding Position value // for NoPos is the zero value for Position. // const NoPos Pos = 0 // IsValid returns true if the position is valid. func (p Pos) IsValid() bool { return p != NoPos } // ----------------------------------------------------------------------------- // File // A File is a handle for a file belonging to a FileSet. // A File has a name, size, and line offset table. // type File struct { set *FileSet name string // file name as provided to AddFile base int // Pos value range for this file is [base...base+size] size int // file size as provided to AddFile // lines and infos are protected by set.mutex lines []int infos []lineInfo } // Name returns the file name of file f as registered with AddFile. func (f *File) Name() string { return f.name } // Base returns the base offset of file f as registered with AddFile. func (f *File) Base() int { return f.base } // Size returns the size of file f as registered with AddFile. func (f *File) Size() int { return f.size } // LineCount returns the number of lines in file f. func (f *File) LineCount() int { f.set.mutex.RLock() n := len(f.lines) f.set.mutex.RUnlock() return n } // AddLine adds the line offset for a new line. // The line offset must be larger than the offset for the previous line // and smaller than the file size; otherwise the line offset is ignored. // func (f *File) AddLine(offset int) { f.set.mutex.Lock() if i := len(f.lines); (i == 0 || f.lines[i-1] < offset) && offset < f.size { f.lines = append(f.lines, offset) } f.set.mutex.Unlock() } // SetLines sets the line offsets for a file and returns true if successful. // The line offsets are the offsets of the first character of each line; // for instance for the content "ab\nc\n" the line offsets are {0, 3}. // An empty file has an empty line offset table. // Each line offset must be larger than the offset for the previous line // and smaller than the file size; otherwise SetLines fails and returns // false. // func (f *File) SetLines(lines []int) bool { // verify validity of lines table size := f.size for i, offset := range lines { if i > 0 && offset <= lines[i-1] || size <= offset { return false } } // set lines table f.set.mutex.Lock() f.lines = lines f.set.mutex.Unlock() return true } // SetLinesForContent sets the line offsets for the given file content. func (f *File) SetLinesForContent(content []byte) { var lines []int line := 0 for offset, b := range content { if line >= 0 { lines = append(lines, line) } line = -1 if b == '\n' { line = offset + 1 } } // set lines table f.set.mutex.Lock() f.lines = lines f.set.mutex.Unlock() } // A lineInfo object describes alternative file and line number // information (such as provided via a //line comment in a .go // file) for a given file offset. type lineInfo struct { // fields are exported to make them accessible to gob Offset int Filename string Line int } // AddLineInfo adds alternative file and line number information for // a given file offset. The offset must be larger than the offset for // the previously added alternative line info and smaller than the // file size; otherwise the information is ignored. // // AddLineInfo is typically used to register alternative position // information for //line filename:line comments in source files. // func (f *File) AddLineInfo(offset int, filename string, line int) { f.set.mutex.Lock() if i := len(f.infos); i == 0 || f.infos[i-1].Offset < offset && offset < f.size { f.infos = append(f.infos, lineInfo{offset, filename, line}) } f.set.mutex.Unlock() } // Pos returns the Pos value for the given file offset; // the offset must be <= f.Size(). // f.Pos(f.Offset(p)) == p. // func (f *File) Pos(offset int) Pos { if offset > f.size { panic("illegal file offset") } return Pos(f.base + offset) } // Offset returns the offset for the given file position p; // p must be a valid Pos value in that file. // f.Offset(f.Pos(offset)) == offset. // func (f *File) Offset(p Pos) int { if int(p) < f.base || int(p) > f.base+f.size { panic("illegal Pos value") } return int(p) - f.base } // Line returns the line number for the given file position p; // p must be a Pos value in that file or NoPos. // func (f *File) Line(p Pos) int { // TODO(gri) this can be implemented much more efficiently return f.Position(p).Line } func searchLineInfos(a []lineInfo, x int) int { return sort.Search(len(a), func(i int) bool { return a[i].Offset > x }) - 1 } // info returns the file name, line, and column number for a file offset. func (f *File) info(offset int) (filename string, line, column int) { filename = f.name if i := searchInts(f.lines, offset); i >= 0 { line, column = i+1, offset-f.lines[i]+1 } if len(f.infos) > 0 { // almost no files have extra line infos if i := searchLineInfos(f.infos, offset); i >= 0 { alt := &f.infos[i] filename = alt.Filename if i := searchInts(f.lines, alt.Offset); i >= 0 { line += alt.Line - i - 1 } } } return } func (f *File) position(p Pos) (pos Position) { offset := int(p) - f.base pos.Offset = offset pos.Filename, pos.Line, pos.Column = f.info(offset) return } // Position returns the Position value for the given file position p; // p must be a Pos value in that file or NoPos. // func (f *File) Position(p Pos) (pos Position) { if p != NoPos { if int(p) < f.base || int(p) > f.base+f.size { panic("illegal Pos value") } pos = f.position(p) } return } // ----------------------------------------------------------------------------- // FileSet // A FileSet represents a set of source files. // Methods of file sets are synchronized; multiple goroutines // may invoke them concurrently. // type FileSet struct { mutex sync.RWMutex // protects the file set base int // base offset for the next file files []*File // list of files in the order added to the set last *File // cache of last file looked up } // NewFileSet creates a new file set. func NewFileSet() *FileSet { s := new(FileSet) s.base = 1 // 0 == NoPos return s } // Base returns the minimum base offset that must be provided to // AddFile when adding the next file. // func (s *FileSet) Base() int { s.mutex.RLock() b := s.base s.mutex.RUnlock() return b } // AddFile adds a new file with a given filename, base offset, and file size // to the file set s and returns the file. Multiple files may have the same // name. The base offset must not be smaller than the FileSet's Base(), and // size must not be negative. // // Adding the file will set the file set's Base() value to base + size + 1 // as the minimum base value for the next file. The following relationship // exists between a Pos value p for a given file offset offs: // // int(p) = base + offs // // with offs in the range [0, size] and thus p in the range [base, base+size]. // For convenience, File.Pos may be used to create file-specific position // values from a file offset. // func (s *FileSet) AddFile(filename string, base, size int) *File { s.mutex.Lock() defer s.mutex.Unlock() if base < s.base || size < 0 { panic("illegal base or size") } // base >= s.base && size >= 0 f := &File{s, filename, base, size, []int{0}, nil} base += size + 1 // +1 because EOF also has a position if base < 0 { panic("token.Pos offset overflow (> 2G of source code in file set)") } // add the file to the file set s.base = base s.files = append(s.files, f) s.last = f return f } // Iterate calls f for the files in the file set in the order they were added // until f returns false. // func (s *FileSet) Iterate(f func(*File) bool) { for i := 0; ; i++ { var file *File s.mutex.RLock() if i < len(s.files) { file = s.files[i] } s.mutex.RUnlock() if file == nil || !f(file) { break } } } func searchFiles(a []*File, x int) int { return sort.Search(len(a), func(i int) bool { return a[i].base > x }) - 1 } func (s *FileSet) file(p Pos) *File { // common case: p is in last file if f := s.last; f != nil && f.base <= int(p) && int(p) <= f.base+f.size { return f } // p is not in last file - search all files if i := searchFiles(s.files, int(p)); i >= 0 { f := s.files[i] // f.base <= int(p) by definition of searchFiles if int(p) <= f.base+f.size { s.last = f return f } } return nil } // File returns the file that contains the position p. // If no such file is found (for instance for p == NoPos), // the result is nil. // func (s *FileSet) File(p Pos) (f *File) { if p != NoPos { s.mutex.RLock() f = s.file(p) s.mutex.RUnlock() } return } // Position converts a Pos in the fileset into a general Position. func (s *FileSet) Position(p Pos) (pos Position) { if p != NoPos { s.mutex.RLock() if f := s.file(p); f != nil { pos = f.position(p) } s.mutex.RUnlock() } return } // ----------------------------------------------------------------------------- // Helper functions func searchInts(a []int, x int) int { // This function body is a manually inlined version of: // // return sort.Search(len(a), func(i int) bool { return a[i] > x }) - 1 // // With better compiler optimizations, this may not be needed in the // future, but at the moment this change improves the go/printer // benchmark performance by ~30%. This has a direct impact on the // speed of gofmt and thus seems worthwhile (2011-04-29). // TODO(gri): Remove this when compilers have caught up. i, j := 0, len(a) for i < j { h := i + (j-i)/2 // avoid overflow when computing h // i ≤ h < j if a[h] <= x { i = h + 1 } else { j = h } } return i - 1 }
{ "pile_set_name": "Github" }
// A facebook graph api client in go. // https://github.com/huandu/facebook/ // // Copyright 2012, Huan Du // Licensed under the MIT license // https://github.com/huandu/facebook/blob/master/LICENSE // Package facebook is a Go library fully supports Facebook Graph API with // file upload and batch request. It can be used in Google App Engine. // // Library design is highly influenced by facebook official PHP/JS SDK. // If you have experience with PHP/JS SDK, you may feel quite familiar with it. // // Go to project home page to see samples. Link: https://github.com/huandu/facebook package facebook import ( "net/http" ) // Facebook graph api methods. const ( GET Method = "GET" POST Method = "POST" DELETE Method = "DELETE" PUT Method = "PUT" ) var ( // Version is the default facebook api version. // It can be any valid version string (e.g. "v2.3") or empty. // // See https://developers.facebook.com/docs/apps/versions for details. Version string // Debug is the app level debug mode. // After setting DebugMode, all newly created session will use the mode // to communicate with graph API. // // See https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#debugging Debug DebugMode // RFC3339Timestamps will cause all requests to return RFC3339 formatted timestamps. // RFC3339 is the timestamp format that the built in UnmarshalJSON expects. RFC3339Timestamps bool ) var ( // default facebook session. defaultSession = &Session{} ) // DebugMode is the debug mode of Graph API. // See https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#graphapidebugmode type DebugMode string // Method is HTTP method for an API call. // Can be GET, POST or DELETE. type Method string // Api makes a facebook graph api call with default session. // // Method can be GET, POST, DELETE or PUT. // // Params represents query strings in this call. // Keys and values in params will be encoded into the URL automatically, so there is // no need to encode keys or values in params manually. Params can be nil. // // If you want to get // https://graph.facebook.com/huandu?fields=name,username // Api should be called as following // Api("/huandu", GET, Params{"fields": "name,username"}) // or in a simplified way // Get("/huandu", Params{"fields": "name,username"}) // // Api is a wrapper of Session.Api(). It's designed for graph api that doesn't require // app id, app secret and access token. It can be called in multiple goroutines. // // If app id, app secret or access token is required in graph api, caller should // create a new facebook session through App instance instead. func Api(path string, method Method, params Params) (Result, error) { return defaultSession.Api(path, method, params) } // Get is a short hand of Api(path, GET, params). func Get(path string, params Params) (Result, error) { return Api(path, GET, params) } // Post is a short hand of Api(path, POST, params). func Post(path string, params Params) (Result, error) { return Api(path, POST, params) } // Delete is a short hand of Api(path, DELETE, params). func Delete(path string, params Params) (Result, error) { return Api(path, DELETE, params) } // Put is a short hand of Api(path, PUT, params). func Put(path string, params Params) (Result, error) { return Api(path, PUT, params) } // BatchApi makes a batch facebook graph api call with default session. // // BatchApi supports most kinds of batch calls defines in facebook batch api document, // except uploading binary data. Use Batch to do so. // // Note: API response is stored in "body" field of a Result. // results, _ := BatchApi(accessToken, Params{...}, Params{...}) // // // Use first batch api response. // var res1 *BatchResult // var err error // res1, err = results[0].Batch() // // if err != nil { // // this is not a valid batch api response. // } // // // Use BatchResult#Result to get response body content as Result. // res := res1.Result // // Facebook document: https://developers.facebook.com/docs/graph-api/making-multiple-requests func BatchApi(accessToken string, params ...Params) ([]Result, error) { return Batch(Params{"access_token": accessToken}, params...) } // Batch makes a batch facebook graph api call with default session. // Batch is designed for more advanced usage including uploading binary files. // // An uploading files sample // // equivalent to following curl command (borrowed from facebook docs) // // curl \ // // -F 'access_token=…' \ // // -F 'batch=[{"method":"POST","relative_url":"me/photos","body":"message=My cat photo","attached_files":"file1"},{"method":"POST","relative_url":"me/photos","body":"message=My dog photo","attached_files":"file2"}]' \ // // -F '[email protected]' \ // // -F '[email protected]' \ // // https://graph.facebook.com // Batch(Params{ // "access_token": "the-access-token", // "file1": File("cat.gif"), // "file2": File("dog.jpg"), // }, Params{ // "method": "POST", // "relative_url": "me/photos", // "body": "message=My cat photo", // "attached_files": "file1", // }, Params{ // "method": "POST", // "relative_url": "me/photos", // "body": "message=My dog photo", // "attached_files": "file2", // }) // // Facebook document: https://developers.facebook.com/docs/graph-api/making-multiple-requests func Batch(batchParams Params, params ...Params) ([]Result, error) { return defaultSession.Batch(batchParams, params...) } // Request makes an arbitrary HTTP request with default session. // It expects server responses a facebook Graph API response. // request, _ := http.NewRequest("https://graph.facebook.com/538744468", "GET", nil) // res, err := Request(request) // fmt.Println(res["gender"]) // get "male" func Request(request *http.Request) (Result, error) { return defaultSession.Request(request) } // DefaultHttpClient returns the http client for default session. func DefaultHttpClient() HttpClient { return defaultSession.HttpClient } // SetHttpClient updates the http client of default session. func SetHttpClient(client HttpClient) { defaultSession.HttpClient = client }
{ "pile_set_name": "Github" }
# Razzle and Redux Example ## How to use <!-- START install generated instructions please keep comment here to allow auto update --> <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN yarn update-examples TO UPDATE -->Create and start the example: ```bash npx create-razzle-app --example with-redux with-redux cd with-redux yarn start ``` <!-- END install generated instructions please keep comment here to allow auto update --> ## Idea behind the example Almost 100% of the code is taken from the [official Redux universal example](https://github.com/reactjs/redux/tree/master/examples/universal).
{ "pile_set_name": "Github" }
<resources> <!-- Default screen margins, per the Android Design guidelines. --> <dimen name="activity_horizontal_margin">16dp</dimen> <dimen name="activity_vertical_margin">16dp</dimen> <dimen name="fab_margin_right">0dp</dimen> <dimen name="fab_margin_bottom">0dp</dimen> <dimen name="title_text_size">20sp</dimen> <dimen name="bottom_menu_text_size">12sp</dimen> <dimen name="list_live_name_size">13sp</dimen> <dimen name="list_live_title_size">13sp</dimen> <dimen name="list_live_more_size">12sp</dimen> </resources>
{ "pile_set_name": "Github" }
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <[email protected]> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Finder\Iterator; /** * PathFilterIterator filters files by path patterns (e.g. some/special/dir). * * @author Fabien Potencier <[email protected]> * @author Włodzimierz Gajda <[email protected]> */ class PathFilterIterator extends MultiplePcreFilterIterator { /** * Filters the iterator values. * * @return Boolean true if the value should be kept, false otherwise */ public function accept() { $filename = $this->current()->getRelativePathname(); if (defined('PHP_WINDOWS_VERSION_MAJOR')) { $filename = strtr($filename, '\\', '/'); } // should at least not match one rule to exclude foreach ($this->noMatchRegexps as $regex) { if (preg_match($regex, $filename)) { return false; } } // should at least match one rule $match = true; if ($this->matchRegexps) { $match = false; foreach ($this->matchRegexps as $regex) { if (preg_match($regex, $filename)) { return true; } } } return $match; } /** * Converts strings to regexp. * * PCRE patterns are left unchanged. * * Default conversion: * 'lorem/ipsum/dolor' ==> 'lorem\/ipsum\/dolor/' * * Use only / as directory separator (on Windows also). * * @param string $str Pattern: regexp or dirname. * * @return string regexp corresponding to a given string or regexp */ protected function toRegex($str) { return $this->isRegex($str) ? $str : '/'.preg_quote($str, '/').'/'; } }
{ "pile_set_name": "Github" }
/*! * ee-first * Copyright(c) 2014 Jonathan Ong * MIT Licensed */ 'use strict' /** * Module exports. * @public */ module.exports = first /** * Get the first event in a set of event emitters and event pairs. * * @param {array} stuff * @param {function} done * @public */ function first(stuff, done) { if (!Array.isArray(stuff)) throw new TypeError('arg must be an array of [ee, events...] arrays') var cleanups = [] for (var i = 0; i < stuff.length; i++) { var arr = stuff[i] if (!Array.isArray(arr) || arr.length < 2) throw new TypeError('each array member must be [ee, events...]') var ee = arr[0] for (var j = 1; j < arr.length; j++) { var event = arr[j] var fn = listener(event, callback) // listen to the event ee.on(event, fn) // push this listener to the list of cleanups cleanups.push({ ee: ee, event: event, fn: fn, }) } } function callback() { cleanup() done.apply(null, arguments) } function cleanup() { var x for (var i = 0; i < cleanups.length; i++) { x = cleanups[i] x.ee.removeListener(x.event, x.fn) } } function thunk(fn) { done = fn } thunk.cancel = cleanup return thunk } /** * Create the event listener. * @private */ function listener(event, done) { return function onevent(arg1) { var args = new Array(arguments.length) var ee = this var err = event === 'error' ? arg1 : null // copy args to prevent arguments escaping scope for (var i = 0; i < args.length; i++) { args[i] = arguments[i] } done(err, ee, event, args) } }
{ "pile_set_name": "Github" }
// author: Jannik Strötgen // email: [email protected] // resources automatically created; see our EMNLP 2015 paper for details: // https://aclweb.org/anthology/D/D15/D15-1063.pdf // // english: "day","D" [Dd]joû // english: "week","W" [Ss]amwinne [Ss]amaîun // english: "century","CE" [Ss]ieke // english: "days","D" - no translation found // english: "weekend","WE" - no translation found // english: "month","M" - no translation found // english: "quarter","Q" - no translation found // english: "fiscal year","Y" - no translation found // english: "year","Y" - no translation found // english: "decade","DE" - no translation found
{ "pile_set_name": "Github" }
#ifndef HOTKEY_HH #define HOTKEY_HH #include "RTSchedulable.hh" #include "EventListener.hh" #include "Command.hh" #include <map> #include <string_view> #include <vector> #include <string> #include <memory> namespace openmsx { class Event; class RTScheduler; class GlobalCommandController; class EventDistributor; class XMLElement; class HotKey final : public RTSchedulable, public EventListener { public: using EventPtr = std::shared_ptr<const Event>; struct HotKeyInfo { HotKeyInfo(const EventPtr& event_, std::string command_, bool repeat_ = false, bool passEvent_ = false) : event(event_), command(std::move(command_)) , repeat(repeat_) , passEvent(passEvent_) {} EventPtr event; std::string command; bool repeat; bool passEvent; // whether to pass event with args back to command }; using BindMap = std::vector<HotKeyInfo>; // unsorted using KeySet = std::vector<EventPtr>; // unsorted HotKey(RTScheduler& rtScheduler, GlobalCommandController& commandController, EventDistributor& eventDistributor); ~HotKey(); void loadBindings(const XMLElement& config); void saveBindings(XMLElement& config) const; private: struct LayerInfo { std::string layer; bool blocking; }; void initDefaultBindings(); void bind (HotKeyInfo&& info); void unbind (const EventPtr& event); void bindDefault (HotKeyInfo&& info); void unbindDefault(const EventPtr& event); void bindLayer (HotKeyInfo&& info, const std::string& layer); void unbindLayer (const EventPtr& event, const std::string& layer); void unbindFullLayer(const std::string& layer); void activateLayer (std::string layer, bool blocking); void deactivateLayer(std::string_view layer); int executeEvent(const EventPtr& event); void executeBinding(const EventPtr& event, const HotKeyInfo& info); void startRepeat (const EventPtr& event); void stopRepeat(); // EventListener int signalEvent(const EventPtr& event) override; // RTSchedulable void executeRT() override; class BindCmd final : public Command { public: BindCmd(CommandController& commandController, HotKey& hotKey, bool defaultCmd); void execute(span<const TclObject> tokens, TclObject& result) override; std::string help(const std::vector<std::string>& tokens) const override; private: std::string formatBinding(const HotKey::BindMap::value_type& info); HotKey& hotKey; const bool defaultCmd; }; BindCmd bindCmd; BindCmd bindDefaultCmd; class UnbindCmd final : public Command { public: UnbindCmd(CommandController& commandController, HotKey& hotKey, bool defaultCmd); void execute(span<const TclObject> tokens, TclObject& result) override; std::string help(const std::vector<std::string>& tokens) const override; private: HotKey& hotKey; const bool defaultCmd; }; UnbindCmd unbindCmd; UnbindCmd unbindDefaultCmd; struct ActivateCmd final : Command { explicit ActivateCmd(CommandController& commandController); void execute(span<const TclObject> tokens, TclObject& result) override; std::string help(const std::vector<std::string>& tokens) const override; } activateCmd; struct DeactivateCmd final : Command { explicit DeactivateCmd(CommandController& commandController); void execute(span<const TclObject> tokens, TclObject& result) override; std::string help(const std::vector<std::string>& tokens) const override; } deactivateCmd; BindMap cmdMap; BindMap defaultMap; std::map<std::string, BindMap> layerMap; std::vector<LayerInfo> activeLayers; KeySet boundKeys; KeySet unboundKeys; GlobalCommandController& commandController; EventDistributor& eventDistributor; EventPtr lastEvent; }; } // namespace openmsx #endif
{ "pile_set_name": "Github" }
codecov: token: 294c42a9-29d1-41a7-beca-9a19d9b7af2e
{ "pile_set_name": "Github" }
# metisMenu [![Build Status](https://secure.travis-ci.org/onokumus/metisMenu.png?branch=master)](https://travis-ci.org/onokumus/metisMenu) > Easy menu jQuery plugin for Twitter Bootstrap 3 > Now support cdnjs & jsdelivr ## Installation * [npm](http://npmjs.org/) ```bash npm install metismenu ``` * [Bower](http://bower.io) ```bash bower install metisMenu ``` * [Download](https://github.com/onokumus/metisMenu/archive/master.zip) ## Usage 1. Include Twitter Bootstrap StyleSheet ```html <link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.0/css/bootstrap.min.css"> ``` 2. Include metisMenu StyleSheet ```html <link rel="stylesheet" href="//cdn.jsdelivr.net/bootstrap.metismenu/1.1.2/css/metismenu.min.css"> ``` 3. Include jQuery ```html <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> ``` 4. Include Twitter Bootstrap Script ```html <script src="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.0/js/bootstrap.min.js"></script> ``` 5. Include metisMenu plugin's code ```html <script src="//cdn.jsdelivr.net/bootstrap.metismenu/1.1.2/js/metismenu.min.js"></script> ``` 6. Call the plugin: ```javascript $("#menu").metisMenu(); ``` ### Options #### toggle Type: `Boolean` Default: `true` For auto collapse support. ```javascript $("#menu").metisMenu({ toggle: false }); ``` #### doubleTapToGo Type: `Boolean` Default: `false` For double tap support. ```javascript $("#menu").metisMenu({ doubleTapToGo: true }); ``` ### [DEMO](http://demo.onokumus.com/metisMenu/) Contains a simple HTML file to demonstrate metisMenu plugin. ### Release History **DATE** **VERSION** **CHANGES** * 2014-11-01 v1.1.3 Bootstrap 3.3.0 * 2014-07-07 v1.1.0 Add double tap functionality * 2014-06-24 v1.0.3 cdnjs support & rename plugin * 2014-06-18 v1.0.3 Create grunt task * 2014-06-10 v1.0.2 Fixed for IE8 & IE9 ## Author metisMenu was made with love by these guys and a bunch of awesome [contributors](https://github.com/onokumus/metisMenu/graphs/contributors). [![Osman Nuri Okumuş](https://0.gravatar.com/avatar/4fa374411129d6f574c33e4753ec402e?s=70)](http://onokumus.com) | --- | --- | --- | --- | --- | --- | --- [Osman Nuri Okumuş](http://onokumus.com) | ## License [MIT License](https://github.com/onokumus/metisMenu/blob/master/LICENSE)
{ "pile_set_name": "Github" }
/* * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * COMPONENT_NAME: shasta * * ORIGINS: 27 * * Licensed Materials - Property of IBM * 5639-D57 (C) COPYRIGHT International Business Machines Corp. 1997,1998,1999 * RMI-IIOP v1.0 * */ package com.sun.tools.corba.se.idl.som.idlemit; import java.util.Vector; import com.sun.tools.corba.se.idl.som.cff.Messages; /** * This is an implementation that handles * #pragma meta scoped_name string * where * <UL> * <LI> scoped_name == "::" separated scoped name * <LI> string == separated identifiers, such as "localonly", * "abstract", or "init". * D59407: NOTE: any non-white-space is grouped * as part of the identifier. * </UL> * * This pragma handler places a vector of Strings into the dynamicVariable() * part of the SymtabEntry. The key to access the dynamicVariable() * is com.sun.tools.corba.se.idl.som.idlemit.MetaPragma.metaKey * * It is possible to associate a meta pragma with a forward entry. * At some point after the parser has completed, * the method processForward(ForwardEntry entry) should be called * for each ForwardEntry so that the meta information can be folded from * the ForwardEntry into the corresponding InterfaceEntry. */ public class MetaPragma extends com.sun.tools.corba.se.idl.PragmaHandler { /* Class variables */ /* key to access the Cached meta info in com.sun.tools.corba.se.idl.SymtabEntry */ public static int metaKey = com.sun.tools.corba.se.idl.SymtabEntry.getVariableKey(); /** * Main entry point for the MetaPragma handler * @param pragma string for pragma name * @param currentToken next token in the input stream. * @return true if this is a meta pragma. */ public boolean process(String pragma, String currentToken) { if ( !pragma.equals("meta")) return false; com.sun.tools.corba.se.idl.SymtabEntry entry ; String msg; try { entry = scopedName(); if ( entry == null){ /* scoped name not found */ parseException(Messages.msg("idlemit.MetaPragma.scopedNameNotFound")); skipToEOL(); } else { msg = (currentToken()+ getStringToEOL()); // System.out.println(entry + ": " + msg); Vector v; v = (Vector) entry.dynamicVariable(metaKey); if ( v== null){ v = new Vector(); entry.dynamicVariable(metaKey, v); } parseMsg(v, msg); } } catch(Exception e){ // System.out.println("exception in MetaPragma"); } return true; } /** * Fold the meta info from the forward entry into its corresponding * interface entry. * @param forwardEntry the forward entry to process */ static public void processForward(com.sun.tools.corba.se.idl.ForwardEntry forwardEntry){ Vector forwardMeta; try { forwardMeta = (Vector)forwardEntry.dynamicVariable(metaKey); } catch (Exception e){ forwardMeta = null; } com.sun.tools.corba.se.idl.SymtabEntry forwardInterface = forwardEntry.type(); if (forwardMeta != null && forwardInterface!= null) { Vector interfaceMeta; try { interfaceMeta= (Vector)forwardInterface.dynamicVariable(metaKey); } catch ( Exception e){ interfaceMeta = null; } if ( interfaceMeta == null) { /* set */ try { forwardInterface.dynamicVariable(MetaPragma.metaKey, forwardMeta); } catch(Exception e){}; } else if (interfaceMeta != forwardMeta) { /* The above check is needed because sometimes a forward entry is processed more the once. Not sure why */ /* merge */ for (int i=0; i < forwardMeta.size(); i++){ try { Object obj = forwardMeta.elementAt(i); interfaceMeta.addElement(obj); } catch (Exception e){}; } } } } /** * parse pragma message and place into vector v. * @param v: vector to add message * @param msg: string of comma separated message, perhaps with comment. * This is implemented as a state machine as follows: * * State token next action * ----------------------------------------------------- * initial whitespace initial * initial SlashStar comment * initial SlashSlash final * initial no more final * initial text text add to text buffer * initial StarSlash initial * comment StarSlash initial * comment SlashStar comment * comment whitespace comment * comment SlashSlash comment * comment text comment * comment no more final * text text text add to buffer * text SlashStar comment put in vector * text whitespace initial put in vector * text SlashSlash final put in vector * text StarSlash initial put in vector * text no more final put in vector * */ private static int initialState = 0; private static int commentState = 1; private static int textState = 2; private static int finalState =3; private void parseMsg(Vector v, String msg){ int state = initialState; String text = ""; int index = 0; while ( state != finalState ){ boolean isNoMore = index >= msg.length(); char ch = ' '; boolean isSlashStar = false; boolean isSlashSlash = false; boolean isWhiteSpace = false; boolean isStarSlash = false; boolean isText = false; if (!isNoMore ){ ch = msg.charAt(index); if (ch == '/' && index+1 < msg.length()){ if (msg.charAt(index+1) == '/'){ isSlashSlash = true; index++; } else if (msg.charAt(index+1) == '*'){ isSlashStar= true; index++; } else isText = true; } else if (ch == '*' && index+1 < msg.length() ){ if (msg.charAt(index+1) == '/'){ isStarSlash = true; index++; } else isText = true; } else if ( Character.isSpace(ch) || (ch == ',') // 59601 || (ch == ';') ) // 59683 isWhiteSpace = true; else isText = true; } if (state == initialState){ if (isSlashStar){ state = commentState; } else if (isSlashSlash || isNoMore){ state = finalState; } else if (isText){ state = textState; text = text+ ch; } } else if (state == commentState){ if (isNoMore){ state = finalState; } else if ( isStarSlash){ state = initialState; } } else if (state == textState){ if (isNoMore || isStarSlash || isSlashSlash || isSlashStar || isWhiteSpace ){ if (!text.equals("")) { v.addElement(text); // System.err.println("adding " + text); text = ""; } if (isNoMore) state = finalState; else if (isSlashStar) state = commentState; else state = initialState; } else if (isText){ text = text+ch; } } index++; } } }
{ "pile_set_name": "Github" }
# # Author:: Noah Kantrowitz <[email protected]> # Cookbook Name:: supervisor # Provider:: service # # Copyright:: 2011, Opscode, Inc <[email protected]> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # action :enable do converge_by("Enabling #{ new_resource }") do enable_service end end action :disable do if current_resource.state == 'UNAVAILABLE' Chef::Log.info "#{new_resource} is already disabled." else converge_by("Disabling #{new_resource}") do disable_service end end end action :start do case current_resource.state when 'UNAVAILABLE' raise "Supervisor service #{new_resource.name} cannot be started because it does not exist" when 'RUNNING' Chef::Log.debug "#{ new_resource } is already started." when 'STARTING' Chef::Log.debug "#{ new_resource } is already starting." wait_til_state("RUNNING") else converge_by("Starting #{ new_resource }") do if not supervisorctl('start') raise "Supervisor service #{new_resource.name} was unable to be started" end end end end action :stop do case current_resource.state when 'UNAVAILABLE' raise "Supervisor service #{new_resource.name} cannot be stopped because it does not exist" when 'STOPPED' Chef::Log.debug "#{ new_resource } is already stopped." when 'STOPPING' Chef::Log.debug "#{ new_resource } is already stopping." wait_til_state("STOPPED") else converge_by("Stopping #{ new_resource }") do if not supervisorctl('stop') raise "Supervisor service #{new_resource.name} was unable to be stopped" end end end end action :restart do case current_resource.state when 'UNAVAILABLE' raise "Supervisor service #{new_resource.name} cannot be restarted because it does not exist" else converge_by("Restarting #{ new_resource }") do if not supervisorctl('restart') raise "Supervisor service #{new_resource.name} was unable to be started" end end end end def enable_service e = execute "supervisorctl update" do action :nothing user "root" end t = template "#{node['supervisor']['dir']}/#{new_resource.service_name}.conf" do source "program.conf.erb" cookbook "supervisor" owner "root" group "root" mode "644" variables :prog => new_resource notifies :run, "execute[supervisorctl update]", :immediately end t.run_action(:create) if t.updated? e.run_action(:run) end end def disable_service execute "supervisorctl update" do action :nothing user "root" end file "#{node['supervisor']['dir']}/#{new_resource.service_name}.conf" do action :delete notifies :run, "execute[supervisorctl update]", :immediately end end def supervisorctl(action) cmd = "supervisorctl #{action} #{cmd_line_args} | grep -v ERROR" result = Mixlib::ShellOut.new(cmd).run_command # Since we append grep to the command # The command will have an exit code of 1 upon failure # So 0 here means it was successful result.exitstatus == 0 end def cmd_line_args name = new_resource.service_name if new_resource.process_name != '%(program_name)s' name += ':*' end name end def get_current_state(service_name) result = Mixlib::ShellOut.new("supervisorctl status").run_command match = result.stdout.match("(^#{service_name}(\\:\\S+)?\\s*)([A-Z]+)(.+)") if match.nil? "UNAVAILABLE" else match[3] end end def load_current_resource @current_resource = Chef::Resource::SupervisorService.new(@new_resource.name) @current_resource.state = get_current_state(@new_resource.name) end def wait_til_state(state,max_tries=20) service = new_resource.service_name max_tries.times do return if get_current_state(service) == state Chef::Log.debug("Waiting for service #{service} to be in state #{state}") sleep 1 end raise "service #{service} not in state #{state} after #{max_tries} tries" end
{ "pile_set_name": "Github" }
#!/usr/bin/env bash # Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one # or more contributor license agreements. Licensed under the Elastic License; # you may not use this file except in compliance with the Elastic License. # Script to execute the upgrade test harness set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" ( cd "$SCRIPT_DIR" go run main.go "$@" )
{ "pile_set_name": "Github" }
path: "tensorflow.estimator" tf_module { member { name: "BaselineClassifier" mtype: "<type \'type\'>" } member { name: "BaselineEstimator" mtype: "<type \'type\'>" } member { name: "BaselineRegressor" mtype: "<type \'type\'>" } member { name: "BestExporter" mtype: "<type \'type\'>" } member { name: "BinaryClassHead" mtype: "<type \'type\'>" } member { name: "BoostedTreesClassifier" mtype: "<type \'type\'>" } member { name: "BoostedTreesEstimator" mtype: "<type \'type\'>" } member { name: "BoostedTreesRegressor" mtype: "<type \'type\'>" } member { name: "CheckpointSaverHook" mtype: "<type \'type\'>" } member { name: "CheckpointSaverListener" mtype: "<type \'type\'>" } member { name: "DNNClassifier" mtype: "<type \'type\'>" } member { name: "DNNEstimator" mtype: "<type \'type\'>" } member { name: "DNNLinearCombinedClassifier" mtype: "<type \'type\'>" } member { name: "DNNLinearCombinedEstimator" mtype: "<type \'type\'>" } member { name: "DNNLinearCombinedRegressor" mtype: "<type \'type\'>" } member { name: "DNNRegressor" mtype: "<type \'type\'>" } member { name: "Estimator" mtype: "<type \'type\'>" } member { name: "EstimatorSpec" mtype: "<type \'type\'>" } member { name: "EvalSpec" mtype: "<type \'type\'>" } member { name: "Exporter" mtype: "<type \'type\'>" } member { name: "FeedFnHook" mtype: "<type \'type\'>" } member { name: "FinalExporter" mtype: "<type \'type\'>" } member { name: "FinalOpsHook" mtype: "<type \'type\'>" } member { name: "GlobalStepWaiterHook" mtype: "<type \'type\'>" } member { name: "Head" mtype: "<type \'type\'>" } member { name: "LatestExporter" mtype: "<type \'type\'>" } member { name: "LinearClassifier" mtype: "<type \'type\'>" } member { name: "LinearEstimator" mtype: "<type \'type\'>" } member { name: "LinearRegressor" mtype: "<type \'type\'>" } member { name: "LoggingTensorHook" mtype: "<type \'type\'>" } member { name: "LogisticRegressionHead" mtype: "<type \'type\'>" } member { name: "ModeKeys" mtype: "<type \'type\'>" } member { name: "MultiClassHead" mtype: "<type \'type\'>" } member { name: "MultiHead" mtype: "<type \'type\'>" } member { name: "MultiLabelHead" mtype: "<type \'type\'>" } member { name: "NanLossDuringTrainingError" mtype: "<type \'type\'>" } member { name: "NanTensorHook" mtype: "<type \'type\'>" } member { name: "PoissonRegressionHead" mtype: "<type \'type\'>" } member { name: "ProfilerHook" mtype: "<type \'type\'>" } member { name: "RegressionHead" mtype: "<type \'type\'>" } member { name: "RunConfig" mtype: "<type \'type\'>" } member { name: "SecondOrStepTimer" mtype: "<type \'type\'>" } member { name: "SessionRunArgs" mtype: "<type \'type\'>" } member { name: "SessionRunContext" mtype: "<type \'type\'>" } member { name: "SessionRunHook" mtype: "<type \'type\'>" } member { name: "SessionRunValues" mtype: "<type \'type\'>" } member { name: "StepCounterHook" mtype: "<type \'type\'>" } member { name: "StopAtStepHook" mtype: "<type \'type\'>" } member { name: "SummarySaverHook" mtype: "<type \'type\'>" } member { name: "TrainSpec" mtype: "<type \'type\'>" } member { name: "VocabInfo" mtype: "<type \'type\'>" } member { name: "WarmStartSettings" mtype: "<type \'type\'>" } member { name: "experimental" mtype: "<type \'module\'>" } member { name: "export" mtype: "<type \'module\'>" } member { name: "inputs" mtype: "<type \'module\'>" } member { name: "tpu" mtype: "<type \'module\'>" } member_method { name: "add_metrics" argspec: "args=[\'estimator\', \'metric_fn\'], varargs=None, keywords=None, defaults=None" } member_method { name: "classifier_parse_example_spec" argspec: "args=[\'feature_columns\', \'label_key\', \'label_dtype\', \'label_default\', \'weight_column\'], varargs=None, keywords=None, defaults=[\"<dtype: \'int64\'>\", \'None\', \'None\'], " } member_method { name: "regressor_parse_example_spec" argspec: "args=[\'feature_columns\', \'label_key\', \'label_dtype\', \'label_default\', \'label_dimension\', \'weight_column\'], varargs=None, keywords=None, defaults=[\"<dtype: \'float32\'>\", \'None\', \'1\', \'None\'], " } member_method { name: "train_and_evaluate" argspec: "args=[\'estimator\', \'train_spec\', \'eval_spec\'], varargs=None, keywords=None, defaults=None" } }
{ "pile_set_name": "Github" }
{% extends "base.html" %} {% load filters %} {% block title %}Domain Details{% endblock %} {% block css_includes %} <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}css/diffview.css"/> {% endblock %} {% block content %} <script> var domain_id = "{{ domain.id | escapejs}}"; </script> <div id="tabnav" class="tabnav" style="font-size: 90%;"> <ul style="font-size: 125%;"> <li><a href="#details_section" id="details_button"><span>Details</span></a></li> {% if DomainACL.SERVICES_READ|has_access_to:user %} <li><a href="#analysis_section" id="analysis_button"><span>Analysis ({{ service_results|length }})</span></a></li> {% include 'services_tab_list_widget.html' %} {% endif %} </ul> <div id="details_section"> <div class="content_box content_details"> <h3 class="titleheader"> <span>Details for <span class="edit text" action="{% url 'crits-domains-views-edit_domain' domain.domain %}">{{ domain.domain }}</span></span> </h3> <div class="content_body"> <table class="vertical" width="100%"> <thead></thead> <tbody> <tr> <td class="key">ID</td> <td>{{domain.id}}</td> </tr> <tr> <td class="key">Created</td> <td>{{domain.created}}</td> </tr> {% if DomainACL.DESCRIPTION_READ|has_access_to:user %} <tr> {% with description=domain.description %} {% include 'description_widget.html' %} {% endwith %} </tr> {% endif %} <tr> <td class="key">DNSMon Enabled</td> <td>{{domain.watchlistEnabled|default:"False"}}</td> </tr> {% if DomainACL.STATUS_READ|has_access_to:user %} <tr> <td class="key">Status <span style="float: right;" class="object_status_response"></span> </td> <td> <span class="edit" id="object_status" action="{% url 'crits-core-views-update_status' subscription.type subscription.id %}">{{domain.status}}</span> </td> </tr> {% endif %} {% with tlp=domain.tlp %} {% include "tlp_widget.html" %} {% endwith %} {% if DomainACL.SECTORS_READ|has_access_to:user %} {% with sectors=domain.sectors %} {% include "sector_widget.html" %} {% endwith %} {% endif %} {% if DomainACL.SOURCES_READ|has_access_to:user %} <tr> {% with sources=domain.source obj_id=domain.id obj_type=subscription.type %} {% include "sources_listing_widget.html" %} {% endwith %} </tr> {% endif %} {% if DomainACL.RELEASABILITY_READ|has_access_to:user %} <tr> {% with releasability=domain.releasability %} {% include "releasability_list_widget.html" %} {% endwith %} </tr> {% endif %} </tbody> </table> </div> </div> <div id="detail_floaters"> {% include 'details_options_widget.html' %} {% if DomainACL.BUCKETLIST_READ|has_access_to:user %} {% with bucket_list=domain.bucket_list %} {% include 'bucket_list_widget.html' %} {% endwith %} {% endif %} {% include 'add_related_widget.html' %} </div> {% if DomainACL.ACTIONS_READ|has_access_to:user %} <div class="content_box"> {% with obj=domain obj_type="Domain" %} {% include 'action_listing_widget.html' %} {% endwith %} </div> {% endif %} {% if DomainACL.TICKETS_READ|has_access_to:user %} <div> {% with obj=domain obj_type=subscription.type %} {% include 'tickets_listing_widget.html' %} {% endwith %} </div> {% endif %} {% if DomainACL.CAMPAIGNS_READ|has_access_to:user and DomainACL.CAMPAIGN_READ|has_access_to:user %} <div> {% with hit=domain col=COL_DOMAINS %} {% include "campaigns_display_widget.html" %} {% endwith %} </div> {% endif %} {% if DomainACL.LOCATIONS_READ|has_access_to:user %} <div> {% with hit=domain col=COL_DOMAINS %} {% include "locations_display_widget.html" %} {% endwith %} </div> {% endif %} {% if DomainACL.RELATIONSHIPS_READ|has_access_to:user %} <div> {% include 'relationships_listing_widget.html' %} </div> {% endif %} {% if DomainACL.OBJECTS_READ|has_access_to:user %} <div> {% include 'objects_listing_widget.html' %} </div> {% endif %} {% if DomainACL.SCREENSHOTS_READ|has_access_to:user %} <div> {% include 'screenshot_widget.html' %} </div> {% endif %} {% if DomainACL.COMMENTS_READ|has_access_to:user %} <div> {% include "comments_listing_widget.html" %} </div> {% endif %} </div> <!-- details_section --> {% if DomainACL.SERVICES_READ|has_access_to:user %} {% with item=domain %} {% include "services_analysis_section.html" with crits_type="Domain" identifier=domain.id %} {% endwith %} {% include 'services_tab_tabs_widget.html' %} {% endif %} </div><!-- tabnav --> {% endblock %} {% block javascript_includes %} <script type="text/javascript" src="{{ STATIC_URL }}js/jsdifflib/diffview.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}js/jsdifflib/jsdiff.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}js/jsdifflib/difflib.js"></script> <script type="text/javascript" src="{{ STATIC_URL }}js/domains_details.js"></script> {% endblock %}
{ "pile_set_name": "Github" }
#!/usr/bin/env ruby #-- # Portions copyright 2004 by Jim Weirich ([email protected]). # Portions copyright 2005 by Sam Ruby ([email protected]). # All rights reserved. # Permission is granted for use, copying, modification, distribution, # and distribution of modified versions of this work as long as the # above copyright notice is included. #++ # We are defining method_added in Kernel and Object so that when # BlankSlate overrides them later, we can verify that it correctly # calls the older hooks. module Kernel class << self attr_reader :k_added_names alias_method :preload_method_added, :method_added def method_added(name) preload_method_added(name) @k_added_names ||= [] @k_added_names << name end end end class Object class << self attr_reader :o_added_names alias_method :preload_method_added, :method_added def method_added(name) preload_method_added(name) @o_added_names ||= [] @o_added_names << name end end end
{ "pile_set_name": "Github" }
package com.mashibing.common; /** * 日期类型枚举类 * * @author 马士兵教育 * */ public enum DateEnum { YEAR("year"), SEASON("season"), MONTH("month"), WEEK("week"), DAY("day"), HOUR( "hour"); public final String name; private DateEnum(String name) { this.name = name; } /** * 根据属性name的值获取对应的type对象 * * @param name * @return */ public static DateEnum valueOfName(String name) { for (DateEnum type : values()) { if (type.name.equals(name)) { return type; } } return null; } }
{ "pile_set_name": "Github" }
/* SPDX-License-Identifier: GPL-2.0 */ #ifndef CAIAQ_MIDI_H #define CAIAQ_MIDI_H int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *cdev); void snd_usb_caiaq_midi_handle_input(struct snd_usb_caiaqdev *cdev, int port, const char *buf, int len); void snd_usb_caiaq_midi_output_done(struct urb *urb); #endif /* CAIAQ_MIDI_H */
{ "pile_set_name": "Github" }
.revision-indicator { display: inline-block; width: 8px; height: 8px; margin-top: -.4px; margin-left: -2px; &.add { background: shade(@green, 10%); } &.mod { background: shade(@yellow, 2%); } &.del { background: shade(@red, 15%); } }
{ "pile_set_name": "Github" }
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ #ifndef NET_INSTAWEB_REWRITER_PUBLIC_BASE_TAG_FILTER_H_ #define NET_INSTAWEB_REWRITER_PUBLIC_BASE_TAG_FILTER_H_ #include "pagespeed/kernel/base/basictypes.h" #include "pagespeed/kernel/html/empty_html_filter.h" namespace net_instaweb { class HtmlElement; class RewriteDriver; // Add this filter into the HtmlParse chain to add a base // tag into the head section of an HTML document. class BaseTagFilter : public EmptyHtmlFilter { public: explicit BaseTagFilter(RewriteDriver* driver) : added_base_tag_(false), driver_(driver) {} ~BaseTagFilter() override; void StartDocument() override { added_base_tag_ = false; } void StartElement(HtmlElement* element) override; const char* Name() const override { return "BaseTag"; } private: bool added_base_tag_; RewriteDriver* driver_; DISALLOW_COPY_AND_ASSIGN(BaseTagFilter); }; } // namespace net_instaweb #endif // NET_INSTAWEB_REWRITER_PUBLIC_BASE_TAG_FILTER_H_
{ "pile_set_name": "Github" }
0 1 D:multistatus 0 0 1 14 #text 0 1 1 1 D:response 0 0 2 14 #text 0 1 2 1 D:prop 0 0 3 14 #text 0 1 3 1 D:lockdiscovery 0 0 4 14 #text 0 1 4 1 D:activelock 0 0 5 14 #text 0 1 5 1 D:locktype 0 0 6 3 #text 0 1 write 5 15 D:locktype 0 0 5 14 #text 0 1 5 1 D:lockscope 0 0 6 3 #text 0 1 exclusive 5 15 D:lockscope 0 0 5 14 #text 0 1 5 1 D:addlocks 0 0 6 14 #text 0 1 6 1 D:href 0 0 7 3 #text 0 1 http://foo.com/doc/ 6 15 D:href 0 0 6 14 #text 0 1 5 15 D:addlocks 0 0 5 14 #text 0 1 5 1 D:owner 0 0 6 3 #text 0 1 Jane Smith 5 15 D:owner 0 0 5 14 #text 0 1 5 1 D:timeout 0 0 6 3 #text 0 1 Infinite 5 15 D:timeout 0 0 5 14 #text 0 1 5 1 D:locktoken 0 0 6 14 #text 0 1 6 1 D:href 0 0 7 3 #text 0 1 iamuri:unique!!!!! 6 15 D:href 0 0 6 14 #text 0 1 5 15 D:locktoken 0 0 5 14 #text 0 1 4 15 D:activelock 0 0 4 14 #text 0 1 3 15 D:lockdiscovery 0 0 3 14 #text 0 1 2 15 D:prop 0 0 2 14 #text 0 1 2 1 D:status 0 0 3 3 #text 0 1 HTTP/1.1 200 OK 2 15 D:status 0 0 2 14 #text 0 1 1 15 D:response 0 0 1 14 #text 0 1 0 15 D:multistatus 0 0
{ "pile_set_name": "Github" }
#include "rule_editor_hole_size.hpp" #include "board/rule_hole_size.hpp" #include "rule_match_editor.hpp" #include "widgets/spin_button_dim.hpp" namespace horizon { void RuleEditorHoleSize::populate() { rule2 = &dynamic_cast<RuleHoleSize &>(rule); builder = Gtk::Builder::create_from_resource("/org/horizon-eda/horizon/imp/rules/rule_editor_hole_size.ui"); Gtk::Box *editor; builder->get_widget("editor", editor); editor->set_halign(Gtk::ALIGN_START); pack_start(*editor, true, true, 0); auto sp_min = create_spinbutton("min_dia_box"); auto sp_max = create_spinbutton("max_dia_box"); sp_min->set_range(0, 100_mm); sp_max->set_range(0, 100_mm); sp_min->set_value(rule2->diameter_min); sp_max->set_value(rule2->diameter_max); sp_min->signal_value_changed().connect([this, sp_min] { rule2->diameter_min = sp_min->get_value_as_int(); s_signal_updated.emit(); }); sp_max->signal_value_changed().connect([this, sp_max] { rule2->diameter_max = sp_max->get_value_as_int(); s_signal_updated.emit(); }); auto match_editor = create_rule_match_editor("match_box", rule2->match); match_editor->set_orientation(Gtk::ORIENTATION_HORIZONTAL); match_editor->signal_updated().connect([this] { s_signal_updated.emit(); }); editor->show(); } } // namespace horizon
{ "pile_set_name": "Github" }
/* Generated by RuntimeBrowser. */ @protocol CSSpeechManagerDelegate <NSObject> @required - (void)speechManagerDidStartForwarding:(CSSpeechManager *)arg1 successfully:(bool)arg2 error:(NSError *)arg3; - (void)speechManagerDidStopForwarding:(CSSpeechManager *)arg1 forReason:(long long)arg2; - (void)speechManagerLPCMRecordBufferAvailable:(CSSpeechManager *)arg1 chunk:(CSAudioChunk *)arg2; - (void)speechManagerRecordBufferAvailable:(CSSpeechManager *)arg1 buffer:(AVVCAudioBuffer *)arg2; @optional - (void)speechManager:(CSSpeechManager *)arg1 didSetAudioSessionActive:(bool)arg2; - (void)speechManager:(CSSpeechManager *)arg1 willSetAudioSessionActive:(bool)arg2; - (void)speechManagerBeginRecordInterruption:(CSSpeechManager *)arg1; - (void)speechManagerBeginRecordInterruption:(CSSpeechManager *)arg1 withContext:(NSDictionary *)arg2; - (void)speechManagerDetectedSystemVolumeChange:(CSSpeechManager *)arg1 withVolume:(float)arg2 forReason:(unsigned long long)arg3; - (void)speechManagerDidFinishAlertPlayback:(CSSpeechManager *)arg1 ofType:(long long)arg2 error:(NSError *)arg3; - (void)speechManagerEndRecordInterruption:(CSSpeechManager *)arg1; - (void)speechManagerRecordHardwareConfigurationDidChange:(CSSpeechManager *)arg1 toConfiguration:(long long)arg2; - (NSDictionary *)speechManagerRecordingContext; @end
{ "pile_set_name": "Github" }
function [f,err] = fmincon_funn(cbData,nRow,x,njdiff,dXjbase,reserved,inParam) persistent prob Af A bf b if nargin == 7 prob = inParam; ind = find(prob.map==0); Af = prob.A(ind,:); bf = prob.b(ind); A = spalloc(max(prob.map),size(prob.A,1),0); for i = 1:max(prob.map) ind = find(prob.map==i); A(i,ind) = prob.b(ind)'; end return end x = x(1:size(prob.A,2)); if nRow == -1 z = Af*x; f = full(log(bf'*exp(z))); else g = A*exp(prob.A*x); ind = find(g<1e-2); if ~isempty(ind) g(ind) = exp(log(1e-2)+(g(ind)-1e-2)/1e-2); end g = log(g); if length(prob.h) > 0 g = [log(prob.h) + prob.G*x;g]; end f = g(nRow+1); end err = 0;
{ "pile_set_name": "Github" }
class Manager(object): def add(self, v1=0, v2=0): rval = v1 + v2 print("%(v1)d + %(v2)d is %(rval)d\n" %locals()) return rval
{ "pile_set_name": "Github" }
# !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is built by mktables from e.g. UnicodeData.txt. # Any changes made here will be lost! # # Binary property 'Other_Uppercase' # return <<'END'; 2160 216F Other_Uppercase 24B6 24CF Other_Uppercase END
{ "pile_set_name": "Github" }
<template> <f7-page> <f7-navbar title="Swiper Slider" back-link="Back"></f7-navbar> <div class="block"> <p> Framework7 comes with powerful and most modern touch slider ever - <a href="https://swiperjs.com" class="external" target="_blank">Swiper Slider</a> with super flexible configuration and lot, lot of features. Just check the following demos: </p> </div> <div class="list links-list"> <ul> <li> <a href="swiper-horizontal/">Swiper Horizontal</a> </li> <li> <a href="swiper-vertical/">Swiper Vertical</a> </li> <li> <a href="swiper-space-between/">Space Between Slides</a> </li> <li> <a href="swiper-multiple/">Multiple Per Page</a> </li> <li> <a href="swiper-nested/">Nested Swipers</a> </li> <li> <a href="swiper-loop/">Infinite Loop Mode</a> </li> <li> <a href="swiper-3d-cube/">3D Cube Effect</a> </li> <li> <a href="swiper-3d-coverflow/">3D Coverflow Effect</a> </li> <li> <a href="swiper-3d-flip/">3D Flip Effect</a> </li> <li> <a href="swiper-fade/">Fade Effect</a> </li> <li> <a href="swiper-scrollbar/">With Scrollbar</a> </li> <li> <a href="swiper-gallery/">Thumbs Gallery</a> </li> <li> <a href="swiper-custom-controls/">Custom Controls</a> </li> <li> <a href="swiper-parallax/">Parallax</a> </li> <li> <a href="swiper-lazy/">Lazy Loading</a> </li> <li> <a href="swiper-pagination-progress/">Progress Pagination</a> </li> <li> <a href="swiper-pagination-fraction/">Fraction Pagination</a> </li> <li> <a href="swiper-zoom/">Zoom</a> </li> </ul> </div> </f7-page> </template> <script> import { f7Navbar, f7Page } from 'framework7-vue'; export default { components: { f7Navbar, f7Page, }, }; </script>
{ "pile_set_name": "Github" }
# `nest` folder This directory contains the code to build the nest executable. Basically main.cpp just collects all necessary objects and links the executable against the necessary libraries.
{ "pile_set_name": "Github" }
// // Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21). // // class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard. // #import "ICPSharedPhotoStreamCloudFeedManager-Protocol.h" #import "NSObject-Protocol.h" @protocol ICPSharedPhotoStreamCloudFeedManagerReceiver <ICPSharedPhotoStreamCloudFeedManager, NSObject> @end
{ "pile_set_name": "Github" }
.. queryset cache main documentation, including options, enabling/disabling, using with raw sql and cursors, signals, etc .. module:: johnny.cache The QuerySet Cache ================== QuerySet caching is the automatic caching of all database reads. Conceptually, it works very similar to the built-in write-invalidate queryset caching that is present in your RDBMS. When a read (``SELECT``) is made from one or more tables, that read is cached. When a write (``INSERT``, ``UPDATE``, etc) is made against that table, the read cache built up for that table is invalidated. The way that Johnny achieves this is through the use of generational keys: * every table in your application gets a "key" associated with it that corresponds to the current *generation* of data * reads are cached with keys based off of the generations of the tables being read from * when a write is performed, the generation key for all involved tables is modified When the generation key is modified, any cache keys previously built against prior generations are no longer recoverable, since the old generation key is now lost. This means on an LRU cache (like memcached, which maintains an LRU per slab), you can cache reads forever and the old generations will naturally expire out faster than any "live" cache data. The QuerySet Cache supports Django versions 1.1, 1.2, 1.3, and 1.4 .. autoclass:: johnny.cache.QueryCacheBackend .. autofunction:: johnny.cache.get_backend **NOTE**: The usage of ``get_backend`` has changed in Johnny 0.3. The old version returned a class object, but the new version works more as a factory that gives you a properly configured QuerySetCache *object* for your Django version and current settings. The main goals of the QuerySet Cache are: * To cache querysets forever * To be as simple as possible but still work * To not increase the conceptual load on the developer Invalidation ~~~~~~~~~~~~ Because queries are cached forever, it's absolutely essential that stale data is never accessible in the cache. Since keys are never actually deleted, but merely made inaccessible by the progression of a table's generation, "invalidation" in this context is the modification of a table's generation key. The query keys themselves are based on as many uniquely identifying aspects of a query that we could think of. This includes the sql itself, the params, the ordering clause, the database name (1.2 only), and of course the generations of all of the tables involved. The following would be two queries, not one:: MyModel.objects.all().order_by('-created_at') MyModel.objects.all().order_by('created_at') Avoiding the database at all costs was not a goal, so different ordering clauses on the same dataset are considered different queries. Since invalidation happens at the table level, *any* table having been modified makes the cached query inaccessible:: # cached, depends on `publisher` table p = Publisher.objects.get(id=5) # cached, depends on `book` and `publisher` table Book.objects.all().select_related('publisher') p.name = "Doubleday" # write on `publisher` table, modifies publisher generation p.save() # the following are cache misses Publisher.objects.get(id=5) Book.objects.all().select_related('publisher') Because invalidation is greedy in this way, it makes sense to test Johnny against your site to see if this type of caching is beneficial. Transactions ------------ Transactions represent an interesting problem to caches like Johnny. Because the generation keys are invalidated on write, and a transaction commit does not go down the same code path as our invalidation, there are a number of scenarios involving transactions that could cause problems. The most obvious one is write and a read within a transaction that gets rolled back. The write invalidates the cache key, the read puts new data into the cache, but that new data never actually sees the light of day in the database. There are numerous other concurrency related issues with invalidating keys within transactions regardless of whether or not a rollback is performed, because the generational key change is in memcached and thus not protected by the transaction itself. Because of this, when you enable Johnny, the ``django.db.transaction`` module is patched in various places to place new hooks around transaction rollback and committal. When you are in what django terms a "managed transaction", ie a transaction that *you* are managing manually, Johnny automatically writes any cache keys to the `LocalStore <'localstore_cache.html'>`_ instead. On commit, these keys are pushed to the global cache; on rollback, they are discarded. Using with TransactionMiddleware (Django 1.2 and earlier) --------------------------------------------------------- Django ships with a middleware called ``django.middleware.transaction.TransactionMiddleware``, which wraps all requests within a transaction and then rollsback when exceptions are thrown from within the view. Johnny only pushes transactional data to the cache on commit, but the TransactionMiddleware will leave transactions uncommitted if they are not dirty (if no writes have been performed during the request). This means that if you have views that don't write anything, and also use the TransactionMiddleware, you'll never populate the cache with the querysets used in those views. This problem is described in `django ticket #9964`_, and has been fixed as of Django 1.3. If you are using a Django version earlier than 1.3 and need to use the TransactionMiddleware, Johnny includes a middleware called ``johnny.middleware.CommittingTransactionMiddleware``, which is the same as the built in version, but always commits transactions on success. Depending on your database, there are still ways to have SELECT statements modify data, but for the majority of people committing after every request, even when no UPDATE or INSERTs have been done is likely harmless and will make Johnny function much more smoothly. .. _django ticket #9964: http://code.djangoproject.com/ticket/9964 Savepoints ---------- Johnny supports savepoints, and although it has some comprehensive testing for savepoints, it is not entirely certain that they behave the same way across the two backends that support them. Savepoints are tested in single and multi-db environments, from both inside and outside the transactions. Currently, of the backends shipped with Django only the PostgreSQL and Oracle backends support savepoints (MySQL's InnoDB engine `supports savepoints <http://dev.mysql.com/doc/refman/5.0/en/savepoint.html>`_, but the Django MySQL backend doesn't). If you use savepoints and are encountering invalidation issues, please report a bug and see the :ref:`manual-invalidation` section for possible workarounds. Multiple Databases ------------------ Johnny supports multiple databases in a variety of configurations. If using Johnny to cache results from a slave database, one should use the ``DATABASES .. JOHNNY_CACHE_KEY`` setting (see below) to ensure that slave databases use the same database key as the master database. Please note that, in a master/slave database configuration, all of the typical problems still exist. For example, if you update a table and then initiate a read on the slave before the change has had time to propagate, stale data may be returned and cached in Johnny. As such, be certain that read queries prone to this issue are executed on a database that is guaranteed to be up to date. Usage ~~~~~ To enable the QuerySet Cache, enable the middleware ``johnny.middleware.QueryCacheMiddleware``. .. _manual-invalidation: Manual Invalidation ------------------- To manually invalidate a table or a model, use ``johnny.cache.invalidate``: .. autofunction:: johnny.cache.invalidate Using with scripts, management commands, asynchronous workers and the shell --------------------------------------------------------------------------- Since the QuerySet Cache is enabled via middleware, queries made from outside of Django's request-response loop will neither be cached nor used to invalidate the cache. This can lead to stale data in the cache. You can enable and disable the QuerySet Cache by using the convenience functions: .. autofunction:: johnny.cache.enable .. autofunction:: johnny.cache.disable To make sure Johnny is always active in management commands, you can enable it the project's ``__init__.py`` file:: django-admin.py createproject myproject Now, in ``myproject/__init__.py``:: from johnny.cache import enable enable() This works because ``django.core.management.setup_environ`` always imports the project module before executing the management command. Settings ~~~~~~~~ The following settings are available for the QuerySet Cache: * ``CACHES .. JOHNNY_CACHE`` * ``DATABASES .. JOHNNY_CACHE_KEY`` * ``DISABLE_QUERYSET_CACHE`` * ``JOHNNY_MIDDLEWARE_KEY_PREFIX`` * ``JOHNNY_MIDDLEWARE_SECONDS`` * ``JOHNNY_TABLE_WHITELIST`` * ``MAN_IN_BLACKLIST`` (``JOHNNY_TABLE_BLACKLIST``) .. highlight:: python ``CACHES .. JOHNNY_CACHE`` is the preferred way of designating a cache as the one used by Johnny. Generally, it will look something like this:: CACHES = { # ... 'johnny' : { 'BACKEND': '...', 'JOHNNY_CACHE': True, } } Johnny *needs* to run on one shared cache pool, so although the behavior is defined, a warning will be printed if ``JOHNNY_CACHE`` is found to be ``True`` in multiple cache definitions. If ``JOHNNY_CACHE`` is not present, Johnny will fall back to the deprecated ``JOHNNY_CACHE_BACKEND`` setting if set, and then to the default cache. ``DATABASES .. JOHNNY_CACHE_KEY`` allows you to override the default key used for the given database. This is useful, for example, in master/slave database setups where writes are never issued to the slave, so Johnny would otherwise not invalidate a query cached for that slave when a write occurs on the master. For example, if you have a simple database setup with one master and one slave, you could set both databases to use the database key ``default`` when constructing cache keys like so:: DATABASES = { # ... 'default': { # ... 'JOHNNY_CACHE_KEY': 'default', }, 'slave': { # ... 'JOHNNY_CACHE_KEY': 'default', }, } ``DISABLE_QUERYSET_CACHE`` will disable the QuerySet cache even if the middleware is installed. This is mostly to make it easy for non-production environments to disable the queryset cache without re-creating the entire middleware stack and then removing the QuerySet cache middleware. ``JOHNNY_MIDDLEWARE_KEY_PREFIX``, default "jc", is to set the prefix for Johnny cache. It's *very important* that if you are running multiple apps in the same memcached pool that you use this setting on each app so that tables with the same name in each app (like Django's built in contrib apps) don't clobber each other in the cache. ``JOHNNY_MIDDLEWARE_SECONDS``, default ``0``, is the period that Johnny will cache both its generational keys *and* its query cache results. Since the design goal of Johnny was to be able to maintain a consistent cache at all times, the default behavior is to cache everything *forever*. If you are not using one of Johnny's `custom backends <backends.html>`_, the default value of ``0`` will work differently on different backends and might cause Johnny to never cache anything. ``JOHNNY_TABLE_WHITELIST``, default "[]", is a user defined tuple that contains table names for exclusive inclusion in the cache. If you provide this setting, the ``MAN_IN_BLACKLIST`` (and ``JOHNNY_TABLE_BLACKLIST``) settings are ignored. ``MAN_IN_BLACKLIST`` is a user defined tuple that contains table names to exclude from the QuerySet Cache. If you have no sense of humor, or want your settings file to be understandable, you can use the alias ``JOHNNY_TABLE_BLACKLIST``. We just couldn't resist. *Deprecated* ------------ * ``JOHNNY_CACHE_BACKEND`` ``JOHNNY_CACHE_BACKEND`` is a cache backend URI similar to what is used by Django by default, but only used for Johnny. In Django 1.2 and earlier, it was impossible to define multiple cache backends for Django's core caching framework, and this was used to allow separation between the cache that is used by Johnny and the caching backend for the rest of your app. In Django 1.3, this can also take the name of a configured cache, but it is recommended to use the ``JOHNNY_CACHE`` cache setting instead. Signals ~~~~~~~ The QuerySet Cache defines the following signals: * ``johnny.cache.signals.qc_hit``, fired after a cache hit * ``johnny.cache.signals.qc_miss``, fired after a cache miss * ``johnny.cache.signals.qc_skip``, fired when a query misses cache due to table black/whitelisting **Backwards Compatability Warning**: prior to johnny-cache 1.4.1, the ``qc_miss`` signal was fired whenever a read query was not found in the cache for any reason, even due to table blacklisting. This made it difficult to use these signals to collect cache overall performance statistics, because blacklisted tables (which would never go to cache even for the table keys) were being recorded as misses. Although this is a semantic change to the meaning of the ``qc_miss`` signal, the original behavior was considered buggy and thus it's been changed from 1.4.0 to 1.4.1. If the original behavior is desired, please connect both the ``qc_miss`` and ``qc_hit`` signals to the same handler. The sender of these signals is always the ``QueryCacheBackend`` itself. Customization ~~~~~~~~~~~~~ There are many aspects of the behavior of the QuerySet Cache that are pluggable, but no easy settings-style hooks are yet provided for them. More ability to control the way Johnny functions is planned for future releases. .. todo: details on providing custom KeyGen's, etc.
{ "pile_set_name": "Github" }
/* * Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ package sun.net.httpserver; import com.sun.net.httpserver.*; import java.io.*; import java.nio.*; import java.nio.channels.*; import sun.net.www.MessageHeader; import java.util.*; import javax.security.auth.*; import javax.security.auth.callback.*; import javax.security.auth.login.*; public class AuthFilter extends Filter { private Authenticator authenticator; public AuthFilter (Authenticator authenticator) { this.authenticator = authenticator; } public String description () { return "Authentication filter"; } public void setAuthenticator (Authenticator a) { authenticator = a; } public void consumeInput (HttpExchange t) throws IOException { InputStream i = t.getRequestBody(); byte[] b = new byte [4096]; while (i.read (b) != -1); i.close (); } /** * The filter's implementation, which is invoked by the server */ public void doFilter (HttpExchange t, Filter.Chain chain) throws IOException { if (authenticator != null) { Authenticator.Result r = authenticator.authenticate (t); if (r instanceof Authenticator.Success) { Authenticator.Success s = (Authenticator.Success)r; ExchangeImpl e = ExchangeImpl.get (t); e.setPrincipal (s.getPrincipal()); chain.doFilter (t); } else if (r instanceof Authenticator.Retry) { Authenticator.Retry ry = (Authenticator.Retry)r; consumeInput (t); t.sendResponseHeaders (ry.getResponseCode(), -1); } else if (r instanceof Authenticator.Failure) { Authenticator.Failure f = (Authenticator.Failure)r; consumeInput (t); t.sendResponseHeaders (f.getResponseCode(), -1); } } else { chain.doFilter (t); } } }
{ "pile_set_name": "Github" }
def action = { final MagicGame game, final MagicEvent event -> if (event.isYes()) { game.doAction(new DealDamageAction(event.getSource(),event.getPlayer(),2)); } else { game.doAction(new DestroyAction(event.getRefPermanent())); } } [ new MagicPermanentActivation( new MagicActivationHints(MagicTiming.Removal), "Destroy" ) { @Override public Iterable<? extends MagicEvent> getCostEvent(final MagicPermanent source) { return [new MagicTapEvent(source)]; } @Override public MagicEvent getPermanentEvent(final MagicPermanent source, final MagicPayedCost payedCost) { return new MagicEvent( source, NEG_TARGET_LAND, MagicDestroyTargetPicker.Destroy, this, "Destroy target land\$ unless its controller has " + "SN deal 2 damage to him or her." ); } @Override public void executeEvent(final MagicGame game, final MagicEvent event) { event.processTargetPermanent(game, { game.addEvent(new MagicEvent( event.getSource(), it.getController(), new MagicMayChoice(), it, action, "PN may\$ have SN deal 2 damage to him or her." )); }); } } ]
{ "pile_set_name": "Github" }
Adventure Kid Waveforms (AKWF) converted to Synthesis Technology wavetables AKWF is a collection of one cycle waveforms sampled from various sources intended for use as oscillator shapes in samplers and synthesizers. file list --------- ..\AKWF_0020/AKWF_1921.wav ..\AKWF_0020/AKWF_1922.wav ..\AKWF_0020/AKWF_1923.wav ..\AKWF_0020/AKWF_1924.wav ..\AKWF_0020/AKWF_1925.wav ..\AKWF_0020/AKWF_1926.wav ..\AKWF_0020/AKWF_1927.wav ..\AKWF_0020/AKWF_1928.wav ..\AKWF_0020/AKWF_1929.wav ..\AKWF_0020/AKWF_1930.wav ..\AKWF_0020/AKWF_1931.wav ..\AKWF_0020/AKWF_1932.wav ..\AKWF_0020/AKWF_1933.wav ..\AKWF_0020/AKWF_1934.wav ..\AKWF_0020/AKWF_1935.wav ..\AKWF_0020/AKWF_1936.wav ..\AKWF_0020/AKWF_1937.wav ..\AKWF_0020/AKWF_1938.wav ..\AKWF_0020/AKWF_1939.wav ..\AKWF_0020/AKWF_1940.wav ..\AKWF_0020/AKWF_1941.wav ..\AKWF_0020/AKWF_1942.wav ..\AKWF_0020/AKWF_1943.wav ..\AKWF_0020/AKWF_1944.wav ..\AKWF_0020/AKWF_1945.wav ..\AKWF_0020/AKWF_1946.wav ..\AKWF_0020/AKWF_1947.wav ..\AKWF_0020/AKWF_1948.wav ..\AKWF_0020/AKWF_1949.wav ..\AKWF_0020/AKWF_1950.wav ..\AKWF_0020/AKWF_1951.wav ..\AKWF_0020/AKWF_1952.wav ..\AKWF_0020/AKWF_1953.wav ..\AKWF_0020/AKWF_1954.wav ..\AKWF_0020/AKWF_1955.wav ..\AKWF_0020/AKWF_1956.wav ..\AKWF_0020/AKWF_1957.wav ..\AKWF_0020/AKWF_1958.wav ..\AKWF_0020/AKWF_1959.wav ..\AKWF_0020/AKWF_1960.wav ..\AKWF_0020/AKWF_1961.wav ..\AKWF_0020/AKWF_1962.wav ..\AKWF_0020/AKWF_1963.wav ..\AKWF_0020/AKWF_1964.wav ..\AKWF_0020/AKWF_1965.wav ..\AKWF_0020/AKWF_1966.wav ..\AKWF_0020/AKWF_1967.wav ..\AKWF_0020/AKWF_1968.wav ..\AKWF_0020/AKWF_1969.wav ..\AKWF_0020/AKWF_1970.wav ..\AKWF_0020/AKWF_1971.wav ..\AKWF_0020/AKWF_1972.wav ..\AKWF_0020/AKWF_1973.wav ..\AKWF_0020/AKWF_1974.wav ..\AKWF_0020/AKWF_1975.wav ..\AKWF_0020/AKWF_1976.wav ..\AKWF_0020/AKWF_1977.wav ..\AKWF_0020/AKWF_1978.wav ..\AKWF_0020/AKWF_1979.wav ..\AKWF_0020/AKWF_1980.wav ..\AKWF_0020/AKWF_1981.wav ..\AKWF_0020/AKWF_1982.wav ..\AKWF_0020/AKWF_1983.wav ..\AKWF_0020/AKWF_1984.wav
{ "pile_set_name": "Github" }
#------------------------------------------------- # # Project created by QtCreator 2015-07-01T09:59:56 # #------------------------------------------------- include(../config.pri) QT += core QT -= gui CONFIG += console CONFIG -= app_bundle TEMPLATE = app TARGET = qmc-cpptypeplaceholder target.path = $$BINDIR INSTALLS += target SOURCES += cpptype.cpp \ classparser.cpp \ classparserfind.cpp \ classparserinformation.cpp HEADERS += \ classparser.h \ classparserfind.h \ classparserinformation.h
{ "pile_set_name": "Github" }
// Boost.Units - A C++ library for zero-overhead dimensional analysis and // unit/quantity manipulation and conversion // // Copyright (C) 2003-2008 Matthias Christian Schabel // Copyright (C) 2007-2008 Steven Watanabe // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) #ifndef BOOST_UNITS_US_MILE_BASE_UNIT_HPP #define BOOST_UNITS_US_MILE_BASE_UNIT_HPP #include <boost/units/scaled_base_unit.hpp> #include <boost/units/static_rational.hpp> #include <boost/units/scale.hpp> #include <boost/units/base_units/us/yard.hpp> namespace boost { namespace units { namespace us { typedef scaled_base_unit<yard_base_unit, scale<1760, static_rational<1> > > mile_base_unit; } // namespace us template<> struct base_unit_info<us::mile_base_unit> { static const char* name() { return("mile"); } static const char* symbol() { return("mi"); } }; } // namespace units } // namespace boost #endif // BOOST_UNITS_US_MILE_BASE_UNIT_HPP
{ "pile_set_name": "Github" }
path: "tensorflow.queue.RandomShuffleQueue" tf_class { is_instance: "<class \'tensorflow.python.ops.data_flow_ops.RandomShuffleQueue\'>" is_instance: "<class \'tensorflow.python.ops.data_flow_ops.QueueBase\'>" is_instance: "<type \'object\'>" member { name: "dtypes" mtype: "<type \'property\'>" } member { name: "name" mtype: "<type \'property\'>" } member { name: "names" mtype: "<type \'property\'>" } member { name: "queue_ref" mtype: "<type \'property\'>" } member { name: "shapes" mtype: "<type \'property\'>" } member_method { name: "__init__" argspec: "args=[\'self\', \'capacity\', \'min_after_dequeue\', \'dtypes\', \'shapes\', \'names\', \'seed\', \'shared_name\', \'name\'], varargs=None, keywords=None, defaults=[\'None\', \'None\', \'None\', \'None\', \'random_shuffle_queue\'], " } member_method { name: "close" argspec: "args=[\'self\', \'cancel_pending_enqueues\', \'name\'], varargs=None, keywords=None, defaults=[\'False\', \'None\'], " } member_method { name: "dequeue" argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], " } member_method { name: "dequeue_many" argspec: "args=[\'self\', \'n\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], " } member_method { name: "dequeue_up_to" argspec: "args=[\'self\', \'n\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], " } member_method { name: "enqueue" argspec: "args=[\'self\', \'vals\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], " } member_method { name: "enqueue_many" argspec: "args=[\'self\', \'vals\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], " } member_method { name: "from_list" argspec: "args=[\'index\', \'queues\'], varargs=None, keywords=None, defaults=None" } member_method { name: "is_closed" argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], " } member_method { name: "size" argspec: "args=[\'self\', \'name\'], varargs=None, keywords=None, defaults=[\'None\'], " } }
{ "pile_set_name": "Github" }
/* Copyright 2018 The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by client-gen. DO NOT EDIT. package fake import ( v1alpha1 "k8s.io/client-go/kubernetes/typed/scheduling/v1alpha1" rest "k8s.io/client-go/rest" testing "k8s.io/client-go/testing" ) type FakeSchedulingV1alpha1 struct { *testing.Fake } func (c *FakeSchedulingV1alpha1) PriorityClasses() v1alpha1.PriorityClassInterface { return &FakePriorityClasses{c} } // RESTClient returns a RESTClient that is used to communicate // with API server by this client implementation. func (c *FakeSchedulingV1alpha1) RESTClient() rest.Interface { var ret *rest.RESTClient return ret }
{ "pile_set_name": "Github" }
/* * ptw32_processInitialize.c * * Description: * This translation unit implements routines which are private to * the implementation and may be used throughout it. * * -------------------------------------------------------------------------- * * Pthreads-win32 - POSIX Threads Library for Win32 * Copyright(C) 1998 John E. Bossom * Copyright(C) 1999,2005 Pthreads-win32 contributors * * Contact Email: [email protected] * * The current list of contributors is contained * in the file CONTRIBUTORS included with the source * code distribution. The list can also be seen at the * following World Wide Web location: * http://sources.redhat.com/pthreads-win32/contributors.html * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library in the file COPYING.LIB; * if not, write to the Free Software Foundation, Inc., * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ #include "pthread.h" #include "implement.h" int ptw32_processInitialize (void) /* * ------------------------------------------------------ * DOCPRIVATE * This function performs process wide initialization for * the pthread library. * * PARAMETERS * N/A * * DESCRIPTION * This function performs process wide initialization for * the pthread library. * If successful, this routine sets the global variable * ptw32_processInitialized to TRUE. * * RESULTS * TRUE if successful, * FALSE otherwise * * ------------------------------------------------------ */ { if (ptw32_processInitialized) { /* * Ignore if already initialized. this is useful for * programs that uses a non-dll pthread * library. Such programs must call ptw32_processInitialize() explicitly, * since this initialization routine is automatically called only when * the dll is loaded. */ return PTW32_TRUE; } ptw32_processInitialized = PTW32_TRUE; /* * Initialize Keys */ if ((pthread_key_create (&ptw32_selfThreadKey, NULL) != 0) || (pthread_key_create (&ptw32_cleanupKey, NULL) != 0)) { ptw32_processTerminate (); } /* * Set up the global locks. */ InitializeCriticalSection (&ptw32_thread_reuse_lock); InitializeCriticalSection (&ptw32_mutex_test_init_lock); InitializeCriticalSection (&ptw32_cond_list_lock); InitializeCriticalSection (&ptw32_cond_test_init_lock); InitializeCriticalSection (&ptw32_rwlock_test_init_lock); InitializeCriticalSection (&ptw32_spinlock_test_init_lock); return (ptw32_processInitialized); } /* processInitialize */
{ "pile_set_name": "Github" }
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.sdk.internal.websocket; import java.io.BufferedInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.OutputStream; import java.net.InetSocketAddress; import java.util.Random; import org.chromium.sdk.ConnectionLogger; import org.chromium.sdk.internal.transport.SocketWrapper; import org.chromium.sdk.internal.transport.SocketWrapper.LoggableInputStream; import org.chromium.sdk.internal.transport.SocketWrapper.LoggableOutputStream; /** * WebSocket connection. Sends and receives messages. Implements HyBi-00 protocol specification. */ public class Hybi00WsConnection extends AbstractWsConnection<LoggableInputStream, LoggableOutputStream> { public static Hybi00WsConnection connect(InetSocketAddress endpoint, int timeout, String resourceId, String origin, ConnectionLogger connectionLogger) throws IOException { SocketWrapper socketWrapper = new SocketWrapper(endpoint, timeout, connectionLogger, LOGGER_CHARSET); boolean handshakeDone = false; Exception handshakeException = null; try { Hybi00Handshake.performHandshake(socketWrapper, endpoint, resourceId, origin, HANDSHAKE_RANDOM); handshakeDone = true; } catch (RuntimeException e) { handshakeException = e; throw e; } catch (IOException e) { handshakeException = e; throw e; } finally { if (!handshakeDone) { socketWrapper.getShutdownRelay().sendSignal(null, handshakeException); } } return new Hybi00WsConnection(socketWrapper, connectionLogger); } private Hybi00WsConnection(SocketWrapper socketWrapper, ConnectionLogger connectionLogger) { super(socketWrapper, connectionLogger); } @Override public void sendTextualMessage(String message) throws IOException { byte[] bytes = message.getBytes(UTF_8_CHARSET); LoggableOutputStream loggableWriter = getSocketWrapper().getLoggableOutput(); OutputStream output = loggableWriter.getOutputStream(); synchronized (this) { output.write((byte) 0); output.write(bytes); output.write((byte) 255); output.flush(); } loggableWriter.markSeparatorForLog(); } @Override protected CloseReason runListenLoop(LoggableInputStream loggableReader) throws IOException, InterruptedException { BufferedInputStream input = new BufferedInputStream(loggableReader.getInputStream()); while (true) { loggableReader.markSeparatorForLog(); int firstByte; try { firstByte = input.read(); } catch (IOException e) { if (isClosingGracefully()) { return CloseReason.USER_REQUEST; } else { throw e; } } if (firstByte == -1) { if (isClosingGracefully()) { return CloseReason.USER_REQUEST; } else { throw new IOException("Unexpected end of stream"); } } if ((firstByte & 0x80) == 0) { ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream(); while (true) { int i = input.read(); if (i == -1) { throw new IOException("End of stream"); } byte b = (byte) i; if (b == (byte) 0xFF) { break; } byteBuffer.write(b); } byte[] messageBytes = byteBuffer.toByteArray(); final String text = new String(messageBytes, UTF_8_CHARSET); getDispatchQueue().put(new MessageDispatcher() { @Override public boolean dispatch(Listener userListener) { userListener.textMessageRecieved(text); return false; } }); } else { long len = 0; while (true) { int lengthByte = input.read(); if (lengthByte == -1) { throw new IOException("End of stream"); } len = len * 10 + (lengthByte & 0x7F); if (len > Integer.MAX_VALUE) { throw new IOException("Message too long"); } if ((lengthByte & 0x80) == 0) { break; } } long needSkip = len; while (needSkip > 0) { long skipped = input.skip(needSkip); needSkip -= skipped; } if (firstByte == (byte) 0xFF && len == 0) { return CloseReason.REMOTE_CLOSE_REQUEST; } else { final long finalLen = len; getDispatchQueue().put(new MessageDispatcher() { @Override public boolean dispatch(Listener userListener) { userListener.errorMessage( new Exception("Unexpected binary message of length " + finalLen)); return false; } }); } } } } private static final Random HANDSHAKE_RANDOM = new Random(); }
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="ISO-8859-1"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <project name="Math"> <bannerRight> <name>Commons Math</name> <src>/images/math.gif</src> <href>/index.html</href> </bannerRight> <body> <menu name="Math"> <item name="Overview" href="/index.html"/> <item name="Downloads" href="http://commons.apache.org/math/download_math.cgi"/> <item name="Javadoc (3.0 release)" href="apidocs/index.html"/> <item name="Javadoc (2.2 release)" href="http://commons.apache.org/math/api-2.2/index.html"/> <item name="Issue Tracking" href="/issue-tracking.html"/> <item name="Source Repository (current)" href="http://svn.apache.org/viewvc/commons/proper/math/trunk"/> <item name="Wiki" href="http://wiki.apache.org/commons/Math"/> <item name="Developers Guide" href="/developers.html"/> <item name="Proposal" href="/proposal.html"/> </menu> <menu name="User Guide"> <item name="Contents" href="/userguide/index.html"/> <item name="Overview" href="/userguide/overview.html"/> <item name="Statistics" href="/userguide/stat.html"/> <item name="Data Generation" href="/userguide/random.html"/> <item name="Linear Algebra" href="/userguide/linear.html"/> <item name="Numerical Analysis" href="/userguide/analysis.html"/> <item name="Special Functions" href="/userguide/special.html"/> <item name="Utilities" href="/userguide/utilities.html"/> <item name="Complex Numbers" href="/userguide/complex.html"/> <item name="Distributions" href="/userguide/distribution.html"/> <item name="Fractions" href="/userguide/fraction.html"/> <item name="Transform Methods" href="/userguide/transform.html"/> <item name="3D Geometry" href="/userguide/geometry.html"/> <item name="Optimization" href="/userguide/optimization.html"/> <item name="Ordinary Differential Equations" href="/userguide/ode.html"/> <item name="Genetic Algorithms" href="/userguide/genetics.html"/> <item name="Filters" href="/userguide/filter.html"/> </menu> </body> </project>
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="refresh" content="0;URL=../../../../libc/constant.XATTR_CREATE.html"> </head> <body> <p>Redirecting to <a href="../../../../libc/constant.XATTR_CREATE.html">../../../../libc/constant.XATTR_CREATE.html</a>...</p> <script>location.replace("../../../../libc/constant.XATTR_CREATE.html" + location.search + location.hash);</script> </body> </html>
{ "pile_set_name": "Github" }
# Event 889 - task_0 ###### Version: 0 ## Description None ## Data Dictionary |Standard Name|Field Name|Type|Description|Sample Value| |---|---|---|---|---| |TBD|p1_UInt32|UInt32|None|`None`| |TBD|p2_String|UnicodeString|None|`None`| |TBD|p3_String|UnicodeString|None|`None`| ## Tags * etw_level_Informational * etw_keywords_PLM ExecProductionCircular ExecDevPlatCircular * etw_task_task_0
{ "pile_set_name": "Github" }
/// @brief Include to sample cube map array textures. /// @file gli/sampler_cube_array.hpp #pragma once #include "sampler.hpp" #include "texture_cube_array.hpp" #include "core/mipmaps_compute.hpp" #include "core/convert_func.hpp" namespace gli { /// Cube map array texture sampler /// @tparam T Sampler can fetch, write and interpret any texture format but will expose and process the data through type T conversions. /// @tparam P Precision in term of ULPs template <typename T, precision P = defaultp> class sampler_cube_array : public sampler { private: typedef typename detail::interpolate<T>::type interpolate_type; public: typedef texture_cube_array texture_type; typedef typename texture_type::size_type size_type; typedef typename texture_type::extent_type extent_type; typedef interpolate_type level_type; typedef vec<2, interpolate_type, P> normalized_type; typedef vec<4, T, P> texel_type; sampler_cube_array(texture_type const& Texture, wrap Wrap, filter Mip = FILTER_NEAREST, filter Min = FILTER_NEAREST, texel_type const& BorderColor = texel_type(0, 0, 0, 1)); /// Access the sampler texture object texture_type const& operator()() const; /// Fetch a texel from the sampler texture texel_type texel_fetch(extent_type const& TexelCoord, size_type layer, size_type Face, size_type Level) const; /// Write a texel in the sampler texture void texel_write(extent_type const& TexelCoord, size_type layer, size_type Face, size_type Level, texel_type const& Texel); /// Clear the sampler texture with a uniform texel void clear(texel_type const& Texel); /// Sample the sampler texture at a specific level texel_type texture_lod(normalized_type const& SampleCoord, size_type layer, size_type Face, level_type Level) const; /// Generate all the mipmaps of the sampler texture from the texture base level void generate_mipmaps(filter Minification); /// Generate the mipmaps of the sampler texture from the texture base level to the texture max level included void generate_mipmaps(size_type BaseLayer, size_type MaxLayer, size_type BaseFace, size_type MaxFace, size_type BaseLevel, size_type MaxLevel, filter Minification); private: typedef typename detail::convert<texture_type, T, P>::func convert_type; typedef typename detail::convert<texture_type, T, P>::fetchFunc fetch_type; typedef typename detail::convert<texture_type, T, P>::writeFunc write_type; typedef typename detail::filterBase<detail::DIMENSION_2D, texture_type, interpolate_type, normalized_type, fetch_type, texel_type>::filterFunc filter_type; texture_type Texture; convert_type Convert; texel_type BorderColor; filter_type Filter; }; typedef sampler_cube_array<float> fsamplerCubeArray; typedef sampler_cube_array<double> dsamplerCubeArray; typedef sampler_cube_array<unsigned int> usamplerCubeArray; typedef sampler_cube_array<int> isamplerCubeArray; }//namespace gli #include "./core/sampler_cube_array.inl"
{ "pile_set_name": "Github" }
ENTRY(_start) SECTIONS { . = 0x100000; .text : AT(ADDR(.text)) { *(multiboot) *(.text) } .data ALIGN(4096) : AT(ADDR(.data)) { *(.data) } .rodata ALIGN(4096) : AT(ADDR(.rodata)) { *(.rodata) } .bss ALIGN(4096) : { *(.bss) } }
{ "pile_set_name": "Github" }
/* include my_addrs */ #include "unp.h" #include <sys/utsname.h> char ** my_addrs(int *addrtype) { struct hostent *hptr; struct utsname myname; if (uname(&myname) < 0) return(NULL); if ( (hptr = gethostbyname(myname.nodename)) == NULL) return(NULL); *addrtype = hptr->h_addrtype; return(hptr->h_addr_list); } /* end my_addrs */ char ** My_addrs(int *pfamily) { char **pptr; if ( (pptr = my_addrs(pfamily)) == NULL) err_sys("my_addrs error"); return(pptr); }
{ "pile_set_name": "Github" }
[ { "type": "api-change", "category": "CodeBuild", "description": "Adding support for Shallow Clone and GitHub Enterprise in AWS CodeBuild." }, { "type": "enhancement", "category": "CloudHsm", "description": "Added service signing name." }, { "type": "enhancement", "category": "Appstream", "description": "This API update is to support Amazon AppStream 2.0's launch into the Asia Pacific (Singapore) and Asia Pacific (Sydney) regions." }, { "type": "api-change", "category": "Lambda", "description": "AWS Lambda now supports Revision ID on your function versions and aliases, to track and apply conditional updates when you are updating your function version or alias resources." }, { "type": "api-change", "category": "GuardDuty", "description": "Added the missing AccessKeyDetails object to the resource shape." }, { "type": "api-change", "category": "AlexaForBusiness", "description": "Supports new field for DeviceStatusInfo which provides details about the DeviceStatus following a DeviceSync operation." }, { "type": "bugfix", "category": "RetryMiddleware", "description": "Verify we have the curl extension before retrying on the CURLE_RECV_ERROR curl const." } ]
{ "pile_set_name": "Github" }
jQuery(function($){ //full screen btn $('.layout-btns .layout-full').click(function(e){ var icon = $(this).find('i') if($(this).hasClass('active')){ // reset $('#left-side, ul.breadcrumb').show('fast'); $('#content-block').removeClass('col-md-12 col-sm-12 full-content').addClass('col-sm-11 col-md-10'); icon.removeClass('fa-compress').addClass('fa-expand'); $(window).trigger('resize'); } else { // full screen $('#left-side, ul.breadcrumb').hide('fast', function(){ $('#content-block').removeClass('col-sm-11 col-md-10').addClass('col-md-12 col-sm-12 full-content'); icon.removeClass('fa-expand').addClass('fa-compress'); $(window).trigger('resize'); }); } }); $('.layout-btns .layout-normal').click(function(e){ $('.results table').removeClass('table-condensed'); }); $('.layout-btns .layout-condensed').click(function(e){ $('.results table').addClass('table-condensed'); }); });
{ "pile_set_name": "Github" }
{ "measurements": { "Cloud Albedo": { "id": "cloud-albedo", "title": "Cloud Albedo", "subtitle": "MERRA-2", "sources": { "MERRA-2": { "id": "merra2", "title": "MERRA-2", "description": "merra/CloudAlbedo", "image": "", "settings": [ "MERRA2_ISCCP_Cloud_Albedo_Monthly" ] } } } } }
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="description" content="Javadoc API documentation for Fresco." /> <link rel="shortcut icon" type="image/x-icon" href="../../../../favicon.ico" /> <title> ImageRequest - Fresco API | Fresco </title> <link href="../../../../../assets/doclava-developer-docs.css" rel="stylesheet" type="text/css" /> <link href="../../../../../assets/customizations.css" rel="stylesheet" type="text/css" /> <script src="../../../../../assets/search_autocomplete.js" type="text/javascript"></script> <script src="../../../../../assets/jquery-resizable.min.js" type="text/javascript"></script> <script src="../../../../../assets/doclava-developer-docs.js" type="text/javascript"></script> <script src="../../../../../assets/prettify.js" type="text/javascript"></script> <script type="text/javascript"> setToRoot("../../../../", "../../../../../assets/"); </script> <script src="../../../../../assets/doclava-developer-reference.js" type="text/javascript"></script> <script src="../../../../../assets/navtree_data.js" type="text/javascript"></script> <script src="../../../../../assets/customizations.js" type="text/javascript"></script> <noscript> <style type="text/css"> html,body{overflow:auto;} #body-content{position:relative; top:0;} #doc-content{overflow:visible;border-left:3px solid #666;} #side-nav{padding:0;} #side-nav .toggle-list ul {display:block;} #resize-packages-nav{border-bottom:3px solid #666;} </style> </noscript> </head> <body class=""> <div id="header"> <div id="headerLeft"> <span id="masthead-title">Fresco</span> </div> <div id="headerRight"> <div id="search" > <div id="searchForm"> <form accept-charset="utf-8" class="gsc-search-box" onsubmit="return submit_search()"> <table class="gsc-search-box" cellpadding="0" cellspacing="0"><tbody> <tr> <td class="gsc-input"> <input id="search_autocomplete" class="gsc-input" type="text" size="33" autocomplete="off" title="search developer docs" name="q" value="search developer docs" onFocus="search_focus_changed(this, true)" onBlur="search_focus_changed(this, false)" onkeydown="return search_changed(event, true, '../../../../')" onkeyup="return search_changed(event, false, '../../../../')" /> <div id="search_filtered_div" class="no-display"> <table id="search_filtered" cellspacing=0> </table> </div> </td> <td class="gsc-search-button"> <input type="submit" value="Search" title="search" id="search-button" class="gsc-search-button" /> </td> <td class="gsc-clear-button"> <div title="clear results" class="gsc-clear-button">&nbsp;</div> </td> </tr></tbody> </table> </form> </div><!-- searchForm --> </div><!-- search --> </div> </div><!-- header --> <div class="g-section g-tpl-240" id="body-content"> <div class="g-unit g-first side-nav-resizable" id="side-nav"> <div id="swapper"> <div id="nav-panels"> <div id="resize-packages-nav"> <div id="packages-nav"> <div id="index-links"> <a href="../../../../packages.html" >Package Index</a> | <a href="../../../../classes.html" >Class Index</a> </div> <ul> <li class="api apilevel-"> <a href="../../../../com/facebook/binaryresource/package-summary.html">com.facebook.binaryresource</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/cache/common/package-summary.html">com.facebook.cache.common</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/cache/disk/package-summary.html">com.facebook.cache.disk</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/common/disk/package-summary.html">com.facebook.common.disk</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/common/internal/package-summary.html">com.facebook.common.internal</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/common/logging/package-summary.html">com.facebook.common.logging</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/common/memory/package-summary.html">com.facebook.common.memory</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/common/references/package-summary.html">com.facebook.common.references</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/datasource/package-summary.html">com.facebook.datasource</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/drawee/backends/pipeline/package-summary.html">com.facebook.drawee.backends.pipeline</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/drawee/backends/volley/package-summary.html">com.facebook.drawee.backends.volley</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/drawee/controller/package-summary.html">com.facebook.drawee.controller</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/drawee/drawable/package-summary.html">com.facebook.drawee.drawable</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/drawee/generic/package-summary.html">com.facebook.drawee.generic</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/drawee/interfaces/package-summary.html">com.facebook.drawee.interfaces</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/drawee/view/package-summary.html">com.facebook.drawee.view</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/animated/base/package-summary.html">com.facebook.imagepipeline.animated.base</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/animated/factory/package-summary.html">com.facebook.imagepipeline.animated.factory</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/animated/impl/package-summary.html">com.facebook.imagepipeline.animated.impl</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/animated/util/package-summary.html">com.facebook.imagepipeline.animated.util</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/backends/okhttp3/package-summary.html">com.facebook.imagepipeline.backends.okhttp3</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/bitmaps/package-summary.html">com.facebook.imagepipeline.bitmaps</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/cache/package-summary.html">com.facebook.imagepipeline.cache</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/common/package-summary.html">com.facebook.imagepipeline.common</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/core/package-summary.html">com.facebook.imagepipeline.core</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/datasource/package-summary.html">com.facebook.imagepipeline.datasource</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/decoder/package-summary.html">com.facebook.imagepipeline.decoder</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/image/package-summary.html">com.facebook.imagepipeline.image</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/listener/package-summary.html">com.facebook.imagepipeline.listener</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/memory/package-summary.html">com.facebook.imagepipeline.memory</a></li> <li class="api apilevel-"> <a href="../../../../com/facebook/imagepipeline/producers/package-summary.html">com.facebook.imagepipeline.producers</a></li> <li class="selected api apilevel-"> <a href="../../../../com/facebook/imagepipeline/request/package-summary.html">com.facebook.imagepipeline.request</a></li> </ul><br/> </div> <!-- end packages --> </div> <!-- end resize-packages --> <div id="classes-nav"> <ul> <li><h2>Interfaces</h2> <ul> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/Postprocessor.html">Postprocessor</a></li> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/RepeatedPostprocessor.html">RepeatedPostprocessor</a></li> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/RepeatedPostprocessorRunner.html">RepeatedPostprocessorRunner</a></li> </ul> </li> <li><h2>Classes</h2> <ul> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/BasePostprocessor.html">BasePostprocessor</a></li> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/BaseRepeatedPostProcessor.html">BaseRepeatedPostProcessor</a></li> <li class="selected api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html">ImageRequest</a></li> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/ImageRequestBuilder.html">ImageRequestBuilder</a></li> </ul> </li> <li><h2>Enums</h2> <ul> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.CacheChoice.html">ImageRequest.CacheChoice</a></li> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.RequestLevel.html">ImageRequest.RequestLevel</a></li> </ul> </li> <li><h2>Exceptions</h2> <ul> <li class="api apilevel-"><a href="../../../../com/facebook/imagepipeline/request/ImageRequestBuilder.BuilderException.html">ImageRequestBuilder.BuilderException</a></li> </ul> </li> </ul><br/> </div><!-- end classes --> </div><!-- end nav-panels --> <div id="nav-tree" style="display:none"> <div id="index-links"> <a href="../../../../packages.html" >Package Index</a> | <a href="../../../../classes.html" >Class Index</a> </div> </div><!-- end nav-tree --> </div><!-- end swapper --> </div> <!-- end side-nav --> <script> if (!isMobile) { $("<a href='#' id='nav-swap' onclick='swapNav();return false;' style='font-size:10px;line-height:9px;margin-left:1em;text-decoration:none;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a>").appendTo("#side-nav"); chooseDefaultNav(); if ($("#nav-tree").is(':visible')) { init_default_navtree("../../../../"); } else { addLoadEvent(function() { scrollIntoView("packages-nav"); scrollIntoView("classes-nav"); }); } $("#swapper").css({borderBottom:"2px solid #aaa"}); } else { swapNav(); // tree view should be used on mobile } </script> <div class="g-unit" id="doc-content"> <div id="api-info-block"> <div class="sum-details-links"> Summary: <a href="#nestedclasses">Nested Classes</a> &#124; <a href="#proctors">Protected Ctors</a> &#124; <a href="#pubmethods">Methods</a> &#124; <a href="#inhmethods">Inherited Methods</a> &#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> </div><!-- end sum-details-links --> <div class="api-level"> </div> </div><!-- end api-info-block --> <!-- ======== START OF CLASS DATA ======== --> <div id="jd-header"> public class <h1>ImageRequest</h1> extends Object<br/> </div><!-- end header --> <div id="naMessage"></div> <div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> <tr> <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object</td> </tr> <tr> <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td> <td colspan="1" class="jd-inheritance-class-cell">com.facebook.imagepipeline.request.ImageRequest</td> </tr> </table> <div class="jd-descr"> <h2>Class Overview</h2> <p>Immutable object encapsulating everything pipeline has to know about requested image to proceed. </p> </div><!-- jd-descr --> <div class="jd-descr"> <h2>Summary</h2> <!-- ======== NESTED CLASS SUMMARY ======== --> <table id="nestedclasses" class="jd-sumtable"><tr><th colspan="12">Nested Classes</th></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> enum</td> <td class="jd-linkcol"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.CacheChoice.html">ImageRequest.CacheChoice</a></td> <td class="jd-descrcol" width="100%">An enum describing the cache choice.&nbsp;</td> </tr> <tr class=" api apilevel-" > <td class="jd-typecol"> enum</td> <td class="jd-linkcol"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.RequestLevel.html">ImageRequest.RequestLevel</a></td> <td class="jd-descrcol" width="100%">Level down to we are willing to go in order to find an image.&nbsp;</td> </tr> </table> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <table id="proctors" class="jd-sumtable"><tr><th colspan="12">Protected Constructors</th></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#ImageRequest(com.facebook.imagepipeline.request.ImageRequestBuilder)">ImageRequest</a></span>(<a href="../../../../com/facebook/imagepipeline/request/ImageRequestBuilder.html">ImageRequestBuilder</a> builder) </td></tr> </table> <!-- ========== METHOD SUMMARY =========== --> <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> boolean </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#equals(java.lang.Object)">equals</a></span>(Object o) </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> static <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html">ImageRequest</a> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#fromUri(android.net.Uri)">fromUri</a></span>(Uri uri) </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> static <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html">ImageRequest</a> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#fromUri(java.lang.String)">fromUri</a></span>(String uriString) </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> boolean </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getAutoRotateEnabled()">getAutoRotateEnabled</a></span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.CacheChoice.html">ImageRequest.CacheChoice</a> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getCacheChoice()">getCacheChoice</a></span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> ImageDecodeOptions </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getImageDecodeOptions()">getImageDecodeOptions</a></span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> boolean </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getLocalThumbnailPreviewsEnabled()">getLocalThumbnailPreviewsEnabled</a></span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.RequestLevel.html">ImageRequest.RequestLevel</a> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getLowestPermittedRequestLevel()">getLowestPermittedRequestLevel</a></span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> <a href="../../../../com/facebook/imagepipeline/request/Postprocessor.html">Postprocessor</a> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getPostprocessor()">getPostprocessor</a></span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> int </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getPreferredHeight()">getPreferredHeight</a></span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> int </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getPreferredWidth()">getPreferredWidth</a></span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> Priority </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getPriority()">getPriority</a></span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> boolean </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getProgressiveRenderingEnabled()">getProgressiveRenderingEnabled</a></span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> <a href="../../../../com/facebook/imagepipeline/common/ResizeOptions.html">ResizeOptions</a> </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getResizeOptions()">getResizeOptions</a></span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> synchronized File </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getSourceFile()">getSourceFile</a></span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> Uri </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#getSourceUri()">getSourceUri</a></span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> int </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#hashCode()">hashCode</a></span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> boolean </td> <td class="jd-linkcol" width="100%"> <span class="sympad"><a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html#isDiskCacheEnabled()">isDiskCacheEnabled</a></span>() </td></tr> </table> <!-- ========== METHOD SUMMARY =========== --> <table id="inhmethods" class="jd-sumtable"><tr><th> <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> <div style="clear:left;">Inherited Methods</div></th></tr> <tr class="api apilevel-" > <td colspan="12"> <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" ><img id="inherited-methods-java.lang.Object-trigger" src="../../../../../assets/images/triangle-closed.png" class="jd-expando-trigger-img" /></a> From class java.lang.Object <div id="inherited-methods-java.lang.Object"> <div id="inherited-methods-java.lang.Object-list" class="jd-inheritedlinks"> </div> <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> <table class="jd-sumtable-expando"> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> Object </td> <td class="jd-linkcol" width="100%"> <span class="sympad">clone</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> boolean </td> <td class="jd-linkcol" width="100%"> <span class="sympad">equals</span>(Object arg0) </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">finalize</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> final Class&lt;?&gt; </td> <td class="jd-linkcol" width="100%"> <span class="sympad">getClass</span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> int </td> <td class="jd-linkcol" width="100%"> <span class="sympad">hashCode</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">notify</span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">notifyAll</span>() </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> String </td> <td class="jd-linkcol" width="100%"> <span class="sympad">toString</span>() </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">wait</span>(long arg0, int arg1) </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">wait</span>(long arg0) </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"> final void </td> <td class="jd-linkcol" width="100%"> <span class="sympad">wait</span>() </td></tr> </table> </div> </div> </td></tr> </table> </div><!-- jd-descr (summary) --> <!-- Details --> <!-- XML Attributes --> <!-- Enum Values --> <!-- Constants --> <!-- Fields --> <!-- Public ctors --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <!-- Protected ctors --> <h2>Protected Constructors</h2> <a id="ImageRequest(com.facebook.imagepipeline.request.ImageRequestBuilder)"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> protected </span> <span class="sympad">ImageRequest</span> <span class="normal">(<a href="../../../../com/facebook/imagepipeline/request/ImageRequestBuilder.html">ImageRequestBuilder</a> builder)</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <!-- ========= METHOD DETAIL ======== --> <!-- Public methdos --> <h2>Public Methods</h2> <a id="equals(java.lang.Object)"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public boolean </span> <span class="sympad">equals</span> <span class="normal">(Object o)</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="fromUri(android.net.Uri)"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public static <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html">ImageRequest</a> </span> <span class="sympad">fromUri</span> <span class="normal">(Uri uri)</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="fromUri(java.lang.String)"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public static <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.html">ImageRequest</a> </span> <span class="sympad">fromUri</span> <span class="normal">(String uriString)</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getAutoRotateEnabled()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public boolean </span> <span class="sympad">getAutoRotateEnabled</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getCacheChoice()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.CacheChoice.html">ImageRequest.CacheChoice</a> </span> <span class="sympad">getCacheChoice</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getImageDecodeOptions()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public ImageDecodeOptions </span> <span class="sympad">getImageDecodeOptions</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getLocalThumbnailPreviewsEnabled()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public boolean </span> <span class="sympad">getLocalThumbnailPreviewsEnabled</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getLowestPermittedRequestLevel()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../com/facebook/imagepipeline/request/ImageRequest.RequestLevel.html">ImageRequest.RequestLevel</a> </span> <span class="sympad">getLowestPermittedRequestLevel</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getPostprocessor()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../com/facebook/imagepipeline/request/Postprocessor.html">Postprocessor</a> </span> <span class="sympad">getPostprocessor</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getPreferredHeight()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public int </span> <span class="sympad">getPreferredHeight</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getPreferredWidth()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public int </span> <span class="sympad">getPreferredWidth</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getPriority()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public Priority </span> <span class="sympad">getPriority</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getProgressiveRenderingEnabled()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public boolean </span> <span class="sympad">getProgressiveRenderingEnabled</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getResizeOptions()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../com/facebook/imagepipeline/common/ResizeOptions.html">ResizeOptions</a> </span> <span class="sympad">getResizeOptions</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getSourceFile()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public synchronized File </span> <span class="sympad">getSourceFile</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="getSourceUri()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public Uri </span> <span class="sympad">getSourceUri</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="hashCode()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public int </span> <span class="sympad">hashCode</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <a id="isDiskCacheEnabled()"></a> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public boolean </span> <span class="sympad">isDiskCacheEnabled</span> <span class="normal">()</span> </h4> <div class="api-level"> <div> </div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p></p></div> </div> </div> <!-- ========= METHOD DETAIL ======== --> <!-- ========= END OF CLASS DATA ========= --> <a id="navbar_top"></a> <div id="footer"> Generated by <a href="http://code.google.com/p/doclava/">Doclava</a>. </div> <!-- end footer --> </div> <!-- jd-content --> </div><!-- end doc-content --> </div> <!-- end body-content --> <script type="text/javascript"> init(); /* initialize doclava-developer-docs.js */ </script> </body> </html>
{ "pile_set_name": "Github" }
/* * jQuery UI Progressbar 1.8.16 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Progressbar#theming */ .ui-progressbar { height:2em; text-align: left; } .ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
{ "pile_set_name": "Github" }
{ "name": "StatusPage", "version": "3.0.0", "description": "Public Status Page for UptimeRobot", "moduleType": [ "globals" ], "keywords": [ "UptimeRobot", "PublicStatusPage", "API", "Uptime", "Status", "Page" ], "authors": [ "Spencer Lowe" ], "license": "MIT", "homepage": "http://statuspage.spencerl.com/", "ignore": [ "**/.*", "node_modules", "bower_components", "test", "tests" ], "dependencies": { "jquery": "~2.1.3", "bootstrap": "~3.3.2", "fontawesome": "~4.3.0", "handlebars": "~3.0.0", "morris.js": "~0.5.1" } }
{ "pile_set_name": "Github" }
module rrsw_kg25 use parkind ,only : im => kind_im, rb => kind_rb use parrrsw, only : ng25 implicit none save !----------------------------------------------------------------- ! rrtmg_sw ORIGINAL abs. coefficients for interval 25 ! band 25: 16000-22650 cm-1 (low - h2o; high - nothing) ! ! Initial version: JJMorcrette, ECMWF, oct1999 ! Revised: MJIacono, AER, jul2006 ! Revised: MJIacono, AER, aug2008 ! Revised: MJIacono, AER, nov2015, solar variability !----------------------------------------------------------------- ! ! name type purpose ! ---- : ---- : --------------------------------------------- ! kao : real !sfluxrefo: real !irradnceo: real !facbrghto: real !snsptdrko: real ! abso3ao : real ! abso3bo : real ! raylo : real !----------------------------------------------------------------- integer(kind=im), parameter :: no25 = 16 real(kind=rb) :: kao(5,13,no25) real(kind=rb) :: sfluxrefo(no25) real(kind=rb) :: irradnceo(no25) real(kind=rb) :: facbrghto(no25),snsptdrko(no25) real(kind=rb) :: abso3ao(no25), abso3bo(no25) real(kind=rb) :: raylo(no25) !----------------------------------------------------------------- ! rrtmg_sw COMBINED abs. coefficients for interval 25 ! band 25: 16000-22650 cm-1 (low - h2o; high - nothing) ! ! Initial version: JJMorcrette, ECMWF, oct1999 ! Revised: MJIacono, AER, jul2006 ! Revised: MJIacono, AER, aug2008 ! Revised: MJIacono, AER, nov2015, solar variability !----------------------------------------------------------------- ! ! name type purpose ! ---- : ---- : --------------------------------------------- ! ka : real ! absa : real ! sfluxref: real ! irradnce: real ! facbrght: real ! snsptdrk: real ! abso3a : real ! abso3b : real ! rayl : real !----------------------------------------------------------------- real(kind=rb) :: ka(5,13,ng25), absa(65,ng25) real(kind=rb) :: sfluxref(ng25) real(kind=rb) :: irradnce(ng25) real(kind=rb) :: facbrght(ng25),snsptdrk(ng25) real(kind=rb) :: abso3a(ng25), abso3b(ng25) real(kind=rb) :: rayl(ng25) equivalence (ka(1,1,1),absa(1,1)) end module rrsw_kg25
{ "pile_set_name": "Github" }
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <title>PHP RFC Watch</title> <link rel="stylesheet" href="{{ asset('build/css/app.css') }}"> <link type="application/atom+xml" rel="alternate" href="/atom.xml" /> </head> <body class="bg-gray-200"> <nav class="flex flex-wrap bg-gray-800 p-2"> <div class="text-xs text-white"> <a target="_blank" href="https://tideways.com?pk_campaign=rfcwatch">PHP RFC Watch is sponsored by <img class="h-4 inline-block" src="/tideways.png" /> Tideways <span class="d-none d-lg-inline">- Profiling, Monitoring and Exception Tracking for PHP</span></a> </div> </nav> <main> <div class="container mx-auto"> <div class="row mb-2"> <div class="col-sm"> <h1 class="text-center"><a class="text-4xl" href="/"><img class="h-10 inline-block" src="/php.svg"> RFC Watch</a></h1> </div> </div> {% block content %}{% endblock %} </div> </main> <footer class="mt-10"> <div class="w-full text-center text-sm text-gray-800"> Built by <a href="https://tideways.com">Tideways.com</a> | <a href="https://github.com/beberlei/php-rfc-watch">Github</a> | <a href="/atom.xml">Atom Feed</a> | <a href="https://tideways.com/imprint">Imprint</a> | <a href="https://tideways.com/tos">Terms Of Service</a> | <a href="https://tideways.com/privacy">Privacy Policy</a> </div> </footer> <script src="{{ asset('build/js/app.js') }}"></script> </body> </html>
{ "pile_set_name": "Github" }
-- analyze2.test -- -- execsql { SELECT * FROM sqlite_master } SELECT * FROM sqlite_master
{ "pile_set_name": "Github" }
<link rel="shortcut icon" href="/images/favicon.ico" type="image/x-icon"> <link rel="icon" href="/images/favicon.ico" type="image/x-icon">
{ "pile_set_name": "Github" }
/// \file // Range v3 library // // Copyright Eric Niebler 2013-present // // Use, modification and distribution is subject to the // Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // // Project home: https://github.com/ericniebler/range-v3 // #ifndef RANGES_V3_ACTION_CONCEPTS_HPP #define RANGES_V3_ACTION_CONCEPTS_HPP #include <utility> #include <meta/meta.hpp> #include <range/v3/range_fwd.hpp> #include <range/v3/range/concepts.hpp> #include <range/v3/range/traits.hpp> namespace ranges { /// \cond namespace detail { template<typename T> struct movable_input_iterator { using iterator_category = std::input_iterator_tag; using value_type = T; using difference_type = std::ptrdiff_t; using pointer = T *; using reference = T &&; movable_input_iterator() = default; movable_input_iterator & operator++(); movable_input_iterator operator++(int); bool operator==(movable_input_iterator const &) const; bool operator!=(movable_input_iterator const &) const; T && operator*() const; }; } // namespace detail /// \endcond /// \addtogroup group-range /// @{ // std::array is a semi_container, native arrays are not. // clang-format off CPP_def ( template(typename T) concept semi_container, forward_range<T> && default_constructible<uncvref_t<T>> && movable<uncvref_t<T>> && !view_<T> ); // std::vector is a container, std::array is not CPP_def ( template(typename T) concept container, semi_container<T> && constructible_from< uncvref_t<T>, detail::movable_input_iterator<range_value_t<T>>, detail::movable_input_iterator<range_value_t<T>>> ); CPP_def ( template(typename C) concept reservable, requires (C &c, C const &cc, range_size_t<C> s) ( c.reserve(s), cc.capacity(), cc.max_size(), concepts::requires_<same_as<decltype(cc.capacity()), range_size_t<C>>>, concepts::requires_<same_as<decltype(cc.max_size()), range_size_t<C>>> ) && container<C> && sized_range<C> ); CPP_def ( template(typename C, typename I) concept reservable_with_assign, requires (C &c, I i) ( c.assign(i, i) ) && reservable<C> && input_iterator<I> ); CPP_def ( template(typename C) concept random_access_reservable, reservable<C> && random_access_range<C> ); // clang-format on /// \cond namespace detail { template<typename T> auto is_lvalue_container_like(T &) noexcept -> CPP_ret(std::true_type)( // requires container<T>) { return {}; } template<typename T> auto is_lvalue_container_like(reference_wrapper<T>) noexcept -> CPP_ret(meta::not_<std::is_rvalue_reference<T>>)( // requires container<T>) { return {}; } template<typename T> auto is_lvalue_container_like(std::reference_wrapper<T>) noexcept -> CPP_ret(std::true_type)( // requires container<T>) { return {}; } template<typename T> auto is_lvalue_container_like(ref_view<T>) noexcept -> CPP_ret(std::true_type)( // requires container<T>) { return {}; } template<typename T> using is_lvalue_container_like_t = decltype(detail::is_lvalue_container_like(std::declval<T>())); } // namespace detail /// \endcond // clang-format off CPP_def ( template(typename T) concept lvalue_container_like, implicitly_convertible_to<detail::is_lvalue_container_like_t<T>, std::true_type> && forward_range<T> ); // clang-format on /// @} } // namespace ranges #endif
{ "pile_set_name": "Github" }
TORCH := $(shell if [ -e $(HOME)/torch/install/lib ] ; then echo $(HOME)/torch/install ; else echo /usr/local ; fi) CXXFLAGS = -O3 -c -fPIC -Wall -I./dlib -I/opt/X11/include -I/usr/local/include -I$(TORCH)/include LDFLAGS = -shared FILES = dlib/dlib/all/source.o face_align.o LDFLAGS += -L$(TORCH)/lib/lua/5.1 -L/usr/local/lib -L$(TORCH)/lib -L/opt/X11/lib -lTH -lluajit -lluaT -lX11 libface_align.so: $(FILES) $(CXX) $(FILES) -o $@ $(LDFLAGS) install: libface_align.so cp libface_align.so ../ clean: rm -f *.o libface_align.so
{ "pile_set_name": "Github" }
/** * @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license */ import ClassicEditor from '@ckeditor/ckeditor5-editor-classic/src/classiceditor'; import ArticlePluginSet from '@ckeditor/ckeditor5-core/tests/_utils/articlepluginset'; import DomEventData from '@ckeditor/ckeditor5-engine/src/view/observer/domeventdata'; import EventInfo from '@ckeditor/ckeditor5-utils/src/eventinfo'; import global from '@ckeditor/ckeditor5-utils/src/dom/global'; import ViewText from '@ckeditor/ckeditor5-engine/src/view/text'; import Widget from '../../src/widget'; import WidgetTypeAround from '../../src/widgettypearound/widgettypearound'; import { TYPE_AROUND_SELECTION_ATTRIBUTE } from '../../src/widgettypearound/utils'; import { toWidget } from '../../src/utils'; import { setData as setModelData, getData as getModelData } from '@ckeditor/ckeditor5-engine/src/dev-utils/model'; import { getCode } from '@ckeditor/ckeditor5-utils/src/keyboard'; describe( 'WidgetTypeAround', () => { let element, plugin, editor, editingView, viewDocument, modelRoot, viewRoot; beforeEach( async () => { element = global.document.createElement( 'div' ); global.document.body.appendChild( element ); editor = await ClassicEditor.create( element, { plugins: [ ArticlePluginSet, Widget, blockWidgetPlugin, inlineWidgetPlugin ], image: { toolbar: [ 'imageStyle:full', 'imageStyle:side' ] } } ); editingView = editor.editing.view; viewDocument = editingView.document; viewRoot = viewDocument.getRoot(); modelRoot = editor.model.document.getRoot(); plugin = editor.plugins.get( WidgetTypeAround ); } ); afterEach( async () => { element.remove(); await editor.destroy(); } ); describe( 'plugin', () => { it( 'should be loaded', () => { expect( editor.plugins.get( WidgetTypeAround ) ).to.be.instanceOf( WidgetTypeAround ); } ); it( 'should have a name', () => { expect( WidgetTypeAround.pluginName ).to.equal( 'WidgetTypeAround' ); } ); describe( '#isEnabled support', () => { it( 'should add class to the editing view root when becoming disabled', () => { editor.plugins.get( WidgetTypeAround ).isEnabled = false; expect( viewRoot.hasClass( 'ck-widget__type-around_disabled' ) ).to.be.true; editor.plugins.get( WidgetTypeAround ).isEnabled = true; expect( viewRoot.hasClass( 'ck-widget__type-around_disabled' ) ).to.be.false; } ); it( 'should remove the model selection attribute when becoming disabled', () => { setModelData( editor.model, '<blockWidget></blockWidget>' ); editor.model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'foo' ); } ); expect( editor.model.document.selection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'foo' ); editor.plugins.get( WidgetTypeAround ).isEnabled = false; expect( editor.model.document.selection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); } ); } ); describe( '_insertParagraph()', () => { let executeSpy; beforeEach( () => { executeSpy = sinon.spy( editor, 'execute' ); } ); it( 'should execute the "insertParagraph" command when inserting a paragraph before the widget', () => { setModelData( editor.model, '<blockWidget></blockWidget>' ); plugin._insertParagraph( modelRoot.getChild( 0 ), 'before' ); const spyExecutePosition = executeSpy.firstCall.args[ 1 ].position; const positionBeforeWidget = editor.model.createPositionBefore( modelRoot.getChild( 0 ) ); sinon.assert.calledOnce( executeSpy ); sinon.assert.calledWith( executeSpy, 'insertParagraph' ); expect( spyExecutePosition.isEqual( positionBeforeWidget ) ).to.be.true; expect( getModelData( editor.model ) ).to.equal( '<paragraph>[]</paragraph><blockWidget></blockWidget>' ); } ); it( 'should execute the "insertParagraph" command when inserting a paragraph after the widget', () => { setModelData( editor.model, '<blockWidget></blockWidget>' ); plugin._insertParagraph( modelRoot.getChild( 0 ), 'after' ); const spyExecutePosition = executeSpy.firstCall.args[ 1 ].position; const positionAfterWidget = editor.model.createPositionAfter( modelRoot.getChild( 0 ) ); sinon.assert.calledOnce( executeSpy ); sinon.assert.calledWith( executeSpy, 'insertParagraph' ); expect( spyExecutePosition.isEqual( positionAfterWidget ) ).to.be.true; expect( getModelData( editor.model ) ).to.equal( '<blockWidget></blockWidget><paragraph>[]</paragraph>' ); } ); it( 'should focus the editing view', () => { const spy = sinon.spy( editor.editing.view, 'focus' ); setModelData( editor.model, '<blockWidget></blockWidget>' ); plugin._insertParagraph( modelRoot.getChild( 0 ), 'after' ); sinon.assert.calledOnce( spy ); } ); it( 'should scroll the editing view to the selection in an inserted paragraph', () => { const spy = sinon.spy( editor.editing.view, 'scrollToTheSelection' ); setModelData( editor.model, '<blockWidget></blockWidget>' ); plugin._insertParagraph( modelRoot.getChild( 0 ), 'after' ); sinon.assert.calledOnce( spy ); } ); } ); describe( 'UI to type around view widgets', () => { it( 'should be injected in block widgets', () => { setModelData( editor.model, '<paragraph>foo</paragraph>' + '<blockWidget></blockWidget>' + '<paragraph>bar</paragraph>' + '<blockWidget></blockWidget>' ); const firstViewWidget = viewRoot.getChild( 1 ); const lastViewWidget = viewRoot.getChild( 3 ); expect( firstViewWidget.childCount ).to.equal( 2 ); expect( firstViewWidget.getChild( 1 ).hasClass( 'ck-widget__type-around' ) ).to.be.true; expect( lastViewWidget.childCount ).to.equal( 2 ); expect( lastViewWidget.getChild( 1 ).hasClass( 'ck-widget__type-around' ) ).to.be.true; } ); it( 'should not be injected in inline widgets', () => { setModelData( editor.model, '<paragraph>foo<inlineWidget></inlineWidget></paragraph>' + '<paragraph><inlineWidget></inlineWidget>bar</paragraph>' ); const firstViewWidget = viewRoot.getChild( 0 ).getChild( 1 ); const lastViewWidget = viewRoot.getChild( 1 ).getChild( 0 ); expect( firstViewWidget.childCount ).to.equal( 1 ); expect( firstViewWidget.getChild( 0 ).is( '$text' ) ).to.be.true; expect( lastViewWidget.childCount ).to.equal( 1 ); expect( lastViewWidget.getChild( 0 ).is( '$text' ) ).to.be.true; } ); it( 'should inject buttons into the wrapper', () => { setModelData( editor.model, '<blockWidget></blockWidget>' ); const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.getChild( 1 ).is( 'uiElement' ) ).to.be.true; expect( viewWidget.getChild( 1 ).hasClass( 'ck' ) ).to.be.true; expect( viewWidget.getChild( 1 ).hasClass( 'ck-reset_all' ) ).to.be.true; expect( viewWidget.getChild( 1 ).hasClass( 'ck-widget__type-around' ) ).to.be.true; const domWrapper = editingView.domConverter.viewToDom( viewWidget.getChild( 1 ) ); expect( domWrapper.querySelectorAll( '.ck-widget__type-around__button' ) ).to.have.length( 2 ); } ); it( 'should inject a fake caret into the wrapper', () => { setModelData( editor.model, '<blockWidget></blockWidget>' ); const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.getChild( 1 ).is( 'uiElement' ) ).to.be.true; expect( viewWidget.getChild( 1 ).hasClass( 'ck' ) ).to.be.true; expect( viewWidget.getChild( 1 ).hasClass( 'ck-reset_all' ) ).to.be.true; expect( viewWidget.getChild( 1 ).hasClass( 'ck-widget__type-around' ) ).to.be.true; const domWrapper = editingView.domConverter.viewToDom( viewWidget.getChild( 1 ) ); expect( domWrapper.querySelectorAll( '.ck-widget__type-around__fake-caret' ) ).to.have.length( 1 ); } ); describe( 'UI button to type around', () => { let buttonBefore, buttonAfter; beforeEach( () => { setModelData( editor.model, '<blockWidget></blockWidget>' ); const viewWidget = viewRoot.getChild( 0 ); const domWrapper = editingView.domConverter.viewToDom( viewWidget.getChild( 1 ) ); buttonBefore = domWrapper.children[ 0 ]; buttonAfter = domWrapper.children[ 1 ]; } ); it( 'should have proper CSS classes', () => { expect( buttonBefore.classList.contains( 'ck' ) ).to.be.true; expect( buttonBefore.classList.contains( 'ck-widget__type-around__button' ) ).to.be.true; expect( buttonAfter.classList.contains( 'ck' ) ).to.be.true; expect( buttonAfter.classList.contains( 'ck-widget__type-around__button' ) ).to.be.true; } ); describe( 'button to type "before" a widget', () => { it( 'should have a specific class', () => { expect( buttonBefore.classList.contains( 'ck-widget__type-around__button_before' ) ).to.be.true; } ); it( 'should have a specific "title"', () => { expect( buttonBefore.getAttribute( 'title' ) ).to.equal( 'Insert paragraph before block' ); } ); it( 'should execute WidgetTypeAround#_insertParagraph() when clicked', () => { const preventDefaultSpy = sinon.spy(); const typeAroundSpy = sinon.spy( plugin, '_insertParagraph' ); const eventInfo = new EventInfo( viewDocument, 'mousedown' ); const stopSpy = sinon.stub( eventInfo, 'stop' ); const domEventDataMock = new DomEventData( editingView, { target: buttonBefore, preventDefault: preventDefaultSpy } ); viewDocument.fire( eventInfo, domEventDataMock ); sinon.assert.calledOnce( typeAroundSpy ); sinon.assert.calledWithExactly( typeAroundSpy, modelRoot.getChild( 1 ), 'before' ); sinon.assert.calledOnce( preventDefaultSpy ); sinon.assert.calledOnce( stopSpy ); } ); it( 'should not cause WidgetTypeAround#_insertParagraph() when clicked something other than the button', () => { const typeAroundSpy = sinon.spy( plugin, '_insertParagraph' ); const eventInfo = new EventInfo( viewDocument, 'mousedown' ); const domEventDataMock = new DomEventData( editingView, { // Clicking a widget. target: editingView.domConverter.viewToDom( viewRoot.getChild( 0 ) ), preventDefault: sinon.spy() } ); viewDocument.fire( eventInfo, domEventDataMock ); sinon.assert.notCalled( typeAroundSpy ); } ); } ); describe( 'button to type "after" a widget', () => { it( 'should have a specific class', () => { expect( buttonAfter.classList.contains( 'ck-widget__type-around__button_after' ) ).to.be.true; } ); it( 'should have a specific "title"', () => { expect( buttonAfter.getAttribute( 'title' ) ).to.equal( 'Insert paragraph after block' ); } ); it( 'should execute WidgetTypeAround#_insertParagraph() when clicked', () => { const preventDefaultSpy = sinon.spy(); const typeAroundSpy = sinon.spy( plugin, '_insertParagraph' ); const eventInfo = new EventInfo( viewDocument, 'mousedown' ); const stopSpy = sinon.stub( eventInfo, 'stop' ); const domEventDataMock = new DomEventData( editingView, { target: buttonAfter, preventDefault: preventDefaultSpy } ); viewDocument.fire( eventInfo, domEventDataMock ); sinon.assert.calledOnce( typeAroundSpy ); sinon.assert.calledWithExactly( typeAroundSpy, modelRoot.getChild( 0 ), 'after' ); sinon.assert.calledOnce( preventDefaultSpy ); sinon.assert.calledOnce( stopSpy ); } ); } ); it( 'should have an icon', () => { const icon = buttonBefore.firstChild; expect( icon.tagName.toLowerCase() ).to.equal( 'svg' ); expect( icon.getAttribute( 'viewBox' ) ).to.equal( '0 0 10 8' ); } ); } ); } ); describe( 'typing around view widgets using keyboard', () => { let model, modelSelection, eventInfoStub, domEventDataStub; beforeEach( () => { model = editor.model; modelSelection = model.document.selection; } ); describe( '"fake caret" activation', () => { it( 'should activate before when the collapsed selection is before a widget and the navigation is forward', () => { setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); const viewWidget = viewRoot.getChild( 1 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.true; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should activate after when the collapsed selection is after a widget and the navigation is backward', () => { setModelData( editor.model, '<blockWidget></blockWidget><paragraph>[]foo</paragraph>' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.true; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should activate after when the widget is selected and the navigation is forward', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.true; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should activate before when the widget is selected and the navigation is backward', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.true; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should activate if an arrow key is pressed along with Shift', () => { setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright', { shiftKey: true } ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not activate when the selection is before the widget but the non-arrow key was pressed', () => { setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'a' ); fireMutation( 'a' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( getModelData( model ) ).to.equal( '<paragraph>fooa[]</paragraph><blockWidget></blockWidget>' ); const viewWidget = viewRoot.getChild( 1 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.notCalled( eventInfoStub.stop ); sinon.assert.notCalled( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not activate when the selection is not before the widget and navigating forward', () => { setModelData( editor.model, '<paragraph>fo[]o</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 1 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.notCalled( eventInfoStub.stop ); sinon.assert.notCalled( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not activate when the selection is not after the widget and navigating backward', () => { setModelData( editor.model, '<blockWidget></blockWidget><paragraph>f[]oo</paragraph>' ); fireKeyboardEvent( 'arrowleft' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.notCalled( eventInfoStub.stop ); sinon.assert.notCalled( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not activate when the non-collapsed selection is before the widget and navigating forward', () => { setModelData( editor.model, '<paragraph>fo[o]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 1 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.notCalled( eventInfoStub.stop ); sinon.assert.notCalled( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not activate when the non-collapsed selection is after the widget and navigating backward', () => { setModelData( editor.model, '<blockWidget></blockWidget><paragraph>[f]oo</paragraph>' ); fireKeyboardEvent( 'arrowleft' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.notCalled( eventInfoStub.stop ); sinon.assert.notCalled( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not activate selection downcast when a non–type-around-friendly widget is selected', () => { setModelData( editor.model, '<paragraph>foo[<inlineWidget></inlineWidget>]</paragraph>' ); model.change( writer => { // Simply trigger the selection downcast. writer.setSelectionAttribute( 'foo', 'bar' ); } ); const viewWidget = viewRoot.getChild( 0 ).getChild( 1 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.notCalled( eventInfoStub.stop ); sinon.assert.notCalled( domEventDataStub.domEvent.preventDefault ); } ); } ); describe( '"fake caret" deactivation', () => { it( 'should deactivate when the widget is selected and the navigation is backward to a valid position', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 1 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should deactivate when the widget is selected and the navigation is forward to a valid position', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>[]foo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should deactivate if an arrow key is pressed along with Shift', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft', { shiftKey: true } ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); fireKeyboardEvent( 'arrowleft', { shiftKey: true } ); expect( getModelData( model ) ).to.equal( '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not deactivate when the widget is selected and the navigation is backward but there is nowhere to go', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.true; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should not deactivate when the widget is selected and the navigation is forward but there is nowhere to go', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.true; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should deactivate when the widget is selected and the navigation is against the fake caret (backward)', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should deactivate when the widget is selected and the navigation is against the fake caret (forward)', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; const viewWidget = viewRoot.getChild( 0 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); } ); it( 'should not work when the plugin is disabled', () => { editor.plugins.get( WidgetTypeAround ).isEnabled = false; setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget><paragraph>bar</paragraph>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>bar</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'arrowdown' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph><blockWidget></blockWidget><paragraph>[]bar</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should activate and deactivate the "fake caret" using all 4 arrow keys', () => { setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireKeyboardEvent( 'arrowdown' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'arrowup' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should quit the "fake caret" mode when the editor loses focus', () => { editor.ui.focusTracker.isFocused = true; setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); editor.ui.focusTracker.isFocused = false; const viewWidget = viewRoot.getChild( 1 ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; } ); it( 'should quit the "fake caret" mode when the user changed the selection', () => { setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); model.change( writer => { writer.setSelection( model.document.getRoot().getChild( 0 ), 'in' ); } ); const viewWidget = viewRoot.getChild( 1 ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; } ); it( 'should not quit the "fake caret" mode when the selection changed as a result of an indirect change', () => { setModelData( editor.model, '<paragraph>foo[]</paragraph><blockWidget></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); // This could happen in collaboration. model.document.selection.fire( 'change:range', { directChange: false } ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); const viewWidget = viewRoot.getChild( 1 ); expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.true; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; } ); it( 'should quit the "fake caret" mode when model was changed (model.deleteContent())', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>baz</paragraph>' ); const selection = model.createSelection( modelSelection ); model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); model.deleteContent( selection ); } ); const viewWidget = viewRoot.getChild( 1 ); expect( getModelData( model ) ).to.equal( '<paragraph>foo[]</paragraph><paragraph></paragraph><paragraph>baz</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_before' ) ).to.be.false; expect( viewWidget.hasClass( 'ck-widget_type-around_show-fake-caret_after' ) ).to.be.false; } ); it( 'should quit the "fake caret" mode when model was changed (writer.remove())', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>baz</paragraph>' ); model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); writer.remove( editor.model.document.getRoot().getChild( 1 ) ); } ); expect( getModelData( model ) ).to.equal( '<paragraph>foo[]</paragraph><paragraph>baz</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); describe( 'inserting a new paragraph', () => { describe( 'on Enter key press when the "fake caret" is activated', () => { it( 'should insert a paragraph before a widget if the caret was "before" it', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph><blockWidget></blockWidget>' ); } ); it( 'should insert a paragraph after a widget if the caret was "after" it', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>[]</paragraph>' ); } ); it( 'should integrate with the undo feature', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph><blockWidget></blockWidget>' ); editor.execute( 'undo' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should not work when the plugin is disabled', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); editor.plugins.get( WidgetTypeAround ).isEnabled = false; model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'after' ); } ); fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph>' ); } ); } ); describe( 'on Enter key press when the widget is selected (no "fake caret", though)', () => { it( 'should insert a new paragraph after the widget if Enter was pressed', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should insert a new paragraph before the widget if Shift+Enter was pressed', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'enter', { shiftKey: true } ); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should insert a new paragraph only if an entire widget is selected (selected nested editable content)', () => { setModelData( editor.model, '<blockWidget><nested>[foo] bar</nested></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<blockWidget><nested>[] bar</nested></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should insert a new paragraph only if an entire widget is selected (selected widget siblings)', () => { setModelData( editor.model, '<paragraph>f[oo</paragraph><blockWidget></blockWidget><paragraph>o]o</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<paragraph>f</paragraph><paragraph>[]o</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should split ancestors to find a place that allows a widget', () => { model.schema.register( 'allowP', { inheritAllFrom: '$block' } ); model.schema.register( 'disallowP', { inheritAllFrom: '$block', allowIn: [ 'allowP' ] } ); model.schema.extend( 'blockWidget', { allowIn: [ 'allowP', 'disallowP' ] } ); model.schema.extend( 'paragraph', { allowIn: [ 'allowP' ] } ); editor.conversion.for( 'downcast' ).elementToElement( { model: 'allowP', view: 'allowP' } ); editor.conversion.for( 'downcast' ).elementToElement( { model: 'disallowP', view: 'disallowP' } ); setModelData( model, '<allowP>' + '<disallowP>[<blockWidget></blockWidget>]</disallowP>' + '</allowP>' ); fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<allowP>' + '<disallowP><blockWidget></blockWidget></disallowP>' + '<paragraph>[]</paragraph>' + '<disallowP></disallowP>' + '</allowP>' ); } ); it( 'should integrate with the undo feature', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; editor.execute( 'undo' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should do nothing if a non-type-around-friendly content is selected', () => { setModelData( editor.model, '<paragraph>foo[<inlineWidget></inlineWidget>]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph><paragraph>[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should not work when the plugin is disabled', () => { editor.plugins.get( WidgetTypeAround ).isEnabled = false; setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'enter' ); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph>' ); } ); } ); describe( 'on keydown of a "typing" character when the "fake caret" is activated ', () => { it( 'should insert a character inside a new paragraph before a widget if the caret was "before" it', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireKeyboardEvent( 'a' ); fireMutation( 'a' ); expect( getModelData( model ) ).to.equal( '<paragraph>a[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should insert a character inside a new paragraph after a widget if the caret was "after" it', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireKeyboardEvent( 'a' ); fireMutation( 'a' ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>a[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should do nothing if a "safe" keystroke was pressed', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireKeyboardEvent( 'esc' ); fireKeyboardEvent( 'tab' ); fireKeyboardEvent( 'd', { ctrlKey: true } ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); } ); it( 'should integrate with the undo feature', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); fireKeyboardEvent( 'a' ); fireMutation( 'a' ); expect( getModelData( model ) ).to.equal( '<paragraph>a[]</paragraph><blockWidget></blockWidget>' ); editor.execute( 'undo' ); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; editor.execute( 'undo' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); it( 'should not work when the plugin is disabled', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); editor.plugins.get( WidgetTypeAround ).isEnabled = false; model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); } ); fireKeyboardEvent( 'a' ); fireMutation( 'a' ); expect( getModelData( model ) ).to.equal( '<paragraph>a[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; } ); } ); } ); describe( 'delete integration', () => { let eventInfoStub, domEventDataStub; describe( 'backward delete', () => { it( 'should delete content before a widget if the "fake caret" is also before the widget', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '<paragraph>fo[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete an empty paragraph before a widget if the "fake caret" is also before the widget', () => { setModelData( editor.model, '<paragraph></paragraph>[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<paragraph></paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete an empty document tree branch before a widget if the "fake caret" is also before the widget', () => { setModelData( editor.model, '<blockQuote><paragraph></paragraph></blockQuote>[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<blockQuote>' + '<paragraph></paragraph>' + '</blockQuote>' + '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete an empty document tree sub-branch before a widget if the "fake caret" is also before the widget', () => { let operationType; setModelData( editor.model, '<blockQuote>' + '<paragraph>foo</paragraph>' + '<paragraph></paragraph>' + '</blockQuote>' + '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<blockQuote>' + '<paragraph>foo</paragraph>' + '<paragraph></paragraph>' + '</blockQuote>' + '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); // Assert that the paragraph is merged rather than deleted because // it is safer for collaboration. model.on( 'applyOperation', ( evt, [ operation ] ) => { operationType = operation.type; } ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '<blockQuote>' + '<paragraph>foo[]</paragraph>' + '</blockQuote>' + '<blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( operationType ).to.equal( 'merge' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should do nothing if the "fake caret" is before the widget but there is nothing to delete there', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete a widget if the "fake caret" is after the widget (no content after the widget)', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete a widget if the "fake caret" is after the widget (some content after the widget)', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph><paragraph>foo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete a sibling widget', () => { setModelData( editor.model, '<blockWidget><nested>foo</nested></blockWidget>[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<blockWidget><nested>foo</nested></blockWidget>' + '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); } ); describe( 'forward delete', () => { it( 'should delete content after a widget if the "fake caret" is also after the widget', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>[]oo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete an empty paragraph after a widget if the "fake caret" is also after the widget', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]<paragraph></paragraph>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]<paragraph></paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete an empty document tree branch after a widget if the "fake caret" is also after the widget', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]<blockQuote><paragraph></paragraph></blockQuote>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' + '<blockQuote><paragraph></paragraph></blockQuote>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete an empty document tree sub-branch after a widget if the "fake caret" is also after the widget', () => { let operationType; setModelData( editor.model, '[<blockWidget></blockWidget>]' + '<blockQuote>' + '<paragraph></paragraph>' + '<paragraph>foo</paragraph>' + '</blockQuote>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' + '<blockQuote>' + '<paragraph></paragraph>' + '<paragraph>foo</paragraph>' + '</blockQuote>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); // Assert that the paragraph is merged rather than deleted because // it is safer for collaboration. model.on( 'applyOperation', ( evt, [ operation ] ) => { operationType = operation.type; } ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget>' + '<blockQuote>' + '<paragraph>[]foo</paragraph>' + '</blockQuote>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( operationType ).to.equal( 'merge' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should do nothing if the "fake caret" is after the widget but there is nothing to delete there', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete a widget if the "fake caret" is before the widget (no content before the widget)', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete a widget if the "fake caret" is before the widget (some content before the widget)', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph><paragraph>[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); it( 'should delete a sibling widget', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]<blockWidget><nested>foo</nested></blockWidget>' ); fireKeyboardEvent( 'arrowright' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' + '<blockWidget><nested>foo</nested></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'after' ); fireDeleteEvent( true ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; sinon.assert.calledOnce( eventInfoStub.stop ); sinon.assert.calledOnce( domEventDataStub.domEvent.preventDefault ); } ); } ); it( 'should not work when the plugin is disabled', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); fireKeyboardEvent( 'arrowleft' ); expect( getModelData( model ) ).to.equal( '[<blockWidget></blockWidget>]' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.equal( 'before' ); editor.plugins.get( WidgetTypeAround ).isEnabled = false; model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); } ); fireDeleteEvent(); expect( getModelData( model ) ).to.equal( '<paragraph>[]</paragraph>' ); } ); function fireDeleteEvent( isForward = false ) { eventInfoStub = new EventInfo( viewDocument, 'delete' ); sinon.spy( eventInfoStub, 'stop' ); const data = { direction: isForward ? 'forward' : 'backward', unit: 'character' }; domEventDataStub = new DomEventData( viewDocument, getDomEvent(), data ); viewDocument.fire( eventInfoStub, domEventDataStub ); } } ); function getDomEvent() { return { preventDefault: sinon.spy(), stopPropagation: sinon.spy() }; } function fireKeyboardEvent( key, modifiers ) { eventInfoStub = new EventInfo( viewDocument, 'keydown' ); sinon.spy( eventInfoStub, 'stop' ); const data = { document: viewDocument, domTarget: editingView.getDomRoot(), keyCode: getCode( key ) }; Object.assign( data, modifiers ); domEventDataStub = new DomEventData( viewDocument, getDomEvent(), data ); viewDocument.fire( eventInfoStub, domEventDataStub ); } function fireMutation( text ) { const placeOfMutation = viewDocument.selection.getFirstRange().start; viewDocument.fire( 'mutations', [ { type: 'children', oldChildren: [], newChildren: [ new ViewText( viewDocument, text ) ], node: placeOfMutation } ] ); } } ); describe( 'Model#insertContent() integration', () => { let model, modelSelection; beforeEach( () => { model = editor.model; modelSelection = model.document.selection; } ); it( 'should not alter insertContent for the selection other than the document selection', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>baz</paragraph>' ); const batchSet = setupBatchWatch(); const selection = model.createSelection( modelSelection ); model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); model.insertContent( createParagraph( 'bar' ), selection ); } ); expect( getModelData( model ) ).to.equal( '<paragraph>foo[]</paragraph><paragraph>bar</paragraph><paragraph>baz</paragraph>' ); expect( batchSet.size ).to.be.equal( 1 ); } ); it( 'should not alter insertContent when the "fake caret" is not active', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]<paragraph>baz</paragraph>' ); const batchSet = setupBatchWatch(); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; model.insertContent( createParagraph( 'bar' ) ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph><paragraph>bar[]</paragraph><paragraph>baz</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( batchSet.size ).to.be.equal( 1 ); } ); it( 'should handle insertContent before a widget when it\'s the first element of the root', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); const batchSet = setupBatchWatch(); model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); } ); model.insertContent( createParagraph( 'bar' ) ); expect( getModelData( model ) ).to.equal( '<paragraph>bar[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( batchSet.size ).to.be.equal( 1 ); } ); it( 'should handle insertContent after a widget when it\'s the last element of the root', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); const batchSet = setupBatchWatch(); model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'after' ); } ); model.insertContent( createParagraph( 'bar' ) ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>bar[]</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( batchSet.size ).to.be.equal( 1 ); } ); it( 'should handle insertContent before a widget when it\'s not the first element of the root', () => { setModelData( editor.model, '<paragraph>foo</paragraph>[<blockWidget></blockWidget>]' ); const batchSet = setupBatchWatch(); model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); } ); model.insertContent( createParagraph( 'bar' ) ); expect( getModelData( model ) ).to.equal( '<paragraph>foo</paragraph><paragraph>bar[]</paragraph><blockWidget></blockWidget>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( batchSet.size ).to.be.equal( 1 ); } ); it( 'should handle insertContent after a widget when it\'s not the last element of the root', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]<paragraph>foo</paragraph>' ); const batchSet = setupBatchWatch(); model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'after' ); } ); model.insertContent( createParagraph( 'bar' ) ); expect( getModelData( model ) ).to.equal( '<blockWidget></blockWidget><paragraph>bar[]</paragraph><paragraph>foo</paragraph>' ); expect( modelSelection.getAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE ) ).to.be.undefined; expect( batchSet.size ).to.be.equal( 1 ); } ); it( 'should not work when the plugin is disabled', () => { setModelData( editor.model, '[<blockWidget></blockWidget>]' ); editor.plugins.get( WidgetTypeAround ).isEnabled = false; model.change( writer => { writer.setSelectionAttribute( TYPE_AROUND_SELECTION_ATTRIBUTE, 'before' ); } ); model.insertContent( createParagraph( 'bar' ) ); expect( getModelData( model ) ).to.equal( '<paragraph>bar[]</paragraph>' ); } ); function createParagraph( text ) { return model.change( writer => { const paragraph = writer.createElement( 'paragraph' ); writer.insertText( text, paragraph ); return paragraph; } ); } function setupBatchWatch() { const createdBatches = new Set(); model.on( 'applyOperation', ( evt, [ operation ] ) => { if ( operation.isDocumentOperation ) { createdBatches.add( operation.batch ); } } ); return createdBatches; } } ); function blockWidgetPlugin( editor ) { editor.model.schema.register( 'blockWidget', { inheritAllFrom: '$block', isObject: true } ); editor.model.schema.register( 'nested', { allowIn: 'blockWidget', isLimit: true } ); editor.model.schema.extend( '$text', { allowIn: [ 'nested' ] } ); editor.conversion.for( 'downcast' ) .elementToElement( { model: 'blockWidget', view: ( modelItem, { writer } ) => { const container = writer.createContainerElement( 'div' ); const viewText = writer.createText( 'block-widget' ); writer.insert( writer.createPositionAt( container, 0 ), viewText ); return toWidget( container, writer, { label: 'block widget' } ); } } ) .elementToElement( { model: 'nested', view: ( modelItem, { writer } ) => writer.createEditableElement( 'nested', { contenteditable: true } ) } ); } function inlineWidgetPlugin( editor ) { editor.model.schema.register( 'inlineWidget', { allowWhere: '$text', isObject: true, isInline: true } ); editor.conversion.for( 'downcast' ) .elementToElement( { model: 'inlineWidget', view: ( modelItem, { writer } ) => { const container = writer.createContainerElement( 'inlineWidget' ); const viewText = writer.createText( 'inline-widget' ); writer.insert( writer.createPositionAt( container, 0 ), viewText ); return toWidget( container, writer, { label: 'inline widget' } ); } } ); } } );
{ "pile_set_name": "Github" }
# Greek translation for ubuntu-tweak # Copyright (c) 2008 Rosetta Contributors and Canonical Ltd 2008 # This file is distributed under the same license as the ubuntu-tweak package. # FIRST AUTHOR <EMAIL@ADDRESS>, 2008. # msgid "" msgstr "" "Project-Id-Version: ubuntu-tweak\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2014-04-19 14:32+0800\n" "PO-Revision-Date: 2013-05-12 06:41+0000\n" "Last-Translator: Filippos Kolyvas <Unknown>\n" "Language-Team: Greek <[email protected]>\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" "X-Launchpad-Export-Date: 2014-06-30 13:01+0000\n" "X-Generator: Launchpad (build 17077)\n" #: ../data/script-worker:57 #, c-format msgid "You don't have permission to write in %s" msgstr "Δεν έχετε δικαίωμα εγγραφής στο %s" #: ../data/script-worker:158 ../data/script-worker:171 msgid "Enter your password to perform the administrative tasks" msgstr "" "Εισάγετε τον κωδικό σας για να εκτελέσετε διαδικασίες που απαιτούν προνόμια " "διαχειριστή" #: ../data/script-worker:165 msgid "Coudn't find any text editor in your system!" msgstr "Δεν βρέθηκε επεξεργαστής κειμένου στο σύστημά σας!" #: ../data/script-worker:194 msgid "Select a folder" msgstr "Επιλέξτε ένα φάκελο" #: ../data/script-worker:224 msgid "Please select a target (files or folders)." msgstr "Παρακαλώ επιλέξτε έναν προορισμό (αρχεία ή φακέλους)" #: ../data/ubuntu-tweak.desktop.in.h:1 msgid "Tweak ubuntu to what you like" msgstr "Διαμορφώστε το ubuntu όπως σας αρέσει" #: ../data/ubuntu-tweak.desktop.in.h:2 ../data/ui/preferences.ui.h:9 msgid "Overview" msgstr "Επισκόπηση" #: ../data/ubuntu-tweak.desktop.in.h:3 ../ubuntutweak/janitor/__init__.py:889 msgid "Apps" msgstr "Εφαρμογές" #: ../data/ubuntu-tweak.desktop.in.h:4 ../data/ui/preferences.ui.h:13 msgid "Tweaks" msgstr "Προσαρμογές" #: ../data/ubuntu-tweak.desktop.in.h:5 ../data/ui/preferences.ui.h:17 msgid "Admins" msgstr "Συντήρηση" #: ../data/ubuntu-tweak.desktop.in.h:6 ../data/ui/preferences.ui.h:22 msgid "Janitor" msgstr "Καθαριστής" #: ../data/com.ubuntu-tweak.daemon.policy.in.h:1 msgid "Tweak all kinds of settings" msgstr "Προσαρμογή όλων των ειδών ρυθμίσεων" #: ../data/com.ubuntu-tweak.daemon.policy.in.h:2 msgid "To tweak the settings, you need to authenticate." msgstr "" "Για να αλλάξετε τις ρυθμίσεις, πρέπει να επαληθεύσετε την ταυτότητά σας" #: ../data/com.ubuntu-tweak.daemon.policy.in.h:3 msgid "Clean user and system cruft" msgstr "Καθαρισμός περιττών αρχείων χρήστη και συστήματος" #: ../data/com.ubuntu-tweak.daemon.policy.in.h:4 msgid "To clean the cruft, you need to authenticate." msgstr "" "Για τον καθαρισμό των περιττών αρχείων πρέπει να γίνει έλεγχος ταυτότητας." #: ../data/com.ubuntu-tweak.daemon.policy.in.h:5 msgid "Edit the Software Sources lists" msgstr "Επεξεργασία πηγών λογισμικού" #: ../data/com.ubuntu-tweak.daemon.policy.in.h:6 msgid "To edit the software sources, you need to authenticate." msgstr "" "Για να επεξεργαστείτε τις πηγές λογισμικού πρέπει να γίνει έλεγχος " "ταυτότητας." #: ../data/ui/window.ui.h:1 msgid "Left" msgstr "Αριστερά" #: ../data/ui/window.ui.h:2 msgid "Right" msgstr "Δεξιά" #: ../data/ui/preferences.ui.h:1 msgid "Preferences" msgstr "Προτιμήσεις" #. Please make sure the "<b>xxx</b>" is ok #: ../data/ui/preferences.ui.h:3 msgid "<b>Clip Management</b>" msgstr "<b>Διαχείριση στοιχείων</b>" #: ../data/ui/preferences.ui.h:4 msgid "Manage the clip view in the Overview" msgstr "Διαχείριση της εμφάνισης στοιχείων στην επισκόπηση" #: ../data/ui/preferences.ui.h:5 ../data/ui/appspage.ui.h:1 #: ../data/ui/quicklists.ui.h:1 ../data/ui/sourceeditor.ui.h:1 #: ../data/ui/janitorpage.ui.h:1 msgid "column" msgstr "στήλη" #: ../data/ui/preferences.ui.h:6 msgid "Move Up" msgstr "Μετακίνηση πάνω" #: ../data/ui/preferences.ui.h:7 msgid "Move Down" msgstr "Μετακίνηση κάτω" #: ../data/ui/preferences.ui.h:8 ../ubuntutweak/apps/__init__.py:105 msgid "Install" msgstr "Εγκατάσταση" #. Please make sure the "<b>xxx</b>" is ok #: ../data/ui/preferences.ui.h:11 msgid "<b>Tweaks Extensions</b>" msgstr "<b>Επεκτάσεις προσαρμογών</b>" #: ../data/ui/preferences.ui.h:12 msgid "Tweaks Extensions Management" msgstr "Διαχείριση επεκτάσεων προσαρμογών" #. Please make sure the "<b>xxx</b>" is ok #: ../data/ui/preferences.ui.h:15 msgid "<b>Admins Extensions</b>" msgstr "<b>Επεκτάσεις συντήρησης</b>" #: ../data/ui/preferences.ui.h:16 msgid "Admins Extensions Management" msgstr "Διαχείριση επεκτάσεων συντήρησης" #: ../data/ui/preferences.ui.h:18 msgid "<b>Generic</b>" msgstr "<b>Γενικό</b>" #. Please make sure the "<b>xxx</b>" is ok #: ../data/ui/preferences.ui.h:20 msgid "<b>Janitor Extensions</b>" msgstr "<b>Επεκτάσεις καθαριστή</b>" #: ../data/ui/preferences.ui.h:21 msgid "Janitor Extensions Management" msgstr "Διαχείριση επεκτάσεων καθαριστή" #: ../data/ui/uturl.ui.h:1 msgid "Ubuntu Tweak" msgstr "Ubuntu Tweak" #: ../data/ui/uturl.ui.h:2 msgid "_Install" msgstr "_Εγκατάσταση" #: ../data/ui/uturl.ui.h:3 msgid "Description" msgstr "Περιγραφή" #: ../data/ui/sourcecenter.ui.h:1 msgid "<b>Homepage</b>" msgstr "<b>Αρχική Σελίδα</b>" #: ../data/ui/sourcecenter.ui.h:2 msgid "<b>Source URL</b>" msgstr "<b>URL πηγής</b>" #: ../data/ui/sourcecenter.ui.h:3 msgid "<b>Description</b>" msgstr "<b>Περιγραφή</b>" #: ../data/ui/sourcecenter.ui.h:4 msgid "http://ubuntu-tweak.com" msgstr "http://ubuntu-tweak.com" #: ../data/ui/sourcecenter.ui.h:5 ../ubuntutweak/admins/sourcecenter.py:1118 msgid "Description is here" msgstr "Η περιγραφή είναι εδώ" #: ../data/ui/sourcecenter.ui.h:6 ../ubuntutweak/gui/dialogs.py:195 msgid "Details" msgstr "Λεπτομέρειες" #: ../data/ui/sourcecenter.ui.h:7 msgid "Purge PPA" msgstr "Εκκαθάριση αποθετηρίου PPA" #: ../data/ui/brokenmodule.ui.h:1 msgid "<big><b>This module encountered an error while loading.</b></big>" msgstr "" "<big><b>Αυτό το άρθρωμα αντιμετώπισε ένα σφάλμα κατά τη φόρτωση.</b></big>" #: ../data/ui/brokenmodule.ui.h:2 msgid "" "If you'd like to help us fix the problem,\n" "Please choose <i>Report</i> to file a new bug report. Make sure to include " "the error message below:" msgstr "" "Αν επιθυμείτε να μας βοηθήσετε με την διόρθωση του προβλήματος,\n" "Τότε επιλέξτε <i>Αναφορά</i> για να καταθέσετε μια νέα αναφορά σφάλματος. " "Φροντίστε να συμπεριλάβετε το μήνυμα λάθους παρακάτω:" #: ../data/ui/brokenmodule.ui.h:4 ../data/ui/traceback.ui.h:5 msgid "Error Message" msgstr "Μήνυμα σφάλματος" #: ../data/ui/brokenmodule.ui.h:5 ../data/ui/traceback.ui.h:1 msgid "_Report" msgstr "_Αναφορά" #: ../data/ui/loginsettings.ui.h:1 msgid "Click the button to change the login screen logo" msgstr "Πατήστε το κουμπί για να αλλάξετε το λογότυπο της οθόνης εισόδου" #: ../data/ui/loginsettings.ui.h:2 msgid "Click the button to change the login screen background" msgstr "Πατήστε το κουμπί για να αλλάξετε το φόντο της οθόνης εισόδου" #: ../data/ui/loginsettings.ui.h:3 msgid "Set the same background as the current desktop background" msgstr "Ορίστε το ίδιο φόντο με το τρέχον φόντο της επιφάνειας εργασίας" #: ../data/ui/quicklists.ui.h:2 msgid "Active" msgstr "Ενεργό" #: ../data/ui/quicklists.ui.h:3 msgid "Name" msgstr "Όνομα" #: ../data/ui/quicklists.ui.h:4 msgid "Command line" msgstr "Γραμμή εντολών" #: ../data/ui/quicklists.ui.h:5 msgid "Command:" msgstr "Εντολή:" #: ../data/ui/quicklists.ui.h:6 msgid "Name:" msgstr "Όνομα:" #: ../data/ui/clippage.ui.h:1 msgid "<b>Recently Used</b>" msgstr "<b>Πρόσφατα χρησιμοποιημένα</b>" #: ../data/ui/filetypemanager.ui.h:1 msgid "Add Application" msgstr "Προσθήκη εφαρμογής" #: ../data/ui/filetypemanager.ui.h:2 msgid "Select an application to view its description." msgstr "Επιλέξτε μια εφαρμογή για να δείτε την περιγραφή της." #: ../data/ui/filetypemanager.ui.h:3 msgid "_Browse..." msgstr "_Περιήγηση..." #: ../data/ui/filetypemanager.ui.h:4 msgid "_Use a custom command" msgstr "_Χρήση μιας προσαρμοσμένης εντολής" #: ../data/ui/filetypemanager.ui.h:5 msgid "Edit Type" msgstr "Επεξεργασία τύπου αρχείων" #: ../data/ui/sourceeditor.ui.h:2 msgid "Save this source" msgstr "Αποθήκευση αυτής της πηγής λογισμικού" #: ../data/ui/sourceeditor.ui.h:3 msgid "toolbutton1" msgstr "κουμπί1" #: ../data/ui/sourceeditor.ui.h:4 msgid "Redo this source" msgstr "Επαναφορά αυτής της πηγής λογισμικού" #: ../data/ui/sourceeditor.ui.h:5 msgid "toolbutton2" msgstr "κουμπί2" #: ../data/ui/sourceeditor.ui.h:6 msgid "Delete this source" msgstr "Διαγραφή αυτής της πηγής λογισμικού" #: ../data/ui/sourceeditor.ui.h:7 msgid "toolbutton3" msgstr "κουμπί3" #: ../data/ui/sourceeditor.ui.h:8 ../data/ui/desktoprecovery.ui.h:2 msgid "Backup History:" msgstr "Ιστορικό αντιγράφων ασφαλείας:" #: ../data/ui/sourceeditor.ui.h:9 msgid "Auto Backup" msgstr "Αυτόματη δημιουργία αντιγράφων ασφαλείας" #: ../data/ui/sourceeditor.ui.h:10 ../data/ui/desktoprecovery.ui.h:3 msgid "_Recover" msgstr "Α_νάκτηση" #: ../data/ui/sourceeditor.ui.h:11 ../data/ui/desktoprecovery.ui.h:4 msgid "_Backup" msgstr "_Αντίγραφο Ασφαλείας" #: ../data/ui/sourceeditor.ui.h:12 msgid "U_pdate" msgstr "Ενημέρωση" #: ../data/ui/updatemanager.ui.h:1 msgid "_Install Update" msgstr "_Εγκατάσταση ενημέρωσης" #: ../data/ui/janitorpage.ui.h:2 msgid "<big><b>Cool! Your system is clean!</b></big>" msgstr "<big><b>Τέλεια! Το σύστημά σας είναι καθαρό!</b></big>" #: ../data/ui/janitorpage.ui.h:3 msgid "_Scan" msgstr "_Σάρωση" #: ../data/ui/janitorpage.ui.h:4 msgid "_Clean" msgstr "_Καθαρισμός" #: ../data/ui/traceback.ui.h:2 msgid "<big><b>Oops... an error occured</b></big>" msgstr "<big><b>Ουπς... προέκυψε ένα σφάλμα</b></big>" #: ../data/ui/traceback.ui.h:3 msgid "" "If you'd like to help us fix the problem, \n" "Please choose <i>Report</i> to file a new bug report. Make sure to include " "the error message below:" msgstr "" "Άν θέλετε να μας βοηθήσετε να διορθώσουμε το πρόβλημα, \n" "Παρακαλούμε επιλέξτε <i>Αναφορά</i> ώστε να υποβάλετε μια νέα αναφορά " "σφάλματος.Φροντίστε να συμπεριλάβετε το παρακάτω μήνυμα σφάλματος:" #: ../data/ui/traceback.ui.h:6 msgid "<big><b>Oops... a fatal error occured</b></big>" msgstr "<big><b>Ουπς... προέκυψε ένα σοβαρό σφάλμα</b></big>" #: ../data/ui/traceback.ui.h:7 msgid "" "Ubuntu Tweak need to turn off.\n" "If you'd like to help us fix the problem, \n" "Please choose <i>Report</i> to file a new bug report. Make sure to include " "the error message below:" msgstr "" "Το Ubuntu Tweak πρέπει να τερματιστεί.\n" "Άν θέλετε να μας βοηθήσετε να διορθώσουμε το πρόβλημα, \n" "Παρακαλούμε επιλέξτε <i>Αναφορά</i> ώστε να υποβάλετε μια νέα αναφορά " "σφάλματος.Φροντίστε να συμπεριλάβετε το παρακάτω μήνυμα σφάλματος:" #: ../data/ui/mainwindow.ui.h:1 msgid "" "Ubuntu Tweak is a tool for Ubuntu that makes it easy to configure your " "system and desktop settings." msgstr "" "Το Ubuntu Tweak είναι ένα εργαλείο για το Ubuntu το οποίο επιτρέπει την " "εύκολη διαμόρφωση ρυθμίσεων συστήματος και επιφάνειας εργασίας." #: ../data/ui/mainwindow.ui.h:2 msgid "Ubuntu Tweak Website" msgstr "Ιστοσελίδα του Ubuntu Tweak" #: ../data/ui/mainwindow.ui.h:3 msgid "" "Ubuntu Tweak 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.\n" "Ubuntu Tweak 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.\n" "You should have received a copy of the GNU General Public License along with " "Ubuntu Tweak; if not, write to the Free Software Foundation, Inc., 51 " "Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA" msgstr "" "Το Ubuntu Tweak είναι ελεύθερο λογισμικό, μπορείτε να το αναδιανέμετε ή/και " "να το τροποποιήσετε υπό τους όρους της GNU Γενικής Άδειας Δημόσιας Χρήσης, " "όπως αυτή δημοσιεύεται από το Ίδρυμα Ελεύθερου Λογισμικού(FSF), είτε της " "έκδοσης 2 της Άδειας, είτε (κατ' επιλογή σας) οποιαδήποτε μεταγενέστερη " "έκδοση.\n" "Το Ubuntu Tweak διανέμεται με την ελπίδα ότι θα είναι χρήσιμο, αλλά ΧΩΡΙΣ " "ΚΑΜΙΑ ΕΓΓΥΗΣΗ. Χωρίς καν την υπονοούμενη εγγύηση ΕΜΠΟΡΕΥΣΙΜΟΤΗΤΑΣ ή " "ΚΑΤΑΛΛΗΛΟΤΗΤΑΣ ΓΙΑ ΣΥΓΚΕΚΡΙΜΕΝΟ ΣΚΟΠΟ. Δείτε την GNU Γενική Άδεια Δημόσιας " "Χρήσης για περισσότερες λεπτομέρειες.\n" "Θα πρέπει να έχετε λάβει ένα αντίγραφο της GNU Γενικής Άδειας Δημόσιας " "Χρήσης μαζί με το Ubuntu Tweak. Αν όχι, γράψτε στο Free Software Foundation, " "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA" #: ../data/ui/mainwindow.ui.h:6 msgid "translator-credits" msgstr "" "Launchpad Contributions:\n" " @l3x1k0 https://launchpad.net/~djkora3\n" " Christos Kargas https://launchpad.net/~christos.kargas\n" " Christos Spyroglou https://launchpad.net/~cspyroglou\n" " Ding Zhou https://launchpad.net/~tualatrix\n" " Filippos Kolyvas https://launchpad.net/~fkol-k4\n" " Fotis Tsamis https://launchpad.net/~phantomas\n" " George Kontis https://launchpad.net/~giormatsis\n" " Giannis Perrakis https://launchpad.net/~giannis-perrakis\n" " Greek Translator https://launchpad.net/~grtranslator\n" " Ioannis Stilianakos(stilia-johny, d3vil) https://launchpad.net/~stilia-" "johny\n" " Konstantinos https://launchpad.net/~kfoutzopoulos\n" " Manos Vasiliadis https://launchpad.net/~idioteque\n" " Michael Kotsarinis https://launchpad.net/~mk73628\n" " Mixalis Zisis https://launchpad.net/~mixasgr\n" " Nicolas Doganis https://launchpad.net/~nic-doganis\n" " Renji NsK https://launchpad.net/~redarmy-2505\n" " Thanos Kakarountas https://launchpad.net/~a-kakarountas\n" " Vassilis Skoullis https://launchpad.net/~vaskoul\n" " Yannis Kaskamanidis https://launchpad.net/~ttnfy17\n" " ale3andro https://launchpad.net/~ale3andro\n" " linuxlalala https://launchpad.net/~linuxlalala\n" " mara sdr https://launchpad.net/~paren8esis\n" " mixalns https://launchpad.net/~jhonnyglou\n" " msrowley https://launchpad.net/~msrowley\n" " rexes13 https://launchpad.net/~p-tournaris\n" " tzem https://launchpad.net/~athmakrigiannis\n" " xoristzatziki https://launchpad.net/~simsonbike-bugs\n" " Τάσος Παπανικολάου https://launchpad.net/~taspap" #: ../data/ui/mainwindow.ui.h:7 msgid "Search... <Ctrl+F>" msgstr "Αναζήτηση με το <Ctrl+F>" #: ../data/ui/mainwindow.ui.h:8 msgid "_Overview" msgstr "_Επισκόπηση" #: ../data/ui/mainwindow.ui.h:9 msgid "_Apps" msgstr "_Εφαρμογές" #: ../data/ui/mainwindow.ui.h:10 msgid "_Tweaks" msgstr "_Προσαρμογές" #: ../data/ui/mainwindow.ui.h:11 msgid "_Admins" msgstr "_Συντήρηση" #: ../data/ui/mainwindow.ui.h:12 msgid "_Janitor" msgstr "_Καθαριστής" #: ../data/ui/mainwindow.ui.h:13 msgid "<big><b>No matches found</b></big>" msgstr "Δεν βρέθηκαν αποτελέσματα αναζήτησης" #: ../data/ui/desktoprecovery.ui.h:1 msgid "Setting Name:" msgstr "Όνομα Ρύθμισης:" #: ../data/ui/desktoprecovery.ui.h:5 msgid "R_eset" msgstr "_Eπαναφορά" #: ../ubuntutweak/system/__init__.py:43 msgid "GNOME Classic" msgstr "Κλασσικό GNOME" #: ../ubuntutweak/system/__init__.py:45 ../ubuntutweak/system/__init__.py:46 msgid "GNOME Fallback" msgstr "GNOME Fallback" #: ../ubuntutweak/system/__init__.py:57 #, python-format msgid "Unknown (%s)" msgstr "Άγνωστο (%s)" #: ../ubuntutweak/system/__init__.py:59 #: ../ubuntutweak/clips/hardwareinfo.py:16 msgid "Unknown" msgstr "Άγνωστο" #: ../ubuntutweak/network/downloadmanager.py:97 msgid "Connecting to server" msgstr "Σύνδεση με τον εξυπηρετητή" #: ../ubuntutweak/network/downloadmanager.py:143 #, python-format msgid "Downloading...%d" msgstr "Λήψη...%d" #: ../ubuntutweak/network/downloadmanager.py:148 msgid "Downloaded!" msgstr "Ελήφθη!" #: ../ubuntutweak/network/downloadmanager.py:155 msgid "Error happened!" msgstr "Προέκυψε σφάλμα!" #: ../ubuntutweak/network/utdata.py:50 ../ubuntutweak/network/utdata.py:83 #: ../ubuntutweak/tweaks/unity.py:68 ../ubuntutweak/tweaks/unity.py:145 #: ../ubuntutweak/tweaks/unity.py:213 msgid "Never" msgstr "Ποτέ" #: ../ubuntutweak/network/utdata.py:74 #, python-format msgid "%d week ago" msgid_plural "%d weeks ago" msgstr[0] "%d εβδομάδα πριν" msgstr[1] "%d εβδομάδες πριν" #: ../ubuntutweak/network/utdata.py:76 #, python-format msgid "%d day ago" msgid_plural "%d days ago" msgstr[0] "%d ημέρα πριν" msgstr[1] "%d ημέρες πριν" #: ../ubuntutweak/network/utdata.py:78 #, python-format msgid "%d hour ago" msgid_plural "%d hours ago" msgstr[0] "%d ώρα πριν" msgstr[1] "%d ώρες πριν" #: ../ubuntutweak/network/utdata.py:80 #, python-format msgid "%d minute ago" msgid_plural "%d minutes ago" msgstr[0] "%d λεπτό πριν" msgstr[1] "%d λεπτά πριν" #: ../ubuntutweak/network/utdata.py:81 msgid "Just Now" msgstr "Μόλις τώρα" #: ../ubuntutweak/policykit/widgets.py:64 msgid "_Unlock" msgstr "_Ξεκλείδωμα" #: ../ubuntutweak/policykit/dbusproxy.py:28 msgid "" "The Ubuntu Tweak daemon didn't start correctly. This means that some " "advanced features may not work.\n" "If you want to help developers debugging, try to run \"<b>sudo " "/usr/share/ubuntu-tweak/ubuntu-tweak-daemon</b>\" in a terminal." msgstr "" "Δεν έγινε σωστή εκκίνηση της υπηρεσίας του Ubuntu Tweak. Αυτό σημαίνει ότι " "κάποιες προχωρημένες λειτουργίες ίσως να μη λειτουργήσουν.\n" "Αν θέλετε να βοηθήσετε τους προγραμματιστές στην αποσφαλμάτωση, δοκιμάστε να " "εκτελέσετε \"<b>sudo /usr/share/ubuntu-tweak/ubuntu-tweak-daemon</b>\" σε " "ένα τερματικό." #: ../ubuntutweak/common/debug.py:59 msgid "Error message has been copied" msgstr "Το μήνυμα σφάλματος έχει αντιγραφεί" #: ../ubuntutweak/common/debug.py:60 msgid "" "Now click \"Report\" to enter the bug report website. Make sure to attach " "the error message in \"Further information\"." msgstr "" "Τώρα κάντε κλικ στο κουμπί \"Αναφορά\"για να μπείτε στην ιστοσελίδα αναφοράς " "σφάλματος. Σιγουρευτείτε πως επισυνάψατε το μήνυμα σφάλματος στις " "«Περισσότερες πληροφορίες»." #: ../ubuntutweak/common/debug.py:81 msgid "Copy Error Message" msgstr "Αντιγραφή μηνύματος σφάλματος" #: ../ubuntutweak/common/debug.py:121 msgid "Sorry, your distribution is not supported by Ubuntu Tweak" msgstr "Συγγνώμη, η διανομή σας δεν υποστηρίζεται από το Ubuntu Tweak" #: ../ubuntutweak/common/debug.py:122 msgid "" "You can't file bug for this issue. Please only use Ubuntu Tweak on Ubuntu. " "Or it may kill your cat." msgstr "" "Δεν μπορείτε να υποβάλετε αναφορά σφάλματος για αυτό το θέμα. Παρακαλούμε " "χρησιμοποιείστε το Ubuntu Tweak στο Ubuntu. Αλλιώς μπορεί να ανατινάξει την " "γάτα σας." #: ../ubuntutweak/janitor/gwibber_plugin.py:4 msgid "Gwibber Cache" msgstr "Προσωρινή μνήμη Gwibber" #: ../ubuntutweak/janitor/opera_plugin.py:4 msgid "Opera Cache" msgstr "Προσωρινή μνήμη Opera" #: ../ubuntutweak/janitor/googleearth_plugin.py:5 msgid "Google Earth Cache" msgstr "Προσωρινή μνήμη Google Earth" #: ../ubuntutweak/janitor/thumbnailcache_plugin.py:5 msgid "Thumbnail cache" msgstr "Προσωρινή μνήμη Μικρογραφιών" #: ../ubuntutweak/janitor/softwarecenter_plugin.py:4 msgid "Software Center Cache" msgstr "Προσωρινή μνήμη Κέντρου Λογισμικού" #: ../ubuntutweak/janitor/mozilla_plugin.py:37 msgid "Firefox Cache" msgstr "Προσωρινή μνήμη Firefox" #: ../ubuntutweak/janitor/mozilla_plugin.py:43 msgid "Thunderbird Cache" msgstr "Προσωρινή μνήμη Thunderbird" #: ../ubuntutweak/janitor/chrome_plugin.py:4 msgid "Chrome Cache" msgstr "Προσωρινή μνήμη Chrome" #: ../ubuntutweak/janitor/chrome_plugin.py:11 msgid "Chromium Cache" msgstr "Προσωρινή μνήμη Chromium" #: ../ubuntutweak/janitor/empathy_plugin.py:4 msgid "Empathy Cache" msgstr "Προσωρινή μνήμη Empathy" #: ../ubuntutweak/janitor/autoremoval_plugin.py:14 msgid "Unneeded Packages" msgstr "Πακέτα που δεν χρειάζονται" #: ../ubuntutweak/janitor/autoremoval_plugin.py:53 msgid "Unneeded Packages (No package to be removed)" msgstr "Πακέτα που δεν χρειάζονται (δεν υπάρχει πακέτο προς αφαίρεση)" #: ../ubuntutweak/janitor/aptcache_plugin.py:10 msgid "Apt Cache" msgstr "Προσωρινή μνήμη Apt" #: ../ubuntutweak/janitor/__init__.py:278 msgid "No cache to be cleaned" msgstr "Δεν υπάρχει προσωρινή μνήμη για καθάρισμα" #: ../ubuntutweak/janitor/__init__.py:576 #, python-format msgid "Scanning cruft for \"%s\"..." msgstr "Σάρωση περιττών αρχείων για το \"%s\"..." #: ../ubuntutweak/janitor/__init__.py:698 #, python-format msgid "Scan error for \"%s\", double-click to see details" msgstr "'Ελεγχος σφάλματος για \"%s\", διπλό κλίκ για λεπτομέρειες" #: ../ubuntutweak/janitor/__init__.py:763 #, python-format msgid "Cleaning cruft for \"%s\"..." msgstr "Καθαρισμός περιττών αρχείων του \"%s\"..." #: ../ubuntutweak/janitor/__init__.py:844 #: ../ubuntutweak/admins/desktoprecovery.py:81 #: ../ubuntutweak/modules/__init__.py:34 msgid "System" msgstr "Σύστημα" #: ../ubuntutweak/janitor/__init__.py:866 #: ../ubuntutweak/modules/__init__.py:33 msgid "Personal" msgstr "Προσωπικά" #: ../ubuntutweak/janitor/packageconfigs_plugin.py:30 msgid "Package Configs" msgstr "Ρυθμίσεις Πακέτων" #: ../ubuntutweak/janitor/packageconfigs_plugin.py:73 msgid "Packages Configs (No package config to be removed)" msgstr "Ρυθμίσεις Πακέτων (Δεν υπάρχει ρύθμιση πακέτου προς αφαίρεση)" #: ../ubuntutweak/janitor/oldkernel_plugin.py:16 msgid "Old Kernel" msgstr "Παλαιός Πυρήνας" #: ../ubuntutweak/janitor/oldkernel_plugin.py:105 msgid "Old Kernel Packages (No old kernel package to be removed)" msgstr "Παλαιά πακέτα πυρήνα (Δεν υπάρχουν πακέτα πυρήνα προς αφαίρεση)" #: ../ubuntutweak/admins/desktoprecovery.py:79 #: ../ubuntutweak/modules/__init__.py:29 msgid "Applications" msgstr "Εφαρμογές" #: ../ubuntutweak/admins/desktoprecovery.py:80 #: ../ubuntutweak/admins/userdir.py:34 ../ubuntutweak/modules/__init__.py:32 #: ../ubuntutweak/tweaks/unity.py:156 msgid "Desktop" msgstr "Επιτραπέζιος υπολογιστής" #: ../ubuntutweak/admins/desktoprecovery.py:106 #: ../ubuntutweak/apps/__init__.py:392 msgid "Category" msgstr "Κατηγορία" #: ../ubuntutweak/admins/desktoprecovery.py:147 msgid "Setting" msgstr "Ρύθμιση" #: ../ubuntutweak/admins/desktoprecovery.py:188 msgid "Backup Name:" msgstr "Όνομα Αντιγράφου Ασφαλείας:" #: ../ubuntutweak/admins/desktoprecovery.py:217 msgid "Backing up..." msgstr "Δημιουργία αντιγράφων ασφαλείας..." #: ../ubuntutweak/admins/desktoprecovery.py:242 #, python-format msgid "Backing up...%s" msgstr "Δημιουργία αντιγράφου ασφαλείας…%s" #: ../ubuntutweak/admins/desktoprecovery.py:266 msgid "Desktop Recovery" msgstr "Ανάκτηση επιφάνειας εργασίας" #: ../ubuntutweak/admins/desktoprecovery.py:267 msgid "" "Backup and recover your desktop and application settings with ease.\n" "You can also use \"Reset\" to reset to the system default settings." msgstr "" "Εύκολη δημιουργία αντιγράφου ασφαλείας και επαναφορά της επιφάνειας εργασίας " "σας και των ρυθμίσεων των εφαρμογών σας.\n" "Μπορείτε επίσης να χρησιμοποιήσετε το κουμπί \"Επαναφορά\" για να " "επαναφέρετε τις προεπιλεγμένες ρυθμίσεις συστήματος." #: ../ubuntutweak/admins/desktoprecovery.py:348 msgid "No Backup Yet" msgstr "Δεν υπάρχει αντίγραφο ασφαλείας ακόμη" #: ../ubuntutweak/admins/desktoprecovery.py:383 #, python-format msgid "" "Backup all settings under \"<b>%s</b>\"\n" "Would you like to continue?" msgstr "" "Δημιουργία Αντιγράφου Ασφαλείας για όλες τις ρυθμίσεις κάτω από " "\"<b>%s</b>\"\n" "Θα θέλατε να συνεχίσετε;" #: ../ubuntutweak/admins/desktoprecovery.py:404 #, python-format msgid "" "Backup settings under \"<b>%s</b>\"\n" "Would you like to continue?" msgstr "" "Δημιουργία Αντιγράφου Ασφαλείας για τις ρυθμίσεις κάτω από \"<b>%s</b>\"\n" "Θα θέλατε να συνεχίσετε;" #: ../ubuntutweak/admins/desktoprecovery.py:447 #, python-format msgid "Would you like to delete the backup \"<b>%s/%s</b>\"?" msgstr "Θα θέλατε να διαγράψετε το αντίγραφο ασφαλείας \"<b>%s/%s</b>\"?" #: ../ubuntutweak/admins/desktoprecovery.py:451 #, python-format msgid "" "Would you like to delete the backup of all \"<b>%(setting_name)s</b>\" " "settings named \"<b>%(backup_name)s</b>\"?" msgstr "" "Θα θέλατε να διαγράψετε τα αντίγραφα ασφαλείας όλων των ρυθμίσεων " "\"<b>%(setting_name)s</b>\" με όνομα \"<b>%(backup_name)s</b>\";" #: ../ubuntutweak/admins/desktoprecovery.py:473 #, python-format msgid "Would you like to recover the backup \"<b>%s/%s</b>\"?" msgstr "Θα θέλατε να ανακτήσετε το αντίγραφο ασφαλείας \"<b>%s/%s</b>\"?" #: ../ubuntutweak/admins/desktoprecovery.py:476 #, python-format msgid "" "Would you like to recover the backup of all \"<b>%(setting_name)s</b>\" " "settings named \"<b>%(backup_name)s</b>\"?" msgstr "" "Θα θέλατε να ανακτήσετε τα αντίγραφα ασφαλείας όλων των ρυθμίσεων " "\"<b>%(setting_name)s</b>\" με όνομα \"<b>%(backup_name)s</b>\";" #: ../ubuntutweak/admins/desktoprecovery.py:481 msgid "" "<b>NOTES</b>: While recovering, your desktop may be unresponsive for a " "moment." msgstr "" "<b>ΣΗΜΕΙΩΣΕΙΣ</b>: Κατά την ανάκτηση, η επιφάνεια εργασίας σας μπορεί να μην " "αποκρίνεται για λίγο." #: ../ubuntutweak/admins/desktoprecovery.py:498 msgid "Recovery Successful!" msgstr "Επιτυχία Ανάκτησης!" #: ../ubuntutweak/admins/desktoprecovery.py:499 #: ../ubuntutweak/admins/desktoprecovery.py:535 msgid "You may need to restart your desktop for changes to take effect" msgstr "" "Μπορεί να χρειαστεί να επανεκκινήσετε τον υπολογιστή σας για να ισχύσουν οι " "αλλαγές" #: ../ubuntutweak/admins/desktoprecovery.py:504 msgid "_Logout" msgstr "_Αποσύνδεση" #: ../ubuntutweak/admins/desktoprecovery.py:517 #, python-format msgid "Would you like to reset settings for \"<b>%s</b>\"?" msgstr "Θα θέλατε να επαναφέρετε τις αρχικές ρυθμίσεις του \"<b>%s</b>\";" #: ../ubuntutweak/admins/desktoprecovery.py:519 #, python-format msgid "Would you like to reset all settings under \"<b>%s</b>\"?" msgstr "" "Θα θέλατε να επαναφέρετε όλες τις αρχικές ρυθμίσεις στο \"<b>%s</b>\";" #: ../ubuntutweak/admins/desktoprecovery.py:521 msgid "" "<b>NOTES</b>: Whilst resetting, your desktop may be unresponsive for a " "moment." msgstr "" "<b>ΣΗΜΕΙΩΣΕΙΣ</b>: Κατά την επαναφορά, η επιφάνεια εργασίας σας μπορεί να " "μην αποκρίνεται για λίγο." #: ../ubuntutweak/admins/desktoprecovery.py:534 msgid "Reset Successful!" msgstr "Επιτυχία Επαναφοράς!" #: ../ubuntutweak/admins/desktoprecovery.py:563 #: ../ubuntutweak/admins/sourceeditor.py:422 msgid "Please enter a new name for your backup:" msgstr "Παρακαλούμε εισάγετε ένα όνομα για το αντίγραφο ασφαλείας σας:" #: ../ubuntutweak/admins/desktoprecovery.py:595 msgid "Backup Successful!" msgstr "Δημιουργία αντιγράφου ασφαλείας επιτυχής!" #: ../ubuntutweak/admins/desktoprecovery.py:598 #: ../ubuntutweak/admins/sourceeditor.py:398 msgid "Backup Failed!" msgstr "Η δημιουργία αντιγράφου ασφαλείας απέτυχε!" #: ../ubuntutweak/admins/sourcecenter.py:301 msgid "Package" msgstr "Πακέτο" #: ../ubuntutweak/admins/sourcecenter.py:309 msgid "Previous Version" msgstr "Προηγούμενη Έκδοση" #: ../ubuntutweak/admins/sourcecenter.py:318 msgid "System Version" msgstr "Έκδοση Συστήματος" #: ../ubuntutweak/admins/sourcecenter.py:457 #, python-format msgid "%d New Application Available" msgid_plural "%d New Applications Available" msgstr[0] "%d νέα εφαρμογή διαθέσιμη" msgstr[1] "%d νέες εφαρμογές διαθέσιμες" #: ../ubuntutweak/admins/sourcecenter.py:475 #, python-format msgid "%d Package Update Available" msgid_plural "%d Package Updates Available" msgstr[0] "%d ενημέρωση πακέτου διαθέσιμη" msgstr[1] "%d ενημερώσεις πακέτων διαθέσιμες" #: ../ubuntutweak/admins/sourcecenter.py:513 msgid "No Available Package Updates" msgstr "Δεν υπάρχουν διαθέσιμες ενημερώσεις πακέτων" #: ../ubuntutweak/admins/sourcecenter.py:603 #: ../ubuntutweak/admins/sourcecenter.py:1103 msgid "Third-Party Sources" msgstr "Πηγές Τρίτων" #: ../ubuntutweak/admins/sourcecenter.py:770 #, python-format msgid "" "You can't enable this Source because<b>\"%(SOURCE)s\"</b> conflicts with " "it.\n" "To continue you need to disable <b>\"%(SOURCE)s\"</b>first." msgstr "" "Δεν μπορείτε να ενεργοποιήσετε αυτή την πηγή διότι το <b>\"%(SOURCE)s\"</b> " "συγκρούεται με αυτήν.\n" "Για να συνεχίσετε πρέπει να απενεργοποιήσετε το <b>\"%(SOURCE)s\"</b> πρώτα." #: ../ubuntutweak/admins/sourcecenter.py:791 msgid "Dependency Notice" msgstr "Ειδοποίηση Εξάρτησης" #: ../ubuntutweak/admins/sourcecenter.py:792 #, python-format msgid "" "To enable this Source, You need to enable <b>\"%s\"</b> at first.\n" "Do you wish to continue?" msgstr "" "Για να ενεργοποιήσετε αυτήν την πηγή, θα πρέπει να ενεργοποιήσετε το <b>\"% " "s\"</ b>πρώτα.\n" "Θέλετε να συνεχίσετε;" #: ../ubuntutweak/admins/sourcecenter.py:817 #, python-format msgid "" "You can't disable this Source because <b>\"%(SOURCE)s\"</b> depends on it.\n" "To continue you need to disable <b>\"%(SOURCE)s\"</b> first." msgstr "" "Δεν μπορείτε να απενεργοποιήσετε αυτήν την πηγή επειδή το <b>\\\"%(SOURCE)s\\" "\"</b> εξαρτάται από αυτή.\n" "Για να συνεχίσετε θα πρέπει να απενεργοποιήσετε το <b>\\\"%(SOURCE)s\\\"</b> " "πρώτα." #: ../ubuntutweak/admins/sourcecenter.py:903 #: ../ubuntutweak/apps/__init__.py:225 msgid "New source has been enabled" msgstr "Η νέα πηγή ενεργοποιήθηκε" #: ../ubuntutweak/admins/sourcecenter.py:904 #, python-format msgid "" "%s is enabled now, Please click the refresh button to update the application " "cache." msgstr "" "Το % s είναι ενεργοποιημένο τώρα, παρακαλώ κάντε κλικ στο κουμπί ανανέωσης " "για να ενημερωθεί η προσωρινή μνήμη εφαρμογών." #: ../ubuntutweak/admins/sourcecenter.py:921 msgid "Enabled PPAs" msgstr "Ενεργοποιημένα αποθετήρια PPA" #: ../ubuntutweak/admins/sourcecenter.py:924 msgid "Source Center" msgstr "Κέντρο Πηγών" #: ../ubuntutweak/admins/sourcecenter.py:925 msgid "" "A collection of software sources to ensure your applications are always up-" "to-date." msgstr "" "Μια συλλογή πηγών λογισμικού ώστε να διασφαλίσετε πως οι εφαρμογές σας είναι " "πάντα ενημερωμένες." #: ../ubuntutweak/admins/sourcecenter.py:928 msgid "Visit online Source Center" msgstr "Επισκεφτείτε το Κέντρο Πηγών" #: ../ubuntutweak/admins/sourcecenter.py:937 #: ../ubuntutweak/admins/appcenter.py:505 msgid "_Sync" msgstr "_Συγχρονισμός" #: ../ubuntutweak/admins/sourcecenter.py:974 msgid "Warning" msgstr "Προειδοποίηση" #: ../ubuntutweak/admins/sourcecenter.py:975 msgid "" "It is a possible security risk to use packages from Third-Party Sources.\n" "Please be careful and use only sources you trust." msgstr "" "Είναι πιθανό ρίσκο ασφαλείας να χρησιμοποιείτε πακέτα από τρίτες πηγές.\n" "Παρακαλώ προσέχετε και χρησιμοποιείτε μόνο πηγές που εμπιστεύεστε." #: ../ubuntutweak/admins/sourcecenter.py:979 msgid "Never show this dialog" msgstr "Να μην ξαναεμφανιστεί αυτός ο διάλογος" #. the "%s" is in front, some is the end, so just return the long one #: ../ubuntutweak/admins/sourcecenter.py:1009 #, python-format msgid "disabled on upgrade to %s" msgstr "απενεργοποιημένο κατά την αναβάθμιση σε %s" #: ../ubuntutweak/admins/sourcecenter.py:1014 #: ../ubuntutweak/admins/appcenter.py:545 msgid "Last synced:" msgstr "Συγχρονίστηκε τελευταία:" #: ../ubuntutweak/admins/sourcecenter.py:1019 msgid "Upgrade Third Party Sources" msgstr "Αναβάθμιση πηγών τρίτων" #: ../ubuntutweak/admins/sourcecenter.py:1020 msgid "" "After a successful distribution upgrade, any third-party sources you use " "will be disabled by default.\n" "Would you like to re-enable any sources disabled by Update Manager?" msgstr "" "Μετά από μια επιτυχή αναβάθμιση διανομής, οποιεσδήποτε πηγές τρίτων που " "χρησιμοποιείτε θα απενεργοποιηθούν εξ ορισμού.\n" "Θέλετε να επανενεργοποιήσετε όποιες πηγές απενεργοποιήθηκαν από τη " "Διαχείριση ενημερώσεων;" #: ../ubuntutweak/admins/sourcecenter.py:1029 msgid "Upgrade Successful!" msgstr "Επιτυχής Αναβάθμιση!" #: ../ubuntutweak/admins/sourcecenter.py:1031 msgid "Upgrade Failed!" msgstr "Αποτυχία Αναβάθμισης!" #: ../ubuntutweak/admins/sourcecenter.py:1038 msgid "New source data available, would you like to update?" msgstr "Νέα δεδομένα πηγών διαθέσιμα, θέλετε να γίνει ενημέρωση;" #: ../ubuntutweak/admins/sourcecenter.py:1099 msgid "" "All enabled PPAs (Select and click \"Purge PPA\" can safely downgrade " "packages)" msgstr "" "Όλα τα ενεργοποιημένα αποθετήρια PPA (η επιλογή και το κλικ στη λειτουργία " "«Εκκαθάριση PPA» μπορεί να υποβαθμίσει πακέτα με ασφάλεια)" #: ../ubuntutweak/admins/sourcecenter.py:1155 msgid "An error occurred whilst downloading the file" msgstr "Προέκυψε ένα σφάλμα κατά την μεταφόρτωση του αρχείου" #: ../ubuntutweak/admins/sourcecenter.py:1171 msgid "Update available, Would you like to update?" msgstr "Διαθέσιμη ενημέρωση, Θέλετε την ενημέρωση;" #: ../ubuntutweak/admins/sourcecenter.py:1180 msgid "" "Network Error, Please check your network connection or the remote server is " "down." msgstr "" "Σφάλμα δικτύου. Παρακαλώ ελέγξτε την σύνδεσή σας ή ο απομακρυσμένος " "εξυπηρετητής δεν λειτουργεί." #: ../ubuntutweak/admins/sourcecenter.py:1184 #: ../ubuntutweak/admins/appcenter.py:664 msgid "No update available." msgstr "Δεν υπάρχει διαθέσιμη ενημέρωση." #: ../ubuntutweak/admins/sourcecenter.py:1209 msgid "It's safe to purge the PPA, no packages need to be downgraded." msgstr "" "Είναι ασφαλές να εκκαθαρίσετε το PPA, δεν χρειάζεται να υποβαθμιστούν πακέτα." #: ../ubuntutweak/admins/sourcecenter.py:1212 msgid "To safely purge the PPA, the following packages must be downgraded." msgstr "" "Για να εκκαθαρίσετε με ασφάλεια το PPA, τα ακόλουθα πακέτα πρέπει να " "υποβαθμιστούν." #: ../ubuntutweak/admins/sourcecenter.py:1216 #, python-format msgid "You're going to purge \"%s\":" msgstr "Πρόκειται να εκκαθαρίσετε το \"%s\":" #: ../ubuntutweak/admins/sourcecenter.py:1253 msgid "PPA has been purged" msgstr "Το αποθετήριο PPA εκκαθαρίστηκε" #: ../ubuntutweak/admins/sourcecenter.py:1254 msgid "It is highly recommend to do a \"Refresh\" source operation." msgstr "Προτείνεται ανεπιφύλακτα να κάνετε τη λειτουργία πηγών «Ανανέωση»." #: ../ubuntutweak/admins/sourceeditor.py:172 msgid "Source Editor" msgstr "Επεξεργαστής Πηγών" #: ../ubuntutweak/admins/sourceeditor.py:173 msgid "Manually edit your software sources to suit your needs." msgstr "" "Χειροκίνητη επεξεργασία των πηγών λογισμικού για να ταιριάζουν στις ανάγκες " "σας." #: ../ubuntutweak/admins/sourceeditor.py:212 #, python-format msgid "" "You're viewing the backup \"<b>%(backup_name)s</b>\" for " "\"<b>%(list_name)s</b>\"" msgstr "" "Βλέπετε το αντίγραφο ασφαλείας \"<b>%(backup_name)s</b>\" του " "\"<b>%(list_name)s</b>\"" #: ../ubuntutweak/admins/sourceeditor.py:283 msgid "No backup yet" msgstr "Κανένα αντίγραφο ασφαλείας ακόμα" #: ../ubuntutweak/admins/sourceeditor.py:323 msgid "Please check the permission of the sources.list file" msgstr "Παρακαλούμε ελέγξτε τα δικαιώματα του αρχείου sources.list" #: ../ubuntutweak/admins/sourceeditor.py:325 msgid "Save failed!" msgstr "Αποτυχία αποθήκευσης!" #: ../ubuntutweak/admins/sourceeditor.py:343 #, python-format msgid "" "Would you like to recover the backup \"<b>%(backup_name)s</b>\" for " "\"<b>%(list_name)s</b>\"?" msgstr "" "Θα θέλατε να ανακτήσετε το αντίγραφο ασφαλείας \"<b>%(backup_name)s</b>\" " "του \"<b>%(list_name)s</b>\";" #: ../ubuntutweak/admins/sourceeditor.py:354 msgid "Recovery Failed!" msgstr "Αποτυχία Ανάκτησης!" #: ../ubuntutweak/admins/sourceeditor.py:355 msgid "You may need to check the permission of source list." msgstr "Θα πρέπει να ελέγξετε τα δικαιώματα της λίστας πηγών." #: ../ubuntutweak/admins/sourceeditor.py:387 msgid "Please enter the name for your backup:" msgstr "Παρακαλώ εισάγετε το όνομα του αντιγράφου ασφαλείας σας:" #: ../ubuntutweak/admins/sourceeditor.py:400 #: ../ubuntutweak/admins/sourceeditor.py:433 msgid "Please only use alphanumeric characters and \"_\" and \"-\"." msgstr "" "Παρακαλώ χρησιμοποιήστε μόνο αλφαριθμητικούς χαρακτήρες και \"_\" και \"-\"." #: ../ubuntutweak/admins/sourceeditor.py:402 #: ../ubuntutweak/admins/sourceeditor.py:435 msgid "Backup name is invalid" msgstr "Το όνομα του αντίγραφου ασφαλείας δεν είναι έγκυρο" #: ../ubuntutweak/admins/sourceeditor.py:408 #, python-format msgid "Would you like to delete the backup \"<b>%s</b>\"?" msgstr "Θα θέλατε να διαγράψετε το αντίγραφο ασφαλείας \"<b>%s</b>\"?" #: ../ubuntutweak/admins/sourceeditor.py:438 msgid "" "The current content will be lost after reloading!\n" "Do you wish to continue?" msgstr "" "Το τρέχον περιεχόμενο θα χαθεί μετά την επαναφόρτωση! \n" "Θέλετε να συνεχίσετε;" #: ../ubuntutweak/admins/sourceeditor.py:456 msgid "You can't delete sources.list!" msgstr "Δεν μπορείτε να διαγράψετε το αρχείο sources.list!" #: ../ubuntutweak/admins/sourceeditor.py:458 #, python-format msgid "" "The \"%s\" will be deleted!\n" "Do you wish to continue?" msgstr "" "Το \"%s\" θα διαγραφεί!\n" "Θέλετε να συνεχίσετε?" #: ../ubuntutweak/admins/templates.py:65 msgid "HTML document" msgstr "Έγγραφο HTML" #: ../ubuntutweak/admins/templates.py:66 msgid "ODB Database" msgstr "Βάση δεδομένων ODB" #: ../ubuntutweak/admins/templates.py:67 msgid "ODS Spreadsheet" msgstr "Λογιστικό φύλλο ODS" #: ../ubuntutweak/admins/templates.py:68 msgid "ODT Document" msgstr "Έγγραφο ODT" #: ../ubuntutweak/admins/templates.py:69 msgid "Plain text document" msgstr "Έγγραφο απλού κειμένου" #: ../ubuntutweak/admins/templates.py:70 msgid "ODP Presentation" msgstr "Παρουσίαση ODP" #: ../ubuntutweak/admins/templates.py:71 msgid "Python script" msgstr "Δέσμη ενεργειών Python" #: ../ubuntutweak/admins/templates.py:72 msgid "Pygtk Example" msgstr "Παράδειγμα Pygtk" #: ../ubuntutweak/admins/templates.py:73 msgid "Shell script" msgstr "Δέσμη ενεργειών φλοιού" #: ../ubuntutweak/admins/templates.py:101 msgid "Enabled Templates" msgstr "Ενεργοποιημένα Πρότυπα" #: ../ubuntutweak/admins/templates.py:109 msgid "Disabled Templates" msgstr "Απενεργοποιημένα Πρότυπα" #: ../ubuntutweak/admins/templates.py:116 ../ubuntutweak/admins/userdir.py:36 msgid "Templates" msgstr "Πρότυπα" #: ../ubuntutweak/admins/templates.py:117 msgid "" "Here you can manage your document templates.\n" "You can add files as templates by dragging them into this window.\n" "You can then create new documents based on these templates from the Nautilus " "right-click menu." msgstr "" "Εδώ μπορείτε να διαχειριστείτε τα πρότυπα των εγγράφων σας.\n" "Μπορείτε να προσθέσετε αρχεία ως πρότυπα σύροντάς τα σε αυτό το παράθυρο.\n" "Μπορείτε τότε να δημιουργήσετε νέα έγγραφα βασισμένα σε αυτά τα πρότυπα από " "το μενού δεξιού κλικ του Ναυτίλου." #: ../ubuntutweak/admins/templates.py:128 #, python-format msgid "" "The templates path is incorrect! The current path points to \"%s\".\n" "Please reset it to a location within your Home Folder." msgstr "" "Η διαδρομή των προτύπων είναι εσφαλμένη! Η τρέχουσα διαδρομή δείχνει στο " "\"%s\".\n" "Παρακαλούμε να γίνει επαναφορά σε μια τοποθεσία εντός του Προσωπικού σας " "φακέλου." #: ../ubuntutweak/admins/templates.py:137 msgid "Go And Set" msgstr "Πήγαινε και Όρισε" #: ../ubuntutweak/admins/templates.py:142 msgid "Restart This Module" msgstr "Επανεκκίνηση αυτού του αρθρώματος" #: ../ubuntutweak/admins/templates.py:167 msgid "Rebuild System Templates" msgstr "Ξανακτίσε τα πρότυπα συστήματος" #: ../ubuntutweak/admins/templates.py:182 msgid "The templates path is still incorrect, please reset it!" msgstr "" "Η διαδρομή των προτύπων είναι ακόμα εσφαλμένη, παρακαλούμε να γίνει " "επαναφορά!" #: ../ubuntutweak/admins/templates.py:194 msgid "" "This will delete all disabled templates.\n" "Do you wish to continue?" msgstr "" "Αυτό θα σβήσει όλα τα απενεργοποιημένα πρότυπα.\n" "Θέλετε να συνεχίσετε?" #: ../ubuntutweak/admins/appcenter.py:187 msgid "Installed Apps" msgstr "Εγκαταστημένες εφαρμογές" #: ../ubuntutweak/admins/appcenter.py:454 msgid "Checking update..." msgstr "Έλεγχος ενημέρωσης..." #: ../ubuntutweak/admins/appcenter.py:489 msgid "Fetching online data..." msgstr "Λήψη Δεδομένων..." #: ../ubuntutweak/admins/appcenter.py:494 msgid "Application Center" msgstr "Κέντρο Εφαρμογών" #: ../ubuntutweak/admins/appcenter.py:495 msgid "" "A simple but efficient way for finding and installing popular applications." msgstr "" "Ένας απλός αλλά αποτελεσματικός τρόπος να βρίσκετε και να εγκαθιστάτε " "δημοφιλείς εφαρμογές." #: ../ubuntutweak/admins/appcenter.py:498 msgid "Visit Online Application Center" msgstr "Επισκευθείτε το διαδικτυακό κέντρο της εφαρμογής" #: ../ubuntutweak/admins/appcenter.py:552 msgid "New application data available, would you like to update?" msgstr "Νέα διαθέσιμα δεδομένα εφαρμογής, θέλετε την ενημέρωση;" #: ../ubuntutweak/admins/appcenter.py:651 msgid "Update available, would you like to update?" msgstr "Διαθέσιμες ενημερώσεις, θα θελατε να ενημερώσετε;" #: ../ubuntutweak/admins/appcenter.py:660 msgid "" "Network Error, please check your network connection - or the remote server " "may be down." msgstr "" "Σφάλμα δικτύου, παρακαλώ ελέγξτε τη σύνδεση του δικτύου σας - ή ο " "απομακρυσμένος διακομιστής μπορεί να μην είναι διαθέσιμος." #: ../ubuntutweak/admins/appcenter.py:677 msgid "An error occurred while downloading the file." msgstr "Προέκυψε σφάλμα κατά τη λήψη του αρχείου." #: ../ubuntutweak/admins/userdir.py:35 msgid "Download" msgstr "Λήψη" #: ../ubuntutweak/admins/userdir.py:37 msgid "Public" msgstr "Δημόσιο" #: ../ubuntutweak/admins/userdir.py:38 msgid "Document" msgstr "Έγγραφο" #: ../ubuntutweak/admins/userdir.py:39 msgid "Music" msgstr "Μουσική" #: ../ubuntutweak/admins/userdir.py:40 msgid "Pictures" msgstr "Εικόνες" #: ../ubuntutweak/admins/userdir.py:41 msgid "Videos" msgstr "Βίντεο" #: ../ubuntutweak/admins/userdir.py:154 msgid "Choose a folder" msgstr "Επιλογή φακέλου" #: ../ubuntutweak/admins/userdir.py:171 msgid "" "Ubuntu Tweak will restore the selected directory to it's default location.\n" "However, you must move your files back into place manually.\n" "Do you wish to continue?" msgstr "" "Το Ubuntu Tweak θα επαναφέρει τον επιλεγμένο φάκελο στην προκαθορισμένη του " "τοποθεσία.\n" "Παρ' όλα αυτά, θα πρέπει να μεταφέρετε τα αρχεία σας πίσω στη θέση τους " "χειροκίνητα.\n" "Θέλετε να συνεχίσετε;" #: ../ubuntutweak/admins/userdir.py:204 msgid "Directory" msgstr "Κατάλογος" #: ../ubuntutweak/admins/userdir.py:218 msgid "Path" msgstr "Διαδρομή" #: ../ubuntutweak/admins/userdir.py:225 msgid "Change" msgstr "Αλλαγή" #: ../ubuntutweak/admins/userdir.py:229 msgid "Restore to default" msgstr "Επαναφορά στην προεπιλογή" #: ../ubuntutweak/admins/userdir.py:237 msgid "User Folder" msgstr "Προσωπικός φάκελος χρήστη" #: ../ubuntutweak/admins/userdir.py:238 msgid "" "You can change the paths of default folders here.\n" "Don't change the location of your desktop folder unless you know what you " "are doing." msgstr "" "Μπορείτε να αλλάξετε τις διαδρομές των προκαθορισμένων φακέλων από εδώ.\n" "Μην αλλάξετε την τοποθεσία του φακέλου επιφάνειας εργασίας εκτός κι αν " "ξέρετε τι κάνετε." #: ../ubuntutweak/admins/userdir.py:261 msgid "_Restore" msgstr "_Επαναφορά" #: ../ubuntutweak/admins/userdir.py:267 msgid "_Change" msgstr "_Αλλαγή" #: ../ubuntutweak/admins/quicklists.py:211 msgid "QuickLists Editor" msgstr "Επεξεργαστής QuickLists" #: ../ubuntutweak/admins/quicklists.py:212 msgid "Unity Launcher QuickLists Editor" msgstr "Επεξεργαστής QuickLists για τον εκκινητή του Unity" #: ../ubuntutweak/admins/quicklists.py:230 msgid "Running Apps" msgstr "Εκτελούμενες εφαρμογές" #: ../ubuntutweak/admins/quicklists.py:231 msgid "Workspace Switcher" msgstr "Εναλλάκτης χώρων εργασίας" #: ../ubuntutweak/admins/quicklists.py:232 msgid "Devices" msgstr "Συσκευές" #: ../ubuntutweak/admins/quicklists.py:426 #, python-format msgid "Would you like to reset \"%s\"?" msgstr "Θα θέλατε να επαναφέρετε το \"%s\";" #: ../ubuntutweak/admins/quicklists.py:427 #, python-format msgid "If you continue, the actions of %s will be set to default." msgstr "" "Αν συνεχίσετε, οι ενέργειες του %s θα ρυθμιστούν στις προεπιλεγμένες." #: ../ubuntutweak/admins/quicklists.py:440 msgid "Would you like to reset the launcher items?" msgstr "Θα θέλατε να επαναφέρετε τα αντικείμενα του εκκινητή;" #: ../ubuntutweak/admins/quicklists.py:441 msgid "" "If you continue, launcher will be set to default and all your current items " "will be lost." msgstr "" "Αν συνεχίσετε, ο εκκινητής θα ρυθμιστεί στις προεπιλογές και τα τρέχοντα " "αντικείμενά σας θα χαθούν." #: ../ubuntutweak/admins/scripts.py:49 msgid "Create Launcher ..." msgstr "Δημιουργία εκκινητή ..." #: ../ubuntutweak/admins/scripts.py:50 msgid "Copy to ..." msgstr "Αντιγραφή σε ..." #: ../ubuntutweak/admins/scripts.py:51 msgid "Copy to Desktop" msgstr "Αντιγραφή στην Επιφάνεια Εργασίας" #: ../ubuntutweak/admins/scripts.py:52 msgid "Copy to Download" msgstr "Αντιγραφή στο φάκελο Λήψεις" #: ../ubuntutweak/admins/scripts.py:53 msgid "Copy to Home" msgstr "Αντιγραφή στο φάκελο ρίζας (Ηome)" #: ../ubuntutweak/admins/scripts.py:54 msgid "Check md5 sum" msgstr "Έλεγχος md5 sum" #: ../ubuntutweak/admins/scripts.py:55 msgid "Compress PDF" msgstr "Συμπίεση PDF" #: ../ubuntutweak/admins/scripts.py:56 msgid "Move to ..." msgstr "Μετακίνηση σε ..." #: ../ubuntutweak/admins/scripts.py:57 msgid "Move to Desktop" msgstr "Μετακίνηση στην Επιφάνεια Εργασίας" #: ../ubuntutweak/admins/scripts.py:58 msgid "Move to Download" msgstr "Μετακίνηση στο φάκελο Λήψεις" #: ../ubuntutweak/admins/scripts.py:59 msgid "Move to Home" msgstr "Μετακίνηση στο φάκελο Home" #: ../ubuntutweak/admins/scripts.py:60 msgid "Create hardlink to ..." msgstr "Δημιουργία δεσμού (hardlink) σε ..." #: ../ubuntutweak/admins/scripts.py:61 msgid "Link to ..." msgstr "Σύνδεση σε ..." #: ../ubuntutweak/admins/scripts.py:62 msgid "Link to Desktop" msgstr "Σύνδεση στην Επιφάνεια Εργασίας" #: ../ubuntutweak/admins/scripts.py:63 msgid "Link to Download" msgstr "Σύνδεσμος στο Λήψεις" #: ../ubuntutweak/admins/scripts.py:64 msgid "Link to Home" msgstr "Σύνδεσμος στο Home" #: ../ubuntutweak/admins/scripts.py:65 msgid "Open with your favourite text editor" msgstr "Άνοιγμα με τον αγαπημένο σας επεξεργαστή κειμένου" #: ../ubuntutweak/admins/scripts.py:66 msgid "Open with your favourite text editor (as root)" msgstr "Άνοιγμα με τον αγαπημένο σας επεξεργαστή κειμένου (σαν υπερχρήστης)" #: ../ubuntutweak/admins/scripts.py:67 msgid "Browse as root" msgstr "Εξερεύνηση ως υπερχρήστης" #: ../ubuntutweak/admins/scripts.py:68 msgid "Search in current folder" msgstr "Αναζήτηση στον τρέχοντα φάκελο" #: ../ubuntutweak/admins/scripts.py:69 msgid "Convert image to JPG" msgstr "Μετατροπή εικόνας σε JPG" #: ../ubuntutweak/admins/scripts.py:70 msgid "Convert image to PNG" msgstr "Μετατροπή εικόνας σε PNG" #: ../ubuntutweak/admins/scripts.py:71 msgid "Convert image to GIF" msgstr "Μετατροπή εικόνας σε GIF" #: ../ubuntutweak/admins/scripts.py:72 msgid "Set image as wallpaper" msgstr "Χρήση της εικόνας ως φόντο επιφάνειας εργασίας" #: ../ubuntutweak/admins/scripts.py:73 msgid "Make hard shadow to image" msgstr "Δημιουργία σκληρής μάσκας στο είδωλο" #: ../ubuntutweak/admins/scripts.py:101 msgid "Enabled Scripts" msgstr "Ενεργοποιημένα σενάρια εντολών" #: ../ubuntutweak/admins/scripts.py:132 msgid "Disabled Scripts" msgstr "Απενεργοποιημένα σενάρια εντολών" #: ../ubuntutweak/admins/scripts.py:139 msgid "Scripts" msgstr "Δέσμες ενεργειών" #: ../ubuntutweak/admins/scripts.py:140 msgid "" "Scripts can be used to complete all kinds of tasks.\n" "You can drag and drop scripts here from File Manager.\n" "'Scripts' will then be added to the context menu." msgstr "" "Σενάρια ενεργειών (scripts) μπορούν να χρησιμοποιηθούν για οποιοδήποτε είδος " "εργασίας.\n" "Μπορείτε να σύρετε σενάρια ενεργειών εδώ από τον Διαχειριστή Αρχείων.\n" "Το 'Σενάρια εντολών' θα προστεθεί τότε στο μενού περιεχομένου." #: ../ubuntutweak/admins/scripts.py:168 msgid "Rebuild System Scripts" msgstr "Αναδημιουργία σεναρίων εντολών Συστήματος" #: ../ubuntutweak/admins/scripts.py:182 msgid "" "This will delete all disabled scripts.\n" "Do you wish to continue?" msgstr "" "Αυτό θα διαγράψει όλα τα απενεργοποιημένα σενάρια εντολών.\n" "Θέλετε να συνεχίσετε ;" #: ../ubuntutweak/admins/shortcuts.py:29 msgid "Shortcuts" msgstr "Συντομεύσεις" #: ../ubuntutweak/admins/shortcuts.py:30 msgid "" "By configuring keyboard shortcuts, you can access your favourite " "applications instantly.\n" "Enter the command to run the application and choose a shortcut key " "combination." msgstr "" "Ρυθμίζοντας τις συντομεύσεις πληκτρολογίου, μπορείτε να έχετε άμεση πρόσβαση " "στις αγαπημένες σας εφαρμογές.\n" "Εισάγετε την εντολή για την εκτέλεση της εφαρμογής και επιλέξετε ένα " "συνδυασμό πλήκτρων για τη συντόμευση." #: ../ubuntutweak/admins/shortcuts.py:84 #, python-format msgid "Command %d" msgstr "Εντολή %d" #: ../ubuntutweak/admins/shortcuts.py:89 #: ../ubuntutweak/admins/shortcuts.py:201 #: ../ubuntutweak/admins/filetypemanager.py:178 #: ../ubuntutweak/admins/filetypemanager.py:202 #: ../ubuntutweak/tweaks/window.py:80 ../ubuntutweak/tweaks/window.py:87 #: ../ubuntutweak/tweaks/window.py:98 ../ubuntutweak/tweaks/window.py:113 #: ../ubuntutweak/tweaks/window.py:137 ../ubuntutweak/tweaks/window.py:144 #: ../ubuntutweak/tweaks/window.py:155 ../ubuntutweak/tweaks/window.py:166 msgid "None" msgstr "Κανένα" #: ../ubuntutweak/admins/shortcuts.py:94 #: ../ubuntutweak/admins/shortcuts.py:146 msgid "disabled" msgstr "απενεργοποιημένο" #: ../ubuntutweak/admins/shortcuts.py:103 msgid "ID" msgstr "ID" #: ../ubuntutweak/admins/shortcuts.py:114 msgid "Command" msgstr "Εντολή" #: ../ubuntutweak/admins/shortcuts.py:127 msgid "Key" msgstr "Κλειδί" #: ../ubuntutweak/admins/filetypemanager.py:45 msgid "Audio" msgstr "Ήχος" #: ../ubuntutweak/admins/filetypemanager.py:46 msgid "Text" msgstr "Κείμενο" #: ../ubuntutweak/admins/filetypemanager.py:47 msgid "Image" msgstr "Εικόνα" #: ../ubuntutweak/admins/filetypemanager.py:48 msgid "Video" msgstr "Βίντεο" #: ../ubuntutweak/admins/filetypemanager.py:49 msgid "Application" msgstr "Εφαρμογή" #: ../ubuntutweak/admins/filetypemanager.py:50 #: ../ubuntutweak/apps/__init__.py:411 msgid "All" msgstr "Όλα" #: ../ubuntutweak/admins/filetypemanager.py:75 msgid "Categories" msgstr "Κατηγορίες" #: ../ubuntutweak/admins/filetypemanager.py:128 msgid "File Type" msgstr "Τύπος αρχείου" #: ../ubuntutweak/admins/filetypemanager.py:144 msgid "Associated Application" msgstr "Συσχετιζόμενη Εφαρμογή" #: ../ubuntutweak/admins/filetypemanager.py:232 #, python-format msgid "Open files of type \"%s\" with:" msgstr "Άνοιγμα αρχείων τύπου \"% s\" με:" #: ../ubuntutweak/admins/filetypemanager.py:260 msgid "Choose an application" msgstr "Διάλεξτε μια εφαρμογή" #: ../ubuntutweak/admins/filetypemanager.py:361 #, python-format msgid "Select an application to open files of type: <b>%s</b>" msgid_plural "Select an application to open files for these types: <b>%s</b>" msgstr[0] "" "Επιλέξτε μια εφαρμογή για να ανοίξετε τα αρχεία του τύπου: <b>% s </ b>" msgstr[1] "" "Επιλέξτε μια εφαρμογή για να ανοίξετε τα αρχεία των τύπων: <b>% s </ b>" #: ../ubuntutweak/admins/filetypemanager.py:544 msgid "File Type Manager" msgstr "Διαχείριση τύπων αρχείων" #: ../ubuntutweak/admins/filetypemanager.py:545 msgid "Manage all registered file types" msgstr "Διαχειριστείτε όλους τους καταχωρημένους τύπους αρχείων" #: ../ubuntutweak/admins/filetypemanager.py:582 msgid "_Reset" msgstr "_Επαναφορά" #: ../ubuntutweak/admins/filetypemanager.py:588 msgid "Only show filetypes with associated applications" msgstr "Προβολή μόνο των τύπων αρχείων που σχετίζονται με κάποια εφαρμογή" #: ../ubuntutweak/modules/__init__.py:28 msgid "Broken Modules" msgstr "Προβληματικά αρθρώματα" #: ../ubuntutweak/modules/__init__.py:30 msgid "Appearance" msgstr "Εμφάνιση" #: ../ubuntutweak/modules/__init__.py:31 msgid "Startup" msgstr "Εκκίνηση" #: ../ubuntutweak/modules/__init__.py:35 msgid "Other" msgstr "'Αλλο" #: ../ubuntutweak/modules/__init__.py:254 msgid "More" msgstr "Περισσότερα" #: ../ubuntutweak/modules/__init__.py:427 #, python-format msgid "" "Ubuntu Tweak has detected that your apt configuration is broken.\n" "Try to fix by following steps:\n" "\n" "\t1. Open your terminal\n" "\t2. Run the commands to fix:\n" "\n" "\t\tsudo chmod 644 %(broken_file)s\n" "\t\tsudo chown root:root %(broken_file)s\n" "\n" "Or you can submit the Error Message to the developer for help:" msgstr "" "Το Ubuntu Tweak εντόπισε ότι η ρύθμιση του apt είναι κατεστραμμένη.\n" "Προσπαθήστε να την διορθώσετε ακολουθώντας τα παρακάτω βήματα:\n" "\n" "\t1. Ανοίξτε ένα Τερματικό\n" "\t2. Εκτελέστε τις εντολές επιδιόρθωσης:\n" "\n" "\t\tsudo chmod 644 %(broken_file)s\n" "\t\tsudo chown root:root %(broken_file)s\n" "\n" "Ή μπορείτε να υποβάλετε το Μήνυμα Σφάλματος στον προγραμματιστή του έργου " "για βοήθεια:" #: ../ubuntutweak/modules/__init__.py:437 #, python-format msgid "" "Ubuntu Tweak has detected that your apt list file is broken.\n" "Try to fix by following steps:\n" "\n" "\t1.Open your terminal\n" "\t2. Run the command to open apt list file:\n" "\n" "\t\tsudo gedit %s\n" "\n" "\t3. Edit the list to make it correctly\n" "\n" "Or you can submit the Error Message to the developer forhelp:" msgstr "" "Το Ubuntu Tweak εντόπισε ότι το αρχείο της λίστας apt είναι κατεστραμμένο.\n" "Δοκιμάστε να το διορθώσετε ακολουθώντας τα παρακάτω βήματα:\n" "\n" "\t1. Ανοίξτε ένα Τερματικό\n" "\t2. Εκτελέστε την εντολή για να ανοίξει το αρχείο λίστας apt:\n" "\n" "\t\tsudo gedit %s\n" "\n" "\t3. Επεξεργαστείτε την λίστα για να είναι σωστή\n" "\n" "Ή μπορείτε να υποβάλετε το Μήνυμα Σφάλματος στον προγραμματιστή του έργου " "για βοήθεια:" #: ../ubuntutweak/tweaks/icons.py:27 msgid "Show \"Computer\" icon" msgstr "Εμφάνιση εικονιδίου «Υπολογιστής»" #: ../ubuntutweak/tweaks/icons.py:34 msgid "Show \"Home Folder\" icon" msgstr "Εμφάνιση εικονιδίου «Προσωπικός φάκελος»" #: ../ubuntutweak/tweaks/icons.py:41 msgid "Show \"Trash\" icon" msgstr "Εμφάνιση εικονιδίου «Απορρίμματα»" #: ../ubuntutweak/tweaks/icons.py:48 msgid "Show \"Network Servers\" icon" msgstr "Εμφάνιση εικονιδίου «Δίκτυο»" #: ../ubuntutweak/tweaks/icons.py:80 ../ubuntutweak/gui/treeviews.py:89 msgid "Rename" msgstr "Μετονομασία" #: ../ubuntutweak/tweaks/icons.py:111 msgid "Desktop Icons" msgstr "Εικονίδια επιφάνειας εργασίας" #: ../ubuntutweak/tweaks/icons.py:112 msgid "Rename and toggle visibilty of desktop icons" msgstr "" "Μετονομασία και αλλαγή της ορατότητας των εικονιδίων στην επιφάνεια εργασίας" #: ../ubuntutweak/tweaks/icons.py:117 msgid "Show desktop icons:" msgstr "Εμφάνιση εικονιδίων στην επιφάνεια εργασίας" #: ../ubuntutweak/tweaks/icons.py:118 msgid "Show mounted volumes" msgstr "Εμφάνιση προσαρτημένων τόμων" #: ../ubuntutweak/tweaks/icons.py:119 msgid "Show contents of \"Home Folder\"" msgstr "Εμφάνιση περιεχομένων προσωπικού φακέλου" #: ../ubuntutweak/tweaks/icons.py:151 msgid "Note: switch off this option will make the desktop unclickable" msgstr "" "Σημείωση: η απενεργοποίηση της λειτουργίας αυτής θα καταργήσει τη δυνατότητα " "κλικ στην επιφάνεια εργασίας" #: ../ubuntutweak/tweaks/theme.py:37 msgid "Theme" msgstr "Θέμα" #: ../ubuntutweak/tweaks/theme.py:38 msgid "Set the gtk theme, icon theme, cursor theme and others" msgstr "" "Ορίστε το θέμα gtk, το θέμα των εικονιδίων, το θέμα του δρομέα ποντικιού και " "άλλα" #: ../ubuntutweak/tweaks/theme.py:42 ../ubuntutweak/tweaks/loginsettings.py:47 msgid "Icon theme:" msgstr "Θέμα εικονιδίων:" #: ../ubuntutweak/tweaks/theme.py:43 ../ubuntutweak/tweaks/loginsettings.py:46 msgid "Gtk theme:" msgstr "Θέμα Gtk:" #: ../ubuntutweak/tweaks/theme.py:44 msgid "Cursor theme:" msgstr "Θέμα δρομέα ποντικιού:" #: ../ubuntutweak/tweaks/theme.py:45 msgid "Window theme:" msgstr "Θέμα παραθύρων:" #: ../ubuntutweak/tweaks/theme.py:102 msgid "Install theme:" msgstr "Εγκατάσταση θέματος" #: ../ubuntutweak/tweaks/theme.py:112 msgid "Theme file is invalid" msgstr "Το αρχείο θέματος δεν είναι έγκυρο" #: ../ubuntutweak/tweaks/theme.py:118 #, python-format msgid "\"%s\" installed successfully" msgstr "Το \"%s\" εγκαταστάθηκε με επιτυχία" #: ../ubuntutweak/tweaks/theme.py:119 #, python-format msgid "Would you like to set your icon theme to \"%s\" immediatelly?" msgstr "Θα θέλατε να ορίσετε το θέμα εικονιδίων σας σε \"%s\" αμέσως;" #: ../ubuntutweak/tweaks/window.py:32 msgid "Window" msgstr "Παράθυρο" #: ../ubuntutweak/tweaks/window.py:33 msgid "Manage Window Manager settings" msgstr "Διαχείριση ρυθμίσεων του Διαχειριστή παραθύρων" #: ../ubuntutweak/tweaks/window.py:50 msgid "Window control button position:" msgstr "Θέση κουμπιών ελέγχων παραθύρων:" #: ../ubuntutweak/tweaks/window.py:51 msgid "\"Close\" button only" msgstr "Μόνο κουμπί «Κλείσιμο»" #: ../ubuntutweak/tweaks/window.py:52 msgid "Titlebar mouse wheel action:" msgstr "Ενέργεια ροδέλας ποντικιού για τη μπάρα τίτλου:" #: ../ubuntutweak/tweaks/window.py:53 msgid "Titlebar double-click action:" msgstr "Ενέργεια διπλού κλικ για τη μπάρα τίτλου:" #: ../ubuntutweak/tweaks/window.py:54 msgid "Titlebar middle-click action:" msgstr "Ενέργεια μεσαίου κλικ για τη μπάρα τίτλου:" #: ../ubuntutweak/tweaks/window.py:55 msgid "Titlebar right-click action:" msgstr "Ενέργεια δεξιού κλικ για τη μπάρα τίτλου:" #: ../ubuntutweak/tweaks/window.py:80 ../ubuntutweak/tweaks/window.py:88 #: ../ubuntutweak/tweaks/window.py:101 ../ubuntutweak/tweaks/window.py:116 #: ../ubuntutweak/tweaks/window.py:137 ../ubuntutweak/tweaks/window.py:145 #: ../ubuntutweak/tweaks/window.py:156 ../ubuntutweak/tweaks/window.py:167 msgid "Roll up" msgstr "Δίπλωση πάνω" #: ../ubuntutweak/tweaks/window.py:87 ../ubuntutweak/tweaks/window.py:98 #: ../ubuntutweak/tweaks/window.py:113 ../ubuntutweak/tweaks/window.py:144 #: ../ubuntutweak/tweaks/window.py:155 ../ubuntutweak/tweaks/window.py:166 msgid "Maximize" msgstr "Μεγιστοποίηση" #: ../ubuntutweak/tweaks/window.py:88 ../ubuntutweak/tweaks/window.py:101 #: ../ubuntutweak/tweaks/window.py:116 ../ubuntutweak/tweaks/window.py:145 #: ../ubuntutweak/tweaks/window.py:156 ../ubuntutweak/tweaks/window.py:167 msgid "Minimize" msgstr "Ελαχιστοποίηση" #: ../ubuntutweak/tweaks/window.py:89 ../ubuntutweak/tweaks/window.py:102 #: ../ubuntutweak/tweaks/window.py:117 ../ubuntutweak/tweaks/window.py:146 #: ../ubuntutweak/tweaks/window.py:157 ../ubuntutweak/tweaks/window.py:168 msgid "Lower" msgstr "Βύθιση" #: ../ubuntutweak/tweaks/window.py:89 ../ubuntutweak/tweaks/window.py:102 #: ../ubuntutweak/tweaks/window.py:117 ../ubuntutweak/tweaks/window.py:146 #: ../ubuntutweak/tweaks/window.py:157 ../ubuntutweak/tweaks/window.py:168 msgid "Menu" msgstr "Μενού" #: ../ubuntutweak/tweaks/window.py:99 ../ubuntutweak/tweaks/window.py:114 msgid "Maximize Horizontally" msgstr "Οριζόντια μεγιστοποίηση" #: ../ubuntutweak/tweaks/window.py:100 ../ubuntutweak/tweaks/window.py:115 msgid "Maximize Vertically" msgstr "Κατακόρυφη μεγιστοποίηση" #: ../ubuntutweak/tweaks/nautilus.py:27 msgid "File Manager" msgstr "Διαχειριστής αρχείων" #: ../ubuntutweak/tweaks/nautilus.py:28 msgid "Manage the Nautilus file manager" msgstr "Διαχείριση του Ναυτίλου, διαχειριστή αρχείων" #: ../ubuntutweak/tweaks/nautilus.py:33 msgid "Use the location entry instead of the pathbar" msgstr "Χρήση της καταχώρησης τοποθεσίας αντί της μπάρας διαδρομής" #: ../ubuntutweak/tweaks/nautilus.py:34 msgid "Enable Recursive Search" msgstr "" #: ../ubuntutweak/tweaks/nautilus.py:35 msgid "Automatically mount media:" msgstr "Αυτόματη προσάρτηση των μέσων:" #: ../ubuntutweak/tweaks/nautilus.py:36 msgid "Automatically open a folder:" msgstr "Αυτόματο άνοιγμα ενός φακέλου:" #: ../ubuntutweak/tweaks/nautilus.py:37 msgid "Prompt or autorun/autostart programs:" msgstr "Προτροπή ή αυτόματη εκκίνηση προγραμμάτων:" #: ../ubuntutweak/tweaks/nautilus.py:38 msgid "Thumbnail icon size (pixels):" msgstr "Μέγεθος εικονιδίου μικρογραφιών (εικονοστοιχεία):" #: ../ubuntutweak/tweaks/nautilus.py:39 msgid "Thumbnail cache time (days):" msgstr "Διάρκεια προσωρινής μνήμης μικρογραφιών (ημέρες):" #: ../ubuntutweak/tweaks/nautilus.py:40 msgid "Maximum thumbnail cache size (MB):" msgstr "μέγιστο μέγεθος προσωρινής μνήμης μικρογραφιών (MB):" #: ../ubuntutweak/tweaks/session.py:30 msgid "Session Indicator" msgstr "Δείκτης συνεδρίας" #: ../ubuntutweak/tweaks/session.py:31 msgid "Control your system session releated features" msgstr "Ελέγξτε τα χαρακτηριστικά της συνεδρίας συστήματος" #: ../ubuntutweak/tweaks/session.py:35 msgid "User indicator" msgstr "Δείκτης χρήστη" #: ../ubuntutweak/tweaks/session.py:36 msgid "Disable \"Lock Screen\"" msgstr "Απενεργοποίηση \"Κλειδώματος Οθόνης\"" #: ../ubuntutweak/tweaks/session.py:37 msgid "Show user's real name on the panel" msgstr "Εμφάνιση του πραγματικού ονόματος χρήστη στη μπάρα μενού" #: ../ubuntutweak/tweaks/session.py:38 msgid "Remove the log out item" msgstr "Αφαίρεση του στοιχείου Αποσύνδεση" #: ../ubuntutweak/tweaks/session.py:39 msgid "Remove the shutdown item" msgstr "Αφαίρεση του στοιχείου Τερματισμός" #: ../ubuntutweak/tweaks/session.py:40 msgid "Suppress the dialog to confirm logout and shutdown action" msgstr "" "Καταστολή του διαλόγου επιβεβαίωσης των ενεργειών αποσύνδεσης και τερματισμού" #: ../ubuntutweak/tweaks/session.py:73 msgid "Session indicator:" msgstr "Δείκτης συνεδρίας" #: ../ubuntutweak/tweaks/workspace.py:37 msgid "Show Workspaces" msgstr "Εμφάνιση Χώρων εργασίας" #: ../ubuntutweak/tweaks/workspace.py:38 msgid "Show Windows" msgstr "Εμφάνιση Παραθύρων" #: ../ubuntutweak/tweaks/workspace.py:39 msgid "Show Desktop" msgstr "Εμφάνιση Επιφάνειας εργασίας" #: ../ubuntutweak/tweaks/workspace.py:138 msgid "Workspace" msgstr "Χώρος εργασίας" #: ../ubuntutweak/tweaks/workspace.py:139 msgid "Workspace size and screen edge action settings" msgstr "Ρυθμίσεις χώρων εργασίας και ενεργειών άκρων οθόνης" #: ../ubuntutweak/tweaks/workspace.py:144 msgid "Edge trigger delay (ms):" msgstr "Καθυστέρηση έναυσης ενέργειας άκρης (χιλ. δευτερολέπτου):" #: ../ubuntutweak/tweaks/workspace.py:145 msgid "Horizontal workspace:" msgstr "Οριζόντιοι χώροι εργασίας:" #: ../ubuntutweak/tweaks/workspace.py:146 msgid "Vertical workspace:" msgstr "Κατακόρυφοι χώροι εργασίας:" #: ../ubuntutweak/tweaks/sound.py:29 msgid "Sound" msgstr "Ήχος" #: ../ubuntutweak/tweaks/sound.py:30 msgid "Set the sound theme for Ubuntu" msgstr "Ορίστε το θέμα ήχων του Ubuntu" #: ../ubuntutweak/tweaks/sound.py:34 msgid "Event sounds:" msgstr "Ήχοι συμβάντων:" #: ../ubuntutweak/tweaks/sound.py:35 msgid "Input feedback sounds:" msgstr "Ήχοι ανάδρασης εισαγωγής:" #: ../ubuntutweak/tweaks/sound.py:36 msgid "Sound theme:" msgstr "Θέμα ήχου:" #: ../ubuntutweak/tweaks/sound.py:37 ../ubuntutweak/tweaks/loginsettings.py:45 msgid "Play login sound:" msgstr "Αναπαραγωγή ήχου σύνδεσης:" #: ../ubuntutweak/tweaks/misc.py:32 msgid "Miscellaneous" msgstr "Διάφορα" #: ../ubuntutweak/tweaks/misc.py:33 msgid "Set the cursor timeout, menus and buttons icons" msgstr "Ρύθμιση του δρομέα, των μενού και των εικονιδίων κουμπιών" #: ../ubuntutweak/tweaks/misc.py:37 msgid "Natural Scrolling" msgstr "Φυσική Κύλιση" #: ../ubuntutweak/tweaks/misc.py:38 msgid "Menus have icons" msgstr "Οι κατάλογοι έχουν εικονίδια" #: ../ubuntutweak/tweaks/misc.py:39 msgid "Buttons have icons" msgstr "Τα κουμπιά έχουν εικονίδια" #: ../ubuntutweak/tweaks/misc.py:40 msgid "Show Input Method menu in the context menu" msgstr "Εμφάνιση του μενού Μεθόδου Εισαγωγής στο μενού περιεχομένων" #: ../ubuntutweak/tweaks/misc.py:41 msgid "Show Unicode Control Character menu in the context menu" msgstr "Εμφάνιση χαρακτήρα ελέγχου Unicode στο μενού περιεχομένων" #: ../ubuntutweak/tweaks/misc.py:42 msgid "Disable printing" msgstr "Απενεργοποίηση εκτύπωσης" #: ../ubuntutweak/tweaks/misc.py:43 msgid "Disable printer settings" msgstr "Απενεργοποίηση ρυθμίσεων του εκτυπωτή" #: ../ubuntutweak/tweaks/misc.py:44 msgid "Disable save to disk" msgstr "Απενεργοποίηση αποθήκευσης στο δίσκο" #: ../ubuntutweak/tweaks/misc.py:45 msgid "Disable \"Fast User Switching\"" msgstr "Απενεργοποίηση της \"Γρήγορης εναλλαγής χρηστών\"" #: ../ubuntutweak/tweaks/misc.py:46 msgid "Cursor blink:" msgstr "Αναβόσβημα δρομέα:" #: ../ubuntutweak/tweaks/misc.py:47 msgid "Overlay scrollbars:" msgstr "Επικαλυπτόμενες μπάρες κύλισης:" #: ../ubuntutweak/tweaks/misc.py:48 msgid "Cursor blink time:" msgstr "Χρόνος αναβοσβησίματος δρομέα:" #: ../ubuntutweak/tweaks/misc.py:49 msgid "Cursor blink timeout:" msgstr "Χρόνος αναμονής αναβοσβησίματος δρομέα:" #: ../ubuntutweak/tweaks/misc.py:61 ../ubuntutweak/tweaks/unity.py:189 msgid "Note: you may need to log out to take effect" msgstr "Σημείωση: μπορεί να χρειαστεί αποσύνδεση για να ισχύσει η αλλαγή" #: ../ubuntutweak/tweaks/misc.py:73 msgid "Normal" msgstr "Κανονικό" #: ../ubuntutweak/tweaks/misc.py:74 msgid "Auto" msgstr "Αυτόματα" #: ../ubuntutweak/tweaks/misc.py:75 msgid "Show Overlay" msgstr "Εμφάνιση επικάλυψης" #: ../ubuntutweak/tweaks/misc.py:76 msgid "Never Show Overlay" msgstr "Να μην εμφανίζεται η επικάλυψη" #: ../ubuntutweak/tweaks/loginsettings.py:37 msgid "Login Settings" msgstr "Ρυθμίσεις Σύνδεσης" #: ../ubuntutweak/tweaks/loginsettings.py:38 msgid "Control the appearance and behaviour of your login screen" msgstr "Ρυθμίστε την εμφάνιση και συμπεριφορά της οθόνης εισόδου σας" #: ../ubuntutweak/tweaks/loginsettings.py:43 msgid "Guest account:" msgstr "Λογαριασμός επισκέπτη:" #: ../ubuntutweak/tweaks/loginsettings.py:44 msgid "Draw grid:" msgstr "Σχεδίαση πλέγματος:" #: ../ubuntutweak/tweaks/loginsettings.py:62 msgid "Note: you may need to reboot to take effect" msgstr "Σημείωση: μπορεί να χρειαστεί επανεκκίνηση για να ισχύσει η αλλαγή" #: ../ubuntutweak/tweaks/loginsettings.py:136 msgid "Choose a new logo image" msgstr "Επιλέξτε μια νέα εικόνα λογότυπου" #: ../ubuntutweak/tweaks/loginsettings.py:142 msgid "All images (*.PNG)" msgstr "Όλες οι εικόνες (*.PNG)" #: ../ubuntutweak/tweaks/loginsettings.py:189 msgid "Choose a new background image" msgstr "Επίλεξε μια νέα εικόνα φόντου" #: ../ubuntutweak/tweaks/loginsettings.py:195 msgid "All images" msgstr "Όλες οι εικόνες" #: ../ubuntutweak/tweaks/fonts.py:27 msgid "Fonts" msgstr "Γραμματοσειρές" #: ../ubuntutweak/tweaks/fonts.py:28 msgid "Fonts Settings" msgstr "Ρυθμίσεις Γραμματοσειρών" #: ../ubuntutweak/tweaks/fonts.py:33 msgid "Text scaling factor:" msgstr "Συντελεστής κλιμάκωσης κειμένου:" #: ../ubuntutweak/tweaks/fonts.py:34 msgid "Default font:" msgstr "Προεπιλεγμένη γραμματοσειρά:" #: ../ubuntutweak/tweaks/fonts.py:35 msgid "Monospace font:" msgstr "Γραμματοσειρά σταθερού πλάτους:" #: ../ubuntutweak/tweaks/fonts.py:36 msgid "Document font:" msgstr "Γραμματοσειρά εγγράφων:" #: ../ubuntutweak/tweaks/fonts.py:37 msgid "Window title bar font:" msgstr "Γραμματοσειρά μπάρας τίτλου παραθύρου:" #: ../ubuntutweak/tweaks/fonts.py:38 msgid "Hinting:" msgstr "Υπόδειξη:" #: ../ubuntutweak/tweaks/fonts.py:39 msgid "Antialiasing:" msgstr "Εξομάλυνση:" #: ../ubuntutweak/tweaks/fonts.py:78 msgid "Desktop font:" msgstr "Γραμματοσειρά επιφανείας εργασίας:" #: ../ubuntutweak/tweaks/fonts.py:99 msgid "No hinting" msgstr "Χωρίς υπόδειξη" #: ../ubuntutweak/tweaks/fonts.py:100 msgid "Basic" msgstr "Βασικό" #: ../ubuntutweak/tweaks/fonts.py:101 msgid "Moderate" msgstr "Μέτριο" #: ../ubuntutweak/tweaks/fonts.py:102 msgid "Maximum" msgstr "Μέγιστο" #: ../ubuntutweak/tweaks/fonts.py:109 msgid "No antialiasing" msgstr "Χωρίς εξομάλυνση" #: ../ubuntutweak/tweaks/fonts.py:110 msgid "Standard grayscale antialiasing" msgstr "Εξομάλυνση κλίμακας του γκρι" #: ../ubuntutweak/tweaks/fonts.py:111 msgid "Subpixel antialiasing (LCD screens only)" msgstr "Εξομάλυνση subpixel (μόνο για οθόνες LCD)" #: ../ubuntutweak/tweaks/unity.py:37 msgid "Tweak the powerful Unity desktop" msgstr "Προσαρμόστε το δυνατό περιβάλλον εργασίας Unity" #: ../ubuntutweak/tweaks/unity.py:42 msgid "HUD:" msgstr "HUD:" #: ../ubuntutweak/tweaks/unity.py:43 msgid "Shortcut hints overlay:" msgstr "Επικάλυψη υποδείξεων συντομεύσεων πληκτρολογίου:" #: ../ubuntutweak/tweaks/unity.py:44 msgid "Launcher icon size:" msgstr "Μέγεθος εικονιδίων εκκινητή:" #: ../ubuntutweak/tweaks/unity.py:45 msgid "Launcher opacity:" msgstr "Αδιαφάνεια εκκινητή:" #: ../ubuntutweak/tweaks/unity.py:46 msgid "Web Apps integration:" msgstr "Ενσωμάτωση διαδικτυακών εφαρμογών:" #: ../ubuntutweak/tweaks/unity.py:47 msgid "Launcher hide mode:" msgstr "Λειτουργία απόκρυψης του εκκινητή:" #: ../ubuntutweak/tweaks/unity.py:48 msgid "Launcher icon backlight:" msgstr "Οπίσθιο φωτισμός εικονιδίων εκκινητή:" #: ../ubuntutweak/tweaks/unity.py:49 msgid "Launcher show devices:" msgstr "Εμφάνιση συσκευών στον εκκινητή:" #: ../ubuntutweak/tweaks/unity.py:50 msgid "\"Show desktop\" icon:" msgstr "Εικονίδιο «Εμφάνιση επιφανείας εργασίας»:" #: ../ubuntutweak/tweaks/unity.py:51 msgid "Launcher click to minimize app:" msgstr "" #: ../ubuntutweak/tweaks/unity.py:52 msgid "Disable \"Show Desktop\" in the switcher:" msgstr "Απενεργοποίηση του «Εμφάνιση επιφανείας εργασίας» στον εκκινητή:" #: ../ubuntutweak/tweaks/unity.py:53 msgid "Dash size:" msgstr "Μέγεθος του Dash:" #: ../ubuntutweak/tweaks/unity.py:54 msgid "Blur type:" msgstr "Τύπος θολώματος:" #: ../ubuntutweak/tweaks/unity.py:55 msgid "Panel opacity:" msgstr "Αδιαφάνεια της μπάρας μενού:" #: ../ubuntutweak/tweaks/unity.py:56 msgid "Panel opacity for maximized windows:" msgstr "Αδιαφάνεια της μπάρας μενού για μεγιστοποιημένα παράθυρα:" #: ../ubuntutweak/tweaks/unity.py:57 msgid "Super key:" msgstr "Πλήκτρο Super:" #: ../ubuntutweak/tweaks/unity.py:58 msgid "Full screen dash:" msgstr "Dash πλήρους οθόνης:" #: ../ubuntutweak/tweaks/unity.py:59 msgid "Compositing manager:" msgstr "Διαχειριστής σύνθεσης επ. εργασίας:" #: ../ubuntutweak/tweaks/unity.py:60 msgid "Number of workspaces:" msgstr "Αριθμός χώρων εργασίας:" #: ../ubuntutweak/tweaks/unity.py:68 ../ubuntutweak/tweaks/unity.py:213 msgid "Auto Hide" msgstr "Αυτόματη απόκρυψη" #: ../ubuntutweak/tweaks/unity.py:133 msgid "Backlight Always On" msgstr "Οπίσθιος φωτισμός πάντοτε ενεργοποιημένος" #: ../ubuntutweak/tweaks/unity.py:134 msgid "Backlight Toggles" msgstr "Εναλλαγή οπίσθιου φωτισμού." #: ../ubuntutweak/tweaks/unity.py:135 msgid "Backlight Always Off" msgstr "Οπίσθιος φωτισμός πάντοτε απενεργοποιημένος" #: ../ubuntutweak/tweaks/unity.py:136 msgid "Edge Illumination Toggles" msgstr "Εναλλαγή φωτισμού άκρων" #: ../ubuntutweak/tweaks/unity.py:137 msgid "Backlight and Edge Illumination Toggles" msgstr "Εναλλαγή οπίσθιου φωτισμού και φωτισμού άκρων" #: ../ubuntutweak/tweaks/unity.py:146 msgid "Only Mounted" msgstr "Μόνο προσαρτημένους" #: ../ubuntutweak/tweaks/unity.py:147 msgid "Always" msgstr "Πάντοτε" #: ../ubuntutweak/tweaks/unity.py:156 msgid "Automatic" msgstr "Αυτόματα" #: ../ubuntutweak/tweaks/unity.py:156 msgid "Netbook" msgstr "Netbook" #: ../ubuntutweak/tweaks/unity.py:163 msgid "No blur" msgstr "Χωρίς θόλωση" #: ../ubuntutweak/tweaks/unity.py:164 msgid "Static blur" msgstr "Στατική θόλωση" #: ../ubuntutweak/tweaks/unity.py:165 msgid "Active blur" msgstr "Ενεργή θόλωση" #: ../ubuntutweak/tweaks/unity.py:214 msgid "Intellihide" msgstr "Έξυπνη απόκρυψη" #: ../ubuntutweak/tweaks/workarounds.py:33 msgid "Workarounds" msgstr "Εναλλακτικοί τρόποι" #: ../ubuntutweak/tweaks/workarounds.py:34 msgid "The workarounds to fix some problems" msgstr "Οι εναλλακτικοί τρόποι για να διορθώσετε κάποια προβλήματα" #: ../ubuntutweak/tweaks/workarounds.py:38 msgid "Fix the appearance of themes when granted root privileges:" msgstr "" "Διόρθωση της εμφάνισης θεμάτων όταν έχουν χορηγηθεί δικαιώματα υπερχρήστη:" #: ../ubuntutweak/tweaks/workarounds.py:39 msgid "Auto detect text encoding for Simplified Chinese in Gedit:" msgstr "" "Αυτόματη αναγνώριση κωδικοποίησης για απλοποιημένα κινεζικά στον Gedit:" #: ../ubuntutweak/tweaks/lovewallpaperhd.py:20 msgid "Love Wallpaper HD" msgstr "Love Wallpaper HD" #: ../ubuntutweak/tweaks/lovewallpaperhd.py:21 msgid "Browse online gallery and find your wallpaper" msgstr "" "Περιηγηθείτε στη διαδικτυακή συλλογή και βρείτε το wallpaper που σας αρέσει" #: ../ubuntutweak/tweaks/lovewallpaperhd.py:48 msgid "I'm Feeling Lucky" msgstr "Αισθάνομαι τυχερός" #: ../ubuntutweak/tweaks/lovewallpaperhd.py:91 msgid "Downloading Wallpaper" msgstr "Λήψη wallpaper" #: ../ubuntutweak/apps/__init__.py:106 msgid "Uninstall" msgstr "Απεγκατάσταση" #: ../ubuntutweak/apps/__init__.py:107 msgid "Update" msgstr "Ενημέρωση" #: ../ubuntutweak/apps/__init__.py:108 msgid "Installing" msgstr "Γίνεται εγκατάσταση" #: ../ubuntutweak/apps/__init__.py:109 msgid "Uninstalling" msgstr "Γίνεται απεγκατάσταση" #: ../ubuntutweak/apps/__init__.py:110 msgid "Updating" msgstr "Γίνεται ενημέρωση" #: ../ubuntutweak/apps/__init__.py:111 msgid "Not Available" msgstr "Μη διαθέσιμο" #: ../ubuntutweak/apps/__init__.py:226 #, python-format msgid "\"%s\" is enabled now, Please click the update button to update %s" msgstr "" "Τώρα το \"%s\" είναι ενεργοποιημένο. Παρακαλώ κάντε κλικ στο κουμπί " "ενημέρωσης για να ενημερώσετε το %s" #: ../ubuntutweak/clips/userinfo.py:10 msgid "User Information" msgstr "Πληροφορίες χρήστη" #: ../ubuntutweak/clips/userinfo.py:16 msgid "Current user:" msgstr "Τρέχων χρήστης:" #: ../ubuntutweak/clips/userinfo.py:18 msgid "Home directory:" msgstr "Προσωπικός φάκελος χρήστη:" #: ../ubuntutweak/clips/userinfo.py:20 msgid "Shell:" msgstr "Κέλυφος:" #: ../ubuntutweak/clips/userinfo.py:22 msgid "Language:" msgstr "Γλώσσα:" #: ../ubuntutweak/clips/hardwareinfo.py:11 msgid "Hardware Information" msgstr "Πληροφορίες υλικού" #: ../ubuntutweak/clips/hardwareinfo.py:32 msgid "CPU:" msgstr "Επεξεργαστής:" #: ../ubuntutweak/clips/hardwareinfo.py:34 msgid "Memory:" msgstr "Μνήμη:" #: ../ubuntutweak/clips/systeminfo.py:11 msgid "Ubuntu Desktop Information" msgstr "Πληροφορίες Ubuntu Desktop" #: ../ubuntutweak/clips/systeminfo.py:17 msgid "Hostname:" msgstr "Όνομα υπολογιστή:" #: ../ubuntutweak/clips/systeminfo.py:19 msgid "Platform:" msgstr "Πλατφόρμα:" #: ../ubuntutweak/clips/systeminfo.py:21 msgid "Distribution:" msgstr "Διανομή:" #: ../ubuntutweak/clips/systeminfo.py:23 msgid "Desktop Environment:" msgstr "Γραφικό Περιβάλλον:" #: ../ubuntutweak/clips/cleanerinfo.py:11 msgid "Your system is clean" msgstr "Το σύστημά σας είναι καθαρό" #: ../ubuntutweak/clips/cleanerinfo.py:19 msgid "Some cache can be cleaned to free your disk space" msgstr "" "Ένα ποσό προσωρινής μνήμης μπορεί να καθαριστεί ώστε να ελευθερωθεί χώρος " "στο δίσκο σας" #: ../ubuntutweak/clips/cleanerinfo.py:21 #, python-format msgid "%s cache packages can be cleaned." msgstr "%s πακέτα προσωρινής μνήμης μπορούν να καθαριστούν." #: ../ubuntutweak/clips/cleanerinfo.py:38 #, python-format msgid "%s thumbnails cache can be cleaned." msgstr "%s προσωρινής μνήμης μικρογραφιών μπορεί να καθαριστεί." #: ../ubuntutweak/clips/cleanerinfo.py:44 msgid "Start Janitor" msgstr "Εκκίνηση καθαριστή" #: ../ubuntutweak/clips/updateinfo.py:13 msgid "Your system is up-to-date" msgstr "Το σύστημα σας είναι ενημερωμένο" #: ../ubuntutweak/clips/updateinfo.py:49 msgid "" "It is unknown when the package information was updated last. Please try " "clicking on the 'Check' button to update the information." msgstr "" "Δεν είναι γνωστό πότε έγινε η τελευταία ανανέωση των πληροφοριών των " "πακέτων. Παρακαλώ δοκιμάστε να πατήσετε το κουμπί 'Έλεγχος' για να " "ανανεώσετε τις πληροφορίες." #: ../ubuntutweak/clips/updateinfo.py:54 #, python-format msgid "" "The package information was last updated %(days_ago)s days ago.\n" "Press the 'Check' button below to check for new software updates." msgstr "" "Οι πληροφορίες πακέτων ενημερώθηκαν πριν %(days_ago)s ημέρες.\n" "Πατήστε το κουμπί 'Έλεγχος' παρακάτω για να ελέγξετε για νέες ενημερώσεις " "λογισμικού." #: ../ubuntutweak/clips/updateinfo.py:59 #, python-format msgid "The package information was last updated %(days_ago)s day ago." msgid_plural "" "The package information was last updated %(days_ago)s days ago." msgstr[0] "" "Οι πληροφορίες των πακέτων ενημερώθηκαν πριν από %(days_ago)s ημέρα." msgstr[1] "" "Οι πληροφορίες των πακέτων ενημερώθηκαν πριν από %(days_ago)s ημέρες." #: ../ubuntutweak/clips/updateinfo.py:63 #, python-format msgid "The package information was last updated %(hours_ago)s hour ago." msgid_plural "" "The package information was last updated %(hours_ago)s hours ago." msgstr[0] "Οι πληροφορίες των πακέτων ενημερώθηκαν πριν %(hours_ago)s ώρα." msgstr[1] "Οι πληροφορίες των πακέτων ενημερώθηκαν πριν %(hours_ago)s ώρες." #: ../ubuntutweak/clips/updateinfo.py:67 msgid "The package information was last updated less than one hour ago." msgstr "" "Η τελευταία ανανέωση των πληροφοριών των πακέτων έγινε λιγότερο από μία ώρα " "πριν." #: ../ubuntutweak/gui/widgets.py:161 #, python-format msgid "Reset setting to default value: %s" msgstr "Επαναφορά ρύθμισης στην προκαθορισμένη τιμή: %s" #: ../ubuntutweak/gui/widgets.py:464 msgid "Please press the new key combination" msgstr "Παρακαλώ πιέστε το νέο συνδυασμό πλήκτρων" #: ../ubuntutweak/gui/widgets.py:516 msgid "Disabled" msgstr "Απενεργοποιημένο" #: ../ubuntutweak/gui/dialogs.py:208 msgid "Could not authenticate" msgstr "Αδυναμία πιστοποίησης" #: ../ubuntutweak/gui/dialogs.py:209 msgid "An unexpected error has occurred." msgstr "Συνέβη ένα απρόσμενο σφάλμα" #: ../ubuntutweak/gui/dialogs.py:215 msgid "Service hasn't initialized yet" msgstr "Η υπηρεσία δεν έχει ξεκινήσει ακόμα." #: ../ubuntutweak/gui/dialogs.py:216 msgid "You need to restart your computer." msgstr "Χρειάζεται να επανεκκινήσετε τον υπολογιστή σας." #: ../ubuntutweak/gui/treeviews.py:85 msgid "Create folder" msgstr "Δημιουργία φακέλου" #: ../ubuntutweak/gui/treeviews.py:93 msgid "Delete" msgstr "Διαγραφή" #: ../ubuntutweak/gui/treeviews.py:115 msgid "Input the dir name" msgstr "Εισάγετε το όνομα του καταλόγου" #: ../ubuntutweak/gui/treeviews.py:139 msgid "Can't rename the root folder" msgstr "Αδυναμία μετονομασίας του φακέλου root." #: ../ubuntutweak/gui/treeviews.py:156 msgid "Can't delete the root folder" msgstr "Αδυναμία διαγραφής του φακέλου root" #: ../ubuntutweak/gui/treeviews.py:170 msgid "" "Can't rename!\n" "\n" "There are files in it!" msgstr "" "Η μετονομασία δεν είναι δυνατή!\n" "\n" "Υπάρχουν αρχεία μέσα!" #: ../ubuntutweak/main.py:264 msgid "Results" msgstr "Αποτελέσματα" #: ../ubuntutweak/main.py:272 #, python-format msgid "Your filter \"<b>%s</b>\" does not match any items." msgstr "" "Το φίλτρο \"<b>%s</b>\" που θέσατε, δεν ταιριάζει με κανένα αντικείμενο." #: ../ubuntutweak/main.py:400 msgid "Please wait a moment..." msgstr "Παρακαλώ περιμένετε..." #: ../ubuntutweak/main.py:509 #, python-format msgid "No module named \"%s\"" msgstr "Δεν υπάρχει άρθρωμα με όνομα \"%s\"" #: ../ubuntutweak/main.py:510 msgid "Please ensure you have entered the correct module name." msgstr "Παρακαλώ βεβαιωθείτε πως έχετε εισάγει το σωστό όνομα αρθρώματος" #: ../ubuntutweak/main.py:568 msgid "Computer Janitor" msgstr "Καθαριστής υπολογιστή" #: ../ubuntutweak/main.py:569 msgid "Clean up a system so it's more like a freshly installed one" msgstr "" "Καθαρίστε το σύστημα έτσι ώστε να μοιάζει σαν μια φρέσκια εγκατάσταση" #: ../ubuntutweak/utils/__init__.py:40 #, python-format msgid "%(size)d byte" msgid_plural "%(size)d bytes" msgstr[0] "%(size)d byte" msgstr[1] "%(size)d bytes" #: ../ubuntutweak/utils/__init__.py:42 #, python-format msgid "%.1f KB" msgstr "%.1f KB" #: ../ubuntutweak/utils/__init__.py:44 #, python-format msgid "%.1f MB" msgstr "%.1f MB" #: ../ubuntutweak/utils/__init__.py:45 #, python-format msgid "%.1f GB" msgstr "%.1f GB" #: ../ubuntutweak/preferences.py:67 msgid "Auto scan:" msgstr "Αυτόματη σάρωση:" #: ../ubuntutweak/preferences.py:163 msgid "Choose a clip extension" msgstr "Επιλέξτε μια επέκταση στοιχείου" #: ../ubuntutweak/preferences.py:168 #, python-format msgid "\"%s\" is not a Clip Extension!" msgstr "Το \"%s\" δεν είναι επέκταση στοιχείου!" #: ../ubuntutweak/preferences.py:171 msgid "Choose a Tweaks Extension" msgstr "Επιλέξτε μια Επέκταση Προσαρμογών" #: ../ubuntutweak/preferences.py:176 #, python-format msgid "\"%s\" is not a Tweaks Extension!" msgstr "Το \"%s\" δεν είναι μια Επέκταση Προσαρμογών!" #: ../ubuntutweak/preferences.py:179 msgid "Choose a Admins Extension" msgstr "Επιλέξτε μια επέκταση συντήρησης" #: ../ubuntutweak/preferences.py:184 #, python-format msgid "\"%s\" is not a Admins Extension!" msgstr "Το \"%s\" δεν είναι επέκταση συντήρησης!" #: ../ubuntutweak/preferences.py:187 msgid "Choose a Janitor Extension" msgstr "Επιλέξτε μια επέκταση καθαριστή" #: ../ubuntutweak/preferences.py:192 #, python-format msgid "\"%s\" is not a Janitor Extension!" msgstr "Το \"%s\" δεν είναι επέκταση καθαριστή!" #: ../ubuntutweak/preferences.py:201 msgid "Ubuntu Tweak Extension (*.py, *.tar.gz)" msgstr "Επέκταση Ubuntu Tweak (*.py, *.tar.gz)" #: ../ubuntutweak/preferences.py:232 msgid "Would you like to remove it then install again?" msgstr "Θα θέλατε να το αφαιρέσετε και στη συνέχεια να το εγκαταστήστε ξανά;" #: ../ubuntutweak/preferences.py:233 #, python-format msgid "\"%s\" has already installed" msgstr "Το \"%s\" έχει ήδη εγκατασταθεί" #~ msgid "Show Widgets" #~ msgstr "Εμφάνιση Προγραμματιδίων" #~ msgid "Dodge Window" #~ msgstr "Αποφυγή παραθύρου:" #~ msgid "Dodge Active Window" #~ msgstr "Αποφυγή ενεργού παράθυρου"
{ "pile_set_name": "Github" }
<?xml version="1.0" ?> <xliff version="1.0"> <file orginal="global" source-language="en" datatype="plaintext"> <body> <trans-unit id="1"> <source>an english sentence</source> <target>une autre phrase en français</target> </trans-unit> </body> </file> </xliff>
{ "pile_set_name": "Github" }
/* * Copyright (C) 2010 Alexandre Courbot * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "core/tatoeba/TatoebaEntry.h" TatoebaEntry::TatoebaEntry(int id) : Entry(TATOEBAENTRY_GLOBALID, id) { }
{ "pile_set_name": "Github" }
using System.Text; namespace Dasync.Serialization.DasyncJson { internal static class Encodings { public static readonly Encoding UTF8 = new UTF8Encoding(encoderShouldEmitUTF8Identifier: false); } }
{ "pile_set_name": "Github" }
char freq 011 8.1 012 6.1 040 11.9 ! 0.2 " 1.5 % 0.6 & 0.4 ' 0.4 ( 2.9 ) 2.9 * 0.8 + 1.3 , 1.3 - 0.4 . 0.6 / 1.0 0 2.5 1 1.9 2 0.6 3 0.2 7 0.4 8 0.2 ; 3.8 < 0.8 = 2.7 > 0.2 [ 1.5 \ 0.8 ] 1.5 a 3.1 c 4.4 e 2.3 f 6.0 g 1.3 h 1.0 i 5.0 l 1.0 m 0.2 n 3.3 o 2.1 p 1.0 q 0.4 r 4.2 s 0.6 t 3.8 u 1.2 v 0.6 w 0.2 { 0.6 } 0.6
{ "pile_set_name": "Github" }
var express = require('express'), _ = require('underscore'), Q = require('q'), http = require('http'), partial = require('express-partials'), flash = require('connect-flash'), historyDao = require('./lib/historyDao'), tracker = require('./lib/tracker'), Project = require('./lib/Project'); var methodOverride = require('method-override'); var morgan = require('morgan'); var bodyParser = require('body-parser'); var cookieParser = require('cookie-parser'); var cookieSession = require('cookie-session'); var basicAuth = require('basic-auth-connect'); // command line parameters var argv = require('optimist') .options('port', { alias: 'p', default: 1337 }) .options('password', { alias: 'pass', default: 'admin' }) // TODO: get r.js optimizer going again and run on startup (according to NODE_ENV) .options('optimized', { alias: 'opt', default: false }) .argv; var version = require('../package.json').version; var port = process.env.PORT || argv.port; var password = process.env.admin_pass || argv.password; var www_public = '/../public'; var projectDao, issueDao; if (argv.redis) { var client = process.env.REDISTOGO_URL ? require('redis-url').connect(process.env.REDISTOGO_URL) : require('redis').createClient(); var RedisProjectDao = require('./lib/RedisProjectDao'); projectDao = new RedisProjectDao(client); var RedisIssueDao = require('./lib/RedisIssueDao'); issueDao = new RedisIssueDao(client); } else { var db_dir = __dirname + '/../db/'; projectDao = require('./lib/projectDao'); projectDao.init(db_dir); issueDao = require('./lib/issueDao'); issueDao.init(db_dir); } var app = express(); if (app.get('env') === 'development') { console.log('Starting development server'); var lessMiddleware = require('less-middleware'); app.use(lessMiddleware({ debug: true, src: __dirname + '/server', dest: __dirname + '/public' })); } app.set('views', __dirname + '/../views'); app.engine('.html', require('ejs').renderFile); // call our views html app.use(morgan('combined')); app.use(cookieParser()); app.use(cookieSession({ secret: 'nyan cat' })); // for flash messages app.use(express.static(__dirname + www_public)); app.use(bodyParser.urlencoded({ extended: false })); app.use(methodOverride(function (req, res) { if (req.body && typeof req.body === 'object' && '_method' in req.body) { // look in urlencoded POST bodies and delete it var method = req.body._method; delete req.body._method; return method; } })); app.use(partial()); app.use(flash()); var server = http.createServer(app); tracker.init(server, projectDao, issueDao); server.listen(port); // TODO: extract routes elsewhere app.get('/', function (req, res) { projectDao.findAll(function (err, projects) { var listed = [], unlisted = 0; _.each(projects, function (project) { if (!project.deleted) { if (project.unlisted) { unlisted++; } else { listed.push(project); } } }); _.sortBy(listed, function (p) { return p.name; }); res.render('index.html', viewOptions({ projects: listed, unlisted: unlisted })); }); }); app.post('/project', function (req, res) { var name = req.body.projectName; if (!name) { res.json({ error: 'empty' }, 400); return; } else if (!projectDao.isValidName(name)) { res.json({ error: 'invalid' }, 400); return; } projectDao.create(name, !!req.body.unlisted, function (err, project) { if (err) { if (err.message === 'project exists') { var url = '/project/' + Project.slugify(name); res.json({ error: 'exists', url: url }, 409); return; } throw err; } tracker.listen(project); var message = project.unlisted ? "Here's your project. Remember: it's unlisted, so nobody'll find it unless you share the address." : "Here's your project."; req.flash('info', message); res.json({ url: project.url }); }); }); app.get('/project', function (req, res) { res.statusCode = 404; res.end('Nothing to see here. Try /project/<name>'); }); app.get('/project/:slug', function (req, res) { projectDao.find(req.params.slug, function (err, project) { if (project && !project.deleted) { var flash = req.flash('info'); var message = flash.length ? _.first(flash) : null; res.render('project.html', viewOptions({ title: project.name, flash: message, noindex: project.unlisted })); } else if (project && project.deleted) { res.statusCode = 410; // Gone res.end('Project deleted'); } else { res.statusCode = 404; res.end('No such project'); } }); }); app.get('/project/:slug/export', function (req, res) { projectDao.find(req.params.slug, function (err, project) { var filename = project.name + '.json'; res.setHeader('Content-disposition', 'attachment; filename=' + filename); issueDao.load(project, function (err, issues) { res.json(issues); }); }); }); var auth = basicAuth('admin', password); app.get('/admin', auth, function (req, res) { projectDao.findAll(function (err, projects) { Q.all(projects.map(function (project) { return Q.ninvoke(issueDao, 'count', project).then(function (count) { project.issueCount = count; return project; }); })).then(function (projects) { res.render('admin.html', viewOptions({ projects: projects, flash: req.flash(), noindex: true })); }); }); }); app.put('/project/:slug', auth, function (req, res) { projectDao.find(req.params.slug, function (err, original) { var updated = {}; _.each(['unlisted', 'deleted'], function (prop) { var set = req.body[prop] === 'on'; updated[prop] = set; }); projectDao.update(req.params.slug, updated, function (err) { var success = !err; buildAdminFlashMessage(req, original, 'update', success); res.redirect('back'); }); }); }); app.delete('/project/:slug/issues', auth, function (req, res) { projectDao.find(req.params.slug, function (err, project) { issueDao.reset(project, function (err) { historyDao.reset(project); req.flash('info', 'All issues in project \'' + project.name + '\' have been deleted.'); res.redirect('back'); }); }); }); function buildAdminFlashMessage(req, project, action, success) { var type = success ? 'info' : 'error'; var message = success ? 'Project \'' + project.name + '\' has been ' + action + 'd.' : 'Oops, could not ' + action + ' \'' + project.name + '\''; req.flash(type, message); } function viewOptions(options) { return _.extend({}, { version: version }, options); } console.log('Ω v' + version + ' running on port ' + port);
{ "pile_set_name": "Github" }
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers" "${PODS_ROOT}/Headers/BButton" "${PODS_ROOT}/Headers/FMDB" "${PODS_ROOT}/Headers/PayPal-iOS-SDK" $(SDKROOT)/usr/include/libxml2 LIBRARY_SEARCH_PATHS = "$(PODS_ROOT)/PayPal-iOS-SDK/PayPalMobile/" OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers" -isystem "${PODS_ROOT}/Headers/BButton" -isystem "${PODS_ROOT}/Headers/FMDB" -isystem "${PODS_ROOT}/Headers/PayPal-iOS-SDK" OTHER_LDFLAGS = -ObjC -ObjC -lPayPalMobile -lc++ -lsqlite3 -lstdc++ -lxml2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreLocation -framework CoreMedia -framework CoreVideo -framework MessageUI -framework MobileCoreServices -framework OpenGLES -framework QuartzCore -framework Security -framework UIKit PODS_ROOT = ${SRCROOT}/Pods
{ "pile_set_name": "Github" }
/* * Copyright (c) 2011-2020, baomidou ([email protected]). * <p> * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * <p> * https://www.apache.org/licenses/LICENSE-2.0 * <p> * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.baomidou.mybatisplus.test.mysql.type; import com.baomidou.mybatisplus.core.toolkit.StringUtils; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.ibatis.type.BaseTypeHandler; import org.apache.ibatis.type.JdbcType; import java.io.IOException; import java.sql.CallableStatement; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.Map; /** * @author miemie * @since 2019-01-22 */ public class MapTypeHandler extends BaseTypeHandler<Map<?, ?>> { private final ObjectMapper objectMapper = new ObjectMapper(); @Override public void setNonNullParameter(PreparedStatement ps, int i, Map<?, ?> parameter, JdbcType jdbcType) throws SQLException { try { ps.setString(i, objectMapper.writeValueAsString(parameter)); } catch (JsonProcessingException e) { ps.setString(i, null); } } @Override public Map<?, ?> getNullableResult(ResultSet rs, String columnName) throws SQLException { String result = rs.getString(columnName); if (StringUtils.isNotBlank(result)) { try { return objectMapper.readValue(result, Map.class); } catch (IOException e) { return null; } } return null; } @Override public Map<?, ?> getNullableResult(ResultSet rs, int columnIndex) throws SQLException { String result = rs.getString(columnIndex); if (StringUtils.isNotBlank(result)) { try { return objectMapper.readValue(result, Map.class); } catch (IOException e) { return null; } } return null; } @Override public Map<?, ?> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { String result = cs.getString(columnIndex); if (StringUtils.isNotBlank(result)) { try { return objectMapper.readValue(result, Map.class); } catch (IOException e) { return null; } } return null; } }
{ "pile_set_name": "Github" }
#!/bin/sh set -e -x for filename in `${GTDIR}/scripts/findfasta.rb` do gt suffixerator -db ${filename} -suftabuint -lcp -suf -indexname sfx -compressedoutput gt dev sfxmap -esa sfx -compresslcp gt dev sfxmap -esa sfx -compressedesa done
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="utf-8"?> <layout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools"> <data> <import type="android.view.View" /> <import type="com.eventyay.organizer.common.ContextManager" /> <variable name="ticket" type="com.eventyay.organizer.data.ticket.Ticket" /> <variable name="createOrderViewModel" type="com.eventyay.organizer.core.orders.create.CreateOrderViewModel" /> <import type="com.eventyay.organizer.ui.binding.BindingAdapters" /> </data> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:background="?android:attr/selectableItemBackground" android:orientation="vertical"> <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="@dimen/spacing_normal" android:layout_marginLeft="@dimen/spacing_normal" android:layout_marginRight="@dimen/spacing_normal" android:layout_marginTop="@dimen/spacing_normal" android:orientation="horizontal" > <LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:gravity="center_vertical" android:orientation="horizontal"> <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginRight="@dimen/spacing_normal" android:text="@{ createOrderViewModel.getOnSiteTicketQuantity(ticket.id) }" android:layout_marginEnd="@dimen/spacing_normal" /> </LinearLayout> <TextView android:layout_width="@dimen/spacing_zero" android:layout_height="wrap_content" android:layout_weight="4" android:text='@{ticket.name + "\n" + "Maximum of " + ticket.maxOrder + " per Order"}' android:textSize="@dimen/text_size_small" tools:text="Ticket Name" /> <TextView android:layout_width="@dimen/spacing_zero" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="end" android:text='@{ ContextManager.getCurrency() + " " + safeUnbox(ticket.price) }' android:textSize="@dimen/text_size_small" tools:text="Amount" /> </LinearLayout> <View android:id="@+id/divider" android:layout_width="match_parent" android:layout_height="@dimen/spacing_tiniest" android:background="@color/grey_400" /> </LinearLayout> </layout>
{ "pile_set_name": "Github" }
{ "ordering": [ ["A1", "B1", "C1"], ["A2", "B2", "C2"], ["A3", "B3"], ["A4", "B4"] ], "schemaVersion": 2, "version": 1, "namespace": "opentrons", "metadata": { "displayName": "Opentrons 10 Tube Rack with Falcon 4x50 mL, 6x15 mL Conical", "displayCategory": "tubeRack", "displayVolumeUnits": "mL", "tags": [] }, "dimensions": { "xDimension": 127.75, "yDimension": 85.5, "zDimension": 124.35 }, "parameters": { "format": "irregular", "isTiprack": false, "isMagneticModuleCompatible": false, "loadName": "opentrons_10_tuberack_falcon_4x50ml_6x15ml_conical" }, "wells": { "A1": { "totalLiquidVolume": 15000, "diameter": 14.9, "shape": "circular", "depth": 117.5, "x": 13.88, "y": 67.75, "z": 6.85 }, "B1": { "totalLiquidVolume": 15000, "diameter": 14.9, "shape": "circular", "depth": 117.5, "x": 13.88, "y": 42.75, "z": 6.85 }, "C1": { "totalLiquidVolume": 15000, "diameter": 14.9, "shape": "circular", "depth": 117.5, "x": 13.88, "y": 17.75, "z": 6.85 }, "A2": { "totalLiquidVolume": 15000, "diameter": 14.9, "shape": "circular", "depth": 117.5, "x": 38.88, "y": 67.75, "z": 6.85 }, "B2": { "totalLiquidVolume": 15000, "diameter": 14.9, "shape": "circular", "depth": 117.5, "x": 38.88, "y": 42.75, "z": 6.85 }, "C2": { "totalLiquidVolume": 15000, "diameter": 14.9, "shape": "circular", "depth": 117.5, "x": 38.88, "y": 17.75, "z": 6.85 }, "A3": { "totalLiquidVolume": 50000, "diameter": 27.81, "shape": "circular", "depth": 113, "x": 71.38, "y": 60.25, "z": 7.3 }, "B3": { "totalLiquidVolume": 50000, "diameter": 27.81, "shape": "circular", "depth": 113, "x": 71.38, "y": 25.25, "z": 7.3 }, "A4": { "totalLiquidVolume": 50000, "diameter": 27.81, "shape": "circular", "depth": 113, "x": 106.38, "y": 60.25, "z": 7.3 }, "B4": { "totalLiquidVolume": 50000, "diameter": 27.81, "shape": "circular", "depth": 113, "x": 106.38, "y": 25.25, "z": 7.3 } }, "brand": { "brand": "Opentrons", "brandId": [], "links": [ "https://shop.opentrons.com/collections/opentrons-tips/products/tube-rack-set-1" ] }, "groups": [ { "wells": ["A1", "B1", "C1", "A2", "B2", "C2"], "metadata": { "displayName": "Falcon 6x15 mL Conical", "displayCategory": "tubeRack", "wellBottomShape": "v" }, "brand": { "brand": "Falcon", "brandId": ["352095", "352096", "352097", "352099", "352196"], "links": [ "https://ecatalog.corning.com/life-sciences/b2c/US/en/Liquid-Handling/Tubes,-Liquid-Handling/Centrifuge-Tubes/Falcon%C2%AE-Conical-Centrifuge-Tubes/p/falconConicalTubes" ] } }, { "wells": ["A3", "B3", "A4", "B4"], "metadata": { "displayName": "Falcon 4x50 mL Conical", "displayCategory": "tubeRack", "wellBottomShape": "v" }, "brand": { "brand": "Falcon", "brandId": ["352070", "352098"], "links": [ "https://ecatalog.corning.com/life-sciences/b2c/US/en/Liquid-Handling/Tubes,-Liquid-Handling/Centrifuge-Tubes/Falcon%C2%AE-Conical-Centrifuge-Tubes/p/falconConicalTubes" ] } } ], "cornerOffsetFromSlot": { "x": 0, "y": 0, "z": 0 } }
{ "pile_set_name": "Github" }
// // Created by Jake Lin on 12/14/15. // Copyright © 2015 IBAnimatable. All rights reserved. // import UIKit open class DismissSegue: UIStoryboardSegue { open override func perform() { source.dismiss(animated: true, completion: nil) } }
{ "pile_set_name": "Github" }
/* AngelCode Scripting Library Copyright (c) 2003-2016 Andreas Jonsson This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. The original version of this library can be located at: http://www.angelcode.com/angelscript/ Andreas Jonsson [email protected] */ // // as_callfunc_ppc_64.cpp // // These functions handle the actual calling of system functions // // This version is 64 bit PPC specific // #include "as_config.h" #ifndef AS_MAX_PORTABILITY #ifdef AS_PPC_64 #if AS_PTR_SIZE == 2 // TODO: Add support for PPC 64bit platforms with 64bit pointers, for example Linux PPC64 (big endian) and PPC64 (little endian) #error This code has not been prepared for PPC with 64bit pointers. Most likely the ABI is different #else #include "as_callfunc.h" #include "as_scriptengine.h" #include "as_texts.h" #include "as_tokendef.h" #include "as_context.h" #include <stdio.h> #include <stdlib.h> #ifdef __SNC__ #include "ppu_asm_intrinsics.h" #endif BEGIN_AS_NAMESPACE // This part was written and tested by Jeff Slutter // from Reactor Zero, Abril, 2007, for PlayStation 3, which // is a PowerPC 64bit based architecture. Even though it is // 64bit it seems the pointer size is still 32bit. // It still remains to be seen how well this code works // on other PPC platforms, such as XBox 360, GameCube. #define AS_PPC_MAX_ARGS 32 // The array used to send values to the correct places. // Contains a byte of argTypes to indicate the register type to load // or zero if end of arguments // The +1 is for when CallThis (object methods) is used // Extra +1 when returning in memory // Extra +1 in ppcArgsType to ensure zero end-of-args marker // TODO: multithread: The global variables must be removed to make the code thread safe extern "C" { enum argTypes { ppcENDARG = 0, ppcINTARG = 1, ppcFLOATARG = 2, ppcDOUBLEARG = 3, ppcLONGARG = 4 }; static asBYTE ppcArgsType[AS_PPC_MAX_ARGS + 1 + 1 + 1]; static asDWORD ppcArgs[2*AS_PPC_MAX_ARGS + 1 + 1]; } // NOTE: these values are for PowerPC 64 bit. I'm sure things are different for PowerPC 32bit, but I don't have one. // I'm pretty sure that PPC 32bit sets up a stack frame slightly different (only 24 bytes for linkage area for instance) #define PPC_LINKAGE_SIZE (0x30) // how big the PPC linkage area is in a stack frame #define PPC_NUM_REGSTORE (10) // how many registers of the PPC we need to store/restore for ppcFunc64() #define PPC_REGSTORE_SIZE (8*PPC_NUM_REGSTORE) // how many bytes are required for register store/restore #define EXTRA_STACK_SIZE (PPC_LINKAGE_SIZE + PPC_REGSTORE_SIZE) // memory required, not including parameters, for the stack frame #define PPC_STACK_SIZE(numParams) ( -(( ( (((numParams)<8)?8:(numParams))<<3) + EXTRA_STACK_SIZE + 15 ) & ~15) ) // calculates the total stack size needed for ppcFunc64, must pad to 16bytes // This is PowerPC 64 bit specific // Loads all data into the correct places and calls the function. // ppcArgsType is an array containing a byte type (enum argTypes) for each argument. // StackArgSizeInBytes is the size in bytes of the stack frame (takes into account linkage area, etc. must be multiple of 16) extern "C" asQWORD ppcFunc64(const asDWORD* argsPtr, int StackArgSizeInBytes, asDWORD func); asm("" ".text\n" ".align 4\n" ".p2align 4,,15\n" ".globl .ppcFunc64\n" ".ppcFunc64:\n" // function prolog "std %r22, -0x08(%r1)\n" // we need a register other than r0, to store the old stack pointer "mr %r22, %r1\n" // store the old stack pointer, for now (to make storing registers easier) "stdux %r1, %r1, %r4\n" // atomically store and update the stack pointer for the new stack frame (in case of a signal/interrupt) "mflr %r0\n" // get the caller's LR register "std %r0, 0x10(%r22)\n" // store the caller's LR register "std %r23, -0x10(%r22)\n" // "std %r24, -0x18(%r22)\n" // "std %r25, -0x20(%r22)\n" // "std %r26, -0x28(%r22)\n" // "std %r27, -0x30(%r22)\n" // "std %r28, -0x38(%r22)\n" // "std %r29, -0x40(%r22)\n" // "std %r30, -0x48(%r22)\n" // "std %r31, -0x50(%r22)\n" // "std %r3, 0x30(%r22)\n" // save our parameters "std %r4, 0x38(%r22)\n" // "std %r5, 0x40(%r22)\n" // "mr %r31, %r1\n" // functions tend to store the stack pointer here too // initial registers for the function "mr %r29, %r3\n" // (r29) args list "lwz %r27, 0(%r5)\n" // load the function pointer to call. func actually holds the pointer to our function "addi %r26, %r1, 0x30\n" // setup the pointer to the parameter area to the function we're going to call "sub %r0,%r0,%r0\n" // zero out r0 "mr %r23,%r0\n" // zero out r23, which holds the number of used GPR registers "mr %r22,%r0\n" // zero our r22, which holds the number of used float registers // load the global ppcArgsType which holds the types of arguments for each argument "lis %r25, ppcArgsType@ha\n" // load the upper 16 bits of the address to r25 "addi %r25, %r25, ppcArgsType@l\n" // load the lower 16 bits of the address to r25 "subi %r25, %r25, 1\n" // since we increment r25 on its use, we'll pre-decrement it // loop through the arguments "ppcNextArg:\n" "addi %r25, %r25, 1\n" // increment r25, our arg type pointer // switch based on the current argument type (0:end, 1:int, 2:float 3:double) "lbz %r24, 0(%r25)\n" // load the current argument type (it's a byte) "mulli %r24, %r24, 4\n" // our jump table has 4 bytes per case (1 instruction) "lis %r30, ppcTypeSwitch@ha\n" // load the address of the jump table for the switch "addi %r30, %r30, ppcTypeSwitch@l\n" "add %r0, %r30, %r24\n" // offset by our argument type "mtctr %r0\n" // load the jump address into CTR "bctr\n" // jump into the jump table/switch "nop\n" // the jump table/switch based on the current argument type "ppcTypeSwitch:\n" "b ppcArgsEnd\n" "b ppcArgIsInteger\n" "b ppcArgIsFloat\n" "b ppcArgIsDouble\n" "b ppcArgIsLong\n" // when we get here we have finished processing all the arguments // everything is ready to go to call the function "ppcArgsEnd:\n" "mtctr %r27\n" // the function pointer is stored in r27, load that into CTR "bctrl\n" // call the function. We have to do it this way so that the LR gets the proper "nop\n" // return value (the next instruction below). So we have to branch from CTR instead of LR. // when we get here, the function has returned, this is the function epilog "ld %r11,0x00(%r1)\n" // load in the caller's stack pointer "ld %r0,0x10(%r11)\n" // load in the caller's LR "mtlr %r0\n" // restore the caller's LR "ld %r22, -0x08(%r11)\n" // load registers "ld %r23, -0x10(%r11)\n" // "ld %r24, -0x18(%r11)\n" // "ld %r25, -0x20(%r11)\n" // "ld %r26, -0x28(%r11)\n" // "ld %r27, -0x30(%r11)\n" // "ld %r28, -0x38(%r11)\n" // "ld %r29, -0x40(%r11)\n" // "ld %r30, -0x48(%r11)\n" // "ld %r31, -0x50(%r11)\n" // "mr %r1, %r11\n" // restore the caller's SP "blr\n" // return back to the caller "nop\n" // Integer argument (GPR register) "ppcArgIsInteger:\n" "lis %r30,ppcLoadIntReg@ha\n" // load the address to the jump table for integer registers "addi %r30, %r30, ppcLoadIntReg@l\n" "mulli %r0, %r23, 8\n" // each item in the jump table is 2 instructions (8 bytes) "add %r0, %r0, %r30\n" // calculate ppcLoadIntReg[numUsedGPRRegs] "lwz %r30,0(%r29)\n" // load the next argument from the argument list into r30 "cmpwi %r23, 8\n" // we can only load GPR3 through GPR10 (8 registers) "bgt ppcLoadIntRegUpd\n" // if we're beyond 8 GPR registers, we're in the stack, go there "mtctr %r0\n" // load the address of our ppcLoadIntReg jump table (we're below 8 GPR registers) "bctr\n" // load the argument into a GPR register "nop\n" // jump table for GPR registers, for the first 8 GPR arguments "ppcLoadIntReg:\n" "mr %r3,%r30\n" // arg0 (to r3) "b ppcLoadIntRegUpd\n" "mr %r4,%r30\n" // arg1 (to r4) "b ppcLoadIntRegUpd\n" "mr %r5,%r30\n" // arg2 (to r5) "b ppcLoadIntRegUpd\n" "mr %r6,%r30\n" // arg3 (to r6) "b ppcLoadIntRegUpd\n" "mr %r7,%r30\n" // arg4 (to r7) "b ppcLoadIntRegUpd\n" "mr %r8,%r30\n" // arg5 (to r8) "b ppcLoadIntRegUpd\n" "mr %r9,%r30\n" // arg6 (to r9) "b ppcLoadIntRegUpd\n" "mr %r10,%r30\n" // arg7 (to r10) "b ppcLoadIntRegUpd\n" // all GPR arguments still go on the stack "ppcLoadIntRegUpd:\n" "std %r30,0(%r26)\n" // store the argument into the next slot on the stack's argument list "addi %r23, %r23, 1\n" // count a used GPR register "addi %r29, %r29, 4\n" // move to the next argument on the list "addi %r26, %r26, 8\n" // adjust our argument stack pointer for the next "b ppcNextArg\n" // next argument // single Float argument "ppcArgIsFloat:\n" "lis %r30,ppcLoadFloatReg@ha\n" // get the base address of the float register jump table "addi %r30, %r30, ppcLoadFloatReg@l\n" "mulli %r0, %r22 ,8\n" // each jump table entry is 8 bytes "add %r0, %r0, %r30\n" // calculate the offset to ppcLoadFloatReg[numUsedFloatReg] "lfs 0, 0(%r29)\n" // load the next argument as a float into f0 "cmpwi %r22, 13\n" // can't load more than 13 float/double registers "bgt ppcLoadFloatRegUpd\n" // if we're beyond 13 registers, just fall to inserting into the stack "mtctr %r0\n" // jump into the float jump table "bctr\n" "nop\n" // jump table for float registers, for the first 13 float arguments "ppcLoadFloatReg:\n" "fmr 1,0\n" // arg0 (f1) "b ppcLoadFloatRegUpd\n" "fmr 2,0\n" // arg1 (f2) "b ppcLoadFloatRegUpd\n" "fmr 3,0\n" // arg2 (f3) "b ppcLoadFloatRegUpd\n" "fmr 4,0\n" // arg3 (f4) "b ppcLoadFloatRegUpd\n" "fmr 5,0\n" // arg4 (f5) "b ppcLoadFloatRegUpd\n" "fmr 6,0\n" // arg5 (f6) "b ppcLoadFloatRegUpd\n" "fmr 7,0\n" // arg6 (f7) "b ppcLoadFloatRegUpd\n" "fmr 8,0\n" // arg7 (f8) "b ppcLoadFloatRegUpd\n" "fmr 9,0\n" // arg8 (f9) "b ppcLoadFloatRegUpd\n" "fmr 10,0\n" // arg9 (f10) "b ppcLoadFloatRegUpd\n" "fmr 11,0\n" // arg10 (f11) "b ppcLoadFloatRegUpd\n" "fmr 12,0\n" // arg11 (f12) "b ppcLoadFloatRegUpd\n" "fmr 13,0\n" // arg12 (f13) "b ppcLoadFloatRegUpd\n" "nop\n" // all float arguments still go on the stack "ppcLoadFloatRegUpd:\n" "stfs 0, 0x04(%r26)\n" // store, as a single float, f0 (current argument) on to the stack argument list "addi %r23, %r23, 1\n" // a float register eats up a GPR register "addi %r22, %r22, 1\n" // ...and, of course, a float register "addi %r29, %r29, 4\n" // move to the next argument in the list "addi %r26, %r26, 8\n" // move to the next stack slot "b ppcNextArg\n" // on to the next argument "nop\n" // double Float argument "ppcArgIsDouble:\n" "lis %r30, ppcLoadDoubleReg@ha\n" // load the base address of the jump table for double registers "addi %r30, %r30, ppcLoadDoubleReg@l\n" "mulli %r0, %r22, 8\n" // each slot of the jump table is 8 bytes "add %r0, %r0, %r30\n" // calculate ppcLoadDoubleReg[numUsedFloatReg] "lfd 0, 0(%r29)\n" // load the next argument, as a double float, into f0 "cmpwi %r22,13\n" // the first 13 floats must go into float registers also "bgt ppcLoadDoubleRegUpd\n" // if we're beyond 13, then just put on to the stack "mtctr %r0\n" // we're under 13, first load our register "bctr\n" // jump into the jump table "nop\n" // jump table for float registers, for the first 13 float arguments "ppcLoadDoubleReg:\n" "fmr 1,0\n" // arg0 (f1) "b ppcLoadDoubleRegUpd\n" "fmr 2,0\n" // arg1 (f2) "b ppcLoadDoubleRegUpd\n" "fmr 3,0\n" // arg2 (f3) "b ppcLoadDoubleRegUpd\n" "fmr 4,0\n" // arg3 (f4) "b ppcLoadDoubleRegUpd\n" "fmr 5,0\n" // arg4 (f5) "b ppcLoadDoubleRegUpd\n" "fmr 6,0\n" // arg5 (f6) "b ppcLoadDoubleRegUpd\n" "fmr 7,0\n" // arg6 (f7) "b ppcLoadDoubleRegUpd\n" "fmr 8,0\n" // arg7 (f8) "b ppcLoadDoubleRegUpd\n" "fmr 9,0\n" // arg8 (f9) "b ppcLoadDoubleRegUpd\n" "fmr 10,0\n" // arg9 (f10) "b ppcLoadDoubleRegUpd\n" "fmr 11,0\n" // arg10 (f11) "b ppcLoadDoubleRegUpd\n" "fmr 12,0\n" // arg11 (f12) "b ppcLoadDoubleRegUpd\n" "fmr 13,0\n" // arg12 (f13) "b ppcLoadDoubleRegUpd\n" "nop\n" // all float arguments still go on the stack "ppcLoadDoubleRegUpd:\n" "stfd 0,0(%r26)\n" // store f0, as a double, into the argument list on the stack "addi %r23, %r23, 1\n" // a double float eats up one GPR "addi %r22, %r22, 1\n" // ...and, of course, a float "addi %r29, %r29, 8\n" // increment to our next argument we need to process (8 bytes for the 64bit float) "addi %r26, %r26, 8\n" // increment to the next slot on the argument list on the stack (8 bytes) "b ppcNextArg\n" // on to the next argument "nop\n" // Long (64 bit int) argument "ppcArgIsLong:\n" "lis %r30,ppcLoadLongReg@ha\n" // load the address to the jump table for integer64 "addi %r30, %r30, ppcLoadLongReg@l\n" "mulli %r0, %r23, 8\n" // each item in the jump table is 2 instructions (8 bytes) "add %r0, %r0, %r30\n" // calculate ppcLoadLongReg[numUsedGPRRegs] "ld %r30,0(%r29)\n" // load the next argument from the argument list into r30 "cmpwi %r23, 8\n" // we can only load GPR3 through GPR10 (8 registers) "bgt ppcLoadLongRegUpd\n" // if we're beyond 8 GPR registers, we're in the stack, go there "mtctr %r0\n" // load the address of our ppcLoadLongReg jump table (we're below 8 GPR registers) "bctr\n" // load the argument into a GPR register "nop\n" // jump table for GPR registers, for the first 8 GPR arguments "ppcLoadLongReg:\n" "mr %r3,%r30\n" // arg0 (to r3) "b ppcLoadLongRegUpd\n" "mr %r4,%r30\n" // arg1 (to r4) "b ppcLoadLongRegUpd\n" "mr %r5,%r30\n" // arg2 (to r5) "b ppcLoadLongRegUpd\n" "mr %r6,%r30\n" // arg3 (to r6) "b ppcLoadLongRegUpd\n" "mr %r7,%r30\n" // arg4 (to r7) "b ppcLoadLongRegUpd\n" "mr %r8,%r30\n" // arg5 (to r8) "b ppcLoadLongRegUpd\n" "mr %r9,%r30\n" // arg6 (to r9) "b ppcLoadLongRegUpd\n" "mr %r10,%r30\n" // arg7 (to r10) "b ppcLoadLongRegUpd\n" // all GPR arguments still go on the stack "ppcLoadLongRegUpd:\n" "std %r30,0(%r26)\n" // store the argument into the next slot on the stack's argument list "addi %r23, %r23, 1\n" // count a used GPR register "addi %r29, %r29, 8\n" // move to the next argument on the list "addi %r26, %r26, 8\n" // adjust our argument stack pointer for the next "b ppcNextArg\n" // next argument ); static asDWORD GetReturnedFloat(void) { asDWORD f; #ifdef __SNC__ __stfs( __freg(1), 0, (void*)&f); #else asm(" stfs 1, %0\n" : "=m"(f)); #endif return f; } static asQWORD GetReturnedDouble(void) { asQWORD f; #ifdef __SNC__ __stfd( __freg(1), 0, (void*)&f); #else asm(" stfd 1, %0\n" : "=m"(f)); #endif return f; } // puts the arguments in the correct place in the stack array. See comments above. static void stackArgs( const asDWORD *args, const asBYTE *argsType, int &numIntArgs, int &numFloatArgs, int &numDoubleArgs, int &numLongArgs ) { // initialize our offset based on any already placed arguments int i; int argWordPos = numIntArgs + numFloatArgs + (numDoubleArgs*2) + (numLongArgs*2); int typeOffset = numIntArgs + numFloatArgs + numDoubleArgs + numLongArgs; int typeIndex; for( i = 0, typeIndex = 0; ; i++, typeIndex++ ) { // store the type ppcArgsType[typeOffset++] = argsType[typeIndex]; if( argsType[typeIndex] == ppcENDARG ) break; switch( argsType[typeIndex] ) { case ppcFLOATARG: { // stow float ppcArgs[argWordPos] = args[i]; // it's just a bit copy numFloatArgs++; argWordPos++; //add one word } break; case ppcDOUBLEARG: { // stow double memcpy( &ppcArgs[argWordPos], &args[i], sizeof(double) ); // we have to do this because of alignment numDoubleArgs++; argWordPos+=2; //add two words i++;//doubles take up 2 argument slots } break; case ppcINTARG: { // stow register ppcArgs[argWordPos] = args[i]; numIntArgs++; argWordPos++; } break; case ppcLONGARG: { // stow long memcpy( &ppcArgs[argWordPos], &args[i], 8 ); // for alignment purposes, we use memcpy numLongArgs++; argWordPos += 2; // add two words i++; // longs take up 2 argument slots } break; } } // close off the argument list (if we have max args we won't close it off until here) ppcArgsType[typeOffset] = ppcENDARG; } static asQWORD CallCDeclFunction(const asDWORD* pArgs, const asBYTE *pArgsType, int argSize, asDWORD func, void *retInMemory) { int baseArgCount = 0; if( retInMemory ) { // the first argument is the 'return in memory' pointer ppcArgs[0] = (asDWORD)retInMemory; ppcArgsType[0] = ppcINTARG; ppcArgsType[1] = ppcENDARG; baseArgCount = 1; } // put the arguments in the correct places in the ppcArgs array int numTotalArgs = baseArgCount; if( argSize > 0 ) { int intArgs = baseArgCount, floatArgs = 0, doubleArgs = 0, longArgs = 0; stackArgs( pArgs, pArgsType, intArgs, floatArgs, doubleArgs, longArgs ); numTotalArgs = intArgs + floatArgs + doubleArgs + longArgs; } else { // no arguments, cap the type list ppcArgsType[baseArgCount] = ppcENDARG; } // call the function with the arguments return ppcFunc64( ppcArgs, PPC_STACK_SIZE(numTotalArgs), func ); } // This function is identical to CallCDeclFunction, with the only difference that // the value in the first parameter is the object (unless we are returning in memory) static asQWORD CallThisCallFunction(const void *obj, const asDWORD* pArgs, const asBYTE *pArgsType, int argSize, asDWORD func, void *retInMemory ) { int baseArgCount = 0; if( retInMemory ) { // the first argument is the 'return in memory' pointer ppcArgs[0] = (asDWORD)retInMemory; ppcArgsType[0] = ppcINTARG; ppcArgsType[1] = ppcENDARG; baseArgCount = 1; } // the first argument is the 'this' of the object ppcArgs[baseArgCount] = (asDWORD)obj; ppcArgsType[baseArgCount++] = ppcINTARG; ppcArgsType[baseArgCount] = ppcENDARG; // put the arguments in the correct places in the ppcArgs array int numTotalArgs = baseArgCount; if( argSize > 0 ) { int intArgs = baseArgCount, floatArgs = 0, doubleArgs = 0, longArgs = 0; stackArgs( pArgs, pArgsType, intArgs, floatArgs, doubleArgs, longArgs ); numTotalArgs = intArgs + floatArgs + doubleArgs + longArgs; } // call the function with the arguments return ppcFunc64( ppcArgs, PPC_STACK_SIZE(numTotalArgs), func); } // This function is identical to CallCDeclFunction, with the only difference that // the value in the last parameter is the object // NOTE: on PPC the order for the args is reversed static asQWORD CallThisCallFunction_objLast(const void *obj, const asDWORD* pArgs, const asBYTE *pArgsType, int argSize, asDWORD func, void *retInMemory) { UNUSED_VAR(argSize); int baseArgCount = 0; if( retInMemory ) { // the first argument is the 'return in memory' pointer ppcArgs[0] = (asDWORD)retInMemory; ppcArgsType[0] = ppcINTARG; ppcArgsType[1] = ppcENDARG; baseArgCount = 1; } // stack any of the arguments int intArgs = baseArgCount, floatArgs = 0, doubleArgs = 0, longArgs = 0; stackArgs( pArgs, pArgsType, intArgs, floatArgs, doubleArgs, longArgs ); int numTotalArgs = intArgs + floatArgs + doubleArgs; // can we fit the object in at the end? if( numTotalArgs < AS_PPC_MAX_ARGS ) { // put the object pointer at the end int argPos = intArgs + floatArgs + (doubleArgs * 2) + (longArgs *2); ppcArgs[argPos] = (asDWORD)obj; ppcArgsType[numTotalArgs++] = ppcINTARG; ppcArgsType[numTotalArgs] = ppcENDARG; } // call the function with the arguments return ppcFunc64( ppcArgs, PPC_STACK_SIZE(numTotalArgs), func ); } // returns true if the given parameter is a 'variable argument' inline bool IsVariableArgument( asCDataType type ) { return (type.GetTokenType() == ttQuestion) ? true : false; } asQWORD CallSystemFunctionNative(asCContext *context, asCScriptFunction *descr, void *obj, asDWORD *args, void *retPointer, asQWORD &/*retQW2*/, void */*secondObject*/) { // TODO: PPC 64 does not yet support THISCALL_OBJFIRST/LAST // use a working array of types, we'll configure the final one in stackArgs asBYTE argsType[AS_PPC_MAX_ARGS + 1 + 1 + 1]; memset( argsType, 0, sizeof(argsType)); asCScriptEngine *engine = context->m_engine; asSSystemFunctionInterface *sysFunc = descr->sysFuncIntf; int callConv = sysFunc->callConv; asQWORD retQW = 0; void *func = (void*)sysFunc->func; int paramSize = sysFunc->paramSize; asDWORD *vftable = NULL; int a; // convert the parameters that are < 4 bytes from little endian to big endian int argDwordOffset = 0; int totalArgumentCount = 0; for( a = 0; a < (int)descr->parameterTypes.GetLength(); ++a ) { // get the size for the parameter int numBytes = descr->parameterTypes[a].GetSizeInMemoryBytes(); ++totalArgumentCount; // is this a variable argument? // for variable arguments, the typeID will always follow...but we know it is 4 bytes // so we can skip that parameter automatically. bool isVarArg = IsVariableArgument( descr->parameterTypes[a] ); if( isVarArg ) { ++totalArgumentCount; } if( numBytes >= 4 || descr->parameterTypes[a].IsReference() || descr->parameterTypes[a].IsObjectHandle() ) { // DWORD or larger parameter --- no flipping needed argDwordOffset += descr->parameterTypes[a].GetSizeOnStackDWords(); } else { // flip asASSERT( numBytes == 1 || numBytes == 2 ); switch( numBytes ) { case 1: { volatile asBYTE *bPtr = (asBYTE*)ARG_DW(args[argDwordOffset]); asBYTE t = bPtr[0]; bPtr[0] = bPtr[3]; bPtr[3] = t; t = bPtr[1]; bPtr[1] = bPtr[2]; bPtr[2] = t; } break; case 2: { volatile asWORD *wPtr = (asWORD*)ARG_DW(args[argDwordOffset]); asWORD t = wPtr[0]; wPtr[0] = wPtr[1]; wPtr[1] = t; } break; } ++argDwordOffset; } if( isVarArg ) { // skip the implicit typeID ++argDwordOffset; } } asASSERT( totalArgumentCount <= AS_PPC_MAX_ARGS ); // mark all float/double/int arguments int argIndex = 0; for( a = 0; a < (int)descr->parameterTypes.GetLength(); ++a, ++argIndex ) { // get the base type argsType[argIndex] = ppcINTARG; if( descr->parameterTypes[a].IsFloatType() && !descr->parameterTypes[a].IsReference() ) { argsType[argIndex] = ppcFLOATARG; } if( descr->parameterTypes[a].IsDoubleType() && !descr->parameterTypes[a].IsReference() ) { argsType[argIndex] = ppcDOUBLEARG; } if( descr->parameterTypes[a].GetSizeOnStackDWords() == 2 && !descr->parameterTypes[a].IsDoubleType() && !descr->parameterTypes[a].IsReference() ) { argsType[argIndex] = ppcLONGARG; } // if it is a variable argument, account for the typeID if( IsVariableArgument(descr->parameterTypes[a]) ) { // implicitly add another parameter (AFTER the parameter above), for the TypeID argsType[++argIndex] = ppcINTARG; } } asASSERT( argIndex == totalArgumentCount ); asDWORD paramBuffer[64]; if( sysFunc->takesObjByVal ) { paramSize = 0; int spos = 0; int dpos = 1; for( asUINT n = 0; n < descr->parameterTypes.GetLength(); n++ ) { if( descr->parameterTypes[n].IsObject() && !descr->parameterTypes[n].IsObjectHandle() && !descr->parameterTypes[n].IsReference() && !(descr->parameterTypes[n].GetTypeInfo()->flags & asOBJ_APP_ARRAY) ) { #ifdef COMPLEX_OBJS_PASSED_BY_REF if( descr->parameterTypes[n].GetTypeInfo()->flags & COMPLEX_MASK ) { paramBuffer[dpos++] = args[spos++]; ++paramSize; } else #endif { // NOTE: we may have to do endian flipping here // Copy the object's memory to the buffer memcpy( &paramBuffer[dpos], *(void**)(args+spos), descr->parameterTypes[n].GetSizeInMemoryBytes() ); // Delete the original memory engine->CallFree( *(char**)(args+spos) ); spos++; dpos += descr->parameterTypes[n].GetSizeInMemoryDWords(); paramSize += descr->parameterTypes[n].GetSizeInMemoryDWords(); } } else { // Copy the value directly paramBuffer[dpos++] = args[spos++]; if( descr->parameterTypes[n].GetSizeOnStackDWords() > 1 ) { paramBuffer[dpos++] = args[spos++]; } paramSize += descr->parameterTypes[n].GetSizeOnStackDWords(); } // if this was a variable argument parameter, then account for the implicit typeID if( IsVariableArgument( descr->parameterTypes[n] ) ) { // the TypeID is just a DWORD paramBuffer[dpos++] = args[spos++]; ++paramSize; } } // Keep a free location at the beginning args = &paramBuffer[1]; } // one last verification to make sure things are how we expect switch( callConv ) { case ICC_CDECL: case ICC_CDECL_RETURNINMEM: case ICC_STDCALL: case ICC_STDCALL_RETURNINMEM: retQW = CallCDeclFunction( args, argsType, paramSize, (asDWORD)func, retPointer ); break; case ICC_THISCALL: case ICC_THISCALL_RETURNINMEM: retQW = CallThisCallFunction(obj, args, argsType, paramSize, (asDWORD)func, retPointer ); break; case ICC_VIRTUAL_THISCALL: case ICC_VIRTUAL_THISCALL_RETURNINMEM: // Get virtual function table from the object pointer vftable = *(asDWORD**)obj; retQW = CallThisCallFunction( obj, args, argsType, paramSize, vftable[asDWORD(func)>>2], retPointer ); break; case ICC_CDECL_OBJLAST: case ICC_CDECL_OBJLAST_RETURNINMEM: retQW = CallThisCallFunction_objLast( obj, args, argsType, paramSize, (asDWORD)func, retPointer ); break; case ICC_CDECL_OBJFIRST: case ICC_CDECL_OBJFIRST_RETURNINMEM: retQW = CallThisCallFunction( obj, args, argsType, paramSize, (asDWORD)func, retPointer ); break; default: context->SetInternalException(TXT_INVALID_CALLING_CONVENTION); } if( sysFunc->hostReturnFloat ) { // If the return is a float value we need to get the value from the FP register if( sysFunc->hostReturnSize == 1 ) *(asDWORD*)&retQW = GetReturnedFloat(); else retQW = GetReturnedDouble(); } else if( sysFunc->hostReturnSize == 1 ) { // Move the bits to the higher value to compensate for the adjustment that the caller does retQW <<= 32; } return retQW; } END_AS_NAMESPACE #endif // AS_PTR_SIZE == 2 #endif // AS_PPC_64 #endif // AS_MAX_PORTABILITY
{ "pile_set_name": "Github" }
polygon 1 1.538614E+01 4.079721E+01 1.538863E+01 4.080013E+01 1.539366E+01 4.080527E+01 1.539406E+01 4.080552E+01 1.539471E+01 4.080580E+01 1.539518E+01 4.080594E+01 1.539959E+01 4.080720E+01 1.540028E+01 4.080736E+01 1.540091E+01 4.080719E+01 1.540599E+01 4.080646E+01 1.541438E+01 4.080683E+01 1.541767E+01 4.080702E+01 1.542968E+01 4.080868E+01 1.543010E+01 4.080880E+01 1.543235E+01 4.080975E+01 1.543833E+01 4.081226E+01 1.543977E+01 4.081294E+01 1.545236E+01 4.081895E+01 1.546779E+01 4.083040E+01 1.547319E+01 4.083487E+01 1.547206E+01 4.082303E+01 1.547118E+01 4.082245E+01 1.546787E+01 4.082022E+01 1.546789E+01 4.081966E+01 1.546846E+01 4.081943E+01 1.546920E+01 4.081921E+01 1.547037E+01 4.081905E+01 1.547085E+01 4.081901E+01 1.547137E+01 4.081897E+01 1.547313E+01 4.081887E+01 1.547504E+01 4.081876E+01 1.547555E+01 4.081872E+01 1.547756E+01 4.081806E+01 1.547823E+01 4.081782E+01 1.547897E+01 4.081751E+01 1.548111E+01 4.081655E+01 1.548165E+01 4.081626E+01 1.548265E+01 4.081547E+01 1.548327E+01 4.081461E+01 1.548354E+01 4.081422E+01 1.548375E+01 4.081386E+01 1.548394E+01 4.081350E+01 1.548410E+01 4.081318E+01 1.548429E+01 4.081278E+01 1.548798E+01 4.080467E+01 1.548810E+01 4.080438E+01 1.548824E+01 4.080364E+01 1.548373E+01 4.080382E+01 1.547992E+01 4.080376E+01 1.547908E+01 4.080374E+01 1.547753E+01 4.080364E+01 1.547701E+01 4.080360E+01 1.546929E+01 4.079714E+01 1.546516E+01 4.079169E+01 1.546355E+01 4.078531E+01 1.546279E+01 4.077819E+01 1.546294E+01 4.077782E+01 1.546325E+01 4.077707E+01 1.546336E+01 4.077666E+01 1.546346E+01 4.077590E+01 1.546353E+01 4.077163E+01 1.545636E+01 4.076951E+01 1.545585E+01 4.076939E+01 1.545533E+01 4.076945E+01 1.545472E+01 4.076975E+01 1.545436E+01 4.077001E+01 1.545425E+01 4.077038E+01 1.545435E+01 4.077064E+01 1.545465E+01 4.077093E+01 1.545472E+01 4.077129E+01 1.545392E+01 4.077205E+01 1.545120E+01 4.077458E+01 1.544929E+01 4.077497E+01 1.544662E+01 4.077525E+01 1.544476E+01 4.077523E+01 1.544105E+01 4.077446E+01 1.542514E+01 4.077132E+01 1.542084E+01 4.076495E+01 1.542052E+01 4.076466E+01 1.542021E+01 4.076443E+01 1.541989E+01 4.076424E+01 1.541842E+01 4.076403E+01 1.539725E+01 4.076584E+01 1.539349E+01 4.076677E+01 1.539305E+01 4.076691E+01 1.539275E+01 4.076705E+01 1.539221E+01 4.076754E+01 1.539207E+01 4.076781E+01 1.539199E+01 4.076805E+01 1.539111E+01 4.076725E+01 1.539132E+01 4.076763E+01 1.539108E+01 4.076831E+01 1.539003E+01 4.076914E+01 1.538923E+01 4.076932E+01 1.538887E+01 4.076978E+01 1.538829E+01 4.077024E+01 1.538712E+01 4.077026E+01 1.538651E+01 4.077008E+01 1.538631E+01 4.077093E+01 1.538581E+01 4.077176E+01 1.538520E+01 4.077241E+01 1.538504E+01 4.077316E+01 1.538510E+01 4.077384E+01 1.538498E+01 4.077482E+01 1.538486E+01 4.077563E+01 1.538444E+01 4.077666E+01 1.538387E+01 4.077734E+01 1.538266E+01 4.077765E+01 1.538134E+01 4.077806E+01 1.538081E+01 4.077865E+01 1.538039E+01 4.077971E+01 1.538040E+01 4.078058E+01 1.538066E+01 4.078120E+01 1.538075E+01 4.078139E+01 1.538134E+01 4.078167E+01 1.538227E+01 4.078214E+01 1.538291E+01 4.078298E+01 1.538323E+01 4.078358E+01 1.538349E+01 4.078414E+01 1.538410E+01 4.078460E+01 1.538447E+01 4.078504E+01 1.538454E+01 4.078571E+01 1.538440E+01 4.078623E+01 1.538432E+01 4.078693E+01 1.538440E+01 4.078777E+01 1.538452E+01 4.078862E+01 1.538492E+01 4.078950E+01 1.538517E+01 4.079019E+01 1.538533E+01 4.079087E+01 1.538556E+01 4.079153E+01 1.538608E+01 4.079226E+01 1.538674E+01 4.079286E+01 1.538770E+01 4.079346E+01 1.538836E+01 4.079416E+01 1.538841E+01 4.079493E+01 1.538829E+01 4.079539E+01 1.538754E+01 4.079603E+01 1.538696E+01 4.079642E+01 1.538662E+01 4.079699E+01 1.538614E+01 4.079721E+01 END END
{ "pile_set_name": "Github" }
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0"> <class>PSAwidget</class> <widget class="QWidget" name="PSAwidget"> <property name="geometry"> <rect> <x>0</x> <y>0</y> <width>400</width> <height>120</height> </rect> </property> <property name="minimumSize"> <size> <width>400</width> <height>120</height> </size> </property> <property name="maximumSize"> <size> <width>400</width> <height>120</height> </size> </property> <property name="windowTitle"> <string notr="true"/> </property> <property name="styleSheet"> <string notr="true">#sWidget { background-color: #FFFFFF; } #lTitle { font-family: &quot;Lato&quot;; font-size: 14px; color: #333333; } #lDesc { font-family: &quot;Lato&quot;; font-size: 12px; color: #666666; } #bImage { border: none; } #bMore { font-family: Lato; font-size: 14px; border: 1px solid rgba(0,191, 165, 30%); border-radius: 3px; color: #ffffff; padding: 7px 12px 7px 12px; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 rgba(0, 204, 176, 1), stop: 1 rgba(0, 172,149,1)); } #bMore:hover { border: 1px solid rgba(0,191, 165, 80%); } #bDismiss { font-family: Lato; font-size: 14px; border: 1px solid rgba(0, 0, 0, 5%); border-radius: 3px; color: #333333; padding: 7px 12px 7px 12px; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #fafafa); } #bDismiss::hover { border: 1px solid rgba(0, 0, 0, 10%); } #bDismiss::pressed { font-family: Lato; font-size: 14px; border: 1px solid rgba(0, 0, 0, 5%); border-radius: 3px; color: #333333; padding: 7px 12px 7px 12px; background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #ffffff, stop: 1 #fafafa); }</string> </property> <layout class="QHBoxLayout" name="horizontalLayout_4"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QStackedWidget" name="sWidget"> <property name="lineWidth"> <number>0</number> </property> <property name="currentIndex"> <number>0</number> </property> <widget class="QWidget" name="pPSA"> <layout class="QHBoxLayout" name="horizontalLayout_3"> <property name="spacing"> <number>0</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QWidget" name="wContainer" native="true"> <property name="minimumSize"> <size> <width>400</width> <height>120</height> </size> </property> <property name="maximumSize"> <size> <width>400</width> <height>120</height> </size> </property> <layout class="QHBoxLayout" name="horizontalLayout_2"> <property name="spacing"> <number>16</number> </property> <property name="leftMargin"> <number>14</number> </property> <property name="topMargin"> <number>10</number> </property> <property name="rightMargin"> <number>14</number> </property> <property name="bottomMargin"> <number>8</number> </property> <item> <widget class="QWidget" name="wImage" native="true"> <layout class="QVBoxLayout" name="verticalLayout_2"> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QPushButton" name="bImage"> <property name="minimumSize"> <size> <width>64</width> <height>64</height> </size> </property> <property name="maximumSize"> <size> <width>64</width> <height>64</height> </size> </property> <property name="text"> <string/> </property> <property name="iconSize"> <size> <width>64</width> <height>64</height> </size> </property> </widget> </item> <item> <spacer name="verticalSpacer"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>20</width> <height>0</height> </size> </property> </spacer> </item> </layout> </widget> </item> <item> <widget class="QWidget" name="wMessage" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> <width>300</width> <height>0</height> </size> </property> <layout class="QVBoxLayout" name="verticalLayout"> <property name="spacing"> <number>6</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QLabel" name="lTitle"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Minimum"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> <property name="minimumSize"> <size> <width>300</width> <height>18</height> </size> </property> <property name="maximumSize"> <size> <width>16777215</width> <height>18</height> </size> </property> <property name="text"> <string/> </property> </widget> </item> <item> <widget class="ElidedLabel" name="lDesc"> <property name="minimumSize"> <size> <width>0</width> <height>30</height> </size> </property> <property name="maximumSize"> <size> <width>16777215</width> <height>30</height> </size> </property> <property name="frameShape"> <enum>QFrame::NoFrame</enum> </property> <property name="frameShadow"> <enum>QFrame::Plain</enum> </property> <property name="lineWidth"> <number>0</number> </property> </widget> </item> <item> <widget class="QWidget" name="wButtons" native="true"> <property name="minimumSize"> <size> <width>0</width> <height>0</height> </size> </property> <property name="maximumSize"> <size> <width>16777215</width> <height>33</height> </size> </property> <layout class="QHBoxLayout" name="horizontalLayout"> <property name="spacing"> <number>6</number> </property> <property name="leftMargin"> <number>0</number> </property> <property name="topMargin"> <number>0</number> </property> <property name="rightMargin"> <number>0</number> </property> <property name="bottomMargin"> <number>0</number> </property> <item> <widget class="QPushButton" name="bMore"> <property name="minimumSize"> <size> <width>0</width> <height>33</height> </size> </property> <property name="maximumSize"> <size> <width>16777215</width> <height>33</height> </size> </property> <property name="text"> <string/> </property> </widget> </item> <item> <widget class="QPushButton" name="bDismiss"> <property name="minimumSize"> <size> <width>0</width> <height>33</height> </size> </property> <property name="maximumSize"> <size> <width>16777215</width> <height>33</height> </size> </property> <property name="text"> <string>Dismiss</string> </property> </widget> </item> <item> <spacer name="horizontalSpacer"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> <property name="sizeHint" stdset="0"> <size> <width>40</width> <height>0</height> </size> </property> </spacer> </item> </layout> </widget> </item> </layout> </widget> </item> </layout> </widget> </item> </layout> </widget> <widget class="QWidget" name="page_2"/> </widget> </item> </layout> </widget> <customwidgets> <customwidget> <class>ElidedLabel</class> <extends>QFrame</extends> <header location="global">ElidedLabel.h</header> <container>1</container> </customwidget> </customwidgets> <resources/> <connections/> </ui>
{ "pile_set_name": "Github" }
package example class FilenameWithSpaces/*<=example.FilenameWithSpaces#*/
{ "pile_set_name": "Github" }
/* Copyright The Kubernetes Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ // Code generated by informer-gen. DO NOT EDIT. package v1beta1 import ( internalinterfaces "k8s.io/client-go/informers/internalinterfaces" ) // Interface provides access to all the informers in this group version. type Interface interface { // ClusterRoles returns a ClusterRoleInformer. ClusterRoles() ClusterRoleInformer // ClusterRoleBindings returns a ClusterRoleBindingInformer. ClusterRoleBindings() ClusterRoleBindingInformer // Roles returns a RoleInformer. Roles() RoleInformer // RoleBindings returns a RoleBindingInformer. RoleBindings() RoleBindingInformer } type version struct { factory internalinterfaces.SharedInformerFactory namespace string tweakListOptions internalinterfaces.TweakListOptionsFunc } // New returns a new Interface. func New(f internalinterfaces.SharedInformerFactory, namespace string, tweakListOptions internalinterfaces.TweakListOptionsFunc) Interface { return &version{factory: f, namespace: namespace, tweakListOptions: tweakListOptions} } // ClusterRoles returns a ClusterRoleInformer. func (v *version) ClusterRoles() ClusterRoleInformer { return &clusterRoleInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // ClusterRoleBindings returns a ClusterRoleBindingInformer. func (v *version) ClusterRoleBindings() ClusterRoleBindingInformer { return &clusterRoleBindingInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } // Roles returns a RoleInformer. func (v *version) Roles() RoleInformer { return &roleInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} } // RoleBindings returns a RoleBindingInformer. func (v *version) RoleBindings() RoleBindingInformer { return &roleBindingInformer{factory: v.factory, namespace: v.namespace, tweakListOptions: v.tweakListOptions} }
{ "pile_set_name": "Github" }
// SPDX-License-Identifier: GPL-2.0-only /* * Copyright (C) 2016 Rafał Miłecki <[email protected]> */ #include <linux/clk-provider.h> #include <linux/err.h> #include <linux/io.h> #include <linux/mfd/syscon.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/regmap.h> #include <linux/slab.h> #define PMU_XTAL_FREQ_RATIO 0x66c #define XTAL_ALP_PER_4ILP 0x00001fff #define XTAL_CTL_EN 0x80000000 #define PMU_SLOW_CLK_PERIOD 0x6dc struct bcm53573_ilp { struct clk_hw hw; struct regmap *regmap; }; static int bcm53573_ilp_enable(struct clk_hw *hw) { struct bcm53573_ilp *ilp = container_of(hw, struct bcm53573_ilp, hw); regmap_write(ilp->regmap, PMU_SLOW_CLK_PERIOD, 0x10199); regmap_write(ilp->regmap, 0x674, 0x10000); return 0; } static void bcm53573_ilp_disable(struct clk_hw *hw) { struct bcm53573_ilp *ilp = container_of(hw, struct bcm53573_ilp, hw); regmap_write(ilp->regmap, PMU_SLOW_CLK_PERIOD, 0); regmap_write(ilp->regmap, 0x674, 0); } static unsigned long bcm53573_ilp_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { struct bcm53573_ilp *ilp = container_of(hw, struct bcm53573_ilp, hw); struct regmap *regmap = ilp->regmap; u32 last_val, cur_val; int sum = 0, num = 0, loop_num = 0; int avg; /* Enable measurement */ regmap_write(regmap, PMU_XTAL_FREQ_RATIO, XTAL_CTL_EN); /* Read initial value */ regmap_read(regmap, PMU_XTAL_FREQ_RATIO, &last_val); last_val &= XTAL_ALP_PER_4ILP; /* * At minimum we should loop for a bit to let hardware do the * measurement. This isn't very accurate however, so for a better * precision lets try getting 20 different values for and use average. */ while (num < 20) { regmap_read(regmap, PMU_XTAL_FREQ_RATIO, &cur_val); cur_val &= XTAL_ALP_PER_4ILP; if (cur_val != last_val) { /* Got different value, use it */ sum += cur_val; num++; loop_num = 0; last_val = cur_val; } else if (++loop_num > 5000) { /* Same value over and over, give up */ sum += cur_val; num++; break; } cpu_relax(); } /* Disable measurement to save power */ regmap_write(regmap, PMU_XTAL_FREQ_RATIO, 0x0); avg = sum / num; return parent_rate * 4 / avg; } static const struct clk_ops bcm53573_ilp_clk_ops = { .enable = bcm53573_ilp_enable, .disable = bcm53573_ilp_disable, .recalc_rate = bcm53573_ilp_recalc_rate, }; static void bcm53573_ilp_init(struct device_node *np) { struct bcm53573_ilp *ilp; struct clk_init_data init = { }; const char *parent_name; int err; ilp = kzalloc(sizeof(*ilp), GFP_KERNEL); if (!ilp) return; parent_name = of_clk_get_parent_name(np, 0); if (!parent_name) { err = -ENOENT; goto err_free_ilp; } ilp->regmap = syscon_node_to_regmap(of_get_parent(np)); if (IS_ERR(ilp->regmap)) { err = PTR_ERR(ilp->regmap); goto err_free_ilp; } init.name = np->name; init.ops = &bcm53573_ilp_clk_ops; init.parent_names = &parent_name; init.num_parents = 1; ilp->hw.init = &init; err = clk_hw_register(NULL, &ilp->hw); if (err) goto err_free_ilp; err = of_clk_add_hw_provider(np, of_clk_hw_simple_get, &ilp->hw); if (err) goto err_clk_hw_unregister; return; err_clk_hw_unregister: clk_hw_unregister(&ilp->hw); err_free_ilp: kfree(ilp); pr_err("Failed to init ILP clock: %d\n", err); } /* We need it very early for arch code, before device model gets ready */ CLK_OF_DECLARE(bcm53573_ilp_clk, "brcm,bcm53573-ilp", bcm53573_ilp_init);
{ "pile_set_name": "Github" }
# Using Istio to Improve End-to-End Security > Secure by default service to service communications 作者:Istio团队 原文地址:https://istio.io/blog/2017/0.1-auth.html Conventional network security approaches fail to address security threats to distributed applications deployed in dynamic production environments. Today, we describe how Istio Auth enables enterprises to transform their security posture from just protecting the edge to consistently securing all inter-service communications deep within their applications. With Istio Auth, developers and operators can protect services with sensitive data against unauthorized insider access and they can achieve this without any changes to the application code! Istio Auth is the security component of the broader [Istio platform]({{home}}/). It incorporates the learnings of securing millions of microservice endpoints in Google’s production environment. ## Background Modern application architectures are increasingly based on shared services that are deployed and scaled dynamically on cloud platforms. Traditional network edge security (e.g. firewall) is too coarse-grained and allows access from unintended clients. An example of a security risk is stolen authentication tokens that can be replayed from another client. This is a major risk for companies with sensitive data that are concerned about insider threats. Other network security approaches like IP whitelists have to be statically defined, are hard to manage at scale, and are unsuitable for dynamic production environments. Thus, security administrators need a tool that enables them to consistently, and by default, secure all communication between services across diverse production environments. ## Solution: strong service identity and authentication Google has, over the years, developed architecture and technology to uniformly secure millions of microservice endpoints in its production environment against external attacks and insider threats. Key security principles include trusting the endpoints and not the network, strong mutual authentication based on service identity and service level authorization. Istio Auth is based on the same principles. The version 0.1 release of Istio Auth runs on Kubernetes and provides the following features: * Strong identity assertion between services * Access control to limit the identities that can access a service (and its data) * Automatic encryption of data in transit * Management of keys and certificates at scale Istio Auth is based on industry standards like mutual TLS and X.509. Furthermore, Google is actively contributing to an open, community-driven service security framework called [SPIFFE](https://spiffe.io/). As the [SPIFFE](https://spiffe.io/) specifications mature, we intend for Istio Auth to become a reference implementation of the same. The diagram below provides an overview of the Istio Auth service authentication architecture on Kubernetes. ![Istio Auth Overview](https://istio.io/blog/2017/img/istio_auth_overview.svg)The above diagram illustrates three key security features: ### Strong identity Istio Auth uses [Kubernetes service accounts](https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/) to identify who the service runs as. The identity is used to establish trust and define service level access policies. The identity is assigned at service deployment time and encoded in the SAN (Subject Alternative Name) field of an X.509 certificate. Using a service account as the identity has the following advantages: * Administrators can configure who has access to a Service Account by using the [RBAC](https://kubernetes.io/docs/admin/authorization/rbac/) feature introduced in Kubernetes 1.6 * Flexibility to identify a human user, a service, or a group of services * Stability of the service identity for dynamically placed and auto-scaled workloads ### Communication security Service-to-service communication is tunneled through high performance client side and server side [Envoy](https://envoyproxy.github.io/envoy/) proxies. The communication between the proxies is secured using mutual TLS. The benefit of using mutual TLS is that the service identity is not expressed as a bearer token that can be stolen or replayed from another source. Istio Auth also introduces the concept of Secure Naming to protect from a server spoofing attacks - the client side proxy verifies that the authenticated server's service account is allowed to run the named service. ### Key management and distribution Istio Auth provides a per-cluster CA (Certificate Authority) and automated key & certificate management. In this context, Istio Auth: * Generates a key and certificate pair for each service account. * Distributes keys and certificates to the appropriate pods using [Kubernetes Secrets](https://kubernetes.io/docs/concepts/configuration/secret/). * Rotates keys and certificates periodically. * Revokes a specific key and certificate pair when necessary (future). The following diagram explains the end to end Istio Auth authentication workflow on Kubernetes: ![Istio Auth Workflow](https://istio.io/blog/2017/img/istio_auth_workflow.svg) Istio Auth is part of the broader security story for containers. Red Hat, a partner on the development of Kubernetes, has identified [10 Layers](https://www.redhat.com/en/resources/container-security-openshift-cloud-devops-whitepaper) of container security. Istio and Istio Auth addresses two of these layers: "Network Isolation" and "API and Service Endpoint Management". As cluster federation evolves on Kubernetes and other platforms, our intent is for Istio to secure communications across services spanning multiple federated clusters. ## Benefits of Istio Auth **Defense in depth**: When used in conjunction with Kubernetes (or infrastructure) network policies, users achieve higher levels of confidence, knowing that pod-to-pod or service-to-service communication is secured both at network and application layers. **Secure by default**: When used with Istio’s proxy and centralized policy engine, Istio Auth can be configured during deployment with minimal or no application change. Administrators and operators can thus ensure that service communications are secured by default and that they can enforce these policies consistently across diverse protocols and runtimes. **Strong service authentication**: Istio Auth secures service communication using mutual TLS to ensure that the service identity is not expressed as a bearer token that can be stolen or replayed from another source. This ensures that services with sensitive data can only be accessed from strongly authenticated and authorized clients. ## Join us in this journey Istio Auth is the first step towards providing a full stack of capabilities to protect services with sensitive data from external attacks and insider threats. While the initial version runs on Kubernetes, our goal is to enable Istio Auth to secure services across diverse production environments. We encourage the community to [join us](https://github.com/istio/istio/blob/master/security) in making robust service security easy and ubiquitous across different application stacks and runtime platforms.
{ "pile_set_name": "Github" }
## TaskResult.bind Namespace: `FsToolkit.ErrorHandling` Function Signature: ```fsharp ('a -> Task<Result<'b, 'c>>) -> Task<Result<'a, 'c>> -> Task<Result<'b, 'c>> ``` ## Examples Note: Many use-cases requiring `bind` operations can also be solved using [the `taskResult` computation expression](../taskResult/ce.md). ### Example 1 Continuing from the [TaskResult.map2 example](../taskResult/map2.md#example-1) and given the function ```fsharp let notifyFollowers : NotifyNewPostRequest -> Task<Result<unit,exn>> ``` we can notify all followers using `TaskResult.bind` as below: ```fsharp newPostRequestResult |> TaskResult.bind notifyFollowers ```
{ "pile_set_name": "Github" }
--- version: 0.0.1 author: xuld <[email protected]> import: - typo/reset --- # 添加到主屏幕 添加到主屏幕 ## 基本用法 ```jsx demo import { VNode, render } from "ui/control"; import AddToHomeScreen from "ui/addToHomeScreen"; render( __root__, <AddToHomeScreen></AddToHomeScreen> ); ```
{ "pile_set_name": "Github" }
/*************************************************************************************************** ** fpga_nes/hw/src/cmn/uart/uart_baud_clk.v * * Copyright (c) 2012, Brian Bennett * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted * provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, this list of conditions * and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, this list of * conditions and the following disclaimer in the documentation and/or other materials provided * with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY * WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Generates a tick signal at OVERSAMPLE_RATE times the baud rate. Should be fed to the uart_rx * and uart_tx blocks. ***************************************************************************************************/ module uart_baud_clk #( parameter SYS_CLK_FREQ = 50000000, parameter BAUD = 19200, parameter BAUD_CLK_OVERSAMPLE_RATE = 16 ) ( input wire clk, input wire reset, output wire baud_clk_tick ); localparam [15:0] CLKS_PER_OVERSAMPLE_TICK = (SYS_CLK_FREQ / BAUD) / BAUD_CLK_OVERSAMPLE_RATE; // Registers reg [15:0] q_cnt; wire [15:0] d_cnt; always @(posedge clk, posedge reset) begin if (reset) q_cnt <= 0; else q_cnt <= d_cnt; end assign d_cnt = (q_cnt == (CLKS_PER_OVERSAMPLE_TICK - 1)) ? 16'h0000 : (q_cnt + 16'h0001); assign baud_clk_tick = (q_cnt == (CLKS_PER_OVERSAMPLE_TICK - 1)) ? 1'b1 : 1'b0; endmodule
{ "pile_set_name": "Github" }
/** * \file pk.h * * \brief Public Key abstraction layer * * Copyright (C) 2006-2015, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * This file is part of mbed TLS (https://tls.mbed.org) */ #ifndef MBEDTLS_PK_H #define MBEDTLS_PK_H #if !defined(MBEDTLS_CONFIG_FILE) #include "config.h" #else #include MBEDTLS_CONFIG_FILE #endif #include "md.h" #if defined(MBEDTLS_RSA_C) #include "rsa.h" #endif #if defined(MBEDTLS_ECP_C) #include "ecp.h" #endif #if defined(MBEDTLS_ECDSA_C) #include "ecdsa.h" #endif #if ( defined(__ARMCC_VERSION) || defined(_MSC_VER) ) && \ !defined(inline) && !defined(__cplusplus) #define inline __inline #endif #define MBEDTLS_ERR_PK_ALLOC_FAILED -0x3F80 /**< Memory allocation failed. */ #define MBEDTLS_ERR_PK_TYPE_MISMATCH -0x3F00 /**< Type mismatch, eg attempt to encrypt with an ECDSA key */ #define MBEDTLS_ERR_PK_BAD_INPUT_DATA -0x3E80 /**< Bad input parameters to function. */ #define MBEDTLS_ERR_PK_FILE_IO_ERROR -0x3E00 /**< Read/write of file failed. */ #define MBEDTLS_ERR_PK_KEY_INVALID_VERSION -0x3D80 /**< Unsupported key version */ #define MBEDTLS_ERR_PK_KEY_INVALID_FORMAT -0x3D00 /**< Invalid key tag or value. */ #define MBEDTLS_ERR_PK_UNKNOWN_PK_ALG -0x3C80 /**< Key algorithm is unsupported (only RSA and EC are supported). */ #define MBEDTLS_ERR_PK_PASSWORD_REQUIRED -0x3C00 /**< Private key password can't be empty. */ #define MBEDTLS_ERR_PK_PASSWORD_MISMATCH -0x3B80 /**< Given private key password does not allow for correct decryption. */ #define MBEDTLS_ERR_PK_INVALID_PUBKEY -0x3B00 /**< The pubkey tag or value is invalid (only RSA and EC are supported). */ #define MBEDTLS_ERR_PK_INVALID_ALG -0x3A80 /**< The algorithm tag or value is invalid. */ #define MBEDTLS_ERR_PK_UNKNOWN_NAMED_CURVE -0x3A00 /**< Elliptic curve is unsupported (only NIST curves are supported). */ #define MBEDTLS_ERR_PK_FEATURE_UNAVAILABLE -0x3980 /**< Unavailable feature, e.g. RSA disabled for RSA key. */ #define MBEDTLS_ERR_PK_SIG_LEN_MISMATCH -0x3900 /**< The signature is valid but its length is less than expected. */ #ifdef __cplusplus extern "C" { #endif /** * \brief Public key types */ typedef enum { MBEDTLS_PK_NONE=0, MBEDTLS_PK_RSA, MBEDTLS_PK_ECKEY, MBEDTLS_PK_ECKEY_DH, MBEDTLS_PK_ECDSA, MBEDTLS_PK_RSA_ALT, MBEDTLS_PK_RSASSA_PSS, } mbedtls_pk_type_t; /** * \brief Options for RSASSA-PSS signature verification. * See \c mbedtls_rsa_rsassa_pss_verify_ext() */ typedef struct { mbedtls_md_type_t mgf1_hash_id; int expected_salt_len; } mbedtls_pk_rsassa_pss_options; /** * \brief Types for interfacing with the debug module */ typedef enum { MBEDTLS_PK_DEBUG_NONE = 0, MBEDTLS_PK_DEBUG_MPI, MBEDTLS_PK_DEBUG_ECP, } mbedtls_pk_debug_type; /** * \brief Item to send to the debug module */ typedef struct { mbedtls_pk_debug_type type; const char *name; void *value; } mbedtls_pk_debug_item; /** Maximum number of item send for debugging, plus 1 */ #define MBEDTLS_PK_DEBUG_MAX_ITEMS 3 /** * \brief Public key information and operations */ typedef struct mbedtls_pk_info_t mbedtls_pk_info_t; /** * \brief Public key container */ typedef struct { const mbedtls_pk_info_t * pk_info; /**< Public key informations */ void * pk_ctx; /**< Underlying public key context */ } mbedtls_pk_context; #if defined(MBEDTLS_RSA_C) /** * Quick access to an RSA context inside a PK context. * * \warning You must make sure the PK context actually holds an RSA context * before using this function! */ static inline mbedtls_rsa_context *mbedtls_pk_rsa( const mbedtls_pk_context pk ) { return( (mbedtls_rsa_context *) (pk).pk_ctx ); } #endif /* MBEDTLS_RSA_C */ #if defined(MBEDTLS_ECP_C) /** * Quick access to an EC context inside a PK context. * * \warning You must make sure the PK context actually holds an EC context * before using this function! */ static inline mbedtls_ecp_keypair *mbedtls_pk_ec( const mbedtls_pk_context pk ) { return( (mbedtls_ecp_keypair *) (pk).pk_ctx ); } #endif /* MBEDTLS_ECP_C */ #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) /** * \brief Types for RSA-alt abstraction */ typedef int (*mbedtls_pk_rsa_alt_decrypt_func)( void *ctx, int mode, size_t *olen, const unsigned char *input, unsigned char *output, size_t output_max_len ); typedef int (*mbedtls_pk_rsa_alt_sign_func)( void *ctx, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng, int mode, mbedtls_md_type_t md_alg, unsigned int hashlen, const unsigned char *hash, unsigned char *sig ); typedef size_t (*mbedtls_pk_rsa_alt_key_len_func)( void *ctx ); #endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ /** * \brief Return information associated with the given PK type * * \param pk_type PK type to search for. * * \return The PK info associated with the type or NULL if not found. */ const mbedtls_pk_info_t *mbedtls_pk_info_from_type( mbedtls_pk_type_t pk_type ); /** * \brief Initialize a mbedtls_pk_context (as NONE) */ void mbedtls_pk_init( mbedtls_pk_context *ctx ); /** * \brief Free a mbedtls_pk_context */ void mbedtls_pk_free( mbedtls_pk_context *ctx ); /** * \brief Initialize a PK context with the information given * and allocates the type-specific PK subcontext. * * \param ctx Context to initialize. Must be empty (type NONE). * \param info Information to use * * \return 0 on success, * MBEDTLS_ERR_PK_BAD_INPUT_DATA on invalid input, * MBEDTLS_ERR_PK_ALLOC_FAILED on allocation failure. * * \note For contexts holding an RSA-alt key, use * \c mbedtls_pk_setup_rsa_alt() instead. */ int mbedtls_pk_setup( mbedtls_pk_context *ctx, const mbedtls_pk_info_t *info ); #if defined(MBEDTLS_PK_RSA_ALT_SUPPORT) /** * \brief Initialize an RSA-alt context * * \param ctx Context to initialize. Must be empty (type NONE). * \param key RSA key pointer * \param decrypt_func Decryption function * \param sign_func Signing function * \param key_len_func Function returning key length in bytes * * \return 0 on success, or MBEDTLS_ERR_PK_BAD_INPUT_DATA if the * context wasn't already initialized as RSA_ALT. * * \note This function replaces \c mbedtls_pk_setup() for RSA-alt. */ int mbedtls_pk_setup_rsa_alt( mbedtls_pk_context *ctx, void * key, mbedtls_pk_rsa_alt_decrypt_func decrypt_func, mbedtls_pk_rsa_alt_sign_func sign_func, mbedtls_pk_rsa_alt_key_len_func key_len_func ); #endif /* MBEDTLS_PK_RSA_ALT_SUPPORT */ /** * \brief Get the size in bits of the underlying key * * \param ctx Context to use * * \return Key size in bits, or 0 on error */ size_t mbedtls_pk_get_bitlen( const mbedtls_pk_context *ctx ); /** * \brief Get the length in bytes of the underlying key * \param ctx Context to use * * \return Key length in bytes, or 0 on error */ static inline size_t mbedtls_pk_get_len( const mbedtls_pk_context *ctx ) { return( ( mbedtls_pk_get_bitlen( ctx ) + 7 ) / 8 ); } /** * \brief Tell if a context can do the operation given by type * * \param ctx Context to test * \param type Target type * * \return 0 if context can't do the operations, * 1 otherwise. */ int mbedtls_pk_can_do( const mbedtls_pk_context *ctx, mbedtls_pk_type_t type ); /** * \brief Verify signature (including padding if relevant). * * \param ctx PK context to use * \param md_alg Hash algorithm used (see notes) * \param hash Hash of the message to sign * \param hash_len Hash length or 0 (see notes) * \param sig Signature to verify * \param sig_len Signature length * * \return 0 on success (signature is valid), * MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if the signature is * valid but its actual length is less than sig_len, * or a specific error code. * * \note For RSA keys, the default padding type is PKCS#1 v1.5. * Use \c mbedtls_pk_verify_ext( MBEDTLS_PK_RSASSA_PSS, ... ) * to verify RSASSA_PSS signatures. * * \note If hash_len is 0, then the length associated with md_alg * is used instead, or an error returned if it is invalid. * * \note md_alg may be MBEDTLS_MD_NONE, only if hash_len != 0 */ int mbedtls_pk_verify( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, const unsigned char *hash, size_t hash_len, const unsigned char *sig, size_t sig_len ); /** * \brief Verify signature, with options. * (Includes verification of the padding depending on type.) * * \param type Signature type (inc. possible padding type) to verify * \param options Pointer to type-specific options, or NULL * \param ctx PK context to use * \param md_alg Hash algorithm used (see notes) * \param hash Hash of the message to sign * \param hash_len Hash length or 0 (see notes) * \param sig Signature to verify * \param sig_len Signature length * * \return 0 on success (signature is valid), * MBEDTLS_ERR_PK_TYPE_MISMATCH if the PK context can't be * used for this type of signatures, * MBEDTLS_ERR_PK_SIG_LEN_MISMATCH if the signature is * valid but its actual length is less than sig_len, * or a specific error code. * * \note If hash_len is 0, then the length associated with md_alg * is used instead, or an error returned if it is invalid. * * \note md_alg may be MBEDTLS_MD_NONE, only if hash_len != 0 * * \note If type is MBEDTLS_PK_RSASSA_PSS, then options must point * to a mbedtls_pk_rsassa_pss_options structure, * otherwise it must be NULL. */ int mbedtls_pk_verify_ext( mbedtls_pk_type_t type, const void *options, mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, const unsigned char *hash, size_t hash_len, const unsigned char *sig, size_t sig_len ); /** * \brief Make signature, including padding if relevant. * * \param ctx PK context to use - must hold a private key * \param md_alg Hash algorithm used (see notes) * \param hash Hash of the message to sign * \param hash_len Hash length or 0 (see notes) * \param sig Place to write the signature * \param sig_len Number of bytes written * \param f_rng RNG function * \param p_rng RNG parameter * * \return 0 on success, or a specific error code. * * \note For RSA keys, the default padding type is PKCS#1 v1.5. * There is no interface in the PK module to make RSASSA-PSS * signatures yet. * * \note If hash_len is 0, then the length associated with md_alg * is used instead, or an error returned if it is invalid. * * \note For RSA, md_alg may be MBEDTLS_MD_NONE if hash_len != 0. * For ECDSA, md_alg may never be MBEDTLS_MD_NONE. */ int mbedtls_pk_sign( mbedtls_pk_context *ctx, mbedtls_md_type_t md_alg, const unsigned char *hash, size_t hash_len, unsigned char *sig, size_t *sig_len, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); /** * \brief Decrypt message (including padding if relevant). * * \param ctx PK context to use - must hold a private key * \param input Input to decrypt * \param ilen Input size * \param output Decrypted output * \param olen Decrypted message length * \param osize Size of the output buffer * \param f_rng RNG function * \param p_rng RNG parameter * * \note For RSA keys, the default padding type is PKCS#1 v1.5. * * \return 0 on success, or a specific error code. */ int mbedtls_pk_decrypt( mbedtls_pk_context *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, size_t osize, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); /** * \brief Encrypt message (including padding if relevant). * * \param ctx PK context to use * \param input Message to encrypt * \param ilen Message size * \param output Encrypted output * \param olen Encrypted output length * \param osize Size of the output buffer * \param f_rng RNG function * \param p_rng RNG parameter * * \note For RSA keys, the default padding type is PKCS#1 v1.5. * * \return 0 on success, or a specific error code. */ int mbedtls_pk_encrypt( mbedtls_pk_context *ctx, const unsigned char *input, size_t ilen, unsigned char *output, size_t *olen, size_t osize, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng ); /** * \brief Check if a public-private pair of keys matches. * * \param pub Context holding a public key. * \param prv Context holding a private (and public) key. * * \return 0 on success or MBEDTLS_ERR_PK_BAD_INPUT_DATA */ int mbedtls_pk_check_pair( const mbedtls_pk_context *pub, const mbedtls_pk_context *prv ); /** * \brief Export debug information * * \param ctx Context to use * \param items Place to write debug items * * \return 0 on success or MBEDTLS_ERR_PK_BAD_INPUT_DATA */ int mbedtls_pk_debug( const mbedtls_pk_context *ctx, mbedtls_pk_debug_item *items ); /** * \brief Access the type name * * \param ctx Context to use * * \return Type name on success, or "invalid PK" */ const char * mbedtls_pk_get_name( const mbedtls_pk_context *ctx ); /** * \brief Get the key type * * \param ctx Context to use * * \return Type on success, or MBEDTLS_PK_NONE */ mbedtls_pk_type_t mbedtls_pk_get_type( const mbedtls_pk_context *ctx ); #if defined(MBEDTLS_PK_PARSE_C) /** \ingroup pk_module */ /** * \brief Parse a private key in PEM or DER format * * \param ctx key to be initialized * \param key input buffer * \param keylen size of the buffer * (including the terminating null byte for PEM data) * \param pwd password for decryption (optional) * \param pwdlen size of the password * * \note On entry, ctx must be empty, either freshly initialised * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a * specific key type, check the result with mbedtls_pk_can_do(). * * \note The key is also checked for correctness. * * \return 0 if successful, or a specific PK or PEM error code */ int mbedtls_pk_parse_key( mbedtls_pk_context *ctx, const unsigned char *key, size_t keylen, const unsigned char *pwd, size_t pwdlen ); /** \ingroup pk_module */ /** * \brief Parse a public key in PEM or DER format * * \param ctx key to be initialized * \param key input buffer * \param keylen size of the buffer * (including the terminating null byte for PEM data) * * \note On entry, ctx must be empty, either freshly initialised * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a * specific key type, check the result with mbedtls_pk_can_do(). * * \note The key is also checked for correctness. * * \return 0 if successful, or a specific PK or PEM error code */ int mbedtls_pk_parse_public_key( mbedtls_pk_context *ctx, const unsigned char *key, size_t keylen ); #if defined(MBEDTLS_FS_IO) /** \ingroup pk_module */ /** * \brief Load and parse a private key * * \param ctx key to be initialized * \param path filename to read the private key from * \param password password to decrypt the file (can be NULL) * * \note On entry, ctx must be empty, either freshly initialised * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a * specific key type, check the result with mbedtls_pk_can_do(). * * \note The key is also checked for correctness. * * \return 0 if successful, or a specific PK or PEM error code */ int mbedtls_pk_parse_keyfile( mbedtls_pk_context *ctx, const char *path, const char *password ); /** \ingroup pk_module */ /** * \brief Load and parse a public key * * \param ctx key to be initialized * \param path filename to read the private key from * * \note On entry, ctx must be empty, either freshly initialised * with mbedtls_pk_init() or reset with mbedtls_pk_free(). If you need a * specific key type, check the result with mbedtls_pk_can_do(). * * \note The key is also checked for correctness. * * \return 0 if successful, or a specific PK or PEM error code */ int mbedtls_pk_parse_public_keyfile( mbedtls_pk_context *ctx, const char *path ); #endif /* MBEDTLS_FS_IO */ #endif /* MBEDTLS_PK_PARSE_C */ #if defined(MBEDTLS_PK_WRITE_C) /** * \brief Write a private key to a PKCS#1 or SEC1 DER structure * Note: data is written at the end of the buffer! Use the * return value to determine where you should start * using the buffer * * \param ctx private to write away * \param buf buffer to write to * \param size size of the buffer * * \return length of data written if successful, or a specific * error code */ int mbedtls_pk_write_key_der( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); /** * \brief Write a public key to a SubjectPublicKeyInfo DER structure * Note: data is written at the end of the buffer! Use the * return value to determine where you should start * using the buffer * * \param ctx public key to write away * \param buf buffer to write to * \param size size of the buffer * * \return length of data written if successful, or a specific * error code */ int mbedtls_pk_write_pubkey_der( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); #if defined(MBEDTLS_PEM_WRITE_C) /** * \brief Write a public key to a PEM string * * \param ctx public key to write away * \param buf buffer to write to * \param size size of the buffer * * \return 0 if successful, or a specific error code */ int mbedtls_pk_write_pubkey_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); /** * \brief Write a private key to a PKCS#1 or SEC1 PEM string * * \param ctx private to write away * \param buf buffer to write to * \param size size of the buffer * * \return 0 if successful, or a specific error code */ int mbedtls_pk_write_key_pem( mbedtls_pk_context *ctx, unsigned char *buf, size_t size ); #endif /* MBEDTLS_PEM_WRITE_C */ #endif /* MBEDTLS_PK_WRITE_C */ /* * WARNING: Low-level functions. You probably do not want to use these unless * you are certain you do ;) */ #if defined(MBEDTLS_PK_PARSE_C) /** * \brief Parse a SubjectPublicKeyInfo DER structure * * \param p the position in the ASN.1 data * \param end end of the buffer * \param pk the key to fill * * \return 0 if successful, or a specific PK error code */ int mbedtls_pk_parse_subpubkey( unsigned char **p, const unsigned char *end, mbedtls_pk_context *pk ); #endif /* MBEDTLS_PK_PARSE_C */ #if defined(MBEDTLS_PK_WRITE_C) /** * \brief Write a subjectPublicKey to ASN.1 data * Note: function works backwards in data buffer * * \param p reference to current position pointer * \param start start of the buffer (for bounds-checking) * \param key public key to write away * * \return the length written or a negative error code */ int mbedtls_pk_write_pubkey( unsigned char **p, unsigned char *start, const mbedtls_pk_context *key ); #endif /* MBEDTLS_PK_WRITE_C */ /* * Internal module functions. You probably do not want to use these unless you * know you do. */ #if defined(MBEDTLS_FS_IO) int mbedtls_pk_load_file( const char *path, unsigned char **buf, size_t *n ); #endif #ifdef __cplusplus } #endif #endif /* MBEDTLS_PK_H */
{ "pile_set_name": "Github" }
// // Copyright (c) 2014 Mixpanel. All rights reserved. #import <Foundation/Foundation.h> #import "MPAbstractABTestDesignerMessage.h" #import <UIKit/UIKit.h> @interface MPABTestDesignerSnapshotResponseMessage : MPAbstractABTestDesignerMessage + (instancetype)message; @property (nonatomic, strong) UIImage *screenshot; @property (nonatomic, copy) NSDictionary *serializedObjects; @property (nonatomic, strong, readonly) NSString *imageHash; @end
{ "pile_set_name": "Github" }