import { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'numberToWords' | |
}) | |
export class NumberToWordsPipe implements PipeTransform { | |
a = [ | |
'', | |
'one ', |
1. Allow filesystem support for namespaces: xfs partition: format with ``` mkfs.xfs -m crc=1 -n ftype=1 ``` The current CentOS 7 does this by default.
1. Setup a project | |
2. Add groovy SDK support: | |
https://www.bonusbits.com/wiki/HowTo:Add_Groovy_SDK_to_IntelliJ_IDEA | |
3. Download http://(yourjenkinsurl)/job/(yourpipelinejob)/pipeline-syntax/gdsl | |
- this will give you the .gdsl file - download this to the src folder of your project. | |
4. Finally follow this step - right click on the src folder -> Mark directory as -> Sources Root |
Hibernate 4 introduced a new Audit API for event listening.
org.hibernate.envers.event.AuditEventListener
was replaced by org.hibernate.event.spi.*
,
for example org.hibernate.event.spi.PostDeleteEventListener
.
First create your custom listener. Example: You want do disable auditing for delete operations.
import org.hibernate.envers.event.spi.EnversPostDeleteEventListenerImpl;
import org.hibernate.event.spi.PostDeleteEvent;
public class MyAuditListener extends EnversPostDeleteEventListenerImpl {
Working on Grails 3 I realized that I no longer can specify external configuration using the standard grails.config.locations
property in Config.groovy
file.
Reason is obvious! There is no Config.groovy
now in Grails 3. Instead we now use application.yml
to configure the properties. However, you can't specify the external configuration using this file too!
What the hack?
Now Grails 3 uses Spring's property source concept. To enable external config file to work we need to do something extra now.
//in build.gradle: | |
project.afterEvaluate { | |
for (Task task : project.getTasks()) { | |
if (task instanceof JavaExec) { | |
(task as JavaExec).jvmArgs "-javaagent:xrebel.jar" | |
} | |
} | |
} |
if (!!root.EventSource) { | |
/** | |
* This method wraps an EventSource as an observable sequence. | |
* @param {String} url The url of the server-side script. | |
* @param {Observer} [openObserver] An optional observer for the 'open' event for the server side event. | |
* @returns {Observable} An observable sequence which represents the data from a server-side event. | |
*/ | |
dom.fromEventSource = function (url, openObserver) { | |
return new AnonymousObservable(function (observer) { |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.