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
// for this to work you need to set `"chromeWebSecurity": false` in cypress.json | |
describe('Make Stripe Payment', function() { | |
before(function() { | |
cy.visit('http://localhost:3000/en/stripe/checkout/') | |
Cypress.Cookies.preserveOnce('sessionid') | |
}) | |
it('should enter credit card details and finalise payment', function() { | |
cy.get('[data-test="button-FormStripeCart-PayWithCreditCard"]').click() |
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 PlusOne(number As Integer) As Integer | |
PlusOne = number + 1 | |
End 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
Sub PrintNumber(number As Integer) | |
Console.WriteLine(number) | |
End Sub |
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
Dim number As Integer = 3 | |
Select Case number | |
Case 1 To 5 | |
Console.WriteLine("Between 1 and 5, inclusive") | |
Case 6, 7, 8 | |
Console.WriteLine("Between 6 and 8, inclusive") | |
Case 9 To 10 | |
Console.WriteLine("Equal to 9 or 10") | |
Case 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
function check() { | |
fb_checks = document.querySelectorAll('a[role="checkbox"]'); | |
for(i = 0; i < fb_checks.length; i++) { | |
if(fb_checks[i].getAttribute('aria-checked') == 'false') { | |
fb_checks[i].click(); | |
} | |
} | |
} |
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 forDisplay(num, index) { | |
return { | |
time: index, | |
value: num | |
}; | |
} | |
function nTimesArray(arr, nTimes) { | |
return [].concat.apply([], Array.apply(null, Array(nTimes)).map(function() { | |
return arr; |
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
% This script sets up a very simple simulation of habituation | |
% of the Aplysia gill withdrawal reflex. | |
% The size of the output (B) decreases with each input (A) | |
function main | |
startWeight = 4; | |
weigthDecrement = 0.7; | |
pulse = [0 0 1 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
submitComment(comment) { | |
const csrfToken = $('meta[name=csrf-token]').attr('content'); // Retrieve token from `csrf_meta_tags` | |
return fetch(API_URL, { | |
method: 'post', | |
credentials: 'same-origin', // Needed. See https://github.com/github/fetch#sending-cookies | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
'X-CSRF-Token': csrfToken, |
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 calcPtos() | |
{ | |
var _i, _fila; | |
var _filas_tabla = $('#tablestandings tr'); | |
var _pushed; | |
var myMappings = []; | |
//Somos 7 jugadores | |
for (_i = 1; _i < _filas_tabla.length; _i += 1) { | |
_pushed = false |