Tuesday, February 20, 2024

How to create any mathematics tables with excel...

 

Generate any tables with excel...

1.       Go to excel sheet, in first cell ‘A1’ enter the number whose table you want to generate, for example I want to generate table of 19, so write ‘19’ in ‘A1’

2.       In cell ‘B1’ write multiplication sign ‘*’

3.       In cell ‘C1’ write ‘1’ [table starts from 1, or the number from where you want to start]

4.       In cell ‘D1’ write ‘=’

5.       In cell ‘E1’ write the answer '19' ie. ‘19*1=19’



6.       In below row as well from cell ‘A2’ to ‘E2’ repeat just update cell ‘C2’ as ‘2’,  and ‘E2’  as ‘38’ ’ because this row is ‘19*2=38’[here we try to educate excel with our data, so that it can generate further data that you need]



7.       And now select both rows you added data for and just drag down till where you want generate the table




8.       Your table is ready, in this way you can generate table of any number



 


How to add data in cells available in different tabs in excel

 

Adding cells available in different tabs in an excel



·         Suppose we have sheet-1 as ‘Jan’ having ‘Sale in January’ with value as ‘100’

 

·         Similarly we have sheet-2 as ‘Feb’ having ‘Sale in February’ with value as ‘300’


·         Now we want to know the total sale so far of all months, in this example of January and February in the sheet-3 as ‘Total’ having ‘Total Sale’



·          Just double-click on the cell, where you want the sum of the total to appear, ie cell ‘A2’



·         1. Write ‘=’[without quotes, and go to tab ‘Jan’ and click cell ‘A2’, it would appear as below]

 

2. Now, without clicking anywhere else, write ‘+’ at last, in the formula generated

 

3. Now, click on tab ‘Feb’ and click cell ‘A2’ , then the formula would appear as below

 

4. Hit the enter key, you will get the sum of data available in different tabs in excel, as below[100+300=400]:



 

Monday, February 19, 2024

आज की कहानी-- एक पत्थर-सफ़लता कैसे पायें

 

 

सफ़लता कैसे पायें

 

  एक गाँव में, पत्थर से मूर्ति बनानेवाला कारीगर था | 



बगले के गाव से कुछ लोग आये उसे मिलने, और कहा कि वो एक मूर्ति बनाना चाहता है और उसे मूर्ति बनाने की ऑर्डर देते हैं|

 

  जब वो कारीगर एक पत्थर के ऊपर छन्नी-हातोडे से काम करना शुरू करता है, “मुझे मत मारो, मुझे मत मारो,

मुझे छोड़ दो” ऐसी आवाज आने लगती है| कारीगर परेशान होकर ढूंढने लगता है, कि ये आवाज़ कहासे आ रही है| कुछ देर बाद उसकी नज़र उस पत्थर पर पड़ती है, जिस पर वो काम कर रहा था, वो पत्थर उसे कहता है, “मुझे काफ़ी तकलीफ़ हो रही है, क्या तुम कोई और पत्थर पर काम कर सकते हो?”



  कारीगर को पत्थर पर दया आती है और वह दुसरे पत्थर पर काम कर ना शुरू करता है|  दो महिनो बाद गाव वाले मूर्ति लेने आते हैं, और मूर्ति देखकर काफी खुश हो जाते हैं| जैसे ही वो मूर्ति को लेकर जाने लगते हैं, उन्में से एक की नज़र उस पत्थर पर पड़ती है, वो कहता है “क्या आपको इस पथरकी ज़रूरी है? अगर ना हो तो, क्या हम इसे ले जा सकते हैं?” कारीगर ने मन ही मन सोचा...ऐसे भी इसे रख कर कोई फ़ायदा नहीं है, थोड़ी सी तकलीफ से रोने लगता है, मेरे पास रहेगा तो केवल जगह इस्तेमाल होगी, शायद ये लोग इसका ज्यादा ख्याल रखेंगे| यह सोच कर वो उन्हें वो पत्थर दे देता है|

  कुछ सालों बाद वो कारीगर एक गांव से जा रहा होता है, और उसे याद आता है की, उस गांव मैं, उसने एक मूर्ति बनाकर दी थी| जब वो मूर्ति को देखने मंदिर में पोहंच जाता है, तब मंदिर की विशालता, मूर्ति को मिलने वाला आदर-सम्मान, गाँववालों को मूर्ति में दिखाइ देने वाले भगवान, कारीगर इस्से तृप्त हो गया, और वो वहां से जाने लगा| तब उसे याद आया कि उसने इस मूर्ति के साथ एक और पत्थर दिया था, वो कहा है?

  तभी एक श्रद्धालू आता है और भगवान से प्रार्थना करता है और एक पत्थरपर नारियल फोड़ता है| कारीगर उस पत्थर के पास जाता है और, तब उसे पता चलता है कि ये वही पत्थर है| कारीगर उससे पूछता है “कैसे हो? उस वक्त तुम्हें तकलीफ हो रही थी इसलिए मैंने तुम्हें हाथ नहीं लगाया| अब तुम खुश तो हो ना?

  पत्थर बोलता है, “शायद उस वक्त में थोड़ी तकलीफ़ सहन करता तो आज में कुछ और होता, थोड़े से घाव से बचने के लिए, मैंने तुम्हें ना बोला, आज हर कोई इतने सालों से यहां आकर प्रार्थना करता है और मेरे सर पर नारियल फोड़ता है| उस वक्त थोड़ी सी तकलीफ से भाग उठा, अब जिंदगी भर तकलीफ में रहूंगा

 

 

कहानी का भावार्थ/नैतिक : सफलता के रास्ते में अंगिनत तकलीफ़े आएंगी , तकलीफोंका डटकर सामना करना, हार नहीं मानना, सफ़लता तुम्हारी ही होगी|




कहानी अच्छी लगी तो कमेंट करके जरूर बताएं|

 

 

 

Sunday, February 18, 2024

How to remove black background from a copied text

 

Remove black background from a text copied from a website                       

 

·         Below is an example of text copied from a site which has black theme:

Get started for free

Try Webflow for as long as you like with our free Starter plan. Purchase a paid Site plan to publish, host, and unlock additional features.

·         Below possible ways can help to get rid of it

·         Select the text and navigate to ‘Page Layout -> Page Color -> No Color’


OR

·         Select the text and navigate to ‘Page Layout -> Page Borders -> Shading -> Fill -> No Colors-> OK

 

·         Sometimes due to no color, the text might appear invisible, without any clicking anywhere just navigate to ‘Home -> Font Color -> Either Automatic or Black color’

 

·         Below is the output:

Get started for free

Try Webflow for as long as you like with our free Starter plan. Purchase a paid Site plan to publish, host, and unlock additional features.

 



Saturday, February 17, 2024

How to create simple ‘On Screen Keyboard’ tool/batch file

 

How to create simple ‘On Screen Keyboard’ tool/batch file

·         Sometimes keyboard doesn’t work, so you can’t type ‘osk’[On Screen Keyboard] as well.

·         So it’s best to have such tool handy for such unforeseen situation.

·         Open notepad and write ‘C:\Windows\System32\osk.exe’[without quotes]:

·         Save it as osk.bat on desktop:

 

·         Your osk executable file is ready:

·         Now double click this osk.bat file to execute, and your ‘On Screen keyboard’ opens:




 


Friday, February 16, 2024

How to create simple '2-D and 3-D Pie Chart' using 'Excel'

How to create simple 2-D and 3-D Pie Chart using Excel

1.Creating 2-D Pie Chart:

  • For creating chart we need data in excel, so consider below data having , Male count is in cell ‘B2’ and Female count in cell ‘C2’ as below:



  • Select the rows whose Pie Chart you want to create, for example here we select header  ‘B1’ and ‘C1’ as same will reflect as headers or legends in the graph and also select row with cells ‘B2’ and ‘C2’ as it contain required  chart data:

  • With these rows selected, click ‘Insert’:

  • Then under ‘Recommended Charts’ select arrow of circular shape:

   

  •     Under ‘2-D Pie’ select the type of chart you want:


  •  And your 2-D Pie Chart is created, showing Legends ‘Male’ and ‘Female
  •  If you hover with mouse on the chart, you can also find percentage of that data as well:


 

 

 

2. Creating 3-D Pie Chart:

  • Similarly we can create 3-D Pie Chart, consider below data of age groups, from cells ‘B23’ till ‘E23’ which depicts age group from ‘Age 0-14’, ‘Age 15-64’, ’Age 60-64’, and ‘Age 65+’ out of the total population:       

          


 

  •     Select the rows whose chart  you want to create, for example here we select header from  ‘B22’ till ‘E22’ as same reflect as legend/headers in the chart, and also select row from cell ‘B23’ till ‘E23’ as they contain required chart data:


  •      With these rows selected, click ‘Insert’:

 

  • Then under ‘Recommended Charts’ select arrow of circular shape:


 

  •      Select ‘3-D Pie’:


  •     And your 3-D Pie Chart is created, showing legends ‘Age 0-14’, ‘Age 15-64’, ’Age 60-64’, and ‘Age 65+
  •     If you hover with mouse on chart, you can also find percentage of that data as well:

 

  •      Make this more attractive, by clicking on the chart and select the look and feel you want:


  •       And its done:


 

  •      Double click on ‘Chart Title’ and rename it as required, like below:



 

 

 

Thursday, February 15, 2024

Simple time saving excel mathematics hacks

 

Simple excel mathematics hacks that save mammoth amount of time.

1.Addition: 

1.Adding two numbers available in cells ‘A2’ and ‘B2’are as below:

 

2. Just click in cell where you want the addition total, for example column ‘C2’.

3.              3. And write formula ‘=A2+B2’ [without quotes] and hit the enter key.


4.               4. You will get addition of two numbers as below: ‘1+2=3

 

 

 

 

2.Subtraction:

          1. Subtracting two numbers available in cells ‘A2’ and ‘B2’are as below:

           

2. Just click in cell where you want the subtraction total, for example column ‘C2’.

      3. And write formula ‘=A2-B2’ [without quotes] and hit the enter key.


        4. You will get subtraction of two numbers as below: ‘3-1=2’

 

In similar way we can do for Multiplication and Division too, just replace the sign between the numbers and its done!!

 

 



Sunday, July 26, 2020

Part-6: Want to quickly become an Selenium Automation Engineer and build framework right from scratch?


TestNg Configuration and implementation

In Part-5, we modified our simple automation script into a real-time framework pattern wherein we have separate folders for test-cases and helper classes. We also added a few more functionalities to our intended test and executed it further. So now let’s introduce TestNG, the most awaited framework and we will learn the use of pending locators and other framework building stuff. I assure you by the end of this course, you will be able to develop a wide variety of tests.

 

TestNG is a unit testing framework inspired from JUnit and NUnit but introducing some new functionalities that make it more powerful and easier to use, in TestNG, refers to ‘Next Generation’, and it is perfectly equipped with next-generation functionalities, like annotation, report generation showing how many test-case passed or failed or skipped, control your test-cases like running only a few test-cases out of many, add priority to test-cases etc. So let’s not add more huge definition which will confuse more and directly work on it. You can find more on its official documentation.

Let’s install the TestNG plugin in our Elcipse. Open Eclipse, click Help->Install New Software


Enter the site URL as ‘https://dl.bintray.com/testng-team/testng-eclipse-release/’  in as mentioned below and hit enter, you should be able to see ‘TestNG’ as mentioned below:


Once you click on that checkbox, the ‘Next’ button will get enabled, click on it.



After clicking Finish, you might get below prompt, click ‘Install anyway’,


You can also check the progress of the installation.


Click ‘Restart now’. This will install TestNG Plugin in your Eclipse.


So just to check whether TestNG is installed, right-click your project and click ‘Properties’, you should be able to see ‘TestNG’


We will create a class which will house all our test-cases, lets name it as ‘TestClass’ under package ‘testSearch’, you know why we selected this package, because this is the package for test-cases.

As this is a TestNG based test-class, we will not use ‘public static void main(String[] args)’ for both compiling and running the class, but we will use TestNG for the same, we will see further how.


TestNg provides various helper annotations which prove very useful in test-case execution, rather team-up as an end-to-end solution for test-case execution driving. Below are some of the annotations:

No.

Tag Annotations

Comment

1.

@BeforeSuite

To be used when you have to load environment variables.

2.

@BeforeTest

To be used when annotated methods will be executed before each test section declared inside TestNG suite.

3.

@BeforeClass

@BeforeClass the annotated method is executed before any of the test methods of a test class.

4.

@BeforeMethod

@BeforeMethod annotated methods are executed before the execution of each test method for a particular class

5.

@AfterMethod

@AfterMethod annotated methods are executed after  the execution of each test method for a particular class

6.

@AfterClass

@AfterClass the annotated method is executed after the execution of every test methods of a test class.

7.

@AfterTest

@AfterTest the annotated method is executed after the execution of every test section declared inside a TestNG suite.

8.

@AfterSuite

To be used when you have to close/unload  environment variables.


Below are some of the helper attributes TestNG uses:

No.

Helper Attributes

Comment

1.

@Test(dependsOnMethods=(“A,B”)

This test-case will execute once A and B are executed.

2.

@Test(enable=false)

This will disable that particular test-case

3.

@Test(timeout=4000)

Used to increase the timeout of that particular test to 4 seconds before failing

4.

@Parameter(“{URL}”)

This is used to parameterize a test-case. Useful for that particular test only where it is mentioned. Here we mention the URL in testing.xml, eg: <parameter name=”URL” value=”www.abc.com”>

@Test

Public void getData(String str)

{

System.out.println(str);

}

5.

@DataProvider

Used to test a test-case with multiple data.

Eg:

@DataProvider

Public Object[][] getData()

{

Object[][] myObject = new Object[2][2];

myObject[0][0]=”email1”;

myObject[0][1]=”val1”;

myObject[1][0]=”email2”;

myObject[1][1]=”val2”;

}

 

@Test(dataProvider=”getData()”)


Don’t worry, we will cover all of the above with an explanation, while some are self-explanatory. 

So let's dive into our eclipse ‘TestClass’ that we created. To declare any test in TestNG we assign an annotation called ‘@Test’, this tells that this is a test method, and we write our test. For now, for better understanding we just convert our available test into TestNG, as below:

Here I am writing my first test, to initiate the browser, so creating a method browserInitiate(), we already required code from the previous example, so we will copy-paste that content from ‘FirstTest’ class. You can also see when we write ‘@Test’ it gave an error because it cannot recognize that tag, though your eclipse has TestNG plugin, but your project needs that TestNG dependency. 

As we are using Maven, we don’t need to do anything, just search that dependency using below:


Don't use any beta version, use a stable version:


Click on the link and copy the content:


And paste it in your pom.xml under <dependencies> tag and save the pom.xml and ‘TestClass’:


Now again go to the class where you are writing your test-case, ie., ‘TestClass’ and again hover over ‘@Test’, you will now find ‘TestNG’ a related suggestion which was not available earlier, so this came because you imported TestNG related dependency in your project


Click on it and the error is gone. Now if you right-click your TestClass->Run As, you will find ‘Run As TestNG test’ and not as ‘Java Application’:


You will find the same output as earlier, but here you will not write class for every test, but in the same class, you will write many tests and control them. Also, you if you see at the bottom in your eclipse console, you will find, it shows Status ‘PASSED’ for our test: ‘browserInitiate’, also it shows descriptive data of failures/skips, for which we have not written any code, but TestNG has provided that data.


Now as we need to plug-and-play with our tests, we need to have testng.xml file which is not available yet, so to get it right click your project-> TestNG->Convert to TestNG:


You will find below details, which are Suite Name, Test name, and class name in which you are doing below test. Click Finish[You can change the details as per your needs also]


Now in your package explorer, you will find testing.xml


Double click that file, click ‘source’ and verify the details that you entered:


Henceforth we will be using TestNG for our further part of our exciting test-case, we will use all the possible annotations in the same simple way, and I guarantee you that, you will master TestNG.

Don’t miss the next important article on TestNG annotation implementations and Cucumber available on Amazon Kindle

-Sanjay Nikalje



How to create any mathematics tables with excel...

  Generate any tables with excel... 1.        Go to excel sheet, in first cell ‘A1’ enter the number whose table you want to generate, for...