This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let pets = [ | |
{name: 'Goofy', type: 'dog'}, | |
{name: 'Snoopy', type: 'dog'}, | |
{name: 'Dino', type: 'dog'}, | |
{name: 'Garfield', type: 'cat'}, | |
]; | |
_.chain(pets) | |
.filter({type: 'dog'}) | |
.map('name') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('Should be iconeImagem equal img/modules/administracao-controleprocessos.png', () => { | |
fixture.whenStable().then (() => { | |
expect(moduleItemComponent.iconeImagem).toBe('img/modules/administracao-controleprocessos.png'); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
it('Should be iconeImagem equal img/modules/administracao-controleprocessos.png', () => { | |
let urlDebugElement = fixture.debugElement.query(By.css('#module-access-img')); | |
expect(urlDebugElement).toBeDefined(); | |
expect(urlDebugElement).not.toBeNull(); | |
let htmlElement: HTMLImageElement = urlDebugElement.nativeElement; | |
expect(htmlElement.src).toContain('img/modules/administracao-controleprocessos.png'); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOG: ModuleItemComponent | |
{ | |
moduleItenList: [], | |
iconeImagem: ‘img/modules/administracao-controleprocessos.png’, | |
titulo: ‘Controle de processos’, url: ‘http://medium.com/codigorefinado' | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOG: <module-item ng-reflect-icone-imagem="img/modules/administracao-controleprocessos.png" ng-reflect-titulo="Controle de processos" ng-reflect-url="http://medium.com/codigorefinado"><div class="ma-item" moduleitemmouseenter=""> | |
<a id="module-access-url" target="_blank" ng-reflect-href="http://medium.com/codigorefinado" href="http://medium.com/codigorefinado" ng-reflect-title="Controle de processos" title="Controle de processos"> | |
<div class="ma-item-icon"> | |
<img id="module-access-img" ng-reflect-src="img/modules/administracao-controleprocessos.png" src="img/modules/administracao-controleprocessos.png"> | |
</div> | |
<h2 class="ma-item-title" id="module-access-title"> | |
Controle de processos | |
</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BigDecimalUtil { | |
public static int compareToIgnoreSignal(BigDecimal a, BigDecimal b) { | |
if (a.signum() < 0) a = a.multiply(new BigDecimal(-1)); | |
if (b.signum() < 0) b = b.multiply(new BigDecimal(-1)); | |
return a.compareTo(b); | |
} | |
public static Boolean isMinorThanIgnoreSignal(BigDecimal a, BigDecimal b) { | |
return compareToIgnoreSignal(a, b) < 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.util.List; | |
import java.util.concurrent.Callable; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Future; | |
import java.util.concurrent.LinkedBlockingQueue; | |
import java.util.concurrent.ThreadPoolExecutor; | |
import java.util.concurrent.TimeUnit; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.lowagie.text.Document; | |
import com.lowagie.text.DocumentException; | |
import com.lowagie.text.html.simpleparser.HTMLWorker; | |
import com.lowagie.text.pdf.PdfWriter; | |
import org.apache.pdfbox.exceptions.COSVisitorException; | |
import org.apache.pdfbox.pdmodel.PDDocument; | |
import org.apache.pdfbox.pdmodel.PDPage; | |
import org.apache.pdfbox.pdmodel.PDResources; | |
import org.apache.pdfbox.pdmodel.common.PDRectangle; | |
import org.apache.pdfbox.pdmodel.edit.PDPageContentStream; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Arrays; | |
import java.util.List; | |
import org.apache.commons.lang.builder.EqualsBuilder; | |
import org.apache.commons.lang.builder.HashCodeBuilder; | |
import org.apache.commons.lang.builder.ReflectionToStringBuilder; | |
public abstract class EntityBase implements EntityDef { | |
private static final long serialVersionUID = -4629136366635323935L; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Calendar; | |
import java.util.Date; | |
/** | |
* DateUtils ignore hour | |
*/ | |
public class DateUtils { | |
/** The maximum date possible. */ |