Skip to main content

Posts

Showing posts from April, 2022

Sin wave - Colab - Git

 if you want to run the code in python to improve your skills please use the colab link for the code where data is plotted using matplot lib. enjoy python !!!.     get the code and collab link from here - https://github.com/naveez-alagarsamy/matplotlib reference - https://matplotlib.org/stable/plot_types/basic/plot.html   still facing issue in running the code  no worries - run the code in your local machine -  import matplotlib.pyplot as plt import numpy as np x = np.array([0,3.14/4, 3.14/2,3.14, (3.14/2)+3.14, (2*3.14)]) print(x) y = np.sin(x) print((y)) # make data # plot fig, ax = plt.subplots() ax.plot(x, y, linewidth=2.0) ax.set(xlim=(0, 50), xticks=np.arange(0, 20),        ylim=(-2, 2), yticks=np.arange(-2, 2)) plt.show() 

Cos wave

 Here is an example of a cos wave  consider x as theta (pi) y = cos x , function for cos wave plot data for x = [0, 45, 90, 180, 270, 360] for  x =0 , y  = cos 0 = 1 x =45 , y =cos 45 = 0.707 x= 90 , y = cos 90 = 0 x = 180 , y  = cos 180  = -1 x = 270 , y = cos 270 = 0  x = 360  , y= cos 360 = 1 so what is the use of this wave , when datas take the cos wave pattern can be used to predict output for the inputs. To understand more use calculator with scientific mode and check for the  input x on the graph and the corresponding y graph value which is a cos function it should  match . Pattern are useful in machine learning problems ,for more check out the machine learning posts.

Sin wave

  here is the depiction of sin wave The x axis is the time y axis is function y = sin x The idea here is to plot data in a x,y graph to show how the value of theta(Pi) creates a sin wave. dont worry too much will go thru the data for x and y for  x =0  ,y= sin0 =0  consider 0 as o degree x =45  ,y= sin pi/4 = sin 45 = 0.707 x=90  ,y = sin pi/2 = sin 90 = 1 x= 180 , y = sin pi = sin 180 = 0 x= 270 ,y = sin 270 = -1 x = 360 , y = sin 360 = 0   this is how the sin wave is formed for the data [0, 45, 90, 180, 270, 360]   ok what is the use of the sin wave ? we can do manipulation of data on a sin wave to get 1.Amplitude 2.Frequency  Alright we have to go thru some samples for the understanding of real world examples.   please check - 'Sin wave - Colab - Git ' space for python code.  

Web application using struts 1.0

 usage of struts has been stopped long back due to the introduction of new java frameworks. if still interested in learning struts please go ahead for the tutorial. 1.Front end will be JSP 2.client validation - javascript 3.controller - spring 4.any RDBMS 5.design pattern - service locator pattern , singleton pattern(spring beans) ,delegate pattern. 6.any webserver - Tomcat 7.Architecture is an MVC Model View -JSP Controller - which is a servlet ,in struts this would be ActionServlet.