text stringlengths 2 1.04M | meta dict |
|---|---|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_75) on Wed Jun 03 20:30:36 IST 2015 -->
<title>Uses of Package ie.cit.group3.repository</title>
<meta name="date" content="2015-06-03">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package ie.cit.group3.repository";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?ie/cit/group3/repository/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Uses of Package ie.cit.group3.repository" class="title">Uses of Package<br>ie.cit.group3.repository</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../ie/cit/group3/repository/package-summary.html">ie.cit.group3.repository</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#ie.cit.group3.repository">ie.cit.group3.repository</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#ie.cit.group3.service">ie.cit.group3.service</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="ie.cit.group3.repository">
<!-- -->
</a>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../ie/cit/group3/repository/package-summary.html">ie.cit.group3.repository</a> used by <a href="../../../../ie/cit/group3/repository/package-summary.html">ie.cit.group3.repository</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/AuthoritiesRepository.html#ie.cit.group3.repository">AuthoritiesRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ChObjectRepository.html#ie.cit.group3.repository">ChObjectRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ImageRepository.html#ie.cit.group3.repository">ImageRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ParticipantRepository.html#ie.cit.group3.repository">ParticipantRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ParticipationRepository.html#ie.cit.group3.repository">ParticipationRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/RolesRepository.html#ie.cit.group3.repository">RolesRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/UsersRepository.html#ie.cit.group3.repository">UsersRepository</a> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="ie.cit.group3.service">
<!-- -->
</a>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../ie/cit/group3/repository/package-summary.html">ie.cit.group3.repository</a> used by <a href="../../../../ie/cit/group3/service/package-summary.html">ie.cit.group3.service</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/AuthoritiesRepository.html#ie.cit.group3.service">AuthoritiesRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ChObjectRepository.html#ie.cit.group3.service">ChObjectRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/CommentFlagRepository.html#ie.cit.group3.service">CommentFlagRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/CommentRepository.html#ie.cit.group3.service">CommentRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/CommentThumbRepository.html#ie.cit.group3.service">CommentThumbRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/CrowdsourceFlagRepository.html#ie.cit.group3.service">CrowdsourceFlagRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/CrowdsourcingRepository.html#ie.cit.group3.service">CrowdsourcingRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/FlagchoiceRepository.html#ie.cit.group3.service">FlagchoiceRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/GameTypeRepository.html#ie.cit.group3.service">GameTypeRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/GamificationRepository.html#ie.cit.group3.service">GamificationRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ImageRepository.html#ie.cit.group3.service">ImageRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/JPAChObjectRepository.html#ie.cit.group3.service">JPAChObjectRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ParticipantRepository.html#ie.cit.group3.service">ParticipantRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/ParticipationRepository.html#ie.cit.group3.service">ParticipationRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/RolesRepository.html#ie.cit.group3.service">RolesRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/TagNameRepository.html#ie.cit.group3.service">TagNameRepository</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/UserRepository.html#ie.cit.group3.service">UserRepository</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../ie/cit/group3/repository/class-use/UsersRepository.html#ie.cit.group3.service">UsersRepository</a> </td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?ie/cit/group3/repository/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "d5f3e7953a54f85b4b5c93441f3efe84",
"timestamp": "",
"source": "github",
"line_count": 236,
"max_line_length": 278,
"avg_line_length": 43.728813559322035,
"alnum_prop": 0.6647286821705426,
"repo_name": "johnmurphy007/WebRepoCDHM",
"id": "43575d00b19e55fd63e6ff7b92ef3bb876a83307",
"size": "10320",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/ie/cit/group3/repository/package-use.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "224042"
},
{
"name": "Java",
"bytes": "320331"
},
{
"name": "JavaScript",
"bytes": "968"
}
],
"symlink_target": ""
} |
package org.apache.maven.plugin.eclipse;
import junit.framework.TestCase;
import org.apache.maven.model.Dependency;
import org.codehaus.plexus.util.ReflectionUtils;
/**
* @author Fabrizio Giustina
* @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
* @version $Id$
*/
public class EclipseToMavenTest
extends TestCase
{
/**
* Mojo under test.
*/
protected EclipseToMavenMojo mojo;
/**
* @see junit.framework.TestCase#setUp()
*/
protected void setUp()
throws Exception
{
super.setUp();
mojo = new EclipseToMavenMojo();
ReflectionUtils.setVariableValueInObject( mojo, "groupIdTokens", Integer.valueOf( -1 )); // Default, normally injected
}
/**
* Tests the parsing of the "Require-Bundle" entry from a manifest.
*/
public void testParseDependencies()
{
Dependency[] deps =
mojo.parseDependencies( "org.eclipse.ui;bundle-version=\"[3.2.0,4.0.0)\","
+ "org.eclipse.ui.console;resolution:=\"optional\";bundle-version=\"[3.1.100,4.0.0)\",org.eclipse.help;"
+ "bundle-version=\"[3.2.0,4.0.0)\",org.eclipse.core.expressions;bundle-version=\"[3.2.0,4.0.0)\"" );
assertEquals( 4, deps.length );
assertEquals( "org.eclipse", deps[0].getGroupId() );
assertEquals( "ui", deps[0].getArtifactId() );
assertEquals( "[3.2.0,4.0.0)", deps[0].getVersion() );
assertFalse( deps[0].isOptional() );
assertEquals( "org.eclipse.ui", deps[1].getGroupId() );
assertEquals( "console", deps[1].getArtifactId() );
assertEquals( "[3.1.100,4.0.0)", deps[1].getVersion() );
assertTrue( deps[1].isOptional() );
assertEquals( "org.eclipse", deps[2].getGroupId() );
assertEquals( "help", deps[2].getArtifactId() );
assertEquals( "[3.2.0,4.0.0)", deps[2].getVersion() );
assertFalse( deps[2].isOptional() );
assertEquals( "org.eclipse.core", deps[3].getGroupId() );
assertEquals( "expressions", deps[3].getArtifactId() );
assertEquals( "[3.2.0,4.0.0)", deps[3].getVersion() );
assertFalse( deps[3].isOptional() );
}
/**
* Tests the parsing of the "Require-Bundle" entry from a manifest.
*/
public void testParseDependenciesWithQualifier()
{
Dependency[] deps =
mojo.parseDependencies( "org.eclipse.ui;bundle-version=\"[3.2.0.0,4.0.0.0)\","
+ "org.eclipse.ui.console;resolution:=\"optional\";bundle-version=\"[3.1.100.0,4.0.0.0)\",org.eclipse.help;"
+ "bundle-version=\"[3.2.0.1,4.0.0.2)\",org.eclipse.core.expressions;bundle-version=\"[3.2.0.0,4.0.0.0)\"" );
assertEquals( 4, deps.length );
assertEquals( "org.eclipse", deps[0].getGroupId() );
assertEquals( "ui", deps[0].getArtifactId() );
assertEquals( "[3.2.0-0,4.0.0-0)", deps[0].getVersion() );
assertEquals( "org.eclipse.ui", deps[1].getGroupId() );
assertEquals( "console", deps[1].getArtifactId() );
assertEquals( "[3.1.100-0,4.0.0-0)", deps[1].getVersion() );
assertEquals( "org.eclipse", deps[2].getGroupId() );
assertEquals( "help", deps[2].getArtifactId() );
assertEquals( "[3.2.0-1,4.0.0-2)", deps[2].getVersion() );
assertEquals( "org.eclipse.core", deps[3].getGroupId() );
assertEquals( "expressions", deps[3].getArtifactId() );
assertEquals( "[3.2.0-0,4.0.0-0)", deps[3].getVersion() );
}
/**
* Test the generation of a groupId from a bundle symbolic name.
* @throws IllegalAccessException
*/
public void testCreateGroupId() throws IllegalAccessException
{
assertEquals( "test", mojo.createGroupId( "test" ) );
assertEquals( "org", mojo.createGroupId( "org.eclipse" ) );
assertEquals( "org.eclipse", mojo.createGroupId( "org.eclipse.jdt" ) );
assertEquals( "org.eclipse.jdt", mojo.createGroupId( "org.eclipse.jdt.apt" ) );
assertEquals( "org.eclipse.jdt.apt", mojo.createGroupId( "org.eclipse.jdt.apt.core" ) );
ReflectionUtils.setVariableValueInObject( mojo, "groupIdTokens", Integer.valueOf( 3 ));
assertEquals( "test", mojo.createGroupId( "test" ) );
assertEquals( "org.eclipse", mojo.createGroupId( "org.eclipse" ) );
assertEquals( "org.eclipse.jdt", mojo.createGroupId( "org.eclipse.jdt" ) );
assertEquals( "org.eclipse.jdt", mojo.createGroupId( "org.eclipse.jdt.apt" ) );
assertEquals( "org.eclipse.jdt", mojo.createGroupId( "org.eclipse.jdt.apt.core" ) );
}
/**
* Test the generation of a artifactId from a bundle symbolic name.
* @throws IllegalAccessException
*/
public void testCreateArtifactId() throws IllegalAccessException
{
assertEquals( "test", mojo.createArtifactId( "test" ) );
assertEquals( "eclipse", mojo.createArtifactId( "org.eclipse" ) );
assertEquals( "jdt", mojo.createArtifactId( "org.eclipse.jdt" ) );
assertEquals( "apt", mojo.createArtifactId( "org.eclipse.jdt.apt" ) );
assertEquals( "core", mojo.createArtifactId( "org.eclipse.jdt.apt.core" ) );
ReflectionUtils.setVariableValueInObject( mojo, "groupIdTokens", Integer.valueOf( 3 ));
assertEquals( "test", mojo.createArtifactId( "test" ) );
assertEquals( "org.eclipse", mojo.createArtifactId( "org.eclipse" ) );
assertEquals( "org.eclipse.jdt", mojo.createArtifactId( "org.eclipse.jdt" ) );
assertEquals( "apt", mojo.createArtifactId( "org.eclipse.jdt.apt" ) );
assertEquals( "apt.core", mojo.createArtifactId( "org.eclipse.jdt.apt.core" ) );
ReflectionUtils.setVariableValueInObject( mojo, "useBundleNameAsArtifactId", Boolean.TRUE );
assertEquals( "test", mojo.createArtifactId( "test" ) );
assertEquals( "org.eclipse", mojo.createArtifactId( "org.eclipse" ) );
assertEquals( "org.eclipse.jdt", mojo.createArtifactId( "org.eclipse.jdt" ) );
assertEquals( "org.eclipse.jdt.apt", mojo.createArtifactId( "org.eclipse.jdt.apt" ) );
assertEquals( "org.eclipse.jdt.apt.core", mojo.createArtifactId( "org.eclipse.jdt.apt.core" ) );
}
public void testOsgiVersionToMavenVersion()
{
assertEquals( "1.2.3", mojo.osgiVersionToMavenVersion( "1.2.3", null, false ) );
assertEquals( "1.2.3", mojo.osgiVersionToMavenVersion( "1.2.3", "20060101", false ) );
assertEquals( "1.2.3", mojo.osgiVersionToMavenVersion( "1.2.3", null, true ) );
assertEquals( "1.2.3", mojo.osgiVersionToMavenVersion( "1.2.3", "20060101", true ) );
assertEquals( "1.2.3", mojo.osgiVersionToMavenVersion( "1.2.3.1", null, true ) );
assertEquals( "1.2.3", mojo.osgiVersionToMavenVersion( "1.2.3.1", "20060101", true ) );
assertEquals( "1.2.3-20060101", mojo.osgiVersionToMavenVersion( "1.2.3.1", "20060101", false ) );
assertEquals( "1.2.3-1", mojo.osgiVersionToMavenVersion( "1.2.3.1", null, false ) );
}
}
| {
"content_hash": "bfe0752440070aa01fa1b96a677da2a1",
"timestamp": "",
"source": "github",
"line_count": 150,
"max_line_length": 127,
"avg_line_length": 47.013333333333335,
"alnum_prop": 0.6259217243335224,
"repo_name": "wcm-io-devops/maven-eclipse-plugin",
"id": "dafcefb8ccfbb9083401565ad8fa4c2f4f10bac4",
"size": "7859",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "src/test/java/org/apache/maven/plugin/eclipse/EclipseToMavenTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "AspectJ",
"bytes": "1978"
},
{
"name": "Groovy",
"bytes": "3656"
},
{
"name": "HTML",
"bytes": "1110"
},
{
"name": "Java",
"bytes": "839519"
},
{
"name": "Shell",
"bytes": "948"
}
],
"symlink_target": ""
} |
package ai.subut.kurjun.model.storage;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
/**
* A md5 sum based flat key-value file store.
*/
public interface FileStore
{
/**
* Checks to see if a file with the specified md5 sum exists.
*
* @param md5 the md5 sum of the file
* @return true if a file having the same md5sum exists, false otherwise
* @throws IOException if there are problems accessing the store
*/
boolean contains( String md5 ) throws IOException;
/**
* Gets the contents of a file from the store as a stream.
*
* @param md5 the md5 sum of the file
* @return null if the file does not exist, otherwise returns a stream containing the contents of the file
* @throws IOException if there are problems access the store
*/
InputStream get( String md5 ) throws IOException;
/**
* Gets the contents of a file from the store and dumps it into local file.
*
* @param md5 the md5 sum of the file to retrieve
* @param target the file into which the contents should be dumped
* @return true if the contents were successfully dumped, false otherwise
* @throws IOException if there are problems accessing the store or writing to the target file
*/
boolean get( String md5, File target ) throws IOException;
/**
* Puts a source file into the store.
*
* @param source the source file
* @return the md5 sum of the file
* @throws IOException if there are problems accessing the store or the source file
*/
String put( File source ) throws IOException;
/**
* Puts a source file specified by a URL into the store.
*
* @param source the source file URL
* @return the md5 sum of the file
* @throws IOException if there are problems accessing the store or the source file
*/
String put( URL source ) throws IOException;
/**
* Puts a source file into the store.
*
* @param filename the name of the file
* @param source the source content stream
* @return the md5 sum of the file
* @throws IOException if there are problems accessing the store or the source content
*/
String put( String filename, InputStream source ) throws IOException;
/**
* Removes a file from the store.
*
* @param md5 the md5 sum of the file to remove
* @return true if the file was removed, false if no such file exists
* @throws IOException if there are problems accessing the store
*/
boolean remove( String md5 ) throws IOException;
/**
* Returns total size (in bytes) of the files stored in this store.
*
* @return total size of the store (in bytes)
* @throws IOException
*/
long size() throws IOException;
/**
* Returns size (in bytes) of the package file that corresponds to the supplied digest value.
*
* @param md5 md5 digest to look file for
* @return size of the package file in bytes if found; otherwise - 0L
* @throws IOException
*/
long sizeOf( String md5 ) throws IOException;
}
| {
"content_hash": "998ba29186ef11e8ec7688e2a9e81989",
"timestamp": "",
"source": "github",
"line_count": 106,
"max_line_length": 110,
"avg_line_length": 29.9811320754717,
"alnum_prop": 0.6611076148521082,
"repo_name": "subutai-io/Kurjun",
"id": "bd6a14b26b653ae34451f92ad62b09cb34d41d66",
"size": "3178",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "model/src/main/java/ai/subut/kurjun/model/storage/FileStore.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "662946"
}
],
"symlink_target": ""
} |
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var _react = require("react");
var _react2 = _interopRequireDefault(_react);
var _propTypes = require("prop-types");
var _propTypes2 = _interopRequireDefault(_propTypes);
var _utils = require("../utils");
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function Square(props) {
var className = props.className,
stroke = props.stroke,
strokeWidth = props.strokeWidth,
opacity = props.opacity,
fill = props.fill,
point = props.point,
width = props.width;
var w = (0, _utils.functor)(width)(point.datum);
var x = point.x - w / 2;
var y = point.y - w / 2;
return _react2.default.createElement("rect", {
className: className,
x: x,
y: y,
stroke: stroke,
strokeWidth: strokeWidth,
fillOpacity: opacity,
fill: fill,
width: w,
height: w
});
}
Square.propTypes = {
stroke: _propTypes2.default.string,
fill: _propTypes2.default.string.isRequired,
opacity: _propTypes2.default.number.isRequired,
point: _propTypes2.default.shape({
x: _propTypes2.default.number.isRequired,
y: _propTypes2.default.number.isRequired,
datum: _propTypes2.default.object.isRequired
}).isRequired,
className: _propTypes2.default.string,
strokeWidth: _propTypes2.default.number,
width: _propTypes2.default.oneOfType([_propTypes2.default.number, _propTypes2.default.func]).isRequired
};
Square.defaultProps = {
stroke: "#4682B4",
strokeWidth: 1,
opacity: 0.5,
fill: "#4682B4",
className: "react-stockcharts-marker-rect"
};
Square.drawOnCanvas = function (props, point, ctx) {
var stroke = props.stroke,
fill = props.fill,
opacity = props.opacity,
strokeWidth = props.strokeWidth;
ctx.strokeStyle = stroke;
ctx.lineWidth = strokeWidth;
if (fill !== "none") {
ctx.fillStyle = (0, _utils.hexToRGBA)(fill, opacity);
}
Square.drawOnCanvasWithNoStateChange(props, point, ctx);
};
Square.drawOnCanvasWithNoStateChange = function (props, point, ctx) {
var width = props.width;
var w = (0, _utils.functor)(width)(point.datum);
var x = point.x - w / 2;
var y = point.y - w / 2;
ctx.beginPath();
ctx.rect(x, y, w, w);
ctx.stroke();
ctx.fill();
};
exports.default = Square; | {
"content_hash": "4022e56237a56257c9bcba73edf7f0a9",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 104,
"avg_line_length": 26.04597701149425,
"alnum_prop": 0.6879964695498676,
"repo_name": "rrag/rrag.github.io",
"id": "3b0fcd80f24a0c2cd6003ed4b6477fa624167935",
"size": "2266",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "react-stockcharts-next/lib/series/SquareMarker.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "243899"
},
{
"name": "HTML",
"bytes": "425316"
},
{
"name": "JavaScript",
"bytes": "2980093"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html>
<head>
<!-- meta information -->
<meta charset="utf-8">
<meta name="description" content=" {% include head.html %} 404 If there's a problem please tell me(jwhaydock@jackhaydock.c...">
<meta name="author" content="Jack Haydock">
<meta name="image" content="http://www.jackhaydock.co.uk/public/images/logo.png">
<meta name="og:image" content="http://www.jackhaydock.co.uk/public/images/logo.png">
<!---->
<!-- Twitter Meta -->
<meta name="twitter:title" content="404">
<meta name="twitter:description" content=" {% include head.html %} 404 If there's a problem please tell me(jwhaydock@jackhaydock.c...">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://www.jackhaydock.co.uk/public/images/logo.png">
<meta name="twitter:domain" content="http://www.jackhaydock.co.uk/404">
<!---->
<!-- Enable responsiveness on mobile devices-->
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1">
<!-- title -->
<title>404 · Jack Haydock</title>
<!-- icons -->
<link rel="shortcut icon" href="/public/images/favicon.ico" />
<!-- stylesheets -->
<link rel="stylesheet" href="/public/css/responsive.gs.12col.css">
<link rel="stylesheet" href="/public/css/animate.min.css">
<link rel="stylesheet" href="/public/css/main.css">
<!-- Google fonts -->
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,700,400italic&subset=latin-ext">
<!-- feed links -->
<link rel="alternate" href="http://www.jackhaydock.co.uk/feed.xml" type="application/rss+xml" title="">
</head>
<body>
<div class="container not-found">
<h1 class="bounceInDown animated">404</h1>
<p id="error">
If there's a problem please tell me
<br>(jwhaydock@jackhaydock.co.uk)
<br>and I'll probably ignore you.
<br><a href="/"> Go To Home</a>
</p>
<a href="https://www.google.co.uk/search?q=snakes+with+hats&safe=off&client=ubuntu&hs=Lnr&channel=fs&tbm=isch&tbo=u&source=univ&sa=X&ved=0ahUKEwjmrIf-uOPTAhXLA8AKHQNaCskQsAQIJg&biw=1873&bih=953#imgrc=XeBGdNsh3xAepM:">
<img src="/public/images/Untitled.png" height=80px width=80px
style="margin-top: 1000px; margin-bottom: 50px;" align="right">
</a>
</div>
</body>
</html>
| {
"content_hash": "e063b8fe4b8f4e83b13674788101f4fc",
"timestamp": "",
"source": "github",
"line_count": 73,
"max_line_length": 218,
"avg_line_length": 32.21917808219178,
"alnum_prop": 0.6624149659863946,
"repo_name": "jackhaydock/jackhaydock.co.uk-Jekyll-Files",
"id": "9fc2f6279f677c917955c49de37d8469460b2027",
"size": "2352",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "_site/404.html",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "15178"
},
{
"name": "HTML",
"bytes": "1186289"
},
{
"name": "JavaScript",
"bytes": "5396"
},
{
"name": "Ruby",
"bytes": "968"
}
],
"symlink_target": ""
} |
/**
* Delete an API Gateway to action mapping document from the database:
* https://docs.cloudant.com/document.html#delete
*
* Parameters (all as fields in the message JSON object)
* gwUrlV2 Required when accesstoken is provided. The V2 API Gateway base path (i.e. http://gw.com)
* gwUrl Required. The API Gateway base path (i.e. http://gw.com)
* gwUser Optional. The API Gateway authentication
* gwPwd Optional. The API Gateway authentication
* namespace Required if __ow_user not specified. Namespace of API author
* __ow_user Required. Namespace of API author
* accesstoken Optional. Dynamic API GW auth. Overrides gwUser/gwPwd
* spaceguid Optional. Namespace unique id.
* tenantInstance Optional. Instance identifier used when creating the specific API GW Tenant
* basepath Required. Base path or API name of the API
* relpath Optional. Delete just this relative path from the API. Required if operation is specified
* operation Optional. Delete just this relpath's operation from the API.
*
* NOTE: The package containing this action will be bound to the following values:
* gwUrl, gwAuth
* As such, the caller to this action should normally avoid explicitly setting
* these values
*/
var utils = require('./utils.js');
var utils2 = require('./apigw-utils.js');
var _ = require('lodash');
function main(message) {
var badArgMsg = validateArgs(message);
if (badArgMsg) {
return Promise.reject(utils2.makeErrorResponseObject(badArgMsg), (message.__ow_method != undefined));
}
var gwInfo = {
gwUrl: message.gwUrl,
};
if (message.gwUser && message.gwPwd) {
gwInfo.gwAuth = Buffer.from(message.gwUser+':'+message.gwPwd,'ascii').toString('base64');
}
// Set namespace override if provided
message.namespace = message.__ow_user || message.namespace;
var tenantInstance = message.tenantInstance || 'openwhisk';
// This can be invoked as either a web action or as a normal action
var calledAsWebAction = message.__ow_method != undefined;
// Log parameter values
console.log('GW URL : '+message.gwUrl);
console.log('GW URL V2 : '+message.gwUrlV2);
console.log('GW User : '+utils.confidentialPrint(message.gwUser));
console.log('GW Pwd : '+utils.confidentialPrint(message.gwPwd));
console.log('__ow_user : '+message.__ow_user);
console.log('namespace : '+message.namespace);
console.log('tenantInstance: '+message.tenantInstance+' / '+tenantInstance);
console.log('accesstoken : '+message.accesstoken);
console.log('spaceguid : '+message.spaceguid);
console.log('basepath/name : '+message.basepath);
console.log('relpath : '+message.relpath);
console.log('operation : '+message.operation);
console.log('calledAsWebAction: '+calledAsWebAction);
// If no relpath (or relpath/operation) is specified, delete the entire API
var deleteEntireApi = !message.relpath;
if (message.accesstoken) {
// Delete an API route
// 1. Use the spaceguid and basepath to obtain the API from the API GW
// 2. If a relpath or relpath/operation is specified (i.e. delete subset of API)
// a. Remove that section from the API config
// b. Update API GW with updated API config
// 3. If relpath or replath/operation is NOT specified (i.e. delete entire API)
// a. Delete entire API from API GW
gwInfo.gwUrl = message.gwUrlV2;
gwInfo.gwAuth = message.accesstoken;
return utils2.getApis(gwInfo, message.spaceguid, message.basepath)
.then(function(endpointDocs) {
console.log('Got '+endpointDocs.length+' APIs');
if (endpointDocs.length === 0) {
console.log('No API found for namespace '+message.namespace + ' with basePath '+ message.basepath)
return Promise.reject('API \''+message.basepath+'\' does not exist.');
} else if (endpointDocs.length > 1) {
console.error('Multiple APIs found for namespace '+message.namespace+' with basepath/apiname '+message.basepath);
}
return Promise.resolve(endpointDocs[0]);
})
.then(function(endpointDoc) {
console.log('Got API');
if (deleteEntireApi) {
console.log('Removing entire API '+message.basepath+' from API GW');
return utils2.deleteApiFromGateway(gwInfo, message.spaceguid, endpointDoc.artifact_id);
} else {
console.log('Removing path '+message.relpath+' with operation '+message.operation+' from API '+message.basepath);
var endpointToRemove = {
gatewayMethod: message.operation,
gatewayPath: message.relpath
};
var swaggerOrErrMsg = utils2.removeEndpointFromSwaggerApi(endpointDoc.open_api_doc, endpointToRemove);
if (typeof swaggerOrErrMsg === 'string' ) {
return Promise.reject(swaggerOrErrMsg);
}
if (_.isEmpty(swaggerOrErrMsg.paths)) {
console.log('After path/operation removal, no paths exist in API; so removing entire API '+message.basepath+' from API GW');
return utils2.deleteApiFromGateway(gwInfo, message.spaceguid, endpointDoc.artifact_id);
}
return utils2.addApiToGateway(gwInfo, message.spaceguid, swaggerOrErrMsg, endpointDoc.artifact_id);
}
})
.then(function() {
console.log('deleteApi success');
return Promise.resolve(utils2.makeResponseObject({}, calledAsWebAction));
})
.catch(function(reason) {
var rejmsg = 'API deletion failure: ' + JSON.parse(utils2.makeJsonString(reason)); // Avoid unnecessary JSON escapes
console.error(rejmsg);
return Promise.reject(utils2.makeErrorResponseObject(rejmsg, calledAsWebAction));
});
} else {
// Delete an API route
// 1. Get the tenant ID associated with the specified namespace and optional tenant instance
// 2. Obtain the tenantId/basepath/apiName associated API configuration from the API GW
// 3. If a relpath or relpath/operation is specified (i.e. delete subset of API)
// a. Remove that section from the API config
// b. Update API GW with updated API config
// 4. If relpath or replath/operation is NOT specified (i.e. delete entire API)
// a. Delete entire API from API GW
var tenantId;
return utils.getTenants(gwInfo, message.namespace, tenantInstance)
.then(function(tenants) {
// If a non-empty tenant array was returned, pick the first one from the list
if (tenants.length === 0) {
console.error('No Tenant found for namespace '+message.namespace);
return Promise.reject('No Tenant found for namespace '+message.namespace);
} else if (tenants.length > 1 ) {
console.error('Multiple tenants found for namespace '+message.namespace+' and tenant instance '+tenantInstance);
return Promise.reject('Internal error. Multiple API Gateway tenants found for namespace '+message.namespace+' and tenant instance '+tenantInstance);
}
console.log('Got a tenant: '+JSON.stringify(tenants[0]));
tenantId = tenants[0].id;
return Promise.resolve(tenants[0].id);
})
.then(function(tenantId) {
console.log('Got Tenant ID: '+tenantId);
return utils.getApis(gwInfo, tenantId, message.basepath);
})
.then(function(apis) {
console.log('Got '+apis.length+' APIs');
if (apis.length === 0) {
console.log('No APIs found for namespace '+message.namespace+' with basepath/apiname '+message.basepath);
return Promise.reject('API \''+message.basepath+'\' does not exist.');
} else if (apis.length > 1) {
console.error('Multiple APIs found for namespace '+message.namespace+' with basepath/apiname '+message.basepath);
Promise.reject('Internal error. Multiple APIs found for namespace '+message.namespace+' with basepath '+message.basepath);
}
return Promise.resolve(apis[0]);
})
.then(function(gwApi) {
if (deleteEntireApi) {
console.log('Removing entire API '+gwApi.basePath+' from API GW');
return utils.deleteApiFromGateway(gwInfo, gwApi.id);
} else {
console.log('Removing path '+message.relpath+'; operation '+message.operation+' from API '+gwApi.basePath);
var swaggerApi = utils.generateSwaggerApiFromGwApi(gwApi);
var endpoint = {
gatewayMethod: message.operation,
gatewayPath: message.relpath
};
var swaggerOrErrMsg = utils.removeEndpointFromSwaggerApi(swaggerApi, endpoint);
if (typeof swaggerOrErrMsg === 'string' ) {
return Promise.reject(swaggerOrErrMsg);
}
return utils.addApiToGateway(gwInfo, gwApi.tenantId, swaggerOrErrMsg, gwApi.id);
}
})
.then(function() {
console.log('deleteApi success');
return Promise.resolve(utils2.makeResponseObject({}, calledAsWebAction));
})
.catch(function(reason) {
var rejmsg = 'API deletion failure: ' + JSON.parse(utils2.makeJsonString(reason)); // Avoid unnecessary JSON escapes
console.error(rejmsg);
return Promise.reject(utils2.makeErrorResponseObject(rejmsg, calledAsWebAction));
});
}
}
function validateArgs(message) {
var tmpdoc;
if(!message) {
console.error('No message argument!');
return 'Internal error. A message parameter was not supplied.';
}
if (!message.gwUrl) {
return 'gwUrl is required.';
}
if (!message.__ow_user) {
return '__ow_user is required.';
}
if (!message.basepath) {
return 'basepath is required.';
}
if (!message.relpath && message.operation) {
return 'When specifying an operation, the path is required.';
}
if (message.operation) {
message.operation = message.operation.toLowerCase();
}
return '';
}
module.exports.main = main;
| {
"content_hash": "83502e8cb9723d371973c4ab9c3e787b",
"timestamp": "",
"source": "github",
"line_count": 222,
"max_line_length": 156,
"avg_line_length": 44.76126126126126,
"alnum_prop": 0.6674046492905303,
"repo_name": "lzbj/openwhisk",
"id": "b29d95a789a5bb1716bc49e23e7e0eed13b2753d",
"size": "10738",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "core/routemgmt/deleteApi/deleteApi.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "623"
},
{
"name": "Java",
"bytes": "42901"
},
{
"name": "JavaScript",
"bytes": "127209"
},
{
"name": "Python",
"bytes": "38090"
},
{
"name": "Scala",
"bytes": "2150166"
},
{
"name": "Shell",
"bytes": "9971"
},
{
"name": "Swift",
"bytes": "24731"
}
],
"symlink_target": ""
} |
"""Module with shell specific actions, each shell class should
implement `from_shell`, `to_shell`, `app_alias`, `put_to_history` and `get_aliases`
methods.
"""
from collections import defaultdict
from subprocess import Popen, PIPE
from time import time
import os
import io
from psutil import Process
import six
from .utils import DEVNULL, memoize
class Generic(object):
def get_aliases(self):
return {}
def _expand_aliases(self, command_script):
aliases = self.get_aliases()
binary = command_script.split(' ')[0]
if binary in aliases:
return command_script.replace(binary, aliases[binary], 1)
else:
return command_script
def from_shell(self, command_script):
"""Prepares command before running in app."""
return self._expand_aliases(command_script)
def to_shell(self, command_script):
"""Prepares command for running in shell."""
return command_script
def app_alias(self):
return "\nalias fuck='TF_ALIAS=fuck eval $(thefuck $(fc -ln -1))'\n"
def _get_history_file_name(self):
return ''
def _get_history_line(self, command_script):
return ''
def put_to_history(self, command_script):
"""Puts command script to shell history."""
history_file_name = self._get_history_file_name()
if os.path.isfile(history_file_name):
with open(history_file_name, 'a') as history:
history.write(self._get_history_line(command_script))
def _script_from_history(self, line):
"""Returns prepared history line.
Should return a blank line if history line is corrupted or empty.
"""
return ''
def get_history(self):
"""Returns list of history entries."""
history_file_name = self._get_history_file_name()
if os.path.isfile(history_file_name):
with io.open(history_file_name, 'r',
encoding='utf-8', errors='ignore') as history:
for line in history:
prepared = self._script_from_history(line)\
.strip()
if prepared:
yield prepared
def and_(self, *commands):
return u' && '.join(commands)
class Bash(Generic):
def app_alias(self):
return "\nTF_ALIAS=fuck alias fuck='eval $(thefuck $(fc -ln -1));" \
" history -r'\n"
def _parse_alias(self, alias):
name, value = alias.replace('alias ', '', 1).split('=', 1)
if value[0] == value[-1] == '"' or value[0] == value[-1] == "'":
value = value[1:-1]
return name, value
def get_aliases(self):
proc = Popen('bash -ic alias', stdout=PIPE, stderr=DEVNULL,
shell=True)
return dict(
self._parse_alias(alias)
for alias in proc.stdout.read().decode('utf-8').split('\n')
if alias and '=' in alias)
def _get_history_file_name(self):
return os.environ.get("HISTFILE",
os.path.expanduser('~/.bash_history'))
def _get_history_line(self, command_script):
return u'{}\n'.format(command_script)
def _script_from_history(self, line):
print(line)
return line
class Fish(Generic):
def _get_overridden_aliases(self):
overridden_aliases = os.environ.get('TF_OVERRIDDEN_ALIASES', '').strip()
if overridden_aliases:
return [alias.strip() for alias in overridden_aliases.split(',')]
else:
return ['cd', 'grep', 'ls', 'man', 'open']
def app_alias(self):
return ("set TF_ALIAS fuck\n"
"function fuck -d 'Correct your previous console command'\n"
" set -l exit_code $status\n"
" set -l eval_script"
" (mktemp 2>/dev/null ; or mktemp -t 'thefuck')\n"
" set -l fucked_up_commandd $history[1]\n"
" thefuck $fucked_up_commandd > $eval_script\n"
" . $eval_script\n"
" rm $eval_script\n"
" if test $exit_code -ne 0\n"
" history --delete $fucked_up_commandd\n"
" end\n"
"end")
def get_aliases(self):
overridden = self._get_overridden_aliases()
proc = Popen('fish -ic functions', stdout=PIPE, stderr=DEVNULL,
shell=True)
functions = proc.stdout.read().decode('utf-8').strip().split('\n')
return {func: func for func in functions if func not in overridden}
def _expand_aliases(self, command_script):
aliases = self.get_aliases()
binary = command_script.split(' ')[0]
if binary in aliases:
return u'fish -ic "{}"'.format(command_script.replace('"', r'\"'))
else:
return command_script
def from_shell(self, command_script):
"""Prepares command before running in app."""
return self._expand_aliases(command_script)
def _get_history_file_name(self):
return os.path.expanduser('~/.config/fish/fish_history')
def _get_history_line(self, command_script):
return u'- cmd: {}\n when: {}\n'.format(command_script, int(time()))
def and_(self, *commands):
return u'; and '.join(commands)
class Zsh(Generic):
def app_alias(self):
return "\nTF_ALIAS=fuck" \
" alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1));" \
" fc -R'\n"
def _parse_alias(self, alias):
name, value = alias.split('=', 1)
if value[0] == value[-1] == '"' or value[0] == value[-1] == "'":
value = value[1:-1]
return name, value
def get_aliases(self):
proc = Popen('zsh -ic alias', stdout=PIPE, stderr=DEVNULL,
shell=True)
return dict(
self._parse_alias(alias)
for alias in proc.stdout.read().decode('utf-8').split('\n')
if alias and '=' in alias)
def _get_history_file_name(self):
return os.environ.get("HISTFILE",
os.path.expanduser('~/.zsh_history'))
def _get_history_line(self, command_script):
return u': {}:0;{}\n'.format(int(time()), command_script)
def _script_from_history(self, line):
if ';' in line:
return line.split(';', 1)[1]
else:
return ''
class Tcsh(Generic):
def app_alias(self):
return "\nalias fuck 'setenv TF_ALIAS fuck && set fucked_cmd=`history -h 2 | head -n 1` && eval `thefuck ${fucked_cmd}`'\n"
def _parse_alias(self, alias):
name, value = alias.split("\t", 1)
return name, value
def get_aliases(self):
proc = Popen('tcsh -ic alias', stdout=PIPE, stderr=DEVNULL,
shell=True)
return dict(
self._parse_alias(alias)
for alias in proc.stdout.read().decode('utf-8').split('\n')
if alias and '\t' in alias)
def _get_history_file_name(self):
return os.environ.get("HISTFILE",
os.path.expanduser('~/.history'))
def _get_history_line(self, command_script):
return u'#+{}\n{}\n'.format(int(time()), command_script)
shells = defaultdict(lambda: Generic(), {
'bash': Bash(),
'fish': Fish(),
'zsh': Zsh(),
'csh': Tcsh(),
'tcsh': Tcsh()})
def _get_shell():
try:
shell = Process(os.getpid()).parent().name()
except TypeError:
shell = Process(os.getpid()).parent.name
return shells[shell]
def from_shell(command):
return _get_shell().from_shell(command)
def to_shell(command):
return _get_shell().to_shell(command)
def app_alias():
print(_get_shell().app_alias())
def thefuck_alias():
return os.environ.get('TF_ALIAS', 'fuck')
def put_to_history(command):
return _get_shell().put_to_history(command)
def and_(*commands):
return _get_shell().and_(*commands)
@memoize
def get_aliases():
return list(_get_shell().get_aliases().keys())
@memoize
def get_history():
return list(_get_shell().get_history())
| {
"content_hash": "fbba281628eda0dd0decc675944ee49c",
"timestamp": "",
"source": "github",
"line_count": 266,
"max_line_length": 131,
"avg_line_length": 30.906015037593985,
"alnum_prop": 0.5582045979807809,
"repo_name": "suxinde2009/thefuck",
"id": "337e14be3c7af15ead09129f45cde09b1f040569",
"size": "8221",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "thefuck/shells.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "132514"
}
],
"symlink_target": ""
} |
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SetTargetMultiNormalFireball : MonoBehaviour {
public Vector3 target = Vector3.zero;
void Start () {
transform.GetComponent<ChargeableMultiNormalFireball>().setTarget(target);
}
}
| {
"content_hash": "724b818b2d065e73b5ab88ee2eb74ba4",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 78,
"avg_line_length": 25.727272727272727,
"alnum_prop": 0.7879858657243817,
"repo_name": "McOmghall/game-development-coursera-exercises",
"id": "a88dbe61a2cebf35516b52151f46f5d67b5d4502",
"size": "285",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "A Fireball For Your Friends/Assets/Scripts/Camera & Input/SetTargetMultiNormalFireball.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "118649"
},
{
"name": "C#",
"bytes": "705086"
},
{
"name": "GLSL",
"bytes": "6737"
},
{
"name": "HLSL",
"bytes": "17852"
},
{
"name": "HTML",
"bytes": "2400"
},
{
"name": "JavaScript",
"bytes": "26407"
},
{
"name": "ShaderLab",
"bytes": "342059"
},
{
"name": "TeX",
"bytes": "27064"
}
],
"symlink_target": ""
} |
from django.db import models
# Create your models here.
class NGram(models.Model):
n = models.IntegerField()
pickled_ngram = models.FileField(upload_to='ngrams/')
def __unicode__(self):
return str(self.n) + "gram"
| {
"content_hash": "4fe4c793829faae0f854f3d9a470760d",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 54,
"avg_line_length": 24.555555555555557,
"alnum_prop": 0.7104072398190046,
"repo_name": "david-abel/name_generator",
"id": "3c51a63d9caaa2790a3f0df3bb651b8aaa49bea7",
"size": "221",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "name_gen_app/models.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "33967"
},
{
"name": "Python",
"bytes": "17922"
}
],
"symlink_target": ""
} |
<<<<<<< HEAD
<?xml version="1.0" ?><!DOCTYPE TS><TS language="ar" version="2.0">
<defaultcodec>UTF-8</defaultcodec>
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About Litecoin</source>
<translation>عن Litecoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>Litecoin</b> version</source>
<translation>نسخة <b>Litecoin</b></translation>
</message>
<message>
<location line="+57"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or http://www.opensource.org/licenses/mit-license.php.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (http://www.openssl.org/) and cryptographic software written by Eric Young (eay@cryptsoft.com) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"/>
</message>
<message>
<location filename="../aboutdialog.cpp" line="+14"/>
<source>Copyright</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+0"/>
<source>The Litecoin developers</source>
<translation type="unfinished"/>
</message>
</context>
=======
<TS language="ar" version="2.1">
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
<context>
<name>AddressBookPage</name>
<message>
<source>Right-click to edit address or label</source>
<translation>انقر بالزر الايمن لتعديل العنوان</translation>
</message>
<message>
<source>Create a new address</source>
<translation>انشأ عنوان جديد</translation>
</message>
<message>
<source>&New</source>
<translation>&جديد</translation>
</message>
<message>
<source>Copy the currently selected address to the system clipboard</source>
<translation>قم بنسخ القوانين المختارة لحافظة النظام</translation>
</message>
<message>
<source>&Copy</source>
<translation>&نسخ</translation>
</message>
<message>
<<<<<<< HEAD
<location filename="../addressbookpage.cpp" line="+63"/>
<source>These are your Litecoin addresses for receiving payments. You may want to give a different one to each sender so you can keep track of who is paying you.</source>
<translation type="unfinished"/>
=======
<source>C&lose</source>
<translation>&اغلاق</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>&Copy Address</source>
<translation>انسخ العنوان</translation>
</message>
<message>
<source>Delete the currently selected address from the list</source>
<translation>حذف العنوان المحدد من القائمة</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
<translation>تحميل البيانات في علامة التبويب الحالية إلى ملف.</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+11"/>
<source>Sign a message to prove you own a Litecoin address</source>
<translation type="unfinished"/>
=======
<source>&Export</source>
<translation>&تصدير</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>&Delete</source>
<translation>&أمسح</translation>
</message>
<message>
<source>Choose the address to send coins to</source>
<translation>اختر العنوان الذي سترسل له العملات</translation>
</message>
<message>
<source>Choose the address to receive coins with</source>
<translation>اختر العنوان الذي تستقبل عليه العملات</translation>
</message>
<message>
<source>C&hoose</source>
<translation>&اختر</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-44"/>
<source>Verify a message to ensure it was signed with a specified Litecoin address</source>
<translation type="unfinished"/>
=======
<source>Sending addresses</source>
<translation>ارسال العناوين</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Receiving addresses</source>
<translation>استقبال العناوين</translation>
</message>
<message>
<source>These are your Litecoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation>هذه هي عناوين Litecoin التابعة لك من أجل إرسال الدفعات. تحقق دائما من المبلغ و عنوان المرسل المستقبل قبل إرسال العملات</translation>
</message>
<message>
<<<<<<< HEAD
<location filename="../addressbookpage.cpp" line="-5"/>
<source>These are your Litecoin addresses for sending payments. Always check the amount and the receiving address before sending coins.</source>
<translation type="unfinished"/>
=======
<source>These are your Litecoin addresses for receiving payments. It is recommended to use a new receiving address for each transaction.</source>
<translation>هذه هي عناوين Litecoin التابعة لك من أجل إستقبال الدفعات. ينصح استخدام عنوان جديد من أجل كل صفقة</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Copy &Label</source>
<translation>نسخ &الوصف</translation>
</message>
<message>
<source>&Edit</source>
<translation>تعديل</translation>
</message>
<message>
<source>Export Address List</source>
<translation>تصدير قائمة العناوين</translation>
</message>
<message>
<source>Comma separated file (*.csv)</source>
<translation>ملف مفصول بفواصل (*.csv)</translation>
</message>
<message>
<source>Exporting Failed</source>
<translation>فشل التصدير</translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<source>Label</source>
<translation>وصف</translation>
</message>
<message>
<source>Address</source>
<translation>عنوان</translation>
</message>
<message>
<source>(no label)</source>
<translation>(لا وصف)</translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<source>Passphrase Dialog</source>
<translation>حوار جملة السر</translation>
</message>
<message>
<source>Enter passphrase</source>
<translation>ادخل كلمة المرور</translation>
</message>
<message>
<source>New passphrase</source>
<translation>كلمة مرور جديدة</translation>
</message>
<message>
<source>Repeat new passphrase</source>
<translation>ادخل كلمة المرور الجديدة مرة أخرى</translation>
</message>
<message>
<source>Encrypt wallet</source>
<translation>تشفير المحفظة</translation>
</message>
<message>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>هذه العملية تحتاج كلمة مرور محفظتك لفتحها</translation>
</message>
<message>
<source>Unlock wallet</source>
<translation>إفتح المحفظة</translation>
</message>
<message>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>هذه العملية تحتاج كلمة مرور محفظتك لفك تشفيرها </translation>
</message>
<message>
<source>Decrypt wallet</source>
<translation>فك تشفير المحفظة</translation>
</message>
<message>
<source>Change passphrase</source>
<translation>تغيير كلمة المرور</translation>
</message>
<message>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>أدخل كلمة المرور القديمة والجديدة للمحفظة.</translation>
</message>
<message>
<source>Confirm wallet encryption</source>
<translation>تأكيد تشفير المحفظة</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR LITECOINS</b>!</source>
<translation type="unfinished"/>
=======
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR LITECOINS</b>!</source>
<translation>تحذير: إذا قمت بتشفير محفظتك وفقدت كلمة المرور الخاص بك, ستفقد كل عملات LITECOINS الخاصة بك.</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>هل أنت متأكد من رغبتك في تشفير محفظتك ؟</translation>
</message>
<message>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>هام: أي نسخة إحتياطية سابقة قمت بها لمحفظتك يجب استبدالها بأخرى حديثة، مشفرة. لأسباب أمنية، النسخ الاحتياطية السابقة لملفات المحفظة الغير مشفرة تصبح عديمة الفائدة مع بداية استخدام المحفظة المشفرة الجديدة.</translation>
</message>
<message>
<source>Warning: The Caps Lock key is on!</source>
<translation>تحذير: مفتاح الحروف الكبيرة مفعل</translation>
</message>
<message>
<source>Wallet encrypted</source>
<translation>محفظة مشفرة</translation>
</message>
<message>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>ten or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>أدخل عبارة مرور جديدة إلى المحفظة. الرجاء استخدام عبارة مرور تتكون من10 حروف عشوائية على الاقل, أو أكثر من 7 كلمات</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-56"/>
<source>Litecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your litecoins from being stolen by malware infecting your computer.</source>
<translation type="unfinished"/>
=======
<source>Litecoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your litecoins from being stolen by malware infecting your computer.</source>
<translation>بتكوين سوف يغلق الآن لإنهاء عملية التشفير. تذكر أن التشفير لا يستطيع حماية محفظتك تمامًا من السرقة من خلال البرمجيات الخبيثة التي تصيب جهازك </translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Wallet encryption failed</source>
<translation>فشل تشفير المحفظة</translation>
</message>
<message>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>فشل تشفير المحفظة بسبب خطأ داخلي. لم يتم تشفير محفظتك.</translation>
</message>
<message>
<source>The supplied passphrases do not match.</source>
<translation>كلمتي المرور ليستا متطابقتان</translation>
</message>
<message>
<source>Wallet unlock failed</source>
<translation>فشل فتح المحفظة</translation>
</message>
<message>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>كلمة المرور التي تم إدخالها لفك تشفير المحفظة غير صحيحة.</translation>
</message>
<message>
<source>Wallet decryption failed</source>
<translation>فشل فك التشفير المحفظة</translation>
</message>
<message>
<source>Wallet passphrase was successfully changed.</source>
<translation>لقد تم تغير عبارة مرور المحفظة بنجاح</translation>
</message>
</context>
<context>
<name>BitcoinGUI</name>
<message>
<source>Sign &message...</source>
<translation>التوقيع و الرسائل</translation>
</message>
<message>
<source>Synchronizing with network...</source>
<translation>مزامنة مع الشبكة ...</translation>
</message>
<message>
<source>&Overview</source>
<translation>&نظرة عامة</translation>
</message>
<message>
<source>Node</source>
<translation>جهاز</translation>
</message>
<message>
<source>Show general overview of wallet</source>
<translation>إظهار نظرة عامة على المحفظة</translation>
</message>
<message>
<source>&Transactions</source>
<translation>&المعاملات</translation>
</message>
<message>
<source>Browse transaction history</source>
<translation>تصفح سجل المعاملات</translation>
</message>
<message>
<source>E&xit</source>
<translation>خروج</translation>
</message>
<message>
<source>Quit application</source>
<<<<<<< HEAD
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Show information about Litecoin</source>
<translation type="unfinished"/>
=======
<translation>الخروج من التطبيق</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>About &Qt</source>
<translation>عن</translation>
</message>
<message>
<source>Show information about Qt</source>
<translation>اظهر المعلومات</translation>
</message>
<message>
<source>&Options...</source>
<translation>&خيارات ...</translation>
</message>
<message>
<source>&Encrypt Wallet...</source>
<translation>&تشفير المحفظة</translation>
</message>
<message>
<source>&Backup Wallet...</source>
<translation>&نسخ احتياط للمحفظة</translation>
</message>
<message>
<source>&Change Passphrase...</source>
<translation>&تغيير كلمة المرور</translation>
</message>
<message>
<source>&Sending addresses...</source>
<translation>ارسال العناوين.</translation>
</message>
<message>
<source>&Receiving addresses...</source>
<translation>استقبال العناوين</translation>
</message>
<message>
<source>Open &URI...</source>
<translation>افتح &URI...</translation>
</message>
<message>
<source>Litecoin Core client</source>
<translation>عميل litecoin core</translation>
</message>
<message>
<source>Importing blocks from disk...</source>
<translation>استيراد كتل من القرص ...</translation>
</message>
<message>
<source>Reindexing blocks on disk...</source>
<translation>إعادة فهرسة الكتل على القرص</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-347"/>
<source>Send coins to a Litecoin address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+49"/>
<source>Modify configuration options for Litecoin</source>
<translation type="unfinished"/>
=======
<source>Send coins to a Litecoin address</source>
<translation>ارسل عملات الى عنوان Litecoin</translation>
</message>
<message>
<source>Modify configuration options for Litecoin</source>
<translation>تعديل إعدادات litecoin</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Backup wallet to another location</source>
<translation>احفظ نسخة احتياطية للمحفظة في مكان آخر</translation>
</message>
<message>
<source>Change the passphrase used for wallet encryption</source>
<translation>تغيير كلمة المرور المستخدمة لتشفير المحفظة</translation>
</message>
<message>
<source>&Debug window</source>
<translation>&نافذة المعالجة</translation>
</message>
<message>
<source>&Verify message...</source>
<translation>&التحقق من الرسالة...</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-165"/>
<location line="+530"/>
<source>Litecoin</source>
<translation type="unfinished"/>
=======
<source>Litecoin</source>
<translation>بت كوين</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Wallet</source>
<translation>محفظة</translation>
</message>
<message>
<source>&Receive</source>
<translation>&استقبل</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+22"/>
<source>&About Litecoin</source>
<translation type="unfinished"/>
=======
<source>Show information about Litecoin Core</source>
<translation> اظهار معلومات حول Litecoin core</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>&Show / Hide</source>
<translation>&عرض / اخفاء</translation>
</message>
<message>
<source>Show or hide the main Window</source>
<translation>عرض او اخفاء النافذة الرئيسية</translation>
</message>
<message>
<source>Encrypt the private keys that belong to your wallet</source>
<<<<<<< HEAD
<translation type="unfinished"/>
</message>
<message>
<location line="+7"/>
<source>Sign messages with your Litecoin addresses to prove you own them</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Verify messages to ensure they were signed with specified Litecoin addresses</source>
<translation type="unfinished"/>
=======
<translation>تشفير المفتاح الخاص لمحفظتك</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>&File</source>
<translation>&ملف</translation>
</message>
<message>
<source>&Settings</source>
<translation>&الاعدادات</translation>
</message>
<message>
<source>&Help</source>
<translation>&مساعدة</translation>
</message>
<message>
<source>Tabs toolbar</source>
<<<<<<< HEAD
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<location line="+10"/>
<source>[testnet]</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+47"/>
<source>Litecoin client</source>
<translation type="unfinished"/>
</message>
<message numerus="yes">
<location line="+141"/>
<source>%n active connection(s) to Litecoin network</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
</message>
<message>
<location line="+22"/>
<source>No block source available...</source>
<translation type="unfinished"/>
=======
<translation>شريط أدوات علامات التبويب</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Litecoin Core</source>
<translation>جوهر البيت كوين</translation>
</message>
<message>
<source>&About Litecoin Core</source>
<translation>حول litecoin core</translation>
</message>
<message numerus="yes">
<source>%n hour(s)</source>
<translation><numerusform>%n ساعة</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعة</numerusform><numerusform>%n ساعات</numerusform><numerusform>%n ساعات</numerusform><numerusform>%n ساعات</numerusform></translation>
</message>
<message numerus="yes">
<source>%n day(s)</source>
<translation><numerusform>%n يوم</numerusform><numerusform>%n يوم</numerusform><numerusform>%n يوم</numerusform><numerusform>%n أيام</numerusform><numerusform>%n أيام</numerusform><numerusform>%n ايام</numerusform></translation>
</message>
<message numerus="yes">
<source>%n week(s)</source>
<translation><numerusform>%n اسبوع</numerusform><numerusform>%n اسبوع</numerusform><numerusform>%n اسبوع</numerusform><numerusform>%n اسابيع</numerusform><numerusform>%n اسابيع</numerusform><numerusform>%n اسابيع</numerusform></translation>
</message>
<message>
<source>Error</source>
<translation>خطأ</translation>
</message>
<message>
<source>Warning</source>
<translation>تحذير</translation>
</message>
<message>
<source>Information</source>
<translation>معلومات</translation>
</message>
<message>
<source>Up to date</source>
<translation>محدث</translation>
</message>
<message>
<source>Catching up...</source>
<translation>اللحاق بالركب ...</translation>
</message>
<message>
<source>Sent transaction</source>
<translation>المعاملات المرسلة</translation>
</message>
<message>
<source>Incoming transaction</source>
<<<<<<< HEAD
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+33"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid Litecoin address or malformed URI parameters.</source>
<translation type="unfinished"/>
=======
<translation>المعاملات الواردة</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation>المحفظة <b>مشفرة</b> و <b>مفتوحة</b> حاليا</translation>
</message>
<message>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<<<<<<< HEAD
<translation type="unfinished"/>
</message>
<message>
<location filename="../bitcoin.cpp" line="+111"/>
<source>A fatal error occurred. Litecoin can no longer continue safely and will quit.</source>
<translation type="unfinished"/>
=======
<translation>المحفظة <b>مشفرة</b> و <b>مقفلة</b> حاليا</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<source>Network Alert</source>
<translation>تنبيه من الشبكة</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<source>Quantity:</source>
<translation>الكمية:</translation>
</message>
<message>
<source>Amount:</source>
<translation>القيمة</translation>
</message>
<message>
<source>Priority:</source>
<translation>افضلية :</translation>
</message>
<message>
<source>Fee:</source>
<translation>رسوم :</translation>
</message>
<message>
<source>After Fee:</source>
<translation>بعد الرسوم :</translation>
</message>
<message>
<source>Change:</source>
<translation>تعديل :</translation>
</message>
<message>
<source>Amount</source>
<translation>المبلغ</translation>
</message>
<message>
<source>Date</source>
<translation>التاريخ</translation>
</message>
<message>
<source>Confirmations</source>
<translation>تأكيد</translation>
</message>
<message>
<source>Confirmed</source>
<translation>تأكيد</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-5"/>
<source>The entered address "%1" is not a valid Litecoin address.</source>
<translation type="unfinished"/>
=======
<source>Priority</source>
<translation>أفضلية</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Copy address</source>
<translation> انسخ العنوان</translation>
</message>
<message>
<source>Copy label</source>
<translation> انسخ التسمية</translation>
</message>
<message>
<<<<<<< HEAD
<location filename="../guiutil.cpp" line="+424"/>
<location line="+12"/>
<source>Litecoin-Qt</source>
<translation type="unfinished"/>
=======
<source>Copy amount</source>
<translation>نسخ القيمة</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Copy transaction ID</source>
<translation>نسخ رقم المعاملة</translation>
</message>
<message>
<source>Copy quantity</source>
<translation>نسخ الكمية</translation>
</message>
<message>
<source>Copy fee</source>
<translation>نسخ الرسوم</translation>
</message>
<message>
<source>Copy after fee</source>
<translation>نسخ بعد الرسوم</translation>
</message>
<message>
<source>Copy priority</source>
<translation>نسخ الافضلية</translation>
</message>
<message>
<source>Copy change</source>
<translation>نسخ التغييرات</translation>
</message>
<message>
<source>highest</source>
<translation>الاعلى</translation>
</message>
<message>
<source>higher</source>
<translation>اعلى</translation>
</message>
<message>
<source>high</source>
<translation>عالي</translation>
</message>
<message>
<source>medium-high</source>
<translation>متوسط-مرتفع</translation>
</message>
<message>
<source>low</source>
<translation>منخفض</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+31"/>
<source>Automatically start Litecoin after logging in to the system.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>&Start Litecoin on system login</source>
<translation type="unfinished"/>
=======
<source>lower</source>
<translation>أدنى</translation>
</message>
<message>
<source>lowest</source>
<translation>الأدنى</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>none</source>
<translation>لا شيء</translation>
</message>
<message>
<source>yes</source>
<translation>نعم</translation>
</message>
<message>
<source>no</source>
<translation>لا</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+6"/>
<source>Automatically open the Litecoin client port on the router. This only works when your router supports UPnP and it is enabled.</source>
<translation type="unfinished"/>
=======
<source>(no label)</source>
<translation>(لا وصف)</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>(change)</source>
<translation>(تغير)</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<<<<<<< HEAD
<location line="+7"/>
<source>Connect to the Litecoin network through a SOCKS proxy (e.g. when connecting through Tor).</source>
<translation type="unfinished"/>
=======
<source>Edit Address</source>
<translation>عدل العنوان</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>&Label</source>
<translation>&وصف</translation>
</message>
<message>
<source>&Address</source>
<translation>&العنوان</translation>
</message>
<message>
<source>New receiving address</source>
<translation>عنوان أستلام جديد</translation>
</message>
<message>
<source>New sending address</source>
<translation>عنوان إرسال جديد</translation>
</message>
<message>
<source>Edit receiving address</source>
<translation>تعديل عنوان الأستلام</translation>
</message>
<message>
<source>Edit sending address</source>
<translation>تعديل عنوان الارسال</translation>
</message>
<message>
<source>The entered address "%1" is already in the address book.</source>
<translation>هدا العنوان "%1" موجود مسبقا في دفتر العناوين</translation>
</message>
<message>
<source>Could not unlock wallet.</source>
<translation> يمكن فتح المحفظة.</translation>
</message>
<message>
<source>New key generation failed.</source>
<translation>فشل توليد مفتاح جديد.</translation>
</message>
</context>
<context>
<name>FreespaceChecker</name>
<message>
<source>A new data directory will be created.</source>
<translation>سيتم انشاء دليل بيانات جديد</translation>
</message>
<message>
<source>name</source>
<translation>الاسم</translation>
</message>
<message>
<source>Cannot create data directory here.</source>
<translation>لا يمكن انشاء دليل بيانات هنا .</translation>
</message>
</context>
<context>
<name>HelpMessageDialog</name>
<message>
<source>Litecoin Core</source>
<translation>جوهر البيت كوين</translation>
</message>
<message>
<source>version</source>
<translation>النسخة</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+13"/>
<source>The user interface language can be set here. This setting will take effect after restarting Litecoin.</source>
<translation type="unfinished"/>
=======
<source>About Litecoin Core</source>
<translation>عن جوهر البيت كوين</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Usage:</source>
<translation>المستخدم</translation>
</message>
<message>
<source>UI options</source>
<translation>خيارات UI</translation>
</message>
</context>
<context>
<name>Intro</name>
<message>
<<<<<<< HEAD
<location line="+9"/>
<source>Whether to show Litecoin addresses in the transaction list or not.</source>
<translation type="unfinished"/>
=======
<source>Welcome</source>
<translation>أهلا</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Use the default data directory</source>
<translation>استخدام دليل البانات الافتراضي</translation>
</message>
<message>
<source>Use a custom data directory:</source>
<translation>استخدام دليل بيانات مخصص:</translation>
</message>
<message>
<source>Litecoin Core</source>
<translation>جوهر البيت كوين</translation>
</message>
<message>
<source>Error</source>
<translation>خطأ</translation>
</message>
</context>
<context>
<name>OpenURIDialog</name>
<message>
<source>Select payment request file</source>
<translation>حدد ملف طلب الدفع</translation>
</message>
<message>
<source>Select payment request file to open</source>
<translation>حدد ملف طلب الدفع لفتحه</translation>
</message>
</context>
<context>
<name>OptionsDialog</name>
<message>
<source>Options</source>
<translation>خيارات ...</translation>
</message>
<message>
<source>&Main</source>
<translation>&الرئيسي</translation>
</message>
<message>
<source>MB</source>
<translation>م ب</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-9"/>
<location line="+9"/>
<source>This setting will take effect after restarting Litecoin.</source>
<translation type="unfinished"/>
=======
<source>Accept connections from outside</source>
<translation>إقبل التواصل من الخارج</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Third party transaction URLs</source>
<translation>عنوان النطاق للطرف الثالث</translation>
</message>
<message>
<source>&Reset Options</source>
<translation>&استعادة الخيارات</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+50"/>
<location line="+166"/>
<source>The displayed information may be out of date. Your wallet automatically synchronizes with the Litecoin network after a connection is established, but this process has not completed yet.</source>
<translation type="unfinished"/>
=======
<source>&Network</source>
<translation>&الشبكة</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>W&allet</source>
<translation>&محفظة</translation>
</message>
<message>
<source>Expert</source>
<translation>تصدير</translation>
</message>
<message>
<source>Proxy &IP:</source>
<translation>بروكسي &اي بي:</translation>
</message>
<message>
<source>&Port:</source>
<translation>&المنفذ:</translation>
</message>
<message>
<source>Port of the proxy (e.g. 9050)</source>
<translation>منفذ البروكسي (مثلا 9050)</translation>
</message>
<message>
<source>&Window</source>
<translation>نافذه</translation>
</message>
<message>
<source>&Display</source>
<translation>&عرض</translation>
</message>
<message>
<source>User Interface &language:</source>
<translation>واجهة المستخدم &اللغة:</translation>
</message>
<message>
<source>&OK</source>
<translation>تم</translation>
</message>
<message>
<source>&Cancel</source>
<translation>الغاء</translation>
</message>
<message>
<source>default</source>
<translation>الافتراضي</translation>
</message>
<message>
<source>none</source>
<translation>لا شيء</translation>
</message>
<message>
<<<<<<< HEAD
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start litecoin: click-to-pay handler</source>
<translation type="unfinished"/>
=======
<source>Confirm options reset</source>
<translation>تأكيد استعادة الخيارات</translation>
</message>
<message>
<source>The supplied proxy address is invalid.</source>
<translation>عنوان الوكيل توفيره غير صالح.</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
</context>
<context>
<name>OverviewPage</name>
<message>
<source>Form</source>
<translation>نمودج</translation>
</message>
<message>
<source>Available:</source>
<translation>متوفر</translation>
</message>
<message>
<source>Pending:</source>
<translation>معلق:</translation>
</message>
<message>
<source>Immature:</source>
<translation>غير ناضجة</translation>
</message>
<message>
<source>Total:</source>
<translation>المجموع:</translation>
</message>
<message>
<source>Your current total balance</source>
<translation>رصيدك الكلي الحالي</translation>
</message>
<message>
<source>out of sync</source>
<translation>خارج المزامنه</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
</context>
<context>
<name>PeerTableModel</name>
</context>
<context>
<name>QObject</name>
<message>
<source>Amount</source>
<translation>المبلغ</translation>
</message>
<message>
<source>UNKNOWN</source>
<translation>غير معروف</translation>
</message>
<message>
<source>N/A</source>
<translation>غير معروف</translation>
</message>
</context>
<context>
<name>QRImageWidget</name>
<message>
<source>&Save Image...</source>
<translation>&حفظ الصورة</translation>
</message>
<message>
<source>&Copy Image</source>
<translation>&نسخ الصورة</translation>
</message>
<message>
<source>Save QR Code</source>
<translation>حفظ رمز الاستجابة السريعة QR</translation>
</message>
<message>
<source>PNG Image (*.png)</source>
<translation>صورة PNG (*.png)</translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<source>Client name</source>
<translation>اسم العميل</translation>
</message>
<message>
<source>N/A</source>
<translation>غير معروف</translation>
</message>
<message>
<source>Client version</source>
<translation>نسخه العميل</translation>
</message>
<message>
<source>&Information</source>
<translation>المعلومات</translation>
</message>
<message>
<source>General</source>
<translation>عام</translation>
</message>
<message>
<source>Startup time</source>
<translation>وقت البدء</translation>
</message>
<message>
<source>Network</source>
<translation>الشبكه</translation>
</message>
<message>
<source>Name</source>
<translation>الاسم</translation>
</message>
<message>
<source>Number of connections</source>
<translation>عدد الاتصالات</translation>
</message>
<message>
<source>Received</source>
<translation>إستقبل</translation>
</message>
<message>
<source>Sent</source>
<translation>تم الإرسال</translation>
</message>
<message>
<source>Direction</source>
<translation>جهة</translation>
</message>
<message>
<source>Services</source>
<translation>خدمات</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+7"/>
<source>Show the Litecoin-Qt help message to get a list with possible Litecoin command-line options.</source>
<translation type="unfinished"/>
=======
<source>Last Send</source>
<translation>آخر استقبال</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Last Receive</source>
<translation>آخر إرسال</translation>
</message>
<message>
<source>&Open</source>
<translation>الفتح</translation>
</message>
<message>
<source>&Network Traffic</source>
<translation>&حركة مرور الشبكة</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-104"/>
<source>Litecoin - Debug window</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+25"/>
<source>Litecoin Core</source>
<translation type="unfinished"/>
=======
<source>&Clear</source>
<translation>&مسح</translation>
</message>
<message>
<source>Totals</source>
<translation>المجاميع</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>In:</source>
<translation>داخل:</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+7"/>
<source>Open the Litecoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"/>
=======
<source>Out:</source>
<translation>خارج:</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Build date</source>
<translation>وقت البناء</translation>
</message>
<message>
<<<<<<< HEAD
<location filename="../rpcconsole.cpp" line="-30"/>
<source>Welcome to the Litecoin RPC console.</source>
<translation type="unfinished"/>
=======
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>استخدم اسهم الاعلى و الاسفل للتنقل بين السجلات و <b>Ctrl-L</b> لمسح الشاشة</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Unknown</source>
<translation>غير معرف</translation>
</message>
<message>
<source>Fetching...</source>
<translation>جاري الجلب...</translation>
</message>
</context>
<context>
<name>ReceiveCoinsDialog</name>
<message>
<source>&Amount:</source>
<translation>&القيمة</translation>
</message>
<message>
<source>&Label:</source>
<translation>&الوصف:</translation>
</message>
<message>
<source>&Message:</source>
<translation>&رسالة:</translation>
</message>
<message>
<source>Clear all fields of the form.</source>
<translation>مسح كل حقول النموذج المطلوبة</translation>
</message>
<message>
<source>Clear</source>
<translation>مسح</translation>
</message>
<message>
<source>Requested payments history</source>
<translation>سجل طلبات الدفع</translation>
</message>
<message>
<source>Show</source>
<translation>عرض</translation>
</message>
<message>
<source>Remove</source>
<translation>ازل</translation>
</message>
<message>
<source>Copy label</source>
<translation> انسخ التسمية</translation>
</message>
<message>
<source>Copy message</source>
<translation>انسخ الرسالة</translation>
</message>
<message>
<source>Copy amount</source>
<translation>نسخ القيمة</translation>
</message>
</context>
<context>
<name>ReceiveRequestDialog</name>
<message>
<source>QR Code</source>
<translation>رمز كيو ار</translation>
</message>
<message>
<source>Copy &URI</source>
<translation>نسخ &URI</translation>
</message>
<message>
<source>Copy &Address</source>
<translation>نسخ &العنوان</translation>
</message>
<message>
<source>&Save Image...</source>
<translation>&حفظ الصورة</translation>
</message>
<message>
<source>Payment information</source>
<translation>معلومات الدفع</translation>
</message>
<message>
<source>URI</source>
<translation> URI</translation>
</message>
<message>
<source>Address</source>
<translation>عنوان</translation>
</message>
<message>
<source>Amount</source>
<translation>المبلغ</translation>
</message>
<message>
<source>Label</source>
<translation>وصف</translation>
</message>
<message>
<source>Message</source>
<translation>رسالة</translation>
</message>
</context>
<context>
<name>RecentRequestsTableModel</name>
<message>
<source>Date</source>
<translation>التاريخ</translation>
</message>
<message>
<source>Label</source>
<translation>وصف</translation>
</message>
<message>
<source>Message</source>
<translation>رسالة</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+34"/>
<source>The address to send the payment to (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
=======
<source>Amount</source>
<translation>المبلغ</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>(no label)</source>
<translation>(لا وصف)</translation>
</message>
<message>
<source>(no message)</source>
<translation>( لا رسائل )</translation>
</message>
</context>
<context>
<name>SendCoinsDialog</name>
<message>
<source>Send Coins</source>
<translation>إرسال Coins</translation>
</message>
<message>
<source>automatically selected</source>
<translation>اختيار تلقائيا</translation>
</message>
<message>
<source>Insufficient funds!</source>
<translation>الرصيد غير كافي!</translation>
</message>
<message>
<source>Quantity:</source>
<translation>الكمية :</translation>
</message>
<message>
<source>Amount:</source>
<translation>القيمة :</translation>
</message>
<message>
<<<<<<< HEAD
<location filename="../sendcoinsentry.cpp" line="+1"/>
<source>Enter a Litecoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
=======
<source>Priority:</source>
<translation>افضلية :</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Fee:</source>
<translation>رسوم :</translation>
</message>
<message>
<source>After Fee:</source>
<translation>بعد الرسوم :</translation>
</message>
<message>
<source>Change:</source>
<translation>تعديل :</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+18"/>
<source>The address to sign the message with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
=======
<source>Send to multiple recipients at once</source>
<translation>إرسال إلى عدة مستلمين في وقت واحد</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Add &Recipient</source>
<translation>أضافة &مستلم</translation>
</message>
<message>
<source>Clear all fields of the form.</source>
<translation>مسح كل حقول النموذج المطلوبة</translation>
</message>
<message>
<source>Clear &All</source>
<translation>مسح الكل</translation>
</message>
<message>
<source>Balance:</source>
<translation>الرصيد:</translation>
</message>
<message>
<source>Confirm the send action</source>
<translation>تأكيد الإرسال</translation>
</message>
<message>
<source>S&end</source>
<translation>&ارسال</translation>
</message>
<message>
<source>Confirm send coins</source>
<translation>تأكيد الإرسال Coins</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+21"/>
<source>Sign the message to prove you own this Litecoin address</source>
<translation type="unfinished"/>
=======
<source>Copy quantity</source>
<translation>نسخ الكمية </translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Copy amount</source>
<translation>نسخ القيمة</translation>
</message>
<message>
<source>Copy fee</source>
<translation>نسخ الرسوم</translation>
</message>
<message>
<source>Copy after fee</source>
<translation>نسخ بعد الرسوم</translation>
</message>
<message>
<source>Copy priority</source>
<translation>نسخ الافضلية</translation>
</message>
<message>
<source>Copy change</source>
<translation>نسخ التعديل</translation>
</message>
<message>
<source>or</source>
<translation>أو</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+21"/>
<source>The address the message was signed with (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+40"/>
<source>Verify the message to ensure it was signed with the specified Litecoin address</source>
<translation type="unfinished"/>
=======
<source>The amount to pay must be larger than 0.</source>
<translation>المبلغ المدفوع يجب ان يكون اكبر من 0</translation>
</message>
<message>
<source>The amount exceeds your balance.</source>
<translation>القيمة تتجاوز رصيدك</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>(no label)</source>
<translation>(لا وصف)</translation>
</message>
</context>
<context>
<name>SendCoinsEntry</name>
<message>
<source>Pay &To:</source>
<translation>ادفع &الى :</translation>
</message>
<message>
<source>Enter a label for this address to add it to your address book</source>
<translation>إدخال تسمية لهذا العنوان لإضافته إلى دفتر العناوين الخاص بك</translation>
</message>
<message>
<source>&Label:</source>
<translation>&وصف :</translation>
</message>
<message>
<<<<<<< HEAD
<location filename="../signverifymessagedialog.cpp" line="+27"/>
<location line="+3"/>
<source>Enter a Litecoin address (e.g. Ler4HNAEfwYhBmGXcFP2Po1NpRUEiK8km2)</source>
<translation type="unfinished"/>
=======
<source>Alt+A</source>
<translation>Alt+A</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>Paste address from clipboard</source>
<translation>الصق العنوان من لوحة المفاتيح</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+3"/>
<source>Enter Litecoin signature</source>
<translation type="unfinished"/>
=======
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<source>Message:</source>
<translation>الرسائل</translation>
</message>
</context>
<context>
<name>ShutdownWindow</name>
<message>
<source>Do not shut down the computer until this window disappears.</source>
<translation>لا توقف عمل الكمبيوتر حتى تختفي هذه النافذة</translation>
</message>
</context>
<context>
<name>SignVerifyMessageDialog</name>
<message>
<source>&Sign Message</source>
<translation>&توقيع الرسالة</translation>
</message>
<message>
<source>Alt+A</source>
<translation>Alt+A</translation>
</message>
<message>
<source>Paste address from clipboard</source>
<translation>انسخ العنوان من لوحة المفاتيح</translation>
</message>
<message>
<source>Alt+P</source>
<translation>Alt+P</translation>
</message>
<message>
<source>Enter the message you want to sign here</source>
<translation>ادخل الرسالة التي تريد توقيعها هنا</translation>
</message>
<message>
<source>Signature</source>
<translation>التوقيع</translation>
</message>
<message>
<source>Sign the message to prove you own this Litecoin address</source>
<translation>وقع الرسالة لتثبت انك تمتلك عنوان البت كوين هذا</translation>
</message>
<message>
<source>Sign &Message</source>
<translation>توقيع $الرسالة</translation>
</message>
<message>
<source>Clear &All</source>
<translation>مسح الكل</translation>
</message>
<message>
<source>&Verify Message</source>
<translation>&تحقق رسالة</translation>
</message>
<message>
<source>Verify &Message</source>
<translation>تحقق &الرسالة</translation>
</message>
<message>
<source>Click "Sign Message" to generate signature</source>
<translation>اضغط "توقيع الرسالة" لتوليد التوقيع</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>The entered address is invalid.</source>
<translation>العنوان المدخل غير صالح</translation>
</message>
<message>
<source>Please check the address and try again.</source>
<translation>الرجاء التأكد من العنوان والمحاولة مرة اخرى</translation>
</message>
<message>
<source>The entered address does not refer to a key.</source>
<translation>العنوان المدخل لا يشير الى مفتاح</translation>
</message>
<message>
<source>Wallet unlock was cancelled.</source>
<translation>تم الغاء عملية فتح المحفظة</translation>
</message>
<message>
<source>Private key for the entered address is not available.</source>
<translation>المفتاح الخاص للعنوان المدخل غير موجود.</translation>
</message>
<message>
<source>Message signing failed.</source>
<translation>فشل توقيع الرسالة.</translation>
</message>
<message>
<source>Message signed.</source>
<translation>الرسالة موقعة.</translation>
</message>
<message>
<source>Please check the signature and try again.</source>
<translation>فضلا تاكد من التوقيع وحاول مرة اخرى</translation>
</message>
<message>
<source>Message verification failed.</source>
<translation>فشلت عملية التأكد من الرسالة.</translation>
</message>
<message>
<source>Message verified.</source>
<translation>تم تأكيد الرسالة.</translation>
</message>
</context>
<context>
<name>SplashScreen</name>
<message>
<<<<<<< HEAD
<location filename="../splashscreen.cpp" line="+22"/>
<source>The Litecoin developers</source>
<translation type="unfinished"/>
=======
<source>Litecoin Core</source>
<translation>جوهر البيت كوين</translation>
</message>
<message>
<source>The Bitcoin Core developers</source>
<translation>مطوري جوهر البيت كوين</translation>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
</message>
<message>
<source>[testnet]</source>
<translation>[testnet]</translation>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
</context>
<context>
<name>TransactionDesc</name>
<message>
<source>conflicted</source>
<translation>يتعارض</translation>
</message>
<message>
<source>%1 confirmations</source>
<translation>تأكيد %1</translation>
</message>
<message>
<source>Status</source>
<translation>الحالة.</translation>
</message>
<message>
<source>Date</source>
<translation>التاريخ</translation>
</message>
<message>
<source>Source</source>
<translation>المصدر</translation>
</message>
<message>
<source>Generated</source>
<translation>تم اصداره.</translation>
</message>
<message>
<source>From</source>
<translation>من</translation>
</message>
<message>
<source>To</source>
<translation>الى</translation>
</message>
<message>
<source>own address</source>
<translation>عنوانه</translation>
</message>
<message>
<source>label</source>
<translation>علامة</translation>
</message>
<message>
<source>not accepted</source>
<translation>غير مقبولة</translation>
</message>
<message>
<source>Debit</source>
<translation>دين</translation>
</message>
<message>
<source>Transaction fee</source>
<translation>رسوم المعاملة</translation>
</message>
<message>
<source>Message</source>
<translation>رسالة </translation>
</message>
<message>
<source>Comment</source>
<translation>تعليق</translation>
</message>
<message>
<source>Transaction ID</source>
<translation>رقم المعاملة</translation>
</message>
<message>
<source>Merchant</source>
<translation>تاجر</translation>
</message>
<message>
<source>Transaction</source>
<translation>معاملة</translation>
</message>
<message>
<source>Amount</source>
<translation>المبلغ</translation>
</message>
<message>
<source>true</source>
<translation>صحيح</translation>
</message>
<message>
<source>false</source>
<translation>خاطئ</translation>
</message>
<message>
<source>, has not been successfully broadcast yet</source>
<translation>, لم يتم حتى الآن البث بنجاح</translation>
</message>
<message>
<source>unknown</source>
<translation>غير معروف</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<source>Transaction details</source>
<translation>تفاصيل المعاملة</translation>
</message>
<message>
<source>This pane shows a detailed description of the transaction</source>
<translation>يبين هذا الجزء وصفا مفصلا لهده المعاملة</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<source>Date</source>
<translation>التاريخ</translation>
</message>
<message>
<source>Type</source>
<translation>النوع</translation>
</message>
<message>
<source>Address</source>
<translation>عنوان</translation>
</message>
<message>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>لم يتم تلقى هذه الكتلة (Block) من قبل أي العقد الأخرى وربما لن تكون مقبولة!</translation>
</message>
<message>
<source>Generated but not accepted</source>
<translation>ولدت ولكن لم تقبل</translation>
</message>
<message>
<source>Offline</source>
<translation>غير متصل</translation>
</message>
<message>
<source>Received with</source>
<translation>استقبل مع</translation>
</message>
<message>
<source>Received from</source>
<translation>استقبل من</translation>
</message>
<message>
<source>Sent to</source>
<translation>أرسل إلى</translation>
</message>
<message>
<source>Payment to yourself</source>
<translation>دفع لنفسك</translation>
</message>
<message>
<source>Mined</source>
<translation>Mined</translation>
</message>
<message>
<source>(n/a)</source>
<translation>غير متوفر</translation>
</message>
<message>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>حالة المعاملة. تحوم حول هذا الحقل لعرض عدد التأكيدات.</translation>
</message>
<message>
<source>Date and time that the transaction was received.</source>
<translation>التاريخ والوقت الذي تم فيه تلقي المعاملة.</translation>
</message>
<message>
<source>Type of transaction.</source>
<translation>نوع المعاملات</translation>
</message>
<message>
<source>Destination address of transaction.</source>
<translation>عنوان وجهة المعاملة</translation>
</message>
<message>
<source>Amount removed from or added to balance.</source>
<translation>المبلغ الذي أزيل أو أضيف الى الرصيد</translation>
</message>
</context>
<context>
<name>TransactionView</name>
<message>
<source>All</source>
<translation>الكل</translation>
</message>
<message>
<source>Today</source>
<translation>اليوم</translation>
</message>
<message>
<source>This week</source>
<translation>هدا الاسبوع</translation>
</message>
<message>
<source>This month</source>
<translation>هدا الشهر</translation>
</message>
<message>
<source>Last month</source>
<translation>الشهر الماضي</translation>
</message>
<message>
<source>This year</source>
<translation>هدا العام</translation>
</message>
<message>
<source>Range...</source>
<translation>المدى...</translation>
</message>
<message>
<source>Received with</source>
<translation>استقبل مع</translation>
</message>
<message>
<source>Sent to</source>
<translation>أرسل إلى</translation>
</message>
<message>
<source>To yourself</source>
<translation>إليك</translation>
</message>
<message>
<source>Mined</source>
<translation>Mined</translation>
</message>
<message>
<source>Other</source>
<translation>اخرى</translation>
</message>
<message>
<source>Enter address or label to search</source>
<translation>ادخل عنوان أووصف للبحث</translation>
</message>
<message>
<source>Min amount</source>
<translation>الحد الأدنى</translation>
</message>
<message>
<source>Copy address</source>
<translation> انسخ عنوان</translation>
</message>
<message>
<source>Copy label</source>
<translation> انسخ التسمية</translation>
</message>
<message>
<source>Copy amount</source>
<translation>نسخ الكمية</translation>
</message>
<message>
<source>Copy transaction ID</source>
<translation>نسخ رقم العملية</translation>
</message>
<message>
<source>Edit label</source>
<translation>عدل الوصف</translation>
</message>
<message>
<source>Show transaction details</source>
<translation>عرض تفاصيل المعاملة</translation>
</message>
<message>
<source>Exporting Failed</source>
<translation>فشل التصدير</translation>
</message>
<message>
<source>Exporting Successful</source>
<translation>نجح التصدير</translation>
</message>
<message>
<source>Comma separated file (*.csv)</source>
<translation>ملف مفصول بفواصل (*.csv)</translation>
</message>
<message>
<source>Confirmed</source>
<translation>تأكيد</translation>
</message>
<message>
<source>Date</source>
<translation>التاريخ</translation>
</message>
<message>
<source>Type</source>
<translation>النوع</translation>
</message>
<message>
<source>Label</source>
<translation>وصف</translation>
</message>
<message>
<source>Address</source>
<translation>عنوان</translation>
</message>
<message>
<source>ID</source>
<translation>العنوان</translation>
</message>
<message>
<source>Range:</source>
<translation>المدى:</translation>
</message>
<message>
<source>to</source>
<translation>الى</translation>
</message>
</context>
<context>
<name>UnitDisplayStatusBarControl</name>
</context>
<context>
<name>WalletFrame</name>
</context>
<context>
<name>WalletModel</name>
<message>
<source>Send Coins</source>
<translation>إرسال Coins</translation>
</message>
</context>
<context>
<name>WalletView</name>
<message>
<source>&Export</source>
<translation>&تصدير</translation>
</message>
<message>
<source>Export the data in the current tab to a file</source>
<translation>تحميل البيانات في علامة التبويب الحالية إلى ملف.</translation>
</message>
<message>
<source>Backup Wallet</source>
<translation>نسخ احتياط للمحفظة</translation>
</message>
<message>
<source>Backup Failed</source>
<translation>فشل النسخ الاحتياطي</translation>
</message>
<message>
<source>Backup Successful</source>
<translation>نجاح النسخ الاحتياطي</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<<<<<<< HEAD
<location filename="../bitcoinstrings.cpp" line="+94"/>
<source>Litecoin version</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+102"/>
<source>Usage:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>Send command to -server or litecoind</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-23"/>
<source>List commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-12"/>
<source>Get help for a command</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+24"/>
<source>Specify configuration file (default: litecoin.conf)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Specify pid file (default: litecoind.pid)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-9"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-28"/>
<source>Listen for connections on <port> (default: 9333 or testnet: 19333)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-48"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+82"/>
<source>Specify your own public address</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-134"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-29"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+27"/>
<source>Listen for JSON-RPC connections on <port> (default: 9332 or testnet: 19332)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
<source>Accept command line and JSON-RPC commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+76"/>
<source>Run in the background as a daemon and accept commands</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+37"/>
=======
<source>Options:</source>
<translation>خيارات: </translation>
</message>
<message>
<source>Specify data directory</source>
<translation>حدد مجلد المعلومات</translation>
</message>
<message>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
<source>Use the test network</source>
<translation>استخدم التحقق من الشبكه</translation>
</message>
<message>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<<<<<<< HEAD
<translation type="unfinished"/>
</message>
<message>
<location line="-80"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=litecoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "Litecoin Alert" admin@foo.com
</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+17"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Bind to given address and always listen on it. Use [host]:port notation for IPv6</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Cannot obtain a lock on data directory %s. Litecoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Error: The transaction was rejected! This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+11"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+6"/>
<source>This is a pre-release test build - use at your own risk - do not use for mining or merchant applications</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Displayed transactions may not be correct! You may need to upgrade, or other nodes may need to upgrade.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong Litecoin will not work properly.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+14"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Block creation options:</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Connect only to the specified node(s)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Corrupted block database detected</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Do you want to rebuild the block database now?</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Error initializing block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error initializing wallet database environment %s!</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Error loading block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+4"/>
<source>Error opening block database</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
=======
<translation>قبول الاتصالات من خارج</translation>
</message>
<message>
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
<source>Error: Disk space is low!</source>
<translation>تحذير: مساحة القرص منخفضة</translation>
</message>
<message>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>فشل في الاستماع على أي منفذ. استخدام الاستماع = 0 إذا كنت تريد هذا.</translation>
</message>
<message>
<source>Invalid -onion address: '%s'</source>
<translation>عنوان اونيون غير صحيح : '%s'</translation>
</message>
<message>
<source>Verifying wallet...</source>
<translation>التحقق من المحفظة ...</translation>
</message>
<message>
<source>Wallet options:</source>
<translation>خيارات المحفظة :</translation>
</message>
<message>
<source>Information</source>
<translation>معلومات</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+2"/>
<source>Only accept block chain matching built-in checkpoints (default: 1)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Prepend debug output with timestamp</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>SSL options: (see the Litecoin Wiki for SSL setup instructions)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+3"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+5"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+2"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+1"/>
=======
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
<source>Signing transaction failed</source>
<translation>فشل توقيع المعاملة</translation>
</message>
<message>
<source>Transaction amount too small</source>
<translation>قيمة العملية صغيره جدا</translation>
</message>
<message>
<source>Transaction amounts must be positive</source>
<translation>يجب ان يكون قيمة العملية بالموجب</translation>
</message>
<message>
<source>Transaction too large</source>
<translation>المعاملة طويلة جدا</translation>
</message>
<message>
<source>Warning</source>
<translation>تحذير</translation>
</message>
<message>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>تحذير : هذا الاصدار قديم , يتطلب التحديث</translation>
</message>
<message>
<source>Upgrade wallet to latest format</source>
<translation>تحديث المحفظة للنسخة الاخيرة</translation>
</message>
<message>
<source>This help message</source>
<translation>رسالة المساعدة هذه</translation>
</message>
<message>
<source>Loading addresses...</source>
<translation>تحميل العنوان</translation>
</message>
<message>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>خطأ عند تنزيل wallet.dat: المحفظة تالفة</translation>
</message>
<message>
<<<<<<< HEAD
<location line="+1"/>
<source>Error loading wallet.dat: Wallet requires newer version of Litecoin</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+93"/>
<source>Wallet needed to be rewritten: restart Litecoin to complete</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-95"/>
=======
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
<source>Error loading wallet.dat</source>
<translation>خطأ عند تنزيل wallet.dat</translation>
</message>
<message>
<source>Invalid -proxy address: '%s'</source>
<translation>عنوان البروكسي غير صحيح : '%s'</translation>
</message>
<message>
<source>Insufficient funds</source>
<translation>اموال غير كافية</translation>
</message>
<message>
<<<<<<< HEAD
<location line="-57"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation type="unfinished"/>
</message>
<message>
<location line="-25"/>
<source>Unable to bind to %s on this computer. Litecoin is probably already running.</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+64"/>
<source>Fee per KB to add to transactions you send</source>
<translation type="unfinished"/>
</message>
<message>
<location line="+19"/>
=======
>>>>>>> d1691e599121d643db2c1f2b5f5529eb64f2a771
<source>Loading wallet...</source>
<translation>تحميل المحفظه</translation>
</message>
<message>
<source>Cannot write default address</source>
<translation>لايمكن كتابة العنوان الافتراضي</translation>
</message>
<message>
<source>Rescanning...</source>
<translation>إعادة مسح</translation>
</message>
<message>
<source>Done loading</source>
<translation>انتهاء التحميل</translation>
</message>
<message>
<source>Error</source>
<translation>خطأ</translation>
</message>
</context>
</TS> | {
"content_hash": "a47eae8ccd861a78701b18631c96955f",
"timestamp": "",
"source": "github",
"line_count": 2448,
"max_line_length": 302,
"avg_line_length": 33.275326797385624,
"alnum_prop": 0.6230941098480198,
"repo_name": "koharjidan/litecoin",
"id": "c3f9171be5d9c93c53420b698a38f6caa262b46f",
"size": "87085",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/qt/locale/bitcoin_ar.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "7639"
},
{
"name": "C",
"bytes": "393447"
},
{
"name": "C++",
"bytes": "4024887"
},
{
"name": "CSS",
"bytes": "1127"
},
{
"name": "Groff",
"bytes": "18043"
},
{
"name": "HTML",
"bytes": "50621"
},
{
"name": "Java",
"bytes": "2100"
},
{
"name": "Makefile",
"bytes": "68663"
},
{
"name": "Objective-C",
"bytes": "2023"
},
{
"name": "Objective-C++",
"bytes": "9224"
},
{
"name": "Protocol Buffer",
"bytes": "2308"
},
{
"name": "Python",
"bytes": "230668"
},
{
"name": "QMake",
"bytes": "16733"
},
{
"name": "Shell",
"bytes": "44272"
}
],
"symlink_target": ""
} |
using System;
using System.Timers;
namespace NginxTray
{
public class ProcessMonitor
{
public string ProcessName
{
get;
set;
}
public delegate void EventHandler(object sender, EventArgs e);
public event EventHandler OnProcessStarted;
public event EventHandler OnProcessExited;
private Timer timer;
private bool processExist = false;
public ProcessMonitor()
{
this.timer = new Timer();
this.timer.Interval = 1000;
this.timer.Elapsed += timer_Elapsed;
}
void timer_Elapsed(object sender, ElapsedEventArgs e)
{
int flag = 0;
// 获取系统的所有进程
System.Diagnostics.Process[] processes = System.Diagnostics.Process.GetProcesses();
for (int i = 0; i < processes.Length; i++)
{
if (String.Compare(processes[i].ProcessName, ProcessName, true) == 0)
{
flag++;
break;
}
}
if (flag > 0 && !this.processExist)
{
this.processExist = true;
OnProcessStarted(this, new EventArgs());
}
if (flag == 0 && this.processExist)
{
this.processExist = false;
OnProcessExited(this, new EventArgs());
}
}
public void Start()
{
this.timer.Start();
}
public void Stop()
{
this.timer.Stop();
}
}
}
| {
"content_hash": "3e70a24d067e8306da0437ad2cdf24c6",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 95,
"avg_line_length": 25.73015873015873,
"alnum_prop": 0.48303516347933373,
"repo_name": "bubkoo/nginx-tray",
"id": "ff37e259feac2aff3e76168ec542ff0a8696f73b",
"size": "1641",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/ProcessMonitor.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "12401"
},
{
"name": "Shell",
"bytes": "2465"
}
],
"symlink_target": ""
} |
'use strict';
/* https://github.com/angular/protractor/blob/master/docs/toc.md */
// Slow down protactor to enjoy :)
var origFn = browser.driver.controlFlow().execute;
browser.driver.controlFlow().execute = function() {
var args = arguments;
// queue 100ms wait
origFn.call(browser.driver.controlFlow(), function() {
return protractor.promise.delayed(100);
});
return origFn.apply(browser.driver.controlFlow(), args);
};
//--------------------------------
describe('my app', function () {
it('should automatically redirect to /order when location hash/fragment is empty', function () {
browser.get('index.html');
expect(browser.getLocationAbsUrl()).toMatch("/order");
});
describe('view1', function () {
beforeEach(function () {
browser.get('index.html#/view1');
});
it('should render view1 when user navigates to /view1', function () {
expect(element.all(by.css('[ng-view] p')).first().getText()).
toMatch(/partial for view 1/);
});
});
describe('view2', function () {
beforeEach(function () {
browser.get('index.html#/view2');
});
it('should render view2 when user navigates to /view2', function () {
expect(element.all(by.css('[ng-view] p')).first().getText()).
toMatch(/partial for view 2/);
});
});
describe('order', function () {
beforeEach(function () {
browser.get('index.html#/order');
});
it('should render order form when user navigates to /order', function () {
element.all(by.tagName('input')).then(function(items) {
expect(items.length).toBe(10);
});
element.all(by.tagName('select')).then(function(items) {
expect(items.length).toBe(1);
});
expect(element(by.className('bg-success')).isDisplayed()).toBeFalsy();
// add form data
element.all(by.model('order.selectedProduct')).get(0).click();
element(by.model('order.fullname')).sendKeys('Protactor name');
element(by.model('order.email')).sendKeys('protactor@gmail.com');
element(by.model('order.phone')).sendKeys('12345678');
element(by.model('order.address')).sendKeys('Address');
element(by.model('order.city')).sendKeys('Citry');
element(by.model('order.state')).sendKeys('State');
selectDropdownByNum(element, 2);
element(by.model('order.acceptedTerms')).click();
// submit form
element(by.className('stretchy-wrapper')).click();
browser.sleep(1000);
expect(element(by.className('bg-success')).isDisplayed()).toBeTruthy();
});
});
var selectDropdownByNum = function ( element, optionNum ) {
if (optionNum){
var options = element.all(by.tagName('option'))
.then(function(options){
options[optionNum].click();
});
}
};
});
| {
"content_hash": "a1d5d761d07ca8e2f9cbb574d0d5b31f",
"timestamp": "",
"source": "github",
"line_count": 104,
"max_line_length": 100,
"avg_line_length": 30.134615384615383,
"alnum_prop": 0.5558391831525208,
"repo_name": "tonkolviktor/adbullion",
"id": "f07f74d2b6d9fea54e847f0547e0fec823caa5c0",
"size": "3134",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "e2e-tests/scenarios.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2086"
},
{
"name": "HTML",
"bytes": "15048"
},
{
"name": "JavaScript",
"bytes": "28416"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "f380e157bdedcaae86aaff552dcd9599",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "b801f23bdd3d0a35d4a3b5265c94ce35ae55f1e6",
"size": "172",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Lamiaceae/Callicarpa/Callicarpa lyi/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Thu Jun 08 23:24:57 CEST 2017 -->
<title>nl.dead_pixel.telebot.plugin (telebot 0.3.3 API)</title>
<meta name="date" content="2017-06-08">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<h1 class="bar"><a href="../../../../nl/dead_pixel/telebot/plugin/package-summary.html" target="classFrame">nl.dead_pixel.telebot.plugin</a></h1>
<div class="indexContainer">
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="AdminPlugin.html" title="class in nl.dead_pixel.telebot.plugin" target="classFrame">AdminPlugin</a></li>
<li><a href="Plugin.html" title="class in nl.dead_pixel.telebot.plugin" target="classFrame">Plugin</a></li>
</ul>
</div>
</body>
</html>
| {
"content_hash": "29443d246d5167e39d6590925a1a93c1",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 145,
"avg_line_length": 46.61904761904762,
"alnum_prop": 0.6700715015321757,
"repo_name": "iSDP/Telebot",
"id": "85bbd9f3e69f3404045729cee250b1669d92eb2d",
"size": "979",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/nl/dead_pixel/telebot/plugin/package-frame.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "194946"
}
],
"symlink_target": ""
} |
package net.nativestruct.implementation.bytecode;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import net.bytebuddy.description.method.MethodDescription;
import net.bytebuddy.description.method.MethodList;
import net.bytebuddy.description.type.TypeDescription;
import net.bytebuddy.dynamic.scaffold.InstrumentedType;
import net.bytebuddy.implementation.Implementation;
import net.nativestruct.AbstractStruct;
import static net.bytebuddy.matcher.ElementMatchers.named;
import static net.bytebuddy.matcher.ElementMatchers.returns;
/**
* Base class for struct getter/setter bytecode implementation.
*/
public abstract class AbstractImplementation implements Implementation {
public static final TypeDescription.ForLoadedType STRUCT_TYPE
= new TypeDescription.ForLoadedType(AbstractStruct.class);
public static final MethodList<MethodDescription.InDefinedShape> STRUCT_METHODS
= STRUCT_TYPE.getDeclaredMethods();
public static final MethodDescription.InDefinedShape INT_FIELD_GETTER
= STRUCT_METHODS.filter(named("intFieldIndexed")).getOnly();
public static final MethodDescription.InDefinedShape INT_FIELD_SETTER
= STRUCT_METHODS.filter(named("updateIntFieldIndexed")).getOnly();
public static final MethodDescription.InDefinedShape DOUBLE_FIELD_GETTER
= STRUCT_METHODS.filter(named("doubleFieldIndexed")).getOnly();
public static final MethodDescription.InDefinedShape DOUBLE_FIELD_SETTER
= STRUCT_METHODS.filter(named("updateDoubleFieldIndexed")).getOnly();
public static final MethodDescription.InDefinedShape OBJECT_FIELD_GETTER
= STRUCT_METHODS.filter(named("objectFieldIndexed")).getOnly();
public static final MethodDescription.InDefinedShape OBJECT_FIELD_SETTER
= STRUCT_METHODS.filter(named("updateObjectFieldIndexed")).getOnly();
public static final MethodDescription.InDefinedShape STRUCT_CURRENT
= STRUCT_METHODS.filter(named("current").and(returns(int.class))).getOnly();
public static final MethodDescription.InDefinedShape STRUCT_COMPOSITE
= STRUCT_METHODS.filter(named("composite")).getOnly();
public static final Map<Class<?>, MethodDescription.InDefinedShape> FIELD_GETTERS;
public static final Map<Class<?>, MethodDescription.InDefinedShape> FIELD_SETTERS;
static {
Map<Class<?>, MethodDescription.InDefinedShape> map = new HashMap<>();
map.put(int.class, INT_FIELD_GETTER);
map.put(double.class, DOUBLE_FIELD_GETTER);
map.put(Object.class, OBJECT_FIELD_GETTER);
FIELD_GETTERS = Collections.unmodifiableMap(map);
map = new HashMap<>();
map.put(int.class, INT_FIELD_SETTER);
map.put(double.class, DOUBLE_FIELD_SETTER);
map.put(Object.class, OBJECT_FIELD_SETTER);
FIELD_SETTERS = Collections.unmodifiableMap(map);
}
private Class<?> type;
private int fields;
private int index;
/**
* Construct bytecode appender instance.
*
* @param type Field type.
* @param fields The number of integer fields in a struct.
* @param index Index of the field being updated.
*/
public AbstractImplementation(Class<?> type, int fields, int index) {
this.type = type;
this.fields = fields;
this.index = index;
}
@Override
public final InstrumentedType prepare(InstrumentedType instrumented) {
return instrumented;
}
/**
* @return Field type for which accessor method is generated.
*/
public final Class<?> type() {
return type;
}
/**
* @return The number of fields of the same type.
*/
public final int fields() {
return fields;
}
/**
* @return Field index within the fields with the same type.
*/
public final int index() {
return index;
}
}
| {
"content_hash": "9097de387f6ebe55a3a95f39972545e8",
"timestamp": "",
"source": "github",
"line_count": 107,
"max_line_length": 88,
"avg_line_length": 36.77570093457944,
"alnum_prop": 0.7072426937738246,
"repo_name": "uliashkevich/native-struct",
"id": "1a0ecc4d0687e69ece4ad8a23184a65746f5a6d0",
"size": "5077",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/net/nativestruct/implementation/bytecode/AbstractImplementation.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "147529"
}
],
"symlink_target": ""
} |
package com.productlayer.core.beans;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.productlayer.core.utils.StringUtils;
/**
* @author sorien
*
*/
@SuppressWarnings("serial")
public class UserSettings extends HashMap<String, String> {
/*
* The key for the email newsletter. Check the email before allowing to enable this settings.
* This should be synced with mailchimp.
*/
@JsonIgnore
private static String emailNewsletterKey = "pl-usr-setting-email_newsletter";
/*
* The key for the email notifications. Check the email before allowing to enable this settings.
* If email notifications are false then the user wont get any recent activities from prodly via email.
* This has nothing to do with push notifications. If push notifications are enabled he will receive it on his phone.
*/
@JsonIgnore
private static String emailNotificationKey = "pl-usr-setting-email_notification";
@JsonIgnore
public Boolean shouldSendEmailNewsletter(){
String newsletter = this.get(emailNewsletterKey);
if(StringUtils.isEmpty(newsletter) || newsletter.equalsIgnoreCase("true")) {
sendEmailNewsletter(true);
return true;
}
sendEmailNewsletter(false);
return false;
}
@JsonIgnore
public void sendEmailNewsletter(Boolean send) {
this.put(emailNewsletterKey, send.toString());
}
@JsonIgnore
public Boolean shouldSendEmailNotifications(){
String notification = this.get(emailNotificationKey);
if(StringUtils.isEmpty(notification) || notification.equalsIgnoreCase("true")) {
sendEmailNotification(true);
return true;
}
sendEmailNotification(false);
return false;
}
@JsonIgnore
public void sendEmailNotification(Boolean send) {
this.put(emailNotificationKey, send.toString());
}
} | {
"content_hash": "de25f3656c6a980017d4bf3afd8b243b",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 121,
"avg_line_length": 31.46875,
"alnum_prop": 0.6742800397219464,
"repo_name": "ProductLayer/ProductLayer-SDK-for-Java",
"id": "24fed1c9eeb8b917de0e4831490f21a7e0242791",
"size": "3388",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/productlayer/core/beans/UserSettings.java",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Java",
"bytes": "524353"
}
],
"symlink_target": ""
} |
package gradebookserver;
import gradebookdata.Packet;
import java.io.*;
import java.net.*;
import java.sql.Connection;
/**
* Thread of MultiServer that handles one client
* @author Eric Carlton
*/
public class MultiServerThread extends Thread {
protected static Connection connection;
private Socket s = null;
OutputStream os = null;
ObjectOutputStream out = null;
InputStream is = null;
ObjectInputStream in = null;
/**
* Create a new server thread
* @param socket Socket to connect to
*/
public MultiServerThread(Socket socket) {
super("MultiServerThread");
s = socket;
}
public void run() {
setUpStreams();
runServer();
}
/**
* Set up all streams to communicate with client
*/
private void setUpStreams() {
try {
os = s.getOutputStream();
out = new ObjectOutputStream(os);
} catch (IOException e) {
System.out.println("Error creating Server's OutputStream!");
System.exit(-1);
}
try {
is = s.getInputStream();
in = new ObjectInputStream(is);
} catch (IOException e) {
System.out.println("Error creating Server's InputStream!");
}
}
/**
* Send/receive message(s) from client following GBProtocol
*/
private void runServer() {
Packet input = null;
Packet output = null;
GBProtocol p = new GBProtocol();
output = p.processInput(null);
try {
out.writeObject(output);
} catch (IOException e) {
System.out.println("Error sending packet on server side!");
System.exit(-1);
}
try {
input = (Packet) in.readObject();
} catch (ClassNotFoundException e) {
System.out
.println("Error reading packet from server side! - ClassNotFound!");
System.exit(-1);
} catch (IOException e) {
System.out
.println("Error reading packet from server side! - IOException");
System.exit(-1);
}
while (input != null && input.getIntent() != 999) {
output = p.processInput(input);
try {
out.writeObject(output);
} catch (IOException e) {
System.out.println("Error sending packet on server side!");
System.exit(-1);
}
if (output.getIntent() / 100 == 9)
break;
try {
is.close();
os.close();
in.close();
out.close();
s.close();
} catch (IOException e) {
System.out.println("Error closing streams!");
System.exit(-1);
}
}
}
}
| {
"content_hash": "1d82b6a8c45093955a6bf34d6a61d3ff",
"timestamp": "",
"source": "github",
"line_count": 113,
"max_line_length": 73,
"avg_line_length": 20.486725663716815,
"alnum_prop": 0.649244060475162,
"repo_name": "Eric-Carlton/GradeBook",
"id": "332d224889220ee3eab4c6dfe39df728bfb0ac86",
"size": "2315",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "GradeBook/src/gradebookserver/MultiServerThread.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "86009"
}
],
"symlink_target": ""
} |
import completionist from "../../../../source/iml/completionist/completionist.js";
import completionistDropdown from "../../../../source/iml/completionist/completionist-dropdown.js";
import completionistModelHook from "../../../../source/iml/completionist/completionist-model-hook.js";
import angular from "../../../angular-mock-setup.js";
describe("completionist", () => {
let $scope, el, qs, qsa, input, keydownEvent;
beforeEach(
angular.mock.module($compileProvider => {
$compileProvider.component("completionist", completionist);
$compileProvider.component("completionistDropdown", completionistDropdown);
$compileProvider.directive("completionistModelHook", completionistModelHook);
})
);
beforeEach(
angular.mock.inject(($rootScope, $compile) => {
keydownEvent = key => {
const event = new Event("keydown");
event.keyCode = key;
return event;
};
const template = ` <div> <completionist completer="completer({ value: value, cursorPosition: cursorPosition })"> <input completionist-model-hook ng-model="query" /> <completionist-dropdown></completionist-dropdown> </completionist> </div> `;
$scope = $rootScope.$new();
$scope.query = "";
$scope.completer = () => [{ suggestion: "foo" }, { suggestion: "bar" }];
el = $compile(template)($scope)[0];
document.body.appendChild(el);
qs = el.querySelector.bind(el);
qsa = el.querySelectorAll.bind(el);
input = qs("input");
$scope.$digest();
})
);
afterEach(() => {
document.body.removeChild(el);
});
it("should have no items when unfocused", () => {
expect(qs("completionist-dropdown li")).toBeNull();
});
describe("active", () => {
beforeEach(() => {
input.dispatchEvent(new Event("focus"));
});
it("should render choices", () => {
const texts = Array.from(qsa("li")).map(x => x.textContent.trim());
expect(texts).toEqual(["foo", "bar"]);
});
it("should not activate any choices", () => {
expect(qs("li.active")).toBeNull();
});
it("should activate a choice on mouseover", () => {
const event = new MouseEvent("mouseover", {
clientX: 50,
clientY: 50,
bubbles: true
});
const li = qs("li");
li.dispatchEvent(event);
$scope.$digest();
expect(li).toHaveClass("active");
});
it("should activate a choice on down arrow", () => {
input.dispatchEvent(keydownEvent(40));
$scope.$digest();
expect(qs("li")).toHaveClass("active");
});
it("should populate the model on click", () => {
input.dispatchEvent(keydownEvent(40));
$scope.$digest();
qs("li").dispatchEvent(new MouseEvent("click"));
$scope.$digest();
expect($scope.query).toBe("foo");
});
it("should populate the model on enter", () => {
input.dispatchEvent(keydownEvent(38));
$scope.$digest();
input.dispatchEvent(keydownEvent(13));
$scope.$digest();
expect($scope.query).toBe("bar");
});
});
});
| {
"content_hash": "08d4646e6765b16a56ec9f3866d05874",
"timestamp": "",
"source": "github",
"line_count": 84,
"max_line_length": 247,
"avg_line_length": 36.595238095238095,
"alnum_prop": 0.6044242029928432,
"repo_name": "intel-hpdd/GUI",
"id": "16263f949d653ab532bf3a9b2f5d830d1d27e363",
"size": "3074",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/dom/iml/completionist/completionist-test.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "45410"
},
{
"name": "HTML",
"bytes": "2784"
},
{
"name": "JavaScript",
"bytes": "1690243"
},
{
"name": "Makefile",
"bytes": "15807"
},
{
"name": "Shell",
"bytes": "3721"
}
],
"symlink_target": ""
} |
module MediaWiki.API.Query.Links where
import MediaWiki.API.Types
import MediaWiki.API.Utils
data LinksRequest
= LinksRequest
{ plNamespaces :: [NamespaceID]
, plLimit :: Maybe Int
, plContinueFrom :: Maybe String
}
instance APIRequest LinksRequest where
queryKind _ = QProp "links"
showReq r
= [ opt1 "plnamespace" (plNamespaces r)
, mbOpt "pllimit" show (plLimit r)
, mbOpt "plcontinue" id (plContinueFrom r)
]
emptyLinksRequest :: LinksRequest
emptyLinksRequest
= LinksRequest
{ plNamespaces = []
, plLimit = Nothing
, plContinueFrom = Nothing
}
data LinksResponse
= LinksResponse
{ plPages :: [(PageTitle,[PageTitle])]
, plContinue :: Maybe String
}
emptyLinksResponse :: LinksResponse
emptyLinksResponse = LinksResponse
{ plPages = []
, plContinue = Nothing
}
| {
"content_hash": "675fd9a12cd6c49de71f974c0f71147f",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 47,
"avg_line_length": 21.463414634146343,
"alnum_prop": 0.6625,
"repo_name": "neobrain/neobot",
"id": "357bf5fb1e8c49e5096a20dbfda1d6fdb5765b7a",
"size": "1321",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "mediawiki/MediaWiki/API/Query/Links.hs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Haskell",
"bytes": "252872"
}
],
"symlink_target": ""
} |
// Copyright 2018 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.chrome.browser.notifications;
import android.app.Notification;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import androidx.annotation.IntDef;
import androidx.annotation.Nullable;
import org.chromium.base.ContextUtils;
import org.chromium.base.Log;
import org.chromium.components.browser_ui.notifications.NotificationMetadata;
import org.chromium.components.browser_ui.notifications.PendingIntentProvider;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Class to intercept {@link PendingIntent}s from notifications, including
* {@link Notification#contentIntent}, {@link Notification.Action#actionIntent} and
* {@link Notification#deleteIntent} with broadcast receivers.
*/
public class NotificationIntentInterceptor {
private static final String TAG = "IntentInterceptor";
private static final String EXTRA_PENDING_INTENT =
"notifications.NotificationIntentInterceptor.EXTRA_PENDING_INTENT";
private static final String EXTRA_INTENT_TYPE =
"notifications.NotificationIntentInterceptor.EXTRA_INTENT_TYPE";
private static final String EXTRA_NOTIFICATION_TYPE =
"notifications.NotificationIntentInterceptor.EXTRA_NOTIFICATION_TYPE";
private static final String EXTRA_ACTION_TYPE =
"notifications.NotificationIntentInterceptor.EXTRA_ACTION_TYPE";
private static final String EXTRA_CREATE_TIME =
"notifications.NotificationIntentInterceptor.EXTRA_CREATE_TIME";
public static final String INTENT_ACTION =
"notifications.NotificationIntentInterceptor.INTENT_ACTION";
public static final long INVALID_CREATE_TIME = -1;
/**
* Enum that defines type of notification intent.
*/
@IntDef({IntentType.UNKNOWN, IntentType.CONTENT_INTENT, IntentType.ACTION_INTENT,
IntentType.DELETE_INTENT})
@Retention(RetentionPolicy.SOURCE)
public @interface IntentType {
int UNKNOWN = -1;
int CONTENT_INTENT = 0;
int ACTION_INTENT = 1;
int DELETE_INTENT = 2;
}
/**
* Receives the event when the user taps on the notification body, notification action, or
* dismiss notification.
* {@link Notification#contentIntent}, {@link Notification#deleteIntent}
* {@link Notification.Action#actionIntent} will be delivered to this broadcast receiver.
*/
public static final class Receiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
@IntentType
int intentType = intent.getIntExtra(EXTRA_INTENT_TYPE, IntentType.UNKNOWN);
@NotificationUmaTracker.SystemNotificationType
int notificationType = intent.getIntExtra(
EXTRA_NOTIFICATION_TYPE, NotificationUmaTracker.SystemNotificationType.UNKNOWN);
long createTime = intent.getLongExtra(EXTRA_CREATE_TIME, INVALID_CREATE_TIME);
switch (intentType) {
case IntentType.UNKNOWN:
break;
case IntentType.CONTENT_INTENT:
NotificationUmaTracker.getInstance().onNotificationContentClick(
notificationType, createTime);
break;
case IntentType.DELETE_INTENT:
NotificationUmaTracker.getInstance().onNotificationDismiss(
notificationType, createTime);
break;
case IntentType.ACTION_INTENT:
int actionType = intent.getIntExtra(
EXTRA_ACTION_TYPE, NotificationUmaTracker.ActionType.UNKNOWN);
NotificationUmaTracker.getInstance().onNotificationActionClick(
actionType, notificationType, createTime);
break;
}
forwardPendingIntent(intent);
}
}
private NotificationIntentInterceptor() {}
/**
* Wraps the notification {@link PendingIntent} into another PendingIntent, to intercept clicks
* and dismiss events for metrics purpose.
* @param intentType The type of the pending intent to intercept.
* @param intentId The unique ID of the {@link PendingIntent}, used to distinguish action
* intents.
* @param metadata The metadata including notification id, tag, type, etc.
* @param pendingIntentProvider Provides the {@link PendingIntent} to launch Chrome.
*
*/
public static PendingIntent createInterceptPendingIntent(@IntentType int intentType,
int intentId, NotificationMetadata metadata,
@Nullable PendingIntentProvider pendingIntentProvider) {
PendingIntent pendingIntent = null;
int flags = 0;
if (pendingIntentProvider != null) {
pendingIntent = pendingIntentProvider.getPendingIntent();
flags = pendingIntentProvider.getFlags();
}
Context applicationContext = ContextUtils.getApplicationContext();
Intent intent = new Intent(applicationContext, Receiver.class);
intent.setAction(INTENT_ACTION);
intent.putExtra(EXTRA_PENDING_INTENT, pendingIntent);
intent.putExtra(EXTRA_INTENT_TYPE, intentType);
intent.putExtra(EXTRA_NOTIFICATION_TYPE, metadata.type);
intent.putExtra(EXTRA_CREATE_TIME, System.currentTimeMillis());
if (intentType == IntentType.ACTION_INTENT) {
intent.putExtra(EXTRA_ACTION_TYPE, intentId);
}
// This flag ensures the broadcast is delivered with foreground priority to speed up the
// broadcast delivery.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
intent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
}
// Use request code to distinguish different PendingIntents on Android.
int requestCode = computeHashCode(metadata, intentType, intentId);
return PendingIntent.getBroadcast(applicationContext, requestCode, intent, flags);
}
/**
* Get the default delete PendingIntent used to track the notification metrics.
* @param metadata The metadata including notification id, tag, type, etc.
* @return The {@link PendingIntent} triggered when the user dismiss the notification.
*/
public static PendingIntent getDefaultDeletePendingIntent(NotificationMetadata metadata) {
return NotificationIntentInterceptor.createInterceptPendingIntent(
NotificationIntentInterceptor.IntentType.DELETE_INTENT, 0 /* intentId */, metadata,
null /* pendingIntentProvider */);
}
// Launches the notification's pending intent, which will perform Chrome feature related tasks.
private static void forwardPendingIntent(Intent intent) {
if (intent == null) {
Log.e(TAG, "Intent to forward is null.");
return;
}
PendingIntent pendingIntent =
(PendingIntent) (intent.getParcelableExtra(EXTRA_PENDING_INTENT));
if (pendingIntent == null) {
Log.d(TAG, "The notification's PendingIntent is null.");
return;
}
try {
pendingIntent.send();
} catch (PendingIntent.CanceledException e) {
Log.e(TAG, "The PendingIntent to fire is canceled.");
e.printStackTrace();
}
}
/**
* Computes an unique hash code to identify the intercept {@link PendingIntent} that wraps the
* notification's {@link PendingIntent}.
* @param metadata Notification metadata including notification id, tag, etc.
* @param intentType The type of the {@link PendingIntent}.
* @param intentId The unique ID of the {@link PendingIntent}, used to distinguish action
* intents.
* @return The hashcode for the intercept {@link PendingIntent}.
*/
private static int computeHashCode(
NotificationMetadata metadata, @IntentType int intentType, int intentId) {
assert metadata != null;
int hashcode = metadata.type;
hashcode = hashcode * 31 + intentType;
hashcode = hashcode * 31 + intentId;
hashcode = hashcode * 31 + (metadata.tag == null ? 0 : metadata.tag.hashCode());
hashcode = hashcode * 31 + metadata.id;
return hashcode;
}
}
| {
"content_hash": "2ba49e2bd874c0d5c822e41f241db620",
"timestamp": "",
"source": "github",
"line_count": 193,
"max_line_length": 100,
"avg_line_length": 44.92746113989637,
"alnum_prop": 0.6751239764733018,
"repo_name": "endlessm/chromium-browser",
"id": "fafcb032dd861e3f67aab5188bdd6f23e443b6fe",
"size": "8671",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "chrome/android/java/src/org/chromium/chrome/browser/notifications/NotificationIntentInterceptor.java",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
package org.gradle.plugins.ide.internal.tooling;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import com.google.common.collect.Ordering;
import com.google.common.collect.Sets;
import org.gradle.api.GradleException;
import org.gradle.api.Project;
import org.gradle.api.Task;
import org.gradle.api.internal.project.ProjectTaskLister;
import org.gradle.api.internal.tasks.PublicTaskSpecification;
import org.gradle.tooling.internal.consumer.converters.TaskNameComparator;
import org.gradle.plugins.ide.internal.tooling.model.DefaultBuildInvocations;
import org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleTask;
import org.gradle.plugins.ide.internal.tooling.model.LaunchableGradleTaskSelector;
import org.gradle.tooling.model.internal.ProjectSensitiveToolingModelBuilder;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import static org.gradle.plugins.ide.internal.tooling.ToolingModelBuilderSupport.buildFromTask;
public class BuildInvocationsBuilder extends ProjectSensitiveToolingModelBuilder {
private final ProjectTaskLister taskLister;
private final TaskNameComparator taskNameComparator;
public BuildInvocationsBuilder(ProjectTaskLister taskLister) {
this.taskLister = taskLister;
this.taskNameComparator = new TaskNameComparator();
}
public boolean canBuild(String modelName) {
return modelName.equals("org.gradle.tooling.model.gradle.BuildInvocations");
}
public DefaultBuildInvocations buildAll(String modelName, Project project, boolean implicitProject) {
return buildAll(modelName, implicitProject ? project.getRootProject() : project);
}
@SuppressWarnings("StringEquality")
public DefaultBuildInvocations buildAll(String modelName, Project project) {
if (!canBuild(modelName)) {
throw new GradleException("Unknown model name " + modelName);
}
// construct task selectors
List<LaunchableGradleTaskSelector> selectors = Lists.newArrayList();
Map<String, LaunchableGradleTaskSelector> selectorsByName = Maps.newTreeMap(Ordering.natural());
Set<String> visibleTasks = Sets.newLinkedHashSet();
findTasks(project, selectorsByName, visibleTasks);
for (String selectorName : selectorsByName.keySet()) {
LaunchableGradleTaskSelector selector = selectorsByName.get(selectorName);
selectors.add(selector.
setName(selectorName).
setTaskName(selectorName).
setProjectPath(project.getPath()).
setDisplayName(String.format("%s in %s and subprojects.", selectorName, project.toString())).
setPublic(visibleTasks.contains(selectorName)));
}
// construct project tasks
List<LaunchableGradleTask> projectTasks = tasks(project);
// construct build invocations from task selectors and project tasks
return new DefaultBuildInvocations().setSelectors(selectors).setTasks(projectTasks);
}
// build tasks without project reference
private List<LaunchableGradleTask> tasks(Project project) {
List<LaunchableGradleTask> tasks = Lists.newArrayList();
for (Task task : taskLister.listProjectTasks(project)) {
tasks.add(buildFromTask(new LaunchableGradleTask(), task));
}
return tasks;
}
private void findTasks(Project project, Map<String, LaunchableGradleTaskSelector> taskSelectors, Collection<String> visibleTasks) {
for (Project child : project.getChildProjects().values()) {
findTasks(child, taskSelectors, visibleTasks);
}
for (Task task : taskLister.listProjectTasks(project)) {
// in the map, store a minimally populated LaunchableGradleTaskSelector that contains just the description and the path
// replace the LaunchableGradleTaskSelector stored in the map iff we come across a task with the same name whose path has a smaller ordering
// this way, for each task selector, its description will be the one from the selected task with the 'smallest' path
if (!taskSelectors.containsKey(task.getName())) {
LaunchableGradleTaskSelector taskSelector = new LaunchableGradleTaskSelector().
setDescription(task.getDescription()).setProjectPath(task.getPath());
taskSelectors.put(task.getName(), taskSelector);
} else {
LaunchableGradleTaskSelector taskSelector = taskSelectors.get(task.getName());
if (hasPathWithLowerOrdering(task, taskSelector)) {
taskSelector.setDescription(task.getDescription()).setProjectPath(task.getPath());
}
}
// visible tasks are specified as those that have a non-empty group
if (PublicTaskSpecification.INSTANCE.isSatisfiedBy(task)) {
visibleTasks.add(task.getName());
}
}
}
private boolean hasPathWithLowerOrdering(Task task, LaunchableGradleTaskSelector referenceTaskSelector) {
return taskNameComparator.compare(task.getPath(), referenceTaskSelector.getProjectPath()) < 0;
}
}
| {
"content_hash": "327295af0e0afe6a5332d5552a3b84da",
"timestamp": "",
"source": "github",
"line_count": 113,
"max_line_length": 152,
"avg_line_length": 46.88495575221239,
"alnum_prop": 0.7138542846357115,
"repo_name": "HenryHarper/Acquire-Reboot",
"id": "001d1af72d1a325a7de0ca618f5b6004b85ba03d",
"size": "5913",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "gradle/src/ide/org/gradle/plugins/ide/internal/tooling/BuildInvocationsBuilder.java",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE OverlappingInstances #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE UndecidableInstances #-}
{-# LANGUAGE ConstraintKinds #-}
module Math.Coordinate.Cartesian where
import Data.Array.Accelerate
import Data.Array.Accelerate.Smart
import Data.Array.Accelerate.Product
import Data.Array.Accelerate.Array.Sugar
import Data.Complex
import qualified Data.Foldable as F
import Data.Typeable
import Control.Applicative
import Math.Coordinate.Coordinate (CoordConversion(..), ManualConversion(..), AutoConversion(..), convertCoord)
import Math.Space.Space (Space2)
data Cartesian = Cartesian deriving (Show)
data Point1 a = Point1 !a deriving (Eq, Ord, Show, Read,Typeable)
data Point2 a = Point2 !a !a deriving (Eq, Ord, Show, Read,Typeable)
data Point3 a = Point3 !a !a !a deriving (Eq, Ord, Show, Read,Typeable)
data Point4 a = Point4 !a !a !a !a deriving (Eq, Ord, Show, Read,Typeable)
toCartesian = convertCoord Cartesian
--------------------------------------------------------------------------------
-- Classes
--------------------------------------------------------------------------------
class CartesianCoord1 coord where
x :: coord a -> a
class CartesianCoord1 coord => CartesianCoord2 coord where
y :: coord a -> a
class CartesianCoord2 coord => CartesianCoord3 coord where
z :: coord a -> a
class CartesianCoord3 coord => CartesianCoord4 coord where
w :: coord a -> a
--------------------------------------------------------------------------------
-- Functions
--------------------------------------------------------------------------------
uncurry :: (a -> a -> b) -> Point2 a -> b
uncurry f (Point2 x y) = f x y
--------------------------------------------------------------------------------
-- Instances
--------------------------------------------------------------------------------
instance CartesianCoord1 Point1 where x (Point1 x) = x
instance CartesianCoord1 Point2 where x (Point2 x _) = x
instance CartesianCoord2 Point2 where y (Point2 _ y) = y
instance CartesianCoord1 Point3 where x (Point3 x _ _) = x
instance CartesianCoord2 Point3 where y (Point3 _ y _) = y
instance CartesianCoord3 Point3 where z (Point3 _ _ z) = z
instance CartesianCoord1 Point4 where x (Point4 x _ _ _) = x
instance CartesianCoord2 Point4 where y (Point4 _ y _ _) = y
instance CartesianCoord3 Point4 where z (Point4 _ _ z _) = z
instance CartesianCoord4 Point4 where w (Point4 _ _ _ w) = w
instance ( CoordConversion ManualConversion Cartesian space a b
, CoordConversion ManualConversion sys space b c) =>
CoordConversion AutoConversion sys space a c where
convertCoordBase _ coord space = (convertCoordBase ManualConversion coord space) . (convertCoordBase ManualConversion Cartesian space)
instance CoordConversion ManualConversion Cartesian space (Point2 a) (Point2 a) where
convertCoordBase _ _ _ = id
--------------------------------------------------------------------------------
-- Point1
--------------------------------------------------------------------------------
instance Functor Point1 where
fmap f (Point1 a) = Point1 (f a)
instance Applicative Point1 where
pure a = Point1 a
{-# INLINE pure #-}
Point1 a <*> Point1 d = Point1 (a d)
{-# INLINE (<*>) #-}
instance Num a => Num (Point1 a) where
(+) = liftA2 (+)
{-# INLINE (+) #-}
(-) = liftA2 (-)
{-# INLINE (-) #-}
(*) = liftA2 (*)
{-# INLINE (*) #-}
negate = fmap negate
{-# INLINE negate #-}
abs = fmap abs
{-# INLINE abs #-}
signum = fmap signum
{-# INLINE signum #-}
fromInteger = pure . fromInteger
{-# INLINE fromInteger #-}
instance Fractional a => Fractional (Point1 a) where
recip = fmap recip
{-# INLINE recip #-}
(/) = liftA2 (/)
{-# INLINE (/) #-}
fromRational = pure . fromRational
{-# INLINE fromRational #-}
type instance EltRepr (Point1 a) = EltRepr a
instance Elt a => Elt (Point1 a) where
eltType _ = eltType (undefined :: a)
toElt = Point1 . toElt
fromElt (Point1 a) = fromElt a
instance cst a => IsProduct cst (Point1 a) where
type ProdRepr (Point1 a) = ((), a)
fromProd cst (Point1 x) = ((), x)
toProd cst ((), x) = Point1 x
prod _ _ = ProdRsnoc ProdRunit
instance (Lift Exp a, Elt (Plain a)) => Lift Exp (Point1 a) where
type Plain (Point1 a) = Point1 (Plain a)
lift (Point1 x) = Exp . Tuple $ NilTup `SnocTup` lift x
instance (Elt a, e ~ Exp a) => Unlift Exp (Point1 e) where
unlift t = Point1 $ Exp $ ZeroTupIdx `Prj` t
--------------------------------------------------------------------------------
-- Point2
--------------------------------------------------------------------------------
instance Functor Point2 where
fmap f (Point2 a b) = Point2 (f a) (f b)
instance Applicative Point2 where
pure a = Point2 a a
{-# INLINE pure #-}
Point2 a b <*> Point2 d e = Point2 (a d) (b e)
{-# INLINE (<*>) #-}
instance Num a => Num (Point2 a) where
(+) = liftA2 (+)
{-# INLINE (+) #-}
(-) = liftA2 (-)
{-# INLINE (-) #-}
(*) = liftA2 (*)
{-# INLINE (*) #-}
negate = fmap negate
{-# INLINE negate #-}
abs = fmap abs
{-# INLINE abs #-}
signum = fmap signum
{-# INLINE signum #-}
fromInteger = pure . fromInteger
{-# INLINE fromInteger #-}
instance Fractional a => Fractional (Point2 a) where
recip = fmap recip
{-# INLINE recip #-}
(/) = liftA2 (/)
{-# INLINE (/) #-}
fromRational = pure . fromRational
{-# INLINE fromRational #-}
type instance EltRepr (Point2 a) = EltRepr (a, a)
instance Elt a => Elt (Point2 a) where
eltType _ = eltType (undefined :: (a,a))
toElt p = case toElt p of
(x, y) -> Point2 x y
fromElt (Point2 x y) = fromElt (x, y)
instance cst a => IsProduct cst (Point2 a) where
type ProdRepr (Point2 a) = ProdRepr (a,a)
fromProd cst (Point2 x y) = fromProd cst (x,y)
toProd cst t = case toProd cst t of
(x, y) -> Point2 x y
prod cst _ = prod cst (undefined :: (a,a))
instance (Lift Exp a, Elt (Plain a)) => Lift Exp (Point2 a) where
type Plain (Point2 a) = Point2 (Plain a)
lift (Point2 x y) = Exp $ Tuple $ NilTup `SnocTup` lift x `SnocTup` lift y
instance (Elt a, e ~ Exp a) => Unlift Exp (Point2 e) where
unlift t = Point2 (Exp $ SuccTupIdx ZeroTupIdx `Prj` t)
(Exp $ ZeroTupIdx `Prj` t)
--------------------------------------------------------------------------------
-- Point3
--------------------------------------------------------------------------------
instance Functor Point3 where
fmap f (Point3 a b c) = Point3 (f a) (f b) (f c)
instance Applicative Point3 where
pure a = Point3 a a a
{-# INLINE pure #-}
Point3 a b c <*> Point3 d e f = Point3 (a d) (b e) (c f)
{-# INLINE (<*>) #-}
instance Num a => Num (Point3 a) where
(+) = liftA2 (+)
{-# INLINE (+) #-}
(-) = liftA2 (-)
{-# INLINE (-) #-}
(*) = liftA2 (*)
{-# INLINE (*) #-}
negate = fmap negate
{-# INLINE negate #-}
abs = fmap abs
{-# INLINE abs #-}
signum = fmap signum
{-# INLINE signum #-}
fromInteger = pure . fromInteger
{-# INLINE fromInteger #-}
instance Fractional a => Fractional (Point3 a) where
recip = fmap recip
{-# INLINE recip #-}
(/) = liftA2 (/)
{-# INLINE (/) #-}
fromRational = pure . fromRational
{-# INLINE fromRational #-}
type instance EltRepr (Point3 a) = EltRepr (a, a, a)
instance Elt a => Elt (Point3 a) where
eltType _ = eltType (undefined :: (a,a,a))
toElt p = case toElt p of
(x, y, z) -> Point3 x y z
fromElt (Point3 x y z) = fromElt (x, y, z)
instance cst a => IsProduct cst (Point3 a) where
type ProdRepr (Point3 a) = ProdRepr (a,a,a)
fromProd cst (Point3 x y z) = fromProd cst (x,y,z)
toProd cst t = case toProd cst t of
(x, y, z) -> Point3 x y z
prod cst _ = prod cst (undefined :: (a,a,a))
instance (Lift Exp a, Elt (Plain a)) => Lift Exp (Point3 a) where
type Plain (Point3 a) = Point3 (Plain a)
lift (Point3 x y z) = Exp $ Tuple $ NilTup `SnocTup` lift x `SnocTup` lift y `SnocTup` lift z
instance (Elt a, e ~ Exp a) => Unlift Exp (Point3 e) where
unlift t = Point3 (Exp $ SuccTupIdx (SuccTupIdx ZeroTupIdx) `Prj` t)
(Exp $ SuccTupIdx ZeroTupIdx `Prj` t)
(Exp $ ZeroTupIdx `Prj` t)
--------------------------------------------------------------------------------
-- Point4
--------------------------------------------------------------------------------
instance Functor Point4 where
fmap f (Point4 a b c d) = Point4 (f a) (f b) (f c) (f d)
instance Applicative Point4 where
pure a = Point4 a a a a
{-# INLINE pure #-}
Point4 a b c d <*> Point4 e f g h = Point4 (a e) (b f) (c g) (d h)
{-# INLINE (<*>) #-}
instance Num a => Num (Point4 a) where
(+) = liftA2 (+)
{-# INLINE (+) #-}
(-) = liftA2 (-)
{-# INLINE (-) #-}
(*) = liftA2 (*)
{-# INLINE (*) #-}
negate = fmap negate
{-# INLINE negate #-}
abs = fmap abs
{-# INLINE abs #-}
signum = fmap signum
{-# INLINE signum #-}
fromInteger = pure . fromInteger
{-# INLINE fromInteger #-}
instance Fractional a => Fractional (Point4 a) where
recip = fmap recip
{-# INLINE recip #-}
(/) = liftA2 (/)
{-# INLINE (/) #-}
fromRational = pure . fromRational
{-# INLINE fromRational #-}
type instance EltRepr (Point4 a) = EltRepr (a, a, a, a)
instance Elt a => Elt (Point4 a) where
eltType _ = eltType (undefined :: (a,a,a,a))
toElt p = case toElt p of
(x, y, z, w) -> Point4 x y z w
fromElt (Point4 x y z w) = fromElt (x, y, z, w)
instance cst a => IsProduct cst (Point4 a) where
type ProdRepr (Point4 a) = ProdRepr (a,a,a,a)
fromProd cst (Point4 x y z w) = fromProd cst (x,y,z,w)
toProd cst t = case toProd cst t of
(x, y, z, w) -> Point4 x y z w
prod cst _ = prod cst (undefined :: (a,a,a,a))
instance (Lift Exp a, Elt (Plain a)) => Lift Exp (Point4 a) where
type Plain (Point4 a) = Point4 (Plain a)
lift (Point4 x y z w) = Exp $ Tuple $ NilTup `SnocTup`
lift x `SnocTup`
lift y `SnocTup`
lift z `SnocTup`
lift w
instance (Elt a, e ~ Exp a) => Unlift Exp (Point4 e) where
unlift t = Point4 (Exp $ SuccTupIdx (SuccTupIdx (SuccTupIdx ZeroTupIdx)) `Prj` t)
(Exp $ SuccTupIdx (SuccTupIdx ZeroTupIdx) `Prj` t)
(Exp $ SuccTupIdx ZeroTupIdx `Prj` t)
(Exp $ ZeroTupIdx `Prj` t)
| {
"content_hash": "d08f5cd3e64ce8ad21d7bc3e48289488",
"timestamp": "",
"source": "github",
"line_count": 327,
"max_line_length": 138,
"avg_line_length": 33.14373088685015,
"alnum_prop": 0.542258719320908,
"repo_name": "wdanilo/algebraic",
"id": "e2a2a9a65cb6be38178b50505dcc0929dc50f693",
"size": "10838",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Math/Coordinate/Cartesian.hs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Haskell",
"bytes": "55919"
}
],
"symlink_target": ""
} |
The local auth strategy makes it easy to add _username_ and _password_ authentication for your app. Once a user has successfully authenticated they get a JSON Web Token (JWT) in return to user for future authentication with your feathers app.
## Usage
### Server Side
This is what a typical server setup looks like:
```js
app.configure(authentication());
```
Normally you don't need to pass any options for local auth when registering the `feathers-authentication` module server side.
#### Local Service Specific Options
All of the top level authentication options are passed to the local authentication service. If you need to customize your local specific configuration further you can use these options:
- `usernameField` (default: 'email') [optional] - The database field on the user service you want to use as the username.
- `passwordField` (default: 'password') [optional] - The database field containing the password on the user service.
- `session` (default: 'false') [optional] - Whether the local Passport auth strategy should use sessions.
### Client Side
#### Using Feathers Client
The Feathers authentication module has a client side component that makes it very easy for you to add authentication to your app. It can be used in the browser, NodeJS and React Native. Refer to the [feathers client authentication section](./client.md) for more detail.
#### Other Clients
Of course, if you don't want to use the feathers authentication client you can also just use vanilla sockets or ajax. It's a bit more work but honestly, not much more. We have some examples [here](https://github.com/feathersjs/feathers-demos/tree/master/examples).
| {
"content_hash": "0aff218c2a1f20dc2b84db3cc4b2a75c",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 269,
"avg_line_length": 53.61290322580645,
"alnum_prop": 0.7725631768953068,
"repo_name": "diproart/feathers-docs",
"id": "512ed4b7900f9821600a487b1d17b5d4429caccc",
"size": "1697",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_old/authentication/local.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4595"
}
],
"symlink_target": ""
} |
package be.howest.twentytwo.parametergame.model.component;
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.value.ObservableBooleanValue;
import com.badlogic.ashley.core.Component;
import com.badlogic.ashley.core.ComponentMapper;
import com.badlogic.gdx.utils.Pool.Poolable;
/**
* Stores movement data and state.
*/
public class MovementComponent implements Component, Poolable {
public static final ComponentMapper<MovementComponent> MAPPER = ComponentMapper
.getFor(MovementComponent.class);
// Flags set by input
private boolean accelerateForward;
private boolean accelerateBackward;
private boolean turnLeft;
private boolean turnRight;
private BooleanProperty dampenOnProperty;
// private boolean dampenOn;
private float maxLinearVelocity; // Limit to linear velocity (units/second)
private float maxAngularVelocity; // Limit to angular velocity (in radians)
private float linearAcceleration; // units / s²
private float angularAcceleration; // = Turn rate in radians / second
private float linearDampStrength;
public MovementComponent(){
reset();
}
public boolean isAccelerateForward() {
return accelerateForward;
}
public void setAccelerateForward(boolean accelerateForward) {
this.accelerateForward = accelerateForward;
}
public boolean isAccelerateBackward() {
return accelerateBackward;
}
public void setAccelerateBackward(boolean accelerateBackward) {
this.accelerateBackward = accelerateBackward;
}
public boolean isTurnLeft() {
return turnLeft;
}
public void setTurnLeft(boolean turnLeft) {
this.turnLeft = turnLeft;
}
public boolean isTurnRight() {
return turnRight;
}
public void setTurnRight(boolean turnRight) {
this.turnRight = turnRight;
}
public BooleanProperty getDampenOnProperty(){
return dampenOnProperty;
}
public boolean isDampenOn() {
// return dampenOn;
return dampenOnProperty.get();
}
public void toggleDampen() {
// this.dampenOn = !dampenOn;
dampenOnProperty.set(! dampenOnProperty.get());
}
public float getMaxLinearVelocity() {
return maxLinearVelocity;
}
public void setMaxLinearVelocity(float maxLinearVelocity) {
this.maxLinearVelocity = maxLinearVelocity;
}
public float getMaxAngularVelocity() {
return maxAngularVelocity;
}
public void setMaxAngularVelocity(float maxAngularVelocity) {
this.maxAngularVelocity = maxAngularVelocity;
}
public float getLinearAcceleration() {
return linearAcceleration;
}
public void setLinearAcceleration(float linearAcceleration) {
this.linearAcceleration = linearAcceleration;
}
public float getAngularAcceleration() {
return angularAcceleration;
}
public void setAngularAcceleration(float angularAcceleration) {
this.angularAcceleration = angularAcceleration;
}
public float getLinearDampStrength() {
return linearDampStrength;
}
public void setLinearDampStrength(float linearDampStrength) {
this.linearDampStrength = linearDampStrength;
}
@Override
public void reset() {
dampenOnProperty = new SimpleBooleanProperty();
}
}
| {
"content_hash": "98c49b4613b0d8d36fef0a0f2b0f1c6c",
"timestamp": "",
"source": "github",
"line_count": 130,
"max_line_length": 80,
"avg_line_length": 23.96153846153846,
"alnum_prop": 0.7826645264847512,
"repo_name": "RiceKab/project-geowars",
"id": "ac03747c74a32ae274a740f9baf707040d3da017",
"size": "3115",
"binary": false,
"copies": "1",
"ref": "refs/heads/stable",
"path": "projects/parametergame/core/src/be/howest/twentytwo/parametergame/model/component/MovementComponent.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "347088"
},
{
"name": "Python",
"bytes": "645"
}
],
"symlink_target": ""
} |
<?php
namespace Application\Model;
class Holidays {
public $id;
public $date_start;
public $date_end;
public $physician_id;
public function exchangeArray($data)
{
$this->id = (isset($data['id'])) ? $data['id'] : null;
$this->date_start = (isset($data['date_start'])) ? $data['date_start'] : null;
$this->date_end = (isset($data['date_end'])) ? $data['date_end'] : null;
$this->physician_id = (isset($data['physician_id'])) ? $data['physician_id'] : null;
}
}
| {
"content_hash": "d26ce0a83ba348cf4978136437c012c0",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 95,
"avg_line_length": 30.85,
"alnum_prop": 0.47974068071312803,
"repo_name": "kopsow/supermed",
"id": "cdb240ee28828b160366bebc72011ec8b1d1b772",
"size": "617",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "module/Application/src/Application/Model/Holidays.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "752"
},
{
"name": "CSS",
"bytes": "43044"
},
{
"name": "HTML",
"bytes": "69290"
},
{
"name": "PHP",
"bytes": "133924"
}
],
"symlink_target": ""
} |
<?php
/**
* ActiveDataProvider
*/
class ActiveDataProvider extends YdActiveDataProvider
{
}
| {
"content_hash": "c6345b58194461b5b74f5d29153b8a44",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 53,
"avg_line_length": 9.7,
"alnum_prop": 0.7319587628865979,
"repo_name": "cornernote/yii-skeleton",
"id": "e52a96f70634bf458e69e64dfb756f2b8a8dc79f",
"size": "97",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/components/ActiveDataProvider.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "5413"
},
{
"name": "CSS",
"bytes": "58883"
},
{
"name": "JavaScript",
"bytes": "34"
},
{
"name": "PHP",
"bytes": "59434"
},
{
"name": "Shell",
"bytes": "763"
}
],
"symlink_target": ""
} |
import com.hankcs.hanlp.textgeneration.ParagraphTemplate;
import com.hankcs.hanlp.textgeneration.PhraseTemplate;
import com.hankcs.hanlp.textgeneration.SentenceTemplate;
public class ParagraphTemplateTest {
public static void main(String[] args) {
SentenceTemplate st1=new SentenceTemplate();
PhraseTemplate pht1 =new PhraseTemplate();
pht1.changeStaticString("等板块");
pht1.addAlternative("券商");
pht1.addAlternative("银行");
pht1.changeStaticFirstFlag(false);//动态文本在先
PhraseTemplate pht2 =new PhraseTemplate();
// pht2.changeStringStatic("");
pht2.addAlternative("领涨");
pht2.addAlternative("领跌");
pht2.changePunctuation(",");
st1.addPhraseTemplate(pht1);
st1.addPhraseTemplate(pht2);
SentenceTemplate st2=new SentenceTemplate();
PhraseTemplate pht3 =new PhraseTemplate();
pht3.changeStaticString("成交量有所");
pht3.addAlternative("放大");
pht3.addAlternative("缩小");
pht3.changePunctuation(".");
st2.addPhraseTemplate(pht3);
//paragraph structure
ParagraphTemplate pt=new ParagraphTemplate();
pt.addSentenceTemplate(st1);
pt.addSentenceTemplate(st2);
//print
pt.printParagraphTemplate();
pt.printParagraphText();
}
} | {
"content_hash": "2af532dfa2b83ad77f33581d34003f83",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 57,
"avg_line_length": 28.916666666666668,
"alnum_prop": 0.6412103746397695,
"repo_name": "Conan521/HanLP-1.2.4-Taikor",
"id": "3640ba6db577de7c065b4ea65f832599c1cd32f7",
"size": "1440",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/com/hankcs/test/textgeneration/ParagraphTemplateTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "1663676"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_75) on Thu Mar 05 23:31:44 CST 2015 -->
<title>Uses of Class no.jetpie.ml.model.nb.NaiveBayes</title>
<meta name="date" content="2015-03-05">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class no.jetpie.ml.model.nb.NaiveBayes";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../no/jetpie/ml/model/nb/NaiveBayes.html" title="class in no.jetpie.ml.model.nb">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?no/jetpie/ml/model/nb/class-use/NaiveBayes.html" target="_top">Frames</a></li>
<li><a href="NaiveBayes.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class no.jetpie.ml.model.nb.NaiveBayes" class="title">Uses of Class<br>no.jetpie.ml.model.nb.NaiveBayes</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../no/jetpie/ml/model/nb/NaiveBayes.html" title="class in no.jetpie.ml.model.nb">NaiveBayes</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#no.jetpie.ml.model.nb">no.jetpie.ml.model.nb</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="no.jetpie.ml.model.nb">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../no/jetpie/ml/model/nb/NaiveBayes.html" title="class in no.jetpie.ml.model.nb">NaiveBayes</a> in <a href="../../../../../../no/jetpie/ml/model/nb/package-summary.html">no.jetpie.ml.model.nb</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing subclasses, and an explanation">
<caption><span>Subclasses of <a href="../../../../../../no/jetpie/ml/model/nb/NaiveBayes.html" title="class in no.jetpie.ml.model.nb">NaiveBayes</a> in <a href="../../../../../../no/jetpie/ml/model/nb/package-summary.html">no.jetpie.ml.model.nb</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><strong><a href="../../../../../../no/jetpie/ml/model/nb/MultinomialNB.html" title="class in no.jetpie.ml.model.nb">MultinomialNB</a></strong></code>
<div class="block">The multinomial Naive Bayes model</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../no/jetpie/ml/model/nb/NaiveBayes.html" title="class in no.jetpie.ml.model.nb">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?no/jetpie/ml/model/nb/class-use/NaiveBayes.html" target="_top">Frames</a></li>
<li><a href="NaiveBayes.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "9b6ebf10443d8b6211b39ab15858e2ee",
"timestamp": "",
"source": "github",
"line_count": 157,
"max_line_length": 299,
"avg_line_length": 38.22929936305732,
"alnum_prop": 0.6151282905698101,
"repo_name": "Jetpie/naive-bayes-java",
"id": "ac961a4b0941f5b982ce6462f7ff8c302275f4bb",
"size": "6002",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/no/jetpie/ml/model/nb/class-use/NaiveBayes.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "28891"
}
],
"symlink_target": ""
} |
/* @flow */
export const input = `
class Point <T: number> {
x: T = 0;
y: T = 0;
constructor (x: T, y: T) {
this.x = x;
this.y = y;
}
static create (x: T, y: T): Point<T> {
return new Point(x, y);
}
}
`;
export const expected = `
import t from "flow-runtime";
const _PointTypeParametersSymbol = Symbol("PointTypeParameters");
class Point {
static [t.TypeParametersSymbol] = _PointTypeParametersSymbol;
@t.decorate(function () {
return t.flowInto(this[_PointTypeParametersSymbol].T);
})
x = 0;
@t.decorate(function () {
return t.flowInto(this[_PointTypeParametersSymbol].T);
})
y = 0;
constructor(x, y) {
this[_PointTypeParametersSymbol] = {
T: t.typeParameter("T", t.number())
};
let _xType = t.flowInto(this[_PointTypeParametersSymbol].T);
let _yType = t.flowInto(this[_PointTypeParametersSymbol].T);
t.param("x", _xType).assert(x);
t.param("y", _yType).assert(y);
this.x = x;
this.y = y;
}
static create(x, y) {
const _typeParameters = {
T: t.typeParameter("T", t.number())
};
let _xType2 = t.flowInto(_typeParameters.T);
let _yType2 = t.flowInto(_typeParameters.T);
const _returnType = t.return(t.ref(Point, _typeParameters.T));
t.param("x", _xType2).assert(x);
t.param("y", _yType2).assert(y);
return _returnType.assert(new Point(x, y));
}
}
`;
export const annotated = `
import t from "flow-runtime";
@t.annotate(t.class("Point", Point => {
const T = Point.typeParameter("T", t.number());
return [
t.property("x", t.flowInto(T)),
t.property("y", t.flowInto(T)),
t.method(
"constructor",
t.param("x", t.flowInto(T)),
t.param("y", t.flowInto(T))
),
t.staticMethod(
"create",
t.param("x", t.flowInto(T)),
t.param("y", t.flowInto(T)),
t.return(t.ref(Point, T))
)
];
}))
class Point {
x = 0;
y = 0;
constructor(x, y) {
this.x = x;
this.y = y;
}
static create(x, y) {
return new Point(x, y);
}
}
`;
export const combined = `
import t from "flow-runtime";
const _PointTypeParametersSymbol = Symbol("PointTypeParameters");
@t.annotate(t.class("Point", Point => {
const T = Point.typeParameter("T", t.number());
return [
t.property("x", t.flowInto(T)),
t.property("y", t.flowInto(T)),
t.method(
"constructor",
t.param("x", t.flowInto(T)),
t.param("y", t.flowInto(T))
),
t.staticMethod(
"create",
t.param("x", t.flowInto(T)),
t.param("y", t.flowInto(T)),
t.return(t.ref(Point, T))
)
];
}))
class Point {
static [t.TypeParametersSymbol] = _PointTypeParametersSymbol;
@t.decorate(function () {
return t.flowInto(this[_PointTypeParametersSymbol].T);
})
x = 0;
@t.decorate(function () {
return t.flowInto(this[_PointTypeParametersSymbol].T);
})
y = 0;
constructor(x, y) {
this[_PointTypeParametersSymbol] = {
T: t.typeParameter("T", t.number())
};
let _xType = t.flowInto(this[_PointTypeParametersSymbol].T);
let _yType = t.flowInto(this[_PointTypeParametersSymbol].T);
t.param("x", _xType).assert(x);
t.param("y", _yType).assert(y);
this.x = x;
this.y = y;
}
static create(x, y) {
const _typeParameters = {
T: t.typeParameter("T", t.number())
};
let _xType2 = t.flowInto(_typeParameters.T);
let _yType2 = t.flowInto(_typeParameters.T);
const _returnType = t.return(t.ref(Point, _typeParameters.T));
t.param("x", _xType2).assert(x);
t.param("y", _yType2).assert(y);
return _returnType.assert(new Point(x, y));
}
}
`; | {
"content_hash": "fa94f35c325a6f1deb301037483551ee",
"timestamp": "",
"source": "github",
"line_count": 159,
"max_line_length": 68,
"avg_line_length": 24.465408805031448,
"alnum_prop": 0.5498714652956298,
"repo_name": "codemix/flow-runtime",
"id": "a9e5b83bb9c19662e25b72f13dc87b32a1210287",
"size": "3890",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "packages/babel-plugin-flow-runtime/src/__tests__/__fixtures__/typeAssertions/classes/classWithTypeParametersAndStaticMethods.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "4137"
},
{
"name": "HTML",
"bytes": "1681"
},
{
"name": "JavaScript",
"bytes": "1494978"
},
{
"name": "Shell",
"bytes": "297"
}
],
"symlink_target": ""
} |
void FinalComposite::create(const graphics::ScreenRectBuffer *rectangle) {
this->rectangle = rectangle;
static const char *vertexShaderSource = R"glsl(
#version 330 core
layout(location=0) in vec2 position;
out vec2 screenCoord;
out vec2 texcoord;
void main() {
screenCoord = position;
texcoord = position * .5 + .5;
gl_Position = vec4(position, 0., 1.);
}
)glsl";
static const char *fragmentShaderSource = R"glsl(
#version 330 core
uniform sampler2D source;
uniform sampler2D background;
uniform float backgroundVisibility;
in vec2 screenCoord;
in vec2 texcoord;
out vec4 frag_color;
float vignette(vec2 screenCoord) {
float a = atan(screenCoord.y, screenCoord.x);
// https://en.wikipedia.org/wiki/Squircle
// https://thatsmaths.com/2016/07/14/squircles/ (Eq. 3)
float s = sin(2 * a);
float x = length(screenCoord) - s * s * .25;
const float blendStart = 0.7;
const float blendEnd = 0.95;
// linear ramp from blend start to blend end
float l = clamp((x - blendStart) * (1.0 / (blendEnd - blendStart)), 0.0, 1.0);
return 1.0 - l*l;
}
void main() {
//vec3 c = texture(source, texcoord).rgb;
vec4 b = texelFetch(background, ivec2(gl_FragCoord.xy), 0);
vec4 c = texelFetch(source, ivec2(gl_FragCoord.xy), 0);
frag_color = vec4(mix(c.rgb, b.rgb, (1 - c.a) * backgroundVisibility) * vignette(screenCoord), 0.);
}
)glsl";
pipeline.create(vertexShaderSource, fragmentShaderSource, graphics::Pipeline::BlendMode::None);
pipeline_source_location = pipeline.getUniformLocation("source");
pipeline_background_location = pipeline.getUniformLocation("background");
pipeline_backgroundVisibility_location = pipeline.getUniformLocation("backgroundVisibility");
}
void FinalComposite::destroy() {
pipeline.destroy();
}
void FinalComposite::draw(graphics::Texture &source, graphics::Texture &background, float backgroundVisibility, uint32_t screen_width, uint32_t screen_height) {
graphics::Framebuffer::unbind();
glViewport(0, 0, screen_width, screen_height);
pipeline.bind();
source.bind(0u);
glUniform1i(pipeline_source_location, 0u);
background.bind(1u);
glUniform1i(pipeline_background_location, 1u);
glUniform1f(pipeline_backgroundVisibility_location, backgroundVisibility);
rectangle->draw();
}
| {
"content_hash": "f4716257099636d631653941cdc9d713",
"timestamp": "",
"source": "github",
"line_count": 75,
"max_line_length": 160,
"avg_line_length": 32.13333333333333,
"alnum_prop": 0.6842323651452282,
"repo_name": "luckyxxl/hfg-webcam-particles",
"id": "bfb059b608a3093830bdea683922ccf6a3bfc117",
"size": "2462",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "source/FinalComposite.cpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "633534"
},
{
"name": "CMake",
"bytes": "12582"
}
],
"symlink_target": ""
} |
'''
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.
'''
import hashlib
import os, sys
import zipfile
import glob
import pprint
class KeeperException(Exception):
pass
class ResourceFilesKeeper():
"""
This class encapsulates all utility methods for resource files maintenance.
"""
STACK_HOOKS_DIR= "stack-hooks"
PACKAGE_DIR="package"
STACKS_DIR="stacks"
COMMON_SERVICES_DIR="common-services"
CUSTOM_ACTIONS_DIR="custom_actions"
HOST_SCRIPTS_DIR="host_scripts"
DASHBOARDS_DIR="dashboards"
EXTENSIONS_DIR="extensions"
# For these directories archives are created
ARCHIVABLE_DIRS = [PACKAGE_DIR]
HASH_SUM_FILE=".hash"
ARCHIVE_NAME="archive.zip"
PYC_EXT=".pyc"
METAINFO_XML = "metainfo.xml"
BUFFER = 1024 * 32
# Change that to True to see debug output at stderr
DEBUG=False
def __init__(self, resources_dir, stacks_dir, verbose=False, nozip=False):
"""
nozip = create only hash files and skip creating zip archives
"""
self.resources_dir = resources_dir
self.stacks_root = stacks_dir
self.verbose = verbose
self.nozip = nozip
def perform_housekeeping(self):
"""
Performs housekeeping operations on resource files
"""
self.update_directory_archives()
# probably, later we will need some additional operations
def _iter_update_directory_archive(self, subdirs_list):
for subdir in subdirs_list:
for root, dirs, _ in os.walk(subdir, followlinks=True):
for d in dirs:
if d in self.ARCHIVABLE_DIRS:
full_path = os.path.abspath(os.path.join(root, d))
self.update_directory_archive(full_path)
def _update_resources_subdir_archive(self, subdir):
archive_root = os.path.join(self.resources_dir, subdir)
self.dbg_out("Updating archive for {0} dir at {1}...".format(subdir, archive_root))
# update the directories so that the .hash is generated
self.update_directory_archive(archive_root)
def update_directory_archives(self):
"""
Please see AMBARI-4481 for more details
"""
# archive stacks
self.dbg_out("Updating archives for stack dirs at {0}...".format(self.stacks_root))
valid_stacks = self.list_stacks(self.stacks_root)
self.dbg_out("Stacks: {0}".format(pprint.pformat(valid_stacks)))
# Iterate over stack directories
self._iter_update_directory_archive(valid_stacks)
# archive common services
common_services_root = os.path.join(self.resources_dir, self.COMMON_SERVICES_DIR)
self.dbg_out("Updating archives for common services dirs at {0}...".format(common_services_root))
valid_common_services = self.list_common_services(common_services_root)
self.dbg_out("Common Services: {0}".format(pprint.pformat(valid_common_services)))
# Iterate over common services directories
self._iter_update_directory_archive(valid_common_services)
# archive extensions
extensions_root = os.path.join(self.resources_dir, self.EXTENSIONS_DIR)
self.dbg_out("Updating archives for extensions dirs at {0}...".format(extensions_root))
valid_extensions = self.list_extensions(extensions_root)
self.dbg_out("Extensions: {0}".format(pprint.pformat(valid_extensions)))
# Iterate over extension directories
self._iter_update_directory_archive(valid_extensions)
# stack hooks
self._update_resources_subdir_archive(self.STACK_HOOKS_DIR)
# custom actions
self._update_resources_subdir_archive(self.CUSTOM_ACTIONS_DIR)
# agent host scripts
self._update_resources_subdir_archive(self.HOST_SCRIPTS_DIR)
# custom service dashboards
self._update_resources_subdir_archive(self.DASHBOARDS_DIR)
def _list_metainfo_dirs(self, root_dir):
valid_items = [] # Format: <stack_dir, ignore(True|False)>
glob_pattern = "{0}/*/*".format(root_dir)
dirs = glob.glob(glob_pattern)
for directory in dirs:
metainfo_file = os.path.join(directory, self.METAINFO_XML)
if os.path.exists(metainfo_file):
valid_items.append(directory)
return valid_items
def list_stacks(self, root_dir):
"""
Builds a list of stack directories
"""
try:
return self._list_metainfo_dirs(root_dir)
except Exception, err:
raise KeeperException("Can not list stacks: {0}".format(str(err)))
def list_common_services(self, root_dir):
"""
Builds a list of common services directories
"""
try:
return self._list_metainfo_dirs(root_dir)
except Exception, err:
raise KeeperException("Can not list common services: {0}".format(str(err)))
def list_extensions(self, root_dir):
"""
Builds a list of extension directories
"""
try:
return self._list_metainfo_dirs(root_dir)
except Exception, err:
raise KeeperException("Can not list extensions: {0}".format(str(err)))
def update_directory_archive(self, directory):
"""
If hash sum for directory is not present or differs from saved value,
recalculates hash sum and creates directory archive. The archive is
also created if the existing archive does not exist, even if the
saved and current hash sums are matching.
"""
skip_empty_directory = True
cur_hash = self.count_hash_sum(directory)
saved_hash = self.read_hash_sum(directory)
directory_archive_name = os.path.join(directory, self.ARCHIVE_NAME)
if cur_hash != saved_hash:
if not self.nozip:
self.zip_directory(directory, skip_empty_directory)
# Skip generation of .hash file is directory is empty
if (skip_empty_directory and (not os.path.exists(directory) or not os.listdir(directory))):
self.dbg_out("Empty directory. Skipping generation of hash file for {0}".format(directory))
else:
self.write_hash_sum(directory, cur_hash)
pass
elif not os.path.isfile(directory_archive_name):
self.zip_directory(directory, skip_empty_directory)
def count_hash_sum(self, directory):
"""
Recursively counts hash sum of all files in directory and subdirectories.
Files and directories are processed in alphabetical order.
Ignores previously created directory archives and files containing
previously calculated hashes. Compiled pyc files are also ignored
"""
try:
sha1 = hashlib.sha1()
file_list = []
for root, dirs, files in os.walk(directory):
for f in files:
if not self.is_ignored(f):
full_path = os.path.abspath(os.path.join(root, f))
file_list.append(full_path)
file_list.sort()
for path in file_list:
self.dbg_out("Counting hash of {0}".format(path))
with open(path, 'rb') as fh:
while True:
data = fh.read(self.BUFFER)
if not data:
break
sha1.update(data)
return sha1.hexdigest()
except Exception, err:
raise KeeperException("Can not calculate directory "
"hash: {0}".format(str(err)))
def read_hash_sum(self, directory):
"""
Tries to read a hash sum from previously generated file. Returns string
containing hash or None
"""
hash_file = os.path.join(directory, self.HASH_SUM_FILE)
if os.path.isfile(hash_file):
try:
with open(hash_file) as fh:
return fh.readline().strip()
except Exception, err:
raise KeeperException("Can not read file {0} : {1}".format(hash_file,
str(err)))
else:
return None
def write_hash_sum(self, directory, new_hash):
"""
Tries to read a hash sum from previously generated file. Returns string
containing hash or None
"""
hash_file = os.path.join(directory, self.HASH_SUM_FILE)
try:
with open(hash_file, "w") as fh:
fh.write(new_hash)
os.chmod(hash_file, 0o644)
except Exception, err:
raise KeeperException("Can not write to file {0} : {1}".format(hash_file,
str(err)))
def zip_directory(self, directory, skip_if_empty = False):
"""
Packs entire directory into zip file. Hash file is also packaged
into archive
"""
self.dbg_out("creating archive for directory {0}".format(directory))
try:
if skip_if_empty:
if not os.path.exists(directory) or not os.listdir(directory):
self.dbg_out("Empty directory. Skipping archive creation for {0}".format(directory))
return
zip_file_path = os.path.join(directory, self.ARCHIVE_NAME)
zf = zipfile.ZipFile(zip_file_path, "w")
abs_src = os.path.abspath(directory)
for root, dirs, files in os.walk(directory):
for filename in files:
# Avoid zipping previous archive and hash file and binary pyc files
if not self.is_ignored(filename):
absname = os.path.abspath(os.path.join(root, filename))
arcname = absname[len(abs_src) + 1:]
self.dbg_out('zipping %s as %s' % (os.path.join(root, filename),
arcname))
zf.write(absname, arcname)
zf.close()
os.chmod(zip_file_path, 0o755)
except Exception, err:
raise KeeperException("Can not create zip archive of "
"directory {0} : {1}".format(directory, str(err)))
def is_ignored(self, filename):
"""
returns True if filename is ignored when calculating hashing or archiving
"""
return filename in [self.HASH_SUM_FILE, self.ARCHIVE_NAME] or \
filename.endswith(self.PYC_EXT)
def dbg_out(self, text):
if self.DEBUG:
sys.stderr.write("{0}\n".format(text))
if not self.DEBUG and self.verbose:
print text
def main(argv=None):
"""
This method is called by maven during rpm creation.
Params:
1: Path to resources root directory
"""
res_path = argv[1]
if len(argv) >= 3:
stacks_path = argv[2]
else:
stacks_path = os.path.join(res_path, ResourceFilesKeeper.STACKS_DIR)
resource_files_keeper = ResourceFilesKeeper(res_path, stacks_path, nozip=True)
resource_files_keeper.perform_housekeeping()
if __name__ == '__main__':
main(sys.argv)
| {
"content_hash": "7ab293ddd99c2b805ed5f624d41edaa3",
"timestamp": "",
"source": "github",
"line_count": 318,
"max_line_length": 101,
"avg_line_length": 34.39622641509434,
"alnum_prop": 0.6641067836898885,
"repo_name": "sekikn/ambari",
"id": "64600c8bba4f31b48d26ad0f16b1bd5b5f0d9feb",
"size": "10961",
"binary": false,
"copies": "2",
"ref": "refs/heads/trunk",
"path": "ambari-server/src/main/python/ambari_server/resourceFilesKeeper.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "22734"
},
{
"name": "C",
"bytes": "109499"
},
{
"name": "C#",
"bytes": "182799"
},
{
"name": "CSS",
"bytes": "616806"
},
{
"name": "CoffeeScript",
"bytes": "4323"
},
{
"name": "Dockerfile",
"bytes": "8117"
},
{
"name": "HTML",
"bytes": "3725781"
},
{
"name": "Handlebars",
"bytes": "1594385"
},
{
"name": "Java",
"bytes": "26670585"
},
{
"name": "JavaScript",
"bytes": "14647486"
},
{
"name": "Jinja",
"bytes": "147938"
},
{
"name": "Less",
"bytes": "303080"
},
{
"name": "Makefile",
"bytes": "2407"
},
{
"name": "PHP",
"bytes": "149648"
},
{
"name": "PLpgSQL",
"bytes": "298247"
},
{
"name": "PowerShell",
"bytes": "2047735"
},
{
"name": "Python",
"bytes": "7226684"
},
{
"name": "R",
"bytes": "1457"
},
{
"name": "Shell",
"bytes": "350773"
},
{
"name": "TSQL",
"bytes": "42351"
},
{
"name": "Vim Script",
"bytes": "5813"
},
{
"name": "sed",
"bytes": "1133"
}
],
"symlink_target": ""
} |
package org.apache.pulsar.common.util.collections;
import com.google.common.collect.Lists;
import com.google.common.collect.Range;
import com.google.common.collect.RangeSet;
import com.google.common.collect.TreeRangeSet;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.Set;
import lombok.EqualsAndHashCode;
/**
* A set comprising zero or more ranges type of key-value pair.
*/
public interface LongPairRangeSet<T extends Comparable<T>> {
/**
* Adds the specified range (range that contains all values strictly greater than {@code
* lower} and less than or equal to {@code upper}.) to this {@code RangeSet} (optional operation). That is, for equal
* range sets a and b, the result of {@code a.add(range)} is that {@code a} will be the minimal range set for which
* both {@code a.enclosesAll(b)} and {@code a.encloses(range)}.
*
* <pre>
*
* @param lowerKey : value for key of lowerEndpoint of Range
* @param lowerValue: value for value of lowerEndpoint of Range
* @param upperKey : value for key of upperEndpoint of Range
* @param upperValue: value for value of upperEndpoint of Range
* </pre>
*/
void addOpenClosed(long lowerKey, long lowerValue, long upperKey, long upperValue);
/** Determines whether any of this range set's member ranges contains {@code value}. */
boolean contains(long key, long value);
/**
* Returns the unique range from this range set that {@linkplain Range#contains contains} {@code value}, or
* {@code null} if this range set does not contain {@code value}.
*/
Range<T> rangeContaining(long key, long value);
/**
* Remove range that contains all values less than or equal to given key-value.
*
* @param key
* @param value
*/
void removeAtMost(long key, long value);
boolean isEmpty();
void clear();
/**
* Returns the minimal range which {@linkplain Range#encloses(Range) encloses} all ranges in this range set.
*
* @return
*/
Range<T> span();
/**
* Returns a view of the {@linkplain Range#isConnected disconnected} ranges that make up this range set.
*
* @return
*/
Collection<Range<T>> asRanges();
/**
* Performs the given action for each entry in this map until all entries have been processed
* or action returns "false". Unless otherwise specified by the implementing class,
* actions are performed in the order of entry set iteration (if an iteration order is specified.)
*
* @param action
*/
void forEach(RangeProcessor<T> action);
/**
* Performs the given action for each entry in this map until all entries have been processed
* or action returns "false". Unless otherwise specified by the implementing class,
* actions are performed in the order of entry set iteration (if an iteration order is specified.)
*
* @param action
* @param consumer
*/
void forEach(RangeProcessor<T> action, LongPairConsumer<? extends T> consumer);
/**
* Returns total number of ranges into the set.
*
* @return
*/
int size();
/**
* It returns very first smallest range in the rangeSet.
*
* @return first smallest range into the set
*/
Range<T> firstRange();
/**
* It returns very last biggest range in the rangeSet.
*
* @return last biggest range into the set
*/
Range<T> lastRange();
/**
* Return the number bit sets to true from lower (inclusive) to upper (inclusive).
*/
int cardinality(long lowerKey, long lowerValue, long upperKey, long upperValue);
/**
* Represents a function that accepts two long arguments and produces a result.
*
* @param <T> the type of the result.
*/
public interface LongPairConsumer<T> {
T apply(long key, long value);
}
/**
* The interface exposing a method for processing of ranges.
* @param <T> - The incoming type of data in the range object.
*/
public interface RangeProcessor<T extends Comparable<T>> {
/**
*
* @param range
* @return false if there is no further processing required
*/
boolean process(Range<T> range);
}
/**
* This class is a simple key-value data structure.
*/
@EqualsAndHashCode
class LongPair implements Comparable<LongPair> {
@SuppressWarnings("checkstyle:ConstantName")
public static final LongPair earliest = new LongPair(-1, -1);
@SuppressWarnings("checkstyle:ConstantName")
public static final LongPair latest = new LongPair(Integer.MAX_VALUE, Integer.MAX_VALUE);
private long key;
private long value;
public LongPair(long key, long value) {
this.key = key;
this.value = value;
}
public long getKey() {
return this.key;
}
public long getValue() {
return this.value;
}
@Override
public int compareTo(LongPair that) {
if (this.key != that.key) {
return this.key < that.key ? -1 : 1;
}
if (this.value != that.value) {
return this.value < that.value ? -1 : 1;
}
return 0;
}
@Override
public String toString() {
return key + ":" + value;
}
}
/**
* Generic implementation of a default range set.
*
* @param <T> the type of values in ranges.
*/
class DefaultRangeSet<T extends Comparable<T>> implements LongPairRangeSet<T> {
RangeSet<T> set = TreeRangeSet.create();
private final LongPairConsumer<T> consumer;
public DefaultRangeSet(LongPairConsumer<T> consumer) {
this.consumer = consumer;
}
@Override
public void clear() {
set.clear();
}
@Override
public void addOpenClosed(long key1, long value1, long key2, long value2) {
set.add(Range.openClosed(consumer.apply(key1, value1), consumer.apply(key2, value2)));
}
public boolean contains(T position) {
return set.contains(position);
}
public Range<T> rangeContaining(T position) {
return set.rangeContaining(position);
}
@Override
public Range<T> rangeContaining(long key, long value) {
return this.rangeContaining(consumer.apply(key, value));
}
public void remove(Range<T> range) {
set.remove(range);
}
@Override
public void removeAtMost(long key, long value) {
set.remove(Range.atMost(consumer.apply(key, value)));
}
@Override
public boolean isEmpty() {
return set.isEmpty();
}
@Override
public Range<T> span() {
try {
return set.span();
} catch (NoSuchElementException e) {
return null;
}
}
@Override
public Set<Range<T>> asRanges() {
return set.asRanges();
}
@Override
public void forEach(RangeProcessor<T> action) {
forEach(action, consumer);
}
@Override
public void forEach(RangeProcessor<T> action, LongPairConsumer<? extends T> consumer) {
for (Range<T> range : asRanges()) {
if (!action.process(range)) {
break;
}
}
}
@Override
public boolean contains(long key, long value) {
return this.contains(consumer.apply(key, value));
}
@Override
public Range<T> firstRange() {
Iterator<Range<T>> iterable = set.asRanges().iterator();
if (iterable.hasNext()) {
return iterable.next();
}
return null;
}
@Override
public Range<T> lastRange() {
if (set.asRanges().isEmpty()) {
return null;
}
List<Range<T>> list = Lists.newArrayList(set.asRanges().iterator());
return list.get(list.size() - 1);
}
@Override
public int cardinality(long lowerKey, long lowerValue, long upperKey, long upperValue) {
throw new UnsupportedOperationException();
}
@Override
public int size() {
return set.asRanges().size();
}
@Override
public String toString() {
return set.toString();
}
}
}
| {
"content_hash": "55d4042e6b87dc2590bc21e9fb4e3800",
"timestamp": "",
"source": "github",
"line_count": 302,
"max_line_length": 120,
"avg_line_length": 29.112582781456954,
"alnum_prop": 0.5871246587807097,
"repo_name": "massakam/pulsar",
"id": "70a589cf5516641ee7d3604e479814511e97626c",
"size": "9599",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "pulsar-common/src/main/java/org/apache/pulsar/common/util/collections/LongPairRangeSet.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "15099"
},
{
"name": "Dockerfile",
"bytes": "20057"
},
{
"name": "Go",
"bytes": "117008"
},
{
"name": "HCL",
"bytes": "14529"
},
{
"name": "HTML",
"bytes": "822"
},
{
"name": "Java",
"bytes": "31626049"
},
{
"name": "JavaScript",
"bytes": "1385"
},
{
"name": "Lua",
"bytes": "5454"
},
{
"name": "Python",
"bytes": "243009"
},
{
"name": "Shell",
"bytes": "159955"
}
],
"symlink_target": ""
} |
void syscall(struct task *task);
#endif
| {
"content_hash": "6b97706ea580fa9448eeb39de9a46938",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 32,
"avg_line_length": 13.666666666666666,
"alnum_prop": 0.7317073170731707,
"repo_name": "spectrec/ann",
"id": "093c90744ea0b300feb68b27489030f31ab4c368",
"size": "100",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/kernel/syscall.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Assembly",
"bytes": "6198"
},
{
"name": "C",
"bytes": "108230"
},
{
"name": "C++",
"bytes": "2674"
},
{
"name": "GDB",
"bytes": "637"
},
{
"name": "M4",
"bytes": "1245"
},
{
"name": "Makefile",
"bytes": "5347"
},
{
"name": "Perl",
"bytes": "441"
},
{
"name": "Shell",
"bytes": "31"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
<meta charset="utf-8"/>
<title>API Documentation</title>
<meta name="author" content=""/>
<meta name="description" content=""/>
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.no-icons.min.css" rel="stylesheet">
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.min.css" rel="stylesheet">
<link href="../css/prism.css" rel="stylesheet" media="all"/>
<link href="../css/template.css" rel="stylesheet" media="all"/>
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script>
<![endif]-->
<script src="http://code.jquery.com/jquery-1.10.2.min.js" type="text/javascript"></script>
<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.min.js" type="text/javascript"></script>
<script src="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/js/bootstrap.min.js"></script>
<script src="../js/jquery.smooth-scroll.js"></script>
<script src="../js/prism.min.js"></script>
<!-- TODO: Add http://jscrollpane.kelvinluck.com/ to style the scrollbars for browsers not using webkit-->
<script type="text/javascript">
function loadExternalCodeSnippets() {
Array.prototype.slice.call(document.querySelectorAll('pre[data-src]')).forEach(function (pre) {
var src = pre.getAttribute('data-src');
var extension = (src.match(/\.(\w+)$/) || [, ''])[1];
var language = 'php';
var code = document.createElement('code');
code.className = 'language-' + language;
pre.textContent = '';
code.textContent = 'Loading…';
pre.appendChild(code);
var xhr = new XMLHttpRequest();
xhr.open('GET', src, true);
xhr.onreadystatechange = function () {
if (xhr.readyState == 4) {
if (xhr.status < 400 && xhr.responseText) {
code.textContent = xhr.responseText;
Prism.highlightElement(code);
}
else if (xhr.status >= 400) {
code.textContent = '✖ Error ' + xhr.status + ' while fetching file: ' + xhr.statusText;
}
else {
code.textContent = '✖ Error: File does not exist or is empty';
}
}
};
xhr.send(null);
});
}
$(document).ready(function(){
loadExternalCodeSnippets();
});
$('#source-view').on('shown', function () {
loadExternalCodeSnippets();
})
</script>
<link rel="shortcut icon" href="../images/favicon.ico"/>
<link rel="apple-touch-icon" href="../images/apple-touch-icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="../images/apple-touch-icon-72x72.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="../images/apple-touch-icon-114x114.png"/>
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<i class="icon-ellipsis-vertical"></i>
</a>
<a class="brand" href="../index.html">API Documentation</a>
<div class="nav-collapse">
<ul class="nav pull-right">
<li class="dropdown">
<a href="../index.html" class="dropdown-toggle" data-toggle="dropdown">
API Documentation <b class="caret"></b>
</a>
<ul class="dropdown-menu">
</ul>
</li>
<li class="dropdown" id="charts-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Charts <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../graphs/class.html">
<i class="icon-list-alt"></i> Class hierarchy diagram
</a>
</li>
</ul>
</li>
<li class="dropdown" id="reports-menu">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">
Reports <b class="caret"></b>
</a>
<ul class="dropdown-menu">
<li>
<a href="../reports/errors.html">
<i class="icon-list-alt"></i> Errors
</a>
</li>
<li>
<a href="../reports/markers.html">
<i class="icon-list-alt"></i> Markers
</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
</div>
<!--<div class="go_to_top">-->
<!--<a href="#___" style="color: inherit">Back to top  <i class="icon-upload icon-white"></i></a>-->
<!--</div>-->
</div>
<div id="___" class="container-fluid">
<section class="row-fluid">
<div class="span2 sidebar">
<div class="accordion" style="margin-bottom: 0">
<div class="accordion-group">
<div class="accordion-heading">
<a class="accordion-toggle " data-toggle="collapse" data-target="#namespace-481229518"></a>
<a href="../namespaces/default.html" style="margin-left: 30px; padding-left: 0">\</a>
</div>
<div id="namespace-481229518" class="accordion-body collapse in">
<div class="accordion-inner">
<ul>
<li class="class"><a href="../classes/Administrator.html">Administrator</a></li>
<li class="class"><a href="../classes/Annotator.html">Annotator</a></li>
<li class="class"><a href="../classes/CMF.html">CMF</a></li>
<li class="class"><a href="../classes/Core.html">Core</a></li>
<li class="class"><a href="../classes/Settings.html">Settings</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="row-fluid">
<div class="span10 offset2">
<div class="row-fluid">
<div class="span8 content file">
<nav>
</nav>
<a href="#source-view" role="button" class="pull-right btn" data-toggle="modal"><i class="icon-code"></i></a>
<h1><small>core/class</small>annotator.class.php</h1>
<p><em></em></p>
<h2>Classes</h2>
<table class="table table-hover">
<tr>
<td><a href="../classes/Annotator.html">Annotator</a></td>
<td><em></em></td>
</tr>
</table>
</div>
<aside class="span4 detailsbar">
<dl>
<dt>Package</dt>
<dd><div class="namespace-wrapper">Default</div></dd>
</dl>
<h2>Tags</h2>
<table class="table table-condensed">
<tr><td colspan="2"><em>None found</em></td></tr>
</table>
</aside>
</div>
</div>
</section>
<div id="source-view" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="source-view-label" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="source-view-label"></h3>
</div>
<div class="modal-body">
<pre data-src="../files/core/class/annotator.class.php.txt" class="language-php line-numbers"></pre>
</div>
</div>
<footer class="row-fluid">
<section class="span10 offset2">
<section class="row-fluid">
<section class="span10 offset1">
<section class="row-fluid footer-sections">
<section class="span4">
<h1><i class="icon-code"></i></h1>
<div>
<ul>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-bar-chart"></i></h1>
<div>
<ul>
<li><a href="">Class Hierarchy Diagram</a></li>
</ul>
</div>
</section>
<section class="span4">
<h1><i class="icon-pushpin"></i></h1>
<div>
<ul>
<li><a href="">Errors</a></li>
<li><a href="">Markers</a></li>
</ul>
</div>
</section>
</section>
</section>
</section>
<section class="row-fluid">
<section class="span10 offset1">
<hr />
Documentation is powered by <a href="http://www.phpdoc.org/">phpDocumentor </a> and authored
on August 27th, 2013 at 15:56.
</section>
</section>
</section>
</footer>
</div>
</body>
</html>
| {
"content_hash": "2b2c53e36dcfc02d95cce3b2a0f285d4",
"timestamp": "",
"source": "github",
"line_count": 260,
"max_line_length": 180,
"avg_line_length": 43.715384615384615,
"alnum_prop": 0.404275910610593,
"repo_name": "lyndonnixon/annotationtool",
"id": "e025d23c43b23575ccae8b0b71165590a169e1d4",
"size": "11373",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "documentation/files/core.class.annotator.class.php.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "172230"
},
{
"name": "JavaScript",
"bytes": "1487098"
},
{
"name": "PHP",
"bytes": "7042179"
},
{
"name": "Shell",
"bytes": "32066"
}
],
"symlink_target": ""
} |
/*
* Minimal serial functions needed to use one of the PSC ports
* as serial console interface.
*/
#include <common.h>
#include <linux/compiler.h>
#include <mpc5xxx.h>
#if defined (CONFIG_SERIAL_MULTI)
#include <serial.h>
#endif
DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_PSC_CONSOLE)
#if CONFIG_PSC_CONSOLE == 1
#define PSC_BASE MPC5XXX_PSC1
#elif CONFIG_PSC_CONSOLE == 2
#define PSC_BASE MPC5XXX_PSC2
#elif CONFIG_PSC_CONSOLE == 3
#define PSC_BASE MPC5XXX_PSC3
#elif CONFIG_PSC_CONSOLE == 4
#define PSC_BASE MPC5XXX_PSC4
#elif CONFIG_PSC_CONSOLE == 5
#define PSC_BASE MPC5XXX_PSC5
#elif CONFIG_PSC_CONSOLE == 6
#define PSC_BASE MPC5XXX_PSC6
#else
#error CONFIG_PSC_CONSOLE must be in 1 ... 6
#endif
#if defined(CONFIG_SERIAL_MULTI) && !defined(CONFIG_PSC_CONSOLE2)
#error you must define CONFIG_PSC_CONSOLE2 if CONFIG_SERIAL_MULTI is set
#endif
#if defined(CONFIG_SERIAL_MULTI)
#if CONFIG_PSC_CONSOLE2 == 1
#define PSC_BASE2 MPC5XXX_PSC1
#elif CONFIG_PSC_CONSOLE2 == 2
#define PSC_BASE2 MPC5XXX_PSC2
#elif CONFIG_PSC_CONSOLE2 == 3
#define PSC_BASE2 MPC5XXX_PSC3
#elif CONFIG_PSC_CONSOLE2 == 4
#define PSC_BASE2 MPC5XXX_PSC4
#elif CONFIG_PSC_CONSOLE2 == 5
#define PSC_BASE2 MPC5XXX_PSC5
#elif CONFIG_PSC_CONSOLE2 == 6
#define PSC_BASE2 MPC5XXX_PSC6
#else
#error CONFIG_PSC_CONSOLE2 must be in 1 ... 6
#endif
#endif /* CONFIG_SERIAL_MULTI */
#if defined(CONFIG_SERIAL_MULTI)
int serial_init_dev (unsigned long dev_base)
#else
int serial_init (void)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
unsigned long baseclk;
int div;
/* reset PSC */
psc->command = PSC_SEL_MODE_REG_1;
/* select clock sources */
psc->psc_clock_select = 0;
baseclk = (gd->ipb_clk + 16) / 32;
/* switch to UART mode */
psc->sicr = 0;
/* configure parity, bit length and so on */
psc->mode = PSC_MODE_8_BITS | PSC_MODE_PARNONE;
psc->mode = PSC_MODE_ONE_STOP;
/* set up UART divisor */
div = (baseclk + (gd->baudrate/2)) / gd->baudrate;
psc->ctur = (div >> 8) & 0xff;
psc->ctlr = div & 0xff;
/* disable all interrupts */
psc->psc_imr = 0;
/* reset and enable Rx/Tx */
psc->command = PSC_RST_RX;
psc->command = PSC_RST_TX;
psc->command = PSC_RX_ENABLE | PSC_TX_ENABLE;
return (0);
}
#if defined(CONFIG_SERIAL_MULTI)
void serial_putc_dev (unsigned long dev_base, const char c)
#else
void serial_putc(const char c)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
if (c == '\n')
#if defined(CONFIG_SERIAL_MULTI)
serial_putc_dev (dev_base, '\r');
#else
serial_putc('\r');
#endif
/* Wait for last character to go. */
while (!(psc->psc_status & PSC_SR_TXEMP))
;
psc->psc_buffer_8 = c;
}
#if defined(CONFIG_SERIAL_MULTI)
void serial_putc_raw_dev(unsigned long dev_base, const char c)
#else
void serial_putc_raw(const char c)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
/* Wait for last character to go. */
while (!(psc->psc_status & PSC_SR_TXEMP))
;
psc->psc_buffer_8 = c;
}
#if defined(CONFIG_SERIAL_MULTI)
void serial_puts_dev (unsigned long dev_base, const char *s)
#else
void serial_puts (const char *s)
#endif
{
while (*s) {
#if defined(CONFIG_SERIAL_MULTI)
serial_putc_dev (dev_base, *s++);
#else
serial_putc (*s++);
#endif
}
}
#if defined(CONFIG_SERIAL_MULTI)
int serial_getc_dev (unsigned long dev_base)
#else
int serial_getc(void)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
/* Wait for a character to arrive. */
while (!(psc->psc_status & PSC_SR_RXRDY))
;
return psc->psc_buffer_8;
}
#if defined(CONFIG_SERIAL_MULTI)
int serial_tstc_dev (unsigned long dev_base)
#else
int serial_tstc(void)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
return (psc->psc_status & PSC_SR_RXRDY);
}
#if defined(CONFIG_SERIAL_MULTI)
void serial_setbrg_dev (unsigned long dev_base)
#else
void serial_setbrg(void)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
unsigned long baseclk, div;
baseclk = (gd->ipb_clk + 16) / 32;
/* set up UART divisor */
div = (baseclk + (gd->baudrate/2)) / gd->baudrate;
psc->ctur = (div >> 8) & 0xFF;
psc->ctlr = div & 0xff;
}
#if defined(CONFIG_SERIAL_MULTI)
void serial_setrts_dev (unsigned long dev_base, int s)
#else
void serial_setrts(int s)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
if (s) {
/* Assert RTS (become LOW) */
psc->op1 = 0x1;
}
else {
/* Negate RTS (become HIGH) */
psc->op0 = 0x1;
}
}
#if defined(CONFIG_SERIAL_MULTI)
int serial_getcts_dev (unsigned long dev_base)
#else
int serial_getcts(void)
#endif
{
#if defined(CONFIG_SERIAL_MULTI)
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)dev_base;
#else
volatile struct mpc5xxx_psc *psc = (struct mpc5xxx_psc *)PSC_BASE;
#endif
return (psc->ip & 0x1) ? 0 : 1;
}
#if defined(CONFIG_SERIAL_MULTI)
int serial0_init(void)
{
return (serial_init_dev(PSC_BASE));
}
int serial1_init(void)
{
return (serial_init_dev(PSC_BASE2));
}
void serial0_setbrg (void)
{
serial_setbrg_dev(PSC_BASE);
}
void serial1_setbrg (void)
{
serial_setbrg_dev(PSC_BASE2);
}
void serial0_putc(const char c)
{
serial_putc_dev(PSC_BASE,c);
}
void serial1_putc(const char c)
{
serial_putc_dev(PSC_BASE2, c);
}
void serial0_puts(const char *s)
{
serial_puts_dev(PSC_BASE, s);
}
void serial1_puts(const char *s)
{
serial_puts_dev(PSC_BASE2, s);
}
int serial0_getc(void)
{
return(serial_getc_dev(PSC_BASE));
}
int serial1_getc(void)
{
return(serial_getc_dev(PSC_BASE2));
}
int serial0_tstc(void)
{
return (serial_tstc_dev(PSC_BASE));
}
int serial1_tstc(void)
{
return (serial_tstc_dev(PSC_BASE2));
}
struct serial_device serial0_device =
{
"serial0",
serial0_init,
NULL,
serial0_setbrg,
serial0_getc,
serial0_tstc,
serial0_putc,
serial0_puts,
};
__weak struct serial_device *default_serial_console(void)
{
return &serial0_device;
}
struct serial_device serial1_device =
{
"serial1",
serial1_init,
NULL,
serial1_setbrg,
serial1_getc,
serial1_tstc,
serial1_putc,
serial1_puts,
};
#endif /* CONFIG_SERIAL_MULTI */
#endif /* CONFIG_PSC_CONSOLE */
| {
"content_hash": "29d387552d23cf76002e39e677841bf5",
"timestamp": "",
"source": "github",
"line_count": 341,
"max_line_length": 72,
"avg_line_length": 20.343108504398828,
"alnum_prop": 0.6961222430445437,
"repo_name": "indashnet/InDashNet.Open.UN2000",
"id": "aa09f67ccf3ac2889edb53983382c9203f27438e",
"size": "8101",
"binary": false,
"copies": "77",
"ref": "refs/heads/master",
"path": "lichee/u-boot/arch/powerpc/cpu/mpc5xxx/serial.c",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
from azure.identity import DefaultAzureCredential
from azure.mgmt.devtestlabs import DevTestLabsClient
"""
# PREREQUISITES
pip install azure-identity
pip install azure-mgmt-devtestlabs
# USAGE
python operations_get.py
Before run the sample, please set the values of the client ID, tenant ID and client secret
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
"""
def main():
client = DevTestLabsClient(
credential=DefaultAzureCredential(),
subscription_id="{subscriptionId}",
)
response = client.operations.get(
location_name="{locationName}",
name="{operationName}",
)
print(response)
# x-ms-original-file: specification/devtestlabs/resource-manager/Microsoft.DevTestLab/stable/2018-09-15/examples/Operations_Get.json
if __name__ == "__main__":
main()
| {
"content_hash": "01b318183299beeb856e83c7b23d954a",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 132,
"avg_line_length": 31.757575757575758,
"alnum_prop": 0.7242366412213741,
"repo_name": "Azure/azure-sdk-for-python",
"id": "07e70d5b6316ca5459a689aae556f70d1095f7f2",
"size": "1516",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "sdk/devtestlabs/azure-mgmt-devtestlabs/generated_samples/operations_get.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1224"
},
{
"name": "Bicep",
"bytes": "24196"
},
{
"name": "CSS",
"bytes": "6089"
},
{
"name": "Dockerfile",
"bytes": "4892"
},
{
"name": "HTML",
"bytes": "12058"
},
{
"name": "JavaScript",
"bytes": "8137"
},
{
"name": "Jinja",
"bytes": "10377"
},
{
"name": "Jupyter Notebook",
"bytes": "272022"
},
{
"name": "PowerShell",
"bytes": "518535"
},
{
"name": "Python",
"bytes": "715484989"
},
{
"name": "Shell",
"bytes": "3631"
}
],
"symlink_target": ""
} |
import * as _ from 'lodash';
import { DefaultStateProvider, ComponentFactoryState } from 'esp-js-ui';
import RegionNames from '../shell/regionNames';
import CashTileState from './cash-tile/models/cashTileState';
import BlotterState from './blotter/models/blotterState';
import TradingModuleContainerConst from './tradingModuleContainerConst';
export default class TradingModuleDefaultStateProvider implements DefaultStateProvider {
getComponentFactoriesState(layoutMode:string):Array<ComponentFactoryState> {
let blotterStates = [BlotterState.create(RegionNames.blotterRegion)];
let cashTileStates : Array<CashTileState> = _.map(
['EURUSD', 'EURGBP', 'AUDUSD', 'CADJPY', 'CHFJPY', 'GBPJPY'],
symbol => CashTileState.create(symbol, RegionNames.workspaceRegion)
);
return [{
componentFactoryKey: TradingModuleContainerConst.blotterComponentFactory,
componentsState: blotterStates
}, {
componentFactoryKey: TradingModuleContainerConst.cashTileComponentFactory,
componentsState: cashTileStates
}];
}
}
| {
"content_hash": "f198915b485799f40b1a620afa14134d",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 88,
"avg_line_length": 49,
"alnum_prop": 0.7222715173025732,
"repo_name": "esp/esp-js-ui",
"id": "f63ae2bca5cb47269de6fe0f4cbfb36edb1b4588",
"size": "1127",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "examples/module-based-app/src/trading-module/tradingModuleDefaultStateProvider.ts",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "JavaScript",
"bytes": "1919"
},
{
"name": "TypeScript",
"bytes": "87806"
}
],
"symlink_target": ""
} |
import static org.junit.Assert.assertEquals;
import org.junit.Ignore;
import org.junit.Test;
public class MicroBlogTest {
private final MicroBlog microBlog = new MicroBlog();
@Test
public void englishLanguageShort() {
String expected = "Hi";
assertEquals(expected, microBlog.truncate("Hi"));
}
@Test
public void englishLanguageLong() {
String expected = "Hello";
assertEquals(expected, microBlog.truncate("Hello there"));
}
@Test
public void germanLanguageShort_broth() {
String expected = "brühe";
assertEquals(expected, microBlog.truncate("brühe"));
}
@Test
public void germanLanguageLong_bearCarpet_to_beards() {
String expected = "Bärte";
assertEquals(expected, microBlog.truncate("Bärteppich"));
}
@Test
public void bulgarianLanguageShort_good() {
String expected = "Добър";
assertEquals(expected, microBlog.truncate("Добър"));
}
@Test
public void greekLanguageShort_health() {
String expected = "υγειά";
assertEquals(expected, microBlog.truncate("υγειά"));
}
@Test
public void mathsShort() {
String expected = "a=πr²";
assertEquals(expected, microBlog.truncate("a=πr²"));
}
@Test
public void mathsLong() {
String expected = "∅⊊ℕ⊊ℤ";
assertEquals(expected, microBlog.truncate("∅⊊ℕ⊊ℤ⊊ℚ⊊ℝ⊊ℂ"));
}
@Test
public void englishAndEmojiShort() {
String expected = "Fly 🛫";
assertEquals(expected, microBlog.truncate("Fly 🛫"));
}
@Test
public void emojiShort() {
String expected = "💇";
assertEquals(expected, microBlog.truncate("💇"));
}
@Test
public void emojiLong() {
String expected = "❄🌡🤧🤒🏥";
assertEquals(expected, microBlog.truncate("❄🌡🤧🤒🏥🕰😀"));
}
@Test
public void royalFlush() {
String expected = "🃎🂸🃅🃋🃍";
assertEquals(expected, microBlog.truncate("🃎🂸🃅🃋🃍🃁🃊"));
}
}
| {
"content_hash": "4714bf9799c18c9985c1c34980c04379",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 66,
"avg_line_length": 24.962962962962962,
"alnum_prop": 0.6053412462908012,
"repo_name": "rootulp/exercism",
"id": "a1d81f5445354a7df236f40943f019575b1334ef",
"size": "2164",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "java/micro-blog/src/test/java/MicroBlogTest.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "18900"
},
{
"name": "CoffeeScript",
"bytes": "15342"
},
{
"name": "Elm",
"bytes": "48222"
},
{
"name": "Go",
"bytes": "594636"
},
{
"name": "HTML",
"bytes": "81617"
},
{
"name": "Java",
"bytes": "231244"
},
{
"name": "JavaScript",
"bytes": "126832"
},
{
"name": "Python",
"bytes": "242540"
},
{
"name": "Ruby",
"bytes": "192051"
},
{
"name": "Rust",
"bytes": "77292"
},
{
"name": "TypeScript",
"bytes": "78185"
}
],
"symlink_target": ""
} |
/**
* This test checks the upgrade path from noauth/nossl to x509/requireSSL.
*
* NOTE: This test uses ssl communication and therefore cannot test modes that
* do not allow ssl. The first step in the full upgrade process is to restart
* the each node into the "transitionToX509AllowSSL" state and is tested in
* the sslSpecial directory.
*
* This test requires users and data to persist across a restart.
* @tags: [requires_persistence]
*/
load('jstests/ssl/libs/ssl_helpers.js');
(function() {
'use strict';
var dbName = 'upgradeToX509';
var transitionToX509AllowSSL =
Object.merge(allowSSL, {transitionToAuth: '', clusterAuthMode: 'x509'});
// Undefine the flags we're replacing, otherwise upgradeSet will keep old values.
var x509RequireSSL =
Object.merge(requireSSL, {transitionToAuth: undefined, clusterAuthMode: 'x509'});
var rst = new ReplSetTest({name: 'noauthSet', nodes: 3, nodeOptions: transitionToX509AllowSSL});
rst.startSet();
rst.initiate();
var rstConn1 = rst.getPrimary();
var testDB = rstConn1.getDB(dbName);
// Create a user to login when auth is enabled later
assert.commandWorked(rstConn1.adminCommand(
{createUser: 'root', pwd: 'root', roles: ['root'], writeConcern: {w: 3}}));
assert.writeOK(testDB.a.insert({a: 1, str: 'TESTTESTTEST'}));
assert.eq(1, testDB.a.count(), 'Error interacting with replSet');
print('=== UPGRADE transition to x509/allowSSL -> transition to x509/preferSSL ===');
rst.nodes.forEach(function(node) {
assert.commandWorked(node.adminCommand({setParameter: 1, sslMode: "preferSSL"}));
});
rst.awaitSecondaryNodes();
testDB = rst.getPrimary().getDB(dbName);
assert.writeOK(testDB.a.insert({a: 1, str: 'TESTTESTTEST'}));
assert.eq(2, testDB.a.count(), 'Error interacting with replSet');
print('=== UPGRADE transition to x509/preferSSL -> x509/requireSSL ===');
rst.upgradeSet(x509RequireSSL, 'root', 'root');
// upgradeSet leaves its connections logged in as root
testDB = rst.getPrimary().getDB(dbName);
assert.writeOK(testDB.a.insert({a: 1, str: 'TESTTESTTEST'}));
assert.eq(3, testDB.a.count(), 'Error interacting with replSet');
rst.stopSet();
}());
| {
"content_hash": "a089ccc9ac121950cff92b5214cf2d36",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 100,
"avg_line_length": 39.03448275862069,
"alnum_prop": 0.6855123674911661,
"repo_name": "christkv/mongo-shell",
"id": "ba1f53bdb8e9886c2aee68277be4cceb102ca8f5",
"size": "2264",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/jstests/ssl/upgrade_noauth_to_x509_ssl.js",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "392"
},
{
"name": "JavaScript",
"bytes": "6633558"
},
{
"name": "Makefile",
"bytes": "422"
}
],
"symlink_target": ""
} |
<table id="cantarell">
<thead>
<th><abbr title="Operating System">OS</abbr></th>
<th>
<span class="legend supported"><span class="icon-supported" aria-hidden="true"></span> Supported</span>
<span class="legend aliased"><span class="icon-aliased" aria-hidden="true"></span>Aliased</span>
<span class="legend unsupported"><span class="icon-unsupported" aria-hidden="true"></span> <abbr title="Operating System">OS</abbr> Default</span></th>
</thead>
<tbody>
<tr class=" unsupported">
<td><a href="os/os-x-snow-leopard"><span class="icon-os-x-snow-leopard" aria-hidden="true"></span><span class="a11y-hidden">Mac OS X</span> <span class="version">Snow Leopard 10.6.8</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/os-x-lion"><span class="icon-os-x-lion" aria-hidden="true"></span><span class="a11y-hidden">Mac OS X</span> <span class="version">Lion 10.7.5</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/os-x-mountain-lion"><span class="icon-os-x-mountain-lion" aria-hidden="true"></span><span class="a11y-hidden">Mac OS X</span> <span class="version">Mountain Lion 10.8.5</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/os-x-mavericks"><span class="icon-os-x-mavericks" aria-hidden="true"></span><span class="a11y-hidden">Mac OS X</span> <span class="version">Mavericks 10.9.5</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/win-xp-sp3"><span class="icon-win-xp-sp3" aria-hidden="true"></span><span class="a11y-hidden">Windows</span> <span class="version">XP (NT 5.1 SP3)</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/win-xp"><span class="icon-win-xp" aria-hidden="true"></span><span class="a11y-hidden">Windows</span> <span class="version">XP (NT 5.2)</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/win-7"><span class="icon-win-7" aria-hidden="true"></span><span class="a11y-hidden">Windows</span> <span class="version">7 (NT 6.1)</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/win-8"><span class="icon-win-8" aria-hidden="true"></span><span class="a11y-hidden">Windows</span> <span class="version">8 (NT 6.2)</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/win-8-1"><span class="icon-win-8-1" aria-hidden="true"></span><span class="a11y-hidden">Windows</span> <span class="version">8.1 (NT 6.3)</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/ios-5-1-iphone"><span class="icon-ios-5-1-iphone" aria-hidden="true"></span><span class="a11y-hidden">iOS-iPhone</span> <span class="version">5.1</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/ios-6-iphone"><span class="icon-ios-6-iphone" aria-hidden="true"></span><span class="a11y-hidden">iOS-iPhone</span> <span class="version">6.0</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/ios-7-iphone"><span class="icon-ios-7-iphone" aria-hidden="true"></span><span class="a11y-hidden">iOS-iPhone</span> <span class="version">7.0.3</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/ios-8-1-iphone"><span class="icon-ios-8-1-iphone" aria-hidden="true"></span><span class="a11y-hidden">iOS-iPhone</span> <span class="version">8.1</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/ios-9-3-iphone"><span class="icon-ios-9-3-iphone" aria-hidden="true"></span><span class="a11y-hidden">iOS-iPhone</span> <span class="version">9.3</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/android-4-2-2"><span class="icon-android-4-2-2" aria-hidden="true"></span><span class="a11y-hidden">Android</span> <span class="version">Jelly Bean 4.2.2</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/android-4-4"><span class="icon-android-4-4" aria-hidden="true"></span><span class="a11y-hidden">Android</span> <span class="version">KitKat 4.4.2</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/android-5-0"><span class="icon-android-5-0" aria-hidden="true"></span><span class="a11y-hidden">Android</span> <span class="version">Lollipop 5.0.2</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/android-6-0"><span class="icon-android-6-0" aria-hidden="true"></span><span class="a11y-hidden">Android</span> <span class="version">Marshmallow 6.0.1</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/win-phone-7-5"><span class="icon-win-phone-7-5" aria-hidden="true"></span><span class="a11y-hidden">Windows</span> <span class="version">Phone 7.5</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/win-phone-8"><span class="icon-win-phone-8" aria-hidden="true"></span><span class="a11y-hidden">Windows</span> <span class="version">Phone 8.0</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class=" unsupported">
<td><a href="os/ubuntu-14"><span class="icon-ubuntu-14" aria-hidden="true"></span><span class="a11y-hidden">Linux</span> <span class="version">Ubuntu 14.04</span></a></td>
<td>
<span class="icon-unsupported" aria-hidden="true"></span><span class="a11y-hidden">unsupported</span>
</td>
</tr>
<tr class="supported">
<td><a href="os/fedora-20"><span class="icon-fedora-20" aria-hidden="true"></span><span class="a11y-hidden">Linux</span> <span class="version">Fedora 20</span></a></td>
<td style="font-family: 'Cantarell'">
<span class="icon-supported" aria-hidden="true"></span><span class="a11y-hidden">Supported</span>
Cantarell
</td>
</tr>
</tbody>
</table>
| {
"content_hash": "2df1c17257d1cd9e027547bc0e6cdcd0",
"timestamp": "",
"source": "github",
"line_count": 232,
"max_line_length": 204,
"avg_line_length": 37.064655172413794,
"alnum_prop": 0.6025119199906966,
"repo_name": "zachleat/font-family-reunion",
"id": "6f330f1a27d60946d7642caf2aa611fbc7f8854e",
"size": "8599",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "fontfamily.io/results/cantarell.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "3777"
},
{
"name": "CSS",
"bytes": "7363"
},
{
"name": "HTML",
"bytes": "9283570"
},
{
"name": "JavaScript",
"bytes": "20996"
},
{
"name": "PHP",
"bytes": "3620"
},
{
"name": "Shell",
"bytes": "64"
}
],
"symlink_target": ""
} |
package com.polelink.Icon.Internal;
import java.lang.reflect.Modifier;
import java.net.URL;
import java.util.Enumeration;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.service.http.HttpService;
public abstract class BundleRegisterAcitivator implements BundleActivator{
public static BundleContext context;
private static HttpService httpService;
public void registerBundle(Bundle bundle) throws InstantiationException, IllegalAccessException, NoSuchMethodException, SecurityException{
FutureUtil futureUtil=new FutureUtil();
futureUtil.asyncExecute(this,
BundleRegisterAcitivator.class
.getDeclaredMethod("asnycRegisterBundle", new Class[] {
Bundle.class }), new Object[] {
bundle });
// 启动异步计算结果输出线程,该线程扫描异步计算Futrue的状态,如果已经完成,则输出异步计算结果
FutureUtil.OutputResult output = new FutureUtil.OutputResult();
output.setFutureContext(futureUtil.getFutureContext());
Thread resultThread = new Thread(output);
resultThread.start();
futureUtil.stopExecutorService();
}
public void asnycRegisterBundle(Bundle bundle){
ClassLoader classLoader = BundleUtil.getBundleClassLoader(bundle);
Enumeration<URL> classUrls = bundle.findEntries("/", "*.class",
true);
if (classUrls == null || !classUrls.hasMoreElements())
return;
while (classUrls.hasMoreElements()) {
URL url = classUrls.nextElement();
String startSymbo = "url:bundle://";
// url:bundle://pike.box-123-0-0/com/polelink/pike/box/data/MyConverterFactory.class
int beginInx = url.toString().indexOf("/",
startSymbo.length() + 1);
int endInx = url.toString().lastIndexOf(".class");
if (endInx < 0 || endInx <= beginInx)
endInx = url.toString().length();
String className = url.toString().substring(beginInx + 1,
endInx);
className = className.replace("/", ".");
Class clazz = null;
if (className.indexOf("$") > 0)// 说明是内部类不处理
continue;
try {
clazz = classLoader.loadClass(className);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (clazz == null)
continue;
if (Modifier.isAbstract(clazz.getModifiers()))// 如果是抽象类不处理
continue;
if (IPlugin.class.isAssignableFrom(clazz)
&& !clazz.isInterface()) {
try {
System.out.println("register----------------------------");
PluginRegisterBroadcaster.registerPlugin((IPlugin)clazz.newInstance());
} catch (InstantiationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}
}
| {
"content_hash": "8f195f3d053289e86b56b546667309f3",
"timestamp": "",
"source": "github",
"line_count": 96,
"max_line_length": 139,
"avg_line_length": 28.822916666666668,
"alnum_prop": 0.6982291290206,
"repo_name": "lry1991/test",
"id": "9cb517cd670176c6a24785693612970b30263abb",
"size": "3305",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "IconManagement/src/main/java/com/polelink/Icon/Internal/BundleRegisterAcitivator.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "6281786"
},
{
"name": "Java",
"bytes": "184528"
},
{
"name": "JavaScript",
"bytes": "23572"
}
],
"symlink_target": ""
} |
$LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
require 'defekt/autorun'
class Hacker
def identity(person)
person.name
end
end
class HackerTest < Defekt::Base
before { @hacker = Hacker.new }
test 'mock' do
mock = Defekt::Mock.new
mock.expect(:name, 'kodnin')
equal_to! 'kodnin', @hacker.identity(mock)
verify! mock
end
test 'stub' do
not_respond_to! @hacker, :password
@hacker.stub(:password, 'nindok') do
respond_to! @hacker, :password
equal_to! 'nindok', @hacker.password
end
not_respond_to! @hacker, :password
end
end
| {
"content_hash": "02777dffcc236a0c2f31cd949e11f3cd",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 62,
"avg_line_length": 20.79310344827586,
"alnum_prop": 0.6368159203980099,
"repo_name": "kodnin/defekt",
"id": "70cfc366ce4939874ad6eb234232a505ad22e681",
"size": "603",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/support/hacker_test.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "26889"
},
{
"name": "Shell",
"bytes": "59"
}
],
"symlink_target": ""
} |
using System.Drawing;
using OpenMetaverse;
using WaterWars.Views.Widgets;
namespace WaterWars.Views.Widgets.Behaviours
{
public class FixedLabelBehaviour : ILabelBehaviour
{
public OsButton Button { get; set; }
public string Text
{
get { return Button.Part.Text; }
set { Button.Part.SetText(value); }
}
public Color TextColor
{
get { return Button.Part.Color; }
set { Button.Part.Color = value; }
}
public void UpdateAppearance()
{
// Make sure that the text always appears, just in case it has been set transparant previously.
TextColor = Color.Black;
}
}
} | {
"content_hash": "9ea30f73c7a0c59959e9ba5185041fe0",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 107,
"avg_line_length": 24.322580645161292,
"alnum_prop": 0.5623342175066313,
"repo_name": "justinccdev/waterwars",
"id": "b5cee9dd69abc9df219273142bd4fe9367bca9e8",
"size": "2477",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/WaterWars/Views/Widgets/Behaviours/FixedLabelBehaviour.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C#",
"bytes": "1026815"
},
{
"name": "JavaScript",
"bytes": "89284"
},
{
"name": "PHP",
"bytes": "1829"
}
],
"symlink_target": ""
} |
package mod.simpletubes.common.block;
import mod.simpletubes.SimpleTubes;
import mod.simpletubes.common.item.ItemUpgrade;
import mod.simpletubes.common.network.PacketHandler;
import mod.simpletubes.common.network.packet.PacketDisplacerSync;
import mod.simpletubes.common.tile.TileDisplacer;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyBool;
import net.minecraft.block.properties.PropertyEnum;
import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.InventoryHelper;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.Mirror;
import net.minecraft.util.Rotation;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockDisplacer extends Block {
public static final PropertyEnum<EnumFacing> FACING = PropertyEnum.create("facing", EnumFacing.class);
public static final PropertyBool POWERED = PropertyBool.create("powered");
public static final PropertyBool FILTER = PropertyBool.create("filter");
public BlockDisplacer() {
super(Material.IRON);
setRegistryName(SimpleTubes.MOD_ID, "block_displacer");
setUnlocalizedName(getRegistryName().toString());
this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(POWERED, false).withProperty(FILTER, false));
}
public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
worldIn.setBlockState(pos, state.withProperty(FACING, getDirection(pos, placer)), 2);
}
public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
return this.getDefaultState().withProperty(FACING, getDirection(pos, placer));
}
private EnumFacing getDirection(BlockPos pos, EntityLivingBase placer) {
if (Math.abs(placer.posX - (double) ((float) pos.getX() + 0.5F)) < 2.0D && Math.abs(placer.posZ - (double) ((float) pos.getZ() + 0.5F)) < 2.0D) {
double d0 = placer.posY + (double) placer.getEyeHeight();
if (d0 - (double) pos.getY() > 2.0D) {
return EnumFacing.DOWN;
}
if ((double) pos.getY() - d0 > 0.0D) {
return EnumFacing.UP;
}
}
return placer.getHorizontalFacing();
}
@Override
public boolean onBlockActivated(World world, BlockPos pos, IBlockState state, EntityPlayer player, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
if (!world.isRemote) {
ItemStack held = player.getHeldItem(hand);
if (player.isSneaking()) {
if (state.getValue(FILTER) && ((TileDisplacer) world.getTileEntity(pos)).hasFilter()) {
state = state.withProperty(FILTER, false);
world.setBlockState(pos, state);
if (world.getTileEntity(pos) != null && world.getTileEntity(pos) instanceof TileDisplacer) {
((TileDisplacer) world.getTileEntity(pos)).setHasFilter(false);
((TileDisplacer) world.getTileEntity(pos)).markDirty();
PacketHandler.sendToAll(new PacketDisplacerSync(((TileDisplacer) world.getTileEntity(pos)), false));
if (!player.isCreative())
InventoryHelper.spawnItemStack(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(SimpleTubes.proxy.itemUpgrade, 1, 0));
}
}
return true;
} else {
if (!(held.getItem() instanceof ItemUpgrade) || held == ItemStack.EMPTY) {
if (((TileDisplacer) world.getTileEntity(pos)).hasFilter()) {
player.openGui(SimpleTubes.instance, 0, world, pos.getX(), pos.getY(), pos.getZ());
return true;
}
}
}
}
return true;
}
@Override
public void neighborChanged(IBlockState state, World world, BlockPos pos, Block blockIn, BlockPos fromPos) {
if (!world.isRemote) {
TileEntity tile = world.getTileEntity(pos);
if (tile == null)
return;
if (tile instanceof TileDisplacer) {
if (world.isBlockPowered(pos)) {
if (!state.getValue(POWERED)) {
state = state.withProperty(POWERED, true);
}
} else {
if (state.getValue(POWERED)) {
state = state.withProperty(POWERED, false);
}
}
world.setBlockState(pos, state);
}
}
}
@Override
public void breakBlock(World world, BlockPos pos, IBlockState state) {
if (!world.isRemote) {
TileEntity tile = world.getTileEntity(pos);
if (tile != null && tile instanceof TileDisplacer)
if (state.getValue(FILTER) && ((TileDisplacer) tile).hasFilter())
InventoryHelper.spawnItemStack(world, pos.getX(), pos.getY(), pos.getZ(), new ItemStack(SimpleTubes.proxy.itemUpgrade, 1, 0));
}
super.breakBlock(world, pos, state);
}
@Override
public boolean canConnectRedstone(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
if (side == state.getValue(FACING) || side == state.getValue(FACING).getOpposite())
return false;
return true;
}
@Override
public boolean shouldCheckWeakPower(IBlockState state, IBlockAccess world, BlockPos pos, EnumFacing side) {
return true;
}
@Override
public boolean isOpaqueCube(IBlockState state) {
return false;
}
@Override
public IBlockState getActualState(IBlockState state, IBlockAccess world, BlockPos pos) {
TileEntity tile = world.getTileEntity(pos);
if(tile != null && tile instanceof TileDisplacer)
state = state.withProperty(FILTER, ((TileDisplacer) tile).hasFilter());
return state;
}
@Override
protected BlockStateContainer createBlockState() {
return new BlockStateContainer(this, new IProperty[] { FACING, POWERED, FILTER });
}
public IBlockState getStateFromMeta(int meta) {
return this.getDefaultState().withProperty(FACING, EnumFacing.getFront(meta)).withProperty(POWERED, Boolean.valueOf((meta & 8) > 0));
}
public int getMetaFromState(IBlockState state) {
int meta = 0;
meta = meta | ((EnumFacing) state.getValue(FACING)).getIndex();
if (((Boolean) state.getValue(POWERED)).booleanValue())
meta |= 8;
return meta;
}
@Override
public IBlockState withRotation(IBlockState state, Rotation rot) {
return state.withProperty(FACING, rot.rotate((EnumFacing) state.getValue(FACING)));
}
@Override
public IBlockState withMirror(IBlockState state, Mirror mirrorIn) {
return state.withRotation(mirrorIn.toRotation((EnumFacing) state.getValue(FACING)));
}
@Override
public boolean hasTileEntity(IBlockState state) {
return true;
}
@Override
public TileEntity createTileEntity(World world, IBlockState state) {
return new TileDisplacer();
}
}
| {
"content_hash": "482144416feb614c231e2efed2f09d6f",
"timestamp": "",
"source": "github",
"line_count": 213,
"max_line_length": 171,
"avg_line_length": 32.291079812206576,
"alnum_prop": 0.7348066298342542,
"repo_name": "oMilkyy/SimpleTubes",
"id": "7036945144d7cedf83406199c0022ff3b85b3ebe",
"size": "6878",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/mod/simpletubes/common/block/BlockDisplacer.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "132287"
}
],
"symlink_target": ""
} |
package ch.xxx.carrental.ui.dto;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement(name="CrLogMsg")
@XmlAccessorType(XmlAccessType.FIELD)
public class CrLogMsg {
public enum LogLevel {INFO("Info"), WARN("Warn"), ERROR("Error");
private String level;
private LogLevel(String level) {
this.level = level;
}
public String getLevel() {
return this.level;
}
};
@XmlElement(required=true)
private String logLevel;
@XmlElement(required=true)
private String logMsg;
public CrLogMsg() {
}
public CrLogMsg(String logLevel, String logMsg) {
super();
this.logLevel = logLevel;
this.logMsg = logMsg;
}
public CrLogMsg(LogLevel logLevel, String logMsg) {
super();
this.logLevel = logLevel.getLevel();
this.logMsg = logMsg;
}
public String getLogLevel() {
return logLevel;
}
public void setLogLevel(String logLevel) {
this.logLevel = logLevel;
}
public String getLogMsg() {
return logMsg;
}
public void setLogMsg(String logMsg) {
this.logMsg = logMsg;
}
}
| {
"content_hash": "bfd0e0ef2e3401f19978d2db0b7e7009",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 66,
"avg_line_length": 19.65,
"alnum_prop": 0.7184054283290925,
"repo_name": "Angular2Guy/Angular2AndJavaEE",
"id": "a962f358c9246229e11919869fa108431d5db71f",
"size": "1774",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "carrental-ejb/src/main/java/ch/xxx/carrental/ui/dto/CrLogMsg.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "202"
},
{
"name": "Dockerfile",
"bytes": "242"
},
{
"name": "HTML",
"bytes": "13798"
},
{
"name": "Java",
"bytes": "79140"
},
{
"name": "JavaScript",
"bytes": "3680"
},
{
"name": "SCSS",
"bytes": "3562"
},
{
"name": "Shell",
"bytes": "771"
},
{
"name": "TypeScript",
"bytes": "60191"
}
],
"symlink_target": ""
} |
package com.myfeike.service;
import org.activiti.engine.impl.pvm.process.ActivityImpl;
import java.util.List;
/**
* @author izerui.com
* @version createtime:2014年5月2日 下午3:11:28
*/
public interface TaskOperateService {
/**
* 根据流程实例ID获取当前任务后面即将流转到的节点信息
* @param taskId 任务ID
* @return NextActivitys
*/
public List<ActivityImpl> getNextActivitys(String taskId);
}
| {
"content_hash": "4632fba4b1babbad359715bcf26293e3",
"timestamp": "",
"source": "github",
"line_count": 20,
"max_line_length": 59,
"avg_line_length": 19.1,
"alnum_prop": 0.7382198952879581,
"repo_name": "izerui/activiti-next-taskDef-handle",
"id": "9cc622992a32aa104d4740dd0847da87e63ca75c",
"size": "446",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/myfeike/service/TaskOperateService.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "15418"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "69e517ac01fbcb2633689566c5a29521",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "fc2428bc51c5a4e23c6cbc3f031fcd33726b2af4",
"size": "196",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Arecales/Arecaceae/Butia/Butia paraguayensis/ Syn. Syagrus amadelpha/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
using System.Collections.Generic;
using System.Text.Json;
using Azure.Core;
namespace Azure.Management.Storage.Models
{
public partial class PrivateLinkResource : IUtf8JsonSerializable
{
void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
{
writer.WriteStartObject();
if (Id != null)
{
writer.WritePropertyName("id");
writer.WriteStringValue(Id);
}
if (Name != null)
{
writer.WritePropertyName("name");
writer.WriteStringValue(Name);
}
if (Type != null)
{
writer.WritePropertyName("type");
writer.WriteStringValue(Type);
}
writer.WritePropertyName("properties");
writer.WriteStartObject();
if (GroupId != null)
{
writer.WritePropertyName("groupId");
writer.WriteStringValue(GroupId);
}
if (RequiredMembers != null)
{
writer.WritePropertyName("requiredMembers");
writer.WriteStartArray();
foreach (var item in RequiredMembers)
{
writer.WriteStringValue(item);
}
writer.WriteEndArray();
}
if (RequiredZoneNames != null)
{
writer.WritePropertyName("requiredZoneNames");
writer.WriteStartArray();
foreach (var item in RequiredZoneNames)
{
writer.WriteStringValue(item);
}
writer.WriteEndArray();
}
writer.WriteEndObject();
writer.WriteEndObject();
}
internal static PrivateLinkResource DeserializePrivateLinkResource(JsonElement element)
{
string id = default;
string name = default;
string type = default;
string groupId = default;
IList<string> requiredMembers = default;
IList<string> requiredZoneNames = default;
foreach (var property in element.EnumerateObject())
{
if (property.NameEquals("id"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
id = property.Value.GetString();
continue;
}
if (property.NameEquals("name"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
name = property.Value.GetString();
continue;
}
if (property.NameEquals("type"))
{
if (property.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
type = property.Value.GetString();
continue;
}
if (property.NameEquals("properties"))
{
foreach (var property0 in property.Value.EnumerateObject())
{
if (property0.NameEquals("groupId"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
groupId = property0.Value.GetString();
continue;
}
if (property0.NameEquals("requiredMembers"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
List<string> array = new List<string>();
foreach (var item in property0.Value.EnumerateArray())
{
if (item.ValueKind == JsonValueKind.Null)
{
array.Add(null);
}
else
{
array.Add(item.GetString());
}
}
requiredMembers = array;
continue;
}
if (property0.NameEquals("requiredZoneNames"))
{
if (property0.Value.ValueKind == JsonValueKind.Null)
{
continue;
}
List<string> array = new List<string>();
foreach (var item in property0.Value.EnumerateArray())
{
if (item.ValueKind == JsonValueKind.Null)
{
array.Add(null);
}
else
{
array.Add(item.GetString());
}
}
requiredZoneNames = array;
continue;
}
}
continue;
}
}
return new PrivateLinkResource(id, name, type, groupId, requiredMembers, requiredZoneNames);
}
}
}
| {
"content_hash": "0eefa462e6b7d6d83c1c68dfd3b6fa5d",
"timestamp": "",
"source": "github",
"line_count": 157,
"max_line_length": 104,
"avg_line_length": 37.8343949044586,
"alnum_prop": 0.38181818181818183,
"repo_name": "hyonholee/azure-sdk-for-net",
"id": "19aa54b0e4edecdc85b128c98e3eaa41cb3a032a",
"size": "6078",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "sdk/testcommon/Azure.Management.Storage.2019_06/src/Generated/Models/PrivateLinkResource.Serialization.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "16774"
},
{
"name": "C#",
"bytes": "37415276"
},
{
"name": "HTML",
"bytes": "234899"
},
{
"name": "JavaScript",
"bytes": "7875"
},
{
"name": "PowerShell",
"bytes": "273940"
},
{
"name": "Shell",
"bytes": "13061"
},
{
"name": "Smarty",
"bytes": "11135"
},
{
"name": "TypeScript",
"bytes": "143209"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_131) on Tue Aug 08 15:29:08 CDT 2017 -->
<title>Uses of Class dillon.gameAPI.utils.Scheduling</title>
<meta name="date" content="2017-08-08">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class dillon.gameAPI.utils.Scheduling";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../dillon/gameAPI/utils/Scheduling.html" title="class in dillon.gameAPI.utils">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?dillon/gameAPI/utils/class-use/Scheduling.html" target="_top">Frames</a></li>
<li><a href="Scheduling.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class dillon.gameAPI.utils.Scheduling" class="title">Uses of Class<br>dillon.gameAPI.utils.Scheduling</h2>
</div>
<div class="classUseContainer">No usage of dillon.gameAPI.utils.Scheduling</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../dillon/gameAPI/utils/Scheduling.html" title="class in dillon.gameAPI.utils">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?dillon/gameAPI/utils/class-use/Scheduling.html" target="_top">Frames</a></li>
<li><a href="Scheduling.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "89fe672cba1d00eeca0b332934f242ad",
"timestamp": "",
"source": "github",
"line_count": 124,
"max_line_length": 125,
"avg_line_length": 34.46774193548387,
"alnum_prop": 0.6141787552643894,
"repo_name": "dg092099/Dillons-Java-Game-API",
"id": "0675e3c5fa716cbc09de8997639d382e5db42bfe",
"size": "4274",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/dillon/gameAPI/utils/class-use/Scheduling.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "200686"
}
],
"symlink_target": ""
} |
<?php //űťf8
class sys_lib_email_driver_activex extends p_lib {
private $cfg;
function cfg($cfg) {
$this->cfg = $cfg;
}
function send111($email,$subject,$message,$filepath=null) {
@$CDONTS = new COM("CDONTS.NewMail");
@$CDONTS->From = "from_user@domain.com";
@$CDONTS->To = "to_user@domain.com";
@$CDONTS->CC = "cc_user@domain.com";
@$CDONTS->BCC = "bcc_user@domain.com";
@$CDONTS->BodyFormat = 0;
@$CDONTS->MailFormat = 0;
//@$CDONTS->AttachFile("c:\file.txt");
@$CDONTS->Subject = "Using CDONTS with PHP4 and IIS";
@$CDONTS->Body = "Blah blah blah blah, bleh...";
@$CDONTS->Send();
@$CDONTS->Close();
}
function send($email,$subject,$message,$filepath=null) {
$objApp = new COM("Outlook.Application");
$myItem = $objApp->CreateItem(olMailItem);
$a=$myItem->Recipients->Add("admin@purplerain.org");
$myItem->Subject="Subject";
$myItem->Body="This is a Body Section now.....!";
$myItem->Display();
$myItem->Send();
}
} | {
"content_hash": "b24a1095dc3c60448095f5a825fd9dc2",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 60,
"avg_line_length": 22.906976744186046,
"alnum_prop": 0.6233502538071066,
"repo_name": "Galaka/Framework",
"id": "7d2b61aa0b1481c2bc6e1d9a5141a5d9eba842be",
"size": "1488",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "sys/lib/email/driver/sys_lib_email_driver_activex.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "764"
},
{
"name": "CSS",
"bytes": "7219"
},
{
"name": "JavaScript",
"bytes": "108689"
},
{
"name": "PHP",
"bytes": "978419"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _5ClosestTwoPoints
{
//class Point
//{
// public int X { get; set; }
// public int Y { get; set; }
//}
}
| {
"content_hash": "c4727e36ee30bbbb01bee8428427a80e",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 40,
"avg_line_length": 19.071428571428573,
"alnum_prop": 0.6104868913857678,
"repo_name": "todorkolev81/SoftUni",
"id": "5452aa2f6d933460e917b157f98c6736a8247c82",
"size": "269",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Objects and Simple Classes/5ClosestTwoPoints/Point.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "380897"
}
],
"symlink_target": ""
} |
module DocomoImageRecognition
class Configuration
attr_accessor :base_url
def initialize
self.base_url = 'https://api.apigw.smt.docomo.ne.jp/imageRecognition/v1/recognize'
end
end
end
| {
"content_hash": "712f6760803d1233e1074c34871b9a19",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 88,
"avg_line_length": 23,
"alnum_prop": 0.7294685990338164,
"repo_name": "HackathonMonster/ruby-docomo-image-recognition",
"id": "f56886520aef20181bf40af54c149fd73c4a7319",
"size": "207",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/docomo_image_recognition/configuration.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "3558"
}
],
"symlink_target": ""
} |
class RcovAnalyzer
include ScoringStrategies
COLUMNS = %w{percentage_uncovered}
def columns
COLUMNS
end
def name
:rcov
end
def map(row)
row.percentage_uncovered
end
def reduce(scores)
ScoringStrategies.average(scores)
end
def score(metric_ranking, item)
ScoringStrategies.identity(metric_ranking, item)
end
def generate_records(data, table)
return if data==nil
data.each do |file_name, info|
next if (file_name == :global_percent_run) || (info[:methods].nil?)
info[:methods].each do |method_name, percentage_uncovered|
location = MetricFu::Location.for(method_name)
table << {
"metric" => :rcov,
'file_path' => file_name,
'class_name' => location.class_name,
"method_name" => location.method_name,
"percentage_uncovered" => percentage_uncovered
}
end
end
end
end | {
"content_hash": "fe0cc8c4ab91f0141bd2076bd17687bc",
"timestamp": "",
"source": "github",
"line_count": 43,
"max_line_length": 72,
"avg_line_length": 21.093023255813954,
"alnum_prop": 0.639470782800441,
"repo_name": "ManageIQ/metric_fu",
"id": "f23d0fed320f82429bd663d3038860219624ffdb",
"size": "907",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "lib/base/rcov_analyzer.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "18967"
},
{
"name": "Ruby",
"bytes": "213379"
}
],
"symlink_target": ""
} |
#include "third_party/blink/renderer/core/html/html_pre_element.h"
#include "third_party/blink/renderer/core/css/css_property_names.h"
#include "third_party/blink/renderer/core/css/css_property_value_set.h"
#include "third_party/blink/renderer/core/css_value_keywords.h"
#include "third_party/blink/renderer/core/html_names.h"
namespace blink {
HTMLPreElement::HTMLPreElement(const QualifiedName& tag_name,
Document& document)
: HTMLElement(tag_name, document) {}
bool HTMLPreElement::IsPresentationAttribute(const QualifiedName& name) const {
if (name == html_names::kWrapAttr)
return true;
return HTMLElement::IsPresentationAttribute(name);
}
void HTMLPreElement::CollectStyleForPresentationAttribute(
const QualifiedName& name,
const AtomicString& value,
MutableCSSPropertyValueSet* style) {
if (name == html_names::kWrapAttr) {
style->SetLonghandProperty(CSSPropertyID::kWhiteSpace,
CSSValueID::kPreWrap);
} else {
HTMLElement::CollectStyleForPresentationAttribute(name, value, style);
}
}
} // namespace blink
| {
"content_hash": "f3d91d2cb8de410263f38a6a2c0c6217",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 79,
"avg_line_length": 33.05882352941177,
"alnum_prop": 0.7224199288256228,
"repo_name": "chromium/chromium",
"id": "8644236b7ebe456d3557e4162164bfd581310f20",
"size": "2073",
"binary": false,
"copies": "6",
"ref": "refs/heads/main",
"path": "third_party/blink/renderer/core/html/html_pre_element.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2012/deployment" AppPlatformVersion="8.0">
<DefaultLanguage xmlns="" code="en-US"/>
<App xmlns="" ProductID="{0d6206fd-4306-49b8-b080-b19277d4fd9c}" Title="SimpleDemo.WinPhone" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="SimpleDemo.WinPhone author" Description="Sample description" Publisher="SimpleDemo.WinPhone" PublisherID="{7a411d6e-a93b-4133-9b9a-30cf595fbf4c}">
<IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_NETWORKING"/>
<Capability Name="ID_CAP_MEDIALIB_AUDIO"/>
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK"/>
<Capability Name="ID_CAP_SENSORS"/>
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT"/>
</Capabilities>
<Tasks>
<DefaultTask Name ="_default" NavigationPage="MainPage.xaml"/>
</Tasks>
<Tokens>
<PrimaryToken TokenID="SimpleDemo.WinPhoneToken" TaskName="_default">
<TemplateFlip>
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
<Count>0</Count>
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
<Title>SimpleDemo.WinPhone</Title>
<BackContent></BackContent>
<BackBackgroundImageURI></BackBackgroundImageURI>
<BackTitle></BackTitle>
<DeviceLockImageURI></DeviceLockImageURI>
<HasLarge></HasLarge>
</TemplateFlip>
</PrimaryToken>
</Tokens>
<ScreenResolutions>
<ScreenResolution Name="ID_RESOLUTION_WVGA"/>
<ScreenResolution Name="ID_RESOLUTION_WXGA"/>
<ScreenResolution Name="ID_RESOLUTION_HD720P"/>
</ScreenResolutions>
</App>
</Deployment> | {
"content_hash": "33699e8889a5ca8d216850c2da4670d5",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 314,
"avg_line_length": 49.89473684210526,
"alnum_prop": 0.694620253164557,
"repo_name": "sevoku/oxyplot",
"id": "91767de68f427620b1ffd896150fd6dd18db1dd0",
"size": "1898",
"binary": false,
"copies": "3",
"ref": "refs/heads/develop",
"path": "Source/Examples/XamarinForms/SimpleDemo.WinPhone/Properties/WMAppManifest.xml",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "2937"
},
{
"name": "C#",
"bytes": "4172154"
},
{
"name": "Shell",
"bytes": "5967"
},
{
"name": "Visual Basic",
"bytes": "16188"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "d80da86b18585d3618ed66520826066d",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "359a81520afa80b011823fdff151be6d0c8d7ba0",
"size": "179",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Myrtales/Myrtaceae/Syzygium/Syzygium ripicola/ Syn. Eugenia ripicola/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
'use strict';
function Store() {
this.emit = function () {};
}
function MemoryStore() {}
var session = { Store: Store, MemoryStore: MemoryStore };
var MongoStore = require('connect-mongo')(session);
if (typeof MongoStore === 'function') {
console.log('ok');
}
| {
"content_hash": "2b2fdbd691336ce251cc85965b20ad7b",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 57,
"avg_line_length": 20.53846153846154,
"alnum_prop": 0.6591760299625468,
"repo_name": "zeit/pkg",
"id": "4c9389596aa78a23b7f57d038868d4bb431053ca",
"size": "267",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "test/test-79-npm/connect-mongo/connect-mongo.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2631"
},
{
"name": "CoffeeScript",
"bytes": "80"
},
{
"name": "HTML",
"bytes": "1603"
},
{
"name": "JavaScript",
"bytes": "408587"
}
],
"symlink_target": ""
} |
<?php
namespace Album\Model;
use RuntimeException;
use Zend\Db\TableGateway\TableGatewayInterface;
class AlbumTable
{
private $tableGateway;
public function __construct(TableGatewayInterface $tableGateway)
{
$this->tableGateway = $tableGateway;
}
public function fetchAll()
{
return $this->tableGateway->select();
}
public function getAlbum($id)
{
$id = (int) $id;
$rowset = $this->tableGateway->select(['id' => $id]);
$row = $rowset->current();
if (! $row) {
throw new RuntimeException(sprintf(
'Could not find row with identifier %d',
$id
));
}
return $row;
}
public function saveAlbum(Album $album)
{
$data = [
'artist' => $album->artist,
'title' => $album->title,
];
$id = (int) $album->id;
if ($id === 0) {
$this->tableGateway->insert($data);
return;
}
if (! $this->getAlbum($id)) {
throw new RuntimeException(sprintf(
'Cannot update album with identifier %d; does not exist',
$id
));
}
$this->tableGateway->update($data, ['id' => $id]);
}
public function deleteAlbum($id)
{
$this->tableGateway->delete(['id' => (int) $id]);
}
} | {
"content_hash": "15ca1dde1b7eb1d370e3cc86495d842a",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 73,
"avg_line_length": 21.96875,
"alnum_prop": 0.5007112375533428,
"repo_name": "neterslandreau/zend-blog",
"id": "66f071ef795fdf44b2719288f732ed7e330dff3d",
"size": "1406",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "module/Album/src/Model/AlbumTable.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "748"
},
{
"name": "CSS",
"bytes": "931"
},
{
"name": "HTML",
"bytes": "15093"
},
{
"name": "PHP",
"bytes": "27203"
}
],
"symlink_target": ""
} |
import os
import unittest
from test_dist_base import TestDistBase
import paddle.fluid as fluid
flag_name = os.path.splitext(__file__)[0]
class TestParallelDygraphTransformer(TestDistBase):
def _setup_config(self):
self._sync_mode = False
self._nccl2_mode = True
self._dygraph = True
def test_transformer(self):
if fluid.core.is_compiled_with_cuda():
self.check_with_place(
"parallel_dygraph_transformer.py",
delta=1e-5,
check_error_log=True,
log_name=flag_name,
)
class TestParallelDygraphTransformerAccGrad(TestDistBase):
def _setup_config(self):
self._sync_mode = False
self._nccl2_mode = True
self._dygraph = True
self._accumulate_gradient = True
self._find_unused_parameters = False
def test_transformer(self):
if fluid.core.is_compiled_with_cuda():
self.check_with_place(
"parallel_dygraph_transformer.py",
delta=1e-5,
check_error_log=True,
log_name=flag_name,
)
if __name__ == "__main__":
unittest.main()
| {
"content_hash": "b33f91d26bbeb5d3a52cceddfa93cbe9",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 58,
"avg_line_length": 26.043478260869566,
"alnum_prop": 0.5784641068447413,
"repo_name": "PaddlePaddle/Paddle",
"id": "2b9045c9630c9e73681e2e6ad4aa68ec8206025b",
"size": "1809",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "python/paddle/fluid/tests/unittests/collective/fleet/test_parallel_dygraph_transformer.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "58544"
},
{
"name": "C",
"bytes": "210300"
},
{
"name": "C++",
"bytes": "36848680"
},
{
"name": "CMake",
"bytes": "902619"
},
{
"name": "Cuda",
"bytes": "5227207"
},
{
"name": "Dockerfile",
"bytes": "4361"
},
{
"name": "Go",
"bytes": "49796"
},
{
"name": "Java",
"bytes": "16630"
},
{
"name": "Jinja",
"bytes": "23852"
},
{
"name": "MLIR",
"bytes": "39982"
},
{
"name": "Python",
"bytes": "36203874"
},
{
"name": "R",
"bytes": "1332"
},
{
"name": "Shell",
"bytes": "553177"
}
],
"symlink_target": ""
} |
#region license
// Copyright (c) 2004, Rodrigo B. de Oliveira (rbo@acm.org)
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of Rodrigo B. de Oliveira nor the names of its
// contributors may be used to endorse or promote products derived from this
// software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
// THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#endregion
namespace Boo.Lang.Compiler.TypeSystem
{
using System;
using System.Text;
public class CallableSignature
{
IParameter[] _parameters;
IType _returnType;
int _hashCode;
bool _acceptVarArgs;
public CallableSignature(IMethod method)
{
if (null == method)
{
throw new ArgumentNullException("method");
}
Initialize(method.GetParameters(), method.ReturnType, method.AcceptVarArgs);
}
public CallableSignature(IParameter[] parameters, IType returnType)
{
Initialize(parameters, returnType, false);
}
public CallableSignature(IParameter[] parameters, IType returnType, bool acceptVarArgs)
{
Initialize(parameters, returnType, acceptVarArgs);
}
private void Initialize(IParameter[] parameters, IType returnType, bool acceptVarArgs)
{
if (null == parameters)
{
throw new ArgumentNullException("parameters");
}
if (null == returnType)
{
throw new ArgumentNullException("returnType");
}
_parameters = parameters;
_returnType = returnType;
_acceptVarArgs = acceptVarArgs;
InitializeHashCode();
}
public IParameter[] Parameters
{
get
{
return _parameters;
}
}
public IType ReturnType
{
get
{
return _returnType;
}
}
public bool AcceptVarArgs
{
get
{
return _acceptVarArgs;
}
}
override public int GetHashCode()
{
return _hashCode;
}
override public bool Equals(object other)
{
CallableSignature rhs = other as CallableSignature;
if (null == rhs
|| !_returnType.Equals(rhs._returnType)
|| _acceptVarArgs != rhs._acceptVarArgs)
return false;
return AreSameParameters(_parameters, rhs._parameters);
}
override public string ToString()
{
StringBuilder buffer = new StringBuilder("callable(");
for (int i=0; i<_parameters.Length; ++i)
{
if (i > 0) { buffer.Append(", "); }
if (_parameters[i].IsByRef) buffer.Append("ref ");
if (_acceptVarArgs && i == _parameters.Length-1) buffer.Append('*');
buffer.Append(_parameters[i].Type.ToString());
}
buffer.Append(") as ");
buffer.Append(_returnType.ToString());
return buffer.ToString();
}
static public bool AreSameParameters(IParameter[] lhs, IParameter[] rhs)
{
int len = lhs.Length;
if (len != rhs.Length)
return false;
for (int i=0; i < len; ++i)
{
IParameter lp = lhs[i];
IParameter rp = rhs[i];
if (lp.IsByRef != rp.IsByRef)
return false;
IType rpType = rp.IsByRef ? rp.Type.GetElementType() : rp.Type;
if (!lp.Type.Equals(rpType))
return false;
}
return true;
}
void InitializeHashCode()
{
_hashCode = _acceptVarArgs ? 1 : 2;
foreach (IParameter parameter in _parameters)
{
_hashCode ^= parameter.Type.GetHashCode();
}
_hashCode ^= _returnType.GetHashCode();
}
}
}
| {
"content_hash": "3d118b1807ec01fb8c4c2e7cfc3d5f13",
"timestamp": "",
"source": "github",
"line_count": 164,
"max_line_length": 89,
"avg_line_length": 27.329268292682926,
"alnum_prop": 0.6905399375278893,
"repo_name": "boo/boo-lang",
"id": "0f8807b1756473cf87a10edb4db27465f35005bc",
"size": "4484",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Boo.Lang.Compiler/TypeSystem/CallableSignature.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "4600"
},
{
"name": "Boo",
"bytes": "1554555"
},
{
"name": "C",
"bytes": "2016"
},
{
"name": "C#",
"bytes": "2676178"
},
{
"name": "C++",
"bytes": "275886"
},
{
"name": "Emacs Lisp",
"bytes": "106020"
},
{
"name": "Java",
"bytes": "2088602"
},
{
"name": "PHP",
"bytes": "690"
},
{
"name": "Python",
"bytes": "154955"
},
{
"name": "Shell",
"bytes": "51448"
},
{
"name": "Tcl",
"bytes": "1212"
},
{
"name": "VimL",
"bytes": "7522"
},
{
"name": "Visual Basic",
"bytes": "908"
}
],
"symlink_target": ""
} |
function solve() {
function getProduct(productType, name, price) {
let product = {};
product.productType = productType;
product.name = name;
product.price = +price;
return product;
}
function getShoppingCart() {
let products = [];
function add(product) {
if (product.name && product.productType && product.price) {
products.push(product);
} else {
throw "Error";
}
return this;
}
function remove(product) {
if (product.hasOwnProperty("productType") && product.hasOwnProperty("name") && product.hasOwnProperty("price")) {
if (products.indexOf(product) < 0) {
throw new Error('No such product in cart!');
} else {
products.splice(products.indexOf(product), 1);
}
} else {
throw new Error('Product is not correct!');
}
return this;
}
function showCost() {
let cost = 0;
for (let p of products) {
cost += p.price;
}
return cost;
}
function showProductTypes() {
let types = [];
for (let p in products) {
if (types.indexOf(products[p].productType) < 0) {
types.push(products[p].productType);
}
}
types.sort(function(a, b) {
if (a < b) { return -1; }
if (a > b) { return 1; }
return 0;
});
return types;
}
function getInfo() {
let info = {};
let sorted = [];
info.totalPrice = showCost();
for (i = 0; i < products.length; i++) {
let found = false;
let foundObj;
for (j = 0; j < sorted.length; j++) {
if (products[i].name === sorted[j].name) {
found = true;
foundObj = sorted[j];
}
}
if (!found) {
sorted.push({
name: products[i].name,
quantity: 1,
totalPrice: products[i].price
});
} else {
foundObj.quantity++;
foundObj.totalPrice += products[i].price;
}
}
sorted.sort(function(a, b) {
if (a < b) { return -1; }
if (a > b) { return 1; }
return 0;
});
info.products = sorted;
return info;
}
return {
products: products,
add: add,
remove: remove,
showCost: showCost,
showProductTypes: showProductTypes,
getInfo: getInfo
}
}
return {
getProduct: getProduct,
getShoppingCart: getShoppingCart
};
}
module.exports = solve(); | {
"content_hash": "5da4fb7f0a0d0833fc30593f09490aae",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 125,
"avg_line_length": 27.719298245614034,
"alnum_prop": 0.4098101265822785,
"repo_name": "zachdimitrov/Learning_2017",
"id": "d3b7feed2a048d470ace55e0d6ef2ac5e11749c2",
"size": "3160",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "JS-OOP/00.Exam-Prep/Carts and Products/task/workshop/my-solution.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "309"
},
{
"name": "Batchfile",
"bytes": "517"
},
{
"name": "C#",
"bytes": "1744043"
},
{
"name": "CSS",
"bytes": "87153"
},
{
"name": "CoffeeScript",
"bytes": "8842"
},
{
"name": "HTML",
"bytes": "491299"
},
{
"name": "JavaScript",
"bytes": "5680271"
},
{
"name": "PLpgSQL",
"bytes": "13058"
},
{
"name": "SQLPL",
"bytes": "6946"
},
{
"name": "TypeScript",
"bytes": "19468"
},
{
"name": "XSLT",
"bytes": "7513"
}
],
"symlink_target": ""
} |
PyBBM - Django forum solution
=============================
PyBBM is a complete Django forum solution with the following features:
* Avatars
* Custom profiles and support of Custom User Model (since Django 1.5)
* Editable posts
* Pre-moderation
* Custom sanitization
* Anonymous posting
* Subscriptions
* Polls
* ...
All features are based on:
* 95% test code coverage
* Twitter Bootstrap 2 default theme
* Ready to use example projects
The main focus in the development of PyBMM is to build it in a way that allows *easy* integration in existing Django-based sites. This means that PyBMM does not provide features like user registration, password restoring or the user login page. (But the example projects show how to do these tasks ;))
Contents:
.. toctree::
:maxdepth: 2
install
updates
settings
customuser
premoderation
anonymous
templatetags
example
filters
javascript
testing
pybbmigrate
originalpybb
problems
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
| {
"content_hash": "a3d9f1ac1d8deb282fc61cc8a964818e",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 301,
"avg_line_length": 20.862745098039216,
"alnum_prop": 0.7086466165413534,
"repo_name": "zekone/dj_pybb",
"id": "957b148fa8edfd8a79a28c83494ed7798f9f4a8e",
"size": "1064",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "docs/index.rst",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "CSS",
"bytes": "448518"
},
{
"name": "JavaScript",
"bytes": "28574"
},
{
"name": "Python",
"bytes": "565312"
},
{
"name": "Shell",
"bytes": "9018"
}
],
"symlink_target": ""
} |
var gulp = require('gulp')
gulp.task('build:css', function () {
var concat = require('gulp-concat')
var postcss = require('gulp-postcss')
var autoprefixer = require('autoprefixer')
var customProperties = require('postcss-custom-properties')
var Import = require('postcss-import')
var styleGuide = require('postcss-style-guide')
var nano = require('cssnano')
return gulp.src('./app.css')
.pipe(postcss([
Import,
customProperties({ preserve: true }),
autoprefixer,
styleGuide({
project: 'Project name',
dest: 'styleguide/index.html',
showCode: false,
themePath: '../'
}),
nano
]))
.pipe(concat('app.min.css'))
.pipe(gulp.dest('dist/css'))
})
| {
"content_hash": "3f9e53be0f56329e5cb06813a8a6eb8a",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 63,
"avg_line_length": 31.185185185185187,
"alnum_prop": 0.5427553444180523,
"repo_name": "morishitter/psg-theme-default",
"id": "56469afd9043c7f039832be0e374316fc4aaa2df",
"size": "842",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "example/gulpfile.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "12561"
},
{
"name": "HTML",
"bytes": "12866"
},
{
"name": "JavaScript",
"bytes": "1775"
}
],
"symlink_target": ""
} |
import React from 'react';
import Layout from '../../components/Layout';
import { title, html } from './index.md';
import Badge from 'material-ui/Badge';
import IconButton from 'material-ui/IconButton';
import NotificationsIcon from 'material-ui/svg-icons/social/notifications';
import baseTheme from 'material-ui/styles/baseThemes/lightBaseTheme';
import getMuiTheme from 'material-ui/styles/getMuiTheme';
class AboutPage extends React.Component {
componentDidMount() {
document.title = title;
}
getChildContext() {
return { muiTheme: getMuiTheme(baseTheme) };
}
render() {
return (
<div>
<Badge
badgeContent={4}
primary={true}
>
<NotificationsIcon />
</Badge>
<Badge
badgeContent={10}
secondary={true}
badgeStyle={{ top: 12, right: 12 }}
>
<IconButton tooltip="Notifications">
<NotificationsIcon />
</IconButton>
</Badge>
</div>
);
}
}
AboutPage.childContextTypes = {
muiTheme: React.PropTypes.object.isRequired,
};
export default AboutPage;
| {
"content_hash": "f3c1477726eca518967dd09a134e57fd",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 75,
"avg_line_length": 23.729166666666668,
"alnum_prop": 0.6224758560140474,
"repo_name": "tomalexing/QQ",
"id": "935cae29102ac1266e29d4182da803c4420482fa",
"size": "1431",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/about/index.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "32575"
},
{
"name": "HTML",
"bytes": "1225"
},
{
"name": "JavaScript",
"bytes": "116010"
}
],
"symlink_target": ""
} |
<?php
/**
* getentitlements actions.
*
* @package sf_sandbox
* @subpackage getentitlements
* @author Your name here
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
*/
class getentitlementsActions extends sfActions
{
/**
* Executes index action
*
* @param sfRequest $request A request object
*/
public function executeIndex(sfWebRequest $request)
{
$this->form = new GetEntitlementsForm();
if ($request->isMethod('post'))
{
//$this->form->bind(array($request->getParameter('getentitlements')));
$this->form->bind(array('_csrf_token' => $request->getParameter('_csrf_token'),
'service_id'=>$request->getParameter('service_id'),
'principal_id'=>$request->getParameter('principal_id'),
));
if ($this->form->isValid())
{
$this->p = Doctrine::getTable('Principal')->find($request->getParameter('principal_id'));
$this->s = Doctrine::getTable('Service')->find($request->getParameter('service_id'));
$ar = new AttributeResolver();
$es = $ar->getEntitlementsForPrincipalToService($this->p,$this->s);
$this->es = $es;
$uris = $ar->getUrisForEppnToSpid($this->p->getFedid(),$this->s->getEntityId());
$this->uris = $uris;
}
}
}
}
| {
"content_hash": "93aa2591cd8631bcd06f613e03519dc0",
"timestamp": "",
"source": "github",
"line_count": 41,
"max_line_length": 97,
"avg_line_length": 32.926829268292686,
"alnum_prop": 0.5985185185185186,
"repo_name": "br00k/yavom",
"id": "982ec64c50a0d8baca94912cc6767cf1c1eec7a6",
"size": "1350",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "apps/backend/modules/getentitlements/actions/actions.class.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "595"
},
{
"name": "Batchfile",
"bytes": "1151"
},
{
"name": "CSS",
"bytes": "8918"
},
{
"name": "HTML",
"bytes": "70214"
},
{
"name": "JavaScript",
"bytes": "25451"
},
{
"name": "PHP",
"bytes": "668052"
}
],
"symlink_target": ""
} |
package com.glaf.matrix.combination.bean;
import java.util.Map;
import com.glaf.core.domain.Database;
import com.glaf.matrix.combination.domain.TreeTableAggregate;
public class TreeTableAggregateThread implements java.lang.Runnable {
protected Database database;
protected TreeTableAggregate treeTableAggregate;
protected String splitColumn;
protected int splitValue;
protected Map<String, Object> parameter;
public TreeTableAggregateThread(Database database, TreeTableAggregate treeTableAggregate, String splitColumn,
int splitValue, Map<String, Object> parameter) {
this.database = database;
this.treeTableAggregate = treeTableAggregate;
this.splitColumn = splitColumn;
this.splitValue = splitValue;
this.parameter = parameter;
}
@Override
public void run() {
TreeTableAggregateBean bean = new TreeTableAggregateBean();
bean.execute(database, treeTableAggregate, splitColumn, splitValue, parameter);
}
}
| {
"content_hash": "a4bd9eaf0e0c5f48012e7a68dda647c1",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 110,
"avg_line_length": 25.56756756756757,
"alnum_prop": 0.7991543340380549,
"repo_name": "gitee2008/glaf",
"id": "9af73d67ee6c842680edfaaa3b19c06cca5e39e3",
"size": "1751",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/glaf/matrix/combination/bean/TreeTableAggregateThread.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "34108"
},
{
"name": "CSS",
"bytes": "4661692"
},
{
"name": "CoffeeScript",
"bytes": "83631"
},
{
"name": "FreeMarker",
"bytes": "1445841"
},
{
"name": "HTML",
"bytes": "1858417"
},
{
"name": "Java",
"bytes": "8363421"
},
{
"name": "JavaScript",
"bytes": "13692328"
},
{
"name": "Less",
"bytes": "21042"
},
{
"name": "PHP",
"bytes": "6147"
},
{
"name": "SCSS",
"bytes": "19646"
},
{
"name": "Shell",
"bytes": "51272"
}
],
"symlink_target": ""
} |
<?php
/**
* InputInterface.php
*/
namespace SoftnCMS\util\form\inputs;
/**
* Class Input
* @author Nicolás Marulanda P.
*/
interface InputInterface {
/**
* @param mixed $value
*/
public function setValue($value);
/**
* @param string $name
*/
public function setName($name);
/**
* @param string $type
*/
public function setType($type);
/**
* @param bool $require
*/
public function setRequire($require);
/**
* @param array $method
*/
public function setMethod($method);
}
| {
"content_hash": "c82ca4bf18d194eed2695ef365cfb6d1",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 41,
"avg_line_length": 15.333333333333334,
"alnum_prop": 0.5367892976588629,
"repo_name": "nmarulo/softn-cms",
"id": "e2630697fb8e2914a1377f4889f9c3248d8f5c3d",
"size": "599",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/util/form/inputs/InputInterface.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "8411"
},
{
"name": "JavaScript",
"bytes": "7192"
},
{
"name": "PHP",
"bytes": "599056"
}
],
"symlink_target": ""
} |
package io.github.Cnly.Crafter.Crafter.framework.notifies;
import org.bukkit.Bukkit;
import org.bukkit.event.EventHandler;
import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.server.PluginEnableEvent;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask;
public class BootCompleteNotifier extends AbstractFutureNotifier implements Listener
{
private long lastPluginEnableTime;
private int delay;
private BukkitTask checkTask;
/**
* Calls the constructor BootCompleteNotifier(jp, 2000)
*
* @param jp
* JavaPlugin used to register Listener and BukkitRunnable
*/
public BootCompleteNotifier(JavaPlugin jp)
{
this(jp, 2000);
}
/**
* BootCompleteNotifier send its notify message when
* System.currentTimeMillis() - lastPluginEnableTime >= delay.
*
* @param jp
* JavaPlugin used to register Listener and BukkitRunnable
* @param delay
* delay time in milliseconds
*/
public BootCompleteNotifier(JavaPlugin jp, int delay)
{
super(jp);
Bukkit.getPluginManager().registerEvents(this, jp);
this.delay = delay;
this.checkTask = new CheckTask().runTaskTimer(jp, 20L, 20L);
}
@EventHandler
public void onPluginEnable(PluginEnableEvent e)
{
this.lastPluginEnableTime = System.currentTimeMillis();
}
private class CheckTask extends BukkitRunnable
{
@Override
public void run()
{
if(!(System.currentTimeMillis() - BootCompleteNotifier.this.lastPluginEnableTime >= delay))
return;
BootCompleteNotifier.this.doNotify();
BootCompleteNotifier.this.cancel();
}
}
@Override
public boolean isSet()
{
return null != this.checkTask;
}
@Override
public void cancel()
{
if(null != this.checkTask)
{
this.checkTask.cancel();
this.checkTask = null;
HandlerList.unregisterAll(this);
}
}
}
| {
"content_hash": "709134fd60f1ce9d23ca3c5f07167f26",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 103,
"avg_line_length": 25.544444444444444,
"alnum_prop": 0.6124401913875598,
"repo_name": "Cnly/Crafter",
"id": "9adbf30b0af3fb343d905a5c0f19cbe4e13d1363",
"size": "2299",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Crafter/src/main/java/io/github/Cnly/Crafter/Crafter/framework/notifies/BootCompleteNotifier.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "122375"
}
],
"symlink_target": ""
} |
//This file is automatically rebuilt by the Cesium build process.
/*global define*/
define(function() {
'use strict';
return "uniform vec4 color;\n\
uniform vec4 outlineColor;\n\
uniform float outlineWidth;\n\
varying float v_width;\n\
czm_material czm_getMaterial(czm_materialInput materialInput)\n\
{\n\
czm_material material = czm_getDefaultMaterial(materialInput);\n\
vec2 st = materialInput.st;\n\
float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;\n\
float b = step(0.5 - halfInteriorWidth, st.t);\n\
b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);\n\
float d1 = abs(st.t - (0.5 - halfInteriorWidth));\n\
float d2 = abs(st.t - (0.5 + halfInteriorWidth));\n\
float dist = min(d1, d2);\n\
vec4 currentColor = mix(outlineColor, color, b);\n\
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);\n\
material.diffuse = outColor.rgb;\n\
material.alpha = outColor.a;\n\
return material;\n\
}\n\
";
}); | {
"content_hash": "ad08cf3728c36f312610e0d8fc26e073",
"timestamp": "",
"source": "github",
"line_count": 26,
"max_line_length": 74,
"avg_line_length": 36.34615384615385,
"alnum_prop": 0.7068783068783069,
"repo_name": "denverpierce/denverpierce.github.io",
"id": "904c405911f138c36c43bcde2ce440fe66ac2de2",
"size": "945",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Cesium/Source/Shaders/Materials/PolylineOutlineMaterial.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "36912"
},
{
"name": "GLSL",
"bytes": "155787"
},
{
"name": "HTML",
"bytes": "703"
},
{
"name": "JavaScript",
"bytes": "6948778"
}
],
"symlink_target": ""
} |
<?php
// autoload.php @generated by Composer
require_once __DIR__ . '/composer' . '/autoload_real.php';
return ComposerAutoloaderInit45bff296c7df01e85e33c29f08f3ebdc::getLoader();
| {
"content_hash": "6cc0260454bd3959fc0fdcd1471bdab0",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 75,
"avg_line_length": 26.142857142857142,
"alnum_prop": 0.7595628415300546,
"repo_name": "stevedaddy/react",
"id": "b833ba947f3246ad528ba0116dfcbb70ac460e53",
"size": "183",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "laravel/vendor/autoload.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "356"
},
{
"name": "CSS",
"bytes": "83050"
},
{
"name": "HTML",
"bytes": "1999106"
},
{
"name": "JavaScript",
"bytes": "109220"
},
{
"name": "PHP",
"bytes": "68232"
}
],
"symlink_target": ""
} |
package knnsearch
import (
"encoding/json"
"fmt"
"github.com/elastic/go-elasticsearch/v8/typedapi/types"
)
// Request holds the request body struct for the package knnsearch
//
// https://github.com/elastic/elasticsearch-specification/blob/4ca0cc05d3ae3fa06c2cd7be91905b656a474334/specification/_global/knn_search/KnnSearchRequest.ts#L27-L79
type Request struct {
// DocvalueFields The request returns doc values for field names matching these patterns
// in the hits.fields property of the response. Accepts wildcard (*) patterns.
DocvalueFields []types.FieldAndFormat `json:"docvalue_fields,omitempty"`
// Fields The request returns values for field names matching these patterns
// in the hits.fields property of the response. Accepts wildcard (*) patterns.
Fields []string `json:"fields,omitempty"`
// Filter Query to filter the documents that can match. The kNN search will return the
// top
// `k` documents that also match this filter. The value can be a single query or
// a
// list of queries. If `filter` isn't provided, all documents are allowed to
// match.
Filter []types.Query `json:"filter,omitempty"`
// Knn kNN query to execute
Knn types.CoreKnnQuery `json:"knn"`
// Source_ Indicates which source fields are returned for matching documents. These
// fields are returned in the hits._source property of the search response.
Source_ *types.SourceConfig `json:"_source,omitempty"`
// StoredFields List of stored fields to return as part of a hit. If no fields are specified,
// no stored fields are included in the response. If this field is specified,
// the _source
// parameter defaults to false. You can pass _source: true to return both source
// fields
// and stored fields in the search response.
StoredFields []string `json:"stored_fields,omitempty"`
}
// NewRequest returns a Request
func NewRequest() *Request {
r := &Request{}
return r
}
// FromJSON allows to load an arbitrary json into the request structure
func (rb *Request) FromJSON(data string) (*Request, error) {
var req Request
err := json.Unmarshal([]byte(data), &req)
if err != nil {
return nil, fmt.Errorf("could not deserialise json into Knnsearch request: %w", err)
}
return &req, nil
}
| {
"content_hash": "6a7abccd14f919e2cce17420c6be0446",
"timestamp": "",
"source": "github",
"line_count": 58,
"max_line_length": 164,
"avg_line_length": 38.310344827586206,
"alnum_prop": 0.7475247524752475,
"repo_name": "elastic/go-elasticsearch",
"id": "0915f8afd31ef4e249543f77795bafec96764718",
"size": "3190",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "typedapi/core/knnsearch/request.go",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "3009"
},
{
"name": "Dockerfile",
"bytes": "2098"
},
{
"name": "Go",
"bytes": "1395232"
},
{
"name": "HTML",
"bytes": "2689"
},
{
"name": "JavaScript",
"bytes": "3313"
},
{
"name": "Makefile",
"bytes": "26833"
},
{
"name": "Shell",
"bytes": "21867"
}
],
"symlink_target": ""
} |
<<<<<<< HEAD
# [Start Bootstrap](http://startbootstrap.com/) - [Freelancer](http://startbootstrap.com/template-overviews/freelancer/)
[Freelancer](http://startbootstrap.com/template-overviews/freelancer/) is a one page freelancer portfolio theme for [Bootstrap](http://getbootstrap.com/) created by [Start Bootstrap](http://startbootstrap.com/). This theme features several content sections, a responsive portfolio grid with hover effects, full page portfolio item modals, and a working PHP contact form.
## Getting Started
To use this theme, choose one of the following options to get started:
* Download the latest release on Start Bootstrap
* Fork this repository on GitHub
## Bugs and Issues
Have a bug or an issue with this theme? [Open a new issue](https://github.com/IronSummitMedia/startbootstrap-freelancer/issues) here on GitHub or leave a comment on the [template overview page at Start Bootstrap](http://startbootstrap.com/template-overviews/freelancer/).
## Creator
Start Bootstrap was created by and is maintained by **David Miller**, Managing Parter at [Iron Summit Media Strategies](http://www.ironsummitmedia.com/).
* https://twitter.com/davidmillerskt
* https://github.com/davidtmiller
Start Bootstrap is based on the [Bootstrap](http://getbootstrap.com/) framework created by [Mark Otto](https://twitter.com/mdo) and [Jacob Thorton](https://twitter.com/fat).
## Copyright and License
Copyright 2013-2015 Iron Summit Media Strategies, LLC. Code released under the [Apache 2.0](https://github.com/IronSummitMedia/startbootstrap-freelancer/blob/gh-pages/LICENSE) license.
=======
# internet_programming
Tugas Pemrograman Internet
>>>>>>> 71a3330140efc7a3ed30f737d39fc49e4d961016
| {
"content_hash": "c6c82fcd310fee18eb007c678dfe0603",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 370,
"avg_line_length": 55.03225806451613,
"alnum_prop": 0.7784290738569754,
"repo_name": "Ciciapril/internet_programming",
"id": "dfdea107547bdc2712c6ff7034fed89a57435a68",
"size": "1706",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "127482"
},
{
"name": "JavaScript",
"bytes": "43232"
},
{
"name": "PHP",
"bytes": "108534"
}
],
"symlink_target": ""
} |
import { Model, belongsTo, } from 'ember-cli-mirage';
export default Model.extend({
post: belongsTo(),
user: belongsTo()
});
| {
"content_hash": "cb5223274ce9c2bf0ddcd0e68d320b15",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 53,
"avg_line_length": 21.666666666666668,
"alnum_prop": 0.676923076923077,
"repo_name": "eablack/code-corps-ember",
"id": "4420e0f56dcf76107d63777d6a57824a06262a54",
"size": "130",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "mirage/models/post-user-mention.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "82906"
},
{
"name": "HTML",
"bytes": "52485"
},
{
"name": "JavaScript",
"bytes": "483623"
}
],
"symlink_target": ""
} |
function install_storm(){
if [ ! -e "/etc/storm/storm.yaml" ]
then
retry_apt_get install -y unzip
sudo groupadd storm
sudo useradd --gid storm --home-dir /home/storm --create-home --shell /bin/bash storm
URL=$1
ZIPFILE=${URL##*/}
VERSION=${ZIPFILE%.*}
wget -N $URL -P /tmp
sudo unzip -o /tmp/$ZIPFILE -d /usr/share/
sudo chown -R storm:storm /usr/share/$VERSION
sudo ln -s /usr/share/$VERSION /usr/share/storm
sudo ln -s /usr/share/storm/bin/storm /usr/bin/storm
sudo rm /tmp/$ZIPFILE
sudo mkdir /etc/storm
sudo chown storm:storm /etc/storm
#sudo mv /usr/share/storm/conf/storm.yaml /etc/storm/
sudo touch /etc/storm/storm.yaml
sudo rm /usr/share/storm/conf/storm.yaml
sudo ln -s /etc/storm/storm.yaml /usr/share/storm/conf/storm.yaml
sudo mkdir /var/log/storm
sudo chown storm:storm /var/log/storm
sudo sed -i 's/${storm.home}\/logs/\/var\/log\/storm/g' /usr/share/storm/logback/cluster.xml
fi
} | {
"content_hash": "06732102e2a5176c7b809f37eadb68f6",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 96,
"avg_line_length": 29.058823529411764,
"alnum_prop": 0.6568825910931174,
"repo_name": "ptgoetz/whirr-storm",
"id": "a3f075c6b59095ce0e9ea2d5eeec075c3b49dfca",
"size": "988",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/resources/functions/install_storm.sh",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "9641"
},
{
"name": "Shell",
"bytes": "1611"
}
],
"symlink_target": ""
} |
package info.jdavid.ok.server.samples;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import info.jdavid.ok.server.HttpServer;
import info.jdavid.ok.server.Https;
import info.jdavid.ok.server.RequestHandler;
import info.jdavid.ok.server.RequestHandlerChain;
import info.jdavid.ok.server.Response;
import info.jdavid.ok.server.SocketDispatcher;
import info.jdavid.ok.server.StatusLines;
import info.jdavid.ok.server.handler.BasicAuthHandler;
import info.jdavid.ok.server.handler.FileHandler;
import okhttp3.Headers;
import okhttp3.HttpUrl;
import okio.Buffer;
@SuppressWarnings({ "unused", "Convert2Lambda", "Anonymous2MethodRef" })
public class Readme {
public static void customRequestHandler() {
new HttpServer().
requestHandler(
new RequestHandler() {
@Override
public Response handle(final String clientIp, final boolean secure,
final boolean insecureOnly, final boolean http2,
final String method, final HttpUrl url,
final Headers requestHeaders,
@Nullable final Buffer requestBody) {
final String path = url.encodedPath();
final Response.Builder builder = new Response.Builder();
if ("GET".equals(method) && "/ok".equals(path)) {
builder.statusLine(StatusLines.OK).body("ok");
}
else {
builder.statusLine(StatusLines.NOT_FOUND).noBody();
}
return builder.build();
}
}
).
hostname("localhost").
port(8080).
start();
}
public static void https() {
final byte[] p12 = {}; // bytes from the p12 certificate.
final boolean useHttp2 = true;
new HttpServer().
hostname("example.com").
ports(8080, 8181).
https(new Https.Builder().certificate(p12, useHttp2).build()).
start();
}
public static void customDispatcher() {
new HttpServer().
dispatcher(
new SocketDispatcher() {
private ExecutorService mExecutors = null;
@Override
public void start() {
mExecutors = Executors.newSingleThreadExecutor();
}
@Override
public void dispatch(final Request request) {
mExecutors.execute(new Runnable() {
@Override public void run() { request.serve(); }
});
}
@Override
public void shutdown() {
try {
mExecutors.awaitTermination(5, TimeUnit.SECONDS);
}
catch (final InterruptedException ignore) {}
mExecutors.shutdownNow();
}
}
).
requestHandler(new RequestHandlerChain()).
port(8080).
start();
}
public static void handlerChain() {
final Map<String, String> credentials = new HashMap<>();
credentials.put("user1", "password1");
final File webRoot = new File(new File(System.getProperty("user.home")), "www");
new HttpServer().
requestHandler(
new RequestHandlerChain().
add(new BasicAuthHandler(credentials, new FileHandler(webRoot)))
).
dispatcher(new SocketDispatcher.MultiThreadsDispatcher(4)).
port(8080).
start();
}
}
| {
"content_hash": "ff3bbd2528beea1c6e99a11d09643d20",
"timestamp": "",
"source": "github",
"line_count": 110,
"max_line_length": 84,
"avg_line_length": 31.8,
"alnum_prop": 0.6157804459691252,
"repo_name": "programingjd/okserver",
"id": "2c0fd3d3abf76b0eb47ed832f74b117856ba6b90",
"size": "3498",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/samples/java/info/jdavid/ok/server/samples/Readme.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "275"
},
{
"name": "Groovy",
"bytes": "936"
},
{
"name": "HTML",
"bytes": "10583"
},
{
"name": "Java",
"bytes": "403949"
},
{
"name": "JavaScript",
"bytes": "40"
},
{
"name": "Kotlin",
"bytes": "5231"
}
],
"symlink_target": ""
} |
package galaxyspace.systems.SolarSystem.moons.ganymede.world.gen;
import galaxyspace.core.GSBlocks;
import galaxyspace.systems.SolarSystem.moons.ganymede.blocks.GanymedeBlocks;
import micdoodle8.mods.galacticraft.api.prefab.world.gen.MapGenBaseMeta;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.world.World;
import net.minecraft.world.chunk.ChunkPrimer;
public class MapGenSnowGanymede extends MapGenBaseMeta{
public IBlockState icelayerBlock = GSBlocks.SURFACE_ICE.getStateFromMeta(4);
@Override
public void generate(World world, int chunkX, int chunkZ, ChunkPrimer primer) {
for(int x = 0; x < 16; x++)
for(int z = 0; z < 16; z++)
for (int y = 255; y >= 0; --y)
{
if((y < 52 + world.rand.nextInt(2) || y > 90 - world.rand.nextInt(2)) && primer.getBlockState(x, y, z).getBlock() == Blocks.AIR
&& primer.getBlockState(x, y - 1, z) == GSBlocks.GANYMEDE_BLOCKS.getDefaultState().withProperty(GanymedeBlocks.BASIC_TYPE, GanymedeBlocks.EnumGanymedeBlocks.GANYMEDE_GRUNT))
{
primer.setBlockState(x, y, z, icelayerBlock);
}
}
}
@Override
protected void recursiveGenerate(World world, int chunkX, int chunkZ, int x, int z, ChunkPrimer primer) {
}
}
| {
"content_hash": "e9f7d2df8fb8bb0310a17f4f745f63fa",
"timestamp": "",
"source": "github",
"line_count": 33,
"max_line_length": 180,
"avg_line_length": 38.54545454545455,
"alnum_prop": 0.7240566037735849,
"repo_name": "BlesseNtumble/GalaxySpace",
"id": "37331233cf8611af62c88b3704dabb8ca1c197db",
"size": "1272",
"binary": false,
"copies": "1",
"ref": "refs/heads/1.12.2",
"path": "src/main/java/galaxyspace/systems/SolarSystem/moons/ganymede/world/gen/MapGenSnowGanymede.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "3539658"
}
],
"symlink_target": ""
} |
#include "CCActionManager.h"
#include "../Json/DictionaryHelper.h"
NS_CC_EXT_BEGIN
static ActionManager* sharedActionManager = NULL;
ActionManager* ActionManager::shareManager()
{
if (!sharedActionManager) {
sharedActionManager = new ActionManager();
}
return sharedActionManager;
}
void ActionManager::purge()
{
CC_SAFE_DELETE(sharedActionManager);
}
ActionManager::ActionManager()
: m_pActionDic(NULL)
{
m_pActionDic = CCDictionary::create();
m_pActionDic->retain();
}
ActionManager::~ActionManager()
{
m_pActionDic->removeAllObjects();
m_pActionDic->release();
}
void ActionManager::initWithDictionary(const char* jsonName,const rapidjson::Value &dic,CCObject* root)
{
std::string path = jsonName;
int pos = path.find_last_of("/");
std::string fileName = path.substr(pos+1,path.length());
CCLOG("filename == %s",fileName.c_str());
CCArray* actionList = CCArray::create();
int actionCount = DICTOOL->getArrayCount_json(dic, "actionlist");
for (int i=0; i< actionCount; i++) {
ActionObject* action = new ActionObject();
action->autorelease();
const rapidjson::Value &actionDic = DICTOOL->getDictionaryFromArray_json(dic, "actionlist", i);
action->initWithDictionary(actionDic,root);
actionList->addObject(action);
}
m_pActionDic->setObject(actionList, fileName);
}
ActionObject* ActionManager::getActionByName(const char* jsonName,const char* actionName)
{
CCArray* actionList = (CCArray*)(m_pActionDic->objectForKey(jsonName));
if (!actionList)
{
return NULL;
}
for (unsigned int i=0; i<actionList->count(); i++)
{
ActionObject* action = dynamic_cast<ActionObject*>(actionList->objectAtIndex(i));
if (strcmp(actionName, action->getName()) == 0)
{
return action;
}
}
return NULL;
}
ActionObject* ActionManager::playActionByName(const char* jsonName,const char* actionName)
{
ActionObject* action = getActionByName(jsonName,actionName);
if (action)
{
action->play();
}
return action;
}
ActionObject* ActionManager::playActionByName(const char* jsonName,const char* actionName, CCCallFunc* func)
{
ActionObject* action = getActionByName(jsonName,actionName);
if (action)
{
action->play(func);
}
return action;
}
void ActionManager::releaseActions()
{
m_pActionDic->removeAllObjects();
}
NS_CC_EXT_END | {
"content_hash": "a676f4ccd86c124c9c7fec0f8f06bfed",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 108,
"avg_line_length": 24.505050505050505,
"alnum_prop": 0.6854905193734543,
"repo_name": "opensourceBrown/DR",
"id": "c036d12678035429c31dd8793e42fc4bdeda2a39",
"size": "3708",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DR/extensions/CocoStudio/Action/CCActionManager.cpp",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "54832676"
},
{
"name": "C#",
"bytes": "14386"
},
{
"name": "C++",
"bytes": "23158064"
},
{
"name": "CSS",
"bytes": "19578"
},
{
"name": "Clojure",
"bytes": "8891"
},
{
"name": "Erlang",
"bytes": "17967"
},
{
"name": "F#",
"bytes": "5688"
},
{
"name": "IDL",
"bytes": "600"
},
{
"name": "Java",
"bytes": "257259"
},
{
"name": "JavaScript",
"bytes": "36379419"
},
{
"name": "Lua",
"bytes": "14866"
},
{
"name": "Nu",
"bytes": "1231"
},
{
"name": "Objective-C",
"bytes": "1008027"
},
{
"name": "Objective-C++",
"bytes": "301140"
},
{
"name": "PHP",
"bytes": "1721711"
},
{
"name": "Perl",
"bytes": "653209"
},
{
"name": "Python",
"bytes": "1791535"
},
{
"name": "R",
"bytes": "1683"
},
{
"name": "Ruby",
"bytes": "1590757"
},
{
"name": "Shell",
"bytes": "1843878"
},
{
"name": "TeX",
"bytes": "60330"
},
{
"name": "Visual Basic",
"bytes": "2884"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DotVVM.Framework.Compilation.Inference.Results
{
internal class LambdaTypeInferenceResult : ITypeInferenceResult
{
public bool Result { get; private set; }
public Type? Type { get; private set; }
public Type[]? Parameters { get; private set; }
public LambdaTypeInferenceResult(bool result, Type? type = null, Type[]? parameters = null)
{
Result = result;
Type = type;
Parameters = parameters;
}
}
}
| {
"content_hash": "34e58452972b8b0a2a81888c3db80d3f",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 99,
"avg_line_length": 28.363636363636363,
"alnum_prop": 0.6474358974358975,
"repo_name": "riganti/dotvvm",
"id": "60e5617a82a1326df32f5035611aa3f5a4350177",
"size": "626",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "src/Framework/Framework/Compilation/Inference/Results/LambdaTypeInferenceResult.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "247"
},
{
"name": "C#",
"bytes": "6123311"
},
{
"name": "CSS",
"bytes": "7424"
},
{
"name": "HTML",
"bytes": "73696"
},
{
"name": "JavaScript",
"bytes": "580314"
},
{
"name": "Liquid",
"bytes": "416"
},
{
"name": "PowerShell",
"bytes": "22339"
},
{
"name": "Svelte",
"bytes": "6616"
},
{
"name": "TypeScript",
"bytes": "548456"
}
],
"symlink_target": ""
} |
package org.axonframework.queryhandling;
import org.axonframework.messaging.Message;
import org.axonframework.messaging.responsetypes.ResponseTypes;
import org.axonframework.tracing.TestSpanFactory;
import org.junit.jupiter.api.*;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
import java.time.Duration;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import static org.hamcrest.CoreMatchers.equalTo;
/**
* Test class validating the {@link SimpleQueryUpdateEmitter}.
*
* @author Allard Buijze
* @author Corrado Musumeci
* @author Steven van Beelen
*/
class SimpleQueryUpdateEmitterTest {
private final TestSpanFactory spanFactory = new TestSpanFactory();
private final SimpleQueryUpdateEmitter testSubject = SimpleQueryUpdateEmitter.builder()
.spanFactory(spanFactory)
.build();
@Test
void completingRegistrationOldApi() {
SubscriptionQueryMessage<String, List<String>, String> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
SubscriptionQueryBackpressure.defaultBackpressure(),
1024
);
testSubject.emit(any -> true, "some-awesome-text");
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext("some-awesome-text")
.verifyComplete();
}
@Test
void concurrentUpdateEmitting() {
SubscriptionQueryMessage<String, List<String>, String> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(String.class)
);
UpdateHandlerRegistration<Object> registration = testSubject.registerUpdateHandler(queryMessage, 128);
ExecutorService executors = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
for (int i = 0; i < 100; i++) {
executors.submit(() -> testSubject.emit(q -> true, "Update"));
}
executors.shutdown();
StepVerifier.create(registration.getUpdates())
.expectNextCount(100)
.then(() -> testSubject.complete(q -> true))
.verifyComplete();
}
@Test
void concurrentUpdateEmitting_WithBackpressure() {
SubscriptionQueryMessage<String, List<String>, String> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(String.class)
);
UpdateHandlerRegistration<Object> registration = testSubject.registerUpdateHandler(queryMessage, SubscriptionQueryBackpressure.defaultBackpressure(), 128);
ExecutorService executors = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors());
for (int i = 0; i < 100; i++) {
executors.submit(() -> {
testSubject.emit(q -> true, "Update");
});
}
executors.shutdown();
StepVerifier.create(registration.getUpdates())
.expectNextCount(100)
.then(() -> testSubject.complete(q -> true))
.verifyComplete();
}
@Test
void cancelingRegistrationDoesNotCompleteFluxOfUpdatesOldApi() {
SubscriptionQueryMessage<String, List<String>, String> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
SubscriptionQueryBackpressure.defaultBackpressure(),
1024
);
testSubject.emit(any -> true, "some-awesome-text");
result.getRegistration().cancel();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext("some-awesome-text")
.verifyTimeout(Duration.ofMillis(500));
}
@Test
void completingRegistration() {
SubscriptionQueryMessage<String, List<String>, String> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, "some-awesome-text");
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext("some-awesome-text")
.verifyComplete();
}
@Test
void queryUpdateEmitterIsTraced() {
SubscriptionQueryMessage<String, List<String>, String> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, "some-awesome-text");
result.complete();
spanFactory.verifySpanCompleted("SimpleQueryUpdateEmitter.emit");
spanFactory.verifySpanHasType("SimpleQueryUpdateEmitter.emit", TestSpanFactory.TestSpanType.INTERNAL);
spanFactory.verifySpanCompleted("QueryUpdateEmitter.emit chatMessages");
spanFactory.verifySpanHasType("QueryUpdateEmitter.emit chatMessages", TestSpanFactory.TestSpanType.DISPATCH);
}
@Test
void differentUpdateAreDisambiguatedAndWrongTypesAreFilteredBasedOnQueryTypes() {
SubscriptionQueryMessage<String, List<String>, Integer> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(Integer.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, "some-awesome-text");
testSubject.emit(any -> true, 1234);
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext(1234)
.verifyComplete();
}
@Test
void updateResponseTypeFilteringWorksForMultipleInstanceOfWithArrayAndList() {
SubscriptionQueryMessage<String, List<String>, List<String>> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.multipleInstancesOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, "some-awesome-text");
testSubject.emit(any -> true, 1234);
testSubject.emit(any -> true, Optional.of("optional-payload"));
testSubject.emit(any -> true, Optional.empty());
testSubject.emit(any -> true, new String[] { "array-item-1", "array-item-2" });
testSubject.emit(any -> true, Arrays.asList("list-item-1", "list-item-2"));
testSubject.emit(any -> true, Flux.just("flux-item-1", "flux-item-2"));
testSubject.emit(any -> true, Mono.just("mono-item"));
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNextMatches(actual -> equalTo(new String[] { "array-item-1", "array-item-2" }).matches(actual) )
.expectNextMatches(actual -> equalTo(Arrays.asList("list-item-1", "list-item-2")).matches(actual) )
.verifyComplete();
}
@Test
void updateResponseTypeFilteringWorksForOptionaInstanceOf() {
SubscriptionQueryMessage<String, List<String>, Optional<String>> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.optionalInstanceOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, "some-awesome-text");
testSubject.emit(any -> true, 1234);
testSubject.emit(any -> true, Optional.of("optional-payload"));
testSubject.emit(any -> true, Optional.empty());
testSubject.emit(any -> true, new String[] { "array-item-1", "array-item-2" });
testSubject.emit(any -> true, Arrays.asList("list-item-1", "list-item-2"));
testSubject.emit(any -> true, Flux.just("flux-item-1", "flux-item-2"));
testSubject.emit(any -> true, Mono.just("mono-item"));
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext(Optional.of("optional-payload"), Optional.empty() )
.verifyComplete();
}
@Test
@SuppressWarnings("unchecked")
void updateResponseTypeFilteringWorksForPublisherOf() {
SubscriptionQueryMessage<String, List<String>, Publisher<String>> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.publisherOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, "some-awesome-text");
testSubject.emit(any -> true, 1234);
testSubject.emit(any -> true, Optional.of("optional-payload"));
testSubject.emit(any -> true, Optional.empty());
testSubject.emit(any -> true, new String[] { "array-item-1", "array-item-2" });
testSubject.emit(any -> true, Arrays.asList("list-item-1", "list-item-2"));
testSubject.emit(any -> true, Flux.just("flux-item-1", "flux-item-2"));
testSubject.emit(any -> true, Mono.just("mono-item"));
testSubject.emit(any -> true, Mono.empty());
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNextMatches( publisher -> {
try {
StepVerifier.create((Publisher<String>) publisher).expectNext("flux-item-1", "flux-item-2").verifyComplete();
} catch (Exception e) {
return false;
}
return true;
})
.expectNextMatches( publisher -> {
try {
StepVerifier.create((Publisher<String>) publisher).expectNext("mono-item").verifyComplete();
} catch (Exception e) {
return false;
}
return true;
})
.expectNextMatches( publisher -> {
try {
StepVerifier.create((Publisher<String>) publisher).verifyComplete();
} catch (Exception e) {
return false;
}
return true;
})
.verifyComplete();
}
@Test
void multipleInstanceUpdatesAreDelivered() {
SubscriptionQueryMessage<String, List<String>, List<String>> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.multipleInstancesOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, Arrays.asList("text1","text2"));
testSubject.emit(any -> true, Arrays.asList("text3","text4"));
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext(Arrays.asList("text1","text2"), Arrays.asList("text3","text4"))
.verifyComplete();
}
@Test
void optionalUpdatesAreDelivered() {
SubscriptionQueryMessage<String, Optional<String>, Optional<String>> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.optionalInstanceOf(String.class),
ResponseTypes.optionalInstanceOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, Optional.of("text1"));
testSubject.emit(any -> true, Optional.of("text2"));
result.complete();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext(Optional.of("text1"),Optional.of("text2"))
.verifyComplete();
}
@Test
void cancelingRegistrationDoesNotCompleteFluxOfUpdates() {
SubscriptionQueryMessage<String, List<String>, String> queryMessage = new GenericSubscriptionQueryMessage<>(
"some-payload",
"chatMessages",
ResponseTypes.multipleInstancesOf(String.class),
ResponseTypes.instanceOf(String.class)
);
UpdateHandlerRegistration<Object> result = testSubject.registerUpdateHandler(
queryMessage,
1024
);
result.getUpdates().subscribe();
testSubject.emit(any -> true, "some-awesome-text");
result.getRegistration().cancel();
StepVerifier.create(result.getUpdates().map(Message::getPayload))
.expectNext("some-awesome-text")
.verifyTimeout(Duration.ofMillis(500));
}
}
| {
"content_hash": "26c2170fa3551e4daf07f56fc233f29a",
"timestamp": "",
"source": "github",
"line_count": 386,
"max_line_length": 163,
"avg_line_length": 40.23834196891192,
"alnum_prop": 0.6131212979654906,
"repo_name": "AxonFramework/AxonFramework",
"id": "ccbf66a6e71c7b9a56f502b5eeba4713ed249313",
"size": "16138",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "messaging/src/test/java/org/axonframework/queryhandling/SimpleQueryUpdateEmitterTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "9480392"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_92) on Tue Jun 09 19:45:41 BST 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CommandUsageGenerator (Airline - Library 2.8.0 API)</title>
<meta name="date" content="2020-06-09">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="CommandUsageGenerator (Airline - Library 2.8.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CommandUsageGenerator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/github/rvesse/airline/help/CommandGroupUsageGenerator.html" title="interface in com.github.rvesse.airline.help"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../../com/github/rvesse/airline/help/GlobalUsageGenerator.html" title="interface in com.github.rvesse.airline.help"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/github/rvesse/airline/help/CommandUsageGenerator.html" target="_top">Frames</a></li>
<li><a href="CommandUsageGenerator.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">com.github.rvesse.airline.help</div>
<h2 title="Interface CommandUsageGenerator" class="title">Interface CommandUsageGenerator</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../com/github/rvesse/airline/help/common/AbstractCommandUsageGenerator.html" title="class in com.github.rvesse.airline.help.common">AbstractCommandUsageGenerator</a>, <a href="../../../../../com/github/rvesse/airline/help/common/AbstractPrintedCommandUsageGenerator.html" title="class in com.github.rvesse.airline.help.common">AbstractPrintedCommandUsageGenerator</a>, <a href="../../../../../com/github/rvesse/airline/help/cli/CliCommandUsageGenerator.html" title="class in com.github.rvesse.airline.help.cli">CliCommandUsageGenerator</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="typeNameLabel">CommandUsageGenerator</span></pre>
<div class="block">Interface implemented by classes that can generate usage documentation for a
command</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><T> void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/github/rvesse/airline/help/CommandUsageGenerator.html#usage-com.github.rvesse.airline.model.CommandMetadata-com.github.rvesse.airline.model.ParserMetadata-java.io.OutputStream-">usage</a></span>(<a href="../../../../../com/github/rvesse/airline/model/CommandMetadata.html" title="class in com.github.rvesse.airline.model">CommandMetadata</a> command,
<a href="../../../../../com/github/rvesse/airline/model/ParserMetadata.html" title="class in com.github.rvesse.airline.model">ParserMetadata</a><T> parserConfig,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output)</code>
<div class="block">Generates the help output to the provided output stream</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><T> void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/github/rvesse/airline/help/CommandUsageGenerator.html#usage-java.lang.String-java.lang.String:A-java.lang.String-com.github.rvesse.airline.model.CommandMetadata-com.github.rvesse.airline.model.ParserMetadata-">usage</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> programName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] groupNames,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> commandName,
<a href="../../../../../com/github/rvesse/airline/model/CommandMetadata.html" title="class in com.github.rvesse.airline.model">CommandMetadata</a> command,
<a href="../../../../../com/github/rvesse/airline/model/ParserMetadata.html" title="class in com.github.rvesse.airline.model">ParserMetadata</a><T> parserConfig)</code>
<div class="block">Generate the help and output it on standard out</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><T> void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../com/github/rvesse/airline/help/CommandUsageGenerator.html#usage-java.lang.String-java.lang.String:A-java.lang.String-com.github.rvesse.airline.model.CommandMetadata-com.github.rvesse.airline.model.ParserMetadata-java.io.OutputStream-">usage</a></span>(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> programName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] groupNames,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> commandName,
<a href="../../../../../com/github/rvesse/airline/model/CommandMetadata.html" title="class in com.github.rvesse.airline.model">CommandMetadata</a> command,
<a href="../../../../../com/github/rvesse/airline/model/ParserMetadata.html" title="class in com.github.rvesse.airline.model">ParserMetadata</a><T> parserConfig,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output)</code>
<div class="block">Generate the help and output it to the stream</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="usage-com.github.rvesse.airline.model.CommandMetadata-com.github.rvesse.airline.model.ParserMetadata-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>usage</h4>
<pre><T> void usage(<a href="../../../../../com/github/rvesse/airline/model/CommandMetadata.html" title="class in com.github.rvesse.airline.model">CommandMetadata</a> command,
<a href="../../../../../com/github/rvesse/airline/model/ParserMetadata.html" title="class in com.github.rvesse.airline.model">ParserMetadata</a><T> parserConfig,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Generates the help output to the provided output stream</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>command</code> - Command Metadata</dd>
<dd><code>parserConfig</code> - Parser configuration</dd>
<dd><code>output</code> - Output Stream</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code></dd>
</dl>
</li>
</ul>
<a name="usage-java.lang.String-java.lang.String:A-java.lang.String-com.github.rvesse.airline.model.CommandMetadata-com.github.rvesse.airline.model.ParserMetadata-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>usage</h4>
<pre><T> void usage(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> programName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] groupNames,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> commandName,
<a href="../../../../../com/github/rvesse/airline/model/CommandMetadata.html" title="class in com.github.rvesse.airline.model">CommandMetadata</a> command,
<a href="../../../../../com/github/rvesse/airline/model/ParserMetadata.html" title="class in com.github.rvesse.airline.model">ParserMetadata</a><T> parserConfig)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Generate the help and output it on standard out</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - Command type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>programName</code> - Program Name</dd>
<dd><code>groupNames</code> - Group Name(s)</dd>
<dd><code>commandName</code> - Command Name</dd>
<dd><code>command</code> - Command Metadata</dd>
<dd><code>parserConfig</code> - Parser configuration, if <code>null</code> is passed then the
parser configuration is automatically determined based on the
command class for which we are producing help</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - Thrown if there is a problem generating usage output</dd>
</dl>
</li>
</ul>
<a name="usage-java.lang.String-java.lang.String:A-java.lang.String-com.github.rvesse.airline.model.CommandMetadata-com.github.rvesse.airline.model.ParserMetadata-java.io.OutputStream-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>usage</h4>
<pre><T> void usage(<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> programName,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>[] groupNames,
<a href="https://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a> commandName,
<a href="../../../../../com/github/rvesse/airline/model/CommandMetadata.html" title="class in com.github.rvesse.airline.model">CommandMetadata</a> command,
<a href="../../../../../com/github/rvesse/airline/model/ParserMetadata.html" title="class in com.github.rvesse.airline.model">ParserMetadata</a><T> parserConfig,
<a href="https://docs.oracle.com/javase/7/docs/api/java/io/OutputStream.html?is-external=true" title="class or interface in java.io">OutputStream</a> output)
throws <a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></pre>
<div class="block">Generate the help and output it to the stream</div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>T</code> - Command type</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>programName</code> - Program Name</dd>
<dd><code>groupNames</code> - Group Name(s)</dd>
<dd><code>commandName</code> - Command Name</dd>
<dd><code>command</code> - Command Metadata</dd>
<dd><code>parserConfig</code> - Parser Configuration, if <code>null</code> is passed then the
parser configuration is automatically determined based on the
command class for which we are producing help</dd>
<dd><code>output</code> - Stream to output to</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/7/docs/api/java/io/IOException.html?is-external=true" title="class or interface in java.io">IOException</a></code> - Thrown if there is a problem generating usage output</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/CommandUsageGenerator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/github/rvesse/airline/help/CommandGroupUsageGenerator.html" title="interface in com.github.rvesse.airline.help"><span class="typeNameLink">Prev Class</span></a></li>
<li><a href="../../../../../com/github/rvesse/airline/help/GlobalUsageGenerator.html" title="interface in com.github.rvesse.airline.help"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/github/rvesse/airline/help/CommandUsageGenerator.html" target="_top">Frames</a></li>
<li><a href="CommandUsageGenerator.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2012–2020. All rights reserved.</small></p>
</body>
</html>
| {
"content_hash": "7735be31fa82c542b48fd086bceef0a2",
"timestamp": "",
"source": "github",
"line_count": 326,
"max_line_length": 569,
"avg_line_length": 56.34355828220859,
"alnum_prop": 0.6808580139372822,
"repo_name": "rvesse/airline",
"id": "29ce839e43f189604f4ef938aec5fae9ac3b26df",
"size": "18368",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "docs/javadoc/2.8.0/airline/com/github/rvesse/airline/help/CommandUsageGenerator.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "91"
},
{
"name": "Java",
"bytes": "2176058"
},
{
"name": "Shell",
"bytes": "4550"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- WeatherNow -->
<dimen name="spacer_top_size">45dp</dimen>
<dimen name="spacer_mid_size">45dp</dimen>
</resources> | {
"content_hash": "fe2bc0ae3c5e31bde6a408c173acebf8",
"timestamp": "",
"source": "github",
"line_count": 6,
"max_line_length": 46,
"avg_line_length": 30.166666666666668,
"alnum_prop": 0.6298342541436464,
"repo_name": "bryan2894-playgrnd/SimpleWeather-Xamarin",
"id": "4a07ac27579d0e0ea1b2a8c7d5eb8499754eb185",
"size": "181",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SimpleWeather.Android/Resources/values-560dpi/dimens.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C#",
"bytes": "1407128"
},
{
"name": "HTML",
"bytes": "16434"
}
],
"symlink_target": ""
} |
<?php
/**
*
*/
class PostViewTest extends CTestCase
{
public function testProperties() {
$record=array(
'id'=>1,
'guid' => '3a9e6228-cd0e-3795-8447-0c8d8fd8f25c',
'title' => 'Aut tenetur dignissimos vero doloribus necessitatibus ut quisquam.',
'content' => 'Eos officia sequi aut odio. Molestias natus ut saepe vero voluptates dignissimos. Distinctio velit tenetur nemo minus voluptas.',
'excerpt' => 'Ut veniam totam blanditiis sequi et impedit ut. Harum beatae non et libero.',
'author'=>2,
'publication_date'=>new DateTime(),
'categories'=>array(3,4,9,100),
'tags'=>array(98,22,5,10),
'status'=>1,
'visibility'=>1
);
$postView = Yii::createComponent(
array('class'=>'PostView'),
$record['id'],
$record['title'],
$record['content'],
$record['excerpt'],
$record['author'],
$record['publication_date'],
$record['categories'],
$record['tags'],
$record['status'],
$record['visibility']
);
$this->assertInstanceOf('PostView',$postView);
}
} | {
"content_hash": "f0eb170de9edaa0fb5c68610b5d1e5f6",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 152,
"avg_line_length": 27.923076923076923,
"alnum_prop": 0.6051423324150597,
"repo_name": "mohsenuss91/proto",
"id": "882c7263615ce905e5e83b2831a0132d35ed6765",
"size": "1089",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "protected/tests/unit/components/PostViewTest.php",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "15"
},
{
"name": "Batchfile",
"bytes": "380"
},
{
"name": "CSS",
"bytes": "399529"
},
{
"name": "JavaScript",
"bytes": "4872"
},
{
"name": "PHP",
"bytes": "206135"
},
{
"name": "Ruby",
"bytes": "961"
}
],
"symlink_target": ""
} |
<?php
App::import('Helper','Typographer.TypeBricklayer');
class TesteTypeBricklayerHelper extends TypeBricklayerHelper
{
}
?>
| {
"content_hash": "0f6e6e1e93aab7f154dc07cfcccbb4b6",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 60,
"avg_line_length": 9.642857142857142,
"alnum_prop": 0.7407407407407407,
"repo_name": "hugomelo/ralsp",
"id": "4818a90d33a6c4881d56355ca8e21dd336b0db6c",
"size": "589",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/cake/app/plugins/typographer/views/helpers/teste_type_bricklayer.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "932"
},
{
"name": "Batchfile",
"bytes": "1013"
},
{
"name": "CSS",
"bytes": "136986"
},
{
"name": "Groff",
"bytes": "5241"
},
{
"name": "HTML",
"bytes": "2000"
},
{
"name": "JavaScript",
"bytes": "119408"
},
{
"name": "PHP",
"bytes": "8181623"
},
{
"name": "Shell",
"bytes": "1077"
}
],
"symlink_target": ""
} |
module.exports = require('./centos') | {
"content_hash": "9e6c9fa8b1b23419df1e8011da42c41d",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 36,
"avg_line_length": 36,
"alnum_prop": 0.7222222222222222,
"repo_name": "jotamaggi/react-calendar-app",
"id": "3e28f177dcc1961ba653491bbd1d60a4ea090679",
"size": "36",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "node_modules/getos/logic/red.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "34382"
},
{
"name": "Dockerfile",
"bytes": "243"
},
{
"name": "HTML",
"bytes": "1998"
},
{
"name": "JavaScript",
"bytes": "150726"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
Mycotaxon 2(1): 25 (1975)
#### Original name
Trametes humeana Murrill, 1938
### Remarks
null | {
"content_hash": "eb5340b417e8ec5de5cc70e3a5afca71",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 13.923076923076923,
"alnum_prop": 0.7071823204419889,
"repo_name": "mdoering/backbone",
"id": "973fcceb9607cfcc3913cf9cb65e0013b5475e26",
"size": "246",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Basidiomycota/Agaricomycetes/Polyporales/Polyporaceae/Tyromyces/Tyromyces humeana/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
"""API for simple access to babelfish.altavista.com.
Summary:
>>> import babelizer
>>> print ' '.join(babelizer.available_languages)
>>> print babelizer.translate( 'How much is that doggie in the window?',
'English', 'French' )
>>> def babel_callback(phrase):
print phrase
sys.stdout.flush()
>>> babelizer.babelize( 'I love a reigning knight.',
'English', 'German',
callback = babel_callback )
@group Helper Functions: clean
@sort: BabelizerError, BabelfishChangedError, BabelizerIOError
@var available_languages:
A list of languages available for use with babelfish.
@version: $Id: babelfish.py 1361 2003-10-24 14:41:44Z edloper $
@author: Jonathan Feinberg <jdf@pobox.com>
"""
import re
import string
import urllib
import sys
"""
Various patterns I have encountered in looking for the babelfish result.
We try each of them in turn, based on the relative number of times I've
seen each of these patterns. $1.00 to anyone who can provide a heuristic
for knowing which one to use. This includes AltaVista employees.
"""
__where = [ re.compile(r'<div id="result"><div style="padding:0.6em;">([^<]*)'),
re.compile(r'name=\"q\">([^<]*)'),
re.compile(r'td bgcolor=white>([^<]*)'),
re.compile(r'<\/strong><br>([^<]*)'),
re.compile(r'padding:10px[^>]+>([^<]*)')
]
__languages = { 'english' : 'en',
'french' : 'fr',
'spanish' : 'es',
'german' : 'de',
'greek' : 'el',
'italian' : 'it',
'portuguese': 'pt',
'chinese' : 'zh',
'japanese' : 'ja',
'korean' : 'ko',
'russian' : 'ru'
}
"""
All of the available language names.
"""
available_languages = [ x.title() for x in __languages.keys() ]
class BabelizerError(Exception):
"""
Calling translate() or babelize() can raise a BabelizerError
"""
class BabelfishChangedError(BabelizerError):
"""
Thrown when babelfish.yahoo.com changes some detail of their HTML layout,
and babelizer no longer submits data in the correct form, or can no
longer parse the results.
"""
class BabelizerIOError(BabelizerError):
"""
Thrown for various networking and IO errors.
"""
def clean(text):
return re.sub(r'\s+', ' ', text.strip())
def translate(phrase, source, target):
"""
Use babelfish to translate phrase from source language to target language.
It's only guaranteed to work if 'english' is one of the two languages.
@raise BabelizeError: If an error is encountered.
"""
phrase = clean(phrase)
try:
source_code = __languages[source]
target_code = __languages[target]
except KeyError, lang:
raise ValueError, "Language %s not available" % lang
params = urllib.urlencode({'doit': 'done',
'tt': 'urltext',
'urltext': phrase,
'lp': source_code + '_' + target_code})
try:
response = urllib.urlopen('http://babelfish.yahoo.com/translate_txt', params)
except IOError, what:
raise BabelizerIOError("Couldn't talk to server: %s" % what)
html = response.read()
for regex in __where:
match = regex.search(html)
if match: break
if not match: raise BabelfishChangedError("Can't recognize translated string.")
return clean(match.group(1))
def babelize(phrase, source, target, limit = 12):
"""
Uses babelfish to translate back and forth between source and
target until either no more changes occur in translation or
limit iterations have been reached, whichever comes first.
It's only guaranteed to work if 'english' is one of the two
languages.
@raise BabelizeError: If an error is encountered.
"""
phrase = clean(phrase)
seen = set([phrase])
yield phrase
flip = {source: target, target: source}
next = source
for i in range(limit):
phrase = translate(phrase, next, flip[next])
if phrase in seen:
break
seen.add(phrase)
yield phrase
next = flip[next]
HELP = """NLTK Babelizer Commands:
All single-word inputs are commands:
help: this help message
languages: print the list of languages
language: the name of a language to use"""
def babelize_shell():
"""
An interactive shell that uses babelfish to
translate back and forth between source and
target until either no more changes occur in translation or
limit iterations have been reached, whichever comes first.
It's only guaranteed to work if 'english' is one of the two
languages.
@raise BabelizeError: If an error is encountered.
"""
print "NLTK Babelizer: type 'help' for a list of commands."
language = ''
phrase = ''
try:
while True:
command = raw_input('Babel> ')
command = clean(command)
if ' ' not in command:
command = command.lower()
if command == 'help':
print HELP
elif command == 'languages':
print ' '.join(sorted(__languages))
elif command in __languages:
language = command
elif command in ['quit', 'bye', 'end']:
break
elif command == 'run':
if not language:
print "Please specify a language first (type 'languages' for a list)."
elif not phrase:
print "Please enter a phrase first (just type it in at the prompt)."
else:
for count, new_phrase in enumerate(babelize(phrase, 'english', language)):
print "%s>" % count, new_phrase
sys.stdout.flush()
else:
print "Command not recognized (type 'help' for help)."
# if the command contains a space, it must have multiple words, and be a new phrase
else:
phrase = command
except EOFError:
print
pass
# I won't take that from you, or from your doggie (Korean)
# the pig I found looked happy (chinese)
# absence makes the heart grow fonder (italian)
# more idioms: http://www.idiomsite.com/
if __name__ == '__main__':
babelize_shell()
| {
"content_hash": "cd4272cc24023c2ef690c03ba552c519",
"timestamp": "",
"source": "github",
"line_count": 196,
"max_line_length": 98,
"avg_line_length": 33.683673469387756,
"alnum_prop": 0.5761890336261739,
"repo_name": "tadgh/ArgoRevisit",
"id": "ad5f4df19e1e446482765d1ee0d691ba220d85a8",
"size": "6895",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "third_party/nltk/misc/babelfish.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Python",
"bytes": "123941"
},
{
"name": "Shell",
"bytes": "69"
}
],
"symlink_target": ""
} |
/*jshint node:true*/
var sass = require('node-sass');
var Jimp = require('jimp');
var deasync = require('deasync');
var fs = require('fs');
const imagesDirectory = "public/assets/images"
module.exports = {
name: 'banner-based-brand-color',
isDevelopingAddon: function() {
return true;
},
included: function(app, parentAddon) {
var _this = this;
var red = undefined;
var green = undefined;
var blue = undefined;
app.options.sassOptions = {
functions: {
"brand_color_from_banner": function() {
var files = fs.readdirSync(imagesDirectory);
var fileName = undefined;
files.forEach(function (file_name){
if( file_name.indexOf("banner") > -1 ) {
fileName = file_name;
}
});
Jimp.read(imagesDirectory+"/"+fileName, function(err, banner) {
_this.ui.writeLine("Calculating Brand Color");
if(err){
_this.ui.writeLine(err);
red = 0;
green = 0;
blue = 0;
} else {
// Calculate the average of the RGB values
var red_total = 0;
var green_total = 0;
var blue_total = 0;
banner.scan(0, 0, banner.bitmap.width, banner.bitmap.height, function (x, y, idx) {
red_total = red_total + this.bitmap.data[ idx + 0 ];
green_total = green_total + this.bitmap.data[ idx + 1 ];
blue_total = blue_total + this.bitmap.data[ idx + 2 ];
});
var pixel_count = banner.bitmap.width * banner.bitmap.height;
red = red_total/pixel_count;
green = green_total/pixel_count;
blue = blue_total/pixel_count;
_this.ui.writeLine("Brand Color: rgb("+red+","+green+","+blue+")");
}
});
// Wait for the async fileRead methods to complete before returning a value
deasync.loopWhile( function() {
return (red === undefined || green === undefined || blue === undefined);
});
return new sass.types.Color(red, green, blue);
}
}
};
}
};
| {
"content_hash": "9cb810c9c966eba47aa02784d25c3cea",
"timestamp": "",
"source": "github",
"line_count": 70,
"max_line_length": 97,
"avg_line_length": 31.65714285714286,
"alnum_prop": 0.5243682310469314,
"repo_name": "A-Helberg/adlet",
"id": "8120161996c7c7469912746b4647e5cec32aa6e4",
"size": "2216",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "lib/banner-based-brand-color/index.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "5009"
},
{
"name": "HTML",
"bytes": "5574"
},
{
"name": "JavaScript",
"bytes": "41903"
}
],
"symlink_target": ""
} |
<?php
namespace Zelenin\Ddd\Core\Infrastructure\Service\IdentityGenerator;
use Zelenin\Ddd\Core\Domain\Object\DefaultObject;
use Zelenin\Ddd\Core\Domain\Service\IdentityGenerator\IdentityGenerator;
use Zelenin\Ddd\Core\Domain\Service\Service;
/**
* @deprecated
*/
final class RandomUuidGenerator extends DefaultObject implements IdentityGenerator, Service
{
/**
* @inheritdoc
*/
public function generate()
{
return (new Uuid4Generator())->generate();
}
}
| {
"content_hash": "664da614adf82f0b3edf5081bf292816",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 91,
"avg_line_length": 23.523809523809526,
"alnum_prop": 0.7348178137651822,
"repo_name": "zelenin/ddd-core",
"id": "a666616f6d54fba4c246042bbeb44cf16ea68cca",
"size": "494",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Infrastructure/Service/IdentityGenerator/RandomUuidGenerator.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "25947"
}
],
"symlink_target": ""
} |
FOUNDATION_EXPORT double Pods_Fieldbook_SwiftSDK_ExampleVersionNumber;
FOUNDATION_EXPORT const unsigned char Pods_Fieldbook_SwiftSDK_ExampleVersionString[];
| {
"content_hash": "5c82bddedb998dc5e181766ceae25dba",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 85,
"avg_line_length": 52.666666666666664,
"alnum_prop": 0.8670886075949367,
"repo_name": "ChrisMash/Fieldbook-SwiftSDK",
"id": "8a5b3819d30f69d59fb249cf73e6a242999d54e4",
"size": "184",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Example/Pods/Target Support Files/Pods-Fieldbook-SwiftSDK_Example/Pods-Fieldbook-SwiftSDK_Example-umbrella.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "990"
},
{
"name": "Ruby",
"bytes": "1674"
},
{
"name": "Shell",
"bytes": "16424"
},
{
"name": "Swift",
"bytes": "41713"
}
],
"symlink_target": ""
} |
"""SCons.Tool.linkloc
Tool specification for the LinkLoc linker for the Phar Lap ETS embedded
operating system.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
#
# 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.
#
__revision__ = "src/engine/SCons/Tool/linkloc.py 3842 2008/12/20 22:59:52 scons"
import os.path
import re
import SCons.Action
import SCons.Defaults
import SCons.Errors
import SCons.Tool
import SCons.Util
from SCons.Tool.msvc import get_msvc_paths
from SCons.Tool.PharLapCommon import addPharLapPaths
_re_linker_command = re.compile(r'(\s)@\s*([^\s]+)')
def repl_linker_command(m):
# Replaces any linker command file directives (e.g. "@foo.lnk") with
# the actual contents of the file.
try:
f=open(m.group(2), "r")
return m.group(1) + f.read()
except IOError:
# the linker should return an error if it can't
# find the linker command file so we will remain quiet.
# However, we will replace the @ with a # so we will not continue
# to find it with recursive substitution
return m.group(1) + '#' + m.group(2)
class LinklocGenerator:
def __init__(self, cmdline):
self.cmdline = cmdline
def __call__(self, env, target, source, for_signature):
if for_signature:
# Expand the contents of any linker command files recursively
subs = 1
strsub = env.subst(self.cmdline, target=target, source=source)
while subs:
strsub, subs = _re_linker_command.subn(repl_linker_command, strsub)
return strsub
else:
return "${TEMPFILE('" + self.cmdline + "')}"
def generate(env):
"""Add Builders and construction variables for ar to an Environment."""
SCons.Tool.createSharedLibBuilder(env)
SCons.Tool.createProgBuilder(env)
env['SUBST_CMD_FILE'] = LinklocGenerator
env['SHLINK'] = '$LINK'
env['SHLINKFLAGS'] = SCons.Util.CLVar('$LINKFLAGS')
env['SHLINKCOM'] = '${SUBST_CMD_FILE("$SHLINK $SHLINKFLAGS $( $_LIBDIRFLAGS $) $_LIBFLAGS -dll $TARGET $SOURCES")}'
env['SHLIBEMITTER']= None
env['LINK'] = "linkloc"
env['LINKFLAGS'] = SCons.Util.CLVar('')
env['LINKCOM'] = '${SUBST_CMD_FILE("$LINK $LINKFLAGS $( $_LIBDIRFLAGS $) $_LIBFLAGS -exe $TARGET $SOURCES")}'
env['LIBDIRPREFIX']='-libpath '
env['LIBDIRSUFFIX']=''
env['LIBLINKPREFIX']='-lib '
env['LIBLINKSUFFIX']='$LIBSUFFIX'
msvs_version = env.get('MSVS_VERSION')
include_path, lib_path, exe_path = get_msvc_paths(env, version = msvs_version)
env['ENV']['LIB'] = lib_path
env.PrependENVPath('PATH', exe_path)
addPharLapPaths(env)
def exists(env):
return env.Detect('linkloc')
| {
"content_hash": "b1585ca096095102b0bc40c1820f3649",
"timestamp": "",
"source": "github",
"line_count": 105,
"max_line_length": 121,
"avg_line_length": 37.43809523809524,
"alnum_prop": 0.6848130246756551,
"repo_name": "james-dibble/Embedded-Systems-Assignment",
"id": "b0550c6e3b385cf0dc5726ba0eb2babc3787b325",
"size": "3931",
"binary": false,
"copies": "12",
"ref": "refs/heads/master",
"path": "EmbeddedSystems.Applications/EmbeddedSystems.Client/jsoncpp-src-0.6.0-rc2/scons-local-1.2.0/SCons/Tool/linkloc.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "480"
},
{
"name": "C",
"bytes": "5203"
},
{
"name": "C#",
"bytes": "207641"
},
{
"name": "C++",
"bytes": "330101"
},
{
"name": "CSS",
"bytes": "1175"
},
{
"name": "IDL",
"bytes": "1618"
},
{
"name": "Python",
"bytes": "1803809"
}
],
"symlink_target": ""
} |
<link rel="import" href="core_signals_nodart.html">
<script type="application/dart" src="core_signals.dart"></script>
| {
"content_hash": "e295072cb5dfb41ad7fc97027c1a8ba8",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 65,
"avg_line_length": 30,
"alnum_prop": 0.725,
"repo_name": "orgsea/core-elements",
"id": "b29e7bd255ef5aaccb3d889f3dec730646133ae3",
"size": "120",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "lib/core_signals.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "30292"
},
{
"name": "Dart",
"bytes": "313798"
},
{
"name": "HTML",
"bytes": "1018604"
},
{
"name": "JavaScript",
"bytes": "371890"
},
{
"name": "Shell",
"bytes": "2513"
}
],
"symlink_target": ""
} |
<?php
declare(strict_types=1);
namespace Symplify\CodingStandard\Fixer\ArrayNotation;
use PhpCsFixer\Fixer\ArrayNotation\TrailingCommaInMultilineArrayFixer;
use PhpCsFixer\FixerDefinition\FixerDefinition;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\CT;
use PhpCsFixer\Tokenizer\Tokens;
use SplFileInfo;
use Symplify\CodingStandard\Fixer\AbstractSymplifyFixer;
use Symplify\CodingStandard\TokenRunner\Analyzer\FixerAnalyzer\BlockFinder;
use Symplify\CodingStandard\TokenRunner\Transformer\FixerTransformer\LineLengthTransformer;
use Symplify\CodingStandard\TokenRunner\ValueObject\BlockInfo;
use Symplify\CodingStandard\TokenRunner\Wrapper\FixerWrapper\ArrayWrapperFactory;
final class StandaloneLineInMultilineArrayFixer extends AbstractSymplifyFixer
{
/**
* @var int[]
*/
private const ARRAY_OPEN_TOKENS = [T_ARRAY, CT::T_ARRAY_SQUARE_BRACE_OPEN];
/**
* @var ArrayWrapperFactory
*/
private $arrayWrapperFactory;
/**
* @var LineLengthTransformer
*/
private $lineLengthTransformer;
/**
* @var BlockFinder
*/
private $blockFinder;
public function __construct(
ArrayWrapperFactory $arrayWrapperFactory,
LineLengthTransformer $lineLengthTransformer,
BlockFinder $blockFinder
) {
$this->arrayWrapperFactory = $arrayWrapperFactory;
$this->lineLengthTransformer = $lineLengthTransformer;
$this->blockFinder = $blockFinder;
}
public function getDefinition(): FixerDefinitionInterface
{
return new FixerDefinition('Indexed PHP arrays should have 1 item per line.', []);
}
public function isCandidate(Tokens $tokens): bool
{
return $tokens->isAnyTokenKindsFound(self::ARRAY_OPEN_TOKENS)
&& $tokens->isAllTokenKindsFound([T_DOUBLE_ARROW]);
}
public function fix(SplFileInfo $file, Tokens $tokens): void
{
foreach ($this->reverseTokens($tokens) as $index => $token) {
if (! $token->isGivenKind(self::ARRAY_OPEN_TOKENS)) {
continue;
}
$blockInfo = $this->blockFinder->findInTokensByEdge($tokens, $index);
if ($blockInfo === null) {
continue;
}
if ($this->shouldSkip($tokens, $blockInfo)) {
continue;
}
$this->lineLengthTransformer->breakItems($blockInfo, $tokens);
}
}
public function getPriority(): int
{
return $this->getPriorityBefore(TrailingCommaInMultilineArrayFixer::class);
}
/**
* skip: [$array => value]
* keep: [$array => [value => nested]]
*/
private function shouldSkip(Tokens $tokens, BlockInfo $blockInfo): bool
{
$arrayWrapper = $this->arrayWrapperFactory->createFromTokensAndBlockInfo($tokens, $blockInfo);
if (! $arrayWrapper->isAssociativeArray()) {
return true;
}
if ($arrayWrapper->getItemCount() === 1 && ! $arrayWrapper->isFirstItemArray()) {
$previousTokenPosition = $tokens->getPrevMeaningfulToken($blockInfo->getStart());
if ($previousTokenPosition === null) {
return false;
}
return ! $tokens[$previousTokenPosition]->isGivenKind(T_DOUBLE_ARROW);
}
return false;
}
}
| {
"content_hash": "cb0d5ce6bc787db15d6ea30f8621ab47",
"timestamp": "",
"source": "github",
"line_count": 109,
"max_line_length": 102,
"avg_line_length": 30.908256880733944,
"alnum_prop": 0.6565746512318196,
"repo_name": "Symplify/Symplify",
"id": "45d915104a19573f63526377c433e004cfaf5a82",
"size": "3369",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "packages/CodingStandard/src/Fixer/ArrayNotation/StandaloneLineInMultilineArrayFixer.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "39"
},
{
"name": "HTML",
"bytes": "18761"
},
{
"name": "JavaScript",
"bytes": "1188"
},
{
"name": "PHP",
"bytes": "1324439"
},
{
"name": "Shell",
"bytes": "4661"
}
],
"symlink_target": ""
} |
'use strict';
// Event Routes
var folders = require('../controllers/folders.box.server.controller');
module.exports = function (app) {
app.route('/api/box/folders').get(folders.getFolder);
}; | {
"content_hash": "b33a24c599927b21b62e36b03b112299",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 70,
"avg_line_length": 19.9,
"alnum_prop": 0.6934673366834171,
"repo_name": "bleedles/NWRecruiterOCR",
"id": "385f0a8e819cf2d8924568f75aa623dd750253cd",
"size": "199",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "modules/box/server/routes/folders.box.server.routes.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "146"
},
{
"name": "CSS",
"bytes": "1224"
},
{
"name": "HTML",
"bytes": "36515"
},
{
"name": "JavaScript",
"bytes": "326649"
},
{
"name": "Shell",
"bytes": "685"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "70b7092bc03613dec16edebe45d0c710",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "83dd7301122df501af42b1a179f3048e7bf4c6d3",
"size": "189",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Masdevallia/Masdevallia ostaurina/ Syn. Reichantha ostaurina/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package org.springframework.boot.autoconfigure.data.couchbase;
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.couchbase.CouchbaseConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.couchbase.config.CouchbaseConfigurer;
/**
* Adapt the core Couchbase configuration to an expected {@link CouchbaseConfigurer} if
* necessary.
*
* @author Stephane Nicoll
*/
@Configuration(proxyBeanMethods = false)
@ConditionalOnClass(CouchbaseConfigurer.class)
@ConditionalOnBean(CouchbaseConfiguration.class)
class CouchbaseConfigurerAdapterConfiguration {
private final CouchbaseConfiguration configuration;
CouchbaseConfigurerAdapterConfiguration(CouchbaseConfiguration configuration) {
this.configuration = configuration;
}
@Bean
@ConditionalOnMissingBean
public CouchbaseConfigurer springBootCouchbaseConfigurer() throws Exception {
return new SpringBootCouchbaseConfigurer(
this.configuration.couchbaseEnvironment(),
this.configuration.couchbaseCluster(),
this.configuration.couchbaseClusterInfo(),
this.configuration.couchbaseClient());
}
}
| {
"content_hash": "a2dd686e800a429e2a520446c742088f",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 87,
"avg_line_length": 35.225,
"alnum_prop": 0.8417317246273953,
"repo_name": "lburgazzoli/spring-boot",
"id": "2e0dff97cc0f4cbcd47f660ff4231035fc6a276c",
"size": "2030",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/couchbase/CouchbaseConfigurerAdapterConfiguration.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "6954"
},
{
"name": "CSS",
"bytes": "5769"
},
{
"name": "FreeMarker",
"bytes": "2134"
},
{
"name": "Groovy",
"bytes": "49512"
},
{
"name": "HTML",
"bytes": "69689"
},
{
"name": "Java",
"bytes": "11602150"
},
{
"name": "JavaScript",
"bytes": "37789"
},
{
"name": "Ruby",
"bytes": "1307"
},
{
"name": "Shell",
"bytes": "27916"
},
{
"name": "Smarty",
"bytes": "3276"
},
{
"name": "XSLT",
"bytes": "34105"
}
],
"symlink_target": ""
} |
class EmailEvents::Service
def self.call(*args, &block)
if block_given?
new(*args).call(&block)
else
new(*args).call
end
end
end
| {
"content_hash": "5251b0cafbf7723d84b389b2b09206e3",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 30,
"avg_line_length": 17.444444444444443,
"alnum_prop": 0.6050955414012739,
"repo_name": "85x14/email_events",
"id": "5626bdca58e1ad20e5a8704023f290dc74bb4e47",
"size": "194",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/email_events/services/service.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "31312"
}
],
"symlink_target": ""
} |
//go:build civo
// +build civo
package builder
import (
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider"
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/civo"
"k8s.io/autoscaler/cluster-autoscaler/config"
)
// AvailableCloudProviders supported by the digtalocean cloud provider builder.
var AvailableCloudProviders = []string{
cloudprovider.CivoProviderName,
}
// DefaultCloudProvider for civo-only build is Civo.
const DefaultCloudProvider = cloudprovider.CivoProviderName
func buildCloudProvider(opts config.AutoscalingOptions, do cloudprovider.NodeGroupDiscoveryOptions, rl *cloudprovider.ResourceLimiter) cloudprovider.CloudProvider {
switch opts.CloudProviderName {
case cloudprovider.CivoProviderName:
return civo.BuildCivo(opts, do, rl)
}
return nil
}
| {
"content_hash": "0427a81979eb7061bf52f03e00e34d49",
"timestamp": "",
"source": "github",
"line_count": 29,
"max_line_length": 164,
"avg_line_length": 27.06896551724138,
"alnum_prop": 0.8140127388535032,
"repo_name": "kubernetes/autoscaler",
"id": "24cf7c9abc0869cc2a04e07b7315064538fa61f8",
"size": "1354",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "cluster-autoscaler/cloudprovider/builder/builder_civo.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Dockerfile",
"bytes": "5407"
},
{
"name": "Go",
"bytes": "19468437"
},
{
"name": "Makefile",
"bytes": "19380"
},
{
"name": "Mustache",
"bytes": "4034"
},
{
"name": "Python",
"bytes": "20902"
},
{
"name": "Roff",
"bytes": "1730"
},
{
"name": "Ruby",
"bytes": "1255"
},
{
"name": "Shell",
"bytes": "53412"
}
],
"symlink_target": ""
} |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>deeplearning4j-ui-parent</artifactId>
<groupId>org.deeplearning4j</groupId>
<version>0.9.2-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>deeplearning4j-ui-model</artifactId>
<packaging>jar</packaging>
<name>deeplearning4j-ui-model</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.deeplearning4j</groupId>
<artifactId>deeplearning4j-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<!-- ND4J APIs -->
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-api</artifactId>
<version>${nd4j.version}</version>
</dependency>
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-native-api</artifactId>
<version>${nd4j.version}</version>
</dependency>
<!-- Agrona. Used for Stats listener encoding/decoding via SBE -->
<dependency>
<groupId>org.agrona</groupId>
<artifactId>Agrona</artifactId>
<version>${agrona.version}</version>
</dependency>
<!-- MapDB - Used for StatsListener storage -->
<dependency>
<groupId>org.mapdb</groupId>
<artifactId>mapdb</artifactId>
<version>${mapdb.version}</version>
</dependency>
<!-- SQLite - Used only for Java-7 Compatible StatsListener Storage -->
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>${sqlite.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile>
<id>test-nd4j-native</id>
</profile>
<profile>
<id>test-nd4j-cuda-8.0</id>
</profile>
</profiles>
</project>
| {
"content_hash": "a31a969fff113e8d76acb96dc065bf53",
"timestamp": "",
"source": "github",
"line_count": 89,
"max_line_length": 108,
"avg_line_length": 30.96629213483146,
"alnum_prop": 0.5725689404934688,
"repo_name": "huitseeker/deeplearning4j",
"id": "2214ebd31a48b3c7525c34d94ff2b20b1d9b6653",
"size": "2756",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "deeplearning4j-ui-parent/deeplearning4j-ui-model/pom.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "931"
},
{
"name": "CSS",
"bytes": "253317"
},
{
"name": "FreeMarker",
"bytes": "18278"
},
{
"name": "HTML",
"bytes": "110136"
},
{
"name": "Java",
"bytes": "10669277"
},
{
"name": "JavaScript",
"bytes": "639543"
},
{
"name": "Jupyter Notebook",
"bytes": "274170"
},
{
"name": "Python",
"bytes": "741"
},
{
"name": "Ruby",
"bytes": "4558"
},
{
"name": "Scala",
"bytes": "203199"
},
{
"name": "Shell",
"bytes": "31744"
},
{
"name": "TypeScript",
"bytes": "78072"
}
],
"symlink_target": ""
} |
<!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>
<!-- IE Standards Mode -->
<meta content="IE=edge" http-equiv="X-UA-Compatible"></meta>
<!-- Favicon -->
<link href="../images/vl_blue.ico" type="image/x-icon" rel="icon"></link>
<link href="../images/vl_blue.ico" type="image/x-icon" rel="shortcut icon"></link>
<!-- Page title -->
<title>VLFeat - Documentation > C API</title>
<!-- Stylesheets -->
<link href="../vlfeat.css" type="text/css" rel="stylesheet"></link>
<link href="../pygmentize.css" type="text/css" rel="stylesheet"></link>
<style xml:space="preserve">
/* fixes a conflict between Pygmentize and MathJax */
.MathJax .mo, .MathJax .mi {color: inherit ! important}
</style>
<link rel="stylesheet" type="text/css" href="doxygen.css"></link>
<!-- Scripts-->
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<!-- MathJax -->
<script xml:space="preserve" type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ['\\(','\\)'] ],
processEscapes: true,
},
TeX: {
Macros: {
balpha: '\\boldsymbol{\\alpha}',
bc: '\\mathbf{c}',
be: '\\mathbf{e}',
bg: '\\mathbf{g}',
bq: '\\mathbf{q}',
bu: '\\mathbf{u}',
bv: '\\mathbf{v}',
bw: '\\mathbf{w}',
bx: '\\mathbf{x}',
by: '\\mathbf{y}',
bz: '\\mathbf{z}',
bsigma: '\\mathbf{\\sigma}',
sign: '\\operatorname{sign}',
diag: '\\operatorname{diag}',
real: '\\mathbb{R}',
},
equationNumbers: { autoNumber: 'AMS' }
}
});
</script>
<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" xml:space="preserve" type="text/javascript"></script>
<!-- Google Custom Search -->
<script xml:space="preserve">
(function() {
var cx = '003215582122030917471:oq23albfeam';
var gcse = document.createElement('script'); gcse.type = 'text/javascript'; gcse.async = true;
gcse.src = (document.location.protocol == 'https' ? 'https:' : 'http:') +
'//www.google.com/cse/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(gcse, s);
})();
</script>
<!-- Google Analytics -->
<script xml:space="preserve" type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-4936091-2']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<!-- Body Start -->
<body>
<div id="header-section">
<div id="header">
<!-- Google CSE Search Box -->
<div class="searchbox">
<gcse:searchbox-only autoCompleteMaxCompletions="5" autoCompleteMatchType="any" resultsUrl="http://www.vlfeat.org/search.html"></gcse:searchbox-only>
</div>
<h1 id="id-16"><a shape="rect" href="../index.html" class="plain"><span id="vlfeat">VLFeat</span><span id="dotorg">.org</span></a></h1>
</div>
<div id="sidebar"> <!-- Navigation Start -->
<ul>
<li><a href="../index.html">Home</a>
<ul>
<li><a href="../about.html">About</a>
</li>
<li><a href="../license.html">License</a>
</li>
</ul></li>
<li><a href="../download.html">Download</a>
<ul>
<li><a href="../install-matlab.html">Using from MATLAB</a>
</li>
<li><a href="../install-octave.html">Using from Octave</a>
</li>
<li><a href="../install-shell.html">Using from the command line</a>
</li>
<li><a href="../install-c.html">Using from C</a>
<ul>
<li><a href="../xcode.html">Xcode</a>
</li>
<li><a href="../vsexpress.html">Visual C++</a>
</li>
<li><a href="../gcc.html">g++</a>
</li>
</ul></li>
<li><a href="../compiling.html">Compiling</a>
<ul>
<li><a href="../compiling-unix.html">Compiling on UNIX-like platforms</a>
</li>
<li><a href="../compiling-windows.html">Compiling on Windows</a>
</li>
</ul></li>
</ul></li>
<li><a href="../overview/tut.html">Tutorials</a>
<ul>
<li><a href="../overview/frame.html">Local feature frames</a>
</li>
<li><a href="../overview/covdet.html">Covariant feature detectors</a>
</li>
<li><a href="../overview/hog.html">HOG features</a>
</li>
<li><a href="../overview/sift.html">SIFT detector and descriptor</a>
</li>
<li><a href="../overview/dsift.html">Dense SIFT</a>
</li>
<li><a href="../overview/liop.html">LIOP local descriptor</a>
</li>
<li><a href="../overview/mser.html">MSER feature detector</a>
</li>
<li><a href="../overview/imdisttf.html">Distance transform</a>
</li>
<li><a href="../overview/encodings.html">Fisher Vector and VLAD</a>
</li>
<li><a href="../overview/gmm.html">Gaussian Mixture Models</a>
</li>
<li><a href="../overview/kmeans.html">K-means clustering</a>
</li>
<li><a href="../overview/aib.html">Agglomerative Infromation Bottleneck</a>
</li>
<li><a href="../overview/quickshift.html">Quick shift superpixels</a>
</li>
<li><a href="../overview/slic.html">SLIC superpixels</a>
</li>
<li><a href="../overview/svm.html#tut.svm">Support Vector Machines (SVMs)</a>
</li>
<li><a href="../overview/kdtree.html">KD-trees and forests</a>
</li>
<li><a href="../overview/plots-rank.html">Plotting AP and ROC curves</a>
</li>
<li><a href="../overview/utils.html">Miscellaneous utilities</a>
</li>
<li><a href="../overview/ikm.html">Integer K-means</a>
</li>
<li><a href="../overview/hikm.html">Hierarchical integer k-means</a>
</li>
</ul></li>
<li><a href="../applications/apps.html">Applications</a>
</li>
<li class='active'><a href="../doc.html">Documentation</a>
<ul>
<li><a href="../matlab/matlab.html">MATLAB API</a>
</li>
<li class='active' class='activeLeaf'><a href="index.html">C API</a>
</li>
<li><a href="../man/man.html">Man pages</a>
</li>
</ul></li>
</ul>
</div> <!-- sidebar -->
</div>
<div id="headbanner-section">
<div id="headbanner">
<span class='page'><a href="../doc.html">Documentation</a></span><span class='separator'>></span><span class='page'><a href="index.html">C API</a></span>
</div>
</div>
<div id="content-section">
<div id="content-wrapper">
<div id="content">
<!-- <pagestyle href="%pathto:root;api/tabs.css"/> -->
<div class="doxygen">
<div id="top">
<div id="top">
<!-- Generated by Doxygen 1.8.7 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="annotated.html"><span>Data Structures</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_8dd540b382164c224dfa1eb6e8a3add6.html">vl</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">vlad.h File Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>VLAD encoding (<a class="el" href="vlad.html">Vector of Locally Aggregated Descriptors (VLAD) encoding</a>)
<a href="#details">More...</a></p>
<div class="textblock"><code>#include "<a class="el" href="generic_8h.html">generic.h</a>"</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">VLAD options</div></td></tr>
<tr class="memitem:a2530f7175c68c931b9c195a227dd9d0e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2530f7175c68c931b9c195a227dd9d0e"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="vlad_8h.html#a2530f7175c68c931b9c195a227dd9d0e">VL_VLAD_FLAG_NORMALIZE_COMPONENTS</a>   (0x1 << 0)</td></tr>
<tr class="memdesc:a2530f7175c68c931b9c195a227dd9d0e"><td class="mdescLeft"> </td><td class="mdescRight">Normalize each VLAD component individually. <br /></td></tr>
<tr class="separator:a2530f7175c68c931b9c195a227dd9d0e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:adac275d53de92eba4f3a83325f85da3e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adac275d53de92eba4f3a83325f85da3e"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="vlad_8h.html#adac275d53de92eba4f3a83325f85da3e">VL_VLAD_FLAG_SQUARE_ROOT</a>   (0x1 << 1)</td></tr>
<tr class="memdesc:adac275d53de92eba4f3a83325f85da3e"><td class="mdescLeft"> </td><td class="mdescRight">Use signed squared-root. <br /></td></tr>
<tr class="separator:adac275d53de92eba4f3a83325f85da3e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac048897164a0ab938bc26bec91b85b9c"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ac048897164a0ab938bc26bec91b85b9c"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="vlad_8h.html#ac048897164a0ab938bc26bec91b85b9c">VL_VLAD_FLAG_UNNORMALIZED</a>   (0x1 << 2)</td></tr>
<tr class="memdesc:ac048897164a0ab938bc26bec91b85b9c"><td class="mdescLeft"> </td><td class="mdescRight">Do not globally normalize the VLAD descriptor. <br /></td></tr>
<tr class="separator:ac048897164a0ab938bc26bec91b85b9c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2047ae2d21cec965ab5db039b1f66d98"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2047ae2d21cec965ab5db039b1f66d98"></a>
#define </td><td class="memItemRight" valign="bottom"><a class="el" href="vlad_8h.html#a2047ae2d21cec965ab5db039b1f66d98">VL_VLAD_FLAG_NORMALIZE_MASS</a>   (0x1 << 3)</td></tr>
<tr class="memdesc:a2047ae2d21cec965ab5db039b1f66d98"><td class="mdescLeft"> </td><td class="mdescRight">Normalize each component by the number of features assigned to it. <br /></td></tr>
<tr class="separator:a2047ae2d21cec965ab5db039b1f66d98"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a6ee2926e14d4a76e9d99ba128bfe5a80"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="vlad_8h.html#a6ee2926e14d4a76e9d99ba128bfe5a80">vl_vlad_encode</a> (void *enc, vl_type dataType, void const *means, <a class="el" href="host_8h.html#a0ee26101458c663510d620e3ee7e2555">vl_size</a> dimension, <a class="el" href="host_8h.html#a0ee26101458c663510d620e3ee7e2555">vl_size</a> numClusters, void const *data, <a class="el" href="host_8h.html#a0ee26101458c663510d620e3ee7e2555">vl_size</a> numData, void const *assignments, int flags)</td></tr>
<tr class="memdesc:a6ee2926e14d4a76e9d99ba128bfe5a80"><td class="mdescLeft"> </td><td class="mdescRight">VLAD encoding of a set of vectors. <a href="#a6ee2926e14d4a76e9d99ba128bfe5a80">More...</a><br /></td></tr>
<tr class="separator:a6ee2926e14d4a76e9d99ba128bfe5a80"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><dl class="section author"><dt>Author</dt><dd>David Novotny </dd>
<dd>
Andrea Vedaldi </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vlad.html">Vector of Locally Aggregated Descriptors (VLAD) encoding</a> </dd></dl>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a6ee2926e14d4a76e9d99ba128bfe5a80"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void vl_vlad_encode </td>
<td>(</td>
<td class="paramtype">void * </td>
<td class="paramname"><em>enc</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">vl_type </td>
<td class="paramname"><em>dataType</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void const * </td>
<td class="paramname"><em>means</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="host_8h.html#a0ee26101458c663510d620e3ee7e2555">vl_size</a> </td>
<td class="paramname"><em>dimension</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="host_8h.html#a0ee26101458c663510d620e3ee7e2555">vl_size</a> </td>
<td class="paramname"><em>numClusters</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void const * </td>
<td class="paramname"><em>data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="host_8h.html#a0ee26101458c663510d620e3ee7e2555">vl_size</a> </td>
<td class="paramname"><em>numData</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void const * </td>
<td class="paramname"><em>assignments</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int </td>
<td class="paramname"><em>flags</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">enc</td><td>output VLAD encoding (out). </td></tr>
<tr><td class="paramname">dataType</td><td>the type of the input data (<a class="el" href="generic_8h.html#a41d6691dac0cc3648ca9701d27e5d2b0">VL_TYPE_DOUBLE</a> or <a class="el" href="generic_8h.html#aa034d0b942f9800b2a02aeb30ff10fa2">VL_TYPE_FLOAT</a>). </td></tr>
<tr><td class="paramname">numData</td><td>number of data vectors to encode. </td></tr>
<tr><td class="paramname">means</td><td>cluster means. </td></tr>
<tr><td class="paramname">numClusters</td><td>number of clusters. </td></tr>
<tr><td class="paramname">data</td><td>the data vectors to encode. </td></tr>
<tr><td class="paramname">dimension</td><td>dimensionality of the data. </td></tr>
<tr><td class="paramname">assignments</td><td>data to cluster soft assignments. </td></tr>
<tr><td class="paramname">flags</td><td>options.</td></tr>
</table>
</dd>
</dl>
<p><em>enc</em> is the VLAD vector of size <em>numClusters</em> by <em>dimension</em>. <em>means</em> is a matrix with <em>numClusters</em> columns and <em>dimension</em> rows. <em>data</em> is the matrix of vectors to be encoded, with <em>dimension</em> rows and <em>numData</em> columns. <em>assignments</em> is a matrix with <em>numClusters</em> rows and <em>numData</em> columns. All the matrices should be stored in column-major order.</p>
<p><em>flag</em> allows controlling further options: <a class="el" href="vlad_8h.html#a2530f7175c68c931b9c195a227dd9d0e" title="Normalize each VLAD component individually. ">VL_VLAD_FLAG_NORMALIZE_COMPONENTS</a>, <a class="el" href="vlad_8h.html#adac275d53de92eba4f3a83325f85da3e" title="Use signed squared-root. ">VL_VLAD_FLAG_SQUARE_ROOT</a>, <a class="el" href="vlad_8h.html#ac048897164a0ab938bc26bec91b85b9c" title="Do not globally normalize the VLAD descriptor. ">VL_VLAD_FLAG_UNNORMALIZED</a>, and <a class="el" href="vlad_8h.html#a2047ae2d21cec965ab5db039b1f66d98" title="Normalize each component by the number of features assigned to it. ">VL_VLAD_FLAG_NORMALIZE_MASS</a>.</p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vlad.html">Vector of Locally Aggregated Descriptors (VLAD) encoding</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- Doc Here -->
</div>
</div>
<div class="clear"> </div>
</div>
</div> <!-- content-section -->
<div id="footer-section">
<div id="footer">
© 2007-13 The authors of VLFeat
</div> <!-- footer -->
</div> <!-- footer section -->
</body>
<!-- Body ends -->
</html>
| {
"content_hash": "a47a1a8c67848222f4b4662c3b533f07",
"timestamp": "",
"source": "github",
"line_count": 350,
"max_line_length": 684,
"avg_line_length": 48.97714285714286,
"alnum_prop": 0.6327149690817874,
"repo_name": "SanikaGawhane/RosettesProjectWID",
"id": "71dea4b340341b36e10aff666d26c9e297a07b13",
"size": "17142",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "doc/api/vlad_8h.html",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "C",
"bytes": "1529129"
},
{
"name": "C++",
"bytes": "8195"
},
{
"name": "CSS",
"bytes": "35562"
},
{
"name": "Clean",
"bytes": "7372"
},
{
"name": "Groff",
"bytes": "12088"
},
{
"name": "HTML",
"bytes": "172914"
},
{
"name": "Makefile",
"bytes": "74842"
},
{
"name": "Matlab",
"bytes": "679372"
},
{
"name": "Objective-C",
"bytes": "33674"
},
{
"name": "Python",
"bytes": "83564"
},
{
"name": "Shell",
"bytes": "1893"
},
{
"name": "TeX",
"bytes": "7492"
}
],
"symlink_target": ""
} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "b6fc5dcfdcdf7740a40e1e77182002d9",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "cc01ffd38c20dcbb49df43e234c2eafd670da2c9",
"size": "193",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Lamiales/Gesneriaceae/Paradrymonia/Paradrymonia lurida/ Syn. Episcia lurida/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.