It is common to show the date and time on the web or mobile application. As a user, have you ever seen any application which shows the date object as it is? It will never happen because it makes UX worst. So, we need to convert the date object to a string. After converting the date object to a string, we can format it according to our needs. The date format means ‘yyyy-mm-dd’, ‘dd-mm-yyyy’, etc. Also, we can do the same with the time string. We can display the hours, minutes, seconds, and milliseconds according to the need. In this ... Read More
Wireless LANs are those Local Area Networks that use high frequency radio waves instead of cables for connecting the devices in LAN. Users connected by WLANs can move around within the area of network coverage. Most WLANs are based upon the standard IEEE 802.11 or WiFi.IEEE 802.11 ArchitectureThe components of an IEEE 802.11 architecture are as follows1) Stations (STA) − Stations comprise all devices and equipments that are connected to the wireless LAN. A station can be of two types:Wireless Access Pointz (WAP) − WAPs or simply access points (AP) are generally wireless routers that form the base stations or ... Read More
BCNF (Boyce Codd Normal Form) is the advanced version of 3NF. A table is in BCNF if every functional dependency X->Y, X is the super key of the table. For BCNF, the table should be in 3NF, and for every FD. LHS is super key.ExampleConsider a relation R with attributes (student, subject, teacher).StudentTeacherSubjectJhansiP.NareshDatabasejhansiK.DasCsubbuP.NareshDatabasesubbuR.PrasadCF: { (student, Teacher) -> subject (student, subject) -> Teacher Teacher -> subject}Candidate keys are (student, teacher) and (student, subject).The above relation is in 3NF [since there is no transitive dependency]. A relation R is in BCNF if for every non-trivial FD X->Y, X must be a key.The ... Read More
The ERROR 1064 (42000) mainly occurs when the syntax isn’t set correctly i.e. error in applying the backtick symbol or while creating a database without them can also create an error, if you will use hyphen in the name, for example, Demo-Table will result in ERROR 1064 (42000).To remove the error, you need to use backtick around the database name properly or use nothing. Following is the syntax wherein we haven’t used the backtick. This works correctly −create database yourDatabaseName;Since adding hyhen to the database name will result in an error. Let us implement it while creating the database name ... Read More
DFA is the short form for the deterministic finite automata and NFA is for the Non-deterministic finite automata. Now, let us understand in detail about these two finite automata.DFAA Deterministic Finite automata is a five-tuple automata. Following is the definition of DFA −M=(Q, Σ, δ, q0, F)Where, Q : Finite set called states.Σ : Finite set called alphabets.δ : Q × Σ → Q is the transition function.q0 ϵ Q is the start or initial state.F : Final or accept state.NFANFA also has five states same as DFA, but with different transition function, as shown follows −δ: Q X Σ ... Read More
There are several ways to run a script on startup in Linux, depending on your specific distribution and the type of script you are trying to run. Using systemd − On systems that use systemd, you can create a systemd service file for your script and configure it to run on startup. Using cron − You can use the cron daemon to schedule your script to run at startup. You can add a line to the cron table (crontab) to run your script at a specific time on startup. Using init.d − On systems that use the older init.d ... Read More
The main operation performed by operating system is to carries out is the allocation of resources and services, such as allocation of the following −MemoryDevicesProcessorsInformationThe operating system includes programs that are helpful to manage these resources, such as a traffic controller, a scheduler, memory management module, I/O programs, and a file system.Functions of Operating SystemsLet us discuss the function of the operating system (OS) in detail.SecurityThe operating system uses a password protection to protect user data it also prevents unauthorized access to programs and user data, but for external functionality we need to install malware software to protect the system.Control ... Read More
The aim of this article is to implement a program maximum count of characters that can replace? by at most A 0s and B 1s with no adjacent duplicates. Given a couple of integers A and B, both of which that represent the number of 0s and 1s that are accessible, and a string Str with only the special characters "*" and "?" The aim is to determine the greatest number of characters that may be used in the '?' position without causing any neighboring characters to be identical. Example 1 Let us give the input string str = ... Read More
Hermite_e series is also known as probabilist's Hermite polynomial or the physicist's Hermite polynomial. It is available in mathematics which is used to calculate the sum of weighted hermites polynomials. In some particular cases of the quantum mechanics, the Hermite_e series the weight function is given as e^(−x^2). Calculating Hermite_e series The following is the formula for Hermite_e series. H_n(x) = (−1)^n\:e^(x^2/2)\:d^n/dx^n(e^(−x^2/2)) Where, H_n(x) is the nth Hermite polynomial of degree n x is the independent variable d^n/dx^n denotes the nth derivative with respect to x. In Numpy library we have the function namely, polynomial.hermite.hermder() to ... Read More
A Band pass filter is the filter which passes the frequencies within the given range of frequencies and rejects the frequencies which are outside the defined range. The Butterworth band pass filter designed to have the frequency response flat as much as possible to be in the pass band. The following are the specifications of the digital band pass butter worth filter. The sampling rate of the filter is around 40 kHz. The pass band edge frequencies are in the range of 1400 Hz to 2100 Hz. The stop band edge frequencies are within the range of 1050 Hz ... Read More