networking – What is the current practice in handling connection errors when the service “offers” multiple IP addresses?

With the current implementation of getaddrinfo(), I’m not given any information about a timeout of the IP address(es) returned. The library implementing that function has the information, but I haven’t yet seen a function to retrieve the timeout.

What I’m wondering is how do people current implement the concept of connecting to a service when they are given multiple addresses and the connection either never happens or fails after a while.

I can think of multiple algorithms and I’m wondering which one is currently used:

  1. User gather host name (say from a .conf file)
  2. User creates a “connection object”
  3. User says “connect” on that object
  4. Object transform the host name in a list of IP addresses
  5. Object tries to connect to first IP
    1. Connection in (5) fails, try with next IP
    2. Connection in (5.1) fails, repeat until all IPs were tested
    3. All IPs were exhausted, sleep and try again from (4)
  6. Connection in 5 succeeded, run with that connection until we lose it
  7. Connection is lost, try again from (4) or from (5.1)?

My main problem is what happens in step (7). Should we try again from (4), which means we are not unlikely to retry the same IP address, or should we try from (5.1), in which case we may be testing with an out of date IP address… (it could be days between step (6) and step (7)). I think that if I had the timeout for the IP address, I could do a smart decision since I would know whether I should go back to step (4). Without that timeout, I’m kind of stuck…

What is the current practice?

tinymce – Is there a way to grab the current value of the editor in Gutenburg/Classic WordPress editor? (Not the saved value of the post!)

I’m trying to make my plugin “Gutenburg – compatible”. I have some issues when replacing the editors contents. Before I could just change value by using #content but with Gutenburg there’s obviously a new approach with REST API.

Is there a way to grab the current value of the editor? (Not the saved value of the post!)

I want this because I want to replace values of the core/editor in realtime. It works with the classic editor active but I don’t want to require that.

let old_content = '';
old_content = 'core/editor' ).getCurrentPost().content;     
//TINYMCE => old_content = $('textarea#content').html();

//Aim is to do a replace like this (and this works but only FIRST time because old_content 
//fetches from server/db instead of the actual editor (If I understand this correctly) 'core/block-editor' ).resetBlocks( wp.blocks.parse( new_content ) );
//TINYMCE: $('textarea#content').html( new_content );

Can iOS shortcuts enter text at the current cursor position?

Can iOS shortcuts enter text at the current cursor position? – Ask Different

Heat-map of current mathematics – MathOverflow

The recent article on Quanta
(by Natalie Wolchover)
concerning $aleph_1$ vs. $aleph_2$ suggest that there is
excitement within that community:

Juliette Kennedy: “It’s one of the most intellectually exciting, absolutely dramatic things that has ever happened in the history of mathematics.”

This makes me wonder if there is something like a heat map for all of mathematics,
which would show the “hot” areas, in some sense of “hot.”
It seems difficult to capture this via arXiv postings,
but that is an obvious starting point.
So perhaps this has been pursued already?

magento2 – How to get current category Id?

I’m trying to get the current category id (the id of the category I’m browsing on frontend).

 public function __construct(
    Context $context,
    Resolver $layerResolver,
    PsrLogLoggerInterface $logger,
    array $data = ()
    parent::__construct($context, $data);

    $this->layerResolver = $layerResolver;
    $this->logger = $logger;

public function getCurrentCategory()
    return $this->layerResolver->get()->getCurrentCategory();

public function getCurrentCategoryId()
    return $this->getCurrentCategory()->getId();

I’m using layerResolver as suggested here:

But I’m not getting the current id.

What is Emirates airline current checked in baggage allowance from USA to Iran?

I’m planning a trip to Iran in December with Emirates airlines and would like to get a ticket online; however I’m so confused about the checked baggages allowance. Some agencies say I can take 3 checked in suitcases. What is Emirates airline current checked in baggage allowance from USA to Iran ?

usa – What is the current US Passport processing time?

The New York Times ran an article on this just last week.

appointments at passport agencies across the country remain elusive, and processing time for renewals by mail is lagging by 10 weeks or more

In-person appointments are only available for those traveling within 72 hours, and it has been like that for a couple of decades or so. One person mentioned in the article

mailed [his application] in for renewal and paid for expedited processing, which before the pandemic would have taken up to three weeks. After five weeks, with his passport still processing and his trip departure looming, he began hunting online for an appointment at one of the State Department’s 26 official passport centers and passport agencies, where he could renew in person and get the document in one day. It was much harder than he imagined.


Routine passport service by mail, according to the State Department, can now take up to 18 weeks, compared to six to eight weeks before the pandemic, while expedited service, which costs an additional $60 and took anywhere from a few days to three weeks before Covid-19, can now take up to 12 weeks.

The last time I renewed my passport by mail, it took two weeks even though I did not submit an expedited application. That was 12 years ago, and obviously the probability of that happening now is zero.

Vim: z+enter does not bring the current line to the top, instead it’s moved 5 lines from top

In VIM, normally, z+enter will scroll the current line the cursor is on to the top of the screen (call it line 0). On RHEL8.4 z+enter only brings the line close (to line 5) but not to the top.

Similarly, z+- will not scroll the current line to the bottom of the screen but 5 lines away.

The rest of VIM seems fine for going to lines and h-j-k-l’ing around.

Can someone suggest a place to start looking for more information about this “phenomenon”?


macos – Is it possible to check the current speed of the fan on a 2016-2017 MacBook Pro? Is “resetting the SMC of your Mac” at least a safe thing to try?

I’m literally asking for a friend, who has a MacBook Pro 2016-2017 with no touch bar. (Big Sur 11.4, updated about 2 months ago).

They report that recently (noticed within the last week) when the laptop gets hot, usually when driving a very large BenQ monitor or perhaps when doing intensive numerical calculations, single pixel tall black lines appear across the bottom of the laptop’s monitor in the Dock area. As the laptop continues to get hot over a period of 10 to 20 minutes, more isolated lines appear.

Their research shows that it appears to be a known problem with this model, and may be associated with something called a “T-CON” board.

Before considering a major repair, one bit of advice in this and this answer is to investigate the fan speed; is it going to full speed soon enough, does something need to be reset, etc. It also links to

Question: Is it possible to check the current speed of the fan on a 2016-2017 MacBook Pro? If that suggests it’s not running fast when the computer is hot, is “resetting the SMC of your Mac” at least a safe thing to try?

usa – What are the current travel restrictions on individuals entering the United States from regions affected by Covid-19?

This answer currently lists nationwide entry restrictions imposed by the United States federal (national) government in response to COVID-19. Some states as well as counties, municipalities, towns, and cities have imposed entry bans or automatic quarantine-upon-entry orders as well as stay-at-home orders that may prevent your intended travel. This answer cannot index all of these orders, which have slight differences, technicalities, and effective dates that must be consulted to determine if your planned travel activity is allowed under state and local law.

Travelers who do not already have a valid visa and will need one for their planned travel should note that the US Embassies and Consulates are beginning to re-open at this time for limited services. Check the website of the consulate in your country for more information. Be aware that their home countries consulates in the US may not be operating normally.

Entry bans for foreigners who have been in certain countries

Individuals who have been physically present anywhere in Mainland China (excluding Hong Kong and Macau), Iran, the Schengen Area1, the UK1 (excluding territories outside Europe), Ireland1, Brazil, South Africa2, or India within the past 14 days cannot travel to the US at all unless they meet one of these exceptions:

  • US citizens and nationals
  • US lawful permanent residents (green card holders)
  • spouses of US citizens or LPRs
  • parents of unmarried US citizens/LPRs under 21
  • siblings of US citizens/LPRs, both unmarried and under 21
  • children, foster children, and adoptees of US citizens/LPRs
  • air and sea crew members
  • diplomats and foreign officials
  • those granted exceptions by officials
  • immigrant visa holders, fiance visa holders, and certain exchange visitors3
  • F-1 and M-1 students in a program commencing August 1, 2021 or later4

Text of the presidential proclamations and effective dates:

  • For Mainland China: Proclamation 9984, effective February 2, 2020 at 5:00pm EST
  • For Iran: Proclamation 9992, effective March 2, 2020 at 5:00pm EST
  • For the Schengen Area: Proclamation 9993, effective March 13, 2020 at 11:59pm EDT
  • For the UK and Ireland: Proclamation 9996, effective March 16, 2020 at 11:59pm EDT
  • For Brazil: Proclamation 10041 (as amended by Proclamation 10042), effective May 26, 2020 at 11:59pm EDT
  • For South Africa: Proclamation 10143, effective January 30, 2021 at 12:01am EST
  • For India: Proclamation 10199, effective May 4, 2021 at 12:01am EDT

(1 As of July 16, 2020, the Department of State announced that students with F-1 and M-1 visas who will travel from the UK, Ireland, or the Schengen Area are automatically allowed to travel. J-1 students and others, such as E visa treaty traders/investors, academics, and certain other business travels, who will travel from those countries, may be able to obtain a National Interest Exception and should contact their nearest consulate or embassy to do so.

2 As of January 28, 2021, the Department of State announced that H-2 workers who will travel from South Africa may be able to obtain a National Interest Exception and will be considered for the exception when applying for the visa. Those who already have visas should contact the consulate or embassy that processed their visa.

3 As of April 8, 2021, the Department of State announced that immigrants, fiance visa holders, and certain exchange visitors who are subject to the geographic entry bans have a National Interest Exception and will be able to obtain a visa when visa services otherwise resume at the local US consulate. This also applies to the subsequent India ban.

4 As of April 26, 2021, the Department of State announced that F-1 or M-1 students from all countries, in programs beginning August 1, 2021 or later qualify for a national interest exception. If they already have valid visas, they may travel to the US no more than 30 days before the beginning of their program, without needing to contact a US consulate. Those applying for an F-1 or M-1 for a program beginning August 1, 2021 or later will automatically be considered for an exception. This also applies to the subsequent India ban.)

Upon arrival, such excepted passengers may be subject to public health screenings upon arrival. The US Centers for Disease Control have asked all international arrivals to self-quarantine for 14 days. This is not legally binding, however, it is possible that federal, state/territory, or local health officers could impose mandatory quarantine orders on specific passengers.

The Department of Homeland Security has a page on air travel restrictions, a fact sheet, and a list of news and updates. The CDC has a page on procedures for travelers from the affected countries.

This action does not affect aliens (immigrants or nonimmigrants) already in the US. It does not cancel or revoke valid visas, though it temporarily prevents their use and may prevent the issuance of new visas in some cases.

The restrictions will remain in effect until further notice from the government. The Secretary of Health and Human Services is to advise the President at least every 15 days whether or not the ban should be changed or cancelled.

COVID-19 test requirement

All travelers to the US by air, including US citizens, who are 2 years of age or older, must have a negative COVID-19 test within 72 hours of their flight in order to board the airplane. This does not apply to entry to the US by land. See frequently asked questions.

Land border entry restrictions

Entering the US through land borders from Canada or Mexico is limited to “essential travel”:

  • US citizens and permanent residents returning to the US
  • Travel for medical purposes
  • Travel to attend educational institutions
  • Travel to work in the US
  • Travel for emergency response and public health purposes
  • Lawful cross-border trade
  • Official government or diplomatic travel
  • US armed forces and their family returning to the US
  • Military-related travel

These rules cover anyone traveling across the land border, even if they are not Canadian/Mexican. They do not affect entry from Canada or Mexico by air, although there have been reports of CBP officers applying extra scrutiny to such travelers.

Effective date: March 20, 2020 at 11:59pm EDTJuly 21, 2021 at 11:59pm EDT (may be extended on a monthly basis as needed)

Text of the regulations:

  • For US-Canada land border: this document, as extended by this document, this document, this document, this document, this document, this document, this document, this document, this document (as corrected), this document, this document, this document, this document, this document, and this document
  • For US-Mexico land border: this document, as extended by this document, this document, this document, this document, this document, this document, this document, this document, this document (as corrected), this document, this document, this document, this document, this document, and this document

DHS has announcements for the US-Canada and US-Mexico land border restrictions.

Immigrant visa and work visa bans (no longer in effect)

Foreigners could not enter the US as immigrants, or as non-immigrants on H-1b, H-2b, J-1, or L-1 status or their dependents, unless they met one of these exceptions:

  • people who were inside the US on the effective date of the ban
  • people who had a visa of the same type on which they are seeking entry, that was valid on the effective date of the ban
  • people who had a travel document other than a visa that permits them to travel to the US (e.g. an Advance Parole), that was valid on the effective date of the ban or issued thereafter
  • US lawful permanent residents (green card holders)
  • people entering the US as medical professionals or to conduct research on COVID-19
  • immigrants entering on the EB-5 investment immigration category
  • spouses of US citizens
  • unmarried under-21 children and adoptees of US citizens
  • people whose entry furthers law enforcement objectives
  • members of the US armed forces and their spouses and children
  • immigrants in the SI and SQ special immigrant categories
  • people whose entry would be in the national interest

Text of the presidential proclamations and effective dates:

The Department of State has detailed the national interest exceptions for these two bans.

Entry airport restrictions (no longer in effect)

From the effective date of the entry ban for a given country until September 14, 2020, all flights carrying at least one non-crew passenger that had been physically present in Mainland China, Iran, the Schengen Area, the UK, aireland, or Brazil within the past 14 days but who were exempt from the entry ban, were required to land at one of the following airports: JFK, ORD, SFO, SEA, HNL, LAX, ATL, IAD, EWR, DFW, DTW, BOS, MIA, FLL, or IAH.

Questions and Answers

I heard about some changes to student visa rules. Where are those? You likely heard about a rule change to the Student Exchange Visitor Program that would have forced international students on F-1/M-1/J-1 visas to leave the country if did not have at least one in-person class, even if their entire school had moved online. The US Government abandoned this rule when it was challenged it court. This rule is no longer in effect and no changes to your I-20 or student visa should be required for you to enter the country. If you are a new student and do not have an F-1 visa, be sure to closely follow the website of the embassy in your country–each consular post is announcing their own plans for resumption of visa services.

What if I do not comply with these rules? If you lie to officials to avoid the regulations, you could face serious immigration consequences including expedited removal from the country and a permanent inadmissibility in the future.

DreamProxies - Cheapest USA Elite Private Proxies 100 Private Proxies 200 Private Proxies 400 Private Proxies 1000 Private Proxies 2000 Private Proxies 5000 Private Proxies - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies New Proxy Lists Every Day Buy Cheap Private Proxies; Best Quality USA Private Proxies