When working with Java, there are several ways to obtain the current timestamp, which is essential for a variety of applications including logging events, measuring execution times, or handling date and time operations. A timestamp is a sequence of characters, denoting the date and time at which a certain event occurred. The following introduction provides an overview of five methods to get the current timestamp in Java, each suited for different requirements and use cases. These methods leverage the capabilities of different classes available in Java, such as System, Date, Calendar, Instant, and the java.time API, introduced in Java 8.…
Author: Rahul
Zend Framework 2 is an open source object oriented software framework, used for faster development. Zend also provides MVC architecture and code re-usability feature. This tutorial will help you to How to Install PHP Zend Framework on Redhat based system. I am using CentOS 6.7 while writing this tutorial. 1. Install HTTPD & PHP First make sure that you have installed HTTPD and PHP on your system. If not have already installed use following command to install it. Zend Framework 2 required PHP >=5.3 to work properly. # yum install httpd php php-cli php-common 2. Install PHP Composer After installing…
Having been around for some time now, Hadoop has become one of the most popular open-source big data solutions. It processes data in batches and is famous for its scalable, cost-effective, and distributed computing capabilities. It’s one of the most popular open-source frameworks in the data analysis and storage space. As a user, you can use it to manage your data, analyze that data, and store it again – all in an automated way. With Hadoop installed on your Fedora system, you can access important analytic services with ease. This article covers how to install Apache Hadoop on CentOS and…
Apache Tomcat is a widely used open-source Java Servlet Container developed by the Apache Software Foundation (ASF). Tomcat acts as a web server for Java-based web applications and is an essential tool for developers working with Java Servlets and JavaServer Pages (JSPs). This guide will take you through the process of installing Tomcat 11 on Ubuntu, Debian, and Linux Mint systems. Warning: Please be aware that as of the writing of this guide, Apache Tomcat 11 is currently in an Alpha release stage. This version is considered unstable and is not suitable for production environments. If you are looking for…
You must have faced the foreign key constrains issues many times while working with MySQL database. Generally this issue occurred during delete, insert records, backup and restore database and drop database and drop tables. In this situation its hard to complete task. MySQL provides an option to disable foreign key checks during any operation on tables or databases. You can disable check and complete your task without any issues. This article will help you to how to enable or disable foreign key check in MySQL. Ever you faced foreign key error, Disable foreign key checks, do you work and enable…
This tutorial will help you with JavaScript code with jQuery, which check that checkbox is checked or not and perform operations based on that. This useful before submitting any form to check if any checkbox is checked or not. JavaScript Code :- Below is the JavaScript code which check that checkbox (id: checkBox1) is selected or not. If checkbox is selected, it will unhide the element with id msgBox and that element will appear on page. If checkbox is not selected, it will hide the same element on page. Make sure you have included JQuery on your webpage.
1 2 3 4 5 6 7 8 9 | <script type="text/javascript"> if(document.getElementById('checkBox1').checked) { $("#msgBox").show(); } else { $("#msgBox").hide(); } </script> |
Demo…
Iterating over an array is a common task in programming, and there are several ways to do it in JavaScript. In this article, we’ll look at four different methods for looping over an array in JavaScript: the for loop, forEach loop, for-in loop, and for-of loop. We’ll also cover some additional ways to loop over an array using higher-order functions like map and reduce. There are several ways to loop over an array in JavaScript. The most common way is to use a for loop, but there are also other options such as forEach, for-in, and for-of loops. Method 1:…
An array is a collection of values referenced by the array name. Once the array is initialized, we can easily add more elements or delete existing elements from an array. In this tutorial, you will learn to remove array elements by value in JavaSscript. We can use the following JavaScript methods to remove an array element by its value. indexOf() – function is used to find array index number of given value. Return negavie number if the matching element not found. splice() function is used to delete a particular index value and return updated array. Remove Array Element in JavaScript…
In this tutorial, we are assuming that you already have fresh installed Ubuntu Server. We recommend using LTS version of Ubuntu for your servers like Ubuntu 18.04 LTS, 16.04 LTS. Now after installing Ubuntu server 18.04, 16.04 proceed for post-installation setup of your server. This guide includes steps which are useful for configuring for a server, increase the security of the server. 1. Upgrade Your System First login to your Ubuntu server with root access and execute the following command to upgrade all packages. sudo apt-get update sudo apt-get upgrade 2. Create Admin Account Create a user account for system…
The slowness of websites is a major issue faced by most of the software engineers and system administrators. They keep trying to optimize speed with various ways. Here the question is how to speed up the website? What is the best way to increase website speed? Google provides and module mod_pagespeed for Apache users which optimize your site automatically by compressing javascript and CSS files. Let’s follow the tutorial to enable Apache mod_speed module on your Debian system to speed up website performance. 1. Install Apache2 We are assuming that you do not have installed Apache2 on your system, But…