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
import org.springframework.http.HttpMethod | |
import org.springframework.http.HttpStatus | |
import org.springframework.stereotype.Component | |
import org.springframework.web.server.ServerWebExchange | |
import org.springframework.web.server.WebFilter | |
import org.springframework.web.server.WebFilterChain | |
import reactor.core.publisher.Mono | |
@Component | |
class CorsFilter : WebFilter { |
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
// our configuration model | |
class BouquetConfiguration extends ArrayList<String> { | |
int howMany(String flower) { | |
return this.count { it == flower } | |
} | |
String toString() { | |
return "Bouquet: " + this.toString() | |
} |
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
class BouquetConfiguration extends ArrayList<String> { | |
int howMany(String flower) { | |
return this.count { it == flower } | |
} | |
String toString() { | |
return "Bouquet: " + this.toString() | |
} | |
} |
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
// our configuration model | |
class BouquetConfiguration extends ArrayList<String> { | |
int howMany(String flower) { | |
return this.count { it == flower } | |
} | |
String toString() { | |
return "Bouquet: " + this.toString() | |
} |
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 Your\Package\Name\Http; | |
use Neos\Flow\Http\Component\ComponentChain; | |
use Neos\Flow\Http\Component\ComponentContext; | |
use Neos\Flow\Http\Component\ComponentInterface; | |
/** | |
* !!! be aware that this component enables CORS for the entire application !!! |
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
import java.io.*; | |
import java.util.zip.ZipEntry; | |
import java.util.zip.ZipInputStream; | |
public class ZipUtils { | |
/** | |
* @param source zip stream | |
* @param target target directory | |
* @throws IOException extraction failed |
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
class HelloWorldService { | |
void printHelloWorld() { | |
println("Hello World") | |
} | |
} | |
class HelloWorldScript { | |
// by annotating the parameter we gain syntax highlighting and auto-completion | |
static void execute(@DelegatesTo(strategy = Closure.DELEGATE_FIRST, value = HelloWorldService) Closure script) { | |
script.resolveStrategy = Closure.DELEGATE_FIRST |
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
import Ember from 'ember'; | |
/** | |
* use "{{yield sorted}}" as handlebars template | |
*/ | |
export default Ember.Component.extend({ | |
list: undefined, | |
property: undefined, | |
sorted: function () { |
NewerOlder