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
// ==UserScript== | |
// @name GMail Webpage: Remove ad | |
// @namespace http://use.i.E.your.homepage/ | |
// @version 0.1 | |
// @description remove bottom ad | |
// @match https://mail.google.com/mail/* | |
// @copyright 2014+, You | |
// ==/UserScript== | |
// hiding bottom ads |
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
//You can mock concrete classes, not only interfaces | |
LinkedList mockedList = mock(LinkedList.class); | |
//stubbing | |
when(mockedList.get(0)).thenReturn("first"); | |
when(mockedList.get(1)).thenThrow(new RuntimeException()); | |
//following prints "first" | |
System.out.println(mockedList.get(0)); |
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
" To set the toolbars off (icons on top of the screen) | |
set guioptions-=T | |
" Window settings | |
set lines=80 " Set window height | |
set columns=120 " Set window width 'co' | |
winpos 2000 60 | |
colorscheme darkblue | |
set guifont=Bitstream_Vera_Sans_Mono:h9:cDEFAULT |
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
/** | |
* Utility class for performance measurement and easy performance logging | |
* The measurement of durations is based on nanoseconds. | |
* | |
* @author Martin Gross | |
*/ | |
public class PerfMeasurement { | |
private long startTime; | |
private long endTime; |
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 LogfileFilter | |
def initialize regex1, regex2, input_file_name, output_file_name | |
@read_file = File.new input_file_name, "r" | |
puts "Reading file #{input_file_name}" | |
@write_file = File.new output_file_name, "w" | |
puts "Writing to file #{output_file_name}" | |
@reg_ex_1 = Regexp.new regex1 |
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
# Set root category priority to INFO and its only appender to CONSOLE. | |
log4j.rootCategory=INFO, CONSOLE | |
#log4j.rootCategory=INFO, CONSOLE, LOGFILE | |
log4j.logger.org.apache=ERROR | |
log4j.logger.com=DEBUG | |
# Set the enterprise logger priority to FATAL | |
# log4j.logger.org.apache.axis2.enterprise=FATAL |