- This is an entry test for our ZaloPay candidates
- He/she must write solutions in English to answer following problems
- Code must be written in Java
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
sudo apt-get install netcat openssl libpcre3 dnsmasq procps perl | |
# for ubuntu 16.04 (xenial) | |
sudo apt-get -y install postgresql postgresql-contrib phppgadmin | |
sudo -i -u postgres | |
psql | |
CREATE USER kong; CREATE DATABASE kong OWNER kong; | |
ALTER USER kong WITH password 'kong'; |
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
// https://www.coursera.org/learn/cryptocurrency/programming/KOo3V/scrooge-coin | |
import java.security.PublicKey; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.Set; | |
import java.util.concurrent.ConcurrentHashMap; | |
public class TxHandler { | |
private UTXOPool pool; |
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
# Write a password generator that meets these four criteria: | |
# 1- The password length is always 4 | |
# 2- The password should consist letters and numbers from {A-F}, {a-f} and {1-6} and pick at least one from each of these(randomly) | |
# 3- No duplicate passwords generated | |
# 4- The password is generated totally randomly | |
array = list('ABCDEFabcdef123456') | |
count = 0 | |
def print_passwd(passwd): |
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
'use strict' | |
const _ = require('lodash'), | |
path = require('path') | |
/** | |
* Class for matching MQTT-like topics | |
*/ | |
class EventTree { | |
constructor() { |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>vn.zalopay.algo</groupId> | |
<artifactId>cache</artifactId> | |
<version>0.1.0</version> |
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
<html> | |
<head> | |
<style> | |
#bar { | |
background-color: #eee; | |
height: 600px; | |
width: 300px; | |
display: flex; | |
flex-direction: column; |
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
/** | |
* Generic interface for a method of transporting data. A TTransport may be | |
* capable of either reading or writing, but not necessarily both. | |
* | |
*/ | |
class TTransport { | |
/** | |
* Attempt to read up to the specified number of bytes into the string. | |
* |
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 React, { PropTypes } from "react"; | |
import { Scrollbars } from "react-custom-scrollbars"; | |
import ResponsiveComponent from "../responsive"; | |
export default class Card extends ResponsiveComponent { | |
render() { | |
const { | |
header, | |
children, | |
raised, |
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
#define Data_T(type) template <typename T> type Data<T> | |
template<typename T> | |
class Data { | |
private: | |
T _data; | |
public: | |
Data(T data); |