text
stringlengths
1
1.04M
language
stringclasses
25 values
<filename>code/cpp/SwapUsingBitWise.cpp void swap(int *a, int *b) { *a ^= *b; // a ^ b *b ^= *a; // b ^ a *a ^= *b; // a ^ b } void main() { int a=5, b=8; int c=10, d=10; swap(&a,&b); swap(&c, &d); // it works }
cpp
<filename>gulpfile.js<gh_stars>0 var gulp = require('gulp'), sass = require('gulp-sass'), concat = require('gulp-concat'), jshint = require('gulp-jshint'), autoprefixer = require('gulp-autoprefixer') uglify = require('gulp-uglify'), minifyCss = require('gulp-minify-css'), rename = require("gulp-rename"); // Compile Sass to css and place it in css/styles.css gulp.task('styles', function() { return gulp.src('src/scss/*.scss') .pipe(sass({ 'sourcemap=none': true })) .pipe(concat('styles.css')) .pipe(autoprefixer('last 2 version', 'ie 9')) .pipe(gulp.dest('css/')) }); // Watch for changes in scss files // Watch for errors in js file gulp.task('watch', function() { gulp.watch('src/scss/**/*.scss', ['styles']); gulp.watch('src/js/*.js', ['jshint', 'compress']); }); // Catch JS errors gulp.task('jshint', function() { return gulp.src('src/js/*.js') .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')) }); // Ugligy JS gulp.task('compress', function() { return gulp.src('src/js/*.js') .pipe(uglify()) .pipe(gulp.dest('js')); }); // Minify CSS gulp.task('minify-css', function() { return gulp.src('css/styles.css') .pipe(rename({suffix: ".min"})) .pipe(minifyCss({compatibility: 'ie8'})) .pipe(gulp.dest('css')); }); // All tasks together gulp.task('default', ['styles','compress', 'jshint', 'watch']);
javascript
<gh_stars>1-10 http://data.doremus.org/expression/cd9b9073-b396-35ac-a885-34e035d61fd0 http://data.doremus.org/expression/6a4e8995-9ff2-3d1d-aaa4-f8d0b910408c http://data.doremus.org/expression/563d30d6-2888-35a2-874b-5d4b3cbd3e1e http://data.doremus.org/expression/8f65ddc5-ad2e-3c0f-abdb-53f9f09f14ce http://data.doremus.org/expression/c4e1f02a-8e26-3059-837d-79bd26988646 http://data.doremus.org/expression/b685494c-c366-3dab-9705-6aa524e55330 http://data.doremus.org/expression/7dbd017a-5f58-3ef0-a473-efd1490a1092 http://data.doremus.org/expression/ec91907e-1a16-3504-8c32-52ff0007ce22 http://data.doremus.org/expression/1e2c41b2-08ee-3bf9-8ab5-2ffb7ebcbe71 http://data.doremus.org/expression/e55468e6-f6ab-33a2-84a1-aabc690f14c9 http://data.doremus.org/expression/ff38d8ff-99b7-307a-87db-1f90ff3cbde3 http://data.doremus.org/expression/6ca5afe2-e110-3641-97bf-60cf58d28019 http://data.doremus.org/expression/395f0862-7046-3ea2-93bb-a98ca6c11335 http://data.doremus.org/expression/0de2441e-38d3-3cb2-ac3c-7d9860b5971b http://data.doremus.org/expression/a503f4d2-ef9e-35fb-ac1f-3a88fb65d8a8 http://data.doremus.org/expression/9cce36b2-1c37-346c-b851-1fef5d872e5c http://data.doremus.org/expression/25555a44-32c0-33a9-bed9-e9d43edccf9d http://data.doremus.org/expression/c96b438b-1d34-3b8f-ad46-b160f1940dd0 http://data.doremus.org/expression/6a0e644b-dba6-34a6-8899-b7d7830ef994 http://data.doremus.org/expression/6d10b43d-9f43-3060-8f21-156995b1ce17 http://data.doremus.org/expression/37dd78b7-1423-35a2-a2f3-2deafd2319bc
json
<reponame>IPodrao/cadastro_lanche package br.com.podrao.lanche.util; import java.util.List; import java.util.Objects; import org.springframework.validation.FieldError; import org.springframework.validation.ObjectError; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Generated; @Generated @AllArgsConstructor(access = AccessLevel.PRIVATE) public class JsonCreator { private StringBuilder stringBuffer; private STATUS currentStatus; enum STATUS { STARTED, NAMED, VALUED, ENDED } public static JsonCreator startJson() { return new JsonCreator(new StringBuilder("{"), STATUS.STARTED); } public JsonCreator name(String name) { if (Objects.equals(STATUS.NAMED, currentStatus)) { this.stringBuffer.append("null,"); } this.stringBuffer.append(String.format("%s\"%s\":", Objects.equals(STATUS.VALUED, currentStatus) ? "," : "", name)); this.currentStatus = STATUS.NAMED; return this; } public JsonCreator value(String value) { return setValue(String.format("\"%s\"", value)); } public JsonCreator listValue(String value) { return setValue(value); } public JsonCreator value(Boolean value) { return setValue(value.toString()); } public JsonCreator value(Integer value) { return setValue(value + ""); } private JsonCreator setValue(String value) { if (!Objects.equals(STATUS.NAMED, currentStatus)) { throw new JsonCreatorException("To define a value the current status should be NAMED"); } this.stringBuffer.append(value); this.currentStatus = STATUS.VALUED; return this; } public String endJson() { if (Objects.equals(STATUS.NAMED, currentStatus)) { this.stringBuffer.append("null"); } this.stringBuffer.append("}"); return stringBuffer.toString(); } @Generated public static class JsonCreatorException extends RuntimeException { private static final long serialVersionUID = 1L; public JsonCreatorException(String message) { super(message); } } public static String transform(List<ObjectError> list) { JsonCreator json = startJson(); list.stream().map(FieldError.class::cast).forEach(err -> json.name(err.getField()).value(err.getDefaultMessage())); return json.endJson(); } }
java
<reponame>ninemoreminutes/django-trails<filename>test_project/test_app/urls.py<gh_stars>1-10 # Django from django.urls import re_path # Test App from .views import index urlpatterns = [ re_path(r'^$', index, name='index'), ]
python
/**************************************************************************** Copyright (c) 2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org 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. ****************************************************************************/ #include "Sprite3DTest.h" #include "3d/CCAnimation3D.h" #include "3d/CCAnimate3D.h" #include <algorithm> #include "../testResource.h" enum { IDC_NEXT = 100, IDC_BACK, IDC_RESTART }; static int sceneIdx = -1; static std::function<Layer*()> createFunctions[] = { CL(Sprite3DBasicTest), #if (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) && (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) // 3DEffect use custom shader which is not supported on WP8/WinRT yet. CL(Sprite3DEffectTest), #endif CL(Sprite3DWithSkinTest), CL(Animate3DTest) }; #define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) static Layer* nextSpriteTestAction() { sceneIdx++; sceneIdx = sceneIdx % MAX_LAYER; auto layer = (createFunctions[sceneIdx])(); return layer; } static Layer* backSpriteTestAction() { sceneIdx--; int total = MAX_LAYER; if( sceneIdx < 0 ) sceneIdx += total; auto layer = (createFunctions[sceneIdx])(); return layer; } static Layer* restartSpriteTestAction() { auto layer = (createFunctions[sceneIdx])(); return layer; } //------------------------------------------------------------------ // // SpriteTestDemo // //------------------------------------------------------------------ Sprite3DTestDemo::Sprite3DTestDemo(void) : BaseTest() { } Sprite3DTestDemo::~Sprite3DTestDemo(void) { } std::string Sprite3DTestDemo::title() const { return "No title"; } std::string Sprite3DTestDemo::subtitle() const { return ""; } void Sprite3DTestDemo::onEnter() { BaseTest::onEnter(); } void Sprite3DTestDemo::restartCallback(Ref* sender) { auto s = new Sprite3DTestScene(); s->addChild(restartSpriteTestAction()); Director::getInstance()->replaceScene(s); s->release(); } void Sprite3DTestDemo::nextCallback(Ref* sender) { auto s = new Sprite3DTestScene(); s->addChild( nextSpriteTestAction() ); Director::getInstance()->replaceScene(s); s->release(); } void Sprite3DTestDemo::backCallback(Ref* sender) { auto s = new Sprite3DTestScene(); s->addChild( backSpriteTestAction() ); Director::getInstance()->replaceScene(s); s->release(); } //------------------------------------------------------------------ // // Sprite3DBasicTest // //------------------------------------------------------------------ Sprite3DBasicTest::Sprite3DBasicTest() { auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesEnded = CC_CALLBACK_2(Sprite3DBasicTest::onTouchesEnded, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); auto s = Director::getInstance()->getWinSize(); addNewSpriteWithCoords( Vec2(s.width/2, s.height/2) ); } void Sprite3DBasicTest::addNewSpriteWithCoords(Vec2 p) { //int idx = (int)(CCRANDOM_0_1() * 1400.0f / 100.0f); //int x = (idx%5) * 85; //int y = (idx/5) * 121; // //option 1: load a obj that contain the texture in it // auto sprite = Sprite3D::create("sprite3dTest/scene01.obj"); //option 2: load obj and assign the texture auto sprite = Sprite3D::create("Sprite3DTest/boss1.obj"); sprite->setScale(3.f); sprite->setTexture("Sprite3DTest/boss.png"); // //sprite->setEffect(cocos2d::EFFECT_OUTLINE); //add to scene addChild( sprite ); sprite->setPosition( Vec2( p.x, p.y) ); ActionInterval* action; float random = CCRANDOM_0_1(); if( random < 0.20 ) action = ScaleBy::create(3, 2); else if(random < 0.40) action = RotateBy::create(3, 360); else if( random < 0.60) action = Blink::create(1, 3); else if( random < 0.8 ) action = TintBy::create(2, 0, -255, -255); else action = FadeOut::create(2); auto action_back = action->reverse(); auto seq = Sequence::create( action, action_back, nullptr ); sprite->runAction( RepeatForever::create(seq) ); } void Sprite3DBasicTest::onTouchesEnded(const std::vector<Touch*>& touches, Event* event) { for (auto touch: touches) { auto location = touch->getLocation(); addNewSpriteWithCoords( location ); } } std::string Sprite3DBasicTest::title() const { return "Testing Sprite3D"; } std::string Sprite3DBasicTest::subtitle() const { return "Tap screen to add more sprites"; } void Sprite3DTestScene::runThisTest() { auto layer = nextSpriteTestAction(); addChild(layer); Director::getInstance()->replaceScene(this); } static int tuple_sort( const std::tuple<ssize_t,Effect3D*,CustomCommand> &tuple1, const std::tuple<ssize_t,Effect3D*,CustomCommand> &tuple2 ) { return std::get<0>(tuple1) < std::get<0>(tuple2); } EffectSprite3D* EffectSprite3D::createFromObjFileAndTexture(const std::string &objFilePath, const std::string &textureFilePath) { auto sprite = new EffectSprite3D(); if (sprite && sprite->initWithFile(objFilePath)) { sprite->autorelease(); sprite->setTexture(textureFilePath); return sprite; } CC_SAFE_DELETE(sprite); return nullptr; } EffectSprite3D::EffectSprite3D() : _defaultEffect(nullptr) { } EffectSprite3D::~EffectSprite3D() { for(auto effect : _effects) { CC_SAFE_RELEASE_NULL(std::get<1>(effect)); } CC_SAFE_RELEASE(_defaultEffect); } void EffectSprite3D::setEffect3D(Effect3D *effect) { if(_defaultEffect == effect) return; CC_SAFE_RETAIN(effect); CC_SAFE_RELEASE(_defaultEffect); _defaultEffect = effect; } void EffectSprite3D::addEffect(Effect3DOutline* effect, ssize_t order) { if(nullptr == effect) return; effect->retain(); effect->setTarget(this); _effects.push_back(std::make_tuple(order,effect,CustomCommand())); std::sort(std::begin(_effects), std::end(_effects), tuple_sort); } const std::string Effect3DOutline::_vertShaderFile = "Shaders3D/OutLine.vert"; const std::string Effect3DOutline::_fragShaderFile = "Shaders3D/OutLine.frag"; const std::string Effect3DOutline::_keyInGLProgramCache = "Effect3DLibrary_Outline"; GLProgram* Effect3DOutline::getOrCreateProgram() { auto program = GLProgramCache::getInstance()->getGLProgram(_keyInGLProgramCache); if(program == nullptr) { program = GLProgram::createWithFilenames(_vertShaderFile, _fragShaderFile); GLProgramCache::getInstance()->addGLProgram(program, _keyInGLProgramCache); } return program; } Effect3DOutline* Effect3DOutline::create() { Effect3DOutline* effect = new Effect3DOutline(); if(effect && effect->init()) { effect->autorelease(); return effect; } else { CC_SAFE_DELETE(effect); return nullptr; } } bool Effect3DOutline::init() { GLProgram* glprogram = GLProgram::createWithFilenames(_vertShaderFile, _fragShaderFile); if(nullptr == glprogram) { CC_SAFE_DELETE(glprogram); return false; } _glProgramState = GLProgramState::create(glprogram); if(nullptr == _glProgramState) { return false; } _glProgramState->retain(); _glProgramState->setUniformVec3("OutLineColor", _outlineColor); _glProgramState->setUniformFloat("OutlineWidth", _outlineWidth); return true; } Effect3DOutline::Effect3DOutline() : _outlineWidth(1.0f) , _outlineColor(1, 1, 1) , _sprite(nullptr) { #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) _backToForegroundListener = EventListenerCustom::create(EVENT_RENDERER_RECREATED, [this](EventCustom*) { auto glProgram = _glProgramState->getGLProgram(); glProgram->reset(); glProgram->initWithFilenames(_vertShaderFile, _fragShaderFile); glProgram->link(); glProgram->updateUniforms(); } ); Director::getInstance()->getEventDispatcher()->addEventListenerWithFixedPriority(_backToForegroundListener, -1); #endif } Effect3DOutline::~Effect3DOutline() { #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) Director::getInstance()->getEventDispatcher()->removeEventListener(_backToForegroundListener); #endif } void Effect3DOutline::setOutlineColor(const Vec3& color) { if(_outlineColor != color) { _outlineColor = color; _glProgramState->setUniformVec3("OutLineColor", _outlineColor); } } void Effect3DOutline::setOutlineWidth(float width) { if(_outlineWidth != width) { _outlineWidth = width; _glProgramState->setUniformFloat("OutlineWidth", _outlineWidth); } } void Effect3DOutline::setTarget(EffectSprite3D *sprite) { CCASSERT(nullptr != sprite && nullptr != sprite->getMesh(),"Error: Setting a null pointer or a null mesh EffectSprite3D to Effect3D"); if(sprite != _sprite) { _sprite = sprite; auto mesh = sprite->getMesh(); long offset = 0; for (auto i = 0; i < mesh->getMeshVertexAttribCount(); i++) { auto meshvertexattrib = mesh->getMeshVertexAttribute(i); _glProgramState->setVertexAttribPointer(s_attributeNames[meshvertexattrib.vertexAttrib], meshvertexattrib.size, meshvertexattrib.type, GL_FALSE, mesh->getVertexSizeInBytes(), (void*)offset); offset += meshvertexattrib.attribSizeBytes; } Color4F color(_sprite->getDisplayedColor()); color.a = _sprite->getDisplayedOpacity() / 255.0f; _glProgramState->setUniformVec4("u_color", Vec4(color.r, color.g, color.b, color.a)); } } void Effect3DOutline::draw(const Mat4 &transform) { //draw if(_sprite && _sprite->getMesh()) { glEnable(GL_CULL_FACE); glCullFace(GL_FRONT); glEnable(GL_DEPTH_TEST); auto mesh = _sprite->getMesh(); glBindBuffer(GL_ARRAY_BUFFER, mesh->getVertexBuffer()); _glProgramState->apply(transform); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, mesh->getIndexBuffer()); glDrawElements((GLenum)mesh->getPrimitiveType(), (GLsizei)mesh->getIndexCount(), (GLenum)mesh->getIndexFormat(), 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); glBindBuffer(GL_ARRAY_BUFFER, 0); glDisable(GL_DEPTH_TEST); glCullFace(GL_BACK); glDisable(GL_CULL_FACE); CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, mesh->getIndexCount()); } } void EffectSprite3D::draw(cocos2d::Renderer *renderer, const cocos2d::Mat4 &transform, uint32_t flags) { for(auto &effect : _effects) { if(std::get<0>(effect) >=0) break; CustomCommand &cc = std::get<2>(effect); cc.func = CC_CALLBACK_0(Effect3D::draw,std::get<1>(effect),transform); renderer->addCommand(&cc); } if(!_defaultEffect) { Sprite3D::draw(renderer, transform, flags); } else { _command.init(_globalZOrder); _command.func = CC_CALLBACK_0(Effect3D::draw, _defaultEffect, transform); renderer->addCommand(&_command); } for(auto &effect : _effects) { if(std::get<0>(effect) <=0) continue; CustomCommand &cc = std::get<2>(effect); cc.func = CC_CALLBACK_0(Effect3D::draw,std::get<1>(effect),transform); renderer->addCommand(&cc); } } Sprite3DEffectTest::Sprite3DEffectTest() { auto s = Director::getInstance()->getWinSize(); addNewSpriteWithCoords( Vec2(s.width/2, s.height/2) ); auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesEnded = CC_CALLBACK_2(Sprite3DEffectTest::onTouchesEnded, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); } std::string Sprite3DEffectTest::title() const { return "Testing Sprite3D"; } std::string Sprite3DEffectTest::subtitle() const { return "Sprite3d with effects"; } void Sprite3DEffectTest::addNewSpriteWithCoords(Vec2 p) { //option 2: load obj and assign the texture auto sprite = EffectSprite3D::createFromObjFileAndTexture("Sprite3DTest/boss1.obj", "Sprite3DTest/boss.png"); Effect3DOutline* effect = Effect3DOutline::create(); effect->setOutlineColor(Vec3(1,0,0)); effect->setOutlineWidth(0.01f); sprite->addEffect(effect, -1); Effect3DOutline* effect2 = Effect3DOutline::create(); effect2->setOutlineWidth(0.02f); effect2->setOutlineColor(Vec3(1,1,0)); sprite->addEffect(effect2, -2); //sprite->setEffect3D(effect); sprite->setScale(6.f); //add to scene addChild( sprite ); sprite->setPosition( Vec2( p.x, p.y) ); ActionInterval* action; float random = CCRANDOM_0_1(); if( random < 0.20 ) action = ScaleBy::create(3, 2); else if(random < 0.40) action = RotateBy::create(3, 360); else if( random < 0.60) action = Blink::create(1, 3); else if( random < 0.8 ) action = TintBy::create(2, 0, -255, -255); else action = FadeOut::create(2); auto action_back = action->reverse(); auto seq = Sequence::create( action, action_back, nullptr ); sprite->runAction( RepeatForever::create(seq) ); } void Sprite3DEffectTest::onTouchesEnded(const std::vector<Touch*>& touches, Event* event) { for (auto touch: touches) { auto location = touch->getLocation(); addNewSpriteWithCoords( location ); } } Sprite3DWithSkinTest::Sprite3DWithSkinTest() { auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesEnded = CC_CALLBACK_2(Sprite3DWithSkinTest::onTouchesEnded, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); auto s = Director::getInstance()->getWinSize(); addNewSpriteWithCoords( Vec2(s.width/2, s.height/2) ); } std::string Sprite3DWithSkinTest::title() const { return "Testing Sprite3D"; } std::string Sprite3DWithSkinTest::subtitle() const { return "Tap screen to add more sprite3D"; } void Sprite3DWithSkinTest::addNewSpriteWithCoords(Vec2 p) { std::string fileName = "Sprite3DTest/orc.c3b"; auto sprite = Sprite3D::create(fileName); sprite->setScale(3); sprite->setRotation3D(Vec3(0,180,0)); addChild(sprite); sprite->setPosition( Vec2( p.x, p.y) ); auto animation = Animation3D::create(fileName); if (animation) { auto animate = Animate3D::create(animation); bool inverse = (std::rand() % 3 == 0); int rand2 = std::rand(); float speed = 1.0f; if(rand2 % 3 == 1) { speed = animate->getSpeed() + CCRANDOM_0_1(); } else if(rand2 % 3 == 2) { speed = animate->getSpeed() - 0.5 * CCRANDOM_0_1(); } animate->setSpeed(inverse ? -speed : speed); sprite->runAction(RepeatForever::create(animate)); } } void Sprite3DWithSkinTest::onTouchesEnded(const std::vector<Touch*>& touches, Event* event) { for (auto touch: touches) { auto location = touch->getLocation(); addNewSpriteWithCoords( location ); } } Animate3DTest::Animate3DTest() : _hurt(nullptr) , _swim(nullptr) , _sprite(nullptr) , _moveAction(nullptr) , _transTime(0.1f) , _elapseTransTime(0.f) { addSprite3D(); auto listener = EventListenerTouchAllAtOnce::create(); listener->onTouchesEnded = CC_CALLBACK_2(Animate3DTest::onTouchesEnded, this); _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); scheduleUpdate(); } Animate3DTest::~Animate3DTest() { CC_SAFE_RELEASE(_moveAction); CC_SAFE_RELEASE(_hurt); CC_SAFE_RELEASE(_swim); } std::string Animate3DTest::title() const { return "Testing Animate3D"; } std::string Animate3DTest::subtitle() const { return "Touch to beat the tortoise"; } void Animate3DTest::update(float dt) { if (_state == State::HURT_TO_SWIMMING) { _elapseTransTime += dt; float t = _elapseTransTime / _transTime; if (t >= 1.f) { t = 1.f; _sprite->stopAction(_hurt); _state = State::SWIMMING; } _swim->setWeight(t); _hurt->setWeight(1.f - t); } else if (_state == State::SWIMMING_TO_HURT) { _elapseTransTime += dt; float t = _elapseTransTime / _transTime; if (t >= 1.f) { t = 1.f; _state = State::HURT; } _swim->setWeight(1.f - t); _hurt->setWeight(t); } } void Animate3DTest::addSprite3D() { std::string fileName = "Sprite3DTest/tortoise.c3b"; auto sprite = Sprite3D::create(fileName); sprite->setScale(0.1f); auto s = Director::getInstance()->getWinSize(); sprite->setPosition(Vec2(s.width * 4.f / 5.f, s.height / 2.f)); addChild(sprite); _sprite = sprite; auto animation = Animation3D::create(fileName); if (animation) { auto animate = Animate3D::create(animation, 0.f, 1.933f); sprite->runAction(RepeatForever::create(animate)); _swim = animate; _swim->retain(); _hurt = Animate3D::create(animation, 1.933f, 2.8f); _hurt->retain(); _state = State::SWIMMING; } _moveAction = MoveTo::create(4.f, Vec2(s.width / 5.f, s.height / 2.f)); _moveAction->retain(); auto seq = Sequence::create(_moveAction, CallFunc::create(CC_CALLBACK_0(Animate3DTest::reachEndCallBack, this)), nullptr); seq->setTag(100); sprite->runAction(seq); } void Animate3DTest::reachEndCallBack() { _sprite->stopActionByTag(100); auto inverse = (MoveTo*)_moveAction->reverse(); inverse->retain(); _moveAction->release(); _moveAction = inverse; auto rot = RotateBy::create(1.f, Vec3(0.f, 180.f, 0.f)); auto seq = Sequence::create(rot, _moveAction, CallFunc::create(CC_CALLBACK_0(Animate3DTest::reachEndCallBack, this)), nullptr); seq->setTag(100); _sprite->runAction(seq); } void Animate3DTest::renewCallBack() { _sprite->stopActionByTag(101); _state = State::HURT_TO_SWIMMING; } void Animate3DTest::onTouchesEnded(const std::vector<Touch*>& touches, Event* event) { for (auto touch: touches) { auto location = touch->getLocation(); if (_sprite) { float len = (_sprite->getPosition() - location).length(); if (len < 40) { //hurt the tortoise if (_state == State::SWIMMING) { _sprite->runAction(_hurt); auto delay = DelayTime::create(_hurt->getDuration() - 0.1f); auto seq = Sequence::create(delay, CallFunc::create(CC_CALLBACK_0(Animate3DTest::renewCallBack, this)), nullptr); seq->setTag(101); _sprite->runAction(seq); _state = State::SWIMMING_TO_HURT; } return; } } } }
cpp
package cn.itcast.core.action; import cn.itcast.core.page.PageResult; import com.opensymphony.xwork2.ActionSupport; public abstract class BaseAction extends ActionSupport { protected String[] selectedRow; protected PageResult pageResult; private int pageNo; private int pageSize; //默认页大小 public static int DEFAULT_PAGE_SIZE = 3; public String[] getSelectedRow() { return selectedRow; } public void setSelectedRow(String[] selectedRow) { this.selectedRow = selectedRow; } public PageResult getPageResult() { return pageResult; } public void setPageResult(PageResult pageResult) { this.pageResult = pageResult; } public int getPageNo() { return pageNo; } public void setPageNo(int pageNo) { this.pageNo = pageNo; } public int getPageSize() { if(pageSize < 1) pageSize = DEFAULT_PAGE_SIZE; return pageSize; } public void setPageSize(int pageSize) { this.pageSize = pageSize; } }
java
{"expireTime":9007200819138296000,"key":"transformer-remark-markdown-html-ast-90239cc3e315db764993f16aea154745-gatsby-remark-external-linksgatsby-remark-images-","val":{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"I'm a software engineer based in Copenhagen, DK specializing in building exceptional, high-performing user centered web-applications.","position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":134,"offset":134}}}],"position":{"start":{"line":2,"column":1,"offset":1},"end":{"line":2,"column":134,"offset":134}}}],"position":{"start":{"line":1,"column":1,"offset":0},"end":{"line":3,"column":1,"offset":135}}}}
json
<filename>README.md # COVID-19 Pandemic Website for tracking the COVID-19 Pandemic Built with * Blazor WebAssembly * Radzen Blazor Components * Bootstrap * Chart.js * CountUp.js * TypeScript * Webpack * SCSS
markdown
{ "name": "<NAME>", "force": "pull", "level": "intermediate", "mechanic": "compound", "equipment": "barbell", "primaryMuscles": [ "quadriceps" ], "secondaryMuscles": [ "forearms", "glutes", "hamstrings", "lower back", "traps" ], "instructions": [ "With a barbell on the floor close to the shins, take an overhand or hook grip just outside the legs. Lower your hips with the weight focused on the heels, back straight, head facing forward, chest up, with your shoulders just in front of the bar. This will be your starting position.", "Begin the first pull by driving through the heels, extending your knees. Your back angle should stay the same, and your arms should remain straight and elbows out. Move the weight with control as you continue to above the knees.", "Next comes the second pull, the main source of acceleration for the clean. As the bar approaches the mid-thigh position, begin extending through the hips. In a jumping motion, accelerate by extending the hips, knees, and ankles, using speed to move the bar upward. There should be no need to actively pull through the arms to accelerate the weight; at the end of the second pull, the body should be fully extended, leaning slightly back, with the arms still extended. Full extension should be violent and abrupt, and ensure that you do not prolong the extension for longer than necessary." ], "category": "olympic weightlifting" }
json
<reponame>sohamkor/TeachMeWebApp<gh_stars>0 {% load staticfiles %} <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> </head> <body background="{% static "teachingMainApp/images/otherIndexBg.png" %}"> <script> </script> <style> hr { border: 1px solid #000000; } .jumbotron { margin-bottom: 0px; } .navbar-nav { width: 100%; text-align: center; } .navbar-nav > li { float: none; display: inline-block; } #mainContentJumbo { background-color: #FFC3CE; } .centerDropdown { left: auto !important; right: 42% !important; } </style> <div class="jumbotron"> <center> <img src="{% static "teachingMainApp/images/logoForHomePage.png" %}"> </center> </div> <!-- initialize the navigation bar here --!> <nav class="navbar navbar-default navbar-static-top" role="navigation"> <div class="container-fluid"> <div class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li class="pull-left"><a href="/"><b>My Home</b></a></li> <li><a href="/subjects"><b>Subjects</b></a></li> <li><a href="/myClasses"><b>My Classes</b></a></li> <li class="active"><a href="/rolloutAlgorithm"><b>Rollout Algorithm</b></a></li> <li><a href="/aboutUs"><b>About Us</b></a></li> <li class="social pull-right"><a href="/logout"><b>Logout</b></a></li> <li class="social pull-right" style="line-height: 50px;"><u><b>You are using <i>v2.0.0</i> of the site</b></u></li> </ul> </div> </div> </nav> <br> <!-- initialize header frame here --!> <div class="container"> <div class="jumbotron" id="mainContentJumbo"> <center> <h2>Congratulations, the limited infection was a success!</h2> <hr> <p>Take a look around to see what this version of the site offers.</p> <p>and if you decide that you want to create your own version of the site, create a new folder with your version number under templates in this webapp's source code, and add the corresponding entry to the total infection page.</p> <hr> <h3><u>Summary of users infected</u></p> <p>Here is a list of all of the users who had a rollover to the new version of the webapp:</p> {% for eachUser in listOfIdsUpgraded %} <h4><b>{{ eachUser }}</h4></b> {% endfor %} </center> </div> </div> </body> </html>
html
More than 140 people experiencing homelessness in Denver will each be provided up to $1,000 in cash a month for up to one year as part of a basic income program designed to help "lift individuals out of homelessness," the city announced last week. The $2 million contract with the Denver Basic Income Project was approved by the City Council and will provide direct cash assistance to more than 140 women, transgender and gender non-conforming individuals, and families in shelters. "Just as important as housing and shelter is a regular source of income for those experiencing homelessness," Mayor Michael B. Hancock said. "This direct cash assistance will help more than 140 women and families currently in shelters move into stable housing, and provide support, so they can stay housed while opening space in our shelters to serve more people. " The $2 million was allocated from the American Rescue Plan Act, according to the city, and the contract provides up to $1,000 a month for a year to eligible people currently using the shelter system. The Denver Basic Income Project is an organization that provides direct cash payments to 820 people and families experiencing homelessness. The program will be evaluated by University of Denver’s Center for Housing and Homelessness Research using a randomized control trial, which will measure housing outcomes, utilization of shelter and other homeless services, improvements in psychological health and substance use for those who opt in.
english
1. My career as journalist is a blend of God’s Grace, Sleepless nights, over 100 books and shades of honor, threats and silence. Since 2017, I have chased around 100 stories, accomplished about over 80 and lost a few bylines to keep my life. 3. Today, I am interested in introducing myself to Twitter. After my introduction, I would remain The Uknown Achebe. In this thread, I would share the TOP 50 pieces of my career as a journalist. I am shy though... but I will try. 4. This piece was intriguing and sad. I travelled across many opaque rivers, far beyond the margins of Nigeria’s capital city of Abuja to locate tribes that still kill Twins in Nigeria. My reward: thatched red huts, delicacy of grass cutters & missionary prayers. 6. Two extremes exist in ape conservation or poaching. The first, those who see apes as gods - worthy of worship. The other, those who see apes as piece of business. Both extremes are dangerous. A balance isn’t necessary. Just stop killing apes for money or rituals. 8. I won’t rant about Burna Boy. But if my opinion will ever count, he is not Fela. Falz instead looks closer to Fela. Maybe not in the majesty of his styles and activism but his idea that music can be more than lyrical pleasure. 9. Probably you are not aware we have Jews in Nigeria. I wrote from Port Harcourt, about how this small group is pushing to break new grounds politically and spiritually. Someday, they believe, they would return to Jerusalem. Isreal, not Nigeria, is their home. 10. The government has been on this for years, staining what is already a deeply tortured human rights image. Daily protests. Unknown mass graves. Bullets and amnesty report. Court orders and the nonchalance of one government I know. 11.The most important thing after this COVID-19, is to insert history back into Nigeria’s education curriculum. Not colonialism but internal events that shaped the realities of Nigera. Without properly telling the story of the Nigeria Civil War, the scar would ache every May 30. 12. Oil exploration in the Niger Delta is like multiple traps. Those who survive oil spill may die by gas flare. Those who survive both, risk facing polluted rivers and farms. A few more numbers die by the government bullets. Those who can’t fight as militants die in silence. 13. In Borno, some sets of brave women have come together to fight against Boko Haram. The insurgents know them and had severally warned them to stay away from the crisis. A few have died, many derailed but some 100 faithful heroines remain. Their memories must not perish. 14. South Africa is an important player in African unity and economic integration. Nigeria is the single most important factor. I looked at how xenophobic attacks on Nigerians in South Africa and impending economic wars - as at that time - would shape the future of Africa. 15. The economy might be hopeless at this point. But its potential is undoubted. When I looked at the Nigeria’s rice sector, immediately after the government border closer, it revealed how well we can do as a nation outside of oil. 16. Some sources are good story tellers. You ask for a quote but they give you punch lines. For those from Anambra, this is your humble hero: Archbishop Emeritus Maxwell Anikwenwa, aka the door to political power in southeastern Nigeria. 17. Have you ever wondered how climate change can be linked to perpetual poverty? It’s really a complex question. I made the answers very simply in this piece that took me to three states in Nigeria. 18. President Buhari wasn’t doubted. It was his failings that shoke his support base. That was in his first term. So when he retuned for the second term as president, he had the opportunity to turn doubts to certainty, panic to assurance and hate to love. Can he? Find out. 19. This is the second most dangerous reports I have done. One source told me: “if you publish anything against us, we would kill you”. I laughed and published the report. After all, those who die by bullet and others killed by gas flares are still victims of familiar fate. 20. While men fight for crude oil and multinational jobs, the Niger Delta women turned to a less dangerous oil: palm oil. Small mills, news seed varieties. Smoke and sweat and smile - all to swell the purse. 21. At the peak of Zamfara crisis and banditry, I wrote this piece. We looked at how the conflict is evolving, the links to Boko Haram and the troubles of having 3 wives and 25 children. I narrowly escaped abduction that night as the bandits struck near my hotel. 22. I am speechless. Just read and make the speeches on behalf of me. If there is love in sharing, then accept the pleasure of doing this for me. What are friends for? 23. Ogoni clean-up, the most important evidence of government commitment to redeeming the Niger delta came with many controversies. In this piece, I wrote about the politics, lies and half-truths of a cleanup taking place on radio/TV more than the polluted Ogoni land.
english
A great value omnibusof key novels featuring the Blood Angels Space Marines! Discover the secrets of the Black Rage in this definitive Blood Angels collection. Baal is besieged. The tendrils of Hive Fleet Leviathan have reached the sons of Sanguinius’ home system, and Commander Dante, calling upon the Successor Chapters of the Ninth Legion, is the only thing stopping the Great Devourer from consuming the Blood Angels’ home world. But in order to overcome the insidious xenos, Dante and his Blood Angels must also face an enemy the Flaw. The Black Rage and the Red Thirst threaten each and every one of them, a curse in their veins that they must counter if they are to reach their former glory. Can Dante defend Imperium Nihilus from enemies far greater than the tyranid swarms that once threatened their home world? Or are the sons of Sanguinius doomed to succumb to the darkness in their blood? This omnibus by Guy Haley contains the novels Dante, The Devastation of Baal, Darkness in the Blood and Angel of Mercy as well as the short story ‘Redeemer’. Guy Haley is the author of over 40 novels and novellas. His original fiction includes Crash, Champion of Mars, and the Richards and Klein, Dreaming Cities, and the Gates of the World series (as K M McKinley). However, he is best known as a prolific contributor to Games Workshop's Black Library imprint, and has sold over 1 million books set in their Warhammer universes. Among the best Warhammer omnibuses. It was my introduction to the Blood Angels, and it made them one of my favorites. I've already written reviews for the books that make it up, so I'll just do quick overviews of them. "Dante" might be my personal favorite. It's the one with the most lore, and shows how one becomes a Blood Angel, while setting up one of their most important characters. "Devastation of Baal" is a space Marines story at its best. You get all of the chapters together in one place, with impossible odds set against them. If you're into the Indomitus Crusade, this has a nice tie-in to that. "Darkness in the Blood" takes a step back from the nonstop action of the previous story, and is a slower paced story about how the Blood Angels change due to the events of Devastation. It's a good story, though not one I'll read again. "Astorath, Angel of Mercy" is about the titular character, with a focus on the Black Rage that afflicts the Blood Angels. It's a short, concluding novel, that while interesting, feels like the weakest link in the series. "Redeemer" is a short story that brings the omnibus to a satisfying conclusion.
english
<filename>moviecat-template/app/assets/css/reset.css /*统一不同浏览器对于不同元素的默认样式*/ html{color:#000;background:#FFF;} body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form, fieldset,input,textarea,p,blockquote,th,td { margin:0; padding:0; font-family:"Helvetica Neue", "Luxi Sans", "DejaVu Sans", Tahoma, "Hiragino Sans GB", "Microsoft YaHei"; outline:none; } table { border-collapse:collapse; border-spacing:0; } fieldset,img { border:0; } address,caption,cite,code,dfn,em,strong,th,var { font-style:normal; font-weight:normal; } ol,ul { list-style:none; } caption,th { text-align:left; } h1,h2,h3,h4,h5,h6 { font-size:100%; font-weight:normal; } q:before,q:after { content:''; } abbr,acronym { border:0; } a{ text-decoration:none; color:inherit; }
css
<filename>platform-backend/src/com/wwf/shrimp/application/models/search/DocumentSearchCriteria.java package com.wwf.shrimp.application.models.search; import java.util.Date; import com.wwf.shrimp.application.models.DocumentType; /** * The search criteria used to search for documents. * All elements are treated as "AND" and can be null. * * @author AleaActaEst * */ public class DocumentSearchCriteria extends BaseSearchCriteria { private String userName; private long organizationId; private long groupId; private long userId; private DocumentType docType; private Date dateFrom; private Date dateTo; /** * @return the userName */ public String getUserName() { return userName; } /** * @param userName the userName to set */ public void setUserName(String userName) { this.userName = userName; } /** * @return the organizationId */ public long getOrganizationId() { return organizationId; } /** * @param organizationId the organizationId to set */ public void setOrganizationId(long organizationId) { this.organizationId = organizationId; } /** * @return the groupId */ public long getGroupId() { return groupId; } /** * @param groupId the groupId to set */ public void setGroupId(long groupId) { this.groupId = groupId; } /** * @return the userId */ public long getUserId() { return userId; } /** * @param userId the userId to set */ public void setUserId(long userId) { this.userId = userId; } /** * @return the docTYpe */ public DocumentType getDocType() { return docType; } /** * @param docTYpe the docTYpe to set */ public void setDocType(DocumentType docTYpe) { this.docType = docTYpe; } /** * @return the dateFrom */ public Date getDateFrom() { return dateFrom; } /** * @param dateFrom the dateFrom to set */ public void setDateFrom(Date dateFrom) { this.dateFrom = dateFrom; } /** * @return the dateTo */ public Date getDateTo() { return dateTo; } /** * @param dateTo the dateTo to set */ public void setDateTo(Date dateTo) { this.dateTo = dateTo; } /* (non-Javadoc) * @see java.lang.Object#toString() */ @Override public String toString() { return "DocumentSearchCriteria [userName=" + userName + ", organizationId=" + organizationId + ", groupId=" + groupId + ", userId=" + userId + ", docTYpe=" + docType + ", dateFrom=" + dateFrom + ", dateTo=" + dateTo + "]"; } }
java
<reponame>byapps-laravel-cms/byappscms {{ form_open({ request: 'onUpdate'}) }} <input type="hidden" name="idx" value="{{record.idx}}"/> {% for item in itemlist %} <div class="row1"> <div class="form-group row" id="appsData"> <label class="col-md-4 control-label propertyname th_style_1">{{ item.0 }}</label> <div class="col-md-8 col-xs-10"> {% if item.1 == 'selectBox' %} <div class="col-sm-8 col-xs-10 td_style_1"> <select {{ item.2 }} class="form-control"> {% for key, val in item.4 %} <option value="{{ key }}" {{ item.3 == key ? "selected" : "" }} >{{ val }}</option> {% endfor %} </select> {% if item.0 == 'Process' %} <input class="btn btn-xs nbutton3" type="button" value="SDK 스크립트 만들기"> {% endif %} </div> </div> {% elseif item.1 == 'radioButton' %} <div class="col-md-8 col-xs-10"> {% for key, val in item.4 %} <label class="radio-inline"> <input type="radio" {{ item.2 }} {{ item.3 == key ? "checked=checked" : "" }} value="{{ key }}">{{ val }} </label> {% endfor %} </div> {% elseif item.1 == 'fileUpload' %} {% if mobile == 1 %} <div class="filebox col-sm-5"> <label>파일선택 <input type="file" accept="image/*" name="{{ item.2 }}"> </label> </div> {% else %} <div class="col-md-5"> <div class="file_dropzone form-control" style="height:200px;width:200px;"> <div style="height:100%;line-height:1100%;text-align:center;">drop here</div> </div> </div> <input type="hidden" {{ item.2 }} value=""> {% endif %} {% elseif item.1 == 'checkBox' %} <div class="col-md-10 col-xs-10"> {% for option in item.4 %} <label class="radio-inline"> <input type="checkbox" {{ item.2 }} {{ option.2 }} value="{{ option.0 }}" >{{ option.1 }} </label> {% endfor %} </div> {% elseif item.1 == 'checkBox2' %} {% for option in item.2 %} <div class="col-sm-3"> <label class="radio-inline"> <input type="checkbox" {{ option.0 }} {{ option.1 == option.2 ? "checked" : "" }} value="{{ option.1 }}">{{ option.3 }} </label> </div> {% endfor %} {% elseif item.1 == 'textarea' %} <textarea {{ item.2 }} class="col-md-8 col-xs-10" rows="5">{{ item.3 }}</textarea> {% elseif item.0 == 'Develop Info' %} <ul class="develop_info_select"> <li>텍스트로 보기</li> <li>HTML코드로 보기</li> </ul> <div class="develop_info "> {{ item.3|raw }} </div> <div class="develop_info col-md-8 col-xs-10" > <div class=""> {{ item.3 }} </div> </div> {% elseif item.1 == 'input2' %} {% for option in item.2 %} {% if option.0 == 'input' %} <div class="col-md-7"> <input type="text" {{ option.1 }} class="form-control" value="{{ option.2 }}"> </div> {% elseif option.0 == 'span' %} <span style="float:left;">{{ option.1 }}</span> {% endif %} {% endfor %} {% elseif item.1 == 'input' or item.1 == 'input+button' %} <div class="col-md-7 col-xs-10"> <input type="text" {{ item.2 }} class="form-control" value="{{ item.3 }}"> </div> {% if item.1 == 'input+button' %} <div class="col-xs-8"> <a href="{{ item.2 }}" target="_sub"><input class="form-control" type="button" value="새탭에서 열기"></a> </div> {% endif %} {% endif %} </div> </div> {% endfor %} </div> <button type="submit" class="btn btn-info float-right">업데이트</button> {{ form_close() }}
html
{ "id": "group-labelledby", "evaluate": "labelledby.js", "after": "labelledby-after.js", "metadata": { "impact": "critical", "messages": { "pass": "All elements with the name \"{{=it.data.name}}\" reference the same element with aria-labelledby", "fail": "All elements with the name \"{{=it.data.name}}\" do not reference the same element with aria-labelledby" } } }
json
{"id": 162651, "date": "2020-01-22 08:02:08", "user": "DiggDigital", "post": "**[RUSSIA VPS](https://www.parkinhost.com/russia-vps.php)** LET OFFER at Just $4.9 / Mo. on Annual Subscription [ONLY]\r\n\r\n[Unmanaged Russia VPS](https://www.parkinhost.com/russia-vps.php) | [Russia VPS](https://www.parkinhost.com/russia-vps.php) | [Russia Linux VPS](https://www.parkinhost.com/russia-vps.php) | [Russia HDD VPS](https://www.parkinhost.com/russia-vps.php)\r\n\r\nCPU: 2 vCore\r\nRAM: 1GB\r\nHDD: 50GB\r\nTraffic: Unlimited\r\nBandwidth: 200Mbps\r\n\r\n**Price:** &lt;del&gt;$127.52&lt;/del&gt; / $64.96 / Year\r\n\r\n**Order Link Here:** https://www.parkinhost.com/secure/cart.php?a=add&amp;pid=385\r\n\r\n**For other Plans:** https://www.parkinhost.com/russia-vps.php\r\n\r\n**TOS:** https://www.parkinhost.com/termsofservice.php\r\n**PP:** https://www.parkinhost.com/privacypolicy.php"}
json
Al-Nassr superstar Cristiano Ronaldo once said that he was tired of being compared to Lionel Messi, explaining that they were inherently different players for their respective clubs. Ronaldo and Messi are arguably the two greatest players of all time. Both superstars have shared the Ballon d'Or 13 times, with Messi recently capturing his eighth award, and have contested the infamous GOAT debate for well over a decade now. In May 2012, Ronaldo had one of the best seasons of his career, scoring 60 goals across all competitions to help Real Madrid win the La Liga title over Messi's Barcelona. Despite his feats, it was the Argentine ace who garnered all the adoration and attention. The Portugal legend sat down with CNN and claimed he was a better player than Messi. “Some people say I’m better, other people say it’s him, but at the end of the day, they’re going to decide who is the best player. At the moment ... I think it is me," Ronaldo said. He added that he was tired of the constant comparisons, likening himself and Messi to a Ferrari and a Porsche: “Sometimes (the comparisons with Messi) makes me tired ... for him too because they compare us together all the time. You cannot compare a Ferrari with a Porsche because it’s a different engine. You cannot compare them. He does the best things for Barcelona, I do the best things for Madrid." He continued: Cristiano Ronaldo enjoyed a great rivalry on the pitch against Messi until 2018 when he decided to leave Real Madrid to join Juventus. The 38-year-old had a stellar nine-year tenure for Los Blancos, scoring 450 goals in 438 appearances, helping them win 15 trophies, including four UEFA Champions League trophies. Cristiano Ronaldo and Lionel Messi have dominated world football with ease for nearly two decades now. Let's take a look at their career statistics to see how well they match up against each other. Al-Nassr superstar Cristiano Ronaldo is still going strong in the Saudi Pro League, having scored 51 goals in 2023 already. He is also the highest goalscorer of all time, having scored 870 goals and provided 249 assists in 1202 appearances in total for club and country. He has also won 35 trophies to date. On the other hand, Inter Miami ace Lionel Messi has netted 821 times and registered 361 assists in 1047 appearances across all competitions. He is also the most decorated footballer of all time, having won 44 trophies, including the 2022 FIFA World Cup for Argentina.
english
import React, { useState } from 'react'; import { Box, Checkbox, Divider, Heading, Text } from '@chakra-ui/react'; import { Todolist } from './comps/TodoList'; import TodoItemAdd from './comps/TodoItemAdd'; import { TaskManager } from './comps/TaskManager'; import { ErrorStack } from './comps/ErrorStack'; function App() { const [showList, setShowList] = useState(true); return ( <> <Box d={'flex'}> <Box padding={30} maxW={'1024px'} margin={'0 auto'} width={'100%'}> <Heading fontSize="3xl" marginBottom={'5px'} textAlign={'center'}> Recoil Todolist CRUD Example </Heading> <Text textAlign={'center'}>Fake Api delay : 2.500 ms</Text> <TodoItemAdd /> <Checkbox isChecked={showList} onChange={() => setShowList(s => !s)}> {!showList ? 'Hide List' : 'Show List'} </Checkbox> <Divider marginTop={'20px'} /> {showList && <Todolist />} </Box> <TaskManager /> </Box> <ErrorStack /> </> ); } export default App;
typescript
<reponame>hnwarid/HackerRankExercises<gh_stars>0 # Enter your code here. Read input from STDIN. Print output to STDOUT import re test_cases = int(input()) for test_case in range(test_cases): try: regex_pattern = input().strip() regex_error_test = bool(re.compile(regex_pattern)) print(regex_error_test) except re.error as e: # print(e) # multiple repeat at position 2 print(False) # test case 1 # 3 # [0-9]++ # [0-9] # 123 # False # True # True # Test case 2 # /^(?!\.)(?=.)[d-\.]$/ # [a-zA-Z0-9,.' ]+ # False # True
python
package binding import ( "github.com/gojisvm/gojis/internal/runtime/errors" "github.com/gojisvm/gojis/internal/runtime/lang" ) // Environment is an abstraction over the different types of environment // records used in the specification. // Not all functions are supported by all environments. // There is an issue suggesting that this abstraction should be improved (#34). type Environment interface { lang.Value Outer() Environment HasBinding(n lang.String) bool CreateMutableBinding(n lang.String, deletable bool) errors.Error CreateImmutableBinding(n lang.String, strict bool) errors.Error InitializeBinding(n lang.String, val lang.Value) errors.Error SetMutableBinding(n lang.String, val lang.Value, strict bool) errors.Error GetThisBinding() (lang.Value, errors.Error) GetBindingValue(n lang.String, strict bool) (lang.Value, errors.Error) DeleteBinding(n lang.String) bool HasThisBinding() bool HasSuperBinding() bool WithBaseObject() lang.Value }
go
Chelsea suffered a 1-0 defeat against Newcastle United on Saturday at St. James’ Park in the Premier League. Graham Potter's side are now 16 points behind leaders Arsenal after 14 games. Meanwhile, the Blues are leading the race for a Brazilian prodigy. Elsewhere, former Gunners midfielder Paul Merson reckons England have no chance of winning the FIFA World Cup without Reece James. On that note, here's a look at the key Chelsea transfer stories as on November 13, 2022: Chelsea are leading the race to sign Endrick, according to ESPN Brazil via The Metro. The Brazilian prodigy has caught the attention of clubs around Europe following a series of impressive performances for Palmeiras. The Blues are among the clubs fighting to secure his signature. Paris Saint-Germain (PSG) are also monitoring the 16-year-old and have already tabled a €45 million bid for the player. However, it was instantly rejected by the Brazilian side, as it was lower than their expectations. The Parisians have already informed Palmeiras that they are willing to offer €60 million for Endrick, an amount the London giants are also ready to match. Real Madrid and Barcelona are also among the other clubs interested in the player. Despite being spoilt for choice for his next destination, the Brazilian reportedly prefers a move to Chelsea. Endrick has already visited the Blues, who have deployed Thiago Silva to help convince the teenager to move to London. That move might have already borne fruit, although PSG, Los Blancos and the Blaugrana are unlikely to give up without a fight. Paul Merson reckons Reece James will be sorely missed at the FIFA World Cup. The Chelsea right-back was not included in England’s squad for the tournament by manager Gareth Southgate after failing to recover in time from injury. James has since taken to social media to express his disappointment. In his column for The Daily Star, Merson argued that James is as important to the Three Lions as Harry Kane. “I just find it weird that he's willing to gamble on Phillips and Kyle Walker but not Reece James? If it was Harry Kane, he would be going - what's the difference? We aren't going to win the World Cup without having James in the team. He is a shoo-in to start, and if we took him, he plays in England's team every day of the week. He is one of our best players,” wrote Merson. He continued: Merson added that a squad of 26 players allows the inclusion of an injured player. “Having a squad of 26 players gives you a safety net to take a risk and bring an injured player. It's usually 23, and we still have taken injured players in the past,” wrote Merson. James has two goals from ten appearances for the Blues across competitions this season. Graham Potter is convinced Raheem Sterling has the experience and the mental strength to deal with recent criticism. The player has been under scrutiny of late following a barren run in front of goal for Chelsea in the Premier League. The 27-year-old joined the Blues from Manchester City this summer but has endured a mixed start to life at Stamford Bridge. Speaking ahead of the game against Newcastle United, Potter said that heavy scrutiny is one of the downsides of being a top player. “It’s part of being a top player. It’s part of being where we are, in terms of there’s always something to prove, especially if things don’t go as well as you’d like in terms of performances and results. You know you’re open to scrutiny and criticism. If you don’t accept that or can’t deal with that then you probably shouldn’t be here,” said Potter. Potter added that the FIFA World Cup is the ideal opportunity for Sterling to turn things around. “Raheem is a big boy, so he understands that and things can change very quickly. So he’s had enough of a career so far to deal with that. It’s a new opportunity, a new situation, and I’m sure he’ll do really well,” said Potter. Sterling has appeared 19 times for Chelsea across competitions, scoring five goals and setting up two more.
english
<reponame>erobert17/testServer /*----------------------------------------------------------------------------* COUNDOWN SHORTCODE - Panel \*----------------------------------------------------------------------------*/ [data-vc-shortcode="mpc_countdown"] input[name$="label"] { width: 90px !important; }
css
<reponame>danghica/mokapot package xyz.acygn.mokapot.benchmarksuite.programs.primes; import java.rmi.Remote; import java.rmi.RemoteException; import xyz.acygn.mokapot.markers.NonCopiable; /** * @author <NAME> */ public interface Prime extends NonCopiable, Remote { boolean isPrime(long n) throws RemoteException; }
java
<gh_stars>0 package org.hisp.dhis.coldchain.model.action; import org.hisp.dhis.coldchain.model.Model; import org.hisp.dhis.coldchain.model.ModelService; import com.opensymphony.xwork2.Action; public class ShowUploadModelImageFormAction implements Action { // ------------------------------------------------------------------------- // Dependencies // ------------------------------------------------------------------------- private ModelService modelService; public void setModelService( ModelService modelService ) { this.modelService = modelService; } // ------------------------------------------------------------------------- // Input/Output and Getter / Setter // ------------------------------------------------------------------------- private int id; public void setId( int id ) { this.id = id; } private Model model; public Model getModel() { return model; } // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- public String execute() throws Exception { model = modelService.getModel( id ); return SUCCESS; } }
java
package psidev.psi.mi.jami.bridges.ontologymanager; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; import psidev.psi.mi.jami.bridges.ontologymanager.impl.local.MILocalOntology; import psidev.psi.mi.jami.bridges.ontologymanager.impl.ols.MIOlsOntology; import psidev.psi.tools.ontology_manager.impl.local.OntologyLoaderException; import psidev.psi.tools.ontology_manager.interfaces.OntologyAccessTemplate; import java.io.IOException; import java.io.InputStream; /** * Unit tester of the MIOntologyManager * * @author <NAME> (<EMAIL>) * @version $Id$ * @since <pre>10/11/11</pre> */ public class MIOntologyManagerTest { /* Multicast problem in ehcache for MAC. -Djava.net.preferIPv4Stack=true needs to be added as a JVM options to be able to run this test in a Mac computer. See http://stackoverflow.com/questions/18747134/getting-cant-assign-requested-address-java-net-socketexception-using-ehcache */ @Test public void test_simulation() throws IOException, OntologyLoaderException { InputStream ontology = MIOntologyManagerTest.class.getResource("/ontologies.xml").openStream(); MIOntologyManager om = new MIOntologyManager(ontology); ontology.close(); Assert.assertEquals(3, om.getOntologyIDs().size()); OntologyAccessTemplate<MIOntologyTermI> accessMI = om.getOntologyAccess("MI"); Assert.assertNotNull(accessMI); Assert.assertTrue(accessMI instanceof MILocalOntology); Assert.assertNotNull(accessMI.getTermForAccession("MI:0018")); Assert.assertNull(accessMI.getTermForAccession("MOD:01161")); OntologyAccessTemplate<MIOntologyTermI> accessMOD = om.getOntologyAccess("MOD"); Assert.assertNotNull(accessMOD); Assert.assertTrue(accessMOD instanceof MIOlsOntology); Assert.assertNotNull(accessMOD.getTermForAccession("MOD:01161")); // Assert.assertNull(accessMOD.getTermForAccession("MI:0018")); OntologyAccessTemplate<MIOntologyTermI> accessECO = om.getOntologyAccess("ECO"); Assert.assertNotNull(accessECO); Assert.assertTrue(accessECO instanceof MIOlsOntology); Assert.assertNotNull(accessECO.getTermForAccession("ECO:0000003")); // Assert.assertNull(accessECO.getTermForAccession("MI:0018")); } }
java
Gandhinagar, January 08, 2015 (IANS) Prime Minister Narendra Modi Thursday morning inaugurated the Salt Mountain, a memorial dedicated to Mahatma Gandhi, built near the Mahatma Mandir complex here, the venue of the 13th Pravasi Bharatiya Divas (PBD). Modi went around the exhibits related to Gandhi's life at the Gandhi Kutir and also wrote on the visitor's book. The inauguration comes ahead of the formal inauguration of the official part of the PBD. gathering of people of Indian origin aimed at enhancing networking and reinforcing commercial linkages. There are 25 million people of Indian origin residing outside India. The event is being held in Gandhinagar Jan 7-9 to mark the centenary of India's "sarva sreshtha pravasi Bharatiya", or foremost Indian diaspora member, Mahatma Gandhi's return to the country from South Africa. The Mahatma Mandir is a sprawling complex spread across 60,000 sq mt.
english
{ "name": "kbide", "version": "0.3.1", "private": true, "author": "<NAME>", "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint", "_comment": "electron-rebuild --python 'C:/ProgramData/Anaconda3/envs/python2/python.exe'", "build-linux32": "electron-rebuild & vue-cli-service electron:build --linux --ia32", "build-linux64": "electron-rebuild & vue-cli-service electron:build --linux --x64", "build-mac": "cp -R boards platforms dist_electron/mac/kbide.app/Contents/", "build-macos": "electron-rebuild & vue-cli-service electron:build --mac", "build-win32": "electron-rebuild & vue-cli-service electron:build --win --ia32", "build-win64": "electron-rebuild & vue-cli-service electron:build --win --x64", "electron:build": "electron-rebuild & vue-cli-service electron:build", "electron:generate-icons": "electron-icon-builder --input=./public/icon.png --output=build --flatten", "electron:rebuild": "electron-rebuild", "electron:rebuild-serial": "electron-rebuild -f -w serialport", "electron:serve": "vue-cli-service electron:serve", "postinstall": "electron-builder install-app-deps", "postuninstall": "electron-builder install-app-deps", "test:unit": "vue-cli-service test:unit" }, "main": "background.js", "dependencies": { "@johmun/vue-tags-input": "^2.0.1", "chart.js": "^2.8.0", "codemirror": "^5.43.0", "codemirror-advanceddialog": "git+https://github.com/comdet/CodeMirror-AdvancedDialog.git", "codemirror-revisedsearch": "git+https://github.com/comdet/CodeMirror-RevisedSearch.git", "electron-asar-hot-updater": "git+https://github.com/comdet/electron-asar-hot-updater.git", "electron-google-analytics": "^0.1.0", "electron-unhandled": "^2.2.0", "electron-util": "^0.11.0", "external-loader": "^0.1.1", "font-awesome": "^4.7.0", "lodash.truncate": "^4.4.2", "md5": "^2.2.1", "mkdirp": "^0.5.1", "moment": "^2.24.0", "nprogress": "^0.2.0", "prismjs": "^1.15.0", "quill": "^1.3.6", "register-service-worker": "^1.5.2", "request-promise": "^4.2.4", "roboto-fontface": "*", "serialport": "^7.1.4", "vee-validate": "^2.1.4", "vue": "^2.5.21", "vue-blockly": "git+https://github.com/comdet/vue-blockly.git", "vue-chartjs": "^3.4.2", "vue-cm": "^1.1.0", "vue-color": "^2.7.0", "vue-fullcalendar": "^1.0.9", "vue-highlightjs": "^1.3.3", "vue-markdown": "^2.2.4", "vue-multipane": "^0.9.5", "vue-perfect-scrollbar": "^0.1.0", "vue-prism-component": "^1.1.1", "vue-qrcode-component": "^2.1.1", "vue-quill-editor": "^3.0.6", "vue-router": "^3.0.1", "vue-smooth-scrollbar": "^0.1.2", "vue-swatches": "^1.0.2", "vue-tour": "git+https://github.com/comdet/vue-tour.git", "vuedraggable": "^2.17.0", "vuetify": "^1.3.0", "vuetify-dialog": "^0.3.4", "vuex": "^3.0.1", "webpack-externals-plugin": "^1.0.0", "yauzl": "^2.10.0" }, "devDependencies": { "@vue/cli-plugin-babel": "^3.2.0", "@vue/cli-plugin-eslint": "^3.2.0", "@vue/cli-plugin-pwa": "^3.2.0", "@vue/cli-plugin-unit-jest": "^3.8.0", "@vue/cli-service": "^3.2.0", "@vue/eslint-config-prettier": "^4.0.1", "@vue/test-utils": "1.0.0-beta.29", "babel-core": "7.0.0-bridge.0", "babel-eslint": "^10.0.1", "babel-jest": "^23.6.0", "braces": "^3.0.2", "electron": "^4.1.4", "electron-builder": "^20.38.5", "electron-icon-builder": "^1.0.0", "electron-rebuild": "^1.8.4", "eslint": "^5.8.0", "eslint-plugin-vue": "^5.0.0", "fstream": "^1.0.12", "js-yaml": "^3.13.1", "nwjs-builder-phoenix": "^1.15.0", "stylus": "^0.54.5", "stylus-loader": "^3.0.2", "tar": "^4.4.8", "vue-cli-plugin-electron-builder": "^1.0.0-rc.11", "vue-cli-plugin-vuetify": "^0.4.6", "vue-template-compiler": "^2.5.21", "vuetify-loader": "^1.0.5", "webpack-bundle-analyzer": "^3.3.2" }, "git": "https://github.com/MakerAsia/KBProIDE" }
json
{ "vorgangId": "36092", "VORGANG": { "WAHLPERIODE": "17", "VORGANGSTYP": "Schriftliche Frage", "TITEL": "Übergangslösung für strafbefreiende Selbstanzeigen zwischen Ausfertigung und Verkündung des Schwarzarbeiterbekämpfungsgesetzes gemäß Schreiben des BMF", "AKTUELLER_STAND": "Beantwortet", "SIGNATUR": "", "GESTA_ORDNUNGSNUMMER": "", "WICHTIGE_DRUCKSACHE": { "DRS_HERAUSGEBER": "BT", "DRS_NUMMER": "17/5876", "DRS_TYP": "Schriftliche Fragen", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/btd/17/058/1705876.pdf" }, "EU_DOK_NR": "", "SCHLAGWORT": [ "Abgabenordnung", "Bundesministerium der Finanzen", { "_fundstelle": "true", "__cdata": "Schwarzarbeit" }, { "_fundstelle": "true", "__cdata": "Schwarzarbeitsbekämpfungsgesetz" }, { "_fundstelle": "true", "__cdata": "Selbstanzeige" }, "Steuerrecht", "Verwaltungsvorschrift" ], "ABSTRAKT": "Originaltext der Frage(n): \r\n \r\nWelche praxisgerechte Lösung für strafbefreiende Selbstanzeigen im Zeitraum zwischen Ausfertigung und Verkündung des Schwarzgeldbekämpfungsgesetzes wird in dem Schreiben des BMF (GZ IV A 4 &ndash; S 1910/10/10104, DOK 201110299770) angesprochen, und welche Bagatellabweichungen sind bei der Berichtigung in vollem Umfang nach § 371 Absatz 1 AO zulässig, auch in Abgrenzung zur bisherigen Handhabe, damit eine strafbefreiende Wirkung noch eintritt (bitte mit Begründung)?" }, "VORGANGSABLAUF": { "VORGANGSPOSITION": { "ZUORDNUNG": "BT", "URHEBER": "Schriftliche Frage/Schriftliche Antwort ", "FUNDSTELLE": "20.05.2011 - BT-Drucksache 17/5876, Nr. 27", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/17/058/1705876.pdf", "PERSOENLICHER_URHEBER": [ { "VORNAME": "Hartmut", "NACHNAME": "Koschyk", "FUNKTION": "Parl. Staatssekr.", "RESSORT": "Bundesministerium der Finanzen", "AKTIVITAETSART": "Antwort" }, { "VORNAME": "Richard", "NACHNAME": "Pitterle", "FUNKTION": "MdB", "FRAKTION": "DIE LINKE", "AKTIVITAETSART": "Frage" } ] } } }
json
Carolina Panthers receiver Robbie Anderson has always had love for Cam Newton, even prior to playing with him last season. In fact, he considers the quarterback, whom he briefly talked about on Wednesday, family. ESPN’s David Newton (no actual relation either) capped off Anderson’s media availability by asking if he’s stayed in contact with Cam. And he has. The seventh-year wideout was then asked by Joseph Person of The Athletic if he’s surprised that the NFL’s former Most Valuable Player isn’t currently on a roster. And he’s not. This is pretty much what Newton has maintained about the current state of his football career. Upon returning to and finishing up with Carolina for the 2021 campaign, Newton has said he’s been waiting on the right opportunity. Whatever that means, we don’t yet know—as he’s remained on the open market this late into the year. But maybe we’ll get an answer soon enough, when the grind of the regular season (or the aftermath of a potentially long suspension) eventually begins.
english
Cricketer Rohit Sharma has been selected for India’s highest sporting award – The Rajiv Gandhi Khel Ratna award along with four others. Rohit Sharma, was chosen for the most coveted sporting award on Friday along with para-athlete Mariappan Thangavelu, table tennis champion Manika Batra, wrestler Vinesh Phogat and hockey player Rani Rampal were finalised to get the prestigious award. On the other hand, Assam boxer Lovlina Borgohain, along with 26 other sportspersons, has been selected for Arjuna Award. Lovlina is the first woman from Assam to qualify for the Olympics. After Shiva Thapa she is and the second boxer from the state to represent the country at the Olympics. Earlier, Lovlina won a gold medal at the 1st India Open International Boxing Tournament held in New Delhi and a silver medal at the 2nd India Open International Boxing Tournament held in Guwahati. She won a bronze medal at the 2019 AIBA Women’s World Boxing Championships held in Ulan-Ude, Russia. Lovlina was born on 2 October 1997, and hails from Golaghat district of Assam. Before Rohit, only three more Indian cricketers – Sachin Tendulkar, MS Dhoni and Virat Kohli have received India’s highest sporting honour. All the sportspersons will receive the awards on August 29 – which is also celebrated as National Sports Day to commemorate the birth anniversary of hockey wizard Major Dhyan Chand. This year, due to the ongoing coronavirus pandemic, the ceremony is likely to be held virtually. Complete list of Arjuna awardees: 1. Atanu Das (Archery) 2. Shiva Keshavan (Luge) 3. Dutee Chand (Athletics) 4. Satwiksairaj Rankireddy (Badminton) 5. Chirag Shetty (Badminton) 6. Vishesh Bhrighuvanshi (Basketball) 7. Ishant Sharma (Cricket) 8. Deepti Sharma (Cricket) 9. Lovlina Borgohain (Boxing) 10. Manish Kaushik (Boxing) 11. Sawant Ajay Anant (Equestrian) 12. Sandhesh Jhingan (Football) 13. Aditi Ashok (Golf) 14. Akashdeep Singh (Hockey) 15. Deepika Thakur (Hockey) 16. Deepak Niwas Hooda (Kabaddi) 17. Sarika Kale (Kho-kho) 18. Suyash Jadhav (Para-Swimming) 19. Manish narwal (Para-Shooting) 20. Sandeep Chaudhary (Para-Athletics) 21. Saurabh Chaudhary (Shooting) 22. Manu Bhaker (Shooting) 23. Sanil Shetty (Table-Tennis) 24. Divij Sharan (Tennis) 25. Divya Kakran (Wrestling) 26. Rahul Aware (Wrestling) 27. Dattu Bhokanal (Rowing)
english
Paramount+'s new crime drama series, The Gold, is all set to premiere on the streaming platform on Sunday, June 25, 2023. The show is reportedly inspired by the notorious Brink's-Mat robbery that took place in London in 1983. Here's a short description of the series, as per BBC: ''On the 26 November 1983, six armed men broke into the Brink’s-Mat security depot near London’s Heathrow Airport, and inadvertently stumbled across gold bullion worth £26m. What started as 'a typical Old Kent Road armed robbery' according to detectives at the time, became a seminal event in British criminal history, remarkable not only for the scale of the theft, at the time the biggest in world history, but for its wider legacy.'' The description further reads, ''The disposal of the bullion caused the birth of large-scale international money laundering, provided the dirty money that helped fuel the London Docklands property boom, united blue and white collar criminals and left controversy and murder in its wake.'' The series stars Hugh Bonneville in one of the major roles, along with various others playing important supporting characters. It is helmed by Aneil Karia and Lawrence Gough. Hugh Bonneville essays the lead role of Brian Boyce in The Gold. Brian is a detective who leads the investigation and plays a key role in the story. Bonneville looks quite impressive in the series' trailer, and it'll be interesting to see how his character will be explored in the show. Hugh Bonneville's other notable film and TV acting credits include Mosley, Bank of Dave, and Muppets Most Wanted, to name a few. Dominic Cooper essays the role of Edwyn Cooper in the new crime drama series. Edwyn is a businessman who's planning to invest the money from the stolen bullion. Cooper looks brilliant in the show's trailer, promising to deliver a memorable performace in the series. Apart from The Gold, Cooper is known for his performances in Agent Carter, Preacher, Captain America: The First Avenger, and My Week with Marilyn, among many more. Charlotte Spencer dons the role of Nicki Jennings in The Gold. Nicki is a young detective who's part of the main investigation. Apart from that, more details regarding her character are currently being kept under tight wraps. She's previously appeared in The Duke, Cindrella, Sandition, The Living and the Dead, and many more. Apart from the aforementioned actors, the series also features many others playing crucial supporting/minor roles. These include: The official trailer for the series offers a peek into the various gripping events set to unfold in the new series. The trailer brilliantly sets the tone and doesn't give away any major spoilers. Viewers can expect a thrilling crime drama series replete with many dramatic moments. Don't forget to watch The Gold on Paramount+ on Sunday, June 25, 2023.
english
Ram Navami will be observed on 4th April 2017, Wednesday. This occasion is celebrated in an enthusiastic way among Hindus. On the 9th day of Shukla Paksha of Hindu month Chaitra, Lord Rama was borned. That is why, this day is celebrated as Ram Navami. Lord Rama was the 7th incarnation of Lord Vishnu. Ram Navami is celebrated in various regions of India. To know more, keep on reading this article. Every year Ram Navami festival comes at the end of March or beginning of April month. Perhaps this festival is not celebrated like other grand festivals Holi and Diwali, but yes, this auspicious occasion reminds us about Lord Rama and the inspiration he gave us. Today, people have really forgotten the true meaning of responsibilities and duties. They are gradually indulging in selfishness and falsehood. We can't deny that this is Kali Yuga-the Iron Age, where the entire atmosphere is full of evil things. If we truly want to defeat our immoralities, we should deeply commemorate Lord Rama. Bhagwan Shri Rama is the elder son of King Dasharatha and Queen Kaushalya, this gives him another name - Dashrath Nandan. Shri Rama is the real idol of patience. With enormous endurance, Lord Rama had completed 14 years of Vanvas (exile) given by his father and second mother Kakai. He never perverted his path of truth. Lord Rama defeated the powerful king of Lanka and herculean devil of earth "Ravana", and thus proved that good things and truth always get victory over evil existence. On the occasion of Ram Navami, religious people and devotees of Shri Rama get up early in the morning and take bath to proceed for worship. Many devotees also keep strict fast on this day and do not consume salty food. People decorate their pooja sthan (place of worship) at home and embellish idol or picture of Shri Rama with colourful flowers and with mesmerizing fragrances of dhoop battis. Temples of Shri Rama are also decorated with colourful lights and flowers. Pundits adorn Shri Rama with mukuts of gold or silver, and with beautiful, neat and clean silky cloths. They pray invocations, bhajans and aarti of shri Rama with a melodious loud echo. They offer varieties of Sweets and Prasad to please Lord Rama. One famous Bhajan of Shri Rama, you may find here to offer your spiritual feeling towards Shri Ram on the occasion this Ram Navami. The above given Bhajan is really a harmonious invocation for Shri Rama. Offer your true prayers to Lord Ram in this Shri Ram Navami and attain his enormous blessings. This Ram Navami, we may see, like every year, a huge rush of devotees and religious people in the temples of Shri Rama . We at AstroSage heartily wish you a peaceful and virtuous Ram Navami. May your pray and true belief towards Shri Rama continue forever! Jai Shri Rama.
english
<reponame>chunminggg/we-travel-koa2-api { "name": "http-assert", "description": "assert with status codes", "version": "1.3.0", "license": "MIT", "keywords": [ "assert", "http" ], "repository": "jshttp/http-assert", "dependencies": { "deep-equal": "~1.0.1", "http-errors": "~1.6.1" }, "devDependencies": { "istanbul": "0.4.5", "mocha": "2.5.3" }, "files": [ "LICENSE", "index.js" ], "engines": { "node": ">= 0.8" }, "scripts": { "test": "mocha --reporter spec --bail --check-leaks test/", "test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/", "test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/" }, "_from": "http-assert@1.3.0", "_resolved": "http://registry.npm.taobao.org/http-assert/download/http-assert-1.3.0.tgz" }
json
@import '../../css/units.css'; $border-radius: 0.25rem; .mod-edit-field { background: none; border: none; display: inline-block; padding: 0.25rem 0.325rem; outline: none; border-radius: $border-radius; min-width: 3rem; font-size: 0.85rem; text-align: center; } .edit-field-icon { width: 1.5rem; height: 1.5rem; flex-grow: 1; vertical-align: middle; } .edit-field-title { display: block; margin-top: 0.125rem; font-size: 0.625rem; }
css
/// <reference path="fourslash.ts" /> // @allowJs: true // @checkJs: true // @Filename: blah.js ////export default class Blah {} ////export const Named1 = 0; ////export const Named2 = 1; // @Filename: index.js ////var path = require('path') //// , { promisify } = require('util') //// , { Named1 } = require('./blah') //// ////new Blah goTo.file("index.js"); verify.codeFix({ index: 0, errorCode: ts.Diagnostics.Cannot_find_name_0.code, description: `Update import from "./blah"`, newFileContent: `var path = require('path') , { promisify } = require('util') , { Named1, default: Blah } = require('./blah') new Blah` });
typescript
Bhawanipatna: A small-time cycle repair shop owner, Ajit Katta is known more for being an altruist. Ajit, a resident of Shiv Mandir Pada under Bhawanipatna sadar in Kalahandi district, lives in a hut, with his wife Bhumisuta, a son and daughter. A small cycle repair shop at Bhawanipatna Jagannath road is his sole source of income. His shop opens early in the morning. Local people say they hardly ever see Ajit haggling for money. “He happily keeps whatever one gives him for his labour,” they observe. Obvious as it is that the earning from the shop is hardly enough to meet the daily family expenses. Yet he saves something for rainy days. Cut to his altruism aspect. He withdraws something from his saved money to feed beggars, once a week. And he gets immense pleasure from feeding them. “The moment I see a smile on the lips of beggars while they are having their lunches, it soothes my heart. The pleasure I get through giving something to the needy ones is inexplicable. It is divine. It is aptly said that ‘Service to mankind is service to God,” he boasts.
english
<reponame>wantnon2/superSingleCell-c3dEngine // // c3dActor.cpp // HelloOpenGL // // Created by wantnon (<NAME>) on 12-12-20. // // #include "c3dModel.h" void Cc3dModel::addMesh(Cc3dMesh*mesh){ assert(mesh); m_meshList.push_back(mesh); // mesh->setName("?"); this->addChild(mesh); } void Cc3dModel::submitVertex(GLenum usage){ int nMesh=(int)getMeshCount(); for(int i=0;i<nMesh;i++){ Cc3dMesh*mesh=m_meshList[i]; int nSubMesh=(int)mesh->getSubMeshCount(); for(int j=0;j<nSubMesh;j++){ Cc3dSubMesh*psubMesh=mesh->getSubMeshByIndex(j); psubMesh->getIndexVBO()->submitVertex(psubMesh->getSubMeshData()->vlist, usage); } } } void Cc3dModel::submitIndex(GLenum usage){ int nMesh=(int)getMeshCount(); for(int i=0;i<nMesh;i++){ Cc3dMesh*mesh=m_meshList[i]; int nSubMesh=(int)mesh->getSubMeshCount(); for(int j=0;j<nSubMesh;j++){ Cc3dSubMesh*psubMesh=mesh->getSubMeshByIndex(j); psubMesh->getIndexVBO()->submitIndex(psubMesh->getSubMeshData()->IDtriList, usage); } } }
cpp
{"collections":[{"fullName":"KaVE.VS.FeedbackGenerator.Tests.UserControls.Anonymization.AnonymizationContextTest","methods":[{"name":"KaVE.VS.FeedbackGenerator.Tests.UserControls.Anonymization.AnonymizationContextTest.AssertNotifications(System.String[] expecteds)","type":"SIMPLE","count":8}]}]}
json
{ "name": "locko", "version": "0.0.3", "description": "A simple in-process locking mechanism for critical sections of code.", "main": "index.js", "scripts": { "test": "mocha ./tests.js", "lint": "./node_modules/.bin/eslint ." }, "repository": { "type": "git", "url": "git+https://github.com/mistval/locko.git" }, "keywords": [ "lock", "locking", "mutex", "transaction", "atomic", "critical", "code" ], "author": "mistval", "license": "MIT", "bugs": { "url": "https://github.com/mistval/locko/issues" }, "homepage": "https://github.com/mistval/locko#readme", "devDependencies": { "eslint": "^5.3.0", "eslint-config-airbnb-base": "*", "eslint-plugin-import": "^2.14.0" } }
json
import React from 'react' import PropTypes from 'prop-types' import { Link } from 'react-router-dom' import styled from 'styled-components' import Icon from '../icon' const NavCardStyle = styled.div` display: flex; flex-direction: row; align-items: center; color: ${props => props.theme.colors.B300}; border: 1px solid ${props => props.theme.colors.S400}; padding: 30px; border-radius: 4px; cursor: pointer; font-size: 16px; .icon { font-weight: bold; margin-right: 30px; } .text { display: flex; flex-direction: column; .title { font-weight: bold; } .subtitle { font-size: 10px; color: ${props => props.theme.colors.B100}; } } ` const NavCard = ({ icon, title, subTitle, to, onClick, className }) => { const Resolved = to ? Link : 'div' return ( <Resolved to={to} onClick={onClick}> <NavCardStyle className={className}> <Icon name={icon} className='icon' /> <div className='text'> <div className='title'> {title} </div> <div className='subtitle'> {subTitle} </div> </div> </NavCardStyle> </Resolved> ) } NavCard.propTypes = { icon: PropTypes.string.isRequired, title: PropTypes.string.isRequired, subTitle: PropTypes.string.isRequired, to: PropTypes.string, onClick: PropTypes.func, className: PropTypes.string } export default NavCard
javascript
<gh_stars>1-10 import java.time.DayOfWeek; import java.util.Arrays; import java.util.Scanner; import java.io.File; import java.io.FileNotFoundException; import java.io.FileWriter; public class GetInputSimple { public static void main(String[] args) { System.out.println("Hello User! This is the Code Explode Daily Planning App, or CEDPA"); Scanner reader = new Scanner(System.in); boolean keepGoing = true; String[][] schedule= new String[15][3]; int i=0; Scanner Reader = new Scanner(System.in); String schedulestring=""; //This section creates the array and gets input of the name, date, and time of the class while (keepGoing) { System.out.println("What is the name of your class?"); String class1=Reader.next(); schedule[i][2]=class1; System.out.println("What time does the class meet?"); String time = Reader.next(); schedule[i][1]=time; String day = AskDay(); schedule[i][0]=day; schedulestring=Arrays.toString(schedule[i]); schedulestring=schedulestring.substring(1,schedulestring.length()-1); WriteToFile(schedulestring); i++; //This sections checks whether or not the class meets again, and creates //a new line autofilling the time and name of the class. boolean keepGoing2=true; while(keepGoing2){ System.out.println("does the class meet again?"); String MeetAgain= reader.nextLine(); if(MeetAgain.equals("yes")){ schedule[i][2]=schedule[i-1][2]; schedule[i][1]=schedule[i-1][1]; day = AskDay(); schedule[i][0]=day; schedulestring=Arrays.toString(schedule[i]); schedulestring=schedulestring.substring(1,schedulestring.length()-1); WriteToFile(schedulestring); i++; } else{ keepGoing2=false; } } //This section tests whether or not the user has an additional class to add! System.out.println("Do you have another class? Enter yes or no)"); String anotherClass = reader.nextLine(); if (anotherClass.equals("yes")) { keepGoing = true; } else { keepGoing = false; } } Reader.close(); System.out.println(); } //This method makes sure the user inputs the day in a way that fits the ArrayMaker program public static String AskDay() { Scanner reader = new Scanner(System.in); boolean right = false; String day = " "; while (!right) { System.out.println("What day does the class meet? (enter the three letter abbreviation, ex thu.)"); String check = reader.next(); if (check.equals("sun") || check.equals("mon") || check.equals("tue") || check.equals("wed") || check.equals("thu") || check.equals("fri") || check.equals("sat")) { day = check; right = true; } else { System.out.println("You made an error in entering the day (try mon, tue, wed...)"); right = false; } } return day; } //This method writes the final array into a file, line by line. public static void WriteToFile(String classDayTime){ try { File file = new File("classes.txt"); FileWriter writer = new FileWriter(file, true); writer.write(classDayTime + "\n"); writer.close(); } catch (Exception e) { System.out.println("Error in WriteToFile:" + e);// printstream } } }
java
Andhra Pradesh Chief Minister Chandrababu Naidu has appealed to landlords in Guntur, Amaravati and Vijayawada not to increase house rents for the hundreds of AP employees who will be living in these parts following the functioning of the State Secretariat at Velagapudi from June next. Stating that it was painful to him that the rents in these areas were on the rise, the Chief Minister said on Wednesday after laying the foundation stone for the Secretariat at Velagapudi that a rise in the rents would hit at the root of the administration. Hoping that the landlords of these areas would co-operate with the new administration, he hoped the people in general in these parts would be friendly to the AP staff coming from Hyderabad. One way or the other, the rise in rents in these parts was the very issue that eventually fuelled the Telangana agitation and led to the separation of the combined AP. Prof Jaishankar, the ideologue for Telangana, had carried the memories of the raised rents in Vijayawada as a boy to reach the conclusion that the twain shall never meet. There should, therefore, be a societal understanding against making money from raised rents of unfortunate people. The Vysya community during the Razakar movement in Hyderabad had migrated to Vijayawada and other areas. Likewise the AP staff will be moving to their region in the changed circumstances in Hyderabad.
english
# -*- test-case-name: epsilon.test.test_juice -*- # Copyright 2005 Divmod, Inc. See LICENSE file for details import warnings, pprint import keyword import io import six from twisted.internet.main import CONNECTION_LOST from twisted.internet.defer import Deferred, maybeDeferred, fail from twisted.internet.protocol import ServerFactory, ClientFactory from twisted.internet.ssl import Certificate from twisted.python.failure import Failure from twisted.python import log, filepath from epsilon.liner import LineReceiver from epsilon.compat import long from epsilon import extime ASK = '_ask' ANSWER = '_answer' COMMAND = '_command' ERROR = '_error' ERROR_CODE = '_error_code' ERROR_DESCRIPTION = '_error_description' LENGTH = '_length' BODY = 'body' debug = False class JuiceBox(dict): """ I am a packet in the JUICE protocol. """ def __init__(self, __body='', **kw): self.update(kw) if __body: assert isinstance(__body, str), "body must be a string: %r" % ( repr(__body),) self['body'] = __body def body(): def get(self): warnings.warn("body attribute of boxes is now just a regular field", stacklevel=2) return self['body'] def set(self, newbody): warnings.warn("body attribute of boxes is now just a regular field", stacklevel=2) self['body'] = newbody return get,set body = property(*body()) def copy(self): newBox = self.__class__() newBox.update(self) return newBox def serialize(self, delimiter=b'\r\n', escaped=b'\r\n '): assert LENGTH not in self delimiter = six.ensure_binary(delimiter) escaped = six.ensure_binary(escaped) L = [] for (k, v) in six.viewitems(self): if k == BODY: k = LENGTH v = str(len(self[BODY])) L.append(six.ensure_binary(k).replace(b'_', b'-').title()) L.append(b': ') L.append(six.ensure_binary(v).replace(delimiter, escaped)) L.append(delimiter) L.append(delimiter) if BODY in self: L.append(six.ensure_binary(self[BODY])) return b''.join(L) def sendTo(self, proto): """ Serialize and send this box to a Juice instance. By the time it is being sent, several keys are required. I must have exactly ONE of:: -ask -answer -error If the '-ask' header is set, then the '-command' header must also be set. """ proto.sendPacket(self) # juice.Box => JuiceBox Box = JuiceBox class TLSBox(JuiceBox): def __repr__(self): return 'TLS(**%s)' % (super(TLSBox, self).__repr__(),) def __init__(self, __certificate, __verify=None, __sslstarted=None, **kw): super(TLSBox, self).__init__(**kw) self.certificate = __certificate self.verify = __verify self.sslstarted = __sslstarted def sendTo(self, proto): super(TLSBox, self).sendTo(proto) if self.verify is None: proto.startTLS(self.certificate) else: proto.startTLS(self.certificate, self.verify) if self.sslstarted is not None: self.sslstarted() class QuitBox(JuiceBox): def __repr__(self): return 'Quit(**%s)' % (super(QuitBox, self).__repr__(),) def sendTo(self, proto): super(QuitBox, self).sendTo(proto) proto.transport.loseConnection() class _SwitchBox(JuiceBox): def __repr__(self): return 'Switch(**%s)' % (super(_SwitchBox, self).__repr__(),) def __init__(self, __proto, **kw): super(_SwitchBox, self).__init__(**kw) self.innerProto = __proto def sendTo(self, proto): super(_SwitchBox, self).sendTo(proto) proto._switchTo(self.innerProto) class NegotiateBox(JuiceBox): def __repr__(self): return 'Negotiate(**%s)' % (super(NegotiateBox, self).__repr__(),) def sendTo(self, proto): super(NegotiateBox, self).sendTo(proto) proto._setProtocolVersion(int(self['version'])) class JuiceError(Exception): pass class RemoteJuiceError(JuiceError): """ This error indicates that something went wrong on the remote end of the connection, and the error was serialized and transmitted to you. """ def __init__(self, errorCode, description, fatal=False): """Create a remote error with an error code and description. """ Exception.__init__(self, "Remote[%s]: %s" % (errorCode, description)) self.errorCode = errorCode self.description = description self.fatal = fatal class UnhandledRemoteJuiceError(RemoteJuiceError): def __init__(self, description): errorCode = b"UNHANDLED" RemoteJuiceError.__init__(self, errorCode, description) class JuiceBoxError(JuiceError): pass class MalformedJuiceBox(JuiceBoxError): pass class UnhandledCommand(JuiceError): pass class IncompatibleVersions(JuiceError): pass class _Transactor: def __init__(self, store, callable): self.store = store self.callable = callable def __call__(self, box): return self.store.transact(self.callable, box) def __repr__(self): return '<Transaction in: %s of: %s>' % (self.store, self.callable) class DispatchMixin: baseDispatchPrefix = 'juice_' autoDispatchPrefix = 'command_' wrapper = None def _auto(self, aCallable, proto, namespace=None): if aCallable is None: return None command = aCallable.command if namespace not in command.namespaces: # if you're in the wrong namespace, you are very likely not allowed # to invoke the command you are trying to invoke. some objects # have commands exposed in a separate namespace for security # reasons, since the security model is a role : namespace mapping. log.msg('WRONG NAMESPACE: %r, %r' % (namespace, command.namespaces)) return None def doit(box): kw = stringsToObjects(box, command.arguments, proto) for name, extraArg in command.extra: kw[name] = extraArg.fromTransport(proto.transport) # def checkIsDict(result): # if not isinstance(result, dict): # raise RuntimeError("%r returned %r, not dictionary" % ( # aCallable, result)) # return result def checkKnownErrors(error): key = error.trap(*command.allErrors) code = command.allErrors[key] desc = str(error.value) return Failure(RemoteJuiceError( code, desc, error in command.fatalErrors)) return maybeDeferred(aCallable, **kw).addCallback( command.makeResponse, proto).addErrback( checkKnownErrors) return doit def _wrap(self, aCallable): if aCallable is None: return None wrap = self.wrapper if wrap is not None: return wrap(aCallable) else: return aCallable def normalizeCommand(self, cmd): """Return the canonical form of a command. """ return cmd.upper().strip().replace('-', '_') def lookupFunction(self, proto, name, namespace): """Return a callable to invoke when executing the named command. """ # Try to find a method to be invoked in a transaction first # Otherwise fallback to a "regular" method fName = self.autoDispatchPrefix + name fObj = getattr(self, fName, None) if fObj is not None: # pass the namespace along return self._auto(fObj, proto, namespace) assert namespace is None, 'Old-style parsing' # Fall back to simplistic command dispatching - we probably want to get # rid of this eventually, there's no reason to do extra work and write # fewer docs all the time. fName = self.baseDispatchPrefix + name return getattr(self, fName, None) def dispatchCommand(self, proto, cmd, box, namespace=None): fObj = self.lookupFunction(proto, self.normalizeCommand(cmd), namespace) if fObj is None: return fail(UnhandledCommand(cmd)) return maybeDeferred(self._wrap(fObj), box) def normalizeKey(key): lkey = six.ensure_str(key).lower().replace('-', '_') if keyword.iskeyword(lkey): return lkey.title() return lkey def parseJuiceHeaders(lines): """ Create a JuiceBox from a list of header lines. @param lines: a list of lines. @type lines: a list of L{bytes} """ b = JuiceBox() key = None for L in lines: if L[0:1] == b' ': # continuation assert key is not None b[key] += six.ensure_str(b'\r\n' + L[1:]) continue parts = L.split(b': ', 1) if len(parts) != 2: raise MalformedJuiceBox("Wrong number of parts: %r" % (L,)) key, value = parts key = normalizeKey(key) b[key] = six.ensure_str(value) return int(b.pop(LENGTH, 0)), b class JuiceParserBase(DispatchMixin): def __init__(self): self._outstandingRequests = {} def _puke(self, failure): log.msg("Juice server or network failure " "unhandled by client application:") log.err(failure) log.msg( "Dropping connection! " "To avoid, add errbacks to ALL remote commands!") if self.transport is not None: self.transport.loseConnection() _counter = long(0) def _nextTag(self): self._counter += 1 return '%x' % (self._counter,) def failAllOutgoing(self, reason): OR = self._outstandingRequests.items() self._outstandingRequests = None # we can never send another request for key, value in OR: value.errback(reason) def juiceBoxReceived(self, box): if debug: log.msg("Juice receive: %s" % pprint.pformat(dict(six.viewitems(box)))) if ANSWER in box: question = self._outstandingRequests.pop(box[ANSWER]) question.addErrback(self._puke) self._wrap(question.callback)(box) elif ERROR in box: question = self._outstandingRequests.pop(box[ERROR]) question.addErrback(self._puke) self._wrap(question.errback)( Failure(RemoteJuiceError(box[ERROR_CODE], box[ERROR_DESCRIPTION]))) elif COMMAND in box: cmd = box[COMMAND] def sendAnswer(answerBox): if ASK not in box: return if self.transport is None: return answerBox[ANSWER] = box[ASK] answerBox.sendTo(self) def sendError(error): if ASK not in box: return error if error.check(RemoteJuiceError): code = error.value.errorCode desc = error.value.description if error.value.fatal: errorBox = QuitBox() else: errorBox = JuiceBox() else: errorBox = QuitBox() log.err(error) # here is where server-side logging happens # if the error isn't handled code = 'UNHANDLED' desc = "Unhandled Remote System Exception " errorBox[ERROR] = box[ASK] errorBox[ERROR_DESCRIPTION] = desc errorBox[ERROR_CODE] = code if self.transport is not None: errorBox.sendTo(self) return None # intentionally stop the error here: don't log the # traceback if it's handled, do log it (earlier) if # it isn't self.dispatchCommand(self, cmd, box).addCallbacks(sendAnswer, sendError ).addErrback(self._puke) else: raise RuntimeError( "Empty packet received over connection-oriented juice: %r" % (box,)) def sendBoxCommand(self, command, box, requiresAnswer=True): """ Send a command across the wire with the given C{juice.Box}. Returns a Deferred which fires with the response C{juice.Box} when it is received, or fails with a C{juice.RemoteJuiceError} if an error is received. If the Deferred fails and the error is not handled by the caller of this method, the failure will be logged and the connection dropped. """ if self._outstandingRequests is None: return fail(CONNECTION_LOST) box[COMMAND] = command tag = self._nextTag() if requiresAnswer: box[ASK] = tag result = self._outstandingRequests[tag] = Deferred() else: result = None box.sendTo(self) return result class Argument: optional = False def __init__(self, optional=False): self.optional = optional def retrieve(self, d, name): if self.optional: value = d.get(name) if value is not None: del d[name] else: value = d.pop(name) return value def fromBox(self, name, strings, objects, proto): st = self.retrieve(strings, name) if self.optional and st is None: objects[name] = None else: objects[name] = self.fromStringProto(st, proto) def toBox(self, name, strings, objects, proto): obj = self.retrieve(objects, name) if self.optional and obj is None: # strings[name] = None return else: strings[name] = self.toStringProto(obj, proto) def fromStringProto(self, inString, proto): return self.fromString(inString) def toStringProto(self, inObject, proto): return self.toString(inObject) def fromString(self, inString): raise NotImplementedError() def toString(self, inObject): raise NotImplementedError() class JuiceList(Argument): def __init__(self, subargs): self.subargs = subargs def fromStringProto(self, inString, proto): boxes = parseString(six.ensure_binary(inString)) values = [stringsToObjects(box, self.subargs, proto) for box in boxes] return values def toStringProto(self, inObject, proto): return b''.join([ objectsToStrings(objects, self.subargs, Box(), proto).serialize() for objects in inObject ]) class ListOf(Argument): def __init__(self, subarg, delimiter=', '): self.subarg = subarg self.delimiter = delimiter def fromStringProto(self, inString, proto): strings = inString.split(self.delimiter) L = [self.subarg.fromStringProto(string, proto) for string in strings] return L def toStringProto(self, inObject, proto): L = [] for inSingle in inObject: outString = self.subarg.toStringProto(inSingle, proto) assert self.delimiter not in outString L.append(outString) return self.delimiter.join(L) class Integer(Argument): fromString = int def toString(self, inObject): return str(int(inObject)) class String(Argument): def toString(self, inObject): return inObject def fromString(self, inString): return inString class EncodedString(Argument): def __init__(self, encoding): self.encoding = encoding def toString(self, inObject): return inObject.encode(self.encoding) def fromString(self, inString): return inString.decode(self.encoding) # Temporary backwards compatibility for Exponent Body = String class Unicode(String): def toString(self, inObject): # assert isinstance(inObject, unicode) return String.toString(self, inObject.encode('utf-8')) def fromString(self, inString): # assert isinstance(inString, str) return String.fromString(self, inString).decode('utf-8') class Path(Unicode): def fromString(self, inString): return filepath.FilePath(Unicode.fromString(self, inString)) def toString(self, inObject): return Unicode.toString(self, inObject.path) class Float(Argument): fromString = float toString = str class Base64Binary(Argument): def toString(self, inObject): return inObject.encode('base64').replace('\n', '') def fromString(self, inString): return inString.decode('base64') class Time(Argument): def toString(self, inObject): return inObject.asISO8601TimeAndDate() def fromString(self, inString): return extime.Time.fromISO8601TimeAndDate(inString) class ExtraArg: def fromTransport(self, inTransport): raise NotImplementedError() class Peer(ExtraArg): def fromTransport(self, inTransport): return inTransport.getQ2QPeer() class PeerDomain(ExtraArg): def fromTransport(self, inTransport): return inTransport.getQ2QPeer().domain class PeerUser(ExtraArg): def fromTransport(self, inTransport): return inTransport.getQ2QPeer().resource class Host(ExtraArg): def fromTransport(self, inTransport): return inTransport.getQ2QHost() class HostDomain(ExtraArg): def fromTransport(self, inTransport): return inTransport.getQ2QHost().domain class HostUser(ExtraArg): def fromTransport(self, inTransport): return inTransport.getQ2QHost().resource class Boolean(Argument): def fromString(self, inString): if inString == 'True': return True elif inString == 'False': return False else: raise RuntimeError("Bad boolean value: %r" % (inString,)) def toString(self, inObject): if inObject: return 'True' else: return 'False' class _CommandMeta(type): def __new__(cls, name, bases, attrs): re = attrs['reverseErrors'] = {} er = attrs['allErrors'] = {} for v, k in six.viewitems(attrs.get('errors',{})): re[k] = v er[v] = k for v, k in six.viewitems(attrs.get('fatalErrors',{})): re[k] = v er[v] = k return type.__new__(cls, name, bases, attrs) @six.add_metaclass(_CommandMeta) class Command: arguments = [] response = [] extra = [] namespaces = [None] # This is set to [None] on purpose: None means # "no namespace", not "empty list". "empty # list" will make your command invalid in _all_ # namespaces, effectively uncallable. errors = {} fatalErrors = {} commandType = Box responseType = Box def commandName(): def get(self): return self.__class__.__name__ raise NotImplementedError("Missing command name") return get, commandName = property(*commandName()) def __init__(self, **kw): self.structured = kw givenArgs = [normalizeKey(k) for k in kw.keys()] forgotten = [] for name, arg in self.arguments: if normalizeKey(name) not in givenArgs and not arg.optional: forgotten.append(normalizeKey(name)) # for v in kw.itervalues(): # if v is None: # from pprint import pformat # raise RuntimeError("ARGH: %s" % pformat(kw)) if forgotten: if len(forgotten) == 1: plural = 'an argument' else: plural = 'some arguments' raise RuntimeError("You forgot %s to %r: %s" % ( plural, self.commandName, ', '.join(forgotten))) forgotten = [] def makeResponse(cls, objects, proto): try: return objectsToStrings(objects, cls.response, cls.responseType(), proto) except: log.msg("Exception in %r.makeResponse" % (cls,)) raise makeResponse = classmethod(makeResponse) def do(self, proto, namespace=None, requiresAnswer=True): if namespace is not None: cmd = namespace + ":" + self.commandName else: cmd = self.commandName def _massageError(error): error.trap(RemoteJuiceError) rje = error.value return Failure(self.reverseErrors.get(rje.errorCode, UnhandledRemoteJuiceError)(rje.description)) d = proto.sendBoxCommand( cmd, objectsToStrings(self.structured, self.arguments, self.commandType(), proto), requiresAnswer) if requiresAnswer: d.addCallback(stringsToObjects, self.response, proto) d.addCallback(self.addExtra, proto.transport) d.addErrback(_massageError) return d def addExtra(self, d, transport): for name, extraArg in self.extra: d[name] = extraArg.fromTransport(transport) return d class ProtocolSwitchCommand(Command): """Use this command to switch from something Juice-derived to a different protocol mid-connection. This can be useful to use juice as the connection-startup negotiation phase. Since TLS is a different layer entirely, you can use Juice to negotiate the security parameters of your connection, then switch to a different protocol, and the connection will remain secured. """ def __init__(self, __protoToSwitchToFactory, **kw): self.protoToSwitchToFactory = __protoToSwitchToFactory super(ProtocolSwitchCommand, self).__init__(**kw) def makeResponse(cls, innerProto, proto): return _SwitchBox(innerProto) makeResponse = classmethod(makeResponse) def do(self, proto, namespace=None): d = super(ProtocolSwitchCommand, self).do(proto) proto._lock() def switchNow(ign): innerProto = self.protoToSwitchToFactory.buildProtocol(proto.transport.getPeer()) proto._switchTo(innerProto, self.protoToSwitchToFactory) return ign def die(ign): proto.transport.loseConnection() return ign def handle(ign): self.protoToSwitchToFactory.clientConnectionFailed(None, Failure(CONNECTION_LOST)) return ign return d.addCallbacks(switchNow, handle).addErrback(die) class Negotiate(Command): commandName = 'Negotiate' arguments = [('versions', ListOf(Integer()))] response = [('version', Integer())] responseType = NegotiateBox class Juice(LineReceiver, JuiceParserBase, object): """ JUICE (JUice Is Concurrent Events) is a simple connection-oriented request/response protocol. Packets, or "boxes", are collections of RFC2822-inspired headers, plus a body. Note that this is NOT a literal interpretation of any existing RFC, 822, 2822 or otherwise, but a simpler version that does not do line continuations, does not specify any particular format for header values, dispatches semantic meanings of most headers on the -Command header rather than giving them global meaning, and allows multiple sets of headers (messages, or JuiceBoxes) on a connection. All headers whose names begin with a dash ('-') are reserved for use by the protocol. All others are for application use - their meaning depends on the value of the "-Command" header. """ protocolName = b'juice-base' hostCertificate = None MAX_LENGTH = 1024 * 1024 isServer = property(lambda self: self._issueGreeting, doc=""" True if this is a juice server, e.g. it is going to issue or has issued a server greeting upon connection. """) isClient = property(lambda self: not self._issueGreeting, doc=""" True if this is a juice server, e.g. it is not going to issue or did not issue a server greeting upon connection. """) def __init__(self, issueGreeting): """ @param issueGreeting: whether to issue a greeting when connected. This should be set on server-side Juice protocols. """ JuiceParserBase.__init__(self) self._issueGreeting = issueGreeting def __repr__(self): return '<%s %s/%s at 0x%x>' % (self.__class__.__name__, self.isClient and 'client' or 'server', self.innerProtocol, id(self)) __locked = False def _lock(self): """ Lock this Juice instance so that no further Juice traffic may be sent. This is used when sending a request to switch underlying protocols. You probably want to subclass ProtocolSwitchCommand rather than calling this directly. """ self.__locked = True innerProtocol = None def _switchTo(self, newProto, clientFactory=None): """ Switch this Juice instance to a new protocol. You need to do this 'simultaneously' on both ends of a connection; the easiest way to do this is to use a subclass of ProtocolSwitchCommand. """ assert self.innerProtocol is None, "Protocol can only be safely switched once." self.setRawMode() self.innerProtocol = newProto self.innerProtocolClientFactory = clientFactory newProto.makeConnection(self.transport) innerProtocolClientFactory = None def juiceBoxReceived(self, box): if self.__locked and COMMAND in box and ASK in box: # This is a command which will trigger an answer, and we can no # longer answer anything, so don't bother delivering it. return return super(Juice, self).juiceBoxReceived(box) def sendPacket(self, completeBox): """ Send a juice.Box to my peer. Note: transport.write is never called outside of this method. """ assert not self.__locked, "You cannot send juice packets when a connection is locked" if self._startingTLSBuffer is not None: self._startingTLSBuffer.append(completeBox) else: if debug: log.msg("Juice send: %s" % pprint.pformat(dict(six.viewitems(completeBox)))) result = completeBox.serialize() self.transport.write(result) def sendCommand(self, command, __content='', __answer=True, **kw): box = JuiceBox(__content, **kw) return self.sendBoxCommand(command, box, requiresAnswer=__answer) _outstandingRequests = None _justStartedTLS = False def makeConnection(self, transport): self._transportPeer = transport.getPeer() self._transportHost = transport.getHost() log.msg("%s %s connection established (HOST:%s PEER:%s)" % (self.isClient and "client" or "server", self.__class__.__name__, self._transportHost, self._transportPeer)) self._outstandingRequests = {} self._requestBuffer = [] LineReceiver.makeConnection(self, transport) _startingTLSBuffer = None def prepareTLS(self): self._startingTLSBuffer = [] def startTLS(self, certificate, *verifyAuthorities): if self.hostCertificate is None: self.hostCertificate = certificate self._justStartedTLS = True self.transport.startTLS(certificate.options(*verifyAuthorities)) stlsb = self._startingTLSBuffer if stlsb is not None: self._startingTLSBuffer = None for box in stlsb: self.sendPacket(box) else: raise RuntimeError( "Previously authenticated connection between %s and %s " "is trying to re-establish as %s" % ( self.hostCertificate, Certificate.peerFromTransport(self.transport), (certificate, verifyAuthorities))) def dataReceived(self, data): # If we successfully receive any data after TLS has been started, that # means the connection was secured properly. Make a note of that fact. if self._justStartedTLS: self._justStartedTLS = False return LineReceiver.dataReceived(self, data) def connectionLost(self, reason): log.msg("%s %s connection lost (HOST:%s PEER:%s)" % ( self.isClient and 'client' or 'server', self.__class__.__name__, self._transportHost, self._transportPeer)) self.failAllOutgoing(reason) if self.innerProtocol is not None: self.innerProtocol.connectionLost(reason) if self.innerProtocolClientFactory is not None: self.innerProtocolClientFactory.clientConnectionLost(None, reason) def lineReceived(self, line): if line: self._requestBuffer.append(line) else: buf = self._requestBuffer self._requestBuffer = [] bodylen, b = parseJuiceHeaders(buf) if bodylen: self._bodyRemaining = bodylen self._bodyBuffer = [] self._pendingBox = b self.setRawMode() else: self.juiceBoxReceived(b) def rawDataReceived(self, data): if self.innerProtocol is not None: self.innerProtocol.dataReceived(data) return self._bodyRemaining -= len(data) if self._bodyRemaining <= 0: if self._bodyRemaining < 0: self._bodyBuffer.append(data[:self._bodyRemaining]) extraData = data[self._bodyRemaining:] else: self._bodyBuffer.append(data) extraData = '' self._pendingBox['body'] = six.ensure_str(b''.join(six.ensure_binary(each) for each in self._bodyBuffer)) self._bodyBuffer = None b, self._pendingBox = self._pendingBox, None self.juiceBoxReceived(b) if self.innerProtocol is not None: self.innerProtocol.makeConnection(self.transport) if extraData: self.innerProtocol.dataReceived(extraData) else: self.setLineMode(extraData) else: self._bodyBuffer.append(data) protocolVersion = 0 def _setProtocolVersion(self, version): # if we ever want to actually mangle encodings, this is the place to do # it! self.protocolVersion = version return version def renegotiateVersion(self, newVersion): assert newVersion in VERSIONS, ( "This side of the connection doesn't support version %r" % (newVersion,)) v = VERSIONS[:] v.remove(newVersion) return Negotiate(versions=[newVersion]).do(self).addCallback( lambda ver: self._setProtocolVersion(ver['version'])) def command_NEGOTIATE(self, versions): for version in versions: if version in VERSIONS: return dict(version=version) raise IncompatibleVersions() command_NEGOTIATE.command = Negotiate VERSIONS = [1] class _ParserHelper(Juice): def __init__(self): Juice.__init__(self, False) self.boxes = [] self.results = Deferred() def getPeer(self): return 'string' def getHost(self): return 'string' disconnecting = False def juiceBoxReceived(self, box): self.boxes.append(box) # Synchronous helpers def parse(cls, fileObj): p = cls() p.makeConnection(p) p.dataReceived(fileObj.read()) return p.boxes parse = classmethod(parse) def parseString(cls, data): with io.BytesIO(data) as f: return cls.parse(f) parseString = classmethod(parseString) parse = _ParserHelper.parse parseString = _ParserHelper.parseString def stringsToObjects(strings, arglist, proto): objects = {} myStrings = strings.copy() for argname, argparser in arglist: argparser.fromBox(argname, myStrings, objects, proto) return objects def objectsToStrings(objects, arglist, strings, proto): myObjects = {} for (k, v) in objects.items(): myObjects[normalizeKey(k)] = v for argname, argparser in arglist: argparser.toBox(argname, strings, myObjects, proto) return strings class JuiceServerFactory(ServerFactory): protocol = Juice def buildProtocol(self, addr): prot = self.protocol(True) prot.factory = self return prot class JuiceClientFactory(ClientFactory): protocol = Juice def buildProtocol(self, addr): prot = self.protocol(False) prot.factory = self return prot
python
<gh_stars>0 {"name":"curve_rightUp","subject":1002,"date":"7122009-014219","paths":{"Pen":{"strokes":[{"x":-718,"y":687,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":0,"stroke_id":0},{"x":-718,"y":674,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":1,"stroke_id":0},{"x":-725,"y":638,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":2,"stroke_id":0},{"x":-720,"y":601,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":3,"stroke_id":0},{"x":-715,"y":547,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":4,"stroke_id":0},{"x":-711,"y":480,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":5,"stroke_id":0},{"x":-698,"y":403,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":6,"stroke_id":0},{"x":-682,"y":311,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":7,"stroke_id":0},{"x":-656,"y":210,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":8,"stroke_id":0},{"x":-623,"y":98,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":9,"stroke_id":0},{"x":-579,"y":-17,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":10,"stroke_id":0},{"x":-525,"y":-135,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":11,"stroke_id":0},{"x":-461,"y":-252,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":12,"stroke_id":0},{"x":-391,"y":-365,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":13,"stroke_id":0},{"x":-314,"y":-464,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":14,"stroke_id":0},{"x":-234,"y":-552,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":15,"stroke_id":0},{"x":-149,"y":-619,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":16,"stroke_id":0},{"x":-64,"y":-668,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":17,"stroke_id":0},{"x":23,"y":-689,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":18,"stroke_id":0},{"x":104,"y":-694,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":19,"stroke_id":0},{"x":186,"y":-669,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":20,"stroke_id":0},{"x":258,"y":-628,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":21,"stroke_id":0},{"x":330,"y":-559,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":22,"stroke_id":0},{"x":390,"y":-476,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":23,"stroke_id":0},{"x":446,"y":-372,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":24,"stroke_id":0},{"x":486,"y":-267,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":25,"stroke_id":0},{"x":520,"y":-151,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":26,"stroke_id":0},{"x":540,"y":-40,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":27,"stroke_id":0},{"x":554,"y":71,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":28,"stroke_id":0},{"x":560,"y":171,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":29,"stroke_id":0},{"x":563,"y":265,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":30,"stroke_id":0},{"x":561,"y":343,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":31,"stroke_id":0},{"x":556,"y":414,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":32,"stroke_id":0},{"x":555,"y":474,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":33,"stroke_id":0},{"x":547,"y":518,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":34,"stroke_id":0},{"x":550,"y":557,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":35,"stroke_id":0},{"x":552,"y":588,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":36,"stroke_id":0},{"x":559,"y":603,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":37,"stroke_id":0},{"x":575,"y":612,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":38,"stroke_id":0},{"x":598,"y":605,"w":null,"z":null,"alpha":null,"beta":null,"gamma":null,"t":39,"stroke_id":0}]}},"device":{"osBrowserInfo":"Fujitsu-Siemens Lenovo X61 Tablet PC","resolutionHeight":null,"resolutionWidth":null,"windowHeight":null,"windowWidth":null,"pixelRatio":null,"mouse":false,"pen":true,"finger":false,"acceleration":false,"webcam":false}}
json
package com.up1234567.unistar.central.data.base; import lombok.Data; import org.springframework.data.mongodb.core.index.Indexed; import org.springframework.data.mongodb.core.mapping.Document; @Data @Document(collection = "base_version") public class BaseVersion { @Indexed(unique = true) private long version; private String vershow; // 展示的版本号 private boolean success; private long createTime; }
java
package org.infinispan.notifications.cachelistener.filter; import java.io.IOException; import java.io.ObjectInput; import java.io.ObjectOutput; import java.util.Collections; import java.util.Set; import org.infinispan.commons.marshall.AbstractExternalizer; import org.infinispan.factories.ComponentRegistry; import org.infinispan.factories.annotations.Inject; import org.infinispan.factories.scopes.Scope; import org.infinispan.factories.scopes.Scopes; import org.infinispan.filter.AbstractKeyValueFilterConverter; import org.infinispan.marshall.core.Ids; import org.infinispan.metadata.Metadata; import org.infinispan.notifications.cachelistener.event.Event; /** * @author <EMAIL> * @since 7.2 */ @Scope(Scopes.NONE) public class CacheEventFilterConverterAsKeyValueFilterConverter<K, V, C> extends AbstractKeyValueFilterConverter<K, V, C> { private static final EventType CREATE_EVENT = new EventType(false, false, Event.Type.CACHE_ENTRY_CREATED); private final CacheEventFilterConverter<K, V, C> cacheEventFilterConverter; public CacheEventFilterConverterAsKeyValueFilterConverter(CacheEventFilterConverter<K, V, C> cacheEventFilterConverter) { this.cacheEventFilterConverter = cacheEventFilterConverter; } @Override public C filterAndConvert(K key, V value, Metadata metadata) { return cacheEventFilterConverter.filterAndConvert(key, null, null, value, metadata, CREATE_EVENT); } @Inject protected void injectDependencies(ComponentRegistry cr) { cr.wireDependencies(cacheEventFilterConverter); } public static class Externalizer extends AbstractExternalizer<CacheEventFilterConverterAsKeyValueFilterConverter> { @Override public Set<Class<? extends CacheEventFilterConverterAsKeyValueFilterConverter>> getTypeClasses() { return Collections.singleton(CacheEventFilterConverterAsKeyValueFilterConverter.class); } @Override public void writeObject(ObjectOutput output, CacheEventFilterConverterAsKeyValueFilterConverter object) throws IOException { output.writeObject(object.cacheEventFilterConverter); } @Override public CacheEventFilterConverterAsKeyValueFilterConverter readObject(ObjectInput input) throws IOException, ClassNotFoundException { return new CacheEventFilterConverterAsKeyValueFilterConverter((CacheEventFilterConverter) input.readObject()); } @Override public Integer getId() { return Ids.CACHE_EVENT_FILTER_CONVERTER_AS_KEY_VALUE_FILTER_CONVERTER; } } }
java
const version = "v1" export const baseUrl = `http://localhost:8000/${version}` // "start": "serve -l tcp://0.0.0.0:80 -s build",
typescript
The Government-run Industrial Training Institute (ITI) here has come up with protective devices for the frontline medical professionals fighting the deadly COVID-19 pandemic by developing an aerosol box for intubation process. The aerosol box consists of a transparent plastic cube designed to cover a patient's head, which has two circular paths through which the medical professionals hands can enter to perform airway procedure. When medical professionals are in the vicinity ofCOVID-19 patients, they are exposed to the virus directly and become highly vulnerable. The transparent aerosol box, however, significantly reduces the exposure of the medical professionals to the virus, said ITI Principal, Rajat Kumar Panigrahy. A team of ITI-Berhampur led by Panigrahy has planned, designed, and developed the aerosol box. Necessary laser-cutting, drilling and fitting were done after taking feedbacks from senior doctors of the MKCG Medical College and Hospital here, he said. The box was prepared from 4-mm transparent acrylic sheets. The cutting of the sheets is done using laser cutting machines to ensure airtight joints, said Mr Panigrahy. Ganjam district administration had given suggestion for development of the aerosol boxes to protect the medical professionals who get directly exposed to the virus. "We have developed two such boxes on a pilot basis. If the administration orders more such boxes, we will manufacture", he said. Commending the job done by the institute, a senior official said the newly developed protective equipment will be examined by health and medical professionals and appropriate steps will be taken. The cost of development of a box is around Rs 3000, he added. Besides the aerosol box, the institute has also developed face shield for the medical professionals treating COVID-19 patients. Named as ITI-face shield, this protective gear has been developed using foam lining and elastic band. "It will completely cover the face, eye and neck. The shield is also very comfortable to wear," he said. Its an essential personal protective equipment for use by the medical staff, police personnel, ambulance drivers and health workers who are at high risk in view of coronavirus pandemic, he added. "As a technical institute, we also have social responsibilities towards the society when the entire country is facing a crisis," he added. Earlier the ITI has developed sanitized cloth masks and hand sanitizer in collaboration with the Indian Institute of Science Education and Research (IISER) Berhampur for frontline COVID-19 warriors.
english
<reponame>VladimirN/ang2-course .error-summary { border: 1px solid red; } .error-summary li { text-transform: uppercase; }
css
{ "vorgangId": "66166", "VORGANG": { "WAHLPERIODE": "18", "VORGANGSTYP": "Schriftliche Frage", "TITEL": "Einladung von Bundeskanzlerin Angela Merkel nach Russland zum Gedenktag des 70. Jahrestages des Sieges über den Faschismus", "AKTUELLER_STAND": "Beantwortet", "SIGNATUR": "", "GESTA_ORDNUNGSNUMMER": "", "WICHTIGE_DRUCKSACHE": { "DRS_HERAUSGEBER": "BT", "DRS_NUMMER": "18/4001", "DRS_TYP": "Schriftliche Fragen", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/040/1804001.pdf" }, "EU_DOK_NR": "", "SCHLAGWORT": [ "Faschismus", { "_fundstelle": "true", "__cdata": "Gedenktag" }, "<NAME>", { "_fundstelle": "true", "__cdata": "Russland" }, "<NAME>" ], "ABSTRAKT": "Originaltext der Frage(n): \r\n \r\nWurde die Bundeskanzlerin zu den Feierlichkeiten zum 70. Jahrestag des Sieges über den Faschismus nach Russland persönlich eingeladen, und wird sie diese Einladung annehmen? " }, "VORGANGSABLAUF": { "VORGANGSPOSITION": { "ZUORDNUNG": "BT", "URHEBER": "Schriftliche Frage/Schriftliche Antwort ", "FUNDSTELLE": "13.02.2015 - BT-Drucksache 18/4001, Nr. 26", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/040/1804001.pdf", "PERSOENLICHER_URHEBER": [ { "PERSON_TITEL": "Dr.", "VORNAME": "Gesine", "NACHNAME": "Lötzsch", "FUNKTION": "MdB", "FRAKTION": "DIE LINKE", "AKTIVITAETSART": "Frage" }, { "PERSON_TITEL": "Dr.", "VORNAME": "Markus", "NACHNAME": "Ederer", "FUNKTION": "Staatssekr.", "RESSORT": "Auswärtiges Amt", "AKTIVITAETSART": "Antwort" } ] } } }
json
United Nations: North Korea vowed on Friday to further strengthen its nuclear weapons capability, in spite of UN condemnation and sanctions and said it would never abandon its deterrence while it was threatened by nuclear-armed states. “Going nuclear-armed is the policy of our state,” he said. “As long as there exists a nuclear-weapon state in hostile relations with the DPRK, our national security and peace on the Korean peninsula can be defended only with reliable nuclear deterrence,” he said, using the acronym for the Democratic People’s Republic of Korea, North Korea‘s official name. Ri said the Korean peninsula was the world’s “most dangerous hotspot, which can even ignite the outbreak of nuclear war,” and the blame lay “squarely’ with US. He accused US and South Korea of conducting massive “nuclear war exercises” aimed at “decapitation” of the North Korean leadership and occupation of its capital Pyongyang, while a call last year by North Korean leader Kim Jong Un to replace the 1953 Korean War armistice with a peace agreement had been ignored. North Korea‘s nuclear and missiles tests have been condemned worldwide and have resulted in several rounds of UN sanctions, the most recent of which were adopted in March. Discussions are already under way on a possible new UN sanctions resolution after North Korea‘s fifth and largest nuclear test on September 9. US flew two B1-Bs over South Korea on Wednesday in the second such flight since the September 9 test. US Forces at Korea said the flights were a show of force and of the US commitment to preserve the security of the peninsula and the region. (Reuters)
english
You can update your channel preference from the Settings menu in the header menu. You can update your channel preference from the Settings menu in the header menu. Latest Topics For ' ' Aishwarya Rai Bachchan's 'Jazbaa' First Look out next month! Aishwarya is the woman on top! Ash vs. Ratnam in round one!
english
While Daniel Sturridge has been a constant fixture in Liverpool’s first XI since January, the dilemma over whom to play around him is a recurring headache for Brendan Rodgers. It is one that he probably won’t mind, given that last year he was relying on Luis Suarez and two teenagers to carry the attack, but it is nonetheless problematic; what complicates things is that the Merseysiders now play around their strikers to the point of over-reliance. While Rodgers is a competent manager, he is reactive rather than proactive. When Suarez was banned for biting Branislav Ivanovic, Rodgers fielded Sturridge as the sole number 9 and deployed Philippe Coutinho behind him as a number 10. The pair hit it off instantly: while the Brazilian specializes in unlocking defences with through-balls, Sturridge excels at using his pace and power to beat the last man. In their 9 matches together, Liverpool won 7 times and drew twice, the highlight being a 6-0 demolition of Newcastle where the pair combined to score twice. But then Coutinho picked up an injury against Swansea, and Suarez returned a match later – presenting Rodgers with yet another tactical dilemma: how to deploy two forwards who both like a free role around the box but are hesitant to drop too deep? Again, the solution lay in common sense and resource optimization. Liverpool have a surfeit of defenders (8 centre-backs when Sebastien Coates returns from injury), and two wing-backs in Glen Johnson and Jose Enrique who like to bomb up the flanks. The obvious answer lay in playing them all in a counter-attacking 3-5-2. It was used for the first time in a Capital One Cup tie away at Old Trafford and later at Sunderland, where Sturridge and Suarez scored three goals between them, with the former assisting the latter twice. It seemed Rodgers had finally hit on a magic formula. He could play both his forwards in their preferred positions without upsetting the balance of the team. Significantly, this was the first time in over a decade that a Liverpool formation was successfully designed around a strike partnership. Even with Liverpool’s success, their tactics have come in for some criticism from fans and it is not hard to see why: their 3-man midfield – with a defensive midfielder, a runner and a declining box-to-box attacker – is some distance from providing the creative, entertaining spectacle their supporters want to see. It also makes them over-reliant on their front two. To be fair the 3-5-2 is new to the Premier League, and unusual even in Europe. The best example of a team that has successfully used the formation on a regular basis is Juventus, and it was hardly Antonio Conte’s first choice. He started off with a 3-3-4, but when Arturo Vidal and Andrea Pirlo arrived in the summer of 2011, Conte realised he had an excellent midfield trio (together with Marchisio) and three first-rate centre-backs. Rodgers’ own 3-5-2 evolved out of necessity as well. Nevertheless, a successful team cannot be a one-trick pony, and Liverpool’s performance at the Emirates on Saturday was ample proof. Arsenal‘s strategy was two-pronged: to pack the midfield and to leave three men at the back against SAS. This strategy served to a. maximize their natural advantage in the centre of the park, and b. negate Liverpool’s most dangerous weapons. Essentially, one team played to its game plan while the other didn’t – Suarez and Sturridge shot wastefully and their dribbling was ineffective (partly due to an inspired display by Laurent Koscielny). Coutinho’s return gives Rodgers some breathing space, although this may result in another formation switch. Playing the Brazilian behind the two strikers is one solution, but that would necessitate dropping either Henderson or Gerrard. The latter is perhaps the player to drop – at least for a couple of games. Gerrard no longer has the legs or the attacking nous to be a consistent attacking midfielder, which makes Liverpool vulnerable when either forward has an off day. Glen Johnson, arguably the team’s most important functional player for the attacking width and pace he provides down the flanks, is down with fever, and his two understudies – Flanagan and Kelly – are nowhere near experienced enough to carry one side of the team on their own. All this may well force Rodgers to revert to a 4-4-2 or a 4-3-3 to protect his defenders while harnessing the attacking gifts his strikers possess. With four big matches coming up over the next six weeks, this is an issue he has to address urgently.
english
{"Department":"Заводський відділ Миколаївської місцевої прокуратури №1","Region":"Миколаївська область","Position":"Прокурор Заводського відділу Миколаївської місцевої прокуратури №1","Name":"<NAME>","Декларації 2013":"","Декларації 2014":"","Декларації 2015":"https://public.nazk.gov.ua/declaration/dd030867-c11b-4ccd-b28a-c29e775f7b91","Декларації 2016":"https://public.nazk.gov.ua/declaration/e5ea8999-6148-4d7f-b910-b9bd75ab1fa5","Фото":"","Я<NAME>":"","Декларації доброчесності":"https://www.gp.gov.ua/integrity_profile/files/39c1c9677cef8dba411e781758eb267c.pdf","type":"prosecutor","key":"sinieglazova_nataliya_viktorivna","analytics":[{"y":2015,"i":90942,"k":38.9,"ka":1,"l":1000,"la":1},{"y":2016,"i":134229,"k":38.9,"ka":1,"l":1000,"la":1},{"y":2017,"i":275120,"k":38.9,"ka":1,"l":1000,"la":1}],"declarationsLinks":[{"id":"nacp_dd030867-c11b-4ccd-b28a-c29e775f7b91","year":2015,"provider":"declarations.com.ua.opendata"},{"id":"nacp_e5ea8999-6148-4d7f-b910-b9bd75ab1fa5","year":2016,"provider":"declarations.com.ua.opendata"},{"id":"nacp_5eea280b-77ff-4f78-b44c-88f23e1c9008","year":2017,"provider":"declarations.com.ua.opendata"}]}
json
/// /// Renderables.hpp /// galaxy /// /// Refer to LICENSE.txt for more details. /// #ifndef GALAXY_GRAPHICS_RENDERABLES_HPP_ #define GALAXY_GRAPHICS_RENDERABLES_HPP_ namespace galaxy { namespace graphics { /// /// Defines different types of renderable objects. /// enum class Renderables : short { /// /// Defines an entity to be rendered as a POINT. /// POINT, /// /// Defines an entity to be rendered as a LINE. /// LINE, /// /// Defines an entity to be rendered as a LINE_LOOP. /// LINE_LOOP, /// /// Define an entity to be rendered as a BATCH. /// BATCHED, /// /// Define an entity to be rendered as TEXT. /// TEXT, /// /// Define an entity to be rendered as a SPRITE. /// SPRITE, /// /// Define an entity to be rendered as a PARTICLE. /// PARTICLE }; } // namespace graphics } // namespace galaxy #endif
cpp
#![allow(dead_code)] fn main() {} // ANCHOR: all fn lifetime_shortener<'a>(s: &'static str) -> &'a str { s } // ANCHOR_END: all
rust
<gh_stars>0 package com.wardrobe.common.po; import javax.persistence.*; import java.sql.Timestamp; import static javax.persistence.GenerationType.IDENTITY; @Entity @Table(name = "sys_device_control", schema = "") public class SysDeviceControl { private int dcid; private Integer did; private Integer lockId; private String name; private String type; private String lock; private String status; private Timestamp createTime; private Timestamp updateTime; private Timestamp openTime; private Timestamp closeTime; @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "dcid") public int getDcid() { return dcid; } public void setDcid(int dcid) { this.dcid = dcid; } @Basic @Column(name = "did") public Integer getDid() { return did; } public void setDid(Integer did) { this.did = did; } @Basic @Column(name = "lockId") public Integer getLockId() { return lockId; } public void setLockId(Integer lockId) { this.lockId = lockId; } @Basic @Column(name = "name") public String getName() { return name; } public void setName(String name) { this.name = name; } @Basic @Column(name = "type") public String getType() { return type; } public void setType(String type) { this.type = type; } @Basic @Column(name = "`lock`") public String getLock() { return lock; } public void setLock(String lock) { this.lock = lock; } @Basic @Column(name = "status") public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } @Basic @Column(name = "createTime") public Timestamp getCreateTime() { return createTime; } public void setCreateTime(Timestamp createTime) { this.createTime = createTime; } @Basic @Column(name = "updateTime") public Timestamp getUpdateTime() { return updateTime; } public void setUpdateTime(Timestamp updateTime) { this.updateTime = updateTime; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SysDeviceControl that = (SysDeviceControl) o; if (dcid != that.dcid) return false; if (did != null ? !did.equals(that.did) : that.did != null) return false; if (lockId != null ? !lockId.equals(that.lockId) : that.lockId != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (type != null ? !type.equals(that.type) : that.type != null) return false; if (lock != null ? !lock.equals(that.lock) : that.lock != null) return false; if (status != null ? !status.equals(that.status) : that.status != null) return false; if (createTime != null ? !createTime.equals(that.createTime) : that.createTime != null) return false; if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false; return true; } @Override public int hashCode() { int result = dcid; result = 31 * result + (did != null ? did.hashCode() : 0); result = 31 * result + (lockId != null ? lockId.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (type != null ? type.hashCode() : 0); result = 31 * result + (lock != null ? lock.hashCode() : 0); result = 31 * result + (status != null ? status.hashCode() : 0); result = 31 * result + (createTime != null ? createTime.hashCode() : 0); result = 31 * result + (updateTime != null ? updateTime.hashCode() : 0); return result; } @Basic @Column(name = "openTime") public Timestamp getOpenTime() { return openTime; } public void setOpenTime(Timestamp openTime) { this.openTime = openTime; } @Basic @Column(name = "closeTime") public Timestamp getCloseTime() { return closeTime; } public void setCloseTime(Timestamp closeTime) { this.closeTime = closeTime; } }
java
<reponame>uk-gov-mirror/hmcts.probate-orchestrator-service { "caseData":{ "type":"GrantOfRepresentation", "applicationType":"Personal", "primaryApplicantEmailAddress":"<EMAIL>", "registryLocation":"Birmingham", "extraCopiesOfGrant":5, "deceasedDomicileInEngWales":"Yes", "deceasedAddress":{ "AddressLine1":"Winterfell, Westeros", "PostCode":"SW17 0QT" }, "deceasedAddressFound":"Yes", "deceasedForenames":"Ned", "deceasedSurname":"Stark", "deceasedDateOfDeath":"2018-01-01", "deceasedDateOfBirth":"1930-01-01", "deceasedMartialStatus":"marriedCivilPartnership", "deceasedAnyOtherNames":"Yes", "deceasedAliasNameList":[ { "value":{ "Forenames":"King", "LastName":"North" } } ], "deceasedSpouseNotApplyingReason":"mentallyIncapable", "deceasedDivorcedInEnglandOrWales":"No", "deceasedOtherChildren":"Yes", "deceasedAnyChildren":"No", "childrenDied":"No", "childrenOverEighteenSurvived":"Yes", "grandChildrenSurvivedUnderEighteen":"No", "ihtFormId":"IHT205", "ihtFormCompletedOnline":"Yes", "ihtNetValue":"1000099", "ihtGrossValue":"1000099", "ihtReferenceNumber":"GOT123456", "primaryApplicantAddress":{ "AddressLine1":"Pret a Manger St. Georges Hospital Blackshaw Road London SW17 0QT", "PostCode":"SW17 0QT" }, "primaryApplicantAddressFound":"Yes", "primaryApplicantForenames":"Jon", "primaryApplicantSurname":"Snow", "primaryApplicantPhoneNumber":"123455678", "primaryApplicantRelationshipToDeceased":"adoptedChild", "primaryApplicantAdoptionInEnglandOrWales":"Yes", "declaration": {}, "deceasedHasAssetsOutsideUK":"Yes", "assetsOverseasNetValue":"10099", "uploadDocumentUrl":"http://document-management/document/12345", "registryAddress":"Line 1 Bham\nLine 2 Bham\nLine 3 Bham\nPostCode Bham", "registryEmail":"<EMAIL>", "registrySequenceNumber":"20075", "declarationCheckbox": "Yes", "outsideUKGrantCopies":6, "caseType":"intestacy" } }
json
Malaika Arora wore a glamorous camouflage bomber jacket and pants over a white bralette for her visit to Kareena Kapoor's residence in Mumbai. By Krishna Priya Pallavi: Malaika Arora was snapped at new-mommy Kareena Kapoor's residence in Mumbai on Tuesday night. The star was accompanied by her sister Amrita Arora, who is also Kareena's best friend. For the occasion, Malaika looked absolutely glamorous and chic in a co-ord ensemble, and we are taking styling tips. Malaika was snapped wearing a camouflage co-ord set at Kareena's residence. She wore a bomber jacket in camo print for the outing. It was decorated with chunky gold buttons, zip fastening and pocket details. The Chaiyya Chaiyya girl layered the jacket over a printed spaghetti-strapped white bralette, in which she flaunted her toned midriff. She teamed it all with a pair of matching straight-fit camouflage pants that had similar gold detailing and side pockets. HOW DID MALAIKA STYLE THE LOOK? Keeping the aesthetics in sync with the co-ord ensemble, Malaika opted to pair it with bronze-themed make-up. Malaika chose a dewy face, bold shimmery bronze eye shadow, nude lip shade, beaming highlighter and well-defined brows. She left her blow-dried locks open in side-parting with the outfit. She accessorised the outfit with a quirky bronze chain shoulder bag and pointed pumps in the same colour. She rounded it all off with a black printed face mask. What do you think about her look?
english
{ "name":"layaApp", "version":"1.0.1", "devUpdateUrl":"", "updateUrl":"http://engine.layabox.com/layaAppUpdate/layaApp/v2.1/", "updateDelay":0, "mainjs":"scripts/index.js" }
json
<gh_stars>1-10 import React from 'react'; import { Box, Typography } from '@material-ui/core'; import { InsertPhoto as InsertPhotoIcon } from '@material-ui/icons'; import useStyles from './styles'; const EmptyPage = () => { const classes = useStyles(); return ( <Box className={classes.box}> <InsertPhotoIcon className={classes.icon} color="primary" /> <Typography className={classes.text} color="inherit"> You have no tasks yet. </Typography> </Box> ); }; export default EmptyPage;
javascript
<!doctype html> <!-- 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. --> <html> <head> <title>Memorystore Example</title> </head> <body> <h1>Memorystore Example</h1> <p> The <a href="/showdata">following page</a> will display stored data. The first time it is displayed it will fetch the value of "data" from a slow store. Future refreshes will fetch it from cache until it expires (60 seconds in this example). </p> <p> Other values will be fetched only from the cache, if present. Values can be stored in the cache by entering them in the form. </p> </body> </html >
html
Out of the 353 players who went under the hammer in the 2015 Indian Premier League auction on Monday, only 68 cricketers were sold and the rest of the 285 found no bidders. Here is a chart which maps all the buys during the auction: Out of the 353 players who went under the hammer in the 2015 Indian Premier League auction on Monday, only 68 cricketers were sold and the rest of the 285 found no bidders. Here is a chart which maps all the buys during the auction: How to read the chart? Five highlights from the chart: 1. Out of the first six highest buys, four belongs to Delhi Daredevils. They released many of their players and went in for a complete over-haul. They did this the last time too! 2. CSK, a team which has one of the best wicket-keepers in the world, bought two unknown keepers Ankush Bains and Eklavya Dwivedi. Weird! 3. RCB emerged as the best buyer in this IPL auction. Their batting department is glittering but they don't have star-rated bowlers. To neutralise that, this time around, they went for specialist bowlers Adam Milne and Sean Abbot and David Weise and Darren Sammy who can also swing their bats. Apart from this, Dinesh Karthik was a huge buy for them. 4. Sunrisers = England team. They bought Ravi Bopara, Eoin Morgan and Kevin Pietersen. Wonder what the Sunrisers will do if England calls them for national duty. Infact, England are playing 3 Test matches with West Indies in April. 5. Kings XI Punjab and Rajasthan Royals have never spent exorbitant amounts during auctions from the very first edition of the IPL. They did not loosen their purse strings this time as well.
english
{"compatibility.js":"sha256-HX0JP1xrVxElFGFxlGFAGJQtgKtuBWasxwq2tT0cdyE=","compatibility.min.js":"sha256-WItpmlyXH23qoQFn05T5qPPhN+QAQSnEE7vDGE3cuQM=","pdf_viewer.css":"sha256-p1vSp8Fu1w7SeS1E3/qJO+TG7Iqe/uthCyA7/n20Z3I=","pdf_viewer.js":"sha256-TwqzeqxBGRW49FgTnW6oOxFZeh2ouIKCOmIyaHw1MH8=","pdf_viewer.min.css":"sha256-tF9+WnzhuOkOkd4tTYvKmccdHBU8jmQqHwf/M8WELMQ=","pdf_viewer.min.js":"sha256-Vv8ccktZCcxvdW95AqqkxkFvHkZy38CdnRWOY3lUyLs=","pdf.combined.js":"sha256-V8AZgt0XYqA1oXPAlDsSekoslYoOQQMM5IOZq9P1ETM=","pdf.combined.min.js":"sha256-KACY1o2A8QNRe70JYp5q2XeVPAaFVlp0pEDNc7FDRM4=","pdf.js":"sha256-FaX0bNZBlK/JKUCIK7DwFeKx+KYyA5mQDDD/pugYAGs=","pdf.min.js":"sha256-WMFdYA6SEuD/eaOMyWrunFaZmhKPHxLt2yOM4Nkbe7E=","pdf.worker.js":"sha256-SJzz6GsO9LhYghPiAkbxRHSNs5jkwdsY9OlZMklJnPw=","pdf.worker.min.js":"sha256-p3XzyIyc5cWy6itF77aHjTaVqDqfLOEsw/8GVc7Y7BY="}
json
<gh_stars>0 /* * Copyright 2013 The Error Prone Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.errorprone.refaster; import static com.google.errorprone.refaster.Unifier.unifications; import com.google.auto.value.AutoValue; import com.google.common.base.Function; import com.google.common.base.Optional; import com.google.errorprone.util.ASTHelpers; import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.ModifiersTree; import com.sun.source.tree.TreeVisitor; import com.sun.source.tree.VariableTree; import com.sun.tools.javac.tree.JCTree.JCModifiers; import com.sun.tools.javac.tree.JCTree.JCVariableDecl; import com.sun.tools.javac.tree.TreeMaker; import com.sun.tools.javac.util.Name; import javax.annotation.Nullable; /** * A {@link UTree} representation of a local variable declaration. * * <p>A {@code UVariableDecl} can be unified with any variable declaration which has a matching type * and initializer. Annotations and modifiers are preserved for the corresponding replacement, as * well as the variable name. {@link ULocalVarIdent} instances are used to represent references to * local variables. * * <p>As a result, we can modify variable declarations and initializations in target code while * preserving variable names and other contextual information. * * @author <EMAIL> (<NAME>) */ @AutoValue public abstract class UVariableDecl extends USimpleStatement implements VariableTree { public static UVariableDecl create( CharSequence identifier, UExpression type, @Nullable UExpression initializer) { return new AutoValue_UVariableDecl(StringName.of(identifier), type, initializer); } public static UVariableDecl create(CharSequence identifier, UExpression type) { return create(identifier, type, null); } @Override public abstract StringName getName(); @Override public abstract UExpression getType(); @Override @Nullable public abstract UExpression getInitializer(); ULocalVarIdent.Key key() { return new ULocalVarIdent.Key(getName()); } @Override public Choice<Unifier> visitVariable(VariableTree decl, Unifier unifier) { return Choice.condition(unifier.getBinding(key()) == null, unifier) .thenChoose(unifications(getType(), decl.getType())) .thenChoose(unifications(getInitializer(), decl.getInitializer())) .transform( new Function<Unifier, Unifier>() { @Override public Unifier apply(Unifier unifier) { unifier.putBinding( key(), LocalVarBinding.create(ASTHelpers.getSymbol(decl), decl.getModifiers())); return unifier; } }); } @Override public JCVariableDecl inline(Inliner inliner) throws CouldNotResolveImportException { return inline(getType(), inliner); } public JCVariableDecl inlineImplicitType(Inliner inliner) throws CouldNotResolveImportException { return inline(null, inliner); } private JCVariableDecl inline(@Nullable UExpression type, Inliner inliner) throws CouldNotResolveImportException { Optional<LocalVarBinding> binding = inliner.getOptionalBinding(key()); JCModifiers modifiers; Name name; TreeMaker maker = inliner.maker(); if (binding.isPresent()) { modifiers = (JCModifiers) binding.get().getModifiers(); name = binding.get().getName(); } else { modifiers = maker.Modifiers(0L); name = getName().inline(inliner); } return maker.VarDef( modifiers, name, (type == null) ? null : type.inline(inliner), (getInitializer() == null) ? null : getInitializer().inline(inliner)); } @Override public Kind getKind() { return Kind.VARIABLE; } @Override public <R, D> R accept(TreeVisitor<R, D> visitor, D data) { return visitor.visitVariable(this, data); } @Override public ModifiersTree getModifiers() { return null; } @Override public ExpressionTree getNameExpression() { return null; } }
java
US cellphone users will be able to download music from Napster's 5-million song catalog onto their cellphones for the first time on November 23, using a Samsung phone and an AT&T service plan. Last month, AT&T said the service would cost $2 per song or $7.50 for 5 songs per month, and that each time a user buys a track, a copy would be sent to their computers. The reason these tracks cost about twice as much as they normally would is that they must be sent over AT&T's data network. A smarter strategy from a user perspective would have been to offer the same all-you-can-download service available on computers, but using open or known Wi-Fi connections rather than expensive over-the-air (OTA) connections to send tracks to the phone. You could use their service to recognize music that's playing wherever you are, and tag it to be downloaded when you come within range of WiFi. Or, if you wanted to download OTA tracks while away from WiFi, you'd pay an additional $1 per song on top of the regular monthly subscription. But as things stand now, it's clear that AT&T's goal in partnering with Napster is not to offer the best music service it can, but to increase demand for its data plans and get users used to the idea of downloading data OTA and not over Wi-Fi. (reuters; via music ally; image from )
english
from pylint_complexity import MethodCountChecker, MethodLengthChecker def register(linter): linter.register_checker(MethodLengthChecker(linter)) linter.register_checker(MethodCountChecker(linter))
python
Salzburg had managed to preserve a vibrant urban aura that had developed over the years from the Middle Ages to the nineteenth century when it was a city-state. Ruled by a Prince-Archbishop. Its resplendent grotesque art attracted various artisans and craftsmen, before the city became famous due to the work of Italian architects. We are here to inform you about salzburg castle It will definitely add happiness and joy to your visit here. Let’s take a look at the most famous castles in and around Austria. Having ancient specimens of art, the city still has a lot of castles near Austria which are the main point of attraction for the tourists coming here from nearby places. Rising high above the city of Salzburg, the magnificent Hohensalzburg overlooks the city, which is a focal point of attraction for tourists. This castle is the most important and possibly the most amazing castle in Europe. Hohenwerfen Castle is an ancient rock fortress located on a 623-metre mountain overlooking the Austrian market town of Werfen in the Salzach valley, about 40 km south of Hamburg. The castle is surrounded by the nearby Tennen Mountains and the Berchtesgaden Alps. It is one of the most famous castles near Austria. This 900-year-old fort is situated above the Salzachtal. Those who are into adventure and interested in religion and culture will definitely get their money’s worth in Hohenwerfen. There is a wide variety of entertainment and activities for travelers, stylish castle inns, guided castle tours with weapons presentations, a graduation destination above the traditional state falconry with hovering demonstrations every day, the primary state falconry museum in Austria, immediate individual exhibitions. For, which changes regularly. Inside the palace, audio guides are available in 8 different languages: German, English, Italian, Spanish, French, Portuguese, Chinese and Russian. Castle Hohensalzburg has a delectable restaurant and the opening timings of this Salzburg castle are 10:00 am and closes at 9:00 pm. Prince Archbishop Wolf Dietrich von Raitenau built the Alte Residenz (Salzburg Residenz) in the 16th century. Its construction style is Italian Baroque style. This incredible historic infrastructure is located right in the middle of the city and has been used for decades by the royal family for entertainment, now dominated by the area of Salzburg. It has 3 huge courtyards and more than 180 rooms. The government uses the stateroom on the second floor to hold important state ceremonies, receptions, official meetings and international conferences. An art collection is also located on the second floor – the Residenz Gallery. The Salzberg Residenz is a central point of attraction for tourists; This place is due to its historical and cultural importance. The palace is located under Residenzplatz 1 in the city of Hamburg. The people of the Middle Ages are associated with life in the Mutterdorf castle, the old toll plaza and the temporary holiday residence of the Prince-Bishops of Austria. It is located on the rocks northwest of Mauterndorf. Get to know Head of Household Leonhard von Ketschach and his attendants in person and enjoy a memorable day. Far away from the frenetic pace and noise, yet easy to reach, Mauterndorf Castle in the Lungau area of Salzburg is a quaint gem in the memory of art and is set in a charming mountain landscape. It is one of the most impressive castles in Austria, dating back to the thirteenth century. An exciting journey through time at Motterndorf Castle takes you to the end of the Middle Ages. personally accept the landowners, Archbishop Leonhard von Ketschach and his followers. A visit to the 44-metre reinforced tower and the Lungau Landscape Museum, with a breathtaking view of Mauterndorf and the bordering mountain landscape, is a series offered to tourists. Schloss Aigen is a castle or palace in the south of the city of Hamburg in the district of Aigen. It is a privately owned property and not accessible to the general public, but its church is open to locals and it is respected as a traditional venue for weddings and the parks include recreation grounds. Schloss Agen Castle is located at the base of Mount Gaisberg, which adds to its charm – plus there is also a popular eatery amongst the former government infrastructure of Schloss Agen. The great Schloss Eigen parks are not as well maintained as they should have been, but the delightful view with the valley and waterfall is still a valid justification for a short walk there. Since the year 1921, the castle has been occupied by the descendants of the one-time royal family – the Counts von Revertera still hold it today; Sadly, they do not live there, as the condition of the palace is somewhat poor. The quite famous Mirabell Palace is built on a north-south axis and faces the Hamburger Dom Cathedral and the Hohensalzburg Fortress. It is one of the most favorite castles near Salzburg which is an excellent point of attraction for tourists from all over the world. The early gardens were renovated according to plans proposed by Johann Bernhard Fischer von Erlach in the year 1689, under the reign of Prince Archbishop Johann Ernst Thun. After only a few decades, Franz Anton Dannreiter transformed them again in the year 1730, creating what is now considered one of the most magnificent Baroque gardens in Europe. Then, after the Mirabel Gardens were modified again in the 19th century, various parts were destroyed, such as the old dwarf garden (Zwergergarten), the famous Sala Terrena northwest of Mirabel Castle, and some that address Mirabel Square. Arcade. The oldest part of the Mirabel Gardens – the Grand Parterre – is still preserved. If you descend into the pit from the Makartplatz (where Doppler’s birthplace and Mozart’s residence are), you will find an outer and inner balustrade surrounded by paintings of two Borgesian fencer couples from the late seventeenth century. The outer pair is designed by MB Mandal, and the inner pair is designed by A. Prepared by Gotzinger. read ahead: 10 places to visit in Austria for the perfect holiday in Europe’s most musical city! The palaces and forts in Austria have added a new feather to its charm by making the city rich with ancient architecture and buildings. These architectural beauties allow us to experience a unique example of building art that is rare in construction in the modern world. We have discussed some of the most famous above salzburg castle, Tourists visiting here are requested to visit them for a complete experience during their trip to Europe. Are you looking to book an international holiday? Book memorable holidays on Daily Hind News with 650+ verified travel agents for 65+ domestic and international destinations.
english
263 (60. 4 ov) 237 (52. 3 ov) 331/9 (50. 0 ov) 189 (43. 2 ov) Fast-bowler Peter Siddle warned that Australia will deliver some fireworks when they take on South Africa in the first of the three Test series starting on November 9 at Brisbane. Pakistan qualified for the ICC World T20 2012 semi-finals on the basis of Net Run Rate (NRR), after India failed to keep South Africa below 121 in their Super Eights match at the R Premadasa Stadium on Tuesday. Nishad Pai Vaidya presents the equation for India to qualify for the semi-finals of the ICC World T20 2012. South Africa's limited-overs captain AB de Villiers insists his side are not chokers despite tottering on the brink of elimination in the World Twenty20 in Sri Lanka. In a purple patch in the ongoing ICC World Twenty20, Australian all-rounder Shane Watson said there is a lot left in his tank and hoped to continue the same way to help in the remainder of the tournament. Shane Watson's unbelievable run in the ICC World Twenty20 continued as he virtually assured Australia a place in the semi-finals of the event with a comfortable eight-wicket win over South Africa in the their second Super Eights match. Left-arm spinner Xavier Doherty grabbed three wickets and all-rounder Shane Watson took two as Australia kept South Africa down to 146-5 in the World Twenty20 in Colombo on Sunday.
english
<reponame>johnpmayer/nphysics<filename>examples2/nphysics_testbed2d/src/objects/ball.rs use std::num::Float; use std::rc::Rc; use std::cell::RefCell; use rsfml::graphics; use rsfml::graphics::{CircleShape, Color, RenderTarget}; use rsfml::system::vector2; use na::{Pnt3, Iso2}; use na; use nphysics::object::RigidBody; use draw_helper::DRAW_SCALE; pub struct Ball<'a> { color: Pnt3<u8>, base_color: Pnt3<u8>, delta: Iso2<f32>, body: Rc<RefCell<RigidBody>>, gfx: CircleShape<'a> } impl<'a> Ball<'a> { pub fn new(body: Rc<RefCell<RigidBody>>, delta: Iso2<f32>, radius: f32, color: Pnt3<u8>) -> Ball<'a> { let dradius = radius as f32 * DRAW_SCALE; let mut res = Ball { color: color, base_color: color, delta: delta, gfx: CircleShape::new().unwrap(), body: body }; res.gfx.set_fill_color(&Color::new_RGB(color.x, color.y, color.z)); res.gfx.set_radius(dradius); res.gfx.set_origin(&vector2::Vector2f { x: dradius, y: dradius }); res } } impl<'a> Ball<'a> { pub fn update(&mut self) { let body = self.body.borrow(); let transform = *body.position() * self.delta; let pos = na::translation(&transform); let rot = na::rotation(&transform); self.gfx.set_position(&vector2::Vector2f { x: pos.x as f32 * DRAW_SCALE, y: pos.y as f32 * DRAW_SCALE }); self.gfx.set_rotation(rot.x.to_degrees() as f32); if body.is_active() { self.gfx.set_fill_color( &Color::new_RGB(self.color.x, self.color.y, self.color.z)); } else { self.gfx.set_fill_color( &Color::new_RGB(self.color.x / 4, self.color.y / 4, self.color.z / 4)); } } pub fn draw(&self, rw: &mut graphics::RenderWindow) { rw.draw(&self.gfx); } pub fn select(&mut self) { self.color = Pnt3::new(200, 0, 0); } pub fn unselect(&mut self) { self.color = self.base_color; } }
rust
<filename>resources/tr/giresun-university.json {"name":"<NAME>","alt_name":"Giresun Üniversitesi","country":"Turkey","state":null,"address":{"street":"Kale Mah.,, Eşref Dizdar Cad. n°5","city":"Giresun","province":null,"postal_code":"28100"},"contact":{"telephone":"+90(454) 310-00-00","website":"http:\/\/www.giresun.edu.tr","email":"<EMAIL>; <EMAIL>","fax":"+90(454) 310-00-16"},"funding":"Public","languages":null,"academic_year":null,"accrediting_agency":"Council of Higher Education (YÖK)"}
json
World Archery on Thursday extended the suspension of international competitions until the end of June after Tokyo Olympics were postponed to next year due to the COVID-19 pandemic. The suspension, originally announced to last until April 30, was introduced in mid-March because of the rapidly worsening worldwide health crisis caused by the coronavirus. The competition hiatus had affected seven of archery’s Olympic quota events and World Archery said the qualification procedures would be reassessed when new principles are released and the calendar for the rest of this year is confirmed. “Following the recent postponement of the Tokyo 2020 Olympic and Paralympic Games, and with wide-ranging restrictions on travel and events still in force, the decision was made to provide immediate clarity on upcoming tournaments,” the world body said after its executive committee meeting. It said a strategy for rescheduling this year’s competitions has also been approved. It, however, said the events will be rescheduled only after the situation improves. “World Archery intends to hold as many international events as possible during the remainder of this outdoor season so that athletes have an opportunity to compete on the world stage, and the federation can fulfil its obligations to broadcasters and partners,” it said. “The new dates of any event will be announced no later than two months in advance, giving teams and athletes an adequate and equal period to prepare, and organisers a shortened but clear registration timeline,” the world body said, while also supporting the International Olympic Committee’s move to postpone the Tokyo Games. World Archery said registration for all international events has been closed and its staff will now work with the organisers of the tournaments that have been affected and potential future hosts to generate multiple options for a replacement calendar. “This will ensure that there is no delay in recommencing international competition as soon as the current public health crisis improves. “There will also be a delay in announcing the calendar for the 2021 Indoor Archery World Series and beyond,” the world body added. Events affected by the extension of suspension of competitions (scheduled for May and June): Hyundai Archery World Cup stage 2 in Antalya, Turkey (May 11-17) European Archery Championships in Antalya, Turkey (May 20-26) World ranking event in Medellin, Colombia (June 1-7) Asia Cup leg 2 in Gwangju, Korea (June 7-12) European Grand Prix in Porec, Croatia (June 9-13) Para world ranking event at Nove Mesto, Czech Republic (June 15-21) Hyundai Archery World Cup stage 3 in Berlin, Germany (June 21-28).
english
# class OtsUtil(object): STEP_THRESHOLD = 408 step = 0 @staticmethod def log(msg): if OtsUtil.step >= OtsUtil.STEP_THRESHOLD: print(msg)
python
{"ast":null,"code":"/*\nTHIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT (\"AGREEMENT\") LOCATED HERE:\nhttps://www.infragistics.com/legal/license/igultimate-la\nhttps://www.infragistics.com/legal/license/igultimate-eula\nGOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.\n*/\nimport { FinancialPriceSeriesProxy } from './FinancialPriceSeriesProxy';\nimport { FinancialEventArgs as FinancialEventArgs_internal } from './FinancialEventArgs';\nimport { IgrFinancialEventArgs } from './igr-financial-event-args';\nimport { TypeRegistrar } from \"igniteui-react-core\";\n\nvar IgrFinancialPriceSeriesProxyModule =\n/** @class */\n\n/*@__PURE__*/\nfunction () {\n function IgrFinancialPriceSeriesProxyModule() {}\n\n IgrFinancialPriceSeriesProxyModule.register = function () {\n TypeRegistrar.register('FinancialPriceSeriesProxy', FinancialPriceSeriesProxy.$type);\n TypeRegistrar.register('FinancialEventArgs', FinancialEventArgs_internal.$type);\n TypeRegistrar.registerCons('igr-financial-event-args', IgrFinancialEventArgs);\n };\n\n return IgrFinancialPriceSeriesProxyModule;\n}();\n\nexport { IgrFinancialPriceSeriesProxyModule };","map":{"version":3,"sources":["../../../../src/igniteui-charts/lib/igr-financial-price-series-proxy-module.ts"],"names":[],"mappings":"AAAA;;;;;;AAOA,SAAS,yBAAT,QAA0C,6BAA1C;AACA,SAAS,kBAAkB,IAAI,2BAA/B,QAAkE,sBAAlE;AACA,SAAS,qBAAT,QAAsC,4BAAtC;AACA,SAAS,aAAT,QAA8B,qBAA9B;;AAGA,IAAA,kCAAA;AAAA;;AAAA;AAAA,YAAA;AAAA,WAAA,kCAAA,GAAA,CAOC;;AANiB,EAAA,kCAAA,CAAA,QAAA,GAAd,YAAA;AACI,IAAA,aAAa,CAAC,QAAd,CAAuB,2BAAvB,EAAqD,yBAAiC,CAAC,KAAvF;AACA,IAAA,aAAa,CAAC,QAAd,CAAuB,oBAAvB,EAA8C,2BAAmC,CAAC,KAAlF;AACA,IAAA,aAAa,CAAC,YAAd,CAA2B,0BAA3B,EAAuD,qBAAvD;AAEH,GALa;;AAMlB,SAAA,kCAAA;AAAC,CAPD,EAAA","sourceRoot":"","sourcesContent":["/*\nTHIS INFRAGISTICS ULTIMATE SOFTWARE LICENSE AGREEMENT (\"AGREEMENT\") LOCATED HERE:\nhttps://www.infragistics.com/legal/license/igultimate-la\nhttps://www.infragistics.com/legal/license/igultimate-eula\nGOVERNS THE LICENSING, INSTALLATION AND USE OF INFRAGISTICS SOFTWARE. BY DOWNLOADING AND/OR INSTALLING AND USING INFRAGISTICS SOFTWARE: you are indicating that you have read and understand this Agreement, and agree to be legally bound by it on behalf of the yourself and your company.\n*/\nimport { FinancialPriceSeriesProxy } from './FinancialPriceSeriesProxy';\nimport { FinancialEventArgs as FinancialEventArgs_internal } from './FinancialEventArgs';\nimport { IgrFinancialEventArgs } from './igr-financial-event-args';\nimport { TypeRegistrar } from \"igniteui-react-core\";\nvar IgrFinancialPriceSeriesProxyModule = /** @class */ /*@__PURE__*/ (function () {\n function IgrFinancialPriceSeriesProxyModule() {\n }\n IgrFinancialPriceSeriesProxyModule.register = function () {\n TypeRegistrar.register('FinancialPriceSeriesProxy', FinancialPriceSeriesProxy.$type);\n TypeRegistrar.register('FinancialEventArgs', FinancialEventArgs_internal.$type);\n TypeRegistrar.registerCons('igr-financial-event-args', IgrFinancialEventArgs);\n };\n return IgrFinancialPriceSeriesProxyModule;\n}());\nexport { IgrFinancialPriceSeriesProxyModule };\n//# sourceMappingURL=igr-financial-price-series-proxy-module.js.map\n"]},"metadata":{},"sourceType":"module"}
json
Mumbai, September 25, 2016: Maharashtra Badminton Association today said it will focus on infrastructure development and increased use of technology to further promote the racquet sport in the state as it expects the count of its registered players to more than double in 12 months. The decision was made in the 75th Annual General Meeting held here today in Mumbai. The members of the sports body were ecstatic with the gaining popularity of the sport in the past few years. They said this was evident with the overwhelming response the sports body was getting for all the state tournaments. To cope up with the increasing strain of larger entries and to help players with better management of their tournament plan, the association has introduced new software, which saves players from the hassle of filling multiple forms for different tournaments. The single online form can now be also used for district, state, national and international tournaments. The software will provide timely updates via emails and SMS on changes regarding the entries or reminders about important notification, the last dates, etc. to the players. The District Associations too will have their own website linked and provided by MBA. They can run their tournaments, photographs, messages, sponsorship advt. on the same. MBA has aggressive plans to support talents for International events and has appealed the industry for their support. Corporate companies like Vishvaraj Infrastructure, ltd have been supporting talented players like Rasika and Arundhati from Nagpur for the past few years and results are now showing. Today, Rasika Raje is playing the finals in Poland International Series. MBA will also actively promote players for sponsorship and recruitment as well with public sector companies, govt. departments, and corporate. Mr. Lakhani informed that the association had also taken up the important issue of “sports marks” with the Government of Maharashtra. He said the association had proposed setting up a Maharashtra state ranking system from where the first 200 deserving players to be given 25 marks benefit. The number will depend on the players participating. It will give proper evaluation and regular players will be benefited. Maharashtra Badminton Association will upload the ranking system on its website for feedback. The norms would be finalized after taking all stakeholders’ views into consideration. Further, the MBA would put efforts through this website for placements of players in PSUs and other willing Corporates. He suggested creating pool of Sponsors or Corporates for adoption of talented players. “MBA has plans to organize training camps for coaches where international coaches can come and train our coaches with newer latest techniques being used worldwide.”Two of our coaches have already done small courses with the BWF,” he informed. Recently the association hosted a spectacular event where Hon’ble Chief Minister Shri Devendra Fadnavis, Sports Minister Shri. Vinod Tawade & other dignitaries felicitated Rio Olympic Silver medalist PV Sindhu and her coach Mr. Pulela Gopichand. Mr. Arun Lakhani took over the reins of the Maharashtra Badminton Association in October 2015. Since then, the Maharashtra Badminton Association has been aggressively working towards putting together a robust grassroots development program and local tournaments to identity and hone young shuttlers from a very young age.
english
<filename>advisories/unreviewed/2022/04/GHSA-rxfx-3hr7-gggr/GHSA-rxfx-3hr7-gggr.json<gh_stars>100-1000 { "schema_version": "1.2.0", "id": "GHSA-rxfx-3hr7-gggr", "modified": "2022-04-21T01:48:50Z", "published": "2022-04-21T01:48:50Z", "aliases": [ "CVE-2007-4774" ], "details": "The Linux kernel before 2.4.36-rc1 has a race condition. It was possible to bypass systrace policies by flooding the ptraced process with SIGCONT signals, which can can wake up a PTRACED process.", "severity": [ ], "affected": [ ], "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2007-4774" }, { "type": "WEB", "url": "https://osdn.net/projects/linux-kernel-docs/scm/git/linux-2.4.36/listCommit?skip=60" }, { "type": "WEB", "url": "https://security.netapp.com/advisory/ntap-20200204-0002/" }, { "type": "WEB", "url": "http://taviso.decsystem.org/research.html" } ], "database_specific": { "cwe_ids": [ ], "severity": "MODERATE", "github_reviewed": false } }
json
<reponame>DOREMUS-ANR/recommender http://data.doremus.org/expression/af824c34-0a42-3e8e-818c-0cda03762221 http://data.doremus.org/expression/96bfde9a-c6d2-353c-a365-00185c15eb13 http://data.doremus.org/expression/04b59c34-f60d-35a9-b007-ce47bdc3daff http://data.doremus.org/expression/3f96029d-98a3-3e33-a7eb-ec987b887a0e http://data.doremus.org/expression/0b0adf95-19ef-346c-a288-628789fba9fc http://data.doremus.org/expression/2184193c-093e-3d69-a9a3-4f980d4cfa6c http://data.doremus.org/expression/9f9c85fd-37d6-3b5c-996e-112f5010f146 http://data.doremus.org/expression/c30ef17f-cea6-317f-9651-220e857b7dd5 http://data.doremus.org/expression/9a3c4e16-2c03-34b0-9e00-68abe56469ef http://data.doremus.org/expression/e4c6bd45-b20d-3f9d-ba6a-e304a4217a8e http://data.doremus.org/expression/7c1a8cc4-23b4-392c-8af7-594d8bb3c9d9
json
The 41st formation meeting of TDP was not just any ordinary event. It was a historic moment that brought together members of the Telugu Desam Party at Nampally Exhibition Grounds in Hyderabad. The occasion was graced by TDP Chief, Chandrababu Naidu, who paid his respects to NTR's statue on the dais. With a symbolic gesture of lighting the lamp and unveiling the Telugu Desam Party flag, Chandrababu set the tone for what was to come. In his address, Chandrababu reminded the audience that March 29 was a day that rewrote political history. He passionately spoke about NTR's vision to create a party for the Telugu nation, which earned him recognition and respect. He recounted how NTR's decision to form the party was made immediately after hearing about the MLA quarters meeting, where everyone agreed on the need to do something for the Telugu people. Chandrababu explained that the Telugu Desam Party was born out of the idea of serving the Telugu nation. "The party that came out of the mind is the Telugu Desam Party. Even when the party was formed on that day, NTR did not hesitate to declare, 'The Telugu nation is mine. I am forming a party for that Telugu country. . . It was immediately announced that its name was Telugu Desam,'" he recounted. According to Chandrababu, the colour yellow is considered auspicious, which is why NTR chose it for their party's flag. The TDP flag, he explained, features a farmer ploughing the land, ratnam workers, and a hut symbolizing the underprivileged. He also stated that the Telugu Desam Party has a long and rich history and will continue to serve the Telugu community. Chandrababu emphasized that the Telugu Desam Party is committed to the welfare of all Telugu people, regardless of their social or economic background. The party's emblem, featuring the plough, ratnam workers, and hut, represents its dedication to uplift the marginalized and support the working class.
english
<filename>model/model.py import torch import numpy as np import torchvision import torch.nn as nn import torchmetrics as tm import seaborn as sns import matplotlib.pyplot as plt import pytorch_lightning as pl from torch.nn import functional as F from .network import * from .metrics import * class MonoClassifier(pl.LightningModule): def __init__(self, params: dict): super().__init__() self.save_hyperparameters(params) self.backbone = torchvision.models.mobilenet_v2(pretrained=True) if self.hparams.data_type == 'VA_Set': self.head = ClassificationHead(input_dim=1000, target_dim=2) self.loss = nn.MSELoss() elif self.hparams.data_type == 'EXPR_Set': self.head = ClassificationHead(input_dim=1000, target_dim=7) self.loss = nn.CrossEntropyLoss() # self.loss = lambda x, y: F.cross_entropy(x, y) + F.multi_margin_loss(x, y) else: self.head = ClassificationHead(input_dim=1000, target_dim=12) self.loss = nn.BCEWithLogitsLoss() # self.loss = lambda x, y: F.binary_cross_entropy_with_logits(x, y) + F.l1_loss(x, y) def forward(self, x): # use forward for inference/predictions embedding = self.backbone(x) y_hat = self.head(embedding) return y_hat def training_step(self, batch, batch_idx): x, y = batch y_hat = self(x) loss = self.loss(y_hat, y) self.log('train/loss', loss) return loss def validation_step(self, batch, batch_idx): x, y = batch y_hat = self(x) loss = self.loss(y_hat, y) y_hat = y_hat.detach().cpu().numpy() y = y.detach().cpu().numpy() self.log_dict({'val/loss': loss}) return y_hat, y def validation_epoch_end(self, outputs) -> None: y_hat = [] y = [] for step in outputs: y_hat.append(step[0]) y.append(step[1]) y_hat = np.concatenate(y_hat, axis=0) y = np.concatenate(y, axis=0) if self.hparams.data_type == 'VA_Set': item, sum = VA_metric(y_hat, y) self.log_dict({'val/CCC-V': item[0], 'val/CCC-A': item[1], 'val/score': sum}) elif self.hparams.data_type == 'EXPR_Set': f1_acc, score, matrix = EXPR_metric(y_hat, y) self.log_dict({'val/f1': f1_acc[0], 'val/acc': f1_acc[1], 'val/score': score}) fig, ax = plt.subplots() ax = sns.heatmap(matrix, cmap='Blues') self.logger.experiment.add_figure('val/conf', fig) else: f1_acc, score = AU_metric(y_hat, y) self.log_dict({'val/f1': f1_acc[0], 'val/acc': f1_acc[1], 'val/score': score}) def predict_step(self, batch, batch_idx, dataloader_idx=None): y_hat = self(batch) y_hat = y_hat.detach().cpu().numpy() if self.hparams.data_type == 'EXPR_Set': y_hat = np.argmax(y_hat, axis=-1) elif self.hparams.data_type == 'AU_Set': y_hat = (y_hat > 0.5).astype(int) else: y_hat = np.clip(y_hat, -0.99, 0.99) return y_hat def configure_optimizers(self): # self.hparams available because we called self.save_hyperparameters() # optimizer = torch.optim.Adam(self.parameters(), lr=self.hparams.get('learning_rate', 1e-3)) optimizer = torch.optim.SGD(self.parameters(), lr=self.hparams.get('learning_rate', 3e-4), momentum=self.hparams.get('momentum', 0.9), weight_decay=self.hparams.get('weight_decay', 1e-4)) lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, 50, self.hparams.get('gamma', 0.1)) return [optimizer], [lr_scheduler] def configure_callbacks(self): checkpoint = pl.callbacks.ModelCheckpoint( monitor='val/score', mode='max', filename='epoch{epoch}-loss{val/loss:.2f}-score{val/score:.2f}', save_top_k=3, auto_insert_metric_name=False ) return [checkpoint] TYPE = ['VA_Set', 'EXPR_Set', 'AU_Set'] class MultiClassifier(pl.LightningModule): def __init__(self, params: dict): super().__init__() self.save_hyperparameters(params) self.backbone = torchvision.models.mobilenet_v2(pretrained=True) self.VA_head = ClassificationHead(input_dim=1000, target_dim=2) self.EXPR_head = ClassificationHead(input_dim=1000, target_dim=7) self.AU_head = ClassificationHead(input_dim=1000, target_dim=12) self.VA_loss = nn.MSELoss() self.EXPR_loss = nn.CrossEntropyLoss() self.AU_loss = nn.BCEWithLogitsLoss() def forward(self, x): # use forward for inference/predictions embedding = self.backbone(x) y_hat = [self.VA_head(embedding), self.EXPR_head(embedding), self.AU_head(embedding)] y_hat = torch.cat(y_hat, dim=1) return y_hat def training_step(self, batch, batch_idx): x, y = batch y_hat = self(x) va_loss = self.VA_loss(y_hat[:, :2], y[:, :2]) expr_loss = self.EXPR_loss(y_hat[:, 2:9], y[:, 2].long()) au_loss = self.AU_loss(y_hat[:, 9:], y[:, 3:].float()) total_loss = va_loss + expr_loss + au_loss self.log_dict({'train/loss': total_loss, 'train/va_loss': va_loss, 'train/expr_loss': expr_loss, 'train/au_loss': au_loss}, on_epoch=True) return total_loss def validation_step(self, batch, batch_idx): x, y = batch y_hat = self(x) va_loss = self.VA_loss(y_hat[:, :2], y[:, :2]) expr_loss = self.EXPR_loss(y_hat[:, 2:9], y[:, 2].long()) au_loss = self.AU_loss(y_hat[:, 9:], y[:, 3:].float()) total_loss = va_loss + expr_loss + au_loss self.log_dict({'val/loss': total_loss, 'val/va_loss': va_loss, 'val/expr_loss': expr_loss, 'val/au_loss': au_loss}, on_epoch=True) y_hat = y_hat.detach().cpu().numpy() y = y.detach().cpu().numpy() item, sum = VA_metric(y_hat[:, :2], y[:, :2]) self.log_dict({'val/CCC-V': item[0], 'val/CCC-A': item[1], 'val/va_score': sum}, on_epoch=True) f1_acc, score, _ = EXPR_metric(y_hat[:, 2:9], y[:, 2].astype(int)) self.log_dict({'val/expr_f1': f1_acc[0], 'val/expr_acc': f1_acc[1], 'val/expr_score': score}, on_epoch=True) f1_acc, score = AU_metric(y_hat[:, 9:], y[:, 3:]) self.log_dict({'val/au_f1': f1_acc[0], 'val/au_acc': f1_acc[1], 'val/au_score': score}, on_epoch=True) def test_step(self, batch, batch_idx): pass def configure_optimizers(self): # self.hparams available because we called self.save_hyperparameters() optimizer = torch.optim.Adam(self.parameters(), lr=self.hparams.get('learning_rate', 1e-3)) # optimizer = torch.optim.SGD(self.parameters(), # lr=self.hparams.get('learning_rate', 3e-4), # momentum=self.hparams.get('momentum', 0.9), # weight_decay=self.hparams.get('weight_decay', 1e-4)) lr_scheduler = torch.optim.lr_scheduler.StepLR(optimizer, 50, self.hparams.get('gamma', 0.1)) return [optimizer], [lr_scheduler] def configure_callbacks(self): checkpoint = pl.callbacks.ModelCheckpoint( monitor='val/loss', filename='epoch{epoch}-loss{val/loss:.2f}-va{val/va_score:.2f}-expr{val/expr_score:.2f}-au{val/au_score:.2f}', save_top_k=3, auto_insert_metric_name=False ) return [checkpoint] class Mono3DClassifier(MonoClassifier): def __init__(self, params: dict): super().__init__(params) self.save_hyperparameters(params) self.backbone = torchvision.models.mobilenet_v2(pretrained=True) self.backbone_3d = torchvision.models.mobilenet_v2(pretrained=True) if self.hparams.data_type == 'VA_Set': self.head = ClassificationHead(input_dim=2000, target_dim=2) self.loss = nn.MSELoss() elif self.hparams.data_type == 'EXPR_Set': self.head = ClassificationHead(input_dim=2000, target_dim=7) self.loss = nn.CrossEntropyLoss() # self.loss = lambda x, y: F.cross_entropy(x, y) + F.multi_margin_loss(x, y) else: self.head = ClassificationHead(input_dim=2000, target_dim=12) self.loss = nn.BCEWithLogitsLoss() # self.loss = lambda x, y: F.binary_cross_entropy_with_logits(x, y) + F.l1_loss(x, y) def forward(self, x): # use forward for inference/predictions embedding = self.backbone(x[:, 0]) embedding_3d = self.backbone_3d(x[:, 1]) y_hat = self.head(torch.cat([embedding, embedding_3d], dim=-1)) return y_hat from torchvision.models.detection.backbone_utils import resnet_fpn_backbone class MonoPyramidClassifier(MonoClassifier): def __init__(self, params: dict): super().__init__(params) self.save_hyperparameters(params) self.backbone = resnet_fpn_backbone('resnet50', pretrained=True) if self.hparams.data_type == 'VA_Set': self.head = ClassificationHead(input_dim=1280, target_dim=2) self.loss = nn.MSELoss() elif self.hparams.data_type == 'EXPR_Set': self.head = ClassificationHead(input_dim=1280, target_dim=7) self.loss = nn.CrossEntropyLoss() # self.loss = lambda x, y: F.cross_entropy(x, y) + F.multi_margin_loss(x, y) else: self.head = ClassificationHead(input_dim=1280, target_dim=12) self.loss = nn.BCEWithLogitsLoss() # self.loss = lambda x, y: F.binary_cross_entropy_with_logits(x, y) + F.l1_loss(x, y) def forward(self, x): # use forward for inference/predictions layers = self.backbone(x) embedding = torch.cat([torch.mean(layer,dim=(-2,-1)) for layer in layers.values()], dim=-1) y_hat = self.head(embedding) return y_hat class MultiPyramidClassifier(MultiClassifier): def __init__(self, params: dict): super().__init__(params) self.save_hyperparameters(params) self.backbone = resnet_fpn_backbone('resnet50', pretrained=True) self.VA_head = ClassificationHead(input_dim=1280, target_dim=2) self.EXPR_head = ClassificationHead(input_dim=1280, target_dim=7) self.AU_head = ClassificationHead(input_dim=1280, target_dim=12) self.VA_loss = nn.MSELoss() self.EXPR_loss = nn.CrossEntropyLoss() self.AU_loss = nn.BCEWithLogitsLoss() def forward(self, x): # use forward for inference/predictions layers = self.backbone(x) embedding = torch.cat([torch.mean(layer, dim=(-2, -1)) for layer in layers.values()], dim=-1) y_hat = [self.VA_head(embedding), self.EXPR_head(embedding), self.AU_head(embedding)] y_hat = torch.cat(y_hat, dim=1) return y_hat if __name__ == '__main__': model = MonoPyramidClassifier({'data_type':'VA_Set'}) output = model.backbone(torch.rand(32, 3, 128, 128)) print([(k, v.shape) for k, v in output.items()]) ma = torch.cat([torch.mean(layer,dim=(-2,-1)) for layer in output.values()],dim=-1) print(ma.shape)
python
<reponame>yakir4123/MapleMobile package com.bapplications.maplemobile.gameplay.player.inventory; import com.bapplications.maplemobile.constatns.Configuration; import java.util.EnumMap; public class Inventory { private long gold; private EnumMap<InventoryType.Id, InventoryType> inventories = new EnumMap<>(InventoryType.Id.class); public Inventory() { gold = 0; inventories.put(InventoryType.Id.EQUIP, new InventoryType(InventoryType.Id.EQUIP, Configuration.INVENTORY_MAX_SLOTS)); inventories.put(InventoryType.Id.USE, new InventoryType(InventoryType.Id.USE, Configuration.INVENTORY_MAX_SLOTS)); inventories.put(InventoryType.Id.SETUP, new InventoryType(InventoryType.Id.SETUP, Configuration.INVENTORY_MAX_SLOTS)); inventories.put(InventoryType.Id.ETC, new InventoryType(InventoryType.Id.ETC, Configuration.INVENTORY_MAX_SLOTS)); inventories.put(InventoryType.Id.CASH, new InventoryType(InventoryType.Id.CASH, Configuration.INVENTORY_MAX_SLOTS)); inventories.put(InventoryType.Id.EQUIPPED, new EquippedInventory()); } public long getGold() { return gold; } public int addItem(Item item, short count) { return inventories.get(InventoryType.by_item_id(item.getItemId())).add(item, count); } public InventoryType getInventory(InventoryType.Id type) { return inventories.get(type); } public EquippedInventory getEquippedInventory() { return (EquippedInventory) inventories.get(InventoryType.Id.EQUIPPED); } public boolean equipItem(Equip item) { Equip equip = getEquippedInventory().equipItem(item); inventories.get(InventoryType.Id.EQUIP).add(equip); return true; } public boolean unequipItem(Equip item) { Equip equip = getEquippedInventory().unequipItem(EquipData.get(item.getItemId()).getEqSlot()); inventories.get(InventoryType.Id.EQUIP).add(equip); return true; } }
java
<filename>test/json/rsa/rsa_keygen_19.json<gh_stars>10-100 [ { "acvVersion": "0.5" }, { "vsId": 20618, "algorithm": "RSA", "testGroups": [ { "infoGeneratedByServer": true, "tests": [ { "e": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "seed": "182EF0B3E64082BC0B2330EFF7ECFFC8ECC610304F2E5C2B9E247EF7", "tcId": 1, "bitlens": [ 314, 166, 329, 161 ] } ], "modulo": 2048, "tgId": 999, "randPQ": "B.3.4", "pubExp": "random", "hashAlg": "SHA2-256", "keyFormat": "standard", "testType": "aft" } ], "mode": "keyGen" } ]
json
--- title: "Selecting a Credential Type" ms.date: "03/30/2017" ms.assetid: bf707063-3f30-4304-ab53-0e63413728a8 --- # Selecting a Credential Type *Credentials* are the data Windows Communication Foundation (WCF) uses to establish either a claimed identity or capabilities. For example, a passport is a credential a government issues to prove citizenship in a country or region. In WCF, credentials can take many forms, such as user name tokens and X.509 certificates. This topic discusses credentials, how they are used in WCF, and how to select the right credential for your application. In many countries and regions, a driver’s license is an example of a credential. A license contains data that represents a person's identity and capabilities. It contains proof of possession in the form of the possessor's picture. The license is issued by a trusted authority, usually a governmental department of licensing. The license is sealed, and can contain a hologram, showing that it has not been tampered with or counterfeited. Presenting a credential involves presenting both the data and proof of possession of the data. WCF supports a variety of credential types at both the transport and message security levels. For example, consider two types of credentials supported in WCF: user name and (X.509) certificate credentials. For the user name credential, the user name represents the claimed identity and the password provides proof of possession. The trusted authority in this case is the system that validates the user name and password. With an X.509 certificate credential, the subject name, subject alternative name or specific fields within the certificate can be used as claims of identity, while other fields, such as the `Valid From` and `Valid To` fields, specify the validity of the certificate. ## Transport Credential Types The following table shows the possible types of client credentials that can be used by a binding in transport security mode. When creating a service, set the `ClientCredentialType` property to one of these values to specify the type of credential that the client must supply to communicate with your service. You can set the types in either code or configuration files. |Setting|Description| |-------------|-----------------| |None|Specifies that the client does not need to present any credential. This translates to an anonymous client.| |Basic|Specifies basic authentication for the client. For additional information, see RFC2617—[HTTP Authentication: Basic and Digest Authentication](https://go.microsoft.com/fwlink/?LinkID=88313).| |Digest|Specifies digest authentication for the client. For additional information, see RFC2617—[HTTP Authentication: Basic and Digest Authentication](https://go.microsoft.com/fwlink/?LinkID=88313).| |Ntlm|Specifies NT LAN Manager (NTLM) authentication. This is used when you cannot use Kerberos authentication for some reason. You can also disable its use as a fallback by setting the <xref:System.ServiceModel.Security.WindowsClientCredential.AllowNtlm%2A> property to `false`, which causes WCF to make a best-effort to throw an exception if NTLM is used. Note that setting this property to `false` may not prevent NTLM credentials from being sent over the wire.| |Windows|Specifies Windows authentication. To specify only the Kerberos protocol on a Windows domain, set the <xref:System.ServiceModel.Security.WindowsClientCredential.AllowNtlm%2A> property to `false` (the default is `true`).| |Certificate|Performs client authentication using an X.509 certificate.| |Password|User must supply a user name and password. Validate the user name/password pair using Windows authentication or another custom solution.| ### Message Client Credential Types The following table shows the possible credential types that you can use when creating an application that uses message security. You can use these values in either code or configuration files. |Setting|Description| |-------------|-----------------| |None|Specifies that the client does not need to present a credential. This translates to an anonymous client.| |Windows|Allows SOAP message exchanges to occur under the security context established with a Windows credential.| |Username|Allows the service to require that the client be authenticated with a user name credential. Note that WCF does not allow any cryptographic operations with user names, such as generating a signature or encrypting data. WCF ensures that the transport is secured when using user name credentials.| |Certificate|Allows the service to require that the client be authenticated using an X.509 certificate.| |Issued Token|A custom token type configured according to a security policy. The default token type is Security Assertions Markup Language (SAML). The token is issued by a secure token service. For more information, see [Federation and Issued Tokens](../../../../docs/framework/wcf/feature-details/federation-and-issued-tokens.md).| ### Negotiation Model of Service Credentials *Negotiation* is the process of establishing trust between a client and a service by exchanging credentials. The process is performed iteratively between the client and the service, so as to disclose only the information necessary for the next step in the negotiation process. In practice, the end result is the delivery of a service's credential to the client to be used in subsequent operations. With one exception, by default the system-provided bindings in WCF negotiate the service credential automatically when using message-level security. (The exception is the <xref:System.ServiceModel.BasicHttpBinding>, which does not enable security by default.) To disable this behavior, see the <xref:System.ServiceModel.MessageSecurityOverHttp.NegotiateServiceCredential%2A> and <xref:System.ServiceModel.FederatedMessageSecurityOverHttp.NegotiateServiceCredential%2A> properties. > [!NOTE] > When SSL security is used with .NET Framework 3.5 and later, a WCF client uses both the intermediate certificates in its certificate store and the intermediate certificates received during SSL negotiation to perform certificate chain validation on the service's certificate. .NET Framework 3.0 only uses the intermediate certificates installed in the local certificate store. #### Out-of-Band Negotiation If automatic negotiation is disabled, the service credential must be provisioned at the client prior to sending any messages to the service. This is also known as an *out-of-band* provisioning. For example, if the specified credential type is a certificate, and automatic negotiation is disabled, the client must contact the service owner to receive and install the certificate on the computer running the client application. This can be done, for example, when you want to strictly control which clients can access a service in a business-to-business scenario. This out-of-band-negotiation can be done in email, and the X.509 certificate is stored in Windows certificate store, using a tool such as the Microsoft Management Console (MMC) Certificates snap-in. > [!NOTE] > The <xref:System.ServiceModel.ClientBase%601.ClientCredentials%2A> property is used to provide the service with a certificate that was attained through out-of-band negotiation. This is necessary when using the <xref:System.ServiceModel.BasicHttpBinding> class because the binding does not allow automated negotiation. The property is also used in an uncorrelated duplex scenario. This is a scenario where a server sends a message to the client without requiring the client to send a request to the server first. Because the server does not have a request from the client, it must use the client's certificate to encrypt the message to the client. ## Setting Credential Values Once you select a security mode, you must specify the actual credentials. For example, if the credential type is set to "certificate," then you must associate a specific credential (such as a specific X.509 certificate) with the service or client. Depending on whether you are programming a service or a client, the method for setting the credential value differs slightly. ### Setting Service Credentials If you are using transport mode, and you are using HTTP as the transport, you must use either Internet Information Services (IIS) or configure the port with a certificate. For more information, see [Transport Security Overview](../../../../docs/framework/wcf/feature-details/transport-security-overview.md) and [HTTP Transport Security](../../../../docs/framework/wcf/feature-details/http-transport-security.md). To provision a service with credentials in code, create an instance of the <xref:System.ServiceModel.ServiceHost> class and specify the appropriate credential using the <xref:System.ServiceModel.Description.ServiceCredentials> class, accessed through the <xref:System.ServiceModel.ServiceHostBase.Credentials%2A> property. #### Setting a Certificate To provision a service with an X.509 certificate to be used to authenticate the service to clients, use the <xref:System.ServiceModel.Security.X509CertificateInitiatorServiceCredential.SetCertificate%2A> method of the <xref:System.ServiceModel.Security.X509CertificateRecipientServiceCredential> class. To provision a service with a client certificate, use the <xref:System.ServiceModel.Security.X509CertificateInitiatorClientCredential.SetCertificate%2A> method of the <xref:System.ServiceModel.Security.X509CertificateInitiatorServiceCredential> class. #### Setting Windows Credentials If the client specifies a valid user name and password, that credential is used to authenticate the client. Otherwise, the current logged-on user's credentials are used. ### Setting Client Credentials In WCF, client applications use a WCF client to connect to services. Every client derives from the <xref:System.ServiceModel.ClientBase%601> class, and the <xref:System.ServiceModel.ClientBase%601.ClientCredentials%2A> property on the client allows the specification of various values of client credentials. #### Setting a Certificate To provision a service with an X.509 certificate that is used to authenticate the client to a service, use the <xref:System.ServiceModel.Security.X509CertificateInitiatorClientCredential.SetCertificate%2A> method of the <xref:System.ServiceModel.Security.X509CertificateInitiatorClientCredential> class. ## How Client Credentials Are Used to Authenticate a Client to the Service Client credential information required to communicate with a service is provided using either the <xref:System.ServiceModel.ClientBase%601.ClientCredentials%2A> property or the <xref:System.ServiceModel.ChannelFactory.Credentials%2A> property. The security channel uses this information to authenticate the client to the service. Authentication is accomplished through one of two modes: - The client credentials are used once before the first message is sent, using the WCF client instance to establish a security context. All application messages are then secured through the security context. - The client credentials are used to authenticate every application message sent to the service. In this case, no context is established between the client and the service. ### Established Identities Cannot Be Changed When the first method is used, the established context is permanently associated with the client identity. That is, once the security context has been established, the identity associated with the client cannot be changed. > [!IMPORTANT] > There is a situation to be aware of when the identity cannot be switched (that is, when establish security context is on, the default behavior). If you create a service that communicates with a second service, the identity used to open the WCF client to the second service cannot be changed. This becomes a problem if multiple clients are allowed to use the first service and the service impersonates the clients when accessing the second service. If the service reuses the same client for all callers, all calls to the second service are done under the identity of the first caller that was used to open the client to the second service. In other words, the service uses the identity of the first client for all its clients to communicate with the second service. This can lead to the elevation of privilege. If this is not the desired behavior of your service, you must track each caller and create a new client to the second service for every distinct caller, and ensure that the service uses only the right client for the right caller to communicate with the second service. For more information about credentials and secure sessions, see [Security Considerations for Secure Sessions](../../../../docs/framework/wcf/feature-details/security-considerations-for-secure-sessions.md). ## See also - <xref:System.ServiceModel.ClientBase%601?displayProperty=nameWithType> - <xref:System.ServiceModel.ClientBase%601.ClientCredentials%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.Description.ClientCredentials.ClientCertificate%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.BasicHttpMessageSecurity.ClientCredentialType%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.HttpTransportSecurity.ClientCredentialType%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.MessageSecurityOverHttp.ClientCredentialType%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.MessageSecurityOverMsmq.ClientCredentialType%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.MessageSecurityOverTcp.ClientCredentialType%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.TcpTransportSecurity.ClientCredentialType%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.Security.X509CertificateInitiatorClientCredential.SetCertificate%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.Security.X509CertificateInitiatorClientCredential.SetCertificate%2A?displayProperty=nameWithType> - <xref:System.ServiceModel.Security.X509CertificateInitiatorServiceCredential.SetCertificate%2A?displayProperty=nameWithType> - [Security Concepts](../../../../docs/framework/wcf/feature-details/security-concepts.md) - [Securing Services and Clients](../../../../docs/framework/wcf/feature-details/securing-services-and-clients.md) - [Programming WCF Security](../../../../docs/framework/wcf/feature-details/programming-wcf-security.md) - [HTTP Transport Security](../../../../docs/framework/wcf/feature-details/http-transport-security.md)
markdown
A web site is a collection of publicly easily accessible, interlinked Website that share a solitary domain name. Web sites can be produced and preserved by an individual, group, company or company to serve a selection of purposes. Together, all openly easily accessible websites constitute the Net. Sites are available in an almost endless range, including academic sites, information sites, online forums, social media sites websites, ecommerce sites, and more. What is Pligg? Pligg is an open source content management system that lets you easily create your own user-powered website.
english
<reponame>FlorianEisenbarth/DataCamp_DeputiesWatcher {"id": "VTANR5L15V202", "code_type_vote": "SPO", "libelle_type_vote": "scrutin public ordinaire", "demandeur": "Pr\u00e9sident du groupe \"<NAME>\" Pr\u00e9sident du groupe \"Les R\u00e9publicains\"", "libelle": "l'amendement n\u00b0 103 de suppression de <NAME> et les amendements identiques suivants \u00e0 l'article 26 du projet de loi de financement de la s\u00e9curit\u00e9 sociale pour 2018 (premi\u00e8re lecture).", "nb_votants": "81", "date": "2017-10-27"}
json
{ "debug.javascript.defaultRuntimeExecutable": { "pwa-node": "p:\\portableapps\\CommonFiles\\node-v16.13.1-win-x64\\node.exe" }, "eslint.nodePath": "p:\\portableapps\\CommonFiles\\node-v16.13.1-win-x64\\node.exe", "terminal.integrated.defaultProfile.windows": "Command Prompt", "terminal.integrated.env.windows":{ "PATH":"${env:PATH};P:\\portableapps\\CommonFiles\\node-v16.13.1-win-x64\\;P:\\portableapps\\CommonFiles\\PortableGit\\bin\\", }, "bitburner.scriptRoot": "./src/", "editor.defaultFormatter": "vscode.typescript-language-features", "eslint.format.enable": true, }
json
def cuadrado1(num1): return num1**2 cuadrado2 = lambda num1: num1 ** 2 print(cuadrado1(5)) print(cuadrado2(5))
python
package br.com.casadocodigo.repositories; import br.com.casadocodigo.entity.Cupom; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.stereotype.Repository; import java.util.Optional; @Repository public interface CupomRepository extends JpaRepository<Cupom, Long> { Optional<Cupom> findById(Long Id); Optional<Cupom> findByCodigoCupom(String CodigoCupom); }
java
<gh_stars>1-10 pub struct HuffmanEncoder<W: Write> { state: State, output: BitWriter<W>, char_to_code: HashMap<Char, Code>, char_to_weight: HashMap<Char, u64>, max_char_length: usize, } impl<W: Write> HuffmanEncoder<W> { pub fn new(output: W, max_char_length: usize) -> Self { HuffmanEncoder { state: State::Initial, output: BitWriter::new(output), char_to_code: HashMap::new(), char_to_weight: HashMap::new(), max_char_length: max_char_length, } } pub fn analyze<R>(&mut self, input: R) -> Result<u64> where R: Read { assert_eq!(State::Initial, self.state); let mut input = BitReader::new(input); let mut bytes_read = 0; while let Some(ch) = read_char(&mut input, self.max_char_length) { self.char_to_weight.entry(ch.clone()).or_insert(0); self.char_to_weight.get_mut(&ch).map(|mut w| *w += 1); bytes_read += ch.len() as u64; } Ok(bytes_read * 8) } pub fn analyze_finish(&mut self) -> Result<()> { assert_eq!(State::Initial, self.state); self.state = State::Analyzed; let leaves = self.compute_leaves(); let tree = self.build_tree(leaves); self.build_dictionary(tree); self.write_header() } pub fn compress<R>(&mut self, input: R) -> Result<u64> where R: Read { assert_eq!(State::Analyzed, self.state); let mut input = BitReader::new(input); let mut bits_written = 0; while let Some(ch) = read_char(&mut input, self.max_char_length) { let code = self.char_to_code.get(&ch).unwrap(); assert!(code.length <= max_code_length()); for i in 0..code.length { let shifted_one = 1 << i; let data = (code.data & shifted_one) > 0; try!(self.output.write_bit(data)); bits_written += 1; } } Ok(bits_written) } pub fn compress_finish(&mut self) -> Result<()> { assert_eq!(State::Analyzed, self.state); self.state = State::Compressed; self.output.flush() } pub fn position(&self) -> u64 { self.output.position() } pub fn get_output_ref(&self) -> &W { self.output.get_ref() } pub fn get_output_mut(&mut self) -> &mut W { self.output.get_mut() } pub fn get_writer_mut(&mut self) -> &mut BitWriter<W> { &mut self.output } fn compute_leaves(&mut self) -> Vec<Tree> { let mut leaves: Vec<Tree> = Vec::with_capacity(self.char_to_weight.len()); for (ref ch, &weight) in &self.char_to_weight { let data: NodeData = NodeData { chars: hashset!{(*ch).clone()}, weight: weight, }; leaves.push(BinaryTree::new_leaf(data)); } leaves.sort_by_key(|tree| tree.data().unwrap().weight); leaves.reverse(); leaves } fn build_tree(&self, leaves: Vec<Tree>) -> Tree { let mut level = VecDeque::from(leaves); if level.is_empty() { return BinaryTree::new_empty(); } let new_level = |level: &VecDeque<Tree>| -> VecDeque<Tree> { let length = level.len() / 2 + 1; VecDeque::with_capacity(length) }; let mut next_level = new_level(&level); loop { let found_root = next_level.is_empty() && level.len() == 1; if found_root { break; } else { self.build_next_level(&level, &mut next_level); level = next_level; next_level = new_level(&level); } } level[0].clone() } fn build_next_level(&self, level: &VecDeque<Tree>, next_level: &mut VecDeque<Tree>) { let n = level.len(); let mut level_length = n; while level_length > 0 { let i = level_length - 1; let last_node_in_level = i == 0; let new_parent_has_same_weight = match next_level.front() { Some(tree) => tree.data().unwrap().weight <= level[i].data().unwrap().weight, None => false, }; if last_node_in_level || new_parent_has_same_weight { let head = next_level.pop_front().unwrap(); let parent = self.new_parent(&level[i], &head); next_level.push_front(parent); if last_node_in_level { break; } level_length -= 1; } else { let parent = self.new_parent(&level[i], &level[i - 1]); next_level.push_front(parent); level_length -= 2; } } } fn new_parent(&self, left: &Tree, right: &Tree) -> Tree { let left_chars = &left.data().unwrap().chars; let right_chars = &right.data().unwrap().chars; let chars = left_chars.union(right_chars).cloned().collect::<HashSet<Char>>(); let weight = left.data().unwrap().weight + right.data().unwrap().weight; let data = NodeData { chars: chars, weight: weight, }; Tree::new(data, left, right) } fn build_dictionary(&mut self, tree: Tree) { if let Some(data) = tree.data() { for ref ch in &data.chars { let code = self.compute_code(ch, &tree); let ch: Char = (*ch).clone(); self.char_to_code.insert(ch, code); } } assert!(self.char_to_code.len() <= self.max_possible_chars()); } fn compute_code(&self, ch: CharSlice, tree: &Tree) -> Code { let mut tree = tree.clone(); let mut code = BitSet::new(); let mut length: CodeLength = 0; loop { if tree.left_data().is_some() && tree.left_data().unwrap().chars.contains(ch) { tree = tree.left(); } else if tree.right_data().is_some() && tree.right_data().unwrap().chars.contains(ch) { code.insert(length as usize); tree = tree.right(); } else { break; } length += 1; } assert!(tree.is_leaf()); if length == 0 { length = 1; // FIXME } assert!(length > 0); assert!(length <= max_code_length()); let data = code.as_slice()[0] as CodeData; Code { length: length, data: data, } } fn write_header(&mut self) -> Result<()> { let dict_length = self.char_to_code.len() as DictLength; try!(self.output.write_u16(dict_length)); for (ref ch, code) in &self.char_to_code { let data_with_marker: CodeData = Self::pack_data(&code); assert!(code.data != data_with_marker); try!(self.output.write_u16(data_with_marker)); try!(self.output.write_u8(ch.len() as u8)); for i in ch.iter() { try!(self.output.write_u8(*i)); } } Ok(()) } fn pack_data(code: &Code) -> CodeData { let shifted_one = 1 << code.length; let result = code.data | shifted_one; result } fn max_possible_chars(&self) -> usize { 1 << (self.max_char_length * 8) } } impl<W: Write> Drop for HuffmanEncoder<W> { fn drop(&mut self) { if self.state == State::Analyzed { let _ = self.compress_finish(); } } }
rust
<reponame>liuyi0501/IwaraCollector<filename>data/www/akwb4fvzdu7qwnpl.json {"title":"妄想感傷代償連盟","author":"kumasumi","description":"こんにゃく式エノコログサundefinedver.2.0undefinedナイトシェードundefinedver.1.0<br>禁止转载undefinedDoundefinednotundefinedre-upload","thumb":"//i.iwara.tv/sites/default/files/styles/thumbnail/public/videos/thumbnails/674089/thumbnail-674089_0004.jpg?itok=YsgW9JHp","download":"https://www.iwara.tv/api/video/akwb4fvzdu7qwnpl","origin":"https://www.iwara.tv/videos/akwb4fvzdu7qwnpl"}
json
Suspicion over the involvement of m. v. Prabhu Daya in the mid-sea accident off the Kerala coast that killed three fishermen on March 1 deepened on Tuesday, with a five-member team from the Mercantile Marine Department (MMD) claiming to have found “fresh scratch marks” on the ship's hull. As the Chennai Port Trust failed to permit the vessel to berth at Bharti Dock, even 12 hours after its arrival, a team along with representatives of the Coast Guard and the Navy went to the outer anchorage, about 2. 4 nautical miles from the shore, and carried out inspection from 12. 30 p. m. to 6. 30 p. m. The Kerala police are also conducting a parallel investigation. Initially, the MMD team members (four from Chennai and one from Kerala) went around the vessel to inspect the hull. They also inspected the electronic chart. Deep sea divers would be deployed on Wednesday. Owned by Tolani Shipping (Singapore) Pvt. Ltd. , the vessel flying the Singapore flag was on its way to China carrying iron ore from Panaji. As there was a collision between a fishing boat and a vessel near Kochi, the Maritime Rescue Coordination Centre sought some details from eight vessels that were near the accident spot. However, after narrowing down the probe to a few vessels, the Directorate General of Shipping asked ‘Prabhu Daya' to report to the nearest harbour. The vessel reached Chennai Port around 11 p. m. on Monday. Even before its arrival, the MMD sought the permission of Chennai Port Trust (ChPT) officials to berth Prabhu Daya at one of the docks to carry out underwater survey, take photographs and to scan the ship for any visible scratch marks. Explaining their stance for not providing berthing facility to Prabhu Daya on arrival, ChPT officials said they had suspended berthing of iron ore vessel at Bharti Dock since October as the Madras High Court had banned them from handling dusty cargo. Further, legal proceedings would hurt the Port's productivity and interest.
english
<filename>api/src/resources/users/handler.js<gh_stars>1-10 'use strict' const Bcrypt = require('bcrypt-nodejs') const Boom = require('boom') const BaseHandler = require('../base/handler') const { UserRepository } = require('./repository') class UserHandler extends BaseHandler { constructor (repository) { super(repository) this.repository = repository } async create (req, h) { try { let { payload } = req const emailInUse = await this.repository.emailInUse(payload.email) if (emailInUse) { return Boom.badData('Email is already in use') } payload.password = <PASSWORD>(payload.password) payload.email = payload.email.toLowerCase() const { _id, name, email } = await this.repository.create(payload) const result = { data: { _id, name, email } } return h.response(result).code(201) } catch (error) { console.log(error) throw error } } async update (req, h) { try { let { payload } = req const { id } = req.params if (!(await this.repository.findOne(id).count())) { return Boom.notFound('Resource not found.') } const emailInUse = await this.repository.emailInUse(payload.email, id) if (emailInUse) { return Boom.badData('Email is already in use') } payload.email = payload.email.toLowerCase() if (req.payload.password) { payload.password = <PASSWORD>(payload.password) } await this.repository.update(req.params.id, payload) const result = { data: { id: req.params.id, ...payload } } return result } catch (error) { console.log(error) throw error } } } module.exports = { UserHandlerClass: UserHandler, UserHandler: new UserHandler(UserRepository) }
javascript
<filename>Sort Colors.py # @Time : 2019/6/1 23:01 # @Author : shakespere # @FileName: Sort Colors.py ''' 75. Sort Colors Medium 1623 156 Favorite Share Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue. Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respectively. Note: You are not suppose to use the library's sort function for this problem. Example: Input: [2,0,2,1,1,0] Output: [0,0,1,1,2,2] Follow up: A rather straight forward solution is a two-pass algorithm using counting sort. First, iterate the array counting number of 0's, 1's, and 2's, then overwrite array with total number of 0's, then 1's and followed by 2's. Could you come up with a one-pass algorithm using only constant space? ''' class Solution(object): def sortColors(self, nums): """ :type nums: List[int] :rtype: None Do not return anything, modify nums in-place instead. """ i, p0, p2 = 0, 0, len(nums) - 1 while i <= p2: if nums[i] == 0: nums[p0], nums[i] = nums[i], nums[p0] p0 += 1 i += 1 elif nums[i] == 2: nums[p2], nums[i] = nums[i], nums[p2] p2 -= 1 else: i += 1 return nums
python
package com.madm.learnroute.javaee; import cn.hutool.core.util.ReUtil; import java.util.ArrayList; import java.util.Objects; /** * jdk6:‐Xms6M ‐Xmx6M ‐XX:PermSize=6M ‐XX:MaxPermSize=6M * jdk8:‐Xms6M ‐Xmx6M ‐XX:MetaspaceSize=6M ‐XX:MaxMetaspaceSize=6M * VM Args: -Xms10m -Xmx10m -XX:+PrintGcDetail * */ public class RuntimeConstantPoolOOMPractice { public static void main(String[] args) { // ArrayList<String> list = new ArrayList<String>(); // for (int i = 0; i < 10000000; i++) { // String str = String.valueOf(i).intern(); // list.add(str); // } if(Objects.equals(1338, new Long(1338))){ System.out.println("所穿参数相等"); } } }
java
Lucknow: Almost one-and-a-half-years after he was expelled from the BJP on charges of rape, former MLA Kuldeep Singh Sengar’s wife, Sangeeta Sengar has been made party candidate for the upcoming panchayat elections. Sangeeta will contest from Fatehpur Chaurasi in Unnao Zila Panchayat elections. Sangeeta Sengar had won the zila panchayat chairperson election in 2016. Party sources said that her candidature was approved by state BJP chief Swatantra Dev Singh and state general secretary (organization) Sunil Bansal. Sengar was made the candidate, keeping in mind the influence that her family wields in the area and the sympathy that they have earned after Kuldeep Senger’s arrest in April 2018. Many still believe that he is innocent and has been framed by political rivals. Kuldeep Sengar, sentenced to life in jail, was disqualified as the member of the Uttar Pradesh legislative assembly last year in February. He is presently lodged in Tihar jail.
english
On July 8th of 2011, the social media platform Snapchat was officially released to the public. In the app, every person who made an account had to come up with an unique username, regardless of what their display name could be changed to. However, this username cannot be changed by any means once the account is created. This poses an issue to those that made their account at a young age, and did not realize how embarrassing it would become later on. As well as this, being able to change your username is just a very convenient feature. So, this petition is for Snapchat to let its users change their usernames. Let's face it. When you finally gain the courage to go ask that cute person for their snap and you have to tell them to add "bunnyloverXD2626", a part of you dies. I myself have had the same username for the past 7 years, and have had this happen many times. All of my friends have had a good laugh at it, and every time I have to laugh along with them, knowing there is little to nothing I can do to fix it. I know for a fact that there are more people out there in my shoes too! Okay, so there might be one other solution. That is to delete your entire account and make a new one entirely. It even makes the username unavailable, so nobody could make the same terrible decision you did. However, over the years we've made hundreds of friends, and years worth of streaks. While that snapscore might not be as big as you'd like it to be, it’s still too significant to leave in the dust. What if we don't want to take all that time adding every single one of our friends back, or delete those amazing memories you've saved for so long? This is our opportunity to change that! Through the Snapchat community, the company has added some of their most popular features to this app we all love, like group facetime. This is completely possible if we can garner enough support to get Snapchat’s attention. Plenty of other social media apps allow you to securely change your username, so it can’t be that hard to get them to change their minds. So to all of you like me who weren't lucky enough to have a proper form of common sense in those middle school years, I ask that you please sign this petition and spread it wherever it needs to go to be seen by the big guys! - Thanks!
english
Among the companies that showed strong momentum were Aditya Birla Sun Life AMC, Container Corporation of India, Indiabulls Housing Finance, KRBL, and Zee Entertainment Enterprises. Let's take a closer look at these companies and their recent stock movements. (Data Source: StockEdge) Aditya Birla Sun Life AMC, a leading asset management company, showcased robust performance as its stock crossed the 200-day SMA at Rs 396.33 and closed at Rs 400.7 on July 24. Container Corporation of India, a major player in the logistics and transportation industry, displayed strong market momentum as its stock crossed the 200-day SMA at Rs 674.89 and closed at Rs 680.55 on July 24. Indiabulls Housing Finance demonstrated a positive trend as its stock crossed the 200-day SMA at Rs 121.3 and closed at Rs 121.6 on July 24. KRBL, a prominent player in the basmati rice industry, showcased a promising market movement as its stock crossed the 200-day SMA at Rs 379.32 and closed at Rs 379.9 on July 24. Zee Entertainment Enterprises displayed positive momentum as its stock crossed the 200-day SMA at Rs 221.66 and closed at Rs 221.75 on July 24. (Disclaimer: This is an AI-generated article. Recommendations, suggestions, views, and opinions given by experts are their own. These do not represent the views of the Economic Times) Download The Economic Times News App to get Daily Market Updates & Live Business News. Subscribe to The Economic Times Prime and read the Economic Times ePaper Online.and Sensex Today.
english
Our editors will review what you’ve submitted and determine whether to revise the article. - Byname: - Illiam Dhône (Manx: “Brown-haired William”) - Born: - Died: - Jan. 2, 1663, Hango Hill, Isle of Man (aged 54) - Title / Office: William Christian (born April 14, 1608—died Jan. 2, 1663, Hango Hill, Isle of Man) Manx politician regarded in some circles as a patriot martyr. Christian was the third son of Ewan Christian, one of the deemsters (judges) of the Isle of Man. In 1648 Christian was appointed to the post of receiver general by the 7th Earl of Derby, lord of the Isle of Man. In 1651 Derby left for England to fight with the armies of Charles II against the forces of Parliament; in his absence, he placed Christian in command of the island militia. That same year, however, the earl was captured by Parliamentary forces at the Battle of Worcester, whereupon the Countess of Derby, Charlotte de la Tremoille, initiated a fruitless attempt to ransom her husband’s life through the surrender of the island to Parliament. Christian headed a revolt against the countess, but at the same time he negotiated independently with the Parliamentarians. In October of 1651, Christian cooperated in the landing of a Parliamentary fleet under Colonel Robert Duckenfield, and by November the countess surrendered the castles of Rushen and Peel, thus yielding control of the island to Parliament. Christian continued in the office of receiver general until he was appointed governor of the Isle of Man in 1656. Two years later he fled amid charges of corruption, but he was arrested in London for debt and imprisoned for a year. Upon release from prison, he returned to the Isle of Man, where, in spite of the Act of Indemnity (c. 1661), he was arrested by Charles, 8th Earl of Derby. After a trial whose outcome was unfairly influenced by the earl, William Christian was executed by firing squad at Hango Hill. Christian is celebrated in the Manx ballad Baase Illiam Dhône (“The Death of Brown-haired William”) and by the reference to him in Sir Walter Scott’s novel Peveril of the Peak (1822).
english