Articles on Trending Technologies

Technical articles with clear explanations and examples

How to perform vertical scrolling of a webpage with Javascript executor in Selenium with python?

Debomita Bhattacharjee
Debomita Bhattacharjee
Updated on 28-Jul-2020 616 Views

We can perform vertical scrolling of a webpage with Javascript executor in Selenium. Javascript is a language used for scripting and runs on the client side (on the browser). Selenium gives default methods to work with Javascript.Syntaxdriver.execute_script("window.scrollTo(0, document.body.scrollHeight);")There are couple of methods of working with Javascript −Javascript execution at document root level.In this process, we shall identify the element with locators (class or id) and then perform the required action on it. Then execute_script() method is called and the Javascript is passed as a string to it.Syntaxjavas = "document.getElementsByName('user-search')[0].click();" driver.execute_script(javas)Please note, we have used getElementsByName('user-search')[0]. The functions like getElementsByName and ...

Read More

Maximum array sum that can be obtained after exactly k changes in C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 28-Jul-2020 779 Views

We are given with an array of positive and negative integers and a number K. The task is to find the maximum sum of the array after K changes in it’s elements. The single change operation here multiplies the single element by -1.Approach used will be to convert every negative number to positive. If there are N negative numbers then, for this we will sort the array −If NK then change the sign of K negative numbers and add the array. Sum will be maximum.InputArr[]= { 0, -2, 6, 4, 8, 2, -3 } K=4OutputMaximum array sum is : 25Explanation ...

Read More

Sets of pairs in C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 28-Jul-2020 8K+ Views

Set in C++ is an associative container and contains unique elements. All the elements once added to a specific cannot be modified. One can only remove and add elements in order to change them.Pair is defined under header and is used to couple together two pair values. The pair can have values of different or same type. The class has member functions first() and second() to individually access the values in a pair.The order of pair elements is fixed (first, second). We can use pair to combine two heterogeneous values of different types.To access any element we use variable_name.first ...

Read More

Count columns to be deleted to make each row sorted in C++

Sunidhi Bansal
Sunidhi Bansal
Updated on 28-Jul-2020 171 Views

The abnormal behavior of C++ programs often leads to program crash. You may have encountered problems like Segmentation fault, Aborted, Floating point exception etc. Following are sample programs that may help you to understand the reasons for a C++ program crash.ExceptionsExceptions in C++ are responses of a program when it encounters an abnormal condition. The program crashes due to such exceptions if they are not handled properly using try-catch blocks. Following program crashes due to divide by zero exception −Example#include int main(){    int num1=10;    int num2=0;    int quotient=num1/num2;    printf(" Quotient is: %d", quotient);    return ...

Read More

How to test remote computer connectivity using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 28-Jul-2020 3K+ Views

To test the remote connectivity using PowerShell Test-Connection command is used. PowerShell also supports the Ping command and both the commands are almost produce the same output but Test- Connection cmdlet supports advanced parameters. See how both commands output look.Ping Command −PS C:\Temp> ping Test1-Win2k16 Pinging Test1-Win2k16 [192.168.0.108] with 32 bytes of data: Reply from 192.168.0.108: bytes=32 time Test-Connection Test1-win2k16 Source    Destination    IPV4Address    IPV6Address ------    -----------    -----------    ----------- ADDC    Test1-win2k16    192.168.0.108 ADDC    Test1-win2k16    192.168.0.108 ADDC    Test1-win2k16    192.168.0.108 ADDC    Test1-win2k16    192.168.0.108You can reduce the number of checks using ...

Read More

How to enable / Disable Enhanced Protection Mode in Internet Explorer using PowerShell?

Chirag Nagrekar
Chirag Nagrekar
Updated on 28-Jul-2020 1K+ Views

Internet Explorer (IE) supports the enhanced protection mode for more security of the browser and the same can be enabled/disabled using PowerShell. Let see when we can find this setting in IE.Internet Explorer → Internet Options → Advanced → Enable Enhanced Protection ModeWe can modify this setting using PowerShell and for that registry settings need to be done. Registry value can be found under Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main and the key name is Isolation for enhanced protection mode.PMIL – To disable IE enhanced protection ModePMEM – To Enable IE enhanced protection modeTo make the changes using the script.Enable IE EP modeIf there ...

Read More

Distinguish between contribution margin and gross margin.

Mandalika
Mandalika
Updated on 27-Jul-2020 224 Views

The major differences between contribution margin and gross margin are as follows −Contribution MarginIt is used by pricing decision (whether product line is making profits or not).Contribution margin = difference between sales and variable costs divides by sales.It analyses profit metric per item.Only variable cost is considered for calculations.It determines the margin for production, where only variable costs are present.It detects variable costs and its percentage included in margin.It is useful for multiple scenario analysis.Gross MarginWhether production cost is covered by its sales or not.Gross margin = difference between revenue and Cost of goods sale/revenue.It analyses total profit metric.It considers ...

Read More

Differentiate between share outstanding and float.

Mandalika
Mandalika
Updated on 27-Jul-2020 144 Views

The major differences between share outstanding and float are as follows −Share OutstandingThese are shares held by stakeholders, company officials and investors in public domain.Contains both stock float and restricted shares.Contains all shares of company held by its investors.It is used to calculate market capitalisation and earnings per share (EPS).It provides voting right and ownership right.Private or public limited company will issue these kinds.It has low risk.FloatIt is share issued by company to public and available to investors for trading in stock market.Contains only float stock.It is available for public.It acts as determinant of financial calculations.Won’t provide voting right and ...

Read More

Write the difference between discount rate and interest rate.

Mandalika
Mandalika
Updated on 27-Jul-2020 398 Views

The major differences between discount rate and interest rate are as follows −Discount RateFederal reserve banks charges to depository institution/commercial banks on its overnight loans.Central banks decide the rate.It is not determined by market rate of interest.It determines present value of future cash flows.It focuses on investors view.The demand and supply has no effect on discount rate.Interest RateIt is an amount charged by lender to a borrower for use of assets.Commercial banks decide the rate.It depends on market rate of interest, creditworthiness etc.It can’t determine present value.It focuses on lender’s view.The demand and supply has effect on interest rate.

Read More

Compare between Return on invested capital (ROIC) and Return on capital employed (ROCE).

Mandalika
Mandalika
Updated on 27-Jul-2020 250 Views

The major differences between ROIC and ROCE are as follows −ROICROIC refers to Return on invested capital.It aims to find the return relative to capital which is invested in business.It evaluates profitability by considers only capital invested in the business.ROIC = Net operating profit/invested capital.Company said to be profitable, if ROIC is greater than zero.Measures after tax.It is more important for an investor.ROCEROCE refers to Return on capital Employed.Its main aim is to find return relative to total capital employed.It had very broad scope.ROCE = net operating profit/capital employed.Company said to be profitable, if ROCE greater than cost of capital.Measures ...

Read More
Showing 51851–51860 of 61,297 articles
Advertisements