- What is your role and responsibilities in your current project?
- Find common elements from two arrays? Without using any Ruby operator and tell me how would you write a program?
- How to find an element from an array? How it internally works?
- How to sort ruby objects based on particular object? For ex: [@user1, @user2, @user3, @user4] - Then sort it by user's salary.
- Explain MVC?
- What is the use of moving controller code to model?
- Tell me the internal flow of execution when I call some method? For ex: @object.some_method
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
-- | |
-- Mostra o andamento de operacoes longas no Oracle. | |
-- | |
select target, sofar, totalwork, ROUND((sofar/totalwork)*100,5) pct_done | |
from v$session_longops | |
where (sid, serial#) in (select sid, serial# | |
from v$session | |
where logon_time > trunc(sysdate)) | |
order by pct_done; |
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
############################################################ | |
# Dockerfile to build Pentaho EE BA Server container images | |
# Based on Ubuntu 14.04 | |
############################################################ | |
FROM ubuntu:14.04 | |
MAINTAINER Matt Tucker, matthewtckr@gmail.com | |
## Install Base Software | |
RUN apt-get update -y |
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
git log --graph --pretty=oneline --abbrev-commit |
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
@Grab( 'org.apache.poi:poi:3.9' ) | |
import static org.apache.poi.ss.usermodel.CellStyle.* | |
import static org.apache.poi.ss.usermodel.IndexedColors.* | |
import org.apache.poi.hssf.usermodel.HSSFWorkbook | |
new HSSFWorkbook().with { workbook -> | |
def styles = [ LIGHT_BLUE, LIGHT_GREEN, LIGHT_ORANGE ].collect { color -> | |
createCellStyle().with { style -> | |
fillForegroundColor = color.index | |
fillPattern = SOLID_FOREGROUND |
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
[Unit] | |
Description=Virtual Frame Buffer X Server | |
After=network.target | |
[Service] | |
ExecStart=/usr/bin/Xvfb :42 -screen 0 1x1x24 -ac +extension GLX +render -noreset | |
[Install] | |
WantedBy=multi-user.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
emulator -list-avds | cat -n | |
printf "Select AVD: " | |
read index | |
avd=$(emulator -list-avds | sed "${index}q;d") | |
echo "Selected $avd" | |
emulator -netdelay none -netspeed full -avd $avd |
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 "code.google.com/p/go-tour/pic" | |
func Pic(dx, dy int) [][]uint8 { | |
// Allocate two-dimensioanl array. | |
a := make([][]uint8, dy) | |
for i := 0; i < dy; i++ { | |
a[i] = make([]uint8, dx) | |
} |
OlderNewer