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.lucene.analysis.*; | |
import org.apache.lucene.analysis.en.KStemFilter; | |
import org.apache.lucene.analysis.standard.StandardAnalyzer; | |
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute; | |
import org.apache.lucene.util.*; | |
import java.io.StringReader; | |
public class KStemTest { | |
public static final String QUERY_TERMS = "homer historicity"; |
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
#!/usr/bin/env python3 | |
# prints a tab-delimited list of Alma location codes & names | |
import requests | |
import sys | |
import os | |
from collections import namedtuple | |
from typing import Iterable | |
key = os.environ.get('ALMA_API_KEY') or \ |
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
/** | |
* An example of dynamically appending a template to a "grandparent" element. | |
* It's usually not a good practice for a component to perform DOM manipulation | |
* on outside elements, but in Primo it can sometimes be useful when your target | |
* element doesn't have an "after" hook. | |
*/ | |
class MyCustomComponentController { | |
constructor($scope, $compile, $element) { | |
this.$scope = $scope; | |
this.$element = $element; |
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
class BrowzineController { | |
constructor(browzineService, $scope) { | |
this.browzineService = browzineService; | |
this.$scope = $scope; | |
} | |
$onInit() { | |
this.browzineService.handleSearchResult(this.$scope); | |
} | |
} |
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
const gaTrackingId = '...'; | |
class GoogleAnalytics { | |
constructor($rootScope, $location, $window) { | |
this.$rootScope = $rootScope; | |
this.$location = $location; | |
this.$window = $window; | |
this.loadAnalytics(this.$window); | |
} | |