Script to place duplicate Google sheet beside the sheet it copies (instead of the end)

Is there any way to modify my script to have the sheet it’s copying insert the new sheet immediately to the right of the one it’s copying? I have tons of tabs in the file, and it’s starting to get really annoying to scroll all the way over to the end every time I create a new one.

function duplicateProtectedSheet() {   var ss = SpreadsheetApp.getActiveSpreadsheet();    sheet = ss.getSheetByName("Jun 24");   sheet2 = sheet.copyTo(ss).setName("Jun 30");    var p = sheet.getProtections(SpreadsheetApp.ProtectionType.SHEET)[0];   var p2 = sheet2.protect();   p2.setDescription(p.getDescription());   p2.setWarningOnly(p.isWarningOnly());     if (!p.isWarningOnly()) {     p2.removeEditors(p2.getEditors());     p2.addEditors(p.getEditors());     // p2.setDomainEdit(p.canDomainEdit()); //  only if using an Apps domain    }   var ranges = p.getUnprotectedRanges();   var newRanges = [];   for (var i = 0; i < ranges.length; i++) {     newRanges.push(sheet2.getRange(ranges[i].getA1Notation()));   }    p2.setUnprotectedRanges(newRanges);     var protections = sheet.getProtections(SpreadsheetApp.ProtectionType.RANGE);   for (var i = 0; i < protections.length; i++) {     var p = protections[i];     var rangeNotation = p.getRange().getA1Notation();     var p2 = sheet2.getRange(rangeNotation).protect();     p2.setDescription(p.getDescription());     p2.setWarningOnly(p.isWarningOnly());     if (!p.isWarningOnly()) {       p2.removeEditors(p2.getEditors());       p2.addEditors(p.getEditors());       // p2.setDomainEdit(p.canDomainEdit()); //  only if using an Apps domain     }   } }   

My code seems to count the number of identical char if the char are beside each other. Why doesn’t it work if they are not? [on hold]

static void Main() {     Console.WriteLine(DuplicateCount("aabBcde"));     Console.WriteLine(DuplicateCount("Indivisibility"));  }  public static int DuplicateCount(string str) {      str = str.ToUpper();     int count = 0;     for (int i = 0; i < str.Length - 1; i++)     {         if (str[i] == str[i+1])         {             count++;         }     }     return count;  } 

My code works on the first string “aabBcde” but on the second string it produces ‘0’ instead of counting ‘1’ for ‘i’. Can someone help me with the error in why it only counts the identical char beside each other. I am new to C# so I am not familiar with Linq or the likes. Thanks.

What internet browsers are able to provide text wrapping (fitting the screen) when zooming (beside Opera)?

I am not sure I am using the proper terms, therefore I will exemplify them with screenshots. Please help me improve my terminology if I am wrong.

(I’m not sure Browser which always allows scale/zoom? is about the same topic, as I don’t grasp the meaning of terms like ” viewport metatag parameters user-scalable” and “meta viewport tag”.)


Taking a Wikipedia page:

enter image description here

Simply zooming it – whether with forced zoom enabled or not – would give this (like in Chrome), where the font size appears larger but the text body is not seen in its entirety, as it doesn’t fit the screen:

enter image description here

while what I would like to see would be this – what I call text fit or text wrap, where the font is enlarged without losing the entirety of the text body, which in this case fits the screen:

enter image description here


I know this is available in Opera. I would like to know what other browsers have this feature.

How can I shoot time lapses with Nikon P900 beside the built-in 10 seconds programs?

I’m sweating blood to find any product or how-to to make time lapses with my Nikon P900. It seems to me, that my only option is to use the built-in time lapse modes, which sucks. I mean, it shoots in 2MP and the result is horrible. I’ve tried the interval mode as well, but the smallest interval is 30 seconds. I need simply a tool, to remotely shoot a picture like every 3 seconds and I gonna make a video after that from the separate images. The problem is I neither was able to find any shutter release compatible with P900 that can do this job. I’ve contacted a photographer shop and they also said that there is no compatible product for P900. Can you recommend me anything please?

Slim Fit 180 kind of be healthier a lot of people will you know say oh he’ll talk beside chemicals a

Slim Fit 180 etc okay but it's sustainable it is sustainable in my diet and it's not gonna like completely throw me off track tip number five is do not be letting other people and I say this because I feel like sometimes like for example Ruben has lost weight in this thing too right and he's my husband and I love him so much but I don't rely on him to be like my like fitness partner Ruben does not count macros oh he did was cut out…

Slim Fit 180 kind of be healthier a lot of people will you know say oh he'll talk beside chemicals a