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
| GMaps = function(options){ | |
| this.div = $(options.div)[0]; | |
| this.markers = []; | |
| this.polygon = null; | |
| this.infoWindow = null; | |
| this.map = new google.maps.Map(this.div, { | |
| zoom: 15, | |
| center: new google.maps.LatLng(options.lat, options.lng), | |
| mapTypeId: google.maps.MapTypeId.ROADMAP | |
| }); |
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
| map = new GMaps({ | |
| div: '#map', | |
| lat: -12.043333, | |
| lng: -77.028333, | |
| tilesloaded: function(){ | |
| var path = []; | |
| var bounds = map.map.getBounds(); | |
| var ne = bounds.getNorthEast(); | |
| var sw = bounds.getSouthWest(); | |
| for(var i=1;i<=4;i++){ |
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
| $.ajax({ | |
| beforeSend: function(xhr) {xhr.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'))}, | |
| data1: value1, | |
| data2: value2, | |
| data3: value3 | |
| }); |
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 | |
| include('vpos_plugin.php'); | |
| $array_send = array(); | |
| $array_get = array(); | |
| $array_send['acquirerId'] = 117; | |
| $array_send['commerceId'] = 5654; | |
| $array_send['purchaseAmount'] = 100; | |
| $array_send['purchaseCurrencyCode'] = 604; |
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 map = new GMaps(); | |
| for(i in map){ | |
| if(typeof(map[i])=='object' && map[i]){ | |
| console.log(i+': '+map[i].constructor.name); | |
| } | |
| else{ | |
| console.log(i+': '+typeof(map[i])); | |
| } | |
| } |
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
| after_filter :store_location | |
| def store_location | |
| session[:previous_urls] ||= [] | |
| session[:previous_urls].unshift request.fullpath if session[:previous_urls].first != request.fullpath | |
| session[:previous_urls].pop if session[:previous_urls].count > 2 | |
| end | |
| def after_sign_in_path_for(resource) | |
| session[:previous_urls].last || root_path |
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 'xml' | |
| require 'active_support/inflector' | |
| class XMLParser | |
| attr_accessor :xml_string, :xml, :root | |
| def initialize(xml_string) | |
| self.xml_string = xml_string | |
| 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
| (assert (estadoAnimo depresivo)) | |
| (assert (nivelInteres bajo)) | |
| (assert (consumoDrogas no)) | |
| (defrule episodioDepresivoMayor | |
| (or (estadoAnimo depresivo) (estadoAnimo irritable)) | |
| (nivelInteres bajo) | |
| (perdidaPeso si) | |
| (perdidaApetito si) | |
| (capacidadConcentracion bajo) |
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
| (defrule episodioDepresivoMayor | |
| (or (estadoAnimo depresivo) (estadoAnimo irritable)) | |
| (nivelInteres bajo) | |
| (perdidaPeso si) | |
| (perdidaApetito si) | |
| (capacidadConcentracion bajo) | |
| (provocaMalestarLaboral si) | |
| (provocaMalestarSocial si) | |
| (consumoDrogas no) | |
| (tieneTranstornosDeMetabolismo no) |
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
| collection = [{ | |
| title : 'Product #1', | |
| price : 10.00, | |
| created_at : '2012-12-20' | |
| }, { | |
| title : 'Product #2', | |
| price : 15.00, | |
| created_at : '2012-12-10' | |
| }, { | |
| title : 'Product #3', |
OlderNewer