This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections | |
sudo apt-get install -y oracle-java8-set-default | |
sudo apt-get install -y curl | |
sudo apt-get install -y git | |
sudo apt-get install -y zip | |
sudo apt-get install -y libfontconfig |
This file contains hidden or 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
#!/bin/bash | |
# How to run this script | |
# | |
# Windows only, do it first: | |
# vagrant up | |
# vagrant ssh | |
# cd /vagrant | |
# | |
# Running the script: |
This file contains hidden or 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 com.dluxdays.service.csv; | |
import com.dluxdays.service.util.OfferCSVDTO; | |
import com.dluxdays.service.util.OfferCSVDTOBuilder; | |
import com.dluxdays.web.rest.CSVResource; | |
import org.springframework.stereotype.Service; | |
import org.springframework.transaction.annotation.Transactional; | |
import java.util.HashMap; | |
import java.util.Map; |
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections | |
sudo apt-get install -y oracle-java8-set-default | |
sudo apt-get install -y curl | |
sudo apt-get install -y git | |
sudo apt-get install -y zip | |
sudo apt-get install -y libfontconfig |
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections | |
sudo apt-get install -y oracle-java8-set-default | |
sudo apt-get install -y curl | |
sudo apt-get install -y git | |
sudo apt-get install -y zip | |
sudo apt-get install -y libfontconfig |
This file contains hidden or 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
sudo apt-get update | |
sudo apt-get install -y python-software-properties | |
sudo add-apt-repository -y ppa:webupd8team/java | |
sudo apt-get update | |
echo "oracle-java8-installer shared/accepted-oracle-license-v1-1 select true" | sudo debconf-set-selections | |
sudo apt-get install -y oracle-java8-set-default | |
sudo apt-get install -y curl | |
sudo apt-get install -y git | |
sudo apt-get install -y zip | |
sudo apt-get install -y libfontconfig |
This file contains hidden or 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 Node { | |
constructor(char, isWordComplete = false) { | |
this.char = char; | |
this.isWordComplete = isWordComplete; | |
this.children = new Map(); // Map<char, Node> | |
} | |
} |
This file contains hidden or 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 Matrix { | |
constructor() { | |
this.matrix = [ | |
[false, false, false, false], | |
[false, true, false, false], | |
[false, true, false, false], | |
[false, false, false, false] | |
]; | |
} |
This file contains hidden or 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
const _ = require('underscore'); | |
class MergeSort { | |
sort(arr) { | |
if(arr.length === 1) { | |
return arr; | |
} | |
const half = Math.floor(arr.length / 2); |
This file contains hidden or 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
const _ = require('underscore'); | |
class FindSum { | |
// O(n) | |
find(arr, totalSum) { | |
const m = new Map(); | |
// O(n) | |
arr.forEach((value) => { |