Skip to content

Instantly share code, notes, and snippets.

José Guillén damgel

  • El Salvador
View GitHub Profile
View Java 8 bigdecimal max value from arraylist
Optional<BigDecimal> max = Optional.empty();
if (!this.itemsFiltered.isEmpty()) {//check if list is not empty
max = itemsFiltered.stream()
.map(a -> a.getPrecioVentaNuevo())
.max(Comparator.naturalOrder());
if (max.isPresent()) {
Utilidades.Error("maxOptional:" + max);//prints optional value
Utilidades.Error("maxValue:" + max.get());//prints real value if any found.
}
@damgel
damgel / wildfly-install.sh
Created Oct 6, 2016 — forked from sukharevd/wildfly-install.sh
Script to install JBoss Wildfly 10.x as service in Linux
View wildfly-install.sh
#!/bin/bash
#title :wildfly-install.sh
#description :The script to install Wildfly 10.x
#more :http://sukharevd.net/wildfly-8-installation.html
#author :Dmitriy Sukharev
#date :2016-06-18T02:45-0700
#usage :/bin/bash wildfly-install.sh
#tested-version1 :10.0.0.CR3
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22
#tested-version2 :10.0.0.Final
@damgel
damgel / pom.xml
Created Aug 23, 2016 — forked from xsalefter/pom.xml
pom.xml for maven + jpa 2 + ejb3.1 + cdi + jsf 2
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.projectboard</groupId>
<artifactId>projectboard</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>war</packaging>
<name>Project Board</name>
<description>Project management dashboard.</description>
@damgel
damgel / jsf.ajax.handler.js
Created Dec 4, 2015 — forked from jyeary/jsf.ajax.handler.js
JSF AJAX client side handling code.
View jsf.ajax.handler.js
/*
* Copyright 2012-2014 John Yeary <jyeary@bluelotussoftware.com>.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
You can’t perform that action at this time.