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
RewriteEngine on | |
RewriteCond %{HTTP_REFERER} !^http://www\.tuosito\.com [NC] | |
RewriteRule ^$ /splashpage.html [R] |
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
public class GenericInvokerTest | |
{ | |
[Test] | |
public void ShouldDynamicallProxyAGenericClass() | |
{ | |
var sut = new Sut(); | |
var injectableBehaviour = Substitute.For<IInjectableBehaviour>(); | |
var wrapped = Wrapper<Sut>.Create(new Sut(), injectableBehaviour); | |
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
using System; | |
using MemoSpike.MemoizatorSpike; | |
namespace MemoSpike | |
{ | |
using System; | |
using System.Collections.Generic; | |
namespace MemoizatorSpike |
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
static Func<A, R> Memoize<A, R>(this Func<A, R> function) | |
{ | |
var cache = new Dictionary<A, R>(); | |
return argument => | |
{ | |
R result; | |
if(!cache.TryGetValue(argument, out result)) | |
{ | |
r = function(argument); | |
cache.Add(argument, result); |
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
namespace Nullity | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
String nullity = null; | |
if (nullity == null) | |
{ |
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 jr_track = { | |
country: 'tw', | |
id: 6775784, | |
uuid: 'twF00149141076fd0670', | |
}; | |
var trackApplication = function() { | |
var jrta = document.createElement('script'); |
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
package net.jobrapido.fo.api.v1.resources; | |
import org.junit.Test; | |
import static org.junit.Assert.assertEquals; | |
import static org.junit.Assert.assertNotNull; | |
public class SplitTest { | |
@Test |
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
package main | |
import "fmt" | |
// fibonacci is a function that returns | |
// a function that returns an int. | |
func fibonacci() func() int { | |
a1 := 0 | |
a2 := 1 | |
return func() int { |
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
public static Integer LENGTH(final String string) { | |
if (StringUtils.isEmpty("")) { | |
if (StringUtils.isEmpty(string)) { | |
return 0; | |
} else { | |
return string.length(); | |
} | |
} else if (StringUtils.isEmpty(string)) { | |
return 1; | |
} |
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
### Elixir | |
defmodule Geom do | |
def area(:rectangle, length, width) do | |
length * width | |
end | |
def area(:triangle, base, height) do | |
base * height / 2 | |
end |