Type Script conver string to intiger
To convert string to number you can use 1.parseInt 2.parseFloat 3.use + operator: var x = “12”; var y = +x; // y: became number
Build High Availability Network
To convert string to number you can use 1.parseInt 2.parseFloat 3.use + operator: var x = “12”; var y = +x; // y: became number
List of command for hadoop List of files and directories hadoop fs -ls / List of files under user hadoop fs -ls /user Put file to hadoop hadoop fs -put text.txt /user/training/text.txt View file content hadoop fs -cat /user/training/text.txt Remove Read More
Install application ng new my-app ng new my-app –dry-run ng new my-app –skip-install ng new –help Options ng new my-app –skip-install –style scss –prefix ma –skip-git –skip-test –routing ng lint –help
When creating a template I want to use this same template in QA environment and Production environment without any changes when moving to production. I achieve this using user macros. Template Add macro {$ODBCMYSQLCLUSTER} => db ( this value is Read More
Two level discovery Create discovery rules Type: database monitoring key: db.odbc.discovery[daily_sales,db_qa_masqa_3306] SQL: select term_no as TERMNO ,sum(amount) as AMOUNT from p_trx where trx_date > curdate() group by term_no item prototype Name: Daily sales term 2: {#TERMNO} Type: Database monitoring key:db.odbc.select[sales{#TERMNO},db_qa_masqa_3306] Read More
When installing epel repository in centos in some conditions there is an error during yum update. This is an epel repository bug https://bugs.centos.org/view.php?id=12597 Solution Work around applied: In /etc/yum.repos.d/epel.repo, commented out the following lines; #mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch Enabled baseurl lines in configuration Read More
Angular https://angular.io/ Blog post about angular 5 updates https://auth0.com/blog/whats-new-in-angular5/
To allow pass parameter as json request enable allow characters “{}” in tomcat configuration file catalina.properties # Allow for changes to HTTP request validation # WARNING: Using this option will expose the server to CVE-2016-6816 #tomcat.util.http.parser.HttpParser.requestTargetAllow=| # tomcat.util.http.parser.HttpParser.requestTargetAllow={}
Format Flags: Space, + and ( format position of output text base of flags s1= String.format(“%d”,123); s2= String.format(“%d”,-123); s3= String.format(“% d”,123); s4= String.format(“% d”,-123); s5= String.format(“%+d”,123); s6= String.format(“%+d”,-123); s7= String.format(“%(d”,123); s8= String.format(“%(d”,-123); s9= String.format(“% (d”,123); s9 is using combined flags, Read More
Download java.tar.gz file Unzip to /usr/java/jdkVERSION Create link for latest and default Use alternative to setup default java envirement See your current envirement alternatives –config java There is 1 program that provides ‘java’. Selection Command ———————————————– *+ 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.141-1.b16.el7_3.x86_64/jre/bin/java) Read More