8 – How to re-order node fields in views generated from ID?

I have a content type with fields: title, hours_worked, work_done.

I’ve created a view that gets the node ID from URL and outputs the fields of the target node: hours_worked and work_done. How do I introduce the ability to re-order which of the fields comes first in a drag and drop manner?

It’s similar to the functionality you get in Draggableviews/sortableiews/weight modules which are for re-ordering list of nodes but this requirement is for fields of specific node.

8 – Re-order node fields in views generated from ID

Say my content type has fields: title, hours_worked, work_done. I want to be able to click a button that presents a views of the target node’s some of the fileds: hours_worked and work_done fields with the ability to re-order which comes first in a drag and drop manner. Drupal 7 has this in the field_weight module but it has no D8 version.

It’s similar to the functionality you get in Draggableviews/sortableiews/weight modules which are for re-ordering list of nodes but this requirement is for fields of specific node.

special functions – Are symbols automatically generated when defining a variable in the global context and what are symbols?

Abstract: I have noticed something really tricky with Mathematica and the documentation for symbols is short on clearing the confusion. It likely reveals what symbols are but it’s not very prominent. I know unique symbols are created inside Modules but are they also generated every time we define regular functions and variables?

About The Code: I did a simple test with abc = 123. The output for ?abc gives a grayed out Symbol and SymbolName produces an error message. Does this mean it is not a symbol?

abc = 123
?abc
SymbolName[abc]

Four Questions:

  1. Are system functions symbols?
  2. Are user defined functions symbols?
  3. Are user defined variables symbols?
  4. What are symbols and are they automatically generated?

Is R connected in topology generated by $B_1$ = {[a, b] : a, b ∈ Q}, and $B_2$ = {[a, b] : a, b ∈ R}

Consider the following collections of subsets of R:

$B_1$ = {[a, b] : a, b ∈ Q},

$B_2$ = {[a, b] : a, b ∈ R}.

Already show that they are two basis and let their topology be $T_1,T_2$.
And T⊂$T_1$$T_2$ where T is usual topology.

Asked to determine if $R$ is connected in $T_1$ and $T_2$.
Have no idea where to start, I think it is clearly connected in these topology but how to actually prove it?

gr.group theory – What is the normal subgroup generated by nonsingular, positive definite matrices?

Within $GL(n,mathbb C)$ let $H$ denote the normal subgroup generated by products of positive-definite, Hermitian matrices. What is this subgroup? And what is the quotient $GL(n,mathbb C)/H$? Do these groups have names? Some of the more obvious facts:

  • When $n=1$, $H$ is isomorphic to the multiplicative group $mathbb R^+$ and $GL(1,mathbb C)/H$ is isomorphic to the circle group $mathbb S^1$.
  • Polar decomposition guarantees that every matrix is equivalent mod $H$ to a unitary matrix.
  • Any element of $H$ has positive, real determinant.

bitcoin core – Is the index db downloaded from peers or generated locally?

The only data exchanged over the Bitcoin peer-to-peer network are the raw blocks and transactions. Everything else has to be generated locally from that data.

Litecoin and other forks work the same, as far as I know.

Of course, there could be some client implementations that get other data from other sources (not via the main peer-to-peer network), such as a dedicated server provided by the vendor. Bread Wallet has an example of this. But the Bitcoin Core reference client does not do that.

bitcoin core – Is the intex db downloaded from peers or generated locally?

When the user start the Bitcoin client for the first time, it will download the whole blockchain.
But what about the block index (blkindex.dat in older versions) ?
Is it donwloaded from peers just like the blockchain or generated locally from the downloaded blockchain?
Then, does it depend upon the implementation (or version) or will the answer be the same for Bitcoin, Litecoin, or other random fork?
The version I talk about is an old fork that is still using blkindex.dat.

Web Scraping Dynamically Generated Content Python

This is a small web scraping project I made in 2 hours that targets the website remote.co . I am looking forward for improvements in my code. I know about the inconsistency with the WebDriverWait and time.sleep() waits, but when I used the WebDriverWait to wait until the load_more button was clickable and ran the program selenium crashed my webdriver window and continuously spammed my terminal window with 20-30 lines of seemingly useless text.

import scrapy   
from selenium import webdriver
from selenium.common.exceptions import ElementNotInteractableException
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import ElementClickInterceptedException
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from time import sleep


class ScrapeRemote(scrapy.Spider):
    name = 'jobs'
    start_urls = (f'https://remote.co/remote-jobs/search/?search_keywords={job_title}')

    job_title = input('Enter your desired position: ').replace(' ', '+')

    def __init__(self):
        self.driver = webdriver.Chrome(r'C:Usersleaguchromedriver.exe')

    def parse(self, response):
        self.driver.get(response.url)

        try:
            load_more = WebDriverWait(self.driver, 10).until(
                EC.visibility_of_element_located((By.XPATH, '/html/body/main/div(2)/div/div(1)/div(3)/div/div/a'))
                )
        except TimeoutException:
            self.log("Timeout - Couldn't load the page!")

        while True:
            try:
                sleep(1.5)
                load_more = self.driver.find_element_by_css_selector('a.load_more_jobs')
                load_more.click()
            except (ElementNotInteractableException, ElementClickInterceptedException):
                try:
                    close_button = WebDriverWait(self.driver, 6).until(
                        EC.element_to_be_clickable((By.CSS_SELECTOR, '#om-oqulaezshgjig4mgnmcn-optin > div > button'))
                        )
                    close_button.click()
                except TimeoutException:
                    self.log('Reached Bottom Of The Page!')
                    break

        selector = scrapy.selector.Selector(text=self.driver.page_source)
        listings = selector.css('li.job_listing').getall()

        for listing in listings:
            selector = scrapy.selector.Selector(text=listing)
            position = selector.css('div.position h3::text').get()
            company = selector.css('div.company strong::text').get()
            more_information = selector.css('a::attr(href)').get()
            yield {
                'position': position,
                'company': company,
                'more_information': more_information
            }

        self.driver.close()

How to get content from pages generated by views included in search results

I have a view that assembles all of our job postings. It creates a page whose url is /jobs.

Our search backend is Database Search.

A search of “jobs” returns no results.

Is there a way to get content from view-generated pages included in search results? I’m open to dropping crumbs into the custom view header or footer, or planting invisible blocks that appear only on the view page or any other similar tricks you’ve discovered.

database design – Use generated IDs or meaningful fields in mapping table? (user, permission, user permission)

Given the below tables, what is best practice and why for defining mapping table? Should mapping table consist of user.id, permission.id, or say user.email + permission.permission? Are there any pitfalls to not using IDs?

CREATE TABLE `user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(45) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_name_UNIQUE` (`email`)
) 


CREATE TABLE `permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `permission` varchar(45) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permission_UNIQUE` (`permission`)
)