Coder Social home page Coder Social logo

zvamature's Projects

99-problems icon 99-problems

This is an adaptation of the Ninety-Nine Prolog Problems written by Werner Hett.

algorithmanddatastructureinjava icon algorithmanddatastructureinjava

If you are interested in learning java or preparing for coding test, this repository can help you. Star this repo, fork it or clone and start running the code. This has basic Java concepts to advanced algorithm, data structures and coding challenges and solution of cracking the coding interview book in java. .

atlasgrouptest icon atlasgrouptest

JAVA developer assesment test ------------------------------------ Write "BACONATOR" - a Java 12 Spring Boot application conforming the following specification: - providing REST interface (use JAX-RS style) with the "bacon" endpoint "/give-me-bacon/{howmuch}" - upon accessing this endpoint, following happens: - as many times as specified in {howmuch} path parameter of the "bacon" endpoint your app retrieves JSON array of string from https://baconipsum.com/api/?type=all-meat&paras=1 using standard Java 12 HTTP client - application takes note of retrieval start and end timestamp - "runId" field is a random-generated ID (for example UUID) of request/response pair - "items" is array of responses from external bacon service - "data" field inside "items" field in output is actual data retrieved from external service - output contains start and end timestamps for both full request and for each item as well - example of pretty-printed application/json return data: { "runId" : "abcdef", "start": 1234646, "end": 12354587 "items" [ { "start": 1234646, "end": 12354587, "duration": "3h 19m 56s 46ms", "data": ["Alcatra strip cow bacon..."] } ] } - example - app is running on localhost, port 8080 - in the browser I type the following: "http://localhost:8080/give-me-bacon/5" - I receive following response: { "runId" : "axgdas", "items" [ { "start": 1234646, "end": 12354587 "data": ["Alcatra strip cow bacon..."] }, { "start": ... } ... ] } Don't hesitate to use coding tutorials and Stack Overflow! Your evaluation will be based on this task, therefore it is mandatory that you work on this alone and on your own. Estimated time to complete this task is 60-120 minutes for all levels. If it takes you significantly more time, please do not hesitate to tell us. Acceptance criteria: Junior must pass following: --------------------------- - your application must produce runnable spring boot war conforming assignment - if you are unsure how to produce runnable spring boot war application, just follow tutorials - deliver your solution as link to any public git repository - use git to actually push your code (do not upload it manually to repo) - use maven/gradle or any other build system - conform to Google Java style guide - https://google.github.io/styleguide/javaguide.html - if you are unsure, use auto-formatting options Intermediate dev must pass everything above plus following: ------------------------------------- - use JDK 11 HTTP client - use RxJava for parallel bacon JSON retrieval from external service - add statistics endpoint which provides information about - word count (histogram) - number of requests per IP address Senior dev must pass everything above plus following: ------------------------------------- - implement "bacon pool", also known as "source of bacon" or "bacon cache" - choose time period of your liking (e.g. 5 seconds) and fetch single piece of bacon (i.e. single call to baconipsum) on regular basis, then: - store these pieces in queue in the application (disk persistancy is a bonus) - when user requests bacon from the endpoint either supply him with bacon (destroying stored bacon in process) or block until some bacon is available - extend statistics endpoint by average bacon waiting time per request - make sure you synchronize well - bacon is precious resource and single piece of bacon can be returned in single response only Some bonus points: ------------------ - provide REST endpoint to retrieve historic data by their runId (cache in memory) - cache historic run data in embedded database on disk - store history in some event queue (kafka, rabbit) so application behavior can be replayed and analyzed Ending notes: ------------- Overall quality of your code, usage of design patterns, best practices and common sense will be evaluated. You are presenting yourself with this task - please provide production-grade code.

atsea-sample-shop-app icon atsea-sample-shop-app

A sample app that uses a Java Spring Boot backend connected to a database to display a fictitious art shop with a React front-end.

cryptocurrency-assignment-byzantine icon cryptocurrency-assignment-byzantine

In this project, you will implement the basic, unauthenticated Byzantine fault tolerant consensus algorithm described by Lamport, Shostak, and Pease in their seminal paper titled The Byzantine General’s Problem [1]. The project code provides you with a simple consensus protocol testing framework that you will use to test the correctness of your implementation. Read and thoroughly understand all the project code before beginning. The Java class named hw4.BasicTests gives several tests that demonstrate how to use the consensus testing framework. Your submission should make all the tests pass. For example, test0 test case is reproduced below and configures a small network running the FollowLeader consensus protocol described in class that fails to solve the BFT consensus problem for any number of malicious nodes.

find-print icon find-print

Create a Java method that accepts a String array as a parameter and finds the longest string and prints it out with its length For example If a String array names = Tom, Gabe, Matt, Vivian is passed to the method, it should print out Vivian - 6 To test it, you can either hardcode the string array and output the result to a textview

flower-pot icon flower-pot

Flower Pot Create the Flower and Pot classes according to the following specification detailed in the UML diagram below and Javadocs: Updates (and responses to common Ed questions): If the pot is empty (or none are alive), averageAge and averageHeight should return -1 maxAge is the maximum age of the flower, if the age goes beyond this, it dies For clarity, tan^-1 means the inverse tan function (arctan) not 1/tan(). Note that searches for null values in species and colour crierion should work and be able to find flowers in the pot with null values as those attributes Most Pot tests require the use of insert(), water() and rearrange(), so make sure these methods are working first. combine() and view() should not include flowers with null colour in the result. view() method is case insensitive for the colour string If null is passed as input to the Pot insert() method, return false. (cannot add null) For the replace() method, if both are null, return 0. The first hidden testcase is testing the order of the colours in the view() method output is in alphabetical order. See the assignment helpful notes. You need to add the entries into an ArrayList and then sort using a Comparator, or use a TreeMap instead of HashMap. The TreeMap is automatically sorted by key order, unlike HashMap which is unordered. For replace() and filter(), ensure you don't create a situation where a Flower object is present in multiple pots, or more than once in the same pot. Testcase file has been released (hidden tests removed):

go-books icon go-books

Books about Nodejs, Angular2, Agile, Clean Code, Docker, Golang, Microservices, REST, TDD, BDD, and Startups.

helping-younger-brother icon helping-younger-brother

Description Your little brother is weak when it comes to dividing two numbers, but he has learnt coding from you. So he built a division calculator for himself. This calculator prompts users for two numbers. Store the first number as an integer variable, named a and another as an integer variable, named b. Then it divides these two numbers and shows the result on the screen in the following format. a/b = result For example, if the first number was 10 and the second number was 2, then this calculator will print the following message. 10/2 = 5 He showed this masterpiece to his friends. One of them entered textual input and his calculator crashed. He restarted it again and this time someone tried to divide a number by zero. His calculator again crashed. Now everyone is laughing at him. He came to you crying and wants his calculator application to be fixed. You as an older and responsible brother saw at this code and figured out how to fix it. Whenever someone enters textual input, you will show a message saying “Both a and b should be integers.” Whenever someone enters zero as the second number, you will show a message saying “You should not divide by zero.” Rewrite your brother’s code, given as stub code, to handle above two scenarios using Exception Handling. Input Format: The first line contains two values which could be both integers or both strings or one integer and one string. They will be stored as two variables, a and b, in your program. Output Format: Print one of the following message on the console- firstNumber/secondNumber = resultOfDivision, if both numbers are integers and the second number is not 0. “You should not divide by zero.”, if both numbers are integers and the second number is 0 “Both a and b should be integers”, if any of the numbers is text. Sample Input 1: 10 5 Sample Output 1: 10/5 = 2 Sample Input 2: 10 0 Sample Output 2: You should not divide by zero. Sample input 3: text 2 Sample output 3: Both a and b should be integers. Notes: The output message to be displayed on the console should use the exact template, which is shown in the example. Your solution will be evaluated based on the correct output displayed, the proper identifiers used as per the context provided and the correct syntax used. Follow all the TODOs given in the stub.

java-fundamentals-course icon java-fundamentals-course

Interactive Java Fundamentals course that features Data Structures and Algorithms, OOP, Functional Programming, and Test-Driven Development

javatest icon javatest

A simple java interview for front-office developers

linkedin-clone icon linkedin-clone

A Linkedin clone app built with React, Redux, Firebase/Firestore & Material UI

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.