Skip to content

Instantly share code, notes, and snippets.

View muhdkhokhar's full-sized avatar

Giri G Seku muhdkhokhar

View GitHub Profile
const ModuleFederationPlugin = require("webpack/lib/container/ModuleFederationPlugin");
const mf = require("@angular-architects/module-federation/webpack");
const path = require("path");
const share = mf.share;
const sharedMappings = new mf.SharedMappings();
sharedMappings.register(path.join(__dirname, "tsconfig.json"), [
/* mapped paths to share */
]);
<?xml version="1.0" encoding="UTF-8"?>
<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>tutorial</groupId>
<artifactId>powermock-jacoco-coverage</artifactId>
<version>1.0-SNAPSHOT</version>
WAITFOR (
RECEIVE TOP(1) @message_type = message_type_name,
@message_body = CAST(message_body AS varchar(max)),
@dialog = conversation_handle
FROM dbo.TestQueue )
package com.example.demolistener;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.jdbc.core.JdbcTemplate;
import java.util.List;
import java.util.Map;
You have 3 free member-only stories left this month. Upgrade for unlimited access.
Marcus Janke
Marcus Janke
Dec 27, 2019
·
2 min read
·
·
Consuming segmented IBM MQ messages in Java
SET TABLE mytablename TYPE CACHED
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jdbc-core</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jdbc-ext</artifactId>
<version>2.2.2.RELEASE</version>
import javax.jms.Message;
import org.springframework.util.ErrorHandler;
public class MyJmsErrorHandler implements ErrorHandler {
@Override
public void handleError(Throwable t) {
// Handle the error here
}
public class PersonSpecifications {
public static Specification<Person> hasFirstName(String firstName) {
return (root, query, cb) -> cb.equal(root.get("firstName"), firstName);
}
public static Specification<Person> hasLastName(String lastName) {
return (root, query, cb) -> cb.equal(root.get("lastName"), lastName);
}
import org.apache.lucene.analysis.standard.StandardAnalyzer;
import org.apache.lucene.queryparser.classic.ParseException;
import org.apache.lucene.queryparser.classic.QueryParser;
import org.apache.lucene.search.Query;
import org.apache.lucene.index.Term;
public class QueryBuilder {
public static Query buildQuery(String fieldName, String searchTerm) throws ParseException {
// Escape any special characters in the search term
String escapedSearchTerm = QueryParser.escape(searchTerm);