text
stringlengths 4
5.48M
| meta
stringlengths 14
6.54k
|
---|---|
package org.starapp.rbac.service;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Sort;
import org.springframework.data.domain.Sort.Direction;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;
import org.starapp.core.persistence.DynamicSpecifications;
import org.starapp.core.persistence.SearchFilter;
import org.starapp.rbac.dao.RolesDao;
import org.starapp.rbac.entity.Roles;
/**
* @author wangqiang@cisoft.com.cn
*
*/
//Spring Bean的标识.
@Component
// 默认将类中的所有public函数纳入事务管理.
@Transactional(readOnly = true)
public class RolesService {
private RolesDao rolesDao;
@Autowired
public void setRolesDao(RolesDao rolesDao) {
this.rolesDao = rolesDao;
}
public Roles getRoles(String roleId) {
return rolesDao.findOne(roleId);
}
@Transactional(readOnly = false)
public void deleteRoles(String roleId) {
rolesDao.delete(rolesDao.findOne(roleId));
}
@Transactional(readOnly = false)
public void saveRoles(Roles entity) {
rolesDao.save(entity);
}
public List<Roles> getAllRoles() {
return (List<Roles>) rolesDao.findAll();
}
public Page<Roles> getRolesList(Map<String, Object> searchParams, int pageNumber, int pageSize,
String sortType) {
PageRequest pageRequest = buildPageRequest(pageNumber, pageSize, sortType);
Specification<Roles> spec = buildSpecification(searchParams);
return rolesDao.findAll(spec, pageRequest);
}
/**
* 创建分页请求.
*/
private PageRequest buildPageRequest(int pageNumber, int pagzSize, String sortType) {
Sort sort = null;
// if ("auto".equals(sortType)) {
// sort = new Sort(Direction.DESC, "");
// } else if ("title".equals(sortType)) {
// sort = new Sort(Direction.ASC, "");
// }
return new PageRequest(pageNumber - 1, pagzSize, sort);
}
/**
* 创建动态查询条件组合.
*/
private Specification<Roles> buildSpecification(Map<String, Object> searchParams) {
Map<String, SearchFilter> filters = SearchFilter.parse(searchParams);
Specification<Roles> spec = DynamicSpecifications.bySearchFilter(filters.values(), Roles.class);
return spec;
}
}
| {'content_hash': '89bc13d83b7b8eece07f6c1b450a80a0', 'timestamp': '', 'source': 'github', 'line_count': 85, 'max_line_length': 98, 'avg_line_length': 27.6, 'alnum_prop': 0.7583120204603581, 'repo_name': 'cisoft8341/starapp', 'id': '1c36394583c1278783e66093f52856effc9d7e0a', 'size': '2416', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'starapp-webapp/src/main/java/org/starapp/rbac/service/RolesService.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '984'}, {'name': 'CSS', 'bytes': '910'}, {'name': 'HTML', 'bytes': '6198'}, {'name': 'Java', 'bytes': '507093'}, {'name': 'JavaScript', 'bytes': '2410'}]} |
layout: model
title: Detect Normalized Genes and Human Phenotypes (biobert)
author: John Snow Labs
name: ner_human_phenotype_go_biobert
date: 2021-04-01
tags: [ner, clinical, licensed, en]
task: Named Entity Recognition
language: en
edition: Healthcare NLP 3.0.0
spark_version: 3.0
supported: true
annotator: MedicalNerModel
article_header:
type: cover
use_language_switcher: "Python-Scala-Java"
---
## Description
This model can be used to detect normalized mentions of genes (go) and human phenotypes (hp) in medical text.
## Predicted Entities
`HP`, `GO`
{:.btn-box}
[Live Demo](https://demo.johnsnowlabs.com/healthcare/NER_HUMAN_PHENOTYPE_GO_CLINICAL/){:.button.button-orange}
[Open in Colab](https://colab.research.google.com/github/JohnSnowLabs/spark-nlp-workshop/blob/master/tutorials/Certification_Trainings/Healthcare/1.Clinical_Named_Entity_Recognition_Model.ipynb){:.button.button-orange.button-orange-trans.co.button-icon}
[Download](https://s3.amazonaws.com/auxdata.johnsnowlabs.com/clinical/models/ner_human_phenotype_go_biobert_en_3.0.0_3.0_1617260627136.zip){:.button.button-orange.button-orange-trans.arr.button-icon}
## How to use
<div class="tabs-box" markdown="1">
{% include programmingLanguageSelectScalaPythonNLU.html %}
```python
document_assembler = DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("document")
sentence_detector = SentenceDetector()\
.setInputCols(["document"])\
.setOutputCol("sentence")
tokenizer = Tokenizer()\
.setInputCols(["sentence"])\
.setOutputCol("token")
embeddings_clinical = BertEmbeddings.pretrained("biobert_pubmed_base_cased")\
.setInputCols(["sentence", "token"])\
.setOutputCol("embeddings")
clinical_ner = MedicalNerModel.pretrained("ner_human_phenotype_go_biobert", "en", "clinical/models")\
.setInputCols(["sentence", "token", "embeddings"])\
.setOutputCol("ner")
ner_converter = NerConverter()\
.setInputCols(["sentence", "token", "ner"])\
.setOutputCol("ner_chunk")
nlpPipeline = Pipeline(stages=[document_assembler, sentence_detector, tokenizer, embeddings_clinical, clinical_ner, ner_converter])
model = nlpPipeline.fit(spark.createDataFrame([[""]]).toDF("text"))
results = model.transform(spark.createDataFrame([["EXAMPLE_TEXT"]]).toDF("text"))
```
```scala
val document_assembler = new DocumentAssembler()
.setInputCol("text")
.setOutputCol("document")
val sentence_detector = new SentenceDetector()
.setInputCols("document")
.setOutputCol("sentence")
val tokenizer = new Tokenizer()
.setInputCols("sentence")
.setOutputCol("token")
val embeddings_clinical = BertEmbeddings.pretrained("biobert_pubmed_base_cased")
.setInputCols(Array("sentence", "token"))
.setOutputCol("embeddings")
val ner = MedicalNerModel.pretrained("ner_human_phenotype_go_biobert", "en", "clinical/models")
.setInputCols(Array("sentence", "token", "embeddings"))
.setOutputCol("ner")
val ner_converter = new NerConverter()
.setInputCols(Array("sentence", "token", "ner"))
.setOutputCol("ner_chunk")
val pipeline = new Pipeline().setStages(Array(document_assembler, sentence_detector, tokenizer, embeddings_clinical, ner, ner_converter))
val result = pipeline.fit(data).transform(data)
```
{:.nlu-block}
```python
import nlu
nlu.load("en.med_ner.human_phenotype.go_biobert").predict("""Put your text here.""")
```
</div>
{:.model-param}
## Model Information
{:.table-model}
|---|---|
|Model Name:|ner_human_phenotype_go_biobert|
|Compatibility:|Healthcare NLP 3.0.0+|
|License:|Licensed|
|Edition:|Official|
|Input Labels:|[sentence, token, embeddings]|
|Output Labels:|[ner]|
|Language:|en|
## Benchmarking
```bash
entity tp fp fn total precision recall f1
GO 7637.0 579.0 441.0 8078.0 0.9295 0.9454 0.9374
HP 1463.0 273.0 222.0 1685.0 0.8427 0.8682 0.8553
macro - - - - - - 0.89635
micro - - - - - - 0.92323
```
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTk4MTI4ODMwN119
--> | {'content_hash': 'f17e66a4d185f43a48997755895fcd69', 'timestamp': '', 'source': 'github', 'line_count': 140, 'max_line_length': 253, 'avg_line_length': 29.34285714285714, 'alnum_prop': 0.697176241480039, 'repo_name': 'JohnSnowLabs/spark-nlp', 'id': 'd54a3cc0c88d841a0ccab35ae22e32fa91387dde', 'size': '4112', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docs/_posts/HashamUlHaq/2021-04-01-ner_human_phenotype_go_biobert_en.md', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '14452'}, {'name': 'Java', 'bytes': '223289'}, {'name': 'Makefile', 'bytes': '819'}, {'name': 'Python', 'bytes': '1694517'}, {'name': 'Scala', 'bytes': '4116435'}, {'name': 'Shell', 'bytes': '5286'}]} |
COOP_FOUNTAIN_ID = 1
COOP_FOUNTAIN_SLUG = "coop-fountain" | {'content_hash': '97ca3edc20480bfa90a1701054ade4e0', 'timestamp': '', 'source': 'github', 'line_count': 2, 'max_line_length': 36, 'avg_line_length': 28.5, 'alnum_prop': 0.7543859649122807, 'repo_name': 'theworldbright/mainsite', 'id': '0241d5b0f13d908e91c714e266db4f6f753df11d', 'size': '57', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'aspc/eatshop/config.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '95997'}, {'name': 'HTML', 'bytes': '117509'}, {'name': 'JavaScript', 'bytes': '137247'}, {'name': 'Python', 'bytes': '362986'}, {'name': 'Shell', 'bytes': '7511'}]} |
package dk.statsbiblioteket.doms.transformers.common;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
/**
* Read UUIDs from file using simple readline.
*/
public class TrivialUuidFileReader implements UuidFileReader {
@Override
public List<String> readUuids(File file) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(file));
return readUuids(reader);
}
public List<String> readUuids(BufferedReader reader) throws IOException {
List<String> uuids = new ArrayList<String>();
String line;
while ((line = reader.readLine()) != null) {
if( !line.isEmpty()) {
uuids.add(line);
}
}
return uuids;
}
}
| {'content_hash': '2865054d55ad3d3bb6a739d78470fa29', 'timestamp': '', 'source': 'github', 'line_count': 30, 'max_line_length': 77, 'avg_line_length': 28.5, 'alnum_prop': 0.664327485380117, 'repo_name': 'statsbiblioteket/doms-transformers', 'id': '862a4ac80951efab113f008549afe310bf20eb78', 'size': '855', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'common/src/main/java/dk/statsbiblioteket/doms/transformers/common/TrivialUuidFileReader.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Java', 'bytes': '202449'}, {'name': 'Python', 'bytes': '1832'}, {'name': 'Shell', 'bytes': '6910'}, {'name': 'XSLT', 'bytes': '12318'}]} |
var LocalStrategy = require('passport-local').Strategy;
module.exports = function(passport) {
passport.serializeUser(function(user, next) {
next(null, user);
});
passport.deserializeUser(function(user, next){
next(null, user);
});
passport.use('login',
new LocalStrategy({ passReqToCallback : true },
function(req, username, password, next) {
req.db.query("SELECT * from users WHERE username='"+username+"' AND password='"+password+"'",
function(err, result) {
if (err) {
return next(err);
} else {
if (result.rows.length != 0) {
req.session.userdata = result.rows;
return next(null, result.rows);
} else {
return next(null, false);
}
}
});
})
);
passport.use('register',
new LocalStrategy({ passReqToCallback : true },
function(req, username, password, next) {
req.db.query("INSERT INTO users (username, password) VALUES ('"+username+"','"+password+"')",
function(err, result) {
if (result.rows.length != 0) {
return next(err);
} else {
return next(null, 'ok');
}
}
)}
));
}
| {'content_hash': '193264c224a90af979cb88944804d8a7', 'timestamp': '', 'source': 'github', 'line_count': 44, 'max_line_length': 106, 'avg_line_length': 37.45454545454545, 'alnum_prop': 0.40898058252427183, 'repo_name': 'Hebbian/authpg', 'id': '0a64afbeefc1b07f0e6ead689951f9106de4b7fd', 'size': '1648', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'passport/index.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '110'}, {'name': 'HTML', 'bytes': '974'}, {'name': 'JavaScript', 'bytes': '7017'}]} |
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context="dwai.arit.ProfileActivity" >
</menu>
| {'content_hash': 'c0dbef2d83c35d048b96c714bb8fa096', 'timestamp': '', 'source': 'github', 'line_count': 5, 'max_line_length': 64, 'avg_line_length': 34.6, 'alnum_prop': 0.7225433526011561, 'repo_name': 'rit-assassins/mobileapp', 'id': 'a963dab19e7631892dc27fd4d00080c45b9fc332', 'size': '173', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'arit/app/src/main/res/menu/profile.xml', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Groovy', 'bytes': '1557'}, {'name': 'Java', 'bytes': '1207790'}]} |
#include <tuple>
#include "include/core/SkCanvas.h"
#include "include/core/SkRect.h"
#include "modules/svg/include/SkSVGRect.h"
#include "modules/svg/include/SkSVGRenderContext.h"
#include "modules/svg/include/SkSVGValue.h"
SkSVGRect::SkSVGRect() : INHERITED(SkSVGTag::kRect) {}
bool SkSVGRect::parseAndSetAttribute(const char* n, const char* v) {
return INHERITED::parseAndSetAttribute(n, v) ||
this->setX(SkSVGAttributeParser::parse<SkSVGLength>("x", n, v)) ||
this->setY(SkSVGAttributeParser::parse<SkSVGLength>("y", n, v)) ||
this->setWidth(SkSVGAttributeParser::parse<SkSVGLength>("width", n, v)) ||
this->setHeight(SkSVGAttributeParser::parse<SkSVGLength>("height", n, v)) ||
this->setRx(SkSVGAttributeParser::parse<SkSVGLength>("rx", n, v)) ||
this->setRy(SkSVGAttributeParser::parse<SkSVGLength>("ry", n, v));
}
SkRRect SkSVGRect::resolve(const SkSVGLengthContext& lctx) const {
const auto rect = lctx.resolveRect(fX, fY, fWidth, fHeight);
// https://www.w3.org/TR/SVG11/shapes.html#RectElementRXAttribute:
//
// - Let rx and ry be length values.
// - If neither ‘rx’ nor ‘ry’ are properly specified, then set both rx and ry to 0.
// - Otherwise, if a properly specified value is provided for ‘rx’, but not for ‘ry’,
// then set both rx and ry to the value of ‘rx’.
// - Otherwise, if a properly specified value is provided for ‘ry’, but not for ‘rx’,
// then set both rx and ry to the value of ‘ry’.
// - Otherwise, both ‘rx’ and ‘ry’ were specified properly. Set rx to the value of ‘rx’
// and ry to the value of ‘ry’.
// - If rx is greater than half of ‘width’, then set rx to half of ‘width’.
// - If ry is greater than half of ‘height’, then set ry to half of ‘height’.
// - The effective values of ‘rx’ and ‘ry’ are rx and ry, respectively.
//
auto radii = [this]() {
return fRx.isValid()
? fRy.isValid()
? std::make_tuple(*fRx, *fRy)
: std::make_tuple(*fRx, *fRx)
: fRy.isValid()
? std::make_tuple(*fRy, *fRy)
: std::make_tuple(SkSVGLength(0), SkSVGLength(0));
};
const auto [ rxlen, rylen ] = radii();
const auto rx = std::min(lctx.resolve(rxlen, SkSVGLengthContext::LengthType::kHorizontal),
rect.width() / 2),
ry = std::min(lctx.resolve(rylen, SkSVGLengthContext::LengthType::kVertical),
rect.height() / 2);
return SkRRect::MakeRectXY(rect, rx, ry);
}
void SkSVGRect::onDraw(SkCanvas* canvas, const SkSVGLengthContext& lctx,
const SkPaint& paint, SkPathFillType) const {
canvas->drawRRect(this->resolve(lctx), paint);
}
SkPath SkSVGRect::onAsPath(const SkSVGRenderContext& ctx) const {
SkPath path = SkPath::RRect(this->resolve(ctx.lengthContext()));
this->mapToParent(&path);
return path;
}
SkRect SkSVGRect::onObjectBoundingBox(const SkSVGRenderContext& ctx) const {
return ctx.lengthContext().resolveRect(fX, fY, fWidth, fHeight);
}
| {'content_hash': '3f4dd5946a772deea1e59ae36e98d696', 'timestamp': '', 'source': 'github', 'line_count': 74, 'max_line_length': 94, 'avg_line_length': 43.0, 'alnum_prop': 0.6228786926461345, 'repo_name': 'aosp-mirror/platform_external_skia', 'id': '0131e1e4f9eeddc26115b71b11a8df33ca1f6773', 'size': '3397', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'modules/svg/src/SkSVGRect.cpp', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Assembly', 'bytes': '12716940'}, {'name': 'Batchfile', 'bytes': '904'}, {'name': 'C', 'bytes': '620774'}, {'name': 'C#', 'bytes': '4683'}, {'name': 'C++', 'bytes': '27394853'}, {'name': 'GLSL', 'bytes': '67013'}, {'name': 'Go', 'bytes': '80137'}, {'name': 'HTML', 'bytes': '1002516'}, {'name': 'Java', 'bytes': '32794'}, {'name': 'JavaScript', 'bytes': '51666'}, {'name': 'Lex', 'bytes': '4372'}, {'name': 'Lua', 'bytes': '70974'}, {'name': 'Makefile', 'bytes': '2295'}, {'name': 'Objective-C', 'bytes': '35223'}, {'name': 'Objective-C++', 'bytes': '34410'}, {'name': 'PHP', 'bytes': '120845'}, {'name': 'Python', 'bytes': '1002226'}, {'name': 'Shell', 'bytes': '49974'}]} |
package intermediate;
public interface TypeKey {
}
| {'content_hash': '7dddbced6fee11350f1453790663f690', 'timestamp': '', 'source': 'github', 'line_count': 4, 'max_line_length': 26, 'avg_line_length': 13.0, 'alnum_prop': 0.7884615384615384, 'repo_name': 'matija94/show-me-the-code', 'id': 'ce9d98f5fcdd0f97d870b8aabb17ac0281c0b692', 'size': '52', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'pascal-compiler-interpreter/src/intermediate/TypeKey.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '360945'}, {'name': 'Batchfile', 'bytes': '5439'}, {'name': 'CSS', 'bytes': '1535'}, {'name': 'Clojure', 'bytes': '26019'}, {'name': 'Dockerfile', 'bytes': '120'}, {'name': 'HTML', 'bytes': '60877'}, {'name': 'Hack', 'bytes': '1680'}, {'name': 'Java', 'bytes': '1094411'}, {'name': 'JavaScript', 'bytes': '21619'}, {'name': 'Jupyter Notebook', 'bytes': '1339056'}, {'name': 'Kotlin', 'bytes': '3918'}, {'name': 'Pascal', 'bytes': '1125'}, {'name': 'Python', 'bytes': '291744'}, {'name': 'Scala', 'bytes': '161887'}, {'name': 'Scilab', 'bytes': '129306'}, {'name': 'Shell', 'bytes': '8449'}, {'name': 'XSLT', 'bytes': '3508'}]} |
//package tt.service.bussiness.impl;
//
//import org.junit.After;
//import org.junit.Before;
//import org.junit.Test;
//import org.junit.runner.RunWith;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.test.context.ContextConfiguration;
//import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
//import tt.model.business.Area;
//import tt.service.bussiness.AreaServiceI;
//
///**
// * Created by tt on 2016/9/29.
// */
//@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = { "classpath:spring.xml", "classpath:spring-ehcache.xml",
// "classpath:spring-hibernate.xml", "classpath:spring-druid.xml", "classpath:spring-tasks.xml" })
//public class AreaServiceImplTest {
// @Autowired
// private AreaServiceI areaServiceI;
// @Before
// public void setUp() throws Exception {
//
// }
//
// @After
// public void tearDown() throws Exception {
//
// }
//
// @Test
// public void load() throws Exception {
// Area area = areaServiceI.load(1);
// if(area!=null){
// System.out.println(area.getText());
// if(area.getChildren()!=null&&area.getChildren().size()>0){
// area.getChildren().stream().forEach((item)-> System.out.println(" "+item.getText()));
// }
// }
// }
//
// @Test
// public void add() throws Exception {
// Area area = new Area();
// area.setText("全国");
// area.setLevel((byte)0);
// areaServiceI.add(area);
//
// Area hebei = new Area();
// hebei.setText("河北");
// hebei.setLevel((byte) (area.getLevel()+1));
// hebei.setParent(area);
// areaServiceI.add(hebei);
//
// }
//
// @Test
// public void update() throws Exception {
// Area area = areaServiceI.load(1);
// Area hebei = new Area();
// hebei.setText("河北");
// hebei.setLevel((byte) (area.getLevel()+1));
// hebei.setParent(area);
// areaServiceI.add(hebei);
// }
//
// @Test
// public void del() throws Exception {
// areaServiceI.del(4);
// }
//
//} | {'content_hash': '15a93f4f72e228a0c77db8412c460bf0', 'timestamp': '', 'source': 'github', 'line_count': 73, 'max_line_length': 105, 'avg_line_length': 29.465753424657535, 'alnum_prop': 0.5983263598326359, 'repo_name': 'luopotaotao/staticLoad', 'id': '58b5ccf7bbbc775e20eccebb8e3aafb4e308b77b', 'size': '2163', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/test/java/tt/service/bussiness/impl/AreaServiceImplTest.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '709716'}, {'name': 'HTML', 'bytes': '7298'}, {'name': 'Java', 'bytes': '1138916'}, {'name': 'JavaScript', 'bytes': '1657690'}, {'name': 'PLpgSQL', 'bytes': '38094'}, {'name': 'TSQL', 'bytes': '342666'}]} |
package geek.lawsof.physics.init
import geek.lawsof.physics.LawsOfPhysicsMod
import net.minecraft.command.ICommand
/**
* Created by anshuman on 22-07-2014.
*/
object ModCommands {
def registerCommand(command: ICommand) = LawsOfPhysicsMod.serverStartEvt.registerServerCommand(command)
def serverLoad() = {}
}
| {'content_hash': '69ccc3e1d7e7f6924070c1d43bbc88a8', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 105, 'avg_line_length': 24.384615384615383, 'alnum_prop': 0.7823343848580442, 'repo_name': 'GeckoTheGeek42/TheLawsOfPhysics', 'id': '4c10732ff2d812f07b31185e25926f851dfd9b70', 'size': '317', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/main/scala/geek/lawsof/physics/init/ModCommands.scala', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Groovy', 'bytes': '3458'}, {'name': 'Java', 'bytes': '347'}, {'name': 'Scala', 'bytes': '94411'}, {'name': 'Shell', 'bytes': '79'}]} |
<readable><title>2436398074_8737f40869</title><content>
A black dog bites at a stream of water on the grass .
A black dog is being squirted with a jet of water .
A dog drinks from a sprinkler .
A dog drinks water outside on the grass .
The dog tries to bite the water coming out of the sprinkler .
</content></readable> | {'content_hash': 'ce8ab8db8d580ce1ec331160be8d98e8', 'timestamp': '', 'source': 'github', 'line_count': 7, 'max_line_length': 61, 'avg_line_length': 45.57142857142857, 'alnum_prop': 0.7617554858934169, 'repo_name': 'kevint2u/audio-collector', 'id': 'bb5d902c350cc35037f74250cb75182e622a21a2', 'size': '319', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'captions/xml/2436398074_8737f40869.xml', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1015'}, {'name': 'HTML', 'bytes': '18349'}, {'name': 'JavaScript', 'bytes': '109819'}, {'name': 'Python', 'bytes': '3260'}, {'name': 'Shell', 'bytes': '4319'}]} |
from __future__ import division
from __future__ import unicode_literals
from builtins import zip
from builtins import range
from past.utils import old_div
from django.db.models import Q
from django.contrib.contenttypes.models import ContentType
from isisdata.models import *
from zotero.models import *
import difflib
from collections import Counter, defaultdict
import regex
def argsort(seq):
seq = list(seq)
return sorted(list(range(len(seq))), key=seq.__getitem__)
def aggregate_hits(hits):
"""
Combine individual hits into a condensed set of suggestions and reasons.
"""
uniqueHits = Counter()
uniqueReasons = defaultdict(list)
for hit, basis, value, match in hits:
uniqueHits[hit] += match
uniqueReasons[hit].append((basis, value))
for key, value in list(uniqueHits.items()):
uniqueHits[key] = old_div(value,float(len(uniqueReasons[key])))
return [{
'id': list(uniqueHits.keys())[k],
'match': uniqueHits[list(uniqueHits.keys())[k]],
'reasons': uniqueReasons[list(uniqueHits.keys())[k]]
} for k in argsort(list(uniqueHits.values()))[::-1]]
def suggest_by_attributes(draftObject):
hits = []
for attribute in draftObject.attributes.all():
attrTypes = AttributeType.objects.filter(name__icontains=attribute.name)
for attrType in attrTypes:
exact_match = attrType.attribute_set.filter(value__value=attribute.value)
hits += [(attr.subject_instance_id, 'Attribute', attr.id, 1.0) for attr in exact_match]
return hits
def suggest_authority_by_resolutions(draftAuthority):
"""
Suggest production :class:`isisdata.Authority` instances for a
:class:`zotero.DraftAuthority` based on prior
:class:`zotero.InstanceResolutionEvent`\s.
"""
hits = []
# Find similar DraftAuthority instances.
fuzzy_names = Q(name_for_sort__icontains=draftAuthority.name) | Q(name_for_sort__in=draftAuthority.name)
for v in draftAuthority.name.split(' '): # Look at parts of the name.
if len(v) > 2:
# startswith is about as broad as we can go without getting flooded
# by extraneous results.
fuzzy_names |= Q(name_for_sort__istartswith=v)
queryset = DraftAuthority.objects.filter(processed=True).filter(fuzzy_names)
resolutions = defaultdict(list)
for resolvedAuthority in queryset:
# Just in case we marked this DraftAuthority resolved without creating
# a corresponding InstanceResolutionEvent.
if resolvedAuthority.resolutions.count() == 0:
continue
# SequenceMatcher.quick_ratio gives us a rough indication of the
# similarity between the two authority names.
match = difflib.SequenceMatcher(None, draftAuthority.name,
resolvedAuthority.name).quick_ratio()
if match > 0.6: # This is an arbitrary threshold.
resolution = resolvedAuthority.resolutions.first()
resolutions[resolution.to_instance.id].append((resolvedAuthority.name, match))
if len(resolutions) == 0:
return []
N = sum([len(instances) for instances in list(resolutions.values())])
N_matches = {}
scores = {}
for resolution_target, instances in list(resolutions.items()):
N_instances = float(len(instances))
N_matches[resolution_target] = N_instances
scores[resolution_target] = old_div(sum(zip(*instances)[1]),N_instances)
max_matches = max(N_matches.values())
for resolution_target, score in list(scores.items()):
score_normed = score * N_matches[resolution_target]/max_matches
hits.append((resolution_target, 'Resolution', 'name', score_normed))
return hits
def suggest_by_linkeddata(draftObject):
"""
Attempt to match an object based on associated linkeddata values.
"""
hits = []
for linkeddata in draftObject.linkeddata.all():
ldTypes = LinkedDataType.objects.filter(name__icontains=linkeddata.name)
for ldType in ldTypes:
exact_match = ldType.linkeddata_set.filter(universal_resource_name__icontains=linkeddata.value)
hits += [(ldatum.subject_instance_id, 'LinkedData', ldatum.id, 1.0) for ldatum in exact_match]
inexact_match = LinkedData.objects.filter(
Q(universal_resource_name__icontains=linkeddata.value) |
Q(universal_resource_name__in=linkeddata.value))
if inexact_match.count() <= 10:
for ldatum in inexact_match:
match = difflib.SequenceMatcher(None, ldatum.universal_resource_name, linkeddata.value).quick_ratio()
if match > 0.6:
hits.append((ldatum.subject_instance_id, 'LinkedData', ldatum.id, match))
return hits
def suggest_by_field(draftObject, field, targetModel, targetField, scramble=False):
"""
Attempt to match an object based on an arbitrary field.
"""
hits = []
value = getattr(draftObject, field)
# double check
def remove_punctuation(text):
return regex.sub("\p{P}+", "", text)
if isinstance(value, str) or isinstance(value, str):
value = remove_punctuation(value)
q = Q()
q |= Q(**{'{0}__icontains'.format(targetField): value})
q |= Q(**{'{0}__in'.format(targetField): value})
if scramble:
for v in value.split(' '):
if len(v) > 2:
q |= Q(**{'{0}__istartswith'.format(targetField): v})
inexact_match = targetModel.objects.filter(q)
for obj in inexact_match:
targetValue = getattr(obj, targetField)
match = difflib.SequenceMatcher(None, value, targetValue).quick_ratio()
if match > 0.6:
hits.append((obj.id, 'field', targetField, match))
return hits
def suggest_citation(draftCitation):
hits = []
hits += suggest_by_linkeddata(draftCitation)
hits += suggest_by_field(draftCitation, 'title', Citation, 'title')
return aggregate_hits(hits)
def suggest_authority(draftAuthority):
hits = []
hits += suggest_by_linkeddata(draftAuthority)
hits += suggest_authority_by_resolutions(draftAuthority)
# hits += suggest_by_attributes(draftAuthority)
hits += suggest_by_field(draftAuthority, 'name', Authority, 'name_for_sort', scramble=True)
return aggregate_hits(hits)
# def suggest_citations(queryset):
# for obj in queryset:
# print suggest_citation(obj)
#
#
# def suggest_authorities(queryset):
# for obj in queryset:
# print suggest_authority(obj)
| {'content_hash': '739f3a02f5ac9c76ac0b69d7dd672e22', 'timestamp': '', 'source': 'github', 'line_count': 185, 'max_line_length': 117, 'avg_line_length': 35.76756756756757, 'alnum_prop': 0.6557352274444612, 'repo_name': 'upconsulting/IsisCB', 'id': '9162b11305fa114d2fe9d4a351bc1f35ca1370c9', 'size': '6617', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'isiscb/zotero/suggest.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '34013'}, {'name': 'Dockerfile', 'bytes': '420'}, {'name': 'HTML', 'bytes': '1182137'}, {'name': 'JavaScript', 'bytes': '221954'}, {'name': 'Less', 'bytes': '67102'}, {'name': 'Procfile', 'bytes': '88'}, {'name': 'Python', 'bytes': '1758838'}, {'name': 'Roff', 'bytes': '285'}, {'name': 'SCSS', 'bytes': '67969'}, {'name': 'Shell', 'bytes': '12632'}]} |
package org.apache.struts2.convention;
import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.config.ConfigurationException;
import com.opensymphony.xwork2.config.entities.PackageConfig;
import com.opensymphony.xwork2.config.entities.ResultConfig;
import com.opensymphony.xwork2.config.entities.ResultTypeConfig;
import com.opensymphony.xwork2.inject.Container;
import com.opensymphony.xwork2.inject.Inject;
import com.opensymphony.xwork2.util.TextParseUtil;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterface;
import com.opensymphony.xwork2.util.finder.ClassLoaderInterfaceDelegate;
import com.opensymphony.xwork2.util.finder.ResourceFinder;
import com.opensymphony.xwork2.util.finder.Test;
import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.ObjectUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.apache.struts2.convention.annotation.Result;
import org.apache.struts2.convention.annotation.Results;
import javax.servlet.ServletContext;
import java.io.IOException;
import java.net.URL;
import java.util.*;
/**
* <p>
* This class implements the ResultMapBuilder and traverses the web
* application content directory looking for reasonably named JSPs and
* other result types as well as annotations. This naming is in this
* form:
* </p>
*
* <pre>
* /resultPath/namespace/action-<result>.jsp
* </pre>
*
* <p>
* If there are any files in these locations than a result is created
* for each one and the result names is the last portion of the file
* name up to the . (dot).
* </p>
*
* <p>
* When results are found, new ResultConfig instances are created. The
* result config that is created has a number of thing to be aware of:
* </p>
*
* <ul>
* <li>The result config contains the location parameter, which is
* required by most result classes to figure out where to find the result.
* In addition, the config has all the parameters from the default result-type
* configuration.</li>
* </ul>
*
* <p>
* After loading the files in the web application, this class will then
* use any annotations on the action class to override what was found in
* the web application files. These annotations are the {@link Result}
* and {@link Results} annotations. These two annotations allow an action
* to supply different or non-forward based results for specific return
* values of an action method.
* </p>
*
* <p>
* The result path used by this class for locating JSPs and other
* such result files can be set using the Struts2 constant named
* <strong>struts.convention.result.path</strong> or using the
* {@link org.apache.struts2.convention.annotation.ResultPath}
* annotation.
* </p>
*
* <p>
* This class will also locate and configure Results in the classpath,
* including velocity and FreeMarker templates inside the classpath.
* </p>
*
* <p>
* All results that are configured from resources are given a type corresponding
* to the resources extension. The extensions and types are given in the
* table below:
* </p>
*
* <table summary="">
* <tr><th>Extension</th><th>Type</th></tr>
* <tr><td>.jsp</td><td>dispatcher</td></tr>
* <tr><td>.jspx</td><td>dispatcher</td></tr>
* <tr><td>.html</td><td>dispatcher</td></tr>
* <tr><td>.htm</td><td>dispatcher</td></tr>
* <tr><td>.vm</td><td>velocity</td></tr>
* <tr><td>.ftl</td><td>freemarker</td></tr>
* </table>
*/
public class DefaultResultMapBuilder implements ResultMapBuilder {
private static final Logger LOG = LogManager.getLogger(DefaultResultMapBuilder.class);
private final ServletContext servletContext;
private Set<String> relativeResultTypes;
private ConventionsService conventionsService;
private boolean flatResultLayout = true;
/**
* Constructs the SimpleResultMapBuilder using the given result location.
*
* @param servletContext The ServletContext for finding the resources of the web application.
* @param container The Xwork container
* @param relativeResultTypes The list of result types that can have locations that are relative
* and the result location (which is the resultPath plus the namespace) prepended to them.
*/
@Inject
public DefaultResultMapBuilder(ServletContext servletContext, Container container,
@Inject("struts.convention.relative.result.types") String relativeResultTypes) {
this.servletContext = servletContext;
this.relativeResultTypes = new HashSet<>(Arrays.asList(relativeResultTypes.split("\\s*[,]\\s*")));
this.conventionsService = container.getInstance(ConventionsService.class, container.getInstance(String.class, ConventionConstants.CONVENTION_CONVENTIONS_SERVICE));
}
/**
* @param flatResultLayout If 'true' result resources will be expected to be in the form
* ${namespace}/${actionName}-${result}.${extension}, otherwise in the form
* ${namespace}/${actionName}/${result}.${extension}
*/
@Inject("struts.convention.result.flatLayout")
public void setFlatResultLayout(String flatResultLayout) {
this.flatResultLayout = BooleanUtils.toBoolean(flatResultLayout);
}
/**
* {@inheritDoc}
*/
public Map<String, ResultConfig> build(Class<?> actionClass,
org.apache.struts2.convention.annotation.Action annotation, String actionName,
PackageConfig packageConfig) {
// Get the default result location from the annotation or configuration
String defaultResultPath = conventionsService.determineResultPath(actionClass);
// Add a slash
if (!defaultResultPath.endsWith("/")) {
defaultResultPath = defaultResultPath + "/";
}
// Check for resources with the action name
final String namespace = packageConfig.getNamespace();
if (namespace != null && namespace.startsWith("/")) {
defaultResultPath = defaultResultPath + namespace.substring(1);
} else if (namespace != null) {
defaultResultPath = defaultResultPath + namespace;
}
if (LOG.isTraceEnabled()) {
LOG.trace("Using final calculated namespace [{}]", namespace);
}
// Add that ending slash for concatenation
if (!defaultResultPath.endsWith("/")) {
defaultResultPath += "/";
}
String resultPrefix = defaultResultPath + actionName;
//results from files
Map<String, ResultConfig> results = new HashMap<>();
Map<String, ResultTypeConfig> resultsByExtension = conventionsService.getResultTypesByExtension(packageConfig);
createFromResources(actionClass, results, defaultResultPath, resultPrefix, actionName,
packageConfig, resultsByExtension);
//get inherited @Results and @Result (class level)
for (Class<?> clazz : ReflectionTools.getClassHierarchy(actionClass)) {
createResultsFromAnnotations(clazz, packageConfig, defaultResultPath, results, resultsByExtension);
}
//method level
if (annotation != null && annotation.results() != null && annotation.results().length > 0) {
createFromAnnotations(results, defaultResultPath, packageConfig, annotation.results(),
actionClass, resultsByExtension);
}
return results;
}
/**
* Creates results from @Results and @Result annotations
* @param actionClass class to check for annotations
* @param packageConfig packageConfig where the action will be located
* @param defaultResultPath default result path
* @param results map of results
* @param resultsByExtension map of result types keyed by extension
*/
protected void createResultsFromAnnotations(Class<?> actionClass, PackageConfig packageConfig, String defaultResultPath,
Map<String, ResultConfig> results, Map<String, ResultTypeConfig> resultsByExtension) {
Results resultsAnn = actionClass.getAnnotation(Results.class);
if (resultsAnn != null) {
createFromAnnotations(results, defaultResultPath, packageConfig, resultsAnn.value(),
actionClass, resultsByExtension);
}
Result resultAnn = actionClass.getAnnotation(Result.class);
if (resultAnn != null) {
createFromAnnotations(results, defaultResultPath, packageConfig, new Result[]{resultAnn},
actionClass, resultsByExtension);
}
}
/**
* Creates any result types from the resources available in the web application. This scans the
* web application resources using the servlet context.
*
* @param actionClass The action class the results are being built for.
* @param results The results map to put the result configs created into.
* @param resultPath The calculated path to the resources.
* @param resultPrefix The prefix for the result. This is usually <code>/resultPath/actionName</code>.
* @param actionName The action name which is used only for logging in this implementation.
* @param packageConfig The package configuration which is passed along in order to determine
* @param resultsByExtension The map of extensions to result type configuration instances.
*/
protected void createFromResources(Class<?> actionClass, Map<String, ResultConfig> results,
final String resultPath, final String resultPrefix, final String actionName,
PackageConfig packageConfig, Map<String, ResultTypeConfig> resultsByExtension) {
if (LOG.isTraceEnabled()) {
LOG.trace("Searching for results in the Servlet container at [{}]" +
" with result prefix of [#1]", resultPath, resultPrefix);
}
// Build from web application using the ServletContext
@SuppressWarnings("unchecked")
Set<String> paths = servletContext.getResourcePaths(flatResultLayout ? resultPath : resultPrefix);
if (paths != null) {
for (String path : paths) {
LOG.trace("Processing resource path [{}]", path);
String fileName = StringUtils.substringAfterLast(path, "/");
if (StringUtils.isBlank(fileName) || StringUtils.startsWith(fileName, ".")) {
LOG.trace("Ignoring file without name [{}]", path);
continue;
}
else if(fileName.lastIndexOf(".") > 0){
String suffix = fileName.substring(fileName.lastIndexOf(".")+1);
if(conventionsService.getResultTypesByExtension(packageConfig).get(suffix) == null) {
LOG.debug("No result type defined for file suffix : [{}]. Ignoring file {}", suffix, fileName);
continue;
}
}
makeResults(actionClass, path, resultPrefix, results, packageConfig, resultsByExtension);
}
}
// Building from the classpath
String classPathLocation = resultPath.startsWith("/") ?
resultPath.substring(1, resultPath.length()) : resultPath;
if (LOG.isTraceEnabled()) {
LOG.trace("Searching for results in the class path at [{}]"
+ " with a result prefix of [{}] and action name [{}]", classPathLocation, resultPrefix,
actionName);
}
ResourceFinder finder = new ResourceFinder(classPathLocation, getClassLoaderInterface());
try {
Map<String, URL> matches = finder.getResourcesMap("");
if (matches != null) {
Test<URL> resourceTest = getResourceTest(resultPath, actionName);
for (Map.Entry<String, URL> entry : matches.entrySet()) {
if (resourceTest.test(entry.getValue())) {
LOG.trace("Processing URL [{}]", entry.getKey());
String urlStr = entry.getValue().toString();
int index = urlStr.lastIndexOf(resultPrefix);
String path = urlStr.substring(index);
makeResults(actionClass, path, resultPrefix, results, packageConfig, resultsByExtension);
}
}
}
} catch (IOException ex) {
LOG.error("Unable to scan directory [{}] for results", ex, classPathLocation);
}
}
protected ClassLoaderInterface getClassLoaderInterface() {
/*
if there is a ClassLoaderInterface in the context, use it, otherwise
default to the default ClassLoaderInterface (a wrapper around the current
thread classloader)
using this, other plugins (like OSGi) can plugin their own classloader for a while
and it will be used by Convention (it cannot be a bean, as Convention is likely to be
called multiple times, and it need to use the default ClassLoaderInterface during normal startup)
*/
ClassLoaderInterface classLoaderInterface = null;
ActionContext ctx = ActionContext.getContext();
if (ctx != null)
classLoaderInterface = (ClassLoaderInterface) ctx.get(ClassLoaderInterface.CLASS_LOADER_INTERFACE);
return ObjectUtils.defaultIfNull(classLoaderInterface, new ClassLoaderInterfaceDelegate(Thread.currentThread().getContextClassLoader()));
}
private Test<URL> getResourceTest(final String resultPath, final String actionName) {
return new Test<URL>() {
public boolean test(URL url) {
String urlStr = url.toString();
int index = urlStr.lastIndexOf(resultPath);
String path = urlStr.substring(index + resultPath.length());
return path.startsWith(actionName);
}
};
}
/**
* Makes all the results for the given path.
*
* @param actionClass The action class the results are being built for.
* @param path The path to build the result for.
* @param resultPrefix The is the result prefix which is the result location plus the action name.
* This is used to determine if the path contains a result code or not.
* @param results The Map to place the result(s)
* @param packageConfig The package config the results belong to.
* @param resultsByExtension The map of extensions to result type configuration instances.
*/
protected void makeResults(Class<?> actionClass, String path, String resultPrefix,
Map<String, ResultConfig> results, PackageConfig packageConfig,
Map<String, ResultTypeConfig> resultsByExtension) {
if (path.startsWith(resultPrefix)) {
int indexOfDot = path.indexOf('.', resultPrefix.length());
// This case is when the path doesn't contain a result code
if (indexOfDot == resultPrefix.length()) {
if (LOG.isTraceEnabled()) {
LOG.trace("The result file [{}] has no result code and therefore" +
" will be associated with success, input and error by default. This might" +
" be overridden by another result file or an annotation.", path);
}
addResult(actionClass, path, results, packageConfig, resultsByExtension, Action.SUCCESS);
addResult(actionClass, path, results, packageConfig, resultsByExtension, Action.INPUT);
addResult(actionClass, path, results, packageConfig, resultsByExtension, Action.ERROR);
// This case is when the path contains a result code
} else if (indexOfDot > resultPrefix.length()) {
if (LOG.isTraceEnabled()) {
LOG.trace("The result file [{}] has a result code and therefore" +
" will be associated with only that result code.", path);
}
String resultCode = path.substring(resultPrefix.length() + 1, indexOfDot);
ResultConfig result = createResultConfig(actionClass,
new ResultInfo(resultCode, path, packageConfig, resultsByExtension),
packageConfig, null);
results.put(resultCode, result);
}
}
}
/**
* Checks if result was already assigned, if not checks global results first and if exists, adds reference to it.
* If not, creates package specific result.
*
* @param actionClass The action class the results are being built for.
* @param path The path to build the result for.
* @param results The Map to place the result(s)
* @param packageConfig The package config the results belong to.
* @param resultsByExtension The map of extensions to result type configuration instances.
* @param resultKey The result name to use
*/
protected void addResult(Class<?> actionClass, String path, Map<String, ResultConfig> results,
PackageConfig packageConfig, Map<String, ResultTypeConfig> resultsByExtension,
String resultKey) {
if (!results.containsKey(resultKey)) {
Map<String, ResultConfig> globalResults = packageConfig.getAllGlobalResults();
if (globalResults.containsKey(resultKey)) {
results.put(resultKey, globalResults.get(resultKey));
} else {
ResultConfig resultConfig = createResultConfig(actionClass,
new ResultInfo(resultKey, path, packageConfig, resultsByExtension),
packageConfig, null);
results.put(resultKey, resultConfig);
}
}
}
protected void createFromAnnotations(Map<String, ResultConfig> resultConfigs,
String resultPath, PackageConfig packageConfig, Result[] results,
Class<?> actionClass, Map<String, ResultTypeConfig> resultsByExtension) {
// Check for multiple results on the class
for (Result result : results) {
for (String name : result.name()) {
ResultConfig config = createResultConfig(actionClass, new ResultInfo(
name, result, packageConfig, resultPath, actionClass,
resultsByExtension), packageConfig, result);
if (config != null) {
resultConfigs.put(config.getName(), config);
}
}
}
}
/**
* Creates the result configuration for the single result annotation. This will use all the
* information from the annotation and anything that isn't specified will be fetched from the
* PackageConfig defaults (if they exist).
*
* @param actionClass The action class the results are being built for.
* @param info The result info that is used to create the ResultConfig instance.
* @param packageConfig The PackageConfig to use to fetch defaults for result and parameters.
* @param result (Optional) The result annotation to pull additional information from.
* @return The ResultConfig or null if the Result annotation is given and the annotation is
* targeted to some other action than this one.
*/
@SuppressWarnings(value = {"unchecked"})
protected ResultConfig createResultConfig(Class<?> actionClass, ResultInfo info,
PackageConfig packageConfig, Result result) {
// Look up by the type that was determined from the annotation or by the extension in the
// ResultInfo class
ResultTypeConfig resultTypeConfig = packageConfig.getAllResultTypeConfigs().get(info.type);
if (resultTypeConfig == null) {
throw new ConfigurationException("The Result type [" + info.type + "] which is" +
" defined in the Result annotation on the class [" + actionClass + "] or determined" +
" by the file extension or is the default result type for the PackageConfig of the" +
" action, could not be found as a result-type defined for the Struts/XWork package [" +
packageConfig.getName() + "]");
}
// Add the default parameters for the result type config (if any)
HashMap<String, String> params = new HashMap<>();
if (resultTypeConfig.getParams() != null) {
params.putAll(resultTypeConfig.getParams());
}
// Handle the annotation
if (result != null) {
params.putAll(StringTools.createParameterMap(result.params()));
}
// Map the location to the default param for the result or a param named location
if (info.location != null) {
String defaultParamName = resultTypeConfig.getDefaultResultParam();
if (!params.containsKey(defaultParamName)) {
params.put(defaultParamName, info.location);
}
}
return new ResultConfig.Builder(info.name, resultTypeConfig.getClassName()).addParams(params).build();
}
protected class ResultInfo {
public final String name;
public final String location;
public final String type;
public ResultInfo(String name, String location, PackageConfig packageConfig,
Map<String, ResultTypeConfig> resultsByExtension) {
this.name = name;
this.location = location;
this.type = determineType(location, packageConfig, resultsByExtension);
}
public ResultInfo(String name, Result result, PackageConfig packageConfig,
String resultPath, Class<?> actionClass,
Map<String, ResultTypeConfig> resultsByExtension) {
this.name = name;
if (StringUtils.isNotBlank(result.type())) {
this.type = result.type();
} else if (StringUtils.isNotBlank(result.location())) {
this.type = determineType(result.location(), packageConfig, resultsByExtension);
} else {
throw new ConfigurationException("The action class [" + actionClass + "] contains a " +
"result annotation that has no type parameter and no location parameter. One of " +
"these must be defined.");
}
// See if we can handle relative locations or not
if (StringUtils.isNotBlank(result.location())) {
if (relativeResultTypes.contains(this.type) && !result.location().startsWith("/")) {
location = resultPath + result.location();
} else {
location = result.location();
}
} else {
this.location = null;
}
}
String determineType(String location, PackageConfig packageConfig,
Map<String, ResultTypeConfig> resultsByExtension) {
int indexOfDot = location.lastIndexOf(".");
if (indexOfDot > 0) {
String extension = location.substring(indexOfDot + 1);
ResultTypeConfig resultTypeConfig = resultsByExtension.get(extension);
if (resultTypeConfig != null) {
return resultTypeConfig.getName();
} else
throw new ConfigurationException("Unable to find a result type for extension [" + extension + "] " +
"in location attribute [" + location + "].");
} else {
return packageConfig.getFullDefaultResultType();
}
}
}
}
| {'content_hash': '1420bfa4f0764917f001617ae3979f6a', 'timestamp': '', 'source': 'github', 'line_count': 507, 'max_line_length': 171, 'avg_line_length': 46.9585798816568, 'alnum_prop': 0.6457073252688172, 'repo_name': 'Ile2/struts2-showcase-demo', 'id': '40ea279cd95d5271facb5afb5be1c6a8e5f11da3', 'size': '24625', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/plugins/convention/src/main/java/org/apache/struts2/convention/DefaultResultMapBuilder.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '26665'}, {'name': 'FreeMarker', 'bytes': '254694'}, {'name': 'HTML', 'bytes': '913364'}, {'name': 'Java', 'bytes': '9755409'}, {'name': 'JavaScript', 'bytes': '35286'}, {'name': 'XSLT', 'bytes': '10909'}]} |
layout: post
title: components.templates.v2.template1.blog-posts
author: David Ballesteros
tags:
- templates
- v2
- template1
categories:
- components
- templates
- v2
- template1
- blog-posts
script: templates.v2.template1.blog-posts
componentsversion: 5.5.36
---
# blog-posts
*Namespace: templates.v2.template1*
## Extra Info available
| Name | Type | Description |
| --- | --- | --- |
| hideMobile | bool | Hide on mobile |
| {'content_hash': '5706610442776ae040c6849e2c9ffe61', 'timestamp': '', 'source': 'github', 'line_count': 27, 'max_line_length': 51, 'avg_line_length': 16.59259259259259, 'alnum_prop': 0.6830357142857143, 'repo_name': 'mdee-co/components-documentation', 'id': 'd38392937406391751f90bdd76e5280461811bd0', 'size': '452', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': '_posts/2018-08-07-templates-v2-template1-blog-posts.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '16092'}, {'name': 'HTML', 'bytes': '15032'}, {'name': 'JavaScript', 'bytes': '1457'}]} |
layout: page
title: Mind Technologies Dinner
date: 2016-05-24
author: Dorothy York
tags: weekly links, java
status: published
summary: Cras id nisl vehicula, euismod.
banner: images/banner/leisure-03.jpg
booking:
startDate: 01/15/2018
endDate: 01/16/2018
ctyhocn: TFTSOHX
groupCode: MTD
published: true
---
Aenean vulputate orci arcu, quis elementum tellus hendrerit ut. Nullam lobortis risus at nisi vestibulum luctus. Nulla scelerisque diam vitae purus egestas, sit amet tempus odio posuere. Aliquam erat volutpat. Suspendisse potenti. In hac habitasse platea dictumst. Maecenas condimentum orci quis bibendum pulvinar. Duis elementum, felis nec volutpat congue, nisl ex interdum quam, mollis blandit lacus velit vel purus. Sed ornare urna augue, ut finibus sem bibendum ut. Ut auctor pharetra nunc, et commodo massa sollicitudin eget. Sed consectetur tincidunt gravida.
* Nullam finibus lorem rhoncus arcu viverra tempor
* Quisque eu tortor nec arcu sagittis euismod et a dolor
* Duis nec risus et justo tempor luctus.
Nulla facilisi. Aliquam lacinia, est sodales suscipit tempus, mauris dui lacinia justo, quis bibendum sem metus a ipsum. Morbi ut lorem dignissim, fringilla erat vitae, tristique felis. Morbi tristique hendrerit nisl, sed vulputate sapien fringilla et. Donec volutpat malesuada justo, non accumsan nisl pulvinar sit amet. Suspendisse quis dolor in enim aliquam faucibus nec vitae lectus. Cras efficitur varius mauris id feugiat. Quisque imperdiet purus quis eros accumsan ultrices. Nam sed faucibus purus, gravida posuere felis. Mauris sed vestibulum leo, at lobortis orci. Nam ultricies ante mi, vitae elementum nisl pretium at. Sed vehicula tempor dolor quis faucibus. Donec dolor justo, finibus sit amet laoreet non, tempus at turpis. Aliquam convallis imperdiet mattis.
Cras viverra quam sed elit pellentesque, ut mollis lacus pellentesque. Aliquam odio nunc, tincidunt at nisl et, placerat egestas arcu. Praesent et mauris vel dolor bibendum luctus. Proin vitae pellentesque elit. Nulla ullamcorper turpis sed commodo tristique. Fusce eget feugiat eros, vel egestas ipsum. Vestibulum varius, ipsum eget ullamcorper laoreet, velit nisi blandit libero, quis gravida metus elit id urna. Integer volutpat semper eleifend.
| {'content_hash': '33fef0d8ed71ff0d7ccf483e4084705d', 'timestamp': '', 'source': 'github', 'line_count': 23, 'max_line_length': 773, 'avg_line_length': 98.04347826086956, 'alnum_prop': 0.811529933481153, 'repo_name': 'KlishGroup/prose-pogs', 'id': '8ea7d47df5e7c5aa1f39fd4477a47ea04b902f48', 'size': '2259', 'binary': False, 'copies': '1', 'ref': 'refs/heads/gh-pages', 'path': 'pogs/T/TFTSOHX/MTD/index.md', 'mode': '33188', 'license': 'mit', 'language': []} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_92) on Wed Jul 27 21:19:33 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Package net.sourceforge.pmd.cli (PMD 5.5.1 Test API)</title>
<meta name="date" content="2016-07-27">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package net.sourceforge.pmd.cli (PMD 5.5.1 Test API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?net/sourceforge/pmd/cli/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Uses of Package net.sourceforge.pmd.cli" class="title">Uses of Package<br>net.sourceforge.pmd.cli</h1>
</div>
<div class="contentContainer">No usage of net.sourceforge.pmd.cli</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?net/sourceforge/pmd/cli/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2002–2016 <a href="http://pmd.sourceforge.net/">InfoEther</a>. All rights reserved.</small></p>
</body>
</html>
| {'content_hash': 'a172cfc3208a32492d821e9e778a4364', 'timestamp': '', 'source': 'github', 'line_count': 126, 'max_line_length': 147, 'avg_line_length': 33.76984126984127, 'alnum_prop': 0.6129259694477086, 'repo_name': 'jasonwee/videoOnCloud', 'id': '7890b9af293e3a59869750058ceec5345afe8565', 'size': '4255', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'pmd/pmd-doc-5.5.1/testapidocs/net/sourceforge/pmd/cli/package-use.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '116270'}, {'name': 'C', 'bytes': '2209717'}, {'name': 'C++', 'bytes': '375267'}, {'name': 'CSS', 'bytes': '1134648'}, {'name': 'Dockerfile', 'bytes': '1656'}, {'name': 'HTML', 'bytes': '306558398'}, {'name': 'Java', 'bytes': '1465506'}, {'name': 'JavaScript', 'bytes': '9028509'}, {'name': 'Jupyter Notebook', 'bytes': '30907'}, {'name': 'Less', 'bytes': '107003'}, {'name': 'PHP', 'bytes': '856'}, {'name': 'PowerShell', 'bytes': '77807'}, {'name': 'Pug', 'bytes': '2968'}, {'name': 'Python', 'bytes': '1001861'}, {'name': 'R', 'bytes': '7390'}, {'name': 'Roff', 'bytes': '3553'}, {'name': 'Shell', 'bytes': '206191'}, {'name': 'Thrift', 'bytes': '80564'}, {'name': 'XSLT', 'bytes': '4740'}]} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_02) on Mon Apr 25 06:16:40 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html" charset="utf-8">
<title>MavenArtifactRepository (Gradle API 2.13)</title>
<meta name="date" content="2016-04-25">
<link rel="stylesheet" type="text/css" href="../../../../../javadoc.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MavenArtifactRepository (Gradle API 2.13)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/gradle/api/artifacts/repositories/IvyPatternRepositoryLayout.html" title="interface in org.gradle.api.artifacts.repositories"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/gradle/api/artifacts/repositories/PasswordCredentials.html" title="interface in org.gradle.api.artifacts.repositories"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/gradle/api/artifacts/repositories/MavenArtifactRepository.html" target="_top">Frames</a></li>
<li><a href="MavenArtifactRepository.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.gradle.api.artifacts.repositories</div>
<h2 title="Interface MavenArtifactRepository" class="title">Interface MavenArtifactRepository</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd><a href="../../../../../org/gradle/api/artifacts/repositories/ArtifactRepository.html" title="interface in org.gradle.api.artifacts.repositories">ArtifactRepository</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html" title="interface in org.gradle.api.artifacts.repositories">AuthenticationSupported</a></dd>
</dl>
<hr>
<br>
<pre>public interface <span class="strong">MavenArtifactRepository</span>
extends <a href="../../../../../org/gradle/api/artifacts/repositories/ArtifactRepository.html" title="interface in org.gradle.api.artifacts.repositories">ArtifactRepository</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html" title="interface in org.gradle.api.artifacts.repositories">AuthenticationSupported</a></pre>
<div class="block">An artifact repository which uses a Maven format to store artifacts and meta-data.
<p>
Repositories of this type are created by the <a href="../../../../../org/gradle/api/artifacts/dsl/RepositoryHandler.html#maven(org.gradle.api.Action)"><code>RepositoryHandler.maven(org.gradle.api.Action)</code></a> group of methods.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/gradle/api/artifacts/repositories/MavenArtifactRepository.html#artifactUrls(java.lang.Object...)">artifactUrls</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... urls)</code>
<div class="block">Adds some additional URLs to use to find artifact files.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/gradle/api/artifacts/repositories/MavenArtifactRepository.html#getArtifactUrls()">getArtifactUrls</a></strong>()</code>
<div class="block">Returns the additional URLs to use to find artifact files.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/gradle/api/artifacts/repositories/MavenArtifactRepository.html#getUrl()">getUrl</a></strong>()</code>
<div class="block">The base URL of this repository.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/gradle/api/artifacts/repositories/MavenArtifactRepository.html#setArtifactUrls(java.lang.Iterable)">setArtifactUrls</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> urls)</code>
<div class="block">Sets the additional URLs to use to find artifact files.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/gradle/api/artifacts/repositories/MavenArtifactRepository.html#setUrl(java.lang.Object)">setUrl</a></strong>(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> url)</code>
<div class="block">Sets the base URL of this repository.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.gradle.api.artifacts.repositories.ArtifactRepository">
<!-- -->
</a>
<h3>Methods inherited from interface org.gradle.api.artifacts.repositories.<a href="../../../../../org/gradle/api/artifacts/repositories/ArtifactRepository.html" title="interface in org.gradle.api.artifacts.repositories">ArtifactRepository</a></h3>
<code><a href="../../../../../org/gradle/api/artifacts/repositories/ArtifactRepository.html#getName()">getName</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/ArtifactRepository.html#setName(java.lang.String)">setName</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_org.gradle.api.artifacts.repositories.AuthenticationSupported">
<!-- -->
</a>
<h3>Methods inherited from interface org.gradle.api.artifacts.repositories.<a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html" title="interface in org.gradle.api.artifacts.repositories">AuthenticationSupported</a></h3>
<code><a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html#authentication(org.gradle.api.Action)">authentication</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html#credentials(org.gradle.api.Action)">credentials</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html#credentials(java.lang.Class, org.gradle.api.Action)">credentials</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html#getAuthentication()">getAuthentication</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html#getCredentials()">getCredentials</a>, <a href="../../../../../org/gradle/api/artifacts/repositories/AuthenticationSupported.html#getCredentials(java.lang.Class)">getCredentials</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getUrl()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getUrl</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a> getUrl()</pre>
<div class="block">The base URL of this repository. This URL is used to find both POMs and artifact files. You can add additional URLs to use to look for artifact files, such as jars, using <a href="../../../../../org/gradle/api/artifacts/repositories/MavenArtifactRepository.html#setArtifactUrls(java.lang.Iterable)"><code>setArtifactUrls(Iterable)</code></a>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The URL.</dd></dl>
</li>
</ul>
<a name="setUrl(java.lang.Object)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setUrl</h4>
<pre>void setUrl(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a> url)</pre>
<div class="block">Sets the base URL of this repository. This URL is used to find both POMs and artifact files. You can add additional URLs to use to look for artifact files, such as jars, using <a href="../../../../../org/gradle/api/artifacts/repositories/MavenArtifactRepository.html#setArtifactUrls(java.lang.Iterable)"><code>setArtifactUrls(Iterable)</code></a>.
<p>The provided value is evaluated as per <a href="../../../../../org/gradle/api/Project.html#uri(java.lang.Object)"><code>Project.uri(Object)</code></a>. This means, for example, you can pass in a <code>File</code> object, or a relative path to be evaluated relative
to the project directory.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>url</code> - The base URL.</dd></dl>
</li>
</ul>
<a name="getArtifactUrls()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getArtifactUrls</h4>
<pre><a href="https://docs.oracle.com/javase/6/docs/api/java/util/Set.html?is-external=true" title="class or interface in java.util">Set</a><<a href="https://docs.oracle.com/javase/6/docs/api/java/net/URI.html?is-external=true" title="class or interface in java.net">URI</a>> getArtifactUrls()</pre>
<div class="block">Returns the additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The additional URLs. Returns an empty list if there are no such URLs.</dd></dl>
</li>
</ul>
<a name="artifactUrls(java.lang.Object...)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>artifactUrls</h4>
<pre>void artifactUrls(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>... urls)</pre>
<div class="block">Adds some additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.
<p>The provided values are evaluated as per <a href="../../../../../org/gradle/api/Project.html#uri(java.lang.Object)"><code>Project.uri(Object)</code></a>. This means, for example, you can pass in a <code>File</code> object, or a relative path to be evaluated
relative to the project directory.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>urls</code> - The URLs to add.</dd></dl>
</li>
</ul>
<a name="setArtifactUrls(java.lang.Iterable)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setArtifactUrls</h4>
<pre>void setArtifactUrls(<a href="https://docs.oracle.com/javase/6/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a><?> urls)</pre>
<div class="block">Sets the additional URLs to use to find artifact files. Note that these URLs are not used to find POM files.
<p>The provided values are evaluated as per <a href="../../../../../org/gradle/api/Project.html#uri(java.lang.Object)"><code>Project.uri(Object)</code></a>. This means, for example, you can pass in a <code>File</code> object, or a relative path to be evaluated
relative to the project directory.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>urls</code> - The URLs.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/gradle/api/artifacts/repositories/IvyPatternRepositoryLayout.html" title="interface in org.gradle.api.artifacts.repositories"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../org/gradle/api/artifacts/repositories/PasswordCredentials.html" title="interface in org.gradle.api.artifacts.repositories"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/gradle/api/artifacts/repositories/MavenArtifactRepository.html" target="_top">Frames</a></li>
<li><a href="MavenArtifactRepository.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {'content_hash': '9fe486609981ead49c7225bf8e0199b2', 'timestamp': '', 'source': 'github', 'line_count': 308, 'max_line_length': 879, 'avg_line_length': 53.314935064935064, 'alnum_prop': 0.6816880823335972, 'repo_name': 'HenryHarper/Acquire-Reboot', 'id': '2374267c81cda1bc66b8ccedd5fcd9526e2633b3', 'size': '16421', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'gradle/docs/javadoc/org/gradle/api/artifacts/repositories/MavenArtifactRepository.html', 'mode': '33188', 'license': 'mit', 'language': []} |
package org.openprovenance.prov.xml;
import javax.xml.bind.annotation.adapters.XmlAdapter;
import org.openprovenance.prov.model.DOMProcessing;
import org.openprovenance.prov.model.QualifiedName;
import org.w3c.dom.Element;
public class KeyAdapter extends XmlAdapter<Element, TypedValue> {
final org.openprovenance.prov.model.ProvFactory pFactory;
final ValueConverter vconv;
final private DOMProcessing domProcessor;
final QualifiedName qname_PROV_KEY;
public KeyAdapter() {
pFactory= new ProvFactory();
domProcessor=new DOMProcessing(pFactory);
qname_PROV_KEY = pFactory.getName().PROV_KEY;
vconv=new ValueConverter(pFactory);
}
public KeyAdapter(org.openprovenance.prov.model.ProvFactory pFactory) {
this.pFactory=pFactory;
domProcessor=new DOMProcessing(pFactory);
qname_PROV_KEY = pFactory.getName().PROV_KEY;
vconv=new ValueConverter(pFactory);
}
@Override
public Element marshal(TypedValue value) throws Exception {
//System.out.println("==> KeyAdapter marshalling for " + value);
return DOMProcessing.marshalTypedValue(value,qname_PROV_KEY);
}
@Override
public TypedValue unmarshal(Element el) throws Exception {
//System.out.println("==> KeyAdapter unmarshalling for " + el);
//TODO: make sure I construct a typedvalue. Update newAttribute in xml.ProvFactory.
return (TypedValue) domProcessor.unmarshallAttribute(el,pFactory,vconv);
}
}
| {'content_hash': 'f32361ef309609e67a3029c23e403342', 'timestamp': '', 'source': 'github', 'line_count': 47, 'max_line_length': 92, 'avg_line_length': 31.127659574468087, 'alnum_prop': 0.7450444292549556, 'repo_name': 'dtm/ProvToolbox', 'id': 'e0d31569286dc99d24bb30e270f5231ac6f426a0', 'size': '1463', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'prov-xml/src/main/java/org/openprovenance/prov/xml/KeyAdapter.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'GAP', 'bytes': '20710'}, {'name': 'Java', 'bytes': '2010160'}, {'name': 'JavaScript', 'bytes': '25608'}, {'name': 'Makefile', 'bytes': '10746'}, {'name': 'Shell', 'bytes': '554'}]} |
<!DOCTYPE html>
<meta charset=utf-8>
<title>Redirecting...</title>
<link rel=canonical href="../卸/index.html">
<meta http-equiv=refresh content="0; url='../卸/index.html'">
<h1>Redirecting...</h1>
<a href="../卸/index.html">Click here if you are not redirected.</a>
<script>location='../卸/index.html'</script>
| {'content_hash': 'b7e6ceb61d878971d9affe9ae9c80cb2', 'timestamp': '', 'source': 'github', 'line_count': 8, 'max_line_length': 67, 'avg_line_length': 38.5, 'alnum_prop': 0.6785714285714286, 'repo_name': 'hochanh/hochanh.github.io', 'id': '4d75be73bfc17ebbcf71ee26d2c214a3dd078dbb', 'size': '316', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'rtk/v4/1397.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '6969'}, {'name': 'JavaScript', 'bytes': '5041'}]} |
"""
:copyright: (c) 2014 Building Energy Inc
:license: see LICENSE for more details.
"""
import boto.elasticache
import boto.cloudformation
import boto.ec2
import boto.exception
import os
AWS_REGION = os.environ.get('AWS_REGION', 'us-east-1')
try:
ec2 = boto.ec2.connect_to_region(AWS_REGION)
elasticache = boto.elasticache.connect_to_region(AWS_REGION)
cloudformation = boto.cloudformation.connect_to_region(AWS_REGION)
except boto.exception.NoAuthHandlerFound:
print 'Looks like we are not on an AWS stack this module will not function'
def get_stack_outputs():
if not AWS_REGION or 'STACK_NAME' not in os.environ:
return {}
return {
output.key: output.value for output in (
cloudformation.describe_stacks(os.environ['STACK_NAME'])[0].outputs
)
}
def get_cache_endpoint():
outputs = get_stack_outputs()
if not outputs or 'CacheClusterID' not in outputs:
return None
cluster = elasticache.describe_cache_clusters(
outputs['CacheClusterID'], show_cache_node_info=True
)
return (
cluster['DescribeCacheClustersResponse']['DescribeCacheClustersResult']
['CacheClusters'][0]['CacheNodes'][0]['Endpoint']
)
if __name__ == '__main__':
print get_cache_endpoint()['Address']
| {'content_hash': '80a3da01a667ee957095e1444a904fd6', 'timestamp': '', 'source': 'github', 'line_count': 44, 'max_line_length': 79, 'avg_line_length': 29.522727272727273, 'alnum_prop': 0.6843725943033102, 'repo_name': 'buildingenergy/buildingenergy-platform', 'id': '509f042a1f9092f9d1a5a6ef997068013c048c21', 'size': '1299', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'BE/settings/aws/aws.py', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '41308'}, {'name': 'JavaScript', 'bytes': '410448'}, {'name': 'Python', 'bytes': '2737347'}, {'name': 'Shell', 'bytes': '12179'}]} |
<?xml version="1.0" encoding="UTF-8"?>
<sbml xmlns="http://www.sbml.org/sbml/level2/version2" level="2" version="2">
<model metaid="_case00002" id="case00002" name="case00002">
<listOfCompartments>
<compartment id="compartment" name="compartment" size="1" units="volume"/>
</listOfCompartments>
<listOfSpecies>
<species id="S1" name="S1" compartment="compartment" initialAmount="0.0015" substanceUnits="substance"/>
<species id="S2" name="S2" compartment="compartment" initialAmount="0" substanceUnits="substance"/>
</listOfSpecies>
<listOfParameters>
<parameter id="k1" name="k1" value="1"/>
<parameter id="k2" name="k2" value="0"/>
</listOfParameters>
<listOfReactions>
<reaction id="reaction1" name="reaction1" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="S1"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="S2"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<times/>
<ci> compartment </ci>
<ci> k1 </ci>
<ci> S1 </ci>
</apply>
</math>
</kineticLaw>
</reaction>
<reaction id="reaction2" name="reaction2" reversible="false" fast="false">
<listOfReactants>
<speciesReference species="S2"/>
</listOfReactants>
<listOfProducts>
<speciesReference species="S1"/>
</listOfProducts>
<kineticLaw>
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<times/>
<ci> compartment </ci>
<ci> k2 </ci>
<ci> S2 </ci>
</apply>
</math>
</kineticLaw>
</reaction>
</listOfReactions>
</model>
</sbml>
| {'content_hash': 'cf8bd2e0c4ea23d81750ad54e751d410', 'timestamp': '', 'source': 'github', 'line_count': 54, 'max_line_length': 110, 'avg_line_length': 35.333333333333336, 'alnum_prop': 0.5571278825995807, 'repo_name': 'stanleygu/sbmltest2archive', 'id': 'd1a25b284b07a6c890388fd6734260a8fbd01a75', 'size': '1908', 'binary': False, 'copies': '3', 'ref': 'refs/heads/master', 'path': 'sbml-test-cases/cases/semantic/00002/00002-sbml-l2v2.xml', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'M', 'bytes': '12509'}, {'name': 'Mathematica', 'bytes': '721776'}, {'name': 'Matlab', 'bytes': '1729754'}, {'name': 'Objective-C', 'bytes': '144988'}]} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Proteak</title>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="http://blueimp.github.io/Gallery/css/blueimp-gallery.min.css">
<link rel="stylesheet" href="css/bootstrap-image-gallery.min.css">
<!-- Custom CSS -->
<link href="css/full-slider.css" rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<script src="js/jquery.js"></script>
<script src="js/jquery.stellar.js"></script>
<script>
$.stellar();
</script>
<script>
$(function(){
$(window).scroll(function(event) {
// scrollTop la posición del elemento
var position = $(window).scrollTop();
var menu = $("#menu-principal");
// dependiendo el lugar de la pantalla
// modificamos la clase del header
// par cambiar su color de fondo
if (position == 0) {
menu.addClass("navbar-proteak-intop").removeClass("navbar-proteak-inbot");
} else {
menu.addClass("navbar-proteak-inbot").removeClass("navbar-proteak-intop");
}
});
});
</script>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-default navbar-fixed-top navbar-proteak-intop" id="menu-principal">
<div class="container-fluid ">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="index.html" class="hidden-xs"><img src="images/proteak_menu.svg" id="logo-desktop" class="titulo-img" alt="" ></a>
<a href="index.html" class="hidden-sm hidden-md hidden-lg"><img src="images/proteak_menu.svg" id="logo-phone" class="titulo-img" alt="" ></a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="index.htnl" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"><img src="images/bandera_mexico.svg" class="imagenes" alt=""><span class="caret"></span></a>
<ul class="dropdown-menu">
<li><a href="#"><img src="images/bandera_eu.svg" class=" imagenes" alt=""></a></li>
</ul>
</li>
<li><a href="#correo"><span class="glyphicon glyphicon-envelope correo"></span></a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<a name="arriba"></a>
<!-- Full Page Image Background Carousel Header -->
<header id="myCarousel" class="carousel slide" data-stellar-background-ratio="0.2" >
<!-- Indicators -->
<ol class="carousel-indicators">
<li data-target="#myCarousel" data-slide-to="0" class="active"></li>
<li data-target="#myCarousel" data-slide-to="1"></li>
<li data-target="#myCarousel" data-slide-to="2"></li>
<li data-target="#myCarousel" data-slide-to="3"></li>
</ol>
<!-- Wrapper for Slides -->
<div class="carousel-inner" >
<div class="item active">
<!-- Set the first background image using inline CSS below. -->
<div class="fill" style="background-image:url('images/slide1.jpg');"></div>
<div class="carousel-caption texto-slider">
<img src="images/fabrica.svg" alt="" id="tronco-slider">
<h2>PRIMER PLANTA PRODUCTORA</h2>
<H1>DE MDF EN MÉXICO</H1>
<a href="#video" class="enlaces"><button class="boton-slider">VER VIDEO</button></a><br><br>
<a href="#caracteristicas" align="center"><span class="glyphicon glyphicon-menu-down flecha-abajo"></span></a>
</div>
</div>
<div class="item">
<!-- Set the second background image using inline CSS below. -->
<div class="fill" style="background-image:url('images/slide2.jpg');"></div>
<div class="carousel-caption texto-slider">
<img src="images/fabrica.svg" alt="" id="tronco-slider">
<h2>LA ESPERA HA TERMINADO,</h2>
<H1>INICIAMOS OPERACIONES</H1>
<a href="#caracteristicas" class="enlaces"><button class="boton-slider">VER MÁS</button></a><br><br>
<a href="#caracteristicas" align="center"><span class="glyphicon glyphicon-menu-down flecha-abajo"></span></a>
</div>
</div>
<div class="item">
<!-- Set the third background image using inline CSS below. -->
<div class="fill" style="background-image:url('images/slide3.jpg');"></div>
<div class="carousel-caption texto-slider">
<img src="images/maquinaria.svg" alt="" id="tronco-slider">
<h2>YA ESTAMOS PRODUCIENDO LOS PRIMEROS TABLEROS</h2>
<H1>DE MDF EN MÉXICO</H1>
<a href="#sustentable" class="enlaces"><button class="boton-slider">VER MÁS</button></a><br><br>
<a href="#caracteristicas" align="center"><span class="glyphicon glyphicon-menu-down flecha-abajo"></span></a>
</div>
</div>
<div class="item">
<!-- Set the third background image using inline CSS below. -->
<div class="fill" style="background-image:url('images/slide4.jpg');"></div>
<div class="carousel-caption texto-slider">
<img src="images/maquinaria.svg" alt="" id="tronco-slider">
<h2>ESPERA MUY PRONTO</h2>
<H1>LAS MEJORES SOLUCIONES EN MDF</H1>
<a href="#vision" class="enlaces"><button class="boton-slider">VER MÁS</button></a><br><br>
<a href="#caracteristicas" align="center"><span class="glyphicon glyphicon-menu-down flecha-abajo"></span></a>
</div>
</div>
</div>
<!-- Controls -->
<a class="left carousel-control" href="#myCarousel" data-slide="prev">
<span class="icon-prev"></span>
</a>
<a class="right carousel-control" href="#myCarousel" data-slide="next">
<span class="icon-next"></span>
</a>
</header>
<!-- Page Content -->
<a href=""name="caracteristicas"></a>
<!--Desktop Caracteristicas-->
<div class="container caracteristicas-desktop visible-lg" data-stellar-background-ratio="0.2" >
<div class="row " >
<div class="col-md-12" >
<div class="titulo_caracteristicas" align="center" id="icono_caracteristicas" data-stellar-ratio="1.1">
<img src="images/fabrica.svg" alt="" align="center">
<h2>CARACTERÍSTICAS</h2>
<div class="descripcion" align="center">
<h1>Proyecto verticalmente integrado que asegura la calidad de nuestros tableros en el mercado nacional e internacional.</h1>
</div>
</div>
</div>
</div>
<div class="row iconos_caracteristicas" style="overflow:hidden;" id="showcase" >
<div class="col-md-4 icono" >
<img src="images/icono1.svg" alt="" class="icono-circular" >
<p>Ubicación en Huimanguillo Tabasco</p>
</div>
<div class="col-md-4 icono" >
<img src="images/icono2.svg" alt="" class="icono-circular">
<p>Inversión de 220 mdd</p>
</div>
<div class="col-md-4 icono" >
<img src="images/icono3.svg" alt="" class="icono-circular">
<p>Lo último en tecnología alemana</p>
</div>
<div class="col-md-4 icono" >
<img src="images/icono4.svg" alt="" class="icono-circular">
<p>Capacidad de producción 280 mil m3</p>
</div>
<div class="col-md-4 icono" >
<img src="images/icono5.svg" alt="" class="icono-circular">
<p>Control de materia prima (del árbol al tablero)</p>
</div>
<div class="col-md-4 icono" >
<img src="images/icono6.svg" alt="" class="icono-circular">
<p>Línea de ciclo corto para aplicación de maleninas</p>
</div>
</div>
</div>
<!--Móviles caracteristicas-->
<div class="container caracteristicas hidden-lg">
<div class="row ">
<div class="col-md-12">
<div class="titulo_caracteristicas" align="center">
<img src="images/fabrica.svg" alt="" align="center">
<h2>CARACTERÍSTICAS</h2>
<div class="descripcion" align="center">
<h1>Proyecto verticalmente integrado que asegura la calidad de nuestros tableros en el mercado nacional e internacional.</h1>
</div>
</div>
</div>
</div>
<div class="row iconos_caracteristicas">
<div class="col-md-4 icono">
<img src="images/icono1.svg" alt="" class="icono-circular" >
<p>Ubicación en Huimanguillo Tabasco</p>
</div>
<div class="col-md-4 icono">
<img src="images/icono2.svg" alt="" class="icono-circular">
<p>Inversión de 220 mdd</p>
</div>
<div class="col-md-4 icono">
<img src="images/icono3.svg" alt="" class="icono-circular">
<p>Lo último en tecnología alemana</p>
</div>
</div>
<div class="row iconos_caracteristicas">
<div class="col-md-4 icono">
<img src="images/icono4.svg" alt="" class="icono-circular">
<p>Capacidad de producción 280 mil m3</p>
</div>
<div class="col-md-4 icono">
<img src="images/icono5.svg" alt="" class="icono-circular">
<p>Control de materia prima (del árbol al tablero)</p>
</div>
<div class="col-md-4 icono">
<img src="images/icono6.svg" alt="" class="icono-circular">
<p>Línea de ciclo corto para aplicación de maleninas</p>
</div>
</div>
</div>
<div class="container img hidden-lg">
<img src="images/Imagen-fabrica.jpg" alt="" class="img-caracteristicas">
</div>
<a href="" name="sustentable"></a>
<!--Desktop sustentable-->
<div class="container sustentable-desktop visible-lg" data-stellar-background-ratio="0.2">
<div class="row ">
<div class="col-md-12">
<div class="titulo_sustentable" align="center" data-stellar-ratio="1.1">
<img src="images/arbol.svg" alt="" align="center">
<h2>INDUSTRIA SUSTENTABLE</h2>
<div class="descripcion" align="center">
<h1>Producción 100% sustentable y una apuesta firme en innovación de productos.</h1>
</div>
</div>
</div>
</div>
<div class="row iconos_caracteristicas" style="overflow:hidden;">
<div class="col-md-4 icono" id="fly-it-1">
<img src="images/imagen-1.jpg" alt="" class="icono-circular">
<span>10,000 has de Eucalipto sustentables suministran a la planta de materia prima
</span>
<p>Eucalito sustentable</p>
</div>
<div class="col-md-4 icono" id="fly-it-5">
<img src="images/imagen-2.jpg" alt="" class="icono-circular">
<span>Tableros certificados bajo estándares internacionales
</span>
<p>Tableros certificados</p>
</div>
<div class="col-md-4 icono" id="fly-it-3">
<img src="images/imagen-3.jpg" alt="" class="icono-circular">
<span>Producimos nuestra propia energía con una planta de cogeneración eléctrica
</span>
<p>Producimos nuestra energía</p>
</div>
<div class="col-md-4 icono" id="fly-it-4">
<img src="images/imagen-4.jpg" alt="" class="icono-circular">
<span>Empresa 100% mexicana
</span>
<p>Empresa 100% mexicana</p>
</div>
<div class="col-md-4 icono" id="fly-it-2">
<img src="images/imagen-5.jpg" alt="" class="icono-circular">
<span>Generamos empleo
</span>
<p>Generamos empleo</p>
</div>
<div class="col-md-4 icono" id="fly-it-6">
<img src="images/imagen-6.jpg" alt="" class="icono-circular">
<span>Apoyamos al desarrollo de las comunidades en donde trabajamos
</span>
<p>Desarrollo de comunidades</p>
</div>
</div>
</div>
<!--Móviles sustentable-->
<div class="container sustentable hidden-lg">
<div class="row ">
<div class="col-md-12">
<div class="titulo_sustentable" align="center">
<img src="images/arbol.svg" alt="" align="center">
<h2>INDUSTRIA SUSTENTABLE</h2>
<div class="descripcion" align="center">
<h1>Producción 100% sustentable y una apuesta firme en innovación de productos.</h1>
</div>
</div>
</div>
</div>
<div class="row iconos_caracteristicas">
<div class="col-md-4 icono">
<img src="images/imagen-1.jpg" alt="" class="icono-circular">
<span>10,000 has de Eucalipto sustentables suministran a la planta de materia prima
</span>
<p>Eucalito sustentable</p>
</div>
<div class="col-md-4 icono">
<img src="images/imagen-2.jpg" alt="" class="icono-circular">
<span>Tableros certificados bajo estándares internacionales
</span>
<p>Tableros certificados</p>
</div>
<div class="col-md-4 icono">
<img src="images/imagen-3.jpg" alt="" class="icono-circular">
<span>Producimos nuestra propia energía con una planta de cogeneración eléctrica
</span>
<p>Producimos nuestra energía</p>
</div>
</div>
<div class="row iconos_caracteristicas">
<div class="col-md-4 icono">
<img src="images/imagen-4.jpg" alt="" class="icono-circular">
<span>Empresa 100% mexicana
</span>
<p>Empresa 100% mexicana</p>
</div>
<div class="col-md-4 icono">
<img src="images/imagen-5.jpg" alt="" class="icono-circular">
<span>Generamos empleo
</span>
<p>Generamos empleo</p>
</div>
<div class="col-md-4 icono">
<img src="images/imagen-6.jpg" alt="" class="icono-circular">
<span>Apoyamos al desarrollo de las comunidades en donde trabajamos
</span>
<p>Desarrollo de comunidades</p>
</div>
</div>
</div>
<div class="container img hidden-lg">
<img src="images/Imagensr.jpg" alt="" class="img-sustentable">
</div>
<a href="" name="vision"></a>
<div class="container vision">
<div class="col-md-12">
<div class="titulo_vision" align="center">
<img src="images/icono_vision.svg" alt="" align="center">
<h2>VISIÓN EMPRENDEDORA</h2>
<div class="descripcion" align="center">
<h1>La sinergia de nuestra experiencia en el desarrollo forestal, una planta de MDF de vanguardia y el control de materia prima certificada, nos permite ofrecer al mercado productos de valor agregado, especializados, innovadores y 100% mexicanos.</h1>
</div>
</div>
</div>
</div>
<a href="" name="video"></a>
<div class="container video">
<iframe src="https://www.youtube.com/embed/1KZ9osr-a8I" frameborder="0" allowfullscreen></iframe>
</div>
<div class="container division">
<div class="row">
<div class="col-md-12">
<div class="titulo_division" align="center">
<img src="images/icono_division.svg" alt="" align="center">
<h2>DIVISIÓN FORESTAL</h2>
<div class="descripcion" align="center">
<h1>Creamos bosques para que puedas tener buena madera en tu vida.</h1>
</div>
</div>
</div>
</div>
</div>
<!--Container galeria-->
<div class="container gallery">
<div id="blueimp-gallery" class="blueimp-gallery">
<!-- The container for the modal slides -->
<div class="slides"></div>
<!-- Controls for the borderless lightbox -->
<h3 class="title"></h3>
<a class="prev">‹</a>
<a class="next">›</a>
<a class="close">×</a>
<a class="play-pause"></a>
<ol class="indicator"></ol>
<!-- The modal dialog, which will be used to wrap the lightbox content -->
<div class="modal fade">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" aria-hidden="true">×</button>
<h4 class="modal-title"></h4>
</div>
<div class="modal-body next"></div>
<div class="modal-footer">
<button type="button" class="btn btn-default pull-left prev">
<i class="glyphicon glyphicon-chevron-left"></i>
Previous
</button>
<button type="button" class="btn btn-primary next">
Next
<i class="glyphicon glyphicon-chevron-right"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div id="links" class="row">
<div class="col-md-3 col-sm-6 col-xs-12" style="padding: 0px;">
<a href="images/galeria-1.jpg" title="" data-gallery>
<img src="images/galeria-1.jpg" alt="">
</a>
</div>
<div class="col-md-3 col-sm-6 col-xs-12" style="padding: 0px;">
<a href="images/galeria-2.jpg" title="" data-gallery>
<img src="images/galeria-2.jpg" alt="">
</a>
</div>
<div class="col-md-3 col-sm-6 col-xs-12" style="padding: 0px;">
<a href="images/galeria-3.jpg" title="" data-gallery>
<img src="images/galeria-3.jpg" alt="">
</a>
</div>
<div class="col-md-3 col-sm-6 col-xs-12" style="padding: 0px;">
<a href="images/galeria-4.jpg" title="" data-gallery>
<img src="images/galeria-4.jpg" alt="">
</a>
</div>
<div class="col-md-3 col-sm-6 col-xs-12" style="padding: 0px;">
<a href="images/galeria-5.jpg" title="" data-gallery>
<img src="images/galeria-5.jpg" alt="">
</a>
</div>
<div class="col-md-3 col-sm-6 col-xs-12" style="padding: 0px;">
<a href="images/galeria-6.jpg" title="" data-gallery>
<img src="images/galeria-6.jpg" alt="">
</a>
</div>
<div class="col-md-3 col-sm-6 col-xs-12">
<a href="images/galeria-7.jpg" title="" data-gallery>
<img src="images/galeria-7.jpg" alt="">
</a>
</div>
<div class="col-md-3 col-sm-6 col-xs-12" style="padding: 0px;">
<a href="images/galeria-8.jpg" title="" data-gallery>
<img src="images/galeria-8.jpg" alt="">
</a>
</div>
<div class="col-md-3">
</div>
</div>
<!--Container Más info
</div>rmación-->
<div class="container mas">
<div class="row">
<div class="col-md-12">
<div class="titulo_mas" align="center">
<img src="images/logocolor.svg" alt="" align="center">
<a href="http://www.proteak.com/index.php/es/" target="_blank" class="link-nosotros"> <h2>ACCEDE PARA CONOCER MÁS INFORMACIÓN <span class="glyphicon glyphicon-menu-right"></span><span class="glyphicon glyphicon-menu-right"></span></h2>
</a>
</div>
</div>
</div>
</div>
<!-- Footer -->
<div class="container footer" >
<footer>
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4" align="center">
<a name="correo"></a>
<img src="images/icono_contacto.svg" class="img-footer">
<h2>MANTÉNTE EN CONTACTO</h2>
<form role="form" class="formulario" method="POST" action="correo.php">
<div class="form-group">
<input type="text" placeholder="Nombre:" id="nombre" class="forms" required name="correo_nombre">
</div>
<div class="form-group">
<input type="email" placeholder="Correo electrónico:" id="email" class="forms" required name="correo_email">
</div>
<div class="form-group">
<textarea placeholder="Mensaje:" name="mensaje" id="mensaje" id="mensaje" cols="60" rows="10" class="forms" required name="correo_mensaje"></textarea>
</div>
<button class="boton">ENVIAR</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
<div class="row">
<div class="col-md-12" align="center">
<p>© 2015 PROTEAK. Términos y Condiciones Privacidad Mapa de Sitio Contacto</p>
<a href="#arriba" class="flecha-arriba">
<span class="glyphicon glyphicon-menu-up" aria-hidden="true"></span>
</a>
</div>
</div>
<!-- /.row -->
</footer>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="http://blueimp.github.io/Gallery/js/jquery.blueimp-gallery.min.js"></script>
<script src="js/bootstrap-image-gallery.min.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
<!-- Script to Activate the Carousel -->
<script>
$('.carousel').carousel({
interval: 3000 //changes the speed
})
</script>
<script src="js/parallax/jquery.superscrollorama.js"></script>
<script type="text/javascript" src="js/parallax/greensock/TweenMax.min.js"></script>
<script>
$(document).ready(function() {
var controller = $.superscrollorama();
controller.addTween('#fly-it-1', TweenMax.from( $('#fly-it-1'), .5, {css:{right:'1500px'}, ease:Quad.easeInOut}));
controller.addTween('#fly-it-2', TweenMax.from( $('#fly-it-2'), .5, {css:{right:'1500px'}, ease:Quad.easeInOut}));
controller.addTween('#fly-it-3', TweenMax.from( $('#fly-it-3'), .5, {css:{right:'1500px'}, ease:Quad.easeInOut}));
controller.addTween('#fly-it-4', TweenMax.from( $('#fly-it-4'), .5, {css:{left:'1500px'}, ease:Quad.easeInOut}));
controller.addTween('#fly-it-5', TweenMax.from( $('#fly-it-5'), .5, {css:{left:'1500px'}, ease:Quad.easeInOut}));
controller.addTween('#fly-it-6', TweenMax.from( $('#fly-it-6'), .5, {css:{left:'1500px'}, ease:Quad.easeInOut}));
$('#showcase div img').css('position','relative').each(function() {
controller.addTween('#showcase div', TweenMax.from( $(this), 1, {delay:Math.random()*.2,css:{left:Math.random()*200-100,top:Math.random()*200-100,opacity:0}, ease:Back.easeOut}));
});
});
</script>
</body>
</html>
| {'content_hash': '810a686fd89586e9dbd296eea3f4ea8c', 'timestamp': '', 'source': 'github', 'line_count': 561, 'max_line_length': 275, 'avg_line_length': 46.54188948306595, 'alnum_prop': 0.515396399846802, 'repo_name': 'jorgerubik/proteak', 'id': 'c50d37cba346cf791101ad7a102546248cd3248f', 'size': '26164', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'index-old.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '16836'}, {'name': 'HTML', 'bytes': '107829'}, {'name': 'JavaScript', 'bytes': '74199'}, {'name': 'PHP', 'bytes': '856'}]} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>metacoq-safechecker: 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.7.1+2 / metacoq-safechecker - 1.0~alpha2+8.11</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
metacoq-safechecker
<small>
1.0~alpha2+8.11
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-06-03 10:36:19 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-06-03 10:36:19 UTC)</em><p>
<h2>Context</h2>
<pre># Packages matching: installed
# Name # Installed # Synopsis
base-bigarray base
base-threads base
base-unix base
camlp5 7.14 Preprocessor-pretty-printer of OCaml
conf-findutils 1 Virtual package relying on findutils
conf-perl 2 Virtual package relying on perl
coq 8.7.1+2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.08.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.08.1 Official release 4.08.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "matthieu.sozeau@inria.fr"
homepage: "https://metacoq.github.io/metacoq"
dev-repo: "git+https://github.com/MetaCoq/metacoq.git#coq-8.11"
bug-reports: "https://github.com/MetaCoq/metacoq/issues"
authors: ["Abhishek Anand <aa755@cs.cornell.edu>"
"Simon Boulier <simon.boulier@inria.fr>"
"Cyril Cohen <cyril.cohen@inria.fr>"
"Yannick Forster <forster@ps.uni-saarland.de>"
"Fabian Kunze <fkunze@fakusb.de>"
"Gregory Malecha <gmalecha@gmail.com>"
"Matthieu Sozeau <matthieu.sozeau@inria.fr>"
"Nicolas Tabareau <nicolas.tabareau@inria.fr>"
"Théo Winterhalter <theo.winterhalter@inria.fr>"
]
license: "MIT"
build: [
["sh" "./configure.sh"]
[make "-j%{jobs}%" "-C" "safechecker"]
]
install: [
[make "-C" "safechecker" "install"]
]
depends: [
"ocaml" {>= "4.07.1"}
"coq" {>= "8.11" & < "8.12~"}
"coq-metacoq-template" {= version}
"coq-metacoq-checker" {= version}
"coq-metacoq-pcuic" {= version}
]
synopsis: "Implementation and verification of safe conversion and typechecking algorithms for Coq"
description: """
MetaCoq is a meta-programming framework for Coq.
The SafeChecker modules provides a correct implementation of
weak-head reduction, conversion and typechecking of Coq definitions and global environments.
"""
url {
src: "https://github.com/MetaCoq/metacoq/archive/v1.0-alpha2-8.11.tar.gz"
checksum: "sha256=8f1d2b42ad97d7c8660a57aabe53ddcc7b1645ced43386a1d2bef428b20d6b42"
}
</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-metacoq-safechecker.1.0~alpha2+8.11 coq.8.7.1+2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.7.1+2).
The following dependencies couldn't be met:
- coq-metacoq-safechecker -> coq >= 8.11
Your request can't be satisfied:
- No available version of coq satisfies the constraints
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-metacoq-safechecker.1.0~alpha2+8.11</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': 'a0018fe9ee07665fe8d098e9c1bee28d', 'timestamp': '', 'source': 'github', 'line_count': 181, 'max_line_length': 159, 'avg_line_length': 42.70718232044199, 'alnum_prop': 0.559379042690815, 'repo_name': 'coq-bench/coq-bench.github.io', 'id': '01005e35bf9529a91ef793e7daa898dfb0139c08', 'size': '7756', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.08.1-2.0.5/released/8.7.1+2/metacoq-safechecker/1.0~alpha2+8.11.html', 'mode': '33188', 'license': 'mit', 'language': []} |
from tools.load import LoadMatrix
from sg import sg
lm=LoadMatrix()
traindat=lm.load_numbers('../data/fm_train_real.dat')
testdat=lm.load_numbers('../data/fm_test_real.dat')
parameter_list=[[traindat,testdat],[traindat,testdat]]
def distance_chebyshew (fm_train_real=traindat,fm_test_real=testdat):
sg('set_distance', 'CHEBYSHEW', 'REAL')
sg('set_features', 'TRAIN', fm_train_real)
dm=sg('get_distance_matrix', 'TRAIN')
sg('set_features', 'TEST', fm_test_real)
dm=sg('get_distance_matrix', 'TEST')
return dm
if __name__=='__main__':
print('ChebyshewMetric')
distance_chebyshew(*parameter_list[0])
| {'content_hash': '7352a8bf770a2ffe6363576badf5e07c', 'timestamp': '', 'source': 'github', 'line_count': 19, 'max_line_length': 69, 'avg_line_length': 32.0, 'alnum_prop': 0.7105263157894737, 'repo_name': 'Saurabh7/shogun', 'id': 'f9d85f9b18fd1311deb5eb930ee2b06227349edf', 'size': '608', 'binary': False, 'copies': '22', 'ref': 'refs/heads/master', 'path': 'examples/undocumented/python_static/distance_chebyshew.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '104870'}, {'name': 'C++', 'bytes': '11435353'}, {'name': 'CMake', 'bytes': '213091'}, {'name': 'Lua', 'bytes': '1204'}, {'name': 'M', 'bytes': '10020'}, {'name': 'Makefile', 'bytes': '452'}, {'name': 'Matlab', 'bytes': '66047'}, {'name': 'Perl', 'bytes': '31939'}, {'name': 'Perl6', 'bytes': '15714'}, {'name': 'Protocol Buffer', 'bytes': '1476'}, {'name': 'Python', 'bytes': '431160'}, {'name': 'R', 'bytes': '53362'}, {'name': 'Ruby', 'bytes': '59'}, {'name': 'Shell', 'bytes': '17074'}]} |
package com.microsoft.azure.management.containerregistry.v2018_09_01.implementation;
import com.microsoft.azure.management.containerregistry.v2018_09_01.RegistryListCredentialsResult;
import com.microsoft.azure.arm.model.implementation.WrapperImpl;
import java.util.List;
import com.microsoft.azure.management.containerregistry.v2018_09_01.RegistryPassword;
class RegistryListCredentialsResultImpl extends WrapperImpl<RegistryListCredentialsResultInner> implements RegistryListCredentialsResult {
private final ContainerRegistryManager manager;
RegistryListCredentialsResultImpl(RegistryListCredentialsResultInner inner, ContainerRegistryManager manager) {
super(inner);
this.manager = manager;
}
@Override
public ContainerRegistryManager manager() {
return this.manager;
}
@Override
public List<RegistryPassword> passwords() {
return this.inner().passwords();
}
@Override
public String username() {
return this.inner().username();
}
}
| {'content_hash': 'f271e571b4ebbe6f16dbe654aeb02c97', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 138, 'avg_line_length': 32.25, 'alnum_prop': 0.7693798449612403, 'repo_name': 'navalev/azure-sdk-for-java', 'id': '22b1714e3c9e4aecbc5a163771b03412d771ad09', 'size': '1262', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'sdk/containerregistry/mgmt-v2018_09_01/src/main/java/com/microsoft/azure/management/containerregistry/v2018_09_01/implementation/RegistryListCredentialsResultImpl.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '7230'}, {'name': 'CSS', 'bytes': '5411'}, {'name': 'Groovy', 'bytes': '1570436'}, {'name': 'HTML', 'bytes': '29221'}, {'name': 'Java', 'bytes': '250218562'}, {'name': 'JavaScript', 'bytes': '15605'}, {'name': 'PowerShell', 'bytes': '30924'}, {'name': 'Python', 'bytes': '42119'}, {'name': 'Shell', 'bytes': '1408'}]} |
//
// This code is part of the XPCOM extensions for Python.
//
// Written May 2000 by Mark Hammond.
//
// Based heavily on the Python COM support, which is
// (c) Mark Hammond and Greg Stein.
//
// (c) 2000, ActiveState corp.
#include "PyXPCOM_std.h"
#include "nsISupportsPrimitives.h"
static PRInt32 cInterfaces=0;
static PyObject *g_obFuncMakeInterfaceCount = NULL; // XXX - never released!!!
#ifdef VBOX_DEBUG_LIFETIMES
# include <iprt/log.h>
# include <iprt/stream.h>
/*static*/ RTLISTNODE Py_nsISupports::g_List;
/*static*/ RTONCE Py_nsISupports::g_Once = RTONCE_INITIALIZER;
/*static*/ RTCRITSECT Py_nsISupports::g_CritSect;
/*static*/ DECLCALLBACK(int32_t)
Py_nsISupports::initOnceCallback(void *pvUser1)
{
NOREF(pvUser1);
RTListInit(&g_List);
return RTCritSectInit(&g_CritSect);
}
/*static*/ void
Py_nsISupports::dumpList(void)
{
RTOnce(&g_Once, initOnceCallback, NULL);
RTCritSectEnter(&g_CritSect);
uint32_t i = 0;
Py_nsISupports *pCur;
RTListForEach(&g_List, pCur, Py_nsISupports, m_ListEntry)
{
nsISupports *pISup = pCur->m_obj;
PyXPCOM_LogWarning("#%u: %p iid=%RTuuid obj=%p", i, pCur, &pCur->m_iid, pISup);
i++;
}
RTCritSectLeave(&g_CritSect);
}
/*static*/ void
Py_nsISupports::dumpListToStdOut()
{
RTOnce(&g_Once, initOnceCallback, NULL);
RTCritSectEnter(&g_CritSect);
uint32_t i = 0;
Py_nsISupports *pCur;
RTListForEach(&g_List, pCur, Py_nsISupports, m_ListEntry)
{
nsISupports *pISup = pCur->m_obj;
RTPrintf("#%u: %p iid=%RTuuid obj=%p\n", i, pCur, &pCur->m_iid, pISup);
i++;
}
RTCritSectLeave(&g_CritSect);
}
PRInt32
_PyXPCOM_DumpInterfaces(void)
{
Py_nsISupports::dumpListToStdOut();
return NS_OK;
}
#endif /* _DEBUG_LIFETIMES */
PyObject *PyObject_FromNSInterface( nsISupports *aInterface,
const nsIID &iid,
PRBool bMakeNicePyObject /*= PR_TRUE */)
{
return Py_nsISupports::PyObjectFromInterface(aInterface, iid,
bMakeNicePyObject);
}
PRInt32
_PyXPCOM_GetInterfaceCount(void)
{
return cInterfaces;
}
Py_nsISupports::Py_nsISupports(nsISupports *punk, const nsIID &iid, PyTypeObject *this_type)
{
ob_type = this_type;
m_obj = punk;
m_iid = iid;
// refcnt of object managed by caller.
PR_AtomicIncrement(&cInterfaces);
PyXPCOM_DLLAddRef();
_Py_NewReference(this);
#ifdef VBOX_DEBUG_LIFETIMES
RTOnce(&g_Once, initOnceCallback, NULL);
RTCritSectEnter(&g_CritSect);
RTListAppend(&g_List, &m_ListEntry);
RTCritSectLeave(&g_CritSect);
PyXPCOM_LogWarning("Creating %p: iid=%RTuuid obj=%p", this, &m_iid, punk);
#endif
}
Py_nsISupports::~Py_nsISupports()
{
#ifdef VBOX_DEBUG_LIFETIMES
RTCritSectEnter(&g_CritSect);
nsISupports *punk = m_obj;
RTListNodeRemove(&m_ListEntry);
RTCritSectLeave(&g_CritSect);
PyXPCOM_LogWarning("Destroying %p: iid=%RTuuid obj=%p", this, &m_iid, punk);
#endif
SafeRelease(this);
PR_AtomicDecrement(&cInterfaces);
PyXPCOM_DLLRelease();
}
/*static*/ nsISupports *
Py_nsISupports::GetI(PyObject *self, nsIID *ret_iid)
{
if (self==NULL) {
PyErr_SetString(PyExc_ValueError, "The Python object is invalid");
return NULL;
}
Py_nsISupports *pis = (Py_nsISupports *)self;
if (pis->m_obj==NULL) {
// This should never be able to happen.
PyErr_SetString(PyExc_ValueError, "Internal Error - The XPCOM object has been released.");
return NULL;
}
if (ret_iid)
*ret_iid = pis->m_iid;
return pis->m_obj;
}
/*static*/ void
Py_nsISupports::SafeRelease(Py_nsISupports *ob)
{
if (!ob)
return;
if (ob->m_obj)
{
Py_BEGIN_ALLOW_THREADS;
ob->m_obj = nsnull;
Py_END_ALLOW_THREADS;
}
}
/* virtual */ PyObject *
Py_nsISupports::getattr(const char *name)
{
if (strcmp(name, "IID")==0)
return Py_nsIID::PyObjectFromIID( m_iid );
// Support for __unicode__ until we get a tp_unicode slot.
if (strcmp(name, "__unicode__")==0) {
nsresult rv;
PRUnichar *val = NULL;
Py_BEGIN_ALLOW_THREADS;
{ // scope to kill pointer while thread-lock released.
nsCOMPtr<nsISupportsString> ss( do_QueryInterface(m_obj, &rv ));
if (NS_SUCCEEDED(rv))
rv = ss->ToString(&val);
} // end-scope
Py_END_ALLOW_THREADS;
PyObject *ret = NS_FAILED(rv) ?
PyXPCOM_BuildPyException(rv) :
PyObject_FromNSString(val);
if (val) nsMemory::Free(val);
return ret;
}
PyXPCOM_TypeObject *this_type = (PyXPCOM_TypeObject *)ob_type;
return Py_FindMethodInChain(&this_type->chain, this, (char *)name);
}
/* virtual */ int
Py_nsISupports::setattr(const char *name, PyObject *v)
{
char buf[128];
#ifdef VBOX
snprintf(buf, sizeof(buf), "%s has read-only attributes", ob_type->tp_name );
#else
sprintf(buf, "%s has read-only attributes", ob_type->tp_name );
#endif
PyErr_SetString(PyExc_TypeError, buf);
return -1;
}
/*static*/ Py_nsISupports *
Py_nsISupports::Constructor(nsISupports *pInitObj, const nsIID &iid)
{
return new Py_nsISupports(pInitObj,
iid,
type);
}
PRBool
Py_nsISupports::InterfaceFromPyISupports(PyObject *ob,
const nsIID &iid,
nsISupports **ppv)
{
nsISupports *pis;
PRBool rc = PR_FALSE;
if ( !Check(ob) )
{
PyErr_Format(PyExc_TypeError, "Objects of type '%s' can not be used as COM objects", ob->ob_type->tp_name);
goto done;
}
nsIID already_iid;
pis = GetI(ob, &already_iid);
if ( !pis )
goto done; /* exception was set by GetI() */
/* note: we don't (yet) explicitly hold a reference to pis */
if (iid.Equals(Py_nsIID_NULL)) {
// a bit of a hack - we are asking for the arbitary interface
// wrapped by this object, not some other specific interface -
// so no QI, just an AddRef();
Py_BEGIN_ALLOW_THREADS
pis->AddRef();
Py_END_ALLOW_THREADS
*ppv = pis;
} else {
// specific interface requested - if it is not already the
// specific interface, QI for it and discard pis.
if (iid.Equals(already_iid)) {
*ppv = pis;
pis->AddRef();
} else {
nsresult r;
Py_BEGIN_ALLOW_THREADS
r = pis->QueryInterface(iid, (void **)ppv);
Py_END_ALLOW_THREADS
if ( NS_FAILED(r) )
{
PyXPCOM_BuildPyException(r);
goto done;
}
/* note: the QI added a ref for the return value */
}
}
rc = PR_TRUE;
done:
return rc;
}
PRBool
Py_nsISupports::InterfaceFromPyObject(PyObject *ob,
const nsIID &iid,
nsISupports **ppv,
PRBool bNoneOK,
PRBool bTryAutoWrap /* = PR_TRUE */)
{
if ( ob == NULL )
{
// don't overwrite an error message
if ( !PyErr_Occurred() )
PyErr_SetString(PyExc_TypeError, "The Python object is invalid");
return PR_FALSE;
}
if ( ob == Py_None )
{
if ( bNoneOK )
{
*ppv = NULL;
return PR_TRUE;
}
else
{
PyErr_SetString(PyExc_TypeError, "None is not a invalid interface object in this context");
return PR_FALSE;
}
}
// support nsIVariant
if (iid.Equals(NS_GET_IID(nsIVariant)) || iid.Equals(NS_GET_IID(nsIWritableVariant))) {
// Check it is not already nsIVariant
if (PyObject_HasAttrString(ob, "__class__")) {
PyObject *sub_ob = PyObject_GetAttrString(ob, "_comobj_");
if (sub_ob==NULL) {
PyErr_Clear();
} else {
if (InterfaceFromPyISupports(sub_ob, iid, ppv)) {
Py_DECREF(sub_ob);
return PR_TRUE;
}
PyErr_Clear();
Py_DECREF(sub_ob);
}
}
nsresult nr = PyObject_AsVariant(ob, (nsIVariant **)ppv);
if (NS_FAILED(nr)) {
PyXPCOM_BuildPyException(nr);
return PR_FALSE;
}
NS_ASSERTION(ppv != nsnull, "PyObject_AsVariant worked but gave null!");
return PR_TRUE;
}
// end of variant support.
if (PyObject_HasAttrString(ob, "__class__")) {
// Get the _comobj_ attribute
PyObject *use_ob = PyObject_GetAttrString(ob, "_comobj_");
if (use_ob==NULL) {
PyErr_Clear();
if (bTryAutoWrap)
// Try and auto-wrap it - errors will leave Py exception set,
return PyXPCOM_XPTStub::AutoWrapPythonInstance(ob, iid, ppv);
PyErr_SetString(PyExc_TypeError, "The Python instance can not be converted to an XPCOM object");
return PR_FALSE;
} else
ob = use_ob;
} else {
Py_INCREF(ob);
}
PRBool rc = InterfaceFromPyISupports(ob, iid, ppv);
Py_DECREF(ob);
return rc;
}
// Interface conversions
/*static*/void
Py_nsISupports::RegisterInterface( const nsIID &iid, PyTypeObject *t)
{
if (mapIIDToType==NULL)
mapIIDToType = PyDict_New();
if (mapIIDToType) {
PyObject *key = Py_nsIID::PyObjectFromIID(iid);
if (key)
PyDict_SetItem(mapIIDToType, key, (PyObject *)t);
Py_XDECREF(key);
}
}
/*static */PyObject *
Py_nsISupports::PyObjectFromInterface(nsISupports *pis,
const nsIID &riid,
PRBool bMakeNicePyObject, /* = PR_TRUE */
PRBool bIsInternalCall /* = PR_FALSE */)
{
// Quick exit.
if (pis==NULL) {
Py_INCREF(Py_None);
return Py_None;
}
if (!bIsInternalCall) {
#ifdef NS_DEBUG
nsISupports *queryResult = nsnull;
Py_BEGIN_ALLOW_THREADS;
pis->QueryInterface(riid, (void **)&queryResult);
Py_END_ALLOW_THREADS;
NS_ASSERTION(queryResult == pis, "QueryInterface needed");
NS_IF_RELEASE(queryResult);
#endif
}
PyTypeObject *createType = NULL;
// If the IID is for nsISupports, dont bother with
// a map lookup as we know the type!
if (!riid.Equals(NS_GET_IID(nsISupports))) {
// Look up the map
PyObject *obiid = Py_nsIID::PyObjectFromIID(riid);
if (!obiid) return NULL;
if (mapIIDToType != NULL)
createType = (PyTypeObject *)PyDict_GetItem(mapIIDToType, obiid);
Py_DECREF(obiid);
}
if (createType==NULL)
createType = Py_nsISupports::type;
// Check it is indeed one of our types.
if (!PyXPCOM_TypeObject::IsType(createType)) {
PyErr_SetString(PyExc_RuntimeError, "The type map is invalid");
return NULL;
}
// we can now safely cast the thing to a PyComTypeObject and use it
PyXPCOM_TypeObject *myCreateType = (PyXPCOM_TypeObject *)createType;
if (myCreateType->ctor==NULL) {
PyErr_SetString(PyExc_TypeError, "The type does not declare a PyCom constructor");
return NULL;
}
Py_nsISupports *ret = (*myCreateType->ctor)(pis, riid);
#ifdef _DEBUG_LIFETIMES
PyXPCOM_LogF("XPCOM Object created at 0x%0xld, nsISupports at 0x%0xld",
ret, ret->m_obj);
#endif
if (ret && bMakeNicePyObject)
return MakeDefaultWrapper(ret, riid);
return ret;
}
// Call back into Python, passing a raw nsIInterface object, getting back
// the object to actually pass to Python.
PyObject *
Py_nsISupports::MakeDefaultWrapper(PyObject *pyis,
const nsIID &iid)
{
NS_PRECONDITION(pyis, "NULL pyobject!");
PyObject *obIID = NULL;
PyObject *args = NULL;
PyObject *mod = NULL;
PyObject *ret = NULL;
obIID = Py_nsIID::PyObjectFromIID(iid);
if (obIID==NULL)
goto done;
if (g_obFuncMakeInterfaceCount==NULL) {
PyObject *mod = PyImport_ImportModule("xpcom.client");
if (mod)
g_obFuncMakeInterfaceCount = PyObject_GetAttrString(mod, "MakeInterfaceResult");
Py_XDECREF(mod);
}
if (g_obFuncMakeInterfaceCount==NULL) goto done;
args = Py_BuildValue("OO", pyis, obIID);
if (args==NULL) goto done;
ret = PyEval_CallObject(g_obFuncMakeInterfaceCount, args);
done:
if (PyErr_Occurred()) {
NS_ABORT_IF_FALSE(ret==NULL, "Have an error, but also a return val!");
PyXPCOM_LogError("Creating an interface object to be used as a result failed\n");
PyErr_Clear();
}
Py_XDECREF(mod);
Py_XDECREF(args);
Py_XDECREF(obIID);
if (ret==NULL) // eek - error - return the original with no refcount mod.
ret = pyis;
else
// no error - decref the old object
Py_DECREF(pyis);
// return our obISupports. If NULL, we are really hosed and nothing we can do.
return ret;
}
// @pymethod <o Py_nsISupports>|Py_nsISupports|QueryInterface|Queries an object for a specific interface.
PyObject *
Py_nsISupports::QueryInterface(PyObject *self, PyObject *args)
{
PyObject *obiid;
int bWrap = 1;
// @pyparm IID|iid||The IID requested.
// @rdesc The result is always a <o Py_nsISupports> object.
// Any error (including E_NOINTERFACE) will generate a <o com_error> exception.
if (!PyArg_ParseTuple(args, "O|i:QueryInterface", &obiid, &bWrap))
return NULL;
nsIID iid;
if (!Py_nsIID::IIDFromPyObject(obiid, &iid))
return NULL;
nsISupports *pMyIS = GetI(self);
if (pMyIS==NULL) return NULL;
// Optimization, If we already wrap the IID, just return
// ourself.
if (!bWrap && iid.Equals(((Py_nsISupports *)self)->m_iid)) {
Py_INCREF(self);
return self;
}
nsCOMPtr<nsISupports> pis;
nsresult r;
Py_BEGIN_ALLOW_THREADS;
r = pMyIS->QueryInterface(iid, getter_AddRefs(pis));
Py_END_ALLOW_THREADS;
/* Note that this failure may include E_NOINTERFACE */
if ( NS_FAILED(r) )
return PyXPCOM_BuildPyException(r);
/* Return a type based on the IID (with no extra ref) */
return ((Py_nsISupports *)self)->MakeInterfaceResult(pis, iid, (PRBool)bWrap);
}
#ifdef VBOX
static PyObject *
QueryErrorObject(PyObject *self, PyObject *args)
{
nsresult rc = 0;
if (!PyArg_ParseTuple(args, "i", &rc))
return NULL;
return PyXPCOM_BuildErrorMessage(rc);
}
#endif
// @object Py_nsISupports|The base object for all PythonCOM objects. Wraps a COM nsISupports interface.
/*static*/ struct PyMethodDef
Py_nsISupports::methods[] =
{
{ "queryInterface", Py_nsISupports::QueryInterface, 1, "Queries the object for an interface."},
{ "QueryInterface", Py_nsISupports::QueryInterface, 1, "An alias for queryInterface."},
#ifdef VBOX
{ "QueryErrorObject", QueryErrorObject, 1, "Query an error object for given status code."},
#endif
{NULL}
};
/*static*/void Py_nsISupports::InitType(void)
{
type = new PyXPCOM_TypeObject(
"nsISupports",
NULL,
sizeof(Py_nsISupports),
methods,
Constructor);
}
PyXPCOM_TypeObject *Py_nsISupports::type = NULL;
PyObject *Py_nsISupports::mapIIDToType = NULL;
| {'content_hash': '4c2f6db380c23b6a2ddbb412ac283e40', 'timestamp': '', 'source': 'github', 'line_count': 530, 'max_line_length': 109, 'avg_line_length': 26.039622641509435, 'alnum_prop': 0.6710383305557568, 'repo_name': 'egraba/vbox_openbsd', 'id': 'f848dff705ce95ec73a5c8c19aa4fed0862f0670', 'size': '15567', 'binary': False, 'copies': '8', 'ref': 'refs/heads/master', 'path': 'VirtualBox-5.0.0/src/libs/xpcom18a4/python/src/PyISupports.cpp', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Ada', 'bytes': '88714'}, {'name': 'Assembly', 'bytes': '4303680'}, {'name': 'AutoIt', 'bytes': '2187'}, {'name': 'Batchfile', 'bytes': '95534'}, {'name': 'C', 'bytes': '192632221'}, {'name': 'C#', 'bytes': '64255'}, {'name': 'C++', 'bytes': '83842667'}, {'name': 'CLIPS', 'bytes': '5291'}, {'name': 'CMake', 'bytes': '6041'}, {'name': 'CSS', 'bytes': '26756'}, {'name': 'D', 'bytes': '41844'}, {'name': 'DIGITAL Command Language', 'bytes': '56579'}, {'name': 'DTrace', 'bytes': '1466646'}, {'name': 'GAP', 'bytes': '350327'}, {'name': 'Groff', 'bytes': '298540'}, {'name': 'HTML', 'bytes': '467691'}, {'name': 'IDL', 'bytes': '106734'}, {'name': 'Java', 'bytes': '261605'}, {'name': 'JavaScript', 'bytes': '80927'}, {'name': 'Lex', 'bytes': '25122'}, {'name': 'Logos', 'bytes': '4941'}, {'name': 'Makefile', 'bytes': '426902'}, {'name': 'Module Management System', 'bytes': '2707'}, {'name': 'NSIS', 'bytes': '177212'}, {'name': 'Objective-C', 'bytes': '5619792'}, {'name': 'Objective-C++', 'bytes': '81554'}, {'name': 'PHP', 'bytes': '58585'}, {'name': 'Pascal', 'bytes': '69941'}, {'name': 'Perl', 'bytes': '240063'}, {'name': 'PowerShell', 'bytes': '10664'}, {'name': 'Python', 'bytes': '9094160'}, {'name': 'QMake', 'bytes': '3055'}, {'name': 'R', 'bytes': '21094'}, {'name': 'SAS', 'bytes': '1847'}, {'name': 'Shell', 'bytes': '1460572'}, {'name': 'SourcePawn', 'bytes': '4139'}, {'name': 'TypeScript', 'bytes': '142342'}, {'name': 'Visual Basic', 'bytes': '7161'}, {'name': 'XSLT', 'bytes': '1034475'}, {'name': 'Yacc', 'bytes': '22312'}]} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Coq bench</title>
<link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
<link href="../../../../../bootstrap.min.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">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<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="../../..">Unstable</a></li>
<li><a href=".">hott / contrib:orb-stab dev</a></li>
<li class="active"><a href="">2014-12-17 15:25:52</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="../../../../../about.html">About</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href=".">« Up</a>
<h1>
contrib:orb-stab
<small>
dev
<span class="label label-danger">Error</span>
</small>
</h1>
<p><em><script>document.write(moment("2014-12-17 15:25:52 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2014-12-17 15:25:52 UTC)</em><p>
<h2>Lint</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>ruby lint.rb unstable ../unstable/packages/coq:contrib:orb-stab/coq:contrib:orb-stab.dev</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>0 s</dd>
<dt>Output</dt>
<dd><pre>The package is valid.
</pre></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 --dry-run coq:contrib:orb-stab.dev coq.hott</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>1 s</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is hott).
The following actions will be performed:
- install coq:contrib:orb-stab.dev
=== 1 to install ===
=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Building coq:contrib:orb-stab.dev:
coq_makefile -f Make -o Makefile
make -j4
make install
Installing coq:contrib:orb-stab.dev.
</pre></dd>
</dl>
<p>Dry install without Coq, to test if the problem was incompatibility with the current Coq version:</p>
<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 dependencies</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --deps-only coq:contrib:orb-stab.dev</code></dd>
<dt>Return code</dt>
<dd>0</dd>
<dt>Duration</dt>
<dd>2 s</dd>
</dl>
<h2>Install</h2>
<dl class="dl-horizontal">
<dt>Command</dt>
<dd><code>opam install -y --verbose coq:contrib:orb-stab.dev</code></dd>
<dt>Return code</dt>
<dd>1024</dd>
<dt>Duration</dt>
<dd>2 s</dd>
<dt>Output</dt>
<dd><pre>The following actions will be performed:
- install coq:contrib:orb-stab.dev
=== 1 to install ===
=-=- Synchronizing package archives -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
[coq:contrib:orb-stab] Fetching https://gforge.inria.fr/git/coq-contribs/orb-stab.git#trunk
Initialized empty Git repository in /home/bench/.opam/packages.dev/coq:contrib:orb-stab.dev/.git/
[master (root-commit) 90a6b13] opam-git-init
From https://gforge.inria.fr/git/coq-contribs/orb-stab
* [new branch] trunk -> opam-ref
* [new branch] trunk -> origin/trunk
COPYING
COPYING.LESSER
Make
Makefile
description
orbstab.v
HEAD is now at 19f68b7 Revert "Regenerating Makefiles." We will be able to do so when we have access
=-=- Installing packages =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Building coq:contrib:orb-stab.dev:
coq_makefile -f Make -o Makefile
make -j4
make install
Warning: in option -R, ../../Nijmegen/LinAlg is not a subdirectory of the current directory
Warning: install rule assumes that -R/-Q . _ is the only -R/-Q optionWarning: install rule assumes that -R/-Q . _ is the only -R/-Q optionWarning: -R/-Q options don't have a correct common prefix,
install-doc will put anything in $INSTALLDEFAULTROOT
"coqdep" -c -R "../../Nijmegen/LinAlg" LinAlg -R "../../Sophia-Antipolis/Algebra" Algebra -R "." OrbStab "orbstab.v" > "orbstab.v.d" || ( RV=$?; rm -f "orbstab.v.d"; exit ${RV} )
coqdep: "opendir" failed on "../../Nijmegen/LinAlg": No such file or directory
"coqc" -q -R "../../Nijmegen/LinAlg" LinAlg -R "../../Sophia-Antipolis/Algebra" Algebra -R "." OrbStab orbstab
Warning: Cannot open ../../Nijmegen/LinAlg
Warning: Cannot open ../../Sophia-Antipolis/Algebra
File "./orbstab.v", line 21, characters 0-26:
Error: Cannot find library Group_util in loadpath
make: *** [orbstab.vo] Error 1
Makefile:228: recipe for target 'orbstab.vo' failed
[ERROR] The compilation of coq:contrib:orb-stab.dev failed.
Removing coq:contrib:orb-stab.dev.
rm -R /home/bench/.opam/system/lib/coq/user-contrib/orb-stab
rm: cannot remove '/home/bench/.opam/system/lib/coq/user-contrib/orb-stab': No such file or directory
#=== ERROR while installing coq:contrib:orb-stab.dev ==========================#
# opam-version 1.2.0
# os linux
# command make -j4
# path /home/bench/.opam/system/build/coq:contrib:orb-stab.dev
# compiler system (4.02.1)
# exit-code 2
# env-file /home/bench/.opam/system/build/coq:contrib:orb-stab.dev/coq:contrib:orb-stab-22794-d2c37b.env
# stdout-file /home/bench/.opam/system/build/coq:contrib:orb-stab.dev/coq:contrib:orb-stab-22794-d2c37b.out
# stderr-file /home/bench/.opam/system/build/coq:contrib:orb-stab.dev/coq:contrib:orb-stab-22794-d2c37b.err
### stdout ###
# "coqdep" -c -R "../../Nijmegen/LinAlg" LinAlg -R "../../Sophia-Antipolis/Algebra" Algebra -R "." OrbStab "orbstab.v" > "orbstab.v.d" || ( RV=$?; rm -f "orbstab.v.d"; exit ${RV} )
# "coqc" -q -R "../../Nijmegen/LinAlg" LinAlg -R "../../Sophia-Antipolis/Algebra" Algebra -R "." OrbStab orbstab
# Makefile:228: recipe for target 'orbstab.vo' failed
### stderr ###
# Warning: in option -R, ../../Nijmegen/LinAlg is not a subdirectory of the current directory
# Warning: install rule assumes that -R/-Q . _ is the only -R/-Q optionWarning: install rule assumes that -R/-Q . _ is the only -R/-Q optionWarning: -R/-Q options don't have a correct common prefix,
# install-doc will put anything in $INSTALLDEFAULTROOT
# coqdep: "opendir" failed on "../../Nijmegen/LinAlg": No such file or directory
# Warning: Cannot open ../../Nijmegen/LinAlg
# Warning: Cannot open ../../Sophia-Antipolis/Algebra
# File "./orbstab.v", line 21, characters 0-26:
# Error: Cannot find library Group_util in loadpath
# make: *** [orbstab.vo] Error 1
'opam install -y --verbose coq:contrib:orb-stab.dev' failed.
</pre></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>Duration</dt>
<dd>0 s</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': '7e7fd17516b9d0179d83299f497d276f', 'timestamp': '', 'source': 'github', 'line_count': 214, 'max_line_length': 253, 'avg_line_length': 47.83644859813084, 'alnum_prop': 0.5609065155807366, 'repo_name': 'coq-bench/coq-bench.github.io-old', 'id': 'd42af6df86c8f1413957e757136e3ced387194b6', 'size': '10239', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.02.1-1.2.0/unstable/hott/contrib:orb-stab/dev/2014-12-17_15-25-52.html', 'mode': '33188', 'license': 'mit', 'language': []} |
////////////////////////////////////////////////////////////////////////////////
/// DISCLAIMER
///
/// Copyright 2016 ArangoDB GmbH, Cologne, Germany
///
/// Licensed under the Apache License, Version 2.0 (the "License");
/// you may not use this file except in compliance with the License.
/// You may obtain a copy of the License at
///
/// http://www.apache.org/licenses/LICENSE-2.0
///
/// Unless required by applicable law or agreed to in writing, software
/// distributed under the License is distributed on an "AS IS" BASIS,
/// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
/// See the License for the specific language governing permissions and
/// limitations under the License.
///
/// Copyright holder is ArangoDB GmbH, Cologne, Germany
///
/// @author Jan Steemann
////////////////////////////////////////////////////////////////////////////////
#include "ViewTypesFeature.h"
#include "ApplicationFeatures/ApplicationServer.h"
#include "Basics/StaticStrings.h"
#include "Basics/VelocyPackHelper.h"
#include "FeaturePhases/BasicFeaturePhaseServer.h"
#include "ProgramOptions/ProgramOptions.h"
#include "ProgramOptions/Section.h"
#include "RestServer/BootstrapFeature.h"
#include "Utils/Events.h"
namespace {
struct InvalidViewFactory : public arangodb::ViewFactory {
virtual arangodb::Result create(arangodb::LogicalView::ptr&, TRI_vocbase_t& vocbase,
arangodb::velocypack::Slice const& definition) const override {
std::string name;
if (definition.isObject()) {
name = arangodb::basics::VelocyPackHelper::getStringValue(
definition, arangodb::StaticStrings::DataSourceName, "");
}
arangodb::events::CreateView(vocbase.name(), name, TRI_ERROR_INTERNAL);
return arangodb::Result(
TRI_ERROR_BAD_PARAMETER,
std::string(
"invalid type provided to create view with definition: ") +
definition.toString());
}
virtual arangodb::Result instantiate(arangodb::LogicalView::ptr&, TRI_vocbase_t&,
arangodb::velocypack::Slice const& definition,
uint64_t) const override {
return arangodb::Result(
TRI_ERROR_BAD_PARAMETER,
std::string(
"invalid type provided to instantiate view with definition: ") +
definition.toString());
}
};
std::string const FEATURE_NAME("ViewTypes");
InvalidViewFactory const INVALID;
} // namespace
namespace arangodb {
ViewTypesFeature::ViewTypesFeature(application_features::ApplicationServer& server)
: application_features::ApplicationFeature(server, ViewTypesFeature::name()) {
setOptional(false);
startsAfter<application_features::BasicFeaturePhaseServer>();
}
Result ViewTypesFeature::emplace(LogicalDataSource::Type const& type,
ViewFactory const& factory) {
// ensure new factories are not added at runtime since that would require
// additional locks
if (server().hasFeature<BootstrapFeature>()) {
auto& bootstrapFeature = server().getFeature<BootstrapFeature>();
if (bootstrapFeature.isReady()) {
return arangodb::Result(TRI_ERROR_INTERNAL,
std::string("view factory registration is only "
"allowed during server startup"));
}
}
if (!isEnabled()) { // should not be called
TRI_ASSERT(false);
return arangodb::Result();
}
if (!_factories.emplace(&type, &factory).second) {
return arangodb::Result(TRI_ERROR_ARANGO_DUPLICATE_IDENTIFIER, std::string("view factory previously registered during view factory "
"registration for view type '") +
type.name() +
"'");
}
return arangodb::Result();
}
ViewFactory const& ViewTypesFeature::factory(LogicalDataSource::Type const& type) const noexcept {
auto itr = _factories.find(&type);
TRI_ASSERT(itr == _factories.end() || false == !(itr->second)); // ViewTypesFeature::emplace(...)
// inserts non-nullptr
return itr == _factories.end() ? INVALID : *(itr->second);
}
/*static*/ std::string const& ViewTypesFeature::name() { return FEATURE_NAME; }
void ViewTypesFeature::prepare() {}
void ViewTypesFeature::unprepare() { _factories.clear(); }
} // namespace arangodb
// -----------------------------------------------------------------------------
// --SECTION-- END-OF-FILE
// -----------------------------------------------------------------------------
| {'content_hash': 'a2f1e46335a945a180aec402bb9cb746', 'timestamp': '', 'source': 'github', 'line_count': 123, 'max_line_length': 136, 'avg_line_length': 39.3089430894309, 'alnum_prop': 0.5838676318510858, 'repo_name': 'fceller/arangodb', 'id': 'e19cab3ba5de2368471d85afa4f48708bddd7547', 'size': '4835', 'binary': False, 'copies': '1', 'ref': 'refs/heads/devel', 'path': 'arangod/RestServer/ViewTypesFeature.cpp', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Ada', 'bytes': '89080'}, {'name': 'AppleScript', 'bytes': '1429'}, {'name': 'Assembly', 'bytes': '142084'}, {'name': 'Batchfile', 'bytes': '9073'}, {'name': 'C', 'bytes': '1938354'}, {'name': 'C#', 'bytes': '55625'}, {'name': 'C++', 'bytes': '79379178'}, {'name': 'CLIPS', 'bytes': '5291'}, {'name': 'CMake', 'bytes': '109718'}, {'name': 'CSS', 'bytes': '1341035'}, {'name': 'CoffeeScript', 'bytes': '94'}, {'name': 'DIGITAL Command Language', 'bytes': '27303'}, {'name': 'Emacs Lisp', 'bytes': '15477'}, {'name': 'Go', 'bytes': '1018005'}, {'name': 'Groff', 'bytes': '263567'}, {'name': 'HTML', 'bytes': '459886'}, {'name': 'JavaScript', 'bytes': '55446690'}, {'name': 'LLVM', 'bytes': '39361'}, {'name': 'Lua', 'bytes': '16189'}, {'name': 'Makefile', 'bytes': '178253'}, {'name': 'Module Management System', 'bytes': '1545'}, {'name': 'NSIS', 'bytes': '26909'}, {'name': 'Objective-C', 'bytes': '4430'}, {'name': 'Objective-C++', 'bytes': '1857'}, {'name': 'Pascal', 'bytes': '145262'}, {'name': 'Perl', 'bytes': '227308'}, {'name': 'Protocol Buffer', 'bytes': '5837'}, {'name': 'Python', 'bytes': '3563935'}, {'name': 'Ruby', 'bytes': '1000962'}, {'name': 'SAS', 'bytes': '1847'}, {'name': 'Scheme', 'bytes': '19885'}, {'name': 'Shell', 'bytes': '488846'}, {'name': 'VimL', 'bytes': '4075'}, {'name': 'Yacc', 'bytes': '36950'}]} |
<?php
namespace PhpOffice\PhpSpreadsheet\Writer\Pdf;
use PhpOffice\PhpSpreadsheet\Exception as PhpSpreadsheetException;
use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup;
use PhpOffice\PhpSpreadsheet\Writer\Pdf;
class Mpdf extends Pdf
{
/**
* Gets the implementation of external PDF library that should be used.
*
* @param array $config Configuration array
*
* @return \Mpdf\Mpdf implementation
*/
protected function createExternalWriterInstance($config)
{
return new \Mpdf\Mpdf($config);
}
/**
* Save Spreadsheet to file.
*
* @param string $pFilename Name of the file to save as
*
* @throws \PhpOffice\PhpSpreadsheet\Writer\Exception
* @throws PhpSpreadsheetException
*/
public function save($pFilename)
{
$fileHandle = parent::prepareForSave($pFilename);
// Default PDF paper size
$paperSize = 'LETTER'; // Letter (8.5 in. by 11 in.)
// Check for paper size and page orientation
if (null === $this->getSheetIndex()) {
$orientation = ($this->spreadsheet->getSheet(0)->getPageSetup()->getOrientation()
== PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
$printPaperSize = $this->spreadsheet->getSheet(0)->getPageSetup()->getPaperSize();
} else {
$orientation = ($this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getOrientation()
== PageSetup::ORIENTATION_LANDSCAPE) ? 'L' : 'P';
$printPaperSize = $this->spreadsheet->getSheet($this->getSheetIndex())->getPageSetup()->getPaperSize();
}
$this->setOrientation($orientation);
// Override Page Orientation
if (null !== $this->getOrientation()) {
$orientation = ($this->getOrientation() == PageSetup::ORIENTATION_DEFAULT)
? PageSetup::ORIENTATION_PORTRAIT
: $this->getOrientation();
}
$orientation = strtoupper($orientation);
// Override Paper Size
if (null !== $this->getPaperSize()) {
$printPaperSize = $this->getPaperSize();
}
if (isset(self::$paperSizes[$printPaperSize])) {
$paperSize = self::$paperSizes[$printPaperSize];
}
// Create PDF
$config = ['tempDir' => $this->tempDir];
$pdf = $this->createExternalWriterInstance($config);
$ortmp = $orientation;
$pdf->_setPageSize(strtoupper($paperSize), $ortmp);
$pdf->DefOrientation = $orientation;
$pdf->AddPageByArray([
'orientation' => $orientation,
'margin-left' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getLeft()),
'margin-right' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getRight()),
'margin-top' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getTop()),
'margin-bottom' => $this->inchesToMm($this->spreadsheet->getActiveSheet()->getPageMargins()->getBottom()),
]);
// Document info
$pdf->SetTitle($this->spreadsheet->getProperties()->getTitle());
$pdf->SetAuthor($this->spreadsheet->getProperties()->getCreator());
$pdf->SetSubject($this->spreadsheet->getProperties()->getSubject());
$pdf->SetKeywords($this->spreadsheet->getProperties()->getKeywords());
$pdf->SetCreator($this->spreadsheet->getProperties()->getCreator());
$pdf->WriteHTML($this->generateHTMLHeader(false));
$html = $this->generateSheetData();
foreach (\array_chunk(\explode(PHP_EOL, $html), 1000) as $lines) {
$pdf->WriteHTML(\implode(PHP_EOL, $lines));
}
$pdf->WriteHTML($this->generateHTMLFooter());
// Write to file
fwrite($fileHandle, $pdf->Output('', 'S'));
parent::restoreStateAfterSave($fileHandle);
}
/**
* Convert inches to mm.
*
* @param float $inches
*
* @return float
*/
private function inchesToMm($inches)
{
return $inches * 25.4;
}
}
| {'content_hash': 'cd7830f77277964f3eb6b49db10a5597', 'timestamp': '', 'source': 'github', 'line_count': 112, 'max_line_length': 118, 'avg_line_length': 37.107142857142854, 'alnum_prop': 0.6003368623676613, 'repo_name': 'vthawat/study_outside', 'id': 'fd2664a8238db3780f70ce3292cd9fb1026e8045', 'size': '4156', 'binary': False, 'copies': '59', 'ref': 'refs/heads/master', 'path': 'vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Writer/Pdf/Mpdf.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '899744'}, {'name': 'HTML', 'bytes': '5633'}, {'name': 'Hack', 'bytes': '687'}, {'name': 'JavaScript', 'bytes': '3264011'}, {'name': 'PHP', 'bytes': '2042320'}]} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_09) on Thu May 02 19:56:12 YAKT 2013 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title>Uses of Class org.cloudbus.cloudsim.power.models.PowerModelSqrt (cloudsim 3.0.3 API)</title>
<meta name="date" content="2013-05-02">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.cloudbus.cloudsim.power.models.PowerModelSqrt (cloudsim 3.0.3 API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/cloudbus/cloudsim/power/models/PowerModelSqrt.html" title="class in org.cloudbus.cloudsim.power.models">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/cloudbus/cloudsim/power/models/class-use/PowerModelSqrt.html" target="_top">Frames</a></li>
<li><a href="PowerModelSqrt.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Class org.cloudbus.cloudsim.power.models.PowerModelSqrt" class="title">Uses of Class<br>org.cloudbus.cloudsim.power.models.PowerModelSqrt</h2>
</div>
<div class="classUseContainer">No usage of org.cloudbus.cloudsim.power.models.PowerModelSqrt</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/cloudbus/cloudsim/power/models/PowerModelSqrt.html" title="class in org.cloudbus.cloudsim.power.models">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/cloudbus/cloudsim/power/models/class-use/PowerModelSqrt.html" target="_top">Frames</a></li>
<li><a href="PowerModelSqrt.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2013 <a href="http://cloudbus.org/">The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne</a>. All Rights Reserved.</small></p>
</body>
</html>
| {'content_hash': '7d27bdcdef2db8acbd9dc04fca1eb634', 'timestamp': '', 'source': 'github', 'line_count': 117, 'max_line_length': 211, 'avg_line_length': 39.598290598290596, 'alnum_prop': 0.6229225124109649, 'repo_name': 'bikash/NashBargaining', 'id': '20d3c0e793415b22986b365e2a22fe52f0920bd4', 'size': '4633', 'binary': False, 'copies': '17', 'ref': 'refs/heads/master', 'path': 'cloudsim-3.0.3/docs/org/cloudbus/cloudsim/power/models/class-use/PowerModelSqrt.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '22278'}, {'name': 'HTML', 'bytes': '53422849'}, {'name': 'Java', 'bytes': '1463140'}, {'name': 'R', 'bytes': '148'}]} |
package collector_mongod
import (
"time"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/common/log"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
var (
instanceUptimeSeconds = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: Namespace,
Subsystem: "instance",
Name: "uptime_seconds",
Help: "The value of the uptime field corresponds to the number of seconds that the mongos or mongod process has been active.",
})
instanceUptimeEstimateSeconds = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: Namespace,
Subsystem: "instance",
Name: "uptime_estimate_seconds",
Help: "uptimeEstimate provides the uptime as calculated from MongoDB's internal course-grained time keeping system.",
})
instanceLocalTime = prometheus.NewCounter(prometheus.CounterOpts{
Namespace: Namespace,
Subsystem: "instance",
Name: "local_time",
Help: "The localTime value is the current time, according to the server, in UTC specified in an ISODate format.",
})
)
// ServerStatus keeps the data returned by the serverStatus() method.
type ServerStatus struct {
Uptime float64 `bson:"uptime"`
UptimeEstimate float64 `bson:"uptimeEstimate"`
LocalTime time.Time `bson:"localTime"`
Asserts *AssertsStats `bson:"asserts"`
Dur *DurStats `bson:"dur"`
BackgroundFlushing *FlushStats `bson:"backgroundFlushing"`
Connections *ConnectionStats `bson:"connections"`
ExtraInfo *ExtraInfo `bson:"extra_info"`
GlobalLock *GlobalLockStats `bson:"globalLock"`
IndexCounter *IndexCounterStats `bson:"indexCounters"`
Locks LockStatsMap `bson:"locks,omitempty"`
Network *NetworkStats `bson:"network"`
Opcounters *OpcountersStats `bson:"opcounters"`
OpcountersRepl *OpcountersReplStats `bson:"opcountersRepl"`
Mem *MemStats `bson:"mem"`
Metrics *MetricsStats `bson:"metrics"`
Cursors *Cursors `bson:"cursors"`
StorageEngine *StorageEngineStats `bson:"storageEngine"`
InMemory *WiredTigerStats `bson:"inMemory"`
RocksDb *RocksDbStats `bson:"rocksdb"`
WiredTiger *WiredTigerStats `bson:"wiredTiger"`
}
// Export exports the server status to be consumed by prometheus.
func (status *ServerStatus) Export(ch chan<- prometheus.Metric) {
instanceUptimeSeconds.Set(status.Uptime)
instanceUptimeEstimateSeconds.Set(status.Uptime)
instanceLocalTime.Set(float64(status.LocalTime.Unix()))
instanceUptimeSeconds.Collect(ch)
instanceUptimeEstimateSeconds.Collect(ch)
instanceLocalTime.Collect(ch)
if status.Asserts != nil {
status.Asserts.Export(ch)
}
if status.Dur != nil {
status.Dur.Export(ch)
}
if status.BackgroundFlushing != nil {
status.BackgroundFlushing.Export(ch)
}
if status.Connections != nil {
status.Connections.Export(ch)
}
if status.ExtraInfo != nil {
status.ExtraInfo.Export(ch)
}
if status.GlobalLock != nil {
status.GlobalLock.Export(ch)
}
if status.IndexCounter != nil {
status.IndexCounter.Export(ch)
}
if status.Network != nil {
status.Network.Export(ch)
}
if status.Opcounters != nil {
status.Opcounters.Export(ch)
}
if status.OpcountersRepl != nil {
status.OpcountersRepl.Export(ch)
}
if status.Mem != nil {
status.Mem.Export(ch)
}
if status.Locks != nil {
status.Locks.Export(ch)
}
if status.Metrics != nil {
status.Metrics.Export(ch)
}
if status.Cursors != nil {
status.Cursors.Export(ch)
}
if status.InMemory != nil {
status.InMemory.Export(ch)
}
if status.RocksDb != nil {
status.RocksDb.Export(ch)
}
if status.WiredTiger != nil {
status.WiredTiger.Export(ch)
}
// If db.serverStatus().storageEngine does not exist (3.0+ only) and status.BackgroundFlushing does (MMAPv1 only), default to mmapv1
// https://docs.mongodb.com/v3.0/reference/command/serverStatus/#storageengine
if status.StorageEngine == nil && status.BackgroundFlushing != nil {
status.StorageEngine = &StorageEngineStats{
Name: "mmapv1",
}
}
if status.StorageEngine != nil {
status.StorageEngine.Export(ch)
}
}
// Describe describes the server status for prometheus.
func (status *ServerStatus) Describe(ch chan<- *prometheus.Desc) {
instanceUptimeSeconds.Describe(ch)
instanceUptimeEstimateSeconds.Describe(ch)
instanceLocalTime.Describe(ch)
if status.Asserts != nil {
status.Asserts.Describe(ch)
}
if status.Dur != nil {
status.Dur.Describe(ch)
}
if status.BackgroundFlushing != nil {
status.BackgroundFlushing.Describe(ch)
}
if status.Connections != nil {
status.Connections.Describe(ch)
}
if status.ExtraInfo != nil {
status.ExtraInfo.Describe(ch)
}
if status.GlobalLock != nil {
status.GlobalLock.Describe(ch)
}
if status.IndexCounter != nil {
status.IndexCounter.Describe(ch)
}
if status.Network != nil {
status.Network.Describe(ch)
}
if status.Opcounters != nil {
status.Opcounters.Describe(ch)
}
if status.OpcountersRepl != nil {
status.OpcountersRepl.Describe(ch)
}
if status.Mem != nil {
status.Mem.Describe(ch)
}
if status.Locks != nil {
status.Locks.Describe(ch)
}
if status.Metrics != nil {
status.Metrics.Describe(ch)
}
if status.Cursors != nil {
status.Cursors.Describe(ch)
}
if status.StorageEngine != nil {
status.StorageEngine.Describe(ch)
}
if status.InMemory != nil {
status.InMemory.Describe(ch)
}
if status.RocksDb != nil {
status.RocksDb.Describe(ch)
}
if status.WiredTiger != nil {
status.WiredTiger.Describe(ch)
}
}
// GetServerStatus returns the server status info.
func GetServerStatus(session *mgo.Session) *ServerStatus {
result := &ServerStatus{}
err := session.DB("admin").Run(bson.D{{"serverStatus", 1}, {"recordStats", 0}}, result)
if err != nil {
log.Error("Failed to get server status.")
return nil
}
return result
}
| {'content_hash': '8b2fc31cf33394eb8240a2e61ab16ac3', 'timestamp': '', 'source': 'github', 'line_count': 215, 'max_line_length': 133, 'avg_line_length': 26.906976744186046, 'alnum_prop': 0.7177182368193604, 'repo_name': 'timvaillancourt/mongodb_exporter', 'id': '234a8ae73d46bf61b723268435c82178f57ccb1c', 'size': '6372', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'collector/mongod/server_status.go', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Go', 'bytes': '198602'}, {'name': 'Makefile', 'bytes': '2253'}]} |
using System;
using System.ComponentModel;
namespace Azure.ResourceManager.DataMigration.Models
{
/// <summary> Current state of migration. </summary>
public readonly partial struct MigrationState : IEquatable<MigrationState>
{
private readonly string _value;
/// <summary> Initializes a new instance of <see cref="MigrationState"/>. </summary>
/// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
public MigrationState(string value)
{
_value = value ?? throw new ArgumentNullException(nameof(value));
}
private const string NoneValue = "None";
private const string InProgressValue = "InProgress";
private const string FailedValue = "Failed";
private const string WarningValue = "Warning";
private const string CompletedValue = "Completed";
private const string SkippedValue = "Skipped";
private const string StoppedValue = "Stopped";
/// <summary> None. </summary>
public static MigrationState None { get; } = new MigrationState(NoneValue);
/// <summary> InProgress. </summary>
public static MigrationState InProgress { get; } = new MigrationState(InProgressValue);
/// <summary> Failed. </summary>
public static MigrationState Failed { get; } = new MigrationState(FailedValue);
/// <summary> Warning. </summary>
public static MigrationState Warning { get; } = new MigrationState(WarningValue);
/// <summary> Completed. </summary>
public static MigrationState Completed { get; } = new MigrationState(CompletedValue);
/// <summary> Skipped. </summary>
public static MigrationState Skipped { get; } = new MigrationState(SkippedValue);
/// <summary> Stopped. </summary>
public static MigrationState Stopped { get; } = new MigrationState(StoppedValue);
/// <summary> Determines if two <see cref="MigrationState"/> values are the same. </summary>
public static bool operator ==(MigrationState left, MigrationState right) => left.Equals(right);
/// <summary> Determines if two <see cref="MigrationState"/> values are not the same. </summary>
public static bool operator !=(MigrationState left, MigrationState right) => !left.Equals(right);
/// <summary> Converts a string to a <see cref="MigrationState"/>. </summary>
public static implicit operator MigrationState(string value) => new MigrationState(value);
/// <inheritdoc />
[EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object obj) => obj is MigrationState other && Equals(other);
/// <inheritdoc />
public bool Equals(MigrationState other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase);
/// <inheritdoc />
[EditorBrowsable(EditorBrowsableState.Never)]
public override int GetHashCode() => _value?.GetHashCode() ?? 0;
/// <inheritdoc />
public override string ToString() => _value;
}
}
| {'content_hash': 'df8109279db0a05ed4cb37a601ce0947', 'timestamp': '', 'source': 'github', 'line_count': 59, 'max_line_length': 133, 'avg_line_length': 52.847457627118644, 'alnum_prop': 0.6638871071199487, 'repo_name': 'Azure/azure-sdk-for-net', 'id': 'cdb5947fd649544a886e3632f91016bedafa957d', 'size': '3256', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'sdk/datamigration/Azure.ResourceManager.DataMigration/src/Generated/Models/MigrationState.cs', 'mode': '33188', 'license': 'mit', 'language': []} |
FROM balenalib/jetson-nano-alpine:3.10-run
# remove several traces of python
RUN apk del python*
# http://bugs.python.org/issue19846
# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK.
ENV LANG C.UTF-8
# install python dependencies
RUN apk add --no-cache ca-certificates libffi \
&& apk add --no-cache libssl1.0 || apk add --no-cache libssl1.1
# key 63C7CC90: public key "Simon McVittie <smcv@pseudorandom.co.uk>" imported
# key 3372DCFA: public key "Donald Stufft (dstufft) <donald@stufft.io>" imported
RUN gpg --keyserver keyring.debian.org --recv-keys 4DE8FF2A63C7CC90 \
&& gpg --keyserver keyserver.ubuntu.com --recv-key 6E3CBCE93372DCFA \
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 0x52a43a1e4b77b059
# point Python at a system-provided certificate database. Otherwise, we might hit CERTIFICATE_VERIFY_FAILED.
# https://www.python.org/dev/peps/pep-0476/#trust-database
ENV SSL_CERT_FILE /etc/ssl/certs/ca-certificates.crt
ENV PYTHON_VERSION 3.9.1
# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value '<VERSION>'"
ENV PYTHON_PIP_VERSION 20.3.1
ENV SETUPTOOLS_VERSION 51.0.0
RUN set -x \
&& buildDeps=' \
curl \
gnupg \
' \
&& apk add --no-cache --virtual .build-deps $buildDeps \
&& curl -SLO "http://resin-packages.s3.amazonaws.com/python/v$PYTHON_VERSION/Python-$PYTHON_VERSION.linux-alpine-aarch64-openssl1.1.tar.gz" \
&& echo "6df986081a736672ebcce32ac3109bd22330933334b87e7edcca64e5df7f1b1d Python-$PYTHON_VERSION.linux-alpine-aarch64-openssl1.1.tar.gz" | sha256sum -c - \
&& tar -xzf "Python-$PYTHON_VERSION.linux-alpine-aarch64-openssl1.1.tar.gz" --strip-components=1 \
&& rm -rf "Python-$PYTHON_VERSION.linux-alpine-aarch64-openssl1.1.tar.gz" \
&& if [ ! -e /usr/local/bin/pip3 ]; then : \
&& curl -SLO "https://raw.githubusercontent.com/pypa/get-pip/430ba37776ae2ad89f794c7a43b90dc23bac334c/get-pip.py" \
&& echo "19dae841a150c86e2a09d475b5eb0602861f2a5b7761ec268049a662dbd2bd0c get-pip.py" | sha256sum -c - \
&& python3 get-pip.py \
&& rm get-pip.py \
; fi \
&& pip3 install --no-cache-dir --upgrade --force-reinstall pip=="$PYTHON_PIP_VERSION" setuptools=="$SETUPTOOLS_VERSION" \
&& find /usr/local \
\( -type d -a -name test -o -name tests \) \
-o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) \
-exec rm -rf '{}' + \
&& cd / \
&& rm -rf /usr/src/python ~/.cache
# make some useful symlinks that are expected to exist
RUN cd /usr/local/bin \
&& ln -sf pip3 pip \
&& { [ -e easy_install ] || ln -s easy_install-* easy_install; } \
&& ln -sf idle3 idle \
&& ln -sf pydoc3 pydoc \
&& ln -sf python3 python \
&& ln -sf python3-config python-config
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/8accad6af708fca7271c5c65f18a86782e19f877/scripts/assets/tests/test-stack@python.sh" \
&& echo "Running test-stack@python" \
&& chmod +x test-stack@python.sh \
&& bash test-stack@python.sh \
&& rm -rf test-stack@python.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v8 \nOS: Alpine Linux 3.10 \nVariant: run variant \nDefault variable(s): UDEV=off \nThe following software stack is preinstalled: \nPython v3.9.1, Pip v20.3.1, Setuptools v51.0.0 \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info
RUN echo $'#!/bin/bash\nbalena-info\nbusybox ln -sf /bin/busybox /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& ln -f /bin/sh /bin/sh.real \
&& ln -f /bin/sh-shim /bin/sh | {'content_hash': '0be1e2801dbc662f46167ce1efe3f1b2', 'timestamp': '', 'source': 'github', 'line_count': 77, 'max_line_length': 713, 'avg_line_length': 53.37662337662338, 'alnum_prop': 0.7119221411192214, 'repo_name': 'nghiant2710/base-images', 'id': 'c4a33e07d2ca44aa868b4aa62ee14f896d478678', 'size': '4131', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'balena-base-images/python/jetson-nano/alpine/3.10/3.9.1/run/Dockerfile', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Dockerfile', 'bytes': '144558581'}, {'name': 'JavaScript', 'bytes': '16316'}, {'name': 'Shell', 'bytes': '368690'}]} |
from .devebec import devebec
| {'content_hash': '32bfe8de2de7072158f89b3571287dc5', 'timestamp': '', 'source': 'github', 'line_count': 1, 'max_line_length': 28, 'avg_line_length': 29.0, 'alnum_prop': 0.8275862068965517, 'repo_name': 'tatsy/hydra', 'id': '4f638f15f4d8c53153616c2dd141aa0dd0ccb886', 'size': '29', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'hydra/gen/__init__.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Python', 'bytes': '33466'}]} |
package com.amazonaws.services.quicksight.model.transform;
import java.math.*;
import javax.annotation.Generated;
import com.amazonaws.services.quicksight.model.*;
import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*;
import com.amazonaws.transform.*;
import com.fasterxml.jackson.core.JsonToken;
import static com.fasterxml.jackson.core.JsonToken.*;
/**
* GroupMember JSON Unmarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GroupMemberJsonUnmarshaller implements Unmarshaller<GroupMember, JsonUnmarshallerContext> {
public GroupMember unmarshall(JsonUnmarshallerContext context) throws Exception {
GroupMember groupMember = new GroupMember();
int originalDepth = context.getCurrentDepth();
String currentParentElement = context.getCurrentParentElement();
int targetDepth = originalDepth + 1;
JsonToken token = context.getCurrentToken();
if (token == null)
token = context.nextToken();
if (token == VALUE_NULL) {
return null;
}
while (true) {
if (token == null)
break;
if (token == FIELD_NAME || token == START_OBJECT) {
if (context.testExpression("Arn", targetDepth)) {
context.nextToken();
groupMember.setArn(context.getUnmarshaller(String.class).unmarshall(context));
}
if (context.testExpression("MemberName", targetDepth)) {
context.nextToken();
groupMember.setMemberName(context.getUnmarshaller(String.class).unmarshall(context));
}
} else if (token == END_ARRAY || token == END_OBJECT) {
if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) {
if (context.getCurrentDepth() <= originalDepth)
break;
}
}
token = context.nextToken();
}
return groupMember;
}
private static GroupMemberJsonUnmarshaller instance;
public static GroupMemberJsonUnmarshaller getInstance() {
if (instance == null)
instance = new GroupMemberJsonUnmarshaller();
return instance;
}
}
| {'content_hash': 'fb5a803ffcdb23ae107c1acef504e18d', 'timestamp': '', 'source': 'github', 'line_count': 67, 'max_line_length': 136, 'avg_line_length': 34.95522388059702, 'alnum_prop': 0.6293766011955594, 'repo_name': 'aws/aws-sdk-java', 'id': 'd920f8dc4dc3354efbd8411635c5f07dfdac2879', 'size': '2922', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'aws-java-sdk-quicksight/src/main/java/com/amazonaws/services/quicksight/model/transform/GroupMemberJsonUnmarshaller.java', 'mode': '33188', 'license': 'apache-2.0', 'language': []} |
/**
* @fileOverview canvasinput compiled from typescript
* @author {@link mailto:rashwell@gmail.com|Richard F. Ashwell III}
* @version 1.0.0
* @see The original inspiration for this project {@link http://goldfirestudios.com/blog/108/CanvasInput-HTML5-Canvas-Text-Input|CanvusInput HTML5 Canvas Text Input}
* @license MIT
* @example
* var input = new CanvasInput({
* canvas: document.getElementById('canvasid'),
* onsubmit: function() { alert(this.value); }
* });
*/
/**
* Class for the CanvasInput object
* @class CanvasInput
*/
class CanvasInput {
static inputs: CanvasInput[] = [];
static _inputsIndex: number = 0;
_canvas: HTMLCanvasElement = null;
_renderCanvas: HTMLCanvasElement = null;
_shadowCanvas: HTMLCanvasElement = null;
_hiddenInput: HTMLInputElement;
_ctx: any = null;
_renderCtx: any = null;
_shadowCtx: any = null;
_x: number = 0;
_y: number = 0;
_extraX: number = 0;
_extraY: number = 0;
_fontSize: number = 14;
_fontFamily: string = 'Arial';
_fontColor: string = '#000';
_placeHolderColor: string = '#bfbebd';
_fontWeight: string = 'normal';
_fontStyle: string = 'normal';
_readonly: boolean = false;
_maxlength: any = null;
_width: number = 150;
_height: number = 14;
_padding: number = 5;
_borderWidth: number = 1;
_borderColor: string = '#959595';
_borderRadius: number = 3;
_backgroundImage: string = '';
_backgroundColor: any;
_boxShadow: string = '1px 1px 0px rgba(255, 255, 255, 1)';
_boxShadowObj: any = null;
_innerShadow: string = '0px 0px 4px rgba(0, 0, 0, 0.4)';
_selectionColor: string = 'rgba(179, 212, 253, 0.8)';
_placeHolder: string = '';
_value: string = '';
_onsubmit: any;
_onkeydown: any;
_onkeyup: any;
_onfocus: any;
_onblur: any;
_cursor: boolean = false;
_cursorPos: number = 0;
_hasFocus: boolean = false;
_selection: number[] = [0, 0];
_wasOver: boolean = false;
_mouseDown: boolean = false;
_renderType: string = '2d';
shadowL: number = 0;
shadowR: number = 0;
shadowT: number = 0;
shadowB: number = 0;
shadowH: number = 0;
shadowW: number = 0;
outerW: number = 0;
outerH: number = 0;
constructor(options?: any) {
// Set the context for the attached canvas
if (options.canvas) { this._canvas = options.canvas; }
if (this._canvas) {
// For Testing check to see if default is forced back to 2d
if (this._renderType === '2d') {
this._ctx = this._canvas.getContext('2d');
} else {
if ('WebGLRenderingContext' in window) {
// Browser doesn't support webgl so only try for 2d context
this._ctx = this._canvas.getContext('2d');
this._renderType = '2d';
} else {
var testctx = this._canvas.getContext('webgl') || this._canvas.getContext('experimental-webgl');
if (testctx !== undefined) {
// browser supports webgl, however can't be setup on this graphics combination
this._ctx = this._canvas.getContext('2d');
this._renderType = '2d';
} else {
this._ctx = this._canvas.getContext('webgl') || this._canvas.getContext('experimental-webgl');
}
}
}
// Some sort of sanity check here because if we have a canvas without context we should abort
}
if (options.x) { this._x = options.x; }
if (options.y) { this._y = options.y; }
if (options.extraX) { this._extraX = options.extraX; }
if (options.extraY) { this._extraY = options.extraY; }
if (options.fontSize) { this._fontSize = options.fontSize; }
if (options.fontFamily) { this._fontFamily = options.fontFamily; }
if (options.fontColor) { this._fontColor = options.fontColor; }
if (options.placeHolderColor) { this._placeHolderColor = options.placeHolderColor; }
if (options.fontWeight) { this._fontWeight = options.fontWeight; }
if (options.fontStyle) { this._fontStyle = options.fontStyle; }
if (options.readonly) { this._readonly = options.readonly; }
if (options.maxlength) { this._maxlength = options.maxlength; }
if (options.width) { this._width = options.width; }
if (options.height) { this._height = options.height; } // default set to height of font in orig and above
if (options.padding) { if (options.padding >= 0) { this._padding = options.padding; } }
if (options.borderWidth) { if (options.borderWidth >= 0) { this._borderWidth = options.borderWidth; } }
if (options.borderColor) { this._borderColor = options.borderColor; }
if (options.borderRadius) { if (options.borderRadius >= 0) { this._borderRadius = options.borderRadius; } }
if (options.backgroundImage) { this._backgroundImage = options.backgroundImage; }
if (options.boxShadow) { this._boxShadow = options.boxShadow; }
if (options.innerShadow) { this._innerShadow = options.innerShadow; }
if (options.selectionColor) { this._selectionColor = options.selectionColor; }
if (options.placeHolder) { this._placeHolder = options.placeHolder; }
if (options.value) { this._value = (options.value || this._placeHolder) + ''; }
if (options.onsubmit) { this._onsubmit = options.onsubmit; } else { this._onsubmit = function() {}; }
if (options.onkeydown) { this._onkeydown = options.onkeydown; } else { this._onkeydown = function() {}; }
if (options.onkeyup) { this._onkeyup = options.onkeyup; } else { this._onkeyup = function() {}; }
if (options.onfocus) { this._onfocus = options.onfocus; } else { this._onfocus = function() {}; }
if (options.onblur) { this._onblur = options.onblur; } else { this._onblur = function() {}; }
// parse box shadow
this.boxShadow(this._boxShadow, true);
// calculate the full width and height with padding, borders and shadows
this._calcWH();
// setup the off-DOM canvas
this._renderCanvas = document.createElement('canvas');
this._renderCanvas.setAttribute('width', this.outerW.toString());
this._renderCanvas.setAttribute('height', this.outerH.toString());
if (this._renderType === '2d') {
this._renderCtx = this._renderCanvas.getContext('2d');
} else {
this._renderCtx = this._renderCanvas.getContext('webgl') || this._renderCanvas.getContext('experimental-webgl');
}
// setup another off-DOM canvas for inner-shadows
this._shadowCanvas = document.createElement('canvas');
this._shadowCanvas.setAttribute('width', (this._width + this._padding * 2).toString());
this._shadowCanvas.setAttribute('height', (this._height + this._padding * 2).toString());
if (this._renderType === '2d') {
this._shadowCtx = this._shadowCanvas.getContext('2d');
} else {
this._shadowCtx = this._shadowCanvas.getContext('webgl') || this._shadowCanvas.getContext('experimental-webgl');
}
// setup the background color or gradient
if (typeof options.backgroundGradient !== 'undefined') {
this._backgroundColor = this._renderCtx.createLinearGradient(
0,
0,
0,
this.outerH
);
this._backgroundColor.addColorStop(0, options.backgroundGradient[0]);
this._backgroundColor.addColorStop(1, options.backgroundGradient[1]);
} else {
this._backgroundColor = options.backgroundColor || '#fff';
}
// setup main canvas events
if (this._canvas) {
var _this = this;
this._canvas.addEventListener('mousemove', function(ev: MouseEvent) {
var e = ev || window.event;
_this.mousemove(e, _this);
}, false);
this._canvas.addEventListener('mousedown', function(ev: MouseEvent) {
var e = ev || window.event;
_this.mousedown(e, _this);
}, false);
this._canvas.addEventListener('mouseup', function(ev: MouseEvent) {
var e = ev || window.event;
_this.mouseup(e, _this);
}, false);
}
// setup a global mouseup to blur the input outside of the canvas
var _this = this;
window.addEventListener('mouseup', function(ev: MouseEvent) {
var e = ev || window.event;
if (_this._hasFocus && !_this._mouseDown) {
_this.blur();
}
}, true);
// create the hidden input element
this._hiddenInput = document.createElement('input');
this._hiddenInput.type = 'text';
this._hiddenInput.style.position = 'absolute';
this._hiddenInput.style.opacity = '0';
this._hiddenInput.style.pointerEvents = 'none';
this._hiddenInput.style.left = (this._x + this._extraX + (this._canvas ? this._canvas.offsetLeft : 0)) + 'px';
this._hiddenInput.style.top = (this._y + this._extraY + (this._canvas ? this._canvas.offsetTop : 0)) + 'px';
this._hiddenInput.style.width = this._width + 'px';
this._hiddenInput.style.height = this._height + 'px';
this._hiddenInput.style.zIndex = '0';
if (this._maxlength) {
this._hiddenInput.maxLength = this._maxlength;
}
document.body.appendChild(this._hiddenInput);
this._hiddenInput.value = this._value;
// setup the keydown listener
var _this = this;
this._hiddenInput.addEventListener('keydown', function(ev: KeyboardEvent) {
var e = ev || window.event;
if (_this._hasFocus) {
_this.keydown(e, _this);
}
});
// setup the keyup listener
this._hiddenInput.addEventListener('keyup', function(ev: KeyboardEvent) {
var e = ev || window.event;
// update the canvas input state information from the hidden input
_this._value = _this._hiddenInput.value;
_this._cursorPos = _this._hiddenInput.selectionStart;
_this.render();
if (_this._hasFocus) {
_this._onkeyup(e, _this);
}
});
// add this to the buffer
CanvasInput.inputs.push(this);
CanvasInput._inputsIndex = CanvasInput.inputs.length - 1;
// draw the text box
this.render();
}
// Setters and Getters for properties that can be changed after the fact
// Wrote these depending on ECMAScript 5 so tsc needs --target ES5
// public get name():string { return this._name; }
// public set name(value: string) { this._name = value; }
/**
* Canvas getter.
* @method canvas
* @return Returns the current canvas that the CanvasInput object is rendering too.
*/
/**
* Canvas setter.
* @method canvas
* @param canvas object
*/
public get canvas():any { return this._canvas; }
public set canvas(value: any) {
if (typeof value !== undefined) {
this._canvas = value;
// Recheck here in case the new canvas is switched between 2d and webgl
if ('WebGLRenderingContext' in window) {
// Browser doesn't support webgl so only try for 2d context
this._ctx = this._canvas.getContext('2d');
this._renderType = '2d';
} else {
var testctx = this._canvas.getContext('webgl') || this._canvas.getContext('experimental-webgl');
if (testctx !== undefined) {
// browser supports webgl, however can't be setup on this graphics combination with this canvas
this._ctx = this._canvas.getContext('2d');
this._renderType = '2d';
} else {
this._ctx = this._canvas.getContext('webgl') || this._canvas.getContext('experimental-webgl');
}
}
// Most like the offscreen canvas and shadow canvas if set prior can remain unchanged.
this.render();
} else {
// setting shouldn't return a value this might break current usage which should use
// the getter to retrieve canvas all of the elses in the setters below will
// be removed just to get rid of clutter. This remains just to remind of the potential
// breakage.
// return this._canvas;
}
}
// X and Y location on Canvas
public get x():number { return this._x; }
public set x(value: number) {
if (typeof value !== 'undefined') {
this._x = value;
this.render();
}
}
public get y():number { return this._y; }
public set y(value: number) {
if (typeof value !== 'undefined') {
this._y = value;
this.render();
}
}
// extraX and extraY location on Canvas
public get extraX():number { return this._extraX; }
public set extraX(value: number) {
if (typeof value !== 'undefined') {
this._extraX = value;
this.render();
}
}
public get extraY():number { return this._extraY; }
public set extraY(value: number) {
if (typeof value !== 'undefined') {
this._extraY = value;
this.render();
}
}
// font setters and getters
// TODO: Potentially constrain font size to limits of field height etc to maintain sanity
public get fontSize():number { return this._fontSize; }
public set fontSize(value: number) {
if (typeof value !== 'undefined') {
this._fontSize = value;
this.render();
}
}
public get fontFamily():string { return this._fontFamily; }
public set fontFamily(value: string) {
if (typeof value !== 'undefined') {
this._fontFamily = value;
this.render();
}
}
public get fontColor():string { return this._fontColor; }
public set fontColor(value: string) {
if (typeof value !== 'undefined') {
this._fontColor = value;
this.render();
}
}
public get placeHolderColor():string { return this._placeHolderColor; }
public set placeHolderColor(value: string) {
if (typeof value !== 'undefined') {
this._placeHolderColor = value;
this.render();
}
}
public get fontWeight():string { return this._fontWeight; }
public set fontWeight(value: string) {
if (typeof value !== 'undefined') {
this._fontWeight = value;
this.render();
}
}
public get fontStyle():string { return this._fontStyle; }
public set fontStyle(value: string) {
if (typeof value !== 'undefined') {
this._fontStyle = value;
this.render();
}
}
// size setters and getters
public get width():number { return this._width; }
public set width(value: number) {
if (typeof value !== 'undefined') {
this._width = value;
this._calcWH();
this._updateCanvasWH();
this.render();
}
}
public get height():number { return this._height; }
public set height(value: number) {
if (typeof value !== 'undefined') {
this._height = value;
this._calcWH();
this._updateCanvasWH();
this.render();
}
}
public get padding():number { return this._padding; }
public set padding(value: number) {
if (typeof value !== 'undefined') {
this._padding = value;
this._calcWH();
this._updateCanvasWH();
this.render();
}
}
public get borderWidth():number { return this._borderWidth; }
public set borderWidth(value: number) {
if (typeof value !== 'undefined') {
this._borderWidth = value;
this._calcWH();
this._updateCanvasWH();
this.render();
}
}
public get borderColor():string { return this._borderColor; }
public set borderColor(value: string) {
if (typeof value !== 'undefined') {
this._borderColor = value;
this.render();
}
}
public get borderRadius():number { return this._borderRadius; }
public set borderRadius(value: number) {
if (typeof value !== 'undefined') {
this._borderRadius = value;
this.render();
}
}
public get backgroundColor():string { return this._backgroundColor; }
public set backgroundColor(value: string) {
if (typeof value !== 'undefined') {
this._backgroundColor = value;
this.render();
}
}
public get backgroundGradient():any { return this._backgroundColor; }
public set backgroundGradient(value: any) {
if (typeof value !== 'undefined') {
this._backgroundColor = this._renderCtx.createLinearGradient(
0,
0,
0,
this.outerH
);
this._backgroundColor.addColorStop(0, value[0]);
this._backgroundColor.addColorStop(1, value[1]);
this.render();
}
}
/**
* Internal boxShadow setup parse only creating private setter no get/set for now
* mainly because the return on the set is required during constructor
* @method boxShadow
* @param {string} data
* @param {boolean} doReturn
* @inner
* @todo Potentially create seperate internal function for construction and standard get/set
*/
private boxShadow(data: string, doReturn: boolean): any {
if (typeof data !== 'undefined') {
// parse box shadow
var boxShadow = data.split('px ');
this._boxShadowObj = {
x: this._boxShadow === 'none' ? 0 : parseInt(boxShadow[0], 10),
y: this._boxShadow === 'none' ? 0 : parseInt(boxShadow[1], 10),
blur: this._boxShadow === 'none' ? 0 : parseInt(boxShadow[2], 10),
color: this._boxShadow === 'none' ? '' : boxShadow[3]
};
// take into account the shadow and its direction
if (this._boxShadowObj.x < 0) {
this.shadowL = Math.abs(this._boxShadowObj.x) + this._boxShadowObj.blur;
this.shadowR = this._boxShadowObj.blur + this._boxShadowObj.x;
} else {
this.shadowL = Math.abs(this._boxShadowObj.blur - this._boxShadowObj.x);
this.shadowR = this._boxShadowObj.blur + this._boxShadowObj.x;
}
if (this._boxShadowObj.y < 0) {
this.shadowT = Math.abs(this._boxShadowObj.y) + this._boxShadowObj.blur;
this.shadowB = this._boxShadowObj.blur + this._boxShadowObj.y;
} else {
this.shadowT = Math.abs(this._boxShadowObj.blur - this._boxShadowObj.y);
this.shadowB = this._boxShadowObj.blur + this._boxShadowObj.y;
}
this.shadowW = this.shadowL + this.shadowR;
this.shadowH = this.shadowT + this.shadowB;
this._calcWH();
if (!doReturn) {
this._updateCanvasWH();
return this.render();
}
} else {
return this._boxShadow;
}
}
public get innerShadow():string { return this._innerShadow; }
public set innerShadow(value: string) {
if (typeof value !== 'undefined') {
this._innerShadow = value;
this.render();
}
}
public get selectionColor():string { return this._selectionColor; }
public set selectionColor(value: string) {
if (typeof value !== 'undefined') {
this._selectionColor = value;
this.render();
}
}
public get placeHolder():string { return this._placeHolder; }
public set placeHolder(value: string) {
if (typeof value !== 'undefined') {
this._placeHolder = value;
this.render();
}
}
public get value():string { return (this._value === this._placeHolder) ? '' : this._value; }
public set value(data: string) {
if (typeof data !== 'undefined') {
this._value = data + '';
this._hiddenInput.value = data + '';
this._cursorPos = this._clipText().length;
this.render();
}
}
public get onsubmit():any { return this._onsubmit; }
public set onsubmit(fn: any) {
if (typeof fn !== 'undefined') {
this._onsubmit = fn;
}
}
public get onkeydown():any { return this._onkeydown; }
public set onkeydown(fn: any) {
if (typeof fn !== 'undefined') {
this._onkeydown = fn;
}
}
public get onkeyup():any { return this._onkeyup; }
public set onkeyup(fn: any) {
if (typeof fn !== 'undefined') {
this._onkeyup = fn;
}
}
public focus = function(pos?: number):any {
// only fire the focus event when going from unfocussed
if (!this._hasFocus) {
this._onfocus(this);
// remove focus from all other inputs
for (var i = 0; i < CanvasInput.inputs.length; i++) {
if (CanvasInput.inputs[i]._hasFocus) {
CanvasInput.inputs[i].blur();
}
}
}
// remove selection
if (!this._selectionUpdated) {
this._selection = [0, 0];
} else {
delete this._selectionUpdated;
}
// if this is readonly, don't allow it to get focus
this._hasFocus = true;
if (this._readonly) {
this._hiddenInput.readOnly = true;
return;
} else {
this._hiddenInput.readOnly = false;
}
// update the cursor position
this._cursorPos = (typeof pos === 'number') ? pos : this._clipText().length;
// clear the place holder
if (this._placeHolder === this._value) {
this._value = '';
this._hiddenInput.value = '';
}
this._cursor = true;
// setup cursor interval
if (this._cursorInterval) {
clearInterval(this._cursorInterval);
}
var _this = this;
this._cursorInterval = setInterval(function() {
_this._cursor = !_this._cursor;
_this.render();
}, 500);
// move the real focus to the hidden input
var hasSelection = (this._selection[0] > 0 || this._selection[1] > 0);
this._hiddenInput.focus();
this._hiddenInput.selectionStart = hasSelection ? this._selection[0] : this._cursorPos;
this._hiddenInput.selectionEnd = hasSelection ? this._selection[1] : this._cursorPos;
return this.render();
}
public blur = function(cinput?:any) {
var _this = cinput || this;
_this._onblur(_this);
if (_this._cursorInterval) {
clearInterval(_this._cursorInterval);
}
_this._hasFocus = false;
_this._cursor = false;
_this._selection = [0, 0];
_this._hiddenInput.blur();
// fill the place holder
if (_this._value === '') {
_this._value = _this._placeHolder;
}
return this.render();
}
private keydown = function(e: any, _this: any):any {
var keyCode = e.which,
isShift = e.shiftKey,
key = null,
startText, endText;
// make sure the correct text field is being updated
if (this._readonly || !this._hasFocus) {
return;
}
// fire custom user event
this._onkeydown(e, this);
// add support for Ctrl/Cmd+A selection
if (keyCode === 65 && (e.ctrlKey || e.metaKey)) {
this.selectText();
e.preventDefault();
return this.render();
}
// block keys that shouldn't be processed
if (keyCode === 17 || e.metaKey || e.ctrlKey) {
return this;
}
if (keyCode === 13) { // enter key
e.preventDefault();
this._onsubmit(e, this);
} else if (keyCode === 9) { // tab key
e.preventDefault();
if (CanvasInput.inputs.length > 1) {
var next = (CanvasInput.inputs[this._inputsIndex + 1]) ? this._inputsIndex + 1 : 0;
this.blur();
setTimeout(function() {
CanvasInput.inputs[next].focus();
}, 10);
}
}
// update the canvas input state information from the hidden input
this._value = this._hiddenInput.value;
this._cursorPos = this._hiddenInput.selectionStart;
this._selection = [0, 0];
return this.render();
}
private click = function(e: any, _this: any):any {
var mouse = _this._mousePos(e),
x = mouse.x,
y = mouse.y;
if (_this._endSelection) {
delete _this._endSelection;
delete _this._selectionUpdated;
return;
}
if (_this._canvas && _this._overInput(x, y) || !_this._canvas) {
if (_this._mouseDown) {
_this._mouseDown = false;
_this.click(e, _this);
return _this.focus(_this._clickPos(x, y));
}
} else {
return _this.blur();
}
}
private mousemove = function(e: any, _this):any {
var mouse = _this._mousePos(e),
x = mouse.x,
y = mouse.y,
isOver = _this._overInput(x, y);
if (isOver && _this._canvas) {
_this._canvas.style.cursor = 'text';
_this._wasOver = true;
} else if (_this._wasOver && _this._canvas) {
_this._canvas.style.cursor = 'default';
_this._wasOver = false;
}
if (_this._hasFocus && _this._selectionStart >= 0) {
var curPos = _this._clickPos(x, y),
start = Math.min(_this._selectionStart, curPos),
end = Math.max(_this._selectionStart, curPos);
if (!isOver) {
_this._selectionUpdated = true;
_this._endSelection = true;
delete _this._selectionStart;
_this.render();
return;
}
if (_this._selection[0] !== start || _this._selection[1] !== end) {
_this._selection = [start, end];
_this.render();
}
}
}
private mousedown = function(e: any, _this: any) {
var mouse = _this._mousePos(e),
x = mouse.x,
y = mouse.y,
isOver = _this._overInput(x, y);
// setup the 'click' event
_this._mouseDown = isOver;
// start the selection drag if inside the input
if (_this._hasFocus && isOver) {
_this._selectionStart = _this._clickPos(x, y);
}
}
private mouseup = function(e: any, _this: any) {
var mouse = _this._mousePos(e),
x = mouse.x,
y = mouse.y;
// update selection if a drag has happened
var isSelection = _this._clickPos(x, y) !== _this._selectionStart;
if (_this._hasFocus && _this._selectionStart >= 0 && _this._overInput(x, y) && isSelection) {
_this._selectionUpdated = true;
delete _this._selectionStart;
_this.render();
} else {
delete _this._selectionStart;
}
_this.click(e, _this);
}
private selectText = function(range?: number[]):any {
var _range = range || [0, this._value.length];
// select the range of text specified (or all if none specified)
setTimeout(function() {
this._selection = [_range[0], _range[1]];
this._hiddenInput.selectionStart = _range[0];
this._hiddenInput.selectionEnd = _range[1];
this.render();
}, 1);
return this;
}
public get renderCanvas():HTMLCanvasElement {
return this._renderCanvas;
}
public destroy = function() {
// pull from the inputs array
var index = CanvasInput.inputs.indexOf(this);
if (index) {
CanvasInput.inputs.splice(index, 1);
}
// remove focus
if (this._hasFocus) {
this.blur();
}
// remove the hidden input box
document.body.removeChild(this._hiddenInput);
// remove off-DOM canvas
this._renderCanvas = null;
this._shadowCanvas = null;
this._renderCtx = null;
}
private _textWidth = function(text: string): number {
var ctx = this._renderCtx;
ctx.font = this._fontStyle + ' ' + this._fontWeight + ' ' + this._fontSize + 'px ' + this._fontFamily;
ctx.textAlign = 'left';
return ctx.measureText(text).width;
}
private _clipText = function(value?: string): string {
value = (typeof value === 'undefined') ? this._value : value;
var textWidth = this._textWidth(value),
fillPer = textWidth / (this._width - this._padding),
text = fillPer > 1 ? value.substr(-1 * Math.floor(value.length / fillPer)) : value;
return text + '';
}
private _overInput = function(x: number, y: number): boolean {
var xLeft = x >= this._x + this._extraX,
xRight = x <= this._x + this._extraX + this._width + this._padding * 2,
yTop = y >= this._y + this._extraY,
yBottom = y <= this._y + this._extraY + this._height + this._padding * 2;
return xLeft && xRight && yTop && yBottom;
}
private _clickPos = function(x: number, y: number): number {
var value = this._value;
// don't count placeholder text in this
if (this._value === this._placeHolder) {
value = '';
}
// determine where the click was made along the string
var text = this._clipText(value),
totalW = 0,
pos = text.length;
if (x - (this._x + this._extraX) < this._textWidth(text)) {
// loop through each character to identify the position
for (var i=0; i<text.length; i++) {
totalW += this._textWidth(text[i]);
if (totalW >= x - (this._x + this._extraX)) {
pos = i;
break;
}
}
}
return pos;
}
private _drawTextBox = function(fn: any) {
var ctx = this._renderCtx,
w = this.outerW,
h = this.outerH,
br = this._borderRadius,
bw = this._borderWidth,
sw = this.shadowW,
sh = this.shadowH;
// only draw the background shape if no image is being used
if (this._backgroundImage === '') {
ctx.fillStyle = this._backgroundColor;
this._roundedRect(ctx, bw + this.shadowL, bw + this.shadowT, w - bw * 2 - sw, h - bw * 2 - sh, br);
ctx.fill();
fn();
} else {
var img = new Image();
img.src = this._backgroundImage;
img.onload = function() {
ctx.drawImage(img, 0, 0, img.width, img.height, bw + this.shadowL, bw + this.shadowT, w, h);
fn();
};
}
}
private _roundedRect = function(ctx, x, y, w, h, r) {
if (w < 2 * r) r = w / 2;
if (h < 2 * r) r = h / 2;
ctx.beginPath();
ctx.moveTo(x + r, y);
ctx.lineTo(x + w - r, y);
ctx.quadraticCurveTo(x + w, y, x + w, y + r);
ctx.lineTo(x + w, y + h - r);
ctx.quadraticCurveTo(x + w, y + h, x + w - r, y + h);
ctx.lineTo(x + r, y + h);
ctx.quadraticCurveTo(x, y + h, x, y + h - r);
ctx.lineTo(x, y + r);
ctx.quadraticCurveTo(x, y, x + r, y);
ctx.closePath();
}
private _clearSelection = function(): boolean {
if (this._selection[1] > 0) {
// clear the selected contents
var start = this._selection[0],
end = this._selection[1];
this._value = this._value.substr(0, start) + this._value.substr(end);
this._cursorPos = start;
this._cursorPos = (this._cursorPos < 0) ? 0 : this._cursorPos;
this._selection = [0, 0];
return true;
}
return false;
}
private _mousePos(e: any):any {
var elm = e.target,
style = document.defaultView.getComputedStyle(elm, undefined),
paddingLeft = parseInt(style['paddingLeft'], 10) || 0,
paddingTop = parseInt(style['paddingLeft'], 10) || 0,
borderLeft = parseInt(style['borderLeftWidth'], 10) || 0,
borderTop = parseInt(style['borderLeftWidth'], 10) || 0,
offsetX = 0,
offsetY = 0,
htmlTop = 0,
htmlLeft = 0,
x, y;
// TODO: This needs to be retested but the original
// document.body.parentNode.offsetTop throws errors
var htmlrec = document.body.getBoundingClientRect();
htmlTop = htmlrec.top || 0;
htmlLeft = htmlrec.left || 0;
// calculate the total offset
if (typeof elm.offsetParent !== 'undefined') {
do {
offsetX += elm.offsetLeft;
offsetY += elm.offsetTop;
} while ((elm = elm.offsetParent));
}
// take into account borders and padding
offsetX += paddingLeft + borderLeft + htmlLeft;
offsetY += paddingTop + borderTop + htmlTop;
return {
x: e.pageX - offsetX,
y: e.pageY - offsetY
};
}
private _calcWH = function () {
// calculate the full width and height with padding, borders and shadows
this.outerW = this._width + this._padding * 2 + this._borderWidth * 2 + this.shadowW;
this.outerH = this._height + this._padding * 2 + this._borderWidth * 2 + this.shadowH;
};
private _updateCanvasWH = function() {
var oldW = this._renderCanvas.width;
var oldH = this._renderCanvas.height;
// update off-DOM canvas
this._renderCanvas.setAttribute('width', <string> this.outerW);
this._renderCanvas.setAttribute('height', <string> this.outerH);
this._shadowCanvas.setAttribute('width', <string> this._width + this._padding * 2);
this._shadowCanvas.setAttribute('height', <string> this._height + this._padding * 2);
// clear the main canvas
if (this._ctx) {
if (this._renderType === '2d') {
this._ctx.clearRect(this._x, this._y, oldW, oldH);
} else {
// Possibly create a webgl clearRect here
}
}
};
public render = function(): any {
var ctx = this._renderCtx,
w = this.outerW,
h = this.outerH,
br = this._borderRadius,
bw = this._borderWidth,
sw = this.shadowW,
sh = this.shadowH;
if (!ctx) {
return;
}
// clear the canvas
ctx.clearRect(0, 0, ctx.canvas.width, ctx.canvas.height);
// setup the box shadow
ctx.shadowOffsetX = this._boxShadow.x;
ctx.shadowOffsetY = this._boxShadow.y;
ctx.shadowBlur = this._boxShadow.blur;
ctx.shadowColor = this._boxShadow.color;
// draw the border
if (this._borderWidth > 0) {
ctx.fillStyle = this._borderColor;
this._roundedRect(ctx, this.shadowL, this.shadowT, w - sw, h - sh, br);
ctx.fill();
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 0;
ctx.shadowBlur = 0;
}
// draw the text box background
var _this = this;
this._drawTextBox(function() {
// make sure all shadows are reset
ctx.shadowOffsetX = 0;
ctx.shadowOffsetY = 0;
ctx.shadowBlur = 0;
// clip the text so that it fits within the box
var text = _this._clipText();
// draw the selection
var paddingBorder = _this._padding + _this._borderWidth + _this.shadowT;
if (_this._selection[1] > 0) {
var selectOffset = _this._textWidth(text.substring(0, _this._selection[0])),
selectWidth = _this._textWidth(text.substring(_this._selection[0], _this._selection[1]));
ctx.fillStyle = _this._selectionColor;
ctx.fillRect(paddingBorder + selectOffset, paddingBorder, selectWidth, _this._height);
}
// draw the cursor
if (_this._cursor) {
var cursorOffset = _this._textWidth(text.substring(0, _this._cursorPos));
ctx.fillStyle = _this._fontColor;
ctx.fillRect(paddingBorder + cursorOffset, paddingBorder, 1, _this._height);
}
// draw the text
var textX = _this._padding + _this._borderWidth + _this.shadowL,
textY = Math.round(paddingBorder + _this._height / 2);
// only remove the placeholder text if they have typed something
text = (text === '' && _this._placeHolder) ? _this._placeHolder : text;
ctx.fillStyle = (_this._value !== '' && _this._value !== _this._placeHolder) ? _this._fontColor : _this._placeHolderColor;
ctx.font = _this._fontStyle + ' ' + _this._fontWeight + ' ' + _this._fontSize + 'px ' + _this._fontFamily;
ctx.textAlign = 'left';
ctx.textBaseline = 'middle';
ctx.fillText(text, textX, textY);
// parse inner shadow
var innerShadow = _this._innerShadow.split('px '),
isOffsetX = _this._innerShadow === 'none' ? 0 : parseInt(innerShadow[0], 10),
isOffsetY = _this._innerShadow === 'none' ? 0 : parseInt(innerShadow[1], 10),
isBlur = _this._innerShadow === 'none' ? 0 : parseInt(innerShadow[2], 10),
isColor = _this._innerShadow === 'none' ? '' : innerShadow[3];
// draw the inner-shadow (damn you canvas, this should be easier than this...)
if (isBlur > 0) {
var shadowCtx = _this._shadowCtx,
scw = shadowCtx.canvas.width,
sch = shadowCtx.canvas.height;
shadowCtx.clearRect(0, 0, scw, sch);
shadowCtx.shadowBlur = isBlur;
shadowCtx.shadowColor = isColor;
// top shadow
shadowCtx.shadowOffsetX = 0;
shadowCtx.shadowOffsetY = isOffsetY;
shadowCtx.fillRect(-1 * w, -100, 3 * w, 100);
// right shadow
shadowCtx.shadowOffsetX = isOffsetX;
shadowCtx.shadowOffsetY = 0;
shadowCtx.fillRect(scw, -1 * h, 100, 3 * h);
// bottom shadow
shadowCtx.shadowOffsetX = 0;
shadowCtx.shadowOffsetY = isOffsetY;
shadowCtx.fillRect(-1 * w, sch, 3 * w, 100);
// left shadow
shadowCtx.shadowOffsetX = isOffsetX;
shadowCtx.shadowOffsetY = 0;
shadowCtx.fillRect(-100, -1 * h, 100, 3 * h);
// create a clipping mask on the main canvas
_this._roundedRect(ctx, bw + _this.shadowL, bw + _this.shadowT, w - bw * 2 - sw, h - bw * 2 - sh, br);
ctx.clip();
// draw the inner-shadow from the off-DOM canvas
ctx.drawImage(_this._shadowCanvas, 0, 0, scw, sch, bw + _this.shadowL, bw + _this.shadowT, scw, sch);
}
// draw to the visible canvas
if (_this._ctx) {
_this._ctx.clearRect(_this._x, _this._y, ctx.canvas.width, ctx.canvas.height);
_this._ctx.drawImage(_this._renderCanvas, _this._x, _this._y);
}
return _this;
});
};
}
| {'content_hash': '580611d57cab2856f4090f2daae836c4', 'timestamp': '', 'source': 'github', 'line_count': 1137, 'max_line_length': 165, 'avg_line_length': 33.373790677220754, 'alnum_prop': 0.5758182680651452, 'repo_name': 'rashwell/canvasinput', 'id': 'ccdc65d7a9c713c55a6fddeca89ea561776b0094', 'size': '37946', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'ts/canvasinput.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '651'}, {'name': 'HTML', 'bytes': '6821'}, {'name': 'JavaScript', 'bytes': '47530'}, {'name': 'TypeScript', 'bytes': '37946'}]} |
KERNEL_OBJECTS = $(build/_entry.o)
KERNEL_ASM_SOURCES = $(wildcard kernel/*.asm)
KERNEL_ASM_SOURCES += $(wildcard kernel/*/*.asm)
KERNEL_OBJECTS += $(patsubst kernel/%.asm, build/%.o, $(KERNEL_ASM_SOURCES))
KERNEL_C_SOURCES = $(wildcard kernel/*.c)
KERNEL_C_SOURCES += $(wildcard kernel/*/*.c)
KERNEL_OBJECTS += $(patsubst kernel/%.c, build/%.o, $(KERNEL_C_SOURCES))
all: vermilion.iso
build/%.o: kernel/%.c
mkdir -p build
mkdir -p build/drivers
gcc -fno-stack-protector -ffreestanding -std=c99 -m32 -Wall -Werror -c $< -o $@
build/%.o: kernel/%.asm
mkdir -p build
mkdir -p build/drivers
nasm $^ -f elf32 -o $@
vermilion.bin: ${KERNEL_OBJECTS}
ld -m elf_i386 --script linker.ld -o $@ $^
.PHONY: run
run: vermilion.bin
qemu-system-i386 -kernel vermilion.bin
.PHONY: clean
clean:
rm -rf build iso/boot/vermilion.bin vermilion.iso
| {'content_hash': '79ac5ff705f22f2b3e5c2c452a983ed8', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 80, 'avg_line_length': 26.40625, 'alnum_prop': 0.6792899408284023, 'repo_name': 'campaul/vermilion', 'id': 'dddfd62b0ee3372a8e0b3b437c6fae8e87e29117', 'size': '845', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Makefile', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '1740'}, {'name': 'C', 'bytes': '4404'}, {'name': 'C++', 'bytes': '64'}, {'name': 'Makefile', 'bytes': '845'}]} |
<h2>Viewing #<?php echo $workstation->id; ?></h2>
<p>
<strong>Name:</strong>
<?php echo $workstation->name; ?></p>
<p>
<strong>Pc name:</strong>
<?php echo $workstation->pc_name; ?></p>
<p>
<strong>Processor key:</strong>
<?php echo $workstation->processor_key; ?></p>
<p>
<strong>Image layout:</strong>
<?php echo $workstation->image_layout; ?></p>
<p>
<strong>Location id:</strong>
<?php echo $workstation->location_id; ?></p>
<?php echo Html::anchor('admin/workstations/edit/'.$workstation->id, 'Edit'); ?> |
<?php echo Html::anchor('admin/workstations', 'Back'); ?> | {'content_hash': 'dd3f7e23ae2dbd7d3d68c8bc724fa5ce', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 82, 'avg_line_length': 29.05, 'alnum_prop': 0.6368330464716007, 'repo_name': 'AfterCursor/restaurant-pos-backend', 'id': '7801bed1b251db186ea6a26ca649906a51001ddc', 'size': '581', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'fuel/app/views/admin/workstations/view.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '1860'}, {'name': 'C', 'bytes': '30103'}, {'name': 'HTML', 'bytes': '1878'}, {'name': 'PHP', 'bytes': '3023488'}]} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
in Saccardo, Syll. fung. (Abellini) 15: 94 (1901)
#### Original name
Agaricus undulatus Hoffm., 1797
### Remarks
null | {'content_hash': 'a09a9324c397c4f760823e26b988d9d8', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 49, 'avg_line_length': 15.76923076923077, 'alnum_prop': 0.7024390243902439, 'repo_name': 'mdoering/backbone', 'id': 'aba7bf29d761ec2fa6f4588395105a126376f352', 'size': '268', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Entolomataceae/Rhodocybe/Rhodocybe hirneola/ Syn. Clitocybe undulata/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []} |
<?php
namespace RandData\Set\ru_RU;
/**
* Generated by PHPUnit_SkeletonGenerator on 2017-07-10 at 01:53:36.
*/
class CityTest extends \PHPUnit_Framework_TestCase {
/**
* @var City
*/
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
protected function setUp() {
$this->object = new City;
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
protected function tearDown() {
}
/**
* @covers RandData\Set\ru_RU\City::get
* @covers RandData\Set\ru_RU\City::getList
*/
public function testGet() {
$pattern = "/^[АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдеёжзийклмнопрстуфхцчшщъыьэюя\w\s-]+$/";
for ($i=1; $i <= 10; $i++) {
$this->assertRegExp($pattern, $this->object->get());
}
}
}
| {'content_hash': 'b6764a609edc235b7ebed86ca89e6845', 'timestamp': '', 'source': 'github', 'line_count': 42, 'max_line_length': 100, 'avg_line_length': 23.785714285714285, 'alnum_prop': 0.5905905905905906, 'repo_name': 'KonstantinFilin/RandData', 'id': 'f3058e00834df2ac59f8530ae1f63450dba5f9a8', 'size': '1065', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'tests/src/RandData/Set/ru_RU/CityTest.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1835'}, {'name': 'HTML', 'bytes': '2860879'}, {'name': 'PHP', 'bytes': '286270'}]} |
module Cyclid
# Module for the Cyclid API
module API
# Some constants to identify types of API operation
module Operations
# Read operations
READ = 1
# Write (Create, Update, Delete) operations
WRITE = 2
# Administrator operations
ADMIN = 3
end
# Sinatra Warden AuthN/AuthZ helpers
module AuthHelpers
# Return an HTTP error with a RESTful JSON response
# XXX Should probably be in ApiHelpers?
def halt_with_json_response(error, id, description)
halt error, json_response(id, description)
end
# Call the Warden authenticate! method
def authenticate!
env['warden'].authenticate!
end
# Authenticate the user, then ensure that the user is authorized for
# the given organization and operation
def authorized_for!(org_name, operation)
authenticate!
user = current_user
# Promote the organization to 'admins' if the user is a SuperAdmin
org_name = 'admins' if super_admin?(user)
begin
organization = user.organizations.find_by(name: org_name)
halt_with_json_response(401, Errors::HTTPErrors::AUTH_FAILURE, 'unauthorized') \
if organization.nil?
Cyclid.logger.debug "authorized_for! organization: #{organization.name}"
# Check what Permissions are applied to the user for this Org & match
# against operation
permissions = user.userpermissions.find_by(organization: organization)
Cyclid.logger.debug "authorized_for! #{permissions.inspect}"
# Admins have full authority, regardless of the operation
return true if permissions.admin
return true if operation == Operations::WRITE && permissions.write
return true if operation == Operations::READ && (permissions.write || permissions.read)
Cyclid.logger.info "user #{user.username} is not authorized for operation #{operation}"
halt_with_json_response(401, Errors::HTTPErrors::AUTH_FAILURE, 'unauthorized')
rescue StandardError => ex # XXX: Use a more specific rescue
Cyclid.logger.info "authorization failed: #{ex}"
halt_with_json_response(401, Errors::HTTPErrors::AUTH_FAILURE, 'unauthorized')
end
end
# Authenticate the user, then ensure that the user is an admin and
# authorized for the resource for the given username & operation
def authorized_admin!(operation)
authorized_for!('admins', operation)
end
# Authenticate the user, then ensure that the user is authorized for the
# resource for the given username & operation
def authorized_as!(username, operation)
authenticate!
user = current_user
# Users are always authorized for any operation on their own data
return true if user.username == username
# Super Admins may be authorized, depending on the operation
if super_admin?(user)
begin
organization = user.organizations.find_by(name: 'admins')
permissions = user.userpermissions.find_by(organization: organization)
Cyclid.logger.debug permissions
# Admins have full authority, regardless of the operation
return true if permissions.admin
return true if operation == Operations::WRITE && permissions.write
return true if operation == Operations::READ && (permissions.write || permissions.read)
rescue StandardError => ex # XXX: Use a more specific rescue
Cyclid.logger.info "authorization failed: #{ex}"
halt_with_json_response(401, Errors::HTTPErrors::AUTH_FAILURE, 'unauthorized')
end
end
halt_with_json_response(401, Errors::HTTPErrors::AUTH_FAILURE, 'unauthorized')
end
# Check if the given user is a Super Admin; any user that belongs to the
# 'admins' organization is a super admin
def super_admin?(user)
user.organizations.exists?(name: 'admins')
end
# Current User object from the session
def current_user
env['warden'].user
end
end
end
end
| {'content_hash': '1a3688cf608ab3b917b79dee4280a062', 'timestamp': '', 'source': 'github', 'line_count': 111, 'max_line_length': 99, 'avg_line_length': 37.86486486486486, 'alnum_prop': 0.6531049250535332, 'repo_name': 'Liqwyd/Cyclid', 'id': '13ccfecc0a406ae8b65cc41a64cfc03c9edfbc7e', 'size': '4854', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'app/cyclid/sinatra/auth_helpers.rb', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'HTML', 'bytes': '1788'}, {'name': 'Ruby', 'bytes': '367000'}]} |
package ariba.util.log;
import java.util.Enumeration;
import org.apache.log4j.Appender;
import org.apache.log4j.helpers.AppenderAttachableImpl;
import org.apache.log4j.helpers.BoundedFIFO;
import org.apache.log4j.helpers.LogLog;
import org.apache.log4j.spi.LoggingEvent;
import ariba.util.core.FastStringBuffer;
import ariba.util.core.SystemUtil;
/**
Basically cloned from log4j's AsyncAppender in log4j 1.2.8. Unfortunately
that class was not designed to be overridden from outside its package, so
it had to be duplicated.
Key differences to provide robustness and error accounting:
1) The Dispatcher call to appendLoopOnAppenders(event) is now in a try/catch
block so if an exception occurs in the filtering or appending (processing)
of the event it doesn't kill the dispatcher.
2) When the exceptions mentioned in (1) occur, they are captured by
AsyncAppender and available externally (see the xxxMessage(s) methods,
below).
@see org.apache.log4j.AsyncAppender
@aribaapi private
*/
public class AsyncAppender extends org.apache.log4j.AppenderSkeleton
{
/**
The default buffer size is set to 128 events.
*/
public static final int DEFAULT_BUFFER_SIZE = 128;
BoundedFIFO bf = new BoundedFIFO(DEFAULT_BUFFER_SIZE);
AppenderAttachableImpl aai;
Dispatcher dispatcher;
boolean locationInfo = false;
boolean interruptedWarningMessage = false;
boolean isConsoleWriteSuspended;
private static final String PREFIX = "(IMPORTANT) Async appender ";
private boolean _closed;
public AsyncAppender (boolean isConsoleWriteSuspended)
{
// Note: The dispatcher code assumes that the aai is set once and
// for all.
this.isConsoleWriteSuspended = isConsoleWriteSuspended;
aai = new AppenderAttachableImpl();
dispatcher = new Dispatcher(bf, this);
dispatcher.start();
}
public void addAppender (Appender newAppender)
{
synchronized (aai) {
aai.addAppender(newAppender);
}
}
public void append (LoggingEvent event)
{
// If appender was closed, don't accept any more logging events, so we
// avoid a NPE on 'bf' below.
if (_closed) {
return;
}
// Set the NDC and thread name for the calling thread as these
// LoggingEvent fields were not set at event creation time.
event.getNDC();
event.getThreadName();
// Get a copy of this thread's MDC.
event.getMDCCopy();
if (locationInfo) {
event.getLocationInformation();
}
synchronized (bf) {
/**
If low level Logger debugging is on, send messages
whenever we start with the buffer full.
@see Logger#isDebugging
*/
if (bf.isFull() && Logger.isDebugging()) {
printMessage("full buffer.", this, bf, null);
}
while (bf.isFull()) {
try {
bf.wait();
}
catch (InterruptedException e) {
if (!interruptedWarningMessage) {
interruptedWarningMessage = true;
LogLog.warn("AsyncAppender interrupted.", e);
}
else {
LogLog.warn("AsyncAppender interrupted again.");
}
}
}
bf.put(event);
bf.notify();
}
}
/**
Close this <code>AsyncAppender</code> by interrupting the
dispatcher thread which will process all pending events before
exiting.
*/
public void close ()
{
synchronized(this) {
// avoid multiple close, otherwise one gets NullPointerException
if (_closed) {
return;
}
_closed = true;
}
// The following cannot be synchronized on "this" because the
// dispatcher synchronizes with "this" in its while loop. If we
// did synchronize we would systematically get deadlocks when
// close was called.
dispatcher.close();
try {
dispatcher.join();
}
catch (InterruptedException e) {
LogLog.error("Got an InterruptedException while waiting for the " +
"dispatcher to finish.", e);
}
dispatcher = null;
bf = null;
// Unregister this so it doesn't get polled for messages.
Logger.unregisterAsyncAppender(this);
}
public Enumeration getAllAppenders ()
{
synchronized (aai) {
return aai.getAllAppenders();
}
}
public Appender getAppender (String name)
{
synchronized (aai) {
return aai.getAppender(name);
}
}
/**
Returns the current value of the <b>LocationInfo</b> option.
*/
public boolean getLocationInfo ()
{
return locationInfo;
}
/**
Is the appender passed as parameter attached to this category?
*/
public boolean isAttached (Appender appender)
{
return aai.isAttached(appender);
}
/**
The <code>AsyncAppender</code> does not require a layout. Hence,
this method always returns <code>false</code>.
*/
public boolean requiresLayout ()
{
return false;
}
public void removeAllAppenders ()
{
synchronized (aai) {
aai.removeAllAppenders();
}
}
public void removeAppender (Appender appender)
{
synchronized (aai) {
aai.removeAppender(appender);
}
}
public void removeAppender (String name)
{
synchronized (aai) {
aai.removeAppender(name);
}
}
/**
The <b>LocationInfo</b> option takes a boolean value. By default,
it is set to false which means there will be no effort to extract
the location information related to the event. As a result, the
event that will be ultimately logged will likely to contain the
wrong location information (if present in the log format).
<p>Location information extraction is comparatively very slow and
should be avoided unless performance is not a concern.
*/
public void setLocationInfo (boolean flag)
{
locationInfo = flag;
}
/**
The <b>BufferSize</b> option takes a non-negative integer value.
This integer value determines the maximum size of the bounded
buffer. Increasing the size of the buffer is always
safe. However, if an existing buffer holds unwritten elements,
then <em>decreasing the buffer size will result in event
loss.</em> Nevertheless, while script configuring the
AsyncAppender, it is safe to set a buffer size smaller than the
{@link #DEFAULT_BUFFER_SIZE default buffer size} because
configurators guarantee that an appender cannot be used before
being completely configured.
*/
public void setBufferSize (int size)
{
bf.resize(size);
}
/**
Returns the current value of the <b>BufferSize</b> option.
*/
public int getBufferSize ()
{
return bf.getMaxSize();
}
/**
Print an error or debug message standard out.
@aribaapi private
*/
void printMessage(String s, AsyncAppender app, BoundedFIFO buff,
Throwable th)
{
if (!isConsoleWriteSuspended) {
FastStringBuffer b = new FastStringBuffer(PREFIX);
b.append(s);
b.append(" Appender: ");
b.append(app.getName());
b.append('/');
b.append(app);
b.append(", buffer: ");
b.append(buff);
if (th != null) {
b.append('\n');
b.append(SystemUtil.stackTrace(th));
}
SystemUtil.out().println(b);
SystemUtil.flushOutput();
}
}
}
// ------------------------------------------------------------------------------
// ------------------------------------------------------------------------------
// ----------------------------------------------------------------------------
class Dispatcher extends Thread
{
BoundedFIFO bf;
AppenderAttachableImpl aai;
boolean interrupted = false;
AsyncAppender container;
Dispatcher (BoundedFIFO bf, AsyncAppender container)
{
this.bf = bf;
this.container = container;
this.aai = container.aai;
// It is the user's responsibility to close appenders before
// exiting.
this.setDaemon(true);
// set the dispatcher priority to lowest possible value
this.setPriority(Thread.MIN_PRIORITY);
// set name based on creating thread so that way if the appender
// is not closed out the creator can be id'ed
this.setName(Thread.currentThread().getName()+"-Dispatcher-" + getName());
// set the dispatcher priority to MIN_PRIORITY plus or minus 2
// depending on the direction of MIN to MAX_PRIORITY.
//+ (Thread.MAX_PRIORITY > Thread.MIN_PRIORITY ? 1 : -1)*2);
}
void close ()
{
synchronized (bf) {
interrupted = true;
// We have a waiting dispacther if and only if bf.length is
// zero. In that case, we need to give it a death kiss.
bf.notify();
}
}
/**
The dispatching strategy is to wait until there are events in the
buffer to process. After having processed an event, we release
the monitor (variable bf) so that new events can be placed in the
buffer, instead of keeping the monitor and processing the remaining
events in the buffer.
<p>Other approaches might yield better results.
*/
public void run ()
{
//Category cat = Category.getInstance(Dispatcher.class.getName());
LoggingEvent event;
while (true) {
synchronized (bf) {
if (bf.length() == 0) {
// Exit loop if interrupted but only if the the buffer is empty.
if (interrupted) {
break;
}
try {
bf.wait();
}
catch (InterruptedException e) {
LogLog.error("The dispatcher should not be interrupted.");
break;
}
}
event = bf.get();
bf.notify();
} // synchronized
// The synchronization on parent is necessary to protect against
// operations on the aai object of the parent
synchronized (container.aai) {
if (aai != null && event != null) {
// This is a key difference from the log4j code--we
// enclose the appending call in a try catch block
// so that event processing errors don't bring down
// the dispatcher thread.
try {
aai.appendLoopOnAppenders(event);
}
catch (Throwable t) { // OK
// Post a message to the container indicating
// that we had a problem appending the event
// to one or more appender.
container.printMessage("dispatcher exception.",
container, bf, t);
}
}
}
} // while
// close and remove all appenders
aai.removeAllAppenders();
}
}
| {'content_hash': 'f63943bb0983e907f4b78df3404944ad', 'timestamp': '', 'source': 'github', 'line_count': 388, 'max_line_length': 84, 'avg_line_length': 30.693298969072163, 'alnum_prop': 0.5585691493828198, 'repo_name': 'pascalrobert/aribaweb', 'id': 'f67b5b1d92aa78bd46a7d7008059a42b971341f8', 'size': '12586', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/util/src/main/java/ariba/util/log/AsyncAppender.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '4662'}, {'name': 'CSS', 'bytes': '159681'}, {'name': 'Groovy', 'bytes': '97320'}, {'name': 'HTML', 'bytes': '77555'}, {'name': 'Java', 'bytes': '9376986'}, {'name': 'JavaScript', 'bytes': '1067701'}, {'name': 'Lex', 'bytes': '5128'}, {'name': 'PHP', 'bytes': '491'}, {'name': 'Shell', 'bytes': '5719'}]} |
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "palette".
*
* @property integer $id
* @property string $hex_code
* @property string $name
* @property string $description
* @property integer $sort_order
* @property integer $status_id
* @property integer $created_at
* @property integer $updated_at
* @property integer $created_by
* @property integer $updated_by
*
* @property Calendar[] $calendars
* @property RefStatus $status
*/
class Palette extends \common\components\XActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'palette';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['hex_code', 'name', 'description', 'status_id', 'created_at', 'created_by'], 'required'],
[['sort_order', 'status_id', 'created_at', 'updated_at', 'created_by', 'updated_by'], 'integer'],
[['hex_code', 'name', 'description'], 'string', 'max' => 255],
[['status_id'], 'exist', 'skipOnError' => true, 'targetClass' => RefStatus::className(), 'targetAttribute' => ['status_id' => 'id']],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => Yii::t('app', 'ID'),
'hex_code' => Yii::t('app', 'Hex Code'),
'name' => Yii::t('app', 'Name'),
'description' => Yii::t('app', 'Description'),
'sort_order' => Yii::t('app', 'Sort Order'),
'status_id' => Yii::t('app', 'Status ID'),
'created_at' => Yii::t('app', 'Created At'),
'updated_at' => Yii::t('app', 'Updated At'),
'created_by' => Yii::t('app', 'Created By'),
'updated_by' => Yii::t('app', 'Updated By'),
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getStatus()
{
return $this->hasOne(RefStatus::className(), ['id' => 'status_id']);
}
}
| {'content_hash': '8de86a2e3cb29cd06e3af09341620666', 'timestamp': '', 'source': 'github', 'line_count': 75, 'max_line_length': 145, 'avg_line_length': 26.973333333333333, 'alnum_prop': 0.5244686109738013, 'repo_name': 'spiro-stathakis/projects', 'id': 'dbea4df0af764a19386ee43b4f8f4d5eaaae910c', 'size': '2023', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'common/models/Palette.php', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'ApacheConf', 'bytes': '201'}, {'name': 'Batchfile', 'bytes': '1541'}, {'name': 'CSS', 'bytes': '36068'}, {'name': 'JavaScript', 'bytes': '632845'}, {'name': 'PHP', 'bytes': '815205'}, {'name': 'SQLPL', 'bytes': '24096'}, {'name': 'Shell', 'bytes': '307'}]} |
Kabam-plugin-private-message
===========================
Kabam plugin for sending and recieving private message
[![Build Status](https://travis-ci.org/mykabam/kabam-plugin-private-message.png)](https://travis-ci.org/mykabam/kabam-plugin-private-message)
It exposes 3 routes
GET /api/messages?limit=10&offset=0
==========================
Get all recent messages for current authenticated user, in reverse
chronological order - the most recent messages on top.
Limit and offset can be ommited.
GET /api/messages/:username?limit=10&offset=0
==========================
Get all recent messages of dialog between current authenticated user and other one
with :username. Messages are sorted in chronological order - the most recent on top.
Limit and offset can be ommited.
POST /api/messages/:username
==========================
Sends the message to :username.
Mandatory parameters are `username` (string) and `message` (string).
Optional parameter is `title` (string)
When user receives message, the kabamKernel emits event.
See example
```javascript
MWC.on('notify:pm',function(pm){
console.log('Sendind email to '+pm.user.username+' with text "' + pm.message+'" from user "'+pm.from.username+'"');
});
```
| {'content_hash': 'c42e2592870fa6e666ebcb69deda1777', 'timestamp': '', 'source': 'github', 'line_count': 43, 'max_line_length': 141, 'avg_line_length': 28.46511627906977, 'alnum_prop': 0.6928104575163399, 'repo_name': 'kabam-archived/kabam-plugin-private-message', 'id': '2e28c10d18d2d109408e853f780468817aad7b11', 'size': '1224', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '10045'}]} |
#pragma once
// ensure the MCU series is correct
#ifndef STM32PLUS_F1
#error This class can only be used with the STM32F1 series
#endif
namespace stm32plus {
/*
* Forward declare the IRQ handler names
*/
extern "C" void EXTI0_IRQHandler();
extern "C" void EXTI1_IRQHandler();
extern "C" void EXTI2_IRQHandler();
extern "C" void EXTI3_IRQHandler();
extern "C" void EXTI4_IRQHandler();
extern "C" void EXTI9_5_IRQHandler();
extern "C" void EXTI15_10_IRQHandler();
extern "C" void PVD_IRQHandler();
extern "C" void RTCAlarm_IRQHandler();
extern "C" void USBWakeUp_IRQHandler();
extern "C" void ETH_WKUP_IRQHandler();
extern "C" void OTG_FS_WKUP_IRQHandler();
/**
* Helper class to enable only the desired interrupts in the NVIC. This will
* be fully specialised for each EXTI peripheral
* @tparam TExtiNumber The number of the Exti peripheral (0..19 | 22)
*/
template<uint8_t TExtiNumber>
class ExtiInterruptEnabler {
private:
typedef void (*FPTR)(); // this trick will force the linker to include the ISR
static FPTR _forceLinkage;
public:
static void enable();
};
/**
* Enabler specialisations for F1
*/
template<>
inline void ExtiInterruptEnabler<0>::enable() {
_forceLinkage=&EXTI0_IRQHandler;
Nvic::configureIrq(EXTI0_IRQn);
}
template<>
inline void ExtiInterruptEnabler<1>::enable() {
_forceLinkage=&EXTI1_IRQHandler;
Nvic::configureIrq(EXTI1_IRQn);
}
template<>
inline void ExtiInterruptEnabler<2>::enable() {
_forceLinkage=&EXTI2_IRQHandler;
Nvic::configureIrq(EXTI2_IRQn);
}
template<>
inline void ExtiInterruptEnabler<3>::enable() {
_forceLinkage=&EXTI3_IRQHandler;
Nvic::configureIrq(EXTI3_IRQn);
}
template<>
inline void ExtiInterruptEnabler<4>::enable() {
_forceLinkage=&EXTI4_IRQHandler;
Nvic::configureIrq(EXTI4_IRQn);
}
/**
* 5 through 9 are on a shared IRQ
*/
template<>
inline void ExtiInterruptEnabler<5>::enable() {
_forceLinkage=&EXTI9_5_IRQHandler;
Nvic::configureIrq(EXTI9_5_IRQn);
}
/**
* 10 through 15 are on a shared IRQ
*/
template<>
inline void ExtiInterruptEnabler<10>::enable() {
_forceLinkage=&EXTI15_10_IRQHandler;
Nvic::configureIrq(EXTI15_10_IRQn);
}
/**
* Non-GPIO EXTI lines
*/
template<>
inline void ExtiInterruptEnabler<16>::enable() {
_forceLinkage=&PVD_IRQHandler;
Nvic::configureIrq(PVD_IRQn);
}
template<>
inline void ExtiInterruptEnabler<17>::enable() {
_forceLinkage=&RTCAlarm_IRQHandler;
Nvic::configureIrq(RTCAlarm_IRQn);
}
#if defined(STM32PLUS_F1_CL)
template<>
inline void ExtiInterruptEnabler<18>::enable() {
_forceLinkage=&OTG_FS_WKUP_IRQHandler;
Nvic::configureIrq(OTG_FS_WKUP_IRQn);
}
#else
#if !defined(STM32PLUS_F1_MD_VL)
template<>
inline void ExtiInterruptEnabler<18>::enable() {
_forceLinkage=&USBWakeUp_IRQHandler;
Nvic::configureIrq(USBWakeUp_IRQn);
}
#endif
#endif
/**
* Ethernet EXTI is available on the F107
*/
#if defined(STM32PLUS_F1_CL_E)
template<>
inline void ExtiInterruptEnabler<19>::enable() {
_forceLinkage=Ð_WKUP_IRQHandler;
Nvic::configureIrq(ETH_WKUP_IRQn);
}
#endif
}
| {'content_hash': 'e79894e25eb8318146ac7ee552463db1', 'timestamp': '', 'source': 'github', 'line_count': 153, 'max_line_length': 92, 'avg_line_length': 21.398692810457515, 'alnum_prop': 0.6728772144166157, 'repo_name': '0x00f/stm32plus', 'id': 'f5fb75500ea8630677c67b9205eb3f81df79bcee', 'size': '3454', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/include/exti/f1/ExtiInterruptEnabler.h', 'mode': '33188', 'license': 'bsd-3-clause', 'language': []} |
FROM java:8
MAINTAINER Sebastian Göndör
# Install maven
#RUN apt-get update
#RUN apt-get install -y maven
WORKDIR /build
# Compile and package jar
#ADD pom.xml /build/pom.xml
#ADD src /build/src
#RUN ["mvn", "clean"]
#RUN ["mvn", "install"]
# Dependencies
ADD target/gsls-0.2.5.jar gsls-0.2.5.jar
EXPOSE 4001
EXPOSE 4002
ENTRYPOINT ["java", "-jar", "gsls-0.2.5.jar"]
| {'content_hash': '85b1e67623530c76cd13886cfe447384', 'timestamp': '', 'source': 'github', 'line_count': 22, 'max_line_length': 45, 'avg_line_length': 16.954545454545453, 'alnum_prop': 0.6997319034852547, 'repo_name': 'sgoendoer/gsls', 'id': '225e69b8ad9192e3475d36ac443d3522d029d9b5', 'size': '375', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Dockerfile', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '60623'}]} |
class Model;
class ModelNode : public NodeLink<Model*> {
public:
ModelType getType() const;
ModelNode( Model* const );
~ModelNode();
private:
ModelType type;
}; | {'content_hash': '15d08b2354a58ca240b34f8f9208c9f1', 'timestamp': '', 'source': 'github', 'line_count': 12, 'max_line_length': 43, 'avg_line_length': 13.916666666666666, 'alnum_prop': 0.7065868263473054, 'repo_name': 'Norseman055/WorldShaper', 'id': '0aa975c7cfa699ed3a11d6e61bf5daa6651a6fc4', 'size': '228', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'ModelManager/ModelNode.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '683'}, {'name': 'C', 'bytes': '1507658'}, {'name': 'C++', 'bytes': '68402'}, {'name': 'GLSL', 'bytes': '2258'}, {'name': 'Objective-C', 'bytes': '10437'}]} |
namespace Js
{
class PropertyString : public JavascriptString
{
protected:
Field(PropertyRecordUsageCache) propertyRecordUsageCache;
DEFINE_VTABLE_CTOR(PropertyString, JavascriptString);
PropertyString(StaticType* type, const Js::PropertyRecord* propertyRecord);
public:
virtual void GetPropertyRecord(_Out_ PropertyRecord const** propertyRecord, bool dontLookupFromDictionary = false) override
{
*propertyRecord = this->propertyRecordUsageCache.GetPropertyRecord();
}
Js::PropertyId GetPropertyId()
{
return this->propertyRecordUsageCache.GetPropertyRecord()->GetPropertyId();
}
PolymorphicInlineCache * GetLdElemInlineCache() const;
PolymorphicInlineCache * GetStElemInlineCache() const;
PropertyRecordUsageCache * GetPropertyRecordUsageCache();
bool TrySetPropertyFromCache(
_In_ RecyclableObject *const object,
_In_ Var propertyValue,
_In_ ScriptContext *const requestContext,
const PropertyOperationFlags propertyOperationFlags,
_Inout_ PropertyValueInfo *const propertyValueInfo);
template <bool OwnPropertyOnly>
bool TryGetPropertyFromCache(
Var const instance,
RecyclableObject *const object,
Var *const propertyValue,
ScriptContext *const requestContext,
PropertyValueInfo *const propertyValueInfo);
static PropertyString* New(StaticType* type, const Js::PropertyRecord* propertyRecord, Recycler *recycler);
virtual void const * GetOriginalStringReference() override;
virtual RecyclableObject * CloneToScriptContext(ScriptContext* requestContext) override;
static uint32 GetOffsetOfLdElemInlineCache() { return offsetof(PropertyString, propertyRecordUsageCache) + PropertyRecordUsageCache::GetOffsetOfLdElemInlineCache(); }
static uint32 GetOffsetOfStElemInlineCache() { return offsetof(PropertyString, propertyRecordUsageCache) + PropertyRecordUsageCache::GetOffsetOfStElemInlineCache(); }
static uint32 GetOffsetOfHitRate() { return offsetof(PropertyString, propertyRecordUsageCache) + PropertyRecordUsageCache::GetOffsetOfHitRate(); }
static bool Is(Var var);
static bool Is(RecyclableObject * var);
template <typename T> static PropertyString* TryFromVar(T var);
static PropertyString* UnsafeFromVar(Var aValue);
#if ENABLE_TTD
//Get the associated property id for this string if there is on (e.g. it is a propertystring otherwise return Js::PropertyIds::_none)
virtual Js::PropertyId TryGetAssociatedPropertyId() const override { return this->propertyRecordUsageCache.GetPropertyRecord()->GetPropertyId(); }
#endif
public:
virtual VTableValue DummyVirtualFunctionToHinderLinkerICF()
{
return VTableValue::VtablePropertyString;
}
};
// Templated so that the Is call dispatchs to different function depending
// on if argument is already a RecyclableObject* or only known to be a Var
//
// In case it is known to be a RecyclableObject*, the Is call skips that check
template <typename T> inline
PropertyString * PropertyString::TryFromVar(T var)
{
return PropertyString::Is(var)
? reinterpret_cast<PropertyString*>(var)
: nullptr;
}
template <bool OwnPropertyOnly> inline
bool PropertyString::TryGetPropertyFromCache(
Var const instance,
RecyclableObject *const object,
Var *const propertyValue,
ScriptContext *const requestContext,
PropertyValueInfo *const propertyValueInfo)
{
return this->propertyRecordUsageCache.TryGetPropertyFromCache<OwnPropertyOnly>(instance, object, propertyValue, requestContext, propertyValueInfo, this);
}
} // namespace Js
| {'content_hash': '920ff55fbf3c974a5cd3196fb9cad13a', 'timestamp': '', 'source': 'github', 'line_count': 90, 'max_line_length': 170, 'avg_line_length': 40.53333333333333, 'alnum_prop': 0.7637061403508771, 'repo_name': 'mrkmarron/ChakraCore', 'id': 'f9e73f62fb30c86527d5228198d53168466b37a2', 'size': '4029', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/Runtime/Library/PropertyString.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Assembly', 'bytes': '198181'}, {'name': 'Batchfile', 'bytes': '95342'}, {'name': 'C', 'bytes': '1639946'}, {'name': 'C++', 'bytes': '35896762'}, {'name': 'CMake', 'bytes': '85334'}, {'name': 'CSS', 'bytes': '1575'}, {'name': 'Groovy', 'bytes': '13787'}, {'name': 'HTML', 'bytes': '1137'}, {'name': 'JavaScript', 'bytes': '49110930'}, {'name': 'Objective-C', 'bytes': '3162832'}, {'name': 'Perl', 'bytes': '29562'}, {'name': 'PowerShell', 'bytes': '50433'}, {'name': 'Python', 'bytes': '74730'}, {'name': 'Roff', 'bytes': '161911'}, {'name': 'Shell', 'bytes': '52452'}, {'name': 'WebAssembly', 'bytes': '2781609'}]} |
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("HybridWebApp.Framework.Test1")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HybridWebApp.Framework.Test1")]
[assembly: AssemblyCopyright("Copyright © 2015")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyMetadata("TargetPlatform","UAP")]
// 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)] | {'content_hash': 'e355f28fb82a3873fd60c726817cbb97', 'timestamp': '', 'source': 'github', 'line_count': 30, 'max_line_length': 84, 'avg_line_length': 37.53333333333333, 'alnum_prop': 0.7468916518650088, 'repo_name': 'craigomatic/HybridWebApp-Framework', 'id': 'be85c4b1db2590caea959fe9ff4088a377d92078', 'size': '1129', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'test/HybridWebApp.Framework.Test/Properties/AssemblyInfo.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '98380'}, {'name': 'JavaScript', 'bytes': '5032'}]} |
<?php
namespace Grav\Common\Page;
use Grav\Common\Filesystem\Folder;
use Grav\Common\Config\Config;
use Grav\Common\GravTrait;
use Grav\Common\Utils;
use Grav\Common\Cache;
use Grav\Common\Twig;
use Grav\Common\Uri;
use Grav\Common\Grav;
use Grav\Common\Taxonomy;
use Grav\Common\Markdown\Parsedown;
use Grav\Common\Markdown\ParsedownExtra;
use Grav\Common\Data\Blueprint;
use RocketTheme\Toolbox\Event\Event;
use RocketTheme\Toolbox\File\MarkdownFile;
use Symfony\Component\Yaml\Yaml;
/**
* The Page object, or "Page" object is the main powerhouse of Grav. It contains all the information
* related to the nested pages structure that represents the content. Each page has several attributes that
* can be retrieved via public functions. Also each page can potentially contain an array of sub-pages.
* Recursively traversing the page structure allows Grav to create navigation systems.
*
* @author RocketTheme
* @license MIT
*/
class Page
{
use GravTrait;
/**
* @var string Filename. Leave as null if page is folder.
*/
protected $name;
protected $folder;
protected $path;
protected $extension;
protected $parent;
protected $template;
protected $expires;
protected $visible;
protected $published;
protected $publish_date;
protected $unpublish_date;
protected $slug;
protected $route;
protected $raw_route;
protected $url;
protected $routes;
protected $routable;
protected $modified;
protected $id;
protected $items;
protected $header;
protected $frontmatter;
protected $content;
protected $summary;
protected $raw_content;
protected $pagination;
protected $media;
protected $metadata;
protected $title;
protected $max_count;
protected $menu;
protected $date;
protected $taxonomy;
protected $order_by;
protected $order_dir;
protected $order_manual;
protected $modular;
protected $modular_twig;
protected $process;
protected $summary_size;
protected $markdown_extra;
protected $etag;
protected $last_modified;
/**
* @var Page Unmodified (original) version of the page. Used for copying and moving the page.
*/
private $_original;
/**
* @var string Action
*/
private $_action;
/**
* Page Object Constructor
*/
public function __construct()
{
/** @var Config $config */
$config = self::getGrav()['config'];
$this->routable = true;
$this->taxonomy = array();
$this->process = $config->get('system.pages.process');
$this->published = true;
}
/**
* Initializes the page instance variables based on a file
*
* @param \SplFileInfo $file The file information for the .md file that the page represents
* @return void
*/
public function init(\SplFileInfo $file)
{
$this->filePath($file->getPathName());
$this->modified($file->getMTime());
$this->id($this->modified().md5($this->filePath()));
$this->header();
$this->date();
$this->metadata();
$this->url();
$this->visible();
$this->modularTwig($this->slug[0] == '_');
// Handle publishing dates if no explict published option set
if (self::getGrav()['config']->get('system.pages.publish_dates') && !isset($this->header->published)) {
// unpublish if required, if not clear cache right before page should be unpublished
if ($this->unpublishDate()) {
if ($this->unpublishDate() < time()) {
$this->published(false);
} else {
$this->published();
self::getGrav()['cache']->setLifeTime($this->unpublishDate());
}
}
// publish if required, if not clear cache right before page is published
if ($this->publishDate() != $this->modified() && $this->publishDate() > time()) {
$this->published(false);
self::getGrav()['cache']->setLifeTime($this->publishDate());
}
}
$this->published();
}
/**
* Gets and Sets the raw data
*
* @param string $var Raw content string
* @return Object Raw content string
*/
public function raw($var = null)
{
$file = $this->file();
if ($var) {
// First update file object.
if ($file) {
$file->raw($var);
}
// Reset header and content.
$this->modified = time();
$this->id($this->modified().md5($this->filePath()));
$this->header = null;
$this->content = null;
$this->summary = null;
}
return $file ? $file->raw() : '';
}
public function frontmatter($var = null)
{
if ($var) {
$this->frontmatter = (string) $var;
// Update also file object.
$file = $this->file();
if ($file) {
$file->frontmatter((string) $var);
}
// Force content re-processing.
$this->id(time().md5($this->filePath()));
}
if (!$this->frontmatter) {
$this->header();
}
return $this->frontmatter;
}
/**
* Gets and Sets the header based on the YAML configuration at the top of the .md file
*
* @param object|array $var a YAML object representing the configuration for the file
* @return object the current YAML configuration
*/
public function header($var = null)
{
if ($var) {
$this->header = (object) $var;
// Update also file object.
$file = $this->file();
if ($file) {
$file->header((array) $var);
}
// Force content re-processing.
$this->id(time().md5($this->filePath()));
}
if (!$this->header) {
$file = $this->file();
if ($file) {
$this->raw_content = $file->markdown();
$this->frontmatter = $file->frontmatter();
$this->header = (object) $file->header();
$var = true;
}
}
if ($var) {
if (isset($this->header->slug)) {
$this->slug = trim($this->header->slug);
}
if (isset($this->header->routes)) {
$this->routes = (array)($this->header->routes);
}
if (isset($this->header->title)) {
$this->title = trim($this->header->title);
}
if (isset($this->header->template)) {
$this->template = trim($this->header->template);
}
if (isset($this->header->menu)) {
$this->menu = trim($this->header->menu);
}
if (isset($this->header->routable)) {
$this->routable = $this->header->routable;
}
if (isset($this->header->visible)) {
$this->visible = $this->header->visible;
}
if (isset($this->header->order_dir)) {
$this->order_dir = trim($this->header->order_dir);
}
if (isset($this->header->order_by)) {
$this->order_by = trim($this->header->order_by);
}
if (isset($this->header->order_manual)) {
$this->order_manual = (array)$this->header->order_manual;
}
if (isset($this->header->date)) {
$this->date = strtotime($this->header->date);
}
if (isset($this->header->markdown_extra)) {
$this->markdown_extra = (bool)$this->header->markdown_extra;
}
if (isset($this->header->taxonomy)) {
foreach ($this->header->taxonomy as $taxonomy => $taxitems) {
$this->taxonomy[$taxonomy] = (array)$taxitems;
}
}
if (isset($this->header->max_count)) {
$this->max_count = intval($this->header->max_count);
}
if (isset($this->header->process)) {
foreach ($this->header->process as $process => $status) {
$this->process[$process] = $status;
}
}
if (isset($this->header->published)) {
$this->published = $this->header->published;
}
if (isset($this->header->publish_date)) {
$this->publish_date = strtotime($this->header->publish_date);
}
if (isset($this->header->unpublish_date)) {
$this->unpublish_date = strtotime($this->header->unpublish_date);
}
if (isset($this->header->expires)) {
$this->expires = intval($this->header->expires);
}
if (isset($this->header->etag)) {
$this->etag = (bool)$this->header->etag;
}
if (isset($this->header->last_modified)) {
$this->last_modified = (bool)$this->header->last_modified;
}
}
return $this->header;
}
/**
* Modify a header value directly
*
* @param $key
* @param $value
*/
public function modifyHeader($key, $value)
{
$this->header->$key = $value;
}
/**
* Get the summary.
*
* @param int $size Max summary size.
* @return string
*/
public function summary($size = null)
{
/** @var Config $config */
$config = self::getGrav()['config']->get('site.summary');
if (isset($this->header->summary)) {
$config = array_merge($config, $this->header->summary);
}
// Return summary based on settings in site config file
if (!$config['enabled']) {
return $content;
}
// Set up variables to process summary from page or from custom summary
if ($this->summary === null) {
$content = $this->content();
$summary_size = $this->summary_size;
} else {
$content = $this->summary;
$summary_size = mb_strlen($this->summary);
}
// Return calculated summary based on summary divider's position
$format = $config['format'];
// Return entire page content on wrong/ unknown format
if (!in_array($format, array('short', 'long'))) {
return $content;
} elseif (($format === 'short') && isset($summary_size)) {
return mb_substr($content, 0, $summary_size);
}
// Get summary size from site config's file
if (is_null($size)) {
$size = $config['size'];
}
// If the size is zero, return the entire page content
if ($size === 0) {
return $content;
// Return calculated summary based on defaults
} elseif (!is_numeric($size) || ($size < 0)) {
$size = 300;
}
return Utils::truncateHTML($content, $size);
}
/**
* Sets the summary of the page
*
* @param string $var Summary
*/
public function setSummary($summary)
{
$this->summary = $summary;
}
/**
* Gets and Sets the content based on content portion of the .md file
*
* @param string $var Content
* @return string Content
*/
public function content($var = null)
{
if ($var !== null) {
$this->raw_content = $var;
// Update file object.
$file = $this->file();
if ($file) {
$file->markdown($var);
}
// Force re-processing.
$this->id(time().md5($this->filePath()));
$this->content = null;
}
// If no content, process it
if ($this->content === null) {
// Get media
$this->media();
// Load cached content
/** @var Cache $cache */
$cache = self::getGrav()['cache'];
$cache_id = md5('page'.$this->id());
$this->content = $cache->fetch($cache_id);
$process_markdown = $this->shouldProcess('markdown');
$process_twig = $this->shouldProcess('twig');
$cache_twig = isset($this->header->cache_enable) ? $this->header->cache_enable : true;
$twig_first = isset($this->header->twig_first) ? $this->header->twig_first : false;
$twig_already_processed = false;
// if no cached-content run everything
if ($this->content === false) {
$this->content = $this->raw_content;
self::getGrav()->fireEvent('onPageContentRaw', new Event(['page' => $this]));
if ($twig_first) {
if ($process_twig) {
$this->processTwig();
$twig_already_processed = true;
}
if ($process_markdown) {
$this->processMarkdown();
}
if ($cache_twig) {
$this->cachePageContent();
}
} else {
if ($process_markdown) {
$this->processMarkdown();
}
if (!$cache_twig) {
$this->cachePageContent();
}
if ($process_twig) {
$this->processTwig();
$twig_already_processed = true;
}
if ($cache_twig) {
$this->cachePageContent();
}
}
// content cached, but twig cache off
}
// only markdown content cached, process twig if required and not already processed
if ($process_twig && !$cache_twig && !$twig_already_processed) {
$this->processTwig();
}
// Handle summary divider
$delimiter = self::getGrav()['config']->get('site.summary.delimiter', '===');
$divider_pos = strpos($this->content, "<p>{$delimiter}</p>");
if ($divider_pos !== false) {
$this->summary_size = $divider_pos;
$this->content = str_replace("<p>{$delimiter}</p>", '', $this->content);
}
}
return $this->content;
}
/**
* Process the Markdown content. Uses Parsedown or Parsedown Extra depending on configuration
*/
protected function processMarkdown()
{
/** @var Config $config */
$config = self::getGrav()['config'];
$defaults = (array) $config->get('system.pages.markdown');
if (isset($this->header()->markdown)) {
$defaults = array_merge($defaults, $this->header()->markdown);
}
// pages.markdown_extra is deprecated, but still check it...
if (isset($this->markdown_extra) || $config->get('system.pages.markdown_extra') !== null) {
$defaults['extra'] = $this->markdown_extra ?: $config->get('system.pages.markdown_extra');
}
// Initialize the preferred variant of Parsedown
if ($defaults['extra']) {
$parsedown = new ParsedownExtra($this, $defaults);
} else {
$parsedown = new Parsedown($this, $defaults);
}
$this->content = $parsedown->text($this->content);
}
/**
* Process the Twig page content.
*/
private function processTwig()
{
$twig = self::getGrav()['twig'];
$this->content = $twig->processPage($this, $this->content);
}
/**
* Fires the onPageContentProcessed event, and caches the page content using a unique ID for the page
*/
private function cachePageContent()
{
$cache = self::getGrav()['cache'];
$cache_id = md5('page'.$this->id());
self::getGrav()->fireEvent('onPageContentProcessed', new Event(['page' => $this]));
$cache->save($cache_id, $this->content);
}
/**
* Needed by the onPageContentProcessed event to get the raw page content
*
* @return string the current page content
*/
public function getRawContent()
{
return $this->content;
}
/**
* Needed by the onPageContentProcessed event to set the raw page content
*
* @param $content
*/
public function setRawContent($content)
{
$this->content = $content;
}
/**
* Get value from a page variable (used mostly for creating edit forms).
*
* @param string $name Variable name.
* @param mixed $default
* @return mixed
*/
public function value($name, $default = null)
{
if ($name == 'content') {
return $this->raw_content;
}
if ($name == 'route') {
return dirname($this->route());
}
if ($name == 'order') {
$order = $this->order();
return $order ? (int) $this->order() : '';
}
if ($name == 'folder') {
$regex = '/^[0-9]+\./u';
return preg_replace($regex, '', $this->folder);
}
if ($name == 'type') {
return basename($this->name(), '.md');
}
if ($name == 'media') {
return $this->media()->all();
}
if ($name == 'media.file') {
return $this->media()->files();
}
if ($name == 'media.video') {
return $this->media()->videos();
}
if ($name == 'media.image') {
return $this->media()->images();
}
if ($name == 'media.audio') {
return $this->media()->audios();
}
$path = explode('.', $name);
$scope = array_shift($path);
if ($name == 'frontmatter') {
return $this->frontmatter;
}
if ($scope == 'header') {
$current = $this->header();
foreach ($path as $field) {
if (is_object($current) && isset($current->{$field})) {
$current = $current->{$field};
} elseif (is_array($current) && isset($current[$field])) {
$current = $current[$field];
} else {
return $default;
}
}
return $current;
}
return $default;
}
public function rawMarkdown($var = null)
{
if ($var !== null) {
$this->raw_content = $var;
}
return $this->raw_content;
}
/**
* Get file object to the page.
*
* @return MarkdownFile|null
*/
public function file()
{
if ($this->name) {
// TODO: use CompiledMarkdownFile after fixing issues in it.
return MarkdownFile::instance($this->filePath());
}
return null;
}
/**
* Get page extension
*
* @param $var
*
* @return mixed
*/
public function extension($var = null)
{
if ($var !== null) {
$this->extension = $var;
}
return $this->extension;
}
/**
* Save page if there's a file assigned to it.
* @param bool $reorder Internal use.
*/
public function save($reorder = true)
{
// Perform move, copy or reordering if needed.
$this->doRelocation($reorder);
$file = $this->file();
if ($file) {
$file->filename($this->filePath());
$file->header((array) $this->header());
$file->markdown($this->raw_content);
$file->save();
}
}
/**
* Prepare move page to new location. Moves also everything that's under the current page.
*
* You need to call $this->save() in order to perform the move.
*
* @param Page $parent New parent page.
* @return Page
*/
public function move(Page $parent)
{
$clone = clone $this;
$clone->_action = 'move';
$clone->_original = $this;
$clone->parent($parent);
$clone->id(time().md5($clone->filePath()));
// TODO: make sure that the path is in user context.
if ($parent->path()) {
$clone->path($parent->path() . '/' . $clone->folder());
}
// TODO: make sure we always have the route.
if ($parent->route()) {
$clone->route($parent->route() . '/'. $clone->slug());
}
return $clone;
}
/**
* Prepare a copy from the page. Copies also everything that's under the current page.
*
* Returns a new Page object for the copy.
* You need to call $this->save() in order to perform the move.
*
* @param Page $parent New parent page.
* @return Page
*/
public function copy($parent)
{
$clone = $this->move($parent);
$clone->_action = 'copy';
return $clone;
}
/**
* Get blueprints for the page.
*
* @return Blueprint
*/
public function blueprints()
{
/** @var Pages $pages */
$pages = self::getGrav()['pages'];
return $pages->blueprints($this->template());
}
/**
* Validate page header.
*
* @throws \Exception
*/
public function validate()
{
$blueprints = $this->blueprints();
$blueprints->validate($this->toArray());
}
/**
* Filter page header from illegal contents.
*/
public function filter()
{
$blueprints = $this->blueprints();
$values = $blueprints->filter($this->toArray());
$this->header($values['header']);
}
/**
* Get unknown header variables.
*
* @return array
*/
public function extra()
{
$blueprints = $this->blueprints();
return $blueprints->extra($this->toArray(), 'header.');
}
/**
* Convert page to an array.
*
* @return array
*/
public function toArray()
{
return array(
'header' => (array) $this->header(),
'content' => (string) $this->value('content')
);
}
/**
* Convert page to YAML encoded string.
*
* @return string
*/
public function toYaml()
{
return Yaml::dump($this->toArray(), 10);
}
/**
* Convert page to JSON encoded string.
*
* @return string
*/
public function toJson()
{
return json_encode($this->toArray());
}
/**
* Gets and sets the associated media as found in the page folder.
*
* @param Media $var Representation of associated media.
* @return Media Representation of associated media.
*/
public function media($var = null)
{
/** @var Cache $cache */
$cache = self::getGrav()['cache'];
if ($var) {
$this->media = $var;
}
if ($this->media === null) {
// Use cached media if possible.
$media_cache_id = md5('media'.$this->id());
if (!$media = $cache->fetch($media_cache_id)) {
$media = new Media($this->path());
$cache->save($media_cache_id, $media);
}
$this->media = $media;
}
return $this->media;
}
/**
* Gets and sets the name field. If no name field is set, it will return 'default.md'.
*
* @param string $var The name of this page.
* @return string The name of this page.
*/
public function name($var = null)
{
if ($var !== null) {
$this->name = $var;
}
return empty($this->name) ? 'default.md' : $this->name;
}
/**
* Returns child page type.
*
* @return string
*/
public function childType()
{
return isset($this->header->child_type) ? (string) $this->header->child_type : 'default';
}
/**
* Gets and sets the template field. This is used to find the correct Twig template file to render.
* If no field is set, it will return the name without the .md extension
*
* @param string $var the template name
* @return string the template name
*/
public function template($var = null)
{
if ($var !== null) {
$this->template = $var;
}
if (empty($this->template)) {
$this->template = ($this->modular() ? 'modular/' : '') . str_replace($this->extension, '', $this->name());
}
return $this->template;
}
/**
* Gets and sets the expires field. If not set will return the default
*
* @param string $var The name of this page.
* @return string The name of this page.
*/
public function expires($var = null)
{
if ($var !== null) {
$this->expires = $var;
}
return empty($this->expires) ? self::getGrav()['config']->get('system.pages.expires') : $this->expires;
}
/**
* Gets and sets the title for this Page. If no title is set, it will use the slug() to get a name
*
* @param string $var the title of the Page
* @return string the title of the Page
*/
public function title($var = null)
{
if ($var !== null) {
$this->title = $var;
}
if (empty($this->title)) {
$this->title = ucfirst($this->slug());
}
return $this->title;
}
/**
* Gets and sets the menu name for this Page. This is the text that can be used specifically for navigation.
* If no menu field is set, it will use the title()
*
* @param string $var the menu field for the page
* @return string the menu field for the page
*/
public function menu($var = null)
{
if ($var !== null) {
$this->menu = $var;
}
if (empty($this->menu)) {
$this->menu = $this->title();
}
return $this->menu;
}
/**
* Gets and Sets whether or not this Page is visible for navigation
*
* @param bool $var true if the page is visible
* @return bool true if the page is visible
*/
public function visible($var = null)
{
if ($var !== null) {
$this->visible = (bool) $var;
}
if ($this->visible === null) {
// Set item visibility in menu if folder is different from slug
// eg folder = 01.Home and slug = Home
$regex = '/^[0-9]+\./u';
if (preg_match($regex, $this->folder)) {
$this->visible = true;
} else {
$this->visible = false;
}
}
return $this->visible;
}
/**
* Gets and Sets whether or not this Page is considered published
*
* @param bool $var true if the page is published
* @return bool true if the page is published
*/
public function published($var = null)
{
if ($var !== null) {
$this->published = (bool) $var;
}
// If not published, should not be visible in menus either
if ($this->published === false) {
$this->visible = false;
}
return $this->published;
}
/**
* Gets and Sets the Page publish date
*
* @param string $var string representation of a date
* @return int unix timestamp representation of the date
*/
public function publishDate($var = null)
{
if ($var !== null) {
$this->publish_date = strtotime($var);
}
if ($this->publish_date === null) {
$this->publish_date = $this->date();
}
return $this->publish_date;
}
/**
* Gets and Sets the Page unpublish date
*
* @param string $var string representation of a date
* @return int|null unix timestamp representation of the date
*/
public function unpublishDate($var = null)
{
if ($var !== null) {
$this->unpublish_date = strtotime($var);
}
return $this->unpublish_date;
}
/**
* Gets and Sets whether or not this Page is routable, ie you can reach it
* via a URL
*
* @param bool $var true if the page is routable
* @return bool true if the page is routable
*/
public function routable($var = null)
{
if ($var !== null) {
$this->routable = (bool) $var;
}
return $this->routable;
}
/**
* Gets and Sets the process setup for this Page. This is multi-dimensional array that consists of
* a simple array of arrays with the form array("markdown"=>true) for example
*
* @param array $var an Array of name value pairs where the name is the process and value is true or false
* @return array an Array of name value pairs where the name is the process and value is true or false
*/
public function process($var = null)
{
if ($var !== null) {
$this->process = (array) $var;
}
return $this->process;
}
/**
* Function to merge page metadata tags and build an array of Metadata objects
* that can then be rendered in the page.
*
* @param array $var an Array of metadata values to set
* @return array an Array of metadata values for the page
*/
public function metadata($var = null)
{
if ($var !== null) {
$this->metadata = (array) $var;
}
// if not metadata yet, process it.
if (null === $this->metadata) {
$header_tag_http_equivs = ['content-type', 'default-style', 'refresh'];
$this->metadata = array();
$page_header = $this->header;
// Set the Generator tag
$this->metadata['generator'] = array('name'=>'generator', 'content'=>'GravCMS ' . GRAV_VERSION);
// Safety check to ensure we have a header
if ($page_header) {
// Merge any site.metadata settings in with page metadata
$defaults = (array) self::getGrav()['config']->get('site.metadata');
if (isset($page_header->metadata)) {
$page_header->metadata = array_merge($defaults, $page_header->metadata);
} else {
$page_header->metadata = $defaults;
}
// Build an array of meta objects..
foreach ((array)$page_header->metadata as $key => $value) {
// If this is a property type metadata: "og", "twitter", "facebook" etc
if (is_array($value)) {
foreach ($value as $property => $prop_value) {
$prop_key = $key.":".$property;
$this->metadata[$prop_key] = array('property'=>$prop_key, 'content'=>htmlspecialchars($prop_value, ENT_QUOTES));
}
// If it this is a standard meta data type
} else {
if (in_array($key, $header_tag_http_equivs)) {
$this->metadata[$key] = array('http_equiv'=>$key, 'content'=>htmlspecialchars($value, ENT_QUOTES));
} else {
$this->metadata[$key] = array('name'=>$key, 'content'=>htmlspecialchars($value, ENT_QUOTES));
}
}
}
}
}
return $this->metadata;
}
/**
* Gets and Sets the slug for the Page. The slug is used in the URL routing. If not set it uses
* the parent folder from the path
*
* @param string $var the slug, e.g. 'my-blog'
* @return string the slug
*/
public function slug($var = null)
{
if ($var !== null) {
$this->slug = $var;
}
if (empty($this->slug)) {
$regex = '/^[0-9]+\./u';
$this->slug = preg_replace($regex, '', $this->folder);
}
return $this->slug;
}
/**
* Get/set order number of this page.
*
* @param int $var
* @return int|bool
*/
public function order($var = null)
{
$regex = '/^[0-9]+\./u';
if ($var !== null) {
$order = !empty($var) ? sprintf('%02d.', (int) $var) : '';
$slug = preg_replace($regex, '', $this->folder);
$this->folder($order.$slug);
}
preg_match($regex, $this->folder, $order);
return isset($order[0]) ? $order[0] : false;
}
/**
* Gets the URL with host information, aka Permalink.
* @return string The permalink.
*/
public function permalink()
{
return $this->url(true);
}
/**
* Gets the URL for a page - alias of url().
*
* @param bool $include_host
* @return string the permalink
*/
public function link($include_host = false)
{
return $this->url($include_host);
}
/**
* Gets the url for the Page.
*
* @param bool $include_host Defaults false, but true would include http://yourhost.com
* @param bool $canonical true to return the canonical URL
*
* @return string The url.
*/
public function url($include_host = false, $canonical = false)
{
/** @var Pages $pages */
$pages = self::getGrav()['pages'];
/** @var Language $language */
$language = self::getGrav()['language'];
// get pre-route
$pre_route = $language->enabled() && $language->getActive() ? '/'.$language->getActive() : '';
// get canonical route if requested
if ($canonical) {
$route = $pre_route . $this->routeCanonical();
} else {
$route = $pre_route . $this->route();
}
/** @var Uri $uri */
$uri = self::getGrav()['uri'];
$rootUrl = $uri->rootUrl($include_host) . $pages->base();
$url = $rootUrl.'/'.trim($route, '/');
// trim trailing / if not root
if ($url !== '/') {
$url = rtrim($url, '/');
}
return $url;
}
/**
* Gets the route for the page based on the route headers if available, else from
* the parents route and the current Page's slug.
*
* @param string $var Set new default route.
*
* @return string The route for the Page.
*/
public function route($var = null)
{
if ($var !== null) {
$this->route = $var;
}
if (empty($this->route)) {
// calculate route based on parent slugs
$baseRoute = $this->parent ? (string) $this->parent()->route() : null;
$this->route = isset($baseRoute) ? $baseRoute . '/'. $this->slug() : null;
if (!empty($this->routes) && isset($this->routes['default'])) {
$this->routes['aliases'][] = $this->route;
$this->route = $this->routes['default'];
return $this->route;
}
}
return $this->route;
}
public function rawRoute($var = null)
{
if ($var !== null) {
$this->raw_route = $var;
}
if (empty($this->raw_route)) {
$baseRoute = $this->parent ? (string) $this->parent()->rawRoute() : null;
$regex = '/^[0-9]+\./u';
$slug = preg_replace($regex, '', $this->folder);
$this->raw_route = isset($baseRoute) ? $baseRoute . '/'. $slug : null;
}
return $this->raw_route;
}
/**
* Gets the route aliases for the page based on page headers.
*
* @param array $var list of route aliases
*
* @return array The route aliases for the Page.
*/
public function routeAliases($var = null)
{
if ($var !== null) {
$this->routes['aliases'] = (array) $var;
}
if (!empty($this->routes) && isset($this->routes['aliases'])) {
return $this->routes['aliases'];
} else {
return [];
}
}
/**
* Gets the canonical route for this page if its set. If provided it will use
* that value, else if it's `true` it will use the default route.
*
* @param null $var
*
* @return bool|string
*/
public function routeCanonical($var = null)
{
if ($var !== null) {
$this->routes['canonical'] = (array)$var;
}
if (!empty($this->routes) && isset($this->routes['canonical'])) {
return $this->routes['canonical'];
}
return $this->route();
}
/**
* Gets and sets the identifier for this Page object.
*
* @param string $var the identifier
* @return string the identifier
*/
public function id($var = null)
{
if ($var !== null) {
$this->id = $var;
}
return $this->id;
}
/**
* Gets and sets the modified timestamp.
*
* @param int $var modified unix timestamp
* @return int modified unix timestamp
*/
public function modified($var = null)
{
if ($var !== null) {
$this->modified = $var;
}
return $this->modified;
}
/**
* Gets and sets the option to show the etag header for the page.
*
* @param boolean $var show etag header
* @return boolean show etag header
*/
public function eTag($var = null)
{
if ($var !== null) {
$this->etag = $var;
}
if (!isset($this->etag)) {
$this->etag = (bool) self::getGrav()['config']->get('system.pages.etag');
}
return $this->etag;
}
/**
* Gets and sets the option to show the last_modified header for the page.
*
* @param boolean $var show last_modified header
* @return boolean show last_modified header
*/
public function lastModified($var = null)
{
if ($var !== null) {
$this->last_modified = $var;
}
if (!isset($this->last_modified)) {
$this->last_modified = (bool) self::getGrav()['config']->get('system.pages.last_modified');
}
return $this->last_modified;
}
/**
* Gets and sets the path to the .md file for this Page object.
*
* @param string $var the file path
* @return string|null the file path
*/
public function filePath($var = null)
{
if ($var !== null) {
// Filename of the page.
$this->name = basename($var);
// Folder of the page.
$this->folder = basename(dirname($var));
// Path to the page.
$this->path = dirname(dirname($var));
}
return $this->path . '/' . $this->folder . '/' . ($this->name ?: '');
}
/**
* Gets the relative path to the .md file
*
* @return string The relative file path
*/
public function filePathClean()
{
return str_replace(ROOT_DIR, '', $this->filePath());
}
/**
* Gets and sets the path to the folder where the .md for this Page object resides.
* This is equivalent to the filePath but without the filename.
*
* @param string $var the path
* @return string|null the path
*/
public function path($var = null)
{
if ($var !== null) {
// Folder of the page.
$this->folder = basename($var);
// Path to the page.
$this->path = dirname($var);
}
return $this->path ? $this->path . '/' . $this->folder : null;
}
/**
* Get/set the folder.
*
* @param string $var Optional path
* @return string|null
*/
public function folder($var = null)
{
if ($var !== null) {
$this->folder = $var;
}
return $this->folder;
}
/**
* Gets and sets the date for this Page object. This is typically passed in via the page headers
*
* @param string $var string representation of a date
* @return int unix timestamp representation of the date
*/
public function date($var = null)
{
if ($var !== null) {
$this->date = strtotime($var);
}
if (!$this->date) {
$this->date = $this->modified;
}
return $this->date;
}
/**
* Gets and sets the order by which any sub-pages should be sorted.
* @param string $var the order, either "asc" or "desc"
* @return string the order, either "asc" or "desc"
*/
public function orderDir($var = null)
{
if ($var !== null) {
$this->order_dir = $var;
}
if (empty($this->order_dir)) {
$this->order_dir = 'asc';
}
return $this->order_dir;
}
/**
* Gets and sets the order by which the sub-pages should be sorted.
*
* default - is the order based on the file system, ie 01.Home before 02.Advark
* title - is the order based on the title set in the pages
* date - is the order based on the date set in the pages
* folder - is the order based on the name of the folder with any numerics omitted
*
* @param string $var supported options include "default", "title", "date", and "folder"
* @return string supported options include "default", "title", "date", and "folder"
*/
public function orderBy($var = null)
{
if ($var !== null) {
$this->order_by = $var;
}
return $this->order_by;
}
/**
* Gets the manual order set in the header.
*
* @param string $var supported options include "default", "title", "date", and "folder"
* @return array
*/
public function orderManual($var = null)
{
if ($var !== null) {
$this->order_manual = $var;
}
return (array) $this->order_manual;
}
/**
* Gets and sets the maxCount field which describes how many sub-pages should be displayed if the
* sub_pages header property is set for this page object.
*
* @param int $var the maximum number of sub-pages
* @return int the maximum number of sub-pages
*/
public function maxCount($var = null)
{
if ($var !== null) {
$this->max_count = (int) $var;
}
if (empty($this->max_count)) {
/** @var Config $config */
$config = self::getGrav()['config'];
$this->max_count = (int) $config->get('system.pages.list.count');
}
return $this->max_count;
}
/**
* Gets and sets the taxonomy array which defines which taxonomies this page identifies itself with.
*
* @param array $var an array of taxonomies
* @return array an array of taxonomies
*/
public function taxonomy($var = null)
{
if ($var !== null) {
$this->taxonomy = $var;
}
return $this->taxonomy;
}
/**
* Gets and sets the modular var that helps identify this parent page contains modular pages.
*
* @param bool $var true if modular_twig
* @return bool true if modular_twig
*/
public function modular($var = null)
{
return $this->modularTwig($var);
}
/**
* Gets and sets the modular_twig var that helps identify this page as a modular page that will need
* twig processing handled differently from a regular page.
*
* @param bool $var true if modular_twig
* @return bool true if modular_twig
*/
public function modularTwig($var = null)
{
if ($var !== null) {
$this->modular_twig = (bool) $var;
if ($var) {
$this->process['twig'] = true;
$this->visible(false);
}
}
return $this->modular_twig;
}
/**
* Gets the configured state of the processing method.
*
* @param string $process the process, eg "twig" or "markdown"
* @return bool whether or not the processing method is enabled for this Page
*/
public function shouldProcess($process)
{
return isset($this->process[$process]) ? (bool) $this->process[$process] : false;
}
/**
* Gets and Sets the parent object for this page
*
* @param Page $var the parent page object
* @return Page|null the parent page object if it exists.
*/
public function parent(Page $var = null)
{
if ($var) {
$this->parent = $var->path();
return $var;
}
/** @var Pages $pages */
$pages = self::getGrav()['pages'];
return $pages->get($this->parent);
}
/**
* Returns children of this page.
*
* @return \Grav\Common\Page\Collection
*/
public function children()
{
/** @var Pages $pages */
$pages = self::getGrav()['pages'];
return $pages->children($this->path());
}
/**
* Check to see if this item is the first in an array of sub-pages.
*
* @return boolean True if item is first.
*/
public function isFirst()
{
$collection = $this->parent()->collection('content', false);
return $collection->isFirst($this->path());
}
/**
* Check to see if this item is the last in an array of sub-pages.
*
* @return boolean True if item is last
*/
public function isLast()
{
$collection = $this->parent()->collection('content', false);
return $collection->isLast($this->path());
}
/**
* Gets the previous sibling based on current position.
*
* @return Page the previous Page item
*/
public function prevSibling()
{
return $this->adjacentSibling(-1);
}
/**
* Gets the next sibling based on current position.
*
* @return Page the next Page item
*/
public function nextSibling()
{
return $this->adjacentSibling(1);
}
/**
* Returns the adjacent sibling based on a direction.
*
* @param integer $direction either -1 or +1
* @return Page the sibling page
*/
public function adjacentSibling($direction = 1)
{
$collection = $this->parent()->collection('content', false);
return $collection->adjacentSibling($this->path(), $direction);
}
/**
* Returns whether or not this page is the currently active page requested via the URL.
*
* @return bool True if it is active
*/
public function active()
{
$uri_path = self::getGrav()['uri']->path();
$routes = self::getGrav()['pages']->routes();
if (isset($routes[$uri_path])) {
if ($routes[$uri_path] == $this->path()) {
return true;
}
}
return false;
}
/**
* Returns whether or not this URI's URL contains the URL of the active page.
* Or in other words, is this page's URL in the current URL
*
* @return bool True if active child exists
*/
public function activeChild()
{
$uri = self::getGrav()['uri'];
$pages = self::getGrav()['pages'];
$uri_path = $uri->path();
$routes = self::getGrav()['pages']->routes();
if (isset($routes[$uri_path])) {
$child_page = $pages->dispatch($uri->route())->parent();
while (!$child_page->root()) {
if ($this->path() == $child_page->path()) {
return true;
}
$child_page = $child_page->parent();
}
}
return false;
}
/**
* Returns whether or not this page is the currently configured home page.
*
* @return bool True if it is the homepage
*/
public function home()
{
return $this->find('/') == $this;
}
/**
* Returns whether or not this page is the root node of the pages tree.
*
* @return bool True if it is the root
*/
public function root()
{
if (!$this->parent && !$this->name && !$this->visible) {
return true;
} else {
return false;
}
}
/**
* Helper method to return a page.
*
* @param string $url the url of the page
* @param bool $all
*
* @return \Grav\Common\Page\Page page you were looking for if it exists
* @deprecated
*/
public function find($url, $all = false)
{
/** @var Pages $pages */
$pages = self::getGrav()['pages'];
return $pages->dispatch($url, $all);
}
/**
* Get a collection of pages in the current context.
*
* @param string|array $params
* @param boolean $pagination
* @return Collection
* @throws \InvalidArgumentException
*/
public function collection($params = 'content', $pagination = true)
{
if (is_string($params)) {
$params = (array) $this->value('header.'.$params);
} elseif (!is_array($params)) {
throw new \InvalidArgumentException('Argument should be either header variable name or array of parameters');
}
if (!isset($params['items'])) {
return array();
}
$collection = $this->evaluate($params['items']);
if (!$collection instanceof Collection) {
$collection = new Collection();
}
$collection->setParams($params);
// TODO: MOVE THIS INTO SOMEWHERE ELSE?
/** @var Uri $uri */
$uri = self::getGrav()['uri'];
/** @var Config $config */
$config = self::getGrav()['config'];
foreach ((array) $config->get('site.taxonomies') as $taxonomy) {
if ($uri->param($taxonomy)) {
$items = explode(',', $uri->param($taxonomy));
$collection->setParams(['taxonomies' => [$taxonomy => $items]]);
foreach ($collection as $page) {
if ($page->modular()) {
continue;
}
foreach ($items as $item) {
if (empty($page->taxonomy[$taxonomy])
|| !in_array($item, $page->taxonomy[$taxonomy])) {
$collection->remove();
}
}
}
}
}
// TODO: END OF MOVE
if (isset($params['dateRange'])) {
$start = isset($params['dateRange']['start']) ? $params['dateRange']['start'] : 0;
$end = isset($params['dateRange']['end']) ? $params['dateRange']['end'] : false;
$collection->dateRange($start, $end);
}
if (isset($params['order'])) {
$by = isset($params['order']['by']) ? $params['order']['by'] : 'default';
$dir = isset($params['order']['dir']) ? $params['order']['dir'] : 'asc';
$custom = isset($params['order']['custom']) ? $params['order']['custom'] : null;
$collection->order($by, $dir, $custom);
}
/** @var Grav $grav */
$grav = self::getGrav()['grav'];
// New Custom event to handle things like pagination.
$grav->fireEvent('onCollectionProcessed', new Event(['collection' => $collection]));
// Slice and dice the collection if pagination is required
if ($pagination) {
$params = $collection->params();
$limit = isset($params['limit']) ? $params['limit'] : 0;
$start = !empty($params['pagination']) ? ($uri->currentPage() - 1) * $limit : 0;
if ($limit && $collection->count() > $limit) {
$collection->slice($start, $limit);
}
}
return $collection;
}
/**
* @param string $value
*
* @return mixed
* @internal
*/
protected function evaluate($value)
{
// Parse command.
if (is_string($value)) {
// Format: @command.param
$cmd = $value;
$params = array();
} elseif (is_array($value) && count($value) == 1) {
// Format: @command.param: { attr1: value1, attr2: value2 }
$cmd = (string) key($value);
$params = (array) current($value);
} else {
return $value;
}
// We only evaluate commands which start with @
if (empty($cmd) || $cmd[0] != '@') {
return $value;
}
$parts = explode('.', $cmd);
$current = array_shift($parts);
$results = null;
switch ($current) {
case '@self':
if (!empty($parts)) {
switch ($parts[0]) {
case 'modular':
$results = $this->children()->modular()->published();
break;
case 'children':
$results = $this->children()->nonModular()->published();
break;
}
}
break;
case '@page':
if (!empty($params)) {
$page = $this->find($params[0]);
if ($page) {
$results = $page->children()->nonModular()->published();
}
}
break;
case '@taxonomy':
// Gets a collection of pages by using one of the following formats:
// @taxonomy.category: blog
// @taxonomy.category: [ blog, featured ]
// @taxonomy: { category: [ blog, featured ], level: 1 }
/** @var Taxonomy $taxonomy_map */
$taxonomy_map = self::getGrav()['taxonomy'];
if (!empty($parts)) {
$params = [implode('.', $parts) => $params];
}
$results = $taxonomy_map->findTaxonomy($params);
break;
}
return $results;
}
/**
* Returns whether or not this Page object has a .md file associated with it or if its just a directory.
*
* @return bool True if its a page with a .md file associated
*/
public function isPage()
{
if ($this->name) {
return true;
}
return false;
}
/**
* Returns whether or not this Page object is a directory or a page.
*
* @return bool True if its a directory
*/
public function isDir()
{
return !$this->isPage();
}
/**
* Returns whether the page exists in the filesystem.
*
* @return bool
*/
public function exists()
{
$file = $this->file();
return $file && $file->exists();
}
/**
* Cleans the path.
*
* @param string $path the path
* @return string the path
*/
protected function cleanPath($path)
{
$lastchunk = strrchr($path, DS);
if (strpos($lastchunk, ':') !== false) {
$path = str_replace($lastchunk, '', $path);
}
return $path;
}
/**
* Moves or copies the page in filesystem.
*
* @internal
*/
protected function doRelocation($reorder)
{
if (empty($this->_original)) {
return;
}
// Do reordering.
if ($reorder && $this->order() != $this->_original->order()) {
/** @var Pages $pages */
$pages = self::getGrav()['pages'];
$parent = $this->parent();
// Extract visible children from the parent page.
$list = array();
/** @var Page $page */
foreach ($parent->children()->visible() as $page) {
if ($page->order()) {
$list[$page->slug] = $page->path();
}
}
// If page was moved, take it out of the list.
if ($this->_action == 'move') {
unset($list[$this->slug()]);
}
$list = array_values($list);
// Then add it back to the new location (if needed).
if ($this->order()) {
array_splice($list, min($this->order()-1, count($list)), 0, array($this->path()));
}
// Reorder all moved pages.
foreach ($list as $order => $path) {
if ($path == $this->path()) {
// Handle current page; we do want to change ordering number, but nothing else.
$this->order($order+1);
} else {
// Handle all the other pages.
$page = $pages->get($path);
if ($page && $page->exists() && $page->order() != $order+1) {
$page = $page->move($parent);
$page->order($order+1);
$page->save(false);
}
}
}
}
if ($this->_action == 'move' && $this->_original->exists()) {
Folder::move($this->_original->path(), $this->path());
}
if ($this->_action == 'copy' && $this->_original->exists()) {
Folder::copy($this->_original->path(), $this->path());
}
if ($this->name() != $this->_original->name()) {
$path = $this->path();
if (is_file($path . '/' . $this->_original->name())) {
rename($path . '/' . $this->_original->name(), $path . '/' . $this->name());
}
}
$this->_action = null;
$this->_original = null;
}
}
| {'content_hash': 'd72cac8d49fff524753e9f46c89c96af', 'timestamp': '', 'source': 'github', 'line_count': 1965, 'max_line_length': 140, 'avg_line_length': 29.63002544529262, 'alnum_prop': 0.4973979355237621, 'repo_name': 'pbwebdev/peterbui', 'id': 'f65df331d07aca09feb35152479d067077a9523f', 'size': '58224', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'system/src/Grav/Common/Page/Page.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '2190'}, {'name': 'CSS', 'bytes': '118976'}, {'name': 'HTML', 'bytes': '26069'}, {'name': 'JavaScript', 'bytes': '6479'}, {'name': 'Nginx', 'bytes': '1696'}, {'name': 'PHP', 'bytes': '569824'}, {'name': 'Shell', 'bytes': '32'}]} |
statusbarpanel {
border-style: none;
border: 0px;
}
#accountbuttonid , #filterbuttonid {
margin-bottom:8px;
}
.toolbarbutton-text {
padding-top:2px;
}
#speechheaderid {
border:1px solid #515151;
background-color:#666;
background-image:url(chrome://buzzbird/skin/images/speech-toolbar-background.png);
background-repeat:repeat-x;
color:#fff;
height:32px;
margin-left:4px;
margin-right:4px;
padding:0 1px 0 1px;
}
#postbuttonid {
color:#eee;
font-size:12px;
padding:0 4px 3px 0;
width:50px;
}
#statusid {
color:#eee;
margin-top:6px;
}
.post-toolbar-button {
}
#textboxid {
margin-top:0px;
overflow:auto;
}
#accountbuttonid, #filterbuttonid, #listbuttonid {
font-size:0.9em;
}
| {'content_hash': 'fc5046aca952aba9a1a26b097a71a812', 'timestamp': '', 'source': 'github', 'line_count': 48, 'max_line_length': 83, 'avg_line_length': 14.895833333333334, 'alnum_prop': 0.7020979020979021, 'repo_name': 'mdesjardins/buzzbird', 'id': 'dfda574b662edbde846f1034b08afe4ee7c7a294', 'size': '716', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'chrome/skin/classic-win/main.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '991'}, {'name': 'C++', 'bytes': '18109'}, {'name': 'CSS', 'bytes': '58165'}, {'name': 'HTML', 'bytes': '29446'}, {'name': 'Java', 'bytes': '2831'}, {'name': 'JavaScript', 'bytes': '238150'}, {'name': 'Shell', 'bytes': '12963'}]} |
.ButtonBarMarkupHint {
/* color: black; */
font-size: 11px;
}
#DiscussionForm .ButtonBar {
margin-bottom: -6px;
}
#DiscussionForm .ButtonBarMarkupHint {
margin-top: -6px;
}
.BarWrap {
background: #fafafa;
border: 1px solid #aaa;
margin: 0 0 -1px;
line-height: 0.1;
}
.ButtonBar .ButtonWrap {
background-color: white;
background-position: 50% 50%;
background-repeat: no-repeat;
border-right: 1px solid #eee;
height: 24px;
width: 24px;
z-index: 50;
display: inline-block;
}
/** This causes clearing problems when the panel is taller than the content
#DiscussionForm .TextBoxWrapper,
.CommentForm .TextBoxWrapper {
clear: left;
}
*/
.ButtonBar .ButtonWrap:hover {
background-color: #f8f8f8;
cursor: pointer;
}
.ButtonBar .ButtonWrap span {
display: none;
}
.ButtonBar .ButtonOff {
display: none;
cursor: auto;
opacity: 0.3;
}
.ButtonBar .ButtonOff:hover {
background-color: white;
}
.ButtonBar .ButtonWrap {
background: transparent url('images/sprites.png') no-repeat 0 0;
}
.ButtonBar .ButtonBarBold {
background-position: 0px 0px;
}
.ButtonBar .ButtonBarItalic {
background-position: 0px -24px;
}
.ButtonBar .ButtonBarUnderline {
background-position: 0px -48px;
}
.ButtonBar .ButtonBarStrike {
background-position: 0px -72px;
}
.ButtonBar .ButtonBarCode {
background-position: 0px -96px;
}
.ButtonBar .ButtonBarImage {
background-position: 0px -120px;
}
.ButtonBar .ButtonBarUrl {
background-position: 0px -144px;
}
.ButtonBar .ButtonBarQuote {
background-position: 0px -168px;
}
.ButtonBar .ButtonBarSpoiler {
background-position: 0px -192px;
}
| {'content_hash': '72720fc6209b4c381b92cd5588606bd2', 'timestamp': '', 'source': 'github', 'line_count': 95, 'max_line_length': 75, 'avg_line_length': 17.873684210526317, 'alnum_prop': 0.6784452296819788, 'repo_name': 'evanilsonsilva/gabweb', 'id': '6a8a171e753b975a6f26a69f584c35057dcc843f', 'size': '1698', 'binary': False, 'copies': '23', 'ref': 'refs/heads/master', 'path': 'forum/plugins/ButtonBar/design/buttonbar.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '1807'}, {'name': 'CSS', 'bytes': '1114972'}, {'name': 'HTML', 'bytes': '546840'}, {'name': 'JavaScript', 'bytes': '1650460'}, {'name': 'PHP', 'bytes': '6435070'}, {'name': 'Smarty', 'bytes': '24905'}]} |
@interface ComGoogleCommonCacheLongAdder : ComGoogleCommonCacheStriped64 < JavaIoSerializable, ComGoogleCommonCacheLongAddable >
#pragma mark Public
- (instancetype)init;
- (void)addWithLong:(jlong)x;
- (void)decrement;
- (jdouble)doubleValue;
- (jfloat)floatValue;
- (void)increment;
- (jint)intValue;
- (jlong)longLongValue;
- (void)reset;
- (jlong)sum;
- (jlong)sumThenReset;
- (NSString *)description;
#pragma mark Package-Private
- (jlong)fnWithLong:(jlong)v
withLong:(jlong)x;
@end
J2OBJC_EMPTY_STATIC_INIT(ComGoogleCommonCacheLongAdder)
FOUNDATION_EXPORT void ComGoogleCommonCacheLongAdder_init(ComGoogleCommonCacheLongAdder *self);
FOUNDATION_EXPORT ComGoogleCommonCacheLongAdder *new_ComGoogleCommonCacheLongAdder_init() NS_RETURNS_RETAINED;
J2OBJC_TYPE_LITERAL_HEADER(ComGoogleCommonCacheLongAdder)
#endif
#pragma pop_macro("ComGoogleCommonCacheLongAdder_INCLUDE_ALL")
| {'content_hash': '0f8c1bd064e4dbeff6b6dc7376933bf7', 'timestamp': '', 'source': 'github', 'line_count': 46, 'max_line_length': 128, 'avg_line_length': 19.82608695652174, 'alnum_prop': 0.7872807017543859, 'repo_name': 'benf1977/j2objc-serialization-example', 'id': '0fff06e4184382d1f88fa4a64f3b3dec88979c06', 'size': '1943', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'j2objc/include/com/google/common/cache/LongAdder.h', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C', 'bytes': '6216'}, {'name': 'C++', 'bytes': '50169'}, {'name': 'Groff', 'bytes': '5681'}, {'name': 'Java', 'bytes': '2156'}, {'name': 'Objective-C', 'bytes': '10210534'}, {'name': 'Shell', 'bytes': '4566'}]} |
// Copyright (c) 2017 Andrey Ushkalov
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
using System.Collections.Generic;
using System.Globalization;
namespace ResourceProvider.Tests
{
/// <summary>
/// Константы, использующиеся в тестах провайдера ресурсов
/// </summary>
internal static class Constants
{
/// <summary>
/// Ключ первого значения из словаря
/// </summary>
public const string DictionaryKey1 = "FirstValue";
/// <summary>
/// Ключ второго значения из словаря
/// </summary>
public const string DictionaryKey2 = "SecondValue";
/// <summary>
/// Константы дефолтных тестовых словарей
/// </summary>
public static class Default
{
/// <summary>
/// Путь ко второму словарю
/// </summary>
public const string Dictionary2Path = "pack://application:,,,/ResourceProvider.Tests;component/TestDictionaries/Dictionary2.xaml";
/// <summary>
/// Первое значение второго словаря
/// </summary>
public const string Dictionary2Value1 = "значение1";
/// <summary>
/// Второе значение второго словаря
/// </summary>
public const string Dictionary2Value2 = "значение2";
}
/// <summary>
/// Константы тестовых словарей ru-RU
/// </summary>
public static class RuRu
{
/// <summary>
/// Путь к первому словарю
/// </summary>
public const string Dictionary1Path = "pack://application:,,,/ResourceProvider.Tests;component/TestDictionaries/ru-RU/Dictionary1.xaml";
/// <summary>
/// Первое значение первого словаря
/// </summary>
public const string Dictionary1Value1 = "Первое значение";
}
/// <summary>
/// Константы тестовых словарей en-US
/// </summary>
public static class EnUs
{
/// <summary>
/// Путь к первому словарю
/// </summary>
public const string Dictionary1Path = "pack://application:,,,/ResourceProvider.Tests;component/TestDictionaries/en-US/Dictionary1.xaml";
/// <summary>
/// Первое значение первого словаря
/// </summary>
public const string Dictionary1Value1 = "First Value";
}
/// <summary>
/// Первый словарь (с поддержкой локализации)
/// </summary>
public static readonly ResourceDictionaryInfo Dictionary1 = new ResourceDictionaryInfo("DICTIONARY1",
CultureInfo.GetCultureInfo("ru-RU"),
new Dictionary<CultureInfo, string>
{
{CultureInfo.GetCultureInfo("ru-RU"), RuRu.Dictionary1Path},
{CultureInfo.GetCultureInfo("en-US"), EnUs.Dictionary1Path}
});
/// <summary>
/// Второй словарь (без поддержки локализации)
/// </summary>
public static readonly ResourceDictionaryInfo Dictionary2 = new ResourceDictionaryInfo("DICTIONARY2", Default.Dictionary2Path);
/// <summary>
/// Имя третьего (несуществующего) словаря
/// </summary>
public const string Dictionary3Name = "DICTIONARY3";
}
}
| {'content_hash': '819c87905ec598ac85128a7dbbfd946c', 'timestamp': '', 'source': 'github', 'line_count': 115, 'max_line_length': 148, 'avg_line_length': 37.99130434782609, 'alnum_prop': 0.6216525520714122, 'repo_name': 'AndreyUshkalov/ResourceProvider', 'id': 'dd6db90e6bbc584ca53140926a82993d8c60bc23', 'size': '4863', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'ResourceProvider.Tests/Constants.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '75689'}]} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {'content_hash': 'bd5ec00aecaa6ebcd02a51949d44ad04', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': '58471e8a05950b7ff13a6deaafa6e2cb6a3f33c6', 'size': '180', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Hylaeorchis/Hylaeorchis petiolaris/ Syn. Bifrenaria minuta/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []} |
import os
import os.path
listfile = os.listdir("/mnt/work")
for filename in listfile:
if len(filename) > 20:
shellcmd0 = "./nglog " + filename + " pv" + " uv"
os.system(shellcmd0)
print shellcmd0
shellcmd1 = "wc -l " + filename + " | awk '{print $1 }'" + " >> " + filename + ".pvuv"
os.system(shellcmd1)
print shellcmd1
shellcmd2 = "cat pv | grep apk | grep android | awk '{print $2}'| wc -l >> " + filename + ".pvuv"
print shellcmd2
os.system(shellcmd2)
shellcmd3 = "cat uv | grep android | awk '{print $2}' | sort | uniq | wc -l >> " + filename + ".pvuv"
print shellcmd3
os.system(shellcmd3)
shellcmd4 = "cat uv | grep ios | awk '{print $2}' | sort | uniq | wc -l >> " + filename + ".pvuv"
print shellcmd4
os.system(shellcmd4)
shellcmd5 = "cat uv | grep windows | awk '{print $2}' | sort | uniq | wc -l >> " + filename + ".pvuv"
print shellcmd5
os.system(shellcmd5)
#break
| {'content_hash': '0eaf8f8aaea732a22cc0a5da22cd9e45', 'timestamp': '', 'source': 'github', 'line_count': 27, 'max_line_length': 118, 'avg_line_length': 38.81481481481482, 'alnum_prop': 0.5353053435114504, 'repo_name': 'pepfi/pvuvshow', 'id': 'a3d1d7cdeeccfacd6b097b2facce9a2463938324', 'size': '1083', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'python/result.py', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ApacheConf', 'bytes': '240'}, {'name': 'CSS', 'bytes': '14680'}, {'name': 'HTML', 'bytes': '8091362'}, {'name': 'JavaScript', 'bytes': '3732313'}, {'name': 'PHP', 'bytes': '1733018'}, {'name': 'Python', 'bytes': '5070'}]} |
.note-editor {
/* Allow for input prepend/append in search forms */
/* White icons with optional class, or on hover/focus/active states of certain elements */
/* move down carets for tabs */
}
.note-editor .clearfix {
*zoom: 1;
}
.note-editor .clearfix:before,
.note-editor .clearfix:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .clearfix:after {
clear: both;
}
.note-editor .hide-text {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.note-editor .input-block-level {
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.note-editor article,
.note-editor aside,
.note-editor details,
.note-editor figcaption,
.note-editor figure,
.note-editor footer,
.note-editor header,
.note-editor hgroup,
.note-editor nav,
.note-editor section {
display: block;
}
.note-editor audio,
.note-editor canvas,
.note-editor video {
display: inline-block;
*display: inline;
*zoom: 1;
}
.note-editor audio:not([controls]) {
display: none;
}
.note-editor html {
font-size: 100%;
-webkit-text-size-adjust: 100%;
-ms-text-size-adjust: 100%;
}
.note-editor a:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.note-editor a:hover,
.note-editor a:active {
outline: 0;
}
.note-editor sub,
.note-editor sup {
position: relative;
font-size: 75%;
line-height: 0;
vertical-align: baseline;
}
.note-editor sup {
top: -0.5em;
}
.note-editor sub {
bottom: -0.25em;
}
.note-editor img {
/* Responsive images (ensure images don't scale beyond their parents) */
max-width: 100%;
/* Part 1: Set a maxium relative to the parent */
width: auto\9;
/* IE7-8 need help adjusting responsive images */
height: auto;
/* Part 2: Scale the height according to the width, otherwise you get stretching */
vertical-align: middle;
border: 0;
-ms-interpolation-mode: bicubic;
}
.note-editor #map_canvas img,
.note-editor .google-maps img {
max-width: none;
}
.note-editor button,
.note-editor input,
.note-editor select,
.note-editor textarea {
margin: 0;
font-size: 100%;
vertical-align: middle;
}
.note-editor button,
.note-editor input {
*overflow: visible;
line-height: normal;
}
.note-editor button::-moz-focus-inner,
.note-editor input::-moz-focus-inner {
padding: 0;
border: 0;
}
.note-editor button,
.note-editor html input[type="button"],
.note-editor input[type="reset"],
.note-editor input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
.note-editor label,
.note-editor select,
.note-editor button,
.note-editor input[type="button"],
.note-editor input[type="reset"],
.note-editor input[type="submit"],
.note-editor input[type="radio"],
.note-editor input[type="checkbox"] {
cursor: pointer;
}
.note-editor input[type="search"] {
-webkit-box-sizing: content-box;
-moz-box-sizing: content-box;
box-sizing: content-box;
-webkit-appearance: textfield;
}
.note-editor input[type="search"]::-webkit-search-decoration,
.note-editor input[type="search"]::-webkit-search-cancel-button {
-webkit-appearance: none;
}
.note-editor textarea {
overflow: auto;
vertical-align: top;
}
@media print {
.note-editor * {
text-shadow: none !important;
color: #000 !important;
background: transparent !important;
box-shadow: none !important;
}
.note-editor a,
.note-editor a:visited {
text-decoration: underline;
}
.note-editor a[href]:after {
content: " (" attr(href) ")";
}
.note-editor abbr[title]:after {
content: " (" attr(title) ")";
}
.note-editor .ir a:after,
.note-editor a[href^="javascript:"]:after,
.note-editor a[href^="#"]:after {
content: "";
}
.note-editor pre,
.note-editor blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
.note-editor thead {
display: table-header-group;
}
.note-editor tr,
.note-editor img {
page-break-inside: avoid;
}
.note-editor img {
max-width: 100% !important;
}
@page {
margin: 0.5cm;
}
.note-editor p,
.note-editor h2,
.note-editor h3 {
orphans: 3;
widows: 3;
}
.note-editor h2,
.note-editor h3 {
page-break-after: avoid;
}
}
.note-editor body {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 20px;
color: #333333;
background-color: #ffffff;
}
.note-editor a {
color: #0088cc;
text-decoration: none;
}
.note-editor a:hover,
.note-editor a:focus {
color: #005580;
text-decoration: underline;
}
.note-editor .img-rounded {
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.note-editor .img-polaroid {
padding: 4px;
background-color: #fff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.note-editor .img-circle {
-webkit-border-radius: 500px;
-moz-border-radius: 500px;
border-radius: 500px;
}
.note-editor .row {
margin-left: -20px;
*zoom: 1;
}
.note-editor .row:before,
.note-editor .row:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .row:after {
clear: both;
}
.note-editor [class*="span"] {
float: left;
min-height: 1px;
margin-left: 20px;
}
.note-editor .container,
.note-editor .navbar-static-top .container,
.note-editor .navbar-fixed-top .container,
.note-editor .navbar-fixed-bottom .container {
width: 940px;
}
.note-editor .span12 {
width: 940px;
}
.note-editor .span11 {
width: 860px;
}
.note-editor .span10 {
width: 780px;
}
.note-editor .span9 {
width: 700px;
}
.note-editor .span8 {
width: 620px;
}
.note-editor .span7 {
width: 540px;
}
.note-editor .span6 {
width: 460px;
}
.note-editor .span5 {
width: 380px;
}
.note-editor .span4 {
width: 300px;
}
.note-editor .span3 {
width: 220px;
}
.note-editor .span2 {
width: 140px;
}
.note-editor .span1 {
width: 60px;
}
.note-editor .offset12 {
margin-left: 980px;
}
.note-editor .offset11 {
margin-left: 900px;
}
.note-editor .offset10 {
margin-left: 820px;
}
.note-editor .offset9 {
margin-left: 740px;
}
.note-editor .offset8 {
margin-left: 660px;
}
.note-editor .offset7 {
margin-left: 580px;
}
.note-editor .offset6 {
margin-left: 500px;
}
.note-editor .offset5 {
margin-left: 420px;
}
.note-editor .offset4 {
margin-left: 340px;
}
.note-editor .offset3 {
margin-left: 260px;
}
.note-editor .offset2 {
margin-left: 180px;
}
.note-editor .offset1 {
margin-left: 100px;
}
.note-editor .row-fluid {
width: 100%;
*zoom: 1;
}
.note-editor .row-fluid:before,
.note-editor .row-fluid:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .row-fluid:after {
clear: both;
}
.note-editor .row-fluid [class*="span"] {
display: block;
width: 100%;
min-height: 30px;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
float: left;
margin-left: 2.127659574468085%;
*margin-left: 2.074468085106383%;
}
.note-editor .row-fluid [class*="span"]:first-child {
margin-left: 0;
}
.note-editor .row-fluid .controls-row [class*="span"] + [class*="span"] {
margin-left: 2.127659574468085%;
}
.note-editor .row-fluid .span12 {
width: 100%;
*width: 99.94680851063829%;
}
.note-editor .row-fluid .span11 {
width: 91.48936170212765%;
*width: 91.43617021276594%;
}
.note-editor .row-fluid .span10 {
width: 82.97872340425532%;
*width: 82.92553191489361%;
}
.note-editor .row-fluid .span9 {
width: 74.46808510638297%;
*width: 74.41489361702126%;
}
.note-editor .row-fluid .span8 {
width: 65.95744680851064%;
*width: 65.90425531914893%;
}
.note-editor .row-fluid .span7 {
width: 57.44680851063829%;
*width: 57.39361702127659%;
}
.note-editor .row-fluid .span6 {
width: 48.93617021276595%;
*width: 48.88297872340425%;
}
.note-editor .row-fluid .span5 {
width: 40.42553191489362%;
*width: 40.37234042553192%;
}
.note-editor .row-fluid .span4 {
width: 31.914893617021278%;
*width: 31.861702127659576%;
}
.note-editor .row-fluid .span3 {
width: 23.404255319148934%;
*width: 23.351063829787233%;
}
.note-editor .row-fluid .span2 {
width: 14.893617021276595%;
*width: 14.840425531914894%;
}
.note-editor .row-fluid .span1 {
width: 6.382978723404255%;
*width: 6.329787234042553%;
}
.note-editor .row-fluid .offset12 {
margin-left: 104.25531914893617%;
*margin-left: 104.14893617021275%;
}
.note-editor .row-fluid .offset12:first-child {
margin-left: 102.12765957446808%;
*margin-left: 102.02127659574467%;
}
.note-editor .row-fluid .offset11 {
margin-left: 95.74468085106382%;
*margin-left: 95.6382978723404%;
}
.note-editor .row-fluid .offset11:first-child {
margin-left: 93.61702127659574%;
*margin-left: 93.51063829787232%;
}
.note-editor .row-fluid .offset10 {
margin-left: 87.23404255319149%;
*margin-left: 87.12765957446807%;
}
.note-editor .row-fluid .offset10:first-child {
margin-left: 85.1063829787234%;
*margin-left: 84.99999999999999%;
}
.note-editor .row-fluid .offset9 {
margin-left: 78.72340425531914%;
*margin-left: 78.61702127659572%;
}
.note-editor .row-fluid .offset9:first-child {
margin-left: 76.59574468085106%;
*margin-left: 76.48936170212764%;
}
.note-editor .row-fluid .offset8 {
margin-left: 70.2127659574468%;
*margin-left: 70.10638297872339%;
}
.note-editor .row-fluid .offset8:first-child {
margin-left: 68.08510638297872%;
*margin-left: 67.9787234042553%;
}
.note-editor .row-fluid .offset7 {
margin-left: 61.70212765957446%;
*margin-left: 61.59574468085106%;
}
.note-editor .row-fluid .offset7:first-child {
margin-left: 59.574468085106375%;
*margin-left: 59.46808510638297%;
}
.note-editor .row-fluid .offset6 {
margin-left: 53.191489361702125%;
*margin-left: 53.085106382978715%;
}
.note-editor .row-fluid .offset6:first-child {
margin-left: 51.063829787234035%;
*margin-left: 50.95744680851063%;
}
.note-editor .row-fluid .offset5 {
margin-left: 44.68085106382979%;
*margin-left: 44.57446808510638%;
}
.note-editor .row-fluid .offset5:first-child {
margin-left: 42.5531914893617%;
*margin-left: 42.4468085106383%;
}
.note-editor .row-fluid .offset4 {
margin-left: 36.170212765957444%;
*margin-left: 36.06382978723405%;
}
.note-editor .row-fluid .offset4:first-child {
margin-left: 34.04255319148936%;
*margin-left: 33.93617021276596%;
}
.note-editor .row-fluid .offset3 {
margin-left: 27.659574468085104%;
*margin-left: 27.5531914893617%;
}
.note-editor .row-fluid .offset3:first-child {
margin-left: 25.53191489361702%;
*margin-left: 25.425531914893618%;
}
.note-editor .row-fluid .offset2 {
margin-left: 19.148936170212764%;
*margin-left: 19.04255319148936%;
}
.note-editor .row-fluid .offset2:first-child {
margin-left: 17.02127659574468%;
*margin-left: 16.914893617021278%;
}
.note-editor .row-fluid .offset1 {
margin-left: 10.638297872340425%;
*margin-left: 10.53191489361702%;
}
.note-editor .row-fluid .offset1:first-child {
margin-left: 8.51063829787234%;
*margin-left: 8.404255319148938%;
}
.note-editor [class*="span"].hide,
.note-editor .row-fluid [class*="span"].hide {
display: none;
}
.note-editor [class*="span"].pull-right,
.note-editor .row-fluid [class*="span"].pull-right {
float: right;
}
.note-editor .container {
margin-right: auto;
margin-left: auto;
*zoom: 1;
}
.note-editor .container:before,
.note-editor .container:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .container:after {
clear: both;
}
.note-editor .container-fluid {
padding-right: 20px;
padding-left: 20px;
*zoom: 1;
}
.note-editor .container-fluid:before,
.note-editor .container-fluid:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .container-fluid:after {
clear: both;
}
.note-editor p {
margin: 0 0 10px;
}
.note-editor .lead {
margin-bottom: 20px;
font-size: 21px;
font-weight: 200;
line-height: 30px;
}
.note-editor small {
font-size: 85%;
}
.note-editor strong {
font-weight: bold;
}
.note-editor em {
font-style: italic;
}
.note-editor cite {
font-style: normal;
}
.note-editor .muted {
color: #999999;
}
.note-editor a.muted:hover,
.note-editor a.muted:focus {
color: #808080;
}
.note-editor .text-warning {
color: #c09853;
}
.note-editor a.text-warning:hover,
.note-editor a.text-warning:focus {
color: #a47e3c;
}
.note-editor .text-error {
color: #b94a48;
}
.note-editor a.text-error:hover,
.note-editor a.text-error:focus {
color: #953b39;
}
.note-editor .text-info {
color: #3a87ad;
}
.note-editor a.text-info:hover,
.note-editor a.text-info:focus {
color: #2d6987;
}
.note-editor .text-success {
color: #468847;
}
.note-editor a.text-success:hover,
.note-editor a.text-success:focus {
color: #356635;
}
.note-editor .text-left {
text-align: left;
}
.note-editor .text-right {
text-align: right;
}
.note-editor .text-center {
text-align: center;
}
.note-editor h1,
.note-editor h2,
.note-editor h3,
.note-editor h4,
.note-editor h5,
.note-editor h6 {
margin: 10px 0;
font-family: inherit;
font-weight: bold;
line-height: 20px;
color: inherit;
text-rendering: optimizelegibility;
}
.note-editor h1 small,
.note-editor h2 small,
.note-editor h3 small,
.note-editor h4 small,
.note-editor h5 small,
.note-editor h6 small {
font-weight: normal;
line-height: 1;
color: #999999;
}
.note-editor h1,
.note-editor h2,
.note-editor h3 {
line-height: 40px;
}
.note-editor h1 {
font-size: 38.5px;
}
.note-editor h2 {
font-size: 31.5px;
}
.note-editor h3 {
font-size: 24.5px;
}
.note-editor h4 {
font-size: 17.5px;
}
.note-editor h5 {
font-size: 14px;
}
.note-editor h6 {
font-size: 11.9px;
}
.note-editor h1 small {
font-size: 24.5px;
}
.note-editor h2 small {
font-size: 17.5px;
}
.note-editor h3 small {
font-size: 14px;
}
.note-editor h4 small {
font-size: 14px;
}
.note-editor .page-header {
padding-bottom: 9px;
margin: 20px 0 30px;
border-bottom: 1px solid #eeeeee;
}
.note-editor ul,
.note-editor ol {
padding: 0;
margin: 0 0 10px 25px;
}
.note-editor ul ul,
.note-editor ul ol,
.note-editor ol ol,
.note-editor ol ul {
margin-bottom: 0;
}
.note-editor li {
line-height: 20px;
}
.note-editor ul.unstyled,
.note-editor ol.unstyled {
margin-left: 0;
list-style: none;
}
.note-editor ul.inline,
.note-editor ol.inline {
margin-left: 0;
list-style: none;
}
.note-editor ul.inline > li,
.note-editor ol.inline > li {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
padding-left: 5px;
padding-right: 5px;
}
.note-editor dl {
margin-bottom: 20px;
}
.note-editor dt,
.note-editor dd {
line-height: 20px;
}
.note-editor dt {
font-weight: bold;
}
.note-editor dd {
margin-left: 10px;
}
.note-editor .dl-horizontal {
*zoom: 1;
}
.note-editor .dl-horizontal:before,
.note-editor .dl-horizontal:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .dl-horizontal:after {
clear: both;
}
.note-editor .dl-horizontal dt {
float: left;
width: 160px;
clear: left;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.note-editor .dl-horizontal dd {
margin-left: 180px;
}
.note-editor hr {
margin: 20px 0;
border: 0;
border-top: 1px solid #eeeeee;
border-bottom: 1px solid #ffffff;
}
.note-editor abbr[title],
.note-editor abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted #999999;
}
.note-editor abbr.initialism {
font-size: 90%;
text-transform: uppercase;
}
.note-editor blockquote {
padding: 0 0 0 15px;
margin: 0 0 20px;
border-left: 5px solid #eeeeee;
}
.note-editor blockquote p {
margin-bottom: 0;
font-size: 17.5px;
font-weight: 300;
line-height: 1.25;
}
.note-editor blockquote small {
display: block;
line-height: 20px;
color: #999999;
}
.note-editor blockquote small:before {
content: '\2014 \00A0';
}
.note-editor blockquote.pull-right {
float: right;
padding-right: 15px;
padding-left: 0;
border-right: 5px solid #eeeeee;
border-left: 0;
}
.note-editor blockquote.pull-right p,
.note-editor blockquote.pull-right small {
text-align: right;
}
.note-editor blockquote.pull-right small:before {
content: '';
}
.note-editor blockquote.pull-right small:after {
content: '\00A0 \2014';
}
.note-editor q:before,
.note-editor q:after,
.note-editor blockquote:before,
.note-editor blockquote:after {
content: "";
}
.note-editor address {
display: block;
margin-bottom: 20px;
font-style: normal;
line-height: 20px;
}
.note-editor code,
.note-editor pre {
padding: 0 3px 2px;
font-family: Monaco, Menlo, Consolas, "Courier New", monospace;
font-size: 12px;
color: #333333;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.note-editor code {
padding: 2px 4px;
color: #d14;
background-color: #f7f7f9;
border: 1px solid #e1e1e8;
white-space: nowrap;
}
.note-editor pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 20px;
word-break: break-all;
word-wrap: break-word;
white-space: pre;
white-space: pre-wrap;
background-color: #f5f5f5;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.15);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.note-editor pre.prettyprint {
margin-bottom: 20px;
}
.note-editor pre code {
padding: 0;
color: inherit;
white-space: pre;
white-space: pre-wrap;
background-color: transparent;
border: 0;
}
.note-editor .pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
.note-editor form {
margin: 0 0 20px;
}
.note-editor fieldset {
padding: 0;
margin: 0;
border: 0;
}
.note-editor legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: 40px;
color: #333333;
border: 0;
border-bottom: 1px solid #e5e5e5;
}
.note-editor legend small {
font-size: 15px;
color: #999999;
}
.note-editor label,
.note-editor input,
.note-editor button,
.note-editor select,
.note-editor textarea {
font-size: 14px;
font-weight: normal;
line-height: 20px;
}
.note-editor input,
.note-editor button,
.note-editor select,
.note-editor textarea {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.note-editor label {
display: block;
margin-bottom: 5px;
}
.note-editor select,
.note-editor textarea,
.note-editor input[type="text"],
.note-editor input[type="password"],
.note-editor input[type="datetime"],
.note-editor input[type="datetime-local"],
.note-editor input[type="date"],
.note-editor input[type="month"],
.note-editor input[type="time"],
.note-editor input[type="week"],
.note-editor input[type="number"],
.note-editor input[type="email"],
.note-editor input[type="url"],
.note-editor input[type="search"],
.note-editor input[type="tel"],
.note-editor input[type="color"],
.note-editor .uneditable-input {
display: inline-block;
height: 20px;
padding: 4px 6px;
margin-bottom: 10px;
font-size: 14px;
line-height: 20px;
color: #555555;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
vertical-align: middle;
}
.note-editor input,
.note-editor textarea,
.note-editor .uneditable-input {
width: 206px;
}
.note-editor textarea {
height: auto;
}
.note-editor textarea,
.note-editor input[type="text"],
.note-editor input[type="password"],
.note-editor input[type="datetime"],
.note-editor input[type="datetime-local"],
.note-editor input[type="date"],
.note-editor input[type="month"],
.note-editor input[type="time"],
.note-editor input[type="week"],
.note-editor input[type="number"],
.note-editor input[type="email"],
.note-editor input[type="url"],
.note-editor input[type="search"],
.note-editor input[type="tel"],
.note-editor input[type="color"],
.note-editor .uneditable-input {
background-color: #ffffff;
border: 1px solid #cccccc;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border linear .2s, box-shadow linear .2s;
-moz-transition: border linear .2s, box-shadow linear .2s;
-o-transition: border linear .2s, box-shadow linear .2s;
transition: border linear .2s, box-shadow linear .2s;
}
.note-editor textarea:focus,
.note-editor input[type="text"]:focus,
.note-editor input[type="password"]:focus,
.note-editor input[type="datetime"]:focus,
.note-editor input[type="datetime-local"]:focus,
.note-editor input[type="date"]:focus,
.note-editor input[type="month"]:focus,
.note-editor input[type="time"]:focus,
.note-editor input[type="week"]:focus,
.note-editor input[type="number"]:focus,
.note-editor input[type="email"]:focus,
.note-editor input[type="url"]:focus,
.note-editor input[type="search"]:focus,
.note-editor input[type="tel"]:focus,
.note-editor input[type="color"]:focus,
.note-editor .uneditable-input:focus {
border-color: rgba(82, 168, 236, 0.8);
outline: 0;
outline: thin dotted \9;
/* IE6-9 */
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
-moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
}
.note-editor input[type="radio"],
.note-editor input[type="checkbox"] {
margin: 4px 0 0;
*margin-top: 0;
/* IE7 */
margin-top: 1px \9;
/* IE8-9 */
line-height: normal;
}
.note-editor input[type="file"],
.note-editor input[type="image"],
.note-editor input[type="submit"],
.note-editor input[type="reset"],
.note-editor input[type="button"],
.note-editor input[type="radio"],
.note-editor input[type="checkbox"] {
width: auto;
}
.note-editor select,
.note-editor input[type="file"] {
height: 30px;
/* In IE7, the height of the select element cannot be changed by height, only font-size */
*margin-top: 4px;
/* For IE7, add top margin to align select with labels */
line-height: 30px;
}
.note-editor select {
width: 220px;
border: 1px solid #cccccc;
background-color: #ffffff;
}
.note-editor select[multiple],
.note-editor select[size] {
height: auto;
}
.note-editor select:focus,
.note-editor input[type="file"]:focus,
.note-editor input[type="radio"]:focus,
.note-editor input[type="checkbox"]:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.note-editor .uneditable-input,
.note-editor .uneditable-textarea {
color: #999999;
background-color: #fcfcfc;
border-color: #cccccc;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025);
cursor: not-allowed;
}
.note-editor .uneditable-input {
overflow: hidden;
white-space: nowrap;
}
.note-editor .uneditable-textarea {
width: auto;
height: auto;
}
.note-editor input:-moz-placeholder,
.note-editor textarea:-moz-placeholder {
color: #999999;
}
.note-editor input:-ms-input-placeholder,
.note-editor textarea:-ms-input-placeholder {
color: #999999;
}
.note-editor input::-webkit-input-placeholder,
.note-editor textarea::-webkit-input-placeholder {
color: #999999;
}
.note-editor .radio,
.note-editor .checkbox {
min-height: 20px;
padding-left: 20px;
}
.note-editor .radio input[type="radio"],
.note-editor .checkbox input[type="checkbox"] {
float: left;
margin-left: -20px;
}
.note-editor .controls > .radio:first-child,
.note-editor .controls > .checkbox:first-child {
padding-top: 5px;
}
.note-editor .radio.inline,
.note-editor .checkbox.inline {
display: inline-block;
padding-top: 5px;
margin-bottom: 0;
vertical-align: middle;
}
.note-editor .radio.inline + .radio.inline,
.note-editor .checkbox.inline + .checkbox.inline {
margin-left: 10px;
}
.note-editor .input-mini {
width: 60px;
}
.note-editor .input-small {
width: 90px;
}
.note-editor .input-medium {
width: 150px;
}
.note-editor .input-large {
width: 210px;
}
.note-editor .input-xlarge {
width: 270px;
}
.note-editor .input-xxlarge {
width: 530px;
}
.note-editor input[class*="span"],
.note-editor select[class*="span"],
.note-editor textarea[class*="span"],
.note-editor .uneditable-input[class*="span"],
.note-editor .row-fluid input[class*="span"],
.note-editor .row-fluid select[class*="span"],
.note-editor .row-fluid textarea[class*="span"],
.note-editor .row-fluid .uneditable-input[class*="span"] {
float: none;
margin-left: 0;
}
.note-editor .input-append input[class*="span"],
.note-editor .input-append .uneditable-input[class*="span"],
.note-editor .input-prepend input[class*="span"],
.note-editor .input-prepend .uneditable-input[class*="span"],
.note-editor .row-fluid input[class*="span"],
.note-editor .row-fluid select[class*="span"],
.note-editor .row-fluid textarea[class*="span"],
.note-editor .row-fluid .uneditable-input[class*="span"],
.note-editor .row-fluid .input-prepend [class*="span"],
.note-editor .row-fluid .input-append [class*="span"] {
display: inline-block;
}
.note-editor input,
.note-editor textarea,
.note-editor .uneditable-input {
margin-left: 0;
}
.note-editor .controls-row [class*="span"] + [class*="span"] {
margin-left: 20px;
}
.note-editor input.span12,
.note-editor textarea.span12,
.note-editor .uneditable-input.span12 {
width: 926px;
}
.note-editor input.span11,
.note-editor textarea.span11,
.note-editor .uneditable-input.span11 {
width: 846px;
}
.note-editor input.span10,
.note-editor textarea.span10,
.note-editor .uneditable-input.span10 {
width: 766px;
}
.note-editor input.span9,
.note-editor textarea.span9,
.note-editor .uneditable-input.span9 {
width: 686px;
}
.note-editor input.span8,
.note-editor textarea.span8,
.note-editor .uneditable-input.span8 {
width: 606px;
}
.note-editor input.span7,
.note-editor textarea.span7,
.note-editor .uneditable-input.span7 {
width: 526px;
}
.note-editor input.span6,
.note-editor textarea.span6,
.note-editor .uneditable-input.span6 {
width: 446px;
}
.note-editor input.span5,
.note-editor textarea.span5,
.note-editor .uneditable-input.span5 {
width: 366px;
}
.note-editor input.span4,
.note-editor textarea.span4,
.note-editor .uneditable-input.span4 {
width: 286px;
}
.note-editor input.span3,
.note-editor textarea.span3,
.note-editor .uneditable-input.span3 {
width: 206px;
}
.note-editor input.span2,
.note-editor textarea.span2,
.note-editor .uneditable-input.span2 {
width: 126px;
}
.note-editor input.span1,
.note-editor textarea.span1,
.note-editor .uneditable-input.span1 {
width: 46px;
}
.note-editor .controls-row {
*zoom: 1;
}
.note-editor .controls-row:before,
.note-editor .controls-row:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .controls-row:after {
clear: both;
}
.note-editor .controls-row [class*="span"],
.note-editor .row-fluid .controls-row [class*="span"] {
float: left;
}
.note-editor .controls-row .checkbox[class*="span"],
.note-editor .controls-row .radio[class*="span"] {
padding-top: 5px;
}
.note-editor input[disabled],
.note-editor select[disabled],
.note-editor textarea[disabled],
.note-editor input[readonly],
.note-editor select[readonly],
.note-editor textarea[readonly] {
cursor: not-allowed;
background-color: #eeeeee;
}
.note-editor input[type="radio"][disabled],
.note-editor input[type="checkbox"][disabled],
.note-editor input[type="radio"][readonly],
.note-editor input[type="checkbox"][readonly] {
background-color: transparent;
}
.note-editor .control-group.warning .control-label,
.note-editor .control-group.warning .help-block,
.note-editor .control-group.warning .help-inline {
color: #c09853;
}
.note-editor .control-group.warning .checkbox,
.note-editor .control-group.warning .radio,
.note-editor .control-group.warning input,
.note-editor .control-group.warning select,
.note-editor .control-group.warning textarea {
color: #c09853;
}
.note-editor .control-group.warning input,
.note-editor .control-group.warning select,
.note-editor .control-group.warning textarea {
border-color: #c09853;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.note-editor .control-group.warning input:focus,
.note-editor .control-group.warning select:focus,
.note-editor .control-group.warning textarea:focus {
border-color: #a47e3c;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e;
}
.note-editor .control-group.warning .input-prepend .add-on,
.note-editor .control-group.warning .input-append .add-on {
color: #c09853;
background-color: #fcf8e3;
border-color: #c09853;
}
.note-editor .control-group.error .control-label,
.note-editor .control-group.error .help-block,
.note-editor .control-group.error .help-inline {
color: #b94a48;
}
.note-editor .control-group.error .checkbox,
.note-editor .control-group.error .radio,
.note-editor .control-group.error input,
.note-editor .control-group.error select,
.note-editor .control-group.error textarea {
color: #b94a48;
}
.note-editor .control-group.error input,
.note-editor .control-group.error select,
.note-editor .control-group.error textarea {
border-color: #b94a48;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.note-editor .control-group.error input:focus,
.note-editor .control-group.error select:focus,
.note-editor .control-group.error textarea:focus {
border-color: #953b39;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392;
}
.note-editor .control-group.error .input-prepend .add-on,
.note-editor .control-group.error .input-append .add-on {
color: #b94a48;
background-color: #f2dede;
border-color: #b94a48;
}
.note-editor .control-group.success .control-label,
.note-editor .control-group.success .help-block,
.note-editor .control-group.success .help-inline {
color: #468847;
}
.note-editor .control-group.success .checkbox,
.note-editor .control-group.success .radio,
.note-editor .control-group.success input,
.note-editor .control-group.success select,
.note-editor .control-group.success textarea {
color: #468847;
}
.note-editor .control-group.success input,
.note-editor .control-group.success select,
.note-editor .control-group.success textarea {
border-color: #468847;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.note-editor .control-group.success input:focus,
.note-editor .control-group.success select:focus,
.note-editor .control-group.success textarea:focus {
border-color: #356635;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b;
}
.note-editor .control-group.success .input-prepend .add-on,
.note-editor .control-group.success .input-append .add-on {
color: #468847;
background-color: #dff0d8;
border-color: #468847;
}
.note-editor .control-group.info .control-label,
.note-editor .control-group.info .help-block,
.note-editor .control-group.info .help-inline {
color: #3a87ad;
}
.note-editor .control-group.info .checkbox,
.note-editor .control-group.info .radio,
.note-editor .control-group.info input,
.note-editor .control-group.info select,
.note-editor .control-group.info textarea {
color: #3a87ad;
}
.note-editor .control-group.info input,
.note-editor .control-group.info select,
.note-editor .control-group.info textarea {
border-color: #3a87ad;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.note-editor .control-group.info input:focus,
.note-editor .control-group.info select:focus,
.note-editor .control-group.info textarea:focus {
border-color: #2d6987;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3;
}
.note-editor .control-group.info .input-prepend .add-on,
.note-editor .control-group.info .input-append .add-on {
color: #3a87ad;
background-color: #d9edf7;
border-color: #3a87ad;
}
.note-editor input:focus:invalid,
.note-editor textarea:focus:invalid,
.note-editor select:focus:invalid {
color: #b94a48;
border-color: #ee5f5b;
}
.note-editor input:focus:invalid:focus,
.note-editor textarea:focus:invalid:focus,
.note-editor select:focus:invalid:focus {
border-color: #e9322d;
-webkit-box-shadow: 0 0 6px #f8b9b7;
-moz-box-shadow: 0 0 6px #f8b9b7;
box-shadow: 0 0 6px #f8b9b7;
}
.note-editor .form-actions {
padding: 19px 20px 20px;
margin-top: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
border-top: 1px solid #e5e5e5;
*zoom: 1;
}
.note-editor .form-actions:before,
.note-editor .form-actions:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .form-actions:after {
clear: both;
}
.note-editor .help-block,
.note-editor .help-inline {
color: #595959;
}
.note-editor .help-block {
display: block;
margin-bottom: 10px;
}
.note-editor .help-inline {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
vertical-align: middle;
padding-left: 5px;
}
.note-editor .input-append,
.note-editor .input-prepend {
display: inline-block;
margin-bottom: 10px;
vertical-align: middle;
font-size: 0;
white-space: nowrap;
}
.note-editor .input-append input,
.note-editor .input-prepend input,
.note-editor .input-append select,
.note-editor .input-prepend select,
.note-editor .input-append .uneditable-input,
.note-editor .input-prepend .uneditable-input,
.note-editor .input-append .dropdown-menu,
.note-editor .input-prepend .dropdown-menu,
.note-editor .input-append .popover,
.note-editor .input-prepend .popover {
font-size: 14px;
}
.note-editor .input-append input,
.note-editor .input-prepend input,
.note-editor .input-append select,
.note-editor .input-prepend select,
.note-editor .input-append .uneditable-input,
.note-editor .input-prepend .uneditable-input {
position: relative;
margin-bottom: 0;
*margin-left: 0;
vertical-align: top;
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.note-editor .input-append input:focus,
.note-editor .input-prepend input:focus,
.note-editor .input-append select:focus,
.note-editor .input-prepend select:focus,
.note-editor .input-append .uneditable-input:focus,
.note-editor .input-prepend .uneditable-input:focus {
z-index: 2;
}
.note-editor .input-append .add-on,
.note-editor .input-prepend .add-on {
display: inline-block;
width: auto;
height: 20px;
min-width: 16px;
padding: 4px 5px;
font-size: 14px;
font-weight: normal;
line-height: 20px;
text-align: center;
text-shadow: 0 1px 0 #ffffff;
background-color: #eeeeee;
border: 1px solid #ccc;
}
.note-editor .input-append .add-on,
.note-editor .input-prepend .add-on,
.note-editor .input-append .btn,
.note-editor .input-prepend .btn,
.note-editor .input-append .btn-group > .dropdown-toggle,
.note-editor .input-prepend .btn-group > .dropdown-toggle {
vertical-align: top;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .input-append .active,
.note-editor .input-prepend .active {
background-color: #a9dba9;
border-color: #46a546;
}
.note-editor .input-prepend .add-on,
.note-editor .input-prepend .btn {
margin-right: -1px;
}
.note-editor .input-prepend .add-on:first-child,
.note-editor .input-prepend .btn:first-child {
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.note-editor .input-append input,
.note-editor .input-append select,
.note-editor .input-append .uneditable-input {
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.note-editor .input-append input + .btn-group .btn:last-child,
.note-editor .input-append select + .btn-group .btn:last-child,
.note-editor .input-append .uneditable-input + .btn-group .btn:last-child {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.note-editor .input-append .add-on,
.note-editor .input-append .btn,
.note-editor .input-append .btn-group {
margin-left: -1px;
}
.note-editor .input-append .add-on:last-child,
.note-editor .input-append .btn:last-child,
.note-editor .input-append .btn-group:last-child > .dropdown-toggle {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.note-editor .input-prepend.input-append input,
.note-editor .input-prepend.input-append select,
.note-editor .input-prepend.input-append .uneditable-input {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .input-prepend.input-append input + .btn-group .btn,
.note-editor .input-prepend.input-append select + .btn-group .btn,
.note-editor .input-prepend.input-append .uneditable-input + .btn-group .btn {
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.note-editor .input-prepend.input-append .add-on:first-child,
.note-editor .input-prepend.input-append .btn:first-child {
margin-right: -1px;
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.note-editor .input-prepend.input-append .add-on:last-child,
.note-editor .input-prepend.input-append .btn:last-child {
margin-left: -1px;
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.note-editor .input-prepend.input-append .btn-group:first-child {
margin-left: 0;
}
.note-editor input.search-query {
padding-right: 14px;
padding-right: 4px \9;
padding-left: 14px;
padding-left: 4px \9;
/* IE7-8 doesn't have border-radius, so don't indent the padding */
margin-bottom: 0;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.note-editor .form-search .input-append .search-query,
.note-editor .form-search .input-prepend .search-query {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .form-search .input-append .search-query {
-webkit-border-radius: 14px 0 0 14px;
-moz-border-radius: 14px 0 0 14px;
border-radius: 14px 0 0 14px;
}
.note-editor .form-search .input-append .btn {
-webkit-border-radius: 0 14px 14px 0;
-moz-border-radius: 0 14px 14px 0;
border-radius: 0 14px 14px 0;
}
.note-editor .form-search .input-prepend .search-query {
-webkit-border-radius: 0 14px 14px 0;
-moz-border-radius: 0 14px 14px 0;
border-radius: 0 14px 14px 0;
}
.note-editor .form-search .input-prepend .btn {
-webkit-border-radius: 14px 0 0 14px;
-moz-border-radius: 14px 0 0 14px;
border-radius: 14px 0 0 14px;
}
.note-editor .form-search input,
.note-editor .form-inline input,
.note-editor .form-horizontal input,
.note-editor .form-search textarea,
.note-editor .form-inline textarea,
.note-editor .form-horizontal textarea,
.note-editor .form-search select,
.note-editor .form-inline select,
.note-editor .form-horizontal select,
.note-editor .form-search .help-inline,
.note-editor .form-inline .help-inline,
.note-editor .form-horizontal .help-inline,
.note-editor .form-search .uneditable-input,
.note-editor .form-inline .uneditable-input,
.note-editor .form-horizontal .uneditable-input,
.note-editor .form-search .input-prepend,
.note-editor .form-inline .input-prepend,
.note-editor .form-horizontal .input-prepend,
.note-editor .form-search .input-append,
.note-editor .form-inline .input-append,
.note-editor .form-horizontal .input-append {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
margin-bottom: 0;
vertical-align: middle;
}
.note-editor .form-search .hide,
.note-editor .form-inline .hide,
.note-editor .form-horizontal .hide {
display: none;
}
.note-editor .form-search label,
.note-editor .form-inline label,
.note-editor .form-search .btn-group,
.note-editor .form-inline .btn-group {
display: inline-block;
}
.note-editor .form-search .input-append,
.note-editor .form-inline .input-append,
.note-editor .form-search .input-prepend,
.note-editor .form-inline .input-prepend {
margin-bottom: 0;
}
.note-editor .form-search .radio,
.note-editor .form-search .checkbox,
.note-editor .form-inline .radio,
.note-editor .form-inline .checkbox {
padding-left: 0;
margin-bottom: 0;
vertical-align: middle;
}
.note-editor .form-search .radio input[type="radio"],
.note-editor .form-search .checkbox input[type="checkbox"],
.note-editor .form-inline .radio input[type="radio"],
.note-editor .form-inline .checkbox input[type="checkbox"] {
float: left;
margin-right: 3px;
margin-left: 0;
}
.note-editor .control-group {
margin-bottom: 10px;
}
.note-editor legend + .control-group {
margin-top: 20px;
-webkit-margin-top-collapse: separate;
}
.note-editor .form-horizontal .control-group {
margin-bottom: 20px;
*zoom: 1;
}
.note-editor .form-horizontal .control-group:before,
.note-editor .form-horizontal .control-group:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .form-horizontal .control-group:after {
clear: both;
}
.note-editor .form-horizontal .control-label {
float: left;
width: 160px;
padding-top: 5px;
text-align: right;
}
.note-editor .form-horizontal .controls {
*display: inline-block;
*padding-left: 20px;
margin-left: 180px;
*margin-left: 0;
}
.note-editor .form-horizontal .controls:first-child {
*padding-left: 180px;
}
.note-editor .form-horizontal .help-block {
margin-bottom: 0;
}
.note-editor .form-horizontal input + .help-block,
.note-editor .form-horizontal select + .help-block,
.note-editor .form-horizontal textarea + .help-block,
.note-editor .form-horizontal .uneditable-input + .help-block,
.note-editor .form-horizontal .input-prepend + .help-block,
.note-editor .form-horizontal .input-append + .help-block {
margin-top: 10px;
}
.note-editor .form-horizontal .form-actions {
padding-left: 180px;
}
.note-editor table {
max-width: 100%;
background-color: transparent;
border-collapse: collapse;
border-spacing: 0;
}
.note-editor .table {
width: 100%;
margin-bottom: 20px;
}
.note-editor .table th,
.note-editor .table td {
padding: 8px;
line-height: 20px;
text-align: left;
vertical-align: top;
border-top: 1px solid #dddddd;
}
.note-editor .table th {
font-weight: bold;
}
.note-editor .table thead th {
vertical-align: bottom;
}
.note-editor .table caption + thead tr:first-child th,
.note-editor .table caption + thead tr:first-child td,
.note-editor .table colgroup + thead tr:first-child th,
.note-editor .table colgroup + thead tr:first-child td,
.note-editor .table thead:first-child tr:first-child th,
.note-editor .table thead:first-child tr:first-child td {
border-top: 0;
}
.note-editor .table tbody + tbody {
border-top: 2px solid #dddddd;
}
.note-editor .table .table {
background-color: #ffffff;
}
.note-editor .table-condensed th,
.note-editor .table-condensed td {
padding: 4px 5px;
}
.note-editor .table-bordered {
border: 1px solid #dddddd;
border-collapse: separate;
*border-collapse: collapse;
border-left: 0;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.note-editor .table-bordered th,
.note-editor .table-bordered td {
border-left: 1px solid #dddddd;
}
.note-editor .table-bordered caption + thead tr:first-child th,
.note-editor .table-bordered caption + tbody tr:first-child th,
.note-editor .table-bordered caption + tbody tr:first-child td,
.note-editor .table-bordered colgroup + thead tr:first-child th,
.note-editor .table-bordered colgroup + tbody tr:first-child th,
.note-editor .table-bordered colgroup + tbody tr:first-child td,
.note-editor .table-bordered thead:first-child tr:first-child th,
.note-editor .table-bordered tbody:first-child tr:first-child th,
.note-editor .table-bordered tbody:first-child tr:first-child td {
border-top: 0;
}
.note-editor .table-bordered thead:first-child tr:first-child > th:first-child,
.note-editor .table-bordered tbody:first-child tr:first-child > td:first-child,
.note-editor .table-bordered tbody:first-child tr:first-child > th:first-child {
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
}
.note-editor .table-bordered thead:first-child tr:first-child > th:last-child,
.note-editor .table-bordered tbody:first-child tr:first-child > td:last-child,
.note-editor .table-bordered tbody:first-child tr:first-child > th:last-child {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
}
.note-editor .table-bordered thead:last-child tr:last-child > th:first-child,
.note-editor .table-bordered tbody:last-child tr:last-child > td:first-child,
.note-editor .table-bordered tbody:last-child tr:last-child > th:first-child,
.note-editor .table-bordered tfoot:last-child tr:last-child > td:first-child,
.note-editor .table-bordered tfoot:last-child tr:last-child > th:first-child {
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.note-editor .table-bordered thead:last-child tr:last-child > th:last-child,
.note-editor .table-bordered tbody:last-child tr:last-child > td:last-child,
.note-editor .table-bordered tbody:last-child tr:last-child > th:last-child,
.note-editor .table-bordered tfoot:last-child tr:last-child > td:last-child,
.note-editor .table-bordered tfoot:last-child tr:last-child > th:last-child {
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
border-bottom-right-radius: 4px;
}
.note-editor .table-bordered tfoot + tbody:last-child tr:last-child td:first-child {
-webkit-border-bottom-left-radius: 0;
-moz-border-radius-bottomleft: 0;
border-bottom-left-radius: 0;
}
.note-editor .table-bordered tfoot + tbody:last-child tr:last-child td:last-child {
-webkit-border-bottom-right-radius: 0;
-moz-border-radius-bottomright: 0;
border-bottom-right-radius: 0;
}
.note-editor .table-bordered caption + thead tr:first-child th:first-child,
.note-editor .table-bordered caption + tbody tr:first-child td:first-child,
.note-editor .table-bordered colgroup + thead tr:first-child th:first-child,
.note-editor .table-bordered colgroup + tbody tr:first-child td:first-child {
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
}
.note-editor .table-bordered caption + thead tr:first-child th:last-child,
.note-editor .table-bordered caption + tbody tr:first-child td:last-child,
.note-editor .table-bordered colgroup + thead tr:first-child th:last-child,
.note-editor .table-bordered colgroup + tbody tr:first-child td:last-child {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
}
.note-editor .table-striped tbody > tr:nth-child(odd) > td,
.note-editor .table-striped tbody > tr:nth-child(odd) > th {
background-color: #f9f9f9;
}
.note-editor .table-hover tbody tr:hover > td,
.note-editor .table-hover tbody tr:hover > th {
background-color: #f5f5f5;
}
.note-editor table td[class*="span"],
.note-editor table th[class*="span"],
.note-editor .row-fluid table td[class*="span"],
.note-editor .row-fluid table th[class*="span"] {
display: table-cell;
float: none;
margin-left: 0;
}
.note-editor .table td.span1,
.note-editor .table th.span1 {
float: none;
width: 44px;
margin-left: 0;
}
.note-editor .table td.span2,
.note-editor .table th.span2 {
float: none;
width: 124px;
margin-left: 0;
}
.note-editor .table td.span3,
.note-editor .table th.span3 {
float: none;
width: 204px;
margin-left: 0;
}
.note-editor .table td.span4,
.note-editor .table th.span4 {
float: none;
width: 284px;
margin-left: 0;
}
.note-editor .table td.span5,
.note-editor .table th.span5 {
float: none;
width: 364px;
margin-left: 0;
}
.note-editor .table td.span6,
.note-editor .table th.span6 {
float: none;
width: 444px;
margin-left: 0;
}
.note-editor .table td.span7,
.note-editor .table th.span7 {
float: none;
width: 524px;
margin-left: 0;
}
.note-editor .table td.span8,
.note-editor .table th.span8 {
float: none;
width: 604px;
margin-left: 0;
}
.note-editor .table td.span9,
.note-editor .table th.span9 {
float: none;
width: 684px;
margin-left: 0;
}
.note-editor .table td.span10,
.note-editor .table th.span10 {
float: none;
width: 764px;
margin-left: 0;
}
.note-editor .table td.span11,
.note-editor .table th.span11 {
float: none;
width: 844px;
margin-left: 0;
}
.note-editor .table td.span12,
.note-editor .table th.span12 {
float: none;
width: 924px;
margin-left: 0;
}
.note-editor .table tbody tr.success > td {
background-color: #dff0d8;
}
.note-editor .table tbody tr.error > td {
background-color: #f2dede;
}
.note-editor .table tbody tr.warning > td {
background-color: #fcf8e3;
}
.note-editor .table tbody tr.info > td {
background-color: #d9edf7;
}
.note-editor .table-hover tbody tr.success:hover > td {
background-color: #d0e9c6;
}
.note-editor .table-hover tbody tr.error:hover > td {
background-color: #ebcccc;
}
.note-editor .table-hover tbody tr.warning:hover > td {
background-color: #faf2cc;
}
.note-editor .table-hover tbody tr.info:hover > td {
background-color: #c4e3f3;
}
.note-editor [class^="icon-"],
.note-editor [class*=" icon-"] {
display: inline-block;
width: 14px;
height: 14px;
*margin-right: .3em;
line-height: 14px;
vertical-align: text-top;
background-image: url("../images/glyphicons-halflings.png");
background-position: 14px 14px;
background-repeat: no-repeat;
margin-top: 1px;
}
.note-editor .icon-white,
.note-editor .nav-pills > .active > a > [class^="icon-"],
.note-editor .nav-pills > .active > a > [class*=" icon-"],
.note-editor .nav-list > .active > a > [class^="icon-"],
.note-editor .nav-list > .active > a > [class*=" icon-"],
.note-editor .navbar-inverse .nav > .active > a > [class^="icon-"],
.note-editor .navbar-inverse .nav > .active > a > [class*=" icon-"],
.note-editor .dropdown-menu > li > a:hover > [class^="icon-"],
.note-editor .dropdown-menu > li > a:focus > [class^="icon-"],
.note-editor .dropdown-menu > li > a:hover > [class*=" icon-"],
.note-editor .dropdown-menu > li > a:focus > [class*=" icon-"],
.note-editor .dropdown-menu > .active > a > [class^="icon-"],
.note-editor .dropdown-menu > .active > a > [class*=" icon-"],
.note-editor .dropdown-submenu:hover > a > [class^="icon-"],
.note-editor .dropdown-submenu:focus > a > [class^="icon-"],
.note-editor .dropdown-submenu:hover > a > [class*=" icon-"],
.note-editor .dropdown-submenu:focus > a > [class*=" icon-"] {
background-image: url("../images/glyphicons-halflings-white.png");
}
.note-editor .icon-glass {
background-position: 0 0;
}
.note-editor .icon-music {
background-position: -24px 0;
}
.note-editor .icon-search {
background-position: -48px 0;
}
.note-editor .icon-envelope {
background-position: -72px 0;
}
.note-editor .icon-heart {
background-position: -96px 0;
}
.note-editor .icon-star {
background-position: -120px 0;
}
.note-editor .icon-star-empty {
background-position: -144px 0;
}
.note-editor .icon-user {
background-position: -168px 0;
}
.note-editor .icon-film {
background-position: -192px 0;
}
.note-editor .icon-th-large {
background-position: -216px 0;
}
.note-editor .icon-th {
background-position: -240px 0;
}
.note-editor .icon-th-list {
background-position: -264px 0;
}
.note-editor .icon-ok {
background-position: -288px 0;
}
.note-editor .icon-remove {
background-position: -312px 0;
}
.note-editor .icon-zoom-in {
background-position: -336px 0;
}
.note-editor .icon-zoom-out {
background-position: -360px 0;
}
.note-editor .icon-off {
background-position: -384px 0;
}
.note-editor .icon-signal {
background-position: -408px 0;
}
.note-editor .icon-cog {
background-position: -432px 0;
}
.note-editor .icon-trash {
background-position: -456px 0;
}
.note-editor .icon-home {
background-position: 0 -24px;
}
.note-editor .icon-file {
background-position: -24px -24px;
}
.note-editor .icon-time {
background-position: -48px -24px;
}
.note-editor .icon-road {
background-position: -72px -24px;
}
.note-editor .icon-download-alt {
background-position: -96px -24px;
}
.note-editor .icon-download {
background-position: -120px -24px;
}
.note-editor .icon-upload {
background-position: -144px -24px;
}
.note-editor .icon-inbox {
background-position: -168px -24px;
}
.note-editor .icon-play-circle {
background-position: -192px -24px;
}
.note-editor .icon-repeat {
background-position: -216px -24px;
}
.note-editor .icon-refresh {
background-position: -240px -24px;
}
.note-editor .icon-list-alt {
background-position: -264px -24px;
}
.note-editor .icon-lock {
background-position: -287px -24px;
}
.note-editor .icon-flag {
background-position: -312px -24px;
}
.note-editor .icon-headphones {
background-position: -336px -24px;
}
.note-editor .icon-volume-off {
background-position: -360px -24px;
}
.note-editor .icon-volume-down {
background-position: -384px -24px;
}
.note-editor .icon-volume-up {
background-position: -408px -24px;
}
.note-editor .icon-qrcode {
background-position: -432px -24px;
}
.note-editor .icon-barcode {
background-position: -456px -24px;
}
.note-editor .icon-tag {
background-position: 0 -48px;
}
.note-editor .icon-tags {
background-position: -25px -48px;
}
.note-editor .icon-book {
background-position: -48px -48px;
}
.note-editor .icon-bookmark {
background-position: -72px -48px;
}
.note-editor .icon-print {
background-position: -96px -48px;
}
.note-editor .icon-camera {
background-position: -120px -48px;
}
.note-editor .icon-font {
background-position: -144px -48px;
}
.note-editor .icon-bold {
background-position: -167px -48px;
}
.note-editor .icon-italic {
background-position: -192px -48px;
}
.note-editor .icon-text-height {
background-position: -216px -48px;
}
.note-editor .icon-text-width {
background-position: -240px -48px;
}
.note-editor .icon-align-left {
background-position: -264px -48px;
}
.note-editor .icon-align-center {
background-position: -288px -48px;
}
.note-editor .icon-align-right {
background-position: -312px -48px;
}
.note-editor .icon-align-justify {
background-position: -336px -48px;
}
.note-editor .icon-list {
background-position: -360px -48px;
}
.note-editor .icon-indent-left {
background-position: -384px -48px;
}
.note-editor .icon-indent-right {
background-position: -408px -48px;
}
.note-editor .icon-facetime-video {
background-position: -432px -48px;
}
.note-editor .icon-picture {
background-position: -456px -48px;
}
.note-editor .icon-pencil {
background-position: 0 -72px;
}
.note-editor .icon-map-marker {
background-position: -24px -72px;
}
.note-editor .icon-adjust {
background-position: -48px -72px;
}
.note-editor .icon-tint {
background-position: -72px -72px;
}
.note-editor .icon-edit {
background-position: -96px -72px;
}
.note-editor .icon-share {
background-position: -120px -72px;
}
.note-editor .icon-check {
background-position: -144px -72px;
}
.note-editor .icon-move {
background-position: -168px -72px;
}
.note-editor .icon-step-backward {
background-position: -192px -72px;
}
.note-editor .icon-fast-backward {
background-position: -216px -72px;
}
.note-editor .icon-backward {
background-position: -240px -72px;
}
.note-editor .icon-play {
background-position: -264px -72px;
}
.note-editor .icon-pause {
background-position: -288px -72px;
}
.note-editor .icon-stop {
background-position: -312px -72px;
}
.note-editor .icon-forward {
background-position: -336px -72px;
}
.note-editor .icon-fast-forward {
background-position: -360px -72px;
}
.note-editor .icon-step-forward {
background-position: -384px -72px;
}
.note-editor .icon-eject {
background-position: -408px -72px;
}
.note-editor .icon-chevron-left {
background-position: -432px -72px;
}
.note-editor .icon-chevron-right {
background-position: -456px -72px;
}
.note-editor .icon-plus-sign {
background-position: 0 -96px;
}
.note-editor .icon-minus-sign {
background-position: -24px -96px;
}
.note-editor .icon-remove-sign {
background-position: -48px -96px;
}
.note-editor .icon-ok-sign {
background-position: -72px -96px;
}
.note-editor .icon-question-sign {
background-position: -96px -96px;
}
.note-editor .icon-info-sign {
background-position: -120px -96px;
}
.note-editor .icon-screenshot {
background-position: -144px -96px;
}
.note-editor .icon-remove-circle {
background-position: -168px -96px;
}
.note-editor .icon-ok-circle {
background-position: -192px -96px;
}
.note-editor .icon-ban-circle {
background-position: -216px -96px;
}
.note-editor .icon-arrow-left {
background-position: -240px -96px;
}
.note-editor .icon-arrow-right {
background-position: -264px -96px;
}
.note-editor .icon-arrow-up {
background-position: -289px -96px;
}
.note-editor .icon-arrow-down {
background-position: -312px -96px;
}
.note-editor .icon-share-alt {
background-position: -336px -96px;
}
.note-editor .icon-resize-full {
background-position: -360px -96px;
}
.note-editor .icon-resize-small {
background-position: -384px -96px;
}
.note-editor .icon-plus {
background-position: -408px -96px;
}
.note-editor .icon-minus {
background-position: -433px -96px;
}
.note-editor .icon-asterisk {
background-position: -456px -96px;
}
.note-editor .icon-exclamation-sign {
background-position: 0 -120px;
}
.note-editor .icon-gift {
background-position: -24px -120px;
}
.note-editor .icon-leaf {
background-position: -48px -120px;
}
.note-editor .icon-fire {
background-position: -72px -120px;
}
.note-editor .icon-eye-open {
background-position: -96px -120px;
}
.note-editor .icon-eye-close {
background-position: -120px -120px;
}
.note-editor .icon-warning-sign {
background-position: -144px -120px;
}
.note-editor .icon-plane {
background-position: -168px -120px;
}
.note-editor .icon-calendar {
background-position: -192px -120px;
}
.note-editor .icon-random {
background-position: -216px -120px;
width: 16px;
}
.note-editor .icon-comment {
background-position: -240px -120px;
}
.note-editor .icon-magnet {
background-position: -264px -120px;
}
.note-editor .icon-chevron-up {
background-position: -288px -120px;
}
.note-editor .icon-chevron-down {
background-position: -313px -119px;
}
.note-editor .icon-retweet {
background-position: -336px -120px;
}
.note-editor .icon-shopping-cart {
background-position: -360px -120px;
}
.note-editor .icon-folder-close {
background-position: -384px -120px;
width: 16px;
}
.note-editor .icon-folder-open {
background-position: -408px -120px;
width: 16px;
}
.note-editor .icon-resize-vertical {
background-position: -432px -119px;
}
.note-editor .icon-resize-horizontal {
background-position: -456px -118px;
}
.note-editor .icon-hdd {
background-position: 0 -144px;
}
.note-editor .icon-bullhorn {
background-position: -24px -144px;
}
.note-editor .icon-bell {
background-position: -48px -144px;
}
.note-editor .icon-certificate {
background-position: -72px -144px;
}
.note-editor .icon-thumbs-up {
background-position: -96px -144px;
}
.note-editor .icon-thumbs-down {
background-position: -120px -144px;
}
.note-editor .icon-hand-right {
background-position: -144px -144px;
}
.note-editor .icon-hand-left {
background-position: -168px -144px;
}
.note-editor .icon-hand-up {
background-position: -192px -144px;
}
.note-editor .icon-hand-down {
background-position: -216px -144px;
}
.note-editor .icon-circle-arrow-right {
background-position: -240px -144px;
}
.note-editor .icon-circle-arrow-left {
background-position: -264px -144px;
}
.note-editor .icon-circle-arrow-up {
background-position: -288px -144px;
}
.note-editor .icon-circle-arrow-down {
background-position: -312px -144px;
}
.note-editor .icon-globe {
background-position: -336px -144px;
}
.note-editor .icon-wrench {
background-position: -360px -144px;
}
.note-editor .icon-tasks {
background-position: -384px -144px;
}
.note-editor .icon-filter {
background-position: -408px -144px;
}
.note-editor .icon-briefcase {
background-position: -432px -144px;
}
.note-editor .icon-fullscreen {
background-position: -456px -144px;
}
.note-editor .dropup,
.note-editor .dropdown {
position: relative;
}
.note-editor .dropdown-toggle {
*margin-bottom: -3px;
}
.note-editor .dropdown-toggle:active,
.note-editor .open .dropdown-toggle {
outline: 0;
}
.note-editor .caret {
display: inline-block;
width: 0;
height: 0;
vertical-align: top;
border-top: 4px solid #000000;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
content: "";
}
.note-editor .dropdown .caret {
margin-top: 8px;
margin-left: 2px;
}
.note-editor .dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
list-style: none;
background-color: #ffffff;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
*border-right-width: 2px;
*border-bottom-width: 2px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
.note-editor .dropdown-menu.pull-right {
right: 0;
left: auto;
}
.note-editor .dropdown-menu .divider {
*width: 100%;
height: 1px;
margin: 9px 1px;
*margin: -5px 0 5px;
overflow: hidden;
background-color: #e5e5e5;
border-bottom: 1px solid #ffffff;
}
.note-editor .dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 20px;
color: #333333;
white-space: nowrap;
}
.note-editor .dropdown-menu > li > a:hover,
.note-editor .dropdown-menu > li > a:focus,
.note-editor .dropdown-submenu:hover > a,
.note-editor .dropdown-submenu:focus > a {
text-decoration: none;
color: #ffffff;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.note-editor .dropdown-menu > .active > a,
.note-editor .dropdown-menu > .active > a:hover,
.note-editor .dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
outline: 0;
background-color: #0081c2;
background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
background-image: -o-linear-gradient(top, #0088cc, #0077b3);
background-image: linear-gradient(to bottom, #0088cc, #0077b3);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
}
.note-editor .dropdown-menu > .disabled > a,
.note-editor .dropdown-menu > .disabled > a:hover,
.note-editor .dropdown-menu > .disabled > a:focus {
color: #999999;
}
.note-editor .dropdown-menu > .disabled > a:hover,
.note-editor .dropdown-menu > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
cursor: default;
}
.note-editor .open {
*z-index: 1000;
}
.note-editor .open > .dropdown-menu {
display: block;
}
.note-editor .dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 990;
}
.note-editor .pull-right > .dropdown-menu {
right: 0;
left: auto;
}
.note-editor .dropup .caret,
.note-editor .navbar-fixed-bottom .dropdown .caret {
border-top: 0;
border-bottom: 4px solid #000000;
content: "";
}
.note-editor .dropup .dropdown-menu,
.note-editor .navbar-fixed-bottom .dropdown .dropdown-menu {
top: auto;
bottom: 100%;
margin-bottom: 1px;
}
.note-editor .dropdown-submenu {
position: relative;
}
.note-editor .dropdown-submenu > .dropdown-menu {
top: 0;
left: 100%;
margin-top: -6px;
margin-left: -1px;
-webkit-border-radius: 0 6px 6px 6px;
-moz-border-radius: 0 6px 6px 6px;
border-radius: 0 6px 6px 6px;
}
.note-editor .dropdown-submenu:hover > .dropdown-menu {
display: block;
}
.note-editor .dropup .dropdown-submenu > .dropdown-menu {
top: auto;
bottom: 0;
margin-top: 0;
margin-bottom: -2px;
-webkit-border-radius: 5px 5px 5px 0;
-moz-border-radius: 5px 5px 5px 0;
border-radius: 5px 5px 5px 0;
}
.note-editor .dropdown-submenu > a:after {
display: block;
content: " ";
float: right;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
border-width: 5px 0 5px 5px;
border-left-color: #cccccc;
margin-top: 5px;
margin-right: -10px;
}
.note-editor .dropdown-submenu:hover > a:after {
border-left-color: #ffffff;
}
.note-editor .dropdown-submenu.pull-left {
float: none;
}
.note-editor .dropdown-submenu.pull-left > .dropdown-menu {
left: -100%;
margin-left: 10px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
.note-editor .dropdown .dropdown-menu .nav-header {
padding-left: 20px;
padding-right: 20px;
}
.note-editor .typeahead {
z-index: 1051;
margin-top: 2px;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.note-editor .well {
min-height: 20px;
padding: 19px;
margin-bottom: 20px;
background-color: #f5f5f5;
border: 1px solid #e3e3e3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
.note-editor .well blockquote {
border-color: #ddd;
border-color: rgba(0, 0, 0, 0.15);
}
.note-editor .well-large {
padding: 24px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.note-editor .well-small {
padding: 9px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.note-editor .fade {
opacity: 0;
-webkit-transition: opacity 0.15s linear;
-moz-transition: opacity 0.15s linear;
-o-transition: opacity 0.15s linear;
transition: opacity 0.15s linear;
}
.note-editor .fade.in {
opacity: 1;
}
.note-editor .collapse {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition: height 0.35s ease;
-moz-transition: height 0.35s ease;
-o-transition: height 0.35s ease;
transition: height 0.35s ease;
}
.note-editor .collapse.in {
height: auto;
}
.note-editor .close {
float: right;
font-size: 20px;
font-weight: bold;
line-height: 20px;
color: #000000;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.2;
filter: alpha(opacity=20);
}
.note-editor .close:hover,
.note-editor .close:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
opacity: 0.4;
filter: alpha(opacity=40);
}
.note-editor button.close {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.note-editor .btn {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
padding: 4px 12px;
margin-bottom: 0;
font-size: 14px;
line-height: 20px;
text-align: center;
vertical-align: middle;
cursor: pointer;
color: #333333;
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
background-color: #f5f5f5;
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #e6e6e6;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
border: 1px solid #cccccc;
*border: 0;
border-bottom-color: #b3b3b3;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
*margin-left: .3em;
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
}
.note-editor .btn:hover,
.note-editor .btn:focus,
.note-editor .btn:active,
.note-editor .btn.active,
.note-editor .btn.disabled,
.note-editor .btn[disabled] {
color: #333333;
background-color: #e6e6e6;
*background-color: #d9d9d9;
}
.note-editor .btn:active,
.note-editor .btn.active {
background-color: #cccccc \9;
}
.note-editor .btn:first-child {
*margin-left: 0;
}
.note-editor .btn:hover,
.note-editor .btn:focus {
color: #333333;
text-decoration: none;
background-position: 0 -15px;
-webkit-transition: background-position 0.1s linear;
-moz-transition: background-position 0.1s linear;
-o-transition: background-position 0.1s linear;
transition: background-position 0.1s linear;
}
.note-editor .btn:focus {
outline: thin dotted #333;
outline: 5px auto -webkit-focus-ring-color;
outline-offset: -2px;
}
.note-editor .btn.active,
.note-editor .btn:active {
background-image: none;
outline: 0;
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
}
.note-editor .btn.disabled,
.note-editor .btn[disabled] {
cursor: default;
background-image: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.note-editor .btn-large {
padding: 11px 19px;
font-size: 17.5px;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.note-editor .btn-large [class^="icon-"],
.note-editor .btn-large [class*=" icon-"] {
margin-top: 4px;
}
.note-editor .btn-small {
padding: 2px 10px;
font-size: 11.9px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.note-editor .btn-small [class^="icon-"],
.note-editor .btn-small [class*=" icon-"] {
margin-top: 0;
}
.note-editor .btn-mini [class^="icon-"],
.note-editor .btn-mini [class*=" icon-"] {
margin-top: -1px;
}
.note-editor .btn-mini {
padding: 0 6px;
font-size: 10.5px;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.note-editor .btn-block {
display: block;
width: 100%;
padding-left: 0;
padding-right: 0;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.note-editor .btn-block + .btn-block {
margin-top: 5px;
}
.note-editor input[type="submit"].btn-block,
.note-editor input[type="reset"].btn-block,
.note-editor input[type="button"].btn-block {
width: 100%;
}
.note-editor .btn-primary.active,
.note-editor .btn-warning.active,
.note-editor .btn-danger.active,
.note-editor .btn-success.active,
.note-editor .btn-info.active,
.note-editor .btn-inverse.active {
color: rgba(255, 255, 255, 0.75);
}
.note-editor .btn-primary {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #006dcc;
background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
background-image: -o-linear-gradient(top, #0088cc, #0044cc);
background-image: linear-gradient(to bottom, #0088cc, #0044cc);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);
border-color: #0044cc #0044cc #002a80;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #0044cc;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.note-editor .btn-primary:hover,
.note-editor .btn-primary:focus,
.note-editor .btn-primary:active,
.note-editor .btn-primary.active,
.note-editor .btn-primary.disabled,
.note-editor .btn-primary[disabled] {
color: #ffffff;
background-color: #0044cc;
*background-color: #003bb3;
}
.note-editor .btn-primary:active,
.note-editor .btn-primary.active {
background-color: #003399 \9;
}
.note-editor .btn-warning {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #faa732;
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
background-image: -o-linear-gradient(top, #fbb450, #f89406);
background-image: linear-gradient(to bottom, #fbb450, #f89406);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
border-color: #f89406 #f89406 #ad6704;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #f89406;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.note-editor .btn-warning:hover,
.note-editor .btn-warning:focus,
.note-editor .btn-warning:active,
.note-editor .btn-warning.active,
.note-editor .btn-warning.disabled,
.note-editor .btn-warning[disabled] {
color: #ffffff;
background-color: #f89406;
*background-color: #df8505;
}
.note-editor .btn-warning:active,
.note-editor .btn-warning.active {
background-color: #c67605 \9;
}
.note-editor .btn-danger {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #da4f49;
background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
background-image: linear-gradient(to bottom, #ee5f5b, #bd362f);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);
border-color: #bd362f #bd362f #802420;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #bd362f;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.note-editor .btn-danger:hover,
.note-editor .btn-danger:focus,
.note-editor .btn-danger:active,
.note-editor .btn-danger.active,
.note-editor .btn-danger.disabled,
.note-editor .btn-danger[disabled] {
color: #ffffff;
background-color: #bd362f;
*background-color: #a9302a;
}
.note-editor .btn-danger:active,
.note-editor .btn-danger.active {
background-color: #942a25 \9;
}
.note-editor .btn-success {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #5bb75b;
background-image: -moz-linear-gradient(top, #62c462, #51a351);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
background-image: -webkit-linear-gradient(top, #62c462, #51a351);
background-image: -o-linear-gradient(top, #62c462, #51a351);
background-image: linear-gradient(to bottom, #62c462, #51a351);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);
border-color: #51a351 #51a351 #387038;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #51a351;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.note-editor .btn-success:hover,
.note-editor .btn-success:focus,
.note-editor .btn-success:active,
.note-editor .btn-success.active,
.note-editor .btn-success.disabled,
.note-editor .btn-success[disabled] {
color: #ffffff;
background-color: #51a351;
*background-color: #499249;
}
.note-editor .btn-success:active,
.note-editor .btn-success.active {
background-color: #408140 \9;
}
.note-editor .btn-info {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #49afcd;
background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
background-image: linear-gradient(to bottom, #5bc0de, #2f96b4);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);
border-color: #2f96b4 #2f96b4 #1f6377;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #2f96b4;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.note-editor .btn-info:hover,
.note-editor .btn-info:focus,
.note-editor .btn-info:active,
.note-editor .btn-info.active,
.note-editor .btn-info.disabled,
.note-editor .btn-info[disabled] {
color: #ffffff;
background-color: #2f96b4;
*background-color: #2a85a0;
}
.note-editor .btn-info:active,
.note-editor .btn-info.active {
background-color: #24748c \9;
}
.note-editor .btn-inverse {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #363636;
background-image: -moz-linear-gradient(top, #444444, #222222);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));
background-image: -webkit-linear-gradient(top, #444444, #222222);
background-image: -o-linear-gradient(top, #444444, #222222);
background-image: linear-gradient(to bottom, #444444, #222222);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);
border-color: #222222 #222222 #000000;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #222222;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.note-editor .btn-inverse:hover,
.note-editor .btn-inverse:focus,
.note-editor .btn-inverse:active,
.note-editor .btn-inverse.active,
.note-editor .btn-inverse.disabled,
.note-editor .btn-inverse[disabled] {
color: #ffffff;
background-color: #222222;
*background-color: #151515;
}
.note-editor .btn-inverse:active,
.note-editor .btn-inverse.active {
background-color: #080808 \9;
}
.note-editor button.btn,
.note-editor input[type="submit"].btn {
*padding-top: 3px;
*padding-bottom: 3px;
}
.note-editor button.btn::-moz-focus-inner,
.note-editor input[type="submit"].btn::-moz-focus-inner {
padding: 0;
border: 0;
}
.note-editor button.btn.btn-large,
.note-editor input[type="submit"].btn.btn-large {
*padding-top: 7px;
*padding-bottom: 7px;
}
.note-editor button.btn.btn-small,
.note-editor input[type="submit"].btn.btn-small {
*padding-top: 3px;
*padding-bottom: 3px;
}
.note-editor button.btn.btn-mini,
.note-editor input[type="submit"].btn.btn-mini {
*padding-top: 1px;
*padding-bottom: 1px;
}
.note-editor .btn-link,
.note-editor .btn-link:active,
.note-editor .btn-link[disabled] {
background-color: transparent;
background-image: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
}
.note-editor .btn-link {
border-color: transparent;
cursor: pointer;
color: #0088cc;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .btn-link:hover,
.note-editor .btn-link:focus {
color: #005580;
text-decoration: underline;
background-color: transparent;
}
.note-editor .btn-link[disabled]:hover,
.note-editor .btn-link[disabled]:focus {
color: #333333;
text-decoration: none;
}
.note-editor .btn-group {
position: relative;
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
font-size: 0;
vertical-align: middle;
white-space: nowrap;
*margin-left: .3em;
}
.note-editor .btn-group:first-child {
*margin-left: 0;
}
.note-editor .btn-group + .btn-group {
margin-left: 5px;
}
.note-editor .btn-toolbar {
font-size: 0;
margin-top: 10px;
margin-bottom: 10px;
}
.note-editor .btn-toolbar > .btn + .btn,
.note-editor .btn-toolbar > .btn-group + .btn,
.note-editor .btn-toolbar > .btn + .btn-group {
margin-left: 5px;
}
.note-editor .btn-group > .btn {
position: relative;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .btn-group > .btn + .btn {
margin-left: -1px;
}
.note-editor .btn-group > .btn,
.note-editor .btn-group > .dropdown-menu,
.note-editor .btn-group > .popover {
font-size: 14px;
}
.note-editor .btn-group > .btn-mini {
font-size: 10.5px;
}
.note-editor .btn-group > .btn-small {
font-size: 11.9px;
}
.note-editor .btn-group > .btn-large {
font-size: 17.5px;
}
.note-editor .btn-group > .btn:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.note-editor .btn-group > .btn:last-child,
.note-editor .btn-group > .dropdown-toggle {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
border-bottom-right-radius: 4px;
}
.note-editor .btn-group > .btn.large:first-child {
margin-left: 0;
-webkit-border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
border-top-left-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
border-bottom-left-radius: 6px;
}
.note-editor .btn-group > .btn.large:last-child,
.note-editor .btn-group > .large.dropdown-toggle {
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-top-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
border-bottom-right-radius: 6px;
}
.note-editor .btn-group > .btn:hover,
.note-editor .btn-group > .btn:focus,
.note-editor .btn-group > .btn:active,
.note-editor .btn-group > .btn.active {
z-index: 2;
}
.note-editor .btn-group .dropdown-toggle:active,
.note-editor .btn-group.open .dropdown-toggle {
outline: 0;
}
.note-editor .btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
-webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
*padding-top: 5px;
*padding-bottom: 5px;
}
.note-editor .btn-group > .btn-mini + .dropdown-toggle {
padding-left: 5px;
padding-right: 5px;
*padding-top: 2px;
*padding-bottom: 2px;
}
.note-editor .btn-group > .btn-small + .dropdown-toggle {
*padding-top: 5px;
*padding-bottom: 4px;
}
.note-editor .btn-group > .btn-large + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
*padding-top: 7px;
*padding-bottom: 7px;
}
.note-editor .btn-group.open .dropdown-toggle {
background-image: none;
-webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
-moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
}
.note-editor .btn-group.open .btn.dropdown-toggle {
background-color: #e6e6e6;
}
.note-editor .btn-group.open .btn-primary.dropdown-toggle {
background-color: #0044cc;
}
.note-editor .btn-group.open .btn-warning.dropdown-toggle {
background-color: #f89406;
}
.note-editor .btn-group.open .btn-danger.dropdown-toggle {
background-color: #bd362f;
}
.note-editor .btn-group.open .btn-success.dropdown-toggle {
background-color: #51a351;
}
.note-editor .btn-group.open .btn-info.dropdown-toggle {
background-color: #2f96b4;
}
.note-editor .btn-group.open .btn-inverse.dropdown-toggle {
background-color: #222222;
}
.note-editor .btn .caret {
margin-top: 8px;
margin-left: 0;
}
.note-editor .btn-large .caret {
margin-top: 6px;
}
.note-editor .btn-large .caret {
border-left-width: 5px;
border-right-width: 5px;
border-top-width: 5px;
}
.note-editor .btn-mini .caret,
.note-editor .btn-small .caret {
margin-top: 8px;
}
.note-editor .dropup .btn-large .caret {
border-bottom-width: 5px;
}
.note-editor .btn-primary .caret,
.note-editor .btn-warning .caret,
.note-editor .btn-danger .caret,
.note-editor .btn-info .caret,
.note-editor .btn-success .caret,
.note-editor .btn-inverse .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
.note-editor .btn-group-vertical {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
}
.note-editor .btn-group-vertical > .btn {
display: block;
float: none;
max-width: 100%;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .btn-group-vertical > .btn + .btn {
margin-left: 0;
margin-top: -1px;
}
.note-editor .btn-group-vertical > .btn:first-child {
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.note-editor .btn-group-vertical > .btn:last-child {
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.note-editor .btn-group-vertical > .btn-large:first-child {
-webkit-border-radius: 6px 6px 0 0;
-moz-border-radius: 6px 6px 0 0;
border-radius: 6px 6px 0 0;
}
.note-editor .btn-group-vertical > .btn-large:last-child {
-webkit-border-radius: 0 0 6px 6px;
-moz-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px;
}
.note-editor .alert {
padding: 8px 35px 8px 14px;
margin-bottom: 20px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
background-color: #fcf8e3;
border: 1px solid #fbeed5;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.note-editor .alert,
.note-editor .alert h4 {
color: #c09853;
}
.note-editor .alert h4 {
margin: 0;
}
.note-editor .alert .close {
position: relative;
top: -2px;
right: -21px;
line-height: 20px;
}
.note-editor .alert-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #468847;
}
.note-editor .alert-success h4 {
color: #468847;
}
.note-editor .alert-danger,
.note-editor .alert-error {
background-color: #f2dede;
border-color: #eed3d7;
color: #b94a48;
}
.note-editor .alert-danger h4,
.note-editor .alert-error h4 {
color: #b94a48;
}
.note-editor .alert-info {
background-color: #d9edf7;
border-color: #bce8f1;
color: #3a87ad;
}
.note-editor .alert-info h4 {
color: #3a87ad;
}
.note-editor .alert-block {
padding-top: 14px;
padding-bottom: 14px;
}
.note-editor .alert-block > p,
.note-editor .alert-block > ul {
margin-bottom: 0;
}
.note-editor .alert-block p + p {
margin-top: 5px;
}
.note-editor .nav {
margin-left: 0;
margin-bottom: 20px;
list-style: none;
}
.note-editor .nav > li > a {
display: block;
}
.note-editor .nav > li > a:hover,
.note-editor .nav > li > a:focus {
text-decoration: none;
background-color: #eeeeee;
}
.note-editor .nav > li > a > img {
max-width: none;
}
.note-editor .nav > .pull-right {
float: right;
}
.note-editor .nav-header {
display: block;
padding: 3px 15px;
font-size: 11px;
font-weight: bold;
line-height: 20px;
color: #999999;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
text-transform: uppercase;
}
.note-editor .nav li + .nav-header {
margin-top: 9px;
}
.note-editor .nav-list {
padding-left: 15px;
padding-right: 15px;
margin-bottom: 0;
}
.note-editor .nav-list > li > a,
.note-editor .nav-list .nav-header {
margin-left: -15px;
margin-right: -15px;
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.note-editor .nav-list > li > a {
padding: 3px 15px;
}
.note-editor .nav-list > .active > a,
.note-editor .nav-list > .active > a:hover,
.note-editor .nav-list > .active > a:focus {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
background-color: #0088cc;
}
.note-editor .nav-list [class^="icon-"],
.note-editor .nav-list [class*=" icon-"] {
margin-right: 2px;
}
.note-editor .nav-list .divider {
*width: 100%;
height: 1px;
margin: 9px 1px;
*margin: -5px 0 5px;
overflow: hidden;
background-color: #e5e5e5;
border-bottom: 1px solid #ffffff;
}
.note-editor .nav-tabs,
.note-editor .nav-pills {
*zoom: 1;
}
.note-editor .nav-tabs:before,
.note-editor .nav-pills:before,
.note-editor .nav-tabs:after,
.note-editor .nav-pills:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .nav-tabs:after,
.note-editor .nav-pills:after {
clear: both;
}
.note-editor .nav-tabs > li,
.note-editor .nav-pills > li {
float: left;
}
.note-editor .nav-tabs > li > a,
.note-editor .nav-pills > li > a {
padding-right: 12px;
padding-left: 12px;
margin-right: 2px;
line-height: 14px;
}
.note-editor .nav-tabs {
border-bottom: 1px solid #ddd;
}
.note-editor .nav-tabs > li {
margin-bottom: -1px;
}
.note-editor .nav-tabs > li > a {
padding-top: 8px;
padding-bottom: 8px;
line-height: 20px;
border: 1px solid transparent;
-webkit-border-radius: 4px 4px 0 0;
-moz-border-radius: 4px 4px 0 0;
border-radius: 4px 4px 0 0;
}
.note-editor .nav-tabs > li > a:hover,
.note-editor .nav-tabs > li > a:focus {
border-color: #eeeeee #eeeeee #dddddd;
}
.note-editor .nav-tabs > .active > a,
.note-editor .nav-tabs > .active > a:hover,
.note-editor .nav-tabs > .active > a:focus {
color: #555555;
background-color: #ffffff;
border: 1px solid #ddd;
border-bottom-color: transparent;
cursor: default;
}
.note-editor .nav-pills > li > a {
padding-top: 8px;
padding-bottom: 8px;
margin-top: 2px;
margin-bottom: 2px;
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
}
.note-editor .nav-pills > .active > a,
.note-editor .nav-pills > .active > a:hover,
.note-editor .nav-pills > .active > a:focus {
color: #ffffff;
background-color: #0088cc;
}
.note-editor .nav-stacked > li {
float: none;
}
.note-editor .nav-stacked > li > a {
margin-right: 0;
}
.note-editor .nav-tabs.nav-stacked {
border-bottom: 0;
}
.note-editor .nav-tabs.nav-stacked > li > a {
border: 1px solid #ddd;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .nav-tabs.nav-stacked > li:first-child > a {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
}
.note-editor .nav-tabs.nav-stacked > li:last-child > a {
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
border-bottom-right-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.note-editor .nav-tabs.nav-stacked > li > a:hover,
.note-editor .nav-tabs.nav-stacked > li > a:focus {
border-color: #ddd;
z-index: 2;
}
.note-editor .nav-pills.nav-stacked > li > a {
margin-bottom: 3px;
}
.note-editor .nav-pills.nav-stacked > li:last-child > a {
margin-bottom: 1px;
}
.note-editor .nav-tabs .dropdown-menu {
-webkit-border-radius: 0 0 6px 6px;
-moz-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px;
}
.note-editor .nav-pills .dropdown-menu {
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.note-editor .nav .dropdown-toggle .caret {
border-top-color: #0088cc;
border-bottom-color: #0088cc;
margin-top: 6px;
}
.note-editor .nav .dropdown-toggle:hover .caret,
.note-editor .nav .dropdown-toggle:focus .caret {
border-top-color: #005580;
border-bottom-color: #005580;
}
.note-editor .nav-tabs .dropdown-toggle .caret {
margin-top: 8px;
}
.note-editor .nav .active .dropdown-toggle .caret {
border-top-color: #fff;
border-bottom-color: #fff;
}
.note-editor .nav-tabs .active .dropdown-toggle .caret {
border-top-color: #555555;
border-bottom-color: #555555;
}
.note-editor .nav > .dropdown.active > a:hover,
.note-editor .nav > .dropdown.active > a:focus {
cursor: pointer;
}
.note-editor .nav-tabs .open .dropdown-toggle,
.note-editor .nav-pills .open .dropdown-toggle,
.note-editor .nav > li.dropdown.open.active > a:hover,
.note-editor .nav > li.dropdown.open.active > a:focus {
color: #ffffff;
background-color: #999999;
border-color: #999999;
}
.note-editor .nav li.dropdown.open .caret,
.note-editor .nav li.dropdown.open.active .caret,
.note-editor .nav li.dropdown.open a:hover .caret,
.note-editor .nav li.dropdown.open a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
opacity: 1;
filter: alpha(opacity=100);
}
.note-editor .tabs-stacked .open > a:hover,
.note-editor .tabs-stacked .open > a:focus {
border-color: #999999;
}
.note-editor .tabbable {
*zoom: 1;
}
.note-editor .tabbable:before,
.note-editor .tabbable:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .tabbable:after {
clear: both;
}
.note-editor .tab-content {
overflow: auto;
}
.note-editor .tabs-below > .nav-tabs,
.note-editor .tabs-right > .nav-tabs,
.note-editor .tabs-left > .nav-tabs {
border-bottom: 0;
}
.note-editor .tab-content > .tab-pane,
.note-editor .pill-content > .pill-pane {
display: none;
}
.note-editor .tab-content > .active,
.note-editor .pill-content > .active {
display: block;
}
.note-editor .tabs-below > .nav-tabs {
border-top: 1px solid #ddd;
}
.note-editor .tabs-below > .nav-tabs > li {
margin-top: -1px;
margin-bottom: 0;
}
.note-editor .tabs-below > .nav-tabs > li > a {
-webkit-border-radius: 0 0 4px 4px;
-moz-border-radius: 0 0 4px 4px;
border-radius: 0 0 4px 4px;
}
.note-editor .tabs-below > .nav-tabs > li > a:hover,
.note-editor .tabs-below > .nav-tabs > li > a:focus {
border-bottom-color: transparent;
border-top-color: #ddd;
}
.note-editor .tabs-below > .nav-tabs > .active > a,
.note-editor .tabs-below > .nav-tabs > .active > a:hover,
.note-editor .tabs-below > .nav-tabs > .active > a:focus {
border-color: transparent #ddd #ddd #ddd;
}
.note-editor .tabs-left > .nav-tabs > li,
.note-editor .tabs-right > .nav-tabs > li {
float: none;
}
.note-editor .tabs-left > .nav-tabs > li > a,
.note-editor .tabs-right > .nav-tabs > li > a {
min-width: 74px;
margin-right: 0;
margin-bottom: 3px;
}
.note-editor .tabs-left > .nav-tabs {
float: left;
margin-right: 19px;
border-right: 1px solid #ddd;
}
.note-editor .tabs-left > .nav-tabs > li > a {
margin-right: -1px;
-webkit-border-radius: 4px 0 0 4px;
-moz-border-radius: 4px 0 0 4px;
border-radius: 4px 0 0 4px;
}
.note-editor .tabs-left > .nav-tabs > li > a:hover,
.note-editor .tabs-left > .nav-tabs > li > a:focus {
border-color: #eeeeee #dddddd #eeeeee #eeeeee;
}
.note-editor .tabs-left > .nav-tabs .active > a,
.note-editor .tabs-left > .nav-tabs .active > a:hover,
.note-editor .tabs-left > .nav-tabs .active > a:focus {
border-color: #ddd transparent #ddd #ddd;
*border-right-color: #ffffff;
}
.note-editor .tabs-right > .nav-tabs {
float: right;
margin-left: 19px;
border-left: 1px solid #ddd;
}
.note-editor .tabs-right > .nav-tabs > li > a {
margin-left: -1px;
-webkit-border-radius: 0 4px 4px 0;
-moz-border-radius: 0 4px 4px 0;
border-radius: 0 4px 4px 0;
}
.note-editor .tabs-right > .nav-tabs > li > a:hover,
.note-editor .tabs-right > .nav-tabs > li > a:focus {
border-color: #eeeeee #eeeeee #eeeeee #dddddd;
}
.note-editor .tabs-right > .nav-tabs .active > a,
.note-editor .tabs-right > .nav-tabs .active > a:hover,
.note-editor .tabs-right > .nav-tabs .active > a:focus {
border-color: #ddd #ddd #ddd transparent;
*border-left-color: #ffffff;
}
.note-editor .nav > .disabled > a {
color: #999999;
}
.note-editor .nav > .disabled > a:hover,
.note-editor .nav > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
cursor: default;
}
.note-editor .navbar {
overflow: visible;
margin-bottom: 20px;
*position: relative;
*z-index: 2;
}
.note-editor .navbar-inner {
min-height: 40px;
padding-left: 20px;
padding-right: 20px;
background-color: #fafafa;
background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));
background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2);
background-image: -o-linear-gradient(top, #ffffff, #f2f2f2);
background-image: linear-gradient(to bottom, #ffffff, #f2f2f2);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);
border: 1px solid #d4d4d4;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065);
*zoom: 1;
}
.note-editor .navbar-inner:before,
.note-editor .navbar-inner:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .navbar-inner:after {
clear: both;
}
.note-editor .navbar .container {
width: auto;
}
.note-editor .nav-collapse.collapse {
height: auto;
overflow: visible;
}
.note-editor .navbar .brand {
float: left;
display: block;
padding: 10px 20px 10px;
margin-left: -20px;
font-size: 20px;
font-weight: 200;
color: #777777;
text-shadow: 0 1px 0 #ffffff;
}
.note-editor .navbar .brand:hover,
.note-editor .navbar .brand:focus {
text-decoration: none;
}
.note-editor .navbar-text {
margin-bottom: 0;
line-height: 40px;
color: #777777;
}
.note-editor .navbar-link {
color: #777777;
}
.note-editor .navbar-link:hover,
.note-editor .navbar-link:focus {
color: #333333;
}
.note-editor .navbar .divider-vertical {
height: 40px;
margin: 0 9px;
border-left: 1px solid #f2f2f2;
border-right: 1px solid #ffffff;
}
.note-editor .navbar .btn,
.note-editor .navbar .btn-group {
margin-top: 5px;
}
.note-editor .navbar .btn-group .btn,
.note-editor .navbar .input-prepend .btn,
.note-editor .navbar .input-append .btn,
.note-editor .navbar .input-prepend .btn-group,
.note-editor .navbar .input-append .btn-group {
margin-top: 0;
}
.note-editor .navbar-form {
margin-bottom: 0;
*zoom: 1;
}
.note-editor .navbar-form:before,
.note-editor .navbar-form:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .navbar-form:after {
clear: both;
}
.note-editor .navbar-form input,
.note-editor .navbar-form select,
.note-editor .navbar-form .radio,
.note-editor .navbar-form .checkbox {
margin-top: 5px;
}
.note-editor .navbar-form input,
.note-editor .navbar-form select,
.note-editor .navbar-form .btn {
display: inline-block;
margin-bottom: 0;
}
.note-editor .navbar-form input[type="image"],
.note-editor .navbar-form input[type="checkbox"],
.note-editor .navbar-form input[type="radio"] {
margin-top: 3px;
}
.note-editor .navbar-form .input-append,
.note-editor .navbar-form .input-prepend {
margin-top: 5px;
white-space: nowrap;
}
.note-editor .navbar-form .input-append input,
.note-editor .navbar-form .input-prepend input {
margin-top: 0;
}
.note-editor .navbar-search {
position: relative;
float: left;
margin-top: 5px;
margin-bottom: 0;
}
.note-editor .navbar-search .search-query {
margin-bottom: 0;
padding: 4px 14px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 13px;
font-weight: normal;
line-height: 1;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.note-editor .navbar-static-top {
position: static;
margin-bottom: 0;
}
.note-editor .navbar-static-top .navbar-inner {
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .navbar-fixed-top,
.note-editor .navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: 1030;
margin-bottom: 0;
}
.note-editor .navbar-fixed-top .navbar-inner,
.note-editor .navbar-static-top .navbar-inner {
border-width: 0 0 1px;
}
.note-editor .navbar-fixed-bottom .navbar-inner {
border-width: 1px 0 0;
}
.note-editor .navbar-fixed-top .navbar-inner,
.note-editor .navbar-fixed-bottom .navbar-inner {
padding-left: 0;
padding-right: 0;
-webkit-border-radius: 0;
-moz-border-radius: 0;
border-radius: 0;
}
.note-editor .navbar-static-top .container,
.note-editor .navbar-fixed-top .container,
.note-editor .navbar-fixed-bottom .container {
width: 940px;
}
.note-editor .navbar-fixed-top {
top: 0;
}
.note-editor .navbar-fixed-top .navbar-inner,
.note-editor .navbar-static-top .navbar-inner {
-webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1);
-moz-box-shadow: 0 1px 10px rgba(0,0,0,.1);
box-shadow: 0 1px 10px rgba(0,0,0,.1);
}
.note-editor .navbar-fixed-bottom {
bottom: 0;
}
.note-editor .navbar-fixed-bottom .navbar-inner {
-webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
-moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1);
box-shadow: 0 -1px 10px rgba(0,0,0,.1);
}
.note-editor .navbar .nav {
position: relative;
left: 0;
display: block;
float: left;
margin: 0 10px 0 0;
}
.note-editor .navbar .nav.pull-right {
float: right;
margin-right: 0;
}
.note-editor .navbar .nav > li {
float: left;
}
.note-editor .navbar .nav > li > a {
float: none;
padding: 10px 15px 10px;
color: #777777;
text-decoration: none;
text-shadow: 0 1px 0 #ffffff;
}
.note-editor .navbar .nav .dropdown-toggle .caret {
margin-top: 8px;
}
.note-editor .navbar .nav > li > a:focus,
.note-editor .navbar .nav > li > a:hover {
background-color: transparent;
color: #333333;
text-decoration: none;
}
.note-editor .navbar .nav > .active > a,
.note-editor .navbar .nav > .active > a:hover,
.note-editor .navbar .nav > .active > a:focus {
color: #555555;
text-decoration: none;
background-color: #e5e5e5;
-webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
-moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125);
}
.note-editor .navbar .btn-navbar {
display: none;
float: right;
padding: 7px 10px;
margin-left: 5px;
margin-right: 5px;
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #ededed;
background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));
background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5);
background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5);
background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);
border-color: #e5e5e5 #e5e5e5 #bfbfbf;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #e5e5e5;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
-moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);
}
.note-editor .navbar .btn-navbar:hover,
.note-editor .navbar .btn-navbar:focus,
.note-editor .navbar .btn-navbar:active,
.note-editor .navbar .btn-navbar.active,
.note-editor .navbar .btn-navbar.disabled,
.note-editor .navbar .btn-navbar[disabled] {
color: #ffffff;
background-color: #e5e5e5;
*background-color: #d9d9d9;
}
.note-editor .navbar .btn-navbar:active,
.note-editor .navbar .btn-navbar.active {
background-color: #cccccc \9;
}
.note-editor .navbar .btn-navbar .icon-bar {
display: block;
width: 18px;
height: 2px;
background-color: #f5f5f5;
-webkit-border-radius: 1px;
-moz-border-radius: 1px;
border-radius: 1px;
-webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
-moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.note-editor .btn-navbar .icon-bar + .icon-bar {
margin-top: 3px;
}
.note-editor .navbar .nav > li > .dropdown-menu:before {
content: '';
display: inline-block;
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid #ccc;
border-bottom-color: rgba(0, 0, 0, 0.2);
position: absolute;
top: -7px;
left: 9px;
}
.note-editor .navbar .nav > li > .dropdown-menu:after {
content: '';
display: inline-block;
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #ffffff;
position: absolute;
top: -6px;
left: 10px;
}
.note-editor .navbar-fixed-bottom .nav > li > .dropdown-menu:before {
border-top: 7px solid #ccc;
border-top-color: rgba(0, 0, 0, 0.2);
border-bottom: 0;
bottom: -7px;
top: auto;
}
.note-editor .navbar-fixed-bottom .nav > li > .dropdown-menu:after {
border-top: 6px solid #ffffff;
border-bottom: 0;
bottom: -6px;
top: auto;
}
.note-editor .navbar .nav li.dropdown > a:hover .caret,
.note-editor .navbar .nav li.dropdown > a:focus .caret {
border-top-color: #333333;
border-bottom-color: #333333;
}
.note-editor .navbar .nav li.dropdown.open > .dropdown-toggle,
.note-editor .navbar .nav li.dropdown.active > .dropdown-toggle,
.note-editor .navbar .nav li.dropdown.open.active > .dropdown-toggle {
background-color: #e5e5e5;
color: #555555;
}
.note-editor .navbar .nav li.dropdown > .dropdown-toggle .caret {
border-top-color: #777777;
border-bottom-color: #777777;
}
.note-editor .navbar .nav li.dropdown.open > .dropdown-toggle .caret,
.note-editor .navbar .nav li.dropdown.active > .dropdown-toggle .caret,
.note-editor .navbar .nav li.dropdown.open.active > .dropdown-toggle .caret {
border-top-color: #555555;
border-bottom-color: #555555;
}
.note-editor .navbar .pull-right > li > .dropdown-menu,
.note-editor .navbar .nav > li > .dropdown-menu.pull-right {
left: auto;
right: 0;
}
.note-editor .navbar .pull-right > li > .dropdown-menu:before,
.note-editor .navbar .nav > li > .dropdown-menu.pull-right:before {
left: auto;
right: 12px;
}
.note-editor .navbar .pull-right > li > .dropdown-menu:after,
.note-editor .navbar .nav > li > .dropdown-menu.pull-right:after {
left: auto;
right: 13px;
}
.note-editor .navbar .pull-right > li > .dropdown-menu .dropdown-menu,
.note-editor .navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu {
left: auto;
right: 100%;
margin-left: 0;
margin-right: -1px;
-webkit-border-radius: 6px 0 6px 6px;
-moz-border-radius: 6px 0 6px 6px;
border-radius: 6px 0 6px 6px;
}
.note-editor .navbar-inverse .navbar-inner {
background-color: #1b1b1b;
background-image: -moz-linear-gradient(top, #222222, #111111);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));
background-image: -webkit-linear-gradient(top, #222222, #111111);
background-image: -o-linear-gradient(top, #222222, #111111);
background-image: linear-gradient(to bottom, #222222, #111111);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);
border-color: #252525;
}
.note-editor .navbar-inverse .brand,
.note-editor .navbar-inverse .nav > li > a {
color: #999999;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.note-editor .navbar-inverse .brand:hover,
.note-editor .navbar-inverse .nav > li > a:hover,
.note-editor .navbar-inverse .brand:focus,
.note-editor .navbar-inverse .nav > li > a:focus {
color: #ffffff;
}
.note-editor .navbar-inverse .brand {
color: #999999;
}
.note-editor .navbar-inverse .navbar-text {
color: #999999;
}
.note-editor .navbar-inverse .nav > li > a:focus,
.note-editor .navbar-inverse .nav > li > a:hover {
background-color: transparent;
color: #ffffff;
}
.note-editor .navbar-inverse .nav .active > a,
.note-editor .navbar-inverse .nav .active > a:hover,
.note-editor .navbar-inverse .nav .active > a:focus {
color: #ffffff;
background-color: #111111;
}
.note-editor .navbar-inverse .navbar-link {
color: #999999;
}
.note-editor .navbar-inverse .navbar-link:hover,
.note-editor .navbar-inverse .navbar-link:focus {
color: #ffffff;
}
.note-editor .navbar-inverse .divider-vertical {
border-left-color: #111111;
border-right-color: #222222;
}
.note-editor .navbar-inverse .nav li.dropdown.open > .dropdown-toggle,
.note-editor .navbar-inverse .nav li.dropdown.active > .dropdown-toggle,
.note-editor .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle {
background-color: #111111;
color: #ffffff;
}
.note-editor .navbar-inverse .nav li.dropdown > a:hover .caret,
.note-editor .navbar-inverse .nav li.dropdown > a:focus .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
.note-editor .navbar-inverse .nav li.dropdown > .dropdown-toggle .caret {
border-top-color: #999999;
border-bottom-color: #999999;
}
.note-editor .navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret,
.note-editor .navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret,
.note-editor .navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret {
border-top-color: #ffffff;
border-bottom-color: #ffffff;
}
.note-editor .navbar-inverse .navbar-search .search-query {
color: #ffffff;
background-color: #515151;
border-color: #111111;
-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
-moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
.note-editor .navbar-inverse .navbar-search .search-query:-moz-placeholder {
color: #cccccc;
}
.note-editor .navbar-inverse .navbar-search .search-query:-ms-input-placeholder {
color: #cccccc;
}
.note-editor .navbar-inverse .navbar-search .search-query::-webkit-input-placeholder {
color: #cccccc;
}
.note-editor .navbar-inverse .navbar-search .search-query:focus,
.note-editor .navbar-inverse .navbar-search .search-query.focused {
padding: 5px 15px;
color: #333333;
text-shadow: 0 1px 0 #ffffff;
background-color: #ffffff;
border: 0;
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
outline: 0;
}
.note-editor .navbar-inverse .btn-navbar {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #0e0e0e;
background-image: -moz-linear-gradient(top, #151515, #040404);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));
background-image: -webkit-linear-gradient(top, #151515, #040404);
background-image: -o-linear-gradient(top, #151515, #040404);
background-image: linear-gradient(to bottom, #151515, #040404);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);
border-color: #040404 #040404 #000000;
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
*background-color: #040404;
/* Darken IE7 buttons by default so they stand out more given they won't have borders */
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
}
.note-editor .navbar-inverse .btn-navbar:hover,
.note-editor .navbar-inverse .btn-navbar:focus,
.note-editor .navbar-inverse .btn-navbar:active,
.note-editor .navbar-inverse .btn-navbar.active,
.note-editor .navbar-inverse .btn-navbar.disabled,
.note-editor .navbar-inverse .btn-navbar[disabled] {
color: #ffffff;
background-color: #040404;
*background-color: #000000;
}
.note-editor .navbar-inverse .btn-navbar:active,
.note-editor .navbar-inverse .btn-navbar.active {
background-color: #000000 \9;
}
.note-editor .breadcrumb {
padding: 8px 15px;
margin: 0 0 20px;
list-style: none;
background-color: #f5f5f5;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.note-editor .breadcrumb > li {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
text-shadow: 0 1px 0 #ffffff;
}
.note-editor .breadcrumb > li > .divider {
padding: 0 5px;
color: #ccc;
}
.note-editor .breadcrumb > .active {
color: #999999;
}
.note-editor .pagination {
margin: 20px 0;
}
.note-editor .pagination ul {
display: inline-block;
*display: inline;
/* IE7 inline-block hack */
*zoom: 1;
margin-left: 0;
margin-bottom: 0;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
-moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}
.note-editor .pagination ul > li {
display: inline;
}
.note-editor .pagination ul > li > a,
.note-editor .pagination ul > li > span {
float: left;
padding: 4px 12px;
line-height: 20px;
text-decoration: none;
background-color: #ffffff;
border: 1px solid #dddddd;
border-left-width: 0;
}
.note-editor .pagination ul > li > a:hover,
.note-editor .pagination ul > li > a:focus,
.note-editor .pagination ul > .active > a,
.note-editor .pagination ul > .active > span {
background-color: #f5f5f5;
}
.note-editor .pagination ul > .active > a,
.note-editor .pagination ul > .active > span {
color: #999999;
cursor: default;
}
.note-editor .pagination ul > .disabled > span,
.note-editor .pagination ul > .disabled > a,
.note-editor .pagination ul > .disabled > a:hover,
.note-editor .pagination ul > .disabled > a:focus {
color: #999999;
background-color: transparent;
cursor: default;
}
.note-editor .pagination ul > li:first-child > a,
.note-editor .pagination ul > li:first-child > span {
border-left-width: 1px;
-webkit-border-top-left-radius: 4px;
-moz-border-radius-topleft: 4px;
border-top-left-radius: 4px;
-webkit-border-bottom-left-radius: 4px;
-moz-border-radius-bottomleft: 4px;
border-bottom-left-radius: 4px;
}
.note-editor .pagination ul > li:last-child > a,
.note-editor .pagination ul > li:last-child > span {
-webkit-border-top-right-radius: 4px;
-moz-border-radius-topright: 4px;
border-top-right-radius: 4px;
-webkit-border-bottom-right-radius: 4px;
-moz-border-radius-bottomright: 4px;
border-bottom-right-radius: 4px;
}
.note-editor .pagination-centered {
text-align: center;
}
.note-editor .pagination-right {
text-align: right;
}
.note-editor .pagination-large ul > li > a,
.note-editor .pagination-large ul > li > span {
padding: 11px 19px;
font-size: 17.5px;
}
.note-editor .pagination-large ul > li:first-child > a,
.note-editor .pagination-large ul > li:first-child > span {
-webkit-border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
border-top-left-radius: 6px;
-webkit-border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
border-bottom-left-radius: 6px;
}
.note-editor .pagination-large ul > li:last-child > a,
.note-editor .pagination-large ul > li:last-child > span {
-webkit-border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
border-top-right-radius: 6px;
-webkit-border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
border-bottom-right-radius: 6px;
}
.note-editor .pagination-mini ul > li:first-child > a,
.note-editor .pagination-small ul > li:first-child > a,
.note-editor .pagination-mini ul > li:first-child > span,
.note-editor .pagination-small ul > li:first-child > span {
-webkit-border-top-left-radius: 3px;
-moz-border-radius-topleft: 3px;
border-top-left-radius: 3px;
-webkit-border-bottom-left-radius: 3px;
-moz-border-radius-bottomleft: 3px;
border-bottom-left-radius: 3px;
}
.note-editor .pagination-mini ul > li:last-child > a,
.note-editor .pagination-small ul > li:last-child > a,
.note-editor .pagination-mini ul > li:last-child > span,
.note-editor .pagination-small ul > li:last-child > span {
-webkit-border-top-right-radius: 3px;
-moz-border-radius-topright: 3px;
border-top-right-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
-moz-border-radius-bottomright: 3px;
border-bottom-right-radius: 3px;
}
.note-editor .pagination-small ul > li > a,
.note-editor .pagination-small ul > li > span {
padding: 2px 10px;
font-size: 11.9px;
}
.note-editor .pagination-mini ul > li > a,
.note-editor .pagination-mini ul > li > span {
padding: 0 6px;
font-size: 10.5px;
}
.note-editor .pager {
margin: 20px 0;
list-style: none;
text-align: center;
*zoom: 1;
}
.note-editor .pager:before,
.note-editor .pager:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .pager:after {
clear: both;
}
.note-editor .pager li {
display: inline;
}
.note-editor .pager li > a,
.note-editor .pager li > span {
display: inline-block;
padding: 5px 14px;
background-color: #fff;
border: 1px solid #ddd;
-webkit-border-radius: 15px;
-moz-border-radius: 15px;
border-radius: 15px;
}
.note-editor .pager li > a:hover,
.note-editor .pager li > a:focus {
text-decoration: none;
background-color: #f5f5f5;
}
.note-editor .pager .next > a,
.note-editor .pager .next > span {
float: right;
}
.note-editor .pager .previous > a,
.note-editor .pager .previous > span {
float: left;
}
.note-editor .pager .disabled > a,
.note-editor .pager .disabled > a:hover,
.note-editor .pager .disabled > a:focus,
.note-editor .pager .disabled > span {
color: #999999;
background-color: #fff;
cursor: default;
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000000;
}
.modal-backdrop.fade {
opacity: 0;
}
.modal-backdrop,
.modal-backdrop.fade.in {
opacity: 0.8;
filter: alpha(opacity=80);
}
.note-editor .modal {
position: fixed;
top: 10%;
left: 50%;
z-index: 1050;
width: 560px;
margin-left: -280px;
background-color: #ffffff;
border: 1px solid #999;
border: 1px solid rgba(0, 0, 0, 0.3);
*border: 1px solid #999;
/* IE6-7 */
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
-moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
-webkit-background-clip: padding-box;
-moz-background-clip: padding-box;
background-clip: padding-box;
outline: none;
}
.note-editor .modal.fade {
-webkit-transition: opacity .3s linear, top .3s ease-out;
-moz-transition: opacity .3s linear, top .3s ease-out;
-o-transition: opacity .3s linear, top .3s ease-out;
transition: opacity .3s linear, top .3s ease-out;
top: -25%;
}
.note-editor .modal.fade.in {
top: 10%;
}
.note-editor .modal-header {
padding: 9px 15px;
border-bottom: 1px solid #eee;
}
.note-editor .modal-header .close {
margin-top: 2px;
}
.note-editor .modal-header h3 {
margin: 0;
line-height: 30px;
}
.note-editor .modal-body {
position: relative;
overflow-y: auto;
max-height: 400px;
padding: 15px;
}
.note-editor .modal-form {
margin-bottom: 0;
}
.note-editor .modal-footer {
padding: 14px 15px 15px;
margin-bottom: 0;
text-align: right;
background-color: #f5f5f5;
border-top: 1px solid #ddd;
-webkit-border-radius: 0 0 6px 6px;
-moz-border-radius: 0 0 6px 6px;
border-radius: 0 0 6px 6px;
-webkit-box-shadow: inset 0 1px 0 #ffffff;
-moz-box-shadow: inset 0 1px 0 #ffffff;
box-shadow: inset 0 1px 0 #ffffff;
*zoom: 1;
}
.note-editor .modal-footer:before,
.note-editor .modal-footer:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .modal-footer:after {
clear: both;
}
.note-editor .modal-footer .btn + .btn {
margin-left: 5px;
margin-bottom: 0;
}
.note-editor .modal-footer .btn-group .btn + .btn {
margin-left: -1px;
}
.note-editor .modal-footer .btn-block + .btn-block {
margin-left: 0;
}
.tooltip {
position: absolute;
z-index: 1030;
display: block;
visibility: visible;
font-size: 11px;
line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
}
.tooltip.in {
opacity: 0.8;
filter: alpha(opacity=80);
}
.tooltip.top {
margin-top: -3px;
padding: 5px 0;
}
.tooltip.right {
margin-left: 3px;
padding: 0 5px;
}
.tooltip.bottom {
margin-top: 3px;
padding: 5px 0;
}
.tooltip.left {
margin-left: -3px;
padding: 0 5px;
}
.tooltip-inner {
max-width: 200px;
padding: 8px;
color: #ffffff;
text-align: center;
text-decoration: none;
background-color: #000000;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}
.note-editor .popover {
position: absolute;
top: 0;
left: 0;
z-index: 1010;
display: none;
max-width: 276px;
padding: 1px;
text-align: left;
background-color: #ffffff;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, 0.2);
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
-moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
white-space: normal;
}
.note-editor .popover.top {
margin-top: -10px;
}
.note-editor .popover.right {
margin-left: 10px;
}
.note-editor .popover.bottom {
margin-top: 10px;
}
.note-editor .popover.left {
margin-left: -10px;
}
.note-editor .popover-title {
margin: 0;
padding: 8px 14px;
font-size: 14px;
font-weight: normal;
line-height: 18px;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
-webkit-border-radius: 5px 5px 0 0;
-moz-border-radius: 5px 5px 0 0;
border-radius: 5px 5px 0 0;
}
.note-editor .popover-title:empty {
display: none;
}
.note-editor .popover-content {
padding: 9px 14px;
}
.note-editor .popover .arrow,
.note-editor .popover .arrow:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.note-editor .popover .arrow {
border-width: 11px;
}
.note-editor .popover .arrow:after {
border-width: 10px;
content: "";
}
.note-editor .popover.top .arrow {
left: 50%;
margin-left: -11px;
border-bottom-width: 0;
border-top-color: #999;
border-top-color: rgba(0, 0, 0, 0.25);
bottom: -11px;
}
.note-editor .popover.top .arrow:after {
bottom: 1px;
margin-left: -10px;
border-bottom-width: 0;
border-top-color: #ffffff;
}
.note-editor .popover.right .arrow {
top: 50%;
left: -11px;
margin-top: -11px;
border-left-width: 0;
border-right-color: #999;
border-right-color: rgba(0, 0, 0, 0.25);
}
.note-editor .popover.right .arrow:after {
left: 1px;
bottom: -10px;
border-left-width: 0;
border-right-color: #ffffff;
}
.note-editor .popover.bottom .arrow {
left: 50%;
margin-left: -11px;
border-top-width: 0;
border-bottom-color: #999;
border-bottom-color: rgba(0, 0, 0, 0.25);
top: -11px;
}
.note-editor .popover.bottom .arrow:after {
top: 1px;
margin-left: -10px;
border-top-width: 0;
border-bottom-color: #ffffff;
}
.note-editor .popover.left .arrow {
top: 50%;
right: -11px;
margin-top: -11px;
border-right-width: 0;
border-left-color: #999;
border-left-color: rgba(0, 0, 0, 0.25);
}
.note-editor .popover.left .arrow:after {
right: 1px;
border-right-width: 0;
border-left-color: #ffffff;
bottom: -10px;
}
.note-editor .thumbnails {
margin-left: -20px;
list-style: none;
*zoom: 1;
}
.note-editor .thumbnails:before,
.note-editor .thumbnails:after {
display: table;
content: "";
line-height: 0;
}
.note-editor .thumbnails:after {
clear: both;
}
.note-editor .row-fluid .thumbnails {
margin-left: 0;
}
.note-editor .thumbnails > li {
float: left;
margin-bottom: 20px;
margin-left: 20px;
}
.note-editor .thumbnail {
display: block;
padding: 4px;
line-height: 20px;
border: 1px solid #ddd;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055);
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.note-editor a.thumbnail:hover,
.note-editor a.thumbnail:focus {
border-color: #0088cc;
-webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
-moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25);
}
.note-editor .thumbnail > img {
display: block;
max-width: 100%;
margin-left: auto;
margin-right: auto;
}
.note-editor .thumbnail .caption {
padding: 9px;
color: #555555;
}
.note-editor .media,
.note-editor .media-body {
overflow: hidden;
*overflow: visible;
zoom: 1;
}
.note-editor .media,
.note-editor .media .media {
margin-top: 15px;
}
.note-editor .media:first-child {
margin-top: 0;
}
.note-editor .media-object {
display: block;
}
.note-editor .media-heading {
margin: 0 0 5px;
}
.note-editor .media > .pull-left {
margin-right: 10px;
}
.note-editor .media > .pull-right {
margin-left: 10px;
}
.note-editor .media-list {
margin-left: 0;
list-style: none;
}
.note-editor .label,
.note-editor .badge {
display: inline-block;
padding: 2px 4px;
font-size: 11.844px;
font-weight: bold;
line-height: 14px;
color: #ffffff;
vertical-align: baseline;
white-space: nowrap;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #999999;
}
.note-editor .label {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.note-editor .badge {
padding-left: 9px;
padding-right: 9px;
-webkit-border-radius: 9px;
-moz-border-radius: 9px;
border-radius: 9px;
}
.note-editor .label:empty,
.note-editor .badge:empty {
display: none;
}
.note-editor a.label:hover,
.note-editor a.label:focus,
.note-editor a.badge:hover,
.note-editor a.badge:focus {
color: #ffffff;
text-decoration: none;
cursor: pointer;
}
.note-editor .label-important,
.note-editor .badge-important {
background-color: #b94a48;
}
.note-editor .label-important[href],
.note-editor .badge-important[href] {
background-color: #953b39;
}
.note-editor .label-warning,
.note-editor .badge-warning {
background-color: #f89406;
}
.note-editor .label-warning[href],
.note-editor .badge-warning[href] {
background-color: #c67605;
}
.note-editor .label-success,
.note-editor .badge-success {
background-color: #468847;
}
.note-editor .label-success[href],
.note-editor .badge-success[href] {
background-color: #356635;
}
.note-editor .label-info,
.note-editor .badge-info {
background-color: #3a87ad;
}
.note-editor .label-info[href],
.note-editor .badge-info[href] {
background-color: #2d6987;
}
.note-editor .label-inverse,
.note-editor .badge-inverse {
background-color: #333333;
}
.note-editor .label-inverse[href],
.note-editor .badge-inverse[href] {
background-color: #1a1a1a;
}
.note-editor .btn .label,
.note-editor .btn .badge {
position: relative;
top: -1px;
}
.note-editor .btn-mini .label,
.note-editor .btn-mini .badge {
top: 0;
}
@-webkit-keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@-moz-keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@-ms-keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@-o-keyframes progress-bar-stripes {
from {
background-position: 0 0;
}
to {
background-position: 40px 0;
}
}
@keyframes progress-bar-stripes {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
.note-editor .progress {
overflow: hidden;
height: 20px;
margin-bottom: 20px;
background-color: #f7f7f7;
background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));
background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9);
background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9);
background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.note-editor .progress .bar {
width: 0%;
height: 100%;
color: #ffffff;
float: left;
font-size: 12px;
text-align: center;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
background-color: #0e90d2;
background-image: -moz-linear-gradient(top, #149bdf, #0480be);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));
background-image: -webkit-linear-gradient(top, #149bdf, #0480be);
background-image: -o-linear-gradient(top, #149bdf, #0480be);
background-image: linear-gradient(to bottom, #149bdf, #0480be);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
-webkit-transition: width 0.6s ease;
-moz-transition: width 0.6s ease;
-o-transition: width 0.6s ease;
transition: width 0.6s ease;
}
.note-editor .progress .bar + .bar {
-webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
-moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);
}
.note-editor .progress-striped .bar {
background-color: #149bdf;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
-webkit-background-size: 40px 40px;
-moz-background-size: 40px 40px;
-o-background-size: 40px 40px;
background-size: 40px 40px;
}
.note-editor .progress.active .bar {
-webkit-animation: progress-bar-stripes 2s linear infinite;
-moz-animation: progress-bar-stripes 2s linear infinite;
-ms-animation: progress-bar-stripes 2s linear infinite;
-o-animation: progress-bar-stripes 2s linear infinite;
animation: progress-bar-stripes 2s linear infinite;
}
.note-editor .progress-danger .bar,
.note-editor .progress .bar-danger {
background-color: #dd514c;
background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));
background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
background-image: linear-gradient(to bottom, #ee5f5b, #c43c35);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);
}
.note-editor .progress-danger.progress-striped .bar,
.note-editor .progress-striped .bar-danger {
background-color: #ee5f5b;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.note-editor .progress-success .bar,
.note-editor .progress .bar-success {
background-color: #5eb95e;
background-image: -moz-linear-gradient(top, #62c462, #57a957);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));
background-image: -webkit-linear-gradient(top, #62c462, #57a957);
background-image: -o-linear-gradient(top, #62c462, #57a957);
background-image: linear-gradient(to bottom, #62c462, #57a957);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);
}
.note-editor .progress-success.progress-striped .bar,
.note-editor .progress-striped .bar-success {
background-color: #62c462;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.note-editor .progress-info .bar,
.note-editor .progress .bar-info {
background-color: #4bb1cf;
background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));
background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
background-image: linear-gradient(to bottom, #5bc0de, #339bb9);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);
}
.note-editor .progress-info.progress-striped .bar,
.note-editor .progress-striped .bar-info {
background-color: #5bc0de;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.note-editor .progress-warning .bar,
.note-editor .progress .bar-warning {
background-color: #faa732;
background-image: -moz-linear-gradient(top, #fbb450, #f89406);
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
background-image: -o-linear-gradient(top, #fbb450, #f89406);
background-image: linear-gradient(to bottom, #fbb450, #f89406);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);
}
.note-editor .progress-warning.progress-striped .bar,
.note-editor .progress-striped .bar-warning {
background-color: #fbb450;
background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));
background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.note-editor .accordion {
margin-bottom: 20px;
}
.note-editor .accordion-group {
margin-bottom: 2px;
border: 1px solid #e5e5e5;
-webkit-border-radius: 4px;
-moz-border-radius: 4px;
border-radius: 4px;
}
.note-editor .accordion-heading {
border-bottom: 0;
}
.note-editor .accordion-heading .accordion-toggle {
display: block;
padding: 8px 15px;
}
.note-editor .accordion-toggle {
cursor: pointer;
}
.note-editor .accordion-inner {
padding: 9px 15px;
border-top: 1px solid #e5e5e5;
}
.note-editor .carousel {
position: relative;
margin-bottom: 20px;
line-height: 1;
}
.note-editor .carousel-inner {
overflow: hidden;
width: 100%;
position: relative;
}
.note-editor .carousel-inner > .item {
display: none;
position: relative;
-webkit-transition: 0.6s ease-in-out left;
-moz-transition: 0.6s ease-in-out left;
-o-transition: 0.6s ease-in-out left;
transition: 0.6s ease-in-out left;
}
.note-editor .carousel-inner > .item > img,
.note-editor .carousel-inner > .item > a > img {
display: block;
line-height: 1;
}
.note-editor .carousel-inner > .active,
.note-editor .carousel-inner > .next,
.note-editor .carousel-inner > .prev {
display: block;
}
.note-editor .carousel-inner > .active {
left: 0;
}
.note-editor .carousel-inner > .next,
.note-editor .carousel-inner > .prev {
position: absolute;
top: 0;
width: 100%;
}
.note-editor .carousel-inner > .next {
left: 100%;
}
.note-editor .carousel-inner > .prev {
left: -100%;
}
.note-editor .carousel-inner > .next.left,
.note-editor .carousel-inner > .prev.right {
left: 0;
}
.note-editor .carousel-inner > .active.left {
left: -100%;
}
.note-editor .carousel-inner > .active.right {
left: 100%;
}
.note-editor .carousel-control {
position: absolute;
top: 40%;
left: 15px;
width: 40px;
height: 40px;
margin-top: -20px;
font-size: 60px;
font-weight: 100;
line-height: 30px;
color: #ffffff;
text-align: center;
background: #222222;
border: 3px solid #ffffff;
-webkit-border-radius: 23px;
-moz-border-radius: 23px;
border-radius: 23px;
opacity: 0.5;
filter: alpha(opacity=50);
}
.note-editor .carousel-control.right {
left: auto;
right: 15px;
}
.note-editor .carousel-control:hover,
.note-editor .carousel-control:focus {
color: #ffffff;
text-decoration: none;
opacity: 0.9;
filter: alpha(opacity=90);
}
.note-editor .carousel-indicators {
position: absolute;
top: 15px;
right: 15px;
z-index: 5;
margin: 0;
list-style: none;
}
.note-editor .carousel-indicators li {
display: block;
float: left;
width: 10px;
height: 10px;
margin-left: 5px;
text-indent: -999px;
background-color: #ccc;
background-color: rgba(255, 255, 255, 0.25);
border-radius: 5px;
}
.note-editor .carousel-indicators .active {
background-color: #fff;
}
.note-editor .carousel-caption {
position: absolute;
left: 0;
right: 0;
bottom: 0;
padding: 15px;
background: #333333;
background: rgba(0, 0, 0, 0.75);
}
.note-editor .carousel-caption h4,
.note-editor .carousel-caption p {
color: #ffffff;
line-height: 20px;
}
.note-editor .carousel-caption h4 {
margin: 0 0 5px;
}
.note-editor .carousel-caption p {
margin-bottom: 0;
}
.note-editor .hero-unit {
padding: 60px;
margin-bottom: 30px;
font-size: 18px;
font-weight: 200;
line-height: 30px;
color: inherit;
background-color: #eeeeee;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}
.note-editor .hero-unit h1 {
margin-bottom: 0;
font-size: 60px;
line-height: 1;
color: inherit;
letter-spacing: -1px;
}
.note-editor .hero-unit li {
line-height: 30px;
}
.note-editor .pull-right {
float: right;
}
.note-editor .pull-left {
float: left;
}
.note-editor .hide {
display: none;
}
.note-editor .show {
display: block;
}
.note-editor .invisible {
visibility: hidden;
}
.note-editor .affix {
position: fixed;
}
| {'content_hash': '7e6cce481c4a1665e92e1b4fddb53de4', 'timestamp': '', 'source': 'github', 'line_count': 5260, 'max_line_length': 304, 'avg_line_length': 27.881368821292774, 'alnum_prop': 0.6892864935631682, 'repo_name': 'k-int/ClaimShibIdenentity', 'id': 'eb7fa9481474791727ef80894f0a4ff29db1d098', 'size': '146888', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'claimIdentity/grails-app/assets/stylesheets/summernote-bs2.css', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '373820'}, {'name': 'Groovy', 'bytes': '23582'}, {'name': 'JavaScript', 'bytes': '548'}, {'name': 'Shell', 'bytes': '15576'}]} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Login Page - Photon Admin Panel Theme</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0, maximum-scale=1.0">
<link rel="shortcut icon" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/favicon.ico"/>
<link rel="apple-touch-icon" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/iosicon.png"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/css/css_compiled/photon-min.css?v1.1" media="all"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/css/css_compiled/photon-min-part2.css?v1.1" media="all"/>
<link rel="stylesheet" href="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/css/css_compiled/photon-responsive-min.css?v1.1" media="all"/>
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie-only-min.css?v1.1" />
<![endif]-->
<!--[if lt IE 9]>
<link rel="stylesheet" type="text/css" href="css/css_compiled/ie8-only-min.css?v1.1" />
<script type="text/javascript" src="js/plugins/excanvas.js"></script>
<script type="text/javascript" src="js/plugins/html5shiv.js"></script>
<script type="text/javascript" src="js/plugins/respond.min.js"></script>
<script type="text/javascript" src="js/plugins/fixFontIcons.js"></script>
<![endif]-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.0/jquery-ui.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/bootstrap/bootstrap.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/modernizr.custom.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.pnotify.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/less-1.3.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/xbreadcrumbs.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.maskedinput-1.3.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.autotab-1.1b.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/charCount.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.textareaCounter.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/elrte.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/elrte.en.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/select2.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery-picklist.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.validate.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/additional-methods.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.form.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.metadata.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.mockjax.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.uniform.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.tagsinput.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.rating.pack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/farbtastic.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.timeentry.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.jstree.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/dataTables.bootstrap.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.mousewheel.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.mCustomScrollbar.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.flot.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.flot.stack.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.flot.pie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.flot.resize.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/raphael.2.1.0.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/justgage.1.0.1.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.qrcode.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.clock.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.countdown.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.jqtweet.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/jquery.cookie.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/bootstrap-fileupload.min.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/prettify/prettify.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/bootstrapSwitch.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/plugins/mfupload.js"></script>
<script type="text/javascript" src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/js/common.js"></script>
</head>
<body class="body-login">
<div class="nav-fixed-topright" style="visibility: hidden">
<ul class="nav nav-user-menu">
<li class="user-sub-menu-container">
<a href="javascript:;">
<i class="user-icon"></i><span class="nav-user-selection">Theme Options</span><i class="icon-menu-arrow"></i>
</a>
<ul class="nav user-sub-menu">
<li class="light">
<a href="javascript:;">
<i class='icon-photon stop'></i>Light Version
</a>
</li>
<li class="dark">
<a href="javascript:;">
<i class='icon-photon stop'></i>Dark Version
</a>
</li>
</ul>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon mail"></i>
</a>
</li>
<li>
<a href="javascript:;">
<i class="icon-photon comment_alt2_stroke"></i>
<div class="notification-count">12</div>
</a>
</li>
</ul>
</div>
<script>
$(function(){
setTimeout(function(){
$('.nav-fixed-topright').removeAttr('style');
}, 300);
$(window).scroll(function(){
if($('.breadcrumb-container').length){
var scrollState = $(window).scrollTop();
if (scrollState > 0) $('.nav-fixed-topright').addClass('nav-released');
else $('.nav-fixed-topright').removeClass('nav-released')
}
});
$('.user-sub-menu-container').on('click', function(){
$(this).toggleClass('active-user-menu');
});
$('.user-sub-menu .light').on('click', function(){
if ($('body').is('.light-version')) return;
$('body').addClass('light-version');
setTimeout(function() {
$.cookie('themeColor', 'light', {
expires: 7,
path: '/'
});
}, 500);
});
$('.user-sub-menu .dark').on('click', function(){
if ($('body').is('.light-version')) {
$('body').removeClass('light-version');
$.cookie('themeColor', 'dark', {
expires: 7,
path: '/'
});
}
});
});
</script>
<div class="container-login">
<div class="form-centering-wrapper">
<div class="form-window-login">
<div class="form-window-login-logo">
<div class="login-logo">
<img src="http://photonui.orangehilldev.com/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/images/photon/login-logo@2x.png" alt="Photon UI"/>
</div>
<h2 class="login-title">Welcome to Photon UI!</h2>
<div class="login-member">Not a Member? <a href="jquery.mockjax.js.html#">Sign Up »</a>
<a href="jquery.mockjax.js.html#" class="btn btn-facebook"><i class="icon-fb"></i>Login with Facebook<i class="icon-fb-arrow"></i></a>
</div>
<div class="login-or">Or</div>
<div class="login-input-area">
<form method="POST" action="dashboard.php">
<span class="help-block">Login With Your Photon Account</span>
<input type="text" name="email" placeholder="Email">
<input type="password" name="password" placeholder="Password">
<button type="submit" class="btn btn-large btn-success btn-login">Login</button>
</form>
<a href="jquery.mockjax.js.html#" class="forgot-pass">Forgot Your Password?</a>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-1936460-27']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</body>
</html>
| {'content_hash': '4f4640a5c0fb3d6d4d6bf673cd617a6f', 'timestamp': '', 'source': 'github', 'line_count': 182, 'max_line_length': 208, 'avg_line_length': 78.24725274725274, 'alnum_prop': 0.7345692016010111, 'repo_name': 'user-tony/photon-rails', 'id': '8c6eecace33da7ced17844ace282ff123bf4368a', 'size': '14241', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'lib/assets/images/photon/plugins/elrte/js/bootstrap/images/photon/css/css_compiled/js/plugins/jquery.mockjax.js.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '291750913'}, {'name': 'JavaScript', 'bytes': '59305'}, {'name': 'Ruby', 'bytes': '203'}, {'name': 'Shell', 'bytes': '99'}]} |
title = BTreeInorder
all: $(title).java
javac $(title).java
again:
javac $(title).java
run: $(title).class
java $(title)
| {'content_hash': '45c1a3881749ff82a06e09679b66d0ad', 'timestamp': '', 'source': 'github', 'line_count': 10, 'max_line_length': 20, 'avg_line_length': 12.7, 'alnum_prop': 0.6614173228346457, 'repo_name': 'shaotao/Leetcode', 'id': '2a7d890891612f4d2b185858b9166b165eaff66f', 'size': '127', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'algorithm/btree_inorder/Makefile', 'mode': '33261', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '1050349'}, {'name': 'Makefile', 'bytes': '82241'}, {'name': 'Python', 'bytes': '1266'}, {'name': 'SQLPL', 'bytes': '266'}, {'name': 'Shell', 'bytes': '1060'}]} |
cask "font-source-code-pro-for-powerline" do
version :latest
sha256 :no_check
url "https://github.com/powerline/fonts/trunk/SourceCodePro",
using: :svn
name "Source Code Pro for Powerline"
homepage "https://github.com/powerline/fonts/tree/master/SourceCodePro"
font "Source Code Pro Black for Powerline.otf"
font "Source Code Pro Bold for Powerline.otf"
font "Source Code Pro ExtraLight for Powerline.otf"
font "Source Code Pro Light for Powerline.otf"
font "Source Code Pro Medium for Powerline.otf"
font "Source Code Pro Powerline BlackItalic.otf"
font "Source Code Pro Powerline BoldItalic.otf"
font "Source Code Pro Powerline ExtraLightItalic.otf"
font "Source Code Pro Powerline Italic.otf"
font "Source Code Pro Powerline LightItalic.otf"
font "Source Code Pro Powerline MediumItalic.otf"
font "Source Code Pro Powerline SemiboldItalic.otf"
font "Source Code Pro Semibold for Powerline.otf"
font "Source Code Pro for Powerline.otf"
end
| {'content_hash': '77f6286be949d008ec1c96ba00c9402e', 'timestamp': '', 'source': 'github', 'line_count': 24, 'max_line_length': 73, 'avg_line_length': 41.166666666666664, 'alnum_prop': 0.7631578947368421, 'repo_name': 'alerque/homebrew-fonts', 'id': 'f23b044cd07437335922dae11e37a5ae2d7c4d8f', 'size': '988', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Casks/font-source-code-pro-for-powerline.rb', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'Python', 'bytes': '8143'}, {'name': 'Ruby', 'bytes': '1069262'}]} |
(function (window) {
// STEP 3: Create an object, called 'helloSpeaker' to which you will attach
// the "speak" method and which you will expose to the global context
// See Lecture 52, part 1
// var helloSpeaker =
var helloSpeaker = {};
// DO NOT attach the speakWord variable to the 'helloSpeaker' object.
var speakWord = "Hello";
// STEP 4: Rewrite the 'speak' function such that it is attached to the
// helloSpeaker object instead of being a standalone function.
// See Lecture 52, part 2
helloSpeaker.speak = function (name) {
console.log(speakWord + " " + name);
}
// STEP 5: Expose the 'helloSpeaker' object to the global scope. Name it
// 'helloSpeaker' on the global scope as well.
// See Lecture 52, part 2
// (Note, Step 6 will be done in the SpeakGoodBye.js file.)
// xxxx.xxxx = helloSpeaker;
window.helloSpeaker = helloSpeaker;
})(window);
| {'content_hash': 'cff094ffb50e9b0d600dfd7bc3dcf6c7', 'timestamp': '', 'source': 'github', 'line_count': 28, 'max_line_length': 77, 'avg_line_length': 32.214285714285715, 'alnum_prop': 0.6851441241685144, 'repo_name': 'LucasAntognoni/Web_Development', 'id': 'da6313c0485c6ba1d6a2a61501553cb2f91f93a2', 'size': '1000', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'module_4_solution/SpeakHello.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '9731'}, {'name': 'HTML', 'bytes': '16748'}, {'name': 'JavaScript', 'bytes': '18401'}]} |
package org.apache.ignite.internal.cache.query.index.sorted.inline;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicBoolean;
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.IgniteException;
import org.apache.ignite.failure.FailureContext;
import org.apache.ignite.internal.cache.query.index.AbstractIndex;
import org.apache.ignite.internal.cache.query.index.Index;
import org.apache.ignite.internal.cache.query.index.SingleCursor;
import org.apache.ignite.internal.cache.query.index.sorted.DurableBackgroundCleanupIndexTreeTaskV2;
import org.apache.ignite.internal.cache.query.index.sorted.IndexKeyTypeSettings;
import org.apache.ignite.internal.cache.query.index.sorted.IndexRow;
import org.apache.ignite.internal.cache.query.index.sorted.IndexRowImpl;
import org.apache.ignite.internal.cache.query.index.sorted.IndexValueCursor;
import org.apache.ignite.internal.cache.query.index.sorted.InlineIndexRowHandler;
import org.apache.ignite.internal.cache.query.index.sorted.SortedIndexDefinition;
import org.apache.ignite.internal.cache.query.index.sorted.ThreadLocalRowHandlerHolder;
import org.apache.ignite.internal.metric.IoStatisticsHolderIndex;
import org.apache.ignite.internal.processors.cache.GridCacheContext;
import org.apache.ignite.internal.processors.cache.mvcc.MvccSnapshot;
import org.apache.ignite.internal.processors.cache.persistence.CacheDataRow;
import org.apache.ignite.internal.processors.cache.persistence.metastorage.pendingtask.DurableBackgroundTask;
import org.apache.ignite.internal.util.lang.GridCursor;
import org.apache.ignite.internal.util.typedef.internal.U;
import org.apache.ignite.spi.indexing.IndexingQueryCacheFilter;
import org.jetbrains.annotations.Nullable;
import static org.apache.ignite.cluster.ClusterState.INACTIVE;
import static org.apache.ignite.failure.FailureType.CRITICAL_ERROR;
/**
* Sorted index implementation.
*/
public class InlineIndexImpl extends AbstractIndex implements InlineIndex {
/** Unique ID. */
private final UUID id = UUID.randomUUID();
/** Segments. */
private final InlineIndexTree[] segments;
/** Index function. */
private final SortedIndexDefinition def;
/** Name of underlying tree name. */
private final String treeName;
/** Cache context. */
private final GridCacheContext<?, ?> cctx;
/** */
private final IoStatisticsHolderIndex stats;
/** Row handler. */
private final InlineIndexRowHandler rowHnd;
/** Constructor. */
public InlineIndexImpl(GridCacheContext<?, ?> cctx, SortedIndexDefinition def, InlineIndexTree[] segments,
IoStatisticsHolderIndex stats) {
this.cctx = cctx;
this.segments = segments.clone();
this.def = def;
treeName = def.treeName();
this.stats = stats;
rowHnd = segments[0].rowHandler();
}
/** {@inheritDoc} */
@Override public GridCursor<IndexRow> find(IndexRow lower, IndexRow upper, int segment) throws IgniteCheckedException {
return find(lower, upper, segment, null);
}
/** {@inheritDoc} */
@Override public GridCursor<IndexRow> find(
IndexRow lower,
IndexRow upper,
int segment,
IndexQueryContext qryCtx
) throws IgniteCheckedException {
InlineTreeFilterClosure closure = filterClosure(qryCtx);
// If it is known that only one row will be returned an optimization is employed
if (isSingleRowLookup(lower, upper)) {
IndexRowImpl row = segments[segment].findOne(lower, closure, null);
if (row == null || isExpired(row))
return IndexValueCursor.EMPTY;
return new SingleCursor<>(row);
}
return segments[segment].find(lower, upper, closure, null);
}
/** {@inheritDoc} */
@Override public long count(int segment) throws IgniteCheckedException {
return segments[segment].size();
}
/** {@inheritDoc} */
@Override public long count(int segment, IndexQueryContext qryCtx) throws IgniteCheckedException {
return segments[segment].size(filterClosure(qryCtx));
}
/**
* Returns number of elements in the tree by scanning pages of the bottom (leaf) level.
*
* @return Number of elements in the tree.
* @throws IgniteCheckedException If failed.
*/
@Override public long totalCount() throws IgniteCheckedException {
long ret = 0;
for (int i = 0; i < segmentsCount(); i++)
ret += segments[i].size();
return ret;
}
/** */
private boolean isSingleRowLookup(IndexRow lower, IndexRow upper) throws IgniteCheckedException {
return !cctx.mvccEnabled() && def.primary() && lower != null && isFullSchemaSearch(lower) && checkRowsTheSame(lower, upper);
}
/**
* If {@code true} then length of keys for search must be equal to length of schema, so use full
* schema to search. If {@code false} then it's possible to use only part of schema for search.
*/
private boolean isFullSchemaSearch(IndexRow key) {
int schemaLength = def.indexKeyDefinitions().size();
for (int i = 0; i < schemaLength; i++) {
// Java null means that column is not specified in a search row, for SQL NULL a special constant is used
if (key.key(i) == null)
return false;
}
return true;
}
/**
* Checks both rows are the same.
* <p/>
* Primarly used to verify if the single row lookup optimization can be applied.
*
* @param r1 The first row.
* @param r2 Another row.
* @return {@code true} in case both rows are efficiently the same, {@code false} otherwise.
*/
private boolean checkRowsTheSame(IndexRow r1, IndexRow r2) throws IgniteCheckedException {
if (r1 == r2)
return true;
if (!(r1 != null && r2 != null))
return false;
int keysLen = def.indexKeyDefinitions().size();
for (int i = 0; i < keysLen; i++) {
Object v1 = r1.key(i);
Object v2 = r2.key(i);
if (v1 == null && v2 == null)
continue;
if (!(v1 != null && v2 != null))
return false;
if (def.rowComparator().compareKey((IndexRow) r1, (IndexRow) r2, i) != 0)
return false;
}
return true;
}
/** {@inheritDoc} */
@Override public GridCursor<IndexRow> findFirst(int segment, IndexQueryContext qryCtx) throws IgniteCheckedException {
InlineTreeFilterClosure closure = filterClosure(qryCtx);
IndexRow found = segments[segment].findFirst(closure);
if (found == null || isExpired(found))
return IndexValueCursor.EMPTY;
return new SingleCursor<>(found);
}
/** {@inheritDoc} */
@Override public GridCursor<IndexRow> findLast(int segment, IndexQueryContext qryCtx) throws IgniteCheckedException {
InlineTreeFilterClosure closure = filterClosure(qryCtx);
IndexRow found = segments[segment].findLast(closure);
if (found == null || isExpired(found))
return IndexValueCursor.EMPTY;
return new SingleCursor<>(found);
}
/** {@inheritDoc} */
@Override public UUID id() {
return id;
}
/** {@inheritDoc} */
@Override public String name() {
return def.idxName().idxName();
}
/** {@inheritDoc} */
@Override public void onUpdate(@Nullable CacheDataRow oldRow, @Nullable CacheDataRow newRow,
boolean prevRowAvailable) throws IgniteCheckedException {
try {
if (destroyed.get())
return;
ThreadLocalRowHandlerHolder.rowHandler(rowHnd);
boolean replaced = false;
// Create or Update.
if (newRow != null) {
int segment = segmentForRow(newRow);
IndexRowImpl row0 = new IndexRowImpl(rowHnd, newRow);
row0.prepareCache();
// Validate all keys before an actual put. User may specify wrong data types for an insert query.
for (int i = 0; i < def.indexKeyDefinitions().size(); ++i)
row0.key(i);
replaced = putx(row0, segment, prevRowAvailable && !rebuildInProgress());
}
// Delete.
if (!replaced && oldRow != null)
remove(oldRow);
} finally {
ThreadLocalRowHandlerHolder.clearRowHandler();
}
}
/** */
private boolean putx(IndexRowImpl idxRow, int segment, boolean flag) throws IgniteCheckedException {
try {
boolean replaced;
if (flag)
replaced = segments[segment].putx(idxRow);
else {
IndexRow prevRow0 = segments[segment].put(idxRow);
replaced = prevRow0 != null;
}
return replaced;
} catch (Throwable t) {
cctx.kernalContext().failure().process(new FailureContext(CRITICAL_ERROR, t));
throw t;
}
}
/** */
private void remove(CacheDataRow row) throws IgniteCheckedException {
try {
int segment = segmentForRow(row);
IndexRowImpl idxRow = new IndexRowImpl(rowHnd, row);
idxRow.prepareCache();
segments[segment].removex(idxRow);
} catch (Throwable t) {
cctx.kernalContext().failure().process(new FailureContext(CRITICAL_ERROR, t));
throw t;
}
}
/**
* Put index row to index. This method is for internal use only.
*
* @param row Index row.
*/
public void putIndexRow(IndexRowImpl row) throws IgniteCheckedException {
int segment = segmentForRow(row.cacheDataRow());
try {
ThreadLocalRowHandlerHolder.rowHandler(rowHnd);
segments[segment].putx(row);
}
finally {
ThreadLocalRowHandlerHolder.clearRowHandler();
}
}
/** {@inheritDoc} */
@Override public <T extends Index> T unwrap(Class<T> clazz) {
if (clazz == null)
return null;
if (clazz.isAssignableFrom(getClass()))
return clazz.cast(this);
throw new IllegalArgumentException(
String.format("Cannot unwrap [%s] to [%s]", getClass().getName(), clazz.getName())
);
}
/** {@inheritDoc} */
@Override public int inlineSize() {
return segments[0].inlineSize();
}
/** */
public IndexKeyTypeSettings keyTypeSettings() {
return rowHnd.indexKeyTypeSettings();
}
/** {@inheritDoc} */
@Override public int segmentsCount() {
return segments.length;
}
/**
* @param row Сache row.
* @return Segment ID for given key.
*/
public int segmentForRow(CacheDataRow row) {
return calculateSegment(segmentsCount(), segmentsCount() == 1 ? 0 : rowHnd.partition(row));
}
/**
* @param segmentsCnt Сount of segments in cache.
* @param part Partition.
* @return Segment ID for given segment count and partition.
*/
public static int calculateSegment(int segmentsCnt, int part) {
return segmentsCnt == 1 ? 0 : (part % segmentsCnt);
}
/** */
private InlineTreeFilterClosure filterClosure(IndexQueryContext qryCtx) {
if (qryCtx == null)
return null;
IndexingQueryCacheFilter cacheFilter = qryCtx.filter() == null ? null
: qryCtx.filter().forCache(cctx.cache().name());
MvccSnapshot v = qryCtx.mvccSnapshot();
assert !cctx.mvccEnabled() || v != null;
if (cacheFilter == null && v == null)
return null;
return new InlineTreeFilterClosure(
cacheFilter, v, cctx, cctx.kernalContext().config().getGridLogger());
}
/** {@inheritDoc} */
@Override public boolean created() {
assert segments != null;
for (int i = 0; i < segments.length; i++) {
try {
InlineIndexTree segment = segments[i];
if (segment.created())
return true;
}
catch (Exception e) {
throw new IgniteException("Failed to check index tree root page existence [cacheName=" +
cctx.name() + ", tblName=" + def.idxName().tableName() + ", idxName=" + def.idxName().idxName() +
", segment=" + i + ']');
}
}
return false;
}
/** {@inheritDoc} */
@Override public InlineIndexTree segment(int segment) {
return segments[segment];
}
/**
* Determines if provided row can be treated as expired at the current moment.
*
* @param row row to check.
* @throws NullPointerException if provided row is {@code null}.
*/
private static boolean isExpired(IndexRow row) {
return row.cacheDataRow().expireTime() > 0 && row.cacheDataRow().expireTime() <= U.currentTimeMillis();
}
/** If {code true} then this index is already marked as destroyed. */
private final AtomicBoolean destroyed = new AtomicBoolean();
/** {@inheritDoc} */
@Override public void destroy(boolean softDel) {
// Already destroyed.
if (!destroyed.compareAndSet(false, true))
return;
if (cctx.affinityNode() && !softDel) {
for (InlineIndexTree segment : segments) {
segment.markDestroyed();
segment.close();
}
cctx.kernalContext().metric().remove(stats.metricRegistryName());
if (cctx.group().persistenceEnabled() ||
cctx.shared().kernalContext().state().clusterState().state() != INACTIVE) {
// Actual destroy index task.
DurableBackgroundTask<Long> task = new DurableBackgroundCleanupIndexTreeTaskV2(
cctx.group().name(),
cctx.name(),
def.idxName().idxName(),
treeName,
UUID.randomUUID().toString(),
segments.length,
segments
);
cctx.kernalContext().durableBackgroundTask().executeAsync(task, cctx.config());
}
}
}
/** {@inheritDoc} */
@Override public boolean canHandle(CacheDataRow row) throws IgniteCheckedException {
return cctx.kernalContext().query().belongsToTable(
cctx, def.idxName().cacheName(), def.idxName().tableName(), row.key(), row.value());
}
}
| {'content_hash': 'ec87b9c3daac553a33df2b934050853f', 'timestamp': '', 'source': 'github', 'line_count': 446, 'max_line_length': 132, 'avg_line_length': 32.90134529147982, 'alnum_prop': 0.6159193130707373, 'repo_name': 'ascherbakoff/ignite', 'id': 'd09b17ca4375ed735f67d46c5273fbe8c715d027', 'size': '15478', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'modules/core/src/main/java/org/apache/ignite/internal/cache/query/index/sorted/inline/InlineIndexImpl.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Batchfile', 'bytes': '56885'}, {'name': 'C', 'bytes': '5348'}, {'name': 'C#', 'bytes': '7523662'}, {'name': 'C++', 'bytes': '4116111'}, {'name': 'CMake', 'bytes': '47973'}, {'name': 'Dockerfile', 'bytes': '11896'}, {'name': 'Groovy', 'bytes': '15081'}, {'name': 'HTML', 'bytes': '14341'}, {'name': 'Java', 'bytes': '43965611'}, {'name': 'JavaScript', 'bytes': '1085'}, {'name': 'Jinja', 'bytes': '25514'}, {'name': 'M4', 'bytes': '623'}, {'name': 'Makefile', 'bytes': '63439'}, {'name': 'PHP', 'bytes': '11079'}, {'name': 'PowerShell', 'bytes': '13092'}, {'name': 'Python', 'bytes': '298224'}, {'name': 'Scala', 'bytes': '1385840'}, {'name': 'Shell', 'bytes': '652485'}]} |
@import UIKit;
@interface EssentialsGalleryFlowLayoutAppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
| {'content_hash': 'c5d679890bea7ccaabb765cf27652104', 'timestamp': '', 'source': 'github', 'line_count': 7, 'max_line_length': 87, 'avg_line_length': 22.714285714285715, 'alnum_prop': 0.8176100628930818, 'repo_name': 'shinobicontrols/play-essentials-gallery-flowlayout', 'id': '83d88bfb6a9332171cc50897d047798b85e53c78', 'size': '887', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'EssentialsGalleryFlowLayout/EssentialsGalleryFlowLayout/EssentialsGalleryFlowLayoutAppDelegate.h', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'Objective-C', 'bytes': '18325'}, {'name': 'Ruby', 'bytes': '1535'}]} |
{% extends "base.html" %}
{% block title %}Google+ response{% endblock %}
{% block content %}
<h1>Google+ response</h1>
{% if response.error %}
<p> Error: {{ response.error }} </p>
{% elif response.code %}
<label>Code: <input type="text" value="{{ response.code }}" size="30" readonly><label>
{% else %}
<p> Neither code, nor error found in the response. </p>
{% endif %}
<h4>Response</h4>
<pre> {{ response.items | pprint }} </pre>
{% endblock %}
| {'content_hash': '22235bcc937bde7844f6293758302b20', 'timestamp': '', 'source': 'github', 'line_count': 16, 'max_line_length': 94, 'avg_line_length': 31.375, 'alnum_prop': 0.5557768924302788, 'repo_name': 'vlevit/vlevit.org', 'id': '789e9052c9332877d6d976bd21644d6171f2e039', 'size': '502', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'templates/gplus.html', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'CSS', 'bytes': '23442'}, {'name': 'Emacs Lisp', 'bytes': '160'}, {'name': 'HTML', 'bytes': '66671'}, {'name': 'JavaScript', 'bytes': '4598'}, {'name': 'Lua', 'bytes': '10454'}, {'name': 'Python', 'bytes': '137392'}, {'name': 'Shell', 'bytes': '11719'}]} |
<?php
namespace Afrittella\BackProjectCategories\Http\Controllers;
use Afrittella\BackProject\Http\Controllers\Controller;
use Afrittella\BackProject\Repositories\Attachments;
use Afrittella\BackProjectCategories\Http\Requests\CategoryAdd;
use Afrittella\BackProjectCategories\Http\Requests\CategoryEdit;
use Afrittella\BackProjectCategories\Domain\Repositories\Categories;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Prologue\Alerts\Facades\Alert;
class CategoriesController extends Controller
{
public function __construct()
{
$this->middleware('admin');
}
public function index(Categories $categories)
{
$root = $categories->findBy('slug', 'root');
if (!empty($root)) {
return redirect(route('bp.categories.edit', [$root->id]));
}
return view('back-project-categories::categories.index')->with('categories', $categories->transform($categories->all()));
}
public function edit(Request $request, Categories $categories, $id)
{
return view('back-project-categories::categories.edit')
->with([
'category' => $categories->find($id),
'children' => $categories->children($id)
]);
}
public function create()
{
return view('back-project-categories::categories.create');
}
public function delete(Categories $categories, $id)
{
$categories->delete($id);
Alert::add('success', trans('back-project::crud.model_deleted', ['model' => trans('back-project-categories::categories.category')]))->flash();
return back();
}
public function up(Request $request, Categories $categories, $id)
{
$categories->moveUp($id);
return back();
}
public function down(Request $request, Categories $categories, $id)
{
$categories->moveDown($id);
return back();
}
public function store(CategoryAdd $request, Categories $categories)
{
$category = $categories->create($request->all());
Alert::add('success', trans('back-project::crud.model_created', ['model' => trans('back-project-categories::categories.category')]))->flash();
if ($request->ajax() || $request->wantsJson()) {
return response()->json();
} else {
return redirect(route('bp.categories.index'));
}
}
public function update(CategoryEdit $request, Categories $categories, $id)
{
$category = $categories->update($request->all(), $id);
Alert::add('success', trans('back-project::crud.model_updated', ['model' => trans('back-project-categories::categories.category')]))->flash();
return back();
}
public function addImage(Request $request, Attachments $attachments, Categories $categories, $id)
{
$user = Auth::user();
$categories->addAttachment($request->all(), $user->id, $id);
Alert::add('success', trans('back-project::base.image_uploaded'))->flash();
return response()->json([
'success' => true,
'message' => trans('back-project::base.image_uploaded')
]);
}
}
| {'content_hash': 'e0871df711535bb6adf7bac87667065a', 'timestamp': '', 'source': 'github', 'line_count': 102, 'max_line_length': 150, 'avg_line_length': 31.294117647058822, 'alnum_prop': 0.6293859649122807, 'repo_name': 'afrittella/back-project-categories', 'id': '1e595fd4b7a64a0926359f5ffdc348f54bf5a4fa', 'size': '3192', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/app/Http/Controllers/CategoriesController.php', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '10020'}, {'name': 'PHP', 'bytes': '18156'}]} |
(function($) {
"use strict"; // Start of use strict
// Smooth scrolling using jQuery easing
$('a.js-scroll-trigger[href*="#"]:not([href="#"])').click(function() {
if (location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '') && location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) + ']');
if (target.length) {
$('html, body').animate({
scrollTop: (target.offset().top - 5)
}, 1000, "easeInOutExpo");
return false;
}
}
});
// Closes responsive menu when a scroll trigger link is clicked
$('.js-scroll-trigger').click(function() {
$('.navbar-collapse').collapse('hide');
});
// Activate scrollspy to add active class to navbar items on scroll
$('body').scrollspy({
target: '#mainNav',
offset: 54
});
})(jQuery); // End of use strict
| {'content_hash': '69bd297969ab5bc93d9b48d35273ae22', 'timestamp': '', 'source': 'github', 'line_count': 29, 'max_line_length': 121, 'avg_line_length': 31.93103448275862, 'alnum_prop': 0.5734341252699784, 'repo_name': 'NixaSoftware/CVis', 'id': '6a3d724ce284172b82bef6a9b189a0636a1e9108', 'size': '926', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'static/js/scrolling-nav.js', 'mode': '33261', 'license': 'apache-2.0', 'language': [{'name': 'Assembly', 'bytes': '160965'}, {'name': 'Batchfile', 'bytes': '45451'}, {'name': 'C', 'bytes': '4818355'}, {'name': 'C#', 'bytes': '40804'}, {'name': 'C++', 'bytes': '145737889'}, {'name': 'CMake', 'bytes': '53495'}, {'name': 'CSS', 'bytes': '287550'}, {'name': 'CWeb', 'bytes': '174166'}, {'name': 'Cuda', 'bytes': '26749'}, {'name': 'Fortran', 'bytes': '9668'}, {'name': 'HTML', 'bytes': '155266453'}, {'name': 'IDL', 'bytes': '14'}, {'name': 'JavaScript', 'bytes': '225380'}, {'name': 'Lex', 'bytes': '1231'}, {'name': 'M4', 'bytes': '29689'}, {'name': 'Makefile', 'bytes': '1560105'}, {'name': 'Max', 'bytes': '36857'}, {'name': 'Objective-C', 'bytes': '4303'}, {'name': 'Objective-C++', 'bytes': '218'}, {'name': 'PHP', 'bytes': '59030'}, {'name': 'Perl', 'bytes': '23580'}, {'name': 'Perl 6', 'bytes': '7975'}, {'name': 'Python', 'bytes': '28662237'}, {'name': 'QML', 'bytes': '593'}, {'name': 'Rebol', 'bytes': '354'}, {'name': 'Roff', 'bytes': '8039'}, {'name': 'Shell', 'bytes': '376471'}, {'name': 'Smarty', 'bytes': '2045'}, {'name': 'Tcl', 'bytes': '1172'}, {'name': 'TeX', 'bytes': '13404'}, {'name': 'XSLT', 'bytes': '746813'}, {'name': 'Yacc', 'bytes': '18910'}]} |
using Xamarin.Forms.CustomAttributes;
using Xamarin.Forms.Internals;
using System;
using System.Threading.Tasks;
#if UITEST
using Xamarin.UITest;
using NUnit.Framework;
#endif
namespace Xamarin.Forms.Controls
{
[Preserve(AllMembers = true)]
[Issue(IssueTracker.Bugzilla, 43469, "Calling DisplayAlert twice in WinRT causes a crash", PlatformAffected.WinRT)]
public class Bugzilla43469 : TestContentPage
{
protected override void Init()
{
var button = new Button { Text = "Click to call DisplayAlert twice" };
button.Clicked += (sender, args) =>
{
Device.BeginInvokeOnMainThread(new Action(async () =>
{
await DisplayAlert("First", "Text", "Cancel");
}));
Device.BeginInvokeOnMainThread(new Action(async () =>
{
await DisplayAlert("Second", "Text", "Cancel");
}));
};
Content = button;
}
}
} | {'content_hash': '927ef2f81789e6f76abf5fd68a4b958c', 'timestamp': '', 'source': 'github', 'line_count': 37, 'max_line_length': 116, 'avg_line_length': 23.10810810810811, 'alnum_prop': 0.6912280701754386, 'repo_name': 'Hitcents/Xamarin.Forms', 'id': 'b81f98e373e5637edf4f6fcbc3fdbaeaa9c0e9c3', 'size': '857', 'binary': False, 'copies': '1', 'ref': 'refs/heads/hitcents', 'path': 'Xamarin.Forms.Controls.Issues/Xamarin.Forms.Controls.Issues.Shared/Bugzilla43469.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Batchfile', 'bytes': '1761'}, {'name': 'C#', 'bytes': '5547104'}, {'name': 'CSS', 'bytes': '523'}, {'name': 'HTML', 'bytes': '1028'}, {'name': 'Java', 'bytes': '2022'}, {'name': 'Makefile', 'bytes': '1775'}, {'name': 'PowerShell', 'bytes': '8514'}]} |
//-----------------------------------NOTICE----------------------------------//
// Some of this file is automatically filled in by a Python script. Only //
// add custom code in the designated areas or it will be overwritten during //
// the next update. //
//-----------------------------------NOTICE----------------------------------//
//--BEGIN FILE HEAD CUSTOM CODE--//
//--END CUSTOM CODE--//
#include "../../include/FixLink.h"
#include "../../include/ObjectRegistry.h"
#include "../../include/NIF_IO.h"
#include "../../include/obj/NiBezierMesh.h"
#include "../../include/obj/NiBezierTriangle4.h"
using namespace Niflib;
//Definition of TYPE constant
const Type NiBezierMesh::TYPE("NiBezierMesh", &NiAVObject::TYPE);
NiBezierMesh::NiBezierMesh() : numBezierTriangles((unsigned int) 0), unknown3((unsigned int) 0), count1((unsigned short) 0), unknown4((unsigned short) 0), unknown5((unsigned int) 0), unknown6((unsigned int) 0), count2((unsigned short) 0)
{
//--BEGIN CONSTRUCTOR CUSTOM CODE--//
//--END CUSTOM CODE--//
}
NiBezierMesh::~NiBezierMesh()
{
//--BEGIN DESTRUCTOR CUSTOM CODE--//
//--END CUSTOM CODE--//
}
const Type & NiBezierMesh::GetType() const
{
return TYPE;
}
NiObject * NiBezierMesh::Create()
{
return new NiBezierMesh;
}
void NiBezierMesh::Read(istream& in, list<unsigned int> & link_stack, const NifInfo & info)
{
//--BEGIN PRE-READ CUSTOM CODE--//
//--END CUSTOM CODE--//
unsigned int block_num;
NiAVObject::Read(in, link_stack, info);
NifStream(numBezierTriangles, in, info);
bezierTriangle.resize(numBezierTriangles);
for(unsigned int i1 = 0; i1 < bezierTriangle.size(); i1++)
{
NifStream(block_num, in, info);
link_stack.push_back(block_num);
};
NifStream(unknown3, in, info);
NifStream(count1, in, info);
NifStream(unknown4, in, info);
points1.resize(count1);
for(unsigned int i1 = 0; i1 < points1.size(); i1++)
{
NifStream(points1[i1], in, info);
};
NifStream(unknown5, in, info);
points2.resize(count1);
for(unsigned int i1 = 0; i1 < points2.size(); i1++)
{
for(unsigned int i2 = 0; i2 < 2; i2++)
{
NifStream(points2[i1][i2], in, info);
};
};
NifStream(unknown6, in, info);
NifStream(count2, in, info);
data2.resize(count2);
for(unsigned int i1 = 0; i1 < data2.size(); i1++)
{
for(unsigned int i2 = 0; i2 < 4; i2++)
{
NifStream(data2[i1][i2], in, info);
};
};
//--BEGIN POST-READ CUSTOM CODE--//
//--END CUSTOM CODE--//
}
void NiBezierMesh::Write(ostream& out, const map<NiObjectRef, unsigned int> & link_map, list<NiObject *> & missing_link_stack, const NifInfo & info) const
{
//--BEGIN PRE-WRITE CUSTOM CODE--//
//--END CUSTOM CODE--//
NiAVObject::Write(out, link_map, missing_link_stack, info);
count2 = (unsigned short) (data2.size());
count1 = (unsigned short) (points1.size());
numBezierTriangles = (unsigned int) (bezierTriangle.size());
NifStream(numBezierTriangles, out, info);
for(unsigned int i1 = 0; i1 < bezierTriangle.size(); i1++)
{
if(info.version < VER_3_3_0_13)
{
WritePtr32(&(*bezierTriangle[i1]), out);
}
else
{
if(bezierTriangle[i1] != NULL)
{
map<NiObjectRef, unsigned int>::const_iterator it = link_map.find(StaticCast<NiObject>(bezierTriangle[i1]));
if(it != link_map.end())
{
NifStream(it->second, out, info);
missing_link_stack.push_back(NULL);
}
else
{
NifStream(0xFFFFFFFF, out, info);
missing_link_stack.push_back(bezierTriangle[i1]);
}
}
else
{
NifStream(0xFFFFFFFF, out, info);
missing_link_stack.push_back(NULL);
}
}
};
NifStream(unknown3, out, info);
NifStream(count1, out, info);
NifStream(unknown4, out, info);
for(unsigned int i1 = 0; i1 < points1.size(); i1++)
{
NifStream(points1[i1], out, info);
};
NifStream(unknown5, out, info);
for(unsigned int i1 = 0; i1 < points2.size(); i1++)
{
for(unsigned int i2 = 0; i2 < 2; i2++)
{
NifStream(points2[i1][i2], out, info);
};
};
NifStream(unknown6, out, info);
NifStream(count2, out, info);
for(unsigned int i1 = 0; i1 < data2.size(); i1++)
{
for(unsigned int i2 = 0; i2 < 4; i2++)
{
NifStream(data2[i1][i2], out, info);
};
};
//--BEGIN POST-WRITE CUSTOM CODE--//
//--END CUSTOM CODE--//
}
std::string NiBezierMesh::asString(bool verbose) const
{
//--BEGIN PRE-STRING CUSTOM CODE--//
//--END CUSTOM CODE--//
stringstream out;
unsigned int array_output_count = 0;
out << NiAVObject::asString(verbose);
count2 = (unsigned short) (data2.size());
count1 = (unsigned short) (points1.size());
numBezierTriangles = (unsigned int) (bezierTriangle.size());
out << " Num Bezier Triangles: " << numBezierTriangles << endl;
array_output_count = 0;
for(unsigned int i1 = 0; i1 < bezierTriangle.size(); i1++)
{
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl;
break;
};
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
break;
};
out << " Bezier Triangle[" << i1 << "]: " << bezierTriangle[i1] << endl;
array_output_count++;
};
out << " Unknown 3: " << unknown3 << endl;
out << " Count 1: " << count1 << endl;
out << " Unknown 4: " << unknown4 << endl;
array_output_count = 0;
for(unsigned int i1 = 0; i1 < points1.size(); i1++)
{
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl;
break;
};
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
break;
};
out << " Points 1[" << i1 << "]: " << points1[i1] << endl;
array_output_count++;
};
out << " Unknown 5: " << unknown5 << endl;
array_output_count = 0;
for(unsigned int i1 = 0; i1 < points2.size(); i1++)
{
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl;
break;
};
for(unsigned int i2 = 0; i2 < 2; i2++)
{
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
break;
};
out << " Points 2[" << i2 << "]: " << points2[i1][i2] << endl;
array_output_count++;
};
};
out << " Unknown 6: " << unknown6 << endl;
out << " Count 2: " << count2 << endl;
array_output_count = 0;
for(unsigned int i1 = 0; i1 < data2.size(); i1++)
{
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
out << "<Data Truncated. Use verbose mode to see complete listing.>" << endl;
break;
};
for(unsigned int i2 = 0; i2 < 4; i2++)
{
if(!verbose && (array_output_count > MAXARRAYDUMP))
{
break;
};
out << " Data 2[" << i2 << "]: " << data2[i1][i2] << endl;
array_output_count++;
};
};
return out.str();
//--BEGIN POST-STRING CUSTOM CODE--//
//--END CUSTOM CODE--//
}
void NiBezierMesh::FixLinks(const map<unsigned int, NiObjectRef> & objects, list<unsigned int> & link_stack, list<NiObjectRef> & missing_link_stack, const NifInfo & info)
{
//--BEGIN PRE-FIXLINKS CUSTOM CODE--//
//--END CUSTOM CODE--//
NiAVObject::FixLinks(objects, link_stack, missing_link_stack, info);
for(unsigned int i1 = 0; i1 < bezierTriangle.size(); i1++)
{
bezierTriangle[i1] = FixLink<NiBezierTriangle4>(objects, link_stack, missing_link_stack, info);
};
//--BEGIN POST-FIXLINKS CUSTOM CODE--//
//--END CUSTOM CODE--//
}
std::list<NiObjectRef> NiBezierMesh::GetRefs() const
{
list<Ref<NiObject> > refs;
refs = NiAVObject::GetRefs();
for(unsigned int i1 = 0; i1 < bezierTriangle.size(); i1++)
{
if(bezierTriangle[i1] != NULL)
refs.push_back(StaticCast<NiObject>(bezierTriangle[i1]));
};
return refs;
}
std::list<NiObject *> NiBezierMesh::GetPtrs() const
{
list<NiObject *> ptrs;
ptrs = NiAVObject::GetPtrs();
for(unsigned int i1 = 0; i1 < bezierTriangle.size(); i1++)
{
};
return ptrs;
}
/***Begin Example Naive Implementation****
vector<Ref<NiBezierTriangle4 > > NiBezierMesh::GetBezierTriangle() const {
return bezierTriangle;
}
void NiBezierMesh::SetBezierTriangle( const vector<Ref<NiBezierTriangle4 > >& value ) {
bezierTriangle = value;
}
vector<Vector3 > NiBezierMesh::GetPoints1() const {
return points1;
}
void NiBezierMesh::SetPoints1( const vector<Vector3 >& value ) {
points1 = value;
}
vector< array<2,float > > NiBezierMesh::GetPoints2() const {
return points2;
}
void NiBezierMesh::SetPoints2( const vector< array<2,float > >& value ) {
points2 = value;
}
vector< array<4,unsigned short > > NiBezierMesh::GetData2() const {
return data2;
}
void NiBezierMesh::SetData2( const vector< array<4,unsigned short > >& value ) {
data2 = value;
}
****End Example Naive Implementation***/
//--BEGIN MISC CUSTOM CODE--//
//--END CUSTOM CODE--// | {'content_hash': '3ba3b30c07553cd518b643ff9babbf9e', 'timestamp': '', 'source': 'github', 'line_count': 334, 'max_line_length': 237, 'avg_line_length': 26.104790419161677, 'alnum_prop': 0.6228925335474251, 'repo_name': 'BlazesRus/niflib', 'id': '4540d6e2130f2f75afe685f9dcac72a464cdf41d', 'size': '8833', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/obj/NiBezierMesh.cpp', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C++', 'bytes': '5722136'}, {'name': 'CMake', 'bytes': '13336'}, {'name': 'HTML', 'bytes': '485'}, {'name': 'Objective-C', 'bytes': '10426'}]} |
'use strict';
/*
* Function that is called when the document is ready.
*/
var oneTimeToDo = 0;
function MakingTheButtonsReady() {
if(oneTimeToDo == 0){
$('#IndexaddEvents').click(addEventsHere);
$('#SaveResultQR').click(insertTolist);
oneTimeToDo = 1;
}
console.log("changing the click");
}
/*
* Make an AJAX call to retrieve project details and add it in
*/
function addEventsHere(e) {
// Prevent following the link
e.preventDefault();
var URL = "/event"
$.get(URL,AddingEventFunction);
console.log("Url is: "+ URL);
}
function insertTolist(e) {
// Prevent following the link
e.preventDefault();
var URL = "/event"
$.get(URL,insertingFunction);
console.log("Url is: "+ URL);
}
function insertingFunction(result){
var value = $('#qr-value').text();
console.log(value);
// var parts = value.split('~');
// $('#eventSummery').val(parts[0]);
// $('#eventStartDateTime').val(parts[1]);
// $('#eventEndDateTime').val(parts[2]);
// $('#eventLocation').val(parts[3]);
// $('#eventDescription').val(parts[4]);
result[result.length] = value;
addToGoogle();
$('#SaveResultQR').attr('style','display:none');
alert("QR Event successfully Saved!");
}
/*
* The call back function
*/
function AddingEventFunction(result){
console.log("we are adding to the page");
console.log(result);
var h1Id = '#IndexNewEvent';
var x = 0;
var string;
while(x<result.length){
string = string + "<h4> Title: "+result[x]['title']+"</h4>"
+ "<img src = '"+result[x]['image']+"'class ='detailsImage'/>"
+"<div>Summary: "+result[x]['summary']+"</div>";
x++;
}
$(h1Id).html(string);
}
| {'content_hash': '7966a5a13fb0c777bb28aea02193b5e0', 'timestamp': '', 'source': 'github', 'line_count': 80, 'max_line_length': 64, 'avg_line_length': 20.3, 'alnum_prop': 0.6397783251231527, 'repo_name': 'skarimik/CSE170', 'id': 'b9fd31a06e76cbec379720905e95578414f1debc', 'size': '1624', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'static/js/jsonObject.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '41910'}, {'name': 'HTML', 'bytes': '172362'}, {'name': 'JavaScript', 'bytes': '251496'}, {'name': 'Makefile', 'bytes': '75'}, {'name': 'PHP', 'bytes': '1218'}, {'name': 'Python', 'bytes': '225'}]} |
<h1>netbeans-openedFiles</h1>
<p>Shows open editor tabs in a dedicated view in netbeans like in Sublime Text.</p>
<p>Screenshot:</p>
<img src="screenshots/showOpenedFiles.png" />
| {'content_hash': '05433a0cd5c17c962dee02dfc49c9d40', 'timestamp': '', 'source': 'github', 'line_count': 6, 'max_line_length': 83, 'avg_line_length': 30.166666666666668, 'alnum_prop': 0.7403314917127072, 'repo_name': 'ranSprd/netbeans-openedFiles', 'id': '255777b81f80b2a4342a620715646f7610e57f4e', 'size': '181', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'readme.md', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Java', 'bytes': '26185'}]} |
REST API
========
.. _hmac-auth-label:
HMAC Auth
---------
API requests which require API key auth will have an extra
:code:`AUTHORIZATION` HTTP header. It looks like this:
.. code-block:: none
AUTHORIZATION: hmac $application:$payload
:code:`$payload` is a base64 encoded hmac sha512 digest of the following string
with the app's API key. In the resulting base64 string, instances of :code:`+`
are replaced with :code:`-` and :code:`/` are replaced with :code:`_`.
.. code-block:: none
HMAC($api_key, "$window $httpMethod $path $body")
:code:`$window` is the current unix timestamp in seconds, divided by 5, floor'd.
:code:`$httpMethod` is generally :code:`POST`
:code:`$path` is the path portion of the URL, such as :code:`/v0/incidents`
:code:`$body` is generally the json-formatted post body.
Example client implementations:
* `Python <https://github.com/houqp/iris-python-client>`_
* `NodeJS <https://github.com/kripplek/node-iris>`_
Query Filters
-------------
Iris has a number of search endpoints allowing filtering based on data
attributes. For each allowable attribute, filters are defined via the
query string, with syntax in the form of
:code:`$ATTRIBUTE__$OPERATOR=$ARGUMENT` e.g. :code:`created__ge=123`.
The following operators are allowed:
- "eq": :code:`$ATTRIBUTE == $ARGUMENT`
- "in": :code:`$ATTRIBUTE` is contained in :code:`$ARGUMENT`, which must be a list
- "ne": :code:`$ATTRIBUTE != $ARGUMENT`
- "gt": :code:`$ATTRIBUTE > $ARGUMENT`
- "ge": :code:`$ATTRIBUTE >= $ARGUMENT`
- "lt": :code:`$ATTRIBUTE < $ARGUMENT`
- "le": :code:`$ATTRIBUTE <= $ARGUMENT`
- "contains": :code:`$ATTRIBUTE` contains the substring :code:`$ARGUMENT`. Only defined on string-like attributes
- "startswith": :code:`$ATTRIBUTE` starts with :code:`$ARGUMENT`. Only defined on string-like attributes
- "endswith": :code:`$ATTRIBUTE` ends with :code:`$ARGUMENT`. Only defined on string-like attributes
If no operator is defined (e.g. :code:`id=123`), the operator
is assumed to be "eq" (equality).
Routes
------
.. autofalcon:: iris.doc_helper:app
| {'content_hash': 'f04cd8e3d0cc8117a9dc1a6b1cdd4f61', 'timestamp': '', 'source': 'github', 'line_count': 64, 'max_line_length': 115, 'avg_line_length': 32.625, 'alnum_prop': 0.6906130268199234, 'repo_name': 'linkedin/iris', 'id': 'e284e73c534af857dc813ddbfaec73fb08dcbb9b', 'size': '2088', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'docs/source/rest_api.rst', 'mode': '33188', 'license': 'bsd-2-clause', 'language': [{'name': 'CSS', 'bytes': '33371'}, {'name': 'Dockerfile', 'bytes': '2436'}, {'name': 'HCL', 'bytes': '11295'}, {'name': 'HTML', 'bytes': '104864'}, {'name': 'JavaScript', 'bytes': '264720'}, {'name': 'Makefile', 'bytes': '870'}, {'name': 'Procfile', 'bytes': '188'}, {'name': 'Python', 'bytes': '767576'}, {'name': 'Shell', 'bytes': '3148'}, {'name': 'Smarty', 'bytes': '1815'}]} |
lock '3.10.1'
set :application, 'json.northpole.ro'
set :repo_url, 'git@github.com:mess110/ki.git'
# Default branch is :master
# ask :branch, proc { `git rev-parse --abbrev-ref HEAD`.chomp }
# Default deploy_to directory is /var/www/my_app
set :deploy_to, '/home/kiki/json.northpole.ro'
# Default value for :scm is :git
# set :scm, :git
# Default value for :format is :pretty
# set :format, :pretty
# Default value for :log_level is :debug
# set :log_level, :debug
# Default value for :pty is false
# set :pty, true
# Default value for :linked_files is []
# set :linked_files, %w{config/database.yml}
# Default value for linked_dirs is []
# set :linked_dirs, %w{bin log tmp/pids tmp/cache tmp/sockets vendor/bundle public/system}
set :linked_dirs, %w{tmp}
# Default value for default_env is {}
# set :default_env, { path: "/opt/ruby/bin:$PATH" }
set :rvm_ruby_version, '2.4.3@json.northpole.ro'
# Default value for keep_releases is 5
# set :keep_releases, 5
namespace :deploy do
desc 'Restart application'
task :restart do
on roles(:app), in: :sequence, wait: 5 do
# Your restart mechanism here, for example:
execute :touch, release_path.join('tmp/restart.txt')
# run "#{sudo} service nginx #{command}"
end
end
after :publishing, :restart
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
# within release_path do
# execute :rake, 'cache:clear'
# end
end
end
end
| {'content_hash': '08287f3f262a29de02edbe86b7631225', 'timestamp': '', 'source': 'github', 'line_count': 60, 'max_line_length': 90, 'avg_line_length': 25.316666666666666, 'alnum_prop': 0.6675444371296906, 'repo_name': 'mess110/ki', 'id': '281a3bc150493aefa00cd6acec4a01a69b915b31', 'size': '1558', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'spec/examples/json.northpole.ro/config/deploy.rb', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '308392'}, {'name': 'CoffeeScript', 'bytes': '21677'}, {'name': 'HTML', 'bytes': '45967'}, {'name': 'JavaScript', 'bytes': '2153582'}, {'name': 'Ruby', 'bytes': '78381'}, {'name': 'Shell', 'bytes': '53'}]} |
.main-container {
margin-left:90px;
transition: all 0.25s ease 0s;
height:100% !important;
display:block !important;
margin-top:58px;
}
.main-container.collapse.in {
margin-left:258px;
height:100% !important;
}
.main-container.collapse {
margin-left:90px;
height:100% !important;
}
| {'content_hash': '63b6bd3e3d20fcbf43f12e487ac1dd8b', 'timestamp': '', 'source': 'github', 'line_count': 15, 'max_line_length': 34, 'avg_line_length': 21.2, 'alnum_prop': 0.6635220125786163, 'repo_name': 'iuap-design/designer', 'id': 'a1dac2b7297537f2b77dc158eb2a9d51d97e4d6f', 'size': '318', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'static/css/main.css', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '257302'}, {'name': 'HTML', 'bytes': '225511'}, {'name': 'JavaScript', 'bytes': '2022311'}]} |
module BohFoundation.Common.Enums {
export enum YearOfHighSchool {
Freshman = 0,
Sophomore = 1,
Junior = 2,
Senior = 3
}
} | {'content_hash': 'a985e27ac5669ae3f8ecfd93c8a38d41', 'timestamp': '', 'source': 'github', 'line_count': 8, 'max_line_length': 36, 'avg_line_length': 21.0, 'alnum_prop': 0.5297619047619048, 'repo_name': 'Sobieck00/BOH-Bulldog-Scholarship-Application-Management', 'id': '58809db175041037582cd13e9e5bb8790a6f6a8a', 'size': '170', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'BohFoundation.WebApi/AngularApp/Common/Enums/YearOfHighSchool.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ASP', 'bytes': '114'}, {'name': 'C#', 'bytes': '962582'}, {'name': 'CSS', 'bytes': '164646'}, {'name': 'JavaScript', 'bytes': '390553'}, {'name': 'Shell', 'bytes': '97'}, {'name': 'TypeScript', 'bytes': '1017223'}]} |
peanoclaw::native::scenarios::BreakingDamSWEScenario::BreakingDamSWEScenario(
const tarch::la::Vector<DIMENSIONS, double>& domainOffset,
const tarch::la::Vector<DIMENSIONS, double>& domainSize,
const tarch::la::Vector<DIMENSIONS, int>& finestSubgridTopology,
const tarch::la::Vector<DIMENSIONS, int>& coarsestSubgridTopology,
const tarch::la::Vector<DIMENSIONS, int>& subdivisionFactor,
double globalTimestepSize,
double endTime
) : _domainOffset(domainOffset),
_domainSize(domainSize),
_minimalMeshWidth(-1),
_maximalMeshWidth(-1),
_subdivisionFactor(subdivisionFactor),
_globalTimestepSize(globalTimestepSize),
_endTime(endTime),
_refinementCriterion(GradientBased)
{
_minimalMeshWidth
= tarch::la::multiplyComponents(domainSize, tarch::la::invertEntries(finestSubgridTopology.convertScalar<double>()));
_maximalMeshWidth
= tarch::la::multiplyComponents(domainSize, tarch::la::invertEntries(coarsestSubgridTopology.convertScalar<double>()));
// assertion2(tarch::la::allGreaterEquals(_maximalMeshWidth, _minimalMeshWidth), _minimalMeshWidth, _maximalMeshWidth);
assertion2(tarch::la::allSmallerEquals(_minimalMeshWidth, _maximalMeshWidth), _minimalMeshWidth, _maximalMeshWidth);
}
peanoclaw::native::scenarios::BreakingDamSWEScenario::BreakingDamSWEScenario(
std::vector<std::string> arguments
) : _domainOffset(0),
_domainSize(1){
if(arguments.size() != 6) {
std::cerr << "Expected arguments for Scenario 'BreakingDam': finestSubgridTopology coarsestSubgridTopology subdivisionFactor endTime globalTimestepSize refinementCriterion" << std::endl
<< "\tGot " << arguments.size() << " arguments." << std::endl;
throw "";
}
double finestSubgridTopologyPerDimension = atof(arguments[0].c_str());
_minimalMeshWidth = _domainSize/ finestSubgridTopologyPerDimension;
double coarsestSubgridTopologyPerDimension = atof(arguments[1].c_str());
_maximalMeshWidth = _domainSize/ coarsestSubgridTopologyPerDimension;
_subdivisionFactor = tarch::la::Vector<DIMENSIONS,int>(atoi(arguments[2].c_str()));
_endTime = atof(arguments[3].c_str());
_globalTimestepSize = atof(arguments[4].c_str());
_refinementCriterion = atoi(arguments[5].c_str()) == 0 ? GradientBased : Predefined;
}
peanoclaw::native::scenarios::BreakingDamSWEScenario::~BreakingDamSWEScenario() {}
void peanoclaw::native::scenarios::BreakingDamSWEScenario::initializePatch(peanoclaw::Patch& patch) {
// compute from mesh data
const tarch::la::Vector<DIMENSIONS, double> patchPosition = patch.getPosition();
const tarch::la::Vector<DIMENSIONS, double> meshWidth = patch.getSubcellSize();
peanoclaw::grid::SubgridAccessor& accessor = patch.getAccessor();
tarch::la::Vector<DIMENSIONS, int> subcellIndex;
for (int yi = 0; yi < patch.getSubdivisionFactor()(1); yi++) {
for (int xi = 0; xi < patch.getSubdivisionFactor()(0); xi++) {
subcellIndex(0) = xi;
subcellIndex(1) = yi;
double X = patchPosition(0) + (xi+0.5)*meshWidth(0);
double Y = patchPosition(1) + (yi+0.5)*meshWidth(1);
double q0 = getWaterHeight(X, Y);
double q1 = 0.0; //hl*ul*(r<=radDam) + hr*ur*(r>radDam);
double q2 = 0.0; //hl*vl*(r<=radDam) + hr*vr*(r>radDam);
accessor.setValueUNew(subcellIndex, 0, q0);
accessor.setValueUNew(subcellIndex, 1, q1);
accessor.setValueUNew(subcellIndex, 2, q2);
accessor.setParameterWithGhostlayer(subcellIndex, 0, 0.0);
assertion2(tarch::la::equals(accessor.getValueUNew(subcellIndex, 0), q0, 1e-5), accessor.getValueUNew(subcellIndex, 0), q0);
assertion2(tarch::la::equals(accessor.getValueUNew(subcellIndex, 1), q1, 1e-5), accessor.getValueUNew(subcellIndex, 1), q1);
assertion2(tarch::la::equals(accessor.getValueUNew(subcellIndex, 2), q2, 1e-5), accessor.getValueUNew(subcellIndex, 2), q2);
}
}
}
tarch::la::Vector<DIMENSIONS,double> peanoclaw::native::scenarios::BreakingDamSWEScenario::computeDemandedMeshWidth(
peanoclaw::Patch& patch,
bool isInitializing
) {
if(_refinementCriterion == GradientBased)
{
if(tarch::la::equals(_minimalMeshWidth, _maximalMeshWidth)) {
return _minimalMeshWidth;
}
double max_gradient = 0.0;
const tarch::la::Vector<DIMENSIONS, double> meshWidth = patch.getSubcellSize();
peanoclaw::grid::SubgridAccessor& accessor = patch.getAccessor();
tarch::la::Vector<DIMENSIONS, int> this_subcellIndex;
tarch::la::Vector<DIMENSIONS, int> next_subcellIndex_x;
tarch::la::Vector<DIMENSIONS, int> next_subcellIndex_y;
for (int yi = 0; yi < patch.getSubdivisionFactor()(1)-1; yi++) {
for (int xi = 0; xi < patch.getSubdivisionFactor()(0)-1; xi++) {
this_subcellIndex(0) = xi;
this_subcellIndex(1) = yi;
next_subcellIndex_x(0) = xi+1;
next_subcellIndex_x(1) = yi;
next_subcellIndex_y(0) = xi;
next_subcellIndex_y(1) = yi+1;
double q0 = accessor.getValueUNew(this_subcellIndex, 0);
double q0_x = (accessor.getValueUNew(next_subcellIndex_x, 0) - q0) / meshWidth(0);
double q0_y = (accessor.getValueUNew(next_subcellIndex_y, 0) - q0) / meshWidth(1);
max_gradient = fmax(max_gradient, sqrt(fabs(q0_x)*fabs(q0_x) + fabs(q0_y)*fabs(q0_y)));
}
}
tarch::la::Vector<DIMENSIONS,double> demandedMeshWidth;
if (max_gradient > 0.1) {
//demandedMeshWidth = 1.0/243;
//demandedMeshWidth = tarch::la::Vector<DIMENSIONS,double>(10.0/6/27);
demandedMeshWidth = _minimalMeshWidth;
} else if (max_gradient < 0.1) {
//demandedMeshWidth = 10.0/130/27;
//demandedMeshWidth = tarch::la::Vector<DIMENSIONS,double>(10.0/6/9);
demandedMeshWidth = _maximalMeshWidth;
} else {
demandedMeshWidth = patch.getSubcellSize();
}
// if(isInitializing) {
// return 10.0/6/9;
// } else {
// return demandedMeshWidth;
// }
return demandedMeshWidth;
} else {
double radius0 = 0.25 + patch.getTimeIntervals().getCurrentTime() * 0.75 / 0.5;
double radius1 = 0.25 - patch.getTimeIntervals().getCurrentTime() * 0.5 / 0.5;
double radius2 = 0.25 - patch.getTimeIntervals().getCurrentTime() * 0.7 / 0.5;
double distanceToCenter = tarch::la::norm2(patch.getPosition() + patch.getSize() / 2.0 - tarch::la::Vector<DIMENSIONS, double>(0.5));
double distanceToCircle0 = abs(distanceToCenter - radius0);
double distanceToCircle1 = abs(distanceToCenter - radius1);
double distanceToCircle2 = abs(distanceToCenter - radius2);
double subgridDiagonal = tarch::la::norm2(patch.getSize());
tarch::la::Vector<DIMENSIONS,double> demandedMeshWidth;
if(distanceToCircle0 < subgridDiagonal / 2.0
|| distanceToCircle1 < subgridDiagonal / 2.0
|| distanceToCircle2 < subgridDiagonal / 2.0)
{
demandedMeshWidth = _minimalMeshWidth;
} else if(distanceToCircle0 >= subgridDiagonal / 2.0
|| distanceToCircle1 >= subgridDiagonal / 2.0
|| distanceToCircle2 >= subgridDiagonal / 2.0)
{
demandedMeshWidth = _maximalMeshWidth;
} else {
demandedMeshWidth = patch.getSubcellSize();
}
return demandedMeshWidth;
}
}
tarch::la::Vector<DIMENSIONS,double> peanoclaw::native::scenarios::BreakingDamSWEScenario::getDomainOffset() const {
return _domainOffset;
}
tarch::la::Vector<DIMENSIONS,double> peanoclaw::native::scenarios::BreakingDamSWEScenario::getDomainSize() const {
return _domainSize;
}
tarch::la::Vector<DIMENSIONS,double> peanoclaw::native::scenarios::BreakingDamSWEScenario::getInitialMinimalMeshWidth() const {
return _maximalMeshWidth;
}
tarch::la::Vector<DIMENSIONS,int> peanoclaw::native::scenarios::BreakingDamSWEScenario::getSubdivisionFactor() const {
return _subdivisionFactor;
}
double peanoclaw::native::scenarios::BreakingDamSWEScenario::getGlobalTimestepSize() const {
return _globalTimestepSize;
}
double peanoclaw::native::scenarios::BreakingDamSWEScenario::getEndTime() const {
return _endTime;
}
float peanoclaw::native::scenarios::BreakingDamSWEScenario::getWaterHeight(float x, float y) {
// dam coordinates
const double x0=1/2.0;
const double y0=1/2.0;
// Riemann states of the dam break problem
const double radDam = 0.25;
const double hl = 3.;
const double hr = 2.;
double r = sqrt((x-x0)*(x-x0) + (y-y0)*(y-y0));
return hl*(r<=radDam) + hr*(r>radDam);
}
| {'content_hash': '766683cfc8ec4e4e8efa267bd69a6e61', 'timestamp': '', 'source': 'github', 'line_count': 205, 'max_line_length': 189, 'avg_line_length': 42.15609756097561, 'alnum_prop': 0.6810923397361722, 'repo_name': 'unterweg/peanoclaw', 'id': '7f186f7ee4028d23a794b3e70e6f9df716020937', 'size': '8686', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/peanoclaw/native/scenarios/BreakingDam.cpp', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'C', 'bytes': '9135'}, {'name': 'C++', 'bytes': '5530978'}, {'name': 'HTML', 'bytes': '49'}, {'name': 'Makefile', 'bytes': '9824'}, {'name': 'PHP', 'bytes': '477'}, {'name': 'Python', 'bytes': '208364'}, {'name': 'Shell', 'bytes': '3620'}]} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {'content_hash': '487de329619b80e91c74498ba2ead99e', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'e2021feea947c94529cfcdcfd48cf4febf5bf2c9', 'size': '199', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Magnoliopsida/Asterales/Asteraceae/Doellingeria/Doellingeria umbellata/ Syn. Diplostephium amygdalinum amygdalinum/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []} |
<?xml version="1.0" encoding="UTF-8"?>
<MetaDataObject xmlns="http://v8.1c.ru/8.3/MDClasses" xmlns:app="http://v8.1c.ru/8.2/managed-application/core" xmlns:cfg="http://v8.1c.ru/8.1/data/enterprise/current-config" xmlns:cmi="http://v8.1c.ru/8.2/managed-application/cmi" xmlns:ent="http://v8.1c.ru/8.1/data/enterprise" xmlns:lf="http://v8.1c.ru/8.2/managed-application/logform" xmlns:style="http://v8.1c.ru/8.1/data/ui/style" xmlns:sys="http://v8.1c.ru/8.1/data/ui/fonts/system" xmlns:v8="http://v8.1c.ru/8.1/data/core" xmlns:v8ui="http://v8.1c.ru/8.1/data/ui" xmlns:web="http://v8.1c.ru/8.1/data/ui/colors/web" xmlns:win="http://v8.1c.ru/8.1/data/ui/colors/windows" xmlns:xen="http://v8.1c.ru/8.3/xcf/enums" xmlns:xpr="http://v8.1c.ru/8.3/xcf/predef" xmlns:xr="http://v8.1c.ru/8.3/xcf/readable" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.12">
<CommonModule uuid="44b8472b-0f70-49cc-8f71-9c9d3e9cfbcc">
<Properties>
<Name>ПользователиСлужебныйКлиент</Name>
<Synonym>
<v8:item>
<v8:lang>ru</v8:lang>
<v8:content>Пользователи служебный клиент</v8:content>
</v8:item>
</Synonym>
<Comment/>
<Global>false</Global>
<ClientManagedApplication>true</ClientManagedApplication>
<Server>false</Server>
<ExternalConnection>false</ExternalConnection>
<ClientOrdinaryApplication>true</ClientOrdinaryApplication>
<ServerCall>false</ServerCall>
<Privileged>false</Privileged>
<ReturnValuesReuse>DontUse</ReturnValuesReuse>
</Properties>
</CommonModule>
</MetaDataObject> | {'content_hash': '7ae166f785323935de5d025bc25d949a', 'timestamp': '', 'source': 'github', 'line_count': 23, 'max_line_length': 868, 'avg_line_length': 68.65217391304348, 'alnum_prop': 0.7175427485750475, 'repo_name': 'BlizD/Tasks', 'id': '9aa84c08db264d4e66f52ad6e49fd4a7c91de03b', 'size': '1635', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develope', 'path': 'src/cf/CommonModules/ПользователиСлужебныйКлиент.xml', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': '1C Enterprise', 'bytes': '42181596'}, {'name': 'Gherkin', 'bytes': '33203'}, {'name': 'HTML', 'bytes': '2276241'}]} |
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {'content_hash': '31ba1824ce93626621513971e0e928c9', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.23076923076923, 'alnum_prop': 0.6917293233082706, 'repo_name': 'mdoering/backbone', 'id': 'bd64296d24ffc9e3f82ab8e51be7cb70b8ebc7f6', 'size': '201', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Plantae/Magnoliophyta/Liliopsida/Asparagales/Orchidaceae/Gomesa/Gomesa praetexta/ Syn. Anettea praetexta/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Marquesas palm factsheet on ARKive - Pelagodoxa henryana</title>
<link rel="canonical" href="http://www.arkive.org/marquesas-palm/pelagodoxa-henryana/" />
<link rel="stylesheet" type="text/css" media="screen,print" href="/rcss/factsheet.css" />
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
</head>
<body> <!-- onload="window.print()">-->
<div id="container">
<div id="header"><a href="/"><img src="/rimg/factsheet/header_left.png" alt="" border="0" /><img src="/rimg/factsheet/header_logo.png" alt="" border="0" /><img src="/rimg/factsheet/header_right.png" alt="" border="0" /></a></div>
<div id="content">
<h1>Marquesas palm (<i>Pelagodoxa henryana</i>)</h1>
<img alt="" src="/media/E8/E8A1FA7E-86EB-4C83-B4CF-33D195BD0451/Presentation.Large/Marquesas-palm-trees.jpg"/>
<table cellspacing="0" cellpadding="0" id="factList">
<tbody>
<tr class="kingdom"><th align="left">Kingdom</th><td align="left">Plantae</td></tr>
<tr class="phylum"><th align="left">Phylum</th><td align="left">Tracheophyta</td></tr>
<tr class="class"><th align="left">Class</th><td align="left">Liliopsida</td></tr>
<tr class="order"><th align="left">Order</th><td align="left">Arecales</td></tr>
<tr class="family"><th align="left">Family</th><td align="left">Palmae</td></tr>
<tr class="genus"><th align="left">Genus</th><td align="left"><em>Pelagodoxa (1)</em></td></tr>
</tbody>
</table>
<h2><img src="/rimg/factsheet/Status.png" class="heading" /></h2><p class="Status"><p>Classified as Critically Endangered (CR) on the IUCN Red List (1).</p></p><h2><img src="/rimg/factsheet/Description.png" class="heading" /></h2><p class="Description"><p>Information on the Marquesas palm is currently being researched and written and will appear here shortly.</p></p><h2><img src="/rimg/factsheet/Authentication.png" class="heading" /></h2><p class="AuthenticatioModel">This information is awaiting authentication by a species expert, and will be updated as soon as possible. If you are able to help please contact: <a href="mailto:arkive@wildscreen.org.uk">arkive@wildscreen.org.uk</a></p><h2><img src="/rimg/factsheet/References.png" class="heading" /></h2>
<ol id="references">
<li id="ref1">
<a id="reference_1" name="reference_1"></a>
IUCN Red List (June, 2009) <br/><a href="http://www.iucnredlist.org" target="_blank">http://www.iucnredlist.org</a></li>
</ol>
</div>
</div>
</body>
</html>
| {'content_hash': 'c91b290a5ddba1b54a172f5c53b3e4e2', 'timestamp': '', 'source': 'github', 'line_count': 39, 'max_line_length': 769, 'avg_line_length': 72.23076923076923, 'alnum_prop': 0.6641817536386226, 'repo_name': 'andrewedstrom/cs638project', 'id': 'bb06a3cc98f1cfa9c19908289a9ec77d1636a7ef', 'size': '2819', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'raw_data/arkive-critically-endangered-html/pelagodoxa-henryana.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '514473381'}, {'name': 'Jupyter Notebook', 'bytes': '2192214'}, {'name': 'Python', 'bytes': '30115'}, {'name': 'R', 'bytes': '9081'}]} |
using namespace std;
//
// Byte value
//
class CLRInt32 : public CLRValue<int32_t>
{
public:
CLRInt32 (CLRApi* api, int32_t* value = nullptr)
: CLRValue(CLRMessage::TypeInt32, api, value)
{
}
// serialize object to stream
void serialize (BufferedSocketWriter& stream)
{
assert (_value != NULL);
CLRMessage::serialize (stream);
stream.write_int32 (*_value);
}
// deserialize object from stream
void deserialize (BufferedSocketReader& stream)
{
_value = new int32_t;
*_value = stream.read_int32();
}
};
#endif
| {'content_hash': '9100fb75a0f767a8ce4d728845e1a726', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 52, 'avg_line_length': 18.5, 'alnum_prop': 0.6165540540540541, 'repo_name': 'tr8dr/.Net-Bridge', 'id': 'f1db8ae518d83898c23edf6f15202476e25f1cb4', 'size': '1435', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/R/rDotNet/src/msgs/data/CLRInt32.hpp', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '1950350'}, {'name': 'C++', 'bytes': '91258'}, {'name': 'Python', 'bytes': '111123'}, {'name': 'R', 'bytes': '16746'}, {'name': 'Shell', 'bytes': '2404'}]} |
<!DOCTYPE html>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-route.js"></script>
<div ng-app="user_app" ng-controller="user_ctrl">
<head>
<title>Edit profile: {{ user_name }} | Hacker News</title>
</head>
<body>
<center>
<table bgcolor="#f6f6ef" border="0" cellpadding="0" cellspacing="0" width="85%">
<tbody>
<tr>
<td bgcolor="ff6600">
<table style="padding:2px" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td style="width:18px;padding-right:4px">
<a ng-href="./index.html?token={{token}}&userid={{my_user_id}}" target="_self"><img src="./img/y18.gif"></a>
</td>
<td class="header">
<font size="4"> <b><a target="_self" ng-href="./index.html?token={{token}}&userid={{my_user_id}}">Hacker News</a></b></font>
<font size="3">
<a target="_self" ng-href="./index.html?token={{token}}&userid={{my_user_id}}">new</a> |
<a ng-href="./threads.html?token={{token}}&userid={{my_user_id}}" target="_self">threads</a> |
<a ng-href="./ask.html?token={{token}}&userid={{my_user_id}}" target="_self">ask</a> |
<a target="_self" ng-href="./submissions/new.html?token={{token}}&userid={{my_user_id}}">submit</a>
</font>
</td>
<td>
<font size="3">
<div align="right">
<a id="login" href="#" target="_self" >Log in</a>
<a id="logout" href="./index.html" target="_self" >| Log out</a>
</div>
</font>
</td>
<td class="spacer" style="width:10px"></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr style="height:10px"></tr>
<tr>
<td>
<table>
<tbody>
<div style="margin-left:20px">
<p>
<strong>About:</strong>
{{ user_about }}
</p>
<div style="margin-left:20px">
<form id="update_user_form" novalidate class="simple-form" ng-submit="updateUser()">
<textarea id="update_user" value="" form="update_user_form"
style="min-width:500px;min-height:100px"></textarea>
<input type="submit" value="Update User" />
</form>
</div>
</div>
<tr class="spacer" style="height:20px"></tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</center>
</body>
<script>
var app = angular.module("user_app", ["ngRoute"]);
app.config(function($locationProvider) {
$locationProvider.html5Mode({
enabled: true,
requireBase: false
}).hashPrefix('!');
});
app.controller('user_ctrl', ['$scope', '$location', '$http', '$window',
function ($scope, $location, $http, $window) {
$scope.updateUser = function() {
if ($scope.my_user_id) {
var text = document.getElementById('update_user').value
$http.put('https://hackernew.herokuapp.com/users.json', {'about': text}, {headers: {'api_key': $scope.token, 'Content-type': 'application/json'}}).then(function(response) {
$window.location.reload();
});
}
else {
alert("Not authenticated.");
}
};
//Get ID out of current URL
var token_id = $location.search().token;
$scope.token = token_id;
var my_user_id = $location.search().userid;
$scope.my_user_id = my_user_id;
var user_id = $location.search().userprofileid;
$scope.user_id = user_id;
if(my_user_id){
document.getElementById("login").href="./user_profile.html?userprofileid=" + user_id + "&token=" + token_id + "&userid=" + my_user_id;
document.getElementById("login").textContent = "usuari";
document.getElementById("logout").style.display = "inline";
document.getElementById("logout").href="./index.html";
$http.get("https://hackernew.herokuapp.com/users/"+my_user_id+".json")
.then(function(response) {
document.getElementById("login").textContent = response.data.name;
});
}
else{
document.getElementById("login").href="https://hackernew.herokuapp.com/signin?url=" + document.URL;
document.getElementById("login").textContent = "login";
document.getElementById("logout").style.display = "none";
}
$http.get("https://hackernew.herokuapp.com/users/"+user_id+".json").then(function(response) {
$scope.user_id = response.data.id;
$scope.user_about = response.data.about;
$scope.profileUrl = "./user_profile.html?userprofileid="+response.data.id+"&token="+token_id+"&userid="+my_user_id;
});
}]);
</script>
</div> | {'content_hash': '91271682df5a99d1ab3e722a20f22a7e', 'timestamp': '', 'source': 'github', 'line_count': 139, 'max_line_length': 196, 'avg_line_length': 44.539568345323744, 'alnum_prop': 0.4343401712162817, 'repo_name': 'victorpm5/HackerNew-Angular', 'id': '02b2203be1c29e62565971410bc1dee3143c563a', 'size': '6191', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'public/user_edit.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'HTML', 'bytes': '91321'}, {'name': 'JavaScript', 'bytes': '31109'}]} |
describe("bookmarkManager", function() {
var scope,
response_data,
$httpBackend;
beforeEach(angular.mock.module("feedhoos"));
beforeEach(angular.mock.inject(function($rootScope, _$httpBackend_) {
scope = $rootScope.$new();
defalt_id = 0;
$httpBackend = _$httpBackend_;
$httpBackend.expect("GET", "/bookmark/list/")
.respond('{' +
'"2": {"rating": 3, "folder_id": 1},' +
'"0": {"rating": 6, "folder_id": 0},' +
'"3": {"rating": 0, "folder_id": 3},' +
'"1": {"rating": 5, "folder_id": 3}' +
'}');
response_data = {
"2": {"rating": 3, "folder_id": 1},
"0": {"rating": 6, "folder_id": 0},
"3": {"rating": 0, "folder_id": 3},
"1": {"rating": 5, "folder_id": 3}
};
}));
it('should set', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
expect(bookmarkManager.data).toEqual(response_data);
}));
it('should remove', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
var expect_data = {
"2": {"rating": 3, "folder_id": 1},
"0": {"rating": 6, "folder_id": 0},
"3": {"rating": 0, "folder_id": 3},
};
bookmarkManager.remove(1);
expect(bookmarkManager.data).toEqual(expect_data);
}));
it('should add', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
var expect_data = {
"8": {"rating": 0, "folder_id": 0},
"2": {"rating": 3, "folder_id": 1},
"0": {"rating": 6, "folder_id": 0},
"3": {"rating": 0, "folder_id": 3},
"1": {"rating": 5, "folder_id": 3}
};
bookmarkManager.add(8);
expect(bookmarkManager.data).toEqual(expect_data);
}));
it('should set_rating', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
var expect_data = {
"2": {"rating": 5, "folder_id": 1},
"0": {"rating": 6, "folder_id": 0},
"3": {"rating": 0, "folder_id": 3},
"1": {"rating": 5, "folder_id": 3}
};
bookmarkManager.set_rating(2, 5);
expect(bookmarkManager.data).toEqual(expect_data);
}));
it('should get_folder_id', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
expect(bookmarkManager.get_folder_id(1)).toEqual(3);
}));
it('should set_folder_id', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
var feed_id = 1;
var folder_id = 5;
$httpBackend.expect("POST", bookmarkManager.folder_url, "feed_id=" + encodeURIComponent(feed_id) + "&folder_id=" + encodeURIComponent(folder_id))
.respond();
bookmarkManager.set_folder_id(feed_id, folder_id);
$httpBackend.flush();
expect(bookmarkManager.get_folder_id(1)).toEqual(5);
}));
it('should get_feed_ids_by_folder_id', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
expect(bookmarkManager.get_feed_ids_by_folder_id(1)).toEqual([2]);
}));
it('should remove_folder', inject(function(bookmarkManager) {
bookmarkManager.set(scope, function() {});
$httpBackend.flush();
bookmarkManager.remove_folder(3);
expect_data = {
"2": {"rating": 3, "folder_id": 1},
"0": {"rating": 6, "folder_id": 0},
"3": {"rating": 0, "folder_id": 0},
"1": {"rating": 5, "folder_id": 0}
};
expect(bookmarkManager.data).toEqual(expect_data);
}));
});
| {'content_hash': 'a193b4535eb97de8c1782490721f5cfe', 'timestamp': '', 'source': 'github', 'line_count': 106, 'max_line_length': 153, 'avg_line_length': 37.91509433962264, 'alnum_prop': 0.5195322219457577, 'repo_name': '38elements/feedhoos', 'id': '71c183ec95744d7b3cf836ac142935b4fbf4b6a1', 'size': '4019', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'feedhoos/finder/static/js/test/services/bookmark_manager_spec.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '1371'}, {'name': 'HTML', 'bytes': '11174'}, {'name': 'JavaScript', 'bytes': '203944'}, {'name': 'Python', 'bytes': '37853'}, {'name': 'Shell', 'bytes': '515'}]} |
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null | {'content_hash': '75c364705a1a97b90851959c9723de52', 'timestamp': '', 'source': 'github', 'line_count': 13, 'max_line_length': 39, 'avg_line_length': 10.307692307692308, 'alnum_prop': 0.6940298507462687, 'repo_name': 'mdoering/backbone', 'id': '8c96a93746fde5cd23af6cc5909d657f197b2902', 'size': '164', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'life/Bacteria/Proteobacteria/Betaproteobacteria/Neisseriales/Neisseriaceae/Kingella/README.md', 'mode': '33188', 'license': 'apache-2.0', 'language': []} |
@implementation RMProgressViewStyle
@end
| {'content_hash': 'e34937159294d1b2af68b90a987f1898', 'timestamp': '', 'source': 'github', 'line_count': 3, 'max_line_length': 35, 'avg_line_length': 14.0, 'alnum_prop': 0.8571428571428571, 'repo_name': 'byzyn4ik/RMStyleManager', 'id': '743d09e6210f8f31ddc35eac5e76ccd02474a0a5', 'size': '155', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'RMStyleManager/Classes/Styles/RMProgressViewStyle.m', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Objective-C', 'bytes': '72339'}, {'name': 'Ruby', 'bytes': '1909'}, {'name': 'Shell', 'bytes': '9100'}]} |
// Type definitions for lusca 1.7
// Project: https://github.com/krakenjs/lusca#readme
// Definitions by: Corbin Crutchley <https://github.com/crutchcorn>
// Naoto Yokoyama <https://github.com/builtinnya>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import express = require('express');
declare function lusca(options?: lusca.LuscaOptions): express.RequestHandler;
declare namespace lusca {
/*~ Documentation declares that:
*~ Setting any value to false will disable it.
*/
interface LuscaOptions {
csrf?: csrfOptions | boolean;
csp?: cspOptions | false;
xframe?: string | false;
p3p?: string | false;
hsts?: hstsOptions | false;
xssProtection?: xssProtectionOptions | boolean;
nosniff?: boolean;
referrerPolicy?: string | false;
}
interface cspOptions {
policy?: string | object | Array<object | string>;
reportOnly?: boolean;
reportUri?: string;
styleNonce?: boolean;
scriptNonce?: boolean;
}
interface hstsOptions {
maxAge?: number;
includeSubDomains?: boolean;
preload?: boolean;
}
type csrfOptions = csrfOptionsBase & csrfOptionsAngularOrNonAngular & csrfOptionsBlocklistOrAllowlist;
interface csrfOptionsBase {
/**
* The name of the CSRF token in the model.
* @default '_csrf'
*/
key?: string;
/**
* @default '_csrfSecret'
*/
secret?: string;
/**
* An object with create/validate methods for custom tokens
*/
impl?: () => any;
/**
* The name of the response header containing the CSRF token
* @default 'x-csrf-token'
*/
header?: string;
}
interface csrfOptionsAngular {
cookie?: string | {
options?: object;
};
angular: true;
}
interface csrfOptionsNonAngular {
cookie?: string | {
name: string;
options?: object;
};
angular?: false;
}
type csrfOptionsAngularOrNonAngular = csrfOptionsAngular | csrfOptionsNonAngular;
interface csrfOptionsBlocklist {
blocklist?: string[];
allowlist?: never;
}
interface csrfOptionsAllowlist {
blocklist?: never;
allowlist?: string[];
}
type csrfOptionsBlocklistOrAllowlist = csrfOptionsBlocklist | csrfOptionsAllowlist;
interface xssProtectionOptions {
enabled?: boolean;
mode?: string;
}
function csrf(options?: csrfOptions): express.RequestHandler;
function csp(options?: cspOptions): express.RequestHandler;
function xframe(value: string): express.RequestHandler;
function p3p(value: string): express.RequestHandler;
function hsts(options?: hstsOptions): express.RequestHandler;
function xssProtection(options?: xssProtectionOptions | true): express.RequestHandler;
function nosniff(): express.RequestHandler;
function referrerPolicy(value: string): express.RequestHandler;
}
export = lusca;
| {'content_hash': '6816642808f32064c77a6f35cdd1320e', 'timestamp': '', 'source': 'github', 'line_count': 108, 'max_line_length': 106, 'avg_line_length': 29.712962962962962, 'alnum_prop': 0.62574010595201, 'repo_name': 'georgemarshall/DefinitelyTyped', 'id': '2d68bef41fc8c851f1a2ba05b438237ef672ee39', 'size': '3211', 'binary': False, 'copies': '2', 'ref': 'refs/heads/master', 'path': 'types/lusca/index.d.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'JavaScript', 'bytes': '16338312'}, {'name': 'Ruby', 'bytes': '40'}, {'name': 'Shell', 'bytes': '73'}, {'name': 'TypeScript', 'bytes': '17728346'}]} |
Scazelcast
==========
The intention for Scazelcast is to produce a simple wrapper library for the
[hazelcast](https://github.com/hazelcast/hazelcast) distributed cache/memory grid.
The wrapper will make it easier to use from a Scala program, ie hide all the messy Java stuff.
IN addition there are some higher level libraries, such as scazelcast-akka that create an Akka Actor abstraction to the
underlying hazelcast grid. This allows us to use Hazelcast from Akka in a non blocking reactive manner
## Jars
The project is broken into a number of separate .jar files that depend on each other hierarchically
* scazelcast-api
- Pimps and wrappers for Hazelcast.
* scazelcast-types
- Additional distributed data structures built on top of hazelcast low level API, more suited to functional programming.
* scazelcast-akka
- Depends on scazelcast-api.
- Transmogrify the scalzelcast API into an Akka Actor for nice non-blocking reactive use.
* scazelcast-demo
- Depends on scazelcast-akka.
- Working web-app using Spray-IO and scazelcast-akka to demo and play with use cases.
## Usage
Add the following to your project's project/plugins.sbt file:-
//resolver for sbt-s3-resolver
resolvers += "Era7 maven releases" at "http://releases.era7.com.s3.amazonaws.com"
addSbtPlugin("ohnosequences" % "sbt-s3-resolver" % "0.12.0")
Add the following lines to your projects build.sbt:-
resolvers += Resolver.url("owtelse-repo-oss", new URL("https://s3-ap-southeast-2.amazonaws.com/owtelse-repo-oss/"))(Resolver.ivyStylePatterns)
libraryDependencies ++= {
val scazelcastV = "2.11-0.2.2-20150914102020-04d1469"
Seq(
"com.owtelse" % "scazelcast-api" % scazelcastV
)
}
## Features implemented
### scazelcast-api
#### Map
* Get and Put return an Option[V] and trap exceptions to produce None
### scalzelcast-types
### scalzelcast-akka
* Basic Actor for asynchronously getting and putting from a hazelcast IMap.
## TODO
| {'content_hash': '85558da518a759973aca88fb115818e2', 'timestamp': '', 'source': 'github', 'line_count': 65, 'max_line_length': 146, 'avg_line_length': 30.953846153846154, 'alnum_prop': 0.7301192842942346, 'repo_name': 'karlroberts/scazelcast', 'id': '909d042d0d4d3054a8ee35d0024abf244377bc32', 'size': '2012', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'README.md', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Scala', 'bytes': '35116'}]} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
namespace JTZS
{
class Rifle: Item
{
private GraphicsLib graphicsLib;
private Vector2 position;
private BoundingSphere bSphere;
private String itemName;
public Rifle(Vector2 position, GraphicsLib graphicsLib)
{
this.position = position;
this.graphicsLib = graphicsLib;
itemName = "Rifle";
}
public Vector2 Position()
{
return position;
}
public BoundingSphere Sphere()
{
return bSphere;
}
public string ItemName()
{
return itemName;
}
public void Collision(Player player)
{
if (player.CurrenWeapon == itemName)
{
player.AddAmmo(15);
}
else
{
player.ShotInterval = 250f;
player.CurrenWeapon = itemName;
player.Damage = 3;
player.Ammo = 15;
}
}
public void Update(GameTime gameTime)
{
bSphere = new BoundingSphere(
new Vector3(position.X, position.Y, 0), 10
);
}
public void Draw(SpriteBatch spriteBatch)
{
spriteBatch.Draw(
graphicsLib.rifle,
position,
null,
Color.White,
0,
new Vector2(graphicsLib.rifle.Width / 2, graphicsLib.rifle.Height / 2),
1f,
SpriteEffects.None,
0);
}
}
}
| {'content_hash': '32dc368895ecbde27a30e9f77098a0d9', 'timestamp': '', 'source': 'github', 'line_count': 75, 'max_line_length': 91, 'avg_line_length': 24.346666666666668, 'alnum_prop': 0.4791894852135816, 'repo_name': 'marsojm/JTZS', 'id': '70c1b504e3d98806996b20cf66ce07193b8dee4f', 'size': '1828', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'JTZS/Rifle.cs', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '57723'}]} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>zchinese: 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.13.2 / zchinese - 8.10.0</a></li>
</ul>
</div>
</div>
</div>
<div class="article">
<div class="row">
<div class="col-md-12">
<a href="../..">« Up</a>
<h1>
zchinese
<small>
8.10.0
<span class="label label-info">Not compatible 👼</span>
</small>
</h1>
<p>📅 <em><script>document.write(moment("2022-03-02 03:01:05 +0000", "YYYY-MM-DD HH:mm:ss Z").fromNow());</script> (2022-03-02 03:01:05 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
conf-gmp 4 Virtual package relying on a GMP lib system installation
coq 8.13.2 Formal proof management system
num 1.4 The legacy Num library for arbitrary-precision integer and rational arithmetic
ocaml 4.09.1 The OCaml compiler (virtual package)
ocaml-base-compiler 4.09.1 Official release 4.09.1
ocaml-config 1 OCaml Switch Configuration
ocamlfind 1.9.3 A library manager for OCaml
zarith 1.12 Implements arithmetic and logical operations over arbitrary-precision integers
# opam file:
opam-version: "2.0"
maintainer: "Hugo.Herbelin@inria.fr"
homepage: "https://github.com/coq-contribs/zchinese"
license: "Unknown"
build: [make "-j%{jobs}%"]
install: [make "install"]
remove: ["rm" "-R" "%{lib}%/coq/user-contrib/ZChinese"]
depends: [
"ocaml"
"coq" {>= "8.10" & < "8.11~"}
]
tags: [
"keyword: number theory"
"keyword: chinese remainder"
"keyword: primality"
"keyword: prime numbers"
"category: Mathematics/Arithmetic and Number Theory/Number theory"
"category: Miscellaneous/Extracted Programs/Arithmetic"
]
authors: [
"Valérie Ménissier-Morain"
]
bug-reports: "https://github.com/coq-contribs/zchinese/issues"
dev-repo: "git+https://github.com/coq-contribs/zchinese.git"
synopsis: "A proof of the Chinese Remainder Lemma"
description: """
This is a rewriting of the contribution chinese-lemma using Zarith"""
flags: light-uninstall
url {
src: "https://github.com/coq-contribs/zchinese/archive/v8.10.0.tar.gz"
checksum: "md5=4c3d13feff5035fbabc8df1943ab7219"
}
</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-zchinese.8.10.0 coq.8.13.2</code></dd>
<dt>Return code</dt>
<dd>5120</dd>
<dt>Output</dt>
<dd><pre>[NOTE] Package coq is already installed (current version is 8.13.2).
The following dependencies couldn't be met:
- coq-zchinese -> coq < 8.11~ -> ocaml < 4.06.0
base of this switch (use `--unlock-base' to force)
Your request can't be satisfied:
- No available version of coq satisfies the constraints
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-zchinese.8.10.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': 'df9cd08c9c0d77d318af2ea08c202319', 'timestamp': '', 'source': 'github', 'line_count': 174, 'max_line_length': 159, 'avg_line_length': 40.90229885057471, 'alnum_prop': 0.5491077701278628, 'repo_name': 'coq-bench/coq-bench.github.io', 'id': '5e10f967b6c27955ccf3edacea790e2aa1ff10b1', 'size': '7144', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'clean/Linux-x86_64-4.09.1-2.0.6/released/8.13.2/zchinese/8.10.0.html', 'mode': '33188', 'license': 'mit', 'language': []} |
<a href="" class="btn btn-info" role="button" ng-click="goBack();">Go back</a>
<h1>{{poll.name}}</h1>
<div ng-repeat="question in poll.questions track by $index">
<data ng-init="parentIndex=$index"/>
<div class="row">
<h3>{{parentIndex + 1}}. {{question.name}}</h3>
</div>
<div class="row">
<div class="col-lg-6">
<table class="table">
<thead>
<tr>
<th>Answer</th>
<th>Votes</th>
<th>Users</th>
<th ng-if="question.allowAnonymous">Anonymous votes</th>
<th>Who</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="answer in question.answers">
<td>{{answer.name}}</td>
<td>{{answer.users.length}}</td>
<td>{{answer.distinctUsers.length}}<span ng-if="question.allowAnonymous"> (+ ?)</span></td>
<td ng-if="question.allowAnonymous">{{answer.anonymousAnswersCount}}</td>
<td>
<ul>
<li ng-repeat="user in answer.distinctUsers">
x{{user.voted}} : {{user.firstname}} {{user.lastname}} - {{user.email}}
</li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="col-lg-4">
<canvas class="chart chart-doughnut" chart-options="graphOptions" chart-data="question.graph.values" chart-labels="question.graph.labels"></canvas>
</div>
<div class="col-lg-2">
<canvas ng-attr-id="{{ 'participationchart' + parentIndex}}"></canvas>
</div>
</div>
</div>
<a href="" class="btn btn-info" role="button" ng-click="goBack();">Go back</a> | {'content_hash': 'ca5a17e6d3b91a8bcc9443eef78106ab', 'timestamp': '', 'source': 'github', 'line_count': 52, 'max_line_length': 151, 'avg_line_length': 28.596153846153847, 'alnum_prop': 0.5796906523201076, 'repo_name': 'xajkep/Teaching-HEIGVD-TWEB-2015-Project', 'id': '982214a9aa549d5d17a0470f0666325a7557381d', 'size': '1487', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'expressjs/app/static/res/partials/pollview.html', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '24004'}, {'name': 'HTML', 'bytes': '15669'}, {'name': 'JavaScript', 'bytes': '169700'}]} |
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
namespace LldbApi
{
/// <summary>
/// Interface mirrors the SBBroadcaster API as closely as possible.
/// </summary>
public interface SbBroadcaster
{
/// <summary>
/// Add listener to broadcaster.
/// </summary>
uint AddListener(SbListener listener, uint eventMask);
/// <summary>
/// Remove listener from broadcaster.
/// </summary>
uint RemoveListener(SbListener listener, uint eventMask);
}
}
| {'content_hash': '90113a32243518c084430101d23f2e7b', 'timestamp': '', 'source': 'github', 'line_count': 32, 'max_line_length': 75, 'avg_line_length': 33.625, 'alnum_prop': 0.6747211895910781, 'repo_name': 'googlestadia/vsi-lldb', 'id': '50ed508f6817b97f511f170b75cba655afac4b4d', 'size': '1078', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'LldbApi/SbBroadcaster.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '5758741'}, {'name': 'C++', 'bytes': '188695'}, {'name': 'Python', 'bytes': '3764'}]} |
echo "Content-type: text/html\n\n"
echo ""
if [ "$1" = "" ]; then
echo "please input filename\n"
exit 0
else
# test -e $1 && echo "this file name has exist\n" && exit 0
FILENAME=$1
fi
USERID=markii
USERPWD=socle-markii
CLIENTID=SCJ1hwDGVDaDlnD0OaNG
CLIENTSECRET=bRtNyXKP77WvmVzvkiJMd8LoSJC6Db3y
#touch ${FILENAME}
echo "****** Start ******\n"
# access token & refresh token
RESPONSE=$(curl -s -k -X POST -d "grant_type=password&username=${USERID}&password=${USERPWD}&client_id=${CLIENTID}&client_secret=${CLIENTSECRET}&scope=profile" https://my.9ifriend.com/oauth/token)
echo "\n"${RESPONSE}"\n"
if [ "$(echo ${RESPONSE}|cut -d'"' -f2)" = "error" ]; then
echo "\nmust get new authorization code\n"
else
ACCESS_TOKEN=$(echo ${RESPONSE}|cut -d'"' -f4)
REFRESH_TOKEN=$(echo ${RESPONSE}|cut -d'"' -f14)
echo "\nAccess Token: ${ACCESS_TOKEN}\n"
echo "\nRefresh Token: ${REFRESH_TOKEN}\n"
RESPONSE=$(curl -X POST -d '{"parentid":"0", "name":${FILENAME}, "mimetype":"application/apps.folder"}' -H "Authorization: Bearer $ACCESS_TOKEN" https://sas.9ifriend.com/v1.1/files)
echo "\n"${RESPONSE}"\n"
echo "\nuploading....\n"
fi
# rm ${FILENAME}
echo "\n****** END ******\n"
#exit 0
| {'content_hash': 'a2c251b4cad338e617f084ed5c29031e', 'timestamp': '', 'source': 'github', 'line_count': 33, 'max_line_length': 196, 'avg_line_length': 36.303030303030305, 'alnum_prop': 0.6585976627712855, 'repo_name': 'babananabanana/cheers', 'id': 'ce1d31cf3b3f495389b56c273397d4aa09272e1f', 'size': '1210', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'web/cgi-bin/cloud/mkdir.sh', 'mode': '33188', 'license': 'bsd-3-clause', 'language': [{'name': 'Batchfile', 'bytes': '1030'}, {'name': 'C', 'bytes': '2949'}, {'name': 'CSS', 'bytes': '1364'}, {'name': 'HTML', 'bytes': '4051'}, {'name': 'PHP', 'bytes': '70546'}, {'name': 'Python', 'bytes': '4552'}, {'name': 'Shell', 'bytes': '6094'}]} |
using System;
namespace Menu
{
// Прежде всего класс должен расширять интерфейс MenuComponent
public class MenuItem : MenuComponent
{
// Конструктор получает название, описание и т.д. и сохраняет ссылки на полученные данные. Он почти не отличается от конструктора в реализации
// iterator
public MenuItem(string name, string description, bool vegeterian, double price)
{
Name = name;
Description = description;
IsVegeterian = vegeterian;
Price = price;
}
// Get-методы не отличаются от реализации iterator
public override string Name { get; }
public override string Description { get; }
public override double Price { get; }
public override bool IsVegeterian { get; }
// А этот метод отличается от реализации iterator. Переопределяем метод print() класса MenuComponent. Для MenuItem этот метода выводит полное
// описание элемента меню: название, описание, цену и признак вегетарианского блюда
public override void Print()
{
Console.Write(" " + Name);
if (IsVegeterian)
{
Console.Write("(v)");
}
Console.WriteLine(", " + Price);
Console.WriteLine(" -- " + Description);
}
}
}
| {'content_hash': '12b4e09559018aeeaa28fec4cc07d562', 'timestamp': '', 'source': 'github', 'line_count': 40, 'max_line_length': 145, 'avg_line_length': 28.95, 'alnum_prop': 0.7107081174438687, 'repo_name': 'NeverNight/SimplesPatterns.CSharp', 'id': 'f4783ccf118e71777b3b85bb0b4b0ef54455ebba', 'size': '1497', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Composite/Menu/MenuItem.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'C#', 'bytes': '221972'}, {'name': 'Smalltalk', 'bytes': '493612'}]} |
import standardApi from '../Shared/actions/standardApi'
import { createAction } from 'redux-actions'
import { routeActions } from 'redux-simple-router'
import _ from 'lodash'
import selectCommandRejectionErrors from '../Shared/selectors/commandRejectionErrors'
import { messages } from './validation'
export const LOGIN = {
SENT: 'LOGIN_SENT',
FAIL: 'LOGIN_FAIL',
DONE: 'LOGIN_DONE',
DATA: 'LOGIN_DATA',
}
export default (formInput, dispatch) => (
new Promise((resolve, reject) => {
const { returnUrl, ...body } = formInput
return dispatch(standardApi({
types: [LOGIN.SENT, LOGIN.DONE, LOGIN.FAIL],
method: 'POST',
endpoint: `/api/login${returnUrl ? `?returnUrl=${returnUrl}` : ''}`,
body: body,
}))
.then((action) => {
const errors = selectCommandRejectionErrors(body, action, messages)
const location = action.type === LOGIN.DONE && _.get(action, 'payload.headers.location', false)
return errors
? reject(errors)
: location
? dispatch(createAction(LOGIN.DATA)(_.get(action, 'payload.data')))
.then(() => (dispatch(routeActions.push(location))))
: resolve()
})
})
)
| {'content_hash': '2fb70213e9e051b88a82e93d202aaeeb', 'timestamp': '', 'source': 'github', 'line_count': 35, 'max_line_length': 103, 'avg_line_length': 34.65714285714286, 'alnum_prop': 0.6281945589447651, 'repo_name': 'danludwig/eventsourced.net', 'id': '0262530c708c52acf0d20c00f9627be1c0d27ddc', 'size': '1213', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'src/EventSourced.Net.Web/Web/Login/actions.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'C#', 'bytes': '191855'}, {'name': 'CSS', 'bytes': '839'}, {'name': 'JavaScript', 'bytes': '2824483'}, {'name': 'Shell', 'bytes': '239'}]} |
package com.blossomproject.core.common.service;
import com.blossomproject.core.common.PluginConstants;
import com.blossomproject.core.common.dto.AbstractAssociationDTO;
import com.blossomproject.core.common.dto.AbstractDTO;
import java.util.List;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.plugin.core.Plugin;
@Qualifier(value = PluginConstants.PLUGIN_ASSOCIATION_SERVICE)
public interface AssociationServicePlugin extends Plugin<Class<? extends AbstractDTO>> {
<A extends AbstractDTO> Class<A> getAClass();
<B extends AbstractDTO> Class<B> getBClass();
void dissociateAll(AbstractDTO o);
List<? extends AbstractAssociationDTO> getAssociations(AbstractDTO o);
}
| {'content_hash': '7f4fef106827f490918edb085f6eff24', 'timestamp': '', 'source': 'github', 'line_count': 21, 'max_line_length': 88, 'avg_line_length': 34.476190476190474, 'alnum_prop': 0.8176795580110497, 'repo_name': 'mgargadennec/blossom', 'id': 'c46dc2d577ead3bfe5774c352380c35ed9c6014c', 'size': '724', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'blossom-core/blossom-core-common/src/main/java/com/blossomproject/core/common/service/AssociationServicePlugin.java', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '753823'}, {'name': 'FreeMarker', 'bytes': '235333'}, {'name': 'Java', 'bytes': '1264060'}, {'name': 'JavaScript', 'bytes': '1544902'}, {'name': 'Shell', 'bytes': '636'}]} |
package migrate_test
import (
"fmt"
"regexp"
"testing"
"github.com/BytemarkHosting/bytemark-client/cmd/bytemark/commands/admin"
"github.com/BytemarkHosting/bytemark-client/cmd/bytemark/testutil"
"github.com/BytemarkHosting/bytemark-client/lib/brain"
"github.com/BytemarkHosting/bytemark-client/lib/pathers"
"github.com/BytemarkHosting/bytemark-client/mocks"
"github.com/urfave/cli"
)
func TestMigrateServer(t *testing.T) {
tests := []struct {
name string
args string
head string
vm pathers.VirtualMachineName
migrateErr error
shouldErr bool
}{{
name: "with new head",
head: "stg-h1",
vm: pathers.VirtualMachineName{
VirtualMachine: "vm123",
GroupName: pathers.GroupName{
Group: "group",
Account: "account",
},
},
args: "migrate vm vm123.group.account stg-h1",
}, {
name: "without new head",
vm: pathers.VirtualMachineName{
VirtualMachine: "vm122",
GroupName: pathers.GroupName{
Group: "group",
Account: "account",
},
},
args: "migrate vm vm122.group.account",
}, {
name: "error",
vm: pathers.VirtualMachineName{
VirtualMachine: "vm121",
GroupName: pathers.GroupName{
Group: "group",
Account: "account",
},
},
args: "migrate vm vm121.group.account",
migrateErr: fmt.Errorf("all the heads are down oh no"),
shouldErr: true,
}, {
name: "id",
vm: pathers.VirtualMachineName{
VirtualMachine: "1123",
GroupName: pathers.GroupName{
Group: "test-group",
Account: "test-account",
},
},
args: "migrate vm 1123",
}}
for _, test := range tests {
ct := testutil.CommandT{
Name: test.name,
Auth: true,
Admin: true,
Args: test.args,
ShouldErr: test.shouldErr,
Commands: admin.Commands,
}
if !test.shouldErr {
ct.OutputMustMatch = []*regexp.Regexp{
// ensure that the output contains the truncated hostname
// of the vm returned from GetVirtualMachineName below - in
// other words, the 'real' name of the VM that the user wanted
// to migrate.
regexp.MustCompile(`real\.cool\.vm`),
}
}
ct.Run(t, func(t *testing.T, config *mocks.Config, client *mocks.Client, app *cli.App) {
config.When("GetVirtualMachine").Return(pathers.VirtualMachineName{
VirtualMachine: "test-vm",
GroupName: pathers.GroupName{
Group: "test-group",
Account: "test-account",
},
})
client.When("GetVirtualMachine", test.vm).Return(brain.VirtualMachine{
ID: 1123,
Hostname: "real.cool.vm.uk0.bigv.io",
})
client.When("MigrateVirtualMachine", test.vm, test.head).Return(test.migrateErr).Times(1)
})
}
}
| {'content_hash': '20a8609d84e68ca12f2a4536bd6eed3e', 'timestamp': '', 'source': 'github', 'line_count': 104, 'max_line_length': 92, 'avg_line_length': 25.653846153846153, 'alnum_prop': 0.6547976011994003, 'repo_name': 'BytemarkHosting/bytemark-client', 'id': '82755d3d508bb4de0b9f64498253f5480c49997f', 'size': '2668', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'cmd/bytemark/commands/admin/migrate/server_test.go', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Elixir', 'bytes': '603'}, {'name': 'Go', 'bytes': '976039'}, {'name': 'Makefile', 'bytes': '1577'}, {'name': 'Perl', 'bytes': '1781'}, {'name': 'Shell', 'bytes': '1771'}, {'name': 'XSLT', 'bytes': '292'}]} |
using System;
using System.Data;
using System.Collections.Generic;
using XHD.Common;
using XHD.Model;
namespace XHD.BLL
{
/// <summary>
/// Crm_Classic_case
/// </summary>
public partial class Crm_Classic_case
{
private readonly XHD.DAL.Crm_Classic_case dal=new XHD.DAL.Crm_Classic_case();
public Crm_Classic_case()
{}
#region BasicMethod
/// <summary>
/// 得到最大ID
/// </summary>
public int GetMaxId()
{
return dal.GetMaxId();
}
/// <summary>
/// 是否存在该记录
/// </summary>
public bool Exists(int id)
{
return dal.Exists(id);
}
/// <summary>
/// 增加一条数据
/// </summary>
public int Add(XHD.Model.Crm_Classic_case model)
{
return dal.Add(model);
}
/// <summary>
/// 更新一条数据
/// </summary>
public bool Update(XHD.Model.Crm_Classic_case model)
{
return dal.Update(model);
}
/// <summary>
/// 删除一条数据
/// </summary>
public bool Delete(int id)
{
return dal.Delete(id);
}
/// <summary>
/// 删除一条数据
/// </summary>
public bool DeleteList(string idlist )
{
return dal.DeleteList(idlist );
}
/// <summary>
/// 得到一个对象实体
/// </summary>
public XHD.Model.Crm_Classic_case GetModel(int id)
{
return dal.GetModel(id);
}
/// <summary>
/// 得到一个对象实体,从缓存中
/// </summary>
public XHD.Model.Crm_Classic_case GetModelByCache(int id)
{
string CacheKey = "Crm_Classic_caseModel-" + id;
object objModel = XHD.Common.DataCache.GetCache(CacheKey);
if (objModel == null)
{
try
{
objModel = dal.GetModel(id);
if (objModel != null)
{
int ModelCache = XHD.Common.ConfigHelper.GetConfigInt("ModelCache");
XHD.Common.DataCache.SetCache(CacheKey, objModel, DateTime.Now.AddMinutes(ModelCache), TimeSpan.Zero);
}
}
catch{}
}
return (XHD.Model.Crm_Classic_case)objModel;
}
/// <summary>
/// 获得数据列表
/// </summary>
public DataSet GetList(string strWhere)
{
return dal.GetList(strWhere);
}
/// <summary>
/// 获得前几行数据
/// </summary>
public DataSet GetList(int Top,string strWhere,string filedOrder)
{
return dal.GetList(Top,strWhere,filedOrder);
}
/// <summary>
/// 获得数据列表
/// </summary>
public List<XHD.Model.Crm_Classic_case> GetModelList(string strWhere)
{
DataSet ds = dal.GetList(strWhere);
return DataTableToList(ds.Tables[0]);
}
/// <summary>
/// 获得数据列表
/// </summary>
public List<XHD.Model.Crm_Classic_case> DataTableToList(DataTable dt)
{
List<XHD.Model.Crm_Classic_case> modelList = new List<XHD.Model.Crm_Classic_case>();
int rowsCount = dt.Rows.Count;
if (rowsCount > 0)
{
XHD.Model.Crm_Classic_case model;
for (int n = 0; n < rowsCount; n++)
{
model = dal.DataRowToModel(dt.Rows[n]);
if (model != null)
{
modelList.Add(model);
}
}
}
return modelList;
}
/// <summary>
/// 获得数据列表
/// </summary>
public DataSet GetAllList()
{
return GetList("");
}
/// <summary>
/// 分页获取数据列表
/// </summary>
public int GetRecordCount(string strWhere)
{
return dal.GetRecordCount(strWhere);
}
/// <summary>
/// 分页获取数据列表
/// </summary>
public DataSet GetListByPage(string strWhere, string orderby, int startIndex, int endIndex)
{
return dal.GetListByPage( strWhere, orderby, startIndex, endIndex);
}
/// <summary>
/// 分页获取数据列表
/// </summary>
//public DataSet GetList(int PageSize,int PageIndex,string strWhere)
//{
//return dal.GetList(PageSize,PageIndex,strWhere);
//}
#endregion BasicMethod
#region ExtensionMethod
public DataSet GetList(int PageSize, int PageIndex, string strWhere, string filedOrder, out string Total)
{
return dal.GetList( PageSize, PageIndex, strWhere, filedOrder, out Total);
}
public bool UpdateStatus(string id, string isstatus)
{
return dal.UpdateStatus(id,isstatus);
}
#endregion ExtensionMethod
}
}
| {'content_hash': '7f3605d4e19fa186e9aa8117810b30bb', 'timestamp': '', 'source': 'github', 'line_count': 186, 'max_line_length': 113, 'avg_line_length': 21.301075268817204, 'alnum_prop': 0.621655729429581, 'repo_name': 'SpiderLoveFish/ZJCRM', 'id': '08d77317a014de866e6a8adf6d58fdad079270ae', 'size': '4186', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'BLL/Crm_Classic_case.cs', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'ASP', 'bytes': '5243496'}, {'name': 'Batchfile', 'bytes': '331'}, {'name': 'C#', 'bytes': '4627298'}, {'name': 'CSS', 'bytes': '999250'}, {'name': 'HTML', 'bytes': '609995'}, {'name': 'JavaScript', 'bytes': '6918765'}]} |
export const DEFAULT_NODE_CONFIGURATION = {
system_volume_size: 100,
roles: ['worker'],
};
| {'content_hash': '03c2f4f69a4a721c60e8103a7d7e3c02', 'timestamp': '', 'source': 'github', 'line_count': 4, 'max_line_length': 43, 'avg_line_length': 23.75, 'alnum_prop': 0.6842105263157895, 'repo_name': 'opennode/waldur-homeport', 'id': '95c0ac5e0fba0ebb85177e84d7f7eb14dea478d9', 'size': '95', 'binary': False, 'copies': '1', 'ref': 'refs/heads/develop', 'path': 'src/rancher/cluster/create/constants.ts', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'CSS', 'bytes': '181090'}, {'name': 'Dockerfile', 'bytes': '808'}, {'name': 'HTML', 'bytes': '195802'}, {'name': 'JavaScript', 'bytes': '1231952'}, {'name': 'Shell', 'bytes': '363'}, {'name': 'TypeScript', 'bytes': '1637778'}]} |
package j4kdemo.simpleexample;
import java.util.Date;
import edu.ufl.digitalworlds.gui.DWApp;
import edu.ufl.digitalworlds.j4k.J4KSDK;
public class SimpleExample extends J4KSDK {
int counter=0;
long time=0;
@Override
public void onSkeletonFrameEvent(boolean[] skeleton_tracked, float[] positions, float[] orientations, byte[] joint_status) {
System.out.println("A new skeleton frame was received.");
}
@Override
public void onColorFrameEvent(byte[] color_frame) {
System.out.println("A new color frame was received.");
}
@Override
public void onDepthFrameEvent(short[] depth_frame, byte[] body_index, float[] xyz, float[] uv) {
System.out.println("A new depth frame was received.");
if(counter==0)
time=new Date().getTime();
counter+=1;
}
public static void main(String[] args)
{
if(System.getProperty("os.arch").toLowerCase().indexOf("64")<0)
{
System.out.println("WARNING: You are running a 32bit version of Java.");
System.out.println("This may reduce significantly the performance of this application.");
System.out.println("It is strongly adviced to exit this program and install a 64bit version of Java.\n");
}
System.out.println("This program will run for about 20 seconds.");
SimpleExample kinect=new SimpleExample();
kinect.start(J4KSDK.COLOR|J4KSDK.DEPTH|J4KSDK.SKELETON);
//Sleep for 20 seconds.
try {Thread.sleep(20000);} catch (InterruptedException e) {}
kinect.stop();
System.out.println("FPS: "+kinect.counter*1000.0/(new Date().getTime()-kinect.time));
}
}
| {'content_hash': '7e1862a744cd4a2d3af1ca48447024f8', 'timestamp': '', 'source': 'github', 'line_count': 57, 'max_line_length': 125, 'avg_line_length': 27.473684210526315, 'alnum_prop': 0.7126436781609196, 'repo_name': 'Norbell/KinectObstacleAvoidance', 'id': 'ccf88fe6ab64b59849c104e62350a3325236adf5', 'size': '3330', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'Resources/J4K/j4k-examples/src/j4kdemo/simpleexample/SimpleExample.java', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'Arduino', 'bytes': '1851'}, {'name': 'Batchfile', 'bytes': '532'}, {'name': 'Java', 'bytes': '166723'}]} |
/* DO NOT MODIFY. This file was compiled Wed, 25 May 2011 05:25:35 GMT from
* /Users/matt/pixie.strd6.com/app/coffeescripts/jquery.tagbox.coffee
*/
(function() {
/*
tagbox
adapted from superbly tagfield v0.1
http://www.superbly.ch
*/ (function($) {
$.fn.tagbox = function(options) {
var addItem, inputContainer, inserted, keys, removeItem, tagField, tagInput, tagList, updateTags, _ref;
inserted = [];
tagField = this.addClass('tag_container');
tagList = $("<ul class='tag_list' />");
inputContainer = $("<li class='input_container' />");
tagInput = $("<input class='tag_input'>");
tagField.append(tagList);
tagList.append(inputContainer);
inputContainer.append(tagInput);
updateTags = function() {
tagInput.focus();
return tagField.attr('data-tags', inserted.join(','));
};
addItem = function(value) {
if (!inserted.include(value)) {
inserted.push(value);
tagInput.parent().before("<li class='tag_item'><span>" + value + "</span><a> x</a></li>");
tagInput.val("");
$(tagList.find('.tag_item:last a')).click(function(e) {
value = $(this).prev().text();
return removeItem(value);
});
return updateTags();
}
};
removeItem = function(value) {
if (inserted.include(value)) {
inserted.remove(value);
tagList.find('.tag_item span').filter(function() {
return $(this).text() === value;
}).parent().remove();
return updateTags();
}
};
if (options != null ? (_ref = options.presets) != null ? _ref.length : void 0 : void 0) {
options.presets.each(function(item) {
return addItem(item);
});
}
keys = {
enter: 13,
tab: 9,
backspace: 8
};
tagInput.keydown(function(e) {
var key, value;
value = $(this).val() || "";
key = e.which;
if (key === keys.enter || key === keys.tab) {
if (!value.blank()) {
addItem(value.trim());
}
if (key === keys.enter) {
return e.preventDefault();
}
} else if (key === keys.backspace) {
if (value.blank()) {
return removeItem(inserted.last());
}
}
});
return $('.tag_container').click(function(e) {
return tagInput.focus();
});
};
return this;
})(jQuery);
}).call(this);
| {'content_hash': '18e9b80e10c742268a9b8db72da37c7d', 'timestamp': '', 'source': 'github', 'line_count': 79, 'max_line_length': 109, 'avg_line_length': 32.177215189873415, 'alnum_prop': 0.518095987411487, 'repo_name': 'mdiebolt/pixie.strd6.com', 'id': 'd59658e1984a735def8666c17bb9c8e95e8bec2c', 'size': '2542', 'binary': False, 'copies': '1', 'ref': 'refs/heads/master', 'path': 'public/javascripts/jquery.tagbox.js', 'mode': '33188', 'license': 'mit', 'language': [{'name': 'ActionScript', 'bytes': '511680'}, {'name': 'CoffeeScript', 'bytes': '162385'}, {'name': 'JavaScript', 'bytes': '572655'}, {'name': 'Ruby', 'bytes': '183874'}]} |
{{define "500"}}
<!doctype html>
<html dir="{{$.textDirection}}" lang="{{$.textLanguage}}">
<head>
{{template "head" .}}
</head>
<body id="internal-server-error" class="my-4 g-4">
<main role="main" class="container">
<h1>Internal server error</h1>
<p>
{{.error}}
</p>
<div class="d-flex justify-content-center">
<a href="https://g.co/ens" class="small text-decoration-none text-muted">{{t $.locale "login.about-exposure-notifications"}}</a>
</div>
</main>
</body>
</html>
{{end}}
| {'content_hash': '21a5c2658a358241de66d48ad8b03c45', 'timestamp': '', 'source': 'github', 'line_count': 20, 'max_line_length': 134, 'avg_line_length': 25.95, 'alnum_prop': 0.5973025048169557, 'repo_name': 'google/exposure-notifications-verification-server', 'id': 'baec3f3f28fdfd76c89ef44693d6d57fc0cb4db3', 'size': '519', 'binary': False, 'copies': '1', 'ref': 'refs/heads/main', 'path': 'assets/enx-redirect/500.html', 'mode': '33188', 'license': 'apache-2.0', 'language': [{'name': 'CSS', 'bytes': '3454'}, {'name': 'Dockerfile', 'bytes': '2048'}, {'name': 'Go', 'bytes': '2363077'}, {'name': 'HCL', 'bytes': '199900'}, {'name': 'HTML', 'bytes': '361109'}, {'name': 'JavaScript', 'bytes': '101939'}, {'name': 'Makefile', 'bytes': '2275'}, {'name': 'Shell', 'bytes': '12083'}]} |