George John has Published 1167 Articles

How to create CircularImageView in android?

George John

George John

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

872 Views

This example demonstrate about how to Create CircularImageView in android.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 make circler view, we should add CircularImageView library in gradle file as shown ... Read More

Difference between == and is operator in python.

George John

George John

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

752 Views

is and equals(==) operators are mostly same but they are not same. is operator defines if both the variables point to the same object whereas the == sign checks if the values for the two variables are the same. Example Code # Python program to # illustrate ... Read More

Escaping/encoding single quotes in JSON encoded HTML5 data attributes

George John

George John

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

3K+ Views

To escape single quotes, use json_encode() to echo arrays in HTML5 data attributes.printf('', htmlspecialchars(json_encode(array('html5', ...)), ENT_QUOTES, 'UTF-8'));Or you can also using built-injson_encode(array('html5', ...), JSON_HEX_APOS)

How to divide large numbers using Python?

George John

George John

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

915 Views

You can divide large numbers in python as you would normally do. But this has a lot of precision issues as such operations cannot be guaranteed to be precise as it might slow down the language. You would be better off using a numeric computation library like bigfloat to perform ... Read More

HTML5

George John

George John

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

133 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

381 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

285 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

197 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

Advertisements