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 calculaICMS(valor){ | |
return valor * 0.19; | |
} | |
function calculaValorFinal(valor, callback){ | |
return valor + calculaICMS(valor); | |
} | |
var sacoLaranja = { | |
total: 25 |
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 Spinner = require('cli-spinner').Spinner; | |
var downloadSpinner = new Spinner('Downloading.. %s'); | |
downloadSpinner.setSpinnerString('|/-\\'); | |
downloadSpinner.start(); | |
var sum = 0; | |
for (var i=1;i<999000000;i++){ | |
sum = sum * i / sum; |
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"; | |
/* | |
* @author Ally Ogilvie | |
* @copyright Wizcorp Inc. [ Incorporated Wizards ] 2014 | |
* @file - facebookConnectPlugin.js | |
* @about - JavaScript interface for PhoneGap bridge to Facebook Connect SDK | |
* | |
*/ |
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
class ApplicationController < ActionController::API | |
after_filter :cors | |
def cors | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'OPTIONS, POST, DELETE, GET, PUT' | |
headers['Access-Control-Allow-Headers'] = 'Origin, X-Requested-With, Content-Type, Accept' | |
headers['Access-Control-Max-Age'] = '1728000' | |
end | |
end |
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
//Para controllers - For controllers | |
app.controller("Home", ["$scope", "$http", function ($scope, $http) { | |
alert("Lógica aqui dentro..."); | |
}]); | |
//E também para qualquer função que receba injeção de dependência. - Any function with dependency injection must consider this approach. | |
app.config(["$http", function ($http) { | |
$http.setBaseUrl('/'); |
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
require '../spec_helper' | |
describe ProjectsController, :type => :controller do | |
before(:all) do | |
@project = FactoryGirl.build(:project) | |
@project.save | |
end | |
after(:all) do | |
@project.delete |
NewerOlder