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
| app.get('/recomendados/:lista', async(req, res) => { | |
| const lista = JSON.parse(req.params.lista); | |
| await Sound.find({"genre":{ $in: lista}}, (err, sounds) => { | |
| if(err) return res.json(err); | |
| res.json(sounds); | |
| }) | |
| }); |
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::beginTransaction(); | |
| try{ | |
| $endereco_array = array( | |
| 'cep' => $request->input('cep'), | |
| 'logradouro' => $request->input('logradouro_endereco'), | |
| 'bairro' => $request->input('bairro_endereco'), | |
| 'cidade' => $request->input('cidade_endereco'), | |
| 'uf' => $request->input('uf_endereco'), |
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
| function login(login, password){ | |
| return new Promise(function(resolve, reject){ | |
| ad.findUserAsync(login) | |
| .then(function(user){ | |
| var context = { | |
| user: user, | |
| password: password | |
| }; | |
| return resolve(context); | |
| }) |
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
| (function(){ | |
| 'use strict'; | |
| angular | |
| .module('estacionamento') | |
| .directive('adesivoValidator', adesivoValidator); | |
| adesivoValidator.$inject = ['$http', '$q']; | |
| function adesivoValidator($http, $q){ |
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
| <?php | |
| namespace App; | |
| use Illuminate\Database\Eloquent\Model; | |
| use Sofa\Eloquence\Eloquence; | |
| use Sofa\Eloquence\Mappable; | |
| class Pessoa extends Model | |
| { |
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
| (function(){ | |
| 'use strict'; | |
| angular.module('roulette-movie',['ui.router']) | |
| .config(function($stateProvider, $urlRouterProvider) { | |
| $urlRouterProvider.otherwise('/'); | |
| $stateProvider | |
| .state('home', { | |
| url: '/', | |
| controller: 'HomeController as home', |
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
| 'use strict;'; | |
| var gulp = require('gulp') | |
| , gutil = require('gulp-util') | |
| , uglify = require('gulp-uglify') | |
| , concat = require('gulp-concat') | |
| , ngAnnotate = require('gulp-ng-annotate') | |
| , sourcemaps = require('gulp-sourcemaps') | |
| ; | |
| gulp.task('default', function(){ |
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
| <?php | |
| class cliente { | |
| public $nome; | |
| public $saldo; | |
| public function confirmarrecebimento(){ echo "<br/>Confirmado o recebimento"; } | |
| public function pagarconta($valor){ echo "<br/>Foi pago o valor de R$ ".$valor; } | |
| } | |
| include("cliente-class.php"); |
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
| var vetor=[6, 5, 1, 9, 0, 1, 4, 2, 3, 7], | |
| i,k,a; | |
| k=1; | |
| i=0; | |
| a=false; | |
| while(i<=10 && a==false){ | |
| if(vetor[i]==k){ | |
| console.log("Sucesso"); | |
| a = true; |
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
| var request=require("request-json");request.newClient('http://worldcup.sfg.io/').get('/matches',function(error,response,body){body.forEach(function(game){if(game.status=='completed')console.log(game.home_team.country+" "+game.home_team.goals+" X "+game.away_team.goals+" "+game.away_team.country)})}); |