Cleared my basics from this site:
https://javascript.info
- JS Clock
- Tip Calculator
- Input Validation
- To Do
- Quiz
- …and more
Cleared my basics from this site:
https://javascript.info
System Specifications:
Problem:
For development purpose, VMWare uses Ubuntu image provided internally that runs four containers namely, tomcat, kafka zookeeper, oracle db. At least 8GB RAM has to be given to VM. While running applications on VM, crashes of the application or process or VM was frequent. Some if the scenarios:
Solution:
I installed openssh on host and guest machines. I opened an ssh connection from my host to guest machines using IP of guest machine. I ran containers and any other terminal related tasks from here.
For changes in code, I used remote connection through my Intellij IDEA Ultimate. I was able to get a copy of the code from the VM locally that was mapped to the respective folders inside VM. The downloading part took around 2 hours but it was worth it.
Whenever I needed to change any code, I changed it on host and deployed on guest.
With this solution, the load on VM decreased and the crashing problem was solved!! 🙂
System: Ubuntu 16.04
Requirements:
npm cli [sudo apt-get install npm]
phonegap cli [link]
gradle [link] I installed 4.1
Android Studio
UI5 SDK or runtime [link]
Step 1: Create a basic template
Make a project folder my-app
cd my-app
phonegap create
The above command will generate a boilerplate code for phonegap application.
Note: Following command can be used to serve the existing code in a web browser
phonegap serve
try opening the URL shown in console.
Step 2: Using ui5 libraries inside your website’s code
Code for your website is inside
www/
folder, try opening and playing around.
Copy resources
folder from your UI5 SDK/runtime to www/
folder. Now you can include ui5 libraries into your index.html
Step 3: Run your application as an android app
phonegap build
phonegap run android
The above command will produce the app code in platforms/android
, open this folder inside Android Studio and run your application in whichever way you want, emulator or through USB debugging.
Boilerplate code for phonegap with ui5 is here.
[updates will be done along with the progress, it is still a draft]
It is a personal project to read the DZone rss feed.
Steps I am following:
WHY VIRTUAL MEMORY?
HOW IT SOLVES?
WHAT IS VIRTUAL MEMORY?
AGAIN, HOW IT SOLVES OUT 3 PROBLEMS?
Â
Super Key:Â Super key is the set of attributes in a table that can identify a row uniquely.
Candidate Key:Â Candidate key is minimal super key. If any of the attribute, in case of two or more attributes, is removed from the candidate key then uniqueness breaks. N0 candidate key can be NULL. A table can have a multiple candidate keys.
Primary Key:Â It is one of the candidate keys. Primary key cannot be NULL.
Natural Key:Â Â Natural key is a key composed of columns that actually have a logical relationship to other columns within a table. For example, in case of database of a society, Name, Address is a natural key.
Surrogate Key: Surrogate means substitute, in case natural key is not a good choice, surrogate key is used. Usually column(s) are added for uniqueness of a tuple. For example an ID is provided to every row and this ID is used as primary key. Opposite to natural key, surrogate key does not have logical relationship to other values in a tuple.
Unique Key:Â (Confused) It is a candidate key. Used to prevent duplicate values in a column. It can be NULL. Multiple unique keys can exist. Unique values can be deleted.
Foreign Key:Â In the context of relational databases, a foreign key is a field (or collection of fields) in one table that uniquely identifies a row of another table.In simpler words, the foreign key is defined in a second table, but it refers to the primary key in the first table. Foreign key enforces referential integrity:
Secondary Key:Â Candidate key(s), not selected as primary key is/are secondary key.
Simple Key:Â Candidate key with a single attribute is a simple key.
Joins are used to merge data based on predicate logic, of two tables that results in a temporary table;
Types:
Consider tables for examples:
Employee | Location | ||||||||||||||||||||||||
|
|
Outer Join: Iterates over the all rows of both or one of the tables.
In left outer join, according to the query, it iterates over the key of left table provided in SQL query and matches the same in the right one. Tables will result in:
SQL:
select * from employee left outer join location on employee.empID = location.empID; OR
select * from employee left join location on employee.empID = location.empID;
Employee.EmpID | Employee.EmpName | Location.EmpID | Location.EmpLoc |
13 | Jason | 13 | San Jose |
8 | Alex | 8 | Los Angeles |
3 | Ram | 3 | Pune, India |
17 | Babu | 17 | Chennai, India |
25 | Johnson | NULL | NULL |
In right outer join, same happens for the right table:
SQL:
select * from employee right outer join location on employee.empID = location.empID; OR
select * from employee right join location on employee.empID = location.empID;
Employee.EmpID | Employee.EmpName | Location.EmpID | Location.EmpLoc |
13 | Jason | 13 | San Jose |
8 | Alex | 8 | Los Angeles |
3 | Ram | 3 | Pune, India |
17 | Babu | 17 | Chennai, India |
NULL | NULL | 39 | Bangalore, India |
Inner Join:Â Here if match happens only then join happens.
SQL:
select * from employee inner join location on employee.empID = location.empID; OR
select * from employee, location where employee.empID = location.empID;
Employee.EmpID | Employee.EmpName | Location.EmpID | Location.EmpLoc |
13 | Jason | 13 | San Jose |
8 | Alex | 8 | Los Angeles |
3 | Ram | 3 | Pune, India |
17 | Babu | 17 | Chennai, India |
Â
Souirce:Â http://www.programmerinterview.com