Skip to content

Instantly share code, notes, and snippets.

Viktor Farcic vfarcic

Block or report user

Report or block vfarcic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View frontEnd.tmpl.html
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked">
<li><a href="/page/static/responsiveGrid">Multichannel</a></li>
<li><a href="/page/static/navigation">Navigation</a></li>
<li><a href="/page/static/staticScreen">Static Screens</a></li>
</ul>
</div>
@vfarcic
vfarcic / MarsRover.js
Created Oct 7, 2014
Mars Rover kata in JavaScript: implementation
View MarsRover.js
function MarsRover(location, direction, grid, obstacles) {
self = this;
this.location = (location === undefined) ? [0, 0] : location;
this.direction = (direction === undefined) ? 'N' : direction;
this.grid = (grid === undefined) ? [100, 100] : grid;
this.obstacles = (obstacles === undefined) ? [] : obstacles;
this.status = 'OK';
this.commands = function(commands) {
@vfarcic
vfarcic / MarsRover.spec.js
Created Oct 7, 2014
Mars Rover kata in JavaScript: tests
View MarsRover.spec.js
describe('Mars Rover', function() {
describe('You are given the initial starting point (x,y) of a rover and the direction (N,S,E,W) it is facing', function() {
it('should set starting location', function() {
var mr = new MarsRover([12, 21]);
expect(mr.location).toEqual([12, 21]);
});
it('should use default starting location value 0x0 when not assigned', function() {
var mr = new MarsRover();
expect(mr.location).toEqual([0, 0]);
@vfarcic
vfarcic / RoverSpec.java
Created Oct 16, 2014
Mars Rover kata spec
View RoverSpec.java
package com.technologyconversations.kata.marsrover;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import static org.assertj.core.api.Assertions.*;
@vfarcic
vfarcic / Rover.java
Created Oct 16, 2014
Mars Rover kata solution
View Rover.java
package com.technologyconversations.kata.marsrover;
/*
Method receiveCommands should be used to transmit commands to the rover.
*/
public class Rover {
private Coordinates coordinates;
public void setCoordinates(Coordinates value) {
coordinates = value;
View ToUpperCaseSpec.java
package com.technologyconversations.java8exercises.streams;
import org.junit.Test;
import java.util.List;
import static com.technologyconversations.java8exercises.streams.ToUpperCase.*;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
View ToUpperCase.java
package com.technologyconversations.java8exercises.streams;
import java.util.ArrayList;
import java.util.List;
import static java.util.stream.Collectors.toList;
public class ToUpperCase {
public static List<String> transform7(List<String> collection) {
View FilterCollectionSpec.java
package com.technologyconversations.java8exercises.streams;
import org.junit.Test;
import java.util.List;
import static com.technologyconversations.java8exercises.streams.FilterCollection.*;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
View FilterCollection.java
package com.technologyconversations.java8exercises.streams;
import java.util.ArrayList;
import java.util.List;
import static java.util.stream.Collectors.toList;
public class FilterCollection {
public static List<String> transform7(List<String> collection) {
View FlatCollectionSpec.java
package com.technologyconversations.java8exercises.streams;
import org.junit.Test;
import java.util.List;
import static com.technologyconversations.java8exercises.streams.FlatCollection.*;
import static java.util.Arrays.asList;
import static org.assertj.core.api.Assertions.assertThat;
You can’t perform that action at this time.