working with spring-data-solr spring-data-mongodb

Problem statement Recently I’m running into an issue when trying to add spring-data-solr into a project that’s already using spring-data-mongodb Here is my maven/gradle dependency dataMongo: "org.springframework.data:spring-data-mongodb:1.8.4.RELEASE", dataSolr:"org.springframework.data:spring-data-solr:1.5.4.RELEASE"</pre> Here is my spring configuration: application-context.xml The moment I’ve added the dependency, the build is broken with the following error Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [posts.dao.ActivityTrackRepository] found ...

Run Gradle JUnit test in particular order

I’ve tried to search for a solution to run gradle JUnit tests in specific order, and here is the easy solution. For example, you want to initialize the test data before running any test, just specify the following include filters in build.gradle.    

AmazonS3 generatePresignedUrl SignatureDoesNotMatch 403

Recently I’m playing with AWS S3 client to generate a URL for client to upload files to our S3 bucket. The code example I referenced can be found here The above code works perfectly, I can get signed URL for file upload and upload file using uploadObject method. However, when I used CURL command to upload the ...

Solr DataImportHandler delta scheduler

Solr DataImportHandler delta scheduler
Background The DataImportHandler is a Solr contribution that provides a configuration driven way to import data from database or XML file into Solr. It takes care of Full builds (aka full index) Delta builds (incremental delta imports, which indexes newly added or modified documents as well as deleted documents) Official Solr wiki document Quick start Data import request ...

PostgreSQL execution plan explained

PostgreSQL execution plan explained
Recently I ran into slow query problem in our PostgreSQL database, after doing some research, I found those tips are pretty good. Just shared here: 1. Run “Explain [analyze] your SQL statement” The ANALYZE option causes the statement to be actually executed, not only planned. For more details, check PostgreSQL official ‘explain’ document: http://www.postgresql.org/docs/current/static/sql-explain.html 2. Look for “seq scan” in ...

Gradle run with Jetty access request log

Introduction The server access log records all incoming requests processed by the server. There’s one entry per request received, in the standard NCSA format. This will allow you to use standard tool like Webalizer to analyze these log files. A typical request log entry includes the remote host/IP address, date, method, URL, result, size, referrer and ...

Triad Inversion and 7th chord inverted

Triad inversion A triad is inverted when the lowest note is moved up an octave. Triads occur in three different positions (root position, 1st inversion and 2nd inversion) If the root of the chord is the lowest note (bass note), the triad is in root position If the third of the chord is the lowest ...

RCM Rudiments – identify triad, dominant 7th, diminished 7th, Quartal, polychord chords

How to identify chords Here is sample question in RCM advanced Rudiments exam – Identify each of the following chords as Major chord, Minor chord, augmented chord, diminished chord, dominant seventh chord, diminished seventh chord, quartal chord, polychord, or cluster. (Quiz, answer is at the end of this document) This might sounds overwhelmed, so let’s take ...

Complete measures with rests

A common question on Rudiments of Music exams is those fill-in-the-blank style question. You are given a measure of music with a time signature, a couple of notes, and a bracket. You are asked to complete the measure with rests on the staff below the bracket. Your job is to figure out the right values ...

Music intervals and Compound interval Explained

I’m helping my daughter Jolene prepare for her RCM advanced rudiments exam. I think the tips I gathered from various places (from her teacher, internet and practices) will be helpful to other students. Intervals An interval is the distance between two music pitches. Intervals consist a prefix and a number, for example Major 3, Perfect 5, ...