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
using System; | |
namespace Prime.Services | |
{ | |
public class PrimeService | |
{ | |
public bool IsPrime(int candidate) | |
{ | |
return candidate != 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
def factorial = { n -> (n == 1) ? 1G : n * call(n - 1) } | |
println factorial(100G) + 1G |
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
'use strict'; | |
// Look up all of the branches that contain with 'develop-' | |
jQuery("a:contains('develop-')").map(function (a) { | |
var a = this; | |
// Trim off all of the excess URL cruft to get back just the plan key | |
return a.href.substring(a.href.indexOf('browse/') + 7, a.href.lastIndexOf('/')); | |
}).each(function (i, planKey) { | |
// For each plan key, use the bamboo action chain to delete it using a POST through jQuery ajax. | |
setTimeout(function () { | |
jQuery.ajax({ |
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
{ | |
"links": { | |
"self": "/people" | |
}, | |
"data": [ | |
{ | |
"type": "people", | |
"id": 1, | |
"attributes": { | |
"firstName": "Jason", |
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
{ | |
"links": { | |
"self": "/people" | |
}, | |
"data": [ | |
{ | |
"type": "people", | |
"id": 1, | |
"attributes": { | |
"firstName": "Jason", |
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
<?php | |
namespace Starfleet\Entity; | |
class StarfleetCadet | |
{ | |
private $klingonSpeaker; | |
public function isKlingonSpeaker() | |
{ | |
return $this->klingonSpeaker; | |
} | |
public function setKlingonSpeaker($klingonSpeaker) |
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 StarfleetCadet { | |
private boolean klingonSpeaker; | |
public boolean isKlingonSpeaker(){ | |
return this.klingonSpeaker; | |
} | |
public void setKlingonSpeker(boolean klingonSpeakerIn){ | |
this.klingonSpeaker = klingonSpeakerIn; | |
} |
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 StarfleetCadet | |
{ | |
private bool KlingonSpeaker; | |
public bool IsKlingonSpeaker(){ | |
return this.klingonSpeaker; | |
} | |
public void SetKlingonSpeaker(bool klingonSpeakerIn){ | |
this.klingonSpeaker = klingonSpeakerIn; |
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
/** | |
* Does some magic | |
* @return an integer | |
*/ | |
public Integer goDoSomeMagic(){ | |
// Do some magic | |
return this.magicIsDone; | |
} |