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
angular | |
.module('ionicApp.state.CampaingCategoryController', []) | |
.controller('CampaingCategoryController', function ($scope, CampaingCategoryFactory) { | |
var initialize = function(){ | |
CampaingCategoryFactory.categories().then(function(data){ | |
$scope.categories = data; | |
console.log($scope.categories); | |
console.log("\n"); | |
}, 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
angular | |
.module('ionicApp.state.CampaingCategoryController', []) | |
.controller('CampaingCategoryController', ['$scope','CampaingCategoryFactory', function ($scope, CampaingCategoryFactory) { | |
console.log('CampaingCategoriesController loaded'); | |
// CampaingCategoryFactory.hello(); | |
// CampaingCategoryFactory.categories(); | |
// CampaingCategoryFactory.category(); | |
$scope.categories = CampaingCategoryFactory.categories().then(function(data){ |
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
-Dspring.profiles.active=development -Xmx2048m -XX:MaxPermSize=512M -DAPPLICATION_VERSION=0.0.1-1 |
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
qtd_numero_iguais :: Int -> Int -> Int -> Int | |
qtd_numero_iguais a b c = if (a == b && b==c) then 3 else if (a==b || b ==c || a==c) then 2 else 0 | |
--b*b > 4*a*c | |
duas_raizes a b c = b*b > 4*a*c | |
--b*b == 4*a*c | |
uma_raiz a b c = b*b == 4*a*c | |
--b*b < 4*a*c | |
nenhuma_raiz a b c = b*b < 4*a*c |
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
set global sql_mode='STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; |
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
{-| | |
1) | |
> 7 `div` 2: | |
3 | |
> 7 `div` 2 == div 7 2 | |
True | |
> (*) ((+) 7 2) 7 | |
63 | |
> (+1) 3 | |
4 |
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 JavaApplication1 { | |
static int i = 3; | |
public static void main(String[] x) { | |
for(new JavaApplication1().i = 10;new JavaApplication1().i < 100;new JavaApplication1().i++){ | |
System.out.println(i); | |
} | |
} | |
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 http = require('http'); | |
//The url we want is: 'www.random.org/integers/?num=1&min=1&max=10&col=1&base=10&format=plain&rnd=new' | |
var options = { | |
host: 'api.postmon.com.br', | |
path: '/v1/rastreio/ect/PI939559055BR' | |
}; | |
callback = function(response) { | |
var str = ''; |
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
# SQLite version 3.x | |
# gem install sqlite3-ruby (not necessary on OS X Leopard) | |
development: | |
adapter: sqlite3 | |
database: db/development.sqlite3 | |
pool: 5 | |
timeout: 5000 | |
# Warning: The database defined as "test" will be erased and | |
# re-generated from your development database when you run "rake". |
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
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |