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
Indexer indexer = IndexerRegistryUtil.getIndexer(LibertyProgram.class); SearchContext searchContext = SearchContextFactory.getInstance(request); searchContext.setAttribute("paginationType", "regular"); searchContext.setEnd(searchContainer.getEnd()); searchContext.setKeywords(keywords); searchContext.setStart(searchContainer.getStart()); Hits results = indexer.search(searchContext); |
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
if( value ) { } //will evaluate to true if value is not: | |
null | |
undefined | |
NaN | |
empty string ("") | |
0 | |
false |
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
adb -d install path/to/your/app.apk |
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
void setExpandoAttributesAndValues( | |
Set<ExpandoItem> incomingExpandoSet, long companyId, | |
long classPKId, Class klass, ExpandoBridge expandoBridge, boolean indexable) | |
throws PortalException, SystemException { | |
ExpandoTable tbl = null; | |
CompanyThreadLocal.setCompanyId(companyId); | |
try { | |
tbl = ExpandoTableLocalServiceUtil.getDefaultTable(klass.getName()); | |
} catch (NoSuchTableException e) { | |
tbl = ExpandoTableLocalServiceUtil.addDefaultTable(klass.getName()); |
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.liferay.util.mail.MailEngine; import javax.mail.internet.InternetAddress; MailEngine.send(new InternetAddress("[email protected]"), new InternetAddress("[email protected]"), "your-appointment-has-been-scheduled", "hola", false); |
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.liferay.util.mail.MailEngine; import javax.mail.internet.InternetAddress; import com.liferay.portal.kernel.util.PropsUtil; import com.liferay.portal.kernel.util.PropsKeys; MailEngine.send(new InternetAddress("[email protected]"), new InternetAddress("[email protected]"), "correo de prueba", /*PropsUtil.get(PropsKeys.ADMIN_EMAIL_FROM_ADDRESS)*/PropsUtil.get(PropsKeys.MAIL_SESSION_MAIL_SMTP_USER), false); |
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
watch -n 60 'wget --quiet https://demo-eu08-prod.apigee.net/vehicles/models -O -' |
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
<plugins> | |
<plugin> | |
<groupId>org.codehaus.mojo</groupId> | |
<artifactId>exec-maven-plugin</artifactId> | |
<version>1.3.2</version> | |
<executions> | |
<execution> | |
<goals> | |
<goal>exec</goal> | |
</goals> |
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
// ---- | |
// Sass (v3.4.11) | |
// Compass (v1.0.3) | |
// ---- | |
@mixin animation-number($duration, $time){ | |
animation: fadein#{$duration} #{$time}s; | |
-moz-animation: fadein#{$duration} #{$time}s; | |
-webkit-animation: fadein#{$duration} #{$time}s; | |
-o-animation: fadein#{$duration} #{$time}s; |
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 org.apache.http.HttpHost; | |
import org.elasticsearch.action.search.SearchRequest; | |
import org.elasticsearch.action.search.SearchResponse; | |
import org.elasticsearch.client.RestClient; | |
import org.elasticsearch.client.RestHighLevelClient; | |
import org.elasticsearch.index.query.QueryBuilders; | |
import org.elasticsearch.search.aggregations.AggregationBuilders; | |
import org.elasticsearch.search.aggregations.metrics.sum.Sum; | |
import org.elasticsearch.search.builder.SearchSourceBuilder; |