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 | |
| $xmlConfigurationPath = __DIR__. '/.idea/php.xml'; | |
| $xml = simplexml_load_file($xmlConfigurationPath); | |
| $node = $xml->xpath('component[@name="PhpStepFilterConfiguration"]'); | |
| if(!empty($node)) | |
| { | |
| unset($node[0][0]); | |
| } |
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 | |
| echo "Olá Mundo!"; |
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
| const express = require('express') | |
| const app = express() | |
| const port = 3000 | |
| app.get('/somar', function (request, response){ | |
| let num1 = request.query.num1 | |
| let num2 = request.query.num2 | |
| if(!num1 || !num2){ | |
| return response.status(400).send('O num1 e num2 precisam ser informados') |
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
| const fs = require('fs') | |
| const Promise = require('promise') | |
| const path = './' | |
| function readdirPromise(path){ | |
| return new Promise(function(fulfill, reject){ | |
| fs.readdir(path, (err, files) => { | |
| if(err){ | |
| reject(err) | |
| }else{ |
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 fs = require('fs') | |
| var Promise = require('promise') | |
| const path = './' | |
| function readdirPromise(path){ | |
| return new Promise(function(fulfill, reject){ | |
| fs.readdir(path, (err, files) => { | |
| if(err){ | |
| reject(err) | |
| }else{ |
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 fs = require('fs') | |
| var Promise = require('promise') | |
| const path = './' | |
| function readdirPromise(path){ | |
| return new Promise(function(fulfill, reject){ | |
| fs.readdir(path, (err, files) => { | |
| if(err){ | |
| reject(err) | |
| }else{ |
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
| const produtos = [ | |
| { | |
| id: 1, | |
| preco: 10.0, | |
| qtd: 2 | |
| }, | |
| { | |
| id: 2, | |
| preco: 10.0, | |
| qtd: 2 |
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
| const produtos = [ | |
| { | |
| nome: 'Bicicleta', | |
| preco: 1200.0 | |
| }, | |
| { | |
| nome: 'Capacete', | |
| preco: 450.0 | |
| } | |
| ] |