Chandu yadav has Published 1276 Articles

JewishToJD() function in PHP

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

14 Views

The JewishToJD() function converts a Jewish date to a Julian day count. It returns a julian day number. Syntax jewishtojd(month, day, year) Parameters month − Specifies the month as a number from 1 to 13 day − Specifies the day as a number from 1 ... Read More

How do I kill all the processes in MySQL “show processlist”?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

3K+ Views

We can kill the processes with the help of the ‘kill’ command. However, you need to kill those processes one by one, since MySQL does not have any massive kill command. To check how many processes exist, use ‘show processlist’ mysql> show processlist; The following is the output. ... Read More

Python program to extract ‘k’ bits from a given position?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

1K+ Views

This function is use to extract k bits from pos position and returns the extracted value. Here we use python slicing technique. Example Input:: number=170 K=5 Pos=2 Output=21 Algorithm Extractionbit(no, k, pos) /*user input number ... Read More

What does it mean by select 1 from MySQL table?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

18K+ Views

The statement ‘select 1’ from any table name means that it returns only 1. For example, If any table has 4 records then it will return 1 four times. Let us see an example. Firstly, we will create a table using the CREATE command. mysql> create table StudentTable ... Read More

How to repair MySQL tables from the command line?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

189 Views

The repair of MySQL tables is only applicable to MyISAM engine type, not for InnoDB. Therefore, we need to change the Engine type to MyISAM. The following is an example. Creating a table mysql> create table RepairTableDemo -> ( -> id int, ... Read More

C++ Program to Implement Priority Queue

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

4K+ Views

The queue which is implemented as FIFO where insertions are done at one end (rear) and deletions are done from another end (front). The first element that entered is deleted first.Queue operations areEnQueue (int data): Insertion at rear endint DeQueue(): Deletion from front endBut a priority queue doesn’t follow First-In-First-Out, ... Read More

How to check internet connection in android?

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

2K+ Views

This example demonstrate about how to check the state of internet connection through broadcast Receiver.Step 1 − Create a new project in Android Studio, go to File ⇒ New Project and fill all required details to create a new project.Step 2 − To find the internet status we have to ... Read More

Python program to split the even and odd elements into two different lists.

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

17K+ Views

In this program we create a user input list and the elements are mixture of odd and even elements. Our task is to split these list into two list. One contains odd number of element and another is even number of elements. Example Input: [1, 2, 3, 4, 5, ... Read More

Python Iterator Types

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

318 Views

In python there is iteration concepts over containers. Iterators have two distinct functions. Using these functions, we can use user defined classes to support iteration. These functions are __iter__() and the __next__(). Method __iter__() The __iter__() method returns iterator object. If one class supports different types of iteration, then ... Read More

Python Text Sequence Types

Chandu yadav

Chandu yadav

Updated on 30-Jul-2019 22:30:23

386 Views

In python the str object, handles the text or string type data. Strings are immutable. The strings are sequence of Unicode characters. We can use single quote, double quotes or triple quotes to define the string literals. ‘This is a string with single quote’ “Another Text with double quotes” ... Read More

Advertisements