Syntax to for phrase match whilst excluding domains for search results

I’m trying to search Google for:

"Alpha Beta" + "Charlie Delta" -excluding(pinterest.com), -excluding(facebook.com)

What I’m trying to achieve here is to find results that contain the phrase "Alpha Beta" and separately the phrase "Charlie Delta", and to exclude want results from pinterest.com and facebook.com.

What would the correct syntax for that be?

Username must match a number taken from a given database table

I work for a telephone and Internet provider company. Our users are identified by their personal ID number (this is not in US, everyone has an ID card known as DNI, given by the government).

I am building the company’s site in Drupal and developing an application that show registered users which services they have, their invoices, etc. I was requested to handle user registration this way: users must register with their DNI number as username, and the program must confirm that that DNI number belongs to an actual user (I have a table of users). If not, registering should be denied.

Any ideas on how to accomplish this?

What do “patterns, which separately match parts of a page” and “interactions between patterns” mean?

Database System Concepts says

Information extraction using simple patterns, which separately match parts of a page, is relatively error prone. Machine-learning techniques can perform much more sophisticated analysis, based on interactions between patterns, to minimize errors in the information extracted, while maximizing the amount of information extracted.

What do “patterns, which separately match parts of a page” and “interactions between patterns” respectively?

Magento 2 Color Attribute: How to make the size of uploaded swatches match the default ones?

For our site’s color attribute, we would like to use both the default color options and a few uploaded swatches. However, the uploaded swatches are showing up much smaller, with a white border around them that the default colors don’t have. I have tried using different sized images but it didn’t help.

The attribute is just for search results navigation on the sidebar, it is not part of a configurable product or anything complex. I’m hoping this can be solved without coding because I’m not the programmer.

Thanks!

Java Regex to match valid certificate format

What would be the Java Regex equivalent for this regular expression:

^(?:(?!-{3,}(?:BEGIN|END) CERTIFICATE)[\s\S])*(-{3,}BEGIN CERTIFICATE(?:(?!-{3,}END CERTIFICATE)[\s\S])*?-{3,}END CERTIFICATE-{3,})(?![\s\S]*?-{3,}BEGIN CERTIFICATE[\s\S]+?-{3,}END CERTIFICATE[\s\S]*?$  ) 

The goal of this regex is to validate if a String is a valid SSL Certificate format

Example input

-----BEGIN CERTIFICATE----- section 1 -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- section 2 -----END CERTIFICATE----- 

Another problem here is that it still does not match the first section, section 1, and only matches the section 2

Wear levelling score on smartctl does not match TBW claim

I have a small secondary Toshiba RC100 SSD with specified endurance of 120 TB. smartctl reports data units written of about 3% of that. But the wear levelling count(or “Percentage used”) reports at 16%. This is a big discrepancy. From what I can tell, Data Units Written is actual block writes to the device, not logical writes, so write amplification doesn’t explain the discrepancy. What’s going on?

Telling users passwords don’t match and aren’t strong enough

I have two functions in my user registration form

  • One checks the password and confirmed password are the same.
  • The other checks if the password is strong enough.

I have two presentation related questions

  • What words should I use if the passwords don’t match or isn’t strong enough? I have a text field beside the first password which is initially empty but gets updated as each character is typed in (I can add a second text field beside the confirm password part).
  • When and in what order should the functions be called? For example if I only call the passwords match function on the confirm password section then if the user goes back and changes the first password things will get messed up. If I call the passwords match function at the first time the user types in the password then it will override the message about the password not being strong enough or the strong enough password will override the “password don’t match” message.

The function that checks if the password is strong enough is real simple, just to prevent “123” and password. In the future I’d like to make an option to unmask the password and only have one field and no confirm.

Best way to match timezone with time offset?

I have a c# solution which uses mssql database to store data.

In my database there is a big table of entities (e.g. accounts) for each of which the TimezoneId field is defined. This field is filled during the registration of a new account using the MaxMind GeoIP2 library.

+----+-------------+------------+ | Id | AccountName | TimeZoneId | +----+-------------+------------+ |  1 | account1    |          1 | |  2 | account2    |          1 | |  3 | account3    |          2 | |  4 | account4    |          3 | |  5 | account5    |          1 | +----+-------------+------------+ 

TimeZoneId as a foreign key for table TimeZones, which stores the names of time zones in the IANA time zone format (e.g., America/New_York).

+----+----------------------+ | Id |         Name         | +----+----------------------+ |  1 | Europe/Paris         | |  2 | Africa/Kampala       | |  3 | Africa/Dar_es_Salaam | |  4 | Asia/Karachi         | +----+----------------------+ 

Now I need to be able to select all the accounts from the database, the time zone for which match with utc offset specified by the user. For example, if the user specifies the offset “UTC+2” i want to select accounts with timezones “Europe/Oslo”, “Europe/Paris”, “Europe/Rome” and other that have this offset. Which solution in terms of performance is best suited for this task?

Expand the TimeZones table with utc-offset field, create a memory cache with data about time zones and offsets or something else? I would appreciate advice.