sudo curl -o /etc/yum.repos.d/mssql-server.repo https://packages.microsoft.com/config/rhel/7/mssql-server-2017.repo
Required 2gb of memory
sudo yum install -y mssql-server
sudo /opt/mssql/bin/mssql-conf setup
###TODO
###Java
import javax.faces.application.FacesMessage;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.validator.FacesValidator;
import javax.faces.validator.Validator;
import javax.faces.validator.ValidatorException;
#Creating a Dynamic Datatable using Primesfaces
I found creating a dynamic table a little confusing at first. Therefore, I wanted to keep a note of it here.
My problem involved, creating a dynamic table using a List of Lists: Lists List<List> someGrid
. At first, I wanted to use dataTable's var variable in the columns iteration value. However, it is not possible to reference the var
of dataTable in the <p:columns>
tag. I ended up using the columnIndexVar
of <p:columns>
as the index for the dataTable's var.
##Example:
###JSF
#Git Notes
##Fixing detached Head
git branch my-temp-branch
git checkout master
git merge my-temp-branch
git branch -d my-temp-branch
###Show detailed graph log
//do an ls -l on files older the N
# find /path/to/parent/dir/ -mtime +N -exec ls -l {} \;
//do an rm on files older than N --WARNING do previous step first as test...
# find /path/to/parent/dir/ -mtime +N -exec rm {} \;
//find files larger than N from root
find / -xdev -type f -size +<N>M
//Sort by dates asc
someList.stream().sorted((s1, s2) -> s1.getDate().compareTo(s2.getDate())).collect(Collectors.toList());
//sort by dates desc
someList.stream().sorted((s1, s2) -> s2.getDate().compareTo(s1.getDate())).collect(Collectors.toList());
//Change filter based on select of first filter and the prefix of second select filter
$('#filterFirstSelect').change(function(){
$('#filterSecondSelect').val('0');
if(this.value == 'NONE') {
$("#filterSecondSelect option").show();
} else {
var showSelector = "#filterSecondSelect option[value^='" + this.value + "-']";
var hideSelector = "#filterSecondSelect option:not([value^='" + this.value + "-'])";
$(hideSelector).hide();
This is a basic wrapper script to run a java jar as a service in linux. Modify and place file in /etc/init.d/ directory.
The script is slightly modified from PbxMan's here: [stackoverflow] (http://stackoverflow.com/questions/11203483/run-a-java-application-as-a-service-on-linux/21283530#21283530)
chkconfig line example: # chkconfig: 3456 10 50
#!/bin/sh
#