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 RepositoryImpl<T, ID extends Serializable> | |
extends SimpleJpaRepository<T, ID extends Serializable> { | |
ProjectionFactory projectionFactory; | |
public <P> List<P> findProjected(Specification<?> spec, Sort sort, Class<P> projectionClass) { | |
CriteriaBuilder criteriaBuilder = entityManager.getCriteriaBuilder(); | |
CriteriaQuery<Tuple> tupleQuery = criteriaBuilder.createTupleQuery(); | |
Root<?> root = tupleQuery.from(getDomainClass()); |
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
module MyModule | |
# Defines method_missing | |
module ClassMethods | |
def method_missing(method) | |
puts "Method: \"#{method}\" does not exist." | |
end | |
end | |
# Will add method_missing to MyModule itself |
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
_ | |
\ | |
project | |
| | |
|--.git--... | |
| | |
|--parent | |
| | | |
| |--.git | |
| | |
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 ConfigSample < Rubikon::Application::Base | |
global_option :c => :config | |
global_option :config, 'Override the configuration with the given file', :config_file do | |
path = File.dirname config_file | |
file = File.basename config_file | |
config = Rubikon::Config::Factory.new(file, path).config | |
@__app__.instance_eval { @config = config } | |
end |
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 | |
require_once 'steam-condenser.php'; | |
$game = 'cstrike'; | |
error_reporting(E_ERROR); | |
$master = new MasterServer(MasterServer::SOURCE_MASTER_SERVER); | |
$challenge = $master->getChallenge(); | |
$servers = $master->getServers(MasterServer::REGION_EUROPE, "\\gamedir\\{$game}"); |
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 | |
require_once 'steam-condenser.php'; | |
// Setting the timeout to 50ms (default is 1000ms / 1s) | |
SteamSocket::setTimeout(50); | |
// Query a local server which should respond quite fast | |
$server = new SourceServer(new InetAddress('192.168.0.5')); | |
$server->getRules(); |
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
find . -name '*.rbc' -exec rm {} \; |
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
Hello World! | |
The weather is nice! | |
See you soon. |
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
#!/bin/sh | |
# | |
# This code is free software; you can redistribute it and/or modify it under | |
# the terms of the new BSD License. | |
# | |
# Copyright (c) 2010, Sebastian Staudt | |
# | |
# This is a demonstration hook that can be used to automatically update a | |
# backup repository. | |
# |
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
# This works: | |
# @return [String] This is attribute #1 | |
attr_reader :attr1 | |
# @return [Object] This is attribute #2 | |
attr_reader :attr2 | |
# But this won't: |
NewerOlder