Articles on Trending Technologies

Technical articles with clear explanations and examples

Scraping and Finding Ordered Word in a Dictionary in Python

karthikeya Boyini
karthikeya Boyini
Updated on 26-Jun-2020 728 Views

For solving this problem we need requests module.For installing requests module, we need this command to get executed at command line.pip install requestsScrapingImport requests module.Then we need to fetch data from URL.Using UTF-8 decode the text.Then convert string into a list of words.Ordered FindingTraverse the list of words using loop.Then compare the ASCII value of adjacent character of each word.If the comparison is true then print ordered word otherwise store the unordered word.Example codeimport requests    def Words_find():       my_url = ""#put thisurl of .txt files in any website       my_fetchData = requests.get(my_url)       ...

Read More

Page Rank Algorithm and Implementation using Python

karthikeya Boyini
karthikeya Boyini
Updated on 26-Jun-2020 6K+ Views

The PageRank algorithm is applicable in web pages. Web page is a directed graph, we know that the two components of Directed graphsare -nodes and connections. The pages are nodes and hyperlinks are the connections, the connection between two nodes.We can find out the importance of each page by the PageRank and it is accurate. The value of the PageRank is the probability will be between 0 and 1.The PageRank value of individual node in a graph depends on the PageRank value of all the nodes which connect to it and those nodes are cyclically connected to the nodes whose ...

Read More

Does MySQL foreign_key_checks affect the entire database?

Arjun Thakur
Arjun Thakur
Updated on 26-Jun-2020 5K+ Views

The foreign_key_checks are session based. Now, we can say that they are for scope i.e. local or global. Here is an example demo of local or global. Both are scopes and we can set this for session.Let us set the scope −mysql> set foreign_key_checks = 0; Query OK, 0 rows affected (0.00 sec) mysql> set global foreign_key_checks = 0; Query OK, 0 rows affected (0.05 sec)The foreign_key_checks variables are server system variables. Here are some more details −PropertyValueSystem Variableforeign_key_checksScopeGlobal, SessionDynamicYesTypeBooleanDefault ValueONSetting foreign_key_checks to 0It affects data definition statements: DROP SCHEMA drops a schema even if it contains tables that have ...

Read More

Different Methods to find Prime Number in Python

Samual Sam
Samual Sam
Updated on 26-Jun-2020 1K+ Views

First we need to know what a prime number is.A prime number always a positive integer number and divisible by exactly 2 integers (1 and the number itself), 1 is not a prime number.Now we shall discuss some methods to find Prime Number.Method1Using For loopsExampledef primemethod1(number):    # Initialize a list    my_primes = []    for pr in range(2, number):       isPrime = True    for i in range(2, pr):    if pr % i == 0:       isPrime = False    if isPrime:       my_primes.append(pr)    print(my_primes) primemethod1(50)Output[2, 3, 5, 7, 11, ...

Read More

Is it possible to use UPDATE query with LIMIT in MySQL?

Chandu yadav
Chandu yadav
Updated on 26-Jun-2020 11K+ Views

Yes, it is possible to use UPDATE query with LIMIT in MySQL. Let us see how.For our example, we will first create a table. The CREATE command is used to create a table.mysql>CREATE table tblUpdateLimit -> ( -> id int, -> name varchar(100) -> ); Query OK, 0 rows affected (0.53 sec)Records are inserted with the help of INSERT command.mysql>INSERT into tblUpdateLimit values(1, 'John'); Query OK, 1 row affected (0.54 sec) mysql>INSERT into tblUpdateLimit values(2, 'Carol'); Query OK, 1 row affected (0.12 sec) mysql>INSERT into tblUpdateLimit values(3, 'Smith'); Query OK, 1 row affected (0.10 sec) mysql>INSERT into ...

Read More

How to check similarity between two strings in MySQL?

Arjun Thakur
Arjun Thakur
Updated on 26-Jun-2020 2K+ Views

Similarity between two strings can be checked with the help of ‘strcmp()’ function. Here are the conditions.If both strings are equal, then it returns 0.If first string is less than the second string, it returns -1.If first string is greater than the second string, it returns 1.Here is an example.Case 1 − If both strings are equal.The following is the query.mysql > SELECT STRCMP("demo", "demo");The following is the output of the above query.+------------------------+ | STRCMP("demo", "demo") | +------------------------+ | 0 ...

Read More

How to escape single quotes in MySQL?

Chandu yadav
Chandu yadav
Updated on 26-Jun-2020 590 Views

We can escape single quotes with the help of the SELECT statement. For instance, when single quotes are encountered in a name, eg. “Carol’s”.Let us see the syntax.SELECT ‘SomeValue’;Here is an example that display how to include text with single quotes.mysql> SELECT 'Carol's Taylor.'; The following is the output.+-------------------+ | Carol's Taylor | +-------------------+ | Carol's Taylor | +-------------------+ 1 row in set (0.00 sec)

Read More

Which one is better in MySQL - NULL or empty string?

Arjun Thakur
Arjun Thakur
Updated on 26-Jun-2020 481 Views

The choice depends upon the database. In ORACLE database, an empty string is converted to NULL.In MySQL, the usage of an empty string is better as compared to NULL. It is easy to check for an empty string with some boundary conditions, while this cannot be done with NULL. To find NULL, we need to add an extra condition i.e. ‘IS NULL’We can check that the length of NULL is 0 while length of empty string is 1.To check the length of NULL.mysql>SELECT count(NULL);The following is the output of the above query.+-----------------+ | count(NULL) | +-----------------+ ...

Read More

How will drones help improve the security?

Dev Kumar
Dev Kumar
Updated on 26-Jun-2020 167 Views

Proper security involves all-around surveillance or observation of people, their behavior and actions, immovable property like land and building as well as movable property stationed there. Surveillance is generally conducted with the help of methods that either have limited mobility or are stationary like, CCTV cameras, GPS tracking dependent on satellite connectivity and not helpful in close observation, stake-outs, which are time-consuming, data-based profiling and biometrics and some other methods.Drone Has Turned the TableAll these methods have their own level of advantages and limitations but when it comes to drone technology, the efficiency, and effectiveness of any security operation increase ...

Read More

What is the career prospect in drone technology?

Dev Kumar
Dev Kumar
Updated on 26-Jun-2020 265 Views

Jobs in drone technology-driven enterprises are the jobs of the future because drones are going to play a very crucial role across a large number of industries in future. Many youngsters think that jobs in the drone domain involve just engineering and technological openings but the fact is there are many other openings which don't require you to be a technological wizard.Drone PilotingThis is one specialization that is already opening up many opportunities for youngsters. Drones are finding application in different sectors like mining, security services including private security for industrial and commercial assets, disaster management, logistics and many others. ...

Read More
Showing 48171–48180 of 61,248 articles
Advertisements