text
stringlengths
1
1.04M
language
stringclasses
25 values
<reponame>czar0/marvelous-gems package main import ( "encoding/json" "fmt" "time" "github.com/hyperledger/fabric/core/chaincode/shim" pb "github.com/hyperledger/fabric/protos/peer" ) type SimpleChaincode struct { } type Trade struct { ID string `json:"id"` GemID string `json:"gem_id"` Seller string `json:"suller"` Buyer string `json:"buyer"` Price float64 `json:"price"` Timestamp time.Time `json:"timestamp,omitempty"` } func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("Trading chaincode initialized") return shim.Success(nil) } func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { fmt.Println("Trading chaincode invoke") function, args := stub.GetFunctionAndParameters() fmt.Println("Function " + function) fmt.Printf("Args: %v \n", args) if function == "createTrade" { return t.createTrade(stub, args) } else if function == "query" { return t.query(stub, args) } return shim.Error("Invalid invoke function name") } func (t *SimpleChaincode) createTrade(stub shim.ChaincodeStubInterface, args []string) pb.Response { var trade Trade err := json.Unmarshal([]byte(args[0]), &trade) if err != nil { fmt.Println(err) return shim.Error(err.Error()) } fmt.Println(trade) tradeAsBytes, err := json.Marshal(trade) if err != nil { fmt.Println(err) return shim.Error(err.Error()) } timestamp, err := stub.GetTxTimestamp() trade.Timestamp = time.Unix(timestamp.GetSeconds(), 0) err = stub.PutState(trade.ID, tradeAsBytes) if err != nil { fmt.Println(err) return shim.Error(err.Error()) } fmt.Println("TRADE REGISTERED") return shim.Success(nil) } func (t *SimpleChaincode) query(stub shim.ChaincodeStubInterface, args []string) pb.Response { var ID string var err error if len(args) != 1 { return shim.Error("Query function requires one argument: ID") } ID = args[0] payload, err := stub.GetState(ID) if err != nil { return shim.Error("Failed to get state for: " + ID) } if payload == nil { return shim.Error("No results for: " + ID) } return shim.Success(payload) } func main() { err := shim.Start(new(SimpleChaincode)) if err != nil { fmt.Printf("Error starting Simple chaincode: %s", err) } }
go
<filename>slybot/setup.py from os.path import join, abspath, dirname, exists from slybot import __version__ from setuptools import setup, find_packages from setuptools.command.bdist_egg import bdist_egg from setuptools.command.sdist import sdist def build_js(): root = abspath(dirname(__file__)) base_path = abspath(join(root, '..', 'splash_utils')) if not exists(base_path): base_path = abspath(join(root, '..', 'slyd', 'splash_utils')) files = ('waitAsync.js', 'perform_actions.js') fdata = [] for fname in files: with open(join(base_path, fname)) as f: fdata.append(f.read()) js_file = abspath(join(root, 'slybot', 'splash-script-combined.js')) with open(js_file, 'w') as f: f.write(';(function(){\n%s\n})();' % '\n'.join(fdata)) class bdist_egg_command(bdist_egg): def run(self): build_js() bdist_egg.run(self) class sdist_command(sdist): def run(self): build_js() sdist.run(self) install_requires = ['Scrapy', 'scrapely', 'loginform', 'lxml', 'jsonschema', 'dateparser', 'scrapyjs', 'page_finder', 'six'] extras = { 'tests': ['nose', 'nose-timer'], 'clustering': ['page_clustering'] } setup(name='slybot', version=__version__, license='BSD', description='Slybot crawler', author='Scrapy project', author_email='<EMAIL>', url='http://github.com/scrapinghub/portia', packages=find_packages(exclude=('tests', 'tests.*')), platforms=['Any'], scripts=['bin/slybot', 'bin/portiacrawl'], install_requires=install_requires, extras_require=extras, package_data={'': ['slybot/splash-script-combined.js']}, include_package_data=True, cmdclass={ 'bdist_egg': bdist_egg_command, 'sdist': sdist_command }, classifiers=[ 'Development Status :: 4 - Beta', 'License :: OSI Approved :: BSD License', 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7' ])
python
<filename>bridgenode/processblock.go package bridgenode import ( "fmt" "github.com/btcsuite/btcd/wire" "github.com/mit-dci/utreexo/btcacc" uwire "github.com/mit-dci/utreexo/wire" "github.com/mit-dci/utreexo/accumulator" "github.com/mit-dci/utreexo/util" ) /* Here's what it *did*: (can delete after this is old) genproof: Get a block at current height Look through txins get utxo identifier (outpoint) and current block height write outpoint: deathheight to db (current height is deathheight) serve: Get a block at current height look through all the outputs and calculate outpoint lookup outpoints in DB and get deathheight subtract deathheight from current height, get duration for the new utxo That's bad! Because you're doing lots o fDB lookups when serving which is slow, and you're keepting a big DB of every txo ever. -------------------------------------------------- Here's what it *does* now: genproof: Get a block at current height: look through txouts, put those in DB. Also put their place in the block db key: outpoint db value: txoinblock index (4 bytes) also look through txins. for each of them, look them up in the db, getting the birthheight and which txo it is within that block. lookup the block offset where the txo was created, seek to that block, then seek the the 4 byte location where its duration is stored (starts as unknown / 0 / -1 whatever) and overwrite it. Also delete the db entry for the txin. And yeah this is a utxo db so if we put more data here, then we don't need the rev files... and if the rev files told which txout in the block it was... we wouldn't need a db at all. serve: Get a block at current height all the ttl values are right there in the block, nothing to do That's better, do more work in genproofs since that only happens once and serving can happen lots of times. */ /* general ttl flow here: block n rev read from disk. Sent to block processing, which turns it into a ttlRawBlock. That gets sent to the DB worker, which does db io, and turns the ttlRawBlock into a TtlResultBlock. The TtlResultBlock then gets sent to the flatfile worker which writes the ttl data to the right places within the flat file. (the flat file worker is also getting proof data from the other processing which has the accumulator, and it should only write ttl result blocks after it has already processed the proof block. Hopefully there are no timing / concurrency conflicts due to these things happening on different threads. I think as long as the flat file worker holds off on any ttl blocks that come in too soon it should be OK; the db worker and everything else is going sequentially and has buffers */ // the data from a block about txo creation and deletion for TTL calculation // this will be sent to the DB type ttlRawBlock struct { blockHeight int32 // height of this block in the chain newTxos [][36]byte // serialized outpoint for every output spentTxos [][36]byte // serialized outpoint for every input spentStartHeights []int32 // tied 1:1 to spentTxos } // a TTLResult is the TTL data we learn once a txo is spent & it's lifetime // can be written to its creation ublock // When writing to the flat file, you want to seek to StartHeight, skip to // the IndexWithinBlock'th entry, and write Duration (height- txBlockHeight) // all the ttl result data from a block, after checking with the DB // to be written to the flat file type ttlResultBlock struct { Height int32 // height of the block that consumed all the utxos Created []txoStart // slice of txo creation info } type txoStart struct { createHeight int32 // what block created the txo indexWithinBlock uint32 // index in that block where the txo is created } // blockToAddDel turns a block into add leaves and del leaves func blockToAddDel(bnr BlockAndRev) ( blockAdds []accumulator.Leaf, delLeaves []btcacc.LeafData, err error) { inCount, outCount, inskip, outskip := util.DedupeBlock(bnr.Blk) delLeaves, err = blockNRevToDelLeaves(bnr, inskip, inCount) if err != nil { return } // this is bridgenode, so don't need to deal with memorable leaves blockAdds = uwire.BlockToAddLeaves(bnr.Blk, nil, outskip, bnr.Height, outCount) return } // blockNRevToDelLeaves turns a block's inputs into delLeaves to be removed from the // accumulator func blockNRevToDelLeaves(bnr BlockAndRev, skiplist []uint32, inCount int) ( delLeaves []btcacc.LeafData, err error) { delLeaves = make([]btcacc.LeafData, 0, inCount-len(skiplist)) // make sure same number of txs and rev txs (minus coinbase) if len(bnr.Blk.Transactions())-1 != len(bnr.Rev.Txs) { err = fmt.Errorf("genDels block %d %d txs but %d rev txs", bnr.Height, len(bnr.Blk.Transactions()), len(bnr.Rev.Txs)) return } var blockInIdx uint32 for txinblock, tx := range bnr.Blk.Transactions() { if txinblock == 0 { blockInIdx++ // coinbase tx always has 1 input continue } txinblock-- // make sure there's the same number of txins if len(tx.MsgTx().TxIn) != len(bnr.Rev.Txs[txinblock].TxIn) { err = fmt.Errorf("genDels block %d tx %d has %d inputs but %d rev entries", bnr.Height, txinblock+1, len(tx.MsgTx().TxIn), len(bnr.Rev.Txs[txinblock].TxIn)) return } // loop through inputs for i, txin := range tx.MsgTx().TxIn { // check if on skiplist. If so, don't make leaf if len(skiplist) > 0 && skiplist[0] == blockInIdx { // fmt.Printf("skip %s\n", txin.PreviousOutPoint.String()) skiplist = skiplist[1:] blockInIdx++ continue } // build leaf var l btcacc.LeafData l.TxHash = btcacc.Hash(txin.PreviousOutPoint.Hash) l.Index = txin.PreviousOutPoint.Index l.Height = bnr.Rev.Txs[txinblock].TxIn[i].Height l.Coinbase = bnr.Rev.Txs[txinblock].TxIn[i].Coinbase // TODO get blockhash from headers here -- empty for now // l.BlockHash = getBlockHashByHeight(l.CbHeight >> 1) l.Amt = bnr.Rev.Txs[txinblock].TxIn[i].Amount l.PkScript = bnr.Rev.Txs[txinblock].TxIn[i].PKScript delLeaves = append(delLeaves, l) blockInIdx++ } } return } // ParseBlockForDB gets a block and creates a ttlRawBlock to send to the DB worker func ParseBlockForDB( bnr BlockAndRev) ttlRawBlock { var trb ttlRawBlock trb.blockHeight = bnr.Height var txoInBlock, txinInBlock uint32 // if len(inskip) != 0 || len(outskip) != 0 { // fmt.Printf("h %d inskip %v outskip %v\n", bnr.Height, inskip, outskip) // } transactions := bnr.Blk.Transactions() _, _, inskip, outskip := util.DedupeBlock(bnr.Blk) // iterate through the transactions in a block for txInBlock, tx := range transactions { txid := tx.Hash() // for all the txouts, get their outpoint & index and throw that into // a db batch for txoInTx, txo := range tx.MsgTx().TxOut { if len(outskip) > 0 && txoInBlock == outskip[0] { // skip inputs in the txin skiplist // fmt.Printf("skipping output %s:%d\n", txid.String(), txoInTx) outskip = outskip[1:] txoInBlock++ continue } if util.IsUnspendable(txo) { txoInBlock++ continue } trb.newTxos = append(trb.newTxos, util.OutpointToBytes(wire.NewOutPoint(txid, uint32(txoInTx)))) txoInBlock++ } // for all the txins, throw that into the work as well; just a bunch of // outpoints for txinInTx, in := range tx.MsgTx().TxIn { // bit of a tounge twister if txInBlock == 0 { txinInBlock += uint32(len(tx.MsgTx().TxIn)) break // skip coinbase input } if len(inskip) > 0 && txinInBlock == inskip[0] { // skip inputs in the txin skiplist // fmt.Printf("skipping input %s\n", in.PreviousOutPoint.String()) inskip = inskip[1:] txinInBlock++ continue } // append outpoint to slice trb.spentTxos = append(trb.spentTxos, util.OutpointToBytes(&in.PreviousOutPoint)) // append start height to slice (get from rev data) trb.spentStartHeights = append(trb.spentStartHeights, bnr.Rev.Txs[txInBlock-1].TxIn[txinInTx].Height) txinInBlock++ } } return trb }
go
{"bookHeader":"","bookName":"SALMOS 17","bookContent":[{"id":0,"tipo":"calling","texto":"Súplica pela proteção divina"},{"id":0,"tipo":"sub-calling","texto":"Oração de Davi"},{"id":1,"tipo":"versiculo","texto":"Ouve, SENHOR, a causa justa, atende ao meu clamor, dá ouvidos à minha oração, que procede de lábios não fraudulentos."},{"id":2,"tipo":"versiculo","texto":"Baixe de tua presença o julgamento a meu respeito; os teus olhos vêem com eqüidade."},{"id":3,"tipo":"versiculo","texto":"Sondas-me o coração, de noite me visitas, provas-me no fogo e iniqüidade nenhuma encontras em mim; a minha boca não transgride."},{"id":4,"tipo":"versiculo","texto":"Quanto às ações dos homens, pela palavra dos teus lábios, eu me tenho guardado dos caminhos do violento."},{"id":5,"tipo":"versiculo","texto":"Os meus passos se afizeram às tuas veredas, os meus pés não resvalaram."},{"id":6,"tipo":"versiculo","texto":"Eu te invoco, ó Deus, pois tu me respondes; inclina-me os ouvidos e acode às minhas palavras."},{"id":7,"tipo":"versiculo","texto":"Mostra as maravilhas da tua bondade, ó Salvador dos que à tua destra buscam refúgio dos que se levantam contra eles."},{"id":8,"tipo":"versiculo","texto":"Guarda-me como a menina dos olhos, esconde-me à sombra das tuas asas,"},{"id":9,"tipo":"versiculo","texto":"dos perversos que me oprimem, inimigos que me assediam de morte."},{"id":10,"tipo":"versiculo","texto":"Insensíveis, cerram o coração, falam com lábios insolentes;"},{"id":11,"tipo":"versiculo","texto":"andam agora cercando os nossos passos e fixam em nós os olhos para nos deitar por terra."},{"id":12,"tipo":"versiculo","texto":"Parecem-se com o leão, ávido por sua presa, ou o leãozinho, que espreita de emboscada."},{"id":13,"tipo":"versiculo","texto":"Levanta-te, SENHOR, defronta-os, arrasa-os; livra do ímpio a minha alma com a tua espada,"},{"id":14,"tipo":"versiculo","texto":"com a tua mão, SENHOR, dos homens mundanos, cujo quinhão é desta vida e cujo ventre tu enches dos teus tesouros; os quais se fartam de filhos e o que lhes sobra deixam aos seus pequeninos."},{"id":15,"tipo":"versiculo","texto":"Eu, porém, na justiça contemplarei a tua face; quando acordar, eu me satisfarei com a tua semelhança."}]}
json
# bank-app-hakan
markdown
// Variables // ========= // Colors // ------ $color__white: #fff; $color__black: #3f3d34; $color__gray: #7f7c6b; $color__gray--dark: #4a473c; $color__gray--light: #f2f2f2; $color__yellow: #f9b94e; $color__orange: #f9774e; $color__beige: #ddd8c8; // Font sizes // ------- $font-size: 14; $font-size--alpha: 1.95; $font-size--beta: 1.5; @mixin font-size($size){ font-size: #{$size * $font-size}px; font-size: #{$size}rem; line-height: 1em; margin: 0 0 #{$size * $font-size / 2}px; margin: 0 0 #{$size / 2}rem; } // Widths // ------ $width--main: 75em; $width--player: 33em; $width--playlist: $width--main - $width--player; // Spacing // ------- $spacing: 2rem; $spacing--large: 3rem; $spacing--small: 1rem; // Base // ==== *, *:before, *:after { box-sizing: border-box; } html { background-color: $color__orange; background-image: linear-gradient( 135deg, $color__yellow 0%, $color__orange 100% ); font-size: #{$font-size}px; font-family: Nunito, arial, sans-serif; font-weight: 400; min-height: 100%; } .app { color: $color__black; box-shadow: 0 0 $spacing--small rgba($color__black, .6); display: flex; flex-wrap: wrap; margin: 0 auto; max-width: $width--main; padding: 0; width: 100%; @media (min-width: $width--playlist) { margin: $spacing--small auto; } @media (min-width: $width--main) { margin: $spacing auto; } } // Generic // ------- a { color: $color__orange; text-decoration: none; transition: color .4s; &:hover, &:focus { color: lighten($color__orange, 10%); } } img { height: auto; max-width: 100%; } // Components // ========== // Slider // ------ $slider-height: 8px; $slider__thumb-height: 20px; $slider__thumb-width: 6px; .slider { line-height: 1em; overflow: hidden; padding: ($slider__thumb-height - $slider-height) / 2 0; [type=range] { appearance: none; background: $color__gray--light; height: $slider-height; position: relative; width: 100%; &:focus { outline: none; } &::-webkit-slider-thumb { appearance: none; background-color: $color__black; border-radius: 99px; cursor: pointer; height: $slider__thumb-height; position: relative; transition: transform .2s; width: $slider__thumb-width; &:focus, &:active { transform: scale(1.3); } &:after { background: $color__orange; bottom: 0; content: ''; display: block; height: $slider-height; margin-top: 0 - ($slider-height / 2); pointer-events: none; position: absolute; right: $slider__thumb-width; top: 50%; width: 999px; } } } &--volume { [type=range] { &::-webkit-slider-thumb { background-color: $color__white; border: 3px solid $color__orange; width: $slider__thumb-height; &:after { right: $slider__thumb-height - 6; } } } } } // Icon // ---- .icon { fill: currentcolor; height: 100%; width: 100%; &--inline { display: inline-block; height: 1em; width: 1em; } } // Control // ------- .control { cursor: pointer; margin: 0; padding: $spacing--small; transition: opacity .4s, color .4s; &:hover, &:focus { opacity: .8; } &:active { color: $color__orange; transition: none; } &--small { transform: scale(.4); } &--dimmed { opacity: .6; } &--outlined { border: 2px solid $color__gray--light; border-radius: 100%; } &--active { color: $color__orange; } } // UI // ==== // Player // ------ .player { background: $color__white; text-align: center; width: 100%; @media (min-width: $width--player) { width: percentage($width--player / $width--main); } &__title { @include font-size($font-size--alpha); } &__sub-title { @include font-size($font-size--beta); color: $color__gray; font-weight: 400; } &__cover { display: block; width: 100%; } &__timer { background: $color__beige; display: flex; justify-content: space-between; padding: $spacing--small; } &__progress-bar { margin-top: 0 - $spacing--small; } &__controls { display: flex; list-style: none; padding: $spacing--small $spacing; } &__volume { display: flex; padding: $spacing; &__icon { width: $spacing; height: $spacing; margin-right: $spacing--small; } &__slider { width: 100%; } } } // Playlist // -------- .playlist { background: $color__gray--dark; color: $color__gray--light; width: 100%; @media (min-width: $width--player) { width: percentage($width--playlist / $width--main); } &__header { background: $color__black; padding: $spacing--large; } &__title { @include font-size($font-size--alpha); margin-top: 0; } &__info { } &__list { list-style: none; margin: 0; padding: 0 $spacing--large; } &__track { border-bottom: 1px solid $color__black; cursor: pointer; display: flex; justify-content: space-between; margin: 0; padding: $spacing 0; &--active { color: $color__orange; } &__cover { height: $spacing--large; width: $spacing--large; } &__info { margin: 0 $spacing; width: 100%; } &__title { @include font-size($font-size--beta); } } } // Overrides // ========= .hide.hide { display: none; }
css
Covered with the veil of spellbinding beauty, An enthralling enchantress occupied my heart. A winning smile and a pair of bewitching eyes was all I needed, To have my empty heart snatched away. Making me dream about her juvenile activities, She intensified my fascination with salmon-pink lips. Her face glittered with an angelic dazzle, As if the moon was her bosom companion. And sometimes the impish eyes spied me, To pull jokes on me with a witless smirk. Thump! Thump! There went our hearts racing one day, Flickering sparks flew as our vibrant eyes met. We being bright-eyed and bushy-tailed folk, Expressed our zestful confession towards each other. And with a gratifying kiss started our passionate story of love, A profound love of two genuine souls.
english
Pak army chief warns JUI-F chief against Azadi march IANS Islamabad Last Updated : 25 Oct 2019 06:52:54 AM IST Pakistan Army Chief General Qamar Javed Bajwa (file photo) Pakistan Army Chief General Qamar Javed Bajwa called on Jamiat Ulema-e-Islam-Fazl (JUI-F) chief Maulana Fazlur Rehman and reportedly warned him not to go for the Azadi march to Islamabad on October 31, Pakistani media reported on Thursday. According to Geo TV, the army chief held a meeting with Rehman in which he categorically told the JUI-F chief that he stood by the constitution and democracy. "We have been doing what the constitution asks for," the army chief reportedly said, according to Geo TV. The TV channel claimed that General Bajwa reminded Rehman that he was a responsible political leader and must be aware of the current situation. "The situation on the border with India is volatile due to the Kashmir crisis and Afghanistan's situation is also a source of trouble," Gen Bajwa was quoted as saying to the Geo TV anchor. Bajwa is reported to have also referred to the Iran-Saudi Arabia conflict and told the JUI-F chief that it was not an appropriate time for staging the protest since the economy had been brought on the right track. Bajwa made it clear that the army wouldn't permit destabilisation at this moment. "Imran Khan is a constitutional Prime Minister and neither I nor you can minus him," Bajwa was quoted by the TV channel. The JUI-F chief has threatened to block the Pakistan capital with his protest against the "illegitimate" government of Pakistan Tehreek-e-Insaf (PTI). His Azadi March, which is expected to have hundreds of thousands of participants, mainly religious hardliners from the JUI-F, is expected to enter Islamabad on October 31.
english
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2017, <NAME> * * Project Info: http://plantuml.com * * This file is part of PlantUML. * * Licensed under The MIT License (Massachusetts Institute of Technology License) * * See http://opensource.org/licenses/MIT * * 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. * * * Original Author: <NAME> */ package net.sourceforge.plantuml.ugraphic.hand; import java.awt.geom.Point2D; import net.sourceforge.plantuml.ugraphic.UPath; import net.sourceforge.plantuml.ugraphic.USegment; import net.sourceforge.plantuml.ugraphic.USegmentType; public class UPathHand { private final UPath path; private final double defaultVariation = 4.0; public UPathHand(UPath source) { final UPath jigglePath = new UPath(); Point2D last = new Point2D.Double(); for (USegment segment : source) { final USegmentType type = segment.getSegmentType(); if (type == USegmentType.SEG_MOVETO) { final double x = segment.getCoord()[0]; final double y = segment.getCoord()[1]; jigglePath.moveTo(x, y); last = new Point2D.Double(x, y); } else if (type == USegmentType.SEG_LINETO) { final double x = segment.getCoord()[0]; final double y = segment.getCoord()[1]; final HandJiggle jiggle = new HandJiggle(last.getX(), last.getY(), defaultVariation); jiggle.lineTo(x, y); for (USegment seg2 : jiggle.toUPath()) { if (seg2.getSegmentType() == USegmentType.SEG_LINETO) { jigglePath.lineTo(seg2.getCoord()[0], seg2.getCoord()[1]); } } last = new Point2D.Double(x, y); } else { this.path = source; return; } } this.path = jigglePath; } public UPath getHanddrawn() { return this.path; } }
java
{ "name": "http-observe", "version": "0.0.0", "description": "porting the RESTful observe pattern from CoAP to HTTP", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, "repository": { "type": "git", "url": "git://github.com/h0ru5/http-observe.git" }, "keywords": [ "observe", "REST", "websocket" ], "author": "<NAME>", "license": "MIT", "bugs": { "url": "https://github.com/h0ru5/http-observe/issues" }, "dependencies": { "ws": "~0.4.31" } }
json
1.3 [2020-03-31] ================ * option to add default values during validation * add thread-safe API * build static library by default (jsoncpp only builds static library by default) 1.2 [2019-04-09] ================ * add this NEWS.md file * build shared library by default (needs jsoncpp shared library) * fix pkgconfig file 1.1 [2019-04-08] ================ * The include path for the header was changed to have a json/ prefix, just like jsoncpp has. 1.0 [2018-12-23] ================ * first public release
markdown
package com.fiap.placeforpet.entity; import com.fiap.placeforpet.dto.PetDto; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import org.hibernate.annotations.OnDelete; import org.hibernate.annotations.OnDeleteAction; import javax.persistence.*; import java.util.List; @Getter @Setter @NoArgsConstructor @AllArgsConstructor @Entity public class Pet { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String nomePet; private String raca; @ManyToOne(cascade = CascadeType.REFRESH) @OnDelete(action = OnDeleteAction.CASCADE) @JoinColumn(name = "ID_CLIENTE") private Cliente cliente; }
java
<reponame>anildoferreira/CursoPython-PyCharm from random import randint from time import sleep comp = randint(0, 5) # Faz o computador escolher o número print('>$<' * 17) print('Vou pensar em um número de (0 à 5), tente advinhar!') print('>$<' * 17) jogador = int(input('Digite aqui seu número da sorte: ')) # Jogador tenta adivinhar print('PROCESSANDO...') sleep(2) if jogador == comp: print('Você ganhouuuu!') else: print('Eu pensei no {}'.format(comp),'tente novamente!')
python
What is a digital whiteboard? Everything you need to know about digital whiteboards. Karl Sun is the co-founder and CEO of Lucid, the leading visual collaboration suite that helps teams see and build the future with products including Lucidchart and Lucidspark. Karl previously worked at Google, heading the patent department and strategy and opening business development at Google’s China office.
english
Craig Tiley, the CEO of Tennis Australia, spoke to 9News Melbourne on Sunday about Novak Djokovic's Australian Open participation. Tiley said the next few days would provide a "clearer picture" as to whether the World No. 1 will indeed defend his crown at Melbourne Park. The nine-time Australian Open champion was recently spotted practicing on the hardcourts of Marbella, which has further piqued the tennis world's interest as to whether the Serb will be playing at the Happy Slam this year. Djokovic, who has refused to reveal his vaccination status, will have to apply for a medical exemption if he is unable to abide by health protocols in Melbourne. Against that background, a panel on 9News Melbourne recently invited Australian Open boss Craig Tiley to shed light on new developments relating to the 20-time Major winner. Panel host Braden Ingram began by reiterating that Djokovic had been spotted training in Spain with the official balls used for the Australian Open. The host then inquired as to when the Serb is expected to fly to Australia, to which Tiley gave a non-committal answer. The CEO of Tennis Australia insisted that many players are yet to arrive Down Under for the Australian Open, before adding that Djokovic will probably make the trip just before the deadline. "We still got a few chartered flights coming in this week, up until the end of this week. And then all the players will be here. The status in relation to Novak, I think we will have a much clearer picture in the coming days," Tiley said. "Because otherwise it will get pretty late to show up and be able to play the Australian Open. " It is safe to assume that Novak Djokovic is in a race against time to defend his 2021 Australian Open crown. Djokovic's arch rival Rafael Nadal, who is also bidding for a record-breaking 21st Major, arrived in Melbourne a few days ago after recovering from COVID-19. If Djokovic ends up forgoing his 2022 Australian Open participation, it will be the first time since 1982 that a male World No. 1 has missed the first Grand Slam of the year. Roland Garros, which used to be the first Slam of the year in the early 80s, was conducted without World No. 1 John McEnroe and Bjorn Borg in 1982.
english
<filename>piggy-core/server/src/constant/Types.ts /** * @file Types * @description 接口定义 * @author DoooReyn <<EMAIL>> * @license MIT * @identifier * ``` * ╥━━━┳━━━━━━━━━╭━━╮━━━┳━━━╥ * ╢━D━┣ ╭╮╭━━━━━┫┃▋▋━▅ ┣━R━╢ * ╢━O━┣ ┃╰┫┈┈┈┈┈┃┃┈┈╰┫ ┣━E━╢ * ╢━O━┣ ╰━┫┈┈┈┈┈╰╯╰┳━╯ ┣━Y━╢ * ╢━O━┣ ┊┊┃┏┳┳━━┓┏┳┫┊┊ ┣━N━╢ * ╨━━━┻━━━┗┛┗┛━━┗┛┗┛━━━┻━━━╨ * ``` */ /** * Websocket wss 消息体 */ export interface I_Wss_Message_Body { [key: string]: any; online: number; } export type T_Wss_Message = [string, I_Wss_Message_Body];
typescript
<filename>tests/36_nested_blockquote.json<gh_stars>10-100 ["body", ["blockquote", ["p", "This is a blockquote paragraph"], ["blockquote", ["p", "This is a nested blockquote"]]], ["p", "This is top level."]]
json
{ "name": "NaturaliSDK", "version": "0.0.1.17", "summary": "NaturaliSDK", "description": "NaturaliSDK is sdk for naturali features about dhl and asr", "homepage": "https://www.naturali.io", "source": { "git": "https://github.com/duihualiu/naturali_sdk_source.git", "tag": "0.0.1.17" }, "license": { "type": "MIT", "text": " \tCopyright 2018\n \t\t\tPermission is granted to Naturali\n" }, "authors": { "fy": "<EMAIL>" }, "platforms": { "ios": "8.0" }, "source_files": "NaturaliSDK/include/*.h", "vendored_libraries": "NaturaliSDK/libNaturaliSDK.a", "requires_arc": true, "libraries": "c++", "xcconfig": { "CLANG_CXX_LANGUAGE_STANDARD": "c++11", "CLANG_CXX_LIBRARY": "libc++" }, "frameworks": "AudioToolbox", "dependencies": { "Protobuf": [ ], "FMDB": [ ] } }
json
'use strict' const { Time, TimeRepository } = require('../../domain/times') const MongooseTime = require('../orm/mongoose/schemas/Time') module.exports = class extends TimeRepository { _getTimeAttributes(mongooseTime) { const { id, user_id, project_id, started_at, ended_at } = mongooseTime || {} return { id, user_id, project_id, started_at, ended_at } } async persist(userEntity) { const { user_id, project_id, started_at, ended_at } = userEntity const mongooseTime = new MongooseTime({ user_id, project_id, started_at, ended_at }) await mongooseTime.save() return new Time(mongooseTime.id, mongooseTime.user_id, mongooseTime.project_id, mongooseTime.started_at, mongooseTime.ended_at) } async merge(id, user_id, project_id, started_at, ended_at) { const mongooseTime = await MongooseTime.findByIdAndUpdate(id, { user_id, project_id, started_at, ended_at }, { new: true }) return new Time(mongooseTime.id, mongooseTime.user_id, mongooseTime.project_id, mongooseTime.started_at, mongooseTime.ended_at) } async remove(id) { return MongooseTime.findOneAndDelete(id) } async get(id) { const mongooseTime = await MongooseTime.findById(id) const attributes = this._getTimeAttributes(mongooseTime) return new Time(attributes.id, attributes.user_id, attributes.project_id, attributes.started_at, attributes.ended_at) } async getByProjectId(project_id) { const mongooseTimes = await MongooseTime.find({ project_id }) const result = { "time": [] } result.time = mongooseTimes.map((time) => { const attributes = this._getTimeAttributes(time) return new Time(attributes.id, attributes.user_id, attributes.project_id, attributes.started_at, attributes.ended_at) }) return result } async find() { const mongooseTimes = await MongooseTime.find() return mongooseTimes.map((mongooseTime) => { return new Time(mongooseTime.id, mongooseTime.user_id, mongooseTime.project_id, mongooseTime.started_at, mongooseTime.ended_at) }) } }
javascript
<reponame>piotrrussw/snake-multiplayer<gh_stars>0 const sketch = (p: p5) => { let socket: any; const gameScale = 20; let player: Player; let opponents: any = {}; let food: Food; p.preload = () => { }; p.setup = () => { const canvas = p.createCanvas(800, 500); // canvas.parent('sketch'); p.frameRate(10); // @ts-ignore socket = io(); // socket = io(`http://localhost:${process.env.PORT || 3000}`); player = new Player(gameScale); food = new Food(gameScale); socket.on('message', (data: any, foodData: any, highScore: number) => { console.log(data, foodData); Object.keys(data).forEach((id: string) => { if (Object.keys(data[id]).length) { opponents[id] = new Snake(gameScale); opponents[id].update(data[id]); } else { opponents[id] = new Snake(gameScale); } }); if (!Object.keys(opponents).length) { food.setup(p); socket.emit('food', food.getData()); } else { food.update(p, foodData); } player.setScore(highScore); player.mountHighScore(); }); socket.on('disconnect', (id: string) => { opponents.hasOwnProperty(id) ? delete opponents[id] : null; }); socket.on('newConnection', (id: string) => { opponents[id] = new Snake(gameScale); }); socket.on('move', (data: any, id: string) => { console.log('on move', data); opponents[id].update(data); }); socket.on('food', (data: any) => { return food.update(p, data); }); socket.on('highScore', (score: number) => { player.setScore(score); }); }; p.windowResized = () => { p.resizeCanvas(800, 500); }; p.draw = () => { p.background('#fff'); player.setup(p); player.draw(p); Object.keys(opponents).forEach((id: string) => { // noinspection TypeScriptValidateJSTypes opponents[id].setup(p); // noinspection TypeScriptValidateJSTypes opponents[id].draw(p); }); food.draw(p); if (player.eat(food, p)) { food.setup(p); food.draw(p); socket.emit('highScore', player.getScore()); socket.emit('food', food.getData()); } socket.emit('move', player.getData()); }; p.keyPressed = () => { player.move(p.keyCode); }; }; // noinspection JSPotentiallyInvalidConstructorUsage new p5(sketch);
typescript
<gh_stars>1-10 package com.google.android.gms.internal.ads; import android.os.IBinder; import android.os.IInterface; public abstract class zzzl extends zzfn implements zzzk { public zzzl() { super("com.google.android.gms.ads.internal.client.IAdManager"); } /* renamed from: a */ public static zzzk m31603a(IBinder iBinder) { if (iBinder == null) { return null; } IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.ads.internal.client.IAdManager"); if (queryLocalInterface instanceof zzzk) { return (zzzk) queryLocalInterface; } return new zzzm(iBinder); } /* JADX WARNING: type inference failed for: r4v1 */ /* JADX WARNING: type inference failed for: r4v2, types: [com.google.android.gms.internal.ads.zzyz] */ /* JADX WARNING: type inference failed for: r4v4, types: [com.google.android.gms.internal.ads.zzzb] */ /* JADX WARNING: type inference failed for: r4v6, types: [com.google.android.gms.internal.ads.zzyz] */ /* JADX WARNING: type inference failed for: r4v7, types: [com.google.android.gms.internal.ads.zzzs] */ /* JADX WARNING: type inference failed for: r4v9, types: [com.google.android.gms.internal.ads.zzzu] */ /* JADX WARNING: type inference failed for: r4v11, types: [com.google.android.gms.internal.ads.zzzs] */ /* JADX WARNING: type inference failed for: r4v12, types: [com.google.android.gms.internal.ads.zzyw] */ /* JADX WARNING: type inference failed for: r4v14, types: [com.google.android.gms.internal.ads.zzyy] */ /* JADX WARNING: type inference failed for: r4v16, types: [com.google.android.gms.internal.ads.zzyw] */ /* JADX WARNING: type inference failed for: r4v17, types: [com.google.android.gms.internal.ads.zzzy] */ /* JADX WARNING: type inference failed for: r4v19, types: [com.google.android.gms.internal.ads.zzaaa] */ /* JADX WARNING: type inference failed for: r4v21, types: [com.google.android.gms.internal.ads.zzzy] */ /* JADX WARNING: type inference failed for: r4v22, types: [com.google.android.gms.internal.ads.zzzp] */ /* JADX WARNING: type inference failed for: r4v24, types: [com.google.android.gms.internal.ads.zzzr] */ /* JADX WARNING: type inference failed for: r4v26, types: [com.google.android.gms.internal.ads.zzzp] */ /* JADX WARNING: type inference failed for: r4v27 */ /* JADX WARNING: type inference failed for: r4v28 */ /* JADX WARNING: type inference failed for: r4v29 */ /* JADX WARNING: type inference failed for: r4v30 */ /* JADX WARNING: type inference failed for: r4v31 */ /* JADX WARNING: type inference failed for: r4v32 */ /* JADX WARNING: type inference failed for: r4v33 */ /* JADX WARNING: type inference failed for: r4v34 */ /* JADX WARNING: type inference failed for: r4v35 */ /* JADX WARNING: type inference failed for: r4v36 */ /* access modifiers changed from: protected */ /* JADX WARNING: Multi-variable type inference failed. Error: jadx.core.utils.exceptions.JadxRuntimeException: No candidate types for var: r4v1 assigns: [?[int, float, boolean, short, byte, char, OBJECT, ARRAY], com.google.android.gms.internal.ads.zzzu, com.google.android.gms.internal.ads.zzzb, com.google.android.gms.internal.ads.zzyz, com.google.android.gms.internal.ads.zzzs, com.google.android.gms.internal.ads.zzyy, com.google.android.gms.internal.ads.zzyw, com.google.android.gms.internal.ads.zzaaa, com.google.android.gms.internal.ads.zzzy, com.google.android.gms.internal.ads.zzzr, com.google.android.gms.internal.ads.zzzp] uses: [com.google.android.gms.internal.ads.zzyz, com.google.android.gms.internal.ads.zzzs, com.google.android.gms.internal.ads.zzyw, com.google.android.gms.internal.ads.zzzy, com.google.android.gms.internal.ads.zzzp] mth insns count: 164 at jadx.core.dex.visitors.typeinference.TypeSearch.fillTypeCandidates(TypeSearch.java:237) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.typeinference.TypeSearch.run(TypeSearch.java:53) at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.runMultiVariableSearch(TypeInferenceVisitor.java:99) at jadx.core.dex.visitors.typeinference.TypeInferenceVisitor.visit(TypeInferenceVisitor.java:92) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:27) at jadx.core.dex.visitors.DepthTraversal.lambda$visit$1(DepthTraversal.java:14) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:14) at jadx.core.ProcessClass.process(ProcessClass.java:30) at jadx.core.ProcessClass.lambda$processDependencies$0(ProcessClass.java:49) at java.base/java.util.ArrayList.forEach(ArrayList.java:1540) at jadx.core.ProcessClass.processDependencies(ProcessClass.java:49) at jadx.core.ProcessClass.process(ProcessClass.java:35) at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:311) at jadx.api.JavaClass.decompile(JavaClass.java:62) at jadx.api.JadxDecompiler.lambda$appendSourcesSave$0(JadxDecompiler.java:217) */ /* JADX WARNING: Unknown variable types count: 11 */ /* renamed from: a */ /* Code decompiled incorrectly, please refer to instructions dump. */ public final boolean mo29357a(int r1, android.os.Parcel r2, android.os.Parcel r3, int r4) throws android.os.RemoteException { /* r0 = this; r4 = 0 switch(r1) { case 1: goto L_0x020e; case 2: goto L_0x0207; case 3: goto L_0x01fc; case 4: goto L_0x01e9; case 5: goto L_0x01e2; case 6: goto L_0x01db; case 7: goto L_0x01b9; case 8: goto L_0x0197; case 9: goto L_0x018f; case 10: goto L_0x0187; case 11: goto L_0x017f; case 12: goto L_0x0173; case 13: goto L_0x0163; case 14: goto L_0x0153; case 15: goto L_0x013f; case 16: goto L_0x0004; case 17: goto L_0x0004; case 18: goto L_0x0133; case 19: goto L_0x0123; case 20: goto L_0x0100; case 21: goto L_0x00dd; case 22: goto L_0x00d1; case 23: goto L_0x00c5; case 24: goto L_0x00b5; case 25: goto L_0x00a9; case 26: goto L_0x009d; case 27: goto L_0x0004; case 28: goto L_0x0004; case 29: goto L_0x008d; case 30: goto L_0x007d; case 31: goto L_0x0071; case 32: goto L_0x0065; case 33: goto L_0x0059; case 34: goto L_0x004d; case 35: goto L_0x0041; case 36: goto L_0x001e; case 37: goto L_0x0012; case 38: goto L_0x0006; default: goto L_0x0004; } L_0x0004: r1 = 0 return r1 L_0x0006: java.lang.String r1 = r2.readString() r0.mo29525e(r1) r3.writeNoException() goto L_0x0219 L_0x0012: android.os.Bundle r1 = r0.getAdMetadata() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30226b(r3, r1) goto L_0x0219 L_0x001e: android.os.IBinder r1 = r2.readStrongBinder() if (r1 != 0) goto L_0x0025 goto L_0x0038 L_0x0025: java.lang.String r2 = "com.google.android.gms.ads.internal.client.IAdMetadataListener" android.os.IInterface r2 = r1.queryLocalInterface(r2) boolean r4 = r2 instanceof com.google.android.gms.internal.ads.zzzp if (r4 == 0) goto L_0x0033 r4 = r2 com.google.android.gms.internal.ads.zzzp r4 = (com.google.android.gms.internal.ads.zzzp) r4 goto L_0x0038 L_0x0033: com.google.android.gms.internal.ads.zzzr r4 = new com.google.android.gms.internal.ads.zzzr r4.<init>(r1) L_0x0038: r0.mo29518a(r4) r3.writeNoException() goto L_0x0219 L_0x0041: java.lang.String r1 = r0.mo29505L() r3.writeNoException() r3.writeString(r1) goto L_0x0219 L_0x004d: boolean r1 = com.google.android.gms.internal.ads.zzfo.m30224a(r2) r0.setImmersiveMode(r1) r3.writeNoException() goto L_0x0219 L_0x0059: com.google.android.gms.internal.ads.zzyz r1 = r0.mo29507Ya() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30221a(r3, r1) goto L_0x0219 L_0x0065: com.google.android.gms.internal.ads.zzzs r1 = r0.mo29506Ta() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30221a(r3, r1) goto L_0x0219 L_0x0071: java.lang.String r1 = r0.mo29522cb() r3.writeNoException() r3.writeString(r1) goto L_0x0219 L_0x007d: android.os.Parcelable$Creator<com.google.android.gms.internal.ads.zzaax> r1 = com.google.android.gms.internal.ads.zzaax.CREATOR android.os.Parcelable r1 = com.google.android.gms.internal.ads.zzfo.m30220a(r2, r1) com.google.android.gms.internal.ads.zzaax r1 = (com.google.android.gms.internal.ads.zzaax) r1 r0.mo29509a(r1) r3.writeNoException() goto L_0x0219 L_0x008d: android.os.Parcelable$Creator<com.google.android.gms.internal.ads.zzacd> r1 = com.google.android.gms.internal.ads.zzacd.CREATOR android.os.Parcelable r1 = com.google.android.gms.internal.ads.zzfo.m30220a(r2, r1) com.google.android.gms.internal.ads.zzacd r1 = (com.google.android.gms.internal.ads.zzacd) r1 r0.mo29510a(r1) r3.writeNoException() goto L_0x0219 L_0x009d: com.google.android.gms.internal.ads.zzaar r1 = r0.getVideoController() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30221a(r3, r1) goto L_0x0219 L_0x00a9: java.lang.String r1 = r2.readString() r0.setUserId(r1) r3.writeNoException() goto L_0x0219 L_0x00b5: android.os.IBinder r1 = r2.readStrongBinder() com.google.android.gms.internal.ads.zzatb r1 = com.google.android.gms.internal.ads.zzatc.m25776a(r1) r0.mo29514a(r1) r3.writeNoException() goto L_0x0219 L_0x00c5: boolean r1 = r0.mo29503I() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30223a(r3, r1) goto L_0x0219 L_0x00d1: boolean r1 = com.google.android.gms.internal.ads.zzfo.m30224a(r2) r0.mo29530m(r1) r3.writeNoException() goto L_0x0219 L_0x00dd: android.os.IBinder r1 = r2.readStrongBinder() if (r1 != 0) goto L_0x00e4 goto L_0x00f7 L_0x00e4: java.lang.String r2 = "com.google.android.gms.ads.internal.client.ICorrelationIdProvider" android.os.IInterface r2 = r1.queryLocalInterface(r2) boolean r4 = r2 instanceof com.google.android.gms.internal.ads.zzzy if (r4 == 0) goto L_0x00f2 r4 = r2 com.google.android.gms.internal.ads.zzzy r4 = (com.google.android.gms.internal.ads.zzzy) r4 goto L_0x00f7 L_0x00f2: com.google.android.gms.internal.ads.zzaaa r4 = new com.google.android.gms.internal.ads.zzaaa r4.<init>(r1) L_0x00f7: r0.mo29520a(r4) r3.writeNoException() goto L_0x0219 L_0x0100: android.os.IBinder r1 = r2.readStrongBinder() if (r1 != 0) goto L_0x0107 goto L_0x011a L_0x0107: java.lang.String r2 = "com.google.android.gms.ads.internal.client.IAdClickListener" android.os.IInterface r2 = r1.queryLocalInterface(r2) boolean r4 = r2 instanceof com.google.android.gms.internal.ads.zzyw if (r4 == 0) goto L_0x0115 r4 = r2 com.google.android.gms.internal.ads.zzyw r4 = (com.google.android.gms.internal.ads.zzyw) r4 goto L_0x011a L_0x0115: com.google.android.gms.internal.ads.zzyy r4 = new com.google.android.gms.internal.ads.zzyy r4.<init>(r1) L_0x011a: r0.mo29516a(r4) r3.writeNoException() goto L_0x0219 L_0x0123: android.os.IBinder r1 = r2.readStrongBinder() com.google.android.gms.internal.ads.zzado r1 = com.google.android.gms.internal.ads.zzadp.m24821a(r1) r0.mo29511a(r1) r3.writeNoException() goto L_0x0219 L_0x0133: java.lang.String r1 = r0.getMediationAdapterClassName() r3.writeNoException() r3.writeString(r1) goto L_0x0219 L_0x013f: android.os.IBinder r1 = r2.readStrongBinder() com.google.android.gms.internal.ads.zzaqt r1 = com.google.android.gms.internal.ads.zzaqu.m25682a(r1) java.lang.String r2 = r2.readString() r0.mo29513a(r1, r2) r3.writeNoException() goto L_0x0219 L_0x0153: android.os.IBinder r1 = r2.readStrongBinder() com.google.android.gms.internal.ads.zzaqn r1 = com.google.android.gms.internal.ads.zzaqo.m25681a(r1) r0.mo29512a(r1) r3.writeNoException() goto L_0x0219 L_0x0163: android.os.Parcelable$Creator<com.google.android.gms.internal.ads.zzyd> r1 = com.google.android.gms.internal.ads.zzyd.CREATOR android.os.Parcelable r1 = com.google.android.gms.internal.ads.zzfo.m30220a(r2, r1) com.google.android.gms.internal.ads.zzyd r1 = (com.google.android.gms.internal.ads.zzyd) r1 r0.mo29515a(r1) r3.writeNoException() goto L_0x0219 L_0x0173: com.google.android.gms.internal.ads.zzyd r1 = r0.mo29508Za() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30226b(r3, r1) goto L_0x0219 L_0x017f: r0.mo29523db() r3.writeNoException() goto L_0x0219 L_0x0187: r0.mo29504Ka() r3.writeNoException() goto L_0x0219 L_0x018f: r0.showInterstitial() r3.writeNoException() goto L_0x0219 L_0x0197: android.os.IBinder r1 = r2.readStrongBinder() if (r1 != 0) goto L_0x019e goto L_0x01b1 L_0x019e: java.lang.String r2 = "com.google.android.gms.ads.internal.client.IAppEventListener" android.os.IInterface r2 = r1.queryLocalInterface(r2) boolean r4 = r2 instanceof com.google.android.gms.internal.ads.zzzs if (r4 == 0) goto L_0x01ac r4 = r2 com.google.android.gms.internal.ads.zzzs r4 = (com.google.android.gms.internal.ads.zzzs) r4 goto L_0x01b1 L_0x01ac: com.google.android.gms.internal.ads.zzzu r4 = new com.google.android.gms.internal.ads.zzzu r4.<init>(r1) L_0x01b1: r0.mo29519a(r4) r3.writeNoException() goto L_0x0219 L_0x01b9: android.os.IBinder r1 = r2.readStrongBinder() if (r1 != 0) goto L_0x01c0 goto L_0x01d3 L_0x01c0: java.lang.String r2 = "com.google.android.gms.ads.internal.client.IAdListener" android.os.IInterface r2 = r1.queryLocalInterface(r2) boolean r4 = r2 instanceof com.google.android.gms.internal.ads.zzyz if (r4 == 0) goto L_0x01ce r4 = r2 com.google.android.gms.internal.ads.zzyz r4 = (com.google.android.gms.internal.ads.zzyz) r4 goto L_0x01d3 L_0x01ce: com.google.android.gms.internal.ads.zzzb r4 = new com.google.android.gms.internal.ads.zzzb r4.<init>(r1) L_0x01d3: r0.mo29517a(r4) r3.writeNoException() goto L_0x0219 L_0x01db: r0.resume() r3.writeNoException() goto L_0x0219 L_0x01e2: r0.pause() r3.writeNoException() goto L_0x0219 L_0x01e9: android.os.Parcelable$Creator<com.google.android.gms.internal.ads.zzxz> r1 = com.google.android.gms.internal.ads.zzxz.CREATOR android.os.Parcelable r1 = com.google.android.gms.internal.ads.zzfo.m30220a(r2, r1) com.google.android.gms.internal.ads.zzxz r1 = (com.google.android.gms.internal.ads.zzxz) r1 boolean r1 = r0.mo29521b(r1) r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30223a(r3, r1) goto L_0x0219 L_0x01fc: boolean r1 = r0.isReady() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30223a(r3, r1) goto L_0x0219 L_0x0207: r0.destroy() r3.writeNoException() goto L_0x0219 L_0x020e: com.google.android.gms.dynamic.IObjectWrapper r1 = r0.mo29502Aa() r3.writeNoException() com.google.android.gms.internal.ads.zzfo.m30221a(r3, r1) L_0x0219: r1 = 1 return r1 */ throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzzl.mo29357a(int, android.os.Parcel, android.os.Parcel, int):boolean"); } }
java
<gh_stars>0 --- title: Outlook.com không thể gửi email ms.author: lpyfer author: lpyfer manager: joallard ms.date: 04/21/2020 ms.audience: Admin ms.topic: article ROBOTS: NOINDEX, NOFOLLOW localization_priority: Normal ms.custom: - "9000251" - "1845" - "1841" ms.openlocfilehash: 5f6dbd98b899ff915a4706c5996c9d3c35be9773 ms.sourcegitcommit: 55eff703a17e500681d8fa6a87eb067019ade3cc ms.translationtype: MT ms.contentlocale: vi-VN ms.lasthandoff: 04/22/2020 ms.locfileid: "43710825" --- # <a name="unable-to-send-email-in-outlookcom"></a>Không thể gửi email trong Outlook.com Nếu bạn gặp sự cố khi gửi thư trong Outlook.com, hãy thử các giải pháp này. 1. Kiểm tra [trạng thái dịch vụ](https://go.microsoft.com/fwlink/p/?linkid=837482).  2. Kiểm tra xem [hoàn tác gửi](https://outlook.live.com/mail/options/mail/messageContent/undoSend) không bật. 3. Nếu hộp thư đến của bạn đầy, bạn sẽ không thể gửi hoặc nhận thư mới. Dọn sạch [email rác](https://outlook.live.com/mail/junkemail) của bạn bằng cách bấm chuột phải vào **email** > rác**xóa tất cả**. 4. Đảm bảo rằng địa chỉ email của những người bạn đang cố gắng gửi đến được định dạng đúng. 5. Nếu bạn có nhiều hơn 20 tài khoản được kết nối, bạn sẽ không thể gửi hoặc nhận thư. 6. Tài khoản của bạn có thể tạm thời bị chặn vì chúng tôi nhận thấy một số hoạt động đăng nhập bất thường. Xem [bỏ chặn tài khoản Outlook.com của tôi](https://support.office.com/article/f4ad2701-d166-4d8b-8a6a-9af2a1f8a4c4). Tìm hiểu thêm về cách [khắc phục sự cố đồng bộ hóa email Outlook.com](https://support.office.com/article/d39e3341-8d79-4bf1-b3c7-ded602233642).
markdown
<reponame>ramintagizade/FileTransfer package server import ( "fmt" "github.com/ramintagizade/FileTransfer/file" "github.com/ramintagizade/FileTransfer/utils" "net/http" "strings" ) var mapFile = make(map[string]string) func Handler(w http.ResponseWriter, r *http.Request) { FileName := mapFile[strings.Replace(r.URL.Path, "/", "", -1)] fi, err := file.GetFileInfo(FileName) if err != nil { fmt.Println(err) return } switch fi { case "file": file.ProcessFile(w, r, FileName) case "directory": file.ProcessDirectory(w, r, FileName) } file.RemoveZippedFile(file.ZipFileName) return } func Run(filepath string) { pkgLink := utils.RandomString(5) mapFile[pkgLink] = filepath ipAddress := GetAddress() port := "8000" downloadLink := "http://" + ipAddress + ":" + port + "/" + pkgLink fmt.Println("download link: ", downloadLink) http.HandleFunc("/"+pkgLink, Handler) http.ListenAndServe(":"+port, nil) }
go
Tom and you will Heather state it hope to be able to get a house next number of years. Bankruptcy is actually probably an effective flow to them. In case case of bankruptcy is really plenty, let’s more folks do it? Which had been the question economist Michelle White of your own School out-of California North park questioned. Previously she calculated you to definitely at the very least fifteen per cent away from properties would have gained away from declaring bankruptcy than the one percent that basically recorded. Ryssdal: I’m Kai Ryssdal. You might be playing an american RadioWorks and erica. To see Chris Farrell’s applying for grants case of bankruptcy and you can morals in the us, head to the Website at . Around you will see photos from this story and tell us if the bankruptcy proceeding has influenced everything. Which is from the . John Ninfo: You are sure that, quit the world pub you idiot. You simply cannot afford it. And do you need you to brand new vehicle? For what? My content, my personal content, just like the I see more and more people destroying the lifetime for no reason, to just take part in so it consumerism, is exactly what the new Moving Stones said. Anyone, you can’t always score what you would like. Big resource to own American RadioWorks arises from this company to own Personal Broadcasting. Sustainability publicity is actually supported partly of the Kendeda Sustainability Fund of Tides Basis, furthering philosophy you to sign up to proper planet. Our program continues on in only the second, of Western Public Media. Kai Ryssdal: This will be Broke: Maxed Out in The usa, an american RadioWorks and you can erican Personal Media. I’m Kai Ryssdal. When Congress overhauled the nation’s personal bankruptcy law just last year new mantra is actually, “A lot of deadbeats.” Creditors, specifically credit card companies, waged a multi-12 months multiple-billion buck lobbying promotion. Regulations introduced which have 70 percent out-of Congress voting sure. The Bankruptcy proceeding Act is more than five hundred profiles enough time. It can make filing much harder and you can expensive. There’s significantly more papers. And more people will be forced on the Section thirteen repayment than simply A bankruptcy proceeding liquidation, definition a lot fewer anyone can also be walk away about what they are obligated to pay. Under the new legislation, you might merely file for a faster and you can smaller Chapter 7 if one makes less than your state’s median money. Newscast: When you look at the Chicago now, several packed the fresh corridors and courtrooms within Dirkson Federal Strengthening . Inside the downtown Atlanta this new hold off so you can file is five instances enough time . Discover a lot of people, this new range was wrapping up to double … That it bankruptcy proceeding law firm inside the Los angeles states it has been one to long marathon while the Tuesday deadline draws near. The latest submitting boom ran tits following deadline. But with the fresh new passage of time, individual bankruptcies are climbing again. Chris Farrell wonders if the the fresh new legislation will really cut-down with the filings, otherwise if or not a beneficial carrot might work better than an adhere. Farrell: It appears as though a contradiction. Whenever moments be more effective, a great deal more Americans file for bankruptcy. When revenue increase folks are way more ready to need risks. Hopeful loan providers increase the fresh savings with borrowing. Grab the Booming ’20s, when bankruptcies approximately quadrupled. In the place of saving doing buy radios and you will refrigerators, parents bought on newfangled fees plan. It absolutely was an earlier kind of “buy today spend afterwards,” claims Edward Balleisen off Duke College or university.
english
<reponame>wherkamp/system-extensions<filename>src/internal/windows/filebox.rs<gh_stars>1-10 use std::ffi::CString; use std::os::raw::c_char; use std::path::{Path, PathBuf}; use crate::dialogues::filebox::{FileBox, Filter}; /** Change a str to a c string. */ fn str_to_c_str(s: &str) -> *mut c_char { let mut bytes: Vec<u8> = String::from(s).into_bytes(); bytes.push(b"\0"[0]); let mut cchar_vec: Vec<c_char> = bytes.iter().map(|b| *b as c_char).collect(); cchar_vec.as_mut_ptr() } /** Convert an array slice of i8 to a String. The array slice of i8 is expected to represent a UTF-8 String. The array slice is also permitted to have NULL (\0) characters. */ fn slice_to_string(arr: &[i8]) -> String { let mut output: Vec<u8> = Vec::new(); for i in arr.iter() { let ui = *i as u8; if ui == b"\0"[0] { break; } output.push(ui); } String::from_utf8(output).unwrap() } /** Converts a filter to the proper format for the Windows API. */ fn filter_to_str(filter: Vec<Filter>) -> String { let mut string: String = String::new(); for fil in filter { string.push_str(&fil.title); string.push_str("\0"); string.push_str(&fil.file_ending); string.push_str("\0"); } return string; } // https://docs.microsoft.com/en-us/windows/win32/api/commdlg/nf-commdlg-getopenfilenamea pub fn open_file_dialogue(file_box: FileBox) -> Option<PathBuf> { use core::mem; use winapi::um::commdlg::{GetOpenFileNameA, OPENFILENAMEA, OFN_PATHMUSTEXIST, OFN_FILEMUSTEXIST}; let mut my_str: [i8; 100] = [0; 100]; my_str[0] = '\0' as i8; let filt: String = filter_to_str(file_box.filters); // https://docs.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-openfilenamea let mut open_file: OPENFILENAMEA = OPENFILENAMEA::default(); open_file.lStructSize = mem::size_of::<OPENFILENAMEA>() as u32; open_file.hwndOwner = core::ptr::null_mut(); open_file.lpstrFile = my_str.as_ptr() as *mut i8; open_file.nMaxFile = my_str.len() as u32; open_file.lpstrFilter = str_to_c_str(filt.as_str()); open_file.nFilterIndex = 1; open_file.lpstrFileTitle = core::ptr::null_mut(); open_file.nMaxFileTitle = 0; open_file.lpstrInitialDir = match file_box.directory.is_some() { true => str_to_c_str(file_box.directory.unwrap().to_str().unwrap()), false => core::ptr::null_mut(), }; open_file.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; let open_file_ptr: *mut OPENFILENAMEA = &mut open_file; unsafe { if GetOpenFileNameA(open_file_ptr) == 0 { return None; } } let slice = unsafe { std::slice::from_raw_parts(open_file.lpstrFile, 100) }; return Some(PathBuf::from(slice_to_string(slice))); } // https://docs.microsoft.com/en-us/windows/win32/api/commdlg/nf-commdlg-getsavefilenamea pub fn save_file_dialogue_filter(file_box: FileBox, suggested_name: &str) -> Option<PathBuf> { use core::mem; use winapi::um::commdlg::{GetSaveFileNameA, OPENFILENAMEA, OFN_PATHMUSTEXIST, OFN_FILEMUSTEXIST}; let mut my_str: [i8; 100] = [0; 100]; my_str[0] = '\0' as i8; let filt: String = filter_to_str(file_box.filters); // https://docs.microsoft.com/en-us/windows/win32/api/commdlg/ns-commdlg-openfilenamea let mut open_file: OPENFILENAMEA = OPENFILENAMEA::default(); open_file.lStructSize = mem::size_of::<OPENFILENAMEA>() as u32; open_file.hwndOwner = core::ptr::null_mut(); open_file.lpstrFile = str_to_c_str(format!("{}\0", suggested_name).as_str()) as *mut i8; open_file.nMaxFile = my_str.len() as u32; open_file.lpstrFilter = str_to_c_str(filt.as_str()); open_file.nFilterIndex = 1; open_file.lpstrFileTitle = core::ptr::null_mut(); open_file.nMaxFileTitle = 0; open_file.lpstrInitialDir = match file_box.directory.is_some() { true => str_to_c_str(file_box.directory.unwrap().to_str().unwrap()), false => core::ptr::null_mut(), }; open_file.Flags = OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; let open_file_ptr: *mut OPENFILENAMEA = &mut open_file; unsafe { if GetSaveFileNameA(open_file_ptr) == 0 { return None; } } let slice = unsafe { std::slice::from_raw_parts(open_file.lpstrFile, 100) }; return Some(PathBuf::from(slice_to_string(slice))); }
rust
A man named Perumal hailing from Thiru Vi Ka Nagar in Chennai had started a love affair with a sixteen-year-old girl in his area and had illegally married her and shifted to Arakonam with her. Parents of the girl had lodged a complaint about their missing daughter and the cops started an investigation. The police traced the girl to Arakonam and were shocked to find out that Aravind a friend of Perumal was also staying in the house with them. It was also found that both the men had a physical relationship with the minor girl and have been arrested and booked under the Prevention of Children from Sexual Offences (POCSO). The girl has been handed over to the parents. Follow us on Google News and stay updated with the latest!
english
Akshay Kumar’s next project is Laxmmi Bomb, a comedy-horror film that is directed by Raghava Lawrence. It is the Hindi remake of Lawrence’s own 2011 Tamil film Muni 2: Kanchana. The movie was earlier going to be released in theatres, but due to the coronavirus pandemic and the global shutdown of all media production, the film will now premiere on Disney+ Hotstar. Laxxmi Bomb releases on Disney+ Hotstar on November 9. Click for more updates and latest Bollywood news along with Entertainment updates. Also get latest news and top headlines from India and around the world at The Indian Express.
english
<filename>_includes/pd-news.html <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Style-Type" content="text/css" /> <meta name="generator" content="pandoc" /> <title></title> <style type="text/css">code{white-space: pre;}</style> </head> <body> <ul> <h2>2017</h2> <li><span class="citation"><a href="#news0018">01/23/2017 Paper about isosymmetric bonding transition in aegirine by Jingui Xu et al. published in JGR</a></span></li> <h2>2016</h2> <li><span class="citation"><a href="#news0017">10/13/2016 <NAME> passess to Ph.D. candidacy</a></li> <li><span class="citation"><a href="#news0016">10/13/2016 Paper about high pressure behavior of pyrope garnet by Yi Hu et al. published in JGR</a></span></li> <li><span class="citation"><a href="#news0015">10/05/2016 Paper about high pressure behavior of fayalite Fa100 by Jin Zhang et al. published in PCM</a></span></li> <li><span class="citation"><a href="#news0014">07/20/2016 Paper about pressure-induced changes in optical properties of hybrid organic-inorganic perovskite photovoltaic by Kong et al. published in PNAS</a></span></li> <li><span class="citation"><a href="#news0013">07/10/2016 Paper about high pressure behavior of omphacite by Dongzhou Zhang et al. published in PCM</a></span></li> <li><span class="citation"><a href="#news0012">07/05/2016 X-ray Atlas instrument installed at HIGP</a></span></li> <li><span class="citation"><a href="#news0011">06/23/2016 <NAME>, <NAME>, <NAME> and <NAME> attend COMPRES Annual meeting</a></span></li> <li><span class="citation"><a href="#news0010">06/15/2016 <NAME>, <NAME> and <NAME> attend Erice Crystallographic school in Italy</a></span></li> <li><span class="citation"><a href="#news0008">06/10/2016 Paper about new high pressure phase of Be(OH)2 and its relation to SiO2 cristobalite by <NAME> et al. published in PCM</a></span></li> <li><span class="citation"><a href="#news0009">05/15/2016 <NAME>, and <NAME> attend APS/CNM User Meeting</a></span></li> <li><span class="citation"><a href="#news0007">05/05/2016 Paper about pressure-induced change in optical properties of B4.3C by Hushur et al. published in J. of Physics</a></span></li> <li><span class="citation"><a href="#news0004">05/05/2016 CDAC approves funding for our group for 2016-2017 academic year. </a></span></li> <li><span class="citation"><a href="#news0003">03/01/2016 NSF awards grant to develop X-ray Atlas instrument.</a></span></li> <br /> <h2>2015</h2> <li><span class="citation"><a href="#news0005">Dalton Transactions paper about spin transition in Co2+ metalorganic by Miller et al. published</a></span></li> <li><span class="citation"><a href="#news0002">Hi Hu passess Comprehensive Exam</a></span></li> <li><span class="citation"><a href="#news0001">Paper about hydrous wadsleyite and ringwoodite in the transition zone by Yin-Yuan Chang et al. published in JGR</a></span></li> <li><span class="citation"><a href="#news0006">Paper about thermal equation of state of bridgmanite by <NAME> et al. published in JGR</a></span></li> <li><span class="citation">J<NAME> accepts a faculty position at the University of New Mexico</span></li> <li><span class="citation">Visiting graduate student <NAME> arrives at Argonne for a 12-month internship</span></li> <li><span class="citation"><NAME> passess Qualyfying Exam</span></li> <li><span class="citation">NASA SERA project funded</span></li> </ul> <hr> <br /> <h2><a name="news0018">Paper about isosymmetric bonding transition in aegirine by <NAME> et al. published in JGR</a></h2> <div class="floatleft"> <img src="images/aegirine.jpg" width="200"> </div> Pyroxenes are among the most important minerals of Earthˈs crust and upper mantle and play significant role in controlling subduction at convergent margins. In this study, synchrotron-based single-crystal X-ray diffraction experiments were carried out on a natural aegirine [NaFe3+Si2O6] sample at ambient temperature and high pressures to 60GPa, simulating conditions within the coldest part of a subduction zone consisting of old lithosphere. The diffraction data reveal no obvious sign of structural phase transition in aegirine within this pressure range; however, several relevant structural parameter trends change noticeably at approximately 24GPa, indicating the presence of the previously predicted isosymmetric bonding change, related to increase of coordination number of Na+ at M2 site. The pressure-volume data, fit with third-order Birch-Murnaghan (BM3) equation of state over the whole pressure range, yields KT0=126(2)GPa and K0T0=3.3(1), while separate BM3 fits performed for the 0–24.0GPa and 29.9–60.4GPa pressure ranges give KT0=118(3)GPa, K0T0=4.2(3) and KT0=133(2)GPa, K0T0=3.0(1), suggesting that the structure stiffens as a result of the new bond formation. Aegirine exhibits strong anisotropic compression with unit strain axial ratios ε1:ε2:ε3=1.00:2.44:1.64. Structural refinements reveal that NaO8 polyhedron is the most compressible and SiO4 tetrahedron has the lowest compressibility. The consequence of bonding transition is that the compressional behavior of aegirine below ~24GPa and above that pressure is quite different, with likely consequences for relevant thermodynamic parameters and ion diffusion coefficients. <br /> <h2><a name="news0017"><NAME> passess to Ph.D. candidacy</a></h2> <div class="floatleft"> <img src="images/aegirine.jpg" width="200"> </div> On October 16, 2016 <NAME> successfully defended her Ph.D. dissertation proposal and is now oficially a Ph.D. candidate. Congratulations Yi! <br /> <h2><a name="news0016">Paper about high pressure behavior of pyrope garnet by <NAME> et al. published in JGR</a></h2> <div class="floatleft"> <img src="images/yigarnet.jpg" width="200"> </div> Pyrope is an Mg end-member garnet, which constitutes up to ~15% of the upper mantle. Thermodynamic and thermoelastic properties of garnet at high pressure and high temperature are important for understanding the composition and structure of the Earth. Here we report the first-principles calculations of vibrational properties, thermodynamic properties, and elasticity of pyrope over a wide pressure and temperature range. The calculated results exhibit good consistency with the available experimental results and provide values up to the pressure and temperature range that are challenging for experiments to achieve and measure. Pyrope is almost isotropic at high pressure. The elastic moduli, especially the shear modulus of pyrope, exhibit nonlinear pressure and temperature dependences. Density and seismic velocities of pyrope along with piclogite, pyrolite, and eclogite are compared with seismic models along the normal upper mantle and the cold subducting lithospheric plate geotherms. Pyrope has the highest density and seismic velocities among the major minerals of the upper mantle along these geotherms. Eclogite with 30% pyrope and 70% clinopyroxene is denser than the surrounding mantle even along the normal upper mantle geotherm and becomes still denser along the cold slab geotherm. Seismic velocities of eclogite with 30% pyrope along the normal upper mantle geotherm are slower than the surrounding mantle but along the cold slab geotherm are faster than the surrounding mantle. <br /> <a href="https://www.dropbox.com/s/te21j3sc6t2qq8p/Hu_et_al-2016-Journal_of_Geophysical_Research-_Solid_Earth.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0015">Paper about high pressure behavior of fayalite Fa100 by Jin Zhang et al. published in PCM</a></h2> <div class="floatleft"> <img src="images/fayalite.jpg" width="200"> </div> Olivine is widely believed to be the most abundant mineral in the Earth’s upper mantle. Here, we report structural refinement results for the Fe-end-member olivine, Fe2SiO4 fayalite, up to 31 GPa in diamond-anvil cell, using single-crystal synchrotron X-ray diffraction. Unit-cell parameters a, b, c and V, average Si–O Fe–O bond lengths, as well as Si–O Fe–O polyhedral volumes continuously decrease with increasing pressure. The pressure derivative of isothermal bulk modulus K′ T0 is determined to be 4.0 (2) using third-order Birch–Murnaghan equation of state with ambient isothermal bulk modulus fixed to 135 GPa on the basis of previous Brillouin measurements. The Si–O tetrahedron is stiffer than the Fe–O octahedra, and the compression mechanism is dominated by Fe–O bond and Fe–O octahedral compression. Densities of olivine along 1600 and 900 K adiabats are calculated based on this study. The existence of metastable olivine inside the cold subduction slab could cause large positive buoyancy force against subduction, slow down the subduction and possibly affect the slab geometry. <br /> <a href="https://www.dropbox.com/s/b1kz2y8z80andts/JZhang2016PCM_fayalite%20%281%29.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0014">Paper about pressure-induced changes in optical properties of hybrid organic-inorganic perovskite photovoltaic by Kong et al. published in PNAS</a></h2> <div class="floatleft"> <img src="images/kong_small.jpg" width="200"> </div> Organic–inorganic hybrid lead trihalide perovskites have been emerging as the most attractive photovoltaic materials. As regulated by Shockley–Queisser theory, a formidable materials science challenge for improvement to the next level requires further band-gap narrowing for broader absorption in solar spectrum, while retaining or even synergistically prolonging the carrier lifetime, a critical factor responsible for attaining the near-band-gap photovoltage. Herein, by applying controllable hydrostatic pressure, we have achieved unprecedented simultaneous enhancement in both band-gap narrowing and carrier-lifetime prolongation (70% to 100% increase) under mild pressures at ~0.3 GPa. The pressure-induced modulation on pure hybrid perovskites without introducing any adverse chemical or thermal effect clearly demonstrates the importance of band edges on the photon–electron interaction and maps a pioneering route toward a further increase in their photovoltaic performance. <br /> <a href="https://www.dropbox.com/s/qyri9jx31z2hc6p/Kong%20et%20al.%20PNAS%202016.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0013">Paper about high pressure bevavior of omphacite to 47 GPa by <NAME> et al. published in PCM</a></h2> <div class="floatleft"> <img src="images/omphacite.jpg" width="200"> </div> Omphacite is an important mineral component of eclogite. Single-crystal synchrotron X-ray diffraction data on natural (Ca, Na) (Mg, Fe, Al)Si2O6 omphacite have been collected at the Advanced Photon Source beamlines 13-BM-C and 13-ID-D up to 47 GPa at ambient temperature. Unit cell parameter and crystal structure refinements were carried out to constrain the isothermal equation of state and compression mechanism. The third-order Birch– Murnaghan equation of state (BM3) fit of all data gives V0 = 423.9(3) Å3, KT0 = 116(2) GPa and KT0′ = 4.3(2). These elastic parameters are consistent with the general trend of the diopside–jadeite join. The eight-coordinated polyhedra (M2 and M21) are the most compressible and contribute to majority of the unit cell compression, while the SiO4 tetrahedra (Si1 and Si2) behave as rigid structural units and are the most incompressible. Axial compressibilities are determined by fitting linearized BM3 equation of state to pressure dependences of unit cell parameters. Throughout the investigated pressure range, the b-axis is more compressible than the c-axis. The axial compressibility of the a-axis is the largest among the three axes at <br /> <a href="https://www.dropbox.com/s/urwxedevou33356/Zhang_PCM2016.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0012">X-ray Atlas instrument installed at HIGP</a></h2> <div class="floatleft"> <img src="images/xra_small.jpg" width="200"> </div> X-ray Atlas advanced diffractometer system, funded by the NSF EAR instrumetation grant has been installed in HIG room 154. The system consists of Bruker D8 Venture single crystal diffractometer and D8 Advance powder diffractometer. Both instruments are equipped with variable temperature devices. D8 Venture features innovative components such as PHOTON II CPAD detector and Incoatec ImS 3.0 Ag microfocus source with Helios focusing optics, and is being further customized for high-pressure experiements, including online ruby fluorescence measurments, heavy duty sample platform and membrane-driven pressure control system. Both instruments will be available for both collaborative as well as service work startin in September 2016. <br /> <br /> <a href="http://pdera.github.io/facilities.html#xal" > Read more</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0008">Paper about new high pressure phase of Be(OH)2 and its relation to SiO2 cristobalite by <NAME> et al. published in PCM</a></h2> <div class="floatleft"> <img src="images/behoite_small.jpg" width="200"> </div> Three isotypic crystals, SiO2 (α-cristobalite), ε-Zn(OH)2 (wülfingite) and Be(OH)2 (β-behoite), with topologically identical frameworks of corner-connected tetrahedra, undergo displacive compression-driven phase transitions at similar pressures (1.5-2.0 GPa), but each transition is characterized by a different mechanism resulting in different structural modifications. In this study, we report the crystal structure of the high-pressure γ-phase of beryllium hydroxide and compare it with the high-pressure structures of the other two minerals. In Be(OH)2, the transition from the ambient β-behoite phase with the orthorhombic space group P212121 and ambient unit cell parameters a = 4.5403(4) Å, b = 4.6253(5) Å, c = 7.0599(7) Å, to the high-pressure orthorhombic γ-polymorph with space group Fdd2 and unit cell parameters (at 5.3(1) GPa) a = 5.738(2) Å, b = 6.260(3) Å, c = 7.200(4) Å takes place between 1.7 and 3.6 GPa. This transition is essentially second order, is accompanied by a negligible volume discontinuity, and exhibits both displacive and reversible character. The mechanism of the phase transition results in a change to the hydrogen bond connectivities and rotation of the BeO4 tetrahedra. <br /> <a href="https://www.dropbox.com/s/2ykqxu7g74msvy8/Shelton%20et%20al.%202016.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0007">Paper about pressure-induced change in optical properties of B4.3C by Hushur et al. published in J. of Physics</a></h2> <div class="floatleft"> <img src="images/Hushur16fig1.jpg" width="200"> </div> Single-crystal B4.3C boron carbide is investigated through the pressure-dependence and inter-relation of atomic distances, optical properties and Raman-active phonons up to ~70GPa. The anomalous pressure evolution of the gap width to higher energies is striking. This is obtained from observations of transparency, which most rapidly increases around 55GPa. Full visible optical transparency is approached at pressures of>60GPa indicating that the band gap reaches ~3.5eV; at high pressure, boron carbide is a wide-gap semiconductor. The reason is that the high concentration of structural defects controlling the electronic properties of boron carbide at ambient conditions initially decreases and finally vanishes at high pressures. The structural parameters and Raman-active phonons indicate a pressure-dependent phase transition in single-crystal natB4.3C boron carbide near 40GPa, likely related to structural changes in the C–B–C chains, while the basic icosahedral structure appears to be less affected. <br /> <a href="https://www.dropbox.com/s/ua9dbokolvtikjx/Hushur%20et%20al.%20JPCM%202016.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0004">CDAC approves funding for our group for 2016-2017 academic year</a></h2> <div class="floatleft"> <img src="images/CDAClogo.jpg" width="200"> </div> The CDAC-supported project at the University of Hawaii started on September 1, 2013. This proposal request renewal of funding for the fourth year. Currently two Ph.D. students are supported by this project, each at 50%: <NAME> (B.Sc. from University of Science and Technology of China, major in geophysics, started the Ph.D. program at UH in August 2013) and <NAME> (B.Sc. from University of Hawaii, major in chemistry, started the Ph.D. program on September 1, 2014). Since the beginning of the project our efforts have been focused on training the students in high-pressure techniques, sample preparation, principles of high-pressure X-ray crystallography and data analysis and crystallographic computations. <br /> <a href="#top">Back to top</a> <div class="clear"> </div> <br /> <br /> <h2><a name="news0003">NSF awards grant to develop X-ray Atlas instrument</a></h2> <div class="floatleft"> <img src="images/nsf_logo.png" width="200"> </div> X-ray Atlas instrument, being developed within the NSF EAR Instrumentation and Facilities project through acquisition of Bruker D8 Venture/D8 Advance system and further customization, will create a novel state of the art solution for in situ laboratory-based single-crystal and powder X-ray diffraction experiments at the University of Hawaii. The new instrument system will be capable of exploring pressure-temperature conditions relevant for the Earth upper mantle, transition zone and some of the lower mantle. X-ray Atlas will create new and very exciting opportunities for lab-based mineralogy, petrology and mineral physics undergraduate and graduate research and education, and will serve as personnel training and new technology prototyping site for HIGP-lead projects at Argonne National Laboratory. <br /> <a href="#top">Back to top</a> <div class="clear"> </div> <br /> <br /> <h2><a name="news0002"><NAME> passess Comprehensive Exam</a></h2> <div class="floatleft"> <img src="images/YiHu.jpg" width="200"> </div> On February 1, 2016 <NAME> successfully passed her PhD Comprehensive Exam. Congratulations Yi!!! <br /> <a href="#top">Back to top</a> <div class="clear"> </div> <br /> <br /> <h2><a name="news0005">Dalton Transactions paper about spin transition in Co2+ metalorganic by Miller et al. published</a></h2> <div class="floatleft"> <img src="images/Daltoncover_small.jpg" width="200"> </div> The application of pressure on CoII(dpzca)2, which at ambient pressure undergoes abrupt spin crossover(SCO) with thermal hysteresis, gives unique insights into SCO. It reversibly separates the crystallographicphase transition (I41/a↔P21/c) and associated abrupt SCO from the underlying gradual SCO, as shownby detailed room temperature (RT) X-ray crystallography and temperature dependent magnetic suscepti-bility studies, both under a range of 10 different pressures. The pressure effects are shown to be reversible.The crystal structure of the pressure-induced low-spin state is determined at RT at 0.42(2) and 1.78(9)GPa. At the highest pressure of 1.78(9) GPa the Co–N bond lengths are consistent with the complex beingfully LS, and the conjugated terdentate ligands are significantly distorted out of plane. The abrupt SCOevent can be shifted up to RT by application of a hydrostatic pressure of 0.4 GPa. These magnetic sus-ceptibility (vs.temperature) and X-ray crystallography (at RT) studies, under a range of pressures, showthat the SCO can be tuned over a wide range of temperature and pressure space, including RT SCO. <br /> <a href="https://www.dropbox.com/s/192dqjjwe8hl0cd/Briker%20et%20al.%20Dalton%20Trans.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <div class="clear"> </div> <br /> <br /> <h2><a name="news0001">Paper about hydrous wadsleyite and ringwoodite in the transition zone by Yin-Yuan Chang et al. published in JGR</a></h2> <div class="floatleft"> <img src="images/chang15fig1.jpg" width="200"> </div> Review of recent mineral physics literature shows consistent trends for the influence of Fe and H2O on the bulk modulus (K0) of wadsleyite and ringwoodite, the major phases of Earth's mantle transition zone (410–660km). However, there is little consensus on the first pressure derivative, K0′=(dK/dP)P=0, which ranges from about 4 to >5 across experimental studies and compositions. Here we demonstrate the importance of K0′ in evaluating the bulk sound velocity of the transition zone in terms of water content and provide new constraints on the effect of H2O on K0′ for wadsleyite and ringwoodite by conducting a comparative compressibility study. In the experiment, multiple crystals of hydrous Fo90 wadsleyite containing 2.0 and 0.25 wt% H2O were loaded into the same diamond anvil cell, along with hydrous ringwoodite containing 1.4 wt% H2O. By measuring their pressure-volume evolution simultaneously up to 32GPa, we constrain the difference in K0′ independent of the pressure scale, finding that H2O has no effect on K0′, whereas the effect of H2O on K0 is significant. The fitted K0′ values of hydrous wadsleyite (0.25 and 2.0 wt% H2O) and hydrous ringwoodite (1.4 wt% H2O) examined in this study were found to be identical within uncertainty, with K0′ ~3.7(2). New secondary-ion mass spectrometry measurements of the H2O content of these and previously investigated wadsleyite samples shows the bulk modulus of wadsleyite is reduced by 7.0(5) GPa/wt% H2O, independent of Fe content for upper mantle compositions. Because K0′ is unaffected by H2O, the reduction of bulk sound velocity in very hydrous regions of transition zone is expected to be on the order of 1.6%, which is potentially detectible in high-resolution, regional seismology studies. <br /> <a href="https://www.dropbox.com/s/0nnc78ky4h9en5f/Chang_et_al-Journal_of_Geophysical_Research-_Solid_Earth%202015.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> <h2><a name="news0006">Paper about thermal equation of state of bridgmanite by <NAME> et al. published in JGR</a></h2> <div class="floatleft"> <img src="images/wolf15fig9.jpg" width="200"> </div> The high-pressure/high-temperature equation of state (EOS) of synthetic 13% Fe-bearing bridgmanite (Mg silicate perovskite) is measured using powder X-ray diffraction in a laser-heated diamond anvil cell with a quasi-hydrostatic neon pressure medium. We compare these results, which are consistent with previous 300 K sound speed and compression studies, with a reanalysis of Fe-free Mg end-member data from Tange et al. (2012) to determine the effect of iron on bridgmanite's thermoelastic properties. EOS parameters are incorporated into an ideal lattice mixing model to probe the behavior of bridgmanite at deep mantle conditions. With this model, a nearly pure bridgmanite mantle composition is shown to be inconsistent with density and compressibility profiles of the lower mantle. We also explore the buoyant stability of bridgmanite over a range of temperatures and compositions expected for Large Low-Shear Velocity Provinces, concluding that bridgmanite-dominated thermochemical piles are more likely to be passive dense layers externally supported by convection, rather than internally supported metastable domes. The metastable dome scenario is estimated to have a relative likelihood of only 4–7%, given the narrow range of compositions and temperatures consistent with seismic constraints. If buoyantly supported, such structures could not have remained stable with greater thermal contrast early in Earth's history, ruling out formation scenarios involving a large concentration of heat producing elements. <br /> <a href="https://www.dropbox.com/s/bhle62eo0qgynto/Wolf2015_JGR.pdf?dl=0" target="_blank"> Read full paper</a> <br /> <a href="#top">Back to top</a> <br /> <br /> </body>
html
Kishore Tirumala, the director of Nenu. . Sailaja, the year's first hit, has impressed no less a hero than Venkatesh. It is official that his next film is going to be with Venky. This will go on the floors after Maruthi's film is wrapped up. Earlier, Nithiin told the world that his movie with Kishore has been finalized and that it will be produced by Sreshth Movies. "Hi all. . happy to announce that m doing a film with Kishore Tirumala under Sreshth Movies. . other details soon," he said on twitter. It has to be seen if Nithiin's film will go on the floors after Venky's. However, it is now final that Kishore's next film will be with Venky. After narrating the script to Venky, he has started preparing a bound script. Multidimension's Ram Mohan will produce this film. The selection of other cast members has already begun. Follow us on Google News and stay updated with the latest!
english
{ "kind": "Method", "name": "Element.setAttribute", "href": "https://developer.mozilla.org/en-US/docs/Web/API/Element/setAttribute", "description": "Sets the value of an attribute on the specified element. If the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value.", "refs": [ { "name": "DOM", "href": "https://dom.spec.whatwg.org/#dom-element-setattribute", "description": "setAttribute() - DOM" } ] }
json
Xsolla, a global video game commerce company, and cryptocurrency platform Crypto.com, have partnered to integrate Crypto.com's checkout solution into Xsolla's Pay Station platform. This transformative integration of Crypto.com Pay represents a significant advancement in the Gaming industry. It creates new possibilities for game developers and players, enabling them to accept cryptocurrency payments and streamline transactions in a user-friendly and secure manner for a universally enhanced experience. This pivotal update broadens the horizon for digital payment methods, offering players more diverse and preferred transaction options in digital and Metaverse environments. This collaboration also marks a significant step for Crypto.com in building its presence and network across the gaming industry. Xsolla's Pay Station, which facilitates in-game purchases across 200+ regions and countries using a variety of compliant payment providers, is enhancing its service with the integration of Crypto.com Pay. This forthcoming development promises to expand the reach of developers and publishers, enabling them to engage a more diverse player base and tap into new, dynamic markets and revenue streams. "We are thrilled about this partnership with Crypto.com and the significant integration of Crypto.com Pay into our Pay Station platform. The gaming industry is rapidly evolving, and we must adapt to meet those changes. The integration of cryptocurrencies as a form of payment offers game developers and players an innovative payment solution that aligns with the global shift towards digital currencies," said Chris Hewish, CEO of Xsolla. "Our collaboration with Crypto.com marks a pivotal moment for the gaming industry, paving the way for a more inclusive and secure gaming ecosystem." Xsolla is a global video game commerce company with a robust and powerful set of tools and services designed specifically for the industry. Since its founding in 2005, Xsolla has helped thousands of game developers and publishers of all sizes fund, market, launch, and monetize their games globally and across multiple platforms. As an innovative leader in game commerce, Xsolla's mission is to solve the inherent complexities of global distribution, marketing, and monetization to help our partners reach more geographies, generate more revenue and create relationships with gamers worldwide. Headquartered and incorporated in Los Angeles, California, with offices in Berlin, Seoul, Beijing, Kuala Lumpur, Tokyo, and cities around the world, Xsolla supports major gaming titles like Valve, Twitch, Roblox, Ubisoft, Epic Games, Take-Two, KRAFTON, Nexters, NetEase, Playstudios, Playrix, miHoYo, and more. Founded in 2016, Crypto.com is trusted by over 80 million customers worldwide and is the industry leader in regulatory compliance, security, and privacy. Our vision is simple: Cryptocurrency in Every Wallet™. Crypto.com is committed to accelerating cryptocurrency adoption through innovation and empowering the next generation of builders, creators, and entrepreneurs to develop a fairer, more equitable digital ecosystem.
english
The UFC 281, headlined by Israel Adesanya vs. Alex Pereira middleweight title fight, took place inside Madison Square Garden, New York today. The event saw many action-packed fights that entertained the fans. However, the bantamweight bout between former champion Frankie Edgar vs. Chris Gutierrez was a hard site for fans to watch. The two-time UFC champion entered the cage for one last time against Chris Gutierrez on the main card of UFC 281. Edgar, who was already 0-3 in his last three fights, didn’t see much success at UFC 281. ‘El Guapo’, who was undefeated in his last four fights, landed a vicious knee on Edgar’s temple, knocking him out cold in the second minute of the very first round. This was the 30th time Edgar entered the MMA octagon and certainly not the outcome he expected. Final Result- Chris Gutierrez defeated Frankie Edgar via knockout in the first round. ALSO READ: UFC 281 Preview and Predictions: Will Israel Adesanya Finally Beat Alex Pereira Tonight? ‘The Answer’ has had an exceptional MMA career. He has entertained the fight fans for over 15 years with his amazing performances. Edgar has won over some of the notable names in the combat world, including Charles Oliveira, BJ Penn, Urijah Faber, and more. However, in his later years, Edgar didn’t fare well in his fights. The two-time UFC champion saw a rough phase after a title fight loss in 2019 against Max Holloway. Since then, Edgar has won only one fight. Now, after a three-fight skid and a brutal loss in the last bout, the legendary fighter called it a career inside the Madison Square Garden. Even the veteran UFC color commentator Joe Rogan seemed a bit unhappy about the results, as it resonated from his words during commentating. Check out how fans reacted to the fight below: What is your reaction to Frankie Edgar’s last performance?
english
__inner_signs__ = ['{', '}', '[', ']', '(', ')', ',', '', ':'] class __Str: """ the class contain string methods """ @staticmethod def space_encoder(_str: str): """ will encode spaces inside list in string. :param _str: list in string :return: return encoded string """ _numeric_flag = False _str = list(_str) _space_index_st = 0 for _index in range(len(_str)): if _str[_index] == ' ': if _str[_index - 1] not in __inner_signs__ and _str[_index + 1] not in __inner_signs__ and not _numeric_flag: _str[_index] = 'र' if _space_index_st == 0: _space_index_st = _index else: _str[_index] = '' else: if _str[_index] in __inner_signs__: _numeric_flag = True if (not _str[_index].isnumeric()) and _str[_index] != ' ' and _str[_index] != '' and (_str[_index] not in __inner_signs__): _numeric_flag = False if _space_index_st > 0 and _str[_index] == ',': for _ind in range(_space_index_st, _index): _str[_ind] = '' _space_index_st = 0 return ''.join(_str) @staticmethod def space_decoder(_str: str): """ will decode spaces inside list in string. :param _str: list in string :return: return encoded string """ _str = list(_str) for _index in range(len(_str)): if _str[_index] == 'र': _str[_index] = ' ' return ''.join(_str)
python
<filename>rest/AIP/quality-standards/CWE/items/CWE-550.json { "id": "CWE-550", "name": "Server-generated Error Message Containing Sensitive Information", "href": "AIP/quality-standards/CWE/items/CWE-550", "url": "https://cwe.mitre.org/data/definitions/550.html", "description": "Certain conditions, such as network failure, will cause a server error message to be displayed.", "isoPatterns": null, "count": 0, "qualityRules": null, "qualityTemplates": null }
json
Indian legend Sachin Tendulkar recently bumped into former West Indies captain Brian Lara. The two cricket stars then posed for a couple of pictures on the streets of London. Taking to his Instagram handle on Wednesday, June 28, Tendulkar shared two pictures, giving fans a glimpse of his unplanned meetup with Lara. He captioned the post: "Casually bumped into another keen golfer today! 😂😂 @brianlaraofficial. " Both Sachin Tendulkar and Biran Lara are considered two of the greatest batters to have ever played the game. With 34457 to his name, Tendulkar is the most prolific run-scorer in international cricket. Lara, on the other hand, mustered 22358 runs in his international appearances. The two ace cricketers have several records to their name, a few of which are deemed as unbreakable by many fans. While Tendulkar's record of hitting 100 centuries remains one of his most significant achievements, Lara is the only batter to score a quadruple century in Test cricket. Following their retirement from cricket, the two icons have been quite active on the golf course. Tendulkar, in the past, has also shared pictures of the two enjoying a game of golf together. Sachin Tendulkar had earlier taken to social media to share pictures from his recent family vacation. The cricket star, along with his wife, Anjali Tendulkar, and daughter, Sara Tendulkar, went for a trip to Masai Mara in Kenya. Captioning the post, he wrote: "Family fun, under the Masai Mara sun! ☀️" While Tendulkar retired from international cricketer in 2013, his son Arjun is now taking his legacy forward. The lanky fast bowler is a part of the Mumbai Indians (MI) side in the Indian Premier League (IPL). Arjun made his much-awaited debut in IPL 2023 earlier this year. He featured in four matches and finished with three wickets at an economy rate of 9. 35.
english
<gh_stars>0 import common_dataDeepCopy from '../modules/common_data_deep_copy'; var initDirectoryFilterFunc = (originState, action) => { var newState = Object.assign ? Object.assign({}, originState) : common_dataDeepCopy(originState), directoryFilter = action.payload.data; delete newState.directoryFilter; newState.directoryFilter = directoryFilter; return newState; }; export default initDirectoryFilterFunc;
javascript
<reponame>ragnardragus/HSCraft-Hard-and-Survival- { "Name": "QueenGhast", "Registry ID": "specialmobs:queenghast", "Class": "fathertoast.specialmobs.entity.ghast.EntityQueenGhast" }
json
{ "name": "@fabric/doorman", "version": "0.2.1", "description": "Multi-platform chatbot framework.", "main": "types/doorman.js", "scripts": { "bot": "node scripts/bot.js", "make:api": "npm run parse:api && jsdoc types/ README.md -d docs/", "parse:api": "jsdoc2md --configure jsdoc.json --files types/** README.md > API.md", "docs": "npm run make:docs && ecstatic docs", "start": "node scripts/doorman.js", "test": "NODE_ENV=test mocha tests", "coverage": "NODE_ENV=test nyc npm test", "make:coverage": "npm run coverage && nyc report --reporter html", "make:docs": "jsdoc -c jsdoc.json types README.md -d docs", "review:coverage": "npm run make:coverage && ecstatic reports/coverage" }, "repository": { "type": "git", "url": "git+https://github.com/FabricLabs/doorman.git" }, "keywords": [ "agent", "bot", "chat", "chatbot", "community", "discord", "fabric", "maki", "matrix", "slack" ], "author": "Fabric Labs <<EMAIL>> (https://labs.fabric.pub)", "contributors": [ "<NAME> <<EMAIL>> (https://www.ericmartindale.com)", "<NAME> <<EMAIL>> (https://naterichardson.com)" ], "license": "MIT", "bugs": { "url": "https://github.com/FabricLabs/doorman/issues" }, "homepage": "https://github.com/FabricLabs/doorman#readme", "dependencies": { "@fabric/core": "FabricLabs/fabric#service-listings", "@slack/client": "^4.1.0", "discord.js": "^11.4.2", "erm": "^0.0.1", "fast-json-patch": "^2.0.7", "json-pointer": "^0.6.0", "level": "^4.0.0", "lodash.merge": "^4.6.2", "marked": "^0.3.19", "matrix-js-sdk": "^0.10.1", "mkdirpsync": "^0.1.0" }, "devDependencies": { "chai": "^4.1.2", "codecov": "^3.0.4", "ecstatic": "^4.1.2", "istanbul": "^1.1.0-alpha.1", "jsdoc": "FabricLabs/jsdoc", "mocha": "^4.0.0", "nyc": "^15.1.0", "semistandard": "^11.0.0" }, "semistandard": { "ignore": [ "/tests/" ] }, "nyc": { "include": [ "types", "services" ], "exclude": [ "tests", "data" ], "report-dir": "./reports/coverage", "temp-dir": "./reports/nyc" } }
json
<reponame>QDetective/cpnt262-a1 # cpnt262-a1 classList Toggle
markdown
Celebrating the zero local cases of contagion, South Korean President Moon Jae-in gave credit to the collective power of his people. Health authorities in South Korea said that they have recorded no new domestic cases of coronavirus infections on Thursday, for the first time since the outbreak began to worsen in February. The Korea Centers for Disease Control and Prevention registered four new imported cases today, down from nine a day earlier. The nation-wide tally of positive covid-19 cases so far stands at 10,765, while the death toll is 247, according to Yonhap news agency. Celebrating the zero local cases of contagion, South Korean President Moon Jae-in gave credit to the collective power of his people. "Zero locally confirmed COVID-19 patients (for the first time) in 72 days. Zero infections in the 14 days since the general elections," the president said on Twitter. "This is the power of the Republic of Korea and the South Korean people," he said. After grappling with the first major outbreak outside China, South Korea largely managed to bring the outbreak under control without major disruptions through a massive testing campaign and intensive contact tracing.
english
import unittest from core_lib.data_layers.data.data_helpers import build_url class TestBuildUrl(unittest.TestCase): def test_build_url(self): self.assertEqual(build_url(host="some_domain.com"), "some_domain.com") self.assertEqual(build_url(protocol="http", host="some_domain.com"), "http://some_domain.com") self.assertEqual(build_url(protocol="http", host="some_domain.com", username="shay"), "http://shay@some_<EMAIL>.<EMAIL>") self.assertEqual(build_url(protocol="http", host="some_domain.com", username="shay", password="<PASSWORD>"), "http://shay:pass@some_domain.com") self.assertEqual(build_url(protocol="http", host="some_domain.com", username="shay", password="<PASSWORD>", port=80), "http://shay:pass@some_domain.com:80") self.assertEqual(build_url(protocol="http", host="some_domain.com", username="shay", password="<PASSWORD>", port=80, path="x/y/z"), "http://shay:pass@some_domain.com:80/x/y/z") params = { "protocol": "http", "host": "some_domain.com", "username": "shay", "password": "<PASSWORD>", "port": 80, "path": "/x/y/z", "file": "file.foo" } self.assertEqual(build_url(**params), "http://shay:pass@some_domain.com:80/x/y/z/file.foo")
python
document.querySelectorAll(".js-confirm").forEach(function (element) { element.addEventListener("click", function (event) { if (! event.target.classList.contains("button-disabled") && ! event.target.disabled && "data-confirm-message" in event.target.attributes) { if (! confirm(event.target.attributes["data-confirm-message"].value)) { event.preventDefault(); } } }); }); document.addEventListener("click", event => { const closest = event.target.closest("a"); if (closest !== null && "href" in closest.attributes && closest.attributes["href"].value === "#") { event.preventDefault(); } });
javascript
<reponame>DFC-Incubator/base-service /** * */ /** * @author mconway * Exceptions for REST API * */ package org.irods.jargon.rest.exception;
java
IPL 2022: RCB pacer Akash Deep: Royal Challengers Bangalore Akash Deep has made a name for himself recently after a match-winning spell against Kolkata Knight Riders. However, not many might be aware that he himself is a resident of Kolkata, and despite being an IPL star, he lives in a dormitory. Follow IPL 2022 LIVE Updates on InsideSport.IN. Deep had a successful outing against local team Kolkata Knight Riders on Wednesday. He picked up the crucial wickets of Venkatesh Iyer, Nitish Rana and Umesh Yadav. The 25-year-old pacer hails from Bihar, but he plays domestic cricket for the Bengal team. He stays at the dormitories of the Cricket Association of Bengal (CAB). Meanwhile, thanks to Akash Deep and Wanindu Hasaranga’s brilliant spells, Royal Challengers Bangalore registered a three-wicket victory against KKR. It was an extremely crucial win for Faf du Plessis’ men, given that they had started their campaign with a defeat against Punjab Kings. Follow IPL 2022 live updates on InsideSport.IN.
english
<filename>18/Über- und außerplanmäßige Haushaltsausgaben/18-76320.json<gh_stars>10-100 { "vorgangId": "76320", "VORGANG": { "WAHLPERIODE": "18", "VORGANGSTYP": "Über- und außerplanmäßige Haushaltsausgaben", "TITEL": "Haushaltsführung 2016 \r\nÜber- und außerplanmäßige Ausgaben und Verpflichtungsermächtigungen im zweiten Vierteljahr des Haushaltsjahres 2016", "INITIATIVE": "Bundesregierung", "AKTUELLER_STAND": "", "SIGNATUR": "", "GESTA_ORDNUNGSNUMMER": "", "WICHTIGE_DRUCKSACHE": [ { "DRS_HERAUSGEBER": "BT", "DRS_NUMMER": "18/9453", "DRS_TYP": "Unterrichtung", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/094/1809453.pdf" }, { "DRS_HERAUSGEBER": "BR", "DRS_NUMMER": "480/16", "DRS_TYP": "Unterrichtung", "DRS_LINK": "http://dipbt.bundestag.de:80/dip21/brd/2016/0480-16.pdf" } ], "EU_DOK_NR": "", "SACHGEBIET": "Öffentliche Finanzen, Steuern und Abgaben", "SCHLAGWORT": [ { "_fundstelle": "true", "__cdata": "Über- und außerplanmäßige Haushaltsausgaben: Haushaltsjahr 2016" }, "Verpflichtungsermächtigung" ], "ABSTRAKT": "" }, "VORGANGSABLAUF": { "VORGANGSPOSITION": [ { "ZUORDNUNG": "BT", "URHEBER": "Unterrichtung, Urheber : Bundesregierung, Bundesministerium der Finanzen (federführend)", "FUNDSTELLE": "17.08.2016 - BT-Drucksache 18/9453", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/094/1809453.pdf" }, { "ZUORDNUNG": "BR", "URHEBER": "Unterrichtung, Urheber : Bundesministerium der Finanzen ", "FUNDSTELLE": "26.08.2016 - BR-Drucksache 480/16", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/brd/2016/0480-16.pdf", "ZUWEISUNG": { "AUSSCHUSS_KLARTEXT": "Finanzausschuss", "FEDERFUEHRUNG": "federf&uuml;hrend" } }, { "ZUORDNUNG": "BT", "URHEBER": "Überweisung gemäß § 80 Abs. 3 Geschäftsordnung BT, Urheber : Bundestag ", "FUNDSTELLE": "09.09.2016 - BT-Drucksache 18/9596", "FUNDSTELLE_LINK": "http://dipbt.bundestag.de:80/dip21/btd/18/095/1809596.pdf", "ZUWEISUNG": { "AUSSCHUSS_KLARTEXT": "Haushaltsausschuss", "FEDERFUEHRUNG": "federf&uuml;hrend" } } ] } }
json
<gh_stars>0 package de.mhus.mvn.plugin; import java.util.Arrays; import java.util.List; import jdk.javadoc.doclet.Doclet.Option; public abstract class XOption implements Option { private int paramCnt; private String desc; private Kind kind; private List<String> names; public XOption(String name, int paramCnt, String desc) { names = Arrays.asList(name.split(",")); this.paramCnt= paramCnt; this.desc = desc; this.kind = Kind.STANDARD; } @Override public int getArgumentCount() { return paramCnt; } @Override public String getDescription() { return desc; } @Override public Kind getKind() { return kind; } @Override public List<String> getNames() { return names; } @Override public String getParameters() { return ""; } }
java
A man wanted in more than 50 serious offences across Maharashtra was arrested by the police in Thane district, police said. Acting on a tip-off, a patrolling team of the Khadakpada police in Kalyan nabbed the accused on Wednesday, assistant police inspector Anil Gaikwad of the Khadakpada police station said. The accused used to allegedly pose as a policeman and rob people, and was a habitual offender wanted in several cases, he said. He is allegedly involved in cases of attempt to murder, attacking public servant, cheating, dacoity, causing hurt during robbery, among other offences, the official said.
english
<reponame>mamanigrasso/PartyPoker<gh_stars>0 package at.aau.pokerfox.partypoker.model; import android.os.Parcel; import android.os.Parcelable; import com.bluelinelabs.logansquare.annotation.JsonField; import com.bluelinelabs.logansquare.annotation.JsonObject; import at.aau.pokerfox.partypoker.R; @JsonObject public class Card implements Parcelable { private static String[] suits = { "hearts", "spades", "diamonds", "clubs" }; private static String[] ranks = { "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King", "Ace" }; @JsonField private int suit; @JsonField private int rank; @JsonField private int drawableID; public Card() {} public Card(int suit, int rank) { this.suit = suit; this.rank = rank; drawableID = R.drawable.card_back; switch (suit) { case 0: if (rank == 0) drawableID = R.drawable.hearts_2; if (rank == 1) drawableID = R.drawable.hearts_3; if (rank == 2) drawableID = R.drawable.hearts_4; if (rank == 3) drawableID = R.drawable.hearts_5; if (rank == 4) drawableID = R.drawable.hearts_6; if (rank == 5) drawableID = R.drawable.hearts_7; if (rank == 6) drawableID = R.drawable.hearts_8; if (rank == 7) drawableID = R.drawable.hearts_9; if (rank == 8) drawableID = R.drawable.hearts_10; if (rank == 9) drawableID = R.drawable.hearts_jack; if (rank == 10) drawableID = R.drawable.hearts_queen; if (rank == 11) drawableID = R.drawable.hearts_king; if (rank == 12) drawableID = R.drawable.hearts_ace; break; case 1: if (rank == 0) drawableID = R.drawable.spades_2; if (rank == 1) drawableID = R.drawable.spades_3; if (rank == 2) drawableID = R.drawable.spades_4; if (rank == 3) drawableID = R.drawable.spades_5; if (rank == 4) drawableID = R.drawable.spades_6; if (rank == 5) drawableID = R.drawable.spades_7; if (rank == 6) drawableID = R.drawable.spades_8; if (rank == 7) drawableID = R.drawable.spades_9; if (rank == 8) drawableID = R.drawable.spades_10; if (rank == 9) drawableID = R.drawable.spades_jack; if (rank == 10) drawableID = R.drawable.spades_queen; if (rank == 11) drawableID = R.drawable.spades_king; if (rank == 12) drawableID = R.drawable.spades_ace; break; case 2: if (rank == 0) drawableID = R.drawable.diamonds_2; if (rank == 1) drawableID = R.drawable.diamonds_3; if (rank == 2) drawableID = R.drawable.diamonds_4; if (rank == 3) drawableID = R.drawable.diamonds_5; if (rank == 4) drawableID = R.drawable.diamonds_6; if (rank == 5) drawableID = R.drawable.diamonds_7; if (rank == 6) drawableID = R.drawable.diamonds_8; if (rank == 7) drawableID = R.drawable.diamonds_9; if (rank == 8) drawableID = R.drawable.diamonds_10; if (rank == 9) drawableID = R.drawable.diamonds_jack; if (rank == 10) drawableID = R.drawable.diamonds_queen; if (rank == 11) drawableID = R.drawable.diamonds_king; if (rank == 12) drawableID = R.drawable.diamonds_ace; break; case 3: if (rank == 0) drawableID = R.drawable.clubs_2; if (rank == 1) drawableID = R.drawable.clubs_3; if (rank == 2) drawableID = R.drawable.clubs_4; if (rank == 3) drawableID = R.drawable.clubs_5; if (rank == 4) drawableID = R.drawable.clubs_6; if (rank == 5) drawableID = R.drawable.clubs_7; if (rank == 6) drawableID = R.drawable.clubs_8; if (rank == 7) drawableID = R.drawable.clubs_9; if (rank == 8) drawableID = R.drawable.clubs_10; if (rank == 9) drawableID = R.drawable.clubs_jack; if (rank == 10) drawableID = R.drawable.clubs_queen; if (rank == 11) drawableID = R.drawable.clubs_king; if (rank == 12) drawableID = R.drawable.clubs_ace; break; } if (drawableID == R.drawable.card_back) System.out.println("invalid card!! Rank: " + rank + " suit: " + suit); } public static String[] getSuits() { return suits; } public static void setSuits(String[] suits) { Card.suits = suits; } public static String[] getRanks() { return ranks; } public static void setRanks(String[] ranks) { Card.ranks = ranks; } public int getSuit() { return suit; } public void setSuit(int suit) { this.suit = suit; } public int getRank() { return rank; } public void setRank(int rank) { this.rank = rank; } public String toString() { return suits[suit] + " " + ranks[rank]; } public static String rankAsString(int rank ) { return ranks[rank]; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int i) { parcel.writeInt(this.suit); parcel.writeInt(this.rank); parcel.writeInt(this.drawableID); } public static final Parcelable.Creator<Card> CREATOR = new Parcelable.Creator<Card>() { public Card createFromParcel(Parcel in) { return new Card(in); } public Card[] newArray(int size) { return new Card[size]; } }; private Card(Parcel in) { this.suit = in.readInt(); this.rank = in.readInt(); this.drawableID = in.readInt(); } //to get the id of one specific card use: "R.drawable.clubs_4" for example. public static int getCards () { return CardDeck.getRandomId(CardDeck.getDrawableIds()); } public int getDrawableID() { return drawableID; } public void setDrawableID(int id) { this.drawableID = id; } }
java
<filename>setup.py from setuptools import setup # Reuse our current `setup.cfg` definition for the installation if __name__ == "__main__": setup()
python
package com.haulmont.sample.petclinic.service; import org.springframework.stereotype.Service; import java.util.Random; @Service(MockService.NAME) public class MockServiceBean implements MockService { @Override public String getRandomString() { return String.valueOf(new Random().nextLong()); } }
java
# Copyright 2004-2019 <NAME> <<EMAIL>> # # 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. from __future__ import print_function class Curry(object): """ Stores a callable and some arguments. When called, calls the callable with the stored arguments and the additional arguments supplied to the call. """ def __init__(self, callable, *args, **kwargs): # @ReservedAssignment self.callable = callable self.args = args self.kwargs = kwargs self.__doc__ = getattr(self.callable, "__doc__", None) def __call__(self, *args, **kwargs): return self.callable(*(self.args + args), **dict(self.kwargs.items() + kwargs.items())) def __repr__(self): return "<curry %s %r %r>" % (self.callable, self.args, self.kwargs) def __eq__(self, other): return ( isinstance(other, Curry) and self.callable == other.callable and self.args == other.args and self.kwargs == other.kwargs) def __ne__(self, other): return not (self == other) def __hash__(self): return hash(self.callable) ^ hash(self.args) ^ hash(self.kwargs) def curry(fn): """ Takes a callable, and returns something that, when called, returns something that when called again, calls the function. So basically, the thing returned from here when called twice does the same thing as the function called once. """ rv = Curry(Curry, fn) rv.__doc__ = getattr(fn, "__doc__", None) return rv def partial(function, *args, **kwargs): """ Stores the arguments and keyword arguments of function, and returns something that, when called, calls the function with a combination of the supplied arguments and the arguments of the second call. """ return Curry(function, *args, **kwargs)
python
New Delhi: Rain drenched the national capital on Saturday morning with the minimum temperature recorded at 17 degrees Celsius, a notch below the season's average. The Met office has forecast a gloomy day ahead with spells of rain again in the evening. "Till Saturday morning, Delhi received 15 mm of rainfall. The weather throughout the day is likely to remain gloomy," said an official of the India Meteorological Department (IMD). Humidity at 8. 30 am was 100 per cent. Friday's maximum temperature was recorded at 30. 4 degrees Celsius, three notches below the season's average while the minimum temperature settled at 19 degrees Celsius, a notch above the season's average.
english
declare function require(svgPath: string): string; export class SVGIcons { public static icons = { facetClear: require(`../assets/svg/facet-clear.svg`), calendar: require(`../assets/svg/calendar.svg`) }; }
typescript
[{"FIELD1": 3498, "key": "<KEY>", "star_name": "HD 92788", "planet_letter": "b", "discovery_method": "Radial Velocity", "pl_pnum": 1, "orbital_period": 325, "semi_major": 0.96, "orbital_eccentricity": 0.35, "star_temp": 5821, "star_radius": "NA", "planet_temp": "NA", "radius": "NA", "discovery_year": 2000, "light_years": 105.4136192}]
json
China's defence minister warned Sunday against establishing NATO-like military alliances in the Asia-Pacific, saying they would plunge the region into a "whirlpool" of conflict. Li Shangfu's comments came a day after US and Chinese military vessels sailed close to each other in the flashpoint Taiwan Strait, an incident that provoked anger from both sides. "Attempts to push for NATO-like (alliances) in the Asia-Pacific is a way of kidnapping regional countries and exaggerating conflicts and confrontations," Li told a security conference in Singapore also attended by US Defence Secretary Lloyd Austin. Li said these alliances would "plunge the Asia-Pacific into a whirlpool of disputes and conflicts". Li did not name any country, but his comments echoed long-held Chinese criticism of the United States seeking to shore up alliances in the region. The United States is a member of the AUKUS alliance, which groups it with Australia and Britain. Washington is also a member of the QUAD group, which includes Australia, India and Japan. "Today's Asia-Pacific needs open and inclusive cooperation, not buddying up into small cliques," Li said at the Shangri-La Dialogue security summit. "We must not forget the severe disasters brought by the two world wars to peoples of all countries, and we must not allow such tragic history to repeat itself. " On Saturday, Austin called for top-level defence dialogue with Beijing to prevent miscalculations that could draw both superpowers into conflict. "The more that we talk, the more that we can avoid the misunderstandings and miscalculations that could lead to crisis or conflict," Austin said. Austin and Li shook hands and spoke briefly for the first time at the opening dinner on Friday, but there was no substantive exchange. The United States had invited Li to meet with Austin on the sidelines of the conference, but the Pentagon said Beijing declined. A member of China's delegation told AFP that the removal of US sanctions on its minister is a precondition for talks. There have been some signs of improved dialogue between the two nations. CIA Director William Burns made a secret trip to China last month, a US official announced on Friday. And Assistant Secretary of State for East Asian and Pacific Affairs Daniel Kritenbrink will travel to China on Sunday for a rare visit. However the US and Chinese militaries have also engaged in dangerous encounters in two of the most sensitive areas in the region -- the Taiwan Strait and the South China Sea. US and Canadian warships sailed through the Taiwan Strait on Saturday, the waterway that separates self-ruled Taiwan from China. The United States on accused a Chinese Navy ship of sailing in an "unsafe manner" near the US vessel, the destroyer Chung-Hoon. China claims Taiwan as its territory -- vowing to take it one day, by force if necessary -- and has in recent years ramped up military and political pressure on the island. The Taiwan Straits encounter followed what the US military said was an "unnecessarily aggressive maneuver" by one of Beijing's fighter's near one of Washington's surveillance planes in the South China Sea last week. "We remain concerned about the PLA's increasingly risky and coercive activities in the region, including in recent days," said Pentagon spokesman Brigadier General Pat Ryder, who is travelling with Austin, following Li's speech. A senior US defense official also told reporters: "Actions speak louder than words, and the dangerous behaviour we've seen from the PLA around the Strait, in the South and East China Seas, and beyond really says it all. " In his speech Saturday, Lloyd outlined Washington's extensive partnerships in the region, which it calls the Indo-Pacific, and held talks with his counterparts from allies and partners. "America's partnerships are bringing the region closer together to help keep it free, open, and secure," he said. (Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed. )
english
Investment activities in Egypt continue to gain steam, not for startups only but also the funds backing them. Today, seed accelerator Flat6Labs announced the second close of its Egypt fund to support early-stage startups and provide follow-up investment. The fund had a target for EGP50 million (~$3.2 million) but eventually closed at EGP207 million ($13.2 million). Launched in 2011, Flat6Labs is a regional seed accelerator with offices in Egypt and Tunisia. The accelerator launched its Cairo programme in 2017 to invest in more than 100 startups across Egypt over the course of five years. Startups that get into the accelerator are provided with office space, legal and marketing help, and access to mentorship and networking, among other perks. They also receive between EGP500,000 and EGP750,000. However, with the close of this round, Flat6Labs has increased the check sizes to EGP1.5 million (~$95,000) and up to EGP3 million (~$191,000) in post-programme follow-on funding for selected startups. The International Finance Corporation (IFC), the MSME Development Agency, Egypt Ventures and the Egyptian American Enterprise Fund are the anchor investors in Flat6Labs’ seed fund. Sawari Ventures, which recently closed its $71 million fund, also participated in this second close, and it comes as no surprise because the firm, which is highly affiliated with the accelerator, said it would set aside 10% of its fund for Flat6Labs seed-stage companies when we covered them in April. The second close of Flat6Labs’ fund is the latest of four venture capital funds targeted at Egyptian startups. Shortly after Sawari Ventures’ close, Algebra Ventures announced launching a $90 million second fund. Subsequently, GIZ Egypt launched a €100 million funding programme to provide up to four MENA-based fund managers between €25-30 million and is exclusively targeted at Egypt-based startups. Flat6Labs is one of the continent’s active and well-known seed-stage accelerators. Just in Egypt alone, it has run seven cycles and invested in 62 startups. The venture capital firm and seed-stage accelerator provides a filter for some early-stage investors to source which companies to back (or not). A good portion of startups in Flat6Labs’ portfolio has piqued investors’ interests, and half of them that have gone on to raise more money also received follow-up investment from Flat6Labs, totalling EGP145,000,000 (~$9.25 million). Some of the startups in Flat6Labs’ portfolio include Welnes, Glued, CreditGo and Docspert Health.
english
from pathlib import Path import pytest from pyinstrument.__main__ import main from pyinstrument.renderers.base import FrameRenderer from .util import BUSY_WAIT_SCRIPT fake_renderer_instance = None class FakeRenderer(FrameRenderer): def __init__(self, time=None, **kwargs): self.time = time super().__init__(**kwargs) global fake_renderer_instance fake_renderer_instance = self print("instance") def default_processors(self): """ Return a list of processors that this renderer uses by default. """ return [] def render(self, session) -> str: return "" def test_renderer_option(monkeypatch: pytest.MonkeyPatch, tmp_path: Path): (tmp_path / "test_program.py").write_text(BUSY_WAIT_SCRIPT) monkeypatch.setattr( "sys.argv", [ "pyinstrument", "-r", "test.test_cmdline_main.FakeRenderer", "-p", "time=percent_of_total", "test_program.py", ], ) monkeypatch.chdir(tmp_path) global fake_renderer_instance fake_renderer_instance = None main() assert fake_renderer_instance is not None assert fake_renderer_instance.time == "percent_of_total" def test_json_renderer_option(monkeypatch: pytest.MonkeyPatch, tmp_path: Path): (tmp_path / "test_program.py").write_text(BUSY_WAIT_SCRIPT) monkeypatch.setattr( "sys.argv", [ "pyinstrument", "-r", "test.test_cmdline_main.FakeRenderer", "-p", 'processor_options={"some_option": 44}', "test_program.py", ], ) monkeypatch.chdir(tmp_path) global fake_renderer_instance fake_renderer_instance = None main() assert fake_renderer_instance is not None assert fake_renderer_instance.processor_options["some_option"] == 44 def test_dotted_renderer_option(monkeypatch: pytest.MonkeyPatch, tmp_path: Path): (tmp_path / "test_program.py").write_text(BUSY_WAIT_SCRIPT) monkeypatch.setattr( "sys.argv", [ "pyinstrument", "-r", "test.test_cmdline_main.FakeRenderer", "-p", "processor_options.other_option=13", "test_program.py", ], ) monkeypatch.chdir(tmp_path) global fake_renderer_instance fake_renderer_instance = None main() assert fake_renderer_instance is not None assert fake_renderer_instance.processor_options["other_option"] == 13
python
<gh_stars>0 export { default as Header } from './Header'; export { default as Tabs } from './Tabs'; export { default as Menu } from './Menu';
javascript
{ "id": 11325, "source": "ellicott", "verse_id": 18308, "verse_count": 1, "reference": "34:4", "title": "", "html": " <p> (4) And all the host of heaven shall be dissolved . . .\u2014No prophetic picture of a \u201cday of the Lord\u201d was complete without this symbolism (see <a class=\"isa\" verses=\"eyIxNzkxNyI6Mn0=\">Isaiah 13:10-11<\/a>), probably written about this period. Like the psalmist (<a class=\"ref\">Psalms 102:26<\/a>), Isaiah contrasts the transitoriness of sun, moon, and stars, with the eternity of Jehovah. The Greek poets sing that the \u201clife of the generations of men is as the life of the leaves of the trees\u201d (Homer, Il. vi. 146). To Isaiah\u2019s sublime thoughts there came the vision of a time when even the host of heaven would fall as \u201ca leaf from the vine, and as a fig from the fig-tree.\u201d <\/p> ", "audit": null }
json
One of the most popular styles of clothing that has emerged in the last few decades is the French and American styles. People of European descent have long been drawn to the fashionable looks portrayed in American fashion and vice versa. While you might not think it to be possible, French and American fashion trends do have a lot in common. A lot of clothing designers have been drawn to both these simplified styles because of their interesting and unique characteristics. French fashion has always had a strong emphasis on dress form-fitting clothes that are flattering to the figure. The art of sewing intricate and beautiful fabrics with the utmost precision has been passed down through the generations. French designers use this knowledge to create elegant clothing pieces that are functional and beautiful. The French style is all about using heavy fabrics like linen, velvet, and crepe materials to great advantage. The art of French fashion has also made it easy for clothing designers to make versatile clothing items that can go well with a variety of different outfits. There are many different designs that are influenced by French fashion, and people with an interest in French designs find that it easy to incorporate those designs into their own wardrobe. A lot of women’s clothing lines have been copied by French designers, and there are many reasons for this. The most obvious reason for French fashions is of course their reputation. Many of the French fashions have been popularized by famous American designers like Calvin Klein, John Galliano, and Liz Claiborne. American and French fashion also have a lot in common with their ethnic influences. French designers tend to draw from European culture heavily and marry it with the styles of the United States. Some of the most popular designers who have chosen to wear French styling are Christian Dior, Yves Saint Laurent, and Jean-Paul Gaultier. Of course, each of these designers has his own unique style, and his influence on fashion is far-reaching. French designers tend to be skilled at assimilating European design features into their own style, and they can borrow materials and even patterns. This results in a whole palette of looks that can easily match an outfit for both casual and dressy occasions. However, there are a few differences. France accuses American women of wearing over-the-top party dressing, which doesn’t go that well in Europe. Americans overdo leggings that the french women usually don’t. Super-High Heels, sometimes incredibly uncomfortable, is another turn-off. However, other than these three differences, the similarities are magical. French and American street fashion trends continue to change and evolve as more people become interested in the French way of life. There is no sign of the trend dying away any time soon, especially since there is such a diverse population that tends to identify strongly with the French way of doing things. French fashion trends are likely to evolve further and become even more integrated into the lives of more people worldwide in the years to come.
english
Want to check the Wi-Fi signal quality on Windows? Here are a few different ways to find the Wi-Fi signal strength on your Windows 11 computer. Automatically changing your Mac wallpaper doesn’t require rocket science. Here are the best ways to auto-rotate wallpapers on Mac. Do you like to keep an eye on the weather? Well then you must check out Apple’s Weather Maps feature on iPhone or iPad. If you are an avid Discord user and your device is running out of storage space, here’s how to clear Discord’s cache from all devices. Is Mozilla Firefox browser showing updates pending? Here are the steps on how to update Mozilla Firefox on Mobile and Desktop. Did you just buy the new 10.9-inch 10th-generation Apple iPad? If yes, up your productivity with the best Apple iPad 10th Gen cases with keyboard. In this post, we will show the best ways to format an SD card on your Windows 11 PC or laptop. Ensure that you have a backup of your data. Using Apple AirPlay and not quite sure of how to turn it off after use? Here are the three best ways you can do so. Can’t access the Messenger camera on your Android or iPhone? Here are some top ways to fix the Messenger camera on your phone. Here’s how to use the Google Chat on mobile and web to start and continue conversations with your contacts. Facing the problem of your iPhone not automatically connecting to WiFi? Read this guide to know more and resolve the issue! Messaging yourself on WhatsApp is a much efficient way of note-keeping and remembering things, here’s how you can do it. Wish to use your mobile data connection with more than one device? You can do so by getting a router with a SIM card slot. Are you planning to upgrade the smoke and carbon monoxide detectors in your house? Take the short route and check out these battery-operated smoke and carbon monoxide detectors. Notification badges for apps not showing on your iPhone? Here’s a list of helpful solutions to help you fix this. If Dolby Atmos is not working in Apple Music on your iPhone, here are some solutions that will help you fix the same. It’s frustrating when Microsoft Edge does not open or keeps crashing on Windows. Here’s what you can do to troubleshoot the problem. Instagram not working on mobile data is never an ideal situation. Here are the best ways to fix the problem. Download your Twitter archive to keep a local record of your data, before you delete your account. Read our article to know more! Ever wondered how to use the Compass app on iPhone and want to understand the information it shows? Read this guide as we help you do so!
english
Contents of the translations can be downloaded and re-published, with the following terms and conditions: 1. No modification, addition, or deletion of the content. 2. Clearly referring to the publisher and the source (HadeethEnc.com). 3. Mentioning the version number when re-publishing the translation. 4. Keeping the transcript information inside the document. 5. Notifying the source (HadeethEnc.com) of any note on the translation. 6. Updating the translation according to the latest version issued from the source (HadeethEnc.com).
english
{ "author": { "id": "t2_945th", "name": "HynraFoo" }, "date": { "day": 1608940800, "full": 1608996190, "month": 1606780800, "week": 1608422400 }, "id": "t3_kkk5tb", "misc": { "postHint": "image" }, "picture": { "filesize": 183518, "fullUrl": "https://preview.redd.it/vem8r8a1uj761.jpg?auto=webp&s=a8aa9972c5c18f8d10c574bcf1de4ebca608bf77", "hash": "61d3319f09", "height": 982, "lqip": "data:image/jpg;base64,/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAQAAoDASIAAhEBAxEB/8QAFgABAQEAAAAAAAAAAAAAAAAAAwIH/8QAIRAAAgICAgEFAAAAAAAAAAAAAQIDBBESACEFEzFBcZH/xAAUAQEAAAAAAAAAAAAAAAAAAAAE/8QAGBEBAQEBAQAAAAAAAAAAAAAAAQIAESH/2gAMAwEAAhEDEQA/AM1ox+hfdpa73a+pVFniLIAcHYYPfz7HkTVqqTOieRlKqxAIrY6+s9cSnPMkCiKRMxLpHqMjA4EiO0jNIYNySWye8/vAsdetZ82ngb//2Q==", "thumbnailUrl": "https://b.thumbs.redditmedia.com/CGd26_GRiVIREK1PmQe7Pbt_tEpvol8JpPbitIN79fo.jpg", "url": "https://preview.redd.it/vem8r8a1uj761.jpg?width=640&crop=smart&auto=webp&s=a77331cdd5f8d6e480b5a9745075d0d299a1ea5e", "width": 640 }, "score": { "comments": 1, "downs": 0, "isCurated": false, "ratio": 0.87, "ups": 11, "value": 11 }, "subreddit": { "id": "t5_3isai", "name": "dndmaps" }, "tags": ["Encounter"], "title": "The City - Castle and Market", "url": "https://www.reddit.com/r/dndmaps/comments/kkk5tb/the_city_castle_and_market/" }
json
body{ margin: 0; padding: 0; box-sizing: border-box; font-family: 'Merienda', cursive !important; } .container{ background-image: url("./../images/flour4.jpg"); background-repeat: no-repeat; background-size: cover; color: white; text-align: center; } .start{ font-size: xx-small; color: rgb(134, 130, 117); } .main{ box-shadow: 0 25px 0 -23px #5CC7A8; } .pizzaimgmsg{ width: 50vw; margin: auto; position: relative; } .pizzaimg{ width: 50vw; height: 40vh; border: 2px solid white; } .pizzamsg{ position: absolute; left: 0; background-color: rgba(36, 35, 35, 0.6); top: 0; height: 40vh; width: 20vw; } .sec2{ width: 60vw; text-align: center; } .ourpizza{ width: 60vw; margin: auto; display: flex; justify-content: space-around; } .ourpizzaimg{ width: 200px; border-radius: 80%; } .lists{ display: flex; justify-content: center; } .pizza1{ background: none; } .order{ width: 60vw; margin-top: 10px; margin: auto; display: flex; justify-content: space-between; } .pizzas{ width: 12vw; } .navlink{ color: white; } .nav-item{ padding: 5px; } .order-online{ padding: 5px; background-color: rgba(154, 205, 50, 0.4) ; border: 2px solid white; border-radius: 30%; } #orderonline{ text-decoration: underline!important; color: rgba(154, 205, 50, 0.8) ; } .selection{ width: 70vw; margin: auto; display: flex; justify-content: space-around; } .btnorder, #okay, #heyorder{ margin-top: 5px; background: rgba(154, 205, 50, 0.5) !important; color: white !important; } form h4{ text-align: center; color: white; } form textarea{ width: 60%; margin: auto; background: none; border: 1px solid white; } form input{ width: 30%; border: 1px solid white; outline: none; background: none; color: white; margin-bottom: 5px; margin-right: 15px; } /* footer */ footer{ color: black; background-color: aliceblue; display: flex; justify-content: center; padding-top: 10px; margin-top: 5px; font-family: 'Paprika', cursive !important; } /* form */ form h4{ color: black; font-family: 'Paprika', cursive !important; } input, textarea{ border: 1px solid black !important; } div.inputs{ display: flex; justify-content: center; } .textin{ text-align: center; } .sbmtbtn{ text-align: center; padding-top: 5px; padding-bottom: 25px; } #customerOrder{ margin-top: 20px !important; width: 70% !important; margin-left: auto !important; margin-right: auto !important; color: white !important; display: none; } #checkout, #deliv, #chosenlocation, #addanother, #heyorder{ display: none; } .fa, .contdetails a{ color: rgb(96, 97, 26) !important; margin: 10px; } .contdetails a:hover{ color: rgb(189, 192, 24) !important; } .navlink:hover{ color: yellowgreen; } /* mediaquery */ @media only screen and (max-width: 767px){ .ourpizza{ display: flex; flex-direction: column; } .selection{ width: 100%; } footer{ display: flex; flex-direction: column; } form{ margin-top: 15px; } .pizzamsg{ width: 100%; } .ph{ font-size: smaller; } } @media only screen and (max-width: 424px){ #size, #topping, #crust{ font-size: smaller; } } @media only screen and (max-width:374px){ .ph{ font-size: x-small; } table{ width: 100%; font-size: small; } }
css
<filename>src/tools/CHapticPoint.cpp //============================================================================== /* Software License Agreement (BSD License) Copyright (c) 2003-2016, CHAI3D. (www.chai3d.org) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of CHAI3D nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \author <http://www.chai3d.org> \author <NAME> \version $MAJOR.$MINOR.$RELEASE $Rev: 2158 $ */ //============================================================================== //------------------------------------------------------------------------------ #include "tools/CHapticPoint.h" //------------------------------------------------------------------------------ #include "tools/CGenericTool.h" #include "world/CMultiMesh.h" //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ namespace chai3d { //------------------------------------------------------------------------------ //============================================================================== /*! Constructor of cHapticPoint. */ //============================================================================== cHapticPoint::cHapticPoint(cGenericTool* a_parentTool) { // set parent tool m_parentTool = a_parentTool; // initialize variables m_radiusDisplay = 0.0; m_radiusContact = 0.0; m_lastComputedGlobalForce.zero(); m_meshProxyContacts[0] = NULL; m_meshProxyContacts[1] = NULL; m_meshProxyContacts[2] = NULL; m_audioSourceImpact[0] = NULL; m_audioSourceImpact[1] = NULL; m_audioSourceImpact[2] = NULL; m_audioSourceFriction[0] = NULL; m_audioSourceFriction[1] = NULL; m_audioSourceFriction[2] = NULL; m_audioProxyContacts[0] = NULL; m_audioProxyContacts[1] = NULL; m_audioProxyContacts[2] = NULL; m_useAudioSources = false; // create finger-proxy algorithm used for modelling contacts with // cMesh objects. m_algorithmFingerProxy = new cAlgorithmFingerProxy(); // create potential field algorithm used for modelling interaction // forces with haptic effects. m_algorithmPotentialField = new cAlgorithmPotentialField(); // create sphere object used for rendering the Proxy position. m_sphereProxy = new cShapeSphere(0.0); // create sphere object used for rendering the Goal position. m_sphereGoal = new cShapeSphere(0.0); // Set default radius of proxy and goal spheres setRadius(0.01, 0.01); // define a color for the proxy sphere m_sphereProxy->m_material->setGrayDim(); // define a color for the goal sphere m_sphereGoal->m_material->setGrayLight(); // Initialize force rendering algorithms initialize(cVector3d(0.0, 0.0, 0.0)); } //============================================================================== /*! Destructor of cHapticPoint. */ //============================================================================== cHapticPoint::~cHapticPoint() { // delete force rendering algorithms delete m_algorithmFingerProxy; delete m_algorithmPotentialField; // delete graphical spheres (proxy and goal) delete m_sphereProxy; delete m_sphereGoal; // delete audio sources for impact for (int i = 0; i<3; i++) { if (m_audioSourceImpact[i] != NULL) { delete m_audioSourceImpact[i]; } } // delete audio sources for friction for (int i = 0; i<3; i++) { if (m_audioSourceFriction[i] != NULL) { delete m_audioSourceFriction[i]; } } } //============================================================================== /*! This method returns the current desired goal position of the contact point in world global coordinates. \return Goal position of haptic point. */ //============================================================================== cVector3d cHapticPoint::getGlobalPosGoal() { return(m_algorithmFingerProxy->getDeviceGlobalPosition()); } //============================================================================== /*! This method returns the current proxy position of the haptic point in world global coordinates. \return Proxy position of haptic point. */ //============================================================================== cVector3d cHapticPoint::getGlobalPosProxy() { return(m_algorithmFingerProxy->getProxyGlobalPosition()); } //============================================================================== /*! This method returns the current desired goal position of the haptic point in local tool coordinates. \return Goal position of haptic point. */ //============================================================================== cVector3d cHapticPoint::getLocalPosGoal() { cMatrix3d rot; cVector3d newpos; cVector3d toolGlobalPos = m_parentTool->getGlobalPos(); cMatrix3d toolGlobalRot = m_parentTool->getGlobalRot(); cVector3d pos = m_algorithmFingerProxy->getDeviceGlobalPosition(); toolGlobalRot.transr(rot); pos.sub(toolGlobalPos); rot.mulr(pos, newpos); return(newpos); } //============================================================================== /*! This method returns the current proxy position of the haptic point in local tool coordinates. \return Proxy position of haptic point. */ //============================================================================== cVector3d cHapticPoint::getLocalPosProxy() { cMatrix3d rot; cVector3d newpos; cVector3d toolGlobalPos = m_parentTool->getGlobalPos(); cMatrix3d toolGlobalRot = m_parentTool->getGlobalRot(); cVector3d pos = m_algorithmFingerProxy->getProxyGlobalPosition(); toolGlobalRot.transr(rot); pos.sub(toolGlobalPos); rot.mulr(pos, newpos); return(newpos); } //============================================================================== /*! This method resets the position of the proxy to be at the current desired goal position. */ //============================================================================== void cHapticPoint::initialize() { // reset finger proxy algorithm by placing the proxy and the same position // as the goal. m_algorithmFingerProxy->reset(); // update position of proxy and goal spheres in tool coordinates updateSpherePositions(); } //============================================================================== /*! This method initializes the position of the haptic point to a new desired position. The __proxy__ and the __device__ are set to the same value despite any constraints. \param a_globalPos New desired position of the haptic point. */ //============================================================================== void cHapticPoint::initialize(cVector3d a_globalPos) { // initialize proxy algorithm. m_algorithmFingerProxy->initialize(m_parentTool->getParentWorld(), a_globalPos); m_algorithmPotentialField->initialize(m_parentTool->getParentWorld(), a_globalPos); // update position of proxy and goal spheres in tool coordinates updateSpherePositions(); } //============================================================================== /*! This method sets the radius size of the haptic point. The radius affects the physical radius of the proxy and the radius of the spheres that are used to render the goal and proxy positions. \param a_radius New radius for display rendering and contact computation. */ //============================================================================== void cHapticPoint::setRadius(double a_radius) { m_radiusContact = a_radius; m_radiusDisplay = a_radius; // set the radius of the contact model of the proxy m_algorithmFingerProxy->setProxyRadius(m_radiusContact); // set radius of proxy and goal. goal radius is slightly smaller to avoid graphical // artifacts when both sphere are located at the same position. m_sphereProxy->setRadius(m_radiusDisplay); m_sphereGoal->setRadius(0.95 * m_radiusDisplay); } //============================================================================== /*! This method sets the radius size of the display spheres (goal and proxy) and physical contact sphere (proxy) used to compute the contact forces. Setting the a_radiusContact parameter to zero will generally accelerate the force rendering algorithm. For more realistic effects, settings both values to be identical is recommended \param a_radiusDisplay New radius for display of spheres (proxy and goal). \param a_radiusContact New radius for contact computation (proxy). */ //============================================================================== void cHapticPoint::setRadius(double a_radiusDisplay, double a_radiusContact) { m_radiusContact = a_radiusContact; m_radiusDisplay = a_radiusDisplay; // set the radius of the contact model of the proxy m_algorithmFingerProxy->setProxyRadius(m_radiusContact); // set radius of proxy and goal. goal radius is slightly smaller to avoid graphical // artifacts when both sphere are located at the same position. m_sphereProxy->setRadius(m_radiusDisplay); m_sphereGoal->setRadius(0.95 * m_radiusDisplay); } //============================================================================== /*! This method sets the radius size of the physical proxy. \param a_radiusContact New radius for contact computation (proxy). */ //============================================================================== void cHapticPoint::setRadiusContact(double a_radiusContact) { m_radiusContact = a_radiusContact; // set the radius of the contact model of the proxy m_algorithmFingerProxy->setProxyRadius(m_radiusContact); } //============================================================================== /*! This method sets the radius size of the sphere used to display the proxy and goal position. \param a_radiusDisplay New radius for display of spheres (proxy and goal). */ //============================================================================== void cHapticPoint::setRadiusDisplay(double a_radiusDisplay) { m_radiusDisplay = a_radiusDisplay; // set radius of proxy and goal. goal radius is slightly smaller to avoid graphical // artifacts when both sphere are located at the same position. m_sphereProxy->setRadius(m_radiusDisplay); m_sphereGoal->setRadius(0.99 * m_radiusDisplay); } //============================================================================== /*! This method sets the display options of the goal and proxy spheres. If both spheres are enabled, a small line is drawn between both spheres. \param a_showProxy If __true__, then the proxy sphere is displayed. \param a_showGoal If __true__, then the goal sphere is displayed. \param a_colorLine Color of line connecting proxy to goal spheres. */ //============================================================================== void cHapticPoint::setShow(bool a_showProxy, bool a_showGoal, cColorf a_colorLine) { // update display properties of both spheres m_sphereProxy->setShowEnabled(a_showProxy); m_sphereGoal->setShowEnabled(a_showGoal); m_colorLine = a_colorLine; } //============================================================================== /*! This method creates an audio source for this haptic point. \param a_audioDevice Audio device. */ //============================================================================== bool cHapticPoint::createAudioSource(cAudioDevice* a_audioDevice) { // sanity check if (a_audioDevice == NULL) { return (C_ERROR); } // create three audio sources for impact for (int i=0; i<3; i++) { m_audioSourceImpact[i] = new cAudioSource(); } // create three audio sources for friction for (int i=0; i<3; i++) { m_audioSourceFriction[i] = new cAudioSource(); } // audio sources have been created and are now enabled m_useAudioSources = true; // success return (C_SUCCESS); } //============================================================================== /*! This method computes all interaction forces between the tool haptic points and the virtual environment. \param a_globalPos New desired goal position. \param a_globalRot New desired goal rotation. \param a_globalLinVel Linear velocity of tool. \param a_globalAngVel Angular velocity of tool. \return Computed interaction force in world coordinates. */ //============================================================================== cVector3d cHapticPoint::computeInteractionForces(cVector3d& a_globalPos, cMatrix3d& a_globalRot, cVector3d& a_globalLinVel, cVector3d& a_globalAngVel) { /////////////////////////////////////////////////////////////////////////// // ALGORITHM FINGER PROXY /////////////////////////////////////////////////////////////////////////// // we first consider all object the proxy may have been in contact with and // mark their interaction as no longer active. for (int i=0; i<3; i++) { if (m_meshProxyContacts[i] != NULL) { m_meshProxyContacts[i]->m_interactionInside = false; cMultiMesh* multiMesh = dynamic_cast<cMultiMesh*>(m_meshProxyContacts[i]->getOwner()); if (multiMesh != NULL) { multiMesh->m_interactionInside = false; } m_meshProxyContacts[i] = NULL; } } // we now update the new position of a goal point and update the proxy position. // As a result, the force contribution from the proxy is now calculated. cVector3d force0 = m_algorithmFingerProxy->computeForces(a_globalPos, a_globalLinVel); // we now flag each mesh for which the proxy may be interacting with. This information is // necessary for haptic effects that may be associated with these mesh objects. for (int i=0; i<3; i++) { if (m_algorithmFingerProxy->m_collisionEvents[i]->m_object != NULL) { m_meshProxyContacts[i] = m_algorithmFingerProxy->m_collisionEvents[i]->m_object; cGenericObject* object = m_meshProxyContacts[i]; object->m_interactionInside = true; object->m_interactionPoint = m_algorithmFingerProxy->m_collisionEvents[i]->m_localPos; object->m_interactionNormal = m_algorithmFingerProxy->m_collisionEvents[i]->m_localNormal; cMultiMesh* multiMesh = dynamic_cast<cMultiMesh*>(m_meshProxyContacts[i]->getOwner()); if (multiMesh != NULL) { multiMesh->m_interactionInside = true; multiMesh->m_interactionPoint = cAdd(object->getLocalPos(), cMul(object->getLocalRot(),object->m_interactionPoint)); multiMesh->m_interactionNormal = cMul(object->getLocalRot(), object->m_interactionNormal); } } } /////////////////////////////////////////////////////////////////////////// // ALGORITHM POTENTIAL FIELD /////////////////////////////////////////////////////////////////////////// // compute interaction forces (haptic effects) in world coordinates between tool and all // objects for which haptic effects have been programmed cVector3d force1 = m_algorithmPotentialField->computeForces(a_globalPos, a_globalLinVel); /////////////////////////////////////////////////////////////////////////// // FINALIZATION /////////////////////////////////////////////////////////////////////////// // update position of proxy and goal spheres in tool coordinates updateSpherePositions(); // finally return the contribution from both force models. force0.addr(force1, m_lastComputedGlobalForce); /////////////////////////////////////////////////////////////////////////// // AUDIO /////////////////////////////////////////////////////////////////////////// // force magnitude double force = m_lastComputedGlobalForce.length(); // velocity of tool double velocity = m_parentTool->getDeviceGlobalLinVel().length(); // friction sound if (m_useAudioSources) { for (int i=0; i<3; i++) { /////////////////////////////////////////////////////////////////// // FRICTION SOUND /////////////////////////////////////////////////////////////////// m_audioSourceFriction[i]->setSourcePos(a_globalPos); // if tool is not in contact, or material does not exist, turn off sound. if (m_meshProxyContacts[i] == NULL) { m_audioSourceFriction[i]->setGain(0.0); } // if tool is in contact and material exist else { // check if tool is touching a new material, in which case we swap audio buffers if (m_meshProxyContacts[i]->m_material->getAudioFrictionBuffer() != NULL) { if (m_audioSourceFriction[i]->getAudioBuffer() != m_meshProxyContacts[i]->m_material->getAudioFrictionBuffer()) { m_audioSourceFriction[i]->stop(); m_audioSourceFriction[i]->setGain(0.0); m_audioSourceFriction[i]->setPitch(1.0); m_audioSourceFriction[i]->setAudioBuffer(m_meshProxyContacts[i]->m_material->getAudioFrictionBuffer()); m_audioSourceFriction[i]->setLoop(true); m_audioSourceFriction[i]->play(); } } // we compute an angle that compares the velocity of the tool with the reaction force. This friction maximizes // returns a value between o.0 and 1.0 which maximize tangential forces, versus normal forces. The higher // the tangential force, the higher the sound level. This is slightly hacky but could be improved by // taking the exact tangential component of the force. double angleFactor = 0.0; if ((force > C_SMALL) && (velocity > C_SMALL)) { angleFactor = cSqr(cSqr(sin(cAngle(m_lastComputedGlobalForce, m_parentTool->getDeviceGlobalLinVel())))) ; } // adjust audio gains according to material properties, and force and velocity of tool. m_audioSourceFriction[i]->setGain((float)(m_meshProxyContacts[i]->m_material->getAudioFrictionGain() * angleFactor * force * cSqr(velocity))); m_audioSourceFriction[i]->setPitch((float)(m_meshProxyContacts[i]->m_material->getAudioFrictionPitchOffset() + m_meshProxyContacts[i]->m_material->getAudioFrictionPitchGain() * velocity)); } /////////////////////////////////////////////////////////////////// // IMAPCT SOUND /////////////////////////////////////////////////////////////////// m_audioSourceImpact[i]->setSourcePos(a_globalPos); if ((m_audioProxyContacts[i] == NULL) && (m_meshProxyContacts[i] != NULL)) { if ((m_audioSourceImpact[i]->getAudioBuffer() != m_meshProxyContacts[i]->m_material->getAudioImpactBuffer()) && (m_meshProxyContacts[i]->m_material->getAudioImpactBuffer() != NULL)) { m_audioSourceImpact[i]->stop(); m_audioSourceImpact[i]->setAudioBuffer(m_meshProxyContacts[i]->m_material->getAudioImpactBuffer()); m_audioSourceImpact[i]->setLoop(false); } m_audioSourceImpact[i]->setGain((float)(m_meshProxyContacts[i]->m_material->getAudioImpactGain() * cSqr(velocity))); m_audioSourceImpact[i]->play(); } // update contact list m_audioProxyContacts[i] = m_meshProxyContacts[i]; } } // return result return (m_lastComputedGlobalForce); } //============================================================================== /*! This method checks if the tool is touching a particular object passed as argument. \param a_object Object to checked for possible contact. \return __true__ if the object is in contact with tool, __false__ otherwise. */ //============================================================================== bool cHapticPoint::isInContact(cGenericObject* a_object) { ///////////////////////////////////////////////////////////////////// // verify finger-proxy algorithm ///////////////////////////////////////////////////////////////////// // contact 0 if (m_algorithmFingerProxy->m_collisionEvents[0]->m_object == a_object) { return (true); } // contact 1 if ((m_algorithmFingerProxy->m_collisionEvents[0]->m_object != NULL) && (m_algorithmFingerProxy->m_collisionEvents[1]->m_object == a_object)) { return (true); } // contact 2 if ((m_algorithmFingerProxy->m_collisionEvents[0]->m_object != NULL) && (m_algorithmFingerProxy->m_collisionEvents[1]->m_object != NULL) && (m_algorithmFingerProxy->m_collisionEvents[2]->m_object == a_object)) { return (true); } ///////////////////////////////////////////////////////////////////// // verify potential-field algorithm ///////////////////////////////////////////////////////////////////// unsigned int num = (int)(m_algorithmPotentialField->m_interactionRecorder.m_interactions.size()); unsigned int i = 0; while (i < num) { // check next interaction if (m_algorithmPotentialField->m_interactionRecorder.m_interactions[i].m_object == a_object) { return (true); } // increment counter i++; } // no object in contact return (false); } //============================================================================== /*! This method renders the tool graphically using OpenGL. \param a_options Rendering options. */ //============================================================================== void cHapticPoint::render(cRenderOptions& a_options) { #ifdef C_USE_OPENGL ///////////////////////////////////////////////////////////////////////// // Render parts that are always opaque ///////////////////////////////////////////////////////////////////////// if (SECTION_RENDER_OPAQUE_PARTS_ONLY(a_options)) { // render line only if both spheres are enabled for display if (m_sphereProxy->getShowEnabled() && m_sphereGoal->getShowEnabled()) { // disable lighting glDisable(GL_LIGHTING); // points describe line extremities cVector3d posA = m_sphereProxy->getLocalPos(); cVector3d posB = m_sphereGoal->getLocalPos(); // draw line glBegin(GL_LINES); m_colorLine.render(); glVertex3dv(&posA(0) ); glVertex3dv(&posB(0) ); glEnd(); // restore lighting to default value glEnable(GL_LIGHTING); } } ///////////////////////////////////////////////////////////////////////// // Render other objects ///////////////////////////////////////////////////////////////////////// // render proxy sphere m_sphereProxy->renderSceneGraph(a_options); // render goal sphere m_sphereGoal->renderSceneGraph(a_options); // render proxy algorithm (debug purposes) //m_algorithmFingerProxy->render(a_options); #endif } //============================================================================== /*! This method updates the position of the spheres in tool coordinates. The position of the actual proxy and goal spheres need to be expressed in the tool's local coordinate system. This comes from the fact that the contact points are rendered at the same time as the tool, respectively when the OpenGL model view matrix corresponds to the one of the parent tool. */ //============================================================================== void cHapticPoint::updateSpherePositions() { // sanity check if (m_parentTool == NULL) { return; } // position and orientation of tool in world global coordinates cMatrix3d toolGlobalRot = m_parentTool->getGlobalRot(); // temp variables cVector3d pos; cMatrix3d rot; toolGlobalRot.transr(rot); // update position of proxy sphere pos = getLocalPosProxy(); m_sphereProxy->setLocalPos(pos); // update position of goal sphere pos = getLocalPosGoal(); m_sphereGoal->setLocalPos(pos); } //------------------------------------------------------------------------------ } // namespace chai3d //------------------------------------------------------------------------------
cpp
<reponame>anhtaka/holiday.github.io<filename>app4.js const https = require('https') let url = 'https://anhtaka.github.io/holiday-node/holiday-main.json'; const AryHoliday = []; function f() { //let promise = new Promise((resolve, reject) => { const req = https.get(url, (res) => { res.on('data', (chunk) => { const chunkString = chunk.toString(); const obj = JSON.parse(chunkString); //AryHoliday = obj.holiday.DATA; for (item in obj.holiday) { //console.log(obj.holiday[item].DATA); AryHoliday.push(obj.holiday[item].DATA); } console.log(AryHoliday); }); res.on('end', () => { console.log('JSONデータは以上です。'); }); }) req.on('error', (e) => { console.error(`エラーが出ました: ${e.message}`); }); req.end(); //return Promise.resolve(1); //}); //let result = await promise; return 1; } f(); // 1 console.log("tedt1");
javascript
{ "id": "d533-88", "text": "- 2 -\nFirst of all, I must get my chore out of the way. Mr. Hayes, when he invited\nme here, said I was to tell you what to do and how to do it. I can do that in three\nsentences.\nFirst, define your objectives specifically in terms of your own museum.\nSecond, make a study of your community to find out what the prevailing attitudes\nare. Find out the radio and TV stations in your community and their interests.\nFinally, work out plans of activities and translate your program into action.\nThere you have it. It*s really very simple.\nHow, lest you think I haven9t gone into your field a little more in detail,\npermit me to suggest that Mr. <NAME>* survey of some years ago is familiar\nto a great many educational radio people. There seem to \"be four problems facing\nmuseums:\n1- The problem of personnel to head museums.\n2- Support for museums -- inadequate contributions and the problem of getting\npeople to attend and use museum facilities.\n3~ The problem of satisfying the needs of various groups which use museums,\nchildren, adults, and etcetra.\n*4- Public relations problem of using all avenues of approach to the public to\nmeet your problems of financial support and attendance.\nIn the present state of civil defense planning, the problem of morale is still\nan important one. Museums more than any other single force can build morale by in¬\ncreasing people* s belief in the future and themselves by showing them the past and the\npresent.\nMuseums also provide an escape for people made tense by continued, highly charged,\nnews reports." }
json
Welcome to the EduWiki Campaign! We are glad you are here. We want to challenge the traditional definition of education. In the EduWiki community, we believe that learning is editing. If you believe in changing by doing, you have come to the right place! The goal of this global campaign is to engage educators in using Wikimedia Projects in their lessons, namely Wikipedia. To this end, we have created four different lesson plans, for you to pick what works best for your classroom and test with your students. This is a chance for you to get to know more about the Wikimedia Education Program, the Education Collaborative, and get some hands-on practice with tested activities. Your work can advance digital literacy in education and strengthen the connections of our international community. Join the campaign from September 4 to October 31. |Join this campaign! Follow these steps: Don't forget to spread the word about the campaign on social media! Use the hashtag #EduWiki. |Why join the campaign? A: Through these lessons, the skills that students will learn are lasting: not only will they gain the technical knowledge of learning how to edit a page, they will also learn the values of collaborating with others, using free licenses, and practicing the values of the Wikimedia movement’s culture. Q: What does edit mean on Wikimedia projects? A: The definition of an “edit” on Wikipedia is not limited to editing text on a page—it can also mean adding images and references, translating, or creating content. Q: What materials will I need to support this campaign in my classroom? A: Educators will need a computer with Internet connection, a Wiki account, and one or more lesson plans. Students will each need a computer with Internet connection and a Wiki account. Q: I’m unconvinced that Wikipedia assignments would be better for my students than traditional assignments. A: Students polled preferred a Wikipedia assignment to a traditional assignment. Q: There are a lot of vandals on Wikipedia. My students might encounter incorrect information on an article. A: Wikipedia has an elaborate system for detecting and discouraging vandals and vandalism. For the full FAQ, click here. See the full community of Collab leaders here.
english
<gh_stars>0 from flask import Flask, g import os import json_logging import logging import sys import importlib from krules_env import init from dependency_injector import providers from krules_core.providers import ( subject_factory, event_router_factory ) from krules_core.utils import load_rules_from_rulesdata def g_wrap(current, *args, **kwargs): event_info = kwargs.pop("event_info", None) if not getattr(g, "subjects", None): g.subjects = [] if event_info is None and len(g.subjects) > 0: event_info = g.subjects[0].event_info() subject = current(*args, event_info=event_info, **kwargs) g.subjects.append(subject) return subject class KRulesApp(Flask): def __init__( self, import_name, static_url_path=None, static_folder="static", static_host=None, host_matching=False, subdomain_matching=False, template_folder="templates", instance_path=None, instance_relative_config=False, root_path=None, ): super().__init__( import_name, static_url_path, static_folder, static_host, host_matching, subdomain_matching, template_folder, instance_path, instance_relative_config, root_path ) json_logging.ENABLE_JSON_LOGGING = True json_logging.init_flask(enable_json=True) json_logging.init_request_instrument(self) self.logger = logging.getLogger(self.name) self.logger.setLevel(int(os.environ.get("LOGGING_LEVEL", logging.INFO))) self.logger.addHandler(logging.StreamHandler(sys.stdout)) self.logger.propagate = False self.logger_core = logging.getLogger("__core__") self.logger_core.setLevel(int(os.environ.get("CORE_LOGGING_LEVEL", logging.ERROR))) self.logger_core.addHandler(logging.StreamHandler(sys.stdout)) self.logger_core.propagate = False self.logger_router = logging.getLogger("__router__") self.logger_router.setLevel(int(os.environ.get("ROUTER_LOGGING_LEVEL", logging.ERROR))) self.logger_router.addHandler(logging.StreamHandler(sys.stdout)) self.logger_router.propagate = False self.req_logger = logging.getLogger("flask-request-logger") self.req_logger.setLevel(logging.ERROR) self.req_logger.propagate = False init() try: import env env.init() except ImportError: self.logger.warning("No app env defined!") subject_factory.override(providers.Factory(lambda *args, **kw: g_wrap(subject_factory.cls, *args, **kw))) self.router = event_router_factory() def _wrap_function(self, view_func): exec( """def wrapper(view_func): def wrapped_%s(): g.subjects = [] resp = view_func() for sub in g.subjects: sub.store() return resp return wrapped_%s""" % (view_func.__name__, view_func.__name__)) return eval("wrapper(view_func)") def route(self, rule, **options): wrap_subjects = options.pop("auto_store_subjects", False) base_decorator = super().route(rule, **options) def decorator(f): if wrap_subjects: f = self._wrap_function(f) return base_decorator(f) return decorator
python
<reponame>septianw/shiny-telegram<filename>experiment01/httprouter.go package main import ( "net/http" "github.com/gin-gonic/gin" ) func SetupRouter() *gin.Engine { r := gin.Default() gin.SetMode("release") switch STAGE { case "development": gin.SetMode("debug") break case "production": gin.SetMode("release") break case "testing": gin.SetMode("debug") break default: gin.SetMode("debug") } // r.GET("/ping", func(c *gin.Context) { // c.String(http.StatusOK, "pong") // }) r.GET("/", func(c *gin.Context) { c.String(http.StatusOK, "Hello World") }) return r }
go
<filename>apiSetTransaction.go<gh_stars>1-10 package mintersdk import ( "errors" "fmt" "io/ioutil" "net/http" "strings" ) // Ответ транзакции //easyjson:json type send_transaction struct { JSONRPC string `json:"jsonrpc"` ID string `json:"id"` Result TransSendResponse `json:"result"` Error ErrorStruct `json:"error"` } type TransSendResponse struct { Code int `json:"code" bson:"code" gorm:"code" db:"code"` Log string `json:"log" bson:"log" gorm:"log" db:"log"` Data string `json:"data" bson:"data" gorm:"data" db:"data"` Hash string `json:"hash" bson:"hash" gorm:"hash" db:"hash"` } // Исполнение транзакции закодированной RLP func (c *SDK) SetTransaction(strRlpEnc string) (string, error) { fmt.Println("TX RLP:", strRlpEnc) url := fmt.Sprintf("%s/send_transaction?tx=0x%s", c.MnAddress, strRlpEnc) res, err := http.Get(url) if err != nil { //fmt.Println("ERROR: TxSign::http.Post") fmt.Println("ERROR: TxSign::http.Get") return "", err } defer res.Body.Close() body, err := ioutil.ReadAll(res.Body) if err != nil { fmt.Println("ERROR: TxSign::ioutil.ReadAll") return "", err } var data send_transaction //json.Unmarshal(body, &data) -- переход на easyjson err = data.UnmarshalJSON(body) if err != nil { panic(err) } if data.Error.Code != 0 { err = errors.New(fmt.Sprint(data.Error.Code, " - ", data.Error.Message, " - ", data.Error.TxResult.Log)) return "", err } if data.Result.Code == 0 { return fmt.Sprintf("Mt%s", strings.ToLower(data.Result.Hash)), nil } else { fmt.Printf("ERROR: TxSign: %#v\n", data) return data.Result.Log, errors.New(fmt.Sprintf("Err:%d-%s", data.Result.Code, data.Result.Log)) } }
go
MediaTek has officially announced the world's first true octa-core processor. The latest SoCs allows all the eight cores to run simultaneously, unlike the Samsung implementation, which can activate up to half of its CPU cores at once. The true octa-core processors offer you enhanced performance, power efficiency and improved user experience. The MediaTek true octa-core processor allocates processing power to different cores on per-application and per-task basis that gives the ultimate multi-tasking experience. The newest addition to the MediaTek SoCs comes with advanced web browsing feature that has the unique ability to allocate individual browser tabs to CPU cores. The processor also has the ability to delegate user input to individual cores and renders 3D effects more smoothly and enhances the user interface. The multi-threaded programming in the processor enables improved video framerate processing, which gives superior gaming experiences. Lastly, the octa processor has an efficient video playback feature that reduces that battery used for decoding HEVC FHD video by up to 18% when compared to the current quad-core processors. The octa-core solution also provides 20% more frames while on display mode. Unfortunately, there is no word on the specifications and the launch date of the true octa-core processors.
english
{"status":200,"data":{"totalSubs":42,"subsInEachSource":{"feedly":24,"inoreader":15,"feedsPub":3},"failedSources":{}},"lastModified":1610932971248}
json
/* * Copyright 2019 <NAME> (github.com/mP1) * * 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 walkingkooka.spreadsheet.format.parser; import org.junit.jupiter.api.Test; import walkingkooka.collect.list.Lists; import walkingkooka.text.cursor.parser.ParserToken; import walkingkooka.tree.json.JsonNode; import walkingkooka.tree.json.marshall.JsonNodeUnmarshallContext; import walkingkooka.visit.Visiting; import java.util.List; import static org.junit.jupiter.api.Assertions.assertSame; public final class SpreadsheetFormatGreaterThanParserTokenTest extends SpreadsheetFormatConditionParserTokenTestCase<SpreadsheetFormatGreaterThanParserToken> { @Test public void testAccept() { final StringBuilder b = new StringBuilder(); final List<ParserToken> visited = Lists.array(); final SpreadsheetFormatConditionParserToken token = this.createToken(); final SpreadsheetFormatParserToken right = token.right(); final SpreadsheetFormatParserToken symbol = operatorSymbol(); new FakeSpreadsheetFormatParserTokenVisitor() { @Override protected Visiting startVisit(final SpreadsheetFormatParserToken n) { b.append("1"); visited.add(n); return Visiting.CONTINUE; } @Override protected void endVisit(final SpreadsheetFormatParserToken n) { b.append("2"); visited.add(n); } @Override protected Visiting startVisit(final SpreadsheetFormatGreaterThanParserToken t) { assertSame(token, t); b.append("3"); visited.add(t); return Visiting.CONTINUE; } @Override protected void endVisit(final SpreadsheetFormatGreaterThanParserToken t) { checkEquals(token, t); b.append("4"); visited.add(t); } @Override protected void visit(final SpreadsheetFormatConditionNumberParserToken t) { assertSame(right, t); b.append("5"); visited.add(t); } @Override protected void visit(final SpreadsheetFormatGreaterThanSymbolParserToken t) { checkEquals(symbol, t); b.append("6"); visited.add(t); } @Override protected Visiting startVisit(final ParserToken t) { b.append("7"); visited.add(t); return Visiting.CONTINUE; } @Override protected void endVisit(final ParserToken t) { b.append("8"); visited.add(t); } }.accept(token); this.checkEquals("7137162871528428", b.toString()); this.checkEquals( Lists.of(token, token, token, symbol, symbol, symbol, symbol, symbol, right, right, right, right, right, token, token, token), visited, "visited" ); } @Override SpreadsheetFormatGreaterThanParserToken createToken(final String text, final List<ParserToken> tokens) { return SpreadsheetFormatParserToken.greaterThan(tokens, text); } @Override SpreadsheetFormatSymbolParserToken operatorSymbol() { return SpreadsheetFormatParserToken.greaterThanSymbol(">", ">"); } @Override public Class<SpreadsheetFormatGreaterThanParserToken> type() { return SpreadsheetFormatGreaterThanParserToken.class; } @Override public SpreadsheetFormatGreaterThanParserToken unmarshall(final JsonNode node, final JsonNodeUnmarshallContext context) { return SpreadsheetFormatParserToken.unmarshallGreaterThan(node, context); } }
java
<gh_stars>0 package com.test.springBoot.order.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.test.springBoot.order.entity.Order; import org.springframework.stereotype.Repository; /** * @Description: 订单mapper * @Author: wangyinjia * @Date: 2020/7/9 * @Version: 1.0 */ @Repository public interface OrderMapper extends BaseMapper<Order> { }
java
<gh_stars>1-10 const ExifImage = require('exif'); var NodeHelper = require("node_helper"); var request = require('request'); module.exports = NodeHelper.create({ start: function() { var self = this; this.exifData = ""; this.geonameUser = ""; //self.exifData = require("exif").exifData; console.log(this.name + ' helper is started!'); }, getExif(payload) { var self = this; // For some reason when sending the imagePath to the ExifImage if it's not a local filesystem path. // Error: Encountered the following error while trying to read given image: // Error: ENOENT: no such file or directory, open 'C:\Users\...\MagicMirror\http:\localhost:8080\modules\MMM-BackgroundSlideshow\pictures\subfolder1\image.jpg' // Hard-coding a replace function to represent a local path made it work, may not work on all systems. var mmPath = self.path var mmPath = mmPath.replace("modules/" + self.name, ""); //Get root MM directory for Linux systems (untested) var mmPath = mmPath.replace("modules\\" + self.name,""); //Get root MM directory for Windows systems var imageUrl = decodeURIComponent(payload.url); var imageUri = imageUrl.replace("http://localhost:8080/",""); //TODO: Fixup later for other possible URLs imageUri = imageUri.replace("http://0.0.0.0:8080/",""); // For default RPi config per https://github.com/gpetersen/MMM-BackgroundSlideshowInfo/issues/4 var imagePath = mmPath + imageUri; //imagePath = imagePath.replace("//g","\\"); // mixed Slash direction doesn't matter when running on Windows.. // Get folder names as an array for display var folderNames = imageUri.split("/"); console.log("[BACKGROUNDSLIDESHOWINFO] helper loading EXIF data for "+ imagePath); var ExifImage = require("exif").ExifImage; try { new ExifImage({ image : imagePath }, function (error, exifDataNew) { // This is where the Error mentioned above would fire. if (error){ console.log('[BACKGROUNDSLIDESHOWINFO] Error loading EXIF data: '+ error.message); this.exifData = ""; exifDataNew = {}; exifDataNew.folderNames = folderNames; exifDataNew.error = true; self.sendSocketNotification('BACKGROUNDSLIDESHOWINFO_EXIFDATA', exifDataNew); self.exifData = exifDataNew; //return; } else{ console.log("[BACKGROUNDSLIDESHOWINFO] helper successfully loaded EXIF data"); //console.log("[BACKGROUNDSLIDESHOWINFO] helper successfully loaded EXIF data: " + JSON.stringify(exifDataNew) ); exifDataNew.folderNames = folderNames; exifDataNew.error = false; self.sendSocketNotification('BACKGROUNDSLIDESHOWINFO_EXIFDATA', exifDataNew); self.exifData = exifDataNew; self.getGeoNameData(exifDataNew); } }); } catch (error) { console.log('ERROR: ' + error.message); this.exifData = ""; return; } this.exifData = ""; }, getGeoNameData: function(exifDataNew) { var self = this; GPSLatitude = this.extract('gps.GPSLatitude',this.exifData); GPSLongitude = this.extract('gps.GPSLongitude',this.exifData); //Convert from rational64u = Degrees + Minutes/60 + Seconds/3600 if (GPSLatitude && GPSLongitude){ var lat = GPSLatitude[0] + GPSLatitude[1]/60 + GPSLatitude[2]/3600; if (this.extract('gps.GPSLatitudeRef',this.exifData) == "S") lat = lat * -1; var lng = (GPSLongitude[0] + GPSLongitude[1]/60 + GPSLongitude[2]/3600); if (this.extract('gps.GPSLongitudeRef',this.exifData) == "W") lng = lng * -1; console.log("[BACKGROUNDSLIDESHOWINFO] Getting Geonames for lat/lng: " + lat + "/" + lng); request({ url: 'http://api.geonames.org/findNearbyJSON?lat='+ lat +'&lng='+ lng +'&username=' + self.geonameUser + '&lang=' + config.language , method: 'GET' }, (error, response, body) => { //console.log("[BACKGROUNDSLIDESHOWINFO] Response: " + response); //console.log("[BACKGROUNDSLIDESHOWINFO] Body: " + body); //console.log("[BACKGROUNDSLIDESHOWINFO] Error: " + error); if(error){ console.log("[BACKGROUNDSLIDESHOWINFO] GeoName Error: " + error); return; } var geoNames = JSON.parse(body); exifDataNew.geonames = this.extract('geonames', geoNames); self.sendSocketNotification('BACKGROUNDSLIDESHOWINFO_EXIFDATA', exifDataNew); }); } else{ //GPS: No Data console.log("[BACKGROUNDSLIDESHOWINFO] No GPS data"); return; } }, extract: function(propertyName, object) { const parts = propertyName.split("."); let length = parts.length; let i; let property = object || this; for (i = 0; i < length; i++) { property = property[parts[i]]; } return property; }, socketNotificationReceived: function(notification, payload) { //console.log(this.name + " received a socket notification: " + notification + " - Payload: " + payload.url); if (notification === "BACKGROUNDSLIDESHOWINFO_START") { if (payload.geonameUser == null || payload.geonameUser == "") { console.log( "[BACKGROUNDSLIDESHOWINFO] ** ERROR ** No username configured. Get an API key at https://www.geonames.org" ); } else { this.geonameUser = payload.geonameUser; } } else if(notification === "BACKGROUNDSLIDESHOWINFO_GET_EXIF"){ console.log("[BACKGROUNDSLIDESHOWINFO] GET_EXIF - url: " + payload.url) this.getExif(payload); } }, });
javascript
<reponame>poulosar/nfl-database {"player_id": 1962, "name": "<NAME>", "position": "G", "height": "6-1", "weight": "286", "current_team": null, "birth_date": "1963-04-07", "birth_place": "Omaha, NE", "death_date": null, "college": "Nebraska-Omaha", "high_school": "<NAME>, NE", "draft_team": null, "draft_round": null, "draft_position": null, "draft_year": null, "current_salary": null, "hof_induction_year": null}
json
import asyncio as aio import argparse as ap import sys import os from pathlib import Path from typing import Optional from .cfg import get_cfg from .event import ConnectionMode, DaemonEvent def get_args() -> ap.Namespace: parser = ap.ArgumentParser(description="Send commands to a wcd instance, through a unix socket.") parser.add_argument("command", choices=[e.name.lower() for e in DaemonEvent], help="A command to be sent to the wcd server") parser.add_argument("-s", "--socket", default=None, type=Path, help="The path to the unix socket over which to communicate with the server. If this option" " is not supplied, wcc will look for this path inside wcd's config file.") return parser.parse_args() # tbf this didnt need to be async, but ive never used synchronous unix sockets async def wcc(command: str, socket: Optional[Path]) -> None: if "TMPDIR" not in os.environ: os.environ["TMPDIR"] = "/tmp" socket_path = socket or os.path.expandvars(get_cfg()["socket_path"]) try: r, w = await aio.open_unix_connection(socket_path) except ConnectionRefusedError: print(f"Couldn't connect to a wcd over '{socket_path}'") return w.write(ConnectionMode.ONE_SHOT.to_bytes(4, byteorder="big")) w.write(DaemonEvent[command.upper()].to_bytes(4, byteorder="big")) await w.drain() print((await r.read()).decode("utf-8")) def main() -> None: aio.run(wcc(**vars(get_args()))) if __name__ == "__main__": main()
python
<gh_stars>10-100 module.exports.get_course_array = get_course_array module.exports.filter_course_by_week = filter_course_by_week Array.prototype.clean = function (deleteValue) { for (var i = 0; i < this.length; i++) { if (this[i] == deleteValue) { this.splice(i, 1);//返回指定的元素 i--; } } return this; }; Array.prototype.clone = function () { var len = this.lenght, arr = []; for (var i = 0; i < len; i++) { if (typeof this[i] !== "object") { arr.push(this[i]); } else { arr.push(this[i].clone()); } } return arr; } function get_course_array(course_data, currentWeek) { var data = [] //按课程表得到数组 for (var week in course_data) { for (var time in course_data[week]) { if (Array.isArray(course_data[week][time])) { for (var j = 0; j < course_data[week][time].length; j++) { var course_detail = course_data[week][time][j][0] var course_place = course_data[week][time][j][1] var course = { 'week': convert_week(week), 'course_time': time, 'course_length': 1, 'course_name': course_detail.name + "\n @" + course_place.place + "\n周数:" + course_place.week_duration, 'course_detail': course_detail, 'week_duration': course_place.week_duration, 'for_class': course_detail.for_class, } if (filter_course_by_week(course, currentWeek)) { data.push(course) } } } } } mergeCourse(data) return data } //课程周数过滤 function filter_course_by_week(currentCourse, currentWeek) { var isCurrentEvenWeek = currentWeek % 2 == 0 //目前双周 var isCourseValid = true //Flag var week_duration = currentCourse.week_duration var weekMatchReg = /(\d+)\-(\d+)/ //提取上课周数 var group = weekMatchReg.exec(week_duration) week_duration = week_duration.replace(weekMatchReg, '') //防止干扰单周 var startWeek = 0 var endWeek = 0 if (group != null) { if (group.length == 3) { startWeek = parseInt(group[1]) endWeek = parseInt(group[2]) } } var outOfWeekRange = currentWeek < startWeek || currentWeek > endWeek var notSingle = week_duration.indexOf(currentWeek) == -1 // 还有可能额外的 if (outOfWeekRange && notSingle) { isCourseValid = false } if (week_duration.indexOf('单') != -1 && isCurrentEvenWeek) { isCourseValid = false } if (week_duration.indexOf('双') != -1 && !isCurrentEvenWeek) { isCourseValid = false } return isCourseValid } function mergeCourse(data) { //合并课程 for (var i = 0; i < data.length; i++) { if (typeof (data[i]) == "undefined") continue var new_course_length = 1 if (i < data.length - 1) { if (mergeable_course(data[i], data[i + 1], 1)) { new_course_length += 1 delete (data[i + 1]) } } if (i < data.length - 2) { if (mergeable_course(data[i], data[i + 2], 2)) { new_course_length += 1 delete (data[i + 2]) } } if (i < data.length - 3) { if (mergeable_course(data[i], data[i + 3], 3)) { new_course_length += 1 delete (data[i + 3]) } } data[i].course_length = new_course_length } data.clean() } function mergeable_course(course01, course02, row) { if (course01.course_name == null || course02.course_name == null || course01.week == null || course02.week == null || course01.course_detail == null || course02.course_detail == null || course01.course_time == null || course02.course_time == null) return false; return course01.week == course02.week && course01.course_detail.id == course02.course_detail.id && Math.abs(course01.course_time - course02.course_time) == row ? true : false } function convert_week(week) { switch (week) { case 'Mon': return 1 break case 'Tue': return 2 break case 'Wed': return 3 break case 'Thus': return 4 break case 'Fri': return 5 break } }
javascript
const Router = require('express').Router(); const Post = require('../../models/Post'); const Category = require('../../models/Category'); // Categories Router.get('/', async (req, res, next) => { // Template res.locals.template = 'category.list.ejs'; // Data res.locals.data = { page: { title: 'Categories' }, categories: await Category.find({}) }; next(); }); // Category - New Router.post('/', async (req, res, next) => { let message = ''; // Template res.locals.template = 'category.list.ejs'; try { const newCategory = new Category({ name: req.body.category, slug: Category.slugify(req.body.slug), parent: req.body.parent }); if (req.body.parent == 0) newCategory.parent = null await newCategory.save(); message = 'Category added successfully.'; } catch (err) { message = err.message; } // Data res.locals.data = { page: { title: 'Categories' }, categories: await Category.find({}), message: message }; next(); }); // Category - Delete Router.get('/delete/:id', async (req, res, next) => { let message = ''; // Template res.locals.template = 'category.list.ejs'; try { await Category.findOneAndDelete({ _id: req.params.id }); await Post.deleteMany({ category: req.params.id }); message = 'Category deleted successfully.'; } catch (err) { message = err.message; } // Data res.locals.data = { page: { title: 'Categories' }, categories: await Category.find({}), message: message }; next(); }); // Category - Edit Router.get('/edit/:id', async (req, res, next) => { // Template res.locals.template = 'category.list.ejs'; try { // Data res.locals.data = { page: { title: 'Edit Category' }, category: await Category.findOne({ _id: req.params.id }), categories: await Category.find({}) }; } catch (err) { return res.redirect('/admin'); } next(); }); // Category - Edit Router.post('/edit/:id', async (req, res, next) => { let message = ''; // Template res.locals.template = 'category.list.ejs'; try { await Category.findOneAndUpdate({ _id: req.params.id }, { name: req.body.category, slug: Category.slugify(req.body.slug), parent: req.body.parent }); message = 'Category updated successfully.'; } catch (err) { message = err.message; } // Data res.locals.data = { page: { title: 'Edit Category' }, category: await Category.findOne({ _id: req.params.id }), categories: await Category.find({}), message: message }; next(); }); module.exports = Router;
javascript
import { ExecutionMessage } from '../../models/execution'; import isNumber = require('lodash.isnumber'); export interface ForeEachable { forEach(fn: (val: any) => boolean | void): void; } export interface RecycleCmdInfo { cmd: object; total: number; removed: number; patched: number; rest: number; } export function recycleCmdFactory(executionId: string, msgs: ForeEachable, deleteCount: number): RecycleCmdInfo { const cmd = {}; let index = 0; let removeCount = 0; let patchCount = 0; msgs.forEach(snapshot => { const msg = snapshot.val(); if (index + 1 <= deleteCount) { cmd[`/executions/${executionId}/messages/${msg.id}`] = null; removeCount++; } else if (isNumber(msg.index)) { cmd[`/executions/${executionId}/messages/${msg.id}/index`] = msg.index - removeCount; patchCount++; } index++; }); return { cmd: cmd, total: index, removed: removeCount, patched: patchCount, // A rest can only happen if there are messages without index rest: index - removeCount - patchCount }; }
typescript
import { Route } from '@vaadin/router'; import Role from './generated/com/example/application/data/Role'; import { appStore } from './stores/app-store'; import './views/helloworld/hello-world-view'; import './views/main-layout'; export type ViewRoute = Route & { title?: string; icon?: string; requiresLogin?: boolean; rolesAllowed?: Role[]; children?: ViewRoute[]; }; export const hasAccess = (route: Route) => { const viewRoute = route as ViewRoute; if (viewRoute.requiresLogin && !appStore.loggedIn) { return false; } if (viewRoute.rolesAllowed) { return viewRoute.rolesAllowed.some((role) => appStore.isUserInRole(role)); } return true; }; export const views: ViewRoute[] = [ // place routes below (more info https://vaadin.com/docs/latest/fusion/routing/overview) { path: '', component: 'hello-world-view', icon: '', title: '', }, { path: 'hello', component: 'hello-world-view', icon: 'la la-globe', title: 'Hello World', }, { path: 'about', component: 'about-view', icon: 'la la-file', title: 'About', action: async (_context, _command) => { await import('./views/about/about-view'); return; }, }, { path: 'card-list', component: 'card-list-view', rolesAllowed: [Role.USER], icon: 'la la-list', title: 'Card List', action: async (_context, _command) => { if (!hasAccess(_context.route)) { return _command.redirect('login'); } await import('./views/cardlist/card-list-view'); return; }, }, { path: 'master-detail', component: 'master-detail-view', rolesAllowed: [Role.ADMIN], icon: 'la la-columns', title: 'Master-Detail', action: async (_context, _command) => { if (!hasAccess(_context.route)) { return _command.redirect('login'); } await import('./views/masterdetail/master-detail-view'); return; }, }, { path: 'map', component: 'map-view', icon: 'la la-map', title: 'Map', action: async (_context, _command) => { await import('./views/map/map-view'); return; }, }, { path: 'image-list', component: 'image-list-view', icon: 'la la-th-list', title: 'Image List', action: async (_context, _command) => { await import('./views/imagelist/image-list-view'); return; }, }, { path: 'checkout-form', component: 'checkout-form-view', rolesAllowed: [Role.USER], icon: '', title: 'Checkout Form', action: async (_context, _command) => { if (!hasAccess(_context.route)) { return _command.redirect('login'); } await import('./views/checkoutform/checkout-form-view'); return; }, }, { path: 'credit-card-form', component: 'credit-card-form-view', rolesAllowed: [Role.ADMIN], icon: 'la la-credit-card', title: 'Credit Card Form', action: async (_context, _command) => { if (!hasAccess(_context.route)) { return _command.redirect('login'); } await import('./views/creditcardform/credit-card-form-view'); return; }, }, { path: 'empty', component: 'empty-view', icon: 'la la-file', title: 'Empty', action: async (_context, _command) => { await import('./views/empty/empty-view'); return; }, }, { path: 'person-form', component: 'person-form-view', icon: 'la la-user', title: 'Person Form', action: async (_context, _command) => { await import('./views/personform/person-form-view'); return; }, }, ]; export const routes: ViewRoute[] = [ { path: '', component: 'main-layout', children: [...views], }, { path: 'login', component: 'login-view', icon: '', title: 'Login', action: async (_context, _command) => { await import('./views/login/login-view'); return; }, }, ];
typescript
In yet another incident, a teenager from Mohali, Punjab has reportedly spent over Rs 2 lakh on PUBG Mobile to buy in-game items. The 15-year old boy had only recently started playing the game in the month of January. He apparently learned how to make online payments via his grandfather's account from a senior at school and used to spend a lot of time on the game. This comes days after a similar case happened in Punjab itself where a 17-year old stole money from his farther's bank account and had secretly spent Rs 16 lakh on the battle royale game. According to a report, the teenager's uncle who runs a shop in Chandigarh, came to know about this on Friday when he checked the statement of the boy’s grandfather’s bank account. The 15-year-old used to make payment through a PayTM account, which was made on his grandfather’s name using his personal documents and confessed that he had spent more than Rs 2 lakh on the game. Some of the amount was paid to his school senior from Zirakpur, to purchase in-game currency called UC to buy skins for guns, vehicles, leveling up, and more. “We came to know that he had also purchased a special SIM card for the game. Earlier, when we used to find some cash missing from our wallets, we did not pay much heed to the boy,” said his uncle. The boy's family is said to have lodged a complaint against the school senior who introduced him to these corrupt methods. An email has also been sent to Mohali SSP Kuldeep Singh Chahal claiming that the boy was lured by the senior to indulge in such activities. Gaming addiction is said to have increased ever since the Covid-19 lockdown took over the world. Rather than involving themselves in physical group activities, kids are resorting to solitary activities like gaming which is leading to obsessions and mental fatigue.
english
/** * Copyright 2018 <NAME>. * * 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. */ export const HOOK_TYPE_USE_STATE = 1; export const HOOK_TYPE_USE_EFFECT = 2; export const HOOK_TYPE_USE_MUTATION_EFFECT = 3; export const HOOK_TYPE_USE_REF = 4; export const HOOK_TYPE_USE_CALLBACK = 5; export const HOOK_TYPE_USE_MEMO = 6; export const HOOK_LABEL_BY_TYPE = { 1: 'useState', 2: 'useEffect', 3: 'useMutationEffect', 4: 'useRef', 5: 'useCallback', 6: 'useMemo', }; export const RENDER_LIMIT = 50;
javascript
import { FileExtensionConst } from '../../constants'; /** * mos 文件辅助操作 * * @author chitanda * @date 2021-11-15 15:11:49 * @export * @class MosFileUtil */ export class MosFileUtil { /** * 是否为支持的扩展 * * @author chitanda * @date 2021-11-15 15:11:09 * @static * @type {RegExp} */ static extensionReg: RegExp = new RegExp(`(${FileExtensionConst.MODEL}|${FileExtensionConst.MODEL_RUNTIME}|${FileExtensionConst.MODEL_UI})$`); /** * 删除文件后缀 * * @author chitanda * @date 2021-11-15 15:11:24 * @static * @param {string} path * @return {*} {string} */ static removePathExtension(path: string): string { return path.replace(this.extensionReg, ''); } }
typescript
A total of 11 G-20 meetings will be held in four cities in UP including Greater Noida, Lucknow, Agra and Varanasi, out of which 6 meetings will take place in Varanasi alone. New Okhla Industrial Development Authority, popularly known as Noida, is a city located in Gautam Buddh Nagar district. It comes under the state of Uttar Pradesh, India. It is a planned, satellite city of Delhi and is a part of the National Capital Region (NCR). It is surrounded by the Yamuna river on the west and southwest, by Delhi on the north and northwest and on the northeast by the cities of Delhi and Ghaziabad. The city is well connected by rail by the Noida Metro and Delhi Metro. The nearest airport to Noida is the Indira Gandhi International Airport in Delhi. Noida experiences all three seasons - summer, monsoon and winter. The cold waves from the Himalayan region make the winters in Noida chilly and harsh. Okhla Bird Sanctuary is at the entrance of the city. The city also has a botanical garden, formed with the objective to turn it into a hub of special and endangered plants. A total of 11 G-20 meetings will be held in four cities in UP including Greater Noida, Lucknow, Agra and Varanasi, out of which 6 meetings will take place in Varanasi alone. Noida girl and law student Smriti Mishra bagged AIR 4 in the UPSC CSE 2022. She says she checked her rank 12 times to believe she got such a high rank. The Noida-Greater Noida Metro will begin passenger services at 6 am on Sunday instead of 8 am to facilitate civil service examination aspirants. The preliminary examination for civil services 2023 conducted by the Union Public Service Commission (UPSC) is scheduled on May 28. The father of the 21-year-old woman student, who was shot dead on May 18 by her classmate at the Shiv Nadar University, insisted in the FIR that the university officials were aware of the harassment and assault on his daughter but did not take adequate action. Animal rights activists have raised concerns over the release of sick, injured and malnourished stray dogs back to the streets of Noida after sterilisation due to lack of shelter homes. A domestic help, working in Greater Noida’s Ajnara Homes Society, was arrested by the police for wiping the floor of a house with the water she had peed in. The incident was captured on CCTV camera. Greater Noida resident Ishita Kishore, an alumna of Air Force Bal Bharti School and SRCC in Delhi, has emerged as the topper of UPSC CSE 2022 final results. A four-year-old boy died from choking as a chocolate lodged in his windpipe. The heart wrenching incident happened in the Rabupura area in Greater Noida. A woman residing in Noida received a message on WhatsApp offering her a part-time job. She was asked to like YouTube videos to earn money. The scammers duped the woman of Rs 4. 3 lakh. Sources in the police claimed that an argument broke out between the delivery man and the customer over one-time-password (OTP) which enraged the latter. He lost his temper and started thrashing the delivery man. A video has gone viral where a man was seen sexually assaulting a female stray dog on Saturday night in Noida. Dog lovers and animal rights activists sought immediate arrest of the culprit. A 23-minute-long video of Anuj Singh, who shot his woman classmate Sneha Chaurasia and then killed himself at Shiv Nadar University, has surfaced. In the video, the shooter can be heard talking about his ex-girlfriend's affair, his past mental traumas, and that he was suffering from brain cancer. Both students, identified as Anuj and Sneha were in their third year of college pursuing Bachelor of Arts in Sociology at Greater Noida’s Shiv Nadar University. According to witnesses, Anuj and Sneha were seen together near the dining hall. The witnesses further said the duo were engaged in a conversation and then suddenly Anuj shot dead Sneha with a pistol. Both students, identified as Anuj and Neha were in their third year of college pursuing Bachelor of Arts in Sociology at Greater Noida’s Shiv Nadar University. According to witnesses, Anuj and Neha were seen together near the dining hall. The witnesses further said the duo were engaged in a conversation and then suddenly Anuj shot dead Neha with a pistol. The guard was assaulted for asking a resident of Noida's Aashiyana Homes to park her vehicle in a different spot. The CBI conducted the searches at the premises of RJD MLA Kiran Devi and her husband in Arrah and Patna, and at Rajya Sabha member Prem Chand Gupta's premises in Gurugram, Noida, Delhi and Rewari. Punjabi Angithi is now open in Paschim Vihar, Janakpuri, Rohini, Ashok Vihar, Noida Sector 15, Gurugram phase 3 and sector 39, Malviya Nagar, Dwarka sector 7 , Noida 73, Dehradun, and Indirapuram, and looks forward to welcoming even more food lovers in the future. The Greater Noida Industrial Development Authority (GNIDA) has slapped a notice to Noida's Migsun Ultimo society for issuing illegal fines in the name of dog policy. As per reports, the issuance of such fines contradicts the guidelines of the Animal Welfare Board of India (AWBI). A drone carried blood bags from a hospital in Greater Noida, covering a distance of 35km in 15 minutes. An ambulance travelled the same distance carrying blood but took one-and-a-half hours to complete the task. Union Health Minister Mansukh Mandaviya shared a video of the successful trial and lauded the strides made by the healthcare sector. Due to a western disturbance, Delhi-NCR will witness partly cloudy skies with powerful surface winds reaching speeds of 30-40 kilometres per hour. Maximum temperature on Monday will be around 38 degrees Celsius, the IMD said.
english
<filename>src/js/stores/DCOSStore.js import {EventEmitter} from 'events'; import PluginSDK, {Hooks} from 'PluginSDK'; import { METRONOME_JOBS_CHANGE, DCOS_CHANGE, MESOS_SUMMARY_CHANGE, MARATHON_DEPLOYMENTS_CHANGE, MARATHON_GROUPS_CHANGE, MARATHON_QUEUE_CHANGE, MARATHON_SERVICE_VERSION_CHANGE, MARATHON_SERVICE_VERSIONS_CHANGE } from '../constants/EventTypes'; import DeploymentsList from '../structs/DeploymentsList'; import Item from '../structs/Item'; import Framework from '../structs/Framework'; import JobTree from '../structs/JobTree'; import MarathonStore from './MarathonStore'; import MesosSummaryStore from './MesosSummaryStore'; import MetronomeStore from '../stores/MetronomeStore'; import NotificationStore from './NotificationStore'; import ServiceTree from '../structs/ServiceTree'; import SummaryList from '../structs/SummaryList'; const METHODS_TO_BIND = [ 'onMetronomeChange', 'onMarathonGroupsChange', 'onMarathonQueueChange', 'onMarathonDeploymentsChange', 'onMarathonServiceVersionChange', 'onMarathonServiceVersionsChange', 'onMesosSummaryChange' ]; class DCOSStore extends EventEmitter { constructor() { super(...arguments); PluginSDK.addStoreConfig({ store: this, storeID: this.storeID, events: { change: DCOS_CHANGE }, unmountWhen() { return true; }, listenAlways: true }); METHODS_TO_BIND.forEach((method) => { this[method] = this[method].bind(this); }); this.data = { marathon: { serviceTree: new ServiceTree(), queue: new Map(), deploymentsList: new DeploymentsList(), versions: new Map() }, metronome: new JobTree(), mesos: new SummaryList(), dataProcessed: false }; } getProxyListeners() { let proxyListeners = []; if (Hooks.applyFilter('hasCapability', false, 'metronomeAPI')) { proxyListeners.push({ event: METRONOME_JOBS_CHANGE, handler: this.onMetronomeChange, store: MetronomeStore }); } if (Hooks.applyFilter('hasCapability', false, 'mesosAPI')) { proxyListeners.push({ event: MESOS_SUMMARY_CHANGE, handler: this.onMesosSummaryChange, store: MesosSummaryStore }); } if (Hooks.applyFilter('hasCapability', false, 'marathonAPI')) { proxyListeners = proxyListeners.concat([ { event: MARATHON_DEPLOYMENTS_CHANGE, handler: this.onMarathonDeploymentsChange, store: MarathonStore }, { event: MARATHON_GROUPS_CHANGE, handler: this.onMarathonGroupsChange, store: MarathonStore }, { event: MARATHON_QUEUE_CHANGE, handler: this.onMarathonQueueChange, store: MarathonStore }, { event: MARATHON_SERVICE_VERSION_CHANGE, handler: this.onMarathonServiceVersionChange, store: MarathonStore }, { event: MARATHON_SERVICE_VERSIONS_CHANGE, handler: this.onMarathonServiceVersionsChange, store: MarathonStore } ]); } return proxyListeners; } /** * Fetch service version/configuration from Marathon * @param {string} serviceID * @param {string} versionID */ fetchServiceVersion(serviceID, versionID) { MarathonStore.fetchServiceVersion(serviceID, versionID); } /** * Fetch service versions/configurations from Marathon * @param {string} serviceID */ fetchServiceVersions(serviceID) { MarathonStore.fetchServiceVersions(serviceID); } onMarathonDeploymentsChange() { if (!this.data.dataProcessed) { return; } let deploymentsList = MarathonStore.get('deployments'); let serviceTree = MarathonStore.get('groups'); let deploymentListlength = deploymentsList.getItems().length; let currentDeploymentCount = NotificationStore.getNotificationCount( 'services-deployments' ); if (deploymentListlength !== currentDeploymentCount) { NotificationStore.addNotification( 'services-deployments', 'deployment-count', deploymentListlength ); } // Populate deployments with affected services this.data.marathon.deploymentsList = deploymentsList .mapItems(function (deployment) { let ids = deployment.getAffectedServiceIds(); let services = ids.reduce(function (memo, id) { let service = serviceTree.findItemById(id); if (service != null) { memo.affected.push(service); } else { memo.stale.push(id); } return memo; }, {affected: [], stale: []}); return Object.assign({ affectedServices: services.affected, staleServiceIds: services.stale }, deployment); }); this.emit(DCOS_CHANGE); } onMarathonGroupsChange() { let serviceTree = MarathonStore.get('groups'); if (!(serviceTree instanceof ServiceTree)) { return; } this.data.marathon.serviceTree = serviceTree; this.data.dataProcessed = true; // Populate deployments with services data immediately this.onMarathonDeploymentsChange(); this.emit(DCOS_CHANGE); } onMarathonQueueChange(nextQueue) { let {marathon:{queue}} = this.data; let queuedAppIDs = []; nextQueue.forEach((entry) => { if (entry.app == null) { return; } queuedAppIDs.push(entry.app.id); queue.set(entry.app.id, entry); }); queue.forEach((entry) => { if (queuedAppIDs.indexOf(entry.app.id) === -1) { queue.delete(entry.app.id); } }); this.emit(DCOS_CHANGE); } onMarathonServiceVersionChange({serviceID, versionID, version}) { let {marathon:{versions}} = this.data; let currentVersions = versions.get(serviceID); if (!currentVersions) { currentVersions = new Map(); versions.set(serviceID, currentVersions); } currentVersions.set(versionID, version); this.emit(DCOS_CHANGE); } onMarathonServiceVersionsChange({serviceID, versions:nextVersions}) { let {marathon:{versions}} = this.data; let currentVersions = versions.get(serviceID); if (currentVersions) { nextVersions = new Map([...nextVersions, ...currentVersions]); } versions.set(serviceID, nextVersions); this.emit(DCOS_CHANGE); } onMesosSummaryChange() { let states = MesosSummaryStore.get('states'); if (!(states instanceof SummaryList)) { return; } this.data.mesos = states; this.emit(DCOS_CHANGE); } onMetronomeChange() { this.data.metronome = MetronomeStore.jobTree; this.emit(DCOS_CHANGE); } addProxyListeners() { this.getProxyListeners().forEach(function (item) { item.store.addChangeListener(item.event, item.handler); }); } removeProxyListeners() { this.getProxyListeners().forEach(function (item) { item.store.removeChangeListener(item.event, item.handler); }); } addChangeListener(eventName, callback) { this.on(eventName, callback); } removeChangeListener(eventName, callback) { this.removeListener(eventName, callback); } /** * Adds the listener for the specified event * @param {string} eventName * @param {Function} callback * @return {DCOSStore} DCOSStore instance * @override */ on(eventName, callback) { // Only add proxy listeners if not already listening if (this.listeners().length === 0) { this.addProxyListeners(); } return super.on(eventName, callback); } /** * Remove the specified listener for the specified event * @param {string} eventName * @param {Function} callback * @return {DCOSStore} DCOSStore instance * @override */ removeListener(eventName, callback) { super.removeListener(eventName, callback); // Remove proxy listeners if no one is listening if (this.listeners().length === 0) { this.removeProxyListeners(); } return this; } /** * @type {JobTree} */ get jobTree() { return this.data.metronome; } /** * @type {DeploymentsList} */ get deploymentsList() { return this.data.marathon.deploymentsList; } /** * @type {ServiceTree} */ get serviceTree() { let {marathon:{serviceTree, queue, versions}, mesos} = this.data; // Create framework dict from Mesos data let frameworks = mesos.lastSuccessful().getServiceList() .reduceItems(function (memo, framework) { if (framework instanceof Item) { memo[framework.get('name')] = framework.get(); } return memo; }, {}); // Merge data by framework name, as Marathon doesn't know framework ids. return serviceTree.mapItems(function (item) { if (item instanceof ServiceTree) { return item; } let serviceId = item.getId(); let options = { versions: versions.get(serviceId), queue: queue.get(serviceId) }; if (item instanceof Framework) { options = Object.assign(options, frameworks[item.getName()]); } if (item instanceof Item) { return new item.constructor( Object.assign(options, item.get()) ); } return new item.constructor( Object.assign(options, item) ); }); } get dataProcessed() { return this.data.dataProcessed; } get storeID() { return 'dcos'; } } module.exports = new DCOSStore();
javascript
import os from flask import send_from_directory from app import create_app settings_module = os.getenv('APP_SETTINGS_MODULE') app = create_app(settings_module)
python
<reponame>richmilton/uk-ireland-stampduty-calculator<gh_stars>1-10 { "name": "uk-ireland-stampduty-calculator", "version": "1.3.0", "description": "stamp duty calculator", "homepage": "https://github.com/richmilton/uk-ireland-stampduty-calculator", "main": "index.js", "scripts": { "test": "node ./node_modules/mocha/bin/mocha" }, "repository": { "type": "git", "url": "uk-ireland-stampduty-calculator" }, "author": "richmilton", "license": "ISC", "devDependencies": { "chai": "^4.2.0", "mocha": "^6.1.4", "nyc": "^14.0.0" }, "keywords": [ "stamp", "duty", "sdlt", "ltt", "lbtt", "stamp duty" ] }
json
{ "url": "https://github.com/input-output-hk/haskell.nix", "rev": "40b99ebc932f3cde000f812f69cdd440ba3f3468", "date": "2020-10-05T01:14:15+00:00", "path": "/nix/store/q9yxl43dl3v7w4ycknjlb6fg17bw8jwv-haskell.nix", "sha256": "0rfpj52a8y4wv2zl42nqi02brldv56hfp0xnaawb3b33d4hscayk", "fetchSubmodules": false, "deepClone": false, "leaveDotGit": false }
json
<gh_stars>100-1000 { "": [ "--------------------------------------------------------------------------------------------", "Copyright (c) Microsoft Corporation. All rights reserved.", "Licensed under the MIT License. See License.txt in the project root for license information.", "--------------------------------------------------------------------------------------------", "Do not edit this file. It is machine generated." ], "version": "1.0.0", "contents": { "package": { "displayName": "Temas Padrão", "description": "Os temas padrão claro e escuro do Visual Studio", "darkPlusColorThemeLabel": "Escuro+ (escuro padrão)", "lightPlusColorThemeLabel": "Claro+ (claro padrão)", "darkColorThemeLabel": "Escuro (Visual Studio)", "lightColorThemeLabel": "Claro (Visual Studio)", "hcColorThemeLabel": "Alto Contraste", "minimalIconThemeLabel": "Mínimo (Visual Studio Code)" } } }
json
.ztree li { line-height: 20px!important; } .ztree li span.button{ top: 1px!important; font-family: 'Glyphicons Halflings'!important; font-style: normal!important; font-weight: 400!important; line-height: 1em!important; -webkit-font-smoothing:antialiased!important; -moz-osx-font-smoothing:grayscale!important; background-image: none!important; } .ztree li span.button.pIcon00_ico_open:before{ content: "\e012"; } .ztree li span.button.pIcon00_ico_close:before{ content: "\e012"; } .ztree li span.button.pIcon01_ico_open:before{ content: "\e021"; } .ztree li span.button.pIcon01_ico_close:before{ content: "\e021"; } .ztree li span.button.pIcon01_ico_open, .ztree li span.button.pIcon00_ico_open{ color: #0a6ebd; } .ztree li span.button.pIcon01_ico_close, .ztree li span.button.pIcon00_ico_close{ color: darkgray; } .ztree li span.button.ico_open:before{ content: "\e008"; } .ztree li span.button.ico_close:before{ content: "\e008"; } .ztree li span.button.ico_open{ color: #0a6ebd; vertical-align: middle; } .ztree li span.button.ico_close{ color: darkgray; vertical-align: middle; } .ztree li span.button.icon01_ico_docu:before { content: "\e008"; } .ztree li span.button.icon01_ico_docu { color: #0a6ebd; } .ztree li span.button.switch.root_open,.ztree li span.button.switch.center_open,.ztree li span.button.switch.bottom_open{ color: #0a6ebd; } .ztree li span.button.switch.root_open:before,.ztree li span.button.switch.center_open:before,.ztree li span.button.switch.bottom_open:before{ content: "\2212"; } .ztree li span.button.switch.root_close,.ztree li span.button.switch.center_close,.ztree li span.button.switch.bottom_close{ color: darkgray; } .ztree li span.button.switch.root_close:before,.ztree li span.button.switch.center_close:before,.ztree li span.button.switch.bottom_close:before{ content: "\2b"; }
css
{ "component": true, "usingComponents": { "bottomSheet": "/components/bottomSheet/index" } }
json
# Portfolio A collection of work and experiments in development.
markdown
# Generated by Django 3.1.6 on 2021-02-09 08:27 import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Genre', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100, verbose_name='name')), ('slug', models.SlugField(allow_unicode=True, blank=True, max_length=110, unique=True, verbose_name='slug')), ], options={ 'ordering': ['name'], }, ), migrations.CreateModel( name='Video', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=100, verbose_name='title')), ('slug', models.SlugField(allow_unicode=True, blank=True, max_length=110, unique=True, verbose_name='slug')), ('description', models.TextField(max_length=800, verbose_name='description')), ('release_date', models.DateField(verbose_name='release_date')), ('runtime', models.IntegerField(validators=[django.core.validators.MinValueValidator(1)], verbose_name='runtime')), ('url', models.CharField(max_length=200, verbose_name='url')), ('genres', models.ManyToManyField(related_name='videos', to='media_server.Genre')), ], options={ 'ordering': ['title'], }, ), ]
python
<filename>commands/Information/botinfo.js const { Command } = require(`reconlx`); const ee = require(`../../settings/embed.json`); const config = require(`../../settings/config.json`); const { MessageEmbed, version } = require(`discord.js`); const emoji = require(`../../settings/emoji.json`); const { duration } = require(`../../handlers/functions`); module.exports = new Command({ // options name: `botinfo`, description: `bot bilgilerini al`, userPermissions: [`SEND_MESSAGES`], botPermissions: [`SEND_MESSAGES`], category: `Information`, cooldown: 10, // command start run: async ({ client, interaction, args, prefix }) => { // Code interaction.followUp({ embeds: [ new MessageEmbed() .setColor(ee.color) .setAuthor({ name: client.user.username, iconURL: client.user.displayAvatarURL({ dynamic: true }), }) .setDescription( `** <:emoji_24:953985297870381066> Bot Sahibi : [İtalyan#2517](https://discordapp.com/users/756586321149034596) ** \n\n` ) .setThumbnail(client.user.displayAvatarURL({ dynamic: true })) .addFields([ { name: `<:ExcitedRobot:953693944389206016> __Bot İsmi__`, value: `>>> \`${client.user.username}\``, inline: true, }, { name: `🏓 __Ping__`, value: `>>> \`${client.ws.ping}ms\``, inline: true, }, { name: `<a:emoji_28:953985812511469628> __Sunucular__`, value: `>>> \`${client.guilds.cache.size} Sunucu \``, inline: true, }, { name: `<:emoji_27:953985389994082305> Kullanıcılar`, value: `>>> \`${client.users.cache.size} Kullanıcı\``, inline: true, }, { name: `<:files:953693932892610571> Kanallar`, value: `>>> \`${client.channels.cache.size} Kanal\``, inline: true, }, { name: `<a:emoji_26:953985347270897687> Node.js Versiyonu`, value: `>>> \`${process.version}\``, inline: true, }, { name: `<a:emoji_26:953985347270897687> Discord.js Versiyonu`, value: `>>> \`${version}\``, inline: true, }, { name: `${emoji.setup} Bot Komutları`, value: `>>> \`\`\` Komutlar ${client.commands.size} , Alt Komutlar ${client.subcmd.size}\`\`\``, }, { name: `${emoji.time} Bot Uptime`, value: `>>> \`\`\`${duration(client.uptime) .map((i) => `${i}`) .join(` , `)}\`\`\``, }, ]) .setFooter({ text: ee.footertext, iconURL: ee.footericon }), ], }); }, });
javascript
<filename>web/_site/2011/05/26/rubinius-rewards/index.html <!DOCTYPE html> <html dir="ltr" lang="en"> <head> <title>Announcing Rubinius Rewards - Rubinius</title> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta content='en' http-equiv='content-language'> <meta content='Rubinius is an implementation of the Ruby programming language. The Rubinius bytecode virtual machine is written in C++. The bytecode compiler is written in pure Ruby. The vast majority of the core library is also written in Ruby, with some supporting primitives that interact with the VM directly.' name='description'> <link href='/' rel='home'> <link href='/' rel='start'> <link href='/feed/atom.xml' rel='alternate' type='application/atom+xml' title='Rubinius Blog' /> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js" type="text/javascript"></script><![endif]--> <script src="/javascripts/jquery-1.3.2.js"></script> <script src="/javascripts/paging_keys.js"></script> <script src="/javascripts/application.js"></script> <style>article, aside, dialog, figure, footer, header, hgroup, menu, nav, section { display: block; }</style> <link href="/stylesheets/blueprint/screen.css" media="screen" rel="stylesheet" /> <link href="/stylesheets/application.css" media="screen" rel="stylesheet" /> <link href="/stylesheets/blueprint/print.css" media="print" rel="stylesheet" /> <!--[if IE]><link href="/stylesheets/blueprint/ie.css" media="screen" rel="stylesheet" type="text/css" /><![endif]--> <!--[if IE]><link href="/stylesheets/ie.css" media="screen" rel="stylesheet" type="text/css" /><![endif]--> <link href="/stylesheets/pygments.css" media="screen" rel="stylesheet" /> <link href="/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" /> <link href="/images/apple-touch-icon.png" rel="apple-touch-icon" type="image/png" /> <link href="/images/apple-touch-icon.png" rel="apple-touch-icon" type="image/png" sizes="72x72" /> <link href="/images/apple-touch-icon.png" rel="apple-touch-icon" type="image/png" sizes="114x114" /> </head> <body> <div class='container'> <div class='span-21 blog_menu'> <header> <nav> <ul> <li><a href="/">Home</a></li> <li><a id="blog" href="/blog">Blog</a></li> <li><a id="documentation" href="/doc/en">Documentation</a></li> <li><a href="/projects">Projects</a></li> <li><a href="/roadmap">Roadmap</a></li> <li><a href="/releases">Releases</a></li> </ul> </nav> </header> </div> <div class='span-3 last'> <div id='version'> <a href="/releases/1.2.4">1.2.4</a> </div> </div> </div> <div class="container posts_nav"> <nav> <a href="/blog/posts_index">Index of Posts</a> <a id="feed_icon" href="/feed/atom.xml"><img alt="subscribe" src="/images/feed-icon16x16.png" /></a> </nav> </div> <div class="container blog_posts"> <h2 class="post_title">Announcing Rubinius Rewards</h2> <div class="by_line"> <p><span class="author"><NAME></span> <span class="date">26 May 2011</span> </p> </div> <h3 id="update">Update</h3> <p>See <a href="http://rubini.us/2011/09/02/retiring-some-rubinius-rewards/" title="Retiring (Some) Rubinius Rewards - Rubinius">this post</a> about retired shirts/stickers and to see what&rsquo;s still available.</p> <h2 id="tldr">tl;dr</h2> <p>Email <a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#099;&#111;&#109;&#109;&#117;&#110;&#105;&#116;&#121;&#064;&#114;&#117;&#098;&#105;&#110;&#105;&#046;&#117;&#115;">&#099;&#111;&#109;&#109;&#117;&#110;&#105;&#116;&#121;&#064;&#114;&#117;&#098;&#105;&#110;&#105;&#046;&#117;&#115;</a> to get stickers and t-shirts. Include your mailing address.</p> <h2 id="we-made-t-shirts-and-stickers">We Made T-Shirts and Stickers</h2> <p>We heard you like stickers and t-shirts, so we made some. They debuted at <a href="http://en.oreilly.com/rails2011" title="RailsConf 2011 - O'Reilly Conferences, May 16 - 19, 2011, Baltimore, MD!">RailsConf 2011 in Baltimore, MD</a>. Then we gave almost all of them away in just a few hours. They went like hotcakes. It turns out that there was a lot of pent up demand for Rubinius swag.</p> <p>Not everyone could be at RailsConf to get the goods, of course. Even some people who were there didn&rsquo;t get their shirts/stickers. If you didn&rsquo;t get one and want one, we&rsquo;re very sorry, but don&rsquo;t you worry. We&rsquo;ve got you covered.</p> <h2 id="general-availability-stickers">General Availability Stickers</h2> <p><a href="http://www.flickr.com/photos/veganstraightedge/5742057726"><img src="http://farm3.static.flickr.com/2458/5742057726_48c42d5462_z.jpg" alt="A box of Rubinius stickers" title="A box of Rubinius stickers by veganstraightedge, on Flickr" /></a></p> <p>We&rsquo;ve got a box of stickers in three designs: <a href="http://asset.rubini.us/web/images/blog/rubinius_square_sticker.png">square</a>, <a href="http://asset.rubini.us/web/images/blog/rubinius_bumper_sticker.png">bumper</a> and <a href="http://asset.rubini.us/web/images/blog/rubinius_diecut_sticker.png">die-cut</a>.</p> <p><a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#099;&#111;&#109;&#109;&#117;&#110;&#105;&#116;&#121;&#064;&#114;&#117;&#098;&#105;&#110;&#105;&#046;&#117;&#115;">&#069;&#109;&#097;&#105;&#108;&#032;&#117;&#115;</a> and tell us which one you want.</p> <h2 id="general-availability-t-shirt">General Availability T-Shirt</h2> <p>We&rsquo;re printing 500 more grey Rubinius t-shirts in the two different designs and in a a handful of sizes (women&rsquo;s small and medium, unisex small &ndash; xx-large).</p> <p><a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#099;&#111;&#109;&#109;&#117;&#110;&#105;&#116;&#121;&#064;&#114;&#117;&#098;&#105;&#110;&#105;&#046;&#117;&#115;">&#069;&#109;&#097;&#105;&#108;&#032;&#117;&#115;</a> and tell us which design / size you want: <a href="http://asset.rubini.us/web/images/blog/rubinius_use_ruby_square_shirt.jpg">square</a> or <a href="http://asset.rubini.us/web/images/blog/rubinius_use_ruby_horizontal_shirt.jpg">horizontal</a> in women&rsquo;s small, women&rsquo;s medium, unisex small, unisex medium, unisex large, unisex x-large or unisex xx-large.</p> <p><a href="http://www.flickr.com/photos/veganstraightedge/5709097384"><img src="http://farm4.static.flickr.com/3469/5709097384_0bde99e1d3_z.jpg" alt="Rubinius &quot;Use Ruby&trade;&quot; T-Shirts at the Farmhouse in Hollywood, CA" title="Rubinius &quot;Use Ruby&trade;&quot; T-Shirts at the Farmhouse in Hollywood, CA, on Flickr" /></a></p> <p>Photo by <a href="http://flickr.com/tjnelsonjunior" title="Flickr: tjnelsonjunior's Photostream"><NAME></a> <a href="http://twitter.com/tjnelsonjr" title="@tjnelsonjr">@tjnelsonjr</a></p> <h2 id="first-commit-sticker">First Commit Sticker</h2> <p>Going forward, we want to reward everyone who makes a contribution to Rubinius. As a very small token of our gratitude, we&rsquo;re mailing a Rubinius sticker (and a handwritten thank you note from one of us) to everyone after their first commit. So, if you&rsquo;ve ever thought about dipping your toe into Rubinius (or diving headlong into the deep end), now&rsquo;s the best time ever. Help us make Rubinius better (in big and small ways) and we&rsquo;ll send you stuff.</p> <h2 id="tenth-commit-shirt">Tenth Commit Shirt</h2> <p>We want you to stick around and keep helping Rubinius to get better and better. If you make 10 commits to Rubinius, we&rsquo;ll send you a special shirt only available to committers. That design is still a secret for now, but it&rsquo;s just for 10+ committers.</p> <p><em>Please, don&rsquo;t try to game the system by intentionally breaking stuff up into smaller commits just to bump up your count. Let&rsquo;s keep it honest.</em></p> <h2 id="quarterly-committer-merit-badge-stickers">Quarterly Committer Merit Badge Stickers</h2> <p>In addition to getting a generally available sticker after your first commit, at the end of each calendar quarter (every three months) we&rsquo;re sending a sticker to everyone who committed to Rubinius <strong>during</strong> that quarter.</p> <p>E.g. after July 1, 2011, we&rsquo;ll print and ship a sticker to everyone who committed between April 1 and June 30. Each quarter&rsquo;s sticker has the year / quarter in the corner. Keep committing every quarter and you&rsquo;ll keep collecting the merit badge stickers.</p> <h2 id="one-more-thing-mdash-im-committed-sticker">One More Thing &mdash; I&rsquo;m Committed* Sticker</h2> <p>Rubinius is obviously older than the new Rubinius Rewards program. To backfill for all the contributions people have made over the years up until, we have a <em>super duper limited edition never to be made again</em> sticker&hellip; the asterisk.</p> <p><a href="http://www.flickr.com/photos/veganstraightedge/5742135762"><img src="http://farm4.static.flickr.com/3187/5742135762_521146bdf9_z.jpg" alt="Rubinius stickers on my laptop" title="The new @Rubinius stickers on my @EngineYard laptop, on Flickr" /></a></p> <h2 id="get-in-touch">Get in Touch</h2> <p>If you&rsquo;re a past committer, <a href="&#109;&#097;&#105;&#108;&#116;&#111;:&#099;&#111;&#109;&#109;&#117;&#110;&#105;&#116;&#121;&#064;&#114;&#117;&#098;&#105;&#110;&#105;&#046;&#117;&#115;">&#101;&#109;&#097;&#105;&#108;&#032;&#117;&#115;</a> your mailing address get your special merit sticker. If you&rsquo;re a new committer, we&rsquo;ll try to take note and reach out to you. If you don&rsquo;t hear from us, don&rsquo;t be afraid to contact us with your mailing address.</p> <h3 id="up-next">Up Next&hellip;</h3> <p>Rubinius International Outposts.</p> <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_shortname = 'rubinius'; var disqus_identifier = '/2011/05/26/rubinius-rewards/'; var disqus_url = 'http://rubini.us/2011/05/26/rubinius-rewards/'; (function() { var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js'; (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })(); </script> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> </div> <footer> <div class='container'> <nav> <ul> <li><a rel="external" href="http://twitter.com/rubinius">Follow Rubinius on Twitter</a></li> <li><a rel="external" href="http://github.com/rubinius/rubinius">Fork Rubinius on github</a></li> <li><a rel="external" href="http://engineyard.com">An Engine Yard project</a></li> </ul> </nav> </div> </footer> <script> var _gaq=[['_setAccount','UA-12328521-1'],['_trackPageview']]; (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];g.async=1; g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js'; s.parentNode.insertBefore(g,s)}(document,'script')); </script> </body> </html>
html
<filename>resource.go<gh_stars>10-100 package goweb import ( "fmt" "net/http" ) // Resource creates multiple REST handlers from given interface. func (e *Engine) Resource(resourceName string, resource Resource) { resourcePath := fmt.Sprintf("%s/{%s}", resourceName, resource.Identifier()) e.registerRoute(http.MethodGet, resourceName, resource.Index) e.registerRoute(http.MethodGet, resourcePath, resource.Get) e.registerRoute(http.MethodPut, resourcePath, resource.Put) e.registerRoute(http.MethodDelete, resourcePath, resource.Delete) e.registerRoute(http.MethodPost, resourceName, resource.Post) } // Resource handles Index, Get, Put, Delete, and Post requests. type Resource interface { Index(c *Context) Responder Get(c *Context) Responder Put(c *Context) Responder Delete(c *Context) Responder Post(c *Context) Responder Identifier() string }
go
#![no_std] #![feature(concat_idents)] #![feature(collections)] extern crate collections; use collections::vec::Vec; /** * @section License * * The MIT License (MIT) * * Copyright (c) 2017, <NAME> * * 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. * * This file is part of the Rafiki project. */ #[macro_use] extern crate rafiki; use rafiki::kernel::{errno, sys, time}; use rafiki::kernel::chan::Channel; use rafiki::sync::{chan, event, queue}; use rafiki::debug::harness::Harness; testcase_define!(test_poll); fn test_poll_impl(_: *mut Harness) -> rafiki::Res { let timeout = sys::Time { seconds: 0, nanoseconds: 100 }; let (queue_tx, queue_rx) = queue::new(Some(32)); let (event_tx, event_rx) = event::new(); let list: chan::List(); /* Add both channels to the channel list. */ list.add(queue_rx.clone()); list.add(event_rx.clone()); println!("1. Writing to the queue channel."); assert!(queue_tx.write(&[2, 1, 0]) == Ok(3)); loop { println!("Polling..."); match list.poll(&Some(timeout)) { Ok(0) => { println!("2. Reading from the queue channel."); let mut buf: [u8; 3] = [0; 3]; assert!(queue_rx.read(&mut buf) == Ok(3)); assert!(buf == [2, 1, 0]); }, Ok(1) => { println!("4. Reading from the event channel."); assert!(event_rx.read(0x1) == Ok(0x1)); }, Err(errno::ETIMEDOUT) => { println!("3. Timeout. Writing to the event channel."); assert!(event_tx.write(0x1) == Ok(4)); }, _ => { unreachable!(); } } } } #[no_mangle] pub fn main() { let mut harness: Harness = Default::default(); let mut harness_testcases = [ testcase!(Some(test_poll), "test_poll"), testcase!(None, "") ]; sys::start(); uart::init(); harness.init(); harness.run(&mut harness_testcases); }
rust
{"name":"Journey_of_coding","tagline":"\"Hello World\" as the tradition says!","body":"****_****This website is all about:-****_****\r\n\r\n -how a novice coder ascends learning right from the basics facing challenges \r\n -solutions to the problems faced during the same (for fellow novice coders ;) ) \r\n -relatable discussions at the intersection of programming languages, \r\n softwares for different purposes, web-development AND \"big buzzwords\"!\r\n\r\n---\r\nDate: 2020-07-17\r\n---\r\n You can read my first blog [here](https://pradnyarkanale.github.io/First_blog/).","note":"Don't delete this file! It's used internally to help with page regeneration."}
json