How to make a loop in python, unittest, selenium code?

Following the code, how to proceed in a loop to always repeat the same fill N times? Or even take the names of a .txt list and complete them in "name"?

def teste(self):
    driver = self.driver
    driver.find_element_by_name("nome").send_keys("Teste de preenchimento")
    self.assertEqual("Existe um teste pra este email cadastrado em: 28/03/2019", self.close_alert_and_get_its_text())

In addition to the unit test:

if __name__ == "__main__":

Server 2012 MS Update causes a boot loop: how to stop or diagnose?

Run an EC2 instance with server 2012. Windows is configured to install updates automatically. Not sure which update is causing it, but it was installed after December 1. When this update restarts the server, the server enters a boot loop where it works again for 20 seconds and then falls again. I can't RDP for this given the short window. Restoring the root drive to the December 1 version works, but with automatic updates installed, I'm afraid it will fail again. I am turning off automatic updates for now.

Here is a screenshot of the 12/1 disk version and "Check for updates" was run. There are 2 "important" ones, which I suppose are the only ones that are installed automatically, and 3 options.

html: loop a local mp4 file with the Chrome browser

I am trying to set up a screen for work, and I have an mp4 file saved on my C: drive that I would like to play in a loop.

However, the only mp4 player I can install is the Google Chrome browser, and there seems to be no simple way to play the video.

Can anyone suggest a simple way that I can do this?

Thank you

Android: how to avoid the deep link loop (re-open the mobile application) from a browser redirect?

We have a mobile application and a website. Users receive emails with links to the website pages.
We use the universal iOS link and the Android application link to associate the mobile application with the website.

Let's say the link in the email is https: // abc / ticket / 1234.
When users touch the link, the corresponding page opens in the mobile application. Users can open the same content on the website by touching a button on that mobile page. Open the relevant page on the website. We do not open the URL https: // abc / ticket / 1234 directly. This is because the user was authenticated first through an IDP and then redirected to the correct page. The URL is something like this: https: //abc.idp? Token = xyz & redirect = https: // abc / ticket / 1234.

Here is the problem.

  1. The user touches the link https: // abc / ticket / 1234 in the email.
  2. The mobile application page opens.
  3. The user touches the "Open in the portal" button on the mobile page.
  4. https: //abc.idp? token = xyz & redirect = https: // abc / ticket / 1234 opens in the browser. (This is because the user must first authenticate through IDP).
  5. After a few seconds, the user is authenticated and the browser is redirected to https: // abc / ticket / 1234
  6. The mobile application opens again <— we don't want this. We need to open it in the browser itself.


We need to tell the operating system if you should open the application or the browser from the same link.

We plan to pass an additional parameter with the URL https: // abc / ticket / 1234? Do_not_open_mobile_app = true but it is not possible to use query parameters for URL comparison in the Apple application site association file. Then we tried to enable deep links for the IDP too, then it worked fine on Android, but not on iOS.

I appreciate your contributions.

blender: the root bone was not rotated, but after being imported into Unity, the animations were rotated and do not match the loop

I made 9 animations in Blender and passed the humanoid type configuration (I used rigify).

All animations do not move the root bone (the position / rotation / scale of the root bone is blocked), however, when I imported my model to Unity and played the animation, some of them rotate at a certain angle, it does not look forward.

enter the description of the image here

And one of my animations has a really serious problem, when I play a preview animation, every time the animation ends, it turns permanently like a clock bar tick.

There are also some problems that the loop matching of some options has a red signal.

enter the description of the image here

I read this document:, so I tried to fix this manually by adjusting the timeline, but changing the timeline cut my animations. How do I solve this without cutting the animation?

He used Blender 2.78b and Unity 2018.3.

applescript: incorrect validation loop for iMessage

I am trying to make a number checker in iMessage. We all know that there is no such API, so I am trying to use the available tools. The principal dealt with past issues on this site on this subject.

I made a loop that inserts a number in a string, and by the color of the number (blue – registered, red – missing), using the standard Digital Colors Meter utility determines the color of the number. Then, depending on the color, add a variable with an initial txt file number to the new one or start the script from the beginning. At least it should be.

But something goes wrong in the loop. Check the color, insert numbers, everything is fine, but apparently the wrong condition, apparently the wrong data types. Insert different numbers in the scatter. Some will be inserted, others not, regardless of the initial condition. What could be the reason? Where this error?

    tell application "Digital Color Meter" to activate
    tell application "System Events"
        tell process "Digital Color Meter"
            click menu item 1 of menu 1 of menu bar item 4 of menu bar 1
        end tell
        do shell script "/usr/bin/python -c "import objc;bndl = objc.loadBundle('CoreGraphics', globals(), '/System/Library/Frameworks/ApplicationServices.framework');objc.loadBundleFunctions(bndl, globals(), (('CGWarpMouseCursorPosition', 'v{CGPoint=dd}')));CGWarpMouseCursorPosition((" & 1002 & "," & 222 & "));""
        set rgbColors to words of (the clipboard)
    end tell
    if rgbColors is equal to {"77", "39", "38"} then
        exit repeat
        do shell script "echo " & quoted form of n & " >> /Users/oneone/Desktop/base2.txt"
    end if

Only the color verification condition for Digital Color Meter is presented here.
Through the shell, the color is read at the mouse position and the variable is added to the new file.

loop over certain elements in an array in javascript

I have a great variety of points like this:

        latlngs: [
      [3.063895, 50.636767],
      [3.06339, 50.637233],
      [3.063309, 50.637278],
      [3.063254, 50.637288],
      [3.063103, 50.637267],
      [3.061939, 50.636762],
      [3.059679, 50.635821],
      [3.056687, 50.634532],
      [3.067972, 50.628265],
      [3.068189, 50.628169],
      [3.068389, 50.628159],
      [3.06959, 50.628201],
      [3.075613, 50.629068],
      [3.077604, 50.629383],...
      // 4500 array more

And I would like to make a loop in one of the elements n so that the calculation is less intense. For example, I would like to make a loop in 1 of 6 elements. What would be the best way to do that?

javascript: using the JS object in HTML, when trying to create an HTML loop

CSS is not necessary, since my main focus is the interaction between HTML, JS and external resources.

I implemented a carousel that would be edited to consume more than 100 lines, so I thought about using a JS object to hold the data, then link it to the HTML and display it there.

I have a "simple" HTML file and a JS file that includes the declaration of an object full of currently useless data.

In HTML, I have implemented a carousel using Bootstrap. I gave two HTML examples of what I should show, before trying to use JS to do the same.

The HTML examples worked perfectly. JS's attempts were completely empty.

For some reason, document.write() It doesn't work on StackExchange at all.

I implemented this code on a website called, the output and the code can be seen here:
The code can be branched, allowing you to edit it yourself.

var Review =
	Content:("NULL","Quote","Use strict","Quote"),
	background-color: #242b40;

	font-family: "Times New Roman";
	font-size: 20px;
	color: #eee;
	text-align: center;
	/*font-family: "Comic Sans Ms";*/
	text-shadow: 1px 1px 1px #000;

	background-color: #75a193;
	color: #fff;

	color: #FF0;






boot loop – 8227L Main unit without physical bootloop buttons

After successfully rooting my device, I decided to update the SuperSU binary files and unfortunately I ended up with bootloop After many tests and errors, I finally managed to open Recovery Mode but since my unit has no physical buttons, I can't navigate it. The usb keyboard connection does not work. The long / short reset button does not press any (confirm Reboot option that is initially highlighted). I tried Wipe data/Factory reset through ADB but every time I enter adb shell I receive an error:

exec '/system/bin/sh' failed: No such file or directory

Any ideas how to navigate the recovery menu or deal with this error? I'm stuck…

procedure programming – loop problem for

I have a question. Why in my result j started from 2? I write another loop but start 1 I confused, I need help

 k = 36;
x = 0.15;
in = {{0, 42}, {12, 45}, {24, 88}, {36, 272}, {48, 342}, {60, 
    288}, {72, 240}, {84, 198}, {96, 162}, {108, 133}, {120, 
    110}, {132, 90}, {144, 79}, {156, 68}, {168, 61}, {180, 56}, {192,
     54}, {204, 51}, {216, 48}, {228, 45}, {240, 42}};
n = Length(in);
Qin = Interpolation(in);
For(i = 1, i <= n, i++, 
  If(in((i, 2)) >= in((i + 1, 2)), deltT = in((i, 1))/5); 
  If(deltT != 0, Break()));
c1 = (deltT/k - 2*x)/(2*(1 - x) + deltT/k);
c2 = (deltT/k + 2*x)/(2*(1 - x) + deltT/k);
c3 = (2*(1 - x) - deltT/k)/(2*(1 - x) + deltT/k);
c = c1 + c2 + c3;
input = {};
deltTplus1 = 0;
deltTplus2 = 0;
For(i = 1, deltTplus2 < in((n, 1)), i++,
  deltTplus2 = deltT + deltTplus2;
  If(i == 1, AppendTo(input, in((i, 1)))); 
  AppendTo(input, deltTplus2));
For(i = 1, deltTplus1 < in((n, 1)), i++,
  deltTplus1 = deltT + deltTplus1;
   If(i == 1, AppendTo(input, in((i, 2)))); 
  AppendTo(input, Qin(deltTplus1)));
input = Transpose(Partition(input, i));
n = Length(input);
y = {"j", "Qout", "Q"};
Qout = 0;
Q = input((1, 2));
Reap(For(j = 1, j <= n, j++; Sow(j);
      If(j + 1 == n, 
       Q = (input((j + 1, 2)))*c1*0.25 + (input((j + 1, 2)))*c2 + 
         Qout*c3; Qout = Q; Sow(Qout); Break());
      Qout = Q;
      Q = (input((j + 1, 2)))*c1 + (input((j, 2)))*c2 + Qout*c3;
       Sow(Q));)((2, 1))~Partition~3;
g = %;
Join({y}, g) // Matrix Form 

(! ((1):

I need help