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
public class LinkRenderer { | |
public void renderLink(Link link){ | |
link.render(); | |
} | |
} | |
abstract class Link{ | |
void render() { |
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
public class LinkRenderer { | |
void renderLink(String linkType) { | |
switch (linkType) { | |
case "LinkAndTextBelow": | |
renderLinkAndTextBelow(new LinkAndTextBelow()); | |
break; | |
case "LinkAndTextAdjacent": | |
renderLinkAndTextAdjacent(new LinkAndTextAdjacent()); | |
break; | |
default: |
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
public class Employee { | |
int employeeId; | |
String firstName; | |
String middleName; | |
String lastName; | |
int experience; | |
int salary; | |
public Employee(String firstName, String middleName, String lastName) { |
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
public class Employee { | |
int employeeId; | |
String firstName; | |
String middleName; | |
String lastName; | |
int experience; | |
int salary; | |
public void calculateSalary() { | |
if (experience < 5) { |
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
public class Employee { | |
int employeeId; | |
String firstName; | |
String middleName; | |
String lastName; | |
int experience; | |
int salary; | |
public void calculateSalary() { | |
if (experience < 5) { |
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 os; | |
def extract_users(file): | |
extract = {} | |
csv_file = "users.csv" | |
for line in file: | |
if "/codenjoy-contest/ws?user=" in line: | |
start = line.find("=") | |
limit = line.find("\\u0026") | |
startTime = line.find("\"time\":") |
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
0,2019-06-24T09:07:35.812265203Z | |
210bnkgjanc452d7bn1k,2019-06-24T09:07:42.812422356Z | |
3mu37hp1bpoh3j4eeypn,2019-06-24T06:18:51.815767601Z | |
5swcf2axhl9xrk5g5qdv,2019-06-24T09:06:34.276991149Z | |
63gk89b3j87z87a83eri,2019-06-24T09:07:59.996095655Z | |
c8ulx6n9awiov87rypgx,2019-06-24T06:14:16.161285553Z | |
cb4qtxkpht5geze4o32w,2019-06-24T09:07:03.559623812Z | |
imyjv7opwjtoyxhes5w8,2019-06-24T07:49:33.808259604Z | |
jmypxafssaaxfmf6jnob,2019-06-24T09:04:30.758699362Z | |
kytxzlkjxiqtmgqoih0m,2019-06-24T08:13:38.812440634Z |
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
// Very bad hashCode. Never do this. | |
@Override | |
public int hashCode() { | |
return 1; | |
} |
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
map.put(john, xyzCorp); | |
map.put(jane, abcCorp); |
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
public V get(Object key) { | |
Node<K,V> e; | |
return (e = getNode(hash(key), key)) == null ? null : e.value; | |
} | |
/** | |
* Implements Map.get and related methods | |
* | |
* @param hash hash for key | |
* @param key the key |
NewerOlder