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
var Inputs = Class.extend({ | |
validate: function() { | |
blablabal | |
if ( someCondition ) { | |
f = this.validate | |
} | |
} | |
) | |
var f = function(){} | |
.... |
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
//A) This | |
countries = ImmutableList.copyOf( Collections2.filter( | |
Sets.newLinkedHashSet(Iterables.concat(someCountries, someOthers)), | |
availableCountries)); | |
//B) vs. That | |
countries = ImmutableList.copyOf( | |
Collections2.filter( | |
Sets.newLinkedHashSet(Iterables.concat(someCountries, someOthers)), | |
availableCountries |
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
@RequestMapping(value = "/hola", method = RequestMethod.GET) | |
public String hola(Model model, | |
@ModelAttribute("command") Object command, | |
BindingResult results, | |
RedirectAttributes redirectAttributes ) { | |
model.addAttribute("command", command); | |
ValidationUtils.invokeValidator(validator, command, results); | |
if (results.hasErrors()) { | |
redirectAttributes.addFlashAttribute("errors", results.getAllErrors()); |
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.util.Date; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.text.SimpleDateFormat; | |
import java.text.ParseException; | |
class Employee { | |
String name; |
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 static java.lang.System.out; | |
import java.util.Scanner; | |
class Equipo { | |
private String nombre; | |
private int juegosJugados; | |
private int juegosGanados; | |
private int juegosEmpatados; | |
private int juegosPerdidos; | |
private int golesFavor; |
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 main | |
import ( | |
"fmt" | |
//"unicode" | |
) | |
func main() { | |
fmt.Println("0000") | |
fmt.Println(WordWrap("999999999", 2)) |
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
/* | |
Copyright (c) 2013, Oscar Reyes | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without modification, | |
are permitted provided that the following conditions are met: | |
- Redistributions of source code must retain the above copyright notice, | |
this list of conditions and the folLowing disclaimer. | |
- Redistributions in binary form must reproduce the above copyright notice, |
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 dummy; | |
import java.util.Random; | |
import java.net.Socket; | |
import java.net.ServerSocket; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.OutputStream; | |
public class DummyServer { |
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
http://play.golang.org/p/3z5PNHzQtR |
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 calculator | |
import ( | |
"errors" | |
"fmt" | |
"strconv" | |
"strings" | |
) | |
func Add(numbers string) (int, error) { |