Format of Python3

  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 print('{0},{1}'.format('zhangk', 32))   print('{},{},{}'.format('zhangk','boy',32))   print('{name},{sex},{age}'.format(age=32,sex='male',name='zhangk'))   # Format qualifier # It has a rich "format qualifier" (grammar is {} with: number), for example:   # Filling and aligning # Filling is often used with alignment. # ^、<、>They are center, left alignment, right alignment, and back width. # :The character that is filled with the back of the number can only be one charact...

Linear table 1

1、Linear table (LIST)Forms of expression Consisting of zero or more data elements.aggregate Data elements in positionIn orderPermutation The number of data elements isfiniteA Data elementtypeMustidentical   2、Properties of linear tables a0For the first element of a linear table, there is only one successor. an-1 For the last element of a linear table, there is only one precursor. Except a0And an-1 The other elements are precursors and post drives. Direct support for itemized access and sequential access   3、Some common operations of linear tables Create a linear table ...

The difference between throws and try catch

1.throwsIt means that the method throws an exception that needs to be handled by the caller. If it doesn’t want to be handled, it will always be thrown outward, and finally it will be handled by the jvm. 2.try catch It is to catch the exception thrown by others, and then deal with it in catch. In general, the second case is better, so that the cause of the anomaly can be clearly seen and corrected.

Write a list inversion algorithm.

You never know how low you are before you get hit in an interview. In fact, it’s not that you’re less skilled than others. It’s just the skills of the interview. When you go to a big company for an interview, you’ll ask your algorithm if you think it’s OK after a few words. The algorithm is not very useful in normal work, but it can be tested.Personal ability, first of all, write a list inversion algorithm. public ListNode reverseList(ListNode head) { ListNode first = null; ListNode current = head; ListNode next = null; while(...

Selenium Webdriver automated testing development common problems (C# version) VS

1:SeleniumBrowser operation inFirst, generate a Web object.IWebDriver driver = new FirefoxDriver ();/ / open the specified URL address.Driver.Navigate ().GoToUrl (@ @ http://12.99.102.196:9080/corporbank/logon_pro.html);/ / close browserDriver.quit ();In the process of compatibility test of Internet banking browser, when the browser is closed, there will be a dialog box. The solution to this problem is as follows:Public void logout (){System.DiagnosticS.Process[] myProcesses;MyProcesses = System.Diagnostics.Process.GetProcessesByName (“IEXPLORE”);Foreach (System.Diagnostics.Proce...

Java intermediate buffer variable mechanism

int count = 0 ; int num = 0 ; int i ; for (i = 0 ; i <= 100; i++){ num +=i;// countFirst assign, each assignment is 0, after + +, intermediate buffer variable mechanism. count = count++ ;//Running count++ is valid value every time.// count++; System.out.println(num+ "*" + count +" = "+ count * num ); } System.out.println( "Finally: "+ count * num";Running result  

Celery framework learning notes

Producer consumer mode In the actual software development process, we often encounter the following scenarios: one module is responsible for generating data, which is handled by another module (here the module is generalized, can be classes, functions, threads, processes, etc.). The module that produces data is known as the producer in an image; and the module that processes the data.Chunks are called consumers. The only way to abstract producers and consumers is not enough to be a producer consumer model. The model also needs a buffer between producers and consumers as an intermediary. The p...