text
stringlengths
4
5.48M
meta
stringlengths
14
6.54k
package org.springframework.social.security; import java.io.Serializable; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.springframework.security.authentication.AbstractAuthenticationToken; import org.springframework.security.core.GrantedAuthority; import org.springframework.social.ServiceProvider; import org.springframework.social.connect.Connection; import org.springframework.social.connect.ConnectionData; import org.springframework.util.Assert; /** * Authentication token for social authentication, e.g. Twitter or Facebook * * @author Stefan Fussennegger * @author Yuan Ji */ @SuppressWarnings("serial") public class SocialAuthenticationToken extends AbstractAuthenticationToken { private final String providerId; private final Serializable principle; private final Connection<?> connection; private final Map<String, String> providerAccountData; /** * @param connection connection data * @param providerAccountData optional extra account data */ public SocialAuthenticationToken(final Connection<?> connection, Map<String, String> providerAccountData) { super(null); Assert.notNull(connection, "Connection must not be null"); ConnectionData connectionData = connection.createData(); Assert.notNull(connectionData.getProviderId(), "Connection's provider ID must not be null"); if (connectionData.getExpireTime() != null && connectionData.getExpireTime() < System.currentTimeMillis()) { throw new IllegalArgumentException("connection.expireTime < currentTime"); } this.providerId = connectionData.getProviderId(); this.connection = connection; this.principle = null; //no principal yet if (providerAccountData != null) { this.providerAccountData = Collections.unmodifiableMap(new HashMap<String, String>(providerAccountData)); } else { this.providerAccountData = Collections.emptyMap(); } super.setAuthenticated(false); } /** * @param connection {@link Connection} * @param details user details, typically as returned by {@link SocialUserDetailsService} * @param providerAccountData optional extra account data * @param authorities any {@link GrantedAuthority}s for this user */ public SocialAuthenticationToken(final Connection<?> connection, final Serializable details, final Map<String, String> providerAccountData, final Collection<? extends GrantedAuthority> authorities) { super(authorities); Assert.notNull(connection, "Connection must not be null"); this.connection = connection; ConnectionData connectionData = connection.createData(); Assert.notNull(connectionData.getProviderId(), "Connection's provider ID must not be null"); this.providerId = connectionData.getProviderId(); if (details == null) { throw new NullPointerException("details"); } this.principle = details; if (providerAccountData != null) { this.providerAccountData = Collections.unmodifiableMap(new HashMap<String, String>(providerAccountData)); } else { this.providerAccountData = Collections.emptyMap(); } super.setAuthenticated(true); } /** * @return {@link ServiceProvider} id */ public String getProviderId() { return providerId; } /** * @return always null */ public Object getCredentials() { return null; } /** * @return The user's principal. Null if not authenticated. */ public Serializable getPrincipal() { return principle; } public Connection<?> getConnection(){ return connection; } /** * @return unmodifiable map, never null */ public Map<String, String> getProviderAccountData() { return providerAccountData; } /** * @throws IllegalArgumentException when trying to authenticate a previously unauthenticated token */ @Override public void setAuthenticated(final boolean isAuthenticated) throws IllegalArgumentException { if (!isAuthenticated) { super.setAuthenticated(false); } else if (!super.isAuthenticated()) { throw new IllegalArgumentException( "Cannot set this token to trusted - use constructor which takes a GrantedAuthority list instead"); } } }
{'content_hash': '5a9ff7e2f67547b6bff7be47f5049274', 'timestamp': '', 'source': 'github', 'line_count': 127, 'max_line_length': 200, 'avg_line_length': 32.71653543307087, 'alnum_prop': 0.7540312876052948, 'repo_name': 'codeconsole/spring-social', 'id': '92b00d5857eceb9f903449cded9e85663fedb0bb', 'size': '4770', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'spring-social-security/src/main/java/org/springframework/social/security/SocialAuthenticationToken.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '1895'}, {'name': 'HTML', 'bytes': '335'}, {'name': 'Java', 'bytes': '800941'}]}
package com.vityuk.ginger.provider.plural.impl; /** * Plural rules for Bemba language. * * @author Andriy Vityuk */ public final class PluralRule_bem extends PluralRule_1_0n { }
{'content_hash': '444a3a0c415427c7a73d800c40c57887', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 59, 'avg_line_length': 16.727272727272727, 'alnum_prop': 0.7282608695652174, 'repo_name': 'avityuk/ginger', 'id': '3072df139b00aba802d9f0200f5948926bdfef47', 'size': '779', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'core/src/main/java/com/vityuk/ginger/provider/plural/impl/PluralRule_bem.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '458755'}]}
var power = require("./Power"); var request = require('request'); var ipower = require("./IPowerPort"); var exec = require('child_process').exec; qx.Class.define("sn.boardfarm.backend.power.RemoteBackend", { extend : qx.core.Object, implement : [ sn.boardfarm.backend.power.IPowerAdapter ], construct : function(serial) { var pwr = sn.boardfarm.backend.power.Power.getInstance(); console.log("Power: added RemoteBackend " + serial); this.setAdapterIdent("remotebackend:"+serial); this.setSerial(serial); this.__states = []; this.__ports = []; this.__boards = {}; this.__boardNames = []; pwr.addAdapter(this.getAdapterIdent(), this); }, events : { "adapterPowerChanged" : "qx.event.type.Data", "adapterPortStateChanged" : "qx.event.type.Data" }, properties : { adapterIdent : {}, serial : {} }, members : { adapterReadPower : function() { /* can't read power measurements */ this.fireDataEvent("adapterPowerChanged", 0); }, __states : null, adapterReadState : function() { var child; var serial = this.getSerial(); var base = this; var options = { url: 'http://' + this.getSerial() + ':3000/status', method: 'GET', headers: { 'Accept': 'application/json', 'Accept-Charset': 'utf-8', 'User-Agent': 'my-reddit-client' } }; var obj = this; request(options, function(err, res, body) { //FIXME: handle err? try { var status = JSON.parse(body); var keys = obj.__boardNames; var boards = Object.keys(status.boardStates); for (var j = 0; j < boards.length; j++) { for (var i = 0; i < keys.length; i++) { if (keys[i] == boards[j]) obj.__states[i] = status.boardStates[boards[j]]; } } } catch(ex) { } }); }, __ports : null, __boards : null, __boardNames : null, adapterAddPort : function(port, obj) { throw "RemoteBackend requires usage of adapterAddBoard function"; }, adapterAddBoard : function(board, obj) { if (this.__boards[board]) throw "Board "+board+" already set on "+this.getAdapterIdent(); this.__boards[board] = obj; /* Add translation between board and port number */ var cur = this.__ports.length; this.__boardNames[cur] = board; this.__ports[cur] = obj; this.__states[cur] = -1; obj.setPort(cur); }, adapterGetPortNum : function() { return this.__ports.length; }, adapterShutdown : function() { var child; var serial = this.getSerial(); var base = this; console.log("Power: send shutdown to remote backend "+this.getSerial()); var options = { url: 'http://' + this.getSerial() + ':3000/shutdown', method: 'GET', headers: { 'Accept': 'application/json', 'Accept-Charset': 'utf-8', 'User-Agent': 'boardfarm-backend' } }; var base = this; request(options, function(err, res, body) { if (err) console.log("Power: remotebackend " + base.getAdapterIdent() + " reported " + err); }); }, adapterGetPort : function(port) { if (!this.__ports[port]) throw "Port "+port+" not set on "+this.getAdapterIdent(); return this.__ports[port]; }, adapterGetPortState : function(port) { return this.__states[port]; }, adapterSetPortState : function(port, newState) { var child; var serial = this.getSerial(); var base = this; var cmd = newState ? "on" : "off"; var options = { url: 'http://' + this.getSerial() + ':3000/boards/' + this.__boardNames[port] + '/power/'+cmd, method: 'GET', headers: { 'Accept': 'application/json', 'Accept-Charset': 'utf-8', 'User-Agent': 'my-reddit-client' } }; request(options, function(err, res, body) { //FIXME: more error handling? if (err) { console.log(err); return; } base.__states[port] = newState; base.fireDataEvent("adapterPortStateChanged", { port : port, state : newState }); console.log("Power: set port " + parseInt(port) + " of " + base.getAdapterIdent() + " to "+ newState); }); } } }); qx.Class.define("sn.boardfarm.backend.power.RemoteBackendPort", { extend : qx.core.Object, implement : [ sn.boardfarm.backend.power.IPowerPort ], construct : function(serial, board) { var pwr = sn.boardfarm.backend.power.Power.getInstance(); try { this.__adapter = pwr.getAdapter("remotebackend:" + serial); } catch(ex) { this.__adapter = new sn.boardfarm.backend.power.RemoteBackend(serial); } this.setPortOrig(board); this.__adapter.adapterAddBoard(board, this); console.log("Power: mapped board "+board+" from RemoteBackend " + serial + " to port "+this.getPort()); }, properties : { /* The original string-based remote identifier */ portOrig : {}, /* The translated dynamic port number */ port : {}, board : {} }, members : { __adapter : null, portGetAdapter : function() { return this.__adapter; }, portGetState : function() { return this.portGetAdapter().adapterGetPortState(this.getPort()); }, portSetState : function(newState) { this.portGetAdapter().adapterSetPortState(this.getPort(), newState); } } });
{'content_hash': 'c2dbb386b6721b7c948f361d2674a24b', 'timestamp': '', 'source': 'github', 'line_count': 235, 'max_line_length': 106, 'avg_line_length': 22.04255319148936, 'alnum_prop': 0.6131274131274131, 'repo_name': 'mmind/boardfarm-mgmt', 'id': '06a0842cd348773c71218ed9b87cbde5339f8804', 'size': '5419', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'source/class/sn/boardfarm/backend/power/RemoteBackend.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '34131'}, {'name': 'HTML', 'bytes': '3878'}, {'name': 'JavaScript', 'bytes': '233687'}, {'name': 'Python', 'bytes': '4938'}, {'name': 'Shell', 'bytes': '776'}]}
jQuery(document).ready(function(){ var tabContents = jQuery('#tabContentWrap li'); var tabControls = jQuery('.tabControler li'); tabControls.click(function(){ // clickTab = $(this).attr('id'); clickTab = $(this).index(); if (clickTab == 0){ activeTabId = 0; unactiveId1 = 1; unactiveId2 = 2; } else if (clickTab == 1){ activeTabId = 1; unactiveId1 = 0; unactiveId2 = 2; } else if (clickTab == 2){ activeTabId = 2; unactiveId1 = 1; unactiveId2 = 0; } tabsAct(activeTabId, unactiveId1, unactiveId2); }); function tabsAct(activeId, unactiveId1, unactiveId2){ jQuery.each(tabControls,function(){ //console.log(this); jQuery(this).removeClass('active left right'); }); tabControls.eq(unactiveId1).addClass('left'); tabControls.eq(unactiveId2).addClass('right'); tabControls.eq(activeId).addClass('active'); tabContents.eq(unactiveId1).fadeOut(300); tabContents.eq(unactiveId2).fadeOut(300); tabContents.eq(activeId).fadeIn(300); } jQuery('#tabContentWrap li .open').css('height','290px'); jQuery('#tabContentWrap .mapList').click(function(){ var clicked = jQuery(this); // close previous opened clicked.parent().find('.open').animate({ 'height': 70 }, 500); clicked.parent().find('.open').removeClass('open').addClass('close'); // open clicked one clicked.removeClass('close').addClass('open'); clicked.animate({ 'height': 290 }, 500); }); });
{'content_hash': 'a823a771d641134da57c32da12c4dca4', 'timestamp': '', 'source': 'github', 'line_count': 57, 'max_line_length': 71, 'avg_line_length': 25.50877192982456, 'alnum_prop': 0.6581843191196699, 'repo_name': 'observerslee/ardic', 'id': 'c80c948960b84d35f67561863a926832228f49de', 'size': '1454', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'js/tab.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '205720'}, {'name': 'PHP', 'bytes': '6366'}]}
<html lang="en"> <head> <title>Completion - Distel User Manual</title> <meta http-equiv="Content-Type" content="text/html"> <meta name="description" content="Distel User Manual"> <meta name="generator" content="makeinfo 4.11"> <link title="Top" rel="start" href="index.html#Top"> <link rel="up" href="Programming-Aids.html#Programming-Aids" title="Programming Aids"> <link rel="prev" href="Tags.html#Tags" title="Tags"> <link rel="next" href="Evaluation.html#Evaluation" title="Evaluation"> <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage"> <meta http-equiv="Content-Style-Type" content="text/css"> <style type="text/css"><!-- pre.display { font-family:inherit } pre.format { font-family:inherit } pre.smalldisplay { font-family:inherit; font-size:smaller } pre.smallformat { font-family:inherit; font-size:smaller } pre.smallexample { font-size:smaller } pre.smalllisp { font-size:smaller } span.sc { font-variant:small-caps } span.roman { font-family:serif; font-weight:normal; } span.sansserif { font-family:sans-serif; font-weight:normal; } --></style> </head> <body> <div class="node"> <p> <a name="Completion"></a> Next:&nbsp;<a rel="next" accesskey="n" href="Evaluation.html#Evaluation">Evaluation</a>, Previous:&nbsp;<a rel="previous" accesskey="p" href="Tags.html#Tags">Tags</a>, Up:&nbsp;<a rel="up" accesskey="u" href="Programming-Aids.html#Programming-Aids">Programming Aids</a> <hr> </div> <h3 class="section">2.2 Completion of Modules and Functions</h3> <p>Completion allows you to write some part of a module or remote function name and then press <kbd>M-TAB</kbd> to have it completed automatically. When multiple completions exist they are displayed in a popup buffer, much like Emacs's normal filename completion. The completion buffer can simply be read to see which completions exist, or either <kbd>RET</kbd> or the middle mouse button can be used to select one. <dl> <dt><kbd>M-TAB</kbd><dd>Complete the module or function at point. (<code>erl-complete</code>) <br><dt><kbd>M-?</kbd><dd>Alternative binding for <code>erl-complete</code>, since <kbd>M-TAB</kbd> is often reserved by window managers. </dl> </body></html>
{'content_hash': 'f25d6be44e3d62eaa2b0a87b5057cc31', 'timestamp': '', 'source': 'github', 'line_count': 53, 'max_line_length': 107, 'avg_line_length': 42.20754716981132, 'alnum_prop': 0.7188198480107286, 'repo_name': 'littletwolee/emacs-configure', 'id': '119ae04df5e99f44cf36d0cf6e2e2526aae5556b', 'size': '2237', 'binary': False, 'copies': '5', 'ref': 'refs/heads/master', 'path': '.emacs.d/distel/doc/distel/Completion.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '2665'}, {'name': 'C', 'bytes': '13276'}, {'name': 'C++', 'bytes': '42008'}, {'name': 'CSS', 'bytes': '2490'}, {'name': 'Emacs Lisp', 'bytes': '11907631'}, {'name': 'Erlang', 'bytes': '67494'}, {'name': 'Fortran', 'bytes': '2529'}, {'name': 'HTML', 'bytes': '1161125'}, {'name': 'Hack', 'bytes': '1351'}, {'name': 'Java', 'bytes': '1897'}, {'name': 'Makefile', 'bytes': '74597'}, {'name': 'PHP', 'bytes': '64'}, {'name': 'Ruby', 'bytes': '2912'}, {'name': 'SRecode Template', 'bytes': '55991'}, {'name': 'Shell', 'bytes': '17011'}]}
<Record> <Term>Vitiligo</Term> <SemanticType>Disease or Syndrome</SemanticType> <ParentTerm>Hypopigmentation</ParentTerm> <ParentTerm>Dermatitis</ParentTerm> <ClassificationPath>Findings_and_Disorders_Kind/Disease, Disorder or Finding/Disease or Disorder/Disorder by Site/Skin Disorder/Non-Neoplastic Skin Disorder/Dermatosis/Dermatitis/Vitiligo</ClassificationPath> <ClassificationPath>Skin and Connective Tissue Diseases/Skin Diseases/Pigmentation Disorders/Hypopigmentation/Vitiligo</ClassificationPath> <BroaderTerm>Skin Diseases</BroaderTerm> <BroaderTerm>Disorder by Site</BroaderTerm> <BroaderTerm>Hypopigmentation</BroaderTerm> <BroaderTerm>Non-Neoplastic Skin Disorder</BroaderTerm> <BroaderTerm>Findings_and_Disorders_Kind</BroaderTerm> <BroaderTerm>Disease, Disorder or Finding</BroaderTerm> <BroaderTerm>Dermatosis</BroaderTerm> <BroaderTerm>Disease or Disorder</BroaderTerm> <BroaderTerm>Vitiligo</BroaderTerm> <BroaderTerm>Pigmentation Disorders</BroaderTerm> <BroaderTerm>Skin and Connective Tissue Diseases</BroaderTerm> <BroaderTerm>Dermatitis</BroaderTerm> <BroaderTerm>Skin Disorder</BroaderTerm> <Synonym>Vitiligo</Synonym> <Description>A disorder consisting of areas of macular depigmentation, commonly on extensor aspects of extremities, on the face or neck, and in skin folds. Age of onset is often in young adulthood and the condition tends to progress gradually with lesions enlarging and extending until a quiescent state is reached.</Description> <Source>NCI Thesaurus</Source> <Source>MeSH</Source> </Record>
{'content_hash': 'f416596d3f5284c6ec83787b039ff71c', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 329, 'avg_line_length': 62.48, 'alnum_prop': 0.8207426376440461, 'repo_name': 'detnavillus/modular-informatic-designs', 'id': '1719e113093fab004e0960272d77a218924b4eb5', 'size': '1562', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'pipeline/src/test/resources/thesaurus/diseaseorsyndrome/vitiligo.xml', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '2069134'}]}
import * as path from 'path' import * as Dockerode from 'dockerode' import * as recursive from 'recursive-readdir' import { default as AnsiUp } from 'ansi_up' import * as simpleGit from 'simple-git/promise' import * as fs from 'fs-extra' import * as dotenv from 'dotenv' import { path as rootPath } from 'app-root-path' import ApiDelegate from './apiDelegate' const pkgPath: string = path.join(rootPath, 'package.json') const envPath: string = path.join(rootPath, '.env') const { name } = require(pkgPath) dotenv.config({ path: envPath }) export enum BuildStatus { Progress, Complete, Error, Waiting, Established } export interface BuildLog { status: BuildStatus message?: string } export enum MessageType { Host, Container, BuildStatus } export interface Message { type: MessageType message?: string buildLog?: BuildLog } class Build { private delegate: ApiDelegate private ansiUp: AnsiUp private _dockerInst: Dockerode constructor() { this.delegate = new ApiDelegate() this.ansiUp = new AnsiUp() } async run(): Promise<void> { try { await this.removeDir() await this.cloneRepo() await this.checkout() await this.existDockerfile() await this.buildImage() const container = await this.createContainer() await container.start() await this.sendContainerId(container.id) await this.sendHostInfo(container) await this.removeDir() } catch (e) { this.onerror(e) } } get docker(): Dockerode { if (!this._dockerInst) { this._dockerInst = new Dockerode({ socketPath: '/var/run/docker.sock' }) } return this._dockerInst } get owner(): string { return this.delegate.owner } get repo(): string { return this.delegate.repo } get id(): string { const id = process.argv[2] if (!id) throw new Error('You must pass commit id.') return id } get containerName(): string { return `${name}_${this.owner}_${this.repo}_${this.id}` } get imageName(): string { return `${name}_${this.owner}_${this.repo}:${this.id}` } get reposDir(): string { return path.join(rootPath, 'repos') } get dir(): string { return path.join(this.reposDir, this.containerName) } get dockerfilePath(): string { return path.join(this.dir, 'Dockerfile') } private cloneRepo(): Promise<any> { const repoURL: string = this.delegate.provider.getRepoURL() return simpleGit(this.reposDir).clone(repoURL, this.dir) } private checkout() { return simpleGit(this.dir).checkout(this.id) } private existDockerfile(): Promise<void> { return fs.access(this.dockerfilePath) } // you must not use async/await because that is cannot receive stream. private async buildImage() { const absPathFiles: string[] = await recursive(this.dir) const files: string[] = absPathFiles.map((file: string) => file.replace(this.dir, '') ) return new Promise((resolve, reject) => { this.docker.buildImage( { context: this.dir, src: files }, { t: this.imageName }, (err, stream) => { if (err) reject(err) this.docker.modem.followProgress( stream, (err: Error) => { if (err) reject(err) resolve() }, (event: any) => { const message = this.ansiUp.ansi_to_html( event.stream || event.status || '' ) const buildLog: BuildLog = { status: BuildStatus.Progress, message } this.sendMessage({ type: MessageType.BuildStatus, buildLog }) } ) } ) }) } private removeDir() { return fs.remove(this.dir) } private createContainer(): Promise<Dockerode.Container> { try { return this.docker.createContainer({ Image: this.imageName, name: this.containerName // PublishAllPorts: true // Env: this.oasisConfig }) } catch (e) { return Promise.resolve(this.docker.getContainer(this.containerName)) } } private sendContainerId(containerId: string): void { this.sendMessage({ type: MessageType.Container, message: containerId }) } private async sendHostInfo(container: Dockerode.Container): Promise<void> { const inspect = await container.inspect() // TODO: throw error if port is undefined const { Ports } = inspect.NetworkSettings const port = Object.keys(Ports).map(p => parseInt(p))[0] const { IPAddress } = inspect.NetworkSettings.Networks.bridge const host = `http://${IPAddress}:${port}` this.sendMessage({ type: MessageType.Host, message: host }) this.sendMessage({ type: MessageType.BuildStatus, buildLog: { status: BuildStatus.Complete, message: 'complete' } }) } private sendMessage(message: Message): void { if (!process.send) return process.send(message) } private onerror(err: Error): void { this.sendMessage({ type: MessageType.BuildStatus, buildLog: { status: BuildStatus.Error, message: err.message } }) console.error(err) process.exit(1) } } async function main() { try { const build = new Build() await build.run() } catch (e) { console.error(e) } } if (!module.parent) { main() }
{'content_hash': '0dd8e606350975dcb8c5676ff03009de', 'timestamp': '', 'source': 'github', 'line_count': 238, 'max_line_length': 77, 'avg_line_length': 23.27310924369748, 'alnum_prop': 0.6069687669254378, 'repo_name': 'sunya9/oasis', 'id': '2cf37afca8fe1868670909619ffb94986dc55074', 'size': '5539', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/build.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1944'}, {'name': 'Dockerfile', 'bytes': '312'}, {'name': 'HTML', 'bytes': '5723'}, {'name': 'JavaScript', 'bytes': '8640'}, {'name': 'TypeScript', 'bytes': '21418'}]}
<?php namespace ZfcDatagrid\Column\Type; use Locale; use NumberFormatter; use ZfcDatagrid\Filter; use function strlen; use function substr; use function strpos; class Number extends AbstractType { /** @var string */ protected $filterDefaultOperation = Filter::EQUAL; /** * Locale to use instead of the default. * * @var string|null */ protected $locale; /** * NumberFormat style to use. * * @var int */ protected $formatStyle = NumberFormatter::DECIMAL; /** * NumberFormat type to use. * * @var int */ protected $formatType = NumberFormatter::TYPE_DEFAULT; /** @var array */ protected $attributes = []; /** @var string */ protected $prefix = ''; /** @var string */ protected $suffix = ''; /** @var null|string */ protected $pattern; /** * Number constructor. * @param int $formatStyle * @param int $formatType * @param null $locale */ public function __construct( int $formatStyle = NumberFormatter::DECIMAL, int $formatType = NumberFormatter::TYPE_DEFAULT, ?string $locale = null ) { $this->setFormatStyle($formatStyle); $this->setFormatType($formatType); $this->setLocale($locale); } /** * @return string */ public function getTypeName(): string { return 'number'; } /** * @param int $style * * @return $this */ public function setFormatStyle(int $style = NumberFormatter::DECIMAL): self { $this->formatStyle = $style; return $this; } /** * @return int */ public function getFormatStyle(): int { return $this->formatStyle; } /** * @param int $type * * @return $this */ public function setFormatType(int $type = NumberFormatter::TYPE_DEFAULT): self { $this->formatType = $type; return $this; } /** * @return int */ public function getFormatType(): int { return $this->formatType; } /** * @param null|string $locale * * @return $this */ public function setLocale(?string $locale = null): self { $this->locale = $locale; return $this; } /** * @return string */ public function getLocale(): string { if (null === $this->locale) { $this->locale = Locale::getDefault(); } return $this->locale; } /** * Set an attribute. * * @link http://www.php.net/manual/en/numberformatter.setattribute.php * * @param int $attr * @param int $value * * @return $this */ public function addAttribute(int $attr, int $value): self { $this->attributes[] = [ 'attribute' => $attr, 'value' => $value, ]; return $this; } /** * @return array */ public function getAttributes(): array { return $this->attributes; } /** * @param string $string * * @return $this */ public function setSuffix(string $string = ''): self { $this->suffix = $string; return $this; } /** * @return string */ public function getSuffix(): string { return $this->suffix; } /** * @param string $string * * @return $this */ public function setPrefix(string $string = ''): self { $this->prefix = $string; return $this; } /** * @return string */ public function getPrefix(): string { return $this->prefix; } /** * @param null|string $pattern * * @return $this */ public function setPattern(?string $pattern): self { $this->pattern = $pattern; return $this; } /** * @return null|string */ public function getPattern(): ?string { return $this->pattern; } /** * @return NumberFormatter */ protected function getFormatter(): NumberFormatter { $formatter = new NumberFormatter($this->getLocale(), $this->getFormatStyle()); if (null !== $this->getPattern()) { $formatter->setPattern($this->getPattern()); } foreach ($this->getAttributes() as $attribute) { $formatter->setAttribute($attribute['attribute'], $attribute['value']); } return $formatter; } /** * @param string $val * * @return string */ public function getFilterValue(string $val): string { $formatter = $this->getFormatter(); if (strlen($this->getPrefix()) > 0 && strpos($val, $this->getPrefix()) === 0) { $val = substr($val, strlen($this->getPrefix())); } if (strlen($this->getSuffix()) > 0 && strpos($val, $this->getSuffix()) > 0) { $val = substr($val, 0, -strlen($this->getSuffix())); } try { $formattedValue = $formatter->parse($val); } catch (\Exception $e) { return $val; } if (false === $formattedValue) { return $val; } return $formattedValue; } /** * Convert the value from the source to the value, which the user will see. * * @param mixed $val * * @return mixed */ public function getUserValue($val) { $formatter = $this->getFormatter(); $formattedValue = $formatter->format((float)$val, $this->getFormatType()); return $this->getPrefix() . $formattedValue . $this->getSuffix(); } }
{'content_hash': '50e7a7c4595cee3a277202440efc417b', 'timestamp': '', 'source': 'github', 'line_count': 285, 'max_line_length': 87, 'avg_line_length': 20.080701754385966, 'alnum_prop': 0.5184343875589725, 'repo_name': 'zfc-datagrid/zfc-datagrid', 'id': '2c3d6324689b2511f316ff5218b4c502b4567c70', 'size': '5723', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/ZfcDatagrid/Column/Type/Number.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '49545'}, {'name': 'PHP', 'bytes': '594786'}]}
=head1 The Perl 6 Summary for the week ending 2004-03-07 Time marches on, and another summary gets written, sure as eggs are eggs and chromatic is a chap with whom I will never start a sentence. We start, as always, with perl6-internals. =head2 Platform games Work continued this week on expanding the number of known (and preferably known good) platforms in the F<PLATFORMS> file. =head2 Languages tests Dan reckons it's time to be a little more aggressive with tests for ancillary stuff, in particular the contents of the F<languages> subdirectory. He called for language maintainers (and any other interested parties) to at least get minimal tests written for all the languages in the languages directory, and to get those welded to the C<languages-test> makefile target. L<http://groups.google.com/groups?selm=a06010201bc68ee3f3f3c@[10.0.1.2]> =head2 IMCC and objects/methods Tim Bunce congratulated everyone on Parrot 0.1.0 before asking about where we stood with IMCC and objects/methods. Leo confirmed Tim's supposition that there is no syntactic support for objects and methods in IMCC, at least in part because there's been no discussion of how such syntax should look. L<http://groups.google.com/[email protected]> =head2 Parrotbug reaches 0.0.1 Jerome Quelin responded to Dan's otherwise ignored request for a parrot equivalent of F<perlbug> when he offered an implementation of F<parrotbug> for everyone's perusal, but didn't go so far to add it to the distribution. I don't think it's been checked into the repository yet, but it'll probably go in F<tools/dev/> when it does. Later in the week, he actually got it working, sending mail to the appropriate mailing lists. With any luck the mailing lists themselves will be up and running by the time you read this. L<http://groups.google.com/[email protected]> =head2 Subclassing bug Jens Rieks found what looked like a problem with subclassing, which turned out to be a problem with C<clone> not going deep enough. Simon Glover tracked it to its den and Dan Sugalski fixed it. L<http://groups.google.com/[email protected]> =head2 Good news! Bad news! Good news! Dan says the infrastructure is in place to do delegated method calls for vtable functions with objects. Bad news! It doesn't actually work because it's impossible to inherit from F<delegate.pmc> properly. Dan pleaded for someone to take a look at F<pmc2c2.pl> and or F<lib/Parrot/Pmc2c.pm> and fix things so that the generated code is heritable. L<http://groups.google.com/groups?selm=a06010201bc6a51c938a5@[10.254.6.39]> =head2 Parrot m4 updated Bernhard Schmalhofer posted a patch to improve the Parrot implementation of the m4 macro language. L<http://groups.google.com/[email protected]> =head2 Use vim? I don't use vim, but it seems that Leo Tötsch does. He's added some handy dandy vim syntax files for IMC code. If you're a vim user you might like to check it out. Leo points out that the syntax tables might well be handy if you don't know all 1384 opcode variants by heart. L<http://groups.google.com/[email protected]> =head2 Parrotris Sadly, Jens Rieks' Parrot and SDL implementation of tetris didn't quite make it under the wire for the 0.1.0 release. However, Leo has got round to trying it and is impressed, though he did spot a few bugs (it doesn't spot that the game is over for instance). Jens is working on fixing those (and on adding new features), which he reckons will go a deal faster when IMCC has better syntactic support for OO techniques. L<http://groups.google.com/[email protected]> =head2 Dates and Times To paraphrase Barbie: Dates and Times are Hard. Not that hardness has ever stopped Dashing Dan Sugalski before. This time he waded into the swamp that is Parrot's handling of dates, times, intervals and all that other jazz. He started by soliciting opinions. He got quite a few. The discussion can probably be divided into two camps: KISS (Keep it Simple) people, and DTRT (Do The Right Thing) people. But KISS still has it's complexities (which Epoch do we want? Should time be a floating point value?) and what, exactly, is the Right Thing? The catch is, time is a messily human thing, and computers are really bad at messy humanity. Larry said that Dan could do what he wants with Parrot, but he wants Perl 6's standard interface to be a floating point seconds since 2000. He argues that "floating point will almost always have enough precision for the task at hand, and by the time it doesn't, it will. :-)". He also argued that normal users "should I<never> have to remember the units of the fractional seconds". Zellyn Hunter pointed everyone at Dave Rolsky's excellent article on the complexities of handling dates and times with a computer. Discussion is ongoing, but it seems that Larry and Dan are leaning towards the KISS approach. L<http://groups.google.com/groups?selm=a06010204bc6bb752bc7c@[10.0.1.2]> L<http://www.perl.com/pub/a/2003/03/13/datetime.html> =head2 Initializers, finalizers and fallbacks Anyone who has been reading the internals list for any length of time, or who has chatted to Dan about Parrot on the #parrot irc channel will be only too aware that Dan isn't the greatest fan of the OO silver bullet. So, getting the initial objects implementation out there was the sort of thing he probably hoped would mean he didn't have to come back to objects for a while. Except, once you've got part of an object implementation, the need for the rest of it just seems to become more pressing. So, poor Dan's been doing more OO stuff. This time he sketched out where he was going with initialization, finalization and fallback method location. The basic idea is that, instead of mandating particular method names for different tasks (which seems like the easy approach, but doesn't work across languages), we mandate particular properties which tag various methods as being initializers/finalizers/fallbacks. He outlined his initial set of standard properties and asked for comments. Leo liked the basic idea, but suggested that, in the absence of any such properties on a class's methods, Parrot should fall back to some methods on a delegate PMC. L<http://groups.google.com/groups?selm=a06010205bc6bc09fea71@[10.0.1.2]> =head2 OO Benchmarks Leo posted the results of a couple of benchmarks. They weren't very encouraging. It seems there was a memory leak. And some inefficiencies in object creation. And some more inefficiencies in object creation. By the end of the mini thread, things had got a good deal faster. Quite where it puts us against Perl 5 and Python wasn't mentioned. L<http://groups.google.com/[email protected]> =head2 Parrot dependencies Michael Scott, who has been doing sterling work on Parrot's documentation wanted to remove some non-modified, non-parrot Perl modules from the Parrot distribution and have people install them from CPAN. Dan disagreed quite strongly. The current rule of thumb is that Parrot is allowed to depend on finding a Perl 5.005_0x distribution and a C compiler. Any Perl modules it needs that can't be found in that distribution should be provided as part of the Parrot distribution. Larry argued that we should separate the notion of the developer distribution from the user distribution. The developer codebase is allowed to have any number of external dependencies ("dependencies out the wazoo" was Larry's chosen phrase), and the (for plural values of 'the') comes with all the bells and whistles a distributer sees fit to include. He argued that the developer codebase should be completely unusable by anyone but developers to prevent ISPs from installing that and then claiming to "support Perl". L<http://groups.google.com/[email protected]> =head2 Vtables as collectible objects Dan wondered whether we were going to need to treat vtables as garbage collectible objects, and if we did, what kind of hit that would entail. He and Leo discussed it, and Leo reinvented refcounting as being a possible way to go rather than full DOD type collection. L<http://groups.google.com/groups?selm=a06010205bc6cf5235fe9@[10.0.1.2]> =head2 Continuing dumper improvement Jens Rieks added ParrotObject support to his Parrot data dumper. Dan applied it. Go Jens. L<http://groups.google.com/[email protected]> =head2 Freezing strings Brent Dax is working on writing a parrot implementation of Parrot::Config. His initial idea for implementation involves generating a PerlHash of configuration info and then freezing it to disk. However, when he tried it he had problems with freezing strings, so he asked for help. It turned out to be a simple matter of unimplemented functions, which he and Leo rapidly implemented. A patch with Brent's implementation appeared shortly afterwards. L<http://groups.google.com/[email protected]> =head2 A Perl task - Benchmarking Leo wondered if anyone could implement an equivalent of perlbench for parrot's benchmarks to do speed comparisons of Parrot, Perl, Python etc implementations. Sebastien Riedel delivered the goods. L<http://groups.google.com/[email protected]> =head1 Meanwhile, in perl6-language =head2 Exegesis 7 Everyone carried on discussing Damian's Exegesis 7 on Perl6::Format, there was even a surprise appearance by Tom Christiansen, who demonstrated a novel, if computationally intractable, approach to generating fully justified text. =head2 Multi matching Remember last week, Larry had proposed using C<&> in Perl 6 rules as a way of matching multiple rules at the same point in the string. Damian liked it a lot and said he'd be delighted to add support for it to the semi mythical Perl6::Rules module. So, Larry said the word ("Execute!", which wasn't quite the word everyone expected) so Damian tugged his forelock and added it to his todo list. Questions like "What are the precedence rules for C<&> and C<|> in regular expressions then?" haven't been asked yet. L<http://groups.google.com/[email protected]> =head2 Compile-time undefined sub detection Nigel Sandever wondered if Perl 6 will be able to detect undefined subs at compile time. Larry thought it would be in theory, if you ask it to check in a C<CHECK> block, and you're prepared to assume that no C<eval> or C<INIT> block will fill in the blank later, and there's no C<AUTOLOAD> that might catch it. Sounds rather a like "Not in the general case, no" to me. Bringing C<CHECK> and C<INIT> up prompted Rafael Garcia-Suarez to ask what the rules would be for them in Perl 6 because they're pretty broken in Perl 5. (Sometimes you want C<CHECK> and C<INIT> semantics to work well when you're loading a module at runtime, and Perl 5 doesn't do that). It looks like he's going to get his heart's desire on this (A big "Yay!" from the direction of Gateshead). Dan Sugalski popped over from perl6-internals to point out that Parrot would be using properties rather than specifically named blocks for this sort of stuff. Larry eventually made a ruling which uses properties in a rather cunning fashion. Check his message for the details. L<http://groups.google.com/[email protected]> L<http://groups.google.com/[email protected]> -- Larry on magic blocks =head1 Announcements, Apologies, Acknowledgements Crumbs, another Monday night, another summary finished. I've got to be careful here, it might by habit forming. If you find these summaries useful or enjoyable, please consider contributing to the Perl Foundation to help support the development of Perl. You might also like to send me feedback at L<mailto:[email protected]>, or drop by my website. L<http://donate.perl-foundation.org/> -- The Perl Foundation L<http://dev.perl.org/perl6/> -- Perl 6 Development site L<http://www.bofh.org.uk/> -- My website, "Just a Summary"
{'content_hash': 'd06f98f2753e4b86d85607de0110bdc7', 'timestamp': '', 'source': 'github', 'line_count': 278, 'max_line_length': 96, 'avg_line_length': 43.81294964028777, 'alnum_prop': 0.7892446633825945, 'repo_name': 'autarch/perlweb', 'id': '44a61f915b2d9dcd9b7db2a77cea627a02c84d56', 'size': '12180', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docs/dev/perl6/list-summaries/2004/p6summary.2004-03-07.pod', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '39919'}, {'name': 'JavaScript', 'bytes': '22100'}, {'name': 'Perl', 'bytes': '7922790'}, {'name': 'Shell', 'bytes': '1932'}]}
module.exports = require('../src/dragon.lib').default
{'content_hash': 'b75413e7f8613dccd68aae266149d92a', 'timestamp': '', 'source': 'github', 'line_count': 1, 'max_line_length': 53, 'avg_line_length': 53.0, 'alnum_prop': 0.7358490566037735, 'repo_name': 'luckylooke/dragon', 'id': '8ea2b620cf8d52272944d5c36f2b3bdd6728d791', 'size': '119', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/webpack.entry.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '6014'}, {'name': 'HTML', 'bytes': '12200'}, {'name': 'JavaScript', 'bytes': '171861'}]}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>param-pi: Not compatible</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.12.1 / param-pi - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> param-pi <small> 8.5.0 <span class="label label-info">Not compatible</span> </small> </h1> <p><em><script>document.write(moment("2021-03-30 13:49:25 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2021-03-30 13:49:25 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.12.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.11.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.11.1 Official release 4.11.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.1 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;[email protected]&quot; homepage: &quot;https://github.com/coq-contribs/param-pi&quot; license: &quot;LGPL 2&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/ParamPi&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:pi-calculus&quot; &quot;category:Computer Science/Lambda Calculi&quot; &quot;date:1998-09-30&quot; ] authors: [ &quot;Loïc Henry-Gréard &lt;[email protected]&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/param-pi/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/param-pi.git&quot; synopsis: &quot;Coding of a typed monadic pi-calculus using parameters for free names&quot; description: &quot;&quot;&quot; This development contains the specification for a monadic pi-calculus using the same coding method for names than J. Mc Kinna and R. Pollack used for PTS in LEGO: &quot;Some Lambda Calculus and Type Theory Formalized&quot;. The basic, monadic calculus encoded here has a type system restraining the direction of communication for processes&#39; names. A number of lemmas usefull for doing proofs on that coding are included, and subject reduction properties for each kind of transition is made as an example of actually using the coding to mechanize proofs on the pi-calculus.&quot;&quot;&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/param-pi/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=ac8b20571cba62795c908347bc6c5932&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-param-pi.8.5.0 coq.8.12.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.12.1). The following dependencies couldn&#39;t be met: - coq-param-pi -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-param-pi.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> <small>Sources are on <a href="https://github.com/coq-bench">GitHub</a>. © Guillaume Claret.</small> </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{'content_hash': 'e666f1767ad5423cd8d1c61b2a6d629b', 'timestamp': '', 'source': 'github', 'line_count': 174, 'max_line_length': 157, 'avg_line_length': 41.367816091954026, 'alnum_prop': 0.5557099194220617, 'repo_name': 'coq-bench/coq-bench.github.io', 'id': '2894211b399d59537cd0b28676c97008bb4153ce', 'size': '7202', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.11.1-2.0.7/released/8.12.1/param-pi/8.5.0.html', 'mode': '33188', 'license': 'mit', 'language': []}
@echo off REM SIMPLE COMMAND.COM SCRIPT TO ASSEMBLE GAMEBOY FILES if exist %1.gb del %1.gb REM IF THERE ARE SETTINGS WHICH NEED TO BE DONE ONLY ONCE, PUT THEM BELOW rem if not %ASSEMBLE%1 == 1 goto begin rem path=%path%;c:\gameboy\assembler\ rem doskey UNNECESSARY ON DESKTOP --- DOSKEY ALREADY INSTALLED rem set dir=c:\gameboy\curren~1\ :begin set assemble=1 echo assembling... rgbasm -o%1.obj %1.agb if errorlevel 1 goto end echo linking... rgblink -o%1.gb %1.obj if errorlevel 1 goto end echo fixing... rgbfix -p0 -v %1.gb :end rem del *.obj
{'content_hash': '26ccd25b196b23f7a77770de4f0565d7', 'timestamp': '', 'source': 'github', 'line_count': 23, 'max_line_length': 73, 'avg_line_length': 23.82608695652174, 'alnum_prop': 0.7372262773722628, 'repo_name': 'Maikel-Ortega/zurrapagb', 'id': '5c547be742f6280bdb7c21a3f407408f757ed00c', 'size': '548', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'ASM/assemble.bat', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Assembly', 'bytes': '296096'}, {'name': 'Batchfile', 'bytes': '3502'}, {'name': 'C', 'bytes': '311462'}, {'name': 'C++', 'bytes': '34305'}, {'name': 'CSS', 'bytes': '15590'}, {'name': 'Groff', 'bytes': '46408'}, {'name': 'HTML', 'bytes': '951818'}, {'name': 'JavaScript', 'bytes': '3937'}, {'name': 'Makefile', 'bytes': '14321'}, {'name': 'TeX', 'bytes': '83586'}]}
package org.androidtransfuse.adapter; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import org.apache.commons.lang.builder.EqualsBuilder; import org.apache.commons.lang.builder.HashCodeBuilder; import java.lang.annotation.Annotation; /** * Replaces the given AST Type with a proxy type. This is used during AOP and Virtual proxy of the given * ASTType. Simply replaces the name of the class with the proxy name. * * @author John Ericksen */ public class ASTProxyType implements ASTType { private final ASTType proxyASTType; private final String name; public ASTProxyType(ASTType proxyASTType, String name) { this.proxyASTType = proxyASTType; this.name = name; } @Override public boolean isConcreteClass() { return proxyASTType.isConcreteClass(); } public boolean isInterface() { return proxyASTType.isInterface(); } @Override public boolean isFinal() { return proxyASTType.isFinal(); } @Override public boolean isEnum() { return proxyASTType.isEnum(); } @Override public boolean isStatic() { return proxyASTType.isStatic(); } @Override public boolean isAbstract() { return proxyASTType.isAbstract(); } @Override public boolean isInnerClass() { return proxyASTType.isInnerClass(); } @Override public String getName() { return name; } @Override public ASTAccessModifier getAccessModifier() { return proxyASTType.getAccessModifier(); } @Override public ImmutableSet<ASTMethod> getMethods() { return proxyASTType.getMethods(); } @Override public ImmutableSet<ASTField> getFields() { return proxyASTType.getFields(); } @Override public boolean isAnnotated(Class<? extends Annotation> annotation) { return proxyASTType.isAnnotated(annotation); } @Override public ImmutableSet<ASTAnnotation> getAnnotations() { return proxyASTType.getAnnotations(); } @Override public <A extends Annotation> A getAnnotation(Class<A> annotation) { return proxyASTType.getAnnotation(annotation); } @Override public boolean isAnnotated(ASTType annotation) { return proxyASTType.isAnnotated(annotation); } @Override public ImmutableSet<ASTConstructor> getConstructors() { return proxyASTType.getConstructors(); } @Override public ASTType getSuperClass() { return proxyASTType.getSuperClass(); } @Override public ImmutableSet<ASTType> getInterfaces() { return proxyASTType.getInterfaces(); } @Override public boolean equals(Object obj) { if (!(obj instanceof ASTProxyType)) { return false; } if (this == obj) { return true; } ASTProxyType rhs = (ASTProxyType) obj; return new EqualsBuilder() .append(name, rhs.name) .append(proxyASTType, rhs.proxyASTType) .isEquals(); } @Override public int hashCode() { return new HashCodeBuilder().append(name).append(proxyASTType).hashCode(); } @Override public ImmutableList<ASTType> getGenericArgumentTypes() { return proxyASTType.getGenericArgumentTypes(); } @Override public ImmutableList<ASTGenericArgument> getGenericArguments() { return proxyASTType.getGenericArguments(); } @Override public boolean inherits(ASTType type) { return proxyASTType.inherits(type); } @Override public ASTAnnotation getASTAnnotation(Class<? extends Annotation> annotation) { return proxyASTType.getASTAnnotation(annotation); } @Override public PackageClass getPackageClass() { return proxyASTType.getPackageClass(); } @Override public String toString() { return getName(); } }
{'content_hash': '9d15584b7ecd6b2fe26d03168587b367', 'timestamp': '', 'source': 'github', 'line_count': 166, 'max_line_length': 105, 'avg_line_length': 24.210843373493976, 'alnum_prop': 0.6571286389649167, 'repo_name': 'johncarl81/transfuse', 'id': '026a2b20ea41bc9e3afe44e131388d2b530f3ee8', 'size': '4620', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'transfuse-support/src/main/java/org/androidtransfuse/adapter/ASTProxyType.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '1954436'}]}
<?php namespace Composer; use Composer\Autoload\ClassLoader; use Composer\Semver\VersionParser; /** * This class is copied in every Composer installed project and available to all * * To require it's presence, you can require `composer-runtime-api ^2.0` */ class InstalledVersions { private static $installed; private static $canGetVendors; private static $installedByVendor = array(); /** * Returns a list of all package names which are present, either by being installed, replaced or provided * * @return string[] * @psalm-return list<string> */ public static function getInstalledPackages() { $packages = array(); foreach (self::getInstalled() as $installed) { $packages[] = array_keys($installed['versions']); } if (1 === \count($packages)) { return $packages[0]; } return array_keys(array_flip(\call_user_func_array('array_merge', $packages))); } /** * Checks whether the given package is installed * * This also returns true if the package name is provided or replaced by another package * * @param string $packageName * @param bool $includeDevRequirements * @return bool */ public static function isInstalled($packageName, $includeDevRequirements = true) { foreach (self::getInstalled() as $installed) { if (isset($installed['versions'][$packageName])) { return $includeDevRequirements || empty($installed['versions'][$packageName]['dev-requirement']); } } return false; } /** * Checks whether the given package satisfies a version constraint * * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call: * * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3') * * @param VersionParser $parser Install composer/semver to have access to this class and functionality * @param string $packageName * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package * @return bool */ public static function satisfies(VersionParser $parser, $packageName, $constraint) { $constraint = $parser->parseConstraints($constraint); $provided = $parser->parseConstraints(self::getVersionRanges($packageName)); return $provided->matches($constraint); } /** * Returns a version constraint representing all the range(s) which are installed for a given package * * It is easier to use this via isInstalled() with the $constraint argument if you need to check * whether a given version of a package is installed, and not just whether it exists * * @param string $packageName * @return string Version constraint usable with composer/semver */ public static function getVersionRanges($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } $ranges = array(); if (isset($installed['versions'][$packageName]['pretty_version'])) { $ranges[] = $installed['versions'][$packageName]['pretty_version']; } if (array_key_exists('aliases', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']); } if (array_key_exists('replaced', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']); } if (array_key_exists('provided', $installed['versions'][$packageName])) { $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']); } return implode(' || ', $ranges); } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['version'])) { return null; } return $installed['versions'][$packageName]['version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present */ public static function getPrettyVersion($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['pretty_version'])) { return null; } return $installed['versions'][$packageName]['pretty_version']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @param string $packageName * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference */ public static function getReference($packageName) { foreach (self::getInstalled() as $installed) { if (!isset($installed['versions'][$packageName])) { continue; } if (!isset($installed['versions'][$packageName]['reference'])) { return null; } return $installed['versions'][$packageName]['reference']; } throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed'); } /** * @return array * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]} */ public static function getRootPackage() { $installed = self::getInstalled(); return $installed[0]['root']; } /** * Returns the raw installed.php data for custom implementations * * @return array[] * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} */ public static function getRawData() { return self::$installed; } /** * Lets you reload the static array from another file * * This is only useful for complex integrations in which a project needs to use * this class but then also needs to execute another project's autoloader in process, * and wants to ensure both projects have access to their version of installed.php. * * A typical case would be PHPUnit, where it would need to make sure it reads all * the data it needs from this class, then call reload() with * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure * the project in which it runs can then also use this class safely, without * interference between PHPUnit's dependencies and the project's dependencies. * * @param array[] $data A vendor/composer/installed.php data set * @return void * * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[]}, versions: list<string, array{pretty_version: ?string, version: ?string, aliases: ?string[], reference: ?string, replaced: ?string[], provided: ?string[]}>} $data */ public static function reload($data) { self::$installed = $data; self::$installedByVendor = array(); } /** * @return array[] */ private static function getInstalled() { if (null === self::$canGetVendors) { self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders'); } $installed = array(); if (self::$canGetVendors) { foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) { if (isset(self::$installedByVendor[$vendorDir])) { $installed[] = self::$installedByVendor[$vendorDir]; } elseif (is_file($vendorDir.'/composer/installed.php')) { $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php'; } } } $installed[] = self::$installed; return $installed; } }
{'content_hash': '6933203c796fa1aa97853a3b0e11f051', 'timestamp': '', 'source': 'github', 'line_count': 251, 'max_line_length': 293, 'avg_line_length': 37.53386454183267, 'alnum_prop': 0.611612355376287, 'repo_name': 'localheinz/composer', 'id': 'eb8ea37638aa48549ffa69b1a3734e2108bd0f28', 'size': '9681', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/Composer/InstalledVersions.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Hack', 'bytes': '154'}, {'name': 'PHP', 'bytes': '6147148'}]}
package org.apache.hadoop.hbase.client; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyBoolean; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.when; import java.io.IOException; import java.util.Iterator; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.HBaseClassTestRule; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.RegionLocations; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.client.ScannerCallable.MoreResults; import org.apache.hadoop.hbase.ipc.RpcControllerFactory; import org.apache.hadoop.hbase.testclassification.SmallTests; import org.apache.hadoop.hbase.util.Bytes; import org.junit.After; import org.junit.Before; import org.junit.ClassRule; import org.junit.Rule; import org.junit.Test; import org.junit.experimental.categories.Category; import org.junit.rules.TestName; import org.mockito.InOrder; import org.mockito.Mockito; import org.mockito.invocation.InvocationOnMock; import org.mockito.stubbing.Answer; /** * Test the ClientScanner. */ @Category(SmallTests.class) public class TestClientScanner { @ClassRule public static final HBaseClassTestRule CLASS_RULE = HBaseClassTestRule.forClass(TestClientScanner.class); Scan scan; ExecutorService pool; Configuration conf; ClusterConnection clusterConn; RpcRetryingCallerFactory rpcFactory; RpcControllerFactory controllerFactory; @Rule public TestName name = new TestName(); @Before public void setup() throws IOException { clusterConn = Mockito.mock(ClusterConnection.class); rpcFactory = Mockito.mock(RpcRetryingCallerFactory.class); controllerFactory = Mockito.mock(RpcControllerFactory.class); pool = Executors.newSingleThreadExecutor(); scan = new Scan(); conf = new Configuration(); Mockito.when(clusterConn.getConfiguration()).thenReturn(conf); } @After public void teardown() { if (null != pool) { pool.shutdownNow(); } } private static class MockClientScanner extends ClientSimpleScanner { private boolean rpcFinished = false; private boolean rpcFinishedFired = false; private boolean initialized = false; public MockClientScanner(final Configuration conf, final Scan scan, final TableName tableName, ClusterConnection connection, RpcRetryingCallerFactory rpcFactory, RpcControllerFactory controllerFactory, ExecutorService pool, int primaryOperationTimeout) throws IOException { super(conf, scan, tableName, connection, rpcFactory, controllerFactory, pool, HConstants.DEFAULT_HBASE_RPC_TIMEOUT, HConstants.DEFAULT_HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD, primaryOperationTimeout); } @Override protected boolean moveToNextRegion() { if (!initialized) { initialized = true; return super.moveToNextRegion(); } if (!rpcFinished) { return super.moveToNextRegion(); } // Enforce that we don't short-circuit more than once if (rpcFinishedFired) { throw new RuntimeException( "Expected nextScanner to only be called once after " + " short-circuit was triggered."); } rpcFinishedFired = true; return false; } public void setRpcFinished(boolean rpcFinished) { this.rpcFinished = rpcFinished; } } @Test @SuppressWarnings("unchecked") public void testNoResultsHint() throws IOException { final Result[] results = new Result[1]; KeyValue kv1 = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); results[0] = Result.create(new Cell[] { kv1 }); RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); Mockito.when(caller.callWithoutRetries(Mockito.any(), Mockito.anyInt())) .thenAnswer(new Answer<Result[]>() { private int count = 0; @Override public Result[] answer(InvocationOnMock invocation) throws Throwable { ScannerCallableWithReplicas callable = invocation.getArgument(0); switch (count) { case 0: // initialize count++; callable.currentScannerCallable.setMoreResultsInRegion(MoreResults.UNKNOWN); return results; case 1: // detect no more results case 2: // close count++; return new Result[0]; default: throw new RuntimeException("Expected only 2 invocations"); } } }); // Set a much larger cache and buffer size than we'll provide scan.setCaching(100); scan.setMaxResultSize(1000 * 1000); try (MockClientScanner scanner = new MockClientScanner(conf, scan, TableName.valueOf(name.getMethodName()), clusterConn, rpcFactory, controllerFactory, pool, Integer.MAX_VALUE)) { scanner.setRpcFinished(true); InOrder inOrder = Mockito.inOrder(caller); scanner.loadCache(); // One for fetching the results // One for fetching empty results and quit as we do not have moreResults hint. inOrder.verify(caller, Mockito.times(2)).callWithoutRetries(Mockito.any(), Mockito.anyInt()); assertEquals(1, scanner.cache.size()); Result r = scanner.cache.poll(); assertNotNull(r); CellScanner cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv1, cs.current()); assertFalse(cs.advance()); } } @Test @SuppressWarnings("unchecked") public void testSizeLimit() throws IOException { final Result[] results = new Result[1]; KeyValue kv1 = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); results[0] = Result.create(new Cell[] { kv1 }); RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); Mockito.when(caller.callWithoutRetries(Mockito.any(), Mockito.anyInt())) .thenAnswer(new Answer<Result[]>() { private int count = 0; @Override public Result[] answer(InvocationOnMock invocation) throws Throwable { ScannerCallableWithReplicas callable = invocation.getArgument(0); switch (count) { case 0: // initialize count++; // if we set no here the implementation will trigger a close callable.currentScannerCallable.setMoreResultsInRegion(MoreResults.YES); return results; case 1: // close count++; return null; default: throw new RuntimeException("Expected only 2 invocations"); } } }); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); // Set a much larger cache scan.setCaching(100); // The single key-value will exit the loop scan.setMaxResultSize(1); try (MockClientScanner scanner = new MockClientScanner(conf, scan, TableName.valueOf(name.getMethodName()), clusterConn, rpcFactory, controllerFactory, pool, Integer.MAX_VALUE)) { InOrder inOrder = Mockito.inOrder(caller); scanner.loadCache(); inOrder.verify(caller, Mockito.times(1)).callWithoutRetries(Mockito.any(), Mockito.anyInt()); assertEquals(1, scanner.cache.size()); Result r = scanner.cache.poll(); assertNotNull(r); CellScanner cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv1, cs.current()); assertFalse(cs.advance()); } } @Test @SuppressWarnings("unchecked") public void testCacheLimit() throws IOException { KeyValue kv1 = new KeyValue(Bytes.toBytes("row1"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); KeyValue kv2 = new KeyValue(Bytes.toBytes("row2"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); KeyValue kv3 = new KeyValue(Bytes.toBytes("row3"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); final Result[] results = new Result[] { Result.create(new Cell[] { kv1 }), Result.create(new Cell[] { kv2 }), Result.create(new Cell[] { kv3 }) }; RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); Mockito.when(caller.callWithoutRetries(Mockito.any(), Mockito.anyInt())) .thenAnswer(new Answer<Result[]>() { private int count = 0; @Override public Result[] answer(InvocationOnMock invocation) throws Throwable { ScannerCallableWithReplicas callable = invocation.getArgument(0); switch (count) { case 0: // initialize count++; // if we set no here the implementation will trigger a close callable.currentScannerCallable.setMoreResultsInRegion(MoreResults.YES); return results; case 1: // close count++; return null; default: throw new RuntimeException("Expected only 2 invocations"); } } }); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); // Set a small cache scan.setCaching(1); // Set a very large size scan.setMaxResultSize(1000 * 1000); try (MockClientScanner scanner = new MockClientScanner(conf, scan, TableName.valueOf(name.getMethodName()), clusterConn, rpcFactory, controllerFactory, pool, Integer.MAX_VALUE)) { InOrder inOrder = Mockito.inOrder(caller); scanner.loadCache(); inOrder.verify(caller, Mockito.times(1)).callWithoutRetries(Mockito.any(), Mockito.anyInt()); assertEquals(3, scanner.cache.size()); Result r = scanner.cache.poll(); assertNotNull(r); CellScanner cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv1, cs.current()); assertFalse(cs.advance()); r = scanner.cache.poll(); assertNotNull(r); cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv2, cs.current()); assertFalse(cs.advance()); r = scanner.cache.poll(); assertNotNull(r); cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv3, cs.current()); assertFalse(cs.advance()); } } @Test @SuppressWarnings("unchecked") public void testNoMoreResults() throws IOException { final Result[] results = new Result[1]; KeyValue kv1 = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); results[0] = Result.create(new Cell[] { kv1 }); RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); Mockito.when(caller.callWithoutRetries(Mockito.any(), Mockito.anyInt())) .thenAnswer(new Answer<Result[]>() { private int count = 0; @Override public Result[] answer(InvocationOnMock invocation) throws Throwable { ScannerCallableWithReplicas callable = invocation.getArgument(0); switch (count) { case 0: // initialize count++; callable.currentScannerCallable.setMoreResultsInRegion(MoreResults.NO); return results; case 1: // close count++; return null; default: throw new RuntimeException("Expected only 2 invocations"); } } }); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); // Set a much larger cache and buffer size than we'll provide scan.setCaching(100); scan.setMaxResultSize(1000 * 1000); try (MockClientScanner scanner = new MockClientScanner(conf, scan, TableName.valueOf(name.getMethodName()), clusterConn, rpcFactory, controllerFactory, pool, Integer.MAX_VALUE)) { scanner.setRpcFinished(true); InOrder inOrder = Mockito.inOrder(caller); scanner.loadCache(); inOrder.verify(caller, Mockito.times(1)).callWithoutRetries(Mockito.any(), Mockito.anyInt()); assertEquals(1, scanner.cache.size()); Result r = scanner.cache.poll(); assertNotNull(r); CellScanner cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv1, cs.current()); assertFalse(cs.advance()); } } @Test @SuppressWarnings("unchecked") public void testMoreResults() throws IOException { final Result[] results1 = new Result[1]; KeyValue kv1 = new KeyValue(Bytes.toBytes("row"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); results1[0] = Result.create(new Cell[] { kv1 }); final Result[] results2 = new Result[1]; KeyValue kv2 = new KeyValue(Bytes.toBytes("row2"), Bytes.toBytes("cf"), Bytes.toBytes("cq"), 1, KeyValue.Type.Maximum); results2[0] = Result.create(new Cell[] { kv2 }); RpcRetryingCaller<Result[]> caller = Mockito.mock(RpcRetryingCaller.class); Mockito.when(rpcFactory.<Result[]> newCaller()).thenReturn(caller); Mockito.when(caller.callWithoutRetries(Mockito.any(), Mockito.anyInt())) .thenAnswer(new Answer<Result[]>() { private int count = 0; @Override public Result[] answer(InvocationOnMock invocation) throws Throwable { ScannerCallableWithReplicas callable = invocation.getArgument(0); switch (count) { case 0: // initialize count++; callable.currentScannerCallable.setMoreResultsInRegion(MoreResults.YES); return results1; case 1: count++; // The server reports back false WRT more results callable.currentScannerCallable.setMoreResultsInRegion(MoreResults.NO); return results2; case 2: // close count++; return null; default: throw new RuntimeException("Expected only 3 invocations"); } } }); // Set a much larger cache and buffer size than we'll provide scan.setCaching(100); scan.setMaxResultSize(1000 * 1000); try (MockClientScanner scanner = new MockClientScanner(conf, scan, TableName.valueOf(name.getMethodName()), clusterConn, rpcFactory, controllerFactory, pool, Integer.MAX_VALUE)) { InOrder inOrder = Mockito.inOrder(caller); scanner.setRpcFinished(true); scanner.loadCache(); inOrder.verify(caller, Mockito.times(2)).callWithoutRetries(Mockito.any(), Mockito.anyInt()); assertEquals(2, scanner.cache.size()); Result r = scanner.cache.poll(); assertNotNull(r); CellScanner cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv1, cs.current()); assertFalse(cs.advance()); r = scanner.cache.poll(); assertNotNull(r); cs = r.cellScanner(); assertTrue(cs.advance()); assertEquals(kv2, cs.current()); assertFalse(cs.advance()); } } /** * Tests the case where all replicas of a region throw an exception. It should not cause a hang * but the exception should propagate to the client */ @Test public void testExceptionsFromReplicasArePropagated() throws IOException { scan.setConsistency(Consistency.TIMELINE); // Mock a caller which calls the callable for ScannerCallableWithReplicas, // but throws an exception for the actual scanner calls via callWithRetries. rpcFactory = new MockRpcRetryingCallerFactory(conf); conf.set(RpcRetryingCallerFactory.CUSTOM_CALLER_CONF_KEY, MockRpcRetryingCallerFactory.class.getName()); // mock 3 replica locations when(clusterConn.locateRegion((TableName) any(), (byte[]) any(), anyBoolean(), anyBoolean(), anyInt())).thenReturn(new RegionLocations(null, null, null)); try (MockClientScanner scanner = new MockClientScanner(conf, scan, TableName.valueOf(name.getMethodName()), clusterConn, rpcFactory, new RpcControllerFactory(conf), pool, Integer.MAX_VALUE)) { Iterator<Result> iter = scanner.iterator(); while (iter.hasNext()) { iter.next(); } fail("Should have failed with RetriesExhaustedException"); } catch (RuntimeException expected) { assertThat(expected.getCause(), instanceOf(RetriesExhaustedException.class)); } } public static class MockRpcRetryingCallerFactory extends RpcRetryingCallerFactory { public MockRpcRetryingCallerFactory(Configuration conf) { super(conf); } @Override public <T> RpcRetryingCaller<T> newCaller(int rpcTimeout) { return new RpcRetryingCaller<T>() { @Override public void cancel() { } @Override public T callWithRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException { throw new IOException("Scanner exception"); } @Override public T callWithoutRetries(RetryingCallable<T> callable, int callTimeout) throws IOException, RuntimeException { try { return callable.call(callTimeout); } catch (IOException e) { throw e; } catch (Exception e) { throw new RuntimeException(e); } } }; } } }
{'content_hash': 'a1e93011d4384932c15437493726b172', 'timestamp': '', 'source': 'github', 'line_count': 514, 'max_line_length': 99, 'avg_line_length': 35.2704280155642, 'alnum_prop': 0.6656186220971924, 'repo_name': 'HubSpot/hbase', 'id': 'ffc9caa27d7e947f96d7544a0c8b72a5024931a2', 'size': '18934', 'binary': False, 'copies': '1', 'ref': 'refs/heads/hubspot-2.5', 'path': 'hbase-client/src/test/java/org/apache/hadoop/hbase/client/TestClientScanner.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '26366'}, {'name': 'C', 'bytes': '4041'}, {'name': 'C++', 'bytes': '19726'}, {'name': 'CMake', 'bytes': '1437'}, {'name': 'CSS', 'bytes': '8033'}, {'name': 'Dockerfile', 'bytes': '13729'}, {'name': 'HTML', 'bytes': '18151'}, {'name': 'Java', 'bytes': '40683660'}, {'name': 'JavaScript', 'bytes': '9455'}, {'name': 'Makefile', 'bytes': '1359'}, {'name': 'PHP', 'bytes': '8385'}, {'name': 'Perl', 'bytes': '383739'}, {'name': 'Python', 'bytes': '102210'}, {'name': 'Roff', 'bytes': '2896'}, {'name': 'Ruby', 'bytes': '766684'}, {'name': 'Shell', 'bytes': '312013'}, {'name': 'Thrift', 'bytes': '55594'}, {'name': 'XSLT', 'bytes': '3924'}]}
<?php session_start(); require_once 'functions/jabali.php'; $hDB = new _hDatabase; $hUser = new _hUsers; $hResource = new _hResources; $hService = new _hServices; $hMessage = new _hMessages; $hNote = new _hNotes; $hForm = new _hForms; $hDB -> connect(); echo '<html> <head>'; getStyle(hSTYLES."materialize.min.css"); getStyle(hSTYLES."login_style.css"); getScript(hSCRIPTS."jquery.js"); getScript(hSCRIPTS."materialize.min.js"); echo ' </head> <body>'; echo ' <div id="wrapper">'; if(isset($_GET['login'])) { $hForm -> loginForm(); } elseif(isset($_GET['confirm'])) { $hForm -> loginForm(); } elseif(isset($_GET['forgot'])) { $hForm -> loginForm(); } elseif(isset($_GET['reset'])) { $hForm -> loginForm(); } elseif(isset($_GET['logout'])) { $hForm -> loginForm(); } else { $hForm -> startForm(); } if(isset($_POST['login'])) { $hUser -> loginUser(); } $hDB -> close(); echo ' </div> </body> </html>';
{'content_hash': '6afff14cbcf377defea042e7ab2bf2fd', 'timestamp': '', 'source': 'github', 'line_count': 50, 'max_line_length': 41, 'avg_line_length': 18.46, 'alnum_prop': 0.6143011917659805, 'repo_name': 'mtaandao/ifmap', 'id': '748959d7f7f650b1b590c577234e9c64e5441df5', 'size': '923', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'index.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '1230'}, {'name': 'CSS', 'bytes': '637080'}, {'name': 'HTML', 'bytes': '111171'}, {'name': 'JavaScript', 'bytes': '344629'}, {'name': 'PHP', 'bytes': '28316'}]}
ACCEPTED #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': 'a7bed8e56240ec3e990d4cd6e117c066', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.307692307692308, 'alnum_prop': 0.6940298507462687, 'repo_name': 'mdoering/backbone', 'id': 'fc347708d91bf30edce35415d0c35264f9a2a2fd', 'size': '189', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Brassicales/Brassicaceae/Lachnocapsa/Lachnocapsa spathulata/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
/* * File: MasterManAPI.cpp * Author: Sergio Gallardo Sales ([email protected]) @maktub82 * * Created on November 9, 2013, 7:22 PM */ #include "MasterManAPI.h" #include "Player.h" #include "MasterMan.h" #include "DataGen.h" MasterManAPI* MasterManAPI::m_pInstance = NULL; MasterManAPI::MasterManAPI() { win = finish = false; lastID = 0; } MasterManAPI::MasterManAPI(const MasterManAPI& api) { Copy(api); } MasterManAPI::~MasterManAPI() { Destructor(); } MasterManAPI& MasterManAPI::operator =(const MasterManAPI &api) { Copy(api); return *this; } void MasterManAPI::Destructor() { //delete m_pInstance; m_pInstance = NULL; win = finish = false; for (unsigned int i = 0; i < entities.size(); i++) { if (entities[i] != NULL) { delete entities[i]; entities[i] = NULL; } } for (unsigned int i = 0; i < world->size(); i++) { world[i].clear(); } world->clear(); if (world != NULL) { delete world; } } void MasterManAPI::dispose() { delete m_pInstance; m_pInstance = NULL; } void MasterManAPI::Copy(const MasterManAPI &api) { m_pInstance = api.m_pInstance; world = api.world; finish = api.finish; win = api.win; lastID = api.lastID; } MasterManAPI* MasterManAPI::getInstance() { if (m_pInstance == NULL) { m_pInstance = new MasterManAPI(); } return m_pInstance; } vector<Entity *> MasterManAPI::getEntity(int x, int y) { vector<Entity *> entity; if (x >= 0 && x < width && y >= 0 && y <= height) { vector< vector < vector<Entity *> > > & ref = (*world); entity = ref[x][y]; } return entity; } bool MasterManAPI::isSolid(int x, int y) { vector<Entity *> entities = getEntity(x, y); bool solid = false; for (unsigned int i = 0; i < entities.size() && !solid; i++) { if (entities[i] != NULL && entities[i]->getSolid()) { solid = true; } } return solid; } bool MasterManAPI::isSolid(int x, int y, Direction dir) { return isSolid(getNextX(x, dir), getNextY(y, dir)); } bool MasterManAPI::isPlayer(int x, int y) { vector<Entity *> entities = getEntity(x, y); bool is_player = false; for (unsigned int i = 0; i < entities.size() && !is_player; i++) { if (entities[i] != NULL && entities[i]->getType() == EntityPlayer) { is_player = true; } } return is_player; } bool MasterManAPI::isPlayer(int x, int y, Direction dir) { return isPlayer(getNextX(x, dir), getNextY(y, dir)); } bool MasterManAPI::isType(int x, int y, EntityType type) { vector<Entity *> entities = getEntity(x, y); bool is_type = false; for (unsigned int i = 0; i < entities.size() && !is_type; i++) { if (entities[i] != NULL && entities[i]->getType() == type) { is_type = true; } } return is_type; } bool MasterManAPI::isType(int x, int y, Direction direction, EntityType type) { return isType(getNextX(x,direction), getNextY(y, direction), type); } void MasterManAPI::killPlayer() { player->setAlive(false); player->setUpdated(false); } void MasterManAPI::setEntity(int x, int y, Entity *entity) { if (x >= 0 && x < width && y >= 0 && y <= height) { vector< vector < vector<Entity *> > >& ref = (*world); if (entity != NULL) { bool find = false; vector<Entity*>::iterator it; for (it = ref[entity->getX()][entity->getY()].begin(); it != ref[entity->getX()][entity->getY()].end(); ++it ) { if((*it) == entity) { find = true; break; } } if(find) { ref[entity->getX()][entity->getY()].erase(it); } else { entities.push_back(entity); } if(ref[x][y].size() == 1 && ref[x][y][0] == NULL) { ref[x][y].pop_back(); } ref[x][y].push_back(entity); entity->setX(x); entity->setY(y); entity->setAlive(true); entity->setUpdated(false); } } } vector<Entity *> MasterManAPI::getEntity(int x, int y, Direction direction) { return getEntity(getNextX(x, direction), getNextY(y, direction)); } void MasterManAPI::setEntity(int x, int y, Direction direction, Entity *entity) { setEntity(getNextX(x, direction), getNextY(y, direction), entity); } int MasterManAPI::getNextX(int x, Direction direction) { int newX = x; switch (direction) { case Map::Left: newX = x - 1; break; case Map::Right: newX = x + 1; break; case Map::UpRight: newX = x + 1; break; case Map::UpLeft: newX = x - 1; break; case Map::DownRight: newX = x + 1; break; case Map::DownLeft: newX = x - 1; break; default: break; } return newX; } int MasterManAPI::getNextY(int y, Direction direction) { int newY = y; switch (direction) { case Map::Up: newY = y - 1; break; case Map::Down: newY = y + 1; break; case Map::UpRight: newY = y - 1; break; case Map::UpLeft: newY = y - 1; break; case Map::DownRight: newY = y + 1; break; case Map::DownLeft: newY = y + 1; break; default: break; } return newY; } int MasterManAPI::getScore() { int score = 0; if (player != NULL) { score = player->getPoints(); } return score; }; Entity * MasterManAPI::getDataGen(int x, int y, Direction direction) { vector<Entity *> entities = getEntity(getNextX(x, direction), getNextY(y, direction)); Entity *gen = NULL; for (unsigned int i = 0; i < entities.size() && gen == NULL; i++) { if (entities[i] != NULL && entities[i]->getType() == EntityDataGen) { gen = entities[i]; } } return gen; } void MasterManAPI::deleteEntity(int x,int y, Direction dir, EntityType entity) { deleteEntity(getNextX(x,dir), getNextY(y,dir), entity); } /*Entity * MasterManAPI::getDataGen(int x, int y, Direction direction) { vector<Entity *> entities = getEntity(getNextX(x, direction), getNextY(y, direction)); Entity *gen = NULL; for (unsigned int i = 0; i < entities.size() && gen == NULL; i++) { if (entities[i] != NULL && entities[i]->getType() == EntityDataGen) { gen = entities[i]; } } return gen; }*/ Entity * MasterManAPI::getEntityByPriority(int x, int y, Direction direction) { vector<Entity *> entities = getEntity(x,y, direction); Entity *entity = NULL; if(entities.size() > 0) { entity = entities[0]; } for (unsigned int i = 0; i < entities.size(); i++) { if (entities[i] != NULL && entities[i]->getType() == EntityEnemy) { entity = entities[i]; break; } else if (entities[i] != NULL && entities[i]->getType() == EntityDot) { entity = entities[i]; } } return entity; } void MasterManAPI::deleteEntity(int x,int y, EntityType entity) { vector< vector < vector<Entity *> > >& ref = (*world); std::vector<Entity*>::iterator it; for (it = ref[x][y].begin() ; it != ref[x][y].end(); ++it) { if((*it)->getType() == entity) { (*it)->setAlive(false); (*it)->setUpdated(false); break; } } ref[x][y].erase(it); //entities->erase(it); } void MasterManAPI::removeEntity(Entity* entity) { std::vector<Entity*>::iterator it; for (it = entities.begin() ; it != entities.end(); ++it) { if((*it)== entity) { break; } } entities.erase(it); } Entity* MasterManAPI::getEntityByType(int x, int y, Direction direction, EntityType type) { vector<Entity *> entities = getEntity(x,y, direction); Entity *entity = NULL; for (unsigned int i = 0; i < entities.size(); i++) { if (entities[i] != NULL && entities[i]->getType() == type) { entity = entities[i]; break; } } return entity; }
{'content_hash': '301dbbdc08f6d3df1f5183aee821277d', 'timestamp': '', 'source': 'github', 'line_count': 455, 'max_line_length': 122, 'avg_line_length': 19.173626373626373, 'alnum_prop': 0.5176524530032095, 'repo_name': 'wen96/pl-man2', 'id': '4e30e10d272987c9716bb568ab4ac8924367d892', 'size': '8724', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'masterserver/lib/MasterManAPI.cpp', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '244'}, {'name': 'C++', 'bytes': '265614'}, {'name': 'Java', 'bytes': '512'}, {'name': 'JavaScript', 'bytes': '3804'}, {'name': 'Prolog', 'bytes': '2354'}, {'name': 'Python', 'bytes': '5173'}, {'name': 'Shell', 'bytes': '247'}]}
<?php ?> <script type="text/javascript"> $(document).ready(function() { window.setTimeout("$(\"#error_msg\").fadeOut(\"slow\")", 3000); }); </script> <a name="up" id="up"></a> <?php echo $widgets->display('topmenu', '_topmenu'); ?> <div id="sitename"> <a href="index.php"> <?php echo PHPFrame::Config()->get("SITENAME"); ?> </a> </div> <?php echo $this->renderPathway($pathway); ?> <div style="clear:both;"></div> <!-- Content --> <div id="wrapper_outer"> <?php echo $widgets->display('topright', '_topright'); ?> <?php echo $widgets->display('mainmenu', '_mainmenu'); ?> <div id="wrapper"> <?php $column_count = 1; ?> <?php $widgets_right = $widgets->display('right'); ?> <?php if (!empty($widgets_right)) : ?> <div id="right_col"> <?php echo $widgets_right; ?> </div><!-- close #right_col --> <?php $column_count++; ?> <?php endif; ?> <div id="main_col_<?php echo $column_count; ?>"> <?php echo $widgets->display('sysevents', '_sysevents'); ?> <div id="main_col_inner"> <?php echo $component_output; ?> </div><!-- close #main_col_inner --> </div><!-- close #main_col --> </div><!-- close #wrapper --> </div><!-- close #wrapper_outer --> <!-- End Content --> <div id="footer"> Powered by Extranet Office and PHPFrame <?php echo PHPFrame::Version(); ?><br /> &copy; 2009 E-noise.com Limited </div>
{'content_hash': '9f21f7354b5cf73b718fd14bd3bbaf70', 'timestamp': '', 'source': 'github', 'line_count': 57, 'max_line_length': 80, 'avg_line_length': 26.63157894736842, 'alnum_prop': 0.5191040843214756, 'repo_name': 'Tucev/extranetoffice', 'id': '0e3ba0f085173ed4ff1c24d05c1fb141f5ca0d5f', 'size': '1796', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'public/themes/xoffice/index.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '59507'}, {'name': 'HTML', 'bytes': '308'}, {'name': 'JavaScript', 'bytes': '57969'}, {'name': 'Makefile', 'bytes': '3524'}, {'name': 'PHP', 'bytes': '1369242'}, {'name': 'Shell', 'bytes': '618'}]}
/* Code generated by IfcQuery EXPRESS generator, www.ifcquery.com */ #include <sstream> #include <limits> #include "ifcpp/model/AttributeObject.h" #include "ifcpp/model/BuildingException.h" #include "ifcpp/model/BuildingGuid.h" #include "ifcpp/reader/ReaderUtil.h" #include "ifcpp/writer/WriterUtil.h" #include "ifcpp/IFC4/include/IfcGloballyUniqueId.h" #include "ifcpp/IFC4/include/IfcLabel.h" #include "ifcpp/IFC4/include/IfcOwnerHistory.h" #include "ifcpp/IFC4/include/IfcPreDefinedPropertySet.h" #include "ifcpp/IFC4/include/IfcRelAssociates.h" #include "ifcpp/IFC4/include/IfcRelDeclares.h" #include "ifcpp/IFC4/include/IfcRelDefinesByProperties.h" #include "ifcpp/IFC4/include/IfcRelDefinesByTemplate.h" #include "ifcpp/IFC4/include/IfcText.h" #include "ifcpp/IFC4/include/IfcTypeObject.h" // ENTITY IfcPreDefinedPropertySet IfcPreDefinedPropertySet::IfcPreDefinedPropertySet( int id ) { m_entity_id = id; } shared_ptr<BuildingObject> IfcPreDefinedPropertySet::getDeepCopy( BuildingCopyOptions& options ) { shared_ptr<IfcPreDefinedPropertySet> copy_self( new IfcPreDefinedPropertySet() ); if( m_GlobalId ) { if( options.create_new_IfcGloballyUniqueId ) { copy_self->m_GlobalId = make_shared<IfcGloballyUniqueId>( createBase64Uuid_wstr().data() ); } else { copy_self->m_GlobalId = dynamic_pointer_cast<IfcGloballyUniqueId>( m_GlobalId->getDeepCopy(options) ); } } if( m_OwnerHistory ) { if( options.shallow_copy_IfcOwnerHistory ) { copy_self->m_OwnerHistory = m_OwnerHistory; } else { copy_self->m_OwnerHistory = dynamic_pointer_cast<IfcOwnerHistory>( m_OwnerHistory->getDeepCopy(options) ); } } if( m_Name ) { copy_self->m_Name = dynamic_pointer_cast<IfcLabel>( m_Name->getDeepCopy(options) ); } if( m_Description ) { copy_self->m_Description = dynamic_pointer_cast<IfcText>( m_Description->getDeepCopy(options) ); } return copy_self; } void IfcPreDefinedPropertySet::getStepLine( std::stringstream& stream ) const { stream << "#" << m_entity_id << "= IFCPREDEFINEDPROPERTYSET" << "("; if( m_GlobalId ) { m_GlobalId->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( m_OwnerHistory ) { stream << "#" << m_OwnerHistory->m_entity_id; } else { stream << "$"; } stream << ","; if( m_Name ) { m_Name->getStepParameter( stream ); } else { stream << "$"; } stream << ","; if( m_Description ) { m_Description->getStepParameter( stream ); } else { stream << "$"; } stream << ");"; } void IfcPreDefinedPropertySet::getStepParameter( std::stringstream& stream, bool /*is_select_type*/ ) const { stream << "#" << m_entity_id; } const std::wstring IfcPreDefinedPropertySet::toString() const { return L"IfcPreDefinedPropertySet"; } void IfcPreDefinedPropertySet::readStepArguments( const std::vector<std::wstring>& args, const std::map<int,shared_ptr<BuildingEntity> >& map ) { const size_t num_args = args.size(); if( num_args != 4 ){ std::stringstream err; err << "Wrong parameter count for entity IfcPreDefinedPropertySet, expecting 4, having " << num_args << ". Entity ID: " << m_entity_id << std::endl; throw BuildingException( err.str().c_str() ); } m_GlobalId = IfcGloballyUniqueId::createObjectFromSTEP( args[0], map ); readEntityReference( args[1], m_OwnerHistory, map ); m_Name = IfcLabel::createObjectFromSTEP( args[2], map ); m_Description = IfcText::createObjectFromSTEP( args[3], map ); } void IfcPreDefinedPropertySet::getAttributes( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes ) const { IfcPropertySetDefinition::getAttributes( vec_attributes ); } void IfcPreDefinedPropertySet::getAttributesInverse( std::vector<std::pair<std::string, shared_ptr<BuildingObject> > >& vec_attributes_inverse ) const { IfcPropertySetDefinition::getAttributesInverse( vec_attributes_inverse ); } void IfcPreDefinedPropertySet::setInverseCounterparts( shared_ptr<BuildingEntity> ptr_self_entity ) { IfcPropertySetDefinition::setInverseCounterparts( ptr_self_entity ); } void IfcPreDefinedPropertySet::unlinkFromInverseCounterparts() { IfcPropertySetDefinition::unlinkFromInverseCounterparts(); }
{'content_hash': '6aade335e6df25d317fe7fa12b8f049f', 'timestamp': '', 'source': 'github', 'line_count': 78, 'max_line_length': 241, 'avg_line_length': 53.37179487179487, 'alnum_prop': 0.7288013451837617, 'repo_name': 'berndhahnebach/IfcPlusPlus', 'id': '4626a5720da6bb17d8c05822229ee82e0f8c1c86', 'size': '4163', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'IfcPlusPlus/src/ifcpp/IFC4/lib/IfcPreDefinedPropertySet.cpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '1370'}, {'name': 'C', 'bytes': '4453'}, {'name': 'C++', 'bytes': '11543025'}, {'name': 'CMake', 'bytes': '12189'}, {'name': 'CSS', 'bytes': '4880'}, {'name': 'Makefile', 'bytes': '2305'}, {'name': 'Objective-C', 'bytes': '92'}]}
#include "sass.hpp" #include <cstdlib> #include <cstring> #include "util.hpp" #include "eval.hpp" #include "values.hpp" #include "sass/values.h" #include "sass_values.hpp" extern "C" { using namespace Sass; // Return the sass tag for a generic sass value enum Sass_Tag ADDCALL sass_value_get_tag(const union Sass_Value* v) { return v->unknown.tag; } // Check value for specified type bool ADDCALL sass_value_is_null(const union Sass_Value* v) { return v->unknown.tag == SASS_NULL; } bool ADDCALL sass_value_is_number(const union Sass_Value* v) { return v->unknown.tag == SASS_NUMBER; } bool ADDCALL sass_value_is_string(const union Sass_Value* v) { return v->unknown.tag == SASS_STRING; } bool ADDCALL sass_value_is_boolean(const union Sass_Value* v) { return v->unknown.tag == SASS_BOOLEAN; } bool ADDCALL sass_value_is_color(const union Sass_Value* v) { return v->unknown.tag == SASS_COLOR; } bool ADDCALL sass_value_is_list(const union Sass_Value* v) { return v->unknown.tag == SASS_LIST; } bool ADDCALL sass_value_is_map(const union Sass_Value* v) { return v->unknown.tag == SASS_MAP; } bool ADDCALL sass_value_is_error(const union Sass_Value* v) { return v->unknown.tag == SASS_ERROR; } bool ADDCALL sass_value_is_warning(const union Sass_Value* v) { return v->unknown.tag == SASS_WARNING; } // Getters and setters for Sass_Number double ADDCALL sass_number_get_value(const union Sass_Value* v) { return v->number.value; } void ADDCALL sass_number_set_value(union Sass_Value* v, double value) { v->number.value = value; } const char* ADDCALL sass_number_get_unit(const union Sass_Value* v) { return v->number.unit; } void ADDCALL sass_number_set_unit(union Sass_Value* v, char* unit) { v->number.unit = unit; } // Getters and setters for Sass_String const char* ADDCALL sass_string_get_value(const union Sass_Value* v) { return v->string.value; } void ADDCALL sass_string_set_value(union Sass_Value* v, char* value) { v->string.value = value; } bool ADDCALL sass_string_is_quoted(const union Sass_Value* v) { return v->string.quoted; } void ADDCALL sass_string_set_quoted(union Sass_Value* v, bool quoted) { v->string.quoted = quoted; } // Getters and setters for Sass_Boolean bool ADDCALL sass_boolean_get_value(const union Sass_Value* v) { return v->boolean.value; } void ADDCALL sass_boolean_set_value(union Sass_Value* v, bool value) { v->boolean.value = value; } // Getters and setters for Sass_Color double ADDCALL sass_color_get_r(const union Sass_Value* v) { return v->color.r; } void ADDCALL sass_color_set_r(union Sass_Value* v, double r) { v->color.r = r; } double ADDCALL sass_color_get_g(const union Sass_Value* v) { return v->color.g; } void ADDCALL sass_color_set_g(union Sass_Value* v, double g) { v->color.g = g; } double ADDCALL sass_color_get_b(const union Sass_Value* v) { return v->color.b; } void ADDCALL sass_color_set_b(union Sass_Value* v, double b) { v->color.b = b; } double ADDCALL sass_color_get_a(const union Sass_Value* v) { return v->color.a; } void ADDCALL sass_color_set_a(union Sass_Value* v, double a) { v->color.a = a; } // Getters and setters for Sass_List size_t ADDCALL sass_list_get_length(const union Sass_Value* v) { return v->list.length; } enum Sass_Separator ADDCALL sass_list_get_separator(const union Sass_Value* v) { return v->list.separator; } void ADDCALL sass_list_set_separator(union Sass_Value* v, enum Sass_Separator separator) { v->list.separator = separator; } bool ADDCALL sass_list_get_is_bracketed(const union Sass_Value* v) { return v->list.is_bracketed; } void ADDCALL sass_list_set_is_bracketed(union Sass_Value* v, bool is_bracketed) { v->list.is_bracketed = is_bracketed; } // Getters and setters for Sass_List values union Sass_Value* ADDCALL sass_list_get_value(const union Sass_Value* v, size_t i) { return v->list.values[i]; } void ADDCALL sass_list_set_value(union Sass_Value* v, size_t i, union Sass_Value* value) { v->list.values[i] = value; } // Getters and setters for Sass_Map size_t ADDCALL sass_map_get_length(const union Sass_Value* v) { return v->map.length; } // Getters and setters for Sass_List keys and values union Sass_Value* ADDCALL sass_map_get_key(const union Sass_Value* v, size_t i) { return v->map.pairs[i].key; } union Sass_Value* ADDCALL sass_map_get_value(const union Sass_Value* v, size_t i) { return v->map.pairs[i].value; } void ADDCALL sass_map_set_key(union Sass_Value* v, size_t i, union Sass_Value* key) { v->map.pairs[i].key = key; } void ADDCALL sass_map_set_value(union Sass_Value* v, size_t i, union Sass_Value* val) { v->map.pairs[i].value = val; } // Getters and setters for Sass_Error char* ADDCALL sass_error_get_message(const union Sass_Value* v) { return v->error.message; }; void ADDCALL sass_error_set_message(union Sass_Value* v, char* msg) { v->error.message = msg; }; // Getters and setters for Sass_Warning char* ADDCALL sass_warning_get_message(const union Sass_Value* v) { return v->warning.message; }; void ADDCALL sass_warning_set_message(union Sass_Value* v, char* msg) { v->warning.message = msg; }; // Creator functions for all value types union Sass_Value* ADDCALL sass_make_boolean(bool val) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->boolean.tag = SASS_BOOLEAN; v->boolean.value = val; return v; } union Sass_Value* ADDCALL sass_make_number(double val, const char* unit) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->number.tag = SASS_NUMBER; v->number.value = val; v->number.unit = unit ? sass_copy_c_string(unit) : 0; if (v->number.unit == 0) { free(v); return 0; } return v; } union Sass_Value* ADDCALL sass_make_color(double r, double g, double b, double a) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->color.tag = SASS_COLOR; v->color.r = r; v->color.g = g; v->color.b = b; v->color.a = a; return v; } union Sass_Value* ADDCALL sass_make_string(const char* val) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->string.quoted = false; v->string.tag = SASS_STRING; v->string.value = val ? sass_copy_c_string(val) : 0; if (v->string.value == 0) { free(v); return 0; } return v; } union Sass_Value* ADDCALL sass_make_qstring(const char* val) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->string.quoted = true; v->string.tag = SASS_STRING; v->string.value = val ? sass_copy_c_string(val) : 0; if (v->string.value == 0) { free(v); return 0; } return v; } union Sass_Value* ADDCALL sass_make_list(size_t len, enum Sass_Separator sep, bool is_bracketed) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->list.tag = SASS_LIST; v->list.length = len; v->list.separator = sep; v->list.is_bracketed = is_bracketed; v->list.values = (union Sass_Value**) calloc(len, sizeof(union Sass_Value*)); if (v->list.values == 0) { free(v); return 0; } return v; } union Sass_Value* ADDCALL sass_make_map(size_t len) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->map.tag = SASS_MAP; v->map.length = len; v->map.pairs = (struct Sass_MapPair*) calloc(len, sizeof(struct Sass_MapPair)); if (v->map.pairs == 0) { free(v); return 0; } return v; } union Sass_Value* ADDCALL sass_make_null(void) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->null.tag = SASS_NULL; return v; } union Sass_Value* ADDCALL sass_make_error(const char* msg) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->error.tag = SASS_ERROR; v->error.message = msg ? sass_copy_c_string(msg) : 0; if (v->error.message == 0) { free(v); return 0; } return v; } union Sass_Value* ADDCALL sass_make_warning(const char* msg) { union Sass_Value* v = (Sass_Value*) calloc(1, sizeof(Sass_Value)); if (v == 0) return 0; v->warning.tag = SASS_WARNING; v->warning.message = msg ? sass_copy_c_string(msg) : 0; if (v->warning.message == 0) { free(v); return 0; } return v; } // will free all associated sass values void ADDCALL sass_delete_value(union Sass_Value* val) { size_t i; if (val == 0) return; switch(val->unknown.tag) { case SASS_NULL: { } break; case SASS_BOOLEAN: { } break; case SASS_NUMBER: { free(val->number.unit); } break; case SASS_COLOR: { } break; case SASS_STRING: { free(val->string.value); } break; case SASS_LIST: { for (i=0; i<val->list.length; i++) { sass_delete_value(val->list.values[i]); } free(val->list.values); } break; case SASS_MAP: { for (i=0; i<val->map.length; i++) { sass_delete_value(val->map.pairs[i].key); sass_delete_value(val->map.pairs[i].value); } free(val->map.pairs); } break; case SASS_ERROR: { free(val->error.message); } break; case SASS_WARNING: { free(val->error.message); } break; default: break; } free(val); } // Make a deep cloned copy of the given sass value union Sass_Value* ADDCALL sass_clone_value (const union Sass_Value* val) { size_t i; if (val == 0) return 0; switch(val->unknown.tag) { case SASS_NULL: { return sass_make_null(); } case SASS_BOOLEAN: { return sass_make_boolean(val->boolean.value); } case SASS_NUMBER: { return sass_make_number(val->number.value, val->number.unit); } case SASS_COLOR: { return sass_make_color(val->color.r, val->color.g, val->color.b, val->color.a); } case SASS_STRING: { return sass_string_is_quoted(val) ? sass_make_qstring(val->string.value) : sass_make_string(val->string.value); } case SASS_LIST: { union Sass_Value* list = sass_make_list(val->list.length, val->list.separator, val->list.is_bracketed); for (i = 0; i < list->list.length; i++) { list->list.values[i] = sass_clone_value(val->list.values[i]); } return list; } case SASS_MAP: { union Sass_Value* map = sass_make_map(val->map.length); for (i = 0; i < val->map.length; i++) { map->map.pairs[i].key = sass_clone_value(val->map.pairs[i].key); map->map.pairs[i].value = sass_clone_value(val->map.pairs[i].value); } return map; } case SASS_ERROR: { return sass_make_error(val->error.message); } case SASS_WARNING: { return sass_make_warning(val->warning.message); } default: break; } return 0; } union Sass_Value* ADDCALL sass_value_stringify (const union Sass_Value* v, bool compressed, int precision) { Value_Obj val = sass_value_to_ast_node(v); Sass_Inspect_Options options(compressed ? COMPRESSED : NESTED, precision); std::string str(val->to_string(options)); return sass_make_qstring(str.c_str()); } union Sass_Value* ADDCALL sass_value_op (enum Sass_OP op, const union Sass_Value* a, const union Sass_Value* b) { Sass::Value_Ptr rv; try { Value_Obj lhs = sass_value_to_ast_node(a); Value_Obj rhs = sass_value_to_ast_node(b); struct Sass_Inspect_Options options(NESTED, 5); // see if it's a relational expression switch(op) { case Sass_OP::EQ: return sass_make_boolean(Eval::eq(lhs, rhs)); case Sass_OP::NEQ: return sass_make_boolean(!Eval::eq(lhs, rhs)); case Sass_OP::GT: return sass_make_boolean(!Eval::lt(lhs, rhs, "gt") && !Eval::eq(lhs, rhs)); case Sass_OP::GTE: return sass_make_boolean(!Eval::lt(lhs, rhs, "gte")); case Sass_OP::LT: return sass_make_boolean(Eval::lt(lhs, rhs, "lt")); case Sass_OP::LTE: return sass_make_boolean(Eval::lt(lhs, rhs, "lte") || Eval::eq(lhs, rhs)); case Sass_OP::AND: return ast_node_to_sass_value(lhs->is_false() ? lhs : rhs); case Sass_OP::OR: return ast_node_to_sass_value(lhs->is_false() ? rhs : lhs); default: break; } if (sass_value_is_number(a) && sass_value_is_number(b)) { Number_Ptr_Const l_n = Cast<Number>(lhs); Number_Ptr_Const r_n = Cast<Number>(rhs); rv = Eval::op_numbers(op, *l_n, *r_n, options, l_n->pstate()); } else if (sass_value_is_number(a) && sass_value_is_color(a)) { Number_Ptr_Const l_n = Cast<Number>(lhs); Color_Ptr_Const r_c = Cast<Color>(rhs); rv = Eval::op_number_color(op, *l_n, *r_c, options, l_n->pstate()); } else if (sass_value_is_color(a) && sass_value_is_number(b)) { Color_Ptr_Const l_c = Cast<Color>(lhs); Number_Ptr_Const r_n = Cast<Number>(rhs); rv = Eval::op_color_number(op, *l_c, *r_n, options, l_c->pstate()); } else if (sass_value_is_color(a) && sass_value_is_color(b)) { Color_Ptr_Const l_c = Cast<Color>(lhs); Color_Ptr_Const r_c = Cast<Color>(rhs); rv = Eval::op_colors(op, *l_c, *r_c, options, l_c->pstate()); } else /* convert other stuff to string and apply operation */ { Value_Ptr l_v = Cast<Value>(lhs); Value_Ptr r_v = Cast<Value>(rhs); rv = Eval::op_strings(op, *l_v, *r_v, options, l_v->pstate()); } // ToDo: maybe we should should return null value? if (!rv) return sass_make_error("invalid return value"); // convert result back to ast node return ast_node_to_sass_value(rv); } // simply pass the error message back to the caller for now catch (Exception::InvalidSass& e) { return sass_make_error(e.what()); } catch (std::bad_alloc&) { return sass_make_error("memory exhausted"); } catch (std::exception& e) { return sass_make_error(e.what()); } catch (std::string& e) { return sass_make_error(e.c_str()); } catch (const char* e) { return sass_make_error(e); } catch (...) { return sass_make_error("unknown"); } } }
{'content_hash': '16328275e70b161e461986242cf6adaf', 'timestamp': '', 'source': 'github', 'line_count': 356, 'max_line_length': 127, 'avg_line_length': 41.68539325842696, 'alnum_prop': 0.6102425876010782, 'repo_name': 'Smartbank/node-sass', 'id': '25abd49ba1d50e8065012fda6903d4033695edc0', 'size': '14840', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/libsass/src/sass_values.cpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '24647'}, {'name': 'C++', 'bytes': '1302788'}, {'name': 'JavaScript', 'bytes': '167723'}, {'name': 'M4', 'bytes': '9993'}, {'name': 'Makefile', 'bytes': '8453'}, {'name': 'Perl', 'bytes': '3390'}, {'name': 'Python', 'bytes': '5540'}, {'name': 'Ruby', 'bytes': '157'}, {'name': 'Shell', 'bytes': '28758'}]}
package com.siyeh.ig.controlflow; import com.IGInspectionTestCase; public class InfiniteLoopStatementInspectionTest extends IGInspectionTestCase { public void test() throws Exception { doTest("com/siyeh/igtest/controlflow/infinite_loop_statement", new InfiniteLoopStatementInspection()); } }
{'content_hash': 'a90331db1ff7c5a60a4e57b2410f05c6', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 79, 'avg_line_length': 29.636363636363637, 'alnum_prop': 0.7515337423312883, 'repo_name': 'joewalnes/idea-community', 'id': 'bb81dae6bbb4b8175b6e2fe383cc84f89d628498', 'size': '326', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'plugins/InspectionGadgets/testsrc/com/siyeh/ig/controlflow/InfiniteLoopStatementInspectionTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ActionScript', 'bytes': '387'}, {'name': 'C', 'bytes': '136045'}, {'name': 'C#', 'bytes': '103'}, {'name': 'C++', 'bytes': '40449'}, {'name': 'Emacs Lisp', 'bytes': '2507'}, {'name': 'Erlang', 'bytes': '10'}, {'name': 'Groovy', 'bytes': '361320'}, {'name': 'Java', 'bytes': '89694599'}, {'name': 'JavaScript', 'bytes': '978'}, {'name': 'Objective-C', 'bytes': '1877'}, {'name': 'PHP', 'bytes': '145'}, {'name': 'Perl', 'bytes': '6523'}, {'name': 'Python', 'bytes': '1699274'}, {'name': 'Shell', 'bytes': '6965'}, {'name': 'VimL', 'bytes': '5950'}]}
document.body.innerHTML = '<button onclick="new_reg()">new note</button>'+ '<button onclick="drop_table()">drop table</button>'+ '<button onclick="drop_db()">drop db </button>'; var db; db = openDatabase("DBTest", "1.0", "HTML5 Database API example", 200000, function(db) { console.log('database opened'); }); db.transaction(function(tx) { tx.executeSql("SELECT COUNT(*) FROM Table1Test", [], function(result) { console.log('table Table1Test already existed. we skip any action.') }, function(tx, error) { console.log('table Table1Test doesnt exist. Creating it') tx.executeSql("CREATE TABLE Table1Test (id REAL UNIQUE, note TEXT)", [], function(result) { console.log('Table1Test created') }, function(tx, error) { console.error('error creating Table1Test table'); console.error(error) }); }); }); function new_reg() { var num = Math.round(Math.random() * 10000); db.transaction(function(tx) { tx.executeSql("INSERT INTO Table1Test (id, note) VALUES (?, ?)", [num, (num * 2) + ''], function(tx) { console.log('register added') }, function(tx, error) { console.error('error adding register') console.error(error) }); }); } function drop_table() { db.transaction(function(tx) { tx.executeSql("DROP TABLE Table1Test", [], function(tx) { console.log('Table1Test dropped') }, function(tx, error) { console.error('error dropping Table1Test') console.error(error) }); }); } function drop_db() { db.transaction(function(tx) { tx.executeSql("DROP DATABASE DBTest", [], function(tx) { console.log('Database dropped') }, function(tx, error) { console.error('error dropping Database') console.error(error) }); }); }
{'content_hash': '3abe1a939e62671dbd085744e6303abc', 'timestamp': '', 'source': 'github', 'line_count': 64, 'max_line_length': 108, 'avg_line_length': 29.765625, 'alnum_prop': 0.5889763779527559, 'repo_name': 'html5rocks/playground.html5rocks.com', 'id': 'e54fe2f64675db8686b760c405aa7dd14146bf18', 'size': '1905', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'samples/js/html5/appcache.js', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '6792'}, {'name': 'CSS', 'bytes': '24133'}, {'name': 'HTML', 'bytes': '33739'}, {'name': 'JavaScript', 'bytes': '441405'}, {'name': 'Python', 'bytes': '74163'}]}
package org.apache.asterix.common.api; import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider; import org.apache.hyracks.api.job.JobSpecification; public interface ISchedulableClientRequest { /** * Gets the client request * * @return the client request */ IClientRequest getClientRequest(); /** * Gets the request common parameters * * @return the request common parameters */ ICommonRequestParameters getRequestParameters(); /** * Gets the request's job specification * * @return */ JobSpecification getJobSpecification(); /** * Gets the metadata provider used to execute this request * * @return the metadata provider */ IMetadataProvider getMetadataProvider(); }
{'content_hash': '03d7251debc2788343268f765552e3a6', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 77, 'avg_line_length': 22.38888888888889, 'alnum_prop': 0.6724565756823822, 'repo_name': 'ecarm002/incubator-asterixdb', 'id': '7723550d1d493db54c23a6d5773f8ac97d7e158b', 'size': '1613', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'asterixdb/asterix-common/src/main/java/org/apache/asterix/common/api/ISchedulableClientRequest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '8721'}, {'name': 'C', 'bytes': '421'}, {'name': 'CSS', 'bytes': '8823'}, {'name': 'Crystal', 'bytes': '453'}, {'name': 'Gnuplot', 'bytes': '89'}, {'name': 'HTML', 'bytes': '126208'}, {'name': 'Java', 'bytes': '18965823'}, {'name': 'JavaScript', 'bytes': '274822'}, {'name': 'Python', 'bytes': '281315'}, {'name': 'Ruby', 'bytes': '3078'}, {'name': 'Scheme', 'bytes': '1105'}, {'name': 'Shell', 'bytes': '203955'}, {'name': 'Smarty', 'bytes': '31412'}]}
{-# OPTIONS_HADDOCK not-home #-} module Derive.List ( -- $introduction -- $example -- $conclusion deriveList , deriveMonoid , deriveSemigroup , deriveIsList , DeriveListConfig(..) , deriveListWith , deriveMonoidWith , deriveSemigroupWith , deriveIsListWith -- $alternatives ) where import Derive.List.Internal {- $introduction when your type can hold a list of itself, 'deriveList' can generate instances for: * 'Semigroup' * 'Monoid' * 'IsList' which are lawful (trivially, being based on the list instances). usage: @ data T = ... | C [T] | ... deriveList ''T 'C @ -} -- $example -- = Examples -- -- this declaration: -- -- @ -- -- {-\# LANGUAGE TemplateHaskell, TypeFamilies \#-} -- minimal extensions necessary -- {-\# OPTIONS_GHC -ddump-splices \#-} -- prints out the generated code -- -- import GHC.Exts (IsList (..)) -- minimal imports necessary -- import Data.Semigroup -- from the <https://hackage.haskell.org/package/semigroups semigroups> package -- -- -- a sum type -- data Elisp -- = ElispAtom (Either String Integer) -- | ElispSexp [Elisp] -- -- 'deriveList' \'\'Elisp \'ElispSexp -- @ -- -- generates these instances: -- -- @ -- instance 'Semigroup' Elisp where -- ('<>') x y = ElispSexp (toElispList x '<>' toElispList y) -- -- instance 'Monoid' Elisp where -- 'mempty' = emptyElisp -- 'mappend' = ('<>') -- -- instance 'IsList' Elisp where -- type 'Item' Elisp = Elisp -- 'fromList' = ElispSexp -- 'toList' = toElispList -- -- emptyElisp :: ElispSexp -- emptyElisp = ElispSexp [] -- -- toElispList :: Elisp -> [Elisp] -- toElispList (ElispSexp ts) = ts -- toElispList t = [t] -- -- @ -- {- $conclusion = Documentation you can document functions/variables (though not instances), by placing their signatures __after__ the macro: @ data Elisp = ElispAtom (Either String Integer) | ElispSexp [Elisp] 'deriveList' \'\'Elisp \'ElispSexp -- | ... emptyElisp :: Elisp -- | ... appendElisp :: Elisp -> Elisp -> Elisp -- | ... toElispList :: Elisp -> [Elisp] @ = Kind works on type constructors of any kind. that is, a polymorphic @Elisp@ would work too: @ data Elisp a = ElispAtom a | ElispSexp [Elisp a] 'deriveList' \'\'Elisp \'ElispSexp @ = Selecting Instances if you don't want all three instances, you can use one of: * 'deriveMonoid' * 'deriveSemigroup' * 'deriveIsList' but only one, as they would generate duplicate declarations. -} {- $alternatives = Alternatives to @derive-monoid@ * manual instances. * @GeneralizeNewtypeDeriving@: works with @newtype@, but not with @data@. * the <http://hackage.haskell.org/package/semigroups semigroups> package: derives a different semigroup (i.e. pairwise appending, when your type is a product type), which isn't valid for sum types. * the <http://hackage.haskell.org/package/derive derive> package: derives a different monoid (i.e. pairwise appending, when your type is a product type), which isn't valid for sum types. it also doesn't work with Semigroup. -} {- TODO pattern EmptyElisp = ElispSexp [] TODO Or with fewer extensions and dependencies: @ 'deriveMonoidWith' defaultDeriveListConfig{ _usePatternSynonyms=False } \'\'Elisp \'ElispSexp @ generates: @ instance 'Monoid' Elisp where mempty = EmptyElisp [] mappend x y = ElispSexp (mappend (toElispList x toElispList y)) where toElispList :: Elisp -> [Elisp] toElispList (ElispSexp ts) = ts toElispList t = [t] @ -}
{'content_hash': 'fe9b1cabfbccab0d81f181a6c3afb5f8', 'timestamp': '', 'source': 'github', 'line_count': 191, 'max_line_length': 224, 'avg_line_length': 18.612565445026178, 'alnum_prop': 0.6548523206751055, 'repo_name': 'sboosali/derive-monoid', 'id': '301cf9ac94809a38f20fd122e747577fde3d4667', 'size': '3555', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'sources/Derive/List.hs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Haskell', 'bytes': '16326'}, {'name': 'Makefile', 'bytes': '1194'}]}
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="../_static/mktree.js"></script> <link rel="stylesheet" href="../_static/mktree.css" type="text/css"> <meta charset="utf-8" /> <title>Developer Page &#8212; statsmodels v0.10.0 documentation</title> <link rel="stylesheet" href="../_static/nature.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" /> <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/language_data.js"></script> <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <link rel="shortcut icon" href="../_static/statsmodels_hybi_favico.ico"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="Working with the statsmodels Code" href="git_notes.html" /> <link rel="prev" title="Pitfalls" href="../pitfalls.html" /> <link rel="stylesheet" href="../_static/examples.css" type="text/css" /> <link rel="stylesheet" href="../_static/facebox.css" type="text/css" /> <script type="text/javascript" src="../_static/scripts.js"> </script> <script type="text/javascript" src="../_static/facebox.js"> </script> <script type="text/javascript"> $.facebox.settings.closeImage = "../_static/closelabel.png" $.facebox.settings.loadingImage = "../_static/loading.gif" </script> <script> $(document).ready(function() { $.getJSON("../../versions.json", function(versions) { var dropdown = document.createElement("div"); dropdown.className = "dropdown"; var button = document.createElement("button"); button.className = "dropbtn"; button.innerHTML = "Other Versions"; var content = document.createElement("div"); content.className = "dropdown-content"; dropdown.appendChild(button); dropdown.appendChild(content); $(".header").prepend(dropdown); for (var i = 0; i < versions.length; i++) { if (versions[i].substring(0, 1) == "v") { versions[i] = [versions[i], versions[i].substring(1)]; } else { versions[i] = [versions[i], versions[i]]; }; }; for (var i = 0; i < versions.length; i++) { var a = document.createElement("a"); a.innerHTML = versions[i][1]; a.href = "../../" + versions[i][0] + "/index.html"; a.title = versions[i][1]; $(".dropdown-content").append(a); }; }); }); </script> </head><body> <div class="headerwrap"> <div class = "header"> <a href = "../index.html"> <img src="../_static/statsmodels_hybi_banner.png" alt="Logo" style="padding-left: 15px"/></a> </div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="git_notes.html" title="Working with the statsmodels Code" accesskey="N">next</a> |</li> <li class="right" > <a href="../pitfalls.html" title="Pitfalls" accesskey="P">previous</a> |</li> <li><a href ="../install.html">Install</a></li> &nbsp;|&nbsp; <li><a href="https://groups.google.com/forum/?hl=en#!forum/pystatsmodels">Support</a></li> &nbsp;|&nbsp; <li><a href="https://github.com/statsmodels/statsmodels/issues">Bugs</a></li> &nbsp;|&nbsp; <li><a href="#">Develop</a></li> &nbsp;|&nbsp; <li><a href="../examples/index.html">Examples</a></li> &nbsp;|&nbsp; <li><a href="../faq.html">FAQ</a></li> &nbsp;|&nbsp; </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="developer-page"> <h1>Developer Page<a class="headerlink" href="#developer-page" title="Permalink to this headline">¶</a></h1> <p>This page explains how you can contribute to the development of <cite>statsmodels</cite> by submitting patches, statistical tests, new models, or examples.</p> <p><cite>statsmodels</cite> is developed on <a class="reference external" href="https://github.com/statsmodels/statsmodels">Github</a> using the <a class="reference external" href="https://git-scm.com/">Git</a> version control system.</p> <div class="section" id="submitting-a-bug-report"> <h2>Submitting a Bug Report<a class="headerlink" href="#submitting-a-bug-report" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p>Include a short, self-contained code snippet that reproduces the problem</p></li> <li><p>Specify the statsmodels version used. You can do this with <code class="docutils literal notranslate"><span class="pre">sm.version.full_version</span></code></p></li> <li><p>If the issue looks to involve other dependencies, also include the output of <code class="docutils literal notranslate"><span class="pre">sm.show_versions()</span></code></p></li> </ul> </div> <div class="section" id="making-changes-to-the-code"> <h2>Making Changes to the Code<a class="headerlink" href="#making-changes-to-the-code" title="Permalink to this headline">¶</a></h2> <p>First, review the :ref:git_notes section for an intro to the git version control system.</p> <p>For a pull request to be accepted, you must meet the below requirements. This greatly helps the job of maintaining and releasing the software a shared effort.</p> <ul> <li><p><strong>One branch. One feature.</strong> Branches are cheap and github makes it easy to merge and delete branches with a few clicks. Avoid the temptation to lump in a bunch of unrelated changes when working on a feature, if possible. This helps us keep track of what has changed when preparing a release.</p></li> <li><p>Commit messages should be clear and concise. This means a subject line of less than 80 characters, and, if necessary, a blank line followed by a commit message body. We have an <a class="reference external" href="https://www.statsmodels.org/devel/dev/maintainer_notes.html#commit-comments">informal commit format standard</a> that we try to adhere to. You can see what this looks like in practice by <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">log</span> <span class="pre">--oneline</span> <span class="pre">-n</span> <span class="pre">10</span></code>. If your commit references or closes a specific issue, you can close it by mentioning it in the <a class="reference external" href="https://help.github.com/articles/closing-issues-via-commit-messages/">commit message</a>. (<em>For maintainers</em>: These suggestions go for Merge commit comments too. These are partially the record for release notes.)</p></li> <li><p>Code submissions must always include tests. See our notes on <a class="reference internal" href="test_notes.html#testing"><span class="std std-ref">Testing</span></a>.</p></li> <li><p>Each function, class, method, and attribute needs to be documented using docstrings. We conform to the <a class="reference external" href="https://github.com/numpy/numpy/blob/master/doc/HOWTO_DOCUMENT.rst.txt#docstring-standard">numpy docstring standard</a>.</p></li> <li><p>If you are adding new functionality, you need to add it to the documentation by editing (or creating) the appropriate file in <code class="docutils literal notranslate"><span class="pre">docs/source</span></code>.</p></li> <li><p>Make sure your documentation changes parse correctly. Change into the top-level <code class="docutils literal notranslate"><span class="pre">docs/</span></code> directory and type:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">clean</span> <span class="n">make</span> <span class="n">html</span> </pre></div> </div> <p>Check that the build output does not have <em>any</em> warnings due to your changes.</p> </li> <li><p>Follow <a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP8</a> style guidelines wherever possible. Compare your code to what’s in master by running <code class="docutils literal notranslate"><span class="pre">git</span> <span class="pre">diff</span> <span class="pre">upstream/master</span> <span class="pre">-u</span> <span class="pre">--</span> <span class="pre">&quot;*.py&quot;</span> <span class="pre">|</span> <span class="pre">flake8</span> <span class="pre">--diff</span></code> prior to submitting.</p></li> <li><p>Finally, please add your changes to the release notes. Open the <code class="docutils literal notranslate"><span class="pre">docs/source/release/versionX.X.rst</span></code> file that has the version number of the next release and add your changes to the appropriate section.</p></li> </ul> </div> <div class="section" id="how-to-submit-a-pull-request"> <h2>How to Submit a Pull Request<a class="headerlink" href="#how-to-submit-a-pull-request" title="Permalink to this headline">¶</a></h2> <p>So you want to submit a patch to <cite>statsmodels</cite> but aren’t too familiar with github? Here are the steps you need to take.</p> <ol class="arabic simple"> <li><p><a class="reference external" href="https://help.github.com/articles/fork-a-repo/">Fork</a> the <a class="reference external" href="https://github.com/statsmodels/statsmodels">statsmodels repository</a> on Github.</p></li> <li><p><a class="reference external" href="https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging">Create a new feature branch</a>. Each branch must be self-contained, with a single new feature or bugfix.</p></li> <li><p>Make sure the test suite passes. This includes testing on Python 3. The easiest way to do this is to either enable <a class="reference external" href="https://travis-ci.org/">Travis-CI</a> on your fork, or to make a pull request and check there.</p></li> <li><p><a class="reference external" href="https://help.github.com/articles/about-pull-requests/">Submit a pull request</a></p></li> </ol> <p>Pull requests are thoroughly reviewed before being accepted into the codebase. If your pull request becomes out of date, rebase your pull request on the latest version in the central repository.</p> </div> <div class="section" id="mailing-list"> <h2>Mailing List<a class="headerlink" href="#mailing-list" title="Permalink to this headline">¶</a></h2> <p>Conversations about development take place on the <a class="reference external" href="https://groups.google.com/forum/?hl=en#!forum/pystatsmodels">statsmodels mailing list</a>.</p> </div> <div class="section" id="license"> <h2>License<a class="headerlink" href="#license" title="Permalink to this headline">¶</a></h2> <p>Statsmodels is released under the <a class="reference external" href="https://opensource.org/licenses/BSD-3-Clause">Modified (3-clause) BSD license</a>.</p> </div> <div class="section" id="contents"> <h2>Contents<a class="headerlink" href="#contents" title="Permalink to this headline">¶</a></h2> <div class="toctree-wrapper compound"> <a onclick="expandTree('toctree0')" href="javascript:void(0);">Expand all. </a> <a onclick="collapseTree('toctree0')" href="javascript:void(0);">Collapse all.</a> <ul class="mktree" id="toctree0"> <li class="liClosed"> <a class="reference internal" href="git_notes.html">Working with the statsmodels Code</a><ul> <li class="liClosed"> <a class="reference internal" href="git_notes.html#github">Github</a></li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#version-control-and-git">Version Control and Git</a></li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#statsmodels-git-github-workflow">Statsmodels Git/Github Workflow</a><ul> <li class="liClosed"> <a class="reference internal" href="git_notes.html#forking-and-cloning">Forking and cloning</a></li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#create-a-branch">Create a Branch</a></li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#making-changes">Making changes</a></li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#pushing-your-changes">Pushing your changes</a></li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#pull-requests">Pull Requests</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#advanced-topics">Advanced Topics</a><ul> <li class="liClosed"> <a class="reference internal" href="git_notes.html#merging-vs-rebasing">Merging vs. Rebasing</a></li> <li class="liClosed"> <a class="reference internal" href="git_notes.html#deleting-branches">Deleting Branches</a></li> </ul> </li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html">Maintainer Notes</a><ul> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#git-workflow">Git Workflow</a><ul> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#grabbing-changes-from-others">Grabbing Changes from Others</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#rebasing">Rebasing</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#merging">Merging</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#check-the-history">Check the History</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#push-your-feature-branch">Push Your Feature Branch</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#cherry-picking">Cherry-Picking</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#merging-to-fast-forward-or-not-to-fast-forward">Merging: To Fast-Forward or Not To Fast-Forward</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#handling-pull-requests">Handling Pull Requests</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#releasing">Releasing</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#releasing-from-maintenance-branch">Releasing from Maintenance Branch</a></li> <li class="liClosed"> <a class="reference internal" href="maintainer_notes.html#commit-comments">Commit Comments</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="test_notes.html">Testing</a><ul> <li class="liClosed"> <a class="reference internal" href="test_notes.html#setting-up-development-environment-locally">Setting up development environment locally</a></li> <li class="liClosed"> <a class="reference internal" href="test_notes.html#test-driven-development">Test Driven Development</a></li> <li class="liClosed"> <a class="reference internal" href="test_notes.html#introduction-to-pytest">Introduction to pytest</a></li> <li class="liClosed"> <a class="reference internal" href="test_notes.html#running-the-test-suite">Running the Test Suite</a></li> <li class="liClosed"> <a class="reference internal" href="test_notes.html#running-tests-using-the-command-line">Running Tests using the command line</a></li> <li class="liClosed"> <a class="reference internal" href="test_notes.html#how-to-write-a-test">How To Write A Test</a></li> <li class="liClosed"> <a class="reference internal" href="test_notes.html#test-results">Test Results</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="naming_conventions.html">Naming Conventions</a><ul> <li class="liClosed"> <a class="reference internal" href="naming_conventions.html#file-and-directory-names">File and Directory Names</a></li> <li class="liClosed"> <a class="reference internal" href="naming_conventions.html#endog-exog"><cite>endog</cite> &amp; <cite>exog</cite></a></li> <li class="liClosed"> <a class="reference internal" href="naming_conventions.html#variable-names">Variable Names</a></li> <li class="liClosed"> <a class="reference internal" href="naming_conventions.html#options">Options</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="dataset_notes.html">Datasets</a><ul> <li class="liClosed"> <a class="reference internal" href="dataset_notes.html#license">License</a></li> <li class="liClosed"> <a class="reference internal" href="dataset_notes.html#adding-a-dataset-an-example">Adding a dataset: An example</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="examples.html">Examples</a><ul> <li class="liClosed"> <a class="reference internal" href="examples.html#file-format">File Format</a></li> <li class="liClosed"> <a class="reference internal" href="examples.html#the-example-gallery">The Example Gallery</a></li> <li class="liClosed"> <a class="reference internal" href="examples.html#before-submitting-a-pr">Before submitting a PR</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="get_involved.html">Get Involved</a><ul> <li class="liClosed"> <a class="reference internal" href="get_involved.html#where-to-start">Where to Start?</a></li> <li class="liClosed"> <a class="reference internal" href="get_involved.html#sandbox">Sandbox</a></li> <li class="liClosed"> <a class="reference internal" href="get_involved.html#contribute-an-example">Contribute an Example</a></li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="internal.html">Internal Classes</a><ul> <li class="liClosed"> <a class="reference internal" href="internal.html#module-reference">Module Reference</a><ul> <li class="liClosed"> <a class="reference internal" href="internal.html#model-and-results-classes">Model and Results Classes</a></li> <li class="liClosed"> <a class="reference internal" href="internal.html#linear-model">Linear Model</a></li> <li class="liClosed"> <a class="reference internal" href="internal.html#generalized-linear-model">Generalized Linear Model</a></li> <li class="liClosed"> <a class="reference internal" href="internal.html#discrete-model">Discrete Model</a></li> <li class="liClosed"> <a class="reference internal" href="internal.html#robust-model">Robust Model</a></li> <li class="liClosed"> <a class="reference internal" href="internal.html#vector-autoregressive-model">Vector Autoregressive Model</a></li> </ul> </li> </ul> </li> <li class="liClosed"> <a class="reference internal" href="testing.html">Testing on Build Machines</a></li> </ul> </div> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../index.html">Table of Contents</a></h3> <ul> <li><a class="reference internal" href="#">Developer Page</a><ul> <li><a class="reference internal" href="#submitting-a-bug-report">Submitting a Bug Report</a></li> <li><a class="reference internal" href="#making-changes-to-the-code">Making Changes to the Code</a></li> <li><a class="reference internal" href="#how-to-submit-a-pull-request">How to Submit a Pull Request</a></li> <li><a class="reference internal" href="#mailing-list">Mailing List</a></li> <li><a class="reference internal" href="#license">License</a></li> <li><a class="reference internal" href="#contents">Contents</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="../pitfalls.html" title="previous chapter">Pitfalls</a></p> <h4>Next topic</h4> <p class="topless"><a href="git_notes.html" title="next chapter">Working with the statsmodels Code</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/dev/index.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer" role="contentinfo"> &#169; Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2. </div> </body> </html>
{'content_hash': 'f4aafee3d96de191b023ea7fe780c930', 'timestamp': '', 'source': 'github', 'line_count': 343, 'max_line_length': 368, 'avg_line_length': 62.27696793002915, 'alnum_prop': 0.6972988155985207, 'repo_name': 'statsmodels/statsmodels.github.io', 'id': 'b485676ffae2128d5df06ad27689c8015fed5f5c', 'size': '21374', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'v0.10.0/dev/index.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
/* * =require twitter-bootstrap-static/bootstrap Use Font Awesome icons (default) To use Glyphicons sprites instead of Font Awesome, replace with "require twitter-bootstrap-static/sprites" =require twitter-bootstrap-static/fontawesome */
{'content_hash': '23debcd107f8295e7068f549112b1e1c', 'timestamp': '', 'source': 'github', 'line_count': 7, 'max_line_length': 108, 'avg_line_length': 35.57142857142857, 'alnum_prop': 0.7751004016064257, 'repo_name': 'presidentbeef/inject-some-sql', 'id': '721eb34a6c28c4d78fd74bd4546620b66b7496b0', 'size': '249', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'rails5/app/assets/stylesheets/bootstrap_and_overrides.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2747'}, {'name': 'CoffeeScript', 'bytes': '307'}, {'name': 'HTML', 'bytes': '47254'}, {'name': 'JavaScript', 'bytes': '2785'}, {'name': 'Less', 'bytes': '4977'}, {'name': 'Ruby', 'bytes': '135649'}, {'name': 'Shell', 'bytes': '6066'}]}
#ifndef RESIZE_ANCHOR_HPP #define RESIZE_ANCHOR_HPP namespace interface { enum class HorizontalAnchor { Left, Center, Right }; enum class VerticalAnchor { Top, Center, Bottom }; } #endif
{'content_hash': '1fe12fec54abfd3cf4710c70bd221571', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 31, 'avg_line_length': 12.157894736842104, 'alnum_prop': 0.6190476190476191, 'repo_name': 'mnewhouse/izieditor', 'id': '4b7b2b84d6b8cf3d0e296f20f0290a375f0b978e', 'size': '1368', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/interface/resize_anchor.hpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ada', 'bytes': '89080'}, {'name': 'Assembly', 'bytes': '138199'}, {'name': 'Batchfile', 'bytes': '3756'}, {'name': 'C', 'bytes': '2375086'}, {'name': 'C#', 'bytes': '54012'}, {'name': 'C++', 'bytes': '736413'}, {'name': 'CLIPS', 'bytes': '5291'}, {'name': 'CMake', 'bytes': '26875'}, {'name': 'DIGITAL Command Language', 'bytes': '37170'}, {'name': 'Groff', 'bytes': '207028'}, {'name': 'HTML', 'bytes': '29824'}, {'name': 'Makefile', 'bytes': '18578'}, {'name': 'Module Management System', 'bytes': '2705'}, {'name': 'Objective-C', 'bytes': '30562'}, {'name': 'Pascal', 'bytes': '42411'}, {'name': 'Perl', 'bytes': '3895'}, {'name': 'SAS', 'bytes': '1847'}, {'name': 'Shell', 'bytes': '350922'}]}
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>generic-environments: Not compatible 👼</title> <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" /> <link href="../../../../../bootstrap.min.css" rel="stylesheet"> <link href="../../../../../bootstrap-custom.css" rel="stylesheet"> <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> <script src="../../../../../moment.min.js"></script> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <div class="container"> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> <div class="navbar-header"> <a class="navbar-brand" href="../../../../.."><i class="fa fa-lg fa-flag-checkered"></i> Coq bench</a> </div> <div id="navbar" class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li><a href="../..">clean / released</a></li> <li class="active"><a href="">8.10.1 / generic-environments - 8.5.0</a></li> </ul> </div> </div> </div> <div class="article"> <div class="row"> <div class="col-md-12"> <a href="../..">« Up</a> <h1> generic-environments <small> 8.5.0 <span class="label label-info">Not compatible 👼</span> </small> </h1> <p>📅 <em><script>document.write(moment("2022-05-26 23:20:04 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-05-26 23:20:04 UTC)</em><p> <h2>Context</h2> <pre># Packages matching: installed # Name # Installed # Synopsis base-bigarray base base-threads base base-unix base conf-findutils 1 Virtual package relying on findutils coq 8.10.1 Formal proof management system num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic ocaml 4.07.1 The OCaml compiler (virtual package) ocaml-base-compiler 4.07.1 Official release 4.07.1 ocaml-config 1 OCaml Switch Configuration ocamlfind 1.9.3 A library manager for OCaml # opam file: opam-version: &quot;2.0&quot; maintainer: &quot;[email protected]&quot; homepage: &quot;https://github.com/coq-contribs/generic-environments&quot; license: &quot;LGPL&quot; build: [make &quot;-j%{jobs}%&quot;] install: [make &quot;install&quot;] remove: [&quot;rm&quot; &quot;-R&quot; &quot;%{lib}%/coq/user-contrib/GenericEnvironments&quot;] depends: [ &quot;ocaml&quot; &quot;coq&quot; {&gt;= &quot;8.5&quot; &amp; &lt; &quot;8.6~&quot;} ] tags: [ &quot;keyword:generic environments&quot; &quot;keyword:typing&quot; &quot;keyword:type theory&quot; &quot;category:Mathematics/Logic/Type theory&quot; ] authors: [ &quot;Emmanuel Polonowski &lt;[email protected]&gt;&quot; ] bug-reports: &quot;https://github.com/coq-contribs/generic-environments/issues&quot; dev-repo: &quot;git+https://github.com/coq-contribs/generic-environments.git&quot; synopsis: &quot;Generic_Environments&quot; description: &quot;Generic_Environments is a library which provides an abstract data type of environments, as a functor parameterized by a module defining variables, and a function which builds environments for such variables with any Type of type. Usual operations over environments are defined, along with an extensive set of basic and more advanced properties. Moreover, an implementation using lists satisfying and all the required properties is provided.&quot; flags: light-uninstall url { src: &quot;https://github.com/coq-contribs/generic-environments/archive/v8.5.0.tar.gz&quot; checksum: &quot;md5=15f3c00405641fa97a285f0793057dc1&quot; } </pre> <h2>Lint</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Dry install 🏜️</h2> <p>Dry install with the current Coq version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam install -y --show-action coq-generic-environments.8.5.0 coq.8.10.1</code></dd> <dt>Return code</dt> <dd>5120</dd> <dt>Output</dt> <dd><pre>[NOTE] Package coq is already installed (current version is 8.10.1). The following dependencies couldn&#39;t be met: - coq-generic-environments -&gt; coq &lt; 8.6~ -&gt; ocaml &lt; 4.06.0 base of this switch (use `--unlock-base&#39; to force) No solution found, exiting </pre></dd> </dl> <p>Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:</p> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>opam remove -y coq; opam install -y --show-action --unlock-base coq-generic-environments.8.5.0</code></dd> <dt>Return code</dt> <dd>0</dd> </dl> <h2>Install dependencies</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Install 🚀</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Duration</dt> <dd>0 s</dd> </dl> <h2>Installation size</h2> <p>No files were installed.</p> <h2>Uninstall 🧹</h2> <dl class="dl-horizontal"> <dt>Command</dt> <dd><code>true</code></dd> <dt>Return code</dt> <dd>0</dd> <dt>Missing removes</dt> <dd> none </dd> <dt>Wrong removes</dt> <dd> none </dd> </dl> </div> </div> </div> <hr/> <div class="footer"> <p class="text-center"> Sources are on <a href="https://github.com/coq-bench">GitHub</a> © Guillaume Claret 🐣 </p> </div> </div> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script> <script src="../../../../../bootstrap.min.js"></script> </body> </html>
{'content_hash': '57f46af097214cef88b25c1af9277874', 'timestamp': '', 'source': 'github', 'line_count': 162, 'max_line_length': 454, 'avg_line_length': 44.21604938271605, 'alnum_prop': 0.5594024849923217, 'repo_name': 'coq-bench/coq-bench.github.io', 'id': 'df28a3c62558fca10fb768f76d7c3b8a2349cf10', 'size': '7188', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.07.1-2.0.6/released/8.10.1/generic-environments/8.5.0.html', 'mode': '33188', 'license': 'mit', 'language': []}
// ag-grid-ng2 v6.2.0 /** * This file is generated by the Angular 2 template compiler. * Do not edit. */ /* tslint:disable */ "use strict"; var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; var import1 = require('@angular/core/src/linker/view'); var import2 = require('@angular/core/src/linker/element'); var import3 = require('./agGridColumn'); var import4 = require('@angular/core/src/linker/query_list'); var import7 = require('@angular/core/src/linker/view_type'); var import8 = require('@angular/core/src/change_detection/change_detection'); var import9 = require('@angular/core/src/metadata/view'); var import10 = require('@angular/core/src/linker/component_factory'); var renderType_AgGridColumn_Host = null; var _View_AgGridColumn_Host0 = (function (_super) { __extends(_View_AgGridColumn_Host0, _super); function _View_AgGridColumn_Host0(viewUtils, parentInjector, declarationEl) { _super.call(this, _View_AgGridColumn_Host0, renderType_AgGridColumn_Host, import7.ViewType.HOST, viewUtils, parentInjector, declarationEl, import8.ChangeDetectorStatus.CheckAlways); } _View_AgGridColumn_Host0.prototype.createInternal = function (rootSelector) { this._el_0 = this.selectOrCreateHostElement('ag-grid-column', rootSelector, null); this._appEl_0 = new import2.AppElement(0, null, this, this._el_0); var compView_0 = viewFactory_AgGridColumn0(this.viewUtils, this.injector(0), this._appEl_0); this._AgGridColumn_0_4 = new import3.AgGridColumn(); this._query_AgGridColumn_0_0 = new import4.QueryList(); this._appEl_0.initComponent(this._AgGridColumn_0_4, [], compView_0); compView_0.create(this._AgGridColumn_0_4, this.projectableNodes, null); this.init([].concat([this._el_0]), [this._el_0], [], []); return this._appEl_0; }; _View_AgGridColumn_Host0.prototype.injectorGetInternal = function (token, requestNodeIndex, notFoundResult) { if (((token === import3.AgGridColumn) && (0 === requestNodeIndex))) { return this._AgGridColumn_0_4; } return notFoundResult; }; _View_AgGridColumn_Host0.prototype.detectChangesInternal = function (throwOnChange) { this.detectContentChildrenChanges(throwOnChange); if (!throwOnChange) { if (this._query_AgGridColumn_0_0.dirty) { this._query_AgGridColumn_0_0.reset([this._AgGridColumn_0_4]); this._AgGridColumn_0_4.childColumns = this._query_AgGridColumn_0_0; this._query_AgGridColumn_0_0.notifyOnChanges(); } } this.detectViewChildrenChanges(throwOnChange); }; return _View_AgGridColumn_Host0; }(import1.AppView)); function viewFactory_AgGridColumn_Host0(viewUtils, parentInjector, declarationEl) { if ((renderType_AgGridColumn_Host === null)) { (renderType_AgGridColumn_Host = viewUtils.createRenderComponentType('', 0, import9.ViewEncapsulation.None, [], {})); } return new _View_AgGridColumn_Host0(viewUtils, parentInjector, declarationEl); } exports.AgGridColumnNgFactory = new import10.ComponentFactory('ag-grid-column', viewFactory_AgGridColumn_Host0, import3.AgGridColumn); var styles_AgGridColumn = []; var renderType_AgGridColumn = null; var _View_AgGridColumn0 = (function (_super) { __extends(_View_AgGridColumn0, _super); function _View_AgGridColumn0(viewUtils, parentInjector, declarationEl) { _super.call(this, _View_AgGridColumn0, renderType_AgGridColumn, import7.ViewType.COMPONENT, viewUtils, parentInjector, declarationEl, import8.ChangeDetectorStatus.CheckAlways); } _View_AgGridColumn0.prototype.createInternal = function (rootSelector) { var parentRenderNode = this.renderer.createViewRoot(this.declarationAppElement.nativeElement); this.init([], [], [], []); return null; }; return _View_AgGridColumn0; }(import1.AppView)); function viewFactory_AgGridColumn0(viewUtils, parentInjector, declarationEl) { if ((renderType_AgGridColumn === null)) { (renderType_AgGridColumn = viewUtils.createRenderComponentType('', 0, import9.ViewEncapsulation.None, styles_AgGridColumn, {})); } return new _View_AgGridColumn0(viewUtils, parentInjector, declarationEl); } exports.viewFactory_AgGridColumn0 = viewFactory_AgGridColumn0;
{'content_hash': '1bf4f3b05a7ae71800e3f247621e8c05', 'timestamp': '', 'source': 'github', 'line_count': 84, 'max_line_length': 189, 'avg_line_length': 54.083333333333336, 'alnum_prop': 0.6971164428791548, 'repo_name': 'mehrdadrad/mylg', 'id': '3f33023afd8a11858d3dbc4662602f248d7a9627', 'size': '4543', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'services/dashboard/assets-dev/js/vendor/ag-grid-ng2/lib/agGridColumn.ngfactory.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '25189'}, {'name': 'Dockerfile', 'bytes': '215'}, {'name': 'Go', 'bytes': '3556779'}, {'name': 'HTML', 'bytes': '12698'}, {'name': 'JavaScript', 'bytes': '7851'}, {'name': 'TypeScript', 'bytes': '17940'}]}
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateAnimalsTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('animals', function(Blueprint $table) { $table->increments('id'); // Auto incrementing Primary Key. $table->string('profile_photo')->nullable(); $table->string('shelter_code')->unique()->nullable(); $table->date('date_in'); $table->date('date_out')->nullable(); $table->string('name'); $table->date('dob'); // Date of birth $table->string('description'); $table->string('comments')->nullable(); $table->integer('species_id')->unsigned(); $table->foreign('species_id')->references('id')->on('species'); $table->integer('breed_id')->unsigned(); $table->foreign('breed_id')->references('id')->on('breeds'); $table->integer('status_id')->unsigned(); $table->foreign('status_id')->references('id')->on('status'); $table->integer('user_id')->unsigned()->nullable(); $table->foreign('user_id')->references('id')->on('users'); $table->timestamps(); }); } /** * Reverse the migrations. * * @return void */ public function down() { Schema::dropIfExists('animals'); } }
{'content_hash': '5730dc9fc8141f05f15d8b5947841dc9', 'timestamp': '', 'source': 'github', 'line_count': 52, 'max_line_length': 66, 'avg_line_length': 24.71153846153846, 'alnum_prop': 0.6233463035019455, 'repo_name': '2dan-devs/animalshelter', 'id': 'a2dde4c2f7d5a63a8c169d2afcf8a5782f97bc7f', 'size': '1285', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/database/migrations/2014_12_21_215546_create_animals_table.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '24476'}, {'name': 'CSS', 'bytes': '22446'}, {'name': 'HTML', 'bytes': '33164'}, {'name': 'JavaScript', 'bytes': '131683'}, {'name': 'PHP', 'bytes': '169638'}]}
using System; using System.Collections.Generic; using Azure.Core; namespace Azure.ResourceManager.Monitor.Models { /// <summary> The details of the test notification results. </summary> public partial class NotificationStatus { /// <summary> Initializes a new instance of NotificationStatus. </summary> /// <param name="state"> The overall state. </param> /// <exception cref="ArgumentNullException"> <paramref name="state"/> is null. </exception> internal NotificationStatus(string state) { Argument.AssertNotNull(state, nameof(state)); State = state; ActionDetails = new ChangeTrackingList<NotificationActionDetail>(); } /// <summary> Initializes a new instance of NotificationStatus. </summary> /// <param name="context"> The context info. </param> /// <param name="state"> The overall state. </param> /// <param name="completedOn"> The completed time. </param> /// <param name="createdOn"> The created time. </param> /// <param name="actionDetails"> The list of action detail. </param> internal NotificationStatus(NotificationContext context, string state, DateTimeOffset? completedOn, DateTimeOffset? createdOn, IReadOnlyList<NotificationActionDetail> actionDetails) { Context = context; State = state; CompletedOn = completedOn; CreatedOn = createdOn; ActionDetails = actionDetails; } /// <summary> The context info. </summary> public NotificationContext Context { get; } /// <summary> The overall state. </summary> public string State { get; } /// <summary> The completed time. </summary> public DateTimeOffset? CompletedOn { get; } /// <summary> The created time. </summary> public DateTimeOffset? CreatedOn { get; } /// <summary> The list of action detail. </summary> public IReadOnlyList<NotificationActionDetail> ActionDetails { get; } } }
{'content_hash': '292869a3aa39650bfde41bdbb758632b', 'timestamp': '', 'source': 'github', 'line_count': 47, 'max_line_length': 189, 'avg_line_length': 43.97872340425532, 'alnum_prop': 0.6366715045960329, 'repo_name': 'Azure/azure-sdk-for-net', 'id': '46f3b18d13ce74133901fcd73da6e168347297e1', 'size': '2205', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'sdk/monitor/Azure.ResourceManager.Monitor/src/Generated/Models/NotificationStatus.cs', 'mode': '33188', 'license': 'mit', 'language': []}
module.exports = function (express) { var router = express.Router(); router.get(['/'], function (req, res) { res.render('main/views/index'); }); return router; };
{'content_hash': 'a8abfb01b73dcafa42095c43b29f05a3', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 41, 'avg_line_length': 19.666666666666668, 'alnum_prop': 0.6101694915254238, 'repo_name': 'Ibanheiz/ibanheiz.com', 'id': '4f8a5b5259c8553337dbb87466a30a861bddc2c3', 'size': '177', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'back/modules/main/routes.js', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '17589'}, {'name': 'HTML', 'bytes': '7790'}, {'name': 'JavaScript', 'bytes': '33633'}]}
package com.amazonservices.mws.products.samples; import java.util.*; import javax.xml.datatype.XMLGregorianCalendar; import java.math.BigDecimal; import com.amazonservices.mws.client.*; import com.amazonservices.mws.products.*; import com.amazonservices.mws.products.model.*; /** Sample call for GetMyPriceForASIN. */ public class GetMyPriceForASINSample { /** * Call the service, log response and exceptions. * * @param client * @param request * * @return The response. */ public static GetMyPriceForASINResponse invokeGetMyPriceForASIN( MarketplaceWebServiceProducts client, GetMyPriceForASINRequest request) { try { // Call the service. GetMyPriceForASINResponse response = client.getMyPriceForASIN(request); ResponseHeaderMetadata rhmd = response.getResponseHeaderMetadata(); // We recommend logging every the request id and timestamp of every call. System.out.println("Response:"); System.out.println("RequestId: "+rhmd.getRequestId()); System.out.println("Timestamp: "+rhmd.getTimestamp()); String responseXml = response.toXML(); System.out.println(responseXml); return response; } catch (MarketplaceWebServiceProductsException ex) { // Exception properties are important for diagnostics. System.out.println("Service Exception:"); ResponseHeaderMetadata rhmd = ex.getResponseHeaderMetadata(); if(rhmd != null) { System.out.println("RequestId: "+rhmd.getRequestId()); System.out.println("Timestamp: "+rhmd.getTimestamp()); } System.out.println("Message: "+ex.getMessage()); System.out.println("StatusCode: "+ex.getStatusCode()); System.out.println("ErrorCode: "+ex.getErrorCode()); System.out.println("ErrorType: "+ex.getErrorType()); throw ex; } } /** * Command line entry point. */ public static void main(String[] args) { // Get a client connection. // Make sure you've set the variables in MarketplaceWebServiceProductsSampleConfig. MarketplaceWebServiceProductsClient client = MarketplaceWebServiceProductsSampleConfig.getClient(); // Create a request. GetMyPriceForASINRequest request = new GetMyPriceForASINRequest(); String sellerId = "example"; request.setSellerId(sellerId); String mwsAuthToken = "example"; request.setMWSAuthToken(mwsAuthToken); String marketplaceId = "example"; request.setMarketplaceId(marketplaceId); ASINListType asinList = new ASINListType(); request.setASINList(asinList); // Make the call. GetMyPriceForASINSample.invokeGetMyPriceForASIN(client, request); } }
{'content_hash': '054f062c1a111d5235bfd23804807b50', 'timestamp': '', 'source': 'github', 'line_count': 79, 'max_line_length': 107, 'avg_line_length': 37.0, 'alnum_prop': 0.6503592199794731, 'repo_name': 'Ac2zoom/giftgenie.io', 'id': '9a103cdac6d4f65a4347455db05143a3609be82e', 'size': '3731', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/com/amazonservices/mws/products/samples/GetMyPriceForASINSample.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '22939'}, {'name': 'Java', 'bytes': '762357'}, {'name': 'JavaScript', 'bytes': '5031'}]}
Develop a [magic mirror](https://www.raspberrypi.org/blog/magic-mirror/) using c#, Raspberry Pi... The project is not finalized. It takes a two way mirror, stuffs a monitor behind it, and then powers the whole thing with a Raspberry Pi running windows 10 IoT. This means that it pulls data from an application set up on the Pi, so you can easily update and create your own display with little coding skills. I would like to integrate cortana and another web services. ## Installation Donwload the code and use Visual Studio to compile. ## State In progress.
{'content_hash': 'f044c276566d6d759ef4e0c6299703fc', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 278, 'avg_line_length': 43.46153846153846, 'alnum_prop': 0.7716814159292036, 'repo_name': 'phalax8/magicMirror', 'id': '37e6bd093d3b48ce117b9b5ec2c8e02e99d87f75', 'size': '582', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '92735'}, {'name': 'HTML', 'bytes': '32468'}, {'name': 'Smalltalk', 'bytes': '20'}]}
# $Id: slewiki.rb 163 2006-05-25 13:04:10Z taki $ # Copyright (C) 2004-2005 hiroyuki taki <[email protected]> # # module SleWiki # module SleWiki VERSION = '0.2.6' require 'cgi' require 'cgi/session' require 'erb' require 'digest/sha2' require 'lib/utils' require 'lib/stringutils' require 'lib/gzip' if RUBY_VERSION > "1.8.0" require 'fileutils' else require 'lib/fileutils' end # # class Page # definition a Page. # class Page def initialize(cgi) @cgi = cgi end def store_read(path=nil) PageStore.new(@cgi, @page_id, path).read end ####### public ####### def Page.index Page.path.each do |filename| yield filename end end def Page.path Dir.glob("#{Config[:store_path]}/**/*#{Config[:store_extname]}") end end # # class ViewPage # definition a ViewPage. # class ViewPage < Page def initialize(cgi, page_id=nil) super(cgi) if page_id @page_id = page_id else @page_id = @cgi.escape_param('page_id').escape end end def output text = "<h2>#{@page_id.unescape}</h2>" text << store_read Html.new(@cgi, text) end end # # class HistoryPage # definition a HistoryPage. # class HistoryPage < ViewPage def output text = '' (1..Config[:history_generation]).each do |generation| path = Config[:store_path] + "/#{@page_id}#{Config[:store_extname]}.#{generation.to_s}" if File.exist?(path.untaint) text << "<h2>#{@page_id.unescape}#{generation.to_s}#{Msg['before_generation']}</h2>" text << store_read(path) end end Html.new(@cgi, text) end end # # class EditPage # definition a EditPage. # class EditPage < Page def initialize(cgi) super @page_id = cgi.escape_param('page_id').escape end def output @title = @page_id.unescape @text = store_read @text = Format::input_format(@text) Html.new(@cgi, erb("editform.rhtml")) end end # # class ListPage # definition a ListPage. # class ListPage < Page ####### private ####### def title Msg["page_list"] end def list_format filename = nil text = '' text << "<h2>#{title}</h2>\n" text << "<table class='list'>\n" text << "<tr class='listtitle'>\n" text << "<th class='list'>#{Msg['page_name']}</th>\n" text << "<th class='list'>#{Msg['last_modified']}</th>\n" text << "</tr>\n" index do |filename| text << yield(filename) end text << "</table>" if filename == nil text = "<h2>#{title}</h2>" text << Msg["no_page"] end Html.new(@cgi, text) end def index Page.path.sort_by {|name| name.downcase }. each do |filename| yield filename end end ####### public ####### def output list_format do |filename| list = "<tr class='listbody'>" list << "<td>#{Format::make_link(filename)}</td>" list << "<td>" list << File.mtime(filename.untaint).format_date list << "</td>" list << "</tr>" list << "\n" end end end # # class RecentPage # definition a RecentPage. # class RecentPage < ListPage def title Msg["recent_list"] end def index # A file is sorted in the new order of updating time. Page.path.sort_by {|f| File.mtime(f.untaint).to_i }.reverse. each do |filename| yield filename end end end # # class TopPage # definition a TopPage. # class TopPage < Page def TopPage.system_page_list list = [] list << "[#{Msg['list']}]" list << "[#{Msg['recent']}]" end def TopPage.system_page_list?(page) TopPage.system_page_list.each do |list| if list == page return true end end return false end def TopPage.change_list user_page_list = Page.path.collect do |list| list = TopPage.get_pass(list) end change_list = system_page_list + user_page_list end def TopPage.now toppage = Config[:top_page] toppage = TopPage.get_pass(toppage) end def output if TopPage.now == "[#{Msg['list']}]" ListPage.new(@cgi).output return end if TopPage.now == "[#{Msg['recent']}]" RecentPage.new(@cgi).output return end ViewPage.new(@cgi, TopPage.now.escape).output end private def TopPage.get_pass(list) list = list.unescape list = list.sub(%r|#{Config[:store_path]}/|, '') list = list.sub(%r|#{Config[:store_extname]}|, '') end end # # class AuthPage # definition a Auth. # class AuthPage < Page def auth_check begin boolean = Auth.simple_auth(@cgi) return boolean rescue Auth::AuthError Html.new(@cgi, erb("authpage.rhtml")) return false end end end class AdminPage < Page def process title_change thema_change toppage_change if Config[:auth] == "private" or Config[:auth] == "protect" auth_change end TopPage.new(@cgi).output end def title_change title = @cgi.escape_param('title') return if title == Config[:title] return if title == '' ConfigWrite.init do ConfigWrite.write('title', title) end end def thema_change return if Thema.now == @cgi.escape_param('thema') thema = @cgi.escape_param('thema') ConfigWrite.init do ConfigWrite.write('css_path', "./theme/#{thema}/#{thema}.css") end end def toppage_change return if TopPage.now == @cgi.escape_param('toppage') toppage = @cgi.escape_param('toppage') if TopPage.system_page_list?(toppage) toppage = "#{Config[:store_path]}/" + toppage.escape + Config[:store_extname] end ConfigWrite.init do ConfigWrite.write('top_page', "#{toppage}") end end def auth_change user = @cgi.escape_param('user') pass = @cgi.escape_param('pass') return if user == '' or pass == '' begin Auth::user_regist(@cgi, user, pass) rescue Auth::RegistError Html.new(@cgi, erb("authpage.rhtml")) return false end ConfigWrite.init do ConfigWrite.write('auth', true) ConfigWrite.write('auth_user', user) ConfigWrite.write('auth_pass', Digest::SHA256.hexdigest(pass)) end end end class PageStore require 'lib/filelock' def initialize(cgi, page_id, path=nil) @cgi = cgi @page_id = page_id if path @path = path else @path = Config[:store_path] + "/#{page_id}#{Config[:store_extname]}" end @path.untaint end def write(text, path=nil) if path @path = path else @path = @path.escape if @cgi.escape_param('act') == "make_page" write_prep end end History.new(@path).history begin Filelock::lock(@path) do File.open(@path, 'w') do |file| file.write(text) end end rescue Filelock::FilelockError Html.new(@cgi, Msg["lock"]) exit end if path == nil and @cgi.escape_param('act') == "make_page" Format::allset_auto_link(@cgi, File.basename(@path, Config[:store_extname]).unescape) end end def read begin File.open(@path, 'r') do |file| file.read end rescue Errno::ENOENT Html.new(@cgi, Msg["no_store_file"]) exit end end def delete @path = @path.escape History.new(@path).history Format::allset_auto_link(@cgi, File.basename(@path, Config[:store_extname]).unescape) Html.new(@cgi, Msg["delete_complete"]) exit end private def write_prep if %r|\.{2}\/| =~ @path Html.new(@cgi, Msg["theme_nameerror"]) exit end if @page_id and @page_id[0].chr == '.' Html.new(@cgi, Msg["head_dotword"]) exit end if FileTest.exist?(@path) Html.new(@cgi, Msg["word_define"]) exit end FileUtils.mkdir_p(File.dirname(@path)) end end # # class Write # definition a Write. # class Write def initialize(cgi) @cgi = cgi end ####### private ####### def title title = @cgi.escape_param('title') if title.empty? title = Time.now.to_i.to_s end title end def text text = @cgi.escape_param('text') text = Format::output_format(text, title) delete_check(text) if @cgi.escape_param('act') == "edit_write" text_check(text) if @cgi.escape_param('act') == "edit_write" text end def text_check(text) old_text = PageStore.new(@cgi, title.escape, nil).read if text == old_text Html.new(@cgi, Msg["text_equal"]) exit end end def delete_check(text) if text.empty? PageStore.new(@cgi, title).delete end end ####### public ####### def write PageStore.new(@cgi, title).write(text) end end # # class Backup # definition a Backup. # class Backup def initialize @backup_dir = Config[:store_path] @backup_time_f = "#{@backup_dir}/backuptime" @interval = Config[:backup_interval] backup end def backup if timing_check? Page.index do |path| path = path.untaint FileUtils.copy(path, path + ".bak") end write_backup_time(Time.now.to_i.to_s) end end def timing_check? if Time.now > read_backup_time() + @interval true else false end end def read_backup_time begin open(@backup_time_f, "r") do |file| backup_time = Time.at(file.read.chomp.to_i) end rescue Errno::ENOENT backup_time = Time.at(0) rescue raise end end def write_backup_time(time) open(@backup_time_f, "w") do |file| file.puts time end end end class History def initialize(path) @path = path end def history (Config[:history_generation]).downto(1) do |generation| from_path = @path + from_gene(generation) if File.exist?(from_path) FileUtils.mv(from_path, @path + ".#{generation.to_s}") end end end private def from_gene(generation) if generation == 1 generation = "" else "." + (generation - 1).to_s end end end # # module Thema # definition a Thema. # module Thema module_function def index entries = Dir.entries(Config[:theme_path]) thema_pass = entries.delete_if{|path| File.file?(path.untaint) } thema_pass = entries.delete_if{|path| path[0].chr == '.' } thema_pass = entries.delete_if{|path| path == 'template' } end def now thema_re = %r|\./theme/(.+)/.+\.css| if thema_re =~ Config[:css_path] now_thema = $1 end end end # # module Format # definition a Format. # module Format module_function URL_RE = %r{((?:https?|ftp)://[-!a-zA-Z0-9\.\/+#_?~&%=^\\@:;,'"*()]+)} # input_format process and output_format process always pair. # output_format convert # input_format change back def input_format(text) text = text.gsub(/<br>/, "\r\n") text = text.gsub(/<a href=.*?>/, "") # adhoc delete a tag text = text.gsub(/<\/a>/, "") # adhoc delete a tag text = text.gsub(/&nbsp;/, " ") end def output_format(text, title=nil) clean_white_space!(text) if Config[:auto_link] == false return format_text = url_convert(text) end if URL_RE =~ text format_text = '' format_text << auto_link($PREMATCH, title) format_text << url_convert($MATCH) while URL_RE =~ post_match = $POSTMATCH format_text << auto_link($PREMATCH, title) format_text << url_convert($MATCH) end format_text << auto_link(post_match, title) else format_text = auto_link(text, title) end format_text.gsub(/<br>[ ]+/){ $MATCH.gsub(/[ ]/, '&nbsp;') } end def auto_link(text, title) path = Page.path # store empty return text if path == [] page_list = path.collect do |path| basename = File.basename(path, Config[:store_extname]).unescape # ÊÔ½¸¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë¤ÈƱ¤¸Ì¾Á°¤Î¾ì¹ç¥ê¥ó¥¯¤·¤Ê¤¤ if title and title == basename nil else Regexp::quote(basename) end end page_list = /#{page_list.compact.reverse.join('|')}/ text.gsub(page_list){|word| make_link(page_filename(word.escape), word)} end def allset_auto_link(cgi, str) Page.index do |path| page = PageStore.new(cgi, nil, path) old_text = page.read if old_text.include?(str) text = input_format(old_text) change_text = output_format(text) if old_text != change_text page.write(change_text, path) end end end end def page_title(filename) /#{Config[:store_path]}\/(.+)#{Config[:store_extname]}/ =~ filename page_title = $1 end def page_filename(title) Page.path.each do |path| if path.include?(title + Config[:store_extname]) return path end end end def make_link(filename, title=nil) page_id = page_title(filename) title = page_id.unescape if title == nil text = '' text << %Q|<a href="#{Config[:indexpath]}?act=view&amp;| text << %Q|page_id=#{page_id}">#{title}</a>| text end def url_convert(text) text.gsub(URL_RE){%Q|<a href="#{$1}">#{$1}</a>|} end def clean_white_space!(text) text.gsub!(/\r\n/, "<br>") text.gsub!(/\r/, "<br>") text.gsub!(/\n/, "<br>") z_space = "\241\241" # Á´³Ñ ¥¹¥Ú¡¼¥¹ text.gsub!(/<br>[ \t#{z_space}]+<br>/, "<br><br>") text.gsub!(/(?:<br>)+$/, '') # ¹ÔËö²þ¹Ô¥«¥Ã¥È text.gsub!(/(?:<br>){11,}/, "<br>" * 10) # 11¹Ô°Ê¾å¤Î²þ¹Ô¤Ï10¹Ô¤ËÀÚ¤êµÍ¤á¤ë text end end # # class Distribute # definition a Distribute. # class Distribute def initialize @cgi = CGI.new if Config[:auth] == "private" if AuthPage.new(@cgi).auth_check == false return end end Backup.new if @cgi.escape_param('act') and @cgi.escape_param('act') != "" __send__(@cgi.escape_param('act')) else top_page end end ####### private ####### ##¸½ºß¤Î¥Ú¡¼¥¸¤Ë´Ø¤¹¤ëÁàºî def view ViewPage.new(@cgi).output end def edit if AuthPage.new(@cgi).auth_check EditPage.new(@cgi).output end end def edit_write Security.check(@cgi) if AuthPage.new(@cgi).auth_check Write.new(@cgi).write redirect(@cgi, Config[:indexpath]) end end def history HistoryPage.new(@cgi).output end ###### def new_page if AuthPage.new(@cgi).auth_check Html.new(@cgi, erb("pageform.rhtml")) end end def make_page Security.check(@cgi) if AuthPage.new(@cgi).auth_check Write.new(@cgi).write redirect(@cgi, Config[:indexpath]) end end def list ListPage.new(@cgi).output end def recent RecentPage.new(@cgi).output end def top_page TopPage.new(@cgi).output end def admin if AuthPage.new(@cgi).auth_check Html.new(@cgi, erb("admin.rhtml")) end end def adminedit Security.check(@cgi) if AuthPage.new(@cgi).auth_check AdminPage.new(@cgi).process end end def search require 'lib/search' search_text = @cgi.escape_param('search_text') Html.new(@cgi, Search.search(search_text)) end ###### def method_missing(message) Html.new(@cgi, Msg["method_missing"] + message.to_s) exit end end # # class Html # definition a Html. # class Html def initialize(cgi, body) @cgi = cgi make(body) end ####### private ####### def make(body) html = '' html << erb("header.rhtml") html << body html << erb("footer.rhtml") send(html) end def head head = { 'charset' => 'euc-jp', 'language' => 'ja', 'Cache-Control' => 'no-cache', 'Pragma' => 'no-cache', } if Gzip::exec?(@cgi) gzip_head = {'Content-Encoding' => 'gzip'} head.update(gzip_head) end return head end def send(page) if Gzip::exec?(@cgi) print @cgi.header(head()) Gzip::write(@cgi, page) else @cgi.out(head()){page} end end end # # module Security # definition a Security. # module Security def Security.check(cgi) random_num_check(cgi) request_method_check(cgi) end def Security.set_random_num random_num = rand ConfigWrite.init do ConfigWrite.write('random_num', random_num) end return random_num end private def Security.get_random_num random_num = SleWiki::Config[:random_num] return random_num end def Security.random_num_check(cgi) if cgi.escape_param('random_num') != get_random_num Html.new(cgi, Msg["random_num_error"]) exit end end def Security.request_method_check(cgi) if /post/i !~ cgi.request_method Html.new(cgi, Msg["getmethod_error"]) exit end end end # # module Msg # definition a Msg. # module Msg DEFINE = {} File.open("./msg_j.cfg"){|file| file.read.each_line do |line| next if /^#/ =~ line defkey, value = line.chomp.split(/\s+/) DEFINE[defkey] = value end } def self.[](key) DEFINE[key] ||= DEFINE["msg_no_define"] + key end end end
{'content_hash': '351f980e05e817735495091f2144ca8d', 'timestamp': '', 'source': 'github', 'line_count': 982, 'max_line_length': 95, 'avg_line_length': 20.191446028513237, 'alnum_prop': 0.49989913253984264, 'repo_name': 'tflare/SleWiki', 'id': 'f16e3341bf7181931e80def9d4f8264b723531a9', 'size': '19828', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'slewiki.rb', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Ruby', 'bytes': '127486'}]}
package server import ( "fmt" "math" "math/rand" "testing" "time" "github.com/tidwall/geojson" "github.com/tidwall/geojson/geometry" "github.com/tidwall/tile38/internal/field" "github.com/tidwall/tile38/internal/object" ) type testPointItem struct { object geojson.Object fields field.List } func PO(x, y float64) *geojson.Point { return geojson.NewPoint(geometry.Point{X: x, Y: y}) } func BenchmarkFieldMatch(t *testing.B) { rand.Seed(time.Now().UnixNano()) items := make([]testPointItem, t.N) for i := 0; i < t.N; i++ { var fields field.List fields = fields.Set(field.Make("foo", fmt.Sprintf("%f", rand.Float64()*9+1))) fields = fields.Set(field.Make("bar", fmt.Sprintf("%f", math.Round(rand.Float64()*30)+1))) items[i] = testPointItem{ PO(rand.Float64()*360-180, rand.Float64()*180-90), fields, } } sw := &scanWriter{ wheres: []whereT{ {false, "foo", false, field.ValueOf("1"), false, field.ValueOf("3")}, {false, "bar", false, field.ValueOf("10"), false, field.ValueOf("30")}, }, whereins: []whereinT{ {"foo", []field.Value{field.ValueOf("1"), field.ValueOf("2")}}, {"bar", []field.Value{field.ValueOf("11"), field.ValueOf("25")}}, }, } t.ResetTimer() for i := 0; i < t.N; i++ { // one call is super fast, measurements are not reliable, let's do 100 for ix := 0; ix < 100; ix++ { sw.fieldMatch(object.New("", items[i].object, 0, items[i].fields)) } } }
{'content_hash': '9be084e4952dc1594f99cf5c4c812d3d', 'timestamp': '', 'source': 'github', 'line_count': 54, 'max_line_length': 92, 'avg_line_length': 26.444444444444443, 'alnum_prop': 0.6386554621848739, 'repo_name': 'tidwall/tile38', 'id': 'fceccbe9aaed4e86e564d19caade1d724c5d22d6', 'size': '1428', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'internal/server/scanner_test.go', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Dockerfile', 'bytes': '333'}, {'name': 'Go', 'bytes': '835499'}, {'name': 'Makefile', 'bytes': '1032'}, {'name': 'Shell', 'bytes': '4439'}]}
<?php require 'config.php'; require 'connection.php'; require 'database.php'; //$link = DB_Connect(); $id_advogado = $_POST['advogado']; $id_detento = $_POST['detento']; date_default_timezone_set('America/Recife'); //Configurando TimeZone $NOW = date("Y-m-d H:i:s"); // Configurando Formatacao da Data/Hora $advogado_detento = array( 'detento_id' => $id_detento, 'advogado_id' => $id_advogado, 'dataVinculo' => $NOW); $grava = DB_Create('advogado_detento', $advogado_detento); if($grava) { echo "<form action=\"../vinDetento.php\" method='POST' name='formNotificacao'> <input type='hidden' name='validaNotificacao' value='sucesso'/> <script type'text\javascript'> document.formNotificacao.submit(); </script> </form>"; echo "<script>window.location.replace(\"../vinDetento.php\")</script>"; } else { echo "<form action=\"../vinDetento.php\" method='POST' name='formNotificacao'> <input type='hidden' name='validaNotificacao' value='erro'/> <script type'text\javascript'> document.formNotificacao.submit(); </script> </form>"; echo "<script>window.location.replace(\"../vinDetento.php\")</script>"; } ?>
{'content_hash': 'd3431fd6d918d3b1504440013d80ea7d', 'timestamp': '', 'source': 'github', 'line_count': 49, 'max_line_length': 84, 'avg_line_length': 28.755102040816325, 'alnum_prop': 0.5457771469127041, 'repo_name': 'willyanTI/DocManagerDesenvolvimento', 'id': 'a2360d9c9c0162ed307696e15ea768d20d50fdad', 'size': '1409', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'config/vincularAD.php', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '574759'}, {'name': 'HTML', 'bytes': '3270428'}, {'name': 'JavaScript', 'bytes': '2937875'}, {'name': 'PHP', 'bytes': '755578'}]}
import time import logging from django.conf import settings from django.core.cache.backends.base import BaseCache from django.core.cache import get_cache as get_django_cache, DEFAULT_CACHE_ALIAS from django.utils.functional import SimpleLazyObject from celery.task import task logger = logging.getLogger(__name__) #handler = logging.StreamHandler() #handler.setFormatter(logging.Formatter("%(asctime)s - %(name)s - %(levelname)s - %(message)s")) #logger.addHandler(handler) #logger.setLevel(logging.INFO) @task def invoke_async(jcache, key, version, generator, stale, args, kwargs, expires_at=None): value = None try: logger = invoke_async.get_logger() if expires_at is None or expires_at > time.time(): logger.debug("running generator %s" % generator) value = generator(*args, **kwargs) stale_at = time.time() + (stale or jcache.stale) logger.debug("setting key %s (%s/%s)" % (key, stale_at, jcache.expiry)) jcache.set( key, value=value, stale_at=stale_at, timeout=jcache.expiry, version=version, ) else: logger.debug('invoke_async (%s) expired while waiting for worker' % generator) finally: flag = jcache._decr_flag(key, version, 1 + (stale or jcache.stale)) return value class JCache(object): """ JCache, ie a cache that behaves somewhat like varnish in that as well as keys having the states missing/fresh/expired there is a fourth state in the lifecycle, stale, between fresh & expired. Uses Celery to make an async rebuild request, and uses a second cache key with incr to prevent the async task from being scheduled twice. You really only want to use this with underlying cache backends that make incr atomic (memcache does, redis does with Sean's feature/native-incr branch). """ def __init__(self, stale=240, expiry=None, cache=None): """ `stale` is the number of seconds before """ if isinstance(cache, basestring): self._cache = get_django_cache(cache) elif isinstance(cache, BaseCache): self._cache = cache elif cache is None: self._cache = get_django_cache(DEFAULT_CACHE_ALIAS) else: raise TypeError("cache parameter must be None, the name of a Django cache, or a BaseCache object") self.stale = stale self.expiry = expiry def get(self, key, version=None, stale=None, generator=None, wait_on_generate=False, async_wait_on_generate=False, *args, **kwargs): """ Get a value by key, with optional versioning (see Django 1.3 docs). If you supply `generator`, it will be called with `*args, **kwargs` as you might expect. All arguments including the generator must be capable of being pickled (this means that the generator has to be at top level in a module from a fully-qualified import). `stale` overrides the cache's default. If `generator` is None and the key isn't already in the cache, you get None. So this is a bit like a dynamic, lazy version of the `default` parameter to a normal Django cache's `get()` method. If `generator` is passed, and `wait_on_generate` is False (the default) then the generator will be called (asynchronously) but you'll still get back None if the key wasn't in the JCache to start off with. If `generator` is passed and `wait_on_generate` is True, this call blocks on the asynchronous generation. You can turn this into non-blocking by setting `_jcache_options` on the generator as a dictionary with member `lazy_result` set to True, in which case we return a `SimpleLazyObject` which will block on the getting the result from the asynchronous generator when the lazy object is resolved. Note that for this to work, the result will be passed back from celery, meaning it must be picklable. If `async_wait_on_generate` is True then invoke_async will be executed via Celery. Else it will be invoked in the current thread instead. """ if isinstance(key, list) or isinstance(key, tuple): # conflate them with '-' to make the key key = '-'.join(map(lambda x: unicode(x).encode('utf-8'), key)) flag = None value = None do_decr = False generate = False async_result = None now = time.time() packed = self._cache.get( "data:%s" % key, default=None, version=version ) # no data for this key, we'll want to try and generate some if packed is None: generate = generator is not None if wait_on_generate: logger.warning("jcache: Assuming flag:%s=1 due to missing data and wait_on_generate" % key) # we'll get a startup herd here; another approach is to # instead wait until there's a value, but that's harder # we'd need to store the task ID of the active invoke_async for this key in redis so we can make a # AsyncResult here and wait for it to complete flag = 1 value = None else: (value, stale_at) = packed if stale_at < now: generate = generator is not None try: # we only need to know the flag value if we are thinking about # regenerating the key if generate: flag = self._incr_flag(key, version, 1 + (stale or self.stale)) do_decr = True if flag < 1: # flag was <= -1 before incr, happens when flag expires just before decr was called logger.warning('jcache: key=%s flag=%s resetting to 1', key, flag) flag = self._reset_flag(key, version, 1 + (stale or self.stale), value=1) logger.info('jcache: %s=%s, generate=%s flag=%s', key, packed, generate, flag) # only generate a value if we are the only active instance if generate and flag == 1: invoke_async_args = ( self, key, version, generator, stale, args, kwargs, time.time() + (stale or self.stale) ) # async invocation is desired if not wait_on_generate or (wait_on_generate and async_wait_on_generate): do_decr = False # let invoke_async decrement the flag logger.info('jcache: apply_sync generating data:%s' % key) async_result = invoke_async.apply_async(args=invoke_async_args) # block until we have a fresh value if wait_on_generate and packed is None: logger.info("jcache: waiting for data:%s", key) opts = getattr(generator, '_jcache_options', {}) if async_result: result_func = lambda: async_result.get(propogate=True) else: do_decr = False # invoke_async being called locally still decrements the flag result_func = lambda: invoke_async(*invoke_async_args) if opts.get('lazy_result'): value = SimpleLazyObject(lambda: result_func()) else: value = result_func() finally: if do_decr: self._decr_flag(key, version, 1 + (stale or self.stale)) return value def _incr_flag(self, key, version, timeout=None): try: return self._cache.incr("flag:%s" % key, version=version) except ValueError: return self._reset_flag(key, version, timeout, 1) def _decr_flag(self, key, version, timeout=None): try: return self._cache.decr("flag:%s" % key, version=version) except ValueError: return self._reset_flag(key, version, timeout, 0) def _reset_flag(self, key, version, timeout=None, value=0): self._cache.set("flag:%s" % key, value, version=version, timeout=timeout) return value def set(self, key, value=None, stale_at=None, version=None, timeout=None ): if timeout is None: timeout = self.expiry if stale_at is None: stale_at = time.time() + self.stale return self._cache.set( "data:%s" % key, (value, stale_at), timeout=timeout, version=version, ) def freshen(self, key, version=None, generator=None, stale=None, *args, **kwargs): flag = self._incr_flag(key, version, 1 + (stale or self.stale)) if flag > 1: self._decr_flag(key, version) else: logger.warning('jcache: (freshen) key=%s flag=%s resetting to 1', key, flag) flag = self._reset_flag(key, version, 1 + (stale or self.stale), value=1) if flag == 1: return invoke_async.apply_async( args=(self, key, version, generator, stale, args, kwargs, time.time() + (stale or self.stale)), ) def delete(self, key, version): self._cache.delete(key, version=version) def clear(self): self._cache.clear() if not hasattr(settings, 'JCACHES'): settings.JCACHES = { DEFAULT_CACHE_ALIAS: { }, } _jcaches = {} def get_cache(name): if name not in _jcaches: #print "fetching", name config = settings.JCACHES.get(name) if config is None: #print "no config!", settings.JCACHES raise ValueError() else: #print "got config", config pass _jcaches[name] = JCache(**config) return _jcaches[name] cache = get_cache(DEFAULT_CACHE_ALIAS)
{'content_hash': '5feffa4c4fbb48a5d5446114bc405a50', 'timestamp': '', 'source': 'github', 'line_count': 275, 'max_line_length': 114, 'avg_line_length': 38.56, 'alnum_prop': 0.555450773293097, 'repo_name': 'artfinder/django-jcache', 'id': '2076617e171f9cf200f1583107a331aece0aec89', 'size': '10604', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'jcache/__init__.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '748'}]}
// -------------------------------------------------------------------------------------------------------------------- // <copyright file="SystemManager.cs" company="Slash Games"> // Copyright (c) Slash Games. All rights reserved. // </copyright> // -------------------------------------------------------------------------------------------------------------------- namespace Slash.Application.Systems { using System; using System.Collections; using System.Collections.Generic; using Slash.Application.Games; /// <summary> /// Manages the game systems to be updated in each tick. /// </summary> public class SystemManager : IEnumerable<ISystem> { #region Fields /// <summary> /// Game this manager controls the systems of. /// </summary> private readonly Game game; /// <summary> /// Systems to be updated in each tick. /// </summary> private readonly List<ISystem> systems; /// <summary> /// Maps system types to actual game systems. /// </summary> private readonly Dictionary<Type, ISystem> systemsByType; #endregion #region Constructors and Destructors /// <summary> /// Constructs a new system manager without any systems. /// </summary> /// <param name="game"> /// Game to manage the systems for. /// </param> public SystemManager(Game game) { this.game = game; this.systems = new List<ISystem>(); this.systemsByType = new Dictionary<Type, ISystem>(); } #endregion #region Public Methods and Operators /// <summary> /// Adds the passed system to this manager. The system will be updated /// in each tick. /// </summary> /// <param name="system"> /// System to add. /// </param> /// <exception cref="ArgumentNullException"> /// The passed system is null. /// </exception> /// <exception cref="ArgumentException"> /// A system of the same type has already been added. /// </exception> public void AddSystem(ISystem system) { if (system == null) { throw new ArgumentNullException("system"); } Type systemType = system.GetType(); if (this.systemsByType.ContainsKey(systemType)) { throw new ArgumentException("A system of type " + systemType + " has already been added.", "system"); } this.systems.Add(system); this.systemsByType.Add(system.GetType(), system); this.game.EventManager.QueueEvent(SystemGameEvent.SystemAdded, system); } /// <summary> /// Returns an enumerator that iterates through the collection. /// </summary> /// <returns> /// A <see cref="T:System.Collections.Generic.IEnumerator`1" /> that can be used to iterate through the collection. /// </returns> /// <filterpriority>1</filterpriority> public IEnumerator<ISystem> GetEnumerator() { return this.systems.GetEnumerator(); } /// <summary> /// Gets the system of the specified type. /// </summary> /// <param name="systemType"> /// Type of the system to get. /// </param> /// <returns> /// System of the specified type. /// </returns> /// <exception cref="ArgumentNullException"> /// The passed type is null. /// </exception> /// <exception cref="ArgumentException"> /// A system of the specified type has never been added. /// </exception> public ISystem GetSystem(Type systemType) { if (systemType == null) { throw new ArgumentNullException("systemType"); } ISystem system; if (this.systemsByType.TryGetValue(systemType, out system)) { return system; } throw new ArgumentException("A system of type " + systemType + " has never been added.", "systemType"); } /// <summary> /// Gets the system of the specified type. /// </summary> /// <typeparam name="T">Type of the system to get.</typeparam> /// <returns>System of the specified type.</returns> /// <exception cref="ArgumentNullException"> /// The passed type is null. /// </exception> /// <exception cref="ArgumentException"> /// A system of the specified type has never been added. /// </exception> public T GetSystem<T>() where T : class, ISystem { return this.GetSystem(typeof(T)) as T; } /// <summary> /// Late update of all systems. /// </summary> /// <param name="dt"> /// Time passed since the last tick (in s). /// </param> public void LateUpdate(float dt) { foreach (ISystem system in this.systems) { system.LateUpdate(dt); } } /// <summary> /// Ticks all systems. /// </summary> /// <param name="dt"> /// Time passed since the last tick, in seconds. /// </param> public void Update(float dt) { foreach (ISystem system in this.systems) { system.Update(dt); } } #endregion #region Explicit Interface Methods IEnumerator IEnumerable.GetEnumerator() { return this.GetEnumerator(); } #endregion } }
{'content_hash': 'cb5c0a33167d85c844a0e6765a9215dd', 'timestamp': '', 'source': 'github', 'line_count': 189, 'max_line_length': 125, 'avg_line_length': 31.063492063492063, 'alnum_prop': 0.5046840401975813, 'repo_name': 'SlashGames/slash-framework', 'id': '91c6f94be16ec10cc61479a77436c2dcd57602b6', 'size': '5873', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'Source/Slash.Application/Source/Systems/SystemManager.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '16824'}, {'name': 'C#', 'bytes': '2880643'}, {'name': 'M4', 'bytes': '1026'}, {'name': 'Makefile', 'bytes': '25755'}, {'name': 'Perl', 'bytes': '16336'}, {'name': 'PowerShell', 'bytes': '336'}, {'name': 'ShaderLab', 'bytes': '7348'}, {'name': 'Shell', 'bytes': '24755'}, {'name': 'Smalltalk', 'bytes': '6092'}, {'name': 'Visual Basic', 'bytes': '1626'}, {'name': 'XSLT', 'bytes': '16887'}]}
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0_40) on Sun Mar 22 23:44:30 UTC 2015 --> <title>grpc-auth 0.1.0-SNAPSHOT API</title> <script type="text/javascript"> targetPage = "" + window.location.search; if (targetPage != "" && targetPage != "undefined") targetPage = targetPage.substring(1); if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage))) targetPage = "undefined"; function validURL(url) { try { url = decodeURIComponent(url); } catch (error) { return false; } var pos = url.indexOf(".html"); if (pos == -1 || pos != url.length - 5) return false; var allowNumber = false; var allowSep = false; var seenDot = false; for (var i = 0; i < url.length - 5; i++) { var ch = url.charAt(i); if ('a' <= ch && ch <= 'z' || 'A' <= ch && ch <= 'Z' || ch == '$' || ch == '_' || ch.charCodeAt(0) > 127) { allowNumber = true; allowSep = true; } else if ('0' <= ch && ch <= '9' || ch == '-') { if (!allowNumber) return false; } else if (ch == '/' || ch == '.') { if (!allowSep) return false; allowNumber = false; allowSep = false; if (ch == '.') seenDot = true; if (ch == '/' && seenDot) return false; } else { return false; } } return true; } function loadFrames() { if (targetPage != "" && targetPage != "undefined") top.classFrame.location = top.targetPage; } </script> </head> <frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()"> <frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)"> <frame src="io/grpc/auth/package-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes"> <noframes> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <h2>Frame Alert</h2> <p>This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. Link to <a href="io/grpc/auth/package-summary.html">Non-frame version</a>.</p> </noframes> </frameset> </html>
{'content_hash': '245395b4eec617d04cfe148ff459700c', 'timestamp': '', 'source': 'github', 'line_count': 71, 'max_line_length': 217, 'avg_line_length': 38.28169014084507, 'alnum_prop': 0.5103016924208977, 'repo_name': 'avinashc89/grpc_273', 'id': '207f3280f1e2f64a9e3e9bc2792b27371d755658', 'size': '2718', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'auth/build/docs/javadoc/index.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C++', 'bytes': '27373'}, {'name': 'CSS', 'bytes': '24647'}, {'name': 'HTML', 'bytes': '1080158'}, {'name': 'Java', 'bytes': '1002641'}, {'name': 'JavaScript', 'bytes': '20531'}, {'name': 'Protocol Buffer', 'bytes': '20381'}, {'name': 'Shell', 'bytes': '2300'}]}
import { ParamMap, Params } from './shared'; export declare function createEmptyUrlTree(): UrlTree; export declare function containsTree(container: UrlTree, containee: UrlTree, exact: boolean): boolean; /** * @description * * Represents the parsed URL. * * Since a router state is a tree, and the URL is nothing but a serialized state, the URL is a * serialized tree. * UrlTree is a data structure that provides a lot of affordances in dealing with URLs * * @usageNotes * ### Example * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const tree: UrlTree = * router.parseUrl('/team/33/(user/victor//support:help)?debug=true#fragment'); * const f = tree.fragment; // return 'fragment' * const q = tree.queryParams; // returns {debug: 'true'} * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET]; * const s: UrlSegment[] = g.segments; // returns 2 segments 'team' and '33' * g.children[PRIMARY_OUTLET].segments; // returns 2 segments 'user' and 'victor' * g.children['support'].segments; // return 1 segment 'help' * } * } * ``` * * */ export declare class UrlTree { /** The root segment group of the URL tree */ root: UrlSegmentGroup; /** The query params of the URL */ queryParams: Params; /** The fragment of the URL */ fragment: string | null; readonly queryParamMap: ParamMap; /** @docsNotRequired */ toString(): string; } /** * @description * * Represents the parsed URL segment group. * * See `UrlTree` for more information. * * */ export declare class UrlSegmentGroup { /** The URL segments of this group. See `UrlSegment` for more information */ segments: UrlSegment[]; /** The list of children of this group */ children: { [key: string]: UrlSegmentGroup; }; /** The parent node in the url tree */ parent: UrlSegmentGroup | null; constructor( /** The URL segments of this group. See `UrlSegment` for more information */ segments: UrlSegment[], /** The list of children of this group */ children: { [key: string]: UrlSegmentGroup; }); /** Whether the segment has child segments */ hasChildren(): boolean; /** Number of child segments */ readonly numberOfChildren: number; /** @docsNotRequired */ toString(): string; } /** * @description * * Represents a single URL segment. * * A UrlSegment is a part of a URL between the two slashes. It contains a path and the matrix * parameters associated with the segment. * * @usageNotes * ### Example * * ``` * @Component({templateUrl:'template.html'}) * class MyComponent { * constructor(router: Router) { * const tree: UrlTree = router.parseUrl('/team;id=33'); * const g: UrlSegmentGroup = tree.root.children[PRIMARY_OUTLET]; * const s: UrlSegment[] = g.segments; * s[0].path; // returns 'team' * s[0].parameters; // returns {id: 33} * } * } * ``` * * */ export declare class UrlSegment { /** The path part of a URL segment */ path: string; /** The matrix parameters associated with a segment */ parameters: { [name: string]: string; }; constructor( /** The path part of a URL segment */ path: string, /** The matrix parameters associated with a segment */ parameters: { [name: string]: string; }); readonly parameterMap: ParamMap; /** @docsNotRequired */ toString(): string; } export declare function equalSegments(as: UrlSegment[], bs: UrlSegment[]): boolean; export declare function equalPath(as: UrlSegment[], bs: UrlSegment[]): boolean; export declare function mapChildrenIntoArray<T>(segment: UrlSegmentGroup, fn: (v: UrlSegmentGroup, k: string) => T[]): T[]; /** * @description * * Serializes and deserializes a URL string into a URL tree. * * The url serialization strategy is customizable. You can * make all URLs case insensitive by providing a custom UrlSerializer. * * See `DefaultUrlSerializer` for an example of a URL serializer. * * */ export declare abstract class UrlSerializer { /** Parse a url into a `UrlTree` */ abstract parse(url: string): UrlTree; /** Converts a `UrlTree` into a url */ abstract serialize(tree: UrlTree): string; } /** * @description * * A default implementation of the `UrlSerializer`. * * Example URLs: * * ``` * /inbox/33(popup:compose) * /inbox/33;open=true/messages/44 * ``` * * DefaultUrlSerializer uses parentheses to serialize secondary segments (e.g., popup:compose), the * colon syntax to specify the outlet, and the ';parameter=value' syntax (e.g., open=true) to * specify route specific parameters. * * */ export declare class DefaultUrlSerializer implements UrlSerializer { /** Parses a url into a `UrlTree` */ parse(url: string): UrlTree; /** Converts a `UrlTree` into a url */ serialize(tree: UrlTree): string; } export declare function serializePaths(segment: UrlSegmentGroup): string; /** * This function should be used to encode both keys and values in a query string key/value. In * the following URL, you need to call encodeUriQuery on "k" and "v": * * http://www.site.org/html;mk=mv?k=v#f */ export declare function encodeUriQuery(s: string): string; /** * This function should be used to encode a URL fragment. In the following URL, you need to call * encodeUriFragment on "f": * * http://www.site.org/html;mk=mv?k=v#f */ export declare function encodeUriFragment(s: string): string; /** * This function should be run on any URI segment as well as the key and value in a key/value * pair for matrix params. In the following URL, you need to call encodeUriSegment on "html", * "mk", and "mv": * * http://www.site.org/html;mk=mv?k=v#f */ export declare function encodeUriSegment(s: string): string; export declare function decode(s: string): string; export declare function decodeQuery(s: string): string; export declare function serializePath(path: UrlSegment): string;
{'content_hash': 'a199bdb037af3669e82c791891d0c02d', 'timestamp': '', 'source': 'github', 'line_count': 192, 'max_line_length': 123, 'avg_line_length': 31.510416666666668, 'alnum_prop': 0.6677685950413224, 'repo_name': 'Leo-g/Flask-Scaffold', 'id': 'e75651bf38cfe1aa133d4087500a0f5f181a5ab4', 'size': '6253', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'app/templates/static/node_modules/@angular/router/src/url_tree.d.ts', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '15274'}, {'name': 'HTML', 'bytes': '14505'}, {'name': 'JavaScript', 'bytes': '49098'}, {'name': 'Nginx', 'bytes': '1545'}, {'name': 'Python', 'bytes': '62750'}, {'name': 'Shell', 'bytes': '21'}]}
module App.ViewModels { export class JobsViewModel extends ListBaseViewModel<Models.Job> { //#region Private Static Properties //#endregion //#region Public Static Properties public static $inject = ListBaseViewModel.$inject.concat(["$scope"]); static get controllerId(): string { return "JobsViewModel"; } //#endregion //#region Private Properties //#endregion //#region Public Properties //#endregion //#region Constructors public constructor($http, $q, $location, breezeFactory, private $scope: IListBaseScope<JobsViewModel>) { super($http, $q, $location, breezeFactory); $scope.vm = this; this.toolbar.title = "All Jobs"; this.toolbar.summary = "View all jobs"; } //#endregion //#region Private Methods //#endregion //#region Public Methods public getQuery(): breeze.EntityQuery { var containsOperator = "Contains"; var predicate = breeze.Predicate.create("Code", containsOperator, this.query) .or("IMEINumber", containsOperator, this.query); var query = new breeze.EntityQuery() .from("Jobs") .expand("Client") .where(predicate) .orderBy("Code") .skip(this._navigationQuery.skip) .inlineCount(this._navigationQuery.includeCount); return query; } public newEntity(): void { this.$location.url(Models.Job.newUrl); } //#endregion } class JobsRouteConfigurator { public static $inject = ['$routeProvider']; public constructor($routeProvider: ng.route.IRouteProvider) { // Jobs List $routeProvider.when(Models.Job.listUrl, { templateUrl: "/App/Jobs", controller: "JobsViewModel" }); } } class JobsSidebarConfigurator { public static $inject = [Services.SidebarProvider.serviceId + "Provider"]; public constructor(SidebarProvider: Services.ISidebarProvider) { SidebarProvider.addItem({ title: "Jobs", url: Models.Job.listUrl, icon: "view_carousel", order: 1, subCommands: [{ title: "Add New Job", url: Models.Job.newUrl, icon: "add", order: 0 }] }); } } // Init angular.module(Config.appName) .controller(JobsViewModel.controllerId, JobsViewModel) .config(JobsRouteConfigurator) .config(JobsSidebarConfigurator); }
{'content_hash': 'c87d506b1a0a70b3dccd1f0958737ea1', 'timestamp': '', 'source': 'github', 'line_count': 106, 'max_line_length': 89, 'avg_line_length': 27.12264150943396, 'alnum_prop': 0.5304347826086957, 'repo_name': 'AymanGaafar/RepairShop', 'id': '50580380ca8973a269949a644f525914822ec2c5', 'size': '2875', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Code/RepairShop/wwwroot/app/job/jobs.vm.ts', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '104'}, {'name': 'C#', 'bytes': '242343'}, {'name': 'CSS', 'bytes': '33991'}, {'name': 'HTML', 'bytes': '1326'}, {'name': 'JavaScript', 'bytes': '31'}, {'name': 'TypeScript', 'bytes': '229505'}]}
module.exports = { port: parseInt(process.env.PORT, 10) || 31337, host: process.env.HOST || 'localhost', }
{'content_hash': '051799b3244ae4b096ef68fdcb51b177', 'timestamp': '', 'source': 'github', 'line_count': 4, 'max_line_length': 48, 'avg_line_length': 27.75, 'alnum_prop': 0.6576576576576577, 'repo_name': 'ChiChou/ipaspect', 'id': 'e159bb1b0827c80024da54169f0d0b600669ddda', 'size': '111', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'lib/config.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '54691'}, {'name': 'HTML', 'bytes': '202'}, {'name': 'JavaScript', 'bytes': '68742'}, {'name': 'Makefile', 'bytes': '340'}, {'name': 'Objective-C', 'bytes': '6946'}, {'name': 'Vue', 'bytes': '63703'}]}
 using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("Lumia.Imaging.Extras.Layers.WindowsPhone")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Lumia.Imaging.Extras.Layers.WindowsPhone")] [assembly: AssemblyCopyright("Copyright © 2014")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: ComVisible(false)] [assembly: InternalsVisibleTo("Lumia.Imaging.Extras.Tests.WindowsPhone")]
{'content_hash': 'b2f584e9c09edb4c243f8223349d322c', 'timestamp': '', 'source': 'github', 'line_count': 33, 'max_line_length': 84, 'avg_line_length': 35.60606060606061, 'alnum_prop': 0.7497872340425532, 'repo_name': 'Microsoft/Lumia-Imaging-SDK-Extras', 'id': 'ecd5397f01f4f57bd96ac003727dc29b9d39ae8b', 'size': '2278', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Managed/Lumia.Imaging.Extras.Layers/Lumia.Imaging.Extras.Layers.WindowsPhone/Properties/AssemblyInfo.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '6648'}, {'name': 'C#', 'bytes': '311430'}, {'name': 'C++', 'bytes': '2400114'}]}
package com.eworkplus.dal.domain; import java.io.Serializable; /** * 领域顶层抽象,定义所有实体主键Id * * @param <T> 主键数据类型 * @author taoping */ public interface Identifiable<T extends Serializable> extends Serializable { String DEFAULT_ID_NAME = "id"; /** * Get the primary key value * * @return */ T getId(); /** * Set the primary key value * * @param id */ void setId(T id); }
{'content_hash': '6b3547d6a0f0b6e0a9d3dd8c99eeea6d', 'timestamp': '', 'source': 'github', 'line_count': 27, 'max_line_length': 76, 'avg_line_length': 16.037037037037038, 'alnum_prop': 0.5842956120092379, 'repo_name': 'wuditp520/Commons-Jdbc', 'id': '3a6fbb0bb9b150c0d05ac7f0cbdfd79c8bab4823', 'size': '475', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'smart-dal-domain/src/main/java/com/eworkplus/dal/domain/Identifiable.java', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
using System; using System.Collections.Generic; using System.Linq; using System.Security.Cryptography.X509Certificates; using System.Web.Mvc; using Dapper; using FastBookCreator.Core; using FastBookCreator.Models; namespace FastBookCreator.Controllers { public class PackController : BaseController { // GET: Pack public ActionResult Index() { List<Pack> items; using (var connection = SqliteConn.GetConnection()) { items = (List<Pack>) connection.Query<Pack>("SELECT * FROM Pack "); } ViewBag.Title =Resources.Resource.PackList; return View("Index", items); } public ActionResult Insert() { List<Pack> items; using (var connection = SqliteConn.GetConnection()) { items = (List<Pack>) connection.Query<Pack>("SELECT * FROM Pack "); } /* var pSelect = new Pack() { PackName = "انتخاب روش یادگیری", Description = "", PackId = 0 }; items.Insert(0,pSelect); var x = from i in items select new {i.PackName ,i.Description , Selected =false};*/ ViewBag.Title = Resources.Resource.PackCreate; return View(items); } //// GET: Pack/Details/5 //public ActionResult Details(int id) //{ // return View(); //} //// GET: Pack/Create //public ActionResult Create() //{ // return View(); //} //// POST: Pack/Create //[HttpPost] //public ActionResult Create(FormCollection collection) //{ // try // { // // TODO: Add insert logic here // return RedirectToAction("Index"); // } // catch // { // return View(); // } //} //// GET: Pack/Edit/5 //public ActionResult Edit(int id) //{ // return View(); //} //// POST: Pack/Edit/5 //[HttpPost] //public ActionResult Edit(int id, FormCollection collection) //{ // try // { // // TODO: Add update logic here // return RedirectToAction("Index"); // } // catch // { // return View(); // } //} //// GET: Pack/Delete/5 //public ActionResult Delete(int id) //{ // return View(); //} //// POST: Pack/Delete/5 //[HttpPost] //public ActionResult Delete(int id, FormCollection collection) //{ // try // { // // TODO: Add delete logic here // return RedirectToAction("Index"); // } // catch // { // return View(); // } //} } }
{'content_hash': 'e8f37afe22e2ae606eaa262222ac32ee', 'timestamp': '', 'source': 'github', 'line_count': 127, 'max_line_length': 87, 'avg_line_length': 24.614173228346456, 'alnum_prop': 0.44113883557261674, 'repo_name': 'ahmadaghazadeh/FastBook', 'id': '1513a1955f7c6a40b3d4d65f46fe797c95890d95', 'size': '3144', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/.localhistory/FastBookCreator/Controllers/1475049579$PackController.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '106'}, {'name': 'Batchfile', 'bytes': '140'}, {'name': 'C', 'bytes': '6666'}, {'name': 'C#', 'bytes': '1301935'}, {'name': 'C++', 'bytes': '982062'}, {'name': 'CSS', 'bytes': '232032'}, {'name': 'HTML', 'bytes': '77330'}, {'name': 'Inno Setup', 'bytes': '6611'}, {'name': 'Java', 'bytes': '1059'}, {'name': 'JavaScript', 'bytes': '1836162'}, {'name': 'Lua', 'bytes': '164681'}, {'name': 'Makefile', 'bytes': '18315'}, {'name': 'PHP', 'bytes': '38882'}, {'name': 'Perl', 'bytes': '5400'}, {'name': 'Python', 'bytes': '4376'}, {'name': 'QMake', 'bytes': '3361'}, {'name': 'Tcl', 'bytes': '542'}]}
int foo(int);
{'content_hash': 'eddd70a3178af91f97eb1279e09a9d8f', 'timestamp': '', 'source': 'github', 'line_count': 1, 'max_line_length': 13, 'avg_line_length': 14.0, 'alnum_prop': 0.6428571428571429, 'repo_name': 'zcoinofficial/zcoin', 'id': '744ec33955221f455fdf3ee505804113950ed6ba', 'size': '30', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/tor/scripts/maint/checkspace_tests/dubious.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '977651'}, {'name': 'C', 'bytes': '23449469'}, {'name': 'C++', 'bytes': '11590916'}, {'name': 'CMake', 'bytes': '96751'}, {'name': 'CSS', 'bytes': '42324'}, {'name': 'Dockerfile', 'bytes': '3182'}, {'name': 'Gnuplot', 'bytes': '940'}, {'name': 'HTML', 'bytes': '55527'}, {'name': 'Java', 'bytes': '30290'}, {'name': 'Lua', 'bytes': '3321'}, {'name': 'M4', 'bytes': '354106'}, {'name': 'Makefile', 'bytes': '176315'}, {'name': 'NASL', 'bytes': '177'}, {'name': 'Objective-C++', 'bytes': '6795'}, {'name': 'PHP', 'bytes': '4871'}, {'name': 'POV-Ray SDL', 'bytes': '1480'}, {'name': 'Perl', 'bytes': '18265'}, {'name': 'Python', 'bytes': '1731667'}, {'name': 'QMake', 'bytes': '1352'}, {'name': 'Roff', 'bytes': '2388'}, {'name': 'Ruby', 'bytes': '3216'}, {'name': 'Rust', 'bytes': '119897'}, {'name': 'Sage', 'bytes': '30192'}, {'name': 'Shell', 'bytes': '314196'}, {'name': 'SmPL', 'bytes': '5488'}, {'name': 'SourcePawn', 'bytes': '12001'}, {'name': 'q', 'bytes': '5584'}]}
function [ xq, indices ] = uniform_quantizer( x, rate, xmin, xmax ) % uniform_quantizer: Implement a uniform quantizer and output the quantized % signal % Input: % x: input signal % rate: bit rate % Output: % xq: quantized signal n = 2^rate; delta = (xmax - xmin)/n; indices = round((x - xmin - 0.5*delta)/delta); indices(indices < 0) = 0; indices(indices > n-1) = n-1; xq = xmin + delta*(0.5+indices); end
{'content_hash': '6f4223658591ed98d3d030614c751615', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 75, 'avg_line_length': 22.94736842105263, 'alnum_prop': 0.6238532110091743, 'repo_name': 'jjones646/ece6260', 'id': 'e670b32dfde543328084e65de311dc5b44ebe288', 'size': '436', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'includes/uniform_quantizer.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Matlab', 'bytes': '38879'}]}
<html> <head> <title>User agent detail - Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2547.0 Safari/537.36</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css"> <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"> </head> <body> <div class="container"> <div class="section"> <h1 class="header center orange-text">User agent detail</h1> <div class="row center"> <h5 class="header light"> Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2547.0 Safari/537.36 </h5> </div> </div> <div class="section"> <table class="striped"><tr><th></th><th colspan="3">General</th><th colspan="5">Device</th><th colspan="3">Bot</th><th colspan="2"></th></tr><tr><th>Provider</th><th>Browser</th><th>Engine</th><th>OS</th><th>Brand</th><th>Model</th><th>Type</th><th>Is mobile</th><th>Is touch</th><th>Is bot</th><th>Name</th><th>Type</th><th>Parse time</th><th>Actions</th></tr><tr><th colspan="14" class="green lighten-3">Source result (test suite)</th></tr><tr><td>browscap/browscap<br /><small>/tests/fixtures/issues/issue-814.php</small></td><td>Chrome 48.0</td><td>Win10 10.0</td><td>unknown </td><td style="border-left: 1px solid #555">unknown</td><td>Windows Desktop</td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td></td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-test">Detail</a> <!-- Modal Structure --> <div id="modal-test" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Testsuite result detail</h4> <p><pre><code class="php">Array ( [Browser] => Chrome [Browser_Type] => Browser [Browser_Bits] => 32 [Browser_Maker] => Google Inc [Browser_Modus] => unknown [Version] => 48.0 [MajorVer] => 48 [MinorVer] => 0 [Platform] => Win10 [Platform_Version] => 10.0 [Platform_Bits] => 32 [Platform_Maker] => Microsoft Corporation [Win64] => [isMobileDevice] => [isTablet] => [Crawler] => [JavaScript] => 1 [Cookies] => 1 [Frames] => 1 [IFrames] => 1 [Tables] => 1 [VBScript] => [JavaApplets] => [ActiveXControls] => [BackgroundSounds] => [Device_Name] => Windows Desktop [Device_Maker] => Various [Device_Type] => Desktop [Device_Pointing_Method] => mouse [Device_Code_Name] => Windows Desktop [Device_Brand_Name] => unknown [RenderingEngine_Name] => Blink [RenderingEngine_Version] => unknown [RenderingEngine_Maker] => Google Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><th colspan="14" class="green lighten-3">Providers</th></tr><tr><td>BrowscapPhp<br /><small>6012</small></td><td>Chrome 48.0</td><td>Blink </td><td>Win10 10.0</td><td style="border-left: 1px solid #555"></td><td>Windows Desktop</td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.02601</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-215ac98d-ccf8-4615-916e-5a819d6a59c9">Detail</a> <!-- Modal Structure --> <div id="modal-215ac98d-ccf8-4615-916e-5a819d6a59c9" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>BrowscapPhp result detail</h4> <p><pre><code class="php">stdClass Object ( [browser_name_regex] => /^mozilla\/5\.0 \(.*windows nt 10\.0.*\) applewebkit\/.* \(khtml, like gecko\) chrome\/48\..*safari\/.*$/ [browser_name_pattern] => mozilla/5.0 (*windows nt 10.0*) applewebkit/* (khtml, like gecko) chrome/48.*safari/* [parent] => Chrome 48.0 [comment] => Chrome 48.0 [browser] => Chrome [browser_type] => Browser [browser_bits] => 32 [browser_maker] => Google Inc [browser_modus] => unknown [version] => 48.0 [majorver] => 48 [minorver] => 0 [platform] => Win10 [platform_version] => 10.0 [platform_description] => Windows 10 [platform_bits] => 32 [platform_maker] => Microsoft Corporation [alpha] => [beta] => [win16] => [win32] => 1 [win64] => [frames] => 1 [iframes] => 1 [tables] => 1 [cookies] => 1 [backgroundsounds] => [javascript] => 1 [vbscript] => [javaapplets] => [activexcontrols] => [ismobiledevice] => [istablet] => [issyndicationreader] => [crawler] => [cssversion] => 3 [aolversion] => 0 [device_name] => Windows Desktop [device_maker] => Various [device_type] => Desktop [device_pointing_method] => mouse [device_code_name] => Windows Desktop [device_brand_name] => unknown [renderingengine_name] => Blink [renderingengine_version] => unknown [renderingengine_description] => a WebKit Fork by Google [renderingengine_maker] => Google Inc ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>DonatjUAParser<br /><small>v0.5.0</small></td><td>Chrome 48.0.2547.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661">Detail</a> <!-- Modal Structure --> <div id="modal-f1436016-fdf1-4aea-b4be-1d7c99ab0661" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>DonatjUAParser result detail</h4> <p><pre><code class="php">Array ( [platform] => Windows [browser] => Chrome [version] => 48.0.2547.0 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>NeutrinoApiCom<br /><small></small></td><td>Chrome 48.0.2547.0</td><td><i class="material-icons">close</i></td><td>Windows 10.0</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop-browser</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.18104</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc">Detail</a> <!-- Modal Structure --> <div id="modal-9b0fa449-ec1b-40c8-8b1c-9486eb3b9cbc" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>NeutrinoApiCom result detail</h4> <p><pre><code class="php">stdClass Object ( [mobile_screen_height] => 0 [is_mobile] => [type] => desktop-browser [mobile_brand] => [mobile_model] => [version] => 48.0.2547.0 [is_android] => [browser_name] => Chrome [operating_system_family] => Windows [operating_system_version] => 10.0 [is_ios] => [producer] => Google Inc. [operating_system] => Windows [mobile_screen_width] => 0 [mobile_browser] => ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>PiwikDeviceDetector<br /><small>3.5.2</small></td><td>Chrome 48.0</td><td>Blink </td><td>Windows 10</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.005</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-21638055-738d-46ba-a1b1-f5114bc26475">Detail</a> <!-- Modal Structure --> <div id="modal-21638055-738d-46ba-a1b1-f5114bc26475" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>PiwikDeviceDetector result detail</h4> <p><pre><code class="php">Array ( [client] => Array ( [type] => browser [name] => Chrome [short_name] => CH [version] => 48.0 [engine] => Blink ) [operatingSystem] => Array ( [name] => Windows [short_name] => WIN [version] => 10 [platform] => ) [device] => Array ( [brand] => [brandName] => [model] => [device] => 0 [deviceName] => desktop ) [bot] => [extra] => Array ( [isBot] => [isBrowser] => 1 [isFeedReader] => [isMobileApp] => [isPIM] => [isLibrary] => [isMediaPlayer] => [isCamera] => [isCarBrowser] => [isConsole] => [isFeaturePhone] => [isPhablet] => [isPortableMediaPlayer] => [isSmartDisplay] => [isSmartphone] => [isTablet] => [isTV] => [isDesktop] => 1 [isMobile] => [isTouchEnabled] => ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>SinergiBrowserDetector<br /><small>6.0.0</small></td><td>Chrome 48.0.2547.0</td><td><i class="material-icons">close</i></td><td>Windows 10.0</td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c">Detail</a> <!-- Modal Structure --> <div id="modal-5415e7f2-ef7b-434c-abe0-b71ba9f6707c" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>SinergiBrowserDetector result detail</h4> <p><pre><code class="php">Array ( [browser] => Sinergi\BrowserDetector\Browser Object ( [userAgent:Sinergi\BrowserDetector\Browser:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2547.0 Safari/537.36 ) [name:Sinergi\BrowserDetector\Browser:private] => Chrome [version:Sinergi\BrowserDetector\Browser:private] => 48.0.2547.0 [isRobot:Sinergi\BrowserDetector\Browser:private] => [isChromeFrame:Sinergi\BrowserDetector\Browser:private] => ) [operatingSystem] => Sinergi\BrowserDetector\Os Object ( [name:Sinergi\BrowserDetector\Os:private] => Windows [version:Sinergi\BrowserDetector\Os:private] => 10.0 [isMobile:Sinergi\BrowserDetector\Os:private] => [userAgent:Sinergi\BrowserDetector\Os:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2547.0 Safari/537.36 ) ) [device] => Sinergi\BrowserDetector\Device Object ( [name:Sinergi\BrowserDetector\Device:private] => unknown [userAgent:Sinergi\BrowserDetector\Device:private] => Sinergi\BrowserDetector\UserAgent Object ( [userAgentString:Sinergi\BrowserDetector\UserAgent:private] => Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2547.0 Safari/537.36 ) ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UAParser<br /><small>v3.4.5</small></td><td>Chrome 48.0.2547</td><td><i class="material-icons">close</i></td><td>Windows 10 </td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.002</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b">Detail</a> <!-- Modal Structure --> <div id="modal-346c1a98-5fd3-454f-b6c8-350f2f505d8b" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UAParser result detail</h4> <p><pre><code class="php">UAParser\Result\Client Object ( [ua] => UAParser\Result\UserAgent Object ( [major] => 48 [minor] => 0 [patch] => 2547 [family] => Chrome ) [os] => UAParser\Result\OperatingSystem Object ( [major] => [minor] => [patch] => [patchMinor] => [family] => Windows 10 ) [device] => UAParser\Result\Device Object ( [brand] => [model] => [family] => Other ) [originalUserAgent] => Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2547.0 Safari/537.36 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>UserAgentStringCom<br /><small></small></td><td>Chrome 48.0.2547.0</td><td><i class="material-icons">close</i></td><td>Windows 10 </td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td></td><td>0.06201</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4">Detail</a> <!-- Modal Structure --> <div id="modal-9cdd8b45-a2eb-406b-bd27-7e48af38ffd4" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>UserAgentStringCom result detail</h4> <p><pre><code class="php">stdClass Object ( [agent_type] => Browser [agent_name] => Chrome [agent_version] => 48.0.2547.0 [os_type] => Windows [os_name] => Windows 10 [os_versionName] => [os_versionNumber] => [os_producer] => [os_producerURL] => [linux_distibution] => Null [agent_language] => [agent_languageTag] => ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhatIsMyBrowserCom<br /><small></small></td><td>Chrome 48.0.2547.0</td><td>WebKit 537.36</td><td>Windows Windows NT 10.0</td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.40408</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-9795f66f-7271-430e-973a-a5c0e14dc35a">Detail</a> <!-- Modal Structure --> <div id="modal-9795f66f-7271-430e-973a-a5c0e14dc35a" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhatIsMyBrowserCom result detail</h4> <p><pre><code class="php">stdClass Object ( [operating_system_name] => Windows [simple_sub_description_string] => [simple_browser_string] => Chrome 48 on Windows 10 [browser_version] => 48 [extra_info] => Array ( ) [operating_platform] => [extra_info_table] => Array ( ) [layout_engine_name] => WebKit [detected_addons] => Array ( ) [operating_system_flavour_code] => [hardware_architecture] => [operating_system_flavour] => [operating_system_frameworks] => Array ( ) [browser_name_code] => chrome [operating_system_version] => 10 [simple_operating_platform_string] => [is_abusive] => [layout_engine_version] => 537.36 [browser_capabilities] => Array ( ) [operating_platform_vendor_name] => [operating_system] => Windows 10 [operating_system_version_full] => Windows NT 10.0 [operating_platform_code] => [browser_name] => Chrome [operating_system_name_code] => windows [user_agent] => Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2547.0 Safari/537.36 [browser_version_full] => 48.0.2547.0 [browser] => Chrome 48 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>WhichBrowser<br /><small>2.0.10</small></td><td>Chrome Dev 48.0.2547.0</td><td>Blink </td><td>Windows 10</td><td style="border-left: 1px solid #555"></td><td></td><td>desktop</td><td></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.003</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4">Detail</a> <!-- Modal Structure --> <div id="modal-342c8d32-4765-40a8-8a5c-af3a38d19ae4" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>WhichBrowser result detail</h4> <p><pre><code class="php">Array ( [browser] => Array ( [name] => Chrome [version] => 48.0.2547.0 [type] => browser ) [engine] => Array ( [name] => Blink ) [os] => Array ( [name] => Windows [version] => Array ( [value] => 10.0 [alias] => 10 ) ) [device] => Array ( [type] => desktop ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Woothee<br /><small>v1.2.0</small></td><td>Chrome 48.0.2547.0</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>pc</td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td style="border-left: 1px solid #555"></td><td></td><td><i class="material-icons">close</i></td><td>0.001</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-3f285ff5-314b-4db4-9948-54572e92e7b6">Detail</a> <!-- Modal Structure --> <div id="modal-3f285ff5-314b-4db4-9948-54572e92e7b6" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Woothee result detail</h4> <p><pre><code class="php">Array ( [name] => Chrome [vendor] => Google [version] => 48.0.2547.0 [category] => pc [os] => Windows 10 [os_version] => NT 10.0 ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr><tr><td>Wurfl<br /><small>1.6.4</small></td><td>Chrome 48.0.2548.0</td><td><i class="material-icons">close</i></td><td>Windows 10</td><td style="border-left: 1px solid #555"></td><td></td><td>Desktop</td><td></td><td></td><td style="border-left: 1px solid #555"></td><td><i class="material-icons">close</i></td><td><i class="material-icons">close</i></td><td>0.01901</td><td> <!-- Modal Trigger --> <a class="modal-trigger btn waves-effect waves-light" href="#modal-1a1aee36-7ce7-4111-a391-8e2c501f1532">Detail</a> <!-- Modal Structure --> <div id="modal-1a1aee36-7ce7-4111-a391-8e2c501f1532" class="modal modal-fixed-footer"> <div class="modal-content"> <h4>Wurfl result detail</h4> <p><pre><code class="php">Array ( [virtual] => Array ( [is_android] => false [is_ios] => false [is_windows_phone] => false [is_app] => false [is_full_desktop] => true [is_largescreen] => true [is_mobile] => false [is_robot] => false [is_smartphone] => false [is_touchscreen] => false [is_wml_preferred] => false [is_xhtmlmp_preferred] => false [is_html_preferred] => true [advertised_device_os] => Windows [advertised_device_os_version] => 10 [advertised_browser] => Chrome [advertised_browser_version] => 48.0.2548.0 [complete_device_name] => Google Chrome [form_factor] => Desktop [is_phone] => false [is_app_webview] => false ) [all] => Array ( [brand_name] => Google [model_name] => Chrome [unique] => true [ununiqueness_handler] => [is_wireless_device] => false [device_claims_web_support] => true [has_qwerty_keyboard] => true [can_skip_aligned_link_row] => true [uaprof] => [uaprof2] => [uaprof3] => [nokia_series] => 0 [nokia_edition] => 0 [device_os] => Desktop [mobile_browser] => [mobile_browser_version] => 48.0 [device_os_version] => 0 [pointing_method] => mouse [release_date] => 2012_november [marketing_name] => [model_extra_info] => [nokia_feature_pack] => 0 [can_assign_phone_number] => false [is_tablet] => false [manufacturer_name] => [is_bot] => false [is_google_glass] => false [proportional_font] => false [built_in_back_button_support] => false [card_title_support] => false [softkey_support] => false [table_support] => false [numbered_menus] => false [menu_with_select_element_recommended] => false [menu_with_list_of_links_recommended] => false [icons_on_menu_items_support] => false [break_list_of_links_with_br_element_recommended] => false [access_key_support] => false [wrap_mode_support] => false [times_square_mode_support] => false [deck_prefetch_support] => false [elective_forms_recommended] => false [wizards_recommended] => false [image_as_link_support] => false [insert_br_element_after_widget_recommended] => false [wml_can_display_images_and_text_on_same_line] => false [wml_displays_image_in_center] => false [opwv_wml_extensions_support] => false [wml_make_phone_call_string] => none [chtml_display_accesskey] => false [emoji] => false [chtml_can_display_images_and_text_on_same_line] => false [chtml_displays_image_in_center] => false [imode_region] => none [chtml_make_phone_call_string] => tel: [chtml_table_support] => true [xhtml_honors_bgcolor] => true [xhtml_supports_forms_in_table] => true [xhtml_support_wml2_namespace] => false [xhtml_autoexpand_select] => false [xhtml_select_as_dropdown] => true [xhtml_select_as_radiobutton] => true [xhtml_select_as_popup] => true [xhtml_display_accesskey] => false [xhtml_supports_invisible_text] => false [xhtml_supports_inline_input] => false [xhtml_supports_monospace_font] => false [xhtml_supports_table_for_layout] => false [xhtml_supports_css_cell_table_coloring] => false [xhtml_format_as_css_property] => false [xhtml_format_as_attribute] => false [xhtml_nowrap_mode] => false [xhtml_marquee_as_css_property] => false [xhtml_readable_background_color1] => #FFFFFF [xhtml_readable_background_color2] => #FFFFFF [xhtml_allows_disabled_form_elements] => false [xhtml_document_title_support] => true [xhtml_preferred_charset] => utf8 [opwv_xhtml_extensions_support] => false [xhtml_make_phone_call_string] => none [xhtmlmp_preferred_mime_type] => text/html [xhtml_table_support] => false [xhtml_send_sms_string] => none [xhtml_send_mms_string] => none [xhtml_file_upload] => supported [cookie_support] => true [accept_third_party_cookie] => true [xhtml_supports_iframe] => full [xhtml_avoid_accesskeys] => true [xhtml_can_embed_video] => play_and_stop [ajax_support_javascript] => true [ajax_manipulate_css] => true [ajax_support_getelementbyid] => true [ajax_support_inner_html] => true [ajax_xhr_type] => standard [ajax_manipulate_dom] => true [ajax_support_events] => true [ajax_support_event_listener] => true [ajax_preferred_geoloc_api] => none [xhtml_support_level] => 4 [preferred_markup] => html_web_4_0 [wml_1_1] => false [wml_1_2] => false [wml_1_3] => false [html_wi_w3_xhtmlbasic] => true [html_wi_oma_xhtmlmp_1_0] => false [html_wi_imode_html_1] => false [html_wi_imode_html_2] => false [html_wi_imode_html_3] => false [html_wi_imode_html_4] => false [html_wi_imode_html_5] => false [html_wi_imode_htmlx_1] => false [html_wi_imode_htmlx_1_1] => false [html_wi_imode_compact_generic] => false [html_web_3_2] => true [html_web_4_0] => true [voicexml] => false [multipart_support] => false [total_cache_disable_support] => false [time_to_live_support] => false [resolution_width] => 800 [resolution_height] => 600 [columns] => 120 [max_image_width] => 800 [max_image_height] => 600 [rows] => 200 [physical_screen_width] => 400 [physical_screen_height] => 400 [dual_orientation] => false [density_class] => 1.0 [wbmp] => false [bmp] => true [epoc_bmp] => false [gif_animated] => true [jpg] => true [png] => true [tiff] => false [transparent_png_alpha] => false [transparent_png_index] => false [svgt_1_1] => true [svgt_1_1_plus] => false [greyscale] => false [gif] => true [colors] => 65536 [webp_lossy_support] => true [webp_lossless_support] => true [post_method_support] => true [basic_authentication_support] => true [empty_option_value_support] => true [emptyok] => false [nokia_voice_call] => false [wta_voice_call] => false [wta_phonebook] => false [wta_misc] => false [wta_pdc] => false [https_support] => true [phone_id_provided] => false [max_data_rate] => 3200 [wifi] => true [sdio] => false [vpn] => false [has_cellular_radio] => false [max_deck_size] => 100000 [max_url_length_in_requests] => 128 [max_url_length_homepage] => 0 [max_url_length_bookmark] => 0 [max_url_length_cached_page] => 0 [max_no_of_connection_settings] => 0 [max_no_of_bookmarks] => 0 [max_length_of_username] => 0 [max_length_of_password] => 0 [max_object_size] => 0 [downloadfun_support] => false [directdownload_support] => false [inline_support] => false [oma_support] => false [ringtone] => false [ringtone_3gpp] => false [ringtone_midi_monophonic] => false [ringtone_midi_polyphonic] => false [ringtone_imelody] => false [ringtone_digiplug] => false [ringtone_compactmidi] => false [ringtone_mmf] => false [ringtone_rmf] => false [ringtone_xmf] => false [ringtone_amr] => false [ringtone_awb] => false [ringtone_aac] => false [ringtone_wav] => false [ringtone_mp3] => false [ringtone_spmidi] => false [ringtone_qcelp] => false [ringtone_voices] => 1 [ringtone_df_size_limit] => 0 [ringtone_directdownload_size_limit] => 0 [ringtone_inline_size_limit] => 0 [ringtone_oma_size_limit] => 0 [wallpaper] => false [wallpaper_max_width] => 0 [wallpaper_max_height] => 0 [wallpaper_preferred_width] => 0 [wallpaper_preferred_height] => 0 [wallpaper_resize] => none [wallpaper_wbmp] => false [wallpaper_bmp] => false [wallpaper_gif] => false [wallpaper_jpg] => false [wallpaper_png] => false [wallpaper_tiff] => false [wallpaper_greyscale] => false [wallpaper_colors] => 2 [wallpaper_df_size_limit] => 0 [wallpaper_directdownload_size_limit] => 0 [wallpaper_inline_size_limit] => 0 [wallpaper_oma_size_limit] => 0 [screensaver] => false [screensaver_max_width] => 0 [screensaver_max_height] => 0 [screensaver_preferred_width] => 0 [screensaver_preferred_height] => 0 [screensaver_resize] => none [screensaver_wbmp] => false [screensaver_bmp] => false [screensaver_gif] => false [screensaver_jpg] => false [screensaver_png] => false [screensaver_greyscale] => false [screensaver_colors] => 2 [screensaver_df_size_limit] => 0 [screensaver_directdownload_size_limit] => 0 [screensaver_inline_size_limit] => 0 [screensaver_oma_size_limit] => 0 [picture] => false [picture_max_width] => 0 [picture_max_height] => 0 [picture_preferred_width] => 0 [picture_preferred_height] => 0 [picture_resize] => none [picture_wbmp] => false [picture_bmp] => false [picture_gif] => false [picture_jpg] => false [picture_png] => false [picture_greyscale] => false [picture_colors] => 2 [picture_df_size_limit] => 0 [picture_directdownload_size_limit] => 0 [picture_inline_size_limit] => 0 [picture_oma_size_limit] => 0 [video] => false [oma_v_1_0_forwardlock] => false [oma_v_1_0_combined_delivery] => false [oma_v_1_0_separate_delivery] => false [streaming_video] => false [streaming_3gpp] => false [streaming_mp4] => false [streaming_mov] => false [streaming_video_size_limit] => 0 [streaming_real_media] => none [streaming_flv] => false [streaming_3g2] => false [streaming_vcodec_h263_0] => -1 [streaming_vcodec_h263_3] => -1 [streaming_vcodec_mpeg4_sp] => -1 [streaming_vcodec_mpeg4_asp] => -1 [streaming_vcodec_h264_bp] => -1 [streaming_acodec_amr] => none [streaming_acodec_aac] => none [streaming_wmv] => none [streaming_preferred_protocol] => rtsp [streaming_preferred_http_protocol] => none [wap_push_support] => false [connectionless_service_indication] => false [connectionless_service_load] => false [connectionless_cache_operation] => false [connectionoriented_unconfirmed_service_indication] => false [connectionoriented_unconfirmed_service_load] => false [connectionoriented_unconfirmed_cache_operation] => false [connectionoriented_confirmed_service_indication] => false [connectionoriented_confirmed_service_load] => false [connectionoriented_confirmed_cache_operation] => false [utf8_support] => true [ascii_support] => false [iso8859_support] => false [expiration_date] => false [j2me_cldc_1_0] => false [j2me_cldc_1_1] => false [j2me_midp_1_0] => false [j2me_midp_2_0] => false [doja_1_0] => false [doja_1_5] => false [doja_2_0] => false [doja_2_1] => false [doja_2_2] => false [doja_3_0] => false [doja_3_5] => false [doja_4_0] => false [j2me_jtwi] => false [j2me_mmapi_1_0] => false [j2me_mmapi_1_1] => false [j2me_wmapi_1_0] => false [j2me_wmapi_1_1] => false [j2me_wmapi_2_0] => false [j2me_btapi] => false [j2me_3dapi] => false [j2me_locapi] => false [j2me_nokia_ui] => false [j2me_motorola_lwt] => false [j2me_siemens_color_game] => false [j2me_siemens_extension] => false [j2me_heap_size] => 0 [j2me_max_jar_size] => 0 [j2me_storage_size] => 0 [j2me_max_record_store_size] => 0 [j2me_screen_width] => 0 [j2me_screen_height] => 0 [j2me_canvas_width] => 0 [j2me_canvas_height] => 0 [j2me_bits_per_pixel] => 0 [j2me_audio_capture_enabled] => false [j2me_video_capture_enabled] => false [j2me_photo_capture_enabled] => false [j2me_capture_image_formats] => none [j2me_http] => false [j2me_https] => false [j2me_socket] => false [j2me_udp] => false [j2me_serial] => false [j2me_gif] => false [j2me_gif89a] => false [j2me_jpg] => false [j2me_png] => false [j2me_bmp] => false [j2me_bmp3] => false [j2me_wbmp] => false [j2me_midi] => false [j2me_wav] => false [j2me_amr] => false [j2me_mp3] => false [j2me_mp4] => false [j2me_imelody] => false [j2me_rmf] => false [j2me_au] => false [j2me_aac] => false [j2me_realaudio] => false [j2me_xmf] => false [j2me_wma] => false [j2me_3gpp] => false [j2me_h263] => false [j2me_svgt] => false [j2me_mpeg4] => false [j2me_realvideo] => false [j2me_real8] => false [j2me_realmedia] => false [j2me_left_softkey_code] => 0 [j2me_right_softkey_code] => 0 [j2me_middle_softkey_code] => 0 [j2me_select_key_code] => 0 [j2me_return_key_code] => 0 [j2me_clear_key_code] => 0 [j2me_datefield_no_accepts_null_date] => false [j2me_datefield_broken] => false [receiver] => false [sender] => false [mms_max_size] => 0 [mms_max_height] => 0 [mms_max_width] => 0 [built_in_recorder] => false [built_in_camera] => false [mms_jpeg_baseline] => false [mms_jpeg_progressive] => false [mms_gif_static] => false [mms_gif_animated] => false [mms_png] => false [mms_bmp] => false [mms_wbmp] => false [mms_amr] => false [mms_wav] => false [mms_midi_monophonic] => false [mms_midi_polyphonic] => false [mms_midi_polyphonic_voices] => 0 [mms_spmidi] => false [mms_mmf] => false [mms_mp3] => false [mms_evrc] => false [mms_qcelp] => false [mms_ota_bitmap] => false [mms_nokia_wallpaper] => false [mms_nokia_operatorlogo] => false [mms_nokia_3dscreensaver] => false [mms_nokia_ringingtone] => false [mms_rmf] => false [mms_xmf] => false [mms_symbian_install] => false [mms_jar] => false [mms_jad] => false [mms_vcard] => false [mms_vcalendar] => false [mms_wml] => false [mms_wbxml] => false [mms_wmlc] => false [mms_video] => false [mms_mp4] => false [mms_3gpp] => false [mms_3gpp2] => false [mms_max_frame_rate] => 0 [nokiaring] => false [picturemessage] => false [operatorlogo] => false [largeoperatorlogo] => false [callericon] => false [nokiavcard] => false [nokiavcal] => false [sckl_ringtone] => false [sckl_operatorlogo] => false [sckl_groupgraphic] => false [sckl_vcard] => false [sckl_vcalendar] => false [text_imelody] => false [ems] => false [ems_variablesizedpictures] => false [ems_imelody] => false [ems_odi] => false [ems_upi] => false [ems_version] => 0 [siemens_ota] => false [siemens_logo_width] => 101 [siemens_logo_height] => 29 [siemens_screensaver_width] => 101 [siemens_screensaver_height] => 50 [gprtf] => false [sagem_v1] => false [sagem_v2] => false [panasonic] => false [sms_enabled] => false [wav] => false [mmf] => false [smf] => false [mld] => false [midi_monophonic] => false [midi_polyphonic] => false [sp_midi] => false [rmf] => false [xmf] => false [compactmidi] => false [digiplug] => false [nokia_ringtone] => false [imelody] => false [au] => false [amr] => false [awb] => false [aac] => false [mp3] => false [voices] => 1 [qcelp] => false [evrc] => false [flash_lite_version] => [fl_wallpaper] => false [fl_screensaver] => false [fl_standalone] => false [fl_browser] => false [fl_sub_lcd] => false [full_flash_support] => true [css_supports_width_as_percentage] => true [css_border_image] => css3 [css_rounded_corners] => css3 [css_gradient] => css3 [css_spriting] => true [css_gradient_linear] => css3 [is_transcoder] => false [transcoder_ua_header] => user-agent [rss_support] => false [pdf_support] => true [progressive_download] => true [playback_vcodec_h263_0] => -1 [playback_vcodec_h263_3] => -1 [playback_vcodec_mpeg4_sp] => -1 [playback_vcodec_mpeg4_asp] => -1 [playback_vcodec_h264_bp] => -1 [playback_real_media] => none [playback_3gpp] => false [playback_3g2] => false [playback_mp4] => false [playback_mov] => false [playback_acodec_amr] => none [playback_acodec_aac] => none [playback_df_size_limit] => 0 [playback_directdownload_size_limit] => 0 [playback_inline_size_limit] => 0 [playback_oma_size_limit] => 0 [playback_acodec_qcelp] => false [playback_wmv] => none [hinted_progressive_download] => false [html_preferred_dtd] => html4 [viewport_supported] => false [viewport_width] => [viewport_userscalable] => [viewport_initial_scale] => [viewport_maximum_scale] => [viewport_minimum_scale] => [mobileoptimized] => false [handheldfriendly] => false [canvas_support] => full [image_inlining] => true [is_smarttv] => false [is_console] => false [nfc_support] => false [ux_full_desktop] => true [jqm_grade] => A [is_sencha_touch_ok] => true [controlcap_is_smartphone] => default [controlcap_is_ios] => default [controlcap_is_android] => default [controlcap_is_robot] => default [controlcap_is_app] => default [controlcap_advertised_device_os] => default [controlcap_advertised_device_os_version] => default [controlcap_advertised_browser] => default [controlcap_advertised_browser_version] => default [controlcap_is_windows_phone] => default [controlcap_is_full_desktop] => default [controlcap_is_largescreen] => default [controlcap_is_mobile] => default [controlcap_is_touchscreen] => default [controlcap_is_wml_preferred] => default [controlcap_is_xhtmlmp_preferred] => default [controlcap_is_html_preferred] => default [controlcap_form_factor] => default [controlcap_complete_device_name] => default ) ) </code></pre></p> </div> <div class="modal-footer"> <a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat ">close</a> </div> </div> </td></tr></table> </div> <div class="section"> <h1 class="header center orange-text">About this comparison</h1> <div class="row center"> <h5 class="header light"> The primary goal of this project is simple<br /> I wanted to know which user agent parser is the most accurate in each part - device detection, bot detection and so on...<br /> <br /> The secondary goal is to provide a source for all user agent parsers to improve their detection based on this results.<br /> <br /> You can also improve this further, by suggesting ideas at <a href="https://github.com/ThaDafinser/UserAgentParserComparison">ThaDafinser/UserAgentParserComparison</a><br /> <br /> The comparison is based on the abstraction by <a href="https://github.com/ThaDafinser/UserAgentParser">ThaDafinser/UserAgentParser</a> </h5> </div> </div> <div class="card"> <div class="card-content"> Comparison created <i>2016-02-13 13:41:50</i> | by <a href="https://github.com/ThaDafinser">ThaDafinser</a> </div> </div> </div> <script src="https://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/js/materialize.min.js"></script> <script src="http://cdnjs.cloudflare.com/ajax/libs/list.js/1.1.1/list.min.js"></script> <script> $(document).ready(function(){ // the "href" attribute of .modal-trigger must specify the modal ID that wants to be triggered $('.modal-trigger').leanModal(); }); </script> </body> </html>
{'content_hash': '20ccf8f303ddbc9d14632db5bc99ac60', 'timestamp': '', 'source': 'github', 'line_count': 1154, 'max_line_length': 775, 'avg_line_length': 40.18544194107452, 'alnum_prop': 0.5335317203605469, 'repo_name': 'ThaDafinser/UserAgentParserComparison', 'id': '735d5d81295a21649cfda59e5404246118165ba0', 'size': '46375', 'binary': False, 'copies': '1', 'ref': 'refs/heads/gh-pages', 'path': 'v4/user-agent-detail/ea/9e/ea9e627c-cdba-448a-a557-7309cf958b5c.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '2060859160'}]}
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta name="renderer" content="webkit"> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <body> <ul> <li><a href="/recently">recently</a></li> <li><a href="/recommander">recommander</a></li> <li><a href="/favor">favor</a></li> <li><a href="/download">download</a></li> <li><a href="/search/妹">Search</a> </li> </ul> </body> </html>
{'content_hash': '7be26628da15b0c57c735533589d35e9', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 72, 'avg_line_length': 28.444444444444443, 'alnum_prop': 0.6015625, 'repo_name': 'pythonlittleboy/python_gentleman_crawler', 'id': '03bc3667142204a26cc651c90fdd501a22b9681b', 'size': '514', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'templates/index.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '981'}, {'name': 'HTML', 'bytes': '5106'}, {'name': 'JavaScript', 'bytes': '258979'}, {'name': 'PLpgSQL', 'bytes': '3601709'}, {'name': 'Python', 'bytes': '109160'}]}
namespace base { class Value; } namespace extensions { class Extension; struct RendererContentMatchData { RendererContentMatchData(); ~RendererContentMatchData(); // Match IDs for the URL of the top-level page the renderer is // returning data for. std::set<url_matcher::URLMatcherConditionSet::ID> page_url_matches; // All watched CSS selectors that match on frames with the same // origin as the page's main frame. base::hash_set<std::string> css_selectors; // True if the URL is bookmarked. bool is_bookmarked; }; // Representation of a condition in the Declarative Content API. A condition // consists of an optional URL and a list of CSS selectors. Each of these // attributes needs to be fulfilled in order for the condition to be fulfilled. // // We distinguish between two types of attributes: // - URL Matcher attributes are attributes that test the URL of a page. // These are treated separately because we use a URLMatcher to efficiently // test many of these attributes in parallel by using some advanced // data structures. The URLMatcher tells us if all URL Matcher attributes // are fulfilled for a ContentCondition. // - All other conditions are represented individually as fields in // ContentCondition. These conditions are probed linearly (only if the URL // Matcher found a hit). // // TODO(battre) Consider making the URLMatcher an owner of the // URLMatcherConditionSet and only pass a pointer to URLMatcherConditionSet // in url_matcher_condition_set(). This saves some copying in // ContentConditionSet::GetURLMatcherConditionSets. class ContentCondition { public: // Possible states for matching bookmarked state. enum BookmarkedStateMatch { NOT_BOOKMARKED, BOOKMARKED, DONT_CARE }; ContentCondition( scoped_refptr<const Extension> extension, scoped_refptr<url_matcher::URLMatcherConditionSet> url_matcher_condition_set, const std::vector<std::string>& css_selectors, BookmarkedStateMatch bookmarked_state); ~ContentCondition(); // Factory method that instantiates a ContentCondition according to the // description |condition| passed by the extension API. |condition| should be // an instance of declarativeContent.PageStateMatcher. static scoped_ptr<ContentCondition> Create( scoped_refptr<const Extension> extension, url_matcher::URLMatcherConditionFactory* url_matcher_condition_factory, const base::Value& condition, std::string* error); // Returns whether the request is a match, given that the URLMatcher found // a match for |url_matcher_condition_set_|. bool IsFulfilled(const RendererContentMatchData& renderer_data) const; url_matcher::URLMatcherConditionSet* url_matcher_condition_set() const { return url_matcher_condition_set_.get(); } // Returns the CSS selectors required to match by this condition. const std::vector<std::string>& css_selectors() const { return css_selectors_; } private: const scoped_refptr<const Extension> extension_; scoped_refptr<url_matcher::URLMatcherConditionSet> url_matcher_condition_set_; std::vector<std::string> css_selectors_; BookmarkedStateMatch bookmarked_state_; DISALLOW_COPY_AND_ASSIGN(ContentCondition); }; } // namespace extensions #endif // CHROME_BROWSER_EXTENSIONS_API_DECLARATIVE_CONTENT_CONTENT_CONDITION_H_
{'content_hash': 'c7e730761f0030df6a084a259383c398', 'timestamp': '', 'source': 'github', 'line_count': 86, 'max_line_length': 81, 'avg_line_length': 38.98837209302326, 'alnum_prop': 0.7536534446764092, 'repo_name': 'lihui7115/ChromiumGStreamerBackend', 'id': '6c00e686dba73765217e24c0956bd3418bf666f1', 'size': '3897', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'chrome/browser/extensions/api/declarative_content/content_condition.h', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'AppleScript', 'bytes': '6973'}, {'name': 'Arduino', 'bytes': '464'}, {'name': 'Assembly', 'bytes': '37073'}, {'name': 'Batchfile', 'bytes': '8451'}, {'name': 'C', 'bytes': '9508834'}, {'name': 'C++', 'bytes': '242598549'}, {'name': 'CSS', 'bytes': '943747'}, {'name': 'DM', 'bytes': '60'}, {'name': 'Groff', 'bytes': '2494'}, {'name': 'HTML', 'bytes': '27281878'}, {'name': 'Java', 'bytes': '14561064'}, {'name': 'JavaScript', 'bytes': '20540839'}, {'name': 'Makefile', 'bytes': '70864'}, {'name': 'Objective-C', 'bytes': '1745880'}, {'name': 'Objective-C++', 'bytes': '10008668'}, {'name': 'PHP', 'bytes': '97817'}, {'name': 'PLpgSQL', 'bytes': '178732'}, {'name': 'Perl', 'bytes': '63937'}, {'name': 'Protocol Buffer', 'bytes': '482954'}, {'name': 'Python', 'bytes': '8626890'}, {'name': 'Shell', 'bytes': '481888'}, {'name': 'Standard ML', 'bytes': '5106'}, {'name': 'XSLT', 'bytes': '418'}, {'name': 'nesC', 'bytes': '18347'}]}
module Peek module ActiveResource VERSION = "1.0.0" end end
{'content_hash': 'e1c22914a8bb5b42edab2c3d78d25575', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 23, 'avg_line_length': 13.6, 'alnum_prop': 0.6764705882352942, 'repo_name': 'gotmayonase/peek-active_resource', 'id': 'b19c1952f1998f9a075426efdc959847ee21a056', 'size': '68', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/peek-active_resource/version.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '2631'}]}
typedef NS_ENUM(NSInteger, InAppPurchaseType) { InAppPurchaseTypeALPL }; @interface InAppPurchaseViewController : UIViewController <UITableViewDataSource, UITableViewDelegate, SKProductsRequestDelegate> @property (nonatomic, strong) UITableView *tableView; @property (nonatomic, assign) InAppPurchaseType inAppPurchaseType; @property (nonatomic, strong) NSArray *products; @property (nonatomic, strong) NSDictionary *selectedUser; @property (nonatomic, assign) NSInteger userAL; @property (nonatomic, assign) NSInteger userPL; @property (nonatomic, assign) BOOL generic; - (void)completedPurchaseForLevelWithTransaction:(SKPaymentTransaction *)transaction; - (void)failedTransaction:(SKPaymentTransaction *)transaction; @end
{'content_hash': 'd4de6c9a2868a455067ac7f78e4823b5', 'timestamp': '', 'source': 'github', 'line_count': 18, 'max_line_length': 129, 'avg_line_length': 40.72222222222222, 'alnum_prop': 0.8212824010914052, 'repo_name': 'hery/Chelsea', 'id': 'efc0928a24d4f0c82202f929fe9ae2c957f32d1a', 'size': '941', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Chelsea/View Controllers/InAppPurchaseViewController.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '112814'}, {'name': 'Ruby', 'bytes': '278'}]}
layout: article title: "A Brief History of Bioinformatics?" date: 2017-03-05 9:00 -0600 categories: Writing --- Alright, I have a question for you. If I tell you I am a genomic biologist, where do you expect I spend most of my time? 1. In a lab surrounded by chemicals wearing a white lab coat 2. At a desk, on a laptop smacking my head against a keyboard If you answered \#2, you're right! But, if you answered 1, that's pretty understandable. Biology has changed more than almost any other branch of science in the last 20 years. It takes many people by surprise when they learn that I predominantly work on a computer. How did this happen you might ask? Where are all the Jane Goodalls of the world sitting in blinds watching chimpanzees? The Darwins traveling through uncharted lands and jungles, collecting new specimens? The 1950's era scientist in their white lab coats and horn rims? And finally, why have all of these people been replaced by a nerd wanting to talk to me about programming languages and algorithms? Well, to understand this evolution and this paradigm shift, you first need to understand a brief history of about how we got here (don't worry, it'll be a quick recap, I promise). Alright, stop me if you've heard this story before. DNA was discovered in the 1950's by two older white men (LINK) who stole some really important data from a female scientist(LINK). Once it was confirmed that this molecule was the basis of all life, we began trying to understand how it shaped all life. DNA research initially was slow. Scientist at the time were working with limited tools, and no way of replicating DNA in large quantities. So, while we knew DNA was the molecule of inheritance, we knew little about how it actually worked at all. But, for a great recap of the how we came to learn about how DNA, RNA, and protein came together, check out these links LINK LINK LINK. They do a far better job than I could at the moment of explaining some of these early breakthroughs. In the 1970's however, a massive breakthrough occurred. Fredrick Sanger(LINK) created a methodology which allowed for scientist to make lots of DNA at once. But this came with a new problem... How do I analyze all of these new DNA copies? How do I compare my DNA to the DNA of a tree, or a chimp? Well, initially to understand the contents of DNA, to get down to the level of A's, T's, G's, and C's you had to do quite a bit of chemistry, and then analyze something like this... PICTURE If the above photo makes very little sense to you, don't worry. These types of photos hardly make sense to anyone anymore. Quickly, people realized that the above method of comparison was inefficient and limiting. If it was challenging comparing two slightly different pieces od DNA, comparing a genomes worth, 3.1 billion nucleotides, would be impossible. [comment]: <> ( Early on we had some idea of how much DNA is in a human cell using flow cytomatry, and we established that it was probably arounda few billion base pairs. So if it took weeks or months to get the sequence of a strand of DNA that was 500 base pairs long, the idea of sequencing all of the DNA of an organisms seemed like a pipe dream. ) But in comes our heroin, a scientist by the name of Margaret Dayhoff. Dayhoff did something that changed science and biology forever. She created a computer program to help us read and analyze biological data. And thus, the field of bioinformatics was born. Not out of a random act, but out of neccesity. While all this work was being done, the idea of genomics in the mid 1990's, was still an idea reserved for sci-fi novels and speculative fiction writers. The idea of sequencing the whole of an organisms DNA still far off. But all of a sudden, something changed. The government decided to pour a bunch of money into a first of its kind research, the human genome project. So, bioinformatics was born. Not out of a happy coincidence. But by a group of men and women well aware that to tackle this problem. To understand who we are and what we are, we needed to utilize every tool available to us. And it [comment]: <>( Before I begin I just want to make one thing very clear. Bioinformatics is a huge field. At the time I am writing this, it is a tool and skill set being used in almost every realm of biology. From Cellular biology, all the way up to developmental biology. It's everywhere. And the tools that one computational biologist uses might be totally different than another. )
{'content_hash': '3b75df89140d64a8e3933f4fa15a242c', 'timestamp': '', 'source': 'github', 'line_count': 82, 'max_line_length': 370, 'avg_line_length': 55.08536585365854, 'alnum_prop': 0.7775071950409563, 'repo_name': 'Jome0169/Jome0169.github.io', 'id': 'be2c6b3b9cba9ed33ed59e7eced778faf4c4322c', 'size': '4521', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_posts/_rough_drafts/2017-03-05-ABriefHistoryOfBioinformatics.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '178099'}, {'name': 'JavaScript', 'bytes': '14694'}, {'name': 'Ruby', 'bytes': '199'}, {'name': 'SCSS', 'bytes': '60098'}, {'name': 'Shell', 'bytes': '52'}]}
<?php /* @var $this yii\web\View */ /* @var $form yii\bootstrap\ActiveForm */ /* @var $model_signup app\models\Signup */ use yii\helpers\Html; use yii\bootstrap\ActiveForm; $this->title = 'Регистрация'; ?> <div class="container"> <div class="text-center"> <h3><?= Html::encode($this->title) ?></h3> </div> <div class="col-xs-4 col-xs-offset-4"> <?php $form = ActiveForm::begin(['id' => 'form-horizontal']); ?> <?= $form->field($model_signup, 'username')->textInput(['autofocus' => true]) ?> <?= $form->field($model_signup, 'email') ?> <?= $form->field($model_signup, 'password')->passwordInput() ?> <div class="form-group text-center"> <?= Html::submitButton('Регистрация', ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?> </div> <div style="color:#999;margin:1em 0"> <i>*На указанный E-mail будет отправлено письмо для активации аккаунта.</i> </div> <?php ActiveForm::end(); ?> </div> </div>
{'content_hash': '9169f8f6e983aacb6b3fff86b22b42f7', 'timestamp': '', 'source': 'github', 'line_count': 37, 'max_line_length': 111, 'avg_line_length': 28.0, 'alnum_prop': 0.5617760617760618, 'repo_name': 'KonstantinBelyi/Shop', 'id': '715eef441c8ecdd583ca05b800c69b0946fab4be', 'size': '1110', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'views/site/signup.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'ApacheConf', 'bytes': '524'}, {'name': 'Batchfile', 'bytes': '1030'}, {'name': 'CSS', 'bytes': '50933'}, {'name': 'JavaScript', 'bytes': '153767'}, {'name': 'PHP', 'bytes': '187173'}]}
package ws.m4ktub.quacking; import static org.junit.Assert.*; import org.junit.Test; import ws.m4ktub.quacking.utils.Mixins; public class SubTypesTest { public interface PrimitiveQuacking { boolean booleanQuacking(); byte byteQuacking(); char charQuacking(); short shortQuacking(); int intQuacking(); long longQuacking(); float floatQuacking(); double doubleQuacking(); void voidQuacking(); } public interface WrapperQuacking { Boolean booleanQuacking(); Byte byteQuacking(); Character charQuacking(); Short shortQuacking(); Integer intQuacking(); Long longQuacking(); Float floatQuacking(); Double doubleQuacking(); Void voidQuacking(); } class PrimitiveQuacker { public boolean booleanQuacking() { return false; } public byte byteQuacking() { return 0; } public char charQuacking() { return 0; } public short shortQuacking() { return 0; } public int intQuacking() { return 0; } public long longQuacking() { return 0; } public float floatQuacking() { return 0; } public double doubleQuacking() { return 0; } public void voidQuacking() { } } class WrapperQuacker { public Boolean booleanQuacking() { return false; } public Byte byteQuacking() { return 0; } public Character charQuacking() { return 0; } public Short shortQuacking() { return 0; } public Integer intQuacking() { return 0; } public Long longQuacking() { return 0L; } public Float floatQuacking() { return 0f; } public Double doubleQuacking() { return 0.0; } public Void voidQuacking() { return null; } } class LiarWrapperQuacker { public Boolean booleanQuacking() { return null; } } class VoidReturnQuacker { public String voidQuacking() { return "something"; } } public interface Quack { } public class SonicQuack implements Quack { @Override public String toString() { return "sonic quack"; } } public class SubsonicQuack implements Quack { @Override public String toString() { return "subsonic quack"; } } public class StrangeQuack implements Quack { @Override public String toString() { return "strange quack"; } } public interface SpecializedQuacker { Quack quack(); } class GenericQuacker { public String quack() { return "quack"; } } class SonicQuacker { public SonicQuack quack() { return new SonicQuack(); } } public interface QuackListener { String hear(Quack quack); } public interface QuackSteroListener { String hear(Quack left, Quack right); } class GenericListener { public String hear(String quack) { return "listened to " + quack; } } class SpecializedListener { public String hear(SonicQuack quack) { return "sonic hear " + quack; } public String hear(SubsonicQuack quack) { return "subsonic hear " + quack; } } class StereoListener { public String hear(Object left, Object right) { return "regular hear " + left + " " + right; } public String hear(SonicQuack left, Object right) { return "left sonic hear " + left + " " + right; } public String hear(Object left, SubsonicQuack right) { return "right subsonic hear " + left + " " + right; } } @Test public void testWrapperDuckIsPrimitive() { Mixin mixin = Mixins.create(new WrapperQuacker()); assertTrue(mixin.is(PrimitiveQuacking.class)); } @Test public void testPrimitiveDuckIsWrapper() { Mixin mixin = Mixins.create(new PrimitiveQuacker()); assertTrue(mixin.is(WrapperQuacking.class)); } @Test public void testPrimitiveDuckAsWrapper() { Mixin mixin = Mixins.create(new PrimitiveQuacker()); WrapperQuacking asWrapper = mixin.as(WrapperQuacking.class); assertEquals(asWrapper.booleanQuacking(), Boolean.valueOf(false)); assertEquals(asWrapper.byteQuacking(), Byte.valueOf((byte) 0)); assertEquals(asWrapper.charQuacking(), Character.valueOf((char) 0)); assertEquals(asWrapper.doubleQuacking(), Double.valueOf(0.0)); assertEquals(asWrapper.floatQuacking(), Float.valueOf(0.0f)); assertEquals(asWrapper.intQuacking(), Integer.valueOf(0)); assertEquals(asWrapper.longQuacking(), Long.valueOf(0)); assertEquals(asWrapper.shortQuacking(), Short.valueOf((short) 0)); assertEquals(asWrapper.voidQuacking(), null); } @Test public void testWrapperDuckAsPrimitive() { Mixin mixin = Mixins.create(new WrapperQuacker()); PrimitiveQuacking asWrapper = mixin.as(PrimitiveQuacking.class); assertEquals(asWrapper.booleanQuacking(), false); assertEquals(asWrapper.byteQuacking(), 0); assertEquals(asWrapper.charQuacking(), 0); assertEquals(asWrapper.doubleQuacking(), 0.0, 0.0); assertEquals(asWrapper.floatQuacking(), 0.0f, 0.0f); assertEquals(asWrapper.intQuacking(), 0); assertEquals(asWrapper.longQuacking(), 0L); assertEquals(asWrapper.shortQuacking(), 0); asWrapper.voidQuacking(); } @Test(expected = NullPointerException.class) public void testLiarWrapperDuckAsPrimitive() { Mixin mixin = Mixins.create(new LiarWrapperQuacker()); PrimitiveQuacking asWrapper = mixin.as(PrimitiveQuacking.class); asWrapper.booleanQuacking(); } @Test public void testVoidQuackingWithReturn() { Mixin mixin = new Mixin(); mixin.mix(new VoidReturnQuacker()); PrimitiveQuacking quacker = mixin.as(PrimitiveQuacking.class); quacker.voidQuacking(); } @Test public void testSubtypingReturn() { Mixin mixin = new Mixin(); mixin.mix(new GenericQuacker()); mixin.mix(new SonicQuacker()); assertTrue(mixin.is(SpecializedQuacker.class)); SpecializedQuacker specializedQuacker = mixin.as(SpecializedQuacker.class); assertEquals(specializedQuacker.quack().toString(), "sonic quack"); } @Test public void testSubtypingParameters() { Mixin mixin = new Mixin(); mixin.mix(new GenericListener()); mixin.mix(new SpecializedListener()); QuackListener listener = mixin.as(QuackListener.class); assertEquals(listener.hear(new SonicQuack()), "sonic hear sonic quack"); assertEquals(listener.hear(new SubsonicQuack()), "subsonic hear subsonic quack"); } @Test public void testMultiDispatchParameters() { Mixin mixin = new Mixin(); mixin.mix(new StereoListener()); QuackSteroListener listener = mixin.as(QuackSteroListener.class); assertEquals(listener.hear(new SonicQuack(), new SonicQuack()), "left sonic hear sonic quack sonic quack"); assertEquals(listener.hear(new SonicQuack(), new SubsonicQuack()), "left sonic hear sonic quack subsonic quack"); assertEquals(listener.hear(new SubsonicQuack(), new SubsonicQuack()), "right subsonic hear subsonic quack subsonic quack"); assertEquals(listener.hear(new StrangeQuack(), new SubsonicQuack()), "right subsonic hear strange quack subsonic quack"); assertEquals(listener.hear(new StrangeQuack(), new SonicQuack()), "regular hear strange quack sonic quack"); } }
{'content_hash': '74b5fc630bd862c91eaf7dbfea07bdff', 'timestamp': '', 'source': 'github', 'line_count': 323, 'max_line_length': 125, 'avg_line_length': 21.42105263157895, 'alnum_prop': 0.7113744760803584, 'repo_name': 'm4ktub/quacking', 'id': '8de6c70e94cc756215c37abaa91d990fb9f59c60', 'size': '6919', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'java7/src/test/java/ws/m4ktub/quacking/SubTypesTest.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '49781'}]}
layout: post title: Learn HTTP (and a lot of other useful webdev topics) at Confident Coding III date: 2012-10-08 13:25:39.000000000 -07:00 type: post published: true status: publish categories: tags: [] meta: _edit_last: '1' author: login: admin email: [email protected] display_name: admin first_name: Carina C. last_name: Zon --- <p>I'm speaking October 21st at <a href="http://confidentcoding.com/">Confident Coding III ("Everything Else You Need to Know")</a>, an all-day web technology education conference for women and friends. We'll be at Microsoft's San Francisco offices at Market & Powell. Join us for a fun day of learning about developer tools, automation, HTTP, the commandline, and more. Really useful stuff. Come!</p> <p>(Pssst. Women still earn 77% of what men do. Use discount code EQUALITY to register at 77% price.)</p> <p>Updated: Here's the <a href="http://www.slideshare.net/cczona/full-stack-full-circle-what-the-heck-happens-in-an-http-requestresponse-cycle">slides for "Full Stack & Full Circle: What the Heck Happens In an HTTP Request-Response Cycle"</a></p>
{'content_hash': '763d4ee7330bb915018c1568ec38689f', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 402, 'avg_line_length': 55.0, 'alnum_prop': 0.7436363636363637, 'repo_name': 'cczona/cczona.github.io', 'id': 'ef53dda3171b6ce0d3d399c768904144e58dbbd0', 'size': '1104', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_posts/2012-10-08-learn-http-and-a-lot-of-other-useful-webdev-topics-at-confident-coding-iii.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '50466'}, {'name': 'HTML', 'bytes': '190355'}, {'name': 'JavaScript', 'bytes': '53186'}, {'name': 'Ruby', 'bytes': '2002'}]}
 #include <aws/rekognition/model/UpdateStreamProcessorRequest.h> #include <aws/core/utils/json/JsonSerializer.h> #include <utility> using namespace Aws::Rekognition::Model; using namespace Aws::Utils::Json; using namespace Aws::Utils; UpdateStreamProcessorRequest::UpdateStreamProcessorRequest() : m_nameHasBeenSet(false), m_settingsForUpdateHasBeenSet(false), m_regionsOfInterestForUpdateHasBeenSet(false), m_dataSharingPreferenceForUpdateHasBeenSet(false), m_parametersToDeleteHasBeenSet(false) { } Aws::String UpdateStreamProcessorRequest::SerializePayload() const { JsonValue payload; if(m_nameHasBeenSet) { payload.WithString("Name", m_name); } if(m_settingsForUpdateHasBeenSet) { payload.WithObject("SettingsForUpdate", m_settingsForUpdate.Jsonize()); } if(m_regionsOfInterestForUpdateHasBeenSet) { Array<JsonValue> regionsOfInterestForUpdateJsonList(m_regionsOfInterestForUpdate.size()); for(unsigned regionsOfInterestForUpdateIndex = 0; regionsOfInterestForUpdateIndex < regionsOfInterestForUpdateJsonList.GetLength(); ++regionsOfInterestForUpdateIndex) { regionsOfInterestForUpdateJsonList[regionsOfInterestForUpdateIndex].AsObject(m_regionsOfInterestForUpdate[regionsOfInterestForUpdateIndex].Jsonize()); } payload.WithArray("RegionsOfInterestForUpdate", std::move(regionsOfInterestForUpdateJsonList)); } if(m_dataSharingPreferenceForUpdateHasBeenSet) { payload.WithObject("DataSharingPreferenceForUpdate", m_dataSharingPreferenceForUpdate.Jsonize()); } if(m_parametersToDeleteHasBeenSet) { Array<JsonValue> parametersToDeleteJsonList(m_parametersToDelete.size()); for(unsigned parametersToDeleteIndex = 0; parametersToDeleteIndex < parametersToDeleteJsonList.GetLength(); ++parametersToDeleteIndex) { parametersToDeleteJsonList[parametersToDeleteIndex].AsString(StreamProcessorParameterToDeleteMapper::GetNameForStreamProcessorParameterToDelete(m_parametersToDelete[parametersToDeleteIndex])); } payload.WithArray("ParametersToDelete", std::move(parametersToDeleteJsonList)); } return payload.View().WriteReadable(); } Aws::Http::HeaderValueCollection UpdateStreamProcessorRequest::GetRequestSpecificHeaders() const { Aws::Http::HeaderValueCollection headers; headers.insert(Aws::Http::HeaderValuePair("X-Amz-Target", "RekognitionService.UpdateStreamProcessor")); return headers; }
{'content_hash': '230724f99acdbe7936a89059d08d0f07', 'timestamp': '', 'source': 'github', 'line_count': 78, 'max_line_length': 197, 'avg_line_length': 31.102564102564102, 'alnum_prop': 0.8013190436933223, 'repo_name': 'cedral/aws-sdk-cpp', 'id': 'fcc74dc5a52d43e7967d06ddbc6058f8568a6af3', 'size': '2545', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'aws-cpp-sdk-rekognition/source/model/UpdateStreamProcessorRequest.cpp', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '294220'}, {'name': 'C++', 'bytes': '428637022'}, {'name': 'CMake', 'bytes': '862025'}, {'name': 'Dockerfile', 'bytes': '11688'}, {'name': 'HTML', 'bytes': '7904'}, {'name': 'Java', 'bytes': '352201'}, {'name': 'Python', 'bytes': '106761'}, {'name': 'Shell', 'bytes': '10891'}]}
package com.google.cloud.gszutil import java.nio.charset.Charset import com.google.common.base.Charsets object Utf8 extends Transcoder { override val charset: Charset = Charsets.UTF_8 override val SP: Byte = ' '.toByte }
{'content_hash': 'abccfa25dcc9b39fc9a0c1ec64fbc2b5', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 48, 'avg_line_length': 20.818181818181817, 'alnum_prop': 0.7641921397379913, 'repo_name': 'GoogleCloudPlatform/professional-services', 'id': 'f9849e8c86fc542f73fe2ed6af0a9e0466b003f4', 'size': '842', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'tools/bigquery-zos-mainframe-connector/gszutil/src/main/scala/com/google/cloud/gszutil/Utf8.scala', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '117994'}, {'name': 'C++', 'bytes': '174'}, {'name': 'CSS', 'bytes': '13405'}, {'name': 'Component Pascal', 'bytes': '798'}, {'name': 'Dockerfile', 'bytes': '15093'}, {'name': 'Go', 'bytes': '352968'}, {'name': 'HCL', 'bytes': '204776'}, {'name': 'HTML', 'bytes': '1229668'}, {'name': 'Java', 'bytes': '338810'}, {'name': 'JavaScript', 'bytes': '59905'}, {'name': 'Jinja', 'bytes': '60083'}, {'name': 'Makefile', 'bytes': '14129'}, {'name': 'Python', 'bytes': '2250081'}, {'name': 'Scala', 'bytes': '978327'}, {'name': 'Shell', 'bytes': '109299'}, {'name': 'Smarty', 'bytes': '19839'}, {'name': 'TypeScript', 'bytes': '147194'}]}
/* jshint node: true */ module.exports = function (environment) { var ENV = { modulePrefix: 'statuspage', environment: environment, rootURL: '/', configFilePath: '/config.json', locationType: 'auto', EmberENV: { FEATURES: { // Here you can enable experimental features on an ember canary build // e.g. 'with-controller': true } }, APP: { // Here you can pass flags/options to your application instance // when it is created } } if (environment === 'development') { // ENV.APP.LOG_RESOLVER = true // ENV.APP.LOG_ACTIVE_GENERATION = true // ENV.APP.LOG_TRANSITIONS = true // ENV.APP.LOG_TRANSITIONS_INTERNAL = true // ENV.APP.LOG_VIEW_LOOKUPS = true } if (environment === 'test') { // Testem prefers this... ENV.locationType = 'none' // keep test console output quieter ENV.APP.LOG_ACTIVE_GENERATION = false ENV.APP.LOG_VIEW_LOOKUPS = false ENV.APP.rootElement = '#ember-testing' } return ENV }
{'content_hash': '5be91a43357d8790114e8741bfaf7b58', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 77, 'avg_line_length': 24.046511627906977, 'alnum_prop': 0.6112185686653772, 'repo_name': 'funkensturm/statuspage', 'id': 'a3a43e39362ad12d77e0b1f0d2d874deb6fd5e58', 'size': '1034', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'config/environment.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '16798'}, {'name': 'HTML', 'bytes': '4049'}, {'name': 'JavaScript', 'bytes': '36522'}]}
<?php use yii\helpers\Html; use yii\widgets\ActiveForm; use yii\helpers\ArrayHelper; /* @var $this yii\web\View */ /* @var $model app\models\Category */ /* @var $form yii\widgets\ActiveForm */ ?> <div class="author-form" style="width:500px"> <?php $form = ActiveForm::begin(); ?> <?= $form->field($model, 'categoryname')->textInput(['maxlength' => 75]) ?> <?= $form->field($model, 'description')->textInput(['maxlength' => 150]) ?> <div class="form-group"> <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?> <?= Html::a('Cancel', ['category/index'], ['class' => 'btn btn-warning']) ?> </div> <?php ActiveForm::end(); ?> </div>
{'content_hash': '7aa6f55a38ad941a06473389e3a5b185', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 154, 'avg_line_length': 31.6, 'alnum_prop': 0.5759493670886076, 'repo_name': 'Krish-Chandra/DL_Yii2', 'id': '6d9e38b04b4dba59f1e3a7b0031bf040e37ba9ff', 'size': '790', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'backend/views/category/_form.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'ApacheConf', 'bytes': '453'}, {'name': 'Batchfile', 'bytes': '1541'}, {'name': 'CSS', 'bytes': '2728'}, {'name': 'PHP', 'bytes': '247080'}]}
// Copyright 2020 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "chrome/services/sharing/webrtc/p2p_async_address_resolver.h" #include <utility> #include "base/bind.h" #include "base/feature_list.h" #include "base/location.h" #include "components/webrtc/net_address_utils.h" namespace sharing { P2PAsyncAddressResolver::P2PAsyncAddressResolver( const mojo::SharedRemote<network::mojom::P2PSocketManager>& socket_manager) : socket_manager_(socket_manager), state_(STATE_CREATED) { DCHECK(socket_manager_.is_bound()); } P2PAsyncAddressResolver::~P2PAsyncAddressResolver() { DCHECK(state_ == STATE_CREATED || state_ == STATE_FINISHED); } void P2PAsyncAddressResolver::Start(const rtc::SocketAddress& host_name, absl::optional<int> address_family, DoneCallback done_callback) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK_EQ(STATE_CREATED, state_); state_ = STATE_SENT; done_callback_ = std::move(done_callback); if (address_family.has_value()) { socket_manager_->GetHostAddressWithFamily( host_name.hostname(), address_family.value(), /*enable_mdns=*/true, base::BindOnce(&P2PAsyncAddressResolver::OnResponse, base::Unretained(this))); } else { socket_manager_->GetHostAddress( host_name.hostname(), /*enable_mdns=*/true, base::BindOnce(&P2PAsyncAddressResolver::OnResponse, base::Unretained(this))); } } void P2PAsyncAddressResolver::Cancel() { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (state_ != STATE_FINISHED) state_ = STATE_FINISHED; done_callback_.Reset(); } void P2PAsyncAddressResolver::OnResponse( const std::vector<net::IPAddress>& addresses) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); if (state_ == STATE_SENT) { state_ = STATE_FINISHED; std::move(done_callback_).Run(addresses); } } } // namespace sharing
{'content_hash': 'e9fcb41e4969f45b75d268509b1187d8', 'timestamp': '', 'source': 'github', 'line_count': 65, 'max_line_length': 79, 'avg_line_length': 31.646153846153847, 'alnum_prop': 0.6762275157997083, 'repo_name': 'nwjs/chromium.src', 'id': '3366f2980ddead753911c42531e15e4691874a96', 'size': '2057', 'binary': False, 'copies': '6', 'ref': 'refs/heads/nw70', 'path': 'chrome/services/sharing/webrtc/p2p_async_address_resolver.cc', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
This gem use the Blizzard API to get Informations about Diablo 3 characters and items. ## Installation Add this line to your application's Gemfile: ```ruby gem 'diablo_api' ``` And then execute: $ bundle Or install it yourself as: $ gem install diablo_api ## Usage 1. Create a developer account on [Blizzards developer portal](https://dev.battle.net/) 2. save the developer key do a config file. 3. take the data :) <!-- code --> DiabloApi::Config.configure {} DiabloApi::Career.new('eu', 'de_DE', 'Jimmi#2787') DiabloApi::Hero.new('eu', 'de_DE', 'Jimmi#2787', '58924397') ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment. ## Contributing Bug reports and pull requests are welcome on GitHub at https://github.com/swamirama/diablo_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct. ## License The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
{'content_hash': 'c30f8b63efea30d816d771afa7e25a68', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 282, 'avg_line_length': 29.046511627906977, 'alnum_prop': 0.7309847878302642, 'repo_name': 'SwamiRama/diablo_api', 'id': '52b291e2860964b4693f764942211c1f43da0c56', 'size': '1262', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ruby', 'bytes': '25891'}, {'name': 'Shell', 'bytes': '115'}]}
'use strict'; var Cmd = require('../src/commands').cmd, Room = require('../src/rooms').room, Character = require('../src/character').character, World = require('../src/world').world; module.exports = { name: 'Midgaard', id: 'midgaard', type: 'city', levels: 'All', description: 'The first city.', reloads: 0, created: '', saved: '', author: 'Rocky', messages: [ {msg: 'A cool breeze blows through the streets of Midgaard.'}, {msg: 'The bustle of the city can be distracting. Keep an eye out for thieves.'} ], respawnOn: 8, rooms: [ { id: '1', title: 'Midgaard Town Square', light: true, area: 'midgaard', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent congue sagittis efficitur. Vivamus dapibus sem ac mauris pharetra dapibus. Nunc id ex orci. Quisque fringilla dictum orci molestie condimentum. Duis volutpat porttitor ipsum. Sed ac aliquet leo. Nulla at facilisis orci, eu suscipit nibh. ', outdoors: true, exits: [ { cmd: 'north', id: '2' }, { cmd: 'east', id: '3' }, { cmd: 'south', id: '4' }, { cmd: 'west', id: '5' }, { cmd: 'up', id: '1'//, // area: 'midgaard_academy' }, { cmd: 'down', id: '6', door: { isOpen: false, locked: true, key: '101', openMsg: 'A foul smell flows in from below.', name: 'gate' } } ], playersInRoom: [], monsters: [ { name: 'Rufus', level: 15, short: 'Mayor Rufus', long: 'Rufus, current mayor of Midgaard, is here pacing around the room', description: '', inName: 'Mayor Rufus', race: 'human', id: 9, area: 'midgaard', weight: 245, diceNum: 2, diceSides: 8, diceMod: 5, str: 16, position: 'standing', attackType: 'punch', damRoll: 10, hitRoll: 10, ac: 20, wanderCheck: 38, itemType: 'mob', runOnAliveWhenEmpty: false, items: [{ name: 'Midgaard city key', short: 'a thin gold key', long: 'A thin gold key with a ruby embbeded to the end lies here' , area: 'midgaard', id: '10', level: 1, itemType: 'key', material: 'gold', weight: 0, slot: '', value: 1000, equipped: false, isKey: true }], behaviors: [{ module: 'mayor' }, { module: 'wander' }] }, { name: 'Hound Dog', displayName: 'Hunting hound', level: 1, short: 'a healthy looking brown and white hound', long: 'A large spotted brown and white hound sniffs about the area', inName: 'A canine', race: 'animal', id: '6', area: 'midgaard', weight: 120, position: 'standing', attackType: 'bite', ac: 4, hp: 15, chp: 15, gold: 1, size: {value: 2, display: 'very small'}, itemType: 'mob', behaviors: [{ module: 'wander' }] } ], items: [{ name: 'Fountain', short: 'a large stone fountain', long: 'A large stone fountain full of sparkling water', area: 'midgaard', id: '112', waterSource: true, weight: 10000, itemType: 'ornament' }, { name: 'Leather Armor', short: 'a leather chestplate', long: 'Some leather armor was left here', area: 'midgaard', id: '111', level: 1, itemType: 'armor', material: 'leather', ac: 3, weight: 1, slot: 'body', equipped: false, value: 5 }, { name: 'Torch', short: 'a wooden torch', long: 'A wooden torch rests on the ground' , area: 'midgaard', id: '104', level: 1, itemType: 'weapon', material: 'wood', weaponType: 'club', diceNum: 1, diceSides: 2, diceMod: -5, attackType: 'smash', ac: -1, weight: 2, slot: 'hands', equipped: false, light: true, lightDecay: 10, flickerMsg: '', extinguishMsg: '', spell: { id: 'spark', display: 'Spark', mod: 0, train: 85, type: 'spell', wait: 2 }, beforeDrop: function(item, roomObj) { return true; } }, { name: 'Small Buckler', short: 'a small round buckler', long: 'A small basic looking round buckler lies here' , area: 'midgaard', id: '103', level: 1, itemType: 'shield', material: 'wood', ac: 2, weight: 1, slot: 'hands', equipped: false, affects: [{ id: 'hidden', affect: 'hidden', decay: -1 }] }, { name: 'Loaf of Bread', short: 'a brown loaf of bread', long: 'A rather stale looking loaf of bread is lying on the ground' , area: 'midgaard', id: '7', level: 1, itemType: 'food', weight: 0.5, diceNum: 1, diceSides: 6, diceMod: 1, decay: 3 }, { name: 'Short Sword', displayName: 'Short Sword', short: 'a common looking short sword', long: 'A short sword with a hilt wrapped in leather straps was left on the ground' , area: 'midgaard', id: '8', level: 1, itemType: 'weapon', weaponType: 'sword', material: 'iron', diceNum: 1, diceSides: 6, diceMod: 0, attackType: 'slash', attackElement: '', weight: 4, slot: 'hands', equipped: false, modifiers: { damRoll: 1 } }, { name: 'Burlap sack', short: 'a worn, tan, burlap sack', long: 'A tan burlap sack with frizzed edges and various stains lies here', area: 'midgaard', id: '27', level: 1, itemType: 'container', weight: 1, items: [{ name: 'Sewer key', short: 'small rusty key', long: 'A small rusty key made iron was left here', area: 'midgaard', id: '101', level: 1, itemType: 'key', material: 'iron', weight: 0, slot: '', value: 1, equipped: false, isKey: true }], isOpen: true, carryLimit: 50 }], beforeEnter: function(roomObj, fromRoom, target) { return true; }, onEnter: function(roomObj, target) { } }, { id: '2', title: 'North of Town Square', area: 'midgaard', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent congue sagittis efficitur. Vivamus dapibus sem ac mauris pharetra dapibus. Nunc id ex orci. Quisque fringilla dictum orci molestie condimentum. Duis volutpat porttitor ipsum. Sed ac aliquet leo. Nulla at facilisis orci, eu suscipit nibh. ', outdoors: true, exits: [ { cmd: 'south', id: '1' }, { cmd: 'north', id: '1', area: 'the_great_valley' } ], playersInRoom: [], monsters: [], items: [{ name: 'Tattered Buckler', short: 'a tattered buckler', long: 'A round buckler that looks like its seen heavy use is lying here' , area: 'midgaard', id: '2', level: 1, itemType: 'shield', material: 'wood', ac: 2, weight: 6, slot: 'hands', equipped: false }] }, { id: '3', title: 'East of Town Square', area: 'midgaard', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent congue sagittis efficitur. Vivamus dapibus sem ac mauris pharetra dapibus. Nunc id ex orci. Quisque fringilla dictum orci molestie condimentum. Duis volutpat porttitor ipsum. Sed ac aliquet leo. Nulla at facilisis orci, eu suscipit nibh. ', terrain: 'stone-road', terrainMod: 1, outdoors: true, exits: [ { cmd: 'west', id: '1' } ], playersInRoom: [], monsters: [], items: [{ name: 'Brown waterskin', short: 'a light brown waterskin', long: 'A brown waterskin, the hide seems worn and used, was left here.' , area: 'midgaard', id: '102', level: 1, drinks: 6, maxDrinks: 6, itemType: 'bottle', material: 'leather', weight: 0, value: 1, equipped: false }] }, { id: '4', title: 'South of Town Square', area: 'midgaard', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent congue sagittis efficitur. Vivamus dapibus sem ac mauris pharetra dapibus. Nunc id ex orci. Quisque fringilla dictum orci molestie condimentum. Duis volutpat porttitor ipsum. Sed ac aliquet leo. Nulla at facilisis orci, eu suscipit nibh. ', outdoors: true, exits: [ { cmd: 'north', id: '1' } ], playersInRoom: [], monsters: [], items: [] }, { id: '5', title: 'West of Town Square', area: 'midgaard', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent congue sagittis efficitur. Vivamus dapibus sem ac mauris pharetra dapibus. Nunc id ex orci. Quisque fringilla dictum orci molestie condimentum. Duis volutpat porttitor ipsum. Sed ac aliquet leo. Nulla at facilisis orci, eu suscipit nibh. ', exits: [ { cmd: 'west', id: '8' }, { cmd: 'east', id: '1' } ], playersInRoom: [], monsters: [], items: [{ name: 'Leather Helmet', short: 'a leather helmet', long: 'A simple leather helmet was left here' , area: 'midgaard', id: '3', level: 1, itemType: 'armor', material: 'wood', ac: 1, weight: 1, slot: 'head', equipped: false }] }, { id: '6', title: 'Beneath Town Square', area: 'midgaard', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent congue sagittis efficitur. Vivamus dapibus sem ac mauris pharetra dapibus. Nunc id ex orci. Quisque fringilla dictum orci molestie condimentum. Duis volutpat porttitor ipsum. Sed ac aliquet leo. Nulla at facilisis orci, eu suscipit nibh. ', size: {value: 3, display: 'medium'}, outdoors: false, exits: [ { cmd: 'up', id: '1', door: { name: 'gate', isOpen: false, locked: true, key: '101' } } ], playersInRoom: [], monsters: [{ name: 'Large Alligator', level: 3, race: 'animal', short: 'a mean looking Alligator', long: 'A large mean looking Alligator', diceNum: 2, diceSides: 2, diceMod: 2, hp: 30, chp: 30, kingdom: 'reptile', gold: 3, size: {value: 3, display: 'medium'}, attackOnVisit: true, behaviors: [{ module: 'aggie' }] }], items: [] }, { id: '8', title: 'The General Store', area: 'midgaard', content: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent congue sagittis efficitur. Vivamus dapibus sem ac mauris pharetra dapibus. Nunc id ex orci. Quisque fringilla dictum orci molestie condimentum. Duis volutpat porttitor ipsum. Sed ac aliquet leo. Nulla at facilisis orci, eu suscipit nibh. ', outdoors: false, exits: [ { cmd: 'east', id: '5' } ], playersInRoom: [], monsters: [ { name: 'Thomas', level: 15, short: 'Thomas, the dwarven shopkeep', long: 'Thomas the dwarven shopkeeper is here', description: '', race: 'dwarf', id: '9', area: 'midgaard', weight: 200, diceNum: 2, diceSides: 8, diceMod: 5, str: 18, gold: 1000, position: 'standing', attackType: 'punch', damRoll: 10, hitRoll: 10, ac: 20, merchant: true, itemType: 'mob', preventItemDecay: true, items: [{ name: 'Pemmican', short: 'a piece of Pemmican', long: 'A bit of Pemmican was left here' , area: 'midgaard', id: '110', level: 1, itemType: 'food', material: 'flesh', weight: 0, slot: '', value: 10, equipped: false, spawn: 3 }], behaviors: [], beforeSell: function(merchant, roomObj, buyer) { if (buyer.race === 'ogre') { Cmd.say(merchant, { msg: 'Sell to an Ogre? Are you insane?', roomObj: roomObj }); return false; } else { return true; } } } ], items: [] } ] };
{'content_hash': '04f8f72fd062e9cdf7a7ee7a70fb78a3', 'timestamp': '', 'source': 'github', 'line_count': 495, 'max_line_length': 319, 'avg_line_length': 24.11111111111111, 'alnum_prop': 0.5664851277754503, 'repo_name': 'PaulMulligan/chat-test', 'id': '0e378983e2f5c0ff71a77ef4a806392e4d3f7d52', 'size': '11935', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'areas/midgaard.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2985'}, {'name': 'HTML', 'bytes': '7883'}, {'name': 'JavaScript', 'bytes': '315684'}]}
<meta charset="utf-8"> <title>{% if page.title %}{{ page.title }} &#8211; {% endif %}{{ site.title }}</title> {% if page.excerpt %}<meta name="description" content="{{ page.excerpt | strip_html }}">{% endif %} <meta name="keywords" content="{{ page.tags | join: ', ' }}"> {% if page.author %} {% assign author = site.data.authors[page.author] %}{% else %}{% assign author = site.owner %} {% endif %} {% include _open-graph.html %} {% if site.owner.google.verify %}<!-- Webmaster Tools verfication --> <meta name="google-site-verification" content="{{ site.owner.google.verify }}">{% endif %} {% if site.owner.bing-verify %}<meta name="msvalidate.01" content="{{ site.owner.bing-verify }}">{% endif %} {% capture canonical %}{{ site.url }}{% if site.permalink contains '.html' %}{{ page.url }}{% else %}{{ page.url | remove:'index.html' | strip_slash }}{% endif %}{% endcapture %} <link rel="canonical" href="{{ canonical }}"> <link href="{{ site.url }}/feed.xml" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed"> <!-- http://t.co/dKP3o1e --> <meta name="HandheldFriendly" content="True"> <meta name="MobileOptimized" content="320"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <!-- For all browsers --> <link rel="stylesheet" href="{{ site.url }}/assets/css/main.css"> <meta http-equiv="cleartype" content="on"> <!-- HTML5 Shiv and Media Query Support --> <!--[if lt IE 9]> <script src="{{ site.url }}/assets/js/vendor/html5shiv.min.js"></script> <script src="{{ site.url }}/assets/js/vendor/respond.min.js"></script> <![endif]--> <!-- Modernizr --> <script src="{{ site.url }}/assets/js/vendor/modernizr-2.7.1.custom.min.js"></script> <link href='//fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700%7CPT+Serif:400,700,400italic' rel='stylesheet' type='text/css'> <!-- Icons --> <!-- 16x16 --> <link rel="shortcut icon" href="{{ site.url }}/favicon.ico"> <!-- 32x32 --> <link rel="shortcut icon" href="{{ site.url }}/favicon.png"> <!-- 57x57 (precomposed) for iPhone 3GS, pre-2011 iPod Touch and older Android devices --> <link rel="apple-touch-icon-precomposed" href="{{ site.url }}/images/apple-touch-icon-precomposed.png"> <!-- 72x72 (precomposed) for 1st generation iPad, iPad 2 and iPad mini --> <link rel="apple-touch-icon-precomposed" sizes="72x72" href="{{ site.url }}/images/apple-touch-icon-72x72-precomposed.png"> <!-- 114x114 (precomposed) for iPhone 4, 4S, 5 and post-2011 iPod Touch --> <link rel="apple-touch-icon-precomposed" sizes="114x114" href="{{ site.url }}/images/apple-touch-icon-114x114-precomposed.png"> <!-- 144x144 (precomposed) for iPad 3rd and 4th generation --> <link rel="apple-touch-icon-precomposed" sizes="144x144" href="{{ site.url }}/images/apple-touch-icon-144x144-precomposed.png"> <meta name="google-site-verification" content="jutmHvzkeNqLMouXPs2mlIPXlmSnlaVOv5x-vuUpEPc" />
{'content_hash': 'f68583f47923eddcab452725d70a6cc5', 'timestamp': '', 'source': 'github', 'line_count': 53, 'max_line_length': 178, 'avg_line_length': 54.41509433962264, 'alnum_prop': 0.6709431345353676, 'repo_name': 'am2990/am2990.github.io', 'id': 'bfb5cde57716e3c1142fc42dfd65cdce7880206b', 'size': '2884', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_includes/_head.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '204842'}, {'name': 'HTML', 'bytes': '45404'}, {'name': 'JavaScript', 'bytes': '53389'}, {'name': 'Ruby', 'bytes': '2334'}]}
package behaviors; import java.util.List; import objects.GameObject; /** * No parameters needed * * @author Main Justin (Zihao) Zhang */ public class CanNotJump extends Jumpable { public CanNotJump(GameObject o){ super(o); } @Override public void jump(List<Object> params){ // do nothing } }
{'content_hash': '7707d098aa6f59fa9a9b642659c2165a', 'timestamp': '', 'source': 'github', 'line_count': 21, 'max_line_length': 42, 'avg_line_length': 14.857142857142858, 'alnum_prop': 0.6955128205128205, 'repo_name': 'tjqadri101/oogasalad', 'id': 'b131a47ab828e502fc083ac445b655ed17037b6d', 'size': '312', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'src/behaviors/CanNotJump.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '1515257'}]}
void pstdout(NSString *whatever); void pstderr(NSString *whatever); void print_usage(); #endif
{'content_hash': 'd4dcf4e0dcaa9db9f9dd08ee8c2673f0', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 33, 'avg_line_length': 19.2, 'alnum_prop': 0.7604166666666666, 'repo_name': 'tomekwojcik/tune-control', 'id': '2f27230c02dfc297b7914195341f0f838e801733', 'size': '494', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tune-control/tune-control.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '36527'}]}
namespace privacy { namespace krypton { namespace jni { HttpResponse HttpFetcher::PostJson(const HttpRequest& request) { LOG(INFO) << "Calling HttpFetcher postJson JNI method to " << request.url(); auto jni_ppn = JniCache::Get(); auto env = jni_ppn->GetJavaEnv(); if (!env) { HttpResponse response; response.mutable_status()->set_code(503); response.mutable_status()->set_message("Java Env is not found"); return response; } std::string request_bytes; request.SerializeToString(&request_bytes); jbyteArray java_response_array = static_cast<jbyteArray>(env.value()->CallObjectMethod( http_fetcher_instance_->get(), jni_ppn->GetHttpFetcherPostJsonMethod(), JavaByteArray(env.value(), request_bytes).get())); HttpResponse response; // If Java returned null, then treat it as a 500 Internal error. if (java_response_array == nullptr) { response.mutable_status()->set_code(500); response.mutable_status()->set_message("empty response from java"); return response; } // Try to parse the proto returned from Java. jsize len = env.value()->GetArrayLength(java_response_array); jbyte* bytes = env.value()->GetByteArrayElements(java_response_array, nullptr); if (!response.ParseFromArray(bytes, len)) { response.mutable_status()->set_code(500); response.mutable_status()->set_message("invalid proto response from java"); return response; } env.value()->ReleaseByteArrayElements(java_response_array, bytes, 0); return response; } absl::StatusOr<std::string> HttpFetcher::LookupDns( const std::string& hostname) { LOG(INFO) << "Calling HttpFetcher JNI method to look up DNS for " << hostname; auto jni_ppn = JniCache::Get(); auto env = jni_ppn->GetJavaEnv(); if (!env) { return absl::InternalError("Java Env is not found"); } jstring java_ip = static_cast<jstring>(env.value()->CallObjectMethod( http_fetcher_instance_->get(), jni_ppn->GetHttpFetcherLookupDnsMethod(), JavaString(env.value(), hostname).get())); // If Java returned null, then treat it as an Internal error. if (java_ip == nullptr) { return absl::InternalError("empty response from java"); } return ConvertJavaStringToUTF8(env.value(), java_ip); } } // namespace jni } // namespace krypton } // namespace privacy
{'content_hash': '1b279373053818167059c76e204f23ae', 'timestamp': '', 'source': 'github', 'line_count': 71, 'max_line_length': 80, 'avg_line_length': 33.04225352112676, 'alnum_prop': 0.6875532821824382, 'repo_name': 'google/vpn-libraries', 'id': '918268701a9bb0f9e524766996829486f7a0dd04', 'size': '3351', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'krypton/jni/http_fetcher.cc', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C++', 'bytes': '717861'}, {'name': 'Java', 'bytes': '609338'}, {'name': 'Objective-C', 'bytes': '96014'}, {'name': 'Objective-C++', 'bytes': '293643'}, {'name': 'Starlark', 'bytes': '62'}]}
using System; using System.Linq; using System.Web; using System.Web.UI; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.Owin; using Owin; using SupportSystem.Models; namespace SupportSystem.Account { public partial class Register : Page { protected void CreateUser_Click(object sender, EventArgs e) { var manager = Context.GetOwinContext().GetUserManager<ApplicationUserManager>(); var signInManager = Context.GetOwinContext().Get<ApplicationSignInManager>(); var user = new ApplicationUser() { UserName = Email.Text, Email = Email.Text }; IdentityResult result = manager.Create(user, Password.Text); if (result.Succeeded) { // For more information on how to enable account confirmation and password reset please visit https://go.microsoft.com/fwlink/?LinkID=320771 //string code = manager.GenerateEmailConfirmationToken(user.Id); //string callbackUrl = IdentityHelper.GetUserConfirmationRedirectUrl(code, user.Id, Request); //manager.SendEmail(user.Id, "Confirm your account", "Please confirm your account by clicking <a href=\"" + callbackUrl + "\">here</a>."); signInManager.SignIn( user, isPersistent: false, rememberBrowser: false); IdentityHelper.RedirectToReturnUrl(Request.QueryString["ReturnUrl"], Response); } else { ErrorMessage.Text = result.Errors.FirstOrDefault(); } } } }
{'content_hash': '921a447c522b45792ad3c1db8f2a8784', 'timestamp': '', 'source': 'github', 'line_count': 36, 'max_line_length': 156, 'avg_line_length': 43.75, 'alnum_prop': 0.6507936507936508, 'repo_name': 'Connor2hd/SupportPanel', 'id': '6c54bafca9132b2a370d4fc321d40d307ba353e5', 'size': '1577', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'SupportSystem/Account/Register.aspx.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '117522'}, {'name': 'C#', 'bytes': '62664'}, {'name': 'CSS', 'bytes': '2820'}, {'name': 'JavaScript', 'bytes': '340186'}]}
using System; using System.Collections.Generic; using System.Text.Json; using Azure.Core; using Azure.ResourceManager.Resources.Models; namespace Azure.ResourceManager.SecurityCenter.Models { public partial class CefSolutionProperties : IUtf8JsonSerializable { void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) { writer.WriteStartObject(); if (Optional.IsDefined(Hostname)) { writer.WritePropertyName("hostname"); writer.WriteStringValue(Hostname); } if (Optional.IsDefined(Agent)) { writer.WritePropertyName("agent"); writer.WriteStringValue(Agent); } if (Optional.IsDefined(LastEventReceived)) { writer.WritePropertyName("lastEventReceived"); writer.WriteStringValue(LastEventReceived); } if (Optional.IsDefined(DeviceVendor)) { writer.WritePropertyName("deviceVendor"); writer.WriteStringValue(DeviceVendor); } if (Optional.IsDefined(DeviceType)) { writer.WritePropertyName("deviceType"); writer.WriteStringValue(DeviceType); } if (Optional.IsDefined(Workspace)) { writer.WritePropertyName("workspace"); JsonSerializer.Serialize(writer, Workspace); } foreach (var item in AdditionalProperties) { writer.WritePropertyName(item.Key); #if NET6_0_OR_GREATER writer.WriteRawValue(item.Value); #else JsonSerializer.Serialize(writer, JsonDocument.Parse(item.Value.ToString()).RootElement); #endif } writer.WriteEndObject(); } internal static CefSolutionProperties DeserializeCefSolutionProperties(JsonElement element) { Optional<string> hostname = default; Optional<string> agent = default; Optional<string> lastEventReceived = default; Optional<string> deviceVendor = default; Optional<string> deviceType = default; Optional<WritableSubResource> workspace = default; IDictionary<string, BinaryData> additionalProperties = default; Dictionary<string, BinaryData> additionalPropertiesDictionary = new Dictionary<string, BinaryData>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("hostname")) { hostname = property.Value.GetString(); continue; } if (property.NameEquals("agent")) { agent = property.Value.GetString(); continue; } if (property.NameEquals("lastEventReceived")) { lastEventReceived = property.Value.GetString(); continue; } if (property.NameEquals("deviceVendor")) { deviceVendor = property.Value.GetString(); continue; } if (property.NameEquals("deviceType")) { deviceType = property.Value.GetString(); continue; } if (property.NameEquals("workspace")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } workspace = JsonSerializer.Deserialize<WritableSubResource>(property.Value.ToString()); continue; } additionalPropertiesDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); } additionalProperties = additionalPropertiesDictionary; return new CefSolutionProperties(deviceVendor.Value, deviceType.Value, workspace, additionalProperties, hostname.Value, agent.Value, lastEventReceived.Value); } } }
{'content_hash': '08334681abf11516b15adf1a82670a44', 'timestamp': '', 'source': 'github', 'line_count': 109, 'max_line_length': 170, 'avg_line_length': 39.559633027522935, 'alnum_prop': 0.5503246753246753, 'repo_name': 'Azure/azure-sdk-for-net', 'id': '7a45dfa36dffb12cd675598c61e1707ab5d457d6', 'size': '4450', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'sdk/securitycenter/Azure.ResourceManager.SecurityCenter/src/Generated/Models/CefSolutionProperties.Serialization.cs', 'mode': '33188', 'license': 'mit', 'language': []}
package org.panteleyev.money.model; import java.math.BigDecimal; import java.math.RoundingMode; import java.util.UUID; public sealed interface MoneyRecord permits Account, Category, Contact, Currency, Icon, Transaction, MoneyDocument { UUID uuid(); long created(); long modified(); static BigDecimal normalize(BigDecimal value, BigDecimal defaultValue) { value = value == null ? defaultValue : value; return value.setScale(6, RoundingMode.HALF_UP); } static String normalize(String value) { return value == null ? "" : value; } }
{'content_hash': '33017991b1e066c1c6dea61406d7ee4c', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 88, 'avg_line_length': 23.92, 'alnum_prop': 0.6839464882943144, 'repo_name': 'petr-panteleyev/money-manager', 'id': 'f081820d79f5abc32674d7302230136e006b5cfd', 'size': '705', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'model/src/main/java/org/panteleyev/money/model/MoneyRecord.java', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'CSS', 'bytes': '839'}, {'name': 'FreeMarker', 'bytes': '6494'}, {'name': 'Java', 'bytes': '1008160'}]}
function [d imFnames]=walls1() full_fname = 'walls1.mat'; fname = '/media/blandry/LinuxData/crazyflie-tools/logs/cf2/tests0506/walls1.mat'; if (exist(full_fname,'file')) filename = full_fname; else filename = fname; end d = load(filename);
{'content_hash': 'e054d5c09611f820235e790244193f6e', 'timestamp': '', 'source': 'github', 'line_count': 9, 'max_line_length': 81, 'avg_line_length': 27.555555555555557, 'alnum_prop': 0.7096774193548387, 'repo_name': 'blandry/crazyflie-tools', 'id': 'c4db3d2f8c3e573e6d1b2d91293b31adc8f30435', 'size': '248', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'logs/cf2/tests0506/walls1.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '9573'}, {'name': 'Limbo', 'bytes': '93'}, {'name': 'M', 'bytes': '1235'}, {'name': 'Matlab', 'bytes': '202375'}, {'name': 'Python', 'bytes': '104885'}, {'name': 'Shell', 'bytes': '155'}]}
"""Provide a setuptools command for running tests with green.""" from distutils.errors import DistutilsArgError import setuptools import sys class GreenTestCommand(setuptools.Command): """Provide a test command using green.""" def run(self): """Run tests using green.""" import green.cmdline import green.config green.config.sys.argv = ["", "-t"] if not self.quiet: green.config.sys.argv.append("-vvv") sys.exit(green.cmdline.main()) def initialize_options(self): # suppress(unused-function) """Set all options to their initial values.""" self.quiet = False def finalize_options(self): # suppress(unused-function) """Finalize options.""" if not isinstance(self.quiet, bool): raise DistutilsArgError("""--quiet takes no additional """ """arguments.""") user_options = [ ("quiet", None, "Don't show test descriptions when running") ] description = "run tests using the 'green' test runner"
{'content_hash': '51d9c6663b94f5024c7b8aaab3bb9906', 'timestamp': '', 'source': 'github', 'line_count': 38, 'max_line_length': 70, 'avg_line_length': 28.36842105263158, 'alnum_prop': 0.6113172541743971, 'repo_name': 'smspillaz/setuptools-green', 'id': 'f8195697348a389939401ac463d1d3971108c125', 'size': '1241', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'setuptools_green/__init__.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '4694'}]}
package com.atlassian.maven.plugins.jgitflow.mojo; import com.atlassian.maven.plugins.jgitflow.ReleaseContext; import com.atlassian.maven.plugins.jgitflow.exception.MavenJGitFlowException; import com.atlassian.maven.plugins.jgitflow.manager.FlowReleaseManager; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.MojoFailureException; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; /** * @since version */ @Mojo(name = "feature-deploy", aggregator = true) public class FeatureDeployMojo extends AbstractJGitFlowMojo { /** * Default name of the feature. This option is primarily useful when starting the goal in non-interactive mode. * */ @Parameter( property = "featureName", defaultValue = "") private String featureName = ""; @Parameter( property = "goals", defaultValue = "") private String goals = ""; @Parameter(property = "buildNumber", defaultValue = "") private String buildNumber = ""; @Component(hint = "feature") FlowReleaseManager releaseManager; @Override public void execute() throws MojoExecutionException, MojoFailureException { ReleaseContext ctx = new ReleaseContext(getBasedir()); ctx.setInteractive(getSettings().isInteractiveMode()) .setNoDeploy(false) .setEnableFeatureVersions(true) .setAlwaysUpdateOrigin(alwaysUpdateOrigin) .setPullMaster(pullMaster) .setPullDevelop(pullDevelop) .setDefaultOriginUrl(defaultOriginUrl) .setAllowRemote(isRemoteAllowed()) .setFlowInitContext(getFlowInitContext().getJGitFlowContext()); try { releaseManager.deploy(ctx, getReactorProjects(), session, buildNumber, goals); } catch (MavenJGitFlowException e) { throw new MojoExecutionException("Error finishing feature: " + e.getMessage(),e); } } }
{'content_hash': '23707e8455c369b48d85628e6545dc56', 'timestamp': '', 'source': 'github', 'line_count': 59, 'max_line_length': 115, 'avg_line_length': 35.76271186440678, 'alnum_prop': 0.6867298578199053, 'repo_name': 'ctrimble/jgit-flow', 'id': '69303b668a5a5a50d76dad850f8c21e8d95cf4bb', 'size': '2110', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'jgitflow-maven-plugin/src/main/java/com/atlassian/maven/plugins/jgitflow/mojo/FeatureDeployMojo.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Groovy', 'bytes': '12711'}, {'name': 'Java', 'bytes': '784155'}]}
module.exports = function isAuthenticated(req, res, next) { if (req.isAuthenticated()) { req.session.touch(); return next(); } logger.debug('Unauthorised request found..!'); res.status(401).json({ "error": "Unauthorized request, please signin and retry..!" }); };
{'content_hash': 'd2b8acac70835e33bb0ef23fbf3ad556', 'timestamp': '', 'source': 'github', 'line_count': 11, 'max_line_length': 67, 'avg_line_length': 29.09090909090909, 'alnum_prop': 0.58125, 'repo_name': 'stackroute/LogAggregatorRT', 'id': '4aa78d585752e608ebb1ae427363ed7c5be8e80c', 'size': '320', 'binary': False, 'copies': '1', 'ref': 'refs/heads/devbranch_v1', 'path': 'tattvaserver/auth/authcheck.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '14298'}, {'name': 'HTML', 'bytes': '145451'}, {'name': 'JavaScript', 'bytes': '602344'}]}
namespace blink { class CacheStorageBlobClientList; class MultiCacheQueryOptions; class CacheStorage final : public ScriptWrappable, public ActiveScriptWrappable<CacheStorage>, public ExecutionContextClient { DEFINE_WRAPPERTYPEINFO(); public: CacheStorage(ExecutionContext*, GlobalFetch::ScopedFetcher*); CacheStorage(const CacheStorage&) = delete; CacheStorage& operator=(const CacheStorage&) = delete; ~CacheStorage() override; ScriptPromise open(ScriptState*, const String& cache_name); ScriptPromise has(ScriptState*, const String& cache_name); ScriptPromise Delete(ScriptState*, const String& cache_name); ScriptPromise keys(ScriptState*); ScriptPromise match(ScriptState* script_state, const V8RequestInfo* request, const MultiCacheQueryOptions* options, ExceptionState& exception_state); bool HasPendingActivity() const override; void Trace(Visitor*) const override; private: ScriptPromise MatchImpl(ScriptState*, const Request*, const MultiCacheQueryOptions*); bool IsAllowed(ScriptState*); void MaybeInit(); Member<GlobalFetch::ScopedFetcher> scoped_fetcher_; Member<CacheStorageBlobClientList> blob_client_list_; HeapMojoRemote<mojom::blink::CacheStorage> cache_storage_remote_; absl::optional<bool> allowed_; bool ever_used_; }; } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_MODULES_CACHE_STORAGE_CACHE_STORAGE_H_
{'content_hash': '168e92cff5183bb842a87162898a26c7', 'timestamp': '', 'source': 'github', 'line_count': 50, 'max_line_length': 76, 'avg_line_length': 31.34, 'alnum_prop': 0.6962348436502872, 'repo_name': 'ric2b/Vivaldi-browser', 'id': '2b1a00d09ce11587ed6c7b0cc8bac81e6a5e4302', 'size': '2825', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'chromium/third_party/blink/renderer/modules/cache_storage/cache_storage.h', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []}
package joshie.harvest.animals.render; import joshie.harvest.animals.HFAnimals; import joshie.harvest.animals.item.ItemAnimalSpawner.Spawner; import joshie.harvest.core.base.render.FakeEntityRenderer.EntityItemRenderer; import joshie.harvest.core.base.render.FakeEntityRenderer.RenderPair; import net.minecraft.client.model.ModelBase; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @SideOnly(Side.CLIENT) public class AnimalItemRenderer extends EntityItemRenderer { public static final AnimalItemRenderer INSTANCE = new AnimalItemRenderer(); @SuppressWarnings("deprecation") public void register(Spawner spawner, String name, ModelBase model) { map.put(spawner.ordinal(), new RenderPair(name, model)); ForgeHooksClient.registerTESRItemStack(HFAnimals.ANIMAL, spawner.ordinal(), this.getClass()); } @SuppressWarnings("deprecation") public void register(Spawner spawner, ResourceLocation texture, ModelBase model) { map.put(spawner.ordinal(), new RenderPair(texture, model)); ForgeHooksClient.registerTESRItemStack(HFAnimals.ANIMAL, spawner.ordinal(), this.getClass()); } }
{'content_hash': '20ef5145b39d3377a30973d66879c226', 'timestamp': '', 'source': 'github', 'line_count': 28, 'max_line_length': 101, 'avg_line_length': 45.785714285714285, 'alnum_prop': 0.7917316692667706, 'repo_name': 'PenguinSquad/Harvest-Festival', 'id': '77dbefeb1952988923552ac289c1688011453c36', 'size': '1282', 'binary': False, 'copies': '1', 'ref': 'refs/heads/1.10.2-0.6.X', 'path': 'src/main/java/joshie/harvest/animals/render/AnimalItemRenderer.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '2809556'}]}
<?php // Check for empty fields if(empty($_POST['name']) || empty($_POST['email']) || empty($_POST['phone']) || empty($_POST['message']) || !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL)) { echo "No arguments Provided!"; return false; } $name = $_POST['name']; $email_address = $_POST['email']; $phone = $_POST['phone']; $message = $_POST['message']; // Create the email and send the message $to = '[email protected]'; // Add your email address inbetween the '' replacing [email protected] - This is where the form will send a message to. $email_subject = "Website Contact Form: $name"; $email_body = "You have received a new message from your website contact form.\n\n"."Here are the details:\n\nName: $name\n\nEmail: $email_address\n\nPhone: $phone\n\nMessage:\n$message"; $headers = "From: [email protected]\n"; // This is the email address the generated message will be from. We recommend using something like [email protected]. $headers .= "Reply-To: $email_address"; mail($to,$email_subject,$email_body,$headers); return true; ?>
{'content_hash': '053a26e1f7f594e92b1d9411251a4f9e', 'timestamp': '', 'source': 'github', 'line_count': 26, 'max_line_length': 187, 'avg_line_length': 41.69230769230769, 'alnum_prop': 0.6771217712177122, 'repo_name': 'mah3uz/mah3uz.github.io', 'id': '449098659aa1e155f682a5f314f63490f005e6e9', 'size': '1084', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': '_site/mail/contact_me.php', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '17593'}, {'name': 'HTML', 'bytes': '97857'}, {'name': 'JavaScript', 'bytes': '85512'}, {'name': 'PHP', 'bytes': '2168'}, {'name': 'Ruby', 'bytes': '7681'}]}
(function(){ seajs.use(['site.huozhu.main.Background'], function(background) { $(document).ready(function() { background.init(); window.bg = background; }); }); })();
{'content_hash': 'b734e726c54767005e7db3e394049ddf', 'timestamp': '', 'source': 'github', 'line_count': 8, 'max_line_length': 69, 'avg_line_length': 26.875, 'alnum_prop': 0.5162790697674419, 'repo_name': 'tomtrije/huozhu', 'id': 'ad9a63040dcf15c5db884d4df98c2bff00c20c29', 'size': '215', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'server/huozhu/chrome/js/page/background.js', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '25001'}, {'name': 'HTML', 'bytes': '35195'}, {'name': 'Java', 'bytes': '128406'}, {'name': 'JavaScript', 'bytes': '655838'}, {'name': 'Kotlin', 'bytes': '918'}, {'name': 'Lua', 'bytes': '18244'}, {'name': 'Shell', 'bytes': '341'}]}
<!--- FrozenIsBool True --> ##Example the each operation in that case is
{'content_hash': '42d7d4e893daa4ff9b38f2f4eab1f177', 'timestamp': '', 'source': 'github', 'line_count': 7, 'max_line_length': 35, 'avg_line_length': 10.714285714285714, 'alnum_prop': 0.68, 'repo_name': 'Ledoux/ShareYourSystem', 'id': '071a841bd541656833a6824ae197470005e97fb8', 'size': '76', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Pythonlogy/ShareYourSystem/Standards/Itemizers/Manager/06_ExampleDoc.md', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '86'}, {'name': 'C++', 'bytes': '4244220'}, {'name': 'CSS', 'bytes': '142769'}, {'name': 'CoffeeScript', 'bytes': '37331'}, {'name': 'HTML', 'bytes': '36211676'}, {'name': 'JavaScript', 'bytes': '2147968'}, {'name': 'Jupyter Notebook', 'bytes': '7930602'}, {'name': 'Makefile', 'bytes': '6362'}, {'name': 'PHP', 'bytes': '11096341'}, {'name': 'Python', 'bytes': '5700092'}, {'name': 'Ruby', 'bytes': '60'}, {'name': 'Scala', 'bytes': '2412'}, {'name': 'Shell', 'bytes': '2525'}, {'name': 'Swift', 'bytes': '154'}, {'name': 'TeX', 'bytes': '2556'}, {'name': 'XSLT', 'bytes': '20993'}]}
namespace DotNetNuke.Modules.UserGroups { public partial class LeaveGroup { /// <summary> /// lblMember control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblMember; /// <summary> /// lblUsername control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblUsername; /// <summary> /// lblGroup control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblGroup; /// <summary> /// lblGroupName control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblGroupName; /// <summary> /// lblReason control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblReason; /// <summary> /// rcbReason control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::Telerik.Web.UI.RadComboBox rcbReason; /// <summary> /// divReasonOther control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlGenericControl divReasonOther; /// <summary> /// lblReasonOther control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblReasonOther; /// <summary> /// rtReasonOther control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::Telerik.Web.UI.RadTextBox rtReasonOther; /// <summary> /// lblMsg control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.Label lblMsg; /// <summary> /// cmdRemove control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.LinkButton cmdRemove; /// <summary> /// cmdCancel control. /// </summary> /// <remarks> /// Auto-generated field. /// To modify move field declaration from designer file to code-behind file. /// </remarks> protected global::System.Web.UI.WebControls.LinkButton cmdCancel; } }
{'content_hash': '42a941ae0ce8d0dafceeb43f6a51d5e4', 'timestamp': '', 'source': 'github', 'line_count': 114, 'max_line_length': 87, 'avg_line_length': 34.71052631578947, 'alnum_prop': 0.5521859994945666, 'repo_name': 'DNNCommunity/DNNUserGroups', 'id': '01eaf9a348f5d7b15e4eb13bf35af7fd53f3da90', 'size': '4316', 'binary': False, 'copies': '1', 'ref': 'refs/heads/development', 'path': 'LeaveGroup.ascx.designer.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '43940'}, {'name': 'C#', 'bytes': '279927'}, {'name': 'CSS', 'bytes': '15040'}, {'name': 'JavaScript', 'bytes': '12214'}]}
import { Directive, EventEmitter, Input, Output } from '@angular/core'; @Directive({ selector: '[novoThSortable]', host: { '(click)': 'onToggleSort($event)', }, }) export class ThSortable { @Input('novoThSortable') config: any; @Input() column: any; @Output() onSortChange: EventEmitter<any> = new EventEmitter(); onToggleSort(event) { if (event) { // event.preventDefault(); } if (this.config && this.column && this.config.sorting !== false && this.column.sorting !== false) { switch (this.column.sort) { case 'asc': this.column.sort = 'desc'; break; default: this.column.sort = 'asc'; break; } this.onSortChange.emit(this.column); } } }
{'content_hash': '793f2b780a4febb72970fcb49bc137a2', 'timestamp': '', 'source': 'github', 'line_count': 35, 'max_line_length': 103, 'avg_line_length': 21.857142857142858, 'alnum_prop': 0.5738562091503268, 'repo_name': 'bullhorn/novo-elements', 'id': '74cb263e3a2227194138d15952afc7711f31e0c7', 'size': '772', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'projects/novo-elements/src/elements/table/extras/th-sortable/ThSortable.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '99369'}, {'name': 'HTML', 'bytes': '200072'}, {'name': 'JavaScript', 'bytes': '29452'}, {'name': 'SCSS', 'bytes': '349833'}, {'name': 'Shell', 'bytes': '1364'}, {'name': 'TypeScript', 'bytes': '3518153'}]}
/** * Fills out the weapon info * * @param connection the jdbc ocnnection * @param job the job object * @returns {{crests: {}, messages: []}} */ function fetchCrests(connection, job) { const startTime = System.currentTimeMillis(); print(" fetchCrests(${job.ascendancies[2].slug}) - started"); const pstmt = connection.prepareStatement(sqls['get-crests.prepared.sql']); pstmt.setInt(1, job.ascendancies[0].id); pstmt.setInt(2, job.ascendancies[1].id); pstmt.setInt(3, job.ascendancies[2].id); const rs = pstmt.executeQuery(); const crests = {}; const messages = []; while (rs.next()) { const id = rs.getInt('_SkillID'); const descriptionId = rs.getInt('_DescriptionID'); const descriptionParams = rs.getString('_DescriptionIDParam'); const descriptionParamsMessageIds = getParamMessageIds(descriptionParams); const crest = { description: descriptionId, params: descriptionParams }; crests[id] = crests[id] ? crests[id].concat(crest) : [crest]; // add to messages messages.push(descriptionId); // add description param message ids to messages descriptionParamsMessageIds.forEach(function (m) { messages.push(m); }); } pstmt.close(); const durationTime = System.currentTimeMillis() - startTime; print(" fetchCrests(${job.ascendancies[2].slug}) - completed in ${durationTime} ms"); return { crests: crests, messages: messages }; }
{'content_hash': '5e34e77b1b074750f54ee114fe6662e2', 'timestamp': '', 'source': 'github', 'line_count': 51, 'max_line_length': 90, 'avg_line_length': 28.372549019607842, 'alnum_prop': 0.6758811333794057, 'repo_name': 'ben-lei/maze-scripts', 'id': '92f6d14694194904022128100c77277905888470', 'size': '1447', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'dnt/lib/fetchCrests.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '21938'}]}
layout: project lab: OK Lab Berlin #needed for Aggregation on Lab-Page imgname: berlin/entwicklung-berlin.png title: Historische Entwicklung Berlins links: - url: http://community.codefor.de/entwicklung-berlins/ name: Website - url: https://github.com/jochenklar/entwicklung-berlins name: Page on Github colaborators: - name: Magdalena Noffke links: - url: http://twitter.com/magdalenanoffke url-name: twitter - url: http://github.com/MagdaN url-name: github - name: Jochen Klar links: - url: http://twitter.com/jochenklar url-name: twitter - url: http://github.com/jochenklar url-name: github --- Historische Berlin-Karten aus dem FIS-Broker zur Benutzung in anderen Projekten.
{'content_hash': 'c739bf8d642f4605c61c0ce96edb183a', 'timestamp': '', 'source': 'github', 'line_count': 28, 'max_line_length': 80, 'avg_line_length': 25.535714285714285, 'alnum_prop': 0.737062937062937, 'repo_name': 'zfhui/codefor.de', 'id': '4b7a59401052da187e3f19b13fc693240a59435a', 'size': '719', 'binary': False, 'copies': '3', 'ref': 'refs/heads/gh-pages', 'path': 'projekte/2014-06-25-historic-berlin.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '23976'}, {'name': 'HTML', 'bytes': '276102'}, {'name': 'JavaScript', 'bytes': '18073'}, {'name': 'Python', 'bytes': '2259'}, {'name': 'Ruby', 'bytes': '3272'}, {'name': 'Shell', 'bytes': '154'}]}
<!DOCTYPE html> <!-- Template Name: Metronic - Responsive Admin Dashboard Template build with Twitter Bootstrap 3.2.0 Version: 3.2.0 Author: KeenThemes Website: http://www.keenthemes.com/ Contact: [email protected] Follow: www.twitter.com/keenthemes Like: www.facebook.com/keenthemes Purchase: http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes License: You must have a valid license purchased only from themeforest (the above link) in order to legally use the theme for your project. --> <!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]--> <!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]--> <!--[if !IE]><!--> <html lang="en"> <!--<![endif]--> <!-- Head BEGIN --> <head> <meta charset="utf-8"> <title>Metronic Frontend (Header Fixed)</title> <meta content="width=device-width, initial-scale=1.0" name="viewport"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta content="Metronic Shop UI description" name="description"> <meta content="Metronic Shop UI keywords" name="keywords"> <meta content="keenthemes" name="author"> <meta property="og:site_name" content="-CUSTOMER VALUE-"> <meta property="og:title" content="-CUSTOMER VALUE-"> <meta property="og:description" content="-CUSTOMER VALUE-"> <meta property="og:type" content="website"> <meta property="og:image" content="-CUSTOMER VALUE-"><!-- link to image for socio --> <meta property="og:url" content="-CUSTOMER VALUE-"> <link rel="shortcut icon" href="favicon.ico"> <!-- Fonts START --> <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700|PT+Sans+Narrow|Source+Sans+Pro:200,300,400,600,700,900&amp;subset=all" rel="stylesheet" type="text/css"> <!-- Fonts END --> <!-- Global styles START --> <link href="../../assets/global/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet"> <link href="../../assets/global/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!-- Global styles END --> <!-- Page level plugin styles START --> <link href="../../assets/global/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet"> <link href="../../assets/global/plugins/carousel-owl-carousel/owl-carousel/owl.carousel.css" rel="stylesheet"> <link href="../../assets/global/plugins/slider-revolution-slider/rs-plugin/css/settings.css" rel="stylesheet"> <!-- Page level plugin styles END --> <!-- Theme styles START --> <link href="../../assets/global/css/components.css" rel="stylesheet"> <link href="../../assets/frontend/layout/css/style.css" rel="stylesheet"> <link href="../../assets/frontend/pages/css/style-revolution-slider.css" rel="stylesheet"><!-- metronic revo slider styles --> <link href="../../assets/frontend/layout/css/style-responsive.css" rel="stylesheet"> <link href="../../assets/frontend/layout/css/themes/red.css" rel="stylesheet" id="style-color"> <link href="../../assets/frontend/layout/css/custom.css" rel="stylesheet"> <!-- Theme styles END --> </head> <!-- Head END --> <!-- Body BEGIN --> <body class="corporate"> <!-- BEGIN STYLE CUSTOMIZER --> <div class="color-panel hidden-sm"> <div class="color-mode-icons icon-color"></div> <div class="color-mode-icons icon-color-close"></div> <div class="color-mode"> <p>THEME COLOR</p> <ul class="inline"> <li class="color-red current color-default" data-style="red"></li> <li class="color-blue" data-style="blue"></li> <li class="color-green" data-style="green"></li> <li class="color-orange" data-style="orange"></li> <li class="color-gray" data-style="gray"></li> <li class="color-turquoise" data-style="turquoise"></li> </ul> </div> </div> <!-- END BEGIN STYLE CUSTOMIZER --> <!-- BEGIN TOP BAR --> <div class="pre-header"> <div class="container"> <div class="row"> <!-- BEGIN TOP BAR LEFT PART --> <div class="col-md-6 col-sm-6 additional-shop-info"> <ul class="list-unstyled list-inline"> <li><i class="fa fa-phone"></i><span>+1 456 6717</span></li> <li><i class="fa fa-envelope-o"></i><span>[email protected]</span></li> </ul> </div> <!-- END TOP BAR LEFT PART --> <!-- BEGIN TOP BAR MENU --> <div class="col-md-6 col-sm-6 additional-nav"> <ul class="list-unstyled list-inline pull-right"> <li><a href="page-login.html">Log In</a></li> <li><a href="page-reg-page.html">Registration</a></li> </ul> </div> <!-- END TOP BAR MENU --> </div> </div> </div> <!-- END TOP BAR --> <!-- BEGIN HEADER --> <div class="header"> <div class="container"> <a class="site-logo" href="index.html"><img src="../../assets/frontend/layout/img/logos/logo-corp-red.png" alt="Metronic FrontEnd"></a> <a href="javascript:void(0);" class="mobi-toggler"><i class="fa fa-bars"></i></a> <!-- BEGIN NAVIGATION --> <div class="header-navigation pull-right font-transform-inherit"> <ul> <li class="dropdown active"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Home </a> <ul class="dropdown-menu"> <li><a href="index.html">Home Default</a></li> <li class="active"><a href="index-header-fix.html">Home with Header Fixed</a></li> <li><a href="index-without-topbar.html">Home without Top Bar</a></li> </ul> </li> <li class="dropdown dropdown-megamenu"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Mega Menu </a> <ul class="dropdown-menu"> <li> <div class="header-navigation-content"> <div class="row"> <div class="col-md-4 header-navigation-col"> <h4>Footwear</h4> <ul> <li><a href="index.html">Astro Trainers</a></li> <li><a href="index.html">Basketball Shoes</a></li> <li><a href="index.html">Boots</a></li> <li><a href="index.html">Canvas Shoes</a></li> <li><a href="index.html">Football Boots</a></li> <li><a href="index.html">Golf Shoes</a></li> <li><a href="index.html">Hi Tops</a></li> <li><a href="index.html">Indoor Trainers</a></li> </ul> </div> <div class="col-md-4 header-navigation-col"> <h4>Clothing</h4> <ul> <li><a href="index.html">Base Layer</a></li> <li><a href="index.html">Character</a></li> <li><a href="index.html">Chinos</a></li> <li><a href="index.html">Combats</a></li> <li><a href="index.html">Cricket Clothing</a></li> <li><a href="index.html">Fleeces</a></li> <li><a href="index.html">Gilets</a></li> <li><a href="index.html">Golf Tops</a></li> </ul> </div> <div class="col-md-4 header-navigation-col"> <h4>Accessories</h4> <ul> <li><a href="index.html">Belts</a></li> <li><a href="index.html">Caps</a></li> <li><a href="index.html">Gloves</a></li> </ul> <h4>Clearance</h4> <ul> <li><a href="index.html">Jackets</a></li> <li><a href="index.html">Bottoms</a></li> </ul> </div> </div> </div> </li> </ul> </li> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Pages </a> <ul class="dropdown-menu"> <li><a href="page-about.html">About Us</a></li> <li><a href="page-services.html">Services</a></li> <li><a href="page-prices.html">Prices</a></li> <li><a href="page-faq.html">FAQ</a></li> <li><a href="page-gallery.html">Gallery</a></li> <li><a href="page-search-result.html">Search Result</a></li> <li><a href="page-404.html">404</a></li> <li><a href="page-500.html">500</a></li> <li><a href="page-login.html">Login Page</a></li> <li><a href="page-forgotton-password.html">Forget Password</a></li> <li><a href="page-reg-page.html">Signup Page</a></li> <li><a href="page-careers.html">Careers</a></li> <li><a href="page-site-map.html">Site Map</a></li> <li><a href="page-contacts.html">Contact</a></li> </ul> </li> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Features </a> <ul class="dropdown-menu"> <li><a href="feature-typography.html">Typography</a></li> <li><a href="feature-buttons.html">Buttons</a></li> <li><a href="feature-forms.html">Forms</a></li> <li class="dropdown-submenu"> <a href="index.html">Multi level <i class="fa fa-angle-right"></i></a> <ul class="dropdown-menu" role="menu"> <li><a href="index.html">Second Level Link</a></li> <li><a href="index.html">Second Level Link</a></li> <li class="dropdown-submenu"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Second Level Link <i class="fa fa-angle-right"></i> </a> <ul class="dropdown-menu"> <li><a href="index.html">Third Level Link</a></li> <li><a href="index.html">Third Level Link</a></li> <li><a href="index.html">Third Level Link</a></li> </ul> </li> </ul> </li> </ul> </li> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Portfolio </a> <ul class="dropdown-menu"> <li><a href="portfolio-4.html">Portfolio 4</a></li> <li><a href="portfolio-3.html">Portfolio 3</a></li> <li><a href="portfolio-2.html">Portfolio 2</a></li> <li><a href="portfolio-item.html">Portfolio Item</a></li> </ul> </li> <li class="dropdown"> <a class="dropdown-toggle" data-toggle="dropdown" data-target="#" href="#"> Blog </a> <ul class="dropdown-menu"> <li><a href="blog.html">Blog Page</a></li> <li><a href="blog-item.html">Blog Item</a></li> </ul> </li> <li><a href="shop-index.html" target="_blank">E-Commerce</a></li> <li><a href="onepage-index.html" target="_blank">One Page</a></li> <li><a href="http://keenthemes.com/preview/metronic/theme/templates/admin" target="_blank">Admin theme</a></li> <!-- BEGIN TOP SEARCH --> <li class="menu-search"> <span class="sep"></span> <i class="fa fa-search search-btn"></i> <div class="search-box"> <form action="#"> <div class="input-group"> <input type="text" placeholder="Search" class="form-control"> <span class="input-group-btn"> <button class="btn btn-primary" type="submit">Search</button> </span> </div> </form> </div> </li> <!-- END TOP SEARCH --> </ul> </div> <!-- END NAVIGATION --> </div> </div> <!-- Header END --> <!-- BEGIN SLIDER --> <div class="page-slider margin-bottom-40"> <div class="fullwidthbanner-container revolution-slider"> <div class="fullwidthabnner"> <ul id="revolutionul"> <!-- THE NEW SLIDE --> <li data-transition="fade" data-slotamount="8" data-masterspeed="700" data-delay="9400" data-thumb="../../assets/frontend/pages/img/revolutionslider/thumbs/thumb2.jpg"> <!-- THE MAIN IMAGE IN THE FIRST SLIDE --> <img src="../../assets/frontend/pages/img/revolutionslider/bg9.jpg" alt=""> <div class="caption lft slide_title_white slide_item_left" data-x="30" data-y="90" data-speed="400" data-start="1500" data-easing="easeOutExpo"> Explore the Power<br><span class="slide_title_white_bold">of Metronic</span> </div> <div class="caption lft slide_subtitle_white slide_item_left" data-x="87" data-y="245" data-speed="400" data-start="2000" data-easing="easeOutExpo"> This is what you were looking for </div> <a class="caption lft btn dark slide_btn slide_item_left" href="http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes" data-x="187" data-y="315" data-speed="400" data-start="3000" data-easing="easeOutExpo"> Purchase Now! </a> <div class="caption lfb" data-x="640" data-y="0" data-speed="700" data-start="1000" data-easing="easeOutExpo"> <img src="../../assets/frontend/pages/img/revolutionslider/lady.png" alt="Image 1"> </div> </li> <!-- THE FIRST SLIDE --> <li data-transition="fade" data-slotamount="8" data-masterspeed="700" data-delay="9400" data-thumb="../../assets/frontend/pages/img/revolutionslider/thumbs/thumb2.jpg"> <!-- THE MAIN IMAGE IN THE FIRST SLIDE --> <img src="../../assets/frontend/pages/img/revolutionslider/bg1.jpg" alt=""> <div class="caption lft slide_title slide_item_left" data-x="30" data-y="105" data-speed="400" data-start="1500" data-easing="easeOutExpo"> Need a website design? </div> <div class="caption lft slide_subtitle slide_item_left" data-x="30" data-y="180" data-speed="400" data-start="2000" data-easing="easeOutExpo"> This is what you were looking for </div> <div class="caption lft slide_desc slide_item_left" data-x="30" data-y="220" data-speed="400" data-start="2500" data-easing="easeOutExpo"> Lorem ipsum dolor sit amet, dolore eiusmod<br> quis tempor incididunt. Sed unde omnis iste. </div> <a class="caption lft btn green slide_btn slide_item_left" href="http://themeforest.net/item/metronic-responsive-admin-dashboard-template/4021469?ref=keenthemes" data-x="30" data-y="290" data-speed="400" data-start="3000" data-easing="easeOutExpo"> Purchase Now! </a> <div class="caption lfb" data-x="640" data-y="55" data-speed="700" data-start="1000" data-easing="easeOutExpo"> <img src="../../assets/frontend/pages/img/revolutionslider/man-winner.png" alt="Image 1"> </div> </li> <!-- THE SECOND SLIDE --> <li data-transition="fade" data-slotamount="7" data-masterspeed="300" data-delay="9400" data-thumb="../../assets/frontend/pages/img/revolutionslider/thumbs/thumb2.jpg"> <img src="../../assets/frontend/pages/img/revolutionslider/bg2.jpg" alt=""> <div class="caption lfl slide_title slide_item_left" data-x="30" data-y="125" data-speed="400" data-start="3500" data-easing="easeOutExpo"> Powerfull &amp; Clean </div> <div class="caption lfl slide_subtitle slide_item_left" data-x="30" data-y="200" data-speed="400" data-start="4000" data-easing="easeOutExpo"> Responsive Admin &amp; Website Theme </div> <div class="caption lfl slide_desc slide_item_left" data-x="30" data-y="245" data-speed="400" data-start="4500" data-easing="easeOutExpo"> Lorem ipsum dolor sit amet, consectetuer elit sed diam<br> nonummy amet euismod dolore. </div> <div class="caption lfr slide_item_right" data-x="635" data-y="105" data-speed="1200" data-start="1500" data-easing="easeOutBack"> <img src="../../assets/frontend/pages/img/revolutionslider/mac.png" alt="Image 1"> </div> <div class="caption lfr slide_item_right" data-x="580" data-y="245" data-speed="1200" data-start="2000" data-easing="easeOutBack"> <img src="../../assets/frontend/pages/img/revolutionslider/ipad.png" alt="Image 1"> </div> <div class="caption lfr slide_item_right" data-x="735" data-y="290" data-speed="1200" data-start="2500" data-easing="easeOutBack"> <img src="../../assets/frontend/pages/img/revolutionslider/iphone.png" alt="Image 1"> </div> <div class="caption lfr slide_item_right" data-x="835" data-y="230" data-speed="1200" data-start="3000" data-easing="easeOutBack"> <img src="../../assets/frontend/pages/img/revolutionslider/macbook.png" alt="Image 1"> </div> <div class="caption lft slide_item_right" data-x="865" data-y="45" data-speed="500" data-start="5000" data-easing="easeOutBack"> <img src="../../assets/frontend/pages/img/revolutionslider/hint1-red.png" id="rev-hint1" alt="Image 1"> </div> <div class="caption lfb slide_item_right" data-x="355" data-y="355" data-speed="500" data-start="5500" data-easing="easeOutBack"> <img src="../../assets/frontend/pages/img/revolutionslider/hint2-red.png" id="rev-hint2" alt="Image 1"> </div> </li> <!-- THE THIRD SLIDE --> <li data-transition="fade" data-slotamount="8" data-masterspeed="700" data-delay="9400" data-thumb="../../assets/frontend/pages/img/revolutionslider/thumbs/thumb2.jpg"> <img src="../../assets/frontend/pages/img/revolutionslider/bg3.jpg" alt=""> <div class="caption lfl slide_item_left" data-x="30" data-y="95" data-speed="400" data-start="1500" data-easing="easeOutBack"> <iframe src="http://player.vimeo.com/video/56974716?portrait=0" width="420" height="240" style="border:0" allowFullScreen></iframe> </div> <div class="caption lfr slide_title" data-x="470" data-y="100" data-speed="400" data-start="2000" data-easing="easeOutExpo"> Responsive Video Support </div> <div class="caption lfr slide_subtitle" data-x="470" data-y="170" data-speed="400" data-start="2500" data-easing="easeOutExpo"> Youtube, Vimeo and others. </div> <div class="caption lfr slide_desc" data-x="470" data-y="220" data-speed="400" data-start="3000" data-easing="easeOutExpo"> Lorem ipsum dolor sit amet, consectetuer elit sed diam<br> nonummy amet euismod dolore. </div> <a class="caption lfr btn yellow slide_btn" href="" data-x="470" data-y="280" data-speed="400" data-start="3500" data-easing="easeOutExpo"> Watch more Videos! </a> </li> <!-- THE FORTH SLIDE --> <li data-transition="fade" data-slotamount="8" data-masterspeed="700" data-delay="9400" data-thumb="../../assets/frontend/pages/img/revolutionslider/thumbs/thumb2.jpg"> <!-- THE MAIN IMAGE IN THE FIRST SLIDE --> <img src="../../assets/frontend/pages/img/revolutionslider/bg4.jpg" alt=""> <div class="caption lft slide_title" data-x="30" data-y="105" data-speed="400" data-start="1500" data-easing="easeOutExpo"> What else included ? </div> <div class="caption lft slide_subtitle" data-x="30" data-y="180" data-speed="400" data-start="2000" data-easing="easeOutExpo"> The Most Complete Admin Theme </div> <div class="caption lft slide_desc" data-x="30" data-y="225" data-speed="400" data-start="2500" data-easing="easeOutExpo"> Lorem ipsum dolor sit amet, consectetuer elit sed diam<br> nonummy amet euismod dolore. </div> <a class="caption lft slide_btn btn red slide_item_left" href="http://www.keenthemes.com/preview/index.php?theme=metronic_admin" target="_blank" data-x="30" data-y="300" data-speed="400" data-start="3000" data-easing="easeOutExpo"> Learn More! </a> <div class="caption lft start" data-x="670" data-y="55" data-speed="400" data-start="2000" data-easing="easeOutBack" > <img src="../../assets/frontend/pages/img/revolutionslider/iphone_left.png" alt="Image 2"> </div> <div class="caption lft start" data-x="850" data-y="55" data-speed="400" data-start="2400" data-easing="easeOutBack" > <img src="../../assets/frontend/pages/img/revolutionslider/iphone_right.png" alt="Image 3"> </div> </li> </ul> <div class="tp-bannertimer tp-bottom"></div> </div> </div> </div> <!-- END SLIDER --> <div class="main"> <div class="container"> <!-- BEGIN SERVICE BOX --> <div class="row service-box margin-bottom-40"> <div class="col-md-4 col-sm-4"> <div class="service-box-heading"> <em><i class="fa fa-location-arrow blue"></i></em> <span>Multipurpose Template</span> </div> <p>Lorem ipsum dolor sit amet, dolore eiusmod quis tempor incididunt ut et dolore Ut veniam unde nostrudlaboris. Sed unde omnis iste natus error sit voluptatem.</p> </div> <div class="col-md-4 col-sm-4"> <div class="service-box-heading"> <em><i class="fa fa-check red"></i></em> <span>Well Documented</span> </div> <p>Lorem ipsum dolor sit amet, dolore eiusmod quis tempor incididunt ut et dolore Ut veniam unde nostrudlaboris. Sed unde omnis iste natus error sit voluptatem.</p> </div> <div class="col-md-4 col-sm-4"> <div class="service-box-heading"> <em><i class="fa fa-compress green"></i></em> <span>Responsive Design</span> </div> <p>Lorem ipsum dolor sit amet, dolore eiusmod quis tempor incididunt ut et dolore Ut veniam unde nostrudlaboris. Sed unde omnis iste natus error sit voluptatem.</p> </div> </div> <!-- END SERVICE BOX --> <!-- BEGIN BLOCKQUOTE BLOCK --> <div class="row quote-v1 margin-bottom-30"> <div class="col-md-9"> <span>Metronic - The Most Complete &amp; Popular Admin &amp; Frontend Theme</span> </div> <div class="col-md-3 text-right"> <a class="btn-transparent" href="http://www.keenthemes.com/preview/index.php?theme=metronic_admin" target="_blank"><i class="fa fa-rocket margin-right-10"></i>Preview Admin</a> </div> </div> <!-- END BLOCKQUOTE BLOCK --> <!-- BEGIN RECENT WORKS --> <div class="row recent-work margin-bottom-40"> <div class="col-md-3"> <h2><a href="portfolio.html">Recent Works</a></h2> <p>Lorem ipsum dolor sit amet, dolore eiusmod quis tempor incididunt ut et dolore Ut veniam unde voluptatem. Sed unde omnis iste natus error sit voluptatem.</p> </div> <div class="col-md-9"> <div class="owl-carousel owl-carousel3"> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img1.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img1.jpg" class="fancybox-button" title="Project Name #1" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img2.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img2.jpg" class="fancybox-button" title="Project Name #2" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img3.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img3.jpg" class="fancybox-button" title="Project Name #3" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img4.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img4.jpg" class="fancybox-button" title="Project Name #4" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img5.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img5.jpg" class="fancybox-button" title="Project Name #5" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img6.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img6.jpg" class="fancybox-button" title="Project Name #6" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img3.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img3.jpg" class="fancybox-button" title="Project Name #3" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> <div class="recent-work-item"> <em> <img src="../../assets/frontend/pages/img/works/img4.jpg" alt="Amazing Project" class="img-responsive"> <a href="portfolio-item.html"><i class="fa fa-link"></i></a> <a href="../../assets/frontend/pages/img/works/img4.jpg" class="fancybox-button" title="Project Name #4" data-rel="fancybox-button"><i class="fa fa-search"></i></a> </em> <a class="recent-work-description" href="#"> <strong>Amazing Project</strong> <b>Agenda corp.</b> </a> </div> </div> </div> </div> <!-- END RECENT WORKS --> <!-- BEGIN TABS AND TESTIMONIALS --> <div class="row mix-block margin-bottom-40"> <!-- TABS --> <div class="col-md-7 tab-style-1"> <ul class="nav nav-tabs"> <li class="active"><a href="#tab-1" data-toggle="tab">Multipurpose</a></li> <li><a href="#tab-2" data-toggle="tab">Documented</a></li> <li><a href="#tab-3" data-toggle="tab">Responsive</a></li> <li><a href="#tab-4" data-toggle="tab">Clean & Fresh</a></li> </ul> <div class="tab-content"> <div class="tab-pane row fade in active" id="tab-1"> <div class="col-md-3 col-sm-3"> <a href="assets/temp/photos/img7.jpg" class="fancybox-button" title="Image Title" data-rel="fancybox-button"> <img class="img-responsive" src="../../assets/frontend/pages/img/photos/img7.jpg" alt=""> </a> </div> <div class="col-md-9 col-sm-9"> <p class="margin-bottom-10">Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Cosby sweater eu banh mi, qui irure terry richardson ex squid Aliquip placeat salvia cillum iphone.</p> <p><a class="more" href="#">Read more <i class="icon-angle-right"></i></a></p> </div> </div> <div class="tab-pane row fade" id="tab-2"> <div class="col-md-9 col-sm-9"> <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia..</p> </div> <div class="col-md-3 col-sm-3"> <a href="assets/temp/photos/img10.jpg" class="fancybox-button" title="Image Title" data-rel="fancybox-button"> <img class="img-responsive" src="../../assets/frontend/pages/img/photos/img10.jpg" alt=""> </a> </div> </div> <div class="tab-pane fade" id="tab-3"> <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> </div> <div class="tab-pane fade" id="tab-4"> <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> </div> </div> </div> <!-- END TABS --> <!-- TESTIMONIALS --> <div class="col-md-5 testimonials-v1"> <div id="myCarousel" class="carousel slide"> <!-- Carousel items --> <div class="carousel-inner"> <div class="active item"> <blockquote><p>Denim you probably haven't heard of. Lorem ipsum dolor met consectetur adipisicing sit amet, consectetur adipisicing elit, of them jean shorts sed magna aliqua. Lorem ipsum dolor met.</p></blockquote> <div class="carousel-info"> <img class="pull-left" src="../../assets/frontend/pages/img/people/img1-small.jpg" alt=""> <div class="pull-left"> <span class="testimonials-name">Lina Mars</span> <span class="testimonials-post">Commercial Director</span> </div> </div> </div> <div class="item"> <blockquote><p>Raw denim you Mustache cliche tempor, williamsburg carles vegan helvetica probably haven't heard of them jean shorts austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica.</p></blockquote> <div class="carousel-info"> <img class="pull-left" src="../../assets/frontend/pages/img/people/img5-small.jpg" alt=""> <div class="pull-left"> <span class="testimonials-name">Kate Ford</span> <span class="testimonials-post">Commercial Director</span> </div> </div> </div> <div class="item"> <blockquote><p>Reprehenderit butcher stache cliche tempor, williamsburg carles vegan helvetica.retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid Aliquip placeat salvia cillum iphone.</p></blockquote> <div class="carousel-info"> <img class="pull-left" src="../../assets/frontend/pages/img/people/img2-small.jpg" alt=""> <div class="pull-left"> <span class="testimonials-name">Jake Witson</span> <span class="testimonials-post">Commercial Director</span> </div> </div> </div> </div> <!-- Carousel nav --> <a class="left-btn" href="#myCarousel" data-slide="prev"></a> <a class="right-btn" href="#myCarousel" data-slide="next"></a> </div> </div> <!-- END TESTIMONIALS --> </div> <!-- END TABS AND TESTIMONIALS --> <!-- BEGIN STEPS --> <div class="row margin-bottom-40 front-steps-wrapper front-steps-count-3"> <div class="col-md-4 col-sm-4 front-step-col"> <div class="front-step front-step1"> <h2>Goal definition</h2> <p>Lorem ipsum dolor sit amet sit consectetur adipisicing eiusmod tempor.</p> </div> </div> <div class="col-md-4 col-sm-4 front-step-col"> <div class="front-step front-step2"> <h2>Analyse</h2> <p>Lorem ipsum dolor sit amet sit consectetur adipisicing eiusmod tempor.</p> </div> </div> <div class="col-md-4 col-sm-4 front-step-col"> <div class="front-step front-step3"> <h2>Implementation</h2> <p>Lorem ipsum dolor sit amet sit consectetur adipisicing eiusmod tempor.</p> </div> </div> </div> <!-- END STEPS --> <!-- BEGIN CLIENTS --> <div class="row margin-bottom-40 our-clients"> <div class="col-md-3"> <h2><a href="#">Our Clients</a></h2> <p>Lorem dipsum folor margade sitede lametep eiusmod psumquis dolore.</p> </div> <div class="col-md-9"> <div class="owl-carousel owl-carousel6-brands"> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_1_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_1.png" class="color-img img-responsive" alt=""> </a> </div> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_2_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_2.png" class="color-img img-responsive" alt=""> </a> </div> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_3_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_3.png" class="color-img img-responsive" alt=""> </a> </div> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_4_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_4.png" class="color-img img-responsive" alt=""> </a> </div> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_5_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_5.png" class="color-img img-responsive" alt=""> </a> </div> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_6_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_6.png" class="color-img img-responsive" alt=""> </a> </div> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_7_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_7.png" class="color-img img-responsive" alt=""> </a> </div> <div class="client-item"> <a href="#"> <img src="../../assets/frontend/pages/img/clients/client_8_gray.png" class="img-responsive" alt=""> <img src="../../assets/frontend/pages/img/clients/client_8.png" class="color-img img-responsive" alt=""> </a> </div> </div> </div> </div> <!-- END CLIENTS --> </div> </div> <!-- BEGIN PRE-FOOTER --> <div class="pre-footer"> <div class="container"> <div class="row"> <!-- BEGIN BOTTOM ABOUT BLOCK --> <div class="col-md-4 col-sm-6 pre-footer-col"> <h2>About us</h2> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam sit nonummy nibh euismod tincidunt ut laoreet dolore magna aliquarm erat sit volutpat.</p> <div class="photo-stream"> <h2>Photos Stream</h2> <ul class="list-unstyled"> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/people/img5-small.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img1.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/people/img4-large.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img6.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img3.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/people/img2-large.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img2.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img5.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/people/img5-small.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img1.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/people/img4-large.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img6.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img3.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/people/img2-large.jpg"></a></li> <li><a href="#"><img alt="" src="../../assets/frontend/pages/img/works/img2.jpg"></a></li> </ul> </div> </div> <!-- END BOTTOM ABOUT BLOCK --> <!-- BEGIN BOTTOM CONTACTS --> <div class="col-md-4 col-sm-6 pre-footer-col"> <h2>Our Contacts</h2> <address class="margin-bottom-40"> 35, Lorem Lis Street, Park Ave<br> California, US<br> Phone: 300 323 3456<br> Fax: 300 323 1456<br> Email: <a href="mailto:[email protected]">[email protected]</a><br> Skype: <a href="skype:metronic">metronic</a> </address> <div class="pre-footer-subscribe-box pre-footer-subscribe-box-vertical"> <h2>Newsletter</h2> <p>Subscribe to our newsletter and stay up to date with the latest news and deals!</p> <form action="#"> <div class="input-group"> <input type="text" placeholder="[email protected]" class="form-control"> <span class="input-group-btn"> <button class="btn btn-primary" type="submit">Subscribe</button> </span> </div> </form> </div> </div> <!-- END BOTTOM CONTACTS --> <!-- BEGIN TWITTER BLOCK --> <div class="col-md-4 col-sm-6 pre-footer-col"> <h2 class="margin-bottom-0">Latest Tweets</h2> <a class="twitter-timeline" href="https://twitter.com/twitterapi" data-tweet-limit="2" data-theme="dark" data-link-color="#57C8EB" data-widget-id="455411516829736961" data-chrome="noheader nofooter noscrollbar noborders transparent">Loading tweets by @keenthemes...</a> </div> <!-- END TWITTER BLOCK --> </div> </div> </div> <!-- END PRE-FOOTER --> <!-- BEGIN FOOTER --> <div class="footer"> <div class="container"> <div class="row"> <!-- BEGIN COPYRIGHT --> <div class="col-md-6 col-sm-6 padding-top-10"> 2014 © Metronic Shop UI. ALL Rights Reserved. <a href="#">Privacy Policy</a> | <a href="#">Terms of Service</a> </div> <!-- END COPYRIGHT --> <!-- BEGIN PAYMENTS --> <div class="col-md-6 col-sm-6"> <ul class="social-footer list-unstyled list-inline pull-right"> <li><a href="#"><i class="fa fa-facebook"></i></a></li> <li><a href="#"><i class="fa fa-google-plus"></i></a></li> <li><a href="#"><i class="fa fa-dribbble"></i></a></li> <li><a href="#"><i class="fa fa-linkedin"></i></a></li> <li><a href="#"><i class="fa fa-twitter"></i></a></li> <li><a href="#"><i class="fa fa-skype"></i></a></li> <li><a href="#"><i class="fa fa-github"></i></a></li> <li><a href="#"><i class="fa fa-youtube"></i></a></li> <li><a href="#"><i class="fa fa-dropbox"></i></a></li> </ul> </div> <!-- END PAYMENTS --> </div> </div> </div> <!-- END FOOTER --> <!-- Load javascripts at bottom, this will reduce page load time --> <!-- BEGIN CORE PLUGINS (REQUIRED FOR ALL PAGES) --> <!--[if lt IE 9]> <script src="../../assets/global/plugins/respond.min.js"></script> <![endif]--> <script src="../../assets/global/plugins/jquery-1.11.0.min.js" type="text/javascript"></script> <script src="../../assets/global/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script> <script src="../../assets/global/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script> <script src="../../assets/frontend/layout/scripts/back-to-top.js" type="text/javascript"></script> <!-- END CORE PLUGINS --> <!-- BEGIN PAGE LEVEL JAVASCRIPTS (REQUIRED ONLY FOR CURRENT PAGE) --> <script src="../../assets/global/plugins/fancybox/source/jquery.fancybox.pack.js" type="text/javascript"></script><!-- pop up --> <script src="../../assets/global/plugins/carousel-owl-carousel/owl-carousel/owl.carousel.min.js" type="text/javascript"></script><!-- slider for products --> <!-- BEGIN RevolutionSlider --> <script src="../../assets/global/plugins/slider-revolution-slider/rs-plugin/js/jquery.themepunch.plugins.min.js" type="text/javascript"></script> <script src="../../assets/global/plugins/slider-revolution-slider/rs-plugin/js/jquery.themepunch.revolution.min.js" type="text/javascript"></script> <script src="../../assets/global/plugins/slider-revolution-slider/rs-plugin/js/jquery.themepunch.tools.min.js" type="text/javascript"></script> <script src="../../assets/frontend/pages/scripts/revo-slider-init.js" type="text/javascript"></script> <!-- END RevolutionSlider --> <script src="../../assets/frontend/layout/scripts/layout.js" type="text/javascript"></script> <script type="text/javascript"> jQuery(document).ready(function() { Layout.init(); Layout.initOWL(); RevosliderInit.initRevoSlider(); Layout.initTwitter(); Layout.initFixHeaderWithPreHeader(); /* Switch On Header Fixing (only if you have pre-header) */ Layout.initNavScrolling(); }); </script> <!-- END PAGE LEVEL JAVASCRIPTS --> </body> <!-- END BODY --> </html>
{'content_hash': 'ab040f61af57bc2cefd6b18a41c5412b', 'timestamp': '', 'source': 'github', 'line_count': 1015, 'max_line_length': 600, 'avg_line_length': 51.927093596059116, 'alnum_prop': 0.4964140705043069, 'repo_name': 'miragecentury/BPCA3', 'id': '2426aed9f235d327b397dd121a5b38da9ca83170', 'size': '52707', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'public/templates/frontend/index-header-fix.html', 'mode': '33261', 'license': 'bsd-3-clause', 'language': [{'name': 'ASP', 'bytes': '298'}, {'name': 'CSS', 'bytes': '2339543'}, {'name': 'Erlang', 'bytes': '6972'}, {'name': 'Go', 'bytes': '7075'}, {'name': 'JavaScript', 'bytes': '4881125'}, {'name': 'PHP', 'bytes': '159468'}, {'name': 'Python', 'bytes': '5844'}, {'name': 'Shell', 'bytes': '1490'}]}
@interface UICollectionView (PTLDatasource) @property (nonatomic, assign) id <PTLCollectionViewDatasource> ptl_datasource; @end
{'content_hash': 'cee7062be795544482fb1435aa3078f5', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 78, 'avg_line_length': 26.0, 'alnum_prop': 0.8153846153846154, 'repo_name': 'PearTreeLabs/PTLDatasource', 'id': 'f8d21e4a8af75a350f8c35ae55ce6f38cf29d3e4', 'size': '307', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'PTLDatasource/UICollectionView+PTLDatasource.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '138497'}, {'name': 'Ruby', 'bytes': '833'}]}
package nl.ulso.sprox.impl; /** * Provides controllers by returning a singleton object. */ final class SingletonControllerProvider implements ControllerProvider { private final Object singleton; SingletonControllerProvider(Object singleton) { this.singleton = singleton; } @Override public Object getController() { return singleton; } }
{'content_hash': 'e2954e499e71462829fd0898e639d0cb', 'timestamp': '', 'source': 'github', 'line_count': 17, 'max_line_length': 71, 'avg_line_length': 22.470588235294116, 'alnum_prop': 0.7120418848167539, 'repo_name': 'voostindie/sprox', 'id': 'c88558ac052d71568161612fb7381b35483aec58', 'size': '382', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/nl/ulso/sprox/impl/SingletonControllerProvider.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '171977'}]}
from django.conf.urls.defaults import patterns, include, url urlpatterns = patterns('adelie.views', (r'^register$', 'register'), (r'^submit_registration$', 'submit_registration'), )
{'content_hash': 'a5d3d4419d83e7ffdf1a515f59ac74a7', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 60, 'avg_line_length': 31.833333333333332, 'alnum_prop': 0.7015706806282722, 'repo_name': 'jennselby/adelie', 'id': 'a52a2bb63b051158234f61406bd5acd2612feae9', 'size': '191', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'urls.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '45251'}]}
template<class T> Stencil<T>* HostStencilFactory<T>::BuildStencil( const OptionParser& options ) { // get options for base class T wCenter; T wCardinal; T wDiagonal; StencilFactory<T>::ExtractOptions( options, wCenter, wCardinal, wDiagonal ); return new HostStencil<T>( wCenter, wCardinal, wDiagonal ); } template<class T> void HostStencilFactory<T>::CheckOptions( const OptionParser& options ) const { // let base class check its options StencilFactory<T>::CheckOptions( options ); // nothing else to do - we add no options }
{'content_hash': '0148611d501f5eb4c85f895a48a7877d', 'timestamp': '', 'source': 'github', 'line_count': 25, 'max_line_length': 80, 'avg_line_length': 22.96, 'alnum_prop': 0.7003484320557491, 'repo_name': 'Sable/Ostrich', 'id': '9c948d8da63f539fb871d4dbf714cfa7d4d518bd', 'size': '652', 'binary': False, 'copies': '6', 'ref': 'refs/heads/master', 'path': 'spectral-methods/fft/opencl/common/HostStencilFactory.cpp', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '1157166'}, {'name': 'C++', 'bytes': '433939'}, {'name': 'Cuda', 'bytes': '4656'}, {'name': 'HTML', 'bytes': '152918'}, {'name': 'JavaScript', 'bytes': '299237'}, {'name': 'Makefile', 'bytes': '60626'}, {'name': 'Matlab', 'bytes': '1081'}, {'name': 'Objective-C', 'bytes': '5308'}, {'name': 'Python', 'bytes': '155081'}, {'name': 'Shell', 'bytes': '56'}]}
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use FS\SolrBundle\Doctrine\Annotation as Solr; use Doctrine\Common\Collections\ArrayCollection; use Bprs\UserBundle\Entity\User as BaseUser; /** * ArchyUser * @ORM\Table() * @ORM\Entity(repositoryClass="Bprs\UserBundle\Entity\UserRepository") */ class ArchyUser extends BaseUser { /** * favorite assets * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Asset") * @ORM\JoinTable(name="users_assets", * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@ORM\JoinColumn(name="asset_id", referencedColumnName="id")} * )) */ private $assets; /** * favorite assets * @ORM\ManyToMany(targetEntity="AppBundle\Entity\Tag") * @ORM\JoinTable(name="users_tags", * joinColumns={@ORM\JoinColumn(name="user_id", referencedColumnName="id")}, * inverseJoinColumns={@ORM\JoinColumn(name="tag_id", referencedColumnName="id")} * )) */ private $tags; public function __construct() { parent::__construct(); $this->assets = new \Doctrine\Common\Collections\ArrayCollection(); $this->tags = new \Doctrine\Common\Collections\ArrayCollection(); } public function setAssets($assets = null) { $this->assets = $assets; return $this; } /** * Get asset. * * @return object */ public function getAssets() { return $this->assets; } /** * Set Asset. * * @param object $asset * * @return ArchyAsset */ public function addAsset($asset) { $this->assets[] = $asset; return $this; } public function removeAsset($asset) { $this->assets->removeElement($asset); } public function setTags($tags = null) { $this->tags = $tags; return $this; } /** * Get tag. * * @return object */ public function getTags() { return $this->tags; } /** * Set tag. * * @param object $tag * * @return tags */ public function addTag($tag) { $this->tags[] = $tag; return $this; } public function removeTag($tag) { $this->tags->removeElement($tag); } }
{'content_hash': 'fa66538bf378d5643eaefb563b0f63a4', 'timestamp': '', 'source': 'github', 'line_count': 114, 'max_line_length': 92, 'avg_line_length': 20.780701754385966, 'alnum_prop': 0.5673279864921908, 'repo_name': 'SrgSteak/ARCHY', 'id': 'c9b2f62a7adb582d55932e4dcde92ba5fa754d08', 'size': '2369', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/AppBundle/Entity/ArchyUser.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '3297'}, {'name': 'HTML', 'bytes': '26057'}, {'name': 'PHP', 'bytes': '76065'}]}
package com.ibm.bi.dml.test.integration.functions.parfor; import java.io.BufferedReader; import java.io.FileReader; import java.util.HashMap; import org.junit.Assert; import org.junit.Test; import com.ibm.bi.dml.api.DMLScript; import com.ibm.bi.dml.conf.ConfigurationManager; import com.ibm.bi.dml.conf.DMLConfig; import com.ibm.bi.dml.parser.AParserWrapper; import com.ibm.bi.dml.parser.DMLProgram; import com.ibm.bi.dml.parser.DMLTranslator; import com.ibm.bi.dml.parser.LanguageException; import com.ibm.bi.dml.test.integration.AutomatedTestBase; import com.ibm.bi.dml.test.integration.TestConfiguration; /** * Different test cases for ParFOR loop dependency analysis: * * * scalar tests - expected results * 1: no, 2: dep, 3: no, 4: no, 5: dep, 6: no, 7: no, 8: dep, 9: dep, 10: no * * matrix 1D tests - expected results * 11: no, 12: no, 13: no, 14:dep, 15: no, 16: dep, 17: dep, 18: no, 19: no (DEP, hard), 20: no, * 21: dep, 22: no, 23: no, 24: no, 25: no, 26:no, 26b:dep, 26c: no, 26c2: no, 29: no * * nested control structures * 27:dep * * nested parallelism and nested for/parfor * 28: no, 28b: no, 28c: no, 28d: dep, 28e: no, 28f: no, 28g: no, 28h: no * * range indexing * 30: no, 31: no, 31b: no, 32: dep, 32b: dep, 32c: dep (no, dep is false positive), 32d: dep, 32e:dep * * set indexing * 33: dep, 34: dep, 35: no * * indexing w/ double identifiers * 35b: no, 35c: no, 35d: dep (no int) * * multiple matrix references per statement * 38: dep, 39: dep, 40: dep, 41: dep, 42: dep, 43: no * * scoping (create object in loop, but used afterwards) * 44: dep * * application testcases * 45: no, 46: no, 47 no, 50: no (w/ check=0 on i2), 51: dep, 52: dep * * general parfor validate (e.g., expressions) * 48: no, 48b: err, 48c: no * * functions * 49a: dep, 49b: dep */ public class ParForDependencyAnalysisTest extends AutomatedTestBase { public static final String REL_DIR = "functions/parfor"; public static String DIR = SCRIPT_DIR+ "/" + REL_DIR + "/"; /** * Main method for running one test at a time. */ public static void main(String[] args) { long startMsec = System.currentTimeMillis(); ParForDependencyAnalysisTest t = new ParForDependencyAnalysisTest(); t.setUpBase(); t.setUp(); t.testDependencyAnalysis1(); t.tearDown(); long elapsedMsec = System.currentTimeMillis() - startMsec; System.err.printf("Finished in %1.3f sec\n", elapsedMsec / 1000.0); } @Override public void setUp() { } @Test public void testDependencyAnalysis1() { runTest("parfor1.dml", false); } @Test public void testDependencyAnalysis2() { runTest("parfor2.dml", true); } @Test public void testDependencyAnalysis3() { runTest("parfor3.dml", false); } @Test public void testDependencyAnalysis4() { runTest("parfor4.dml", false); } @Test public void testDependencyAnalysis5() { runTest("parfor5.dml", true); } @Test public void testDependencyAnalysis6() { runTest("parfor6.dml", false); } @Test public void testDependencyAnalysis7() { runTest("parfor7.dml", false); } @Test public void testDependencyAnalysis8() { runTest("parfor8.dml", true); } @Test public void testDependencyAnalysis9() { runTest("parfor9.dml", true); } @Test public void testDependencyAnalysis10() { runTest("parfor10.dml", false); } @Test public void testDependencyAnalysis11() { runTest("parfor11.dml", false); } @Test public void testDependencyAnalysis12() { runTest("parfor12.dml", false); } @Test public void testDependencyAnalysis13() { runTest("parfor13.dml", false); } @Test public void testDependencyAnalysis14() { runTest("parfor14.dml", true); } @Test public void testDependencyAnalysis15() { runTest("parfor15.dml", false); } @Test public void testDependencyAnalysis16() { runTest("parfor16.dml", true); } @Test public void testDependencyAnalysis17() { runTest("parfor17.dml", true); } @Test public void testDependencyAnalysis18() { runTest("parfor18.dml", false); } @Test public void testDependencyAnalysis19() { runTest("parfor19.dml", true); } //no (false) but not detectable by our applied tests @Test public void testDependencyAnalysis20() { runTest("parfor20.dml", false); } @Test public void testDependencyAnalysis21() { runTest("parfor21.dml", true); } @Test public void testDependencyAnalysis22() { runTest("parfor22.dml", false); } @Test public void testDependencyAnalysis23() { runTest("parfor23.dml", false); } @Test public void testDependencyAnalysis24() { runTest("parfor24.dml", false); } @Test public void testDependencyAnalysis25() { runTest("parfor25.dml", false); } @Test public void testDependencyAnalysis26() { runTest("parfor26.dml", false); } @Test public void testDependencyAnalysis26b() { runTest("parfor26b.dml", true); } @Test public void testDependencyAnalysis26c() { runTest("parfor26c.dml", false); } @Test public void testDependencyAnalysis26c2() { runTest("parfor26c2.dml", false); } @Test public void testDependencyAnalysis26d() { runTest("parfor26d.dml", true); } @Test public void testDependencyAnalysis27() { runTest("parfor27.dml", true); } @Test public void testDependencyAnalysis28() { runTest("parfor28.dml", false); } @Test public void testDependencyAnalysis28b() { runTest("parfor28b.dml", false); } @Test public void testDependencyAnalysis28c() { runTest("parfor28c.dml", false ); } //SEE ParForStatementBlock.CONSERVATIVE_CHECK false if false, otherwise true @Test public void testDependencyAnalysis28d() { runTest("parfor28d.dml", true); } @Test public void testDependencyAnalysis28e() { runTest("parfor28e.dml", false); } @Test public void testDependencyAnalysis28f() { runTest("parfor28f.dml", false); } @Test public void testDependencyAnalysis28g() { runTest("parfor28g.dml", true); } //TODO should be false, but currently not supported @Test public void testDependencyAnalysis28h() { runTest("parfor28h.dml", false); } @Test public void testDependencyAnalysis29() { runTest("parfor29.dml", false); } @Test public void testDependencyAnalysis30() { runTest("parfor30.dml", false); } @Test public void testDependencyAnalysis31() { runTest("parfor31.dml", false); } @Test public void testDependencyAnalysis31b() { runTest("parfor31b.dml", false); } @Test public void testDependencyAnalysis32() { runTest("parfor32.dml", true); } @Test public void testDependencyAnalysis32b() { runTest("parfor32b.dml", true); } @Test public void testDependencyAnalysis32c() { runTest("parfor32c.dml", true); } @Test public void testDependencyAnalysis32d() { runTest("parfor32d.dml", true); } @Test public void testDependencyAnalysis32e() { runTest("parfor32e.dml", true); } @Test public void testDependencyAnalysis33() { runTest("parfor33.dml", true); } @Test public void testDependencyAnalysis34() { runTest("parfor34.dml", true); } @Test public void testDependencyAnalysis35() { runTest("parfor35.dml", false); } @Test public void testDependencyAnalysis35b() { runTest("parfor35b.dml", false); } @Test public void testDependencyAnalysis35c() { runTest("parfor35c.dml", false); } @Test public void testDependencyAnalysis35d() { runTest("parfor35d.dml", true); } @Test public void testDependencyAnalysis36() { runTest("parfor36.dml", true); } @Test public void testDependencyAnalysis37() { runTest("parfor37.dml", false); } @Test public void testDependencyAnalysis38() { runTest("parfor38.dml", true); } @Test public void testDependencyAnalysis39() { runTest("parfor39.dml", true); } @Test public void testDependencyAnalysis40() { runTest("parfor40.dml", true); } @Test public void testDependencyAnalysis41() { runTest("parfor41.dml", true); } @Test public void testDependencyAnalysis42() { runTest("parfor42.dml", true); } @Test public void testDependencyAnalysis43() { runTest("parfor43.dml", false); } //TODO: requires dynamic re-execution of dependency analysis after live variable analysis has been done //@Test //public void testDependencyAnalysis44() { runTest("parfor44.dml", true); } @Test public void testDependencyAnalysis45() { runTest("parfor45.dml", false); } //SEE ParForStatementBlock.CONSERVATIVE_CHECK false if false, otherwise true @Test public void testDependencyAnalysis46() { runTest("parfor46.dml", false); } //SEE ParForStatementBlock.CONSERVATIVE_CHECK false if false, otherwise true @Test public void testDependencyAnalysis47() { runTest("parfor47.dml", false); } @Test public void testDependencyAnalysis48() { runTest("parfor48.dml", false); } @Test public void testDependencyAnalysis48b() { runTest("parfor48b.dml", true); } @Test public void testDependencyAnalysis48c() { runTest("parfor48c.dml", false); } @Test public void testDependencyAnalysis49a() { runTest("parfor49a.dml", true); } @Test public void testDependencyAnalysis49b() { runTest("parfor49b.dml", true); } @Test public void testDependencyAnalysis50() { runTest("parfor50.dml", false); } @Test public void testDependencyAnalysis51() { runTest("parfor51.dml", true); } @Test public void testDependencyAnalysis52() { runTest("parfor52.dml", true); } /** * * @param scriptFilename * @param expectedException */ private void runTest( String scriptFilename, boolean expectedException ) { boolean raisedException = false; try { // Tell the superclass about the name of this test, so that the superclass can // create temporary directories. TestConfiguration testConfig = new TestConfiguration(REL_DIR, scriptFilename, new String[] {}); addTestConfiguration(scriptFilename, testConfig); loadTestConfiguration(testConfig); DMLConfig conf = new DMLConfig(getCurConfigFile().getPath()); ConfigurationManager.setConfig(conf); String dmlScriptString=""; HashMap<String, String> argVals = new HashMap<String,String>(); //read script BufferedReader in = new BufferedReader(new FileReader(DIR+scriptFilename)); String s1 = null; while ((s1 = in.readLine()) != null) dmlScriptString += s1 + "\n"; in.close(); //parsing and dependency analysis AParserWrapper parser = AParserWrapper.createParser(false); DMLProgram prog = parser.parse(DMLScript.DML_FILE_PATH_ANTLR_PARSER, dmlScriptString, argVals); DMLTranslator dmlt = new DMLTranslator(prog); dmlt.validateParseTree(prog); } catch(LanguageException ex) { raisedException = true; if(raisedException!=expectedException) ex.printStackTrace(); } catch(Exception ex2) { ex2.printStackTrace(); throw new RuntimeException(ex2); //Assert.fail( "Unexpected exception occured during test run." ); } //check correctness Assert.assertEquals(expectedException, raisedException); } }
{'content_hash': '57a39ecb24af569e15f6d5a177b78d3e', 'timestamp': '', 'source': 'github', 'line_count': 356, 'max_line_length': 155, 'avg_line_length': 30.775280898876403, 'alnum_prop': 0.703358890105878, 'repo_name': 'ckadner/systemml', 'id': '32c1f17602136949bc3be6652e88597675fbf640', 'size': '11564', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'system-ml/src/test/java/com/ibm/bi/dml/test/integration/functions/parfor/ParForDependencyAnalysisTest.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ANTLR', 'bytes': '28639'}, {'name': 'Batchfile', 'bytes': '20339'}, {'name': 'CSS', 'bytes': '7073'}, {'name': 'HTML', 'bytes': '560180'}, {'name': 'Java', 'bytes': '9148999'}, {'name': 'JavaScript', 'bytes': '5957'}, {'name': 'Python', 'bytes': '2150'}, {'name': 'R', 'bytes': '378807'}, {'name': 'Shell', 'bytes': '94523'}, {'name': 'TeX', 'bytes': '285436'}]}
package org.docksidestage.hangar.dbflute.bsbhv; import java.util.List; import org.dbflute.*; import org.dbflute.bhv.readable.*; import org.dbflute.bhv.writable.*; import org.dbflute.bhv.writable.coins.DateUpdateAdjuster; import org.dbflute.bhv.referrer.*; import org.dbflute.cbean.*; import org.dbflute.cbean.chelper.HpSLSFunction; import org.dbflute.cbean.result.*; import org.dbflute.exception.*; import org.dbflute.optional.OptionalEntity; import org.dbflute.outsidesql.executor.*; import org.docksidestage.hangar.dbflute.exbhv.*; import org.docksidestage.hangar.dbflute.bsbhv.loader.*; import org.docksidestage.hangar.dbflute.exentity.*; import org.docksidestage.hangar.dbflute.bsentity.dbmeta.*; import org.docksidestage.hangar.dbflute.cbean.*; /** * The behavior of WHITE_CLASSIFICATION_DEPLOYMENT as TABLE. <br> * <pre> * [primary key] * DEPLOYMENT_ID * * [column] * DEPLOYMENT_ID, SEA_FLG, DEPLOYMENT_TYPE_CODE * * [sequence] * * * [identity] * * * [version-no] * * * [foreign table] * * * [referrer table] * * * [foreign property] * * * [referrer property] * * </pre> * @author DBFlute(AutoGenerator) */ public abstract class BsWhiteClassificationDeploymentBhv extends org.docksidestage.hangar.dbflute.nogen.ExtendedAbstractBehaviorWritable<WhiteClassificationDeployment, WhiteClassificationDeploymentCB> { // =================================================================================== // Definition // ========== /*df:beginQueryPath*/ /*df:endQueryPath*/ // =================================================================================== // DB Meta // ======= /** {@inheritDoc} */ public WhiteClassificationDeploymentDbm asDBMeta() { return WhiteClassificationDeploymentDbm.getInstance(); } /** {@inheritDoc} */ public String asTableDbName() { return "WHITE_CLASSIFICATION_DEPLOYMENT"; } // =================================================================================== // New Instance // ============ /** {@inheritDoc} */ public WhiteClassificationDeploymentCB newConditionBean() { return new WhiteClassificationDeploymentCB(); } // =================================================================================== // Count Select // ============ /** * Select the count of uniquely-selected records by the condition-bean. {IgnorePagingCondition, IgnoreSpecifyColumn}<br> * SpecifyColumn is ignored but you can use it only to remove text type column for union's distinct. * <pre> * <span style="color: #70226C">int</span> count = <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectCount</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().set... * }); * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @return The count for the condition. (NotMinus) */ public int selectCount(CBCall<WhiteClassificationDeploymentCB> cbLambda) { return facadeSelectCount(createCB(cbLambda)); } // =================================================================================== // Entity Select // ============= /** * Select the entity by the condition-bean. <br> * It returns not-null optional entity, so you should ... <br> * <span style="color: #AD4747; font-size: 120%">If the data is always present as your business rule, alwaysPresent().</span> <br> * <span style="color: #AD4747; font-size: 120%">If it might be no data, isPresent() and orElse(), ...</span> * <pre> * <span style="color: #3F7E5E">// if the data always exists as your business rule</span> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectEntity</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().set... * }).<span style="color: #CC4747">alwaysPresent</span>(<span style="color: #553000">whiteClassificationDeployment</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #3F7E5E">// called if present, or exception</span> * ... = <span style="color: #553000">whiteClassificationDeployment</span>.get... * }); * * <span style="color: #3F7E5E">// if it might be no data, ...</span> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectEntity</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().set... * }).<span style="color: #CC4747">ifPresent</span>(<span style="color: #553000">whiteClassificationDeployment</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #3F7E5E">// called if present</span> * ... = <span style="color: #553000">whiteClassificationDeployment</span>.get... * }).<span style="color: #994747">orElse</span>(() <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #3F7E5E">// called if not present</span> * }); * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @return The optional entity selected by the condition. (NotNull: if no data, empty entity) * @throws EntityAlreadyDeletedException When get(), required() of return value is called and the value is null, which means entity has already been deleted (not found). * @throws EntityDuplicatedException When the entity has been duplicated. * @throws SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. */ public OptionalEntity<WhiteClassificationDeployment> selectEntity(CBCall<WhiteClassificationDeploymentCB> cbLambda) { return facadeSelectEntity(createCB(cbLambda)); } protected OptionalEntity<WhiteClassificationDeployment> facadeSelectEntity(WhiteClassificationDeploymentCB cb) { return doSelectOptionalEntity(cb, typeOfSelectedEntity()); } protected <ENTITY extends WhiteClassificationDeployment> OptionalEntity<ENTITY> doSelectOptionalEntity(WhiteClassificationDeploymentCB cb, Class<? extends ENTITY> tp) { return createOptionalEntity(doSelectEntity(cb, tp), cb); } protected Entity doReadEntity(ConditionBean cb) { return facadeSelectEntity(downcast(cb)).orElse(null); } /** * Select the entity by the condition-bean with deleted check. <br> * <span style="color: #AD4747; font-size: 120%">If the data is always present as your business rule, this method is good.</span> * <pre> * WhiteClassificationDeployment <span style="color: #553000">whiteClassificationDeployment</span> = <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectEntityWithDeletedCheck</span>(cb <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> cb.acceptPK(1)); * ... = <span style="color: #553000">whiteClassificationDeployment</span>.get...(); <span style="color: #3F7E5E">// the entity always be not null</span> * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @return The entity selected by the condition. (NotNull: if no data, throws exception) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) * @throws EntityDuplicatedException When the entity has been duplicated. * @throws SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. */ public WhiteClassificationDeployment selectEntityWithDeletedCheck(CBCall<WhiteClassificationDeploymentCB> cbLambda) { return facadeSelectEntityWithDeletedCheck(createCB(cbLambda)); } /** * Select the entity by the primary-key value. * @param deploymentId : PK, NotNull, DECIMAL(16). (NotNull) * @return The optional entity selected by the PK. (NotNull: if no data, empty entity) * @throws EntityAlreadyDeletedException When get(), required() of return value is called and the value is null, which means entity has already been deleted (not found). * @throws EntityDuplicatedException When the entity has been duplicated. * @throws SelectEntityConditionNotFoundException When the condition for selecting an entity is not found. */ public OptionalEntity<WhiteClassificationDeployment> selectByPK(Long deploymentId) { return facadeSelectByPK(deploymentId); } protected OptionalEntity<WhiteClassificationDeployment> facadeSelectByPK(Long deploymentId) { return doSelectOptionalByPK(deploymentId, typeOfSelectedEntity()); } protected <ENTITY extends WhiteClassificationDeployment> ENTITY doSelectByPK(Long deploymentId, Class<? extends ENTITY> tp) { return doSelectEntity(xprepareCBAsPK(deploymentId), tp); } protected <ENTITY extends WhiteClassificationDeployment> OptionalEntity<ENTITY> doSelectOptionalByPK(Long deploymentId, Class<? extends ENTITY> tp) { return createOptionalEntity(doSelectByPK(deploymentId, tp), deploymentId); } protected WhiteClassificationDeploymentCB xprepareCBAsPK(Long deploymentId) { assertObjectNotNull("deploymentId", deploymentId); return newConditionBean().acceptPK(deploymentId); } // =================================================================================== // List Select // =========== /** * Select the list as result bean. * <pre> * ListResultBean&lt;WhiteClassificationDeployment&gt; <span style="color: #553000">whiteClassificationDeploymentList</span> = <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectList</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().set...; * <span style="color: #553000">cb</span>.query().addOrderBy...; * }); * <span style="color: #70226C">for</span> (WhiteClassificationDeployment <span style="color: #553000">whiteClassificationDeployment</span> : <span style="color: #553000">whiteClassificationDeploymentList</span>) { * ... = <span style="color: #553000">whiteClassificationDeployment</span>.get...; * } * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @return The result bean of selected list. (NotNull: if no data, returns empty list) * @throws DangerousResultSizeException When the result size is over the specified safety size. */ public ListResultBean<WhiteClassificationDeployment> selectList(CBCall<WhiteClassificationDeploymentCB> cbLambda) { return facadeSelectList(createCB(cbLambda)); } @Override protected boolean isEntityDerivedMappable() { return true; } // =================================================================================== // Page Select // =========== /** * Select the page as result bean. <br> * (both count-select and paging-select are executed) * <pre> * PagingResultBean&lt;WhiteClassificationDeployment&gt; <span style="color: #553000">page</span> = <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectPage</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().set... * <span style="color: #553000">cb</span>.query().addOrderBy... * <span style="color: #553000">cb</span>.<span style="color: #CC4747">paging</span>(20, 3); <span style="color: #3F7E5E">// 20 records per a page and current page number is 3</span> * }); * <span style="color: #70226C">int</span> allRecordCount = <span style="color: #553000">page</span>.getAllRecordCount(); * <span style="color: #70226C">int</span> allPageCount = <span style="color: #553000">page</span>.getAllPageCount(); * <span style="color: #70226C">boolean</span> isExistPrePage = <span style="color: #553000">page</span>.isExistPrePage(); * <span style="color: #70226C">boolean</span> isExistNextPage = <span style="color: #553000">page</span>.isExistNextPage(); * ... * <span style="color: #70226C">for</span> (WhiteClassificationDeployment whiteClassificationDeployment : <span style="color: #553000">page</span>) { * ... = whiteClassificationDeployment.get...; * } * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @return The result bean of selected page. (NotNull: if no data, returns bean as empty list) * @throws DangerousResultSizeException When the result size is over the specified safety size. */ public PagingResultBean<WhiteClassificationDeployment> selectPage(CBCall<WhiteClassificationDeploymentCB> cbLambda) { return facadeSelectPage(createCB(cbLambda)); } // =================================================================================== // Cursor Select // ============= /** * Select the cursor by the condition-bean. * <pre> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectCursor</span>(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().set... * }, <span style="color: #553000">member</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * ... = <span style="color: #553000">member</span>.getMemberName(); * }); * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @param entityLambda The handler of entity row of WhiteClassificationDeployment. (NotNull) */ public void selectCursor(CBCall<WhiteClassificationDeploymentCB> cbLambda, EntityRowHandler<WhiteClassificationDeployment> entityLambda) { facadeSelectCursor(createCB(cbLambda), entityLambda); } // =================================================================================== // Scalar Select // ============= /** * Select the scalar value derived by a function from uniquely-selected records. <br> * You should call a function method after this method called like as follows: * <pre> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">selectScalar</span>(Date.class).max(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.specify().<span style="color: #CC4747">column...</span>; <span style="color: #3F7E5E">// required for the function</span> * <span style="color: #553000">cb</span>.query().set... * }); * </pre> * @param <RESULT> The type of result. * @param resultType The type of result. (NotNull) * @return The scalar function object to specify function for scalar value. (NotNull) */ public <RESULT> HpSLSFunction<WhiteClassificationDeploymentCB, RESULT> selectScalar(Class<RESULT> resultType) { return facadeScalarSelect(resultType); } // =================================================================================== // Sequence // ======== @Override protected Number doReadNextVal() { String msg = "This table is NOT related to sequence: " + asTableDbName(); throw new UnsupportedOperationException(msg); } // =================================================================================== // Load Referrer // ============= /** * Load referrer for the list by the referrer loader. * <pre> * List&lt;Member&gt; <span style="color: #553000">memberList</span> = <span style="color: #0000C0">memberBhv</span>.selectList(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().set... * }); * memberBhv.<span style="color: #CC4747">load</span>(<span style="color: #553000">memberList</span>, <span style="color: #553000">memberLoader</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">memberLoader</span>.<span style="color: #CC4747">loadPurchase</span>(<span style="color: #553000">purchaseCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">purchaseCB</span>.setupSelect... * <span style="color: #553000">purchaseCB</span>.query().set... * <span style="color: #553000">purchaseCB</span>.query().addOrderBy... * }); <span style="color: #3F7E5E">// you can also load nested referrer from here</span> * <span style="color: #3F7E5E">//}).withNestedReferrer(purchaseLoader -&gt; {</span> * <span style="color: #3F7E5E">// purchaseLoader.loadPurchasePayment(...);</span> * <span style="color: #3F7E5E">//});</span> * * <span style="color: #3F7E5E">// you can also pull out foreign table and load its referrer</span> * <span style="color: #3F7E5E">// (setupSelect of the foreign table should be called)</span> * <span style="color: #3F7E5E">//memberLoader.pulloutMemberStatus().loadMemberLogin(...)</span> * }); * <span style="color: #70226C">for</span> (Member member : <span style="color: #553000">memberList</span>) { * List&lt;Purchase&gt; purchaseList = member.<span style="color: #CC4747">getPurchaseList()</span>; * <span style="color: #70226C">for</span> (Purchase purchase : purchaseList) { * ... * } * } * </pre> * About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br> * The condition-bean, which the set-upper provides, has order by FK before callback. * @param whiteClassificationDeploymentList The entity list of whiteClassificationDeployment. (NotNull) * @param loaderLambda The callback to handle the referrer loader for actually loading referrer. (NotNull) */ public void load(List<WhiteClassificationDeployment> whiteClassificationDeploymentList, ReferrerLoaderHandler<LoaderOfWhiteClassificationDeployment> loaderLambda) { xassLRArg(whiteClassificationDeploymentList, loaderLambda); loaderLambda.handle(new LoaderOfWhiteClassificationDeployment().ready(whiteClassificationDeploymentList, _behaviorSelector)); } /** * Load referrer for the entity by the referrer loader. * <pre> * Member <span style="color: #553000">member</span> = <span style="color: #0000C0">memberBhv</span>.selectEntityWithDeletedCheck(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> <span style="color: #553000">cb</span>.acceptPK(1)); * <span style="color: #0000C0">memberBhv</span>.<span style="color: #CC4747">load</span>(<span style="color: #553000">member</span>, <span style="color: #553000">memberLoader</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">memberLoader</span>.<span style="color: #CC4747">loadPurchase</span>(<span style="color: #553000">purchaseCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">purchaseCB</span>.setupSelect... * <span style="color: #553000">purchaseCB</span>.query().set... * <span style="color: #553000">purchaseCB</span>.query().addOrderBy... * }); <span style="color: #3F7E5E">// you can also load nested referrer from here</span> * <span style="color: #3F7E5E">//}).withNestedReferrer(purchaseLoader -&gt; {</span> * <span style="color: #3F7E5E">// purchaseLoader.loadPurchasePayment(...);</span> * <span style="color: #3F7E5E">//});</span> * * <span style="color: #3F7E5E">// you can also pull out foreign table and load its referrer</span> * <span style="color: #3F7E5E">// (setupSelect of the foreign table should be called)</span> * <span style="color: #3F7E5E">//memberLoader.pulloutMemberStatus().loadMemberLogin(...)</span> * }); * List&lt;Purchase&gt; purchaseList = <span style="color: #553000">member</span>.<span style="color: #CC4747">getPurchaseList()</span>; * <span style="color: #70226C">for</span> (Purchase purchase : purchaseList) { * ... * } * </pre> * About internal policy, the value of primary key (and others too) is treated as case-insensitive. <br> * The condition-bean, which the set-upper provides, has order by FK before callback. * @param whiteClassificationDeployment The entity of whiteClassificationDeployment. (NotNull) * @param loaderLambda The callback to handle the referrer loader for actually loading referrer. (NotNull) */ public void load(WhiteClassificationDeployment whiteClassificationDeployment, ReferrerLoaderHandler<LoaderOfWhiteClassificationDeployment> loaderLambda) { xassLRArg(whiteClassificationDeployment, loaderLambda); loaderLambda.handle(new LoaderOfWhiteClassificationDeployment().ready(xnewLRAryLs(whiteClassificationDeployment), _behaviorSelector)); } // =================================================================================== // Pull out Relation // ================= // =================================================================================== // Extract Column // ============== /** * Extract the value list of (single) primary key deploymentId. * @param whiteClassificationDeploymentList The list of whiteClassificationDeployment. (NotNull, EmptyAllowed) * @return The list of the column value. (NotNull, EmptyAllowed, NotNullElement) */ public List<Long> extractDeploymentIdList(List<WhiteClassificationDeployment> whiteClassificationDeploymentList) { return helpExtractListInternally(whiteClassificationDeploymentList, "deploymentId"); } // =================================================================================== // Entity Update // ============= /** * Insert the entity modified-only. (DefaultConstraintsEnabled) * <pre> * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span> * whiteClassificationDeployment.setFoo...(value); * whiteClassificationDeployment.setBar...(value); * <span style="color: #3F7E5E">// you don't need to set values of common columns</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setRegisterUser(value);</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.set...;</span> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">insert</span>(whiteClassificationDeployment); * ... = whiteClassificationDeployment.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span> * </pre> * <p>While, when the entity is created by select, all columns are registered.</p> * @param whiteClassificationDeployment The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) * @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation) */ public void insert(WhiteClassificationDeployment whiteClassificationDeployment) { doInsert(whiteClassificationDeployment, null); } /** * Update the entity modified-only. (ZeroUpdateException, NonExclusiveControl) <br> * By PK as default, and also you can update by unique keys using entity's uniqueOf(). * <pre> * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * whiteClassificationDeployment.setPK...(value); <span style="color: #3F7E5E">// required</span> * whiteClassificationDeployment.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span> * <span style="color: #3F7E5E">// you don't need to set values of common columns</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setRegisterUser(value);</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.set...;</span> * <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span> * whiteClassificationDeployment.<span style="color: #CC4747">setVersionNo</span>(value); * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">update</span>(whiteClassificationDeployment); * </pre> * @param whiteClassificationDeployment The entity of update. (NotNull, PrimaryKeyNotNull) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) * @throws EntityDuplicatedException When the entity has been duplicated. * @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation) */ public void update(WhiteClassificationDeployment whiteClassificationDeployment) { doUpdate(whiteClassificationDeployment, null); } /** * Insert or update the entity modified-only. (DefaultConstraintsEnabled, NonExclusiveControl) <br> * if (the entity has no PK) { insert() } else { update(), but no data, insert() } <br> * <p><span style="color: #994747; font-size: 120%">Also you can update by unique keys using entity's uniqueOf().</span></p> * @param whiteClassificationDeployment The entity of insert or update. (NotNull, ...depends on insert or update) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) * @throws EntityDuplicatedException When the entity has been duplicated. * @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation) */ public void insertOrUpdate(WhiteClassificationDeployment whiteClassificationDeployment) { doInsertOrUpdate(whiteClassificationDeployment, null, null); } /** * Delete the entity. (ZeroUpdateException, NonExclusiveControl) <br> * By PK as default, and also you can delete by unique keys using entity's uniqueOf(). * <pre> * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * whiteClassificationDeployment.setPK...(value); <span style="color: #3F7E5E">// required</span> * <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span> * whiteClassificationDeployment.<span style="color: #CC4747">setVersionNo</span>(value); * <span style="color: #70226C">try</span> { * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">delete</span>(whiteClassificationDeployment); * } <span style="color: #70226C">catch</span> (EntityAlreadyUpdatedException e) { <span style="color: #3F7E5E">// if concurrent update</span> * ... * } * </pre> * @param whiteClassificationDeployment The entity of delete. (NotNull, PrimaryKeyNotNull) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) * @throws EntityDuplicatedException When the entity has been duplicated. */ public void delete(WhiteClassificationDeployment whiteClassificationDeployment) { doDelete(whiteClassificationDeployment, null); } // =================================================================================== // Batch Update // ============ /** * Batch-insert the entity list modified-only of same-set columns. (DefaultConstraintsEnabled) <br> * This method uses executeBatch() of java.sql.PreparedStatement. <br> * <p><span style="color: #CC4747; font-size: 120%">The columns of least common multiple are registered like this:</span></p> * <pre> * <span style="color: #70226C">for</span> (... : ...) { * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * whiteClassificationDeployment.setFooName("foo"); * <span style="color: #70226C">if</span> (...) { * whiteClassificationDeployment.setFooPrice(123); * } * <span style="color: #3F7E5E">// FOO_NAME and FOO_PRICE (and record meta columns) are registered</span> * <span style="color: #3F7E5E">// FOO_PRICE not-called in any entities are registered as null without default value</span> * <span style="color: #3F7E5E">// columns not-called in all entities are registered as null or default value</span> * whiteClassificationDeploymentList.add(whiteClassificationDeployment); * } * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">batchInsert</span>(whiteClassificationDeploymentList); * </pre> * <p>While, when the entities are created by select, all columns are registered.</p> * <p>And if the table has an identity, entities after the process don't have incremented values. * (When you use the (normal) insert(), you can get the incremented value from your entity)</p> * @param whiteClassificationDeploymentList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNullAllowed: when auto-increment) * @return The array of inserted count. (NotNull, EmptyAllowed) */ public int[] batchInsert(List<WhiteClassificationDeployment> whiteClassificationDeploymentList) { return doBatchInsert(whiteClassificationDeploymentList, null); } /** * Batch-update the entity list modified-only of same-set columns. (NonExclusiveControl) <br> * This method uses executeBatch() of java.sql.PreparedStatement. <br> * <span style="color: #CC4747; font-size: 120%">You should specify same-set columns to all entities like this:</span> * <pre> * for (... : ...) { * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * whiteClassificationDeployment.setFooName("foo"); * <span style="color: #70226C">if</span> (...) { * whiteClassificationDeployment.setFooPrice(123); * } <span style="color: #70226C">else</span> { * whiteClassificationDeployment.setFooPrice(null); <span style="color: #3F7E5E">// updated as null</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setFooDate(...); // *not allowed, fragmented</span> * } * <span style="color: #3F7E5E">// FOO_NAME and FOO_PRICE (and record meta columns) are updated</span> * <span style="color: #3F7E5E">// (others are not updated: their values are kept)</span> * whiteClassificationDeploymentList.add(whiteClassificationDeployment); * } * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">batchUpdate</span>(whiteClassificationDeploymentList); * </pre> * @param whiteClassificationDeploymentList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) * @return The array of updated count. (NotNull, EmptyAllowed) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) */ public int[] batchUpdate(List<WhiteClassificationDeployment> whiteClassificationDeploymentList) { return doBatchUpdate(whiteClassificationDeploymentList, null); } /** * Batch-delete the entity list. (NonExclusiveControl) <br> * This method uses executeBatch() of java.sql.PreparedStatement. * @param whiteClassificationDeploymentList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) * @return The array of deleted count. (NotNull, EmptyAllowed) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) */ public int[] batchDelete(List<WhiteClassificationDeployment> whiteClassificationDeploymentList) { return doBatchDelete(whiteClassificationDeploymentList, null); } // =================================================================================== // Query Update // ============ /** * Insert the several entities by query (modified-only for fixed value). * <pre> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">queryInsert</span>(new QueryInsertSetupper&lt;WhiteClassificationDeployment, WhiteClassificationDeploymentCB&gt;() { * public ConditionBean setup(WhiteClassificationDeployment entity, WhiteClassificationDeploymentCB intoCB) { * FooCB cb = FooCB(); * cb.setupSelect_Bar(); * * <span style="color: #3F7E5E">// mapping</span> * intoCB.specify().columnMyName().mappedFrom(cb.specify().columnFooName()); * intoCB.specify().columnMyCount().mappedFrom(cb.specify().columnFooCount()); * intoCB.specify().columnMyDate().mappedFrom(cb.specify().specifyBar().columnBarDate()); * entity.setMyFixedValue("foo"); <span style="color: #3F7E5E">// fixed value</span> * <span style="color: #3F7E5E">// you don't need to set values of common columns</span> * <span style="color: #3F7E5E">//entity.setRegisterUser(value);</span> * <span style="color: #3F7E5E">//entity.set...;</span> * <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span> * <span style="color: #3F7E5E">//entity.setVersionNo(value);</span> * * return cb; * } * }); * </pre> * @param manyArgLambda The callback to set up query-insert. (NotNull) * @return The inserted count. */ public int queryInsert(QueryInsertSetupper<WhiteClassificationDeployment, WhiteClassificationDeploymentCB> manyArgLambda) { return doQueryInsert(manyArgLambda, null); } /** * Update the several entities by query non-strictly modified-only. (NonExclusiveControl) * <pre> * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * <span style="color: #3F7E5E">// you don't need to set PK value</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setPK...(value);</span> * whiteClassificationDeployment.setFoo...(value); <span style="color: #3F7E5E">// you should set only modified columns</span> * <span style="color: #3F7E5E">// you don't need to set values of common columns</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setRegisterUser(value);</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.set...;</span> * <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span> * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setVersionNo(value);</span> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">queryUpdate</span>(whiteClassificationDeployment, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().setFoo... * }); * </pre> * @param whiteClassificationDeployment The entity that contains update values. (NotNull, PrimaryKeyNullAllowed) * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @return The updated count. * @throws NonQueryUpdateNotAllowedException When the query has no condition. */ public int queryUpdate(WhiteClassificationDeployment whiteClassificationDeployment, CBCall<WhiteClassificationDeploymentCB> cbLambda) { return doQueryUpdate(whiteClassificationDeployment, createCB(cbLambda), null); } /** * Delete the several entities by query. (NonExclusiveControl) * <pre> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">queryDelete</span>(whiteClassificationDeployment, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().setFoo... * }); * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @return The deleted count. * @throws NonQueryDeleteNotAllowedException When the query has no condition. */ public int queryDelete(CBCall<WhiteClassificationDeploymentCB> cbLambda) { return doQueryDelete(createCB(cbLambda), null); } // =================================================================================== // Varying Update // ============== // ----------------------------------------------------- // Entity Update // ------------- /** * Insert the entity with varying requests. <br> * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br> * Other specifications are same as insert(entity). * <pre> * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * <span style="color: #3F7E5E">// if auto-increment, you don't need to set the PK value</span> * whiteClassificationDeployment.setFoo...(value); * whiteClassificationDeployment.setBar...(value); * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">varyingInsert</span>(whiteClassificationDeployment, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #3F7E5E">// you can insert by your values for common columns</span> * <span style="color: #553000">op</span>.disableCommonColumnAutoSetup(); * }); * ... = whiteClassificationDeployment.getPK...(); <span style="color: #3F7E5E">// if auto-increment, you can get the value after</span> * </pre> * @param whiteClassificationDeployment The entity of insert. (NotNull, PrimaryKeyNullAllowed: when auto-increment) * @param opLambda The callback for option of insert for varying requests. (NotNull) * @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation) */ public void varyingInsert(WhiteClassificationDeployment whiteClassificationDeployment, WritableOptionCall<WhiteClassificationDeploymentCB, InsertOption<WhiteClassificationDeploymentCB>> opLambda) { doInsert(whiteClassificationDeployment, createInsertOption(opLambda)); } /** * Update the entity with varying requests modified-only. (ZeroUpdateException, NonExclusiveControl) <br> * For example, self(selfCalculationSpecification), specify(updateColumnSpecification), disableCommonColumnAutoSetup(). <br> * Other specifications are same as update(entity). * <pre> * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * whiteClassificationDeployment.setPK...(value); <span style="color: #3F7E5E">// required</span> * whiteClassificationDeployment.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span> * <span style="color: #3F7E5E">// if exclusive control, the value of concurrency column is required</span> * whiteClassificationDeployment.<span style="color: #CC4747">setVersionNo</span>(value); * <span style="color: #3F7E5E">// you can update by self calculation values</span> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">varyingUpdate</span>(whiteClassificationDeployment, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">op</span>.self(<span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.specify().<span style="color: #CC4747">columnXxxCount()</span>; * }).plus(1); <span style="color: #3F7E5E">// XXX_COUNT = XXX_COUNT + 1</span> * }); * </pre> * @param whiteClassificationDeployment The entity of update. (NotNull, PrimaryKeyNotNull) * @param opLambda The callback for option of update for varying requests. (NotNull) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) * @throws EntityDuplicatedException When the entity has been duplicated. * @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation) */ public void varyingUpdate(WhiteClassificationDeployment whiteClassificationDeployment, WritableOptionCall<WhiteClassificationDeploymentCB, UpdateOption<WhiteClassificationDeploymentCB>> opLambda) { doUpdate(whiteClassificationDeployment, createUpdateOption(opLambda)); } /** * Insert or update the entity with varying requests. (ExclusiveControl: when update) <br> * Other specifications are same as insertOrUpdate(entity). * @param whiteClassificationDeployment The entity of insert or update. (NotNull) * @param insertOpLambda The callback for option of insert for varying requests. (NotNull) * @param updateOpLambda The callback for option of update for varying requests. (NotNull) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) * @throws EntityDuplicatedException When the entity has been duplicated. * @throws EntityAlreadyExistsException When the entity already exists. (unique constraint violation) */ public void varyingInsertOrUpdate(WhiteClassificationDeployment whiteClassificationDeployment, WritableOptionCall<WhiteClassificationDeploymentCB, InsertOption<WhiteClassificationDeploymentCB>> insertOpLambda, WritableOptionCall<WhiteClassificationDeploymentCB, UpdateOption<WhiteClassificationDeploymentCB>> updateOpLambda) { doInsertOrUpdate(whiteClassificationDeployment, createInsertOption(insertOpLambda), createUpdateOption(updateOpLambda)); } /** * Delete the entity with varying requests. (ZeroUpdateException, NonExclusiveControl) <br> * Now a valid option does not exist. <br> * Other specifications are same as delete(entity). * @param whiteClassificationDeployment The entity of delete. (NotNull, PrimaryKeyNotNull, ConcurrencyColumnNotNull) * @param opLambda The callback for option of delete for varying requests. (NotNull) * @throws EntityAlreadyDeletedException When the entity has already been deleted. (not found) * @throws EntityDuplicatedException When the entity has been duplicated. */ public void varyingDelete(WhiteClassificationDeployment whiteClassificationDeployment, WritableOptionCall<WhiteClassificationDeploymentCB, DeleteOption<WhiteClassificationDeploymentCB>> opLambda) { doDelete(whiteClassificationDeployment, createDeleteOption(opLambda)); } // ----------------------------------------------------- // Batch Update // ------------ /** * Batch-insert the list with varying requests. <br> * For example, disableCommonColumnAutoSetup() * , disablePrimaryKeyIdentity(), limitBatchInsertLogging(). <br> * Other specifications are same as batchInsert(entityList). * @param whiteClassificationDeploymentList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) * @param opLambda The callback for option of insert for varying requests. (NotNull) * @return The array of updated count. (NotNull, EmptyAllowed) */ public int[] varyingBatchInsert(List<WhiteClassificationDeployment> whiteClassificationDeploymentList, WritableOptionCall<WhiteClassificationDeploymentCB, InsertOption<WhiteClassificationDeploymentCB>> opLambda) { return doBatchInsert(whiteClassificationDeploymentList, createInsertOption(opLambda)); } /** * Batch-update the list with varying requests. <br> * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) * , disableCommonColumnAutoSetup(), limitBatchUpdateLogging(). <br> * Other specifications are same as batchUpdate(entityList). * @param whiteClassificationDeploymentList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) * @param opLambda The callback for option of update for varying requests. (NotNull) * @return The array of updated count. (NotNull, EmptyAllowed) */ public int[] varyingBatchUpdate(List<WhiteClassificationDeployment> whiteClassificationDeploymentList, WritableOptionCall<WhiteClassificationDeploymentCB, UpdateOption<WhiteClassificationDeploymentCB>> opLambda) { return doBatchUpdate(whiteClassificationDeploymentList, createUpdateOption(opLambda)); } /** * Batch-delete the list with varying requests. <br> * For example, limitBatchDeleteLogging(). <br> * Other specifications are same as batchDelete(entityList). * @param whiteClassificationDeploymentList The list of the entity. (NotNull, EmptyAllowed, PrimaryKeyNotNull) * @param opLambda The callback for option of delete for varying requests. (NotNull) * @return The array of deleted count. (NotNull, EmptyAllowed) */ public int[] varyingBatchDelete(List<WhiteClassificationDeployment> whiteClassificationDeploymentList, WritableOptionCall<WhiteClassificationDeploymentCB, DeleteOption<WhiteClassificationDeploymentCB>> opLambda) { return doBatchDelete(whiteClassificationDeploymentList, createDeleteOption(opLambda)); } // ----------------------------------------------------- // Query Update // ------------ /** * Insert the several entities by query with varying requests (modified-only for fixed value). <br> * For example, disableCommonColumnAutoSetup(), disablePrimaryKeyIdentity(). <br> * Other specifications are same as queryInsert(entity, setupper). * @param manyArgLambda The set-upper of query-insert. (NotNull) * @param opLambda The callback for option of insert for varying requests. (NotNull) * @return The inserted count. */ public int varyingQueryInsert(QueryInsertSetupper<WhiteClassificationDeployment, WhiteClassificationDeploymentCB> manyArgLambda, WritableOptionCall<WhiteClassificationDeploymentCB, InsertOption<WhiteClassificationDeploymentCB>> opLambda) { return doQueryInsert(manyArgLambda, createInsertOption(opLambda)); } /** * Update the several entities by query with varying requests non-strictly modified-only. {NonExclusiveControl} <br> * For example, self(selfCalculationSpecification), specify(updateColumnSpecification) * , disableCommonColumnAutoSetup(), allowNonQueryUpdate(). <br> * Other specifications are same as queryUpdate(entity, cb). * <pre> * <span style="color: #3F7E5E">// ex) you can update by self calculation values</span> * WhiteClassificationDeployment whiteClassificationDeployment = <span style="color: #70226C">new</span> WhiteClassificationDeployment(); * <span style="color: #3F7E5E">// you don't need to set PK value</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setPK...(value);</span> * whiteClassificationDeployment.setOther...(value); <span style="color: #3F7E5E">// you should set only modified columns</span> * <span style="color: #3F7E5E">// you don't need to set a value of concurrency column</span> * <span style="color: #3F7E5E">// (auto-increment for version number is valid though non-exclusive control)</span> * <span style="color: #3F7E5E">//whiteClassificationDeployment.setVersionNo(value);</span> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">varyingQueryUpdate</span>(whiteClassificationDeployment, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().setFoo... * }, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">op</span>.self(<span style="color: #553000">colCB</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">colCB</span>.specify().<span style="color: #CC4747">columnFooCount()</span>; * }).plus(1); <span style="color: #3F7E5E">// FOO_COUNT = FOO_COUNT + 1</span> * }); * </pre> * @param whiteClassificationDeployment The entity that contains update values. (NotNull) {PrimaryKeyNotRequired} * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @param opLambda The callback for option of update for varying requests. (NotNull) * @return The updated count. * @throws NonQueryUpdateNotAllowedException When the query has no condition (if not allowed). */ public int varyingQueryUpdate(WhiteClassificationDeployment whiteClassificationDeployment, CBCall<WhiteClassificationDeploymentCB> cbLambda, WritableOptionCall<WhiteClassificationDeploymentCB, UpdateOption<WhiteClassificationDeploymentCB>> opLambda) { return doQueryUpdate(whiteClassificationDeployment, createCB(cbLambda), createUpdateOption(opLambda)); } /** * Delete the several entities by query with varying requests non-strictly. <br> * For example, allowNonQueryDelete(). <br> * Other specifications are same as queryDelete(cb). * <pre> * <span style="color: #0000C0">whiteClassificationDeploymentBhv</span>.<span style="color: #CC4747">queryDelete</span>(whiteClassificationDeployment, <span style="color: #553000">cb</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">cb</span>.query().setFoo... * }, <span style="color: #553000">op</span> <span style="color: #90226C; font-weight: bold"><span style="font-size: 120%">-</span>&gt;</span> { * <span style="color: #553000">op</span>... * }); * </pre> * @param cbLambda The callback for condition-bean of WhiteClassificationDeployment. (NotNull) * @param opLambda The callback for option of delete for varying requests. (NotNull) * @return The deleted count. * @throws NonQueryDeleteNotAllowedException When the query has no condition (if not allowed). */ public int varyingQueryDelete(CBCall<WhiteClassificationDeploymentCB> cbLambda, WritableOptionCall<WhiteClassificationDeploymentCB, DeleteOption<WhiteClassificationDeploymentCB>> opLambda) { return doQueryDelete(createCB(cbLambda), createDeleteOption(opLambda)); } // =================================================================================== // OutsideSql // ========== /** * Prepare the all facade executor of outside-SQL to execute it. * <pre> * <span style="color: #3F7E5E">// main style</span> * whiteClassificationDeploymentBhv.outideSql().selectEntity(pmb); <span style="color: #3F7E5E">// optional</span> * whiteClassificationDeploymentBhv.outideSql().selectList(pmb); <span style="color: #3F7E5E">// ListResultBean</span> * whiteClassificationDeploymentBhv.outideSql().selectPage(pmb); <span style="color: #3F7E5E">// PagingResultBean</span> * whiteClassificationDeploymentBhv.outideSql().selectPagedListOnly(pmb); <span style="color: #3F7E5E">// ListResultBean</span> * whiteClassificationDeploymentBhv.outideSql().selectCursor(pmb, handler); <span style="color: #3F7E5E">// (by handler)</span> * whiteClassificationDeploymentBhv.outideSql().execute(pmb); <span style="color: #3F7E5E">// int (updated count)</span> * whiteClassificationDeploymentBhv.outideSql().call(pmb); <span style="color: #3F7E5E">// void (pmb has OUT parameters)</span> * * <span style="color: #3F7E5E">// traditional style</span> * whiteClassificationDeploymentBhv.outideSql().traditionalStyle().selectEntity(path, pmb, entityType); * whiteClassificationDeploymentBhv.outideSql().traditionalStyle().selectList(path, pmb, entityType); * whiteClassificationDeploymentBhv.outideSql().traditionalStyle().selectPage(path, pmb, entityType); * whiteClassificationDeploymentBhv.outideSql().traditionalStyle().selectPagedListOnly(path, pmb, entityType); * whiteClassificationDeploymentBhv.outideSql().traditionalStyle().selectCursor(path, pmb, handler); * whiteClassificationDeploymentBhv.outideSql().traditionalStyle().execute(path, pmb); * * <span style="color: #3F7E5E">// options</span> * whiteClassificationDeploymentBhv.outideSql().removeBlockComment().selectList() * whiteClassificationDeploymentBhv.outideSql().removeLineComment().selectList() * whiteClassificationDeploymentBhv.outideSql().formatSql().selectList() * </pre> * <p>The invoker of behavior command should be not null when you call this method.</p> * @return The new-created all facade executor of outside-SQL. (NotNull) */ public OutsideSqlAllFacadeExecutor<WhiteClassificationDeploymentBhv> outsideSql() { return doOutsideSql(); } // =================================================================================== // Framework Filter Override // ========================= @Override protected void frameworkFilterEntityOfInsert(Entity entity, org.dbflute.optional.OptionalThing<InsertOption<? extends ConditionBean>> option) { super.frameworkFilterEntityOfInsert(entity, option); new DateUpdateAdjuster().truncatePrecisionOfEntityProperty(entity); } @Override protected void frameworkFilterEntityOfUpdate(Entity entity, org.dbflute.optional.OptionalThing<UpdateOption<? extends ConditionBean>> option) { super.frameworkFilterEntityOfUpdate(entity, option); new DateUpdateAdjuster().truncatePrecisionOfEntityProperty(entity); } // =================================================================================== // Type Helper // =========== protected Class<? extends WhiteClassificationDeployment> typeOfSelectedEntity() { return WhiteClassificationDeployment.class; } protected Class<WhiteClassificationDeployment> typeOfHandlingEntity() { return WhiteClassificationDeployment.class; } protected Class<WhiteClassificationDeploymentCB> typeOfHandlingConditionBean() { return WhiteClassificationDeploymentCB.class; } }
{'content_hash': '38024ec6d779317868a3c35e6e27b924', 'timestamp': '', 'source': 'github', 'line_count': 850, 'max_line_length': 385, 'avg_line_length': 70.68588235294118, 'alnum_prop': 0.6426443419935756, 'repo_name': 'dbflute-test/dbflute-test-active-hangar', 'id': 'dd2a6795655330d7eb8c5f4fdc32d224c515c451', 'size': '60702', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/java/org/docksidestage/hangar/dbflute/bsbhv/BsWhiteClassificationDeploymentBhv.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ActionScript', 'bytes': '369151'}, {'name': 'Batchfile', 'bytes': '41365'}, {'name': 'CSS', 'bytes': '636'}, {'name': 'HTML', 'bytes': '42329'}, {'name': 'Java', 'bytes': '16397764'}, {'name': 'PLpgSQL', 'bytes': '2498'}, {'name': 'Perl', 'bytes': '9821'}, {'name': 'Python', 'bytes': '3285'}, {'name': 'Roff', 'bytes': '105'}, {'name': 'Shell', 'bytes': '30232'}, {'name': 'XSLT', 'bytes': '218435'}]}
import Router from '@koa/router'; import Koa from 'koa'; import { route } from '@cardstack/hub/routes'; export default class EmailCardDropRouter { emailCardDropVerify = route('email-card-drop-verify', { as: 'emailCardDropVerify' }); routes() { let emailCardDropSubrouter = new Router(); emailCardDropSubrouter.get('/verify', this.emailCardDropVerify.get); emailCardDropSubrouter.all('/(.*)', notFound); let emailCardDropRouter = new Router(); emailCardDropRouter.use( '/email-card-drop', emailCardDropSubrouter.routes(), emailCardDropSubrouter.allowedMethods() ); return emailCardDropRouter.routes(); } } function notFound(ctx: Koa.Context) { ctx.status = 404; } declare module '@cardstack/di' { interface KnownServices { 'email-card-drop-router': EmailCardDropRouter; } }
{'content_hash': '0b767bea064185a2ed09bc47d1b88aed', 'timestamp': '', 'source': 'github', 'line_count': 31, 'max_line_length': 87, 'avg_line_length': 27.096774193548388, 'alnum_prop': 0.7035714285714286, 'repo_name': 'cardstack/cardstack', 'id': 'c2908a6eb654962b89978484bb7cc57dc370c281', 'size': '840', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'packages/hub/services/email-card-drop-router.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '327952'}, {'name': 'Dockerfile', 'bytes': '5072'}, {'name': 'HCL', 'bytes': '53170'}, {'name': 'HTML', 'bytes': '12660'}, {'name': 'Handlebars', 'bytes': '309845'}, {'name': 'JavaScript', 'bytes': '678790'}, {'name': 'PLpgSQL', 'bytes': '57036'}, {'name': 'Procfile', 'bytes': '48'}, {'name': 'Python', 'bytes': '207635'}, {'name': 'Ruby', 'bytes': '1753'}, {'name': 'Shell', 'bytes': '5425'}, {'name': 'TypeScript', 'bytes': '3614447'}]}
package org.apache.reef.webserver; import org.apache.reef.tang.annotations.Name; import org.apache.reef.tang.annotations.NamedParameter; /** * minimum port number range when generating a port number for the Http Server. */ @NamedParameter(doc = "Minimum port number for Jetty Server", default_value = "1024") public class MinPortNumber implements Name<Integer> { }
{'content_hash': '0e227ef2c9875eaabb4b648da6822510', 'timestamp': '', 'source': 'github', 'line_count': 12, 'max_line_length': 85, 'avg_line_length': 30.833333333333332, 'alnum_prop': 0.7756756756756756, 'repo_name': 'taegeonum/incubator-reef', 'id': '62c1486ca8a885b2001afd586c9bbb53641968c1', 'size': '1177', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lang/java/reef-webserver/src/main/java/org/apache/reef/webserver/MinPortNumber.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '2308'}, {'name': 'C', 'bytes': '1867'}, {'name': 'C#', 'bytes': '2903255'}, {'name': 'C++', 'bytes': '114782'}, {'name': 'Java', 'bytes': '4605296'}, {'name': 'JavaScript', 'bytes': '2105'}, {'name': 'Objective-C', 'bytes': '965'}, {'name': 'PowerShell', 'bytes': '6426'}, {'name': 'Protocol Buffer', 'bytes': '34980'}, {'name': 'Shell', 'bytes': '5510'}]}
package org.openecard.mobile.ex; /** * Is thrown if the service context can not be initialized. * * @author Mike Prechtl */ public class UnableToInitialize extends Exception { public UnableToInitialize(String message) { super(message); } public UnableToInitialize(String message, Throwable cause) { super(message, cause); } }
{'content_hash': '05f234a9d94c33837b001090b68faa41', 'timestamp': '', 'source': 'github', 'line_count': 21, 'max_line_length': 64, 'avg_line_length': 16.904761904761905, 'alnum_prop': 0.7098591549295775, 'repo_name': 'ecsec/open-ecard', 'id': '42a5e73b329065e91ea0d5e0f274f69c4c674a76', 'size': '1254', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clients/mobile-lib/src/main/java/org/openecard/mobile/ex/UnableToInitialize.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C', 'bytes': '108535'}, {'name': 'CSS', 'bytes': '1068'}, {'name': 'HTML', 'bytes': '47316'}, {'name': 'Inno Setup', 'bytes': '4188'}, {'name': 'Java', 'bytes': '5550896'}]}
from django import forms, template from django.utils.encoding import python_2_unicode_compatible from .templatetags.floppyforms import FormNode __all__ = ('BaseForm', 'Form',) @python_2_unicode_compatible class LayoutRenderer(object): _template_node = FormNode( 'form', [template.Variable('form')], { 'using': template.Variable('layout'), 'only': False, 'with': None, }) def _render_as(self, layout): context = template.Context({ 'form': self, 'layout': layout, }) return self._template_node.render(context) def __str__(self): return self._render_as('floppyforms/layouts/default.html') def as_p(self): return self._render_as('floppyforms/layouts/p.html') def as_ul(self): return self._render_as('floppyforms/layouts/ul.html') def as_table(self): return self._render_as('floppyforms/layouts/table.html') class BaseForm(LayoutRenderer, forms.BaseForm): pass class Form(LayoutRenderer, forms.Form): pass
{'content_hash': 'ace3c7ea78a94504ae985353673e70e6', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 66, 'avg_line_length': 23.804347826086957, 'alnum_prop': 0.6146118721461187, 'repo_name': 'agconti/njode', 'id': '4e6952ad2f84baf1f6c04f8c92ccf7c5b2bcd280', 'size': '1095', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'env/lib/python2.7/site-packages/floppyforms/forms.py', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '5979'}, {'name': 'CSS', 'bytes': '137839'}, {'name': 'JavaScript', 'bytes': '202018'}, {'name': 'Makefile', 'bytes': '9794'}, {'name': 'Python', 'bytes': '17227922'}, {'name': 'Shell', 'bytes': '8848'}, {'name': 'TeX', 'bytes': '56837'}]}
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{'content_hash': '194b430755edef41863bb97ee479fc98', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'd7e2bc2f8b6520778491542b80a758b89447c1bf', 'size': '192', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Myrtales/Myrtaceae/Syzygium/Syzygium virotii/ Syn. Cupheanthus microphyllus/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []}
import { message } from "../../../../communication/actions"; export const sendOkResponse = (sendResponse: any, options: { result: message }) => { sendResponse(options.result) }
{'content_hash': 'cdd9248930c559f0af215d23335f5467', 'timestamp': '', 'source': 'github', 'line_count': 7, 'max_line_length': 60, 'avg_line_length': 26.428571428571427, 'alnum_prop': 0.6594594594594595, 'repo_name': 'wdelmas/remote-potato', 'id': '0cdcce26d4cb41baba989d3ec21cf4e997ddb8ee', 'size': '185', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/clients/extensions/injected/modules/messaging.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '2910'}, {'name': 'HTML', 'bytes': '14013'}, {'name': 'JavaScript', 'bytes': '6476'}, {'name': 'TypeScript', 'bytes': '66968'}]}
<hr> <div class='container'> <div class='alert col-xs-11' style='margin-bottom:10px;border:1px solid #c0c0c0; background:#fff; padding : 20px;color:#5d5d5d;'> <div class='row'> <div class='col-xs-3'><br> <img src="<?= base_url()?>assets/theme/main/images/1247-VPS-Forex.jpg" width='100%'/> </div> <div class='col-xs-9' style=''> <strong>FOREX VPS</strong><br><br> <p style='text-align:justify;'>A VPS stands for Virtual Private Server. As the name implies it is your own private server which is hosted in the cloud/on the Internet. Like any server it is always on 24/7 and constantly online. Think of your VPS as a personal computer that you rent on a monthly basis. This computer is located within our datacentre based in the UK. You then access your computer through the internet and install your MT4 terminals so they run 24hrs per day.</p> <a href='#' class='btn btn-success pull-right' style='background:green' style="-webkit-box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75); box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75);"><i class='fa fa-cart-plus'></i> Order Now</a> </div> </div> </div> <div class='alert col-xs-11' style='margin-bottom:10px;border:1px solid #c0c0c0; background:#fff; padding : 20px; color:#5d5d5d;'> <div class='row'> <div class='col-xs-3'><br> <img src="<?= base_url()?>assets/theme/main/images/autotrading.jpg" width='100%'/> </div> <div class='col-xs-9'> <strong>EA (Automatic Trading)</strong><br><br> <p style='text-align:justify;'>Expert Advisor is often called Forex Robot can do some trades executed automatically and relatively faster than humans because it is very convenient facility for traders who had other activities besides Trading Forex because it is not time-consuming and very suitable for traders who want the ease of trading. Traders do not have to monitor the movement of forex (foreign exchange) nonstop like what traders generally done using a manual system. Expert Advisors (Robot Forex) can take over the conduct of open trade, close profitable positions, cut loss, or money management.</p> <a href='#' class='btn btn-success pull-right' style='background:green' style="-webkit-box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75); box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75);"><i class='fa fa-cart-plus'></i> Order Now</a> </div> </div> </div> <div class='alert col-xs-11' style='margin-bottom:10px;border:1px solid #c0c0c0; background:#fff; padding : 20px; color:#5d5d5d;'> <div class='row'> <div class='col-xs-3'> <br> <img src="<?= base_url()?>assets/theme/main/images/training2.jpeg" width='100%'/> </div> <div class='col-xs-9'> <strong>EDUCATION</strong><br><br> <p style='text-align:justify;'>Welcome to the Voltus FX Education Centre. Here at the Forex education centre our aim is to teach you in simple terms about the forex market. From understanding the underlying reason as to why the Forex market exists to basic strategies that are the foundations of understanding the dynamics of the Forex market.</p> <a href='#' class='btn btn-success pull-right' style='background:green' style="-webkit-box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75); -moz-box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75); box-shadow: 0px 0px 12px 2px rgba(50, 50, 50, 0.75);"><i class='fa fa-cart-plus'></i> Order Now</a> </div> </div> </div> </div>
{'content_hash': 'b36c87e14786fd6c6987ee8fe2fa1cfb', 'timestamp': '', 'source': 'github', 'line_count': 55, 'max_line_length': 610, 'avg_line_length': 63.50909090909091, 'alnum_prop': 0.7094188376753507, 'repo_name': 'anggakes/voltusfx', 'id': '6aa20a92c3958fd1546d5d80f3e37d5362cd00eb', 'size': '3493', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'application/views/site/product.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ActionScript', 'bytes': '15982'}, {'name': 'ApacheConf', 'bytes': '1231'}, {'name': 'CSS', 'bytes': '303996'}, {'name': 'HTML', 'bytes': '7089490'}, {'name': 'JavaScript', 'bytes': '2021774'}, {'name': 'PHP', 'bytes': '2298633'}, {'name': 'Shell', 'bytes': '204'}]}