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...

Linux lists the top 10 of memory /cpu usage.

MemoryThe first 10 lines of usage # ps aux | head -1;ps aux | grep -v PID | sort -rn -k +4 | head CPUThe first 10 lines of usage # ps aux | head -1;ps aux | grep -v PID | sort -rn -k +3 | head ps aux | head -1 The name of a field is displayed first. grep -v PID Remove field names sort -rn -k +4Sorting according to fourth columns head Acquiescence the first 10 rows.  

Low pass filtering

Low-pass filter is a kind of filtering method, the rule is that the low-frequency signal can pass through normally, and the high-frequency signal beyond the set threshold is blocked and weakened. But the amplitude of blocking and weakening will vary according to different frequencies and different filtering programs (purposes).It is sometimes called high-cut filter or treble-cut filter. Low pass filtering is the opposite of high pass filtering.   Chinese name Low pass filtering Foreign language name low pass filtering Opposite side High pass filtration Class type A filtering method ...

High frequency filter circuit

In the circuit, a large capacity electrolytic UNL2003ADR capacitance Cl is connected in parallel with a small capacitance C2. Cl is a large capacity filter capacitor of lOOOyF, C2 is a small capacitor of only O. OlyF, which is a high frequency filter capacitor for filtering high frequency components.This large and small capacitance parallel circuit is very common in the power supply circuit. Editor’s summary Catalog 1circuit analysis 2fault analysis   circuit analysis/High frequency filter circuit editing high frequency filter circuitAtlas [1] (1)The power circuit recti...

Pop-up window Session is lost and duplicated submission form is prevented.

First, pop-up window Session lost. Popup window Session lostUsing window.showModalDialog to prompt information is quite convenient and easy to control appearance and layout. But there is a serious problem, that is, Session is missing. When showModalDialog is performed on the A page, the ejected moduleWhen the state window opens a new page or new dialog (), it gets no Session in the A page, which severely limits its scope of use.Further use of the mode window shows that the loss of session always follows the refresh of the page.1.All page sessions in the process are lost when a mode window pop...