Admin
Apr 09, 2020
2 comments
305
In JavaScript, you can use following two ways to get hidden field value in a form : document.getElementById(‘hidden field id’).value document.formName.elements[‘hidden field name’].value See an example here… function printIt(){ ...
Snippet
Pass value from JSP to Javascript
Admin
Mar 08, 2019
11 comments
879
ssh -i MyAmazonKey.pem ubuntu@server-ip
Snippet
Server login using Mobaxterm(AWS)
Generate public/private key pair using Puttygen. Add passphrase for the private key Copy the public key. Login to the remote server and go to the ssh directory Open the 'authorized_keys' file and add the public key copied in the above step a...
Snippet
Configuring RSA key pair to login to server using Fi...
Admin
Aug 11, 2018
4 comments
1.15K
Installing Tcl/Tk on Windows  On Windows, the easiest way to get Tcl/Tk onto your machine is to install the ActiveTcl distribution from ActiveState, which includes Tcl, Tk, plus a number of other extension libraries. Once installed, open a consol...
Snippet
Installing TCL/Tk on windows
Admin
May 26, 2018
10 comments
872
Client Code import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.Socket; public class Client { public static void main (String [] args ) throws IOExc...
Snippet
Sending files over network in Java
Admin
May 25, 2018
18 comments
604
package com.test1; import java.awt.AlphaComposite; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.image.BufferedImage; import java.io.File; import java.io.IOException; import javax.imageio.ImageIO; public c...
Snippet
Image Resizing in Java
Admin
Apr 21, 2018
6 comments
214
Following is a checklist before venturing into the Machine Learning world: Machine Learning prerequisites: Python Multivariate Calculus Linear Algebra Probability theory and statistical inference Algorithms Machine Learning Course Sour...
Snippet
Machine Learning Prerequisites
Admin
Mar 03, 2018
9 comments
400
Uninstall Old Versions $ sudo apt-get remove docker docker-engine docker.io   Install Support Drivers If you're using version 3 of the Linux kernel, install the linux-image-extra-* packages, which allow Docker to use the aufs storage drivers. ...
Snippet
Setting up docker
What is the Singleton design pattern?   The Singleton design pattern is a creational pattern that states that one and only one instance of a class would persist in the memory during the application's life cycle. In other words, this design patte...
Tutorial
Implementing the Singleton Design Pattern in JavaScript
I got this error on a fresh install when starting apache2 Ubuntu 12.10. It's a bug in the apache2. It gets hung in the background. Here is my walkthrough to where the bugs might be in the software. Here's the error I got: el@titan:~$ sudo servi...
Tutorial
Apache fails to start, Address already in use (but n...
Admin
Sep 19, 2017
13 comments
759
Connect to the default database with user postgres : sudo -u postgres psql template1   Set the password for user postgres, then exit psql (Ctrl-D) : ALTER USER postgres with encrypted password 'xxxxxxx';   Edit the pg_hba.conf file:sud...
Snippet
How to configure postgresql for the first time?
Aug 18, 2017
12 comments
657
@Override public void onClick(View v) { view = v; int id = v.getId(); switch (id) { case R.id.check_permission: if (checkPermission()) { Snackbar.make(view, "Permission already grant...
Snippet
Request Permission Code in Android