21 Views
In most of places in UI you need to display date and time in your format weather API is providing date and time in MySql Format that is YYYY-MM-DD H:M. To convet this i have created a function that can be used easily in javascript without and dependancy. function formatDateMysql(mysqldate) { ...
Sheetal Kumar
Jan 15, 2019
25 Views
In Android when you want some API call and you are creating a HTTP request then you always get NetworkOnMainThreadException. This exception is raised due to request is created on main thread, Main thread is used for Application internal processing. To call an API you need to create second thread ...
Sheetal Kumar
Jan 15, 2019
45 Views
In Javascript sometime you need a Random Integer. Here is best way to get Random Integer number in Javascript.   function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; } Test the function: console.log("Random ...
Sheetal Kumar
Jan 07, 2019
89 Views
When you work in JavaScript then this keyword changes the context or scope based on how it is used. So here is some examples how to use this keywords in JavaScript. function func_1() { console.log(this); } // calling a function func_1(); // this pointing to window // as object method var ...
Sheetal Kumar
Dec 04, 2018
In Mac OS by default installed NTFS driver can only read data from External Hard Disc or Pen Drive. So this is big issue for those who have storage devices formatted on Windows operating system and want to store some data from Mac OS. Here are solution for this type of file copy issue. In our solution ...
Sheetal Kumar
Dec 03, 2018
Problem: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun This error shows on terminal when you update or new install macOS Mojave. This error means your system does not have installed scode-select Developer ...
Sheetal Kumar
Dec 01, 2018
64 Views
When you use loop having a iteration variable like "i" and changing the value of "i" then all the closure access same variable and the variable value changed. Here you will face the problem that all the closure will take last value of "i". For eg. var funcs = []; for ...
Sheetal Kumar
Nov 30, 2018
21 Views
In most of places in UI you need to display date and time in your format weather API is providing date and time in MySql Format that is YYYY-MM-DD H:M. To convet this i have created a function that can be used easily in javascript without and dependancy. function formatDateMysql(mysqldate) { ...
Sheetal Kumar
Jan 15, 2019
45 Views
In Javascript sometime you need a Random Integer. Here is best way to get Random Integer number in Javascript.   function getRandomInt(min, max) { min = Math.ceil(min); max = Math.floor(max); return Math.floor(Math.random() * (max - min + 1)) + min; } Test the function: console.log("Random ...
Sheetal Kumar
Jan 07, 2019
89 Views
When you work in JavaScript then this keyword changes the context or scope based on how it is used. So here is some examples how to use this keywords in JavaScript. function func_1() { console.log(this); } // calling a function func_1(); // this pointing to window // as object method var ...
Sheetal Kumar
Dec 04, 2018
64 Views
When you use loop having a iteration variable like "i" and changing the value of "i" then all the closure access same variable and the variable value changed. Here you will face the problem that all the closure will take last value of "i". For eg. var funcs = []; for ...
Sheetal Kumar
Nov 30, 2018
707 Views
When you are working client side (Browser) then sometime you change the content of browser or view, and then you need to update the URL of browser so that when user refresh or reload page then same thing can be visible.  window.history have different functions to update or switch the states ...
Sheetal Kumar
Oct 15, 2018
281 Views
Patterns:- All languages have patterns. In javascript pattern are long-lasting and durable  or a collection a pattern that is used to solve the problem in software design .It includes function pattern, jquery pattern, design patterns, object creation pattern etc.... Some of the pattern in javscript ...
Anamika Gupta
May 22, 2018
348 Views
Class in javascript Classes are the function which is used to define expression and declarations. Basically  the Java script is a classless language, it supports the object.In the javascript class work in the same way like other language that's why classes are called syntactic sugar . class ...
Anamika Gupta
May 18, 2018
81 Views
Proxy means substitue. A proxy is the agency, function, which acts as  a substitue for another. It acts as the intermediary between your computer and the internet. The Proxy server present in the machine in the form of firewall server, and it's present on independent server, which is used to ...
Anamika Gupta
Oct 05, 2018
333 Views
Ubuntu is Linux Operating System so you need to have Root privilege to get the process information. netstat command is used to show the ports and processes in Linux.  netstat -nlp command is used to show the processes using network. netstat -nlp Now filter the process that ...
Sheetal Kumar
Sep 04, 2018
160 Views
In Linux Ubuntu you do not have any GUI mode to display the RAM detail and Hard Disk details. So you need the commands to view the server status in Ubuntu. 1. View RAM Details You can view RAM details if different units like KB, MB, GB etc. Default is KB. free Output:    total  used   free  shared  ...
Sheetal Kumar
Jul 25, 2018
270 Views
WAN is built using the switches and packets which is able to extend over a large area or distance or many other computer. It is large number autonomous computers that are allocated over a large geographical area. WAN is expanding to a long distance and many other computers. In WAN switches are ...
Anamika Gupta
May 08, 2018
386 Views
A LAN is used for a limited distance, which is used to share the packet network for the computer communication. It is used to interconnect a computer and their devices over a  common medium in order to access information, database files, applications etc...Baseband and broadband are the two LAN ...
Anamika Gupta
May 05, 2018
254 Views
Network security The Network is a connection of independent computer which is used to communicate with one another over a divided network. It is generally a collection of computer,software and hardware which are connected through one another to share information and resources together. A network ...
Anamika Gupta
May 01, 2018