Consensus – When did GDP16 exceed the 550/1000 threshold?

BIP16 says on February 01, 2012, if more than 550 of the previous 1000 blocks contain "/ P2SH /" in the coin base, BIP16 will be activated on February 15, 2012 (source).

BIP16 was later revised. On March 15, 2012, if more than 550 of the previous 1000 blocks contained "/ P2SH /" in the coin base, BIP16 will be activated on April 1, 2012 (source).

After searching the coin base of each block, it looks as if the threshold of 550 blocks was reached on March 16, 2012, 10:07:16 p.m. at block height 171,455. How / why was it assumed that this exceeded the cut-off date threshold, even though it was after the valuation date on March 15, 2012, although this was actually not the case?

Any help appreciated. It makes me crazy πŸ™‚

Performance – How can I optimize my Google Apps script to not exceed the maximum time limit?

I'm trying to prevent my script from exceeding the maximum execution time, but I'm not sure how to optimize my code. The part that really hangs is when the file is an APR. It has to unzip 69 files, convert them to Google Docs format and then overwrite the existing tabs on a Google Sheet. Thank you so much!

//version 1_20200306

function doGet(e) {
  try {
    var rn = e.parameter.responseNumber;  // takes the response number as a parameter
    rn = Number(rn);  // sets the response number into a variable
    rn = rn + 1;  // increments the response number by 1 to designate the row number

    // begins processing the report form entry
    var reportStatus = processReportForm(rn);

    // if a good status is returned then the script redirects to the success page
    if (reportStatus == "good") {
      var output = HtmlService.createHtmlOutputFromFile(reportStatus);
      return output;
    }

  }
  catch(err) {
    var output = HtmlService.createHtmlOutputFromFile('failure');
    return output;
  }
};

// gets the most recent file added to the folder
function getLatestFileId(recentFileFolder){

  var folder = DriveApp.getFoldersByName(recentFileFolder);
  var files = folder.next().getFiles();
  var lastFileId = files.next().getId();

  return lastFileId.toString();

};

// checks to see if demo report code is present
function demoCheckReportCode(rcCheck,rType) {

  if(rcCheck == 'demo' && rType == 'APR') {
    var rcDemoCheckName = '1vH4SidDb6QctTdBtvIUxjpE3RRmZPMo8_fQcNUJqWV0';
  } else if (rcCheck == "demo" && rType == 'SysPM') {
    var rcDemoCheckName = '1D2QJkM0odQBQia9Q2qHGwC_iKHidfvfbQv1xDR6yygk';
  } else if (rcCheck == "demo" && rType == 'SysPM Resubmitted') {
    var rcDemoCheckName = '1D2QJkM0odQBQia9Q2qHGwC_iKHidfvfbQv1xDR6yygk';
  }else if (rcCheck == "demo" && rType == 'CSV') {
    var rcDemoCheckName = '1Wqi6qykTMlMCaoDF1JfE1bOk0H_SykydtCnC2jFoTgI';
  } else {
    var rcDemoCheckName = rcCheck;
  }
  return rcDemoCheckName;
};

// checks to see if report code is demo and returns the folder ID to use
function demoCheckFolderId(fIdCheck) {

  if (fIdCheck == '1vH4SidDb6QctTdBtvIUxjpE3RRmZPMo8_fQcNUJqWV0' ||
      fIdCheck == '1D2QJkM0odQBQia9Q2qHGwC_iKHidfvfbQv1xDR6yygk' ||
      fIdCheck == '1Wqi6qykTMlMCaoDF1JfE1bOk0H_SykydtCnC2jFoTgI') {
    var rcDemoCheckId = '1b-1Ll2O1ZsDztzwoGUnNiPbAVq5-bHXa';
  } else {
    var rcDemoCheckId = getFolderByName(fIdCheck);
  }
  return rcDemoCheckId;
};

function processReportForm(rNumber) {

  var rsId = '11NR47rtjTtdYDK7ZmXDZ38VCC9xRBsiwrixNXfqbjOk'; // ID of Report Submission Form
  var rs = SpreadsheetApp.openById(rsId)
  var sheet = rs.getSheets()(0);
  var rowNumber = rNumber;
  var contactName = sheet.getRange('E' + rowNumber).getValue();
  var reportFileName = sheet.getRange('F' + rowNumber).getValue();
  var dashboardName = sheet.getRange('G' + rowNumber).getValue();
  var reportCode = sheet.getRange('H' + rowNumber).getValue();
  var emailAddress = sheet.getRange('I' + rowNumber).getValue();
  var info = sheet.getRange('M' + rowNumber).getValue();
  var type = sheet.getRange('K' + rowNumber).getValue();
  var period = sheet.getRange('L' + rowNumber).getValue();
  var dataSheetName = 'DATA';

  // checks to see if demo report is being used
  reportCode = demoCheckReportCode(reportCode,type);

  // checks to see if folder has files in it
  var etlStatus = checkFolder(reportCode);

  // returns status of etl
  if (etlStatus == reportCode) {
    return etlStatus;
  }

  // takes input form info and adds it to data sheet
  var ds = SpreadsheetApp.openById(reportCode)
  var dataSheet = ds.getSheets()(0);

  if(type == 'SysPM') {
    dataSheet.getRange('B8').setValue('NO');
  } else if(type == 'SysPM Resubmitted') {
    dataSheet.getRange('B8').setValue('YES');
  }

  // processes uploaded data
  importData(type,reportCode,reportFileName,dataSheetName);

  dataSheet.getRange('B2').setValue(dashboardName);
  dataSheet.getRange('B3').setValue(period);
  dataSheet.getRange('B4').setValue(info);

  // returns etl status
  return etlStatus;
};

function importData(tc,rc,rfn,dsn) {

  // demo report check folder ID
  var folderId = demoCheckFolderId(rc);

  var spreadsheet = rc; // spreadsheet where data goes
  var reportName = rfn; // report file name

  // checks report type
  if(tc == 'APR') {

    // unzip report with csv files and delete report file
    unZipItAPR(folderId,reportName);

    var vFolder = DriveApp.getFolderById(folderId); // gets folder ID
    var vFiles = vFolder.getFiles(); // populates with a list of files in the folder

    // gets the names of the files in the folder
    while (vFiles.hasNext()) {
      var file = vFiles.next();
      var csvName = file.getName();
      if (csvName != 'Q4a.csv' 
      && csvName != 'Q6e.csv'
      && csvName != 'Q6f.csv'
      && csvName != 'Q7b.csv'
      && csvName != 'Q8b.csv'
      && csvName != 'Q9a.csv'
      && csvName != 'Q9b.csv') {

        // imports csv files into spreadsheet
        importFile(file.getName(),folderId,spreadsheet);
      }
    }

    // converts csv files to Google Sheets format
    convert(folderId);

    var csvFiles = vFolder.getFiles();
      // copies files into data folder
      while (csvFiles.hasNext()) {
        var file = csvFiles.next();
        var Q5aSheetName = file.getName();

        var csvSheet = SpreadsheetApp.openById(file.getId());
        var Q5aSheet = csvSheet.getSheets()(0);
        var testValue1 = Q5aSheet.getRange('A1').getValue();
        var testValue2 = Q5aSheet.getRange('B1').getValue();

        if (testValue1 == '' && testValue2 == '') {
          Q5aSheet.deleteRow(1);
        }

        // clones the report sheets to the data sheet
        cloneGoogleSheet(file.getId(),spreadsheet,Q5aSheetName,Q5aSheetName);
      }

    // checks report type
  } else if(tc == 'SysPM' || tc == 'SysPM Resubmitted') {

    // converts xls to google sheets format
    var sourceFileId = convertExceltoGoogleSpreadsheet(folderId,reportName);
    if(tc == 'SysPM') {
      var sourceSheetNameOne = 'SysPMSummary2016_1';
      var destSheetNameOne = 'SysPMSummary2016_1';
    } else if(tc == 'SysPM Resubmitted') {
      var sourceSheetNameOne = 'SysPMSummary2016Rev';
      var destSheetNameOne = 'SysPMSummary2016Rev';
    }
    var sourceSheetNameTwo = 'SysPMSummary';
    var destSheetNameTwo = 'SysPMSummary';

    // clones the report sheets to the data sheet
    cloneGoogleSheet(sourceFileId,spreadsheet,sourceSheetNameOne,destSheetNameOne);
    cloneGoogleSheet(sourceFileId,spreadsheet,sourceSheetNameTwo,destSheetNameTwo);
  } else if(tc == 'CSV') {

    // unzip report with csv files and delete report file
    unZipItCSV(folderId,reportName);

    // converts csv files to Google Sheets format
    convert(folderId);

    var vFolder = DriveApp.getFolderById(folderId); // gets folder ID
    var vFiles = vFolder.getFiles(); // populates with a list of files in the folder
    var thisFile = DriveApp.getFileById(rc);

    var parentFold = thisFile.getParents(); // Get all parents - normally just one parent
    var targetFolder = parentFold.next(); // Get the first parent folder
    var targetFolderFiles = targetFolder.getFiles(); // populates with a list of files in the folder
    var dateFile = DriveApp.getFileById('1jj97O7RxPQzV3kpqUlYwI5HIQS6BcSsV-w0HAiJUTio'); //Master Dates file id

    // makes a copy of the Master Dates file into the upload folder
    dateFile.makeCopy(vFolder).setName(dateFile.getName());

    // copies files into data folder
    while (vFiles.hasNext()) {
      var file = vFiles.next();
      if (file.getName() == 'Client'||
          file.getName() == 'Enrollment'||
          file.getName() == 'Exit'||
          file.getName() == 'HealthAndDV'||
          file.getName() == 'Master Dates'||
          file.getName() == 'Project') {

          // removes unnecessary columns
          deleteColumns(file.getId(),file.getName());

          // gets current file/sheet name
          var sheetName = file.getName();

          // clones the report sheets to the data sheet
          cloneGoogleSheet(file.getId(),spreadsheet,sheetName,sheetName);
      }
    }
  }
};

// unzips APR zip file
function unZipItAPR(fo,na) {
  var theFolder = DriveApp.getFolderById(fo); // folder with zipped report
  var theFile = theFolder.getFilesByName(na); // gets the contents of the zip file
  var fileBlob = theFile.next().getBlob(); // stores the files for processing
  fileBlob.setContentType("application/zip"); //sets the correct file type for the zip file
  var unZippedFiles = Utilities.unzip(fileBlob);

  // unzips the files into the folder
  for (var i in unZippedFiles) {
  if (unZippedFiles(i).getName() != 'Q4a.csv' 
      && unZippedFiles(i).getName() != 'Q6e.csv'
      && unZippedFiles(i).getName() != 'Q6f.csv'
      && unZippedFiles(i).getName() != 'Q7b.csv'
      && unZippedFiles(i).getName() != 'Q8b.csv'
      && unZippedFiles(i).getName() != 'Q9a.csv'
      && unZippedFiles(i).getName() != 'Q9b.csv') {
    var newDriveFile = DriveApp.createFile(unZippedFiles(i));
    var zipFile = newDriveFile.getId();
    theFolder.addFile(DriveApp.getFileById(zipFile));
    DriveApp.removeFile(DriveApp.getFileById(zipFile));
    }
  }
  // removes file after it has been unzipped
  DriveApp.getFilesByName(na).next().setTrashed(true);
};

// unzips CSV zip file
function unZipItCSV(fo,na) {
  var theFolder = DriveApp.getFolderById(fo); // folder with zipped report
  var theFile = theFolder.getFilesByName(na); // gets the contents of the zip file
  var fileBlob = theFile.next().getBlob(); // stores the files for processing
  fileBlob.setContentType("application/zip"); // sets the correct file type for the zip file
  var unZippedFiles = Utilities.unzip(fileBlob);

  // unzips the files into the folder
  for (var i in unZippedFiles) {
  var csvZipName = unZippedFiles(i).getName();
  if (csvZipName == 'Client.csv'
      || csvZipName == 'Enrollment.csv'
      || csvZipName == 'Exit.csv'
      || csvZipName == 'HealthAndDV.csv'
      || csvZipName == 'Project.csv') {
    var newDriveFile = DriveApp.createFile(unZippedFiles(i));
    var zipFile = newDriveFile.getId();
    theFolder.addFile(DriveApp.getFileById(zipFile));
    DriveApp.removeFile(DriveApp.getFileById(zipFile));
    }
  }
  // removes file after it has been unzipped
  DriveApp.getFilesByName(na).next().setTrashed(true);
};

// imports files into data spreadsheet
function importFile(fiName,foId,spId) {
  var fSource = DriveApp.getFolderById(foId); // folder where csv files are saved
  var fi = fSource.getFilesByName(fiName); // latest report file
  var ss = SpreadsheetApp.openById(spId); // data_sheet_id = id of spreadsheet that holds the data to be updated with new report data

  if ( fi.hasNext() ) { // proceed if csv file exists in the folder
    var file = fi.next();
    var csv = file.getBlob().getDataAsString();
    var csvData = CSVToArray(csv); // see below for CSVToArray function

    // removes the extension from file name
    var fiNameShort = fiName.split('.').slice(0, -1).join('.');

    var sheet = ss.getSheetByName(fiNameShort);

    // loop through csv data array and insert (append) as rows into 'DATA' sheet
    for ( var i=0, lenCsv=csvData.length; i```

covid 19 virus – In which countries can visitors exceed their visa due to the coronavirus outbreak?

Suppose I am a healthy traveler in a country with relatively few cases of COVID-19 and my tourist visa is about to expire. Many countries have introduced travel bans (e.g. all arriving travelers, not just the infected), so that my choice of destinations is quickly limited to my home country. However, if my home country has comparatively more cases of coronavirus disease, it would be in the interest of public health worldwide Not return there and add to the problem.

Are there countries where travelers can exceed their travel visas due to the mitigating circumstances of the coronavirus outbreak?

Otherwise, travelers in countries with relatively fewer cases of COVID-19 will be practically forced to travel to countries with a higher chance of death.

Worksheet function – Excel: Write a formula to determine when values ​​in a range exceed two thresholds

The thresholds are <=-10 (lower threshold) and (upper threshold) >= 10.

The thresholds are only exceeded if the upper threshold is the previous value of a cell <=-10 and the current cell is >= 10. And for the lower threshold, the value in the previous cell is> = 10 and the current cell is <= – 10.

I will now show what it means to cross the upper threshold.

For example, I have the cells:

A1 -6

A2 -98

A3 -83

A4 -74

A5 16

The upper threshold has been exceeded since A4 <=10 and A5 is greater than >= 10.

To exceed the lower threshold, the previous cell must be <= 10 and the current cell <= – 10, as stated above.

All other combinations of values ​​in the previous and current cell cannot exceed the upper or lower threshold.

I tried to use the formula:

IF (AND (A1> = 10, A2 <= – 10), 1, IF (AND (A1<=-10, A2>= 10), 2, IF (AND (A1 <-10, A2)<-10), 3, IF(AND(A1>10, A2> 10), 4, IF (AND (-10 = 10, A2> -10), 7, 8))))))

IF (AND (A1> = 10, A2 <= – 10), 1, IF (AND (A1<=-10, A2>= 10), 2 should represent what the thresholds are made of.

IF (AND (A1 <-10, A2<-10), 3, IF(AND(A1>10, A2> 10), 4, IF (AND (-10 = 10, A2> -10), 7, 8) should represent all combinations of A1 and A2 that do not represent the exceeding of the threshold and the wrong value of 8 should pick up any nonsense.

However, I do not receive enough signals to exceed one of the two threshold values.

I don't know where I'm wrong. I understand that there may be a simpler and more precise formula, but I haven't found one yet.

So I wonder if you could help me. If necessary, I can add further explanations.

Thank you very much.

Why can Java-XMS exceed the available memory when it is in the Docker container?

I am running a Java application in a Docker container and with Java I can specify an -Xms size that goes far beyond the memory available for the container. Why is that?

When I run outside of a container, I get the expected result:

$ free -g; java -Xms100g -version
              total        used        free      shared  buff/cache   available
Mem:             31          14          17           0           0          17
Swap:            28           0          28
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00007f5f60a00000, 71583137792, 0) failed; error='Cannot allocate memory' (errno=12)
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (mmap) failed to map 71583137792 bytes for committing reserved memory.

But when I run the same command in a Docker container

$ free -g; java -Xms100g -version
              total        used        free      shared  buff/cache   available
Mem:              4           0           3           0           0           3
Swap:             0           0           0
openjdk version "1.8.0_222"
OpenJDK Runtime Environment (build 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10)
OpenJDK 64-Bit Server VM (build 25.222-b10, mixed mode)

The command is somehow successful. When you check the JVM parameters, it doesn't look like the container is overwriting the JVM parameters. It looks like Java actually assigned a heap size 25 times larger than the available memory:

 java -XX:+PrintFlagsFinal  -Xms100g -version 2>&1 | grep InitialHeapSize
    uintx InitialHeapSize                          := 107374182400                        {product}

Why does that happen?

Both systems are Ubuntu 18.04.1 LTS (WSL vs FROM ubuntu:18.04) and Java 1.8.0_222. Docker Desktop 2.1.0.3 (38240). Win10 host operating system.

pathfinder 1e – How do I determine the base weapon damage for weapons that exceed the size chart?

So I play a barbarian with a battle ax. Last night, my human (middle-sized) barbarian was magnified by a spell of glory that made his terrible weapon even more devastating.

So we checked the rules for his new base damage. Unfortunately, the table ends at medium-sized 2d6 and becomes 3d6.

Since the medium sized battleaxes already have a 3×6 weapon damage, we tried to identify the pattern of the table that was (at least for us) unclear by 3d6, or it could be 3d10 due to the steps in weapons be with lower base damage.

So the question is:

What is the weapon damage that needs to be rolled here, and what pattern would this identify for weapons that exceed the printed books table?

Server administration, server monitoring, server migration

This is a discussion about 24-hour IT remote support: server management, server monitoring, server migration within the Webmaster Marketplace Forums belonging to the business category; Whether Linux or Windows, server management, server administration, cPanel server management, server migration, server monitoring, VPS management, cloud …

,

Encoding Style – How do I handle long URLs in comments that exceed the maximum length of 80 characters?

Follow an arbitrary rule they said.

It'll be fine, they said.

We have discovered the source of all the perfection that they said.

There can never be anything that violates the rules they have said.

You obviously never wrote code …


A formatting guide is great and helps people answer the same question with a predictable answer.

But – and there is always a but – you write code because it never had to be written that way for that purpose.

That's why it's new, novel (even if it's a non-original copy, paste, and rename), and you've never seen it before.

How would they have a & # 39; rule & # 39; can write that is universally applicable without having considered the entire universe? Note – you could not have …


At best, this limit of 80 characters may be generally useful rule of thumb, And I can see that it has some basis in print media and well formatted documents.

However you forgot something – usefulness, What I mean for the original intention of the rule of thumb Maximum 80 characters.

  • The URL does not work if you manually wrap it in lines by inserting unnecessary spaces.

Which is more professional for a newsreader, a book author or a web designer? It is likely that the link will be word-wrapped at approximately 80 characters, using the media's conventions and standards to alert the reader, or using the available technologies to render the link in a user-friendly manner.

Which is more professional for a programmer?

If you had the choice to hire two programmers:

  • one who has nicely formatted the URL,
  • and one who did not.

But same in every other way. Which one would you hire?

I would hire the one who did not, because he was professional enough to understand the goal by not making life more difficult for the next developer.