Skip to content

Instantly share code, notes, and snippets.

View alexchiri's full-sized avatar

Alexandru (Alex) Chirițescu alexchiri

View GitHub Profile
@alexchiri
alexchiri / markdown_header.sublime-snippet
Last active December 10, 2015 08:28
markdown_header.sublime-snippet
<snippet>
<content><![CDATA[
Title: ${1:title}
Date: ${2:date}
Tags:
Published: false
]]></content>
<tabTrigger>header</tabTrigger>
<scope>text.html.markdown</scope>
</snippet>
public class Company {
private Employee employee;
public Company(Employee employee) {
this.employee = employee;
}
public void makeMoney() {
employee.doWork();
}
public class Company {
private Employee employee;
public Company() {
employee = new Employee();
}
public void makeMoney() {
employee.doWork();
}
Let's see what crops gets the Farmer in the next 5 years!
The random number that decides what kind of weather our Farmer has is: 1077820169
It's gonna be a WetWeather!
In year 1 the Farmer got the following Crops:
Rice in HIGH quantity.
The random number that decides what kind of weather our Farmer has is: 20363813
It's gonna be a WetWeather!
In year 2 the Farmer got the following Crops:
Let's see what crops gets the Farmer in the next 5 years!
The random number that decides what kind of weather our Farmer has is: -2142844333
It's gonna be a WetWeather!
In year 1 the Farmer got the following Crops:
Rice in HIGH quantity.
In year 2 the Farmer got the following Crops:
Rice in HIGH quantity.
package com.alexchiri.bank;
import java.util.List;
/**
* Alexandru Chiritescu
* 13-1-13
*/
public class Bank {
private Safe safe;
package com.alexchiri.bank;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;
/**
* Alexandru Chiritescu
* 13-1-13
*/
package com.alexchiri.robber;
import com.alexchiri.bank.Bank;
import java.util.Arrays;
import java.util.Random;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.RecursiveAction;
/**
package com.alexchiri;
import com.alexchiri.bank.Bank;
import com.alexchiri.bank.MoneyBag;
import com.alexchiri.robber.Heist;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
Random number of money bags to load the safe with: 3
Loading bank 'Cool bank' with 3 money bags!
Loading safe with 3 money bags!
Team Skeets is ready to go!
(Bank:Cool bank) Opening safe under gunpoint for main
Team Skeets can only steal 2 money bags.
(Bank:Cool bank) Removing 2 money bags from the safe for ForkJoinPool-1-worker-1
(Bank:Cool bank) Robbery ended and in the Safe we have 1 money bags left!