Posts

You'll read about technologies

NGINX

NGINX reverse proxy load balancing

Posted on


Setup reverse proxy with NGINXStart by installing the NGINX HTTP server usingapt-get install nginxOnce NGINX is installed, create the following configuration file in /etc/nginx/sites-available/glassfish.conf:vim /etc/nginx/sites-available/glassfish.confupstream glassfish { server 127.0.0.1:8080... » more...

CDI

CDI

Posted on


References Using Predefined Beans in CDI Applications Resource InjectionPredefined Beans Predefined Bean Resource or CDI Bean Injection Example UserTransaction Resource @Resource UserTransaction transaction; Principal Resource ... » more...

restful

restful webservice jaxrs curl

Posted on


References RESTfu­l Java­ with ­JAX-­RSException HandlingJAX-RS 2.0 has added a nice exception hierarchy for various HTTP error conditions. So, instead of creating an instance of WebApplicationException and initializing it with a specific status code, you can use one of these exceptions instead.... » more...

Jekyll

jekyll

Posted on


References https://jekyllrb.com/InstallationInstall ruby first.brew install rubygem install bundler jekyllRun bundle install to install missing gems.bundle install » more...

SSL

SSL

Posted on


References RSA vs. DSA for SSH authentication keys RSA Key Sizes: 2048 or 4096 bits? How To Secure Apache with Let’s Encrypt on Debian 9 Importing LetsEncrypt into Java and Glassfish How to install a SSL certificate on GlassFishManual SSL generation with preferred-challenges dns Let’s Encry... » more...

ELK Stack

ELK Stack Elasticsearch Logstash Kibana

Posted on


References Docker ELK stack Java app monitoring with ELK - Part I - Logstash and Logback Monitoring Java applications with ELKUsageGet Docker ELK StackDownload Docker ELK StackBringing up the stack$ docker-compose upInitial setupDefault Kibana index pattern creationCreate an index pattern via ... » more...

Payara

Payara Payara Micro Application Server

Posted on


Payara Micro Maven PluginHere is GAV (groupId, artifactId, version) of Payara Micro Maven Plugin. Key Value groupId fish.payara.maven.plugins artifactId payara-micro-maven-plugin version 1.0.3 Payara Micro Maven Plugin... » more...

Jetty

Jetty Application Server

Posted on


References Configuring SSL/TLS Quick Start - Jetty’s maven plugin with SSL Creating self-signed certificates for use on AndroidCreate a maven web application project:$ mvn archetype:generate -DgroupId=tld.domain -DartifactId=example-server -DarchetypeArtifactId=maven-archetype-webapp -Dversion... » more...

WildFly

WildFly Application Server

Posted on


Prerequisites Debian JavaInstall WildFlyDownload WildFly Java EE Full & Web Distribution from http://wildfly.org/downloads/Install MySQL JDBC ConnectorCreate if not exist and then go to the directory WILDFLY_HOME/modules/system/layers/base/com/mysql/driver/main.Download MySQL JDBC Connector... » more...

Glassfish

Glassfish Application Server

Posted on


References How To Install Glassfish 4.0 on Ubuntu 12.04.3 Install Glassfish 4 on a Debian 8 VPS How To Determine java heap size From GC Logs Tuning Your Java VM Java Platform, HotSpot Virtual Machine Garbage Collection Tuning Guide What is Java Heap?Prerequisites Debian JavaGlassFish is a... » more...

Mac OS X

Mac OS X

Posted on


Hidden Utilitiesafplay - Audio File Playafplay [option…] audio_file#loop a file$ while :; do afplay "file.mp3"; done;#individually play all file in a directory$ find . -name '*.mp3' -exec afplay '{}' \;Free NTFS read and write on MacEdit fstab filesudo nano /etc/fstabAdd below line where DRIVE_NA... » more...

Logback

Logback Logging SLF4J

Posted on


LogbackDBAppenderThe DDL script can be found inside source code logback-classic\src\main\java\ch\qos\logback\classic\db\<db>.sql.DBAppender can be defined as below for JNDIConnectionSource<appender name="databaseAppender" class="ch.qos.logback.classic.db.DBAppender"> <connectionSo... » more...

JSF

JSF Java Server Faces

Posted on


References What’s new in JSF 2.3? What’s new in JSF 2.3?WebsocketOne of the most attractive features is JSF 2.3 added native websocket support, it means you can write real-time applications with JSF and no need extra effort.To enable websocket support, you have to add javax.faces.ENABLE_WEBSOCK... » more...

IaaS-PaaS-SaaS

IaaS PaaS SaaS

Posted on


IaaS-PaaS-SaaS   IaaS   PaaS   SaaS Customer Service Settings Customer Service Settings Customer Service Settings Customer Data Customer Data Customer Data Customer ... » more...

Tomcat

tomcat apache

Posted on


Tomcat behind Apache with multiple (sub)domains and web appsInstall mod-jkapt-get install libapache2-mod-jkEnable Apache modulea2enmod jkCreate workersCreate /etc/apache2/workers.properties and add the following into it# List workersworker.list=worker1,worker2# Define worker1worker.worker1.port=8... » more...

Persistence

JDBC Persistence JPA Eclipselink

Posted on


Java Type to JDBC Type JAVA TYPE JDBC TYPE java.time.LocalDate DATE java.time.LocalTime TIME java.time.LocalDateTime TIMESTAMP java.time.OffsetTime TIME_WITH_TIMEZONE java.time.OffsetDateTime ... » more...

Derby

Apache Derby

Posted on


References Apache Derby: Documentation Derby TutorialApache DerbyConnect to the database with ijFirst run ij tool. The Derby ij tool is a JDBC tool that you can use to run scripts or interactive queries against a Derby database.java -jar /Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Conten... » more...

JavaFX

JavaFX

Posted on


References JavaFX CSS Reference Guide ControlsFX Scene Builder JavaFX CSS Reference GuideJavaFXPeriodic actionTimeline timeline = new Timeline( new KeyFrame( Duration.millis(2500), ae -> System.out.println("Periodic action") ));timeline.setCycleC... » more...

NetBeans

NetBeans

Posted on


How to clear the cache in NetBeansSelecting the Help » About menu will display a dialog that contains directory information. Regardless of operating system, the About dialog will contain the correct path to the cache directory.Close NetBeans, then delete the directory. NetBeans will rebuild its c... » more...

Jupyter Notebook

Jupyter Notebook nbconvert

Posted on


nbconvertJupyter Notebook ConversionThe nbconvert tool, jupyter nbconvert, converts notebooks to various other formats via Jinja templates. The nbconvert tool allows you to convert an .ipynb notebook file into various static formats including: HTML (–to html) LaTeX (–to latex) PDF (–to pdf) R... » more...

GIS

GIS Longitude Latitude

Posted on


Degrees, Minutes, SecondsThe primary unit in which longitude and latitude are given is degrees (°). There are 360° of longitude (180° E ↔ 180° W) and 180° of latitude (90° N ↔ 90° S). Each degree can be broken into 60 minutes (’). Each minute can be divided into 60 seconds (”). For finer accuracy... » more...

KPI’s that can help improve your e-commerce

ecommerce kpi

Posted on


Return on investmentMeasure the effectiveness of channels pay comparing revenue to marketing spend.Year over year growthMeasure and compare variations for revenue, conversion rates, average order size, customer lifetime value and more.Customer lifetime valueUnderstand the average value of a custo... » more...

Ruby

Ruby

Posted on


Installation of different versions of Ruby in Mac OSX\curl -sSL https://get.rvm.io | bash -s stablesource /Users/dev/.rvm/scripts/rvmrvm list knownrvm install ruby-2.4.2ruby -vTo use the latest installed version, runrvm use ruby-2.4.2To set this as the default version, runrvm use ruby-2.4.2 --def... » more...

TeX

LaTeX KaTeX

Posted on


References KaTeX Rendering LaTeX in Javascript with KaTeX and Jekyll Speed up pdf export from org-mode with latexmkLaTeXPlugins LaTeX Workshop by James Yu atom-latexKeep watching the file for changes and recompilelatexmk -pvc -pdf -view=none document.texKaTex The Normal Distribution Jekyll... » more...

MSSQL

MSSQL JDBC jtds

Posted on


References Run the SQL Server 2017 container image with DockerMSSQLRunning the SQL Server 2017 container image with DockerThe default memory on Docker is 2 GB. Increase Docker memory to 4 GB.docker pull microsoft/mssql-server-linuxdocker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=<YourPassw... » more...

SSH

SSH

Posted on


Remove domain from ssh known hosts if you already have$ nano ~/.ssh/known_hostsChecking for existing SSH keysEnter ls -al ~/.ssh to see if existing SSH keys are present:ls -al ~/.ssh# Lists the files in your .ssh directory, if they existCheck the directory listing to see if you already have a pub... » more...

Maven

Maven

Posted on


References Creating maven archetypesSending or overriding parameters to pom-D option is to send parameter value to the pom, or to override the values in ~/.m2/settings.xml.$ mvn exec:exec -DcustomerId=1234 -Doutcome=REJECTED -DserviceUrl=http://localhost:8080/services/soapSkipping tests, gpg and... » more...

Testing

Testing

Posted on


References Enterprise Java.next: A Slideless Keynote A Note On Jakarta EE Testing Achieve Quality Code and ROI through Test AutomationTestingStress test jmeter - Apache JMeter to load test functional behavior and measure performance ab - Apache HTTP server benchmarking tool5 clients 1000 tim... » more...

VirtualBox

VirtualBox

Posted on


References NonePrerequisites LinuxCommandsConfigure full screensuapt-get update && apt-get upgradeapt-get install build-essential module-assistantm-a preparesh /media/cdrom/VBoxLinuxAdditions.runshutdown -r 0 » more...

Markdown

Markdown

Posted on


References NonePrerequisites NoneExamplesLink to a named anchorPlace an anchor### <a name="head1234"></a>A Heading for the entry!where you want to link to and refer to it on the same page by [link](#head1234)Highlight ruby code with line numbers123456789101112# Program to find the f... » more...

Hadoop

Hadoop Big Data

Posted on


References Installing Hadoop on Mac Hadoop Eğitim Serisi (Veri Madenciliği) Hadoop File System ShellPrerequisites HomebrewInstalling Hadoop$ brew install hadoopHadoop will be installed in the following directory /usr/local/Cellar/hadoopConfiguring HadoopEdit hadoop-env.shThe file can be locat... » more...

Artificial Intelligence

AI Artificial Intelligence Machine Learning Big Data

Posted on


References Artificial Intelligence: Look Ma, No Hands! Stanford University CS 229 Machine Learning Stanford University CS231n: Convolutional Neural Networks for Visual Recognition Machine Learning: The Basics, with Ron Bekkerman Machine Learning for Big Data in the Cloud GraphLab vs. Piccol... » more...

JEE

JEE

Posted on


References web.xml deployment descriptorweb.xml deployment descriptor4.0 -> for Java EE 83.1 -> for Java EE 73.0 -> for Java EE 62.5 -> for Java EE 52.4 -> for Java EE 4Java EE 7 XML schema, namespace is http://xmlns.jcp.org/xml/ns/javaee/<web-app xmlns="http://xmlns.jcp.org/xm... » more...

Java

Java

Posted on


References how to install open jdk 11 How To Install Java with Apt-Get on Debian 8 Signing Using RSA CertificatesPrerequisites DebianJAVAPreperationCheck java version if existjava -versionInstallingapt-get updateapt-get install default-jdkCheck if Java has been properly installedjava -version... » more...

Debian

Debian Linux Operating System

Posted on


Prerequisites Linux### Check debian versionlsb_release -aUpdate the systemDebian operating system is pre-installed. To update and upgrade it# update the list of available packages and their versions, it does not install or upgrade any packages.$ apt-get update# install newer versions of the inst... » more...

How to Convert an ePub to Mobi Format

ebook epub mobi kindle kindlegen calibre

Posted on


Since Kindle cannot read files in the EPUB file format we need to convert it to MOBI file format.If you are looking for an online converter please go to this site. You can convert file formats such as DOC, PPT, ODS, and PDF.If you are using Linux or OSX, install the program called Calibre to conv... » more...

Docker

docker

Posted on


What is Docker? Package your Jakarta EE Application using Docker and Kubernetes MySQL on Docker: Building the Container Image Modular and Reusable Jakarta EE Architecture with Docker Step-by-Step High Availability with Docker and Jakarta EE The Difference: Docker vs. Virtualization 9 Dock... » more...

Python

python

Posted on


PythonSimpleHTTPServer$ python -m SimpleHTTPServer 8080pipInstall pip$ python get-pip.pyUninstall pip$ python -m pip uninstall pip setuptoolsInstalling the requirements# In order to keep your environment consistent, “freeze” the current state of the environment packages.$ pip freeze > requirem... » more...

MongoDB, ElasticSearch and Marvel module installation

mongodb elastic marvel

Posted on


Prerequisites HomebrewInstalling mongoDB$ brew install mongodbConfiguring mongoDBConfiguration file is /usr/local/etc/mongod.confTo start mongoDB$ brew services start mongodbThis will use /usr/local/var/mongodb/ as data directoryor using mongoDB deamon$ mongodThis will use /data/db/ as data dire... » more...

Homebrew

Homebrew

Posted on


Installing homebrew$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"Updating homebrew$ brew updateUpgrading homebrew$ brew upgradeUpgrading caskBelow will not update casks that do not have versioning information (version :latest) or applications that have... » more...

WordPress

wordpress

Posted on


WordPress installation in a directoryCopy index.php to root. Edit the file and add subdirectoryrequire( dirname( __FILE__ ) . '/directory/wp-blog-header.php' );Edit .htaccess file# BEGIN WordPress<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /directory/RewriteRule ^index\.php$ - [L]Re... » more...

Mono

mono c# csharp

Posted on


Using Mono to compile CSharp files on MacOS XDownload Connector/Net (mysql-connector-net-version-noinstall.zip) and extract the contents to a directory.Ensure the file MySql.Data.dll is present.You must register the Connector/Net component, MySql.Data, in the Global Assembly Cache (GAC). In the c... » more...

Jasper Report

jrxml jasper reports

Posted on


Passing image stream to jasper report3 steps to pass image stream to jasper report. Convert the image to stream and set it in parameter (“logo”) In jrxml file , create a parameter with parameter class as “java.io.InputStream” Place a image on the jrxml design, set “Image Expression” to $P{logo... » more...

PrimeFaces

PrimeFaces

Posted on


PrimeFaces Dialog FrameworkSettingsAdd below lines to faces-config.xml for activating PrimeFaces Dialog Framework<application> <action-listener>org.primefaces.application.DialogActionListener</action-listener> <navigation-handler>org.primefaces.application.DialogNavi... » more...

Git

git github

Posted on


Delete a Tag on Gitgit tag -d [tag]git push origin :[tag]If your tag has the same name as one of your branches;git tag -d [tag]git push origin :refs/tags/[tag]See all Branchesgit branchCreate a Branch from previous commitgit branch branchname <sha1-of-commit>Push the new Branch to servergit... » more...

Web Service

Web Service JAX-WS SOAP

Posted on


References JAX-WS : SOAP handler in client side JAX-WS : wsimport tool example JAX-WS : wsgen tool example Container Authentication with JAX-WS JAX-WS : SOAP handler in server sideWeb Service JAX-WS represents SOAP (Simple Object Access Protocol) JAX-RS represents REST (Representational St... » more...

MySQL

MySQL

Posted on


References How To Backup MySQL DatabasesCreating database, user and privilegesCREATE DATABASE dbname CHARACTER SET utf8 COLLATE utf8_general_ci;CREATE USER dbname@localhost IDENTIFIED BY 'P@ssword1';GRANT ALL PRIVILEGES ON dbname.* TO dbname@localhost;FLUSH PRIVILEGES;Setting user passwordSET PA... » more...

SAGE

sage

Posted on


Gaussian plotMaking a polar plot (describing the radiation pattern of an antenna)# A linear broadside array of short vertical dipoles# located along the z axis with 1/2 wavelength spacingvar('r, theta')N = 7normalized_element_pattern = sin(theta)array_factor = 1 / N * sin(N * pi / 2 * cos(theta))... » more...

Process Models in Software Engineering

Process Models Waterfall Model Iterative Model Spiral Model V Model Big Bang Model

Posted on


LifecycleWe use structured sequence of stages (process models) in software engineering to develop the intended software product.Process ModelsWaterfall ModelWaterfall model is the simplest model of software development paradigm. It says the all the phases of SDLC will function one after another i... » more...

EclipseLink

eclipselink multitenancy multitenant

Posted on


EclipseLink and MultiTenantReferences http://www.eclipse.org/eclipselink/documentation/2.5/solutions/multitenancy001.htmMultitenantType.SINGLE_TABLEimport javax.persistence.Cacheable;import javax.persistence.Entity;import javax.persistence.JoinColumn;import javax.persistence.ManyToOne;import org... » more...

JSONP

JSONP JSONWithPadding

Posted on


JSONP, JSONWithPaddingimport org.eclipse.persistence.oxm.JSONWithPadding;...@GET@Produces("application/x-javascript")@Path("/jsonp")public JSONWithPadding<BannerEntity> getJSONP(@QueryParam("callback") String callback) { List<BannerEntity> banners = bannerService.findAll(); if (... » more...

SortedSetMultimap

guava

Posted on


public SetMultimap<AttributegroupEntity, AttributeEntity> findAttributesByStatus() { SortedSetMultimap<AttributegroupEntity, AttributeEntity> set = Multimaps.newSortedSetMultimap( new HashMap<AttributegroupEntity, Collection<AttributeEntity>>(), ne... » more...

SQLite

Database SQLite

Posted on


Location of the SQLite DB fileon WindowsC:\Users\%USERNAME%\AppData\Local\Apple Computer\Safari\Databaseson Mac/Users/[username]/Library/Safari/Databases/http_[URL of the site creating the DB]_0/Users/[username]/Library/Safari/Databases/file__0Name of the database is something like 00000000000000... » more...

LOGO

LOGO TigerPlus

Posted on


LOGO TIGERPLUS VIEW - SATIŞ İRSALİYE SATIRLARI—2014—USE [TIGERPLUS]GO/****** Object: View [dbo].[LV_001_SATIS_IRSALIYE_SATIRLARI] Script Date: 09/24/2014 20:21:16 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOALTER VIEW [dbo].[LV_001_SATIS_IRSALIYE_SATIRLARI]ASSELECT S.DATE_ AS TARI... » more...

Socat

socat

Posted on


References: http://www.xappsoftware.com/wordpress/2013/10/10/how-to-run-socat-on-mac-os-x/ http://scott.cranton.com/2011/04/socat-is-so-cool.html http://justcheckingonall.wordpress.com/2009/06/09/howto-vsp-socat/ http://buhadram.wordpress.com/2008/10/07/some-useful-socat-commands/Running soca... » more...

enum type with numeric key

java enum

Posted on


public enum BarcodeType { QR_CODE(1), CODE_128(2), EAN_13(3); private final int value; private BarcodeType(int value) { this.value = value; } public int getValue() { return value; } public static BarcodeType parse(int value){ for (BarcodeType type : Barco... » more...

Random hex html color code in Java

hex color random

Posted on


Random rnd = new Random();int intVal = rnd.nextInt(16777215 + 1);return Integer.toHexString(intVal);orreturn Integer.toString(intVal, 16);16777215 == ffffff in decimalReferences: http://www.paulirish.com/2009/random-hex-color-code-snippets/ » more...

Manually creating a service in Windows

windows service

Posted on


To create a windows service manually, the syntax is:sc create <servicename> binpath=<pathtobinaryexecutable> [option1] [option2] [optionN]An example:sc create aripd binPath="C:\Program Files\ARIPD\start.exe" DisplayName="ARIPD" start=autoIf it is worked you will see:[SC] CreateService... » more...

Rename files by removing first x characters and last y characters

mono c# csharp

Posted on


@echo offsetlocal enabledelayedexpansionrem set S=0set /p S="The number of characters to be trimmed from the beginning of the file name: " %=%rem set X=6set /p X="The number of characters to be trimmed from the end of the file name: " %=%set FOLDER_PATH=.pushd %FOLDER_PATH%for %%f in (*) do if %%... » more...

Upload, list and download files with Dropbox Java API

Java upload dropbox api download

Posted on


» more...

Apache

Apache ssl Virtual Host

Posted on


Apache Virtual Host and SSL on Mac OSXsudo pico /etc/hosts127.0.0.1 localhost127.0.0.1 albatros.project.aripd.comsudo pico /etc/apache2/httpd.confInclude /private/etc/apache2/extra/httpd-vhosts.confInclude /private/etc/apache2/extra/httpd-ssl.confsudo pico /etc/apache2/extra/httpd-vho... » more...

SEO

seo

Posted on


Video pages<meta name="title" content="Video Title"> <meta name="description" content="Video Description"> <meta name="medium" content="video"> <meta name="video_height" content="402"> <meta name="video_width" content="468"> <meta name="video_type" content="applic... » more...

Webmin

Linux Webmin

Posted on


Download Debian Package and run itwget http://prdownloads.sourceforge.net/webadmin/webmin_1.480_all.debdpkg --install webmin_1.480_all.debIf it asks for dependenciesaptitude install libnet-ssleay-perl libauthen-pam-perl libio-pty-perl libmd5-perl » more...

php

php

Posted on


setlocaleIf money_format doesn’t seem to be working properly, make sure you are defining a valid locale. For example, on Debian, ‘en_US’ is not a valid locale - you need ‘en_US.UTF-8’ or ‘en_US.ISO-8559-1’.Debian has a list of valid locales at /usr/share/i18n/SUPPORTED; find yours there if it’s n... » more...

Linux

Linux

Posted on


How to pronounce LinuxInternet newsgroup participants have long debated the proper pronunciation of Linux. Because the name Linux was conferred by Linux kernel author Linus Torvalds, his pronunciation of the word should reign as standard as I see it. However, Linus is Finnish and his pronunciatio... » more...

Algorithm

Algorithm

Posted on


Leap Day Algorithm - Artık Gün Algoritmasıif year modulo 400 is 0 then leapelse if year modulo 100 is 0 then no_leapelse if year modulo 4 is 0 then leapelse no_leap » more...

JDBC

RDBMS SQL JDBC

Posted on


Stored ProcedureA stored procedure is a group of SQL statements that form a logical unit and perform a particular task, and they are used to encapsulate a set of operations or queries to execute on a database server.String createProcedure = "create procedure SHOW_SUPPLIERS " + "as " + "sele... » more...

Symfony

Symfony

Posted on


Symfony2 optional requirements installation on Mac OS Xintl extensionUse “port” to install php5-intlsudo port install php5-intlCopy intl.so into active php extensions directorysudo cp /opt/local/lib/php/extensions/no-debug-non-zts-20090626/intl.so /usr/lib/php/extensions/no-debug-non-zts-20090626... » more...

Search