ireland – Would EU citizens be effectively guaranteed entry into the UK post-Brexit if they enter via the Irish land border?

On January 1st 2021 the UK will no longer be a member of the EU (unless something changes in the 11th hour) and EU citizens would thus be no longer guaranteed entry into the UK, although most could expect to receive a 6 months leave to enter upon arrival. But couldn’t UK border controls be completely superseded if arriving via Ireland, in full compliance with current UK regulations?

  1. Fly or ferry to Ireland, receive guaranteed entry as an EU citizen
  2. Take the bus or drive to Northern Ireland, automatically receiving a 3 months deemed leave (see page 42 of this document for an official reference)
  3. Since you never had to encounter a UK immigration officer and since Ireland cannot refuse you entry, you’re effectively guaranteed entry into the UK as well

Am I missing something in the existing regulations? Or perhaps the UK government talked about closing this “loophole”?

plotting – Step size is effectively zero; singularity or stiff system suspected

I am trying to solve four coupled nonlinear differential equations.
But, everytime I am getting
NDSolve::ndsz: At t == 2.0833315360868916`, step size is effectively zero; singularity or stiff system suspected.
I have tried all the possible ways to solve such kind of problem with similar kind of problems available in stack.
I want to get the value of g1,g2,g3 and g4 for large value of t i.e. 1 to 100 but I am getting only for small value of t?
Could you please suggest me some way to sort out the issue?
(Eta) = 0.125;
rg1s = Derivative(1)(u1)(t) – u1(t)u3(t) – 3u1(t)u4(t) + u2(t)u3(t) + 3u2(t)u4(t) + 2(1 + 2(Eta))u1(t)^2 == 0;
rg2s = Derivative(1)(u2)(t) – u2(t)u3(t) – 3u2(t)u4(t) + u1(t)u3(t) + 3u1(t)u4(t) + 2(1 + 2(Eta))u2(t)^2 == 0;
rg3t = Derivative(1)(u3)(t) – 0.5
((u1(t) – u2(t))^2 + u3(t)^2 – 3
u4(t)^2 + 6u3(t)u4(t)) == 0;
rg4t = Derivative(1)(u4)(t) – 0.5
((u1(t) – u2(t))^2 + u3(t)^2 + 5
u4(t)^2 – 2u3(t)u4(t)) == 0;
sol = NDSolve({rg1s, rg2s, rg3t, rg4t, u1(0) == -0.6
0.2, u2(0) == -0.6
0.2, u3(0) == 0.6*0.2, u4(0) == 0.2}, {u1, u2, u3, u4}, {t, 1, 10})

Thank you

air travel – How to effectively organize documents when traveling?

After I get visa, ticket, insurance, hotel bookings etc, I scan everything, as individual pdfs.

Two types of documents, one which are crucial for journey, others which are just for help. Then I make two folders on my dropbox, Important and Informative. Visa, flight ticket, hotel booking, insurance, tickets, passport info page etc pdfs go to Important. Travel guides, tours, map, weather info etc go to Informative. Then I merge all pdfs in each folder as a new pdf, print two copies of each on A5 double side. Staple each copy on top left corner.

A5 size makes them smaller enough to store, while keeping them easily readable. Double side printing also cuts the volume in half.

One set of Important goes in luggage, second stays with me in my camera-cum-document bag, along with original passport.

Both booklet copies of Informative pdf stays in luggage. I use one on vacation, second is as backup, just in case.

Originals are only my passport, my national ID, money cards etc.

Edit: I also carry a ziplock or two, almost of A5 size, and I shove all the receipts, bills, tokens etc I get while on vacation in them, and sort it when I am back home.

Edit2: I use FolderSync Android App to keep this folder two-way synced with my phone, and almost all the times airlines hotels etc are ok with a soft copy of the document, as they just need a number to locate my data in their systems.

dnd 5e – Does the Artificer’s Spell-Storing Item effectively bypass the bonus action spellcasting rule?

The rule on Bonus Action Casting Time states:

A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven’t already taken a bonus action this turn. You can’t cast another spell during the same turn, except for a cantrip with a casting time of 1 action.

This would ordinarily prevent you from casting a levelled spell and a bonus action spell on the same turn; however, the Artificer’s Spell-Storing Item states:

(…) While holding the object, a creature can take an action to produce the spell’s effect from it, using your spellcasting ability modifier. (…)

Furthermore, the following question’s highest-scoring answer states:

(…) The user never casts the spell either. They merely use a (special, unnamed) action to produce the spell’s effects. They don’t cast it and don’t get to modify it with their features which care about them casting a spell. (…)

And the Sage Advice Compendium even states (page 3):

Q. Which action is used to activate a Spell-Storing Item?

A. Activating a Spell-Storing Item uses the Use an Object action.

Does this mean that a caster could use a Spell-Storing Item, creating the effects of any 1st or 2nd level Artificer spell with a casting time of 1 action, and then use their bonus action to cast any (bonus action) spell?

mysql – How to find repeating records effectively?

I have a registration application for registering 6 courses. The program will check the repeated register users first. Those users that needed to be checked comes from last year. If users registered for one course, they cannot register for any other courses.

---firstroundregisted table structure---

id|englishname  |idcard |
1 |CHAN SIU MING|A1234  |
2 |TAK HO KANG  |Z4123  |

---Contain >5000 last year registered users records for the 6 courses---

The sql in PHP as below.

SELECT * FROM firstroundregisted 
WHERE englishname='".$_POST['studentname']."' 
AND idcard='".$_POST['idcard']."' 
LIMIT 1;

Is this sql the fastest way to find out if the user registered or not?

Others:

I asked a question here :
How to increase Max_used_connections?
Some gentlemen suggested me to optimizing the sql query so I start a new question to focus on optimizing. Thank you all for your help.

Is there any reason other than (effectively) extortion for Google to stop security updates for 2 year old versions of Android?

I have a first-gen Google Pixel. It came with Android 9 (Oreo), then after I’d had it a while, upgraded itself to 10 (Pie). Just about the time Android 11 (Q?) came out, I was notified that Google would no longer supply updates (not even security updates, it seems) for my phone — then not yet quite two years old.

Sure, most people buy a new phone as soon as the purchase agreement runs out on their old one. I, however, bought the Pixel originally with the idea that, if I was going to spend $750 for a phone, I’d make it as future resistant as possible. I bought the best camera, fastest processor, and largest storage (128 GB) that I could find, which is how I wound up with a Pixel (Apple wasn’t in contention, because Apple).

Now, however, I have to choose between buying a new Pixel 4a (for less than half what I paid for my original Pixel), essentially the same phone I have but with very slightly upgraded specs (camera hardware supports longer exposures, CPU is slightly faster), in order to get two years of updates on a new Android version, buying a Pixel 5 or something else to get a significant hardware upgrade (and paying as much as I did originally) — or continuing to carry and use my original Pixel, which still works fine, holds charge well, and is nowhere even vaguely close to full.

The only reason I have to think about this is that I’m apparently no longer eligible for security updates, meaning there’s the possibility that a flaw that’s been fixed for years in newer versions might let someone take control of my phone, steal my photos and storeds passwords, take over my email, etc.

Is there any sensible reason (other than wanting more of my money) for Google to have stopped even security updates after a mere two years from release? Closely related: is there a way to upgrade manually, legally, with a non-rooted phone, and have the upgraded system work correctly with my hardware (camera etc.)?

The phone is on Verizon, if that matters (not sure why it would, but not sure it wouldn’t).

programming practices – Can a build system be used effectively as a unit test runner?

The way of running automated tests (specifically, a large number of small, «atomic» unit and regression checks) that I am used to is to maintain a monolithic executable built on top of a test framework that aggregates the individual checks into a test tree and provides «quality of life» features like colourful or machine-readable reporting and selection of tests by name, regular expression or sub-tree.

I was recently acquainted with another way: to have every single check’s report as a separate build target in a build system (such as make or dune) and make it depend on relevant files of the source code of the project, so that a report must be regenerated exactly when the relevant sources change. The promise is that this would provide a seemingly magical ability for the test suite to execute in the shortest amount of time required to cover a given modification, given that dependencies between the source files and the check reports are wired correctly. The down sides that I anticipate and fear are that:

  • It is not trivial to provide «quality of life» features such as those mentioned above.
  • Some relevant checks may not run due to dependencies not being wired correctly.
  • A test run for a feature close to the root of the dependency tree would require to re-run almost all checks.

Does this practice have a name? Is it used at large scale in well-known open source projects? Are my fears unfounded? Where can I read more?

php – How to effectively manage a large number of exceptions (I18N problematic)

I’m trying to found the best way to manage Exception for all over my application.

Actually, I’ve come with two solutions :

Solution 1

One Exception to govern them all.

namespace AppUtilsException;

class LogicException extends Exception
{
    /**
     * @param MessageI18N $messageI18N A message which may contain parameters for translation.
     * @param string|null $redirectRoute (optional) Route to redirect after exception have been throw.
     * @param string $status (optional) A status for alert msg (default is {@see eNotificationStatus::ERROR}).
     * @inheritDoc
     */
    public function __construct(MessageI18N $messageI18N, ?string $redirectRoute = null, string $status = eNotificationStatus::ERROR, ?int $code = 0, Throwable $previous = null){
        parent::__construct($messageI18N->getMessage(), $code, $previous);
        $this->_redirectRoute = $redirectRoute;
        $this->_status = $status;
        $this->_messageDatas = $messageI18N->getParameters();
    }
}
namespace AppUtilsException;

class MessageI18N
{
    private string $_message;
    private array $_parameters;

    public function __construct(string $message, array $parameters = array())
    {
        $this->_message = $message;
        $this->_parameters = $parameters;
    }
...
}

Now I can use this LogicException class everywhere I need it as :

namespace AppServicesDomainEmail;
class EmailService implements EmailServiceInterface
{
    ...

    public function sendEmailResetPassword(string $email): void
    {
        try {
            $this->_mailer->send($email);
        } catch (TransportExceptionInterface $e) {
            throw new LogicException(
               new MessageI18N(
                  "an_error_occurs.when_sending_email_to_{email}",
                  ('{email}' => $email)
               ), 'send_mail_password' // <-- route to redirect
            );
        }
    }
}
namespace AppController;
class EmailController extends _BaseController
{
    ...
    /**
     * @Route("email/send/password/forgot/", name="email_send_password_forgot")
     * ...
     */
    public function sendEmailResetPassword(Request $request): void
    {
        ... // Get email from request query
        try{
          $this->_emailService->sendEmailResetPassword($email);
          $this->addFlash( // Success message
             "an_email_have_been_sent_to_{email}_(check_your_spams)",
             ('{email}' => $email))
          );
        }catch(LogicException $e){
          $this->addFlash( // Error message
              $e->getStatus, // Status may be warning or error
              $this->_translator->trans(
                  $e->getMessage,
                  $e->getgetMessageDatas()
              )
          );
        }
    }
}

Advantages

  • Easy to handle exception
  • Easy to provide extra parameters for I18N purpose
  • Messages can be personalise at Service layer, where it have all the specific knowledge of why error occurs.
  • The route to redirect can be personalise too.

Disadvantages

  • The exception logic take more space than service logic make it hard to read.
  • The way Exception class is extended look like a terrible mess, as an object is provided, but actualy isn’t a property of LogicException. IDK why but it’s look like so horrible to me.
  • If LogicException need to be change, there might be impact in all place where it is use. A lot of dependecy to this class may require a lot of change !

Solution 2

Solution 2 is about creating a new Exception class for each logic exception wich may occurs.

class EmailInvalidFormat extends LogicException // <-- SPLLogicException{
}
class UserNotFoundException extends LogicException // <-- SPLLogicException{
}
class UserNameMustContainOnlyAlphanumeric extends UnexpectedValueException// <-- SPLUnexpectedValueException{
}
class UserNameLength extends LengthException// <-- SPLLengthException{
}
class UserDupplicateName extends LogicException// <-- SPLLogicException{
}

… I let you imagine that i’ll probably break some records if I create an exception by problem.
I thin you guess that for every Exception class I’ll display a specific translation message wich would’ve been handle by the controller. Service layer only throw Exception class without knowing anything about the message.

Advantages

  • More readable code.
  • Everything related to translation is inside of the controller.
  • If an exception class need to be rename, this don’t have a lot of impacts.

Disadvantages

  • Less flexibility about message, as controller may not have a lot of informations about each exception.
  • The message will be more generic.
  • Controller got too much responsibility as he’s got to manage every exception that’ll be thown.
  • Code can’t get reuse through other application as Exception may be related to Application logic

How to effectively search for, and select, existing Google Chrome tabs from the keyboard?

Open up some tabs on various sites.
Open up a New Tab, and start typing a fragment of the URL in one of the other sites.

See something like this:

screenshot

Note the red arrow to the Switch to this tab button I need to press, specifically from the keyboard, not using the mouse. When I reach for the mouse, my browser-use-productivity degrades.

How do I do that? https://superuser.com/a/1520693/106977 says I can Right-Arrow then press Return, but that is not what I want:

Is there some global shortcut that, when I type it, it will progressively narrow the list of open tabs I have based upon keywords typed in, very similar to what Google search does when you start typing into the search field? Note: I do not want to duplicate an existing tab: I want to switch quickly to one I already know is in an existing browser tab, without having to do a brute-force search through all of them.

Right now, if I press the Return key on that line, it essentially sort-of duplicates what I had typed in before which is typically a search phrase that would launch my default search engine.

The online help for this at https://support.google.com/chrome/answer/157179?co=GENIE.Platform%3DDesktop&hl=en does not mention this Switch to this tab button.

I’m open to installing Chrome Extensions to address this, but that would be a “software recommendation”. And besides, this probably should be built-into the Google Chrome base product.

How to effectively search for, and select, existing Google Chrome tabs from the keyboard?

Open up some tabs on various sites.
Open up a New Tab, and start typing a fragment of the URL in one of the other sites.

See something like this:

screenshot

Note the red arrow to the Switch to this tab button I need to press, specifically from the keyboard, not using the mouse. When I reach for the mouse, my browser-use-productivity degrades.

How do I do that? https://superuser.com/a/1520693/106977 says I can Right-Arrow then press Return, but that is not what I want:

Is there some global shortcut that, when I type it, it will progressively narrow the list of open tabs I have based upon keywords typed in, very similar to what Google search does when you start typing into the search field? Note: I do not want to duplicate an existing tab: I want to switch quickly to one I already know about, without having to do a brute-force human search through all of them, which can be numerous, until I can get around to doing a cleanup.

Right now, if I press the Return key on that line, it essentially sort-of duplicates what I had typed in before which is typically a search phrase that would launch my default search engine.

The online help for this at https://support.google.com/chrome/answer/157179?co=GENIE.Platform%3DDesktop&hl=en does not mention this Switch to this tab button.

I’m open to installing Chrome Extensions to address this, but that would be a “software recommendation”. And besides, this probably should be built-into the Google Chrome base product.