In SQL and a language that you've learned in this course write the expressions for the names of publishers who published every book in Book relation.
BOOK(isbn*, title, ...)
PUBLISH(isbn*, publ_name*, year*)
| <?php namespace ProcessWire; | |
| class ProcessDashboard extends Process implements Module | |
| { | |
| public static function getModuleInfo() | |
| { | |
| return [ | |
| 'title' => 'Orders Dashboard', | |
| 'summary' => 'Shows latest orders', |
| <?php namespace ProcessWire; | |
| // put this in /site/ready.php | |
| wire()->addHookAfter('ProcessPageEdit::buildForm', function (HookEvent $e) { | |
| /** @var ProcessPageEdit $edit */ | |
| $templates = ['post', 'basic']; | |
| $edit = $e->object; | |
| $page = $edit->getPage(); |
| <?php namespace ProcessWire; | |
| wire()->addHookBefore('PageRender::renderPage', function (HookEvent $e) { | |
| /** @var Page $page */ | |
| /** @var HookEvent $event */ | |
| /** @var Template $template */ | |
| $event = $e->arguments(0); | |
| $options = $event->arguments(0); | |
| $page = $event->object; |
| <?php | |
| wire()->addHookAfter('ProcessPageEdit::buildFormSettings', function (HookEvent $e) { | |
| $page = $e->object->getPage(); | |
| if ($page->template != "basic") return; | |
| /** @var $templatesField InputfieldSelect */ | |
| $templatesField = $e->return->children->get('id=template'); | |
| $templates = $templatesField->getOptions(); |
| import ctypes | |
| from win32com.shell import shell, shellcon | |
| import pythoncom | |
| def enable_active_desktop(): | |
| """ | |
| Taken from: | |
| https://stackoverflow.com/a/16351170 |
| from collections import defaultdict | |
| from enum import Enum | |
| import win32api | |
| import win32con | |
| import win32gui | |
| import win32ts | |
| class SessionEvent(Enum): | |
| ANY = 0 |
| import tempfile | |
| import os | |
| from pathlib import Path | |
| def singleton(callback: callable, instance_name: str): | |
| tempdir = Path(tempfile.gettempdir()) | |
| lockfile = tempdir / f'{instance_name}.lock' | |
| try: | |
| if lockfile.exists(): |
| #include "RollingHash.h" | |
| RollingHash::RollingHash(const std::string& text, unsigned long wordLength) : text(text) { | |
| this->textLength = text.size(); | |
| this->wordLength = wordLength; | |
| hash = 0; | |
| initHash(); | |
| windowStart = 0; |
You can use re module together with string manipulation to extract the dates easily
import requests
import re
import json
if __name__ == "__main__":
texts = [
'en los dias 3,06,8 ,9, 15 y 29 de diciembre de 2018.Por c',