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 SearchClasses { | |
private final Logger logger = Logger.getLogger(SearchClasses.class); | |
public Collection<String> scan() throws IOException { | |
ClasspathResolver pathResolver = new StandaloneClasspathResolver(); | |
final URL webInfClasses = pathResolver.findWebInfClassesLocation(); | |
AnnotationDB db = createAnnotationDB(); | |
db.scanArchives(webInfClasses); |
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
@SuppressWarnings("unused") | |
private void checkConstraints(T entity, boolean isUpdate) { | |
List<Field> fields = mirror.on(entity.getClass()).reflectAll().fields(); | |
List<Field> uniqueFields = onlyUniqueColumns(fields); | |
if (uniqueFields.size() != 0) { | |
validateConstraints(entity, isUpdate, mirror, uniqueFields); | |
} | |
} |
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
sudo /Developer/Library/uninstall-devtools --mode=all |
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 CommentsNormalizer | |
BLACK_LIST = ["arma", "carro"] | |
SPECIAL_CHARS = { | |
"@" => "a", | |
"4" => "a", | |
"0" => "o", | |
"3" => "e", | |
"1" => "i", | |
"." => "", |
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 Pagination<T> { | |
private final long totalRecords; | |
private final List<T> results; | |
public Pagination(long totalRecords, List<T> results) { | |
this.totalRecords = totalRecords; | |
this.results = results; | |
} |
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 ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
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
MacBook Pro 15' early 2010 | |
Processor 2.8 GHz Intel Core i7 | |
Memory 8 GB 1067 MHz DDR3 | |
Hi-Res Antiglare Display (1680 x 1050) | |
OCZ Vertex 3 240GB | |
NVIDIA GeForce GT 330M 512 MB graphics | |
R$ 4.000,00 |
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
package com.cocento.erp.acs.infra.database; | |
import java.net.URL; | |
import org.apache.log4j.Logger; | |
import org.hibernate.Session; | |
import org.hibernate.SessionFactory; | |
import org.hibernate.cfg.Configuration; | |
import org.hibernate.tool.hbm2ddl.SchemaExport; |
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
alias gitrebase="git checkout master && git pull origin master && git checkout work && git rebase master" | |
alias gitreb="git rebase master" | |
alias gitpush="git checkout work && git checkout master && git merge work && git push origin master && git checkout work" | |
alias gs="git status" | |
alias gogogo="gitrebase && gitpush" | |
alias gd="git diff" | |
alias gitupstream="git checkout master && git fetch upstream && git merge upstream/master && git push origin master && git checkout work" |
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 ActionDispatch::Routing::Mapper | |
def draw(routes_name) | |
instance_eval(File.read(Rails.root.join("config/routes/#{routes_name}.rb"))) | |
end | |
end | |
BCX::Application.routes.draw do | |
draw :api | |
draw :account | |
draw :session |
OlderNewer