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
int fib(int n){ | |
if(n<=2){ | |
return 1 | |
} | |
int i=3; | |
int i1=1; | |
int i2=1; | |
int sum; | |
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 ... | |
import static org.junit.Assert.* | |
import java.text.MessageFormat | |
import java.util.concurrent.ExecutorService | |
import java.util.concurrent.Executors | |
import java.util.concurrent.TimeUnit | |
import org.junit.After; |
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.apache.log4j.Appender | |
import org.apache.log4j.AsyncAppender | |
import org.slf4j.impl.Log4jLoggerAdapter | |
/** | |
* Replaces the original sync appender with an async appender | |
* @author arrizabalaga | |
*/ | |
class AsyncAppenderBuilder { | |
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
//Super class | |
var Car = function(loc){ | |
this.loc=loc; | |
}; | |
Car.prototype.move=function(){ | |
this.loc++; | |
}; | |
//Sub class |
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
update `datamart`.`mytable` | |
set | |
mycolumn = case (FLOOR(1 + RAND() * 5)) | |
when 1 then 'SOME' | |
when 2 then 'RANDOM' | |
when 3 then 'STUFF' | |
when 4 then 'RIGHT' | |
when 5 then 'HERE' | |
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
////////////////////// | |
//DEVELOPMENT | |
////////////////////// | |
//Checkout development branch and check | |
git checkout develop | |
git branch | |
//Code for a while | |
emacs.... |
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
//Couple of VO classes | |
class ParamsContainerA{ | |
int num1 | |
String text1 | |
boolean bool1 | |
} | |
class ParamsContainerB{ | |
int num2 | |
String text2 |
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 groovy.beans.Bindable | |
import groovy.swing.SwingBuilder | |
class MyModel { | |
@Bindable String value | |
} | |
def model = new MyModel() | |
def isNumber = { val -> |
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
/** | |
Target | |
Promocion | |
Promocion | |
Target | |
belongsTo | |
**/ | |
create table target ( |
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
/** | |
Target | |
Promocion | |
Promocion | |
Target | |
**/ | |
create table target ( | |
id bigint generated by default as identity, |
NewerOlder