text
stringlengths
1
1.04M
language
stringclasses
25 values
Former Arsenal star Mesut Ozil hopes to boost the numbers of British South Asians breaking into professional football after helping launch a development centre in Bradford. The United Kingdom has a South Asian population of more than three million people, which amounts to seven percent of the population. Yet only 11 British South Asians have played the professional game in England. In a bid to redress that stark imbalance, Fenerbahce midfielder Ozil joined forces with the Football Association and the Football for Peace organisation. Football for Peace, led by former British South Asian player Kashif Siddiqi and the FA, are co-launching the Mesut Ozil Development Centre in Bradford, which has a large South Asian community. The centre will run football and life skill sessions at League Two side Bradford City's training ground. Several Premier League and Football League clubs have also signed up to the initiative and it is hoped the Bradford centre will be the first of many to open nationwide. Ozil has Turkish roots but represented Germany, the country of his birth, before quitting the international stage in 2018 in protest at "racism and disrespect." "I have always been surprised why the South Asian Community are only allowed to be fans of the game, why are we not seeing more players or managers breaking into professional football?" Ozil said. "I want to support them, give them an opportunity to be successful both on and off the pitch. "I am from an ethnically diverse background and understand the challenges. I hope the Football for Peace Mesut Ozil Centre will become the platform they need." The centre will also provide workshops for parents to help build the relationship between South Asians and the wider football community. Siddiqi, who co-founded Football for Peace said: "Football has given me so much and working with Mesut we want to create a platform that will provide a framework inside the football pyramid between professional clubs and also our community."
english
package org.apache.jetspeed.services.jsp.tags; /* * Copyright 2000-2004 The Apache Software Foundation. * * 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. */ import java.util.Date; import java.text.DateFormat; import javax.servlet.jsp.JspException; import javax.servlet.jsp.PageContext; import javax.servlet.jsp.tagext.TagSupport; // Turbine Classes import org.apache.turbine.util.RunData; import org.apache.turbine.services.jsp.JspService; // Jetspeed classes import org.apache.jetspeed.services.logging.JetspeedLogFactoryService; import org.apache.jetspeed.services.logging.JetspeedLogger; /** * Supporting class for the info tag. * Sends the screens ecs element's content to the output stream. * * @author <a href="mailto:<EMAIL>"><NAME></a> * @author <a href="mailto:<EMAIL>"><NAME></a> */ public class InfoTag extends TagSupport { /** * Static initialization of the logger for this class */ private static final JetspeedLogger logger = JetspeedLogFactoryService.getLogger(InfoTag.class.getName()); /** * requestedInfo parameter defines type of Info that is being requested */ private String requestedInfo; /** * The setter for requestedInfo parameter */ public void setRequestedInfo(String requestedInfo) { this.requestedInfo = requestedInfo; } public int doStartTag() throws JspException { RunData data = (RunData)pageContext.getAttribute(JspService.RUNDATA, PageContext.REQUEST_SCOPE); try { String result = "jetspeed-InfoTag: unknown parameter >" + requestedInfo +"<"; /* Server Date */ if (requestedInfo.equalsIgnoreCase("ServerDate")) { result = DateFormat.getDateTimeInstance().format( new Date()); } /* User Name */ if (requestedInfo.equalsIgnoreCase("UserName")) { result = data.getUser().getUserName(); } /* First Name */ if (requestedInfo.equalsIgnoreCase("FirstName")) { result = data.getUser().getFirstName(); } /* Last Name */ if (requestedInfo.equalsIgnoreCase("LastName")) { result = data.getUser().getLastName(); } /* EMail */ if (requestedInfo.equalsIgnoreCase("EMail")) { result = data.getUser().getEmail(); } pageContext.getOut().print(result); } catch (Exception e) { String message = "Error processing info-tag, parameter: "+ requestedInfo; logger.error(message, e); try { data.getOut().print("Error processing info-tag, parameter: "+ requestedInfo); } catch(java.io.IOException ioe) {} } return EVAL_BODY_INCLUDE; } }
java
One of the most thrilling experiences of pregnancy is to feel your baby kicking or moving inside your womb. There is no better proof that a new, exciting and energy-filled life is growing inside you. It also acts as a sure shot sign of your baby’s health and well-being. Usually, one can feel the movements of the baby in the second trimester of pregnancy. But, if you are unable to feel any movement, or you felt it initially and you are not able to feel it now, it is advised to visit your obstetrician and get yourself examined. Usually, the movement of baby during pregnancy feels like butterflies, tumbling movements or nervous twitches. At an early phase, it is difficult to feel when the baby has moved or kicked, as it may seem like hunger pangs or indigestion. But, in the second or third pregnancy, it is relatively easier to distinguish between the movements of the baby and other unrelated events. If you are pregnant for the first time, by the end of second trimester or beginning of the third trimester, it is easy to feel and distinguish your baby’s kicks and jabs. Baby moving in womb, during early phase of pregnancy is felt as few flutters now and then. Eventually at the end of 2nd trimester, these fetal movements become stronger and more frequent. Some studies suggest that by the third trimester, these movements are felt about 30 times in an hour. It has also been observed that babies are relatively more active during the mother’s resting hours, like night time. You may even feel your baby’s movements after meals, when you are nervous or when you have settled down or are resting. As the weeks of pregnancy pass by, your baby’s movements will increase and become more evident. A rough timeline of the baby’s movements, is as follows: Once you have established your baby’s movements, it is good to keep a track of the same. Although fetal movements are not scientific proof of your baby’s growth and development, they indirectly confirm that your baby is growing normally. . They can be considered as indicators of baby’s growth. Ideal time for counting your baby’s movements is resting time or post-meal. You should be able to count about 10-12 movements in a span of two hours. If your baby is less active or you are not able to feel any movement at all, it is better to consult your obstetrician for evaluation. You should remember that it might be difficult to distinguish the fetal movements or to establish the waking and active hours of your baby. Lack of movements may be because your baby is sleeping. Hence, there is no need to worry if you haven’t established your baby’s movements by 24th week. You must consult your doctor if you are persistently unable to feel any movement at all by this time. Disclaimer: The information in the article is not intended or implied to be a substitute for professional medical advice, diagnosis or treatment. Always seek the advice of your doctor. Suggestions offered by doctors on BabyChakra are of advisory nature i.e., for educational and informational purposes only. Content posted on, created for, or compiled by BabyChakra is not intended or designed to replace your doctor's independent judgment about any symptom, condition, or the appropriateness or risks of a procedure or treatment for a given person.
english
<reponame>RAFIWE/BigReactors-1.7.10-Fixed // // Decompiled by Procyon v0.5.36 // package erogenousbeef.bigreactors.init; import net.minecraft.util.datafix.IFixableData; import net.minecraft.util.datafix.FixTypes; import net.minecraft.init.Items; import zero.temp.RecipeHelper2; import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.ItemStack; import net.minecraft.init.Blocks; import it.zerono.mods.zerocore.util.OreDictionaryHelper; import net.minecraftforge.oredict.OreDictionary; import erogenousbeef.bigreactors.common.item.ItemWrench; import erogenousbeef.bigreactors.common.item.ItemGeneric; import net.minecraft.item.Item; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineController; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineComputerPort; import erogenousbeef.bigreactors.common.multiblock.tileentity.creative.TileEntityTurbineCreativeSteamGenerator; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineRotorBlade; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineRotorShaft; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineRotorBearing; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbinePartGlass; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbineFluidPort; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbinePowerTapTesla; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbinePowerTapRedstoneFlux; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityTurbinePart; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorRedNetPort; import erogenousbeef.bigreactors.common.multiblock.tileentity.creative.TileEntityReactorCreativeCoolantPort; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorCoolantPort; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorComputerPort; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorRedstonePort; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorControlRod; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorFuelRod; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorAccessPort; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorPowerTapTesla; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorPowerTapRedstoneFlux; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorController; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorGlass; import erogenousbeef.bigreactors.common.multiblock.tileentity.TileEntityReactorPart; import net.minecraft.util.ResourceLocation; import java.util.Locale; import javax.annotation.Nullable; import it.zerono.mods.zerocore.lib.data.fixer.IGameObjectDataWalker; import net.minecraft.tileentity.TileEntity; import net.minecraft.block.material.Material; import erogenousbeef.bigreactors.common.block.BlockBRGenericFluid; import net.minecraft.block.material.MaterialLiquid; import net.minecraft.block.material.MapColor; import erogenousbeef.bigreactors.common.multiblock.block.BlockTurbineRotorBlade; import erogenousbeef.bigreactors.common.multiblock.block.BlockTurbineRotorShaft; import erogenousbeef.bigreactors.common.multiblock.block.BlockTurbineRotorBearing; import erogenousbeef.bigreactors.common.multiblock.block.BlockReactorFuelRod; import erogenousbeef.bigreactors.common.multiblock.block.BlockReactorRedstonePort; import erogenousbeef.bigreactors.common.multiblock.block.BlockMultiblockComputerPort; import erogenousbeef.bigreactors.common.multiblock.block.BlockReactorRedNetPort; import erogenousbeef.bigreactors.common.multiblock.block.BlockReactorControlRod; import erogenousbeef.bigreactors.common.multiblock.block.BlockMultiblockIOPort; import erogenousbeef.bigreactors.common.multiblock.block.BlockMultiblockPowerTap; import erogenousbeef.bigreactors.common.multiblock.PowerSystem; import erogenousbeef.bigreactors.common.multiblock.block.BlockMultiblockController; import erogenousbeef.bigreactors.common.multiblock.block.BlockMultiblockGlass; import erogenousbeef.bigreactors.common.multiblock.block.BlockMultiblockCasing; import erogenousbeef.bigreactors.common.multiblock.PartType; import erogenousbeef.bigreactors.common.block.BlockBRMetal; import net.minecraftforge.registries.IForgeRegistryEntry; import erogenousbeef.bigreactors.common.block.BlockBROre; import erogenousbeef.bigreactors.common.BigReactors; import javax.annotation.Nonnull; import net.minecraft.block.Block; import net.minecraftforge.registries.IForgeRegistry; import it.zerono.mods.zerocore.lib.init.IGameObjectMapper; import it.zerono.mods.zerocore.lib.config.ConfigHandler; import it.zerono.mods.zerocore.lib.data.fixer.TileEntityNameFixer; import it.zerono.mods.zerocore.lib.data.fixer.ItemReplacer; import it.zerono.mods.zerocore.lib.data.fixer.BlockReplacer; import it.zerono.mods.zerocore.lib.init.GameObjectsHandler; public class ObjectsHandler extends GameObjectsHandler { private static final int DATA_VERSION = 1; private final BlockReplacer _blockReplacer; private final ItemReplacer _itemReplacer; private final TileEntityNameFixer _teFixer; public ObjectsHandler(final ConfigHandler... configs) { super(1, configs); this._blockReplacer = new BlockReplacer(1); this._itemReplacer = new ItemReplacer(1); this._teFixer = new TileEntityNameFixer(1, "minecraft:bigreactors"); this.addBlockRemapper((IGameObjectMapper)this._blockReplacer); this.addItemRemapper((IGameObjectMapper)this._itemReplacer); } protected void onRegisterBlocks(@Nonnull final IForgeRegistry<Block> registry) { final boolean regCreativeParts = BigReactors.CONFIG.registerCreativeMultiblockParts; BrFluids.initialize(); registry.register((IForgeRegistryEntry)new BlockBROre("oreyellorite", "oreYellorite")); registry.register((IForgeRegistryEntry)new BlockBROre("oreanglesite", "oreAnglesite")); registry.register((IForgeRegistryEntry)new BlockBROre("orebenitoite", "oreBenitoite")); registry.register((IForgeRegistryEntry)new BlockBRMetal("blockyellorium", "blockYellorium")); registry.register((IForgeRegistryEntry)new BlockBRMetal("blockcyanite", "blockCyanite")); registry.register((IForgeRegistryEntry)new BlockBRMetal("blockgraphite", "blockGraphite")); registry.register((IForgeRegistryEntry)new BlockBRMetal("blockblutonium", "blockBlutonium")); registry.register((IForgeRegistryEntry)new BlockBRMetal("blockludicrite", "blockLudicrite")); registry.register((IForgeRegistryEntry)new BlockBRMetal("blocksteel", "blockSteel")); registry.register((IForgeRegistryEntry)new BlockMultiblockCasing(PartType.ReactorCasing, "reactorcasing")); registry.register((IForgeRegistryEntry)new BlockMultiblockGlass(PartType.ReactorGlass, "reactorglass")); registry.register((IForgeRegistryEntry)new BlockMultiblockController(PartType.ReactorController, "reactorcontroller")); registry.register((IForgeRegistryEntry)new BlockMultiblockPowerTap(PartType.ReactorPowerTap, "reactorpowertaprf", PowerSystem.RedstoneFlux)); registry.register((IForgeRegistryEntry)new BlockMultiblockPowerTap(PartType.ReactorPowerTap, "reactorpowertaptesla", PowerSystem.Tesla)); registry.register((IForgeRegistryEntry)new BlockMultiblockIOPort(PartType.ReactorAccessPort, "reactoraccessport")); registry.register((IForgeRegistryEntry)new BlockMultiblockIOPort(PartType.ReactorCoolantPort, "reactorcoolantport")); registry.register((IForgeRegistryEntry)new BlockReactorControlRod("reactorcontrolrod")); registry.register((IForgeRegistryEntry)new BlockReactorRedNetPort("reactorrednetport")); registry.register((IForgeRegistryEntry)new BlockMultiblockComputerPort(PartType.ReactorComputerPort, "reactorcomputerport")); registry.register((IForgeRegistryEntry)new BlockReactorRedstonePort("reactorredstoneport")); registry.register((IForgeRegistryEntry)new BlockReactorFuelRod("reactorfuelrod")); if (regCreativeParts) { registry.register((IForgeRegistryEntry)new BlockMultiblockIOPort(PartType.ReactorCreativeCoolantPort, "reactorcreativecoolantport")); } registry.register((IForgeRegistryEntry)new BlockMultiblockGlass(PartType.TurbineGlass, "turbineglass")); registry.register((IForgeRegistryEntry)new BlockMultiblockCasing(PartType.TurbineHousing, "turbinehousing")); registry.register((IForgeRegistryEntry)new BlockMultiblockController(PartType.TurbineController, "turbinecontroller")); registry.register((IForgeRegistryEntry)new BlockMultiblockPowerTap(PartType.TurbinePowerPort, "turbinepowertaprf", PowerSystem.RedstoneFlux)); registry.register((IForgeRegistryEntry)new BlockMultiblockPowerTap(PartType.TurbinePowerPort, "turbinepowertaptesla", PowerSystem.Tesla)); registry.register((IForgeRegistryEntry)new BlockMultiblockComputerPort(PartType.TurbineComputerPort, "turbinecomputerport")); registry.register((IForgeRegistryEntry)new BlockMultiblockIOPort(PartType.TurbineFluidPort, "turbinefluidport")); registry.register((IForgeRegistryEntry)new BlockTurbineRotorBearing("turbinebearing")); registry.register((IForgeRegistryEntry)new BlockTurbineRotorShaft("turbinerotorshaft")); registry.register((IForgeRegistryEntry)new BlockTurbineRotorBlade("turbinerotorblade")); if (regCreativeParts) { registry.register((IForgeRegistryEntry)new BlockMultiblockIOPort(PartType.TurbineCreativeSteamGenerator, "turbinecreativesteamgenerator")); } registry.register((IForgeRegistryEntry)new BlockBRGenericFluid(BrFluids.fluidYellorium, "yellorium", (Material)new MaterialLiquid(MapColor.field_151673_t))); registry.register((IForgeRegistryEntry)new BlockBRGenericFluid(BrFluids.fluidCyanite, "cyanite", Material.field_151587_i)); } protected void registerTileEntity(@Nonnull final Class<? extends TileEntity> tileEntityClass, @Nullable final IGameObjectDataWalker walker) { super.registerTileEntity((Class)tileEntityClass, walker); final String name = tileEntityClass.getSimpleName().toLowerCase(Locale.ROOT); this._teFixer.addReplacement("minecraft:bigreactors" + name, new ResourceLocation(this.getModId(), name)); } protected void onRegisterTileEntities() { this.registerTileEntity((Class)TileEntityReactorPart.class); this.registerTileEntity((Class)TileEntityReactorGlass.class); this.registerTileEntity((Class)TileEntityReactorController.class); this.registerTileEntity((Class)TileEntityReactorPowerTapRedstoneFlux.class); this.registerTileEntity((Class)TileEntityReactorPowerTapTesla.class); this.registerTileEntity((Class<? extends TileEntity>)TileEntityReactorAccessPort.class, TileEntityReactorAccessPort.getObjectDataWalker()); this.registerTileEntity((Class)TileEntityReactorFuelRod.class); this.registerTileEntity((Class)TileEntityReactorControlRod.class); this.registerTileEntity((Class)TileEntityReactorRedstonePort.class); this.registerTileEntity((Class)TileEntityReactorComputerPort.class); this.registerTileEntity((Class)TileEntityReactorCoolantPort.class); this.registerTileEntity((Class)TileEntityReactorCreativeCoolantPort.class); this.registerTileEntity((Class)TileEntityReactorRedNetPort.class); this.registerTileEntity((Class)TileEntityTurbinePart.class); this.registerTileEntity((Class)TileEntityTurbinePowerTapRedstoneFlux.class); this.registerTileEntity((Class)TileEntityTurbinePowerTapTesla.class); this.registerTileEntity((Class)TileEntityTurbineFluidPort.class); this.registerTileEntity((Class)TileEntityTurbinePartGlass.class); this.registerTileEntity((Class)TileEntityTurbineRotorBearing.class); this.registerTileEntity((Class)TileEntityTurbineRotorShaft.class); this.registerTileEntity((Class)TileEntityTurbineRotorBlade.class); this.registerTileEntity((Class)TileEntityTurbineCreativeSteamGenerator.class); this.registerTileEntity((Class)TileEntityTurbineComputerPort.class); this.registerTileEntity((Class)TileEntityTurbineController.class); } protected void onRegisterItems(@Nonnull final IForgeRegistry<Item> registry) { registry.register((IForgeRegistryEntry)new ItemGeneric("ingotyellorium", "ingotYellorium")); registry.register((IForgeRegistryEntry)new ItemGeneric("ingotcyanite", "ingotCyanite")); registry.register((IForgeRegistryEntry)new ItemGeneric("ingotgraphite", "ingotGraphite")); registry.register((IForgeRegistryEntry)new ItemGeneric("ingotblutonium", "ingotBlutonium")); registry.register((IForgeRegistryEntry)new ItemGeneric("ingotludicrite", "ingotLudicrite")); registry.register((IForgeRegistryEntry)new ItemGeneric("ingotsteel", "ingotSteel")); registry.register((IForgeRegistryEntry)new ItemGeneric("dustyellorium", "dustYellorium")); registry.register((IForgeRegistryEntry)new ItemGeneric("dustcyanite", "dustCyanite")); registry.register((IForgeRegistryEntry)new ItemGeneric("dustgraphite", "dustGraphite")); registry.register((IForgeRegistryEntry)new ItemGeneric("dustblutonium", "dustBlutonium")); registry.register((IForgeRegistryEntry)new ItemGeneric("dustludicrite", "dustLudicrite")); registry.register((IForgeRegistryEntry)new ItemGeneric("dustMallorium", "dustMallorium")); registry.register((IForgeRegistryEntry)new ItemGeneric("duststeel", "dustSteel")); registry.register((IForgeRegistryEntry)new ItemGeneric("mineralanglesite")); registry.register((IForgeRegistryEntry)new ItemGeneric("mineralbenitoite")); registry.register((IForgeRegistryEntry)new ItemGeneric("reactorcasingcores")); registry.register((IForgeRegistryEntry)new ItemGeneric("turbinehousingcores")); registry.register((IForgeRegistryEntry)new ItemWrench("wrench")); } protected void onRegisterOreDictionaryEntries() { OreDictionary.registerOre("oreYellorium", BrBlocks.oreYellorite.createItemStack()); if (BigReactors.CONFIG.registerYelloriumAsUranium) { OreDictionary.registerOre("ingotUranium", ((ItemGeneric)this.getTrackedItem("ingotyellorium")).createItemStack()); OreDictionary.registerOre("dustUranium", ((ItemGeneric)this.getTrackedItem("dustyellorium")).createItemStack()); OreDictionary.registerOre("ingotPlutonium", ((ItemGeneric)this.getTrackedItem("ingotblutonium")).createItemStack()); OreDictionary.registerOre("dustPlutonium", ((ItemGeneric)this.getTrackedItem("dustblutonium")).createItemStack()); OreDictionary.registerOre("dustMallorium", ((ItemGeneric)this.getTrackedItem("dustMallorium")).createItemStack()); } if (!OreDictionaryHelper.doesOreNameExist("blockSnow")) { OreDictionary.registerOre("blockSnow", new ItemStack(Blocks.field_150433_aE, 1)); } if (!OreDictionaryHelper.doesOreNameExist("blockIce")) { OreDictionary.registerOre("blockIce", new ItemStack(Blocks.field_150432_aD, 1)); } } protected void onRegisterRecipes(@Nonnull final IForgeRegistry<IRecipe> registry) { ItemStack result; if (BigReactors.CONFIG.registerYelloriteSmeltToUranium) { result = OreDictionaryHelper.getOre("ingotUranium"); if (null == result) { BigReactors.getLogger().warn("Config value registerYelloriteSmeltToUranium is set to True, but there are no ores registered as ingotUranium in the ore dictionary! Falling back to using standard yellorium only."); result = OreDictionaryHelper.getOre("ingotYellorium"); } } else { result = OreDictionaryHelper.getOre("ingotYellorium"); } RecipeHelper2.addSmelting(BrBlocks.oreYellorite.createItemStack(), result, 0.5f); RecipeHelper2.addSmelting(BrItems.dustYellorium.createItemStack(), BrItems.ingotYellorium.createItemStack(), 0.0f); RecipeHelper2.addSmelting(BrItems.dustCyanite.createItemStack(), BrItems.ingotCyanite.createItemStack(), 0.0f); RecipeHelper2.addSmelting(BrItems.dustGraphite.createItemStack(), BrItems.ingotGraphite.createItemStack(), 0.0f); RecipeHelper2.addSmelting(BrItems.dustBlutonium.createItemStack(), BrItems.ingotBlutonium.createItemStack(), 0.0f); RecipeHelper2.addSmelting(BrItems.dustLudicrite.createItemStack(), BrItems.ingotLudicrite.createItemStack(), 0.0f); RecipeHelper2.addSmelting(BrItems.dustSteel.createItemStack(), BrItems.ingotSteel.createItemStack(), 0.0f); RecipeHelper2.addSmelting(BrItems.dustMallorium.createItemStack(), BrItems.dustMallorium.createItemStack(), 0.0f); result = OreDictionaryHelper.getOre("ingotGraphite"); if (BigReactors.CONFIG.registerCoalForSmelting) { RecipeHelper2.addSmelting(new ItemStack(Items.field_151044_h, 1, 0), result, 1.0f); } if (BigReactors.CONFIG.registerCharcoalForSmelting) { RecipeHelper2.addSmelting(new ItemStack(Items.field_151044_h, 1, 1), result, 1.0f); } } protected void onRegisterDataFixers() { super.onRegisterDataFixers(); this.registerDataFixer(FixTypes.CHUNK, (IFixableData)this._blockReplacer); this.registerDataFixer(FixTypes.ITEM_INSTANCE, (IFixableData)this._itemReplacer); this.registerDataFixer(FixTypes.BLOCK_ENTITY, (IFixableData)this._teFixer); this.registerMissingBlocksReplacements(); this.registerMissingItemsReplacements(); } private void registerMissingBlocksReplacements() { ResourceLocation missingId = BigReactors.createResourceLocation("brore"); this._blockReplacer.addReplacement(missingId, 0, (Block)BrBlocks.oreYellorite); this._blockReplacer.addReplacement(missingId, 1, (Block)BrBlocks.oreAnglesite); this._blockReplacer.addReplacement(missingId, 2, (Block)BrBlocks.oreBenitoite); missingId = BigReactors.createResourceLocation("blockmetals"); this._blockReplacer.addReplacement(missingId, 0, (Block)BrBlocks.blockYellorium); this._blockReplacer.addReplacement(missingId, 1, (Block)BrBlocks.blockCyanite); this._blockReplacer.addReplacement(missingId, 2, (Block)BrBlocks.blockGraphite); this._blockReplacer.addReplacement(missingId, 3, (Block)BrBlocks.blockBlutonium); this._blockReplacer.addReplacement(missingId, 4, (Block)BrBlocks.blockLudicrite); this._blockReplacer.addReplacement(missingId, 5, (Block)BrBlocks.blockSteel); } private void registerMissingItemsReplacements() { ResourceLocation missingId = BigReactors.createResourceLocation("brore"); this._itemReplacer.addReplacement(missingId, 0, Item.func_150898_a((Block)BrBlocks.oreYellorite)); this._itemReplacer.addReplacement(missingId, 1, Item.func_150898_a((Block)BrBlocks.oreAnglesite)); this._itemReplacer.addReplacement(missingId, 2, Item.func_150898_a((Block)BrBlocks.oreBenitoite)); missingId = BigReactors.createResourceLocation("minerals"); this._itemReplacer.addReplacement(missingId, 0, (Item)BrItems.mineralAnglesite); this._itemReplacer.addReplacement(missingId, 1, (Item)BrItems.mineralBenitoite); missingId = BigReactors.createResourceLocation("blockmetals"); this._itemReplacer.addReplacement(missingId, 0, Item.func_150898_a((Block)BrBlocks.blockYellorium)); this._itemReplacer.addReplacement(missingId, 1, Item.func_150898_a((Block)BrBlocks.blockCyanite)); this._itemReplacer.addReplacement(missingId, 2, Item.func_150898_a((Block)BrBlocks.blockGraphite)); this._itemReplacer.addReplacement(missingId, 3, Item.func_150898_a((Block)BrBlocks.blockBlutonium)); this._itemReplacer.addReplacement(missingId, 4, Item.func_150898_a((Block)BrBlocks.blockLudicrite)); this._itemReplacer.addReplacement(missingId, 5, Item.func_150898_a((Block)BrBlocks.blockSteel)); missingId = BigReactors.createResourceLocation("ingotmetals"); this._itemReplacer.addReplacement(missingId, 0, (Item)BrItems.ingotYellorium); this._itemReplacer.addReplacement(missingId, 1, (Item)BrItems.ingotCyanite); this._itemReplacer.addReplacement(missingId, 2, (Item)BrItems.ingotGraphite); this._itemReplacer.addReplacement(missingId, 3, (Item)BrItems.ingotBlutonium); this._itemReplacer.addReplacement(missingId, 4, (Item)BrItems.ingotLudicrite); this._itemReplacer.addReplacement(missingId, 5, (Item)BrItems.ingotSteel); this._itemReplacer.addReplacement(missingId, 5, (Item)BrItems.ingotMallorium); missingId = BigReactors.createResourceLocation("dustmetals"); this._itemReplacer.addReplacement(missingId, 0, (Item)BrItems.dustYellorium); this._itemReplacer.addReplacement(missingId, 1, (Item)BrItems.dustCyanite); this._itemReplacer.addReplacement(missingId, 2, (Item)BrItems.dustGraphite); this._itemReplacer.addReplacement(missingId, 3, (Item)BrItems.dustBlutonium); this._itemReplacer.addReplacement(missingId, 4, (Item)BrItems.dustLudicrite); this._itemReplacer.addReplacement(missingId, 5, (Item)BrItems.dustSteel); this._itemReplacer.addReplacement(missingId, 5, (Item)BrItems.dustMallorium); } }
java
<!doctype html> <html lang="en"> <head> <!-- Global site tag (gtag.js) - Google Analytics --> <script async src="https://www.googletagmanager.com/gtag/js?id=UA-42765872-1"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'UA-42765872-1'); </script> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <title>igna tovar's Home Page</title> <meta name="description" content="Creator"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="css/bootstrap.min.css"> <link rel="stylesheet" href="/custom.css"> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="<KEY>" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.css"> <link rel="stylesheet" href="css/main.css"> </head> <body> <div id="header"></div> <br><br><br> <div class="container"> <div class="updates bg-gray"> <div class="row"> <section class="col-md-4"> <article> <h4>Self portraits - Fire</h4> <p>Although abstract pieces are better left to the interpretation of the viewer, I'd like to be clear that painting serves mainly as a creative scapegoat where everything that I won't be able to create within my lifetime can be potentially manifested.</p> <p>That, and a heavy dose of inspiration from my previous experiencies attending wixarika ceremonies where the fire serves as the main communication vessel to a spiritual realm. Specially, I try to think of the beginning of everything, that moment where, if we agree with the Big Bang Theory, everything that was, is and will be, was concentrated in a sub-atomic pellet. How did this nothingness that became everything transition from one state of complete comunion to an absolute chaos of energy that shaped all that is material?</p> <p>With this, I try to answer, how does raw creativity look? How does the formless look before becoming the "myriad of things"? How can one materialize the non-material visually?</p> </article> </section> <section class="col-md-8"> <div id="gallery"></div> </section> </div> </div> </div> <div id="footer"></div> <!-- Bootstrap core JavaScript --> <script src="vendor/jquery/jquery.min.js"></script> <script src="vendor/bootstrap/js/bootstrap.bundle.min.js"></script> <script src="https://ajax.cloudflare.com/cdn-cgi/scripts/a2bd7673/cloudflare-static/rocket-loader.min.js" data-cf-settings="6dee837631052c99c6d93418-|49" defer=""></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.3.0/ekko-lightbox.min.js" data-cf-settings="6dee837631052c99c6d93418-|49" defer=""></script> <script> $(document).ready(function () { $(function(){ $("#header").load("header.html"); $("#footer").load("footer.html"); $("#gallery").load("gallery.html"); }); //your code here $(document).on('click', '[data-toggle="lightbox"]', function(event) { event.preventDefault(); $(this).ekkoLightbox(); console.log("hello"); }); }); </script> </body> </html>
html
Former India National Cricket Team head coach Ravi Shastri has reacted to legendary India batter Sunil Gavaskar’s statement on star all-rounder Hardik Pandya in which he asserted that the 28-year-old is capable of doing what Shastri did in the year 1985 for Team India. Recently, in an interview with Sports Tak, Gavaskar heaped praise on Pandya and said that the all-rounder will be the match-winner for the Men In Blue in the forthcoming ICC Men’s T20 World Cup 2022, which is set to be held in Australia in October-November. Gavaskar also compared Pandya with Shastri and said that the 28-year-old can emulate Shastri’s exploits from the 1985 World Championship of cricket. Notably, the former India all-rounder Shastri had made significant contributions in all three departments in the 1985 World Championship. He had scored 182 runs in five matches, including five fifties, and claimed eight wickets. “Yes, I think he could possibly do what Ravi Shastri did in 1985 where Ravi was the outstanding performer with both bat and ball in the entire tournament. Some good catches as well. Hardik Pandya is capable of doing that,” Gavaskar, who captained India during the series, had said in an interaction with India Today. Shastri, while reacting to Gavaskar’s remark, said that he had already posted on social media platforms that Hardik is the No.1 T20 all-rounder in the world. Also, he reiterated his stance on the Gujarat Titans and India all-rounder and pinpointed that although everyone is entitled to their opinion, there is nothing he wants to add or subtract to his earlier comment on Pandya. “I have already tweeted and posted on Instagram that he is the No. 1 all-rounder in this format of the game. What else do you need? I had said it two weeks back. What else is there to add or subtract? XYZ can say whatever they want... everyone is entitled to his opinion. My view is clear, which is what I tweeted a couple of weeks ago,” Shastri told Sports Tak.
english
The debate moderated by Fox News anchor Chris Wallace in Cleveland, Ohio, was as bad-tempered as had been feared, with Trump leading the way in yelling over his challenger and moderator as well. Democratic Presidential nominee Joe Biden told a raging President Donald Trump to “shut up” in the first Presidential debate. The heated debate turned almost immediately into a shouting match 35 days ahead of the most tense US election in recent memory. The debate moderated by Fox News anchor Chris Wallace in Cleveland, Ohio, was as bad-tempered as had been feared, with Trump leading the way in yelling over his challenger and moderator as well. Without even shaking hands before the debate, the two leaders took the stage and while this was due to Covid-19 restrictions, the absence of the traditional greeting symbolized divisions through the country in the final countdown to November 3. Trump called Joe Biden “radical left” had the centrist Democrat “wrapped around their little finger. ” Trump also said one of his sons of corruption and telling Biden that “there’s nothing smart” about the Democrat. Biden, not only gave as good as he got, launched the kind of attack on Trump that the billionaire president has rarely had to endure to his face. Biden not only called “liar”, “racist”, and “clown” but also tagged Trump as the “puppy” of Russian President Vladimir Putin. Biden also targeted Trump over his administration’s response to the Covid-19 pandemic. Targeting Trump, who has broken longtime presidential transparency by refusing to publish his tax returns, Biden published his tax returns hours before the debate. Biden demanded Trump to do likewise. He has paid “millions” in taxes, Trump insisted. As an independent media platform, we do not take advertisements from governments and corporate houses. It is you, our readers, who have supported us on our journey to do honest and unbiased journalism. Please contribute, so that we can continue to do the same in future.
english
<filename>_data/twitterdev/twitter-python-ads-sdk/WEEKLY-REPORT-2020-10-19.json {"nameWithOwner": "twitterdev/twitter-python-ads-sdk", "reportID": "WEEKLY-REPORT-2020-10-19", "datestamp": {"latest": "2020-10-19", "previous": "2020-06-27"}, "data": {"commits": {"latest": 203, "previous": 201, "diff": 2}, "issues": {"latest": 93, "previous": 88, "diff": 5}, "openIssues": {"latest": 12, "previous": 12, "diff": 0}, "closedIssues": {"latest": 81, "previous": 76, "diff": 5}, "pullRequests": {"latest": 169, "previous": 164, "diff": 5}, "openPullRequests": {"latest": 3, "previous": 2, "diff": 1}, "mergedPullRequests": {"latest": 148, "previous": 145, "diff": 3}, "closedPullRequests": {"latest": 18, "previous": 17, "diff": 1}, "forkCount": {"latest": 84, "previous": 79, "diff": 5}, "stargazers": {"latest": 102, "previous": 86, "diff": 16}, "watchers": {"latest": 31, "previous": 32, "diff": -1}}}
json
<reponame>alawibaba/geopm<filename>test/EnergyEfficientAgentTest.cpp /* * Copyright (c) 2015, 2016, 2017, 2018, Intel Corporation * * 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 Intel Corporation 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 LOG OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include <stdlib.h> #include <iostream> #include <fstream> #include <map> #include <memory> #include "gtest/gtest.h" #include "gmock/gmock.h" #include "geopm_message.h" #include "geopm_hash.h" #include "Agent.hpp" #include "EnergyEfficientAgent.hpp" #include "Exception.hpp" #include "Helper.hpp" #include "Agg.hpp" #include "MockPlatformIO.hpp" #include "MockPlatformTopo.hpp" #include "PlatformTopo.hpp" #include "geopm.h" using ::testing::_; using ::testing::Invoke; using ::testing::Sequence; using ::testing::Return; using ::testing::AtLeast; using geopm::EnergyEfficientAgent; using geopm::PlatformTopo; using geopm::IPlatformIO; class EnergyEfficientAgentTest : public :: testing :: Test { protected: enum mock_signal_idx_e { REGION_ID_IDX, RUNTIME_IDX, FREQ_IDX, ENERGY_PKG_IDX, }; void SetUp(); void TearDown(); static const size_t M_NUM_REGIONS = 5; std::vector<size_t> m_hints; std::vector<double> m_expected_freqs; std::unique_ptr<EnergyEfficientAgent> m_agent; std::vector<std::string> m_region_names; std::vector<uint64_t> m_region_hash; std::vector<double> m_mapped_freqs; std::vector<double> m_sample; std::vector<double> m_default_policy; double m_freq_min; double m_freq_max; std::unique_ptr<MockPlatformIO> m_platform_io; std::unique_ptr<MockPlatformTopo> m_platform_topo; const int M_NUM_CPU = 4; }; void EnergyEfficientAgentTest::SetUp() { m_platform_io = geopm::make_unique<MockPlatformIO>(); m_platform_topo = geopm::make_unique<MockPlatformTopo>(); ON_CALL(*m_platform_topo, num_domain(PlatformTopo::M_DOMAIN_CPU)) .WillByDefault(Return(M_NUM_CPU)); ON_CALL(*m_platform_io, signal_domain_type(_)) .WillByDefault(Return(PlatformTopo::M_DOMAIN_BOARD)); ON_CALL(*m_platform_io, control_domain_type(_)) .WillByDefault(Return(PlatformTopo::M_DOMAIN_CPU)); ON_CALL(*m_platform_io, read_signal(std::string("CPUINFO::FREQ_MIN"), _, _)) .WillByDefault(Return(1.0e9)); ON_CALL(*m_platform_io, read_signal(std::string("CPUINFO::FREQ_STICKER"), _, _)) .WillByDefault(Return(1.3e9)); ON_CALL(*m_platform_io, read_signal(std::string("CPUINFO::FREQ_MAX"), _, _)) .WillByDefault(Return(2.2e9)); ON_CALL(*m_platform_io, read_signal(std::string("CPUINFO::FREQ_STEP"), _, _)) .WillByDefault(Return(100e6)); ON_CALL(*m_platform_io, push_signal("REGION_ID#", _, _)) .WillByDefault(Return(REGION_ID_IDX)); ON_CALL(*m_platform_io, push_signal("REGION_RUNTIME", _, _)) .WillByDefault(Return(RUNTIME_IDX)); ON_CALL(*m_platform_io, push_signal("ENERGY_PACKAGE", _, _)) .WillByDefault(Return(ENERGY_PKG_IDX)); ON_CALL(*m_platform_io, push_control("FREQUENCY", _, _)) .WillByDefault(Return(FREQ_IDX)); ON_CALL(*m_platform_io, agg_function(_)) .WillByDefault(Return(geopm::Agg::max)); EXPECT_CALL(*m_platform_io, agg_function(_)) .WillRepeatedly(Return(geopm::Agg::max)); // calls in constructor EXPECT_CALL(*m_platform_topo, num_domain(_)).Times(AtLeast(1)); EXPECT_CALL(*m_platform_io, signal_domain_type(_)).Times(AtLeast(1)); EXPECT_CALL(*m_platform_io, control_domain_type(_)).Times(AtLeast(1)); EXPECT_CALL(*m_platform_io, read_signal(_, _, _)).Times(AtLeast(1)); EXPECT_CALL(*m_platform_io, push_signal(_, _, _)).Times(AtLeast(1)); EXPECT_CALL(*m_platform_io, push_control(_, _, _)).Times(M_NUM_CPU); m_freq_min = 1800000000.0; m_freq_max = 2200000000.0; m_region_names = {"mapped_region0", "mapped_region1", "mapped_region2", "mapped_region3", "mapped_region4"}; m_region_hash = {0xeffa9a8d, 0x4abb08f3, 0xa095c880, 0x5d45afe, 0x71243e97}; m_mapped_freqs = {m_freq_max, 2100000000.0, 2000000000.0, 1900000000.0, m_freq_min}; m_default_policy = {m_freq_min, m_freq_max}; m_hints = {GEOPM_REGION_HINT_COMPUTE, GEOPM_REGION_HINT_MEMORY, GEOPM_REGION_HINT_SERIAL, GEOPM_REGION_HINT_NETWORK, GEOPM_REGION_HINT_PARALLEL, GEOPM_REGION_HINT_IO, GEOPM_REGION_HINT_COMPUTE, GEOPM_REGION_HINT_IGNORE, GEOPM_REGION_HINT_COMPUTE, GEOPM_REGION_HINT_UNKNOWN}; m_expected_freqs = {m_freq_min, m_freq_max, m_freq_min, m_freq_max, m_freq_min}; m_sample.resize(1); ASSERT_EQ(m_mapped_freqs.size(), m_region_names.size()); ASSERT_EQ(m_mapped_freqs.size(), m_region_hash.size()); ASSERT_EQ(m_mapped_freqs.size(), m_expected_freqs.size()); std::stringstream ss; ss << "{"; for (size_t x = 0; x < M_NUM_REGIONS; x++) { ss << "\"" << m_region_names[x] << "\": " << m_mapped_freqs[x]; if (x != M_NUM_REGIONS-1) { ss << ", "; } } ss << "}"; setenv("GEOPM_EFFICIENT_FREQ_MIN", std::to_string(m_freq_min).c_str(), 1); setenv("GEOPM_EFFICIENT_FREQ_MAX", std::to_string(m_freq_max).c_str(), 1); setenv("GEOPM_EFFICIENT_FREQ_RID_MAP", ss.str().c_str(), 1); m_agent = geopm::make_unique<EnergyEfficientAgent>(*m_platform_io, *m_platform_topo); } void EnergyEfficientAgentTest::TearDown() { unsetenv("GEOPM_EFFICIENT_FREQ_RID_MAP"); unsetenv("GEOPM_EFFICIENT_FREQ_MIN"); unsetenv("GEOPM_EFFICIENT_FREQ_MAX"); } TEST_F(EnergyEfficientAgentTest, map) { EXPECT_CALL(*m_platform_io, sample(ENERGY_PKG_IDX)) .Times(M_NUM_REGIONS) .WillRepeatedly(Return(8888)); for (size_t x = 0; x < M_NUM_REGIONS; x++) { EXPECT_CALL(*m_platform_io, sample(REGION_ID_IDX)) .WillOnce(Return(geopm_field_to_signal(m_region_hash[x]))); m_agent->sample_platform(m_sample); EXPECT_CALL(*m_platform_io, adjust(FREQ_IDX, m_mapped_freqs[x])).Times(M_NUM_CPU); m_agent->adjust_platform(m_default_policy); } } TEST_F(EnergyEfficientAgentTest, name) { EXPECT_EQ("energy_efficient", m_agent->plugin_name()); EXPECT_NE("bad_string", m_agent->plugin_name()); } TEST_F(EnergyEfficientAgentTest, hint) { EXPECT_CALL(*m_platform_io, sample(ENERGY_PKG_IDX)) .Times(m_hints.size()) .WillRepeatedly(Return(8888)); for (size_t x = 0; x < m_hints.size(); x++) { EXPECT_CALL(*m_platform_io, sample(REGION_ID_IDX)) .WillOnce(Return(geopm_field_to_signal( geopm_region_id_set_hint(m_hints[x], 0x1234)))); double expected_freq = NAN; switch(m_hints[x]) { // Hints for low CPU frequency case GEOPM_REGION_HINT_MEMORY: case GEOPM_REGION_HINT_NETWORK: case GEOPM_REGION_HINT_IO: expected_freq = 1.8e9; break; // Hints for maximum CPU frequency case GEOPM_REGION_HINT_COMPUTE: case GEOPM_REGION_HINT_SERIAL: case GEOPM_REGION_HINT_PARALLEL: expected_freq = 2.2e9; break; // Hint Inconclusive //case GEOPM_REGION_HINT_UNKNOWN: //case GEOPM_REGION_HINT_IGNORE: default: expected_freq = 1.8e9; break; } EXPECT_CALL(*m_platform_io, adjust(FREQ_IDX, expected_freq)).Times(M_NUM_CPU); m_agent->sample_platform(m_sample); m_agent->adjust_platform(m_default_policy); } } TEST_F(EnergyEfficientAgentTest, online_mode) { int err = unsetenv("GEOPM_EFFICIENT_FREQ_RID_MAP"); EXPECT_EQ(0, err); EXPECT_EQ(NULL, getenv("GEOPM_EFFICIENT_FREQ_RID_MAP")); setenv("GEOPM_EFFICIENT_FREQ_ONLINE", "yes", 1); double freq_min = 1e9; setenv("GEOPM_EFFICIENT_FREQ_MIN", std::to_string(freq_min).c_str(), 1); double freq_max = 2e9; setenv("GEOPM_EFFICIENT_FREQ_MAX", std::to_string(freq_max).c_str(), 1); for (int x = 0; x < 4; ++x) { // calls in constructor form SetUp and this test EXPECT_CALL(*m_platform_io, signal_domain_type(_)).Times(1); EXPECT_CALL(*m_platform_io, control_domain_type(_)).Times(1); EXPECT_CALL(*m_platform_io, read_signal(_, _, _)).Times(2); EXPECT_CALL(*m_platform_io, push_signal("REGION_ID#", _, _)).Times(1); EXPECT_CALL(*m_platform_io, push_control("FREQUENCY", _, _)).Times(M_NUM_CPU); EXPECT_CALL(*m_platform_io, push_signal("REGION_RUNTIME", _, _)).Times(1); EXPECT_CALL(*m_platform_io, push_signal("ENERGY_PACKAGE", _, _)).Times(2); // reset agent with new settings m_agent = geopm::make_unique<EnergyEfficientAgent>(*m_platform_io, *m_platform_topo); { // within EfficientFreqRegion EXPECT_CALL(*m_platform_io, sample(REGION_ID_IDX)) .WillOnce(Return(geopm_region_id_set_hint(m_hints[x], m_region_hash[x]))); EXPECT_CALL(*m_platform_io, sample(ENERGY_PKG_IDX)).Times(2); EXPECT_CALL(*m_platform_io, adjust(FREQ_IDX, _)).Times(M_NUM_CPU); m_agent->sample_platform(m_sample); m_agent->adjust_platform(m_default_policy); } } unsetenv("GEOPM_EFFICIENT_FREQ_RID_MAP"); }
cpp
<reponame>Macpotty/cartConsole<filename>mec_acc.py import math import numpy as np def set_speed(speed_x, speed_y, speed_rot): robot_L = 300 robot_W = 400 wheel = 76.0 factor_k = 1.0/100 cov = 60.0/(2*math.pi) #print(cov) Ratio = 14 coeff_arg = [[+1, -1, -1], [+1, +1, +1], [+1, +1, -1], [+1, -1, +1]] fl_w = (speed_x*coeff_arg[0][0]+speed_y*coeff_arg[0][1]+coeff_arg[0][2]*(robot_L+robot_W)/2*factor_k*speed_rot)/wheel fr_w = (speed_x*coeff_arg[1][0]+speed_y*coeff_arg[1][1]+coeff_arg[1][2]*(robot_L+robot_W)/2*factor_k*speed_rot)/wheel bl_w = (speed_x*coeff_arg[2][0]+speed_y*coeff_arg[2][1]+coeff_arg[2][2]*(robot_L+robot_W)/2*factor_k*speed_rot)/wheel br_w = (speed_x*coeff_arg[3][0]+speed_y*coeff_arg[3][1]+coeff_arg[3][2]*(robot_L+robot_W)/2*factor_k*speed_rot)/wheel #print(fl_w, fr_w, bl_w, br_w) fl_n = fl_w * cov fr_n = fr_w * cov bl_n = bl_w * cov br_n = br_w * cov PWM_FL = (50.0/6000)*14*fl_n+50 PWM_FR = (50.0/6000)*14*fr_n+50 PWM_BL = (50.0/6000)*14*bl_n+50 PWM_BR = (50.0/6000)*14*br_n+50 p1 = PWM_FL-50 p2 = PWM_FL-50 p3 = PWM_FL-50 p4 = PWM_FL-50 PWM_Max1 = max(abs(PWM_FL-50), abs(PWM_FR-50)) PWM_Max2 = max(abs(PWM_BL-50), abs(PWM_BR-50)) PWM_Max = max(abs(PWM_Max1), abs(PWM_Max2)) if PWM_Max >= 48: PWM_FL = 48*(PWM_FL-50)/PWM_Max+50 PWM_FR = 48*(PWM_FR-50)/PWM_Max+50 PWM_BL = 48*(PWM_BL-50)/PWM_Max+50 PWM_BR = 48*(PWM_BR-50)/PWM_Max+50 real_set_fl_w = (PWM_FL - 50)/(14*50.0)*6000 / cov real_set_fr_w = (PWM_FR - 50)/(14*50.0)*6000 / cov real_set_bl_w = (PWM_BL - 50)/(14*50.0)*6000 / cov real_set_br_w = (PWM_BR - 50)/(14*50.0)*6000 / cov real_speed = [0, 0, 0] real_speed[0] = (coeff_arg[0][0] * real_set_fl_w + coeff_arg[1][0] * real_set_fr_w + coeff_arg[2][0] * real_set_bl_w + coeff_arg[3][0] * real_set_br_w) * wheel / 4 real_speed[1] = (coeff_arg[0][1] * real_set_fl_w + coeff_arg[1][1] * real_set_fr_w + coeff_arg[2][1] * real_set_bl_w + coeff_arg[3][1] * real_set_br_w) * wheel / 4 real_speed[2] = (coeff_arg[0][2] * real_set_fl_w + coeff_arg[1][2] * real_set_fr_w + coeff_arg[2][2] * real_set_bl_w + coeff_arg[3][2] * real_set_br_w) * wheel / (4 * (robot_L + robot_W)/2)/factor_k return (real_set_fl_w, real_set_fr_w, real_set_bl_w, real_set_br_w) def speedCalculator(col_data, ver_data, radian_data, colSpeed_data, verSpeed_data, rotSpeed_data): for i in np.arange(len(col_data)-1): colSpeed = ((col_data[i] - col_data[i+1]) / 0.1) verSpeed = ((ver_data[i] - ver_data[i+1]) / 0.1) rotSpeed = ((radian_data[i] - radian_data[i+1]) / 0.1) colSpeed_data.append(colSpeed) verSpeed_data.append(verSpeed) rotSpeed_data.append(rotSpeed) if __name__ == '__main__': realSpeed = set_speed(5000, 5000, 1000) print(realSpeed)
python
Russian Foreign Minister Sergei Lavrov says the West's interventions in the Middle East and North Africa benefit Takfiri terrorist groups operating in the region. In an interview with the UK's Channel 4 on Friday, Lavrov said that the West's “adventures” over the past couple of decades have created al-Qaeda in Afghanistan, Daesh in Iraq and Jabhat al-Nusra in Syria. In Syria, he said, "there is another beast that was born - Jabhat al Nusra, which changes names, but is another terrorist organization. " "Whatever the civilized West is trying to bring to the Middle East and North Africa turns out to be in favor of terrorists," he added. Asked about a possible withdrawal of Russian forces from Syria, Lavrov stressed that Moscow has set no deadline for such a pullout and that everything depends on the situation. "We do not like artificial deadlines, but we have been consistently reducing our military presence in Syria. The last reduction took place a few of days ago. More than 1,000 troops have come back to Russia, some aircraft and other equipment as well. It depends on what is the actual situation on the ground," he said. The top Russian diplomat further noted that Moscow, along with the Syrian army, had managed to foil Daesh plans to create a so-called caliphate. Daesh remnants and Jabhat al Nusra militants, however, are preventing the full implantation of a de-escalation zone deal in southern Syria, he said. "So there are some leftovers. Besides, we do have, not actually full-fledged bases, but two places where our naval ships and our aircraft are located in Syria and they might be usefully kept for quite some time," Lavrov pointed out. Russian jets have been conducting air raids against Daesh and other terror outfits inside Syria at the Damascus government’s request since September 2015. Elsewhere in his interview, Lavrov praised Syrian President Bashar al-Assad for "protecting his country and in a broader sense the region from terrorism," adding that the future of the Arab country must be decided by its own people. The Pentagon says there are about 2,000 US troops in Syria.
english
<filename>gm-incubator/design-pattern/src/main/java/demo/design/decorator/PantsDecorator.java package demo.design.decorator; public class PantsDecorator extends Decorator { public void show() { this.component.show(); System.out.println("Pants "); } }
java
{% extends "header.html" %} {% block content %} <div class="row justify-content-center"> <div class="col-11 col-lg-8"> <div style="font-weight:bold; font-size:20px" align="center"> API Documentation </div> <br> <div class="page-item"> <div> This is the documentation for version 1 of the API. <br><br> All successful queries will return a response code of 200; all errors will return 400. </div> <hr style="border-top: 1px solid rgba(0,0,0,.25); margin-top:32px; margin-bottom:32px"> <div id="unrestricted"> <h2><b>Unrestricted</b></h2> These routes are available to anyone; no authentication is required. </div> <hr style="border-top: 1px solid rgba(0,0,0,.25); margin-top:32px; margin-bottom:32px"> <div id="restricted"> <h2><b>Restricted</b></h2> These routes are available only to administrators; the following authentication is required: <br><br> <pre class="api-pre"><code class="api-code">"api_key": found on your account page</code></pre> </div> </div> </div> </div> <script type="text/javascript" src="{{ url_for('static', filename='/scripts/api-documentation.js') }}"></script> {% endblock %}
html
<filename>items/32789.json {"id":32789,"value":2500,"name":"Perfect juju agility potion (3)","limit":1000,"name_pt":"Poção juju Agilidade perfeita (3)","price":9714,"last":9714}
json
import { routerReducer } from 'react-router-redux'; import { combineReducers } from 'redux'; import { IState as CartState, modifyCart } from './cartReducers'; import { IState as StoreState, modifyStore } from './storeReducers'; export interface IAppState { modifyCart: CartState; modifyStore: StoreState; } export default combineReducers({ modifyCart, modifyStore, routerReducer });
typescript
<reponame>burgamacha/lexicalDispersion {"organizations": [], "uuid": "2e729cb1a128dc47457bce7bbaea5e3f48c00904", "thread": {"social": {"gplus": {"shares": 0}, "pinterest": {"shares": 0}, "vk": {"shares": 0}, "linkedin": {"shares": 0}, "facebook": {"likes": 0, "shares": 0, "comments": 0}, "stumbledupon": {"shares": 0}}, "site_full": "www.tripadvisor.com", "main_image": "https://media-cdn.tripadvisor.com/media/photo-s/09/ac/a5/e7/exterior.jpg", "site_section": "https://www.tripadvisor.com/Hotel_Review-g60763-d1139717-Reviews-Holiday_Inn_Express_New_York_City_Times_Square-New_York_City_New_York.html", "section_title": "Holiday Inn Express New York City Times Square - UPDATED 2017 Hotel Reviews &amp; Price Comparison - TripAdvisor", "url": "https://www.tripadvisor.com/ShowUserReviews-g60763-d1139717-r469730695-Holiday_Inn_Express_New_York_City_Times_Square-New_York_City_New_York.html", "country": "US", "domain_rank": 189, "title": "Too average for Holiday Inn standards", "performance_score": 0, "site": "tripadvisor.com", "participants_count": 2, "title_full": "Too average for Holiday Inn standards - Review of Holiday Inn Express New York City Times Square, New York City, NY - TripAdvisor", "spam_score": 0.0, "site_type": "discussions", "published": "2017-03-23T02:00:00.000+02:00", "replies_count": 1, "uuid": "2e729cb1a128dc47457bce7bbaea5e3f48c00904"}, "author": "<NAME>", "url": "https://www.tripadvisor.com/ShowUserReviews-g60763-d1139717-r469730695-Holiday_Inn_Express_New_York_City_Times_Square-New_York_City_New_York.html", "ord_in_thread": 0, "title": "Too average for Holiday Inn standards", "locations": [], "entities": {"persons": [], "locations": [], "organizations": []}, "highlightText": "", "language": "english", "persons": [], "text": "I am a IHG member since 12 years or more, i have stayed with IHG partner hotels everywhere (INDIA, CHINA, FRANCE,ITALY,KUWAIT....) you may check your records.\nThis was my worst experience, as first of all i got a second hand treatment because for the first time i booked this hotel through third party website\nThe staff at the front desk treated us like an outsider because we booked through third party website, after check in when i asked for lotion they didn't delivery, next day i asked again but they delivered after an hour!! after an hour or so i asked for the paper glasses as the housekeeping forgot to replace for the coffee machine, when i asked for the paper glass the front desk person told me to check what else i need as they can't give so much service!\nIf you guys (IHG) are so particular about the bookings to be done through your own website, then why give authorisation to other agencies & disappoint your loyal long time clients?\nTo my surprise i was informed that i will not get any points for my this stay as i have not booked through IHG !!!\nI booked through other agency because it was cheaper by 20% then booking on IHG website.\nThe rooms & bathrooms are very clean, bed was comfortable too. Breakfast was reasonably good, as they served same variety for all six days....no change! The dinning area is too small for such a large hotel, most of the guests took breakfast to their rooms, so long queues at elevators in peak hours when you want to go to work!\nThis property is in a bad shape too....the rooms are extremely small & doesn't feel Holiday Inn", "external_links": [], "published": "2017-03-23T02:00:00.000+02:00", "crawled": "2017-03-29T13:40:18.289+03:00", "highlightTitle": ""}
json
package cmd import ( "github.com/rsteube/carapace" "github.com/spf13/cobra" ) var dselectUpgradeCmd = &cobra.Command{ Use: "dselect-upgrade", Short: "dselect-upgrade is used in conjunction with the traditional Debian packaging front-end", Run: func(cmd *cobra.Command, args []string) {}, } func init() { carapace.Gen(dselectUpgradeCmd).Standalone() rootCmd.AddCommand(dselectUpgradeCmd) }
go
Raoule V. LGBTQI+ Literature Recommendations!!!a thread!! curated by @leighannwrites! It’s important to note that work published in different decades are going to contain different vocab (terms which may be less acceptable today) Don't be misled: "The total area of the human adult gut mucosa is not in the order of tennis lawn, rather is that of half a badminton court."(Reason for sharing: Critical Dimensions, latest of my AFV design threads. Critical dimensions are those that define the overall size of the vehicle and constrain many other elements. This is a long one, The Prepaid Economy. THREAD (with sources!) Transnational Extreme RightSome of commentary after Christchurch has dangerous ahistoricism that transnational right-wing extremism/terrorism is ‘a new thing’IT’S NOT.Ever since their Götterdämmerung in 1945,
english
<gh_stars>0 use sgx_types::*; use rcore_fs_sefs::dev::{File, Storage, DevResult, DeviceError}; use std::path::*; use std::fs::remove_file; pub struct SgxStorage { path: PathBuf, } impl SgxStorage { pub fn new(eid: sgx_enclave_id_t, path: impl AsRef<Path>) -> Self { unsafe { EID = eid; } let path_str = path.as_ref().to_str().unwrap(); let ret = set_sefs_dir(path_str); assert_eq!(ret, 0); SgxStorage { path: path.as_ref().to_path_buf() } } } impl Storage for SgxStorage { fn open(&self, file_id: usize) -> DevResult<Box<File>> { match file_open(file_id, false, &[0u8; 16]) { 0 => Ok(Box::new(SgxFile { fd: file_id })), _ => panic!(), } } fn create(&self, file_id: usize) -> DevResult<Box<File>> { match file_open(file_id, true, &[0u8; 16]) { 0 => Ok(Box::new(SgxFile { fd: file_id })), _ => panic!(), } } fn remove(&self, file_id: usize) -> DevResult<()> { let mut path = self.path.to_path_buf(); path.push(format!("{}", file_id)); match remove_file(path) { Ok(_) => Ok(()), Err(_) => panic!(), } } } pub struct SgxFile { fd: usize, } impl File for SgxFile { fn read_at(&self, buf: &mut [u8], offset: usize) -> DevResult<usize> { match file_read_at(self.fd, offset, buf) { size if size > 0 => Ok(size as usize), e => panic!("read_at {}", e), } } fn write_at(&self, buf: &[u8], offset: usize) -> DevResult<usize> { match file_write_at(self.fd, offset, buf) { size if size > 0 => Ok(size as usize), e => panic!("write_at {}", e), } } fn set_len(&self, len: usize) -> DevResult<()> { match file_set_len(self.fd, len) { 0 => Ok(()), e => panic!("set_len {}", e), } } fn flush(&self) -> DevResult<()> { match file_flush(self.fd) { 0 => Ok(()), e => panic!("flush {}", e), } } } impl Drop for SgxFile { fn drop(&mut self) { let _ = file_close(self.fd); } } /// Ecall functions to access SgxFile extern { fn ecall_set_sefs_dir(eid: sgx_enclave_id_t, retval: *mut i32, path: *const u8, len: size_t) -> sgx_status_t; fn ecall_file_open(eid: sgx_enclave_id_t, retval: *mut i32, fd: size_t, create: uint8_t, key: *const sgx_key_128bit_t) -> sgx_status_t; fn ecall_file_close(eid: sgx_enclave_id_t, retval: *mut i32, fd: size_t) -> sgx_status_t; fn ecall_file_flush(eid: sgx_enclave_id_t, retval: *mut i32, fd: size_t) -> sgx_status_t; fn ecall_file_read_at(eid: sgx_enclave_id_t, retval: *mut i32, fd: size_t, offset: size_t, buf: *mut uint8_t, len: size_t) -> sgx_status_t; fn ecall_file_write_at(eid: sgx_enclave_id_t, retval: *mut i32, fd: size_t, offset: size_t, buf: *const uint8_t, len: size_t) -> sgx_status_t; fn ecall_file_set_len(eid: sgx_enclave_id_t, retval: *mut i32, fd: size_t, len: size_t) -> sgx_status_t; } /// Must be set when init enclave static mut EID: sgx_enclave_id_t = 0; fn set_sefs_dir(path: &str) -> i32 { let mut ret_val = -1; unsafe { let ret = ecall_set_sefs_dir(EID, &mut ret_val, path.as_ptr(), path.len()); assert_eq!(ret, sgx_status_t::SGX_SUCCESS); } ret_val } fn file_open(fd: usize, create: bool, key: &sgx_key_128bit_t) -> i32 { let mut ret_val = -1; unsafe { let ret = ecall_file_open(EID, &mut ret_val, fd, create as uint8_t, key); assert_eq!(ret, sgx_status_t::SGX_SUCCESS); } ret_val } fn file_close(fd: usize) -> i32 { let mut ret_val = -1; unsafe { let ret = ecall_file_close(EID, &mut ret_val, fd); assert_eq!(ret, sgx_status_t::SGX_SUCCESS); } ret_val } fn file_flush(fd: usize) -> i32 { let mut ret_val = -1; unsafe { let ret = ecall_file_flush(EID, &mut ret_val, fd); assert_eq!(ret, sgx_status_t::SGX_SUCCESS); } ret_val } fn file_read_at(fd: usize, offset: usize, buf: &mut [u8]) -> i32 { let mut ret_val = -1; unsafe { let ret = ecall_file_read_at(EID, &mut ret_val, fd, offset, buf.as_mut_ptr(), buf.len()); assert_eq!(ret, sgx_status_t::SGX_SUCCESS); } ret_val } fn file_write_at(fd: usize, offset: usize, buf: &[u8]) -> i32 { let mut ret_val = -1; unsafe { let ret = ecall_file_write_at(EID, &mut ret_val, fd, offset, buf.as_ptr(), buf.len()); assert_eq!(ret, sgx_status_t::SGX_SUCCESS); } ret_val } fn file_set_len(fd: usize, len: usize) -> i32 { let mut ret_val = -1; unsafe { let ret = ecall_file_set_len(EID, &mut ret_val, fd, len); assert_eq!(ret, sgx_status_t::SGX_SUCCESS); } ret_val }
rust
{ "name": "node-firefox-find-simulators", "version": "1.3.0", "description": "Find installed Firefox OS simulators", "main": "index.js", "dependencies": { "es6-promise": "^2.0.1" }, "devDependencies": { "gulp": "^3.8.10", "gulp-jscs": "^1.3.1", "gulp-jshint": "^1.9.0", "gulp-nodeunit": "0.0.5", "jshint-stylish": "^1.0.0", "node-firefox-build-tools": "^0.1.0" }, "scripts": { "gulp": "gulp", "test": "gulp test" }, "repository": { "type": "git", "url": "https://github.com/mozilla/node-firefox-find-simulators.git" }, "keywords": [ "firefox", "developer tools", "b2g", "firefox os", "firefoxos", "fxos", "simulators" ], "author": "Mozilla (https://mozilla.org/)", "contributors": [ "<NAME> <<EMAIL>> (http://nicolagreco.com/)", "<NAME> <<EMAIL>> (http://soledadpenades.com/)" ], "license": "Apache 2.0", "bugs": { "url": "https://github.com/mozilla/node-firefox-find-simulators/issues" }, "homepage": "https://github.com/mozilla/node-firefox-find-simulators" }
json
Nanjangud, Mar. 19- H. P. Mahadevappa (65), retired Revenue Department officer at Haginavalu village in the taluk and a resident of the town, passed away yesterday at a private hospital in Mysuru. Former President of State Government Employees Association, Nanjangud Branch, he leaves behind his wife, two daughters, brother APMC Member Kendagannappa and a host of relatives and friends. Last rites were performed at the family’s farm land this afternoon.
english
# [1차]프렌츠4블록 import numpy as np def new_borad(m, n, board): remove = np.array([[True for _ in range(m)] for _ in range(n)]) count = 0 for i in range(n - 1): for j in range(m - 1): cur = board[i,j] if cur == "-1": break if cur == board[i,j+1] and cur == board[i+1,j] and cur == board[i+1,j+1]: remove[i,j] = False remove[i,j+1] = False remove[i+1,j] = False remove[i+1,j+1] = False count += 1 new_map = [] remove_count = 0 for i in range(n): tmp = board[i][remove[i]].tolist() while len(tmp) < m: tmp.append("-1") remove_count += 1 new_map.append(tmp) return new_map, count, remove_count def solution(m, n, board): answer = 0 b = np.array(list(map(lambda x:list(x), board))) b_t = np.transpose(b) new_b = b_t[...,::-1] count = -1 while count != 0: new_b, count, remove_count = new_borad(m, n, new_b) answer += remove_count new_b = np.array(new_b) return answer ''' 채점을 시작합니다. 정확성 테스트 테스트 1 〉 통과 (0.13ms, 27.9MB) 테스트 2 〉 통과 (0.19ms, 27.8MB) 테스트 3 〉 통과 (0.26ms, 27.7MB) 테스트 4 〉 통과 (1.92ms, 28MB) 테스트 5 〉 통과 (103.88ms, 28MB) 테스트 6 〉 통과 (8.26ms, 28MB) 테스트 7 〉 통과 (1.22ms, 27.6MB) 테스트 8 〉 통과 (2.04ms, 27.7MB) 테스트 9 〉 통과 (0.15ms, 27.6MB) 테스트 10 〉 통과 (0.99ms, 27.6MB) 테스트 11 〉 통과 (2.55ms, 28MB) 채점 결과 정확성: 100.0 합계: 100.0 / 100.0 '''
python
<gh_stars>10-100 {"name":"<NAME> (SU)","alt_name":"(SU)","country":"China","state":"Taiwan","address":{"street":"70 Linshi Road, Shihlin","city":"Taipei","province":null,"postal_code":"111"},"contact":{"telephone":"+886(2) 288-19471","website":"http:\/\/www.scu.edu.tw","email":"<EMAIL>","fax":"+886(2) 288-29310"},"funding":"Private","languages":null,"academic_year":"August to July (August-January; February-July)","accrediting_agency":null}
json
{"domain":"CountryCodes","code":"YE","codevalue":"YEMEN","link":"","sequence":0,"attributes":[{"key":"ICO","val":"YEM"}],"SequenceType":0,"id":"3e00e1bd-56a3-4019-9c8a-78878e777cba","cachettl":1}
json
In its poll manifesto for Bihar Elections, RJD has promised 10 lakh jobs, free laptops, farm loan waiver, and more to the people of Bihar. RJD leader Tejashwi Yadav on Saturday released the manifesto of his party. (Photo: ANI) By Rohit Kumar Singh: Rashtriya Janta Dal (RJD) leader Tejashwi Yadav on Saturday released the manifesto of his party for 2020 Assembly Elections. The manifesto promised to provide 10 lakh jobs if voted to power as well as an unemployment allowance of Rs 1,500. It has also promised that all the villages in Bihar will be turned into smart villages if the RJD is elected to power. Here's a list of promises RJD has made in its manifesto: - New Industrial Policy will be brought in to provide tax waiver and tax deferment benefits for a certain period to set up new industries in the state. - Unemployment allowance 1500/- p. m will be provided to youth upto the age of 35. - Vyapari Suraksha Dasta will be set up to provide security to industrialists and businessmen. - Interest-free loans will be provided to industries relating to agriculture and agricultural produce, sugar, jute, makhana, etc. - Toddy industry will be commercialized. - Recruitment of teachers will take place at war footing and all vacant posts will be filled in all government schools. - Installation of free computer centers in every panchayat. - Dialysis centers to be opened in civil hospitals in each district where free dialysis services will be provided to poor people. - Ambulance services to be provided in every panchayat. - Super specialty hospital to be constructed in every subdivision. - Old pension scheme prior to 2005 will be restored for every government employee. Meanwhile, RJD also released its poll campaign with a video. , , ,
english
{ "name": "vk-manager", "version": "2.1.1", "description": "Extensão para o site vk.com", "scripts": { "build:chrome": "gulp build:chrome", "build:firefox": "gulp build:firefox", "watch:chrome": "gulp watch:chrome", "watch:firefox": "gulp watch:firefox", "lint": "eslint src/**/*.js", "pretest": "npm run build:chrome", "test": "mocha src/**/*.test.js" }, "author": "<NAME> <<EMAIL>>", "license": "MIT", "devDependencies": { "chai": "^3.5.0", "chromedriver": "^2.23.1", "eslint": "^3.3.1", "gulp": "^3.9.1", "mkdirp": "^0.5.1", "mocha": "^3.0.2", "selenium-webdriver": "^2.53.3" } }
json
The students are being explained how to respect the laws, maintain discipline and civic sense and how to stop social evils like child marriages, female foeticide, liquor vending, domestic violence and teasing. In an effort to fight incidents like child marriage, female foeticide or even liquor vending, the government has introduced a student police cadet (SPC) project in all the government schools across the state, under which a group of girls and boys from every school are being groomed to evolve as future leaders. The students are being explained how to respect the laws, maintain discipline and civic sense and how to stop social evils like child marriages, female foeticide, liquor vending, domestic violence and teasing. They are also being familiarised with the way the police function and are being taught how to act like a common link between the police and the community. It’s an education department project which is being implemented by the Bihar Education Project (BEP) Council, a part of the state education department, responsible to bring quantitative and qualitative improvement in elementary education system in the state and to improve education standards in elementary schools. Altogether 1,100 government schools of the state have been covered under the project and in every school, 22 girls and 22 boys have been selected for the project. In Patna district, altogether 1,760 girls and boys from 40 government schools have been selected to become the SPCs. “The numbers of schools under the project vary in different districts. In Patna, 40 schools have been identified and they are being trained to work as SPCs. During the training sessions, which take place on Saturdays, the students are being explained how to prepare a plan of action to stop certain social evils and coordinate with the police and the community to succeed in their mission,” Neeraj Kumar, district education officer, Patna district, said. There are certain issues which cannot be solved only by police’s interference. ” You need people to intervene and stop the evil. The most common issue these days is child marriage and female foeticide,” he said. Another very common problem these days is liquor vending. Many teenagers had been found in liquor vending network. The SPC’s intervention may prove to be very affective in this direction also, he added. Rajesh Thakur, an official from BEP, Patna, said the cadets would be provided caps with the logo of the SPC and a whistle. “And in every school there will be a nodal teacher to head the group of cadets of that school. The nodal teacher has been imparted training by a master trainer of that district to handle cases, while the district level master trainers have been imparted training by the BEP at a workshop recently held in the state capital,” he said. The training programme in district is almost over and the cadets will now be taken to police stations and camps in their localities to learn how police respond and take actions in different cases, he added. “The cadets will be in regular touch with their nodal teachers and the local cops. In fact, this project of student police cadet is intended to bridge the gap between the police and common people. In many cases, people do not approach the police because of various reasons. This has to be changed,” he said.
english
use std::ops::{Bound, Index, IndexMut, RangeBounds}; // ====================================================================== // Shards - CRATE pub(crate) struct Shards { shard_count: usize, shard_bytes: usize, // Flat array of `shard_count * shard_bytes` bytes. data: Vec<u8>, } impl Shards { pub(crate) fn as_ref_mut(&mut self) -> ShardsRefMut { ShardsRefMut::new(self.shard_count, self.shard_bytes, self.data.as_mut()) } pub(crate) fn new() -> Self { Self { shard_count: 0, shard_bytes: 0, data: Vec::new(), } } pub(crate) fn resize(&mut self, shard_count: usize, shard_bytes: usize) { assert!(shard_bytes > 0 && shard_bytes & 63 == 0); self.shard_count = shard_count; self.shard_bytes = shard_bytes; self.data.resize(shard_count * shard_bytes, 0); } } // ====================================================================== // Shards - IMPL Index impl Index<usize> for Shards { type Output = [u8]; fn index(&self, index: usize) -> &Self::Output { &self.data[index * self.shard_bytes..(index + 1) * self.shard_bytes] } } // ====================================================================== // Shards - IMPL IndexMut impl IndexMut<usize> for Shards { fn index_mut(&mut self, index: usize) -> &mut Self::Output { &mut self.data[index * self.shard_bytes..(index + 1) * self.shard_bytes] } } // ====================================================================== // ShardsRefMut - PUBLIC /// Mutable reference to shard array implemented as flat byte array. pub struct ShardsRefMut<'a> { shard_count: usize, shard_bytes: usize, // Flat array of `shard_count * shard_bytes` bytes. data: &'a mut [u8], } impl<'a> ShardsRefMut<'a> { /// Returns mutable references to shards at `pos` and `pos + dist`. /// /// See source code of [`Naive::fft`] for an example. /// /// # Panics /// /// If `dist` is `0`. /// /// [`Naive::fft`]: crate::engine::Naive#method.fft pub fn dist2_mut(&mut self, mut pos: usize, mut dist: usize) -> (&mut [u8], &mut [u8]) { pos *= self.shard_bytes; dist *= self.shard_bytes; let (a, b) = self.data[pos..].split_at_mut(dist); (&mut a[..self.shard_bytes], &mut b[..self.shard_bytes]) } /// Returns mutable references to shards at /// `pos`, `pos + dist`, `pos + dist * 2` and `pos + dist * 3`. /// /// See source code of [`NoSimd::fft`] for an example /// (specifically the private method `fft_butterfly_two_layers`). /// /// # Panics /// /// If `dist` is `0`. /// /// [`NoSimd::fft`]: crate::engine::NoSimd#method.fft pub fn dist4_mut( &mut self, mut pos: usize, mut dist: usize, ) -> (&mut [u8], &mut [u8], &mut [u8], &mut [u8]) { pos *= self.shard_bytes; dist *= self.shard_bytes; let (ab, cd) = self.data[pos..].split_at_mut(dist * 2); let (a, b) = ab.split_at_mut(dist); let (c, d) = cd.split_at_mut(dist); ( &mut a[..self.shard_bytes], &mut b[..self.shard_bytes], &mut c[..self.shard_bytes], &mut d[..self.shard_bytes], ) } /// Returns `true` if this contains no shards. pub fn is_empty(&self) -> bool { self.shard_count == 0 } /// Returns number of shards. pub fn len(&self) -> usize { self.shard_count } /// Creates new [`ShardsRefMut`] that references given `data`. /// /// # Panics /// /// If `data` is smaller than `shard_count * shard_bytes` bytes. pub fn new(shard_count: usize, shard_bytes: usize, data: &'a mut [u8]) -> Self { Self { shard_count, shard_bytes, data: &mut data[..shard_count * shard_bytes], } } /// Splits this [`ShardsRefMut`] into two so that /// first includes shards `0..mid` and second includes shards `mid..`. pub fn split_at_mut(&mut self, mid: usize) -> (ShardsRefMut, ShardsRefMut) { let (a, b) = self.data.split_at_mut(mid * self.shard_bytes); ( ShardsRefMut::new(mid, self.shard_bytes, a), ShardsRefMut::new(self.shard_count - mid, self.shard_bytes, b), ) } /// Fills the given shard-range with `0u8`:s. pub fn zero<R: RangeBounds<usize>>(&mut self, range: R) { let start = match range.start_bound() { Bound::Included(start) => start * self.shard_bytes, Bound::Excluded(start) => (start + 1) * self.shard_bytes, Bound::Unbounded => 0, }; let end = match range.end_bound() { Bound::Included(end) => (end + 1) * self.shard_bytes, Bound::Excluded(end) => end * self.shard_bytes, Bound::Unbounded => self.shard_count * self.shard_bytes, }; self.data[start..end].fill(0); } } // ====================================================================== // ShardsRefMut - IMPL Index impl<'a> Index<usize> for ShardsRefMut<'a> { type Output = [u8]; fn index(&self, index: usize) -> &Self::Output { &self.data[index * self.shard_bytes..(index + 1) * self.shard_bytes] } } // ====================================================================== // ShardsRefMut - IMPL IndexMut impl<'a> IndexMut<usize> for ShardsRefMut<'a> { fn index_mut(&mut self, index: usize) -> &mut Self::Output { &mut self.data[index * self.shard_bytes..(index + 1) * self.shard_bytes] } } // ====================================================================== // ShardsRefMut - CRATE impl<'a> ShardsRefMut<'a> { pub(crate) fn copy_within(&mut self, mut src: usize, mut dest: usize, mut count: usize) { src *= self.shard_bytes; dest *= self.shard_bytes; count *= self.shard_bytes; self.data.copy_within(src..src + count, dest); } // Returns mutable references to flat-arrays of shard-ranges // `x .. x + count` and `y .. y + count`. // // Ranges must not overlap. pub(crate) fn flat2_mut( &mut self, mut x: usize, mut y: usize, mut count: usize, ) -> (&mut [u8], &mut [u8]) { x *= self.shard_bytes; y *= self.shard_bytes; count *= self.shard_bytes; if x < y { let (head, tail) = self.data.split_at_mut(y); (&mut head[x..x + count], &mut tail[..count]) } else { let (head, tail) = self.data.split_at_mut(x); (&mut tail[..count], &mut head[y..y + count]) } } }
rust
<filename>src/main/java/com/martinwj/mymusic/controller/user/song/album/AddMusicToPlayListServlet.java package com.martinwj.mymusic.controller.user.song.album; import com.martinwj.mymusic.entity.PageBean; import com.martinwj.mymusic.entity.Song; import com.martinwj.mymusic.service.SongService; import com.martinwj.mymusic.service.impl.SongServiceImpl; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedHashSet; import java.util.List; /** * @author: Martin(靖王) * @description: TODO * @date: 2020/11/17 16:59 * @version: 1.0 */ @WebServlet("/addMusicToPlayListServlet") public class AddMusicToPlayListServlet extends HttpServlet { private SongService songService = null; @Override public void init() throws ServletException { songService = new SongServiceImpl(); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { System.out.println("向播放列表增加一首歌曲"); String songId = request.getParameter("songId"); String page = request.getParameter("page"); Song song = songService.getSongById(Integer.parseInt(songId)); HttpSession session = request.getSession(); LinkedHashSet<Song> songPlayList = (LinkedHashSet<Song>) session.getAttribute("songPlayList"); if(songPlayList == null) { songPlayList = new LinkedHashSet<Song>(); } // 判断列表是否已经存在该歌曲 boolean flag = true; for(Song s : songPlayList) { if(s.getSongId() == song.getSongId()) flag = false; } // flag为true,则说明播放列表中不存在该歌曲。 if(flag) { songPlayList.add(song); } // 增加播放数量 songService.addPlayCountBySongId(song.getSongId()); // session.setAttribute("songPlayList", songPlayList); // 重定向到album-single页面 response.sendRedirect(request.getContextPath() + page); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } }
java
New building of Bir Hospital. (File Photo) KATHMANDU: Bir Hospital has started PCR testing at a cost of Rs 1,000. According to Bir Hospital sources, the hospital has started the PCR test with the facility of photo and QR code at merely Rs 1,000 especially to those going abroad. “This (PCR test) facility will be available 24 hours a day in the laboratory of the hospital,” said Bhupendra Basnet, Chief Administrative Officer of Bir Hospital. Basnet informed that around 150 people get their PCR tested in Bir Hospital daily. The hospital has also started sending PCR reports to mobile and email.
english
{ "navigationBarTitleText": "Starred", "usingComponents": { "repo-item": "../../components/repo-item/repo-item" } }
json
The mercury levels in the city don’t say it, but chilly winds this season have given the Capital’s winters a vicious bite. The minimum temperature on Tuesday is expected to be at 4. 2 degree Celsius while the maximum will be at 18 degree Celsius, however, the phenomenon of chilly winds which started on Monday is expected to intensify, giving the Capital a colder feel. Weathermen say that a cold north westerly wind is responsible for making Delhi colder. “Just imagine that you are in a room and somebody switches on the fan. You will start feeling colder, even though the temperature in the room does not change. Something similar happens when wind starts blowing in the winter,” explained a weather expert. As the wind speed stays at around 12-14kmph, the increase in temperature during the day is unable to provide succour from the chill. On Wednesday morning, the city also woke up to shallow fog which resulted in delay of 38 trains and over a dozen flights. The general visibility at Delhi airport was 150 metre but Runway Visibility Range (RVR) was between 200m and 450m. At least 38 trains are arriving late and eight have been rescheduled while one train was cancelled, railway officials said. “There will be partly cloudy sky and minimum temperature will be 4. 2 degree Celsius. Maximum temperature could be 18 degree Celsius and visibility at 600m,” officials said. On Tuesday, the minimum temperature recorded by the Regional Weather Forecasting Centre, was 6. 0 degrees as against 8. 9 degrees on Monday. While this is only a degree below normal for Delhi at this time of the year the chilly winds had left people huddling. Weathermen said these winds passed over snowcapped peaks in J&K and Himachal Pradesh before reaching the city. The India Meteorological Department (IMD) officials also confirmed that these winds were responsible for the chill in Delhi. “The wind is making people shiver,” said an official from the IMD. Meanwhile, the Air Quality Index (AQI) in areas like Punjabi Bagh, Anand Vihar, Lodhi Colony, Siri Fort, Kashmere Gate, and Chhattarpur crossed 400 in the morning, as recorded by Hindustan Times’ real-time air quality tracking app. The level of air pollution in these areas has been called “severe,” and the air is deemed too dangerous to even breathe.
english
<gh_stars>0 /* Copyright 2021 aholinch 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 odutils.util; import java.io.File; import java.util.logging.Logger; public class ODConfig { private static final Logger logger = Logger.getLogger(ODConfig.class.getName()); private static ODConfig instance = null; private static final String sync = "mutex"; protected String orekitDataDir = null; private ODConfig() { // load from properties } public static ODConfig getInstance() { if(instance == null) { synchronized(sync) { // yes check again if(instance == null) { instance = new ODConfig(); } } } return instance; } public String getOrekitDataDir() { if(orekitDataDir == null) { File f = searchExistingDir("orekit-data","orekit-data-master","orekit_data","orekit.data"); if(f != null) { orekitDataDir = f.getAbsolutePath(); } } return orekitDataDir; } /** * Looks in env param, java define param, running dir, and then home for directory. * * @param dirEnd * @param env * @param param * @return */ protected File searchExistingDir(String name1, String name2, String env, String param) { File f = null; String path = null; // check env first if(env != null) { path = System.getenv(env); if(path != null) { f = new File(path); } } if(f==null || !f.exists()) { // check define param if(param != null) { path = System.getProperty(param); if(path != null) { f = new File(path); } } } if(f == null || !f.exists()) { // check home directory final File home = new File(System.getProperty("user.home")); f = new File(home,name1); if(!f.exists() && name2 != null) { f = new File(home,name2); } } if(f == null || !f.exists()) { // check current directory f = new File(name1); if(!f.exists() && name2 != null) { f = new File(name2); } } if(f == null || !f.exists()) { logger.warning("Unable to find dir for " + String.valueOf(name1) + " after checking multiple places"); } return f; } }
java
<b>clamscan</b><br><br> <b>A command-line virus scanner.</b><br><br><b>More information: <a href="https://www.clamav.net">home page</a></b><br><br> - Scan a file for vulnerabilities: <blockquote>clamscan <i>path/to/file</i></blockquote> - Scan all files recursively in a specific directory: <blockquote>clamscan -r <i>path/to/directory</i></blockquote> - Scan data from stdin: <blockquote><i>command</i> | clamscan -</blockquote> - Specify a virus database file or directory of files: <blockquote>clamscan --database <i>path/to/database_file_or_directory</i></blockquote> - Scan the current directory and output only infected files: <blockquote>clamscan --infected</blockquote> - Output the scan report to a log file: <blockquote>clamscan --log <i>path/to/log_file</i></blockquote> - Move infected files to a specific directory: <blockquote>clamscan --move <i>path/to/quarantine_directory</i></blockquote> - Remove infected files: <blockquote>clamscan --remove yes</blockquote>
html
<filename>postal/49019.json [{"postal_code":"49019","place_name":"Escritores","place_type":"Colonia","county":"Zapotlán el Grande","state":"Jalisco","city":"Ciudad Guzmán"}]
json
Naga Chaitanya wrapped up the shooting of his upcoming film Custody on Friday, February 24. The actor announced the update with a special video featuring the film’s director Venkat Prabhu and co-star Krithi Shetty. The clip begins with the filmmaker standing in front of a camera as he declares, “And it’s cut. ” The movie’s team in the background cheers and claps at the announcement, meanwhile, the director follows it up with another cheeky dialogue, “And Chay you’re released from our Custody. ” The camera then pans toward Naga Chaitanya who’s also surrounded by the film’s team. Take a look at the post here: Besides Naga Chaitanya and Krithi Shetty, Custody also stars Arvind Swami, Sarathkumar, Sampath Raj, and Priyamani in key roles. The plot of the movie remains unclear but if the poster is anything to go by, it appears that drowned by the system Naga Chaitanya has waged a war to openly challenge it. The movie hits the big screens on May 12. Naga Chaitanya last shared the screen space with Aamir Khan and Kareena Kapoor in Advait Chandan’s drama film Laal Singh Chaddha. The film is an Indian adaptation of the iconic Forrest Gump starring Tom Hanks.
english
Melbourne, January 26 (IANS) Britain's Andy Murray on Monday said he is ready to take on the challenge that will be thrown at him when he faces Nick Kyrgios in the Australian Open quarter-finals. The two are going to battle it out for a semi-final spot on Tuesday night. Both have met on tour once with Murray pocketing the encounter in straight sets in Toronto last year, and the Briton also clinched the set they played at the International Premier Tennis League (IPTL) exhibition in India. “There were some things that I did in that match (in Toronto) which I believe will work on Tuesday,” Murray was quoted as saying by bbc.com. “So I've learnt stuff from playing against him there and at the IPTL and watching him a bit, stuff that I feel I can use and exploit in his game,” he added. Murray also believes he will be battling a partisan crowd too, who will be cheering local talent Kyrgios on. “Obviously the crowd will be right behind him, understandably so,” said the 27-year-old.
english
<reponame>etclabscore/emerald-js-ui import React from 'react'; import SvgIcon from 'material-ui/SvgIcon'; const Location = props => ( <SvgIcon {...props} viewBox="0 0 64 64"> <path d="M12 27.2C12 46.4 32 56 32 56s20-9.6 20-28.8C52 16.6 43 8 32 8s-20 8.6-20 19.2z" fill="none" stroke="currentColor" strokeWidth="4" strokeMiterlimit="10"/><circle cx="32" cy="26.88" r="6.88" fill="none" stroke="currentColor" strokeWidth="4" strokeMiterlimit="10"/> </SvgIcon> ); export default Location;
javascript
Delhi Deputy Chief Minister Manish Sisodia has been arrested by the Central Bureau of Investigation (CBI) for alleged corruption in making a new policy for liquor sale in the national capital. Here's the CBI's full statement: The Central Bureau of Investigation has today arrested Dy. Chief Minister of GNCTD, Delhi in an ongoing investigation of a case related to alleged irregularities in framing and implementation of the excise policy of GNCTD. The instant case was registered against Deputy Chief Minister and In charge Excise Minister, GNCTD of Delhi and 14 others for investigation into the matter of alleged irregularities in framing and implementation of Excise Policy for the year 2021-22 and extending post tender benefits to private persons. A chargesheet has been filed on 25. 12. 2022 against then CEO of a Mumbai based private company and 06 others. Further investigation is being carried out. The Dy. CM was issued a notice u/s 41A Cr. P. C for attending the investigation on 19. 02. 2023. However, he sought time of one week citing his pre-occupation. Accepting his request, he was issued a notice u/s 41A Cr. P. C for attending the investigation today (on 26. 02. 2023) for answering various questions evaded by him during his examination on 17. 10. 2022 and further questions relating to his incriminating role based on evidence collected during investigation of the case. However, he gave evasive replies and did not cooperate the investigation despite being confronted with evidence to the contrary. Therefore, he has been arrested. The arrested accused will be produced before the Designated Court, Delhi.
english
#[doc = "Register `USER[%s]` reader"] pub struct R(crate::R<USER_SPEC>); impl core::ops::Deref for R { type Target = crate::R<USER_SPEC>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl From<crate::R<USER_SPEC>> for R { #[inline(always)] fn from(reader: crate::R<USER_SPEC>) -> Self { R(reader) } } #[doc = "Register `USER[%s]` writer"] pub struct W(crate::W<USER_SPEC>); impl core::ops::Deref for W { type Target = crate::W<USER_SPEC>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } impl core::ops::DerefMut for W { #[inline(always)] fn deref_mut(&mut self) -> &mut Self::Target { &mut self.0 } } impl From<crate::W<USER_SPEC>> for W { #[inline(always)] fn from(writer: crate::W<USER_SPEC>) -> Self { W(writer) } } #[doc = "Field `CHANNEL` reader - Channel Event Selection"] pub struct CHANNEL_R(crate::FieldReader<u8, u8>); impl CHANNEL_R { #[inline(always)] pub(crate) fn new(bits: u8) -> Self { CHANNEL_R(crate::FieldReader::new(bits)) } } impl core::ops::Deref for CHANNEL_R { type Target = crate::FieldReader<u8, u8>; #[inline(always)] fn deref(&self) -> &Self::Target { &self.0 } } #[doc = "Field `CHANNEL` writer - Channel Event Selection"] pub struct CHANNEL_W<'a> { w: &'a mut W, } impl<'a> CHANNEL_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x3f) | (value as u32 & 0x3f); self.w } } impl R { #[doc = "Bits 0:5 - Channel Event Selection"] #[inline(always)] pub fn channel(&self) -> CHANNEL_R { CHANNEL_R::new((self.bits & 0x3f) as u8) } } impl W { #[doc = "Bits 0:5 - Channel Event Selection"] #[inline(always)] pub fn channel(&mut self) -> CHANNEL_W { CHANNEL_W { w: self } } #[doc = "Writes raw bits to the register."] #[inline(always)] pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { self.0.bits(bits); self } } #[doc = "User Multiplexer n\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [user](index.html) module"] pub struct USER_SPEC; impl crate::RegisterSpec for USER_SPEC { type Ux = u32; } #[doc = "`read()` method returns [user::R](R) reader structure"] impl crate::Readable for USER_SPEC { type Reader = R; } #[doc = "`write(|w| ..)` method takes [user::W](W) writer structure"] impl crate::Writable for USER_SPEC { type Writer = W; } #[doc = "`reset()` method sets USER[%s] to value 0"] impl crate::Resettable for USER_SPEC { #[inline(always)] fn reset_value() -> Self::Ux { 0 } }
rust
<gh_stars>0 {"PREVALENCE_BY_GENDER_AGE_YEAR":{"TRELLIS_NAME":[],"SERIES_NAME":[],"X_CALENDAR_YEAR":[],"Y_PREVALENCE_1000PP":[]},"PREVALENCE_BY_MONTH":{"X_CALENDAR_MONTH":[],"Y_PREVALENCE_1000PP":[]},"CONDITIONS_BY_TYPE":{"CONCEPT_NAME":"Observation recorded from EHR","COUNT_VALUE":95},"AGE_AT_FIRST_DIAGNOSIS":{"CATEGORY":["MALE","FEMALE"],"MIN_VALUE":[15,7],"P10_VALUE":[18,13],"P25_VALUE":[20,19],"MEDIAN_VALUE":[29,25],"P75_VALUE":[38,41],"P90_VALUE":[58,54],"MAX_VALUE":[78,82]}}
json
--- title: "Filmography 2011" --- <p>A 230 film retrospective on 2011:</p> <p><iframe width="759" height="386" src="https://www.youtube.com/embed/QgTsQW9tyHg?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe></p> <p>You can view the <a href="https://filmography2011.tumblr.com/post/13830190737/filmography-2011">entire list of films included here</a>.</p> <p><em>Via <a href="https://binarybonsai.com/2011/12/14/filmography-2011/">binarybonsai.com</a></em></p>
markdown
<reponame>AndWass/xcept<gh_stars>0 pub struct SingleHandler<T> { }
rust
<filename>tests/ui/large_digit_groups.rs // run-rustfix #[warn(clippy::large_digit_groups)] #[allow(unused_variables)] fn main() { macro_rules! mac { () => { 0b1_10110_i64 }; } let good = ( 0b1011_i64, 0o1_234_u32, 0x1_234_567, 1_2345_6789, 1234_f32, 1_234.12_f32, 1_234.123_f32, 1.123_4_f32, ); let bad = ( 0b1_10110_i64, 0x1_23456_78901_usize, 1_23456_f32, 1_23456.12_f32, 1_23456.12345_f64, 1_23456.12345_6_f64, ); // Ignore literals in macros let _ = mac!(); }
rust
A San Diego County resident shot and killed an alleged robber during a home invasion involving at least one armed suspect earlier this week, according to reports. The unidentified 31-year-old suspect was declared dead at the scene, FOX 5 San Diego reported. "The resident reached for the firearm and then shots were fired," Oceanside Police Department spokeswoman Jennifer Atenza said. "We know that at least one of the suspects was armed and returned fire. " Police arrested five alleged accomplices after Wednesday's home invasion in the Oceanside, California, finding them in a vehicle near the home after the attempted robbery. Oceanside is in northern San Diego County. The suspects all face murder and robbery charges. Although the deceased suspect was allegedly killed by the resident, the other suspects face murder charges because they were all involved in an alleged crime that ended in his death, according to the San Diego Union-Tribune. The other suspects allegedly fled the home after their fellow suspect was shot, leaving him behind, according to police, FOX 5 reported. The arrested suspects were identified as Deshawn Ingram, 29; Eric Dunnigan, 21; Michael Simmons, 21; Jaylen Harvey, 24; and Sydni Tucker, 25. The resident is not facing any charges at this time. Ingram was also reportedly shot and hospitalized but investigators aren’t sure if he was shot by the resident or one of the other suspects.
english
<reponame>utiasASRL/steam ////////////////////////////////////////////////////////////////////////////////////////////// /// \file LevMarqGaussNewtonSolver.hpp /// /// \author <NAME>, ASRL ////////////////////////////////////////////////////////////////////////////////////////////// #ifndef STEAM_LEVMARQ_GAUSS_NEWTON_SOLVER_HPP #define STEAM_LEVMARQ_GAUSS_NEWTON_SOLVER_HPP #include <Eigen/Core> #include <steam/solver/GaussNewtonSolverBase.hpp> namespace steam { ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Solver using Levenberg–Marquardt for the trust region ////////////////////////////////////////////////////////////////////////////////////////////// class LevMarqGaussNewtonSolver : public GaussNewtonSolverBase { public: ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Dogleg parameters ////////////////////////////////////////////////////////////////////////////////////////////// struct Params : public SolverBase::Params { ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Default constructor ////////////////////////////////////////////////////////////////////////////////////////////// Params() : SolverBase::Params(), ratioThreshold(0.25), shrinkCoeff(0.1), growCoeff(10.0), maxShrinkSteps(50) { } /// Minimum ratio of actual to predicted reduction, shrink trust region if lower, else grow (range: 0.0-1.0) double ratioThreshold; /// Amount to shrink by (range: <1.0) double shrinkCoeff; /// Amount to grow by (range: >1.0) double growCoeff; /// Maximum number of times to shrink trust region before giving up unsigned int maxShrinkSteps; }; ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Constructor ////////////////////////////////////////////////////////////////////////////////////////////// LevMarqGaussNewtonSolver(OptimizationProblem* problem, const Params& params = Params()); ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Solve the Levenberg–Marquardt system of equations: /// A*x = b, A = (J^T*J + diagonalCoeff*diag(J^T*J)) ////////////////////////////////////////////////////////////////////////////////////////////// Eigen::VectorXd solveLevMarq(const Eigen::VectorXd& gradientVector, double diagonalCoeff); ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Perform a plain LLT decomposition on the approx. Hessian matrix in /// order to solve for the proper covariances (unmodified by the LM diagonal) ////////////////////////////////////////////////////////////////////////////////////////////// void solveCovariances(); private: ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Build the system, solve for a step size and direction, and update the state ////////////////////////////////////////////////////////////////////////////////////////////// virtual bool linearizeSolveAndUpdate(double* newCost, double* gradNorm); ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Casts parameters to base type (for SolverBase class) ////////////////////////////////////////////////////////////////////////////////////////////// virtual const SolverBase::Params& getSolverBaseParams() const; ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Parameters ////////////////////////////////////////////////////////////////////////////////////////////// Params params_; ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief Diagonal multiplier (lambda in most papers - related to trust region size) ////////////////////////////////////////////////////////////////////////////////////////////// double diagCoeff; ////////////////////////////////////////////////////////////////////////////////////////////// /// \brief The 'left-hand-side' of the Gauss-Newton problem, generally known as the /// approximate Hessian matrix (note we only store the upper-triangular elements). /// Note that LM stores this to later solve the plain system for covariances. ////////////////////////////////////////////////////////////////////////////////////////////// Eigen::SparseMatrix<double> approximateHessian_; }; } // steam #endif // STEAM_LEVMARQ_GAUSS_NEWTON_SOLVER_HPP
cpp
<reponame>rugk/vscode-firefox-debug { "compilerOptions": { "target": "es2015", "lib": [ "es2015" ], "module": "commonjs", "importHelpers": true, "outDir": "out", "sourceMap": true, "noImplicitAny": true, "suppressImplicitAnyIndexErrors": true, "noImplicitReturns": true, "noImplicitThis": true, "removeComments": true, "strictNullChecks": true, "noUnusedLocals": true }, "include": [ "src/firefoxDebugAdapter.ts", "src/extension/main.ts", "src/util/forkedLauncher.ts", "src/firefox/protocol.d.ts", "src/typings/*.d.ts", "src/test/test*.ts" ] }
json
New Delhi: The air quality in Delhi continued to remain in the 'severe' category on Saturday, for the third day in a row. Air Quality Index (AQI) of the national capital, which stood at 431 this morning. On Friday during the corresponding morning period the AQI of the capital city was recorded at 472. Also, areas in the national capital region (NCR) area - Noida and Gurugram at 7 am this morning recorded an AQI of 529 and 478 respectively both in the highly toxic 'severe'. Dhirpur in West Delhi recorded an AQI of 534. On Friday, SAFAR (System of Air Quality and Weather Forecasting And Research) said that stubble-burning accounted for 34 per cent to Delhi's particulate matter (PM) 2. 5 pollution. Air Quality Index from 0 to 100 is considered as good, while from 100 to 200 it is moderate, from 200 to 300 it is poor, and from 300 to 400 it is said to be very poor and from 400 to 500 or above it is considered as severe. People of Delhi and the National Capital Region (NCR) complained of choking and 'eye burning' due to smog and air pollution leaving people gasping for breath. Earlier on Friday, Delhi Chief Minister Arvind Kejriwal along with Punjab Chief Minister Bhagwant Mann held a press conference and urged the central government to come forward and lead measures to check severe smog in the national capital region.
english
<reponame>qrefdev/qref<gh_stars>0 function MyProductsHandler() { this.listing = undefined; this.products = new Array(); this.allProducts = new Array(); this.productListing = undefined; this.product = undefined; this.productDetails = undefined; var self = this; this.init = function() { this.productDetails = new ProductDetails(); this.listing = $("#dashboard-planes"); this.productListing = $("#downloads-items"); }; //Loads all available published products from the server this.loadAllProducts = function(updateCallback) { $.ajax({ type: "get", dataType: "json", url: host + "services/ajax/aircraft/products?token=" + token, success: function(data) { var response = data; if(response.success == true) { self.allProducts = self.sort(response.records); if(updateCallback) updateCallback(true); } else { if(updateCallback) updateCallback(false); } }, error: function() { if(updateCallback) updateCallback(false); } }); }; //Loads only the products that the user own from the server this.loadUserProducts = function(updateCallback) { $.ajax({ type: "get", dataType: "json", url: host + "services/ajax/user/products?token=" + token, success: function(data) { var response = data; if(response.success == true) { self.products = self.sort(response.records); if(updateCallback) updateCallback(true); } else { if(updateCallback) updateCallback(false); } }, error: function() { if(updateCallback) updateCallback(false); } }); }; this.populateDownloads = function() { var html = ""; this.productListing.html(""); for(var i = 0; i < this.allProducts.length; i++) { var product = this.allProducts[i]; if(product) { userOwnsProduct = (this.getProduct(this.products, product._id)) ? "owns" : "buy"; html = Theme.createDownloadItem(product, userOwnsProduct); this.productListing.append(html); } } Theme.addDownloadItemHandlers(); }; this.populate = function() { var html = ""; this.listing.html(""); for(var i = 0; i < Checklist.checklists.length; i++) { var product = Checklist.checklists[i]; if(product) { if(!product.isDeleted) { html = Theme.createDashboardItem(product); this.listing.append(html); } } } Theme.addDashboardItemHandlers(); }; this.selectProductDetails = function() { var owns = this.getProduct(this.products, this.product._id); this.productDetails.load(this.product, owns); }; this.getProduct = function(tProducts, id) { var item = _.find(tProducts, function(i) { if(i._id == id) return true; }); return item; }; this.sort = function(tProducts) { var dict = new Dictionary(); for(var i = 0; i < tProducts.length; i++) { var product = tProducts[i]; var manufacturer = product.manufacturer.name; if (!dict.containsKey(manufacturer)) { dict.set(manufacturer, [product]) } else { var tmp = dict.get(manufacturer); tmp.push(product); } } var keySet = dict.sortedKeys(); var sortedArray = []; for (kv in keySet) { var arrProd = dict.get(keySet[kv]); if(arrProd) { arrProd = arrProd.sort(function (item1, item2) { if (item1.model.name < item2.model.name) return -1; else if (item1.model.name == item2.model.name) return 0; else if (item1.model.name > item2.model.name) return 1; return 0; }); sortedArray = sortedArray.concat(arrProd); } } return sortedArray; }; } //Handles the loading of the product details function ProductDetails() { this.details = $("#productDetailsListing"); var self = this; //Do whatever necessary to start the purchase this.details.find(".buynow").tap(function(e) { loader.show(); }); this.load = function(product, ownsProduct) { this.details.find(".productImage").html('<img src="' + product.coverImage + '" />'); this.details.find(".productModel").html(product.manufacturer.name + " " + product.model.name); this.details.find(".modelDescription").html(product.model.description); this.details.find(".manufacturerDescription").html(product.manufacturer.description); if(!ownsProduct) this.details.find(".buynow").html(product.suggestedRetailPrice); else this.details.find(".buynow").html("INSTALL"); this.details.find(".productSerialNumbers").html(product.serialNumber); this.details.find(".productModelYear").html(product.model.modelYear); this.details.find(".description").html(product.description); }; }
javascript
<filename>data/crossTalkLevel/HIV Infection.json [[{"name":"HIV Life Cycle","imports":["Host Interactions of HIV factors"]}],[{"name":"Interactions of Rev with host cellular proteins","imports":["Interactions of Vpr with host cellular proteins","Late Phase of HIV Life Cycle"]},{"name":"APOBEC3G mediated resistance to HIV-1 infection","imports":["Early Phase of HIV Life Cycle","Interactions of Vpr with host cellular proteins"]},{"name":"Early Phase of HIV Life Cycle","imports":["The role of Nef in HIV-1 replication and disease pathogenesis","Vpu mediated degradation of CD4"]},{"name":"APOBEC3G mediated resistance to HIV-1 infection","imports":["Early Phase of HIV Life Cycle"]},{"name":"Vif-mediated degradation of APOBEC3G","imports":["Vpu mediated degradation of CD4"]},{"name":"Interactions of Rev with host cellular proteins","imports":["Late Phase of HIV Life Cycle"]},{"name":"Interactions of Tat with host cellular proteins","imports":["Late Phase of HIV Life Cycle"]},{"name":"Late Phase of HIV Life Cycle","imports":["Vif-mediated degradation of APOBEC3G","Vpu mediated degradation of CD4"]},{"name":"Late Phase of HIV Life Cycle","imports":["Vif-mediated degradation of APOBEC3G"]},{"name":"APOBEC3G mediated resistance to HIV-1 infection","imports":["Vif-mediated degradation of APOBEC3G"]},{"name":"APOBEC3G mediated resistance to HIV-1 infection","imports":["Early Phase of HIV Life Cycle","Interactions of Vpr with host cellular proteins","Late Phase of HIV Life Cycle"]},{"name":"Late Phase of HIV Life Cycle","imports":["The role of Nef in HIV-1 replication and disease pathogenesis"]},{"name":"APOBEC3G mediated resistance to HIV-1 infection","imports":["Early Phase of HIV Life Cycle","Interactions of Rev with host cellular proteins","Interactions of Vpr with host cellular proteins","Late Phase of HIV Life Cycle"]},{"name":"APOBEC3G mediated resistance to HIV-1 infection","imports":["Early Phase of HIV Life Cycle","Interactions of Vpr with host cellular proteins","Vif-mediated degradation of APOBEC3G"]},{"name":"APOBEC3G mediated resistance to HIV-1 infection","imports":["Early Phase of HIV Life Cycle","Interactions of Vpr with host cellular proteins","Vpu mediated degradation of CD4"]}],[{"name":"Nuclear import of Rev protein","imports":["Vpr-mediated nuclear import of PICs"]},{"name":"Integration of provirus","imports":["Vpr-mediated nuclear import of PICs"]},{"name":"Binding and entry of HIV virion","imports":["Nef-mediates down modulation of cell surface receptors by recruiting them to clathrin adapters"]},{"name":"Binding and entry of HIV virion","imports":["Integration of provirus","Reverse Transcription of HIV RNA","Uncoating of the HIV Virion"]},{"name":"Nef and signal transduction","imports":["Nef-mediates down modulation of cell surface receptors by recruiting them to clathrin adapters"]},{"name":"Binding and entry of HIV virion","imports":["Integration of provirus","Reverse Transcription of HIV RNA","Uncoating of the HIV Virion","Vpr-mediated nuclear import of PICs"]},{"name":"Binding and entry of HIV virion","imports":["Integration of provirus","Reverse Transcription of HIV RNA","Uncoating of the HIV Virion","Vpr-mediated induction of apoptosis by mitochondrial outer membrane permeabilization","Vpr-mediated nuclear import of PICs"]}],[{"name":"Nef Mediated CD4 Down-regulation","imports":["Nef Mediated CD8 Down-regulation"]},{"name":"Nef Mediated CD4 Down-regulation","imports":["Nef Mediated CD8 Down-regulation","Nef mediated downregulation of CD28 cell surface expression"]},{"name":"2-LTR circle formation","imports":["Autointegration results in viral DNA circles","Integration of viral DNA into host genomic DNA"]},{"name":"Minus-strand DNA synthesis","imports":["Plus-strand DNA synthesis"]},{"name":"RNA Pol II CTD phosphorylation and interaction with CE","imports":["RNA Pol II CTD phosphorylation and interaction with CE"]},{"name":"2-LTR circle formation","imports":["Autointegration results in viral DNA circles","Integration of viral DNA into host genomic DNA","Minus-strand DNA synthesis","Plus-strand DNA synthesis"]},{"name":"Nef Mediated CD4 Down-regulation","imports":["Nef Mediated CD8 Down-regulation","Nef mediated downregulation of CD28 cell surface expression","Nef mediated downregulation of MHC class I complex cell surface expression"]}]]
json
<reponame>inugroho/pemilu-2019-scraper<gh_stars>1-10 [{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO DWITA.jpg","namaPartai":"Partai NasDem","id":114089,"noUrut":1,"nama":"<NAME>, PSI.,M.M.","stringJenisKelamin":"Perempuan"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO IMAM GAZALI.jpg","namaPartai":"Partai NasDem","id":32756,"noUrut":2,"nama":"<NAME>, S.Ag.","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO TARA.jpg","namaPartai":"Partai NasDem","id":115906,"noUrut":3,"nama":"<NAME>, M.T.","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO DWIKO.JPG","namaPartai":"Partai NasDem","id":118700,"noUrut":4,"nama":"<NAME>","stringJenisKelamin":"Perempuan"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO HAIRUL ANAM.JPG","namaPartai":"Partai NasDem","id":65627,"noUrut":5,"nama":"Dr. <NAME>, S.E.,M.M.","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO FAJAR SIDIK.jpg","namaPartai":"Partai NasDem","id":110091,"noUrut":6,"nama":"<NAME>, S.T.","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA SAMARINDA","originalFilename":"FOTO Sugi Untung 4x6.JPG","namaPartai":"Partai NasDem","id":32805,"noUrut":7,"nama":"<NAME>, S.E.","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO ANI.jpg","namaPartai":"Partai NasDem","id":65412,"noUrut":8,"nama":"<NAME>.Psi.","stringJenisKelamin":"Perempuan"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"f2.jpg","namaPartai":"Partai NasDem","id":211327,"noUrut":9,"nama":"<NAME>, S.T.,M.Pd.","stringJenisKelamin":"Laki-Laki"},{"namaKab":"KOTA BALIKPAPAN","originalFilename":"FOTO HARIS RCHMAN.jpg","namaPartai":"Partai NasDem","id":180834,"noUrut":10,"nama":"<NAME>","stringJenisKelamin":"Laki-Laki"}]
json
{"ast":null,"code":"'use strict'; // @ts-ignore - no types available\n\nconst blake = require('blakejs');\n\nconst minB = 0xb201;\nconst minS = 0xb241;\nconst blake2b = {\n init: blake.blake2bInit,\n update: blake.blake2bUpdate,\n digest: blake.blake2bFinal\n};\nconst blake2s = {\n init: blake.blake2sInit,\n update: blake.blake2sUpdate,\n digest: blake.blake2sFinal\n}; // Note that although this function doesn't do any asynchronous work, we mark\n// the function as async because it must return a Promise to match the API\n// for other functions that do perform asynchronous work (see sha.browser.js)\n// eslint-disable-next-line\n\n/**\n * @param {number} size\n * @param {any} hf\n * @returns {import('./types').Digest}\n */\n\nconst makeB2Hash = (size, hf) => async data => {\n const ctx = hf.init(size, null);\n hf.update(ctx, data);\n return hf.digest(ctx);\n};\n/**\n * @param {Record<number, import('./types').Digest>} table\n */\n\n\nmodule.exports = table => {\n for (let i = 0; i < 64; i++) {\n table[minB + i] = makeB2Hash(i + 1, blake2b);\n }\n\n for (let i = 0; i < 32; i++) {\n table[minS + i] = makeB2Hash(i + 1, blake2s);\n }\n};","map":null,"metadata":{},"sourceType":"script"}
json
@import "Test.css"; :root { --stub-color: red; } /* декараторы из postcss-bemed */ @block StubPage { /* цвет из ../../app-style/vars.js */ background: var(--color-test); @element languageElement { @modifier lang { height: 20px; @value en { background: var(--opa); } @value ru { /*http://cssnext.io/features/#color-function*/ background: color(var(--opa) blackness(30%)); } } } @element title { height: 200px; color: var(--stub-color); &:hover { background: red; } } @modifier foo { font-size: 12px; &:hover { background: orange; } @value bar { width: 100%; } } &:hover { background: green; } } /* todo @ANKU @LOW @BUG_OUT @postcss-bemed - не работает nested внутри @element, а внутри @block работает @element title { height: 200px; color: var(--stub-color); &:hover { background: green; } @nest &:hover { background: orange; } } */
css
use anyhow::Result; use async_tungstenite::tungstenite::{Error as TungsteniteError, Message as TungsteniteMessage}; use futures_util::{pin_mut, ready, Sink, Stream}; use slog::{trace, Logger}; use std::io; use std::pin::Pin; use std::task::{Context, Poll}; use tokio::io::{AsyncRead, AsyncWrite}; pub async fn forward<R, W>(mut reader: R, mut writer: W, logger: Logger) -> Result<()> where R: AsyncRead + Unpin, W: AsyncWrite + Unpin, { use tokio::io::{AsyncReadExt as _, AsyncWriteExt as _}; let mut buf = [0u8; 5120]; loop { let bytes_read = reader.read(&mut buf).await?; if bytes_read == 0 { break; } trace!(logger, r#""{}""#, String::from_utf8_lossy(&buf[..bytes_read])); writer.write_all(&buf[..bytes_read]).await?; writer.flush().await?; } Ok(()) } /// Wraps a WebSocket stream and implements `AsyncRead` pub struct ReadableWebSocketHalf<S> { inner: S, read_buf: Option<Vec<u8>>, } impl<S> ReadableWebSocketHalf<S> where S: Stream<Item = Result<TungsteniteMessage, TungsteniteError>> + Unpin, { pub fn new(stream: S) -> Self { Self { inner: stream, read_buf: None, } } } impl<S> AsyncRead for ReadableWebSocketHalf<S> where S: Stream<Item = Result<TungsteniteMessage, TungsteniteError>> + Unpin, { fn poll_read( mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &mut tokio::io::ReadBuf<'_>, ) -> Poll<io::Result<()>> { let mut data = if let Some(data) = self.read_buf.take() { data } else { loop { let inner = &mut self.inner; pin_mut!(inner); match ready!(inner.poll_next(cx)) { Some(Ok(m)) => match m { TungsteniteMessage::Text(s) => { break s.into_bytes(); } TungsteniteMessage::Binary(data) => { break data; } // discard ping and pong messages (not part of actual payload) TungsteniteMessage::Ping(_) | TungsteniteMessage::Pong(_) => {} // end reading on Close message TungsteniteMessage::Close(_) => return Poll::Ready(Ok(())), }, Some(Err(e)) => return Poll::Ready(Err(io::Error::new(io::ErrorKind::Other, e))), None => return Poll::Ready(Ok(())), } } }; let bytes_to_copy = std::cmp::min(buf.remaining(), data.len()); let dest = buf.initialize_unfilled_to(bytes_to_copy); dest.copy_from_slice(&data[..bytes_to_copy]); buf.advance(bytes_to_copy); if data.len() > bytes_to_copy { data.drain(..bytes_to_copy); self.read_buf = Some(data); } Poll::Ready(Ok(())) } } /// Wraps a WebSocket stream and implements `AsyncWrite` pub struct WritableWebSocketHalf<S> { inner: S, } impl<S> WritableWebSocketHalf<S> where S: Sink<TungsteniteMessage, Error = TungsteniteError> + Unpin, { pub fn new(stream: S) -> Self { Self { inner: stream } } } impl<S> AsyncWrite for WritableWebSocketHalf<S> where S: Sink<TungsteniteMessage, Error = TungsteniteError> + Unpin, { fn poll_write(mut self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8]) -> Poll<Result<usize, io::Error>> { macro_rules! try_in_poll { ($expr:expr) => {{ match $expr { Ok(o) => o, Err(e) => return Poll::Ready(Err(io::Error::new(io::ErrorKind::Other, e))), } }}; } // try flushing preemptively let inner = &mut self.inner; pin_mut!(inner); let _ = inner.poll_flush(cx); // make sure sink is ready to send let inner = &mut self.inner; pin_mut!(inner); try_in_poll!(ready!(inner.poll_ready(cx))); // actually submit new item let inner = &mut self.inner; pin_mut!(inner); try_in_poll!(inner.start_send(TungsteniteMessage::Binary(buf.to_vec()))); Poll::Ready(Ok(buf.len())) } fn poll_flush(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), io::Error>> { let inner = &mut self.inner; pin_mut!(inner); inner .poll_flush(cx) .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) } fn poll_shutdown(mut self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), io::Error>> { let inner = &mut self.inner; pin_mut!(inner); inner .poll_close(cx) .map_err(|e| io::Error::new(io::ErrorKind::Other, e)) } }
rust
Two FIRs were filed against Kannada actor and Uttama Prajaakeeya Party founder Upendra after he allegedly made an “objectionable” remark during a live stream on a social media platform. The case has been registered at CK Achukattu Police Station in Bengaluru, as reported by news agency ANI. A second FIR has been filed against him at Halasuru Gate Police Station. Karnataka | FIR registered against Kannada actor and Uttama Prajaakeeya Party founder Upendra for allegedly using objectionable language in a live streaming on a social media platform. The case has been registered at CK Achukattu Police Station in Bengaluru. “The cruel poverty I saw in my childhood, suicides that were set on fire in front of my eyes, hunger, insult, oppression…. Do I grow up experiencing this insult to a class of people today? Am I mad ? What is the reason for that? What is the benefit I get from it? Is there no greatness to accept an apology? Why so much hatred?,” he added.
english
<reponame>akinolajohn/YES_TO_YOUTH /* HTML Elements */ /* <body> */ body { overflow-x: hidden } /* Components */ /* Navigation List Item */ #navigation a#home { background: #3F3B9A; color: #FFFFFF !important } /* Articles */ .article { border-bottom: 1px solid rgba(0, 0, 0, .25); font-size: 16px; margin: 10px auto; overflow: hidden; padding: 10px; width: 90% } /* Headings */ .article > h1 { font-size: 50px } /* Paragraphs */ .article > p { margin-left: 2.5em } /* Sections */ .article > section { height: inherit } /* Post Article */ /* Section */ #postArticle .section { margin: 20px auto; padding: 10px; width: 90% } /* Thumbnails */ #postArticle .section .thumbnail { filter: brightness(.975); height: 250px; margin: 10px auto; width: 300px } #postArticle .section .thumbnail:hover { box-shadow: 0 0 2.5px 0 rgba(0, 0, 0, .25); filter: brightness(1); height: 260px; overflow: hidden; transform: translateY(-5px); width: 310px } /* Images */ #postArticle .section .thumbnail img { height: 85%; margin: 0 auto; width: 100% } /* Caption */ #postArticle .section .thumbnail .caption { height: 15%; text-align: center } /* Description */ #postArticle .section .thumbnail .description { background: rgba(0, 0, 0, .675); color: transparent; cursor: default; display: inline-block; font-size: smaller; height: 0; margin: 0 auto; margin-top: -60px; opacity: 0; overflow-y: hidden; padding: 6.75px; pointer-events: none; position: fixed; text-overflow: ellipsis; text-shadow: 0 0 1px #808080; width: 97.25% } #postArticle .section .thumbnail:hover .description { color: #FFFFFF; height: 60px; position: absolute; opacity: 1; } #postArticle .section .thumbnail .description::after { color: #00ACFF; content: " Read more » "; cursor: pointer; display: inherit; height: 15px; margin-top: -5px; overflow: inherit; padding-right: 5%; position: inherit; text-align: right; width: inherit } /* Carousel Article */ /* Carousel */ #carouselArticle .carousel { zoom: .7 } /* Caption */ #carouselArticle .carousel-caption { background: rgba(0, 0, 0, .5); box-shadow: 0 160px 0 160px rgba(0, 0, 0, .5); height: 75px; } /* Indicators */ #carouselArticle .carousel-indicators li { background: rgba(0, 0, 0, .5); box-shadow: 0 0 10px 0 rgba(0, 0, 0, .75); height: 12.5px; margin: 0 5px; padding: 0; zoom: .9 } #carouselArticle .carousel-indicators li:first-child { margin-left: 75px } #carouselArticle .carousel-indicators li.active { background: #FFFFFF; }
css
import express from "express"; import {MemoryStore, Store} from "express-session"; import setupFormsAndBasics from "./middleware/forms-basic-middleware"; import setupPassport from "./middleware/passport-user"; import buildExpressSessionMiddleware from "./middleware/session-state"; import setupCurrentUserController from "./middleware/current-user-controller"; import setupLocalPasswordController from "./middleware/local-password-controller"; import setupOpenidAuthRouter from "./middleware/openid-controller"; import setupAuthCheckForTraefik from "./middleware/auth-check"; import {setupRedisAsUserDatabase} from "./persistence/redis-auth-database"; import { CurrentUserApiMountPoint, InternalAuthVerificationEndPoint, LocalPasswordApiMountPoint, OpenIdApiMountPoint } from "./api-endpoints"; import {createRedisPublisher, setupAuthAnnouncements} from "./auth-announcement-handlers"; function initExpressApp(config: Config) { const {serverBaseUrl, sessionSecret} = config; if (!serverBaseUrl) { throw new Error("serverBaseUrl required for passportjs-auth service. "); } if (!sessionSecret) { throw new Error("sessionSecret required. Ensure AUTH_SESSION_SECRET env variable was set"); } const redisAsUserDatabase = setupRedisAsUserDatabase(config.RedisConfig); const redisPublisher = createRedisPublisher(config.RedisConfig); // note: if you decide to give this passportjs-auth service its own private db, this redis client should not use it. It is used for pubsub (not for session cookie persistence and such) const {onLoginSuccess} = setupAuthAnnouncements(redisPublisher, { ...redisAsUserDatabase }); // todo: { onAuthSuccess, onGuestPermitted, onApiCallPermitted, onLoginSuccess } const app = express(); setupFormsAndBasics(app, config); app.use(buildExpressSessionMiddleware(config)); setupPassport(app, {fetchAuthUser: redisAsUserDatabase.fetchAuthUser}); // note: setupPassport needs to be called after the session middleware is set up, done in buildExpressSessionMiddleware app.get(InternalAuthVerificationEndPoint, setupAuthCheckForTraefik(config)); app.use(OpenIdApiMountPoint, setupOpenidAuthRouter({ serverBaseUrl, providers: config.OpenIdProvider, onLoginSuccess, ...redisAsUserDatabase })); if (config.EnableLocalPasswordLoginSystem) { app.use(LocalPasswordApiMountPoint, setupLocalPasswordController({ serverBaseUrl, onLoginSuccess, ...redisAsUserDatabase })); } app.use(CurrentUserApiMountPoint, setupCurrentUserController({serverBaseUrl})); // Routes on '/auth/user/*' return app; } export interface Config { /** * The origin / base domain of your site. (protocol and host) Eg, https://mysite.com * Required. Server.ts sets this using env variable WEBSTACK_HOST (and optionally WEBSTACK_PROTOCOL) */ serverBaseUrl: string; /** * Crypto secret passed to express-session, for in-browser user session. * Required. Server sets this using env variable AUTH_SESSION_SECRET */ sessionSecret: string; /** * List of X-Auth-* headers passed to Traefik */ internalAuthHeaders: string[]; /** * Default is Redis connection if present. Pass in an express-session store. For tests, pass in a MemoryStore. */ sessionStore?: Store | MemoryStore; /** * Others in config.ts */ [key: string]: any; } export type AuthUserId = string; export type Email = string; export interface AuthUser { authUserId: AuthUserId; confirmed: boolean; email?: Email; displayName?: string; accessToken?: string; localAuth?: LocalAuthData; updatedAt?: number; // Date.now() epoch ms // [key: string]: any; } // used only for local password authentication: export interface LocalAuthData { pwdHash: string; confToken?: string; confExp?: Date; resetToken?: string; resetExp?: Date; } export interface AuthUserPersistence { fetchAuthUser: (authUserId: AuthUserId) => Promise<AuthUser | void>; saveAuthUser: (authUser: AuthUser) => Promise<any>; fetchAuthUserByEmail: (email: Email) => Promise<AuthUser | void>; } export type PathPrefixOrRegex = string | RegExp; export interface OpenIdProvider { clientId: string; clientSecret: string; } export type LoginCallback = (authUser: AuthUser, req: express.Request, res: express.Response) => Promise<any>; export default initExpressApp;
typescript
<reponame>Gnaneshwar12/FoodApp import * as jsonServer from 'json-server'; import { Express } from 'express'; import * as fs from 'fs'; import * as https from 'https'; import { handleAuthentication } from './auth'; import { handleAuthorization } from './authz'; const server: Express = jsonServer.create(); const router = jsonServer.router('../db.json') const middlewares = jsonServer.defaults() // Set default middlewares (logger, static, cors and no-cache) server.use(middlewares) server.use(jsonServer.bodyParser) //middleware para login server.post('/login', handleAuthentication); //using .use will work to all method. get/post/delete/update... server.use('/orders', handleAuthorization); // Use default router server.use(router) const options = { cert: fs.readFileSync('./keys/cert.pem'), key: fs.readFileSync('./keys/key.pem') } https.createServer(options, server).listen(3001, () => { console.log('JSON Server is running') })
typescript
Xiaomi is ready to launch the vanilla Redmi Note 12 series in the Indian market this week, but the company has another offering for consumers, this time focusing on the budget segment. The Redmi 12C is also expected to be announced with the Redmi Note 12 on March 30, when the company is hosting the main event. As you might be aware, Xiaomi has launched the Redmi 12C in other markets previously and now is ready to upgrade its budget lineup with this model in India. The company has already confirmed the launch and also shared teasers of some of the Redmi 12C features that could have a bearing on the interest of buyers. Here are all the expected specifications and prices of the Redmi 12C in India. Redmi 12C launch date in India is Thursday, March 30, but we still don’t have the launch event time and whether you can watch the event online from your mobile. Xiaomi is organising the Xiaomi Fan Festival, which will start on March 30, and that’s where the two new phones will be announced. Redmi 12C is being pitched as a budget device, and we already have a marker for its price based on how much it costs in the other markets it has launched. In China, the Redmi 12C is priced at CNY 699 (Rs 8,400 approx) for the base variant, and going by recent trends, one can definitely expect the Redmi 12C India price to be between Rs 9,000 and Rs 10,000, the official teasers have already confirmed. Redmi 12C is launching on March 30, which is just a day away, and it is possible Xiaomi could start sales for the budget phone from the launch date itself. It has already confirmed Amazon as the online selling partner in India. Redmi 12C will be the successor to the Redmi 11 smartphone, which has gradually become the go-to pick for budget consumers in the country. But with other brands entering the space with appealing products, Redmi 12C will have more than a tough fight this year to stake the claim of the top budget phone in the country. Here are some of the expected specifications of the phone. With the phone already launching in other markets, we have a good idea about its design and finishing. Redmi 12C focuses on style with its textured polycarbonate rear panel that also has stripes as per reports. The company is likely to keep the dimensions in check so that the phone is easy to use in one hand. The camera module shouldn’t occupy a lot of space at the back and the front of the device could have the standard notch design. Xiaomi is powering the Redmi 12C with the MediaTek Helio G85 chipset which is claimed to be the leading chip in the sub-Rs 10,000 segment. Having this SoC could help the phone deliver robust performance without having any ill effects on the battery life of the device. Redmi 12C is expected to feature a dual rear camera system where you have a 50MP primary sensor along with a QVGA lens for depth sensing. Having a camera with high megapixel count doesn’t necessarily mean better quality but the company is betting its buck on the camera performance, highlighting it in the teasers, which counts for something. Redmi 12C is rumoured to have a large 6.71-inch LCD display with a 60Hz refresh rate screen that will sport a water drop notch. Redmi 12C could launch in two RAM 4/6GB and storage 64/128GB variants in the country. The storage is further expandable up to 512GB using the dedicated card slot. The device could have the fingerprint sensor at the back, and pack a 5000mAh battery which is likely to offer 10W charging support.
english
# AWS Private Link ## Overview Customers often want the core services of their OpenShift cluster to be available only on the internal network and not on the Internet. The API server is one such service that customers do not want to be accessible over the Internet. The OpenShift Installer allows creating clusters that have their services published only on the internal network by setting `publish: Internal` in the install-config.yaml. Since Hive is usually running outside the network where the clusters exists, it requires access to the cluster's API server which mostly translates to having the API reachable over the Internet. There can be some restrictions setup to allow only Hive to access the API but these are usually not acceptable by security focused customers. AWS provides a feature called AWS Private Link ([see doc][aws-private-link-overview]) that allows accessing private services in customer VPCs from another account using AWS's internal networking and not the Internet. AWS Private Link involves creating a VPC Endpoint Service in customer's account that is backed by one or more internal NLBS and a VPC Endpoint in service provider's account. This allows clients in service provider's VPC to access the NLB backed service in customer's account using the endpoint-endpoint service Private Link. So the internal service is now accessible to the service provider without exposing the service to the Internet. Using this same architecture, we create a VPC Endpoint Service, VPC Endpoint pair to create an Private Link to cluster's internal NLB for k8s API server, allowing Hive to access the API without forcing the cluster to publish it on the Internet. ## Configuring Hive to enable AWS Private Link To configure Hive to support Private Link in a specific region, 1. Create VPCs in that region that can be used to create VPC Endpoints. NOTE: There is a hard limit of 255 VPC Endpoints in a region, therefore you will need multiple VPCs to support more cluster in that region. 2. For each VPC, create subnets in all the supported availability zones of the region. NOTE: each subnet must have at least 255 usuable IPs because the controller. For example let's create VPCs in us-east-1 region, that has 6 AZs. ```txt vpc-1 (us-east-1) : 10.0.0.0/20 subnet-11 (us-east-1a): 10.0.0.0/23 subnet-12 (us-east-1b): 10.0.2.0/23 subnet-13 (us-east-1c): 10.0.4.0/23 subnet-12 (us-east-1d): 10.0.8.0/23 subnet-12 (us-east-1e): 10.0.10.0/23 subnet-12 (us-east-1f): 10.0.12.0/23 ``` ```txt vpc-2 (us-east-1) : 10.0.16.0/20 subnet-21 (us-east-1a): 10.0.16.0/23 subnet-22 (us-east-1b): 10.0.18.0/23 subnet-23 (us-east-1c): 10.0.20.0/23 subnet-24 (us-east-1d): 10.0.22.0/23 subnet-25 (us-east-1e): 10.0.24.0/23 subnet-26 (us-east-1f): 10.0.28.0/23 ``` 3. Make sure all the Hive environments (Hive VPCs) have network reachability to these VPCs created above for VPC Endpoints using peering, transit gateways, etc. 4. Gather a list of VPCs that will need to resolve the DNS setup for Private Link. This should at least include the VPC of the Hive being configured, and can include list of all VPCs where various Hive controllers exists. 5. Update the HiveConfig to enable Private Link for clusters in that region. ```yaml ## hiveconfig spec: awsPrivateLink: ## this this is list if inventory of VPCs that can be used to create VPC ## endpoints by the controller endpointVPCInventory: - region: us-east-1 vpcID: vpc-1 subnets: - availabilityZone: us-east-1a subnetID: subnet-11 - availabilityZone: us-east-1b subnetID: subnet-12 - availabilityZone: us-east-1c subnetID: subnet-13 - availabilityZone: us-east-1d subnetID: subnet-14 - availabilityZone: us-east-1e subnetID: subnet-15 - availabilityZone: us-east-1f subnetID: subnet-16 - region: us-east-1 vpcID: vpc-2 subnets: - availabilityZone: us-east-1a subnetID: subnet-21 - availabilityZone: us-east-1b subnetID: subnet-22 - availabilityZone: us-east-1c subnetID: subnet-23 - availabilityZone: us-east-1d subnetID: subnet-24 - availabilityZone: us-east-1e subnetID: subnet-25 - availabilityZone: us-east-1f subnetID: subnet-26 ## credentialsSecretRef points to a secret with permissions to create ## resources in account where the inventory of VPCs exist. credentialsSecretRef: name: < hub-account-credentials-secret-name > ## this is a list of VPC where various Hive clusters exists. associatedVPCs: - region: region-hive1 vpcID: vpc-hive1 credentialsSecretRef: name: < credentials that have access to account where Hive1 VPC exists > - region: region-hive2 vpcID: vpc-hive2 credentialsSecretRef: name: < credentials that have access to account where Hive2 VPC exists> ``` You can include VPC from all the regions where private link is supported in the endpointVPCInventory list. The controller will pick a VPC appropriate for the ClusterDeployment. ### Security Groups for VPC Endpoints Each VPC Endpoint in AWS has a Security Group attached to control access to the endpoint. See the [docs][control-access-vpc-endpoint] for details. When Hive creates VPC Endpoint, it does not specify any Security Group and therefore the default Security Group of the VPC is attached to the VPC Endpoint. Therefore, the default security group of the VPC where VPC Endpoints are created must have rules to allow traffic from the Hive installer pods. For example, if Hive is running in hive-vpc(10.1.0.0/16), there must be a rule in default Security Group of VPC where VPC Endpoint is created that allows ingess from 10.1.0.0/16. ## Using AWS Private Link Once Hive is configured to support Private Link for AWS clusters, customers can create ClusterDeployment objects with Private Link by setting the `privateLink.enabled` to `true` in `aws` platform. This is only supported in regions where Hive is configured to support Private Link, the validating webhooks will reject ClusterDeployments that request private link in unsupported regions. ```yaml spec: platform: aws: privateLink: enabled: true ``` The controller provides progress and failure updates using `AWSPrivateLinkReady` and `AWSPrivateLinkFailed` conditions on the ClusterDeployment. ## Permissions required for AWS Private Link There multiple credentials involved in the configuring AWS Private Link and there are different expectations of required permissions for these credentials. 1. The credentials on ClusterDeployment The following permissions are required: ```txt ec2:CreateVpcEndpointServiceConfiguration ec2:DescribeVpcEndpointServiceConfigurations ec2:ModifyVpcEndpointServiceConfiguration ec2:DescribeVpcEndpointServicePermissions ec2:ModifyVpcEndpointServicePermissions ec2:DeleteVpcEndpointServiceConfigurations ``` 2. The credentials specified in HiveConfig for endpoint VPCs account `.spec.awsPrivateLink.credentialsSecretRef` The following permissions are required: ```txt ec2:DescribeVpcEndpointServices ec2:DescribeVpcEndpoints ec2:CreateVpcEndpoint ec2:CreateTags ec2:DescribeVPCs ec2:DeleteVpcEndpoints route53:CreateHostedZone route53:GetHostedZone route53:ListHostedZonesByVPC route53:AssociateVPCWithHostedZone route53:DisassociateVPCFromHostedZone route53:CreateVPCAssociationAuthorization route53:DeleteVPCAssociationAuthorization route53:ListResourceRecordSets route53:ChangeResourceRecordSets route53:DeleteHostedZone ``` 3. The credentials specified in HiveConfig for associating VPCs to the Private Hosted Zone. `.spec.awsPrivateLink.associatedVPCs[$idx].credentialsSecretRef` The following permissions are required in the account where the VPC exists: ```txt route53:AssociateVPCWithHostedZone route53:DisassociateVPCFromHostedZone ec2:DescribeVPCs ``` [aws-private-link-overview]: https://docs.aws.amazon.com/vpc/latest/privatelink/endpoint-services-overview.html [control-access-vpc-endpoint]: https://docs.aws.amazon.com/vpc/latest/privatelink/vpc-endpoints-access.html#vpc-endpoints-security-groups
markdown
<gh_stars>0 /* Programa: cadastro02 Arquivo: cadastro02.cpp */ #include <iostream> #include "parametros.h" using namespace std; struct Pessoa { string nome; int idade; char sexo; } ; int main() { Pessoa cadastro[N]; int x; // Variável de controle for ( x = 0; x < N ; x++) { cout << "Digite o nome: "; cin >> cadastro[x].nome; cout << "Digite a idade: "; cin >> cadastro[x].idade; cout << "Digite o sexo (m para masculino, f para feminino): "; cin >> cadastro[x].sexo; } for ( x = 0; x < N ; x++) { cout << cadastro[x].nome << " - "<< cadastro[x].idade ; cout << " - "<< cadastro[x].sexo << endl; } return 0; }
cpp
{"id":389,"category":{"name":"Legacy","subset":"Quests"},"help":{"de":"10 Monsterhatzen in Camp Seelenruhe abgeschlossen.","en":"Complete 10 behests at Camp Tranquil.","fr":"Accomplir un total de 10 opérations commando au camp des Sentes tranquilles.","jp":"キャンプ・トランキルで、ビヘストを計10回コンプリートする"},"img":"062000/062913.png"}
json
A new survey by leading recruiting firm CyberCoders found that several skills are in high demand in the current job market. Chief among those skills are mobile developers, who are highly sought as a result of the boom of mobile applications on Android and iOS. CyberCoders analyzed more than 10,000 tech companies and their hiring requirements to compile the list of the hottest skills in the tech space. Data from CyberCoders reveals that candidates who have experience with iOS development, cloud computing programming and front-end development skills are most in demand in today’s tech career landscape. - Mobile Development (iOS, Android) - Cloud Computing (AWS, Azure) - Front End Development (HTML5, CSS3, JavaScript) - Big Data (Hadoop, MongoDB, NoSQL) “A common theme among these technology skills is the need for open source, mobile, cloud or big data technologies, like iOS, Azure and Hadoop,” says Matt Miller CTO of CyberCoders. “Everyday we see the engineers with these skills getting an average of four to five job offers,” says CEO and Founder of CyberCoders, Heidi Golledge. “Companies that provide cutting edge technology, great salaries and a positive company culture, will have a better chance at getting the tech candidates they need to compete in the ever changing social, data and mobile workplace,” says Golledge. Front-end development for mobile applications and websites remains a top priority for companies. Developers who are coding with some of the new mobile optimized languages such as CSS3 and HTML5 are vital to tech companies that are looking to build content-rich pages with relatively light code. This is the second year the company has released a Top-10 skill list. No new trends emerged this year, Miller said, but the demand for mobile development skills continues to surge. “And we don’t see that slowing down,” he said.
english
<gh_stars>0 {"name":"<NAME>","harga":" Rp. 77.549/ kemasan","golongan":"http://medicastore.com/image_banner/obat_keras_dan_psikotropika.gif","kandungan":"Mengandung : Lovastatin.","indikasi":"Menurunkan kolesterol total dan kolesterol LDL pada hiperkolesterolemia primer yang tidak dapat diatasi dengan diet dan tindakan non farmakologik lain.Hiperkolesterolemia disertai hipertrigliseridemia.","kontraindikasi":"Hamil dan menyusui.Penyakit hati aktif.Hipersensitif terhadap lovastatin.","perhatian":"Tidak untuk hipertrigliseridemia tanpa kolesterolemia.Pantau lensa mata pada pasien dengan gangguan katarak.Anak-anak usia kurang dari 20 tahun.Hiperkolesterolemia homozigot familial.Lakukan tes fungsi hati selama terapi.","efeksamping":"Sakit kepala, pusing, konstipasi, diare, dispepsia, perut kembung.Kram perut, mual, kulit kemerahan, pruritus, kram otot, mialgia.Miopati, astenia, mulut kering, susah tidur, gangguan pengecapan.Nyeri dada iritasi mata, oftalmoplegia, gangguan muskuloskeletal, alopesia.Peningkatan transaminase serum, rabdomiolisis, pankreatitis, hepatitis, ginekomastia, gangguan penglihatan.","indeksamanwanitahamil":"X: Penelitian pada manusia dan hewan telah menunjukkan janin yang abnormal atau ada kejadian berbahaya pada janin berdasarkan pengalaman manusia atau keduanya, dan risiko penggunaan obat pada wanita hamil jelas melampaui keuntungannya. Obat dikontraindikasikan pada wanita yang sedang atau akan hamil.","kemasan":"Tablet 20 mg x 5 x 10's","dosis":"Dewasa : 1 kali sehari 20 mg, bersama dengan makan malam.Dosis dapat ditingkatkan sampai maksimal 80 mg perhari dosis tunggal atau terbagi, dengan interval 4 mingguPasien dengan pengobatan Imunosupresan atau gangguan fungsi ginjal berat (bersihan kreatin kurang dari 30 mL permenit) : maksimal 20 mg perhari.","penyajian":"Dikonsumsi bersamaan dengan makanan","pabrik":"Ifars.","id":"12166","category_id":"10"}
json
Former Ballon d'Or winner Lothar Matthaus believes Sadio Mane is not an adequate replacement for Robert Lewandowski at Bayern Munich. Lewandowski looks set to leave the Bavarian outfit this summer and has indicated his desire to look for pastures anew. The Pole has been largely linked with a move to Barcelona. Mane, meanwhile, looks set to exit Anfield this summer after a successful season with Liverpool. The Senegalese has been linked with a move to Bayern Munich, with the Reds rejecting the Bundesliga giants' opening bid for Mane. Matthaus, a seven-time Bundesliga winner with Bayern, reckons Mane's not a like-for-like replacement for Lewandowski. In his column for Sky Sports (via Bavarian Football Works), he wrote: Matthaus did, however, praise the Liverpool forward, calling him a 'wonderful attraction for the whole Bundesliga'. He also believes Mane would be 'an absolute super transfer'. Lewandowski scored 50 goals in 46 games across competitions last season. Mane, meanwhile, netted 23 times in 51 games for Liverpool but was largely deployed on the wings and not as an out-and-out centre-forward. Robert Lewandowski is arguably one of the greatest free transfers in modern football history. The 33-year-old joined Bayern Munich from their arch-rivals Borussia Dortmund on a Bosman move in the summer of 2014. Since then, he has scored a scarcely believable 344 goals in 374 games across competitions for the Bavarians. He has also recorded 72 assists. The Pole has also won 19 trophies at the Allianz Arena, including eight Bundesliga and the UEFA Champions League title. He was a key part of their treble-winning 2019-20 campaign, picking up the UEFA Best Player in Europe and The Best FIFA Men's Player awards. Lewandowski won the latter award in 2021 as well. Meanwhile, Mane's record at Liverpool pales in comparison, though it is certainly commendable for a wide forward. Since joining the Reds in 2016, he has scored 120 times in 269 games across competitions, also laying out 48 assists. Mane has won six titles at Anfield, including the Champions League and Premier League.
english
United Nations, May 25 (IANS): The UN has allocated $8. 5 million to aid 3,35,000 people in the worst-hit areas of storm-battered Madagascar, UN humanitarians said. The UN Office for the Coordination of Humanitarian Affairs (OCHA) said on Wednesday that it is working with the government to continue to aid the island nation's southeast, which was hit by cyclones earlier this year and last year, Xinhua news agency reported. "We launched humanitarian projects to support 3,35,000 people in the most vulnerable areas," OCHA added. "These projects have been made possible by an $8. 5 million allocation from our Central Emergency Response Fund, which allows us to tackle crises outside of the global spotlight. " The humanitarian office said that back-to-back emergencies hit the communities targeted by the projects. In January, tropical storm Cheneso hit Madagascar. Surprisingly, after travelling the breadth of the Indian Ocean, Cyclone Freddy slammed into the country's southeast, crossing the Mozambique Channel to hit the mainland of Africa only to double back across the strait to strike Madagascar a second time. Last year, tropical cyclones Batsirai and Emnati hit Madagascar. More than 8,70,000 people in Madagascar need support in the regions impacted by the storms, OCHA said. "This year, in support of the government, we have already reached 4,39,000 people with food, clean water, sanitation and hygiene support," the humanitarian office said. OCHA also reported that the earlier $215 million Flash Appeal for Madagascar is only 23 per cent funded.
english
{"PREVALENCE_BY_GENDER_AGE_YEAR":{"TRELLIS_NAME":["0-9","0-9"],"SERIES_NAME":["FEMALE","FEMALE"],"X_CALENDAR_YEAR":[2015,2016],"Y_PREVALENCE_1000PP":[0.02393,0.02439]},"PREVALENCE_BY_MONTH":{"X_CALENDAR_MONTH":[],"Y_PREVALENCE_1000PP":[]},"OBS_FREQUENCY_DISTRIBUTION":{"Y_NUM_PERSONS":0,"X_COUNT":1},"OBSERVATIONS_BY_TYPE":{"CONCEPT_NAME":"Observation recorded from EHR","COUNT_VALUE":15},"AGE_AT_FIRST_OCCURRENCE":{"CATEGORY":"FEMALE","MIN_VALUE":6,"P10_VALUE":6,"P25_VALUE":6,"MEDIAN_VALUE":7,"P75_VALUE":7,"P90_VALUE":7,"MAX_VALUE":8}}
json
# Copyright 2016 The Johns Hopkins University Applied Physics Laboratory # # 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. import json from unittest.mock import patch, MagicMock from bossingest.ingest_manager import IngestManager from bossingest.models import IngestJob from bossingest.test.setup import SetupTests from bosscore.test.setup_db import SetupTestDB from bosscore.error import ErrorCodes from bosscore.lookup import LookUpKey import bossutils.aws from django.contrib.auth.models import User from ndingest.ndqueue.uploadqueue import UploadQueue from rest_framework.test import APITestCase class BossIngestManagerTest(APITestCase): def setUp(self): """ Initialize the database :return: """ dbsetup = SetupTestDB() self.user = dbsetup.create_super_user(username='testuser', email='<EMAIL>', password='<PASSWORD>') dbsetup.set_user(self.user) self.client.force_login(self.user) dbsetup.insert_ingest_test_data() setup = SetupTests() # Get the config_data for v1 schema config_data = setup.get_ingest_config_data_dict() self.example_config_data = config_data self.volumetric_config_data = setup.get_ingest_config_data_dict_volumetric() # Unit under test. self.ingest_mgr = IngestManager() def test_validate_ingest(self): """Method to test validation method""" #Validate schema and config file response = self.ingest_mgr.validate_config_file(self.example_config_data) assert (response is True) #Validate properties response = self.ingest_mgr.validate_properties() assert (response is True) def test_validate_config_file(self): """Method to test validation of a config file""" self.ingest_mgr.validate_config_file(self.example_config_data) assert(self.ingest_mgr.config is not None) assert (self.ingest_mgr.config.config_data is not None) def test_validate_properties(self): """Methos to test validation of properties of the config data""" self.ingest_mgr.validate_config_file(self.example_config_data) self.ingest_mgr.validate_properties() assert (self.ingest_mgr.collection.name == 'my_col_1') assert (self.ingest_mgr.experiment.name == 'my_exp_1') assert (self.ingest_mgr.channel.name == 'my_ch_1') def test_create_ingest_job(self): """Method to test creation of a ingest job from a config_data dict""" self.ingest_mgr.validate_config_file(self.example_config_data) self.ingest_mgr.validate_properties() self.ingest_mgr.owner = self.user.pk job = self.ingest_mgr.create_ingest_job() assert (job.id is not None) assert (job.ingest_type == IngestJob.TILE_INGEST) assert (job.tile_size_x == 512) assert (job.tile_size_y == 512) assert (job.tile_size_z == 1) assert (job.tile_size_t == 1) def test_create_ingest_job_volumetric(self): self.ingest_mgr.validate_config_file(self.volumetric_config_data) self.ingest_mgr.validate_properties() self.ingest_mgr.owner = self.user.pk job = self.ingest_mgr.create_ingest_job() assert (job.id is not None) assert (job.ingest_type == IngestJob.VOLUMETRIC_INGEST) assert (job.tile_size_x == 1024) assert (job.tile_size_y == 1024) assert (job.tile_size_z == 64) assert (job.tile_size_t == 1) def test_generate_upload_queue_args_tile_job(self): """Ensure ingest_type set properly""" self.ingest_mgr.validate_config_file(self.example_config_data) self.ingest_mgr.validate_properties() self.ingest_mgr.owner = self.user.pk job = self.ingest_mgr.create_ingest_job() actual = self.ingest_mgr._generate_upload_queue_args(job) assert actual['ingest_type'] == IngestJob.TILE_INGEST assert actual['z_chunk_size'] == 16 def test_generate_upload_queue_args_volumetric_job(self): """Ensure ingest_type set properly""" self.ingest_mgr.validate_config_file(self.volumetric_config_data) self.ingest_mgr.validate_properties() self.ingest_mgr.owner = self.user.pk job = self.ingest_mgr.create_ingest_job() actual = self.ingest_mgr._generate_upload_queue_args(job) assert actual['ingest_type'] == IngestJob.VOLUMETRIC_INGEST assert actual['z_chunk_size'] == 64 assert actual['ingest_queue'] is None def test_tile_bucket_name(self): """ Test get tile bucket name""" tile_bucket_name = self.ingest_mgr.get_tile_bucket() assert(tile_bucket_name is not None) def test_get_resource_data(self): """Run the method and ensure keys set""" self.ingest_mgr.validate_config_file(self.example_config_data) self.ingest_mgr.validate_properties() self.ingest_mgr.owner = self.user.pk job = self.ingest_mgr.create_ingest_job() actual = self.ingest_mgr.get_resource_data(job.id) self.assertIn('boss_key', actual) self.assertIn('lookup_key', actual) self.assertIn('channel', actual) self.assertIn('experiment', actual) self.assertIn('coord_frame', actual)
python
<gh_stars>0 ### Documentation: [dict](https://docs.python.org/ja/3/library/functions.html#func-dict) 辞書の作成 ### Syntax: ```dict([a])``` - **a** (optional): **{ }** でも dictionary object を作成可能 ### Returns: dictionary object ### Example: ```python >>> phonebook = dict() >>> for i in range(3): >>> entry = input().rstrip().split() >>> phonebook[entry[0]] = int(entry[1]) in> sam 1 in> tom 6 in> jim 4 >>> phonebook {'sam': 1, 'tom': 4, 'jim': 6} ```
markdown
Prior to that, I got placed on flick college or university, for the 2003, and got into Columbia, however, wound-up maybe not going because the I became the latest breadwinner in the my loved ones plus it was just unlikely when this occurs. While the We examined attending flick college or university, I found out you merely build several brief clips, therefore i was like, “Better, I will just build one or two brief clips, I really don’t have to pay any sort of, $60,000 per year to do it.” So i is actually usually dabbling artistically unofficially. We finished up learning a lot of the survivors on Nassar situation and you can fulfilling legal counsel, telling your on which that it community feels as though, so the guy know it. I thought that more folks are browsing view a motion picture than simply read a book otherwise good journalistic account, unfortunately. I was thinking it earned that sort of extensive attract. So i simply come conversing with some one and you may try quickly delivered to help you a female who produces clips from inside the Bay area. She is likely to work at clips that have females-founded subject. She is actually intrigued by my personal nothing pitch and you can she produced me on administrators. We was presented with with like a detrimental taste in my mouth. I found myself so yourself broken. I experienced a dinner problems. I became, mentally, a beneficial destroy. I found myself sour. I had not reconciled my personal time in the game, and i was angry using my moms and dads and my teachers. I was not whole most, and so i are aggressively against the athletics. The new irony is one writing a text was really meant, inside my attention, to put all of it to wraps, to greatly help me see my personal amount of time in the game. It helped me end up being thankful plus make peace with the bad posts and fully leave from it. I’m significantly more mixed up in athletics now during the 51 than I was during the twenty-five as the We have getting an athlete endorse and this blunt voice. Thus far, within my age, I am not afraid to state visit the site here one thing. Simple fact is that greatest abuse scandal within the sports that i is believe from. We nevertheless do not think people really know about any of it. We nonetheless do not know you to definitely mothers cam adequate about any of it when it upload the children off to gamble recreations, which i envision is a fantastic craft, however they are going to be clear just what coach’s thinking is actually. I’d like having [teens] to watch it and you can understand that its voice matters, you to its experience things and they is also and ought to chat right up when anything isn’t really correct. I’m instance in the event that I would become open to one to before some thing happened, discipline took place, I’d was basically convinced adequate to state or at least I would personally enjoys noticed I’d the latest consent to state, “No, try not to reduce me this way.” However, behavior was beaten to the all of us. Very not only did I perhaps not feel safe proclaiming that, I think your punishment heaped abreast of me personally is my personal fault since the I happened to be too sluggish or crappy or any kind of. I believe we can ready yourself kids to not ever accept bad procedures – specifically lady. Without a doubt, I really hope this keeps the stress towards the U . s . Gymnastics, as they really have not produced the desired alter, i do believe and i also imagine on the advice of the many the latest survivors. It’s still perhaps not a child-first providers. It’s still an organization that, I would argue, place effective and money and medals over students – and therefore are people, as clear. We already been Levi’s in the June 1999. I found myself an assistant Profit Movie director to have a brandname you to definitely zero stretched is present called L2. I want to provides only became 30 and i also was about to help you wed. I went towards maternity get-off and this brand name ran out, when We returned, We registered brand new Levi’s brand and are the fresh movie director off purchases to your You. Since that time, We have held some jobs in and you will outside revenue. I really went to the approach following the brand new You.
english
Flipkart Ltd on Tuesday announced that it has acquired online retail portal Jabong through its fashion subsidiary Myntra. The online retail company refused to disclose the deal amount. Jabong is one of India’s major fashion multi-brand e-store with over 1,500 retail brands. Jabong, which is owned by Global Fashion Group, has been on the lookout for a buyer for the last few months. The company has been in touch with Snapdeal as well as Future Group and Amazon, but a deal failed to pass through. In 2014, Amazon reportedly wanted to acquire Jabong but the price tag was a steep $1. 2 billion. According to a report by Rocket Internet, Jabong is the only loss-making outfit in GFG’s portfolio of ten companies in the January-June 2015 period. Jabong also registered slowest revenue growth of 26. 5 per cent y-o-y in the six months to June, 2015 among the ten companies. Research Director at Gartner Sandy Shen said the move will help Flipkart further penetrate into the fashion category and keep rival Amazon at bay. Jabong reported an operating loss of Rs 426 crore in FY15, slightly lower than in FY14. The revenue growth in FY15 inched up by just 7 per cent to Rs 866 crore from Rs 811 crore in the previous year.
english
Beijing: China’s military, the world’s largest force, has cut the size of its land-based army by about 50 per cent and significantly boosted its navy and air force as part of an ‘unprecedented’ strategic shift designed to transform the People’s Liberation Army (PLA) into a comprehensive modern force. The two million-strong Chinese military has significantly boosted its navy, air force and new strategic units and downsized its land-based army, the Hong Kong-based South China Morning Post reported quoting a state-run Xinhua report. In the last few years, the PLA has downsized its military by retrenching three lakh troops under the military reforms initiated by President Xi Jinping but it still remained the world’s largest military with two million personnel in the ranks. The statement indicated that the four other branches of the PLA – the navy, air force, rocket force and strategic support force, which is responsible for areas such as cyberwarfare – now together make up more than half of the Chinese military, overtaking the army, which has traditionally been the dominant unit of the PLA. The expansion of the navy in the past few years was massive as China now has one aircraft carrier, another undergoing trial and third in making. Official media reports said China plans to have about five to six aircraft carriers. The rocket force and strategic support force mainly focus on missile warfare. Shanghai-based military analyst Ni Lexiong said the overhaul marked a significant strategic shift from having a homeland-based defensive force to one with the capacity to allow Beijing to flex its muscles beyond its national borders and to protect its interests overseas.
english
Police said the suspect who was apprehended Thursday evening stabbed her husband in a fit of rage after he allegedly slapped her. Hi, what are you looking for? Police said the suspect who was apprehended Thursday evening stabbed her husband in a fit of rage after he allegedly slapped her. The incident happened around 0020hrs, the police said adding five were rescued following the incident. NPS Spokesperson Dr. Resila Onyango gave the assurance on Monday when she talked to Capital FM. The National Police Service (NPS) confirmed only three civilians had surrendered their firearms, two in Turkana and one in Baragoi (Samburu County).
english
<gh_stars>1-10 <HTML> <HEAD> Wed Dec 04 13:32:22 CET 2013 </HEAD> <BODY> <PRE> <table width="100%" border> <tr><th>Log Message</th><th>Time</th></tr> <tr><td>Initial Rule added:sell 0.01 BTC on mtgox if price goes below 74.0 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>Initial Rule added:buy 1.9 LTC on btce if price goes below 2.3 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>Initial Rule added:sell 0.4 BTC on bitstamp if price goes above 150.4 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 1189.62 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 870.0 EUR</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Last price of 1 BTC: 1046.0 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Last price of 1 LTC: 38.55 EUR</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[bitstamp] Last price of 1 BTC: 1095.0 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Balance updated :Balance : 0.00700262 BTC; 1.89642 USD; 1.89642 EUR </td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Balance updated :Balance : 5.889E-5 BTC; 5.889E-5 LTC; 0.99755187 USD; </td><td>Dec 04,2013 13:32</td></tr> <tr><td>[bitstamp] Balance updated :Balance : 3.878 BTC; 7072.95 USD; </td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 1189.62 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 870.0 EUR</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Last price of 1 BTC: 1046.0 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Last price of 1 LTC: 38.7 EUR</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[bitstamp] Last price of 1 BTC: 1092.1 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Balance updated :Balance : 0.00700262 BTC; 1.89642 USD; 1.89642 EUR </td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Balance updated :Balance : 5.889E-5 BTC; 5.889E-5 LTC; 0.99755187 USD; </td><td>Dec 04,2013 13:32</td></tr> <tr><td>[bitstamp] Balance updated :Balance : 3.878 BTC; 7072.95 USD; </td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 1190.0 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 861.1 EUR</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Last price of 1 BTC: 1046.0 USD</td><td>Dec 04,2013 13:32</td></tr> <tr><td>[btce] Last price of 1 LTC: 38.41 EUR</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[bitstamp] Last price of 1 BTC: 1092.1 USD</td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>Post Data: nonce=1386160380592000</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>Query to :https://data.mtgox.com/api/2/MONEY/INFO , HTTP response : </p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>�-�1�0 ѫX��t�t{�(J>+���� �ZQM��dG�[��p7��ہ�</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'></p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>���Srl�8*�Q.���r����qa �q�~��I�GnR���uiNn</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>Unexpected character () at position 0.</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td>[mtgox] Balance updated :Balance : </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[btce] Balance updated :Balance : 5.889E-5 BTC; 5.889E-5 LTC; 0.99755187 USD; </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[bitstamp] Balance updated :Balance : 3.878 BTC; 7072.95 USD; </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 1198.5 USD</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 861.1 EUR</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[btce] Last price of 1 BTC: 1045.9 USD</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[btce] Last price of 1 LTC: 38.55 EUR</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[bitstamp] Last price of 1 BTC: 1092.02 USD</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[mtgox] Balance updated :Balance : 0.00700262 BTC; 1.89642 USD; 1.89642 EUR </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[btce] Balance updated :Balance : 5.889E-5 BTC; 5.889E-5 LTC; 0.99755187 USD; </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[bitstamp] Balance updated :Balance : 3.878 BTC; 7072.95 USD; </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 1198.5 USD</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[mtgox] Last price of 1 BTC: 870.0 EUR</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[btce] Last price of 1 BTC: 1046.0 USD</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[btce] Last price of 1 LTC: 38.33 EUR</td><td>Dec 04,2013 13:33</td></tr> <tr><td>[bitstamp] Last price of 1 BTC: 1092.02 USD</td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>Post Data: nonce=1386160410125000</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>Query to :https://data.mtgox.com/api/2/MONEY/INFO , HTTP response : </p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>�-�1�0 ѫX��t�t{�(J>+���� �ZQM��dG�[��p7��ہ�</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'></p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>���Srl�8*�Q.���r����qa �q�~��I�GnR���uiNn</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td><p style='color:red'>Unexpected character () at position 0.</p></td><td>Dec 04,2013 13:33</td></tr> <tr><td>[mtgox] Balance updated :Balance : </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[btce] Balance updated :Balance : 5.889E-5 BTC; 5.889E-5 LTC; 0.99755187 USD; </td><td>Dec 04,2013 13:33</td></tr> <tr><td>[bitstamp] Balance updated :Balance : 3.878 BTC; 7072.95 USD; </td><td>Dec 04,2013 13:33</td></tr> </table> </PRE></BODY> </HTML>
html
One of Trump's supporters reportedly faced backlash while appearing amid a protest against the president in London on Tuesday. A video, posted by LBC reporter Matthew Thompson, showed the man surrounded by several people who yelled "Nazi scum" at him. It's unclear what the man said in response but at one point, a milkshake fell on his head -- leaving residue at the top of his face. As the crowd cheered, he threw the milkshake back and seemed to try and attack one of the crowd members before people pushed him back. PRESIDENT TRUMP VISITS THE UNITED KINGDOM (SLIDESHOW) The incident occurred as London erupted with anti-Trump protests amid his visit to the United Kingdom on Tuesday. Police also reportedly barricaded about 20 Trump supporters in a pub amid the protests. Among the protesters was a blimp of Trump as a baby and women dressed as "handmaids" from the popular series, "The Handmaid's Tale. " Trump himself faced resistance when London's mayor Sadiq Khan penned an op-ed complaining that it was "un-British" for the nation to roll out the "red carpet" for Trump. "Donald Trump is just one of the most egregious examples of a growing global threat," he said. "The far right is on the rise around the world, threatening our hard-won rights and freedoms and the values that have defined our liberal, democratic societies for more than seventy years. " On Twitter, Trump blasted Khan as a "stone cold loser" who reminded him of "very dumb and incompetent" New York City Mayor Bill de Blasio. "Kahn reminds me very much of our very dumb and incompetent Mayor of NYC, de Blasio, who has also done a terrible job - only half his height," he tweeted.
english
{"derivation": "from G1 (\u1f04\u03c6\u03c9\u03bd\u03bf\u03c2) (as a negative particle) and G5456 (\u1f04\u03c6\u03c9\u03bd\u03bf\u03c2);", "kjv_def": "dumb, without signification", "lemma": "\u1f04\u03c6\u03c9\u03bd\u03bf\u03c2", "frequency": 6, "strongs_def": " voiceless, i.e. mute (by nature or choice); figuratively, unmeaning", "outline": "<ol><li> voiceless, dumb</li><li> without faculty of speech<ol><li> of idols</li></ol></li></ol>"}
json
<gh_stars>0 package app.data; import app.domain.Entity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import java.util.*; @Component public class CoreDBImpl<T extends Entity> implements CoreDB<T> { private Map<String, GeneralTableImpl<T>> tables = new HashMap<>(); public T get(String tableName, T val) { return tables.containsKey(tableName) ? tables.get(tableName).get(val) : null; } public T getById(String tableName, UUID uuid) { return tables.containsKey(tableName) ? tables.get(tableName).getById(uuid) : null; } public T create(String tableName, T val) { if (!tables.containsKey(tableName)) { tables.put(tableName, new GeneralTableImpl<T>()); } val.setTableName(tableName); return tables.get(tableName).add(val); } public T change(String tableName, T val) { return tables.containsKey(tableName) ? tables.get(tableName).change(val) : null; } public boolean delete(String tableName, T val) { return tables.containsKey(tableName) && tables.get(tableName).remove(val); } public List<T> getAll(String tableName) { return tables.containsKey(tableName) ? tables.get(tableName).getAll() : null; } public List<T> searchAll(String tableName, String inText) { return tables.containsKey(tableName) ? tables.get(tableName).searchEntries(inText) : null; } }
java
const fs = require('fs'); const Discord = require('discord.js'); const Auth = require("./auth.json"); const bot = new Discord.Client(); /*************************************************** * Static paths and filenames. Change if necessary * ***************************************************/ const imagesFileExtension = 'jpg'; const soundFileExtension = 'opus'; const avatarImageFilePath = './img/tuxedo.jpg'; const roseThrowImageFilePath = './img/rose.jpg'; const roseThrowSoundFilePath = './sound/tuxedoquote_rose.opus'; const quoteSoundsPath = './soundQuote/'; const quoteImagesPath = './imgQuote/'; const miscSoundsPath = './soundMisc/'; const miscImagesPath = './imgMisc/'; /******************************** * Create arrays with filenames * ********************************/ const quoteSounds = fs.readdirSync(quoteSoundsPath); const quoteImages = fs.readdirSync(quoteImagesPath); const miscSounds = fs.readdirSync(miscSoundsPath); const miscImages = fs.readdirSync(miscImagesPath); /**************************** * Functions used by events * ****************************/ /* Sets the bots avatar (async)*/ function setAvatar() { return new Promise((resolve, reject) => { bot.user.setAvatar(avatarImageFilePath) .then(user => { console.log('Tuxedo: check. Mask: check. Rose: check. Tuxedo Mask is ready to help!'); resolve(user); }) .catch(err => { console.error(err); reject(err); }); }); } /* Joins a voice channel (async)*/ function joinVoiceChannel(voiceChannel) { return new Promise((resolve, reject) => { if (typeof voiceChannel === 'object') { voiceChannel.join() .then(connection => { console.log('Tuxedo Mask joins the voice channel and is ready to deliver his speech!'); resolve(connection); }) .catch(err => { console.error(err); reject(err); }); } }); } /* Leaves a voice channel (sync)*/ function leaveVoiceChannel(voiceChannel) { return new Promise((resolve, reject) => { if (typeof voiceChannel === 'object') { voiceChannel.leave(); console.log('After delivering his speech, Tuxedo Mask leaves the voice channel!'); resolve(); } else { reject(); } }); } /* Sends the rose throw image to the current text channel (async)*/ function sendRoseThrowImage(textChannel) { return new Promise((resolve, reject) => { if (typeof textChannel === 'object') { if (fs.existsSync(roseThrowImageFilePath)) { textChannel.sendFile(roseThrowImageFilePath) .then(message => { console.log('Rose sucessfully thrown!'); resolve(message); }) .catch(err => { console.error(err); reject(err); }); } else { console.error(new Error('Rose throw image not found in path: ' + roseThrowImageFilePath)); reject(new Error('Rose throw image not found in path: ' + roseThrowImageFilePath)); } } }); } /* Plays the rose throw soundfile in the current voice channel (async)*/ function playRoseThrowSoundFile(voiceConnection) { return new Promise((resolve, reject) => { if (typeof voiceConnection === 'object') { if (fs.existsSync(roseThrowSoundFilePath)) { const dispatcher = voiceConnection.playFile(roseThrowSoundFilePath); console.log('Music starts playing after rose was thrown!'); dispatcher.once('end', () => { resolve(dispatcher); }); } else { console.error(new Error('Rose throw sound file not found in path: ' + roseThrowSoundFilePath)); reject(new Error('Rose throw sound file not found in path: ' + roseThrowSoundFilePath)); } } }); } /* Sends a tuxedo quote image to the current text channel (async)*/ function sendTuxedoQuoteImage(textChannel, imageFilePath) { return new Promise((resolve, reject) => { if (typeof textChannel === 'object') { if (fs.existsSync(imageFilePath)) { textChannel.sendFile(imageFilePath) .then(message => { console.log('Tuxedo quote sucessfully delivered in image form!'); resolve(message); }) .catch(err => { console.error(err); reject(err); }); } else { console.error(new Error('Tuxedo quote image not found in path: ' + imageFilePath)); reject(new Error('Tuxedo quote image not found in path: ' + imageFilePath)); } } }); } /* Plays a tuxedo quote soundfile in the current voice channel (async)*/ function playTuxedoQuoteSoundfile(voiceConnection, soundFilePath) { return new Promise((resolve, reject) => { if (typeof voiceConnection === 'object') { if (fs.existsSync(soundFilePath)) { const dispatcher = voiceConnection.playFile(soundFilePath); console.log('Tuxedo quote sucessfully delivered in speech form!'); dispatcher.once('end', () => { resolve(dispatcher); }); } else { console.error(new Error('Tuxedo quote sound file not found in path: ' + soundFilePath)); reject(new Error('Tuxedo quote sound file not found in path: ' + soundFilePath)); } } }); } /* Wait for a specified amount of time (async) */ function sleep(time) { return new Promise((resolve, reject) => { setTimeout(resolve, time); }); } /* Sends a random Tuxedo Mask quote via text and voice channel (if available) */ function sendRandomTuxedoQuote(textChannel, voiceChannel, messageText) { /* Select a random quote image and sound */ const randomIndexNo = Math.floor(Math.random() * ((quoteImages.length - 1) - 0 + 1)) + 0; const fileName = quoteImages[randomIndexNo]; const fileNameLastDotIndex = fileName.lastIndexOf('.'); const fileNameWithoutExtension = fileNameLastDotIndex > -1 ? fileName.substr(0, fileNameLastDotIndex) : fileName; if (typeof voiceChannel != 'undefined') { console.log('Sending text and voice channel quote'); joinVoiceChannel(voiceChannel) .then(voiceConnection => { sendRoseThrowImage(textChannel); playRoseThrowSoundFile(voiceConnection) .then(() => { sleep(1) .then(() => { sendTuxedoQuoteImage(textChannel, quoteImagesPath + fileName) .then(() => { playTuxedoQuoteSoundfile(voiceConnection, quoteSoundsPath + fileNameWithoutExtension + '.' + soundFileExtension) .then(() => { leaveVoiceChannel(voiceChannel); }) }) }) }) }); } else { console.log('Sending text channel only quote'); sendRoseThrowImage(textChannel) .then(() => { sleep(1000) .then(() => { sendTuxedoQuoteImage(textChannel, quoteImagesPath + fileName); }) }); } } /* Sends a random other Tuxedo Mask quote via text and voice channel (if available) */ function sendRandomTuxedoQuoteOther(textChannel, voiceChannel, messageText) { /* Select a random quote image and sound */ const randomIndexNo = Math.floor(Math.random() * ((miscImages.length - 1) - 0 + 1)) + 0; const fileName = miscImages[randomIndexNo]; const fileNameLastDotIndex = fileName.lastIndexOf('.'); const fileNameWithoutExtension = fileNameLastDotIndex > -1 ? fileName.substr(0, fileNameLastDotIndex) : fileName; if (typeof voiceChannel != 'undefined') { console.log('Sending other text and voice channel quote'); joinVoiceChannel(voiceChannel) .then(voiceConnection => { sendRoseThrowImage(textChannel); playRoseThrowSoundFile(voiceConnection) .then(() => { sleep(1) .then(() => { sendTuxedoQuoteImage(textChannel, miscImagesPath + fileName) .then(() => { playTuxedoQuoteSoundfile(voiceConnection, miscSoundsPath + fileNameWithoutExtension + '.' + soundFileExtension) .then(() => { leaveVoiceChannel(voiceChannel); }) }) }) }) }); } else { console.log('Sending other text channel only quote'); sendRoseThrowImage(textChannel) .then(() => { sleep(1000) .then(() => { sendTuxedoQuoteImage(textChannel, miscImagesPath + fileName); }) }); } } /********** * Events * **********/ /* Change into tuxedo mask */ bot.on('ready', () => { setAvatar() .catch(err => { console.error(err); }); }); /* Check if sailor moon needs any help */ bot.on('message', message => { const textChannel = message.channel; const voiceChannel = message.member.voiceChannel; const messageText = message.content; switch (messageText) { case '!tuxedo quote': console.log('Sending tuxedo quote'); sendRandomTuxedoQuote(textChannel, voiceChannel, messageText); break; case '!tuxedo quote other': console.log('Sending other tuxedo quote'); sendRandomTuxedoQuoteOther(textChannel, voiceChannel, messageText); break; } }); /* Wake up and be ready to change into Tuxedo Mask */ bot.login(Auth.botuser_token) .catch(err => { console.error(err); });
javascript
New York Knicks big Mitchell Robinson is ruled out of the remainder of the 2023-24 NBA season. The team has applied to the league for a disabled player exception for $7.8 million on Wednesday and will now look for options on the market as the trade window opens up. Robinson injured his left ankle in the Knicks' loss to the Boston Celtics. While he played the game briefly in the second half, he didn't take the floor in the fourth quarter. Last week, it was reported that he had undergone an ankle surgery that would sideline him for eight to ten weeks. However, recent updates suggest that NY believes that the center will be out for the rest of the season. The Knicks have already inked Taj Gibson to provide support in Robinson's absence. The latter played for the Washington Wizards last season and has been on three other teams previously coached by Knicks head coach Tom Thibodeau. With the season completing close to 30 games for every team by the end of December, the Knicks will now seek options. Here are a few alternatives the front office can explore for Mitchell Robinson: Richaun Holmes is currently plying his trade for the Dallas Mavericks. While he isn't a defensive powerhouse, he can be an upgrade who would bring high-quality rim running. With Jalen Brunson and Julius Randle being offensive weapons, he is a big who can set screens and is a potential lob threat. Christian Wood was inked by the LA Lakers for a two-year, $5.7 million deal this offseason and the center has done well in the limited minutes he's played for the side. His defense under Darvin Ham has seen significant improvement and that should benefit the Knicks. The LA big is averaging 7.1 points and 5.7 rebounds — numbers that will bump up once he replaces Mitchell Robinson on the starting five. The Utah Jazz have a versatile floor-spacing big in Kelly Olynyk. He's made a good surge in offensive rebounding and has improved on his passing. He can be looked at as an option for a second big in any squad primarily due to his shooting. After being on the bench, he is more useful for NY who have every chance of making the postseason than the Jazz who are pretty much looking from the outside at this stage. Clint Capela is rumored to be on the trade block in the days to come and makes for a perfect fit in place of Mitchell Robinson. The Atlanta Hawks center. Like Holmes and Olynyk, he offers rim protection and his offensive rebounding makes him a case to generate the Knicks' interest. He propped up 35 games with at least 10 points and 10 rebounds last season and that makes him a solid backup to have. In search of rim protectors, the New Orleans Pelicans had placed Jonas Valančiūnas on the trade market. He has been one of the more productive bigs in the last couple of seasons. He is an elite rebounder and can shoot at a decent clip. This season has him averaging 14.9 points and 9.9 rebounds. He is a volume scorer and is a boost on offense over Mitchell Robinson. How did Michael Jordan's gambling "habit" taint his image?
english
/* * * HomePage actions * */ import { LOAD_ASSIGNMENT, LOAD_ASSIGNMENT_SUCCESS, LOAD_ASSIGNMENT_ERROR, UPDATED_ASSIGNED_ITEM, UPDATED_ASSIGNED_ROOM_SUCCESS, UPDATED_ASSIGNED_TASK_SUCCESS, } from './constants'; export function loadAssignment() { return { type: LOAD_ASSIGNMENT, }; } export function assignmentLoaded(assignment) { return { type: LOAD_ASSIGNMENT_SUCCESS, assignment, }; } export function updateAssignmentItem() { return { type: UPDATED_ASSIGNED_ITEM, }; } export function updateAssignmentRoomDone(room) { return { type: UPDATED_ASSIGNED_ROOM_SUCCESS, room, }; } export function updateAssignmentTaskDone(task) { return { type: UPDATED_ASSIGNED_TASK_SUCCESS, task, }; } export function roomsLoadingError(error) { return { type: LOAD_ASSIGNMENT_ERROR, error, }; }
javascript
# Median-Filter-Matlab Pengolahan citra dengan filter median
markdown
<reponame>nusaleague/akashi<gh_stars>0 const {serviceManager} = require('../lib/service'); module.exports = { name: 'getFullTimeResult', async fn(comp, year, stage) { const db = serviceManager.get('database'); const [{id: seasonId}] = await db('season') .where('comp', comp).andWhere('year', year) .select('id'); const data = {}; data.matchMascot = await db('match_mascot') .whereIn('match_id', function () { this.select('id') .from('match') .where('season_id', seasonId).andWhere('stage', stage); }) .select(['match_id', 'mascot_id', 'full_score']); for (const matchMascot of data.matchMascot) { if (matchMascot.full_score === null) { return null; } } data.mascotSeasonRows = await db('mascot_season') .where('season_id', seasonId) .select(['mascot_id', 'division']); data.mascotRows = await db('mascot') .whereIn('id', function () { this.select('mascot_id') .from('mascot_season') .where('season_id', seasonId); }) .select(['id', 'slug', 'short_name']); return data; } };
javascript
import React, {createContext, FC, useContext, useEffect, useMemo, useReducer} from "preact/compat"; import {Action, AppState, initialState, reducer} from "./reducer"; import {getQueryStringValue, setQueryStringValue} from "../../utils/query-string"; import {Dispatch} from "react"; type StateContextType = { state: AppState, dispatch: Dispatch<Action> }; export const StateContext = createContext<StateContextType>({} as StateContextType); export const useAppState = (): AppState => useContext(StateContext).state; export const useAppDispatch = (): Dispatch<Action> => useContext(StateContext).dispatch; export const initialPrepopulatedState = Object.entries(initialState) .reduce((acc, [key, value]) => ({ ...acc, [key]: getQueryStringValue(key) || value }), {}) as AppState; export const StateProvider: FC = ({children}) => { const [state, dispatch] = useReducer(reducer, initialPrepopulatedState); useEffect(() => { setQueryStringValue(state as unknown as Record<string, unknown>); }, [state]); const contextValue = useMemo(() => { return { state, dispatch }; }, [state, dispatch]); return <StateContext.Provider value={contextValue}> {children} </StateContext.Provider>; };
typescript
<reponame>DocsWebApps/incident-manager-microservice<gh_stars>1-10 package com.docswebapps.incidentmanagerservice.web.model; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import javax.validation.constraints.Null; import java.time.OffsetDateTime; @NoArgsConstructor @AllArgsConstructor @Getter class BaseDto { @Null private Long id; @Null private OffsetDateTime createdDate; @Null private OffsetDateTime lastModifiedDate; }
java
Exploring Boundaries, Breaking Barriers:Beyond the written word, I'm an adventurer, craving the thrill of discovering new places and meeting diverse souls. Whether it's the pulse of a city or the tranquility of nature, I'm on a perpetual quest to capture the essence of each destination, bringing readers along for the journey. A literature lover who likes delving deeper into a wide range of societal issues and expresses her opinions about the same. Keeps looking for best-read recommendations while enjoying her coffee and tea. Exploring Boundaries, Breaking Barriers:Beyond the written word, I'm an adventurer, craving the thrill of discovering new places and meeting diverse souls. Whether it's the pulse of a city or the tranquility of nature, I'm on a perpetual quest to capture the essence of each destination, bringing readers along for the journey. Amidst the arid expanse of Kutch, where the earth meets the sky in a seamless horizon, a grand mosaic of hues, designs, culture, music, and dance unfolds every year. Kutch, celebrated for its ecological and ethnic diversity, transforms into a vibrant tapestry of art, crafts, and festivities during the three-day extravaganza known as Kutch or Rann Utsav. This celebration, set against the mesmerizing landscape of the Great Rann of Kutch, immerses visitors in the rich cultural tapestry of Gujarat. Spread over an expansive 7,505 sq km, the Great Rann of Kutch stands as the world's largest salt marsh, gracing the Thar Desert with its ethereal presence. Rann Utsav, often referred to as the White Desert Festival, spans three months, starting from the end of November until February, bringing together local artisans, performers, musicians, and folk artists to showcase the cultural vibrancy of Gujarat. The festival serves as a platform for the indigenous arts and crafts of the region, with the semi-parched Grasslands of the Banni acting as an exhibition space for vernacular architecture. Against the backdrop of the shimmering moonlit landscape, visitors are treated to an enchanting display of folk music and dance performances, capturing the essence of the local culture. Colourful fairs near the beach and the banks of lakes infuse the air with festivity and flamboyancy, providing a unique experience for attendees. The organized tours around Kutch offer a chance to delve into the region's zeal and uniqueness, creating a celebration of life itself. The festival is not just a visual spectacle; it promotes the natural beauty and famous landmarks of the stunning Kutch region. The white sand desert, especially during the full moon nights of winter, becomes a mesmerizing destination attracting tourists from around the world. The Rann Utsav is an opportunity to witness the unparalleled beauty of Bhuj on full moon nights, accentuating the pristine landscapes. Rann Utsav offers more than just cultural experiences. It is a vibrant carnival featuring traditional craft stalls, food stalls, adventure activities like land and aero-sports, thematic villages, and watchtowers at the White Rann. The festival caters to diverse interests, including ATV rides, paintball, camel safaris, paramotoring, and horse and camel rides. For those seeking peace, meditation and yoga sessions are also part of the festivities. In the heart of Kutch, Rann Utsav emerges as an awe-inspiring celebration, weaving together the threads of tradition, culture, and nature. The festival's kaleidoscope of activities, set against the backdrop of the Great Rann of Kutch, ensures that each visitor experiences the magic of Gujarat's White Desert. As the festival continues to enchant its myriad attractions, it stands as a testament to the vibrant spirit and identity of this culturally rich region, making Kutch Rann Utsav a must-visit for those seeking a glimpse into the cultural tapestry of Gujarat.
english
The anime version of Katsushiro Otomo’s classic scifi manga became a worldwide phenomenon when it came out 1988. But the manga artist who created Neo-Tokyo thought the movie was terrible after his first look at it, and was sure it was going to be a flop. In an expansive interview on Forbes, Otomo recounts his career history, talking about how he paid tribute to the creators and works he absorbed growing up in post-war Japan: In general, I try to do homages in my work from the favorite titles I read as a kid. For me, there were three big manga authors I really respected; Osamu Tezuka, Shotaro Ishinomori and Mitsuteru Yokoyama. So my homage for Tezuka was in the manga Fireball, where the main computer is called ‘ATOM.’ For Ishinomori, there was Ecchan in Domu, who was a reference to Sarutobi Ecchan. That left Yokoyama, so I tried to do my homage to him in Akira. Specifically, I had the character Akira be the number 28 in the manga, which was a direct reference to the mecha Tetsujin 28-go. I also used numbers 25, 26 and 27 from that series too. When the time came to adapt his own work for the movie screen, his reaction to an early cut of the Akira anime was less than positive, but that changed over time: Actually, when I saw the first rush of the movie version of Akira I thought it would be a failure. I left the theater very quickly and came back home to tell my wife that the movie was a failure. This was because I thought the first half was good but because the time and budget was limited, with so many cuts, the quality dropped as the story developed. However, when [composer] Shoji Yamashiro did the remake with 5-channel audio, he invited me over and showed me the movie again. So this was a very long time since I had seen the movie back when it was released. Maybe time had made me softer but when I saw it again I thought, “Oh, this is interesting” and that maybe it wasn’t so bad after all. We’re only two years away from the time when the events of Akira take place, and Warner Bros. has been trying to get a live-action version going for a while now. If the stars align, then Otomo will get to see yet another take on his dystopian vision. He may not like it at first, but history’s already shown that that doesn’t mean it won’t be a success. Be sure to check out the full interview at Forbes for more anecdotes from Otomo’s career and insights into the design of Akira and his other work.
english
<reponame>zbtsu/combo-suite<filename>src/components/icons/db.tsx<gh_stars>0 import * as React from 'react' const SvgDb = (props: React.SVGProps<SVGSVGElement>) => ( <svg width={41} height={41} fill='none' xmlns='http://www.w3.org/2000/svg' {...props} > <path fillRule='evenodd' clipRule='evenodd' d='M36.832 39.236L3.873 40.669c-2.022.088-3.59-1.48-3.503-3.502L1.804 4.208C1.892 2.186 3.603.475 5.626.387c2.022-.088 3.59 1.48 3.502 3.503L8.08 28.007 35.332.754l4.954 4.954L13.033 32.96l24.117-1.05c2.023-.088 3.591 1.48 3.503 3.503-.088 2.023-1.799 3.734-3.821 3.822z' fill='#fff' /> </svg> ) export default SvgDb
typescript
Jorhat district unit president Sankalpa Gogoi stated that the work of the four-laning of the NH was being carried out at a snail’s pace. Jorhat: The Jorhat district unit of the All Assam Students' Union (AASU) has sought the Chief Minister's intervention to speed up the construction work of the four-laning of the National Highway passing through the district. The AASU in a memorandum sent to the Chief Minister through the Jorhat Deputy Commissioner on Friday, urged him to intervene to speed up the construction work which is progressing at a snail's pace. Jorhat district unit president Sankalpa Gogoi stated that the work of the four-laning of the NH was being carried out at a snail's pace and was mired in malpractices, irregularities resulting in lot of difficulties for commuters while travelling through the main artery of Upper Assam. Gogoi pointed out that two private companies were awarded contracts to execute the project but the contracts were terminated one after another in the past four years by NHIDCL, reportedly due to anomalies in implementation of the project, and the third company too had not accelerated the construction work. Also watch:
english
Sizwe Nineteen – Small Mujava Mp3 Download Fakaza. Sizwe Nineteen & Bufu Matao an Exceptional singer drops this new Hit single titled Small Mujava. Fakaza Listen to New Mp3 Download hit Single Song 2022 Amapiano Remix Datafilehost Music Tubidy Zippyshare Mixtape Mp3juice Paw Songs uploaded for you. South African Music singer is announces the new song Listen, and Play. The post Sizwe Nineteen – Small Mujava (ft. Bufu Matao) appeared first on Fakaza Vibes.
english
# Copyright (c) OpenMMLab. All rights reserved. import torch import torch.nn as nn from torch import Tensor from mmflow.ops import build_operators class LinkOutput: """The link output between two estimators in FlowNet2.""" def __init__(self) -> None: self.upsample_flow = None self.scaled_flow = None self.norm_scaled_flow = None self.warped_img2 = None self.diff = None self.brightness_err = None class BasicLink(nn.Module): """Connect two separate flow estimators. BasicLink compute the following 5 values: upsampled flow prediction, normalized upsampled flow prediction, warped image, difference between the first image and warped image, brightness error. Args: scale_factor (int): Scale factor of upsampling. Default to 4. mode (str): Algorithm used for upsampling: 'nearest' , 'linear' , 'bilinear' , 'bicubic' , 'trilinear' , 'area'. Default: 'bilinear'. warp_cfg (dict): Config for warp operator. Default to dict(type='Warp', padding_mode='border', align_corners=True)) """ def __init__(self, scale_factor: int = 4, mode: str = 'bilinear', warp_cfg: dict = dict( type='Warp', padding_mode='border', align_corners=True)): super(BasicLink, self).__init__() self.warp = build_operators(warp_cfg) self.upSample = nn.Upsample(scale_factor=scale_factor, mode=mode) def __call__(self, img1: Tensor, img2: Tensor, flow: Tensor, flow_div: float) -> LinkOutput: """Call function for BasicLink. Args: img1 (Tensor): The first input image. img2 (Tensor): The second input images. flow (Tensor): The estimated optical flow from the first image to the second image. flow_div (float): The divisor for scaling the value of optical flow. Returns: LinkOutput: The output for the next flow estimator. """ upsample_flow = self.upSample(flow) scaled_flow = self.upSample(flow) * flow_div norm_scaled_flow = torch.norm(scaled_flow, p=2, dim=1, keepdim=True) warped_img2 = self.warp(img2, scaled_flow) diff = img1 - warped_img2 bright_err = torch.norm(diff, p=2, dim=1, keepdim=True) output = LinkOutput() output.upsample_flow = upsample_flow output.scaled_flow = scaled_flow output.norm_scaled_flow = norm_scaled_flow output.warped_img2 = warped_img2 output.diff = diff output.brightness_err = bright_err return output
python
Simone Biles is arguably the best gymnast in the world. The 25-year-old athlete shocked many when she announced her withdrawal from the gymnastics finals at the Tokyo Olympics. Biles cited mental health problems as the reason for her bowing out of the competition. Biles has been in the news for a while. Before she spoke out about her struggles with mental health, the athlete was tangled in the Larry Nassar scandal. Simone Biles in 2018 came out to speak against former USA Gymnastics team doctor Larry Nassar and alleged that he s*xually abused her. On January 6, 2018, Biles described the abuse in a statement posted on Twitter. In a post filed under the #metoo hashtag, Biles said that she was s*xually harassed: Simone Biles went on to describe the events of abuse. She further pleaded: Biles noted that she found the strength to reveal the stories after she saw her “friends and other survivors” speak out. Larry Nassar, the team physician of the US women’s gymnastics, was accused of s*xual abuse by over 140 women and girls. Biles’ teammates, including gold medalists Aly Raisman, McKayla Maroney, and Gabby Douglas, came forward against Nassar. The former doctor was sentenced to 60 years in federal prison on counts of seven charges including s*xual abuse and child p*rnogr*phy. In September 2021, Simone Biles spoke out in an emotional testimony at a US senate hearing into the Larry Nassar abuse scandal. Biles was in tears as she slammed the FBI and gymnastics officials for turning a blind eye towards Nassar’s abuse. The 2016 Olympic champion said that she blamed the system that allowed the former doctor to get away with his crime, saying: This came after an internal investigation by the Justice Department showed that the FBI made fundamental errors in the probe. It noted that the agency did not show “utmost seriousness” towards the charges filed against Nassar. Simone Biles joined dozens of other survivors who sought over $1 billion from the FBI for failing to stop the sports doctor despite the allegations leveled against him.
english
A South Korean activist says he will launch balloons carrying DVDs of Sony’s The Interview toward North Korea to try to break down a personality cult built around dictator Kim Jong Un. The comedy depicting an assassination attempt on Mr. Kim is at the centre of tension between North Korea and the U. S. , with Washington blaming Pyongyang for crippling hacking attacks on Sony Entertainment. Pyongyang denies that and has vowed to retaliate. Activist Park Sang-hak said on Wednesday he will start dropping 100,000 DVDs and USBs with the movie by balloon in North Korea as early as next month. If carried out, the move is expected to draw a furious response from North Korea. The two Koreas traded gunfire in October over propaganda balloons. Mr. Park says the ballooning will be done clandestinely.
english
<filename>index salvo 2.html sempre que eu digitar, o preview irá me <h1>Um título</h1> Aprender a programar parece interessante <!-- 1- comando comentário: (<!--) 2- <h1> é para títulos 3- CTRL + SHIFT + P : para colocar o preview--> <h1></h1> <!--Acima são TAGSs, a de abertura <h1> dai o conteúdo </h1> (isso é o fechamento) Os três compôe um ELEMENTO !ATENÇÃO! existem elementos vazios img é um elemento que só tem atributos, sem conteúdo <input ... Os elementos VAZIOS não tem fechamento!--> <!--Booleano é de verdadeiro ou falso (os atributos não precisam conteúdo)--> <!--Os atributos: <img scr="conteudo" alt=""> o scr é o atributo, dai =, dai "conteúdo"--> <input type="text" disabled > <!--impossível de mexer, é um atributo booleano--> <!-- usar aspas duplas ""--> <a href=""></a> <!-- isso é para ser levado ao link da página--> ---------------- <!-- atributos globais <div (class=""para aplicar estilo css e para JAVA SCRIPT) --> <div contenteditable="false" data-="qualquer-nome-aqui" ( para css e java script ) > </div> <!--o espaço ali sempre por "-"--> <div class="carrinho" conteudo id="cart1" ></div> <!--sempre colocar nome diferentes--> <div class="cart2" style="color: cyan"> conteudo, que foda <div tabindex="3"> conteudo </div> <div tabindex="1"> conteudo </div> <div tabindex="2"> conteudo </div> </div> <div <!--developer.mozila.org --> ---------------- <!--aninhamento: colocar tag dentro da tag--> <p>vou <em>escrever um parágrafo</em></p> <!--Hierarquia: tem tags que vem antes e depois, tipo <em> filha da <p>, que é filha de <div> tem elementos que quebram a linha e outros ficam na mesma--> <p>aqui um texto</p> aqui é outro texto <p> aqui é um texto e aqui é outro</p> <p> esse é o primeiro <br>esse é outro</p> ------------------ <!--DESAFIO DOIS PARÁGRAFOS--> <P>um dia estava eu passeando, quando descobri uma pinhata parada na beira da <em>PORTA</em> da <strong>MAGALI</strong> </P> <p> Ai <strong>eu</strong> chamei ela para vir me <em> explicar o que <br> raios estava acontcendo <em></p> <strong> <a href="https://www.youtube.com/watch?v=6jvl6IDj0r0"> Saiba o que houve</a> </strong> <br> ------------------------ <!--Anatomia do documento 03/02/2021--> <!doctype html> <heat> <head> <meta charset="utf-8"> <title>Anatomia do documento</title> </head> <body> <p> <h1>DIDLE</h1>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Distinctio architecto tempora consequatur id. Accusantium veniam nulla ducimus quisquam? Dolorum facilis fugiat illum ad nemo neque ex sit animi molestiae sequi?</p> </body> </heat> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> </body> </html> <div class="carrinho" contenteditable="" style="font-style: normal;"> </div> <div style="font-style: normal"> <p> conteúdo </p> </div> ---------------- <!--Quais elementos para dar melhor significado varia do objetivo--> <!-- títulos e parágrafos--> <h1>Sobre mim </h1> <div style="font-style:initial;"> Lorem ipsum dolor sit amet consectetur adipisicing elit. <p>Maiores voluptatem sit optio rerum earum magnam natus, enim facere adipisci, a vel officiis! </p> <h2>Nascimento</h2> Numquam error veritatis ratione non blanditiis optio voluptatem! <h3>Primeiro dia</h3> </div> -------------------------- <!--LISTAS ordenadas e desordenadas--> </div style="font-style: normal;"> <b><h1>Bolo de aveia</h1> <h2>Ingredientes</h2> <ol> <li>3 colheres de sopa de aveia</li> <li>Um ovo</li> <li>Uma banana</li> <li>Um colher de sopa de mel</li> <li></li> <li></li> </ol> OUUUU lista não ordenada <ul> <li>3 colheres de sopa de aveia</li> <li>Um ovo</li> <li>Uma banana</li> <li>Um colher de sopa de mel</li> </ul></b> </div> ------------------------------------------ <div style="font-style: normal;"></div> <!--04/02/2021--> <q>There are seven days in a week and none of them is someday</q> <blockquote > <a href="https://app.rocketseat.com.br/node/o-guia-estelar-de-html/group/trabalhando-com-elementos/lesson/abreviacoes"> <cite>Agora sim, é aqui estou aprendendo</cite></a>: </blockquote> <!--Aprendi o quote da Wikipedia: Tu vai colocar blockquote ou q, 2- <a href="" <cite> </cite> </a>--> <!--Abreviações--> <p> usamos <abbr title="Descentralized Finances">DEFI</abbr> &nbsp to swap tokens</p> <!-- 05/02/2021--> <address> <p> Lorem</p> </address> <!-- o contato de quem fez a página de html--> <!-- lista de descrição, bem boa para fazer glossário --> <h2>Glossário</h2> <dl> <dt>Hypertext <dd> Hypertexto não sendo uma linguagem</dd> </dt> <dt>KYC <dd> Know your custumer</dd> <dt>ADA <dd> Criptomoeda do projeto cardano da terceira geração das criptos</dd> </dt> </dt> </dl> <!--Representação de código <code> parte genérica <prev> Blocos de código, essa tag mantém os espaços em branco e recuos que eu usar no meu código--> <!-- 06/02/2021 Elementos Genéricos div -- bloco <span -- linha --> <div> Um produto </div> dsdadsadsa <span style="text-decoration: underline;"> #choraste para os fortes da bike?</span> <!-- 08/02/2021 Elemento Âncora <a> motivo da WEB - href -para onde iremos qujando clicarmos - url completa - email - telefone - donwload - target - _self (padrão) - _blank - --> <p>Contatos</p> <ul> <li><a href="https://www.rankia.pt/etfs/diferencas-entre-etfs-etcs-e-etns/">SITE</a></li> <li><a href="mailto:<EMAIL>">Email</a></li> <li><a href="tel:+555133421788">Telefone</a></li> </ul> <p>Saiba mais</p> <ul> <li> <a href="about">Sobre mim</a></li> <li> <a href="history">História</a></li> <li> <a href="works">Trabalhos</a></li> </ul> <h1 id="about">Sobre mim</h1> Lorem ipsum dolor sit amet consectetur adipisicing elit. Velit, impedit voluptates? Ab accusamus ad amet totam ducimus iste quo ullam neque nesciunt? Tempore amet culpa iste quam accusantium aliquam commodi? <h2 id="history">História</h2> Lorem ipsum dolor sit amet consectetur, adipisicing elit. Pariatur laborum natus incidunt consequuntur ea, aliquam ipsum, a quae voluptas iste corporis. Ad placeat totam praesentium earum sunt dolores deleniti quasi. <h2 id="works">Trabalhos</h2> Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore, quisquam? Veniam ea dignissimos exercitationem, at neque perspiciatis velit qui natus debitis consequuntur architecto repellendus officiis nostrum quae adipisci maiores. Animi! <!-- Conteúdo dos hyperlinks - qualquer conteúdo --> <a href="https://google.com" title="ir para o Google"> <h2>Google</h2> <p>claro que eu posso</p> </a> <!-- cara, que foda imagem: <img src="https://source.unsplash.com/random" alt="">--> <!--URLs e Caminhos dos arquivos - Uniform e Caminhos dos arquivos - usar isso aqui para fazer página para achar minhas anotações, vai ficar topS! --> <a href="Fluency_Week.html">abrir fluency week</a> <p> <a href="Fluency_Week.html">abrir fluency week</a></p> <a href="defi.html">abrir defi</a></p> <a href="aprendizagem.html">abrir aprendizagem</a></p> ---------------- <!-- 09/02/2021 URLs absolutos versus relativos inclui protocolo e nome domínio - sempre apontará para o mesmo local--> <a href="google.com">relativos: ir para o google</a> <p> <a href="https://google.com">absoluto: ir para o Google</a> </p> <!-- o https o torna absoluto--> <!-- - entrando em diretorios--> <a href="Fluency_Week.html">abrir mesmo diretorio</a> <br><a href="outros/aprendizagem.html">arquivo aprendiagem pasta outros</a> <br> <a href="../a disputa do cubo magico- protxt.docx"> a disputa do cubo magico</a><br> <a href="../Documentos/Projetos/defi.html">abrir DEFI</a>
html
A community event held at Pimple Nilakh on Sunday turned into a nightmare when a swarm of honey bees suddenly attacked several of the attendees, health officials said. The event, attended by more than 250 people, was almost over and the guests were eating when the bees attacked. The incident took place at about 3 pm and 70 to 80 people endured multiple stings during the bee strike. Nearly 25 guests had to visit private hospitals and have recovered since. One Dr Vikrant Latee called ‘108’ control room at around 4. 38 pm, informing about the bee assault at Pimple Nilakh after which the Maharashtra Emergency Medical Service (MEMS) sent two ambulances to the spot. While most of the guests attacked by the bees had left by the time the ambulance arrived, the bees stung the MEMS staff as well. According to Dr Latee, 80 to 90 people were still at the event when the bees attacked. “Most of them were eating lunch and had to run for their lives. I ran inside my car to protect myself but eight to ten bees had already followed me. I suffered multiple stings and later took treatment at a private hospital in Swargate. Many people went to private hospitals after being attacked by the bees,” he said. Dr Priyank Jawale, district manager, MEMS, said that Dr Latee’s call was received at around 4. 30 pm and that the ambulance visited the location in the next 15 minutes. However, no one waited till the ambulance arrived. “Many of them went to private hospitals nearby or left the place due to the bee attack. Some of our healthcare workers who went along with the ambulance were also attacked by the bees. As they were attacked and people had already left the location, the ambulance was forced to return,” Dr Jawale said. Dr Nagnath Yempalay, civil surgeon of Pune district, said, that no one sustained any serious injuries from the attack. “Around four patients came to the Aundh district hospital while three to four patients went to Aundh Kutir Rugnalay. All of them were rendered primary treatment at the out-patients’ department. Several patients went to private hospitals in the vicinity for treatment,” Dr Yempalay said. Incidents of honey bee attacks have been on the rise in Pune district. Earlier in April this year, 10 members of a family had to be hospitalised after being attacked by a swarm of bees at Sinhagad Fort. The Pimple Nilakh incident is this year’s first to have occurred within the city limits. Else, bee attacks are quite common in Junnar, Sinhagad Fort, Rajgad Fort and Bhor among other rural parts of Pune. Ayush Prasad, chief executive officer (CEO) of the Pune Zilla Parishad, said, that they usually put-up cautionary boards at locations prone to bee attacks. While villagers are aware of the beehives, tourists are unaware and have to be cautious. “Most importantly, no specific pattern has been found behind the honey bee attacks. No fire incidents nor instances of bees being disturbed have been reported but the bees have attacked all the same. We also asked the scientific committee about the reason but there is no specific reason or pattern. Only in a few cases, the bees had been disturbed by children,” Prasad said. “This is the reason we share information about such incidents with the media as it creates awareness among the public and they are forced to be cautious,” Prasad said. Rahul Patil, deputy conservator of forests, said, that various activities are carried out by the forest department for awareness regarding and prevention of bee attacks. “The sites where incidents of honey bee attacks are reported are identified and cautionary boards are displayed. We create awareness amongst the locals. Display boards at heritage sites along with dos and don’ts are put up. We conduct awareness programmes through the media,” Patil said. Prevention: Wear light-coloured clothes. Don’t use fragrances, cosmetics, and toiletries that have floral or banana-like scents. Never approach or disturb a hive. Pay attention to bee behaviour. If you find a colony of bees, leave it alone and caution others to do the same. Avoid excessive motion when near a honey bee colony. If you accidentally disturb a hive, run immediately. Don’t swat at the bees; just leave. Never jump into a body of water to escape the bees. If you have suffered multiple stings, seek medical attention immediately.
english
import { Rotation } from './Rotation'; export class RotationMap<T> { private map = new Map<Rotation, T>(); public set(rotation: Rotation, value: T): this { this.map.set(this.round(rotation), value); return this; } public get(rotation: Rotation): T { return this.map.get(this.round(rotation)); } public forEach(callbackFn): this { this.map.forEach(callbackFn); return this; } // Tries to round rotation value to one of possible map values, because // calculations might introduce some error. private round(rotation: number): number { return Math.round(rotation) % 360; } }
typescript
// https://docs.cypress.io/api/introduction/api.html // https://docs.cypress.io/guides/core-concepts/introduction-to-cypress.html#Cypress-Is-Simple // Cypress.on('uncaught:exception', (err, runnable) => { // // returning false here prevents Cypress from // // failing the test // return false // }) // // this would be the last step // cy.getConsoleLog().should(function(log) { // console.log(log) // // log = [['warn', 'warning message'], ['log', 'regular log message'] ['warn', 'another warning message']] // // check that log does not contain any 'warn' or 'error' entry // const disallowedLevels = new Set(['warn', 'error']) // expect(log.some(([level]) => disallowedLevels.has(level)).false) // }) describe('Home', () => { it('Visits the app root url', () => { cy.visit('/') }) it('Check if Page loaded correctly', () => { cy.get('#app') cy.get('span.lang') cy.get('form.login-form') cy.contains('h1', 'Exomia Cloud') cy.get('svg') // Check if Logo is there // Buttons cy.get('input[type="text"]') cy.get('input[type="password"]') cy.get('input[class="confirm"]') cy.get('input[class="subConfirm"]') }) it('Language change test', () => { // Language Tests // English cy.contains('span', 'Imprint') cy.contains('span', 'Privacy') cy.get('input[class="confirm"]').should('have.value', 'Sign in') cy.get('input[class="subConfirm"]').should('have.value', 'Forgot password?') cy.get('span.lang').click() // German cy.contains('span', '©') cy.contains('span', 'Impressum') cy.contains('span', 'Datenschutz') cy.get('input[class="confirm"]').should('have.value', 'Anmelden') cy.get('input[class="subConfirm"]').should('have.value', 'Passwort vergessen ?') }) it('Check Login', () => { // Login cy.get('input[type="text"]').type('admin') cy.get('input[type="password"]').type('<PASSWORD>') cy.get('input[class="confirm"]').click() cy.url().should('include', '/overview') }) })
javascript
SHAH ALAM, April 11- The Selangor Barisan Nasional (BN) special manifesto for the 13th general election is expected to be launched by Prime Minister Datuk Seri Najib Tun Razak next week. Najib is also Selangor BN chairman and election director. Selangor BN election deputy director Datuk Seri Mohd Zin Mohamed said they were in the midst of finding the suitable date for the launch. Generally, the Selangor BN manifesto was aimed at making Selangor a premier state, in line with the federal government’s development, through the Economic Transformation Programme to add value to the knowledge-based economy and human resources,” he told reporters after meeting with Federal Village Security and Development Committee representatives here today. Mohd Zin said the manifesto also emphasised on people’s welfare and wellbeing, as well as on efforts to turn Selangor as Malaysia’s new economic growth booster. He said through the manifesto, Selangor BN also promised to provide affordable homes, incentives and various aids to the people, development along the road linking Klang and Port Klang, as well as an economic growth area covering Port Klang, KL International Airport and Kuala Lumpur. Selangor BN also promised to solve the issues of water supply, flash floods and waste disposal in the state, he said. Mohd Zin said Selangor BN was also prepared to face the general election and the members were in high spirit to ensure victory for the coalition. “I can see that their spirit, level of preparedness and mood, have increased since the dissolution of Parliament on April 3,” he added.
english
<gh_stars>1-10 /** * Names for overrideable suite nav strings. * * @alpha */ interface ISuiteNavOverrideStrings { l_Shell15_Affordance_Text?: string; l_Shell15_Affordance_Title_Text?: string; l_Shell15_Help_Text?: string; l_Shell15_Help_Title_Text?: string; l_Shell15_MeTile_Title_Text?: string; l_Shell15_O365_Text?: string; l_Shell15_Settings_Text?: string; l_Shell15_Settings_Title_Text?: string; l_Shell15_UserSettings_Text?: string; l_ShellCore_Affordance_Text?: string; l_ShellCore_Affordance_Title_Text?: string; l_ShellCore_Help_Text?: string; l_ShellCore_Help_Title_Text?: string; l_ShellCore_MeTile_Title_Text?: string; l_ShellCore_O365_Text?: string; l_ShellCore_O365_Title_Text?: string; l_ShellCore_Settings_Text?: string; l_ShellCore_Settings_Title_Text?: string; l_ShellCore_UserSettings_Text?: string; } export default ISuiteNavOverrideStrings;
typescript
import { _ } from "../Utils/Underscore"; export class ObjectComparer { issues: string[] = []; constructor(expected: any, value: any) { this.compare([], expected, value); } addIssue(path: string[], text: string) { this.issues.push(`/${path.join('/')}: ${text}`); } compare(path: string[], expected: any, value: any) { if (typeof value !== typeof expected) { this.addIssue(path, `expected type '${typeof expected}', got '${typeof value}'`); } else if (typeof expected === "object" && Array.isArray(expected)) { const expectedArr = <any[]> expected; const valueArr = <any[]> value; if (expectedArr.length !== valueArr.length) this.addIssue(path, `expected array with '${expectedArr.length}' items, got '${valueArr.length}'`); else { for (let i = 0; i < expectedArr.length; i++) this.compare([...path, `${i}`], expectedArr[i], valueArr[i]); } } else if (typeof expected === "object" && expected !== null && value !== null) { const expectedKeys = Object.keys(expected); const valueKeys = Object.keys(value); const unexpectedKeys = _.except(valueKeys, expectedKeys); if (unexpectedKeys.length > 0) this.addIssue(path, `the following keys are not expected: ${unexpectedKeys.join(', ')}`); const missingKeys = _.except(expectedKeys, valueKeys); if (missingKeys.length > 0) this.addIssue(path, `the following keys missing: ${missingKeys.join(', ')}`); for (const key of _.intersect(expectedKeys, valueKeys)) this.compare([...path, key], expected[key], value[key]); } else if (value !== expected) { this.addIssue(path, `expected value '${expected}', got '${value}'`); } else if (value === expected) { } else { this.addIssue(path, `unknown issue (should not happen)`); } } generateSummary() { return this.issues.length === 0 ? 'equals' : "issues:\n" + this.issues.map(x => ` - ${x}`).join("\n"); } static getFullSummary(expected: any, valueGetter: () => any) { try { const value = valueGetter(); const summary = new ObjectComparer(expected, value).generateSummary(); if (summary === "equals") return `OK`; else return `${summary}\n Expected: ${JSON.stringify(expected)}\n Got: ${JSON.stringify(value)}`; } catch(e) { return `Exception: ${e}`; } } }
typescript
<filename>index.js 'use strict'; // https://www.lullabot.com/articles/importing-css-breakpoints-into-javascripta var moduleSettings = { forceJsSizes: false, sizes: [ { type: 'mobile', maxWidth: 767 }, { type: 'tablet', maxWidth: 1024 }, { type: 'small_desktop', maxWidth: 1200 } ] }; var sizeme = (function() { function load(settings) { for (var key in settings) { moduleSettings[key] = settings[key]; } } function getCssDeviceType() { return window.getComputedStyle(document.querySelector('body'), ':before').getPropertyValue('content').replace(/"/g, ''); } function getDocumentWidth() { return typeof document !== 'undefined' && document.body ? document.body.clientWidth : null; } function getTypePerWidth() { var documentWidth = getDocumentWidth(); var previousWidth = 0; var length = moduleSettings.sizes.length; var size, maxWidth; for (var i = 0; i < length; i++) { size = moduleSettings.sizes[i]; maxWidth = size.maxWidth; if (documentWidth > previousWidth && documentWidth <= maxWidth) { return size.type; } previousWidth = maxWidth; } return 'desktop'; } function getDeviceType() { if (!moduleSettings.forceJsSizes) { var type = getCssDeviceType(); if (type !== 'none' && type !== '') { return type; } } return getTypePerWidth(); } function isMobile() { return getDeviceType() === 'mobile'; } function isTablet() { return getDeviceType() === 'tablet'; } function isSmallDesktop() { return getDeviceType() === 'small_desktop'; } function isDesktop() { return getDeviceType() === 'desktop'; } function isResponsive() { return isMobile() || isTablet(); } return { load: load, getDeviceType: getDeviceType, isMobile: isMobile, isTablet: isTablet, isSmallDesktop: isSmallDesktop, isDesktop: isDesktop, isResponsive: isResponsive }; })(); if (typeof module !== 'undefined') { module.exports = sizeme; }
javascript