## set theory – Upper bound for constructibility orders of elements of the continuum

In a constructible universe (ZFC + V=L), is there any known upper bound for the constructibility orders of all elements of the continuum, i.e. some separately described ordinal $$alpha$$ such that we can prove $$mathcal{P}(omega)subset L_alpha$$ ? For example (under some large cardinal axiom), can it be proven that the first inaccessible cardinal is such an upper bound, or can this cardinal still fail at this ? I intuitively suspect undecidabilities in this matter but am no expert in the field. Thanks.

## Looking for Nicolas Bourbaki’s Elements of Mathematics

I was looking for a PDF of the complete series, but unfortunately I am unable to find any. Could someone please help me find a website that may have it for free for general public, and if not, a site where I could purchase it? Also I read some question about whether the works are outdated, and I am confused whether I should actually read it? Any advises?

## python 3.x – How to access elements from matcher.pipe() returned generators in spaCy?

I am using Spacy for NLP in Python. I am trying to use matcher.pipe() to match docs with lexicon terms. The issue is it returns a generator and when I access it with next() or with in a for loop, It says:

phrasematcher.pyx in pipe()

phrasematcher.pyx in spacy.matcher.phrasematcher.PhraseMatcher.call()

TypeError: Cannot convert spacy.tokens.token.Token to spacy.tokens.doc.Doc

My code is:

``````#convert to doc
def make_doc(tokens):
return (nlp.make_doc(text) for text in tokens)
dt('tokenized_descriptions_cleaned_asDoc') = dt('tokenized_descriptions_cleaned').apply(
lambda x:
list(make_doc(x))
)

display (dt)

#Starting with Matcher
from spacy.matcher import PhraseMatcher

#initialize the matcher with vocab
matcher = PhraseMatcher(nlp.vocab)

#define pattern for matching; THis should ultimately be pulled from the same database
#my_lexicon = ({"LOWER": {"IN":("Saas", "Cloud")}})
my_lexicon_terms = ("saas", "cloud", "network")
my_lexicon_patterns = (nlp.make_doc(text) for text in my_lexicon_terms)

#define the token matcher

#run the matcher
def piped_matcher(docs):
return(matcher.pipe(doc, batch_size=50) for doc in docs)
dt('Matches') = dt('tokenized_descriptions_cleaned_asDoc').apply(
lambda x:
piped_matcher(x)
)
``````

I want to take that list of “matches” and use the other python code to do a sql join. How do I access the text in Matches column of dataframe as text.

## dungeons and dragons – Is there any specific order to the four Elements when people talk about them?

In Dungeons and Dragons, the four elements are Air, Earth, Fire, and Water (like the planes and the elementals). In the lore, is there any specific order to these elements, for example the order people might use in casual conversation when discussing them? Or is the order just usually alphabetical and has no lore? For example, in Avatar: the Last Airbender, people might talk about the elements in the order of the Avatar cycle (water, earth, fire, air), although people might do that differently (or not at all) in D&D worlds.

## custom post types – Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)

I am developing custom theme from scratch and creates a custom post type and getting this warning while editing custom post type. I also design custom Meta box with two input fields and using nonce in it. Any help removing these warning?

Here is code of custom metabox in functions.php

``````//Custom Metabox

function register_book_meta_box(){
}

function design_book_meta_box(\$post){
wp_nonce_field(basename(__FILE__),'book_cpt_nonce')
?>
<div>
<label for="book-author">Author Name&nbsp;&nbsp;</label>
<input type="text" name="book-author" placeholder="Author Name" value="<?php echo get_post_meta( \$post->ID, 'book-author-key', true );?>">
</div>
<div>
<label for="year">Published Year</label>
<input type="number" id="year" name="year" min="1455" max="2020" value="<?php echo get_post_meta( \$post->ID, 'book-year-key', true );?>">
<span id="errorMsg" style="display:none;">Published Year Must be range from 1455 - 2020</span>
</div>

<?php
}
function save_book_meta_data(\$post_id)
{
if(!isset(\$_POST('book_cpt_nonce')) || !wp_verify_nonce(\$_POST('book_cpt_nonce'),basename(__FILE__))){
return \$post_id;
}
if (array_key_exists('book-author', \$_POST)) {
update_post_meta( \$post_id,'book-author-key', \$_POST('book-author')
);
}
if (array_key_exists('year', \$_POST)) {
update_post_meta( \$post_id,'book-year-key', \$_POST('year')
);
}
}
``````

## java – How to separate elements from a black/white image using OpenCV and some algorithms

Hi I am doing a proyect where I have to clasifie the parts of an electric circuit( resist,inductances…)
The problem is that I don´t know how to do to separate the elements from the circuits and later clasifie it with SVM or something similar.The circuits can be drawn by hand or not.

In this example I managed to eliminate all the parts that are not from the circuit( tittles, noise…)
I transformed it to a B/W image and theres where I am stuck.

I know I could use the connectedComponents function but I want to do something more profesional because in this picture you can see only rectangles and circles but there are other images where these forms change, so I need something like and algorithm or a way to work to take them from the black/white circuit and later clasifie it as I said.

Thanks for the help.

## 8 – can’t see `div` elements added to \$form in hook_form_FORM_ID_alter?

I want to modify the `\$form` variable in an implementation of `hook_form_FORM_ID_alter` but can’t seem to be able to set the `#prefix` and `#suffix` variables on field widget.

``````/**
* @file
* Implementations Module Hooks
*/

use DrupalCoreFormFormStateInterface;

/**
* Implements hook_form_FORM_ID_alter().
*
* Alter the node/create form for implementation types
*/
function implementations_form_node_implementation_form_alter(&\$form, DrupalCoreFormFormStateInterface \$form_state, \$form_id) {
\$prefix = '<div style="display:none;">';
\$suffix = '</div>';

\$form('field_parent_idea')('widget')('#prefix') = \$prefix;
\$form('field_parent_idea')('widget')('#suffix') = \$suffix;

dpm(\$form('field_parent_idea')('widget'));
dpm(\$form('field_parent_idea')('widget')('#prefix'));
dpm(\$form('field_parent_idea')('widget')('#suffix'));
}
``````

When I navigate to `node/add/implementation` I would expect to see the value of `\$form('field_parent_idea')('widget')` with the `#prefix` and `#suffix` variables set, but instead they’re blank. Here’s the relevant snippet showing the suffix/prefix values:

``````(#max_delta) => 0
(#prefix) =>
(#suffix) =>
``````

Why are they blank?

This is the full output of what I see.

``````
Array
(
(0) => Array
(
(target_id) => Array
(
(#title) => stdClass Object
(
(__CLASS__) => DrupalCoreStringTranslationTranslatableMarkup
(translatedMarkup:protected) =>
(options:protected) => Array
(
)

(stringTranslation:protected) => stdClass Object
(
(__CLASS__) => DrupalCoreStringTranslationTranslationManager
(translators:protected) => Array
(
(30) => Array(1)
)

(sortedTranslators:protected) => Array
(
(0) => DrupalCoreStringTranslationTranslatorCustomStrings
)

(defaultLangcode:protected) => en
(_serviceId) => string_translation
)

(string:protected) => @title (value @number)
(arguments:protected) => Array
(
(@title) => Parent Idea
(@number) => 1
)

)

(#title_display) => invisible
(#description) =>
(#field_parents) => Array
(
)

(#required) => 1
(#delta) => 0
(#weight) => 0
(#type) => entity_autocomplete
(#target_type) => node
(#selection_handler) => default:node
(#selection_settings) => Array
(
(target_bundles) => Array
(
(idea) => idea
)

(sort) => Array
(
(field) => _none
)

(auto_create) =>
(auto_create_bundle) =>
(match_operator) => CONTAINS
(match_limit) => 10
)

(#validate_reference) =>
(#maxlength) => 1024
(#default_value) =>
(#size) => 60
(#placeholder) =>
)

(_weight) => Array
(
(#type) => weight
(#title) => stdClass Object
(
(__CLASS__) => DrupalCoreStringTranslationTranslatableMarkup
(translatedMarkup:protected) =>
(options:protected) => Array
(
)

(stringTranslation:protected) => stdClass Object
(
(__CLASS__) => DrupalCoreStringTranslationTranslationManager
(translators:protected) => Array
(
(30) => Array(1)
)

(sortedTranslators:protected) => Array
(
(0) => DrupalCoreStringTranslationTranslatorCustomStrings
)

(defaultLangcode:protected) => en
(_serviceId) => string_translation
)

(string:protected) => Weight for row @number
(arguments:protected) => Array
(
(@number) => 1
)

)

(#title_display) => invisible
(#delta) => 0
(#default_value) => 0
(#weight) => 100
)

)

(#theme) => field_multiple_value_form
(#field_name) => field_parent_idea
(#cardinality) => -1
(#cardinality_multiple) => 1
(#required) => 1
(#title) => Parent Idea
(#description) =>
(#max_delta) => 0
(#prefix) =>

(#suffix) =>

(
(#type) => submit
(#value) => stdClass Object
(
(__CLASS__) => DrupalCoreStringTranslationTranslatableMarkup
(translatedMarkup:protected) =>
(options:protected) => Array
(
)

(stringTranslation:protected) =>
(arguments:protected) => Array
(
)

)

(#attributes) => Array
(
(class) => Array
(
)

)

(#limit_validation_errors) => Array
(
(0) => Array
(
(0) => field_parent_idea
)

)

(#submit) => Array
(
(0) => Array
(
(0) => DrupalCoreFieldPluginFieldFieldWidgetEntityReferenceAutocompleteWidget
)

)

(#ajax) => Array
(
(callback) => Array
(
(0) => DrupalCoreFieldPluginFieldFieldWidgetEntityReferenceAutocompleteWidget
)

)

)

(#after_build) => Array
(
(0) => Array
(
(0) => DrupalCoreFieldPluginFieldFieldWidgetEntityReferenceAutocompleteWidget
(1) => afterBuild
)

)

(#field_parents) => Array
(
)

(#parents) => Array
(
(0) => field_parent_idea
)

(#tree) => 1
)
``````

At first I thought that the issue was because I was setting on a nested array variable, but that’s exactly what the example code in the documentation does.

``````
function hook_form_alter(&\$form, DrupalCoreFormFormStateInterface \$form_state, \$form_id) {
if (isset(\$form('type')) && \$form('type')('#value') . '_node_settings' == \$form_id) {
'#title' => t('Attachments'),
'#default_value' => in_array(\$form('type')('#value'), \$upload_enabled_types) ? 1 : 0,
'#options' => array(
t('Disabled'),
t('Enabled'),
),
);

// Add a custom submit handler to save the array of types back to the config file.
}
}
``````

## python – Perform numpy product over non-zero elements of a row

I have a 2d array `r`. What I want to do is to take the product of each row (excluding the zero elements in that row). For example if I have:

``````r = ((1 2 0 3 4),
(0 2 5 0 1),
(1 2 3 4 0))
``````

Then what I want is to have another 2d array `result` such that:

``````result = ((24),
(10),
(24))
``````

How can I achieve this using numpy.prod?

## magento2 – MagentoFrameworkExceptionLocalizedException: The XML in file Element ‘event’: Missing child element(s). Expected is ( observer )

i am getting below error in magento 2.4 and it is working fine in magento 2.3 and how can i resolve this one?

MagentoFrameworkExceptionLocalizedException: The XML in file “/var/www/html/magento240/app/code/PPPL/PhonePe/etc/frontend/events.xml” is invalid: Element ‘event’: Missing child element(s). Expected is ( observer ). Line: 4 Verify the XML and try again. in /var/www/html/magento240/vendor/magento/framework/Config/Reader/Filesystem.php:156 Stack trace: #0 /var/www/html/magento240/vendor/magento/framework/Config/Reader/Filesystem.php(132): MagentoFrameworkConfigReaderFilesystem->_readFiles() #1 /var/www/html/magento240/generated/code/Magento/Framework/Event/Config/Reader/Proxy.php(95): MagentoFrameworkConfigReaderFilesystem->read() #2 /var/www/html/magento240/vendor/magento/framework/Config/Data/Scoped.php(119): MagentoFrameworkEventConfigReaderProxy->read() #3 /var/www/html/magento240/vendor/magento/framework/Config/Data/Scoped.php(97): MagentoFrameworkConfigDataScoped->_loadScopedData() #4 /var/www/html/magento240/vendor/magento/framework/Event/Config.php(37): MagentoFrameworkConfigDataScoped->get() #5 /var/www/html/magento240/vendor/magento/framework/Event/Manager.php(58): MagentoFrameworkEventConfig->getObservers() #6 /var/www/html/magento240/generated/code/Magento/Framework/Event/Manager/Proxy.php(95): MagentoFrameworkEventManager->dispatch() #7 /var/www/html/magento240/vendor/magento/module-customer/Model/Session.php(194): MagentoFrameworkEventManagerProxy->dispatch() #8 /var/www/html/magento240/generated/code/Magento/Customer/Model/Session/Interceptor.php(14): MagentoCustomerModelSession->__construct() #9 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(121): MagentoCustomerModelSessionInterceptor->__construct() #10 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(66): MagentoFrameworkObjectManagerFactoryAbstractFactory->createObject() #11 /var/www/html/magento240/vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create() #12 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): MagentoFrameworkObjectManagerObjectManager->get() #13 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument() #14 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument() #15 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime() #16 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments() #17 /var/www/html/magento240/vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create() #18 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): MagentoFrameworkObjectManagerObjectManager->get() #19 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument() #20 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument() #21 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime() #22 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments() #23 /var/www/html/magento240/vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create() #24 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(167): MagentoFrameworkObjectManagerObjectManager->get() #25 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(273): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgument() #26 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php(236): MagentoFrameworkObjectManagerFactoryAbstractFactory->getResolvedArgument() #27 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(34): MagentoFrameworkObjectManagerFactoryAbstractFactory->resolveArgumentsInRuntime() #28 /var/www/html/magento240/vendor/magento/framework/ObjectManager/Factory/Dynamic/Developer.php(59): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->_resolveArguments() #29 /var/www/html/magento240/vendor/magento/framework/ObjectManager/ObjectManager.php(70): MagentoFrameworkObjectManagerFactoryDynamicDeveloper->create() #30 /var/www/html/magento240/vendor/magento/framework/Interception/PluginList/PluginList.php(250): MagentoFrameworkObjectManagerObjectManager->get() #31 /var/www/html/magento240/vendor/magento/framework/Interception/Interceptor.php(119): MagentoFrameworkInterceptionPluginListPluginList->getPlugin() #32 /var/www/html/magento240/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppHttpContextInterceptor->MagentoFrameworkInterception{closure}() #33 /var/www/html/magento240/generated/code/Magento/Framework/App/Http/Context/Interceptor.php(78): MagentoFrameworkAppHttpContextInterceptor->___callPlugins() #34 /var/www/html/magento240/vendor/magento/framework/App/Response/Http.php(108): MagentoFrameworkAppHttpContextInterceptor->getVaryString() #35 /var/www/html/magento240/generated/code/Magento/Framework/App/Response/Http/Interceptor.php(37): MagentoFrameworkAppResponseHttp->sendVary() #36 /var/www/html/magento240/vendor/magento/module-page-cache/Model/App/Response/HttpPlugin.php(29): MagentoFrameworkAppResponseHttpInterceptor->sendVary() #37 /var/www/html/magento240/vendor/magento/framework/Interception/Interceptor.php(121): MagentoPageCacheModelAppResponseHttpPlugin->beforeSendResponse() #38 /var/www/html/magento240/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppResponseHttpInterceptor->MagentoFrameworkInterception{closure}() #39 /var/www/html/magento240/generated/code/Magento/Framework/App/Response/Http/Interceptor.php(117): MagentoFrameworkAppResponseHttpInterceptor->___callPlugins() #40 /var/www/html/magento240/vendor/magento/framework/App/ExceptionHandler.php(103): MagentoFrameworkAppResponseHttpInterceptor->sendResponse() #41 /var/www/html/magento240/vendor/magento/framework/App/ExceptionHandler.php(70): MagentoFrameworkAppExceptionHandler->handleDeveloperMode() #42 /var/www/html/magento240/vendor/magento/framework/App/Http.php(156): MagentoFrameworkAppExceptionHandler->handle() #43 /var/www/html/magento240/vendor/magento/framework/Interception/Interceptor.php(58): MagentoFrameworkAppHttp->catchException() #44 /var/www/html/magento240/vendor/magento/framework/Interception/Interceptor.php(138): MagentoFrameworkAppHttpInterceptor->___callParent() #45 /var/www/html/magento240/vendor/magento/framework/Interception/Interceptor.php(153): MagentoFrameworkAppHttpInterceptor->MagentoFrameworkInterception{closure}() #46 /var/www/html/magento240/generated/code/Magento/Framework/App/Http/Interceptor.php(39): MagentoFrameworkAppHttpInterceptor->___callPlugins() #47 /var/www/html/magento240/vendor/magento/framework/App/Bootstrap.php(269): MagentoFrameworkAppHttpInterceptor->catchException() #48 /var/www/html/magento240/index.php(54): MagentoFrameworkAppBootstrap->run() #49 {main}