Question with Integrate and Region

Let’s say I’ve got a 2D region r=Region[Polygon[{{0,0},{1,0},{1,1}}]]. I can do integrals like Integrate[1,{x,y}\[Element]r], or Integrate[y,{x,y}\[Element]r], to calculate areas and area moments.

I’d like to do an integral like Integrate[c^2,{x}\[Element]r], where c is the height (ymax-ymin) of the region at a particular value of x.

Any ideas appreciated.


Numerical solution of Triple Integration of a Region with Variable Bounds?

I am asked to calculate the mass of the region bounded above by the plane (2x + 3y - z = 2) and below by the triangle on the xy-plane with vertices (0,2),(1,0),(4,0). The density is proportional to the distance from the plane to the xy-plane, so the function is d(x,y,z) = kz.

My limits are:

0 ≤ z ≤ (2x + 3y - 2)

(1 - 0.5y) ≤ x ≤ (4 - 2y)

and 0 ≤ y ≤ 2.

My code is:


but Mathematica doesn’t return a number (if I’m correct, it should be 19k).

Instead I get: k(3-1.5y)(-2+2x+3y)^2.

However if I integrate the function step-by-step:


I do get a numerical value.

Is there a certain syntax that Mathematica requires that I’m not aware of?

Country Select with region filters

I’m tinkering with a design for user to select a single country, or multiple countries that are historically/culturally grouped (eg United Kingdom).

Just looking for feedback, and wondering if anyone has seen something along these lines.

Dropdown 1: Region (whole world, Europe, Nth America, Sth America, SE Asia etc)

Drowdown 2: Country (all, then list of appropriate countries based on dropdown 1)

The user first selects a region (eg Europe) then an Country (eg Germany).

If Country=All, then the search results will return all countries in the selected region (or all countries if region=whole world).

Changing region changes the options in the Country list.

One issue I have is how to deal with regions like United Kingdom. Ignoring Brexit, the UK countries are also in the Europe region. One country being in multiple regions is not a problem. The problem is there are quite a few regions like this (UK, British Isles, Balkans, Caribbean etc). I can absolutely see users wanting to have results returned for “all countries in the UK”.

Should I just have lots of regions? All world, continents (EU, Africa etc), then these special subsets (UK etc)? Or would you go All world, then Continents+SpecialRegions [sorted a-z]?

Agregar Provincias Argentinas a Region a mapa JVectorMap

estoy utilizando la librería he creado un mapa con la región sudamericana, para que me muestre Argentina e Falkland Is. (he eliminado del archivo .js los demás países). Lo que necesito es tener los paths de las provincias de Argentina, no solo el país. y que las Islas sean una provincia de Argentina

Espero se comprenda no creo necesario incluir archivos de ejemplo ya que iniciar el mapa esta explicado en la web del plugin

Pueden ver el ejemplo aqui

muchas gracias

Esconder region en APEX usando Javascript?

Algun experto en Javascript o APEX que me pueda asesorar, tengo un Static Content que se necesita esconder basado en una condicion cuando se haga una busqueda en un Textbox.

Se trata de que:

  • Se introduce una numeracion en el text box y se de enter. Si ese numero corre en Sistema_1, en mi layout puedes ver un Static Content para agregar informacion a actualizar para ese número, y tambien habilita un boton de actualizar.

  • De lo contrario ese numero no puede ser actualizado, por ende mi boton de Actualizar y la región de actualizar contenido (campos en verde) los mantengo escondidos.

introducir la descripción de la imagen aquí

Cuando se inicia ese modulo, solo aparece el textbox de la parte izquierda superior, se hace la busqueda y se llenan los campos, basicamente lo que esta marcado en verde debe esconderse basado en mi busqueda. Si es tal muestrame los campos, si no escondelos. Alguna sugerencia de como empezarlo o por donde?

No region found within the locale ‘en’ while running UpgradeData.php

I’m trying to set up 2 stores I created using InstallData script, but When I run php bin/magento setup:upgrade, I’m getting an error No region found within the locale 'en' and the process stops. What could be the problem? Here is my code:


<?xml version="1.0"?>     <config xmlns:xsi="" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">     <module name="Scandiweb_Migration" setup_version="1.1.3" /> </config>  <?php 


namespace Scandiweb\Migration\Setup;  use Magento\Framework\Setup\ModuleContextInterface; use Magento\Framework\Setup\ModuleDataSetupInterface; use Magento\Framework\Setup\UpgradeDataInterface; use Magento\Store\Model\ScopeInterface;  class UpgradeData implements UpgradeDataInterface { const GERMAN_THEME_NAME = 'scandi/german';  const DEFAULT_THEME_NAME = 'scandi/default';  protected $  state;  protected $  config;  protected $  themeCollectionFactory;  protected $  _storeManager;  protected $  configWriter;  protected $  _currency;  public function __construct(     \Magento\Framework\App\Config\Storage\WriterInterface $  configWriter,     \Magento\Framework\App\State $  state,     \Magento\Store\Model\StoreManagerInterface $  storeManager,     \Magento\Theme\Model\Config $  config,     \Magento\Framework\Currency $  currency,     \Magento\Theme\Model\ResourceModel\Theme\CollectionFactory $  themeCollectionFactory ) {     $  this->state = $  state;     $  this->_storeManager = $  storeManager;     $  this->_currency = $  currency;     $  this->configWriter = $  configWriter;     $  this->themeCollectionFactory = $  themeCollectionFactory;     $  this->config = $  config; }  public function upgrade(ModuleDataSetupInterface $  setup, ModuleContextInterface $  context) {     $  setup->startSetup();      if (version_compare($  context->getVersion(), '1.1.3', '=')) {         $  this->state->setAreaCode(\Magento\Framework\App\Area::AREA_ADMINHTML);         $  this->setDefaultCurrencies();         $  this->setStoreViewCurrencies();         $  this->assignThemeToStore();         $  this->removeSuffix();         $  this->removeSuffix();     }     $  setup->endSetup(); }  public function setDefaultCurrencies() {     $  this->configWriter->save('currency/options/base', 'EUR', 'default', 0);     $  this->configWriter->save('currency/options/default', 'EUR', 'default', 0);     $  this->configWriter->save('currency/options/allow', 'EUR,GBP', 'default', 0); }  public function setStoreViewCurrencies() {     $  stores = $  this->_storeManager->getStores(true, false);     foreach ($  stores as $  store) {         $  storeId = $  store->getId();          if ($  store->getCode() == 'scandi_en') {             $  this->allowCurrency('GBP', $  storeId);         }          if ($  store->getCode() == 'scandi_de') {             $  this->allowCurrency('EUR', $  storeId);         }     } }  public function allowCurrency($  currency, $  storeId) {     $  scope = ScopeInterface::SCOPE_STORE;     $  this->configWriter->save('currency/options/allow', $  currency, $  scope, $  storeId);     $  this->configWriter->save('currency/options/default', $  currency, $  scope, $  storeId); }  public function assignThemeToStore() {     $  themes = $  this->themeCollectionFactory->create()->loadRegisteredThemes();     foreach ($  themes as $  theme) {         if ($  theme->getCode() == self::GERMAN_THEME_NAME) {             $  this->config->assignToStore(                 $  theme,                 ['3'],                 ScopeInterface::SCOPE_STORES             );         }         if ($  theme->getCode() == self::DEFAULT_THEME_NAME) {             $  this->config->assignToStore(                 $  theme,                 ['2'],                 ScopeInterface::SCOPE_STORES             );         }     } }  public function removeSuffix() {     $  paths = ['catalog/seo/product_url_suffix', 'catalog/seo/category_url_suffix'];     foreach ($  paths as $  path) {         $  this->configWriter->save($  path, null, 'default', '0');     } } } 

And here is an error:

enter image description here

ACPI Error: Needed [Integer/String/Buffer], Found [Region] and other exceptions when Adding more RAM

I am getting the below errors when I add two more RAM sticks(same kind, freq, DDR4 etc… S/N is the same) to my motherboard.These errors are on boot-up

  • already present RAM – Corsair Vengeance LPX 16GB (2x8GB) DDR4 DRAM 3000MHz C15 Desktop Memory Kit – Black (CMK16GX4M2B3000C15)
  • ASUS Prime X470-Pro AMD Ryzen 2 AM4 DDR4 DP HDMI M.2 USB 3.1 ATX Motherboard
  • Ubuntu 18.04 LTS

The errors that I get are below, I am able to get past only by removing both the new 8gB rams and then taking the original installed RAM out and putting them back in[only the original one’s and not then new ones](not sure if that solved it)

enter image description here