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
package com.alex.integration.processor; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.stereotype.Component; | |
@Component("pushNotificationMessageProcessor") | |
public class PushNotificationMessageProcessor { | |
private static final Logger log = LoggerFactory.getLogger(PushNotificationMessageProcessor.class); |
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
select | |
max(library.name) as libraryName, | |
libraryId, | |
max(tv_rating_system) as tv_rating_system, | |
max(movie_rating_system) as movie_rating_system, | |
max(ab_enabled) as ab_enabled, | |
max(movie_enabled) as movie_enabled, | |
max(music_enabled) as music_enabled, | |
max(tv_enabled) as tv_enabled | |
from ( |
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
@After | |
public void after() { | |
System.clearProperty("AWS_ACCESS_KEY_ID"); | |
System.clearProperty("AWS_SECRET_KEY"); | |
} | |
@Test | |
public void should_get_aws_credentials_in_local_environment() throws Exception { | |
// setup test |
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
public class KindService extends BaseCacheService { | |
public static final String LIST = "/browse/kinds/list"; | |
private Logger log = LoggerFactory.getLogger(KindService.class); | |
static List<Kind> cachedList; | |
@Inject | |
public KindService(CacheWrapper<String, Object> cache, | |
HttpExecutor httpExecutor, |
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
@Test | |
public void should_throw_exception_for_configure() throws Exception { | |
// setup test | |
module = new AWSModule(); | |
final Binder binder = mock(Binder.class); | |
when(binder.skipSources(any(Class.class))).thenThrow(new IOException("WTF")); | |
try { | |
module.configure(binder); |
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
public void bindProperties(Binder binder, String propertiesFile) { | |
log.info("binding {}", propertiesFile); | |
try { | |
final Properties props = new Properties(); | |
props.load(this.getClass().getClassLoader().getResourceAsStream(propertiesFile)); | |
Names.bindProperties(binder, props); | |
} catch (IOException e) { | |
throw new RuntimeException("Could not load " + propertiesFile, e); | |
} |
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
var carousel_${carouselName} = $('#${carouselName}').bxSlider({ | |
minSlides: 7, | |
maxSlides: 7, | |
slideWidth: 120, | |
slideMargin: 10, | |
pager: false, | |
infiniteLoop: false, | |
controls: true, | |
onSlideNext: function(){ |
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
@Override | |
protected PlaylistInfo doInBackground(AudioTrack... params) { | |
// pull the track out of the single element array... | |
final AudioTrack audioTrack = params[0]; | |
// get the content and segment index | |
final Content content = audioTrack.getContent(); | |
final int segment = audioTrack.getSegment(); |
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
@Override | |
protected PlaylistInfo doInBackground(AudioTrack... params) { | |
// pull the track out of the single element array... | |
final AudioTrack audioTrack = params[0]; | |
// get the content and segment index | |
final Content content = audioTrack.getContent(); | |
final int segment = audioTrack.getSegment(); |
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
// this is the service that plays the audio | |
private ServiceConnection audioServiceConnection = new ServiceConnection() { | |
public void onServiceConnected(ComponentName componentName, IBinder binder) { | |
mediaController = getMediaController(view.getApplicationContext()); | |
Log.d(TAG, "audio service connected"); | |
//noinspection unchecked | |
audioService = ((SimpleBinder<AudioService>) binder).getService(); |