This file contains hidden or 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
| { | |
| "version": "1.0", | |
| "session": { | |
| "new": true, | |
| "sessionId": "", | |
| "application": { | |
| "applicationId": "" | |
| }, | |
| "user": { | |
| "userId": "" |
This file contains hidden or 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 CancelAndStopIntentHandler implements RequestHandler { | |
| @Override | |
| public boolean canHandle(HandlerInput input) { | |
| return input.matches(intentName("AMAZON.StopIntent").or(intentName("AMAZON.CancelIntent"))); | |
| } | |
| @Override | |
| public Optional<Response> handle(HandlerInput input) { | |
| String text = "Gracias por usar Estrenos de cine"; |
This file contains hidden or 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 UpcomingMoviesStreamHandler extends SkillStreamHandler { | |
| public static final String CARD_TITLE = "Estrenos de cine"; | |
| public UpcomingMoviesStreamHandler() { | |
| super(getSkill()); | |
| } | |
| private static Skill getSkill() { | |
| return Skills.standard() |
This file contains hidden or 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
| <dependencies> | |
| <dependency> | |
| <groupId>com.amazon.alexa</groupId> | |
| <artifactId>ask-sdk</artifactId> | |
| <version>2.9.2</version> | |
| </dependency> | |
| <dependency> | |
| <groupId>com.amazonaws</groupId> | |
| <artifactId>aws-lambda-java-log4j2</artifactId> | |
| <version>1.0.0</version> |
This file contains hidden or 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
| @RunWith(Suite.class) | |
| @SuiteClasses({ MyTestClass.class }) | |
| public class JettyServerRESTTestSuite { | |
| private static final String APP_NAME = "/context"; | |
| private static final int PORT = 4141; | |
| public static final String APP_SERVER_ADDRESS = "http://localhost:" + PORT + APP_NAME + "/rest" + APP_NAME; | |
| private static Server server; | |
This file contains hidden or 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 Prueba { | |
| public class Padre { | |
| } | |
| public class Hija extends Padre { | |
| @Override | |
| public String toString() { |
This file contains hidden or 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
| db.zips.aggregate([{$project:{first_char: {$substr: ["$city", 0, 1]}, pop:1, _id:0}}, {$match:{first_char:{$lte:'9'}}}, {$group:{_id:null, total:{$sum:"$pop"}}}]) |
This file contains hidden or 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
| db.grades.aggregate([{$unwind:"$scores"}, {$match:{$or:[{"scores.type":"homework"}, {"scores.type":"exam"}]}}, {$group:{_id:{student_id:"$student_id", class_id:"$class_id"}, avg_score:{$avg:"$scores.score"}}}, {$group:{_id:"$_id.class_id", avg_score_class:{$avg:"$avg_score"}}}, {$sort:{avg_score_class:1}}]) |
This file contains hidden or 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
| db.zips.aggregate([{$match:{$or:[{state:"CA"}, {state:"NY"}]}}, {$group:{_id:{state:"$state", city:"$city"}, total_pop:{$sum:"$pop"}}}, {$match:{total_pop:{$gt:25000}}}, {$group:{_id:null, avg_pop:{$avg:"$total_pop"}}}]) |
This file contains hidden or 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
| /* ==================================================================== | |
| Licensed to the Apache Software Foundation (ASF) under one or more | |
| contributor license agreements. See the NOTICE file distributed with | |
| this work for additional information regarding copyright ownership. | |
| The ASF licenses this file to You under the Apache License, Version 2.0 | |
| (the "License"); you may not use this file except in compliance with | |
| the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 |