How can I correct somes URLs to migrate them when they miss the protocol? [closed]

I am migrating a link from d7 to d8 using the code below but it fails when some urls in the source are missing the "http://" part with this error The URI ‘www.example.com/jobs’ is invalid. You must use a valid URI scheme. How can i process the source to have the http:// added if its missing?

field_program_website:
plugin: iterator
source: field_website_url
process:
  uri: url
  title: title
  options: attributes

how can i correct some urls for migration from d8 to d7 when missing http?

I am migrating a link from d7 to d8 using the code below but it fails when some urls in the source are missing the "http://" part with this error The URI ‘www.example.com/jobs’ is invalid. You must use a valid URI scheme. How can i process the source to have the http:// added if its missing?

field_program_website:
plugin: iterator
source: field_website_url
process:
  uri: url
  title: title
  options: attributes

export – Exporting to PDF with correct size and resolution

I am trying to export a GraphicsGrid to a PDF such that the PDF has a size of 8×10 inches and a resolution of 300 dpi. Here is what I have done:

  1. Create the graphics grid with ImageSize->Full to get all the images placed in the grid correctly.

  2. Rasterize it to RasterSize 300{8,10}.

grid = Rasterize[
GraphicsGrid[{{fiberAndReferencePlot}, {transmissionPlot},
{summaryPlotRadians}}, ImageSize -> Full], RasterSize -> 300 {8, 10}]

  1. Export it to the correct size 8×10.

Export[“Grid.pdf”, grid, ImageSize -> 72 {8, 10}]

When I look at the PDF with Photoshop, it tells me that the image size in pixels is 2400×3000, which is correct. But the size in inches is 6.3 x 7.875, which is not the 8 x 10 I expected.

Can anyone tell me how to do this properly?

list – In Python how can I index the name of the week with the correct min and max?

I tried to enumerate() and it’s not what I am exactly looking for.

I am trying to index the day of the week with the right min() and max()

Monday= input('Enter the temperature for monday:')
Tuesday= input('Enter the temperature for Tuesday:')
Wednesday= input('Enter the temperature for Wednesday:')
Thrusday= input('Enter the temperature for Thrusday:')
Friday= input('Enter the temperature for Friday:')

list=(Monday, Tuesday, Wednesday, Thursday, Friday)

for i in list:
    print(f" Tuesday was the coldest day with the temperature: {min(list)}")
    print(f"Tuesday was the warmest day with the temperature: {max(list)}")
    break

Thanks!

java – Will this time duration measurement in two threads give correct result?

A program I’m developing has two threads running similar but different task:

thread1:

timer1.start()
writeToExternalDB1(consumedData)
timer1.end()

thread2:

timer2.start()
writeToExternalDB2(consumedData)
timer2.end()

I want to compare the writing performance of the two external database. I have timers around the write operation so that I can collect some metrics. Those two threads are running concurrently.

My question is will this design give correct measurement result regarding to the time spent by each write operation?
My understanding is probably not because the processing time given by CPU to each thread may be different. Let’s say for thread1, after timer1 started, cpu will not move forward to the followed write operation, but switch to processing thread2 instead. This may introduce some gaps between timer1.start() and writeToExternalDB1(consumedData). However, in that case, should we regard this gap as negligible if we are processing a lot of data? What should I do to give the correct measurement result?

user expectation – creating the correct password parameters for a site, with cc details stored

I am trying to think of the best requirements to set a password for a site. A credit card is stored on the site, but is only useful to the site owner. i.e. if someone else logged in, they wouldnt get much benefit.

Its actually a customer relationship management cloud software service.

So here are my options:

  1. min 6 character password – simple and easy, they can use their favorite password, and wont struggle to remember it.

  2. min 8 chars, 1 upper case, 1 number, 1 non-alphanumeric character – secure, but it gets annoying, and if you forget the password, its hard tor remember.

  3. min 6 chars, 1 number, 1 upper case – somewhere in between, a bit more secure, and a likely chance they can still enter their favorite password.

Thoughts?

GitHub etiquette: Should I submit a pull request to correct minor typos in a Readme file?

While going through the README file of a GitHub repository I am not a contributor of, I noticed a few minor typos and wondered if I should submit a pull request to correct them or if reviewing the request would take the maintainer too much time to be worth it. I considered the three courses of action:

  1. Correct the typos and submit a pull request with the position of each correction in the summary field.
  2. Send the maintainer an email with the proposed corrections.
  3. Do nothing.

Which of these (or any other) options is most appropriate?

To give some context, the repository is actively maintained and has about 10 contributors. The typos I have noticed do not make the README misleading nor ambiguous. I have used GitHub for some time for small personal projects, but have little experience with pull requests and how much time and efforts they take to review (hence my question).