George John has Published 1234 Articles

HTML5

George John

George John

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

120 Views

PhoneGap is a software development framework by Adobe System, which is used to develop mobile applications. PhoneGap produces apps for all popular mobile OS platforms such as iOS, Android, BlackBerry, and Windows Mobile OS etc.HTML5 Audio support is not consistent across different devices due to codec licensing issues and OS ... Read More

How to make the user login for an offline web app?

George John

George John

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

364 Views

While logging in i.e. online, you need to first authenticate against the server and if it works, store the username and a hashed password in the database.If you can find the account in the database, then you need to generate a new hash, only if the user has changed the ... Read More

Why python returns tuple in list instead of list in list?

George John

George John

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

263 Views

Python expects you to not mutate data when it returns some data. Tuples are also faster than lists. Tuples are generally used where order and position are meaningful and consistant. So for example, if you have a database driver in python and query for some data, you'll likely get back ... Read More

Do you think a Python dictionary is thread safe?

George John

George John

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

1K+ Views

Yes, a Python dictionary is thread safe. Actually, all built-ins in python are thread safe. You can read moreabout this in the documentation: https://docs.python.org/3/glossary.html#term-global-interpreter-lock

Same origin policy on mobile apps with HTML

George John

George John

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

187 Views

There are similar rules for native mobile apps and application. Only domain needs are to be added to white list in PhoneGap or Cardova.The device acts as a server and can access content from URL .If PhoneGap is used then domains are added to whitelist or a wildcard.While dealing with ... Read More

Why does C++ have header files and .cpp files?

George John

George John

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

2K+ Views

C++ has header and .ccp files for separating the interface from the implementation. The header files declare "what" a class (or whatever is being implemented) will do, ie the API of the class, kind of like an interface in Java. The cpp file on the other hand defines "how" it ... Read More

What does the method pop() do in java?

George John

George John

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

343 Views

The pop() method is used to remove the object at the top of this stack and returns that object as the value of this function. Example import java.util.*; public class StackDemo { public static void main(String args[]) { Stack ... Read More

How can we set PRIMARY KEY on multiple columns of a MySQL table?

George John

George John

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

751 Views

Actually, MySQL allows us to set PRIMARY KEY on multiple columns. The advantage of doing this is that we can work on multiple columns as a single entity. Example We have created the table allotment by defining composite PRIMARY KEY on multiple columns as follows − mysql> Create table ... Read More

How to Initialize and Compare Strings in Java?

George John

George John

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

109 Views

You can compare Strings using compareTo() method or, equals() method or, or == operator. Following example demonstrates how to initialize and compare strings in Java. Example Live Demo public class StringDemo { public static void main(String[] args) { String ... Read More

I am calling RAND() function two times in the same query then will it generate same random number two times or will it generate two different random numbers?

George John

George John

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

202 Views

We know that MySQL RAND() returns a random floating point value between the range of 0 and 1. It will generate two different random numbers if we will call the RAND() function, without seed, two times in the same query. Following example will make it clearer − Example mysql> ... Read More

Advertisements