Recent Posts

Find top cng cars available for sale

ARTICLEViews: 2Share
Anonymous

share market is closed on each national holiday. Share market NSE and BSE is closed today in india.

ARTICLEViews: 6Share
Anonymous

What is Rainbow Table Attack and how it works?

ARTICLEViews: 7Share
Anonymous

which of the following components of the microservice architecture are compliant to activities when implemented in the spring boot application? identity provider static content services clients service discovery remote service

ARTICLEViews: 14Share
Anonymous

Introduction to DevOps on AWS 1650599719066 (licdn.com)

ARTICLEViews: 5Share
Anonymous

String[] getMovieTitles(String substr) { String response; int startPage = 1; int totalPages = Integer.MAX_VALUE; List<String> titles = new ArrayList<>(); while (startPage <= totalPages) { try { URL obj = new URL("https://jsonmock.hackerrank.com/api/movies/search/?Title=" + substr + "&page=" + startPage); HttpURLConnection con = (HttpURLConnection) obj.openConnection(); con.setRequestMethod("GET"); BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream())); while ((response = in.readLine()) != null) { JsonObject convertedObject = new Gson().fromJson(response, JsonObject.class); totalPages = convertedObject.get("total_pages").getAsInt(); JsonArray data = convertedObject.getAsJsonArray("data"); for (int i = 0; i < data.size(); i++) { String title = data.get(i).getAsJsonObject().get("Title").getAsString(); titles.add(title); } } in.close(); startPage++; } catch (Exception ex) { ex.printStackTrace(); } } Collections.sort(titles); return titles.toArray(new String[0]); }

ARTICLEViews: 4Share
Anonymous

function countCounterfeit(serialNumber) {   // Write your code here   let unique = (str) => {     let strArr = str.split("");     return strArr[0] !== strArr[1] && strArr[1] !== strArr[2];   };   var patt = new RegExp("([A-Z]+)([0-9]{4})([0-9]+)([A-Z]+)");    var bill = 0;    var validNotes = ["10","20","50","100","200","500","1000"];         serialNumber.forEach(el => {       var res = patt.exec(el);        if(res          && el.length >= 10 && el.length <= 12         && res[1].length === 3 && unique(res[1])          && res[4].length === 1          && validNotes.indexOf(res[3]) > -1         && (parseInt(res[2]) >= 1900 && parseInt(res[2]) <= 2019)        ){         bill = bill + parseInt(res[3]);       }     });   return bill; }

ARTICLEViews: 8Share
Anonymous

Given a string `substr`, getMovieTitles() must perform the following tasks: 1. Query https://jsonmock.hackerrank.com/api/movies/search/?Title=substr (replace substr). 2. Initialize the titles array to store total string elements. Store the Title of each movie meeting the search criterion in the titles array. 3. Sort titles in ascending order and return it as your answer. let me know any other solution for this problem

ARTICLEViews: 9274Share
Anonymous

1. Counterfeit Currency A counterfeit currency printer is operating in country XYZ, and all of the banks must try to identify the bad currency. Every note has a serial number that can be used to determine whether it is valid. The serial number also can be used to determine the denomination of the note. A valid serial number will have the following characteristics:There are 10 to 12 charactersThe first 3 characters are distinct uppercase English lettersThe next 4 characters represent the year the note was printed and will always be between 1900 and 2019 inclusive.The next characters represent the currency denomination and may be any one of {10, 20, 50, 100, 200, 500, 1000}The last character is an uppercase English letterGiven an array of serial numbers, determine the value of the valid currency.For example, serial numbers for n = 8 notes are shown below.Serial No. Test 1 Test 2 Test 3 Test 4 Test 5 Valid AmtAVG190420T ✔ ✔ ✔ ✔ ✔ 20RTF20001000Z ✔ ✔ ✔ ✔ ✔ 1000QWER201850G ✔ ✔ ✗ ✔ ✔ there is an R where the year is supposed to startAFA199620E ✔ ✗ ✔ ✔ ✔ first three characters are not distinctERT1947200T ✔ ✔ ✔ ✔ ✔ 200RTY20202004 ✔ ✔ ✗ ✔ ✗ the year 2020 is out of bounds, the last character is not an uppercase letterDRV1984500Y ✔ ✔ ✔ ✔ ✔ 500ETB2010400G ✔ ✔ ✗ ✔ ✗ there are no bills for 400 denominationIn total, there are valid bills worth 20 + 1000 + 200 + 500 = 1720.Function DescriptionComplete the function countCounterfeit in the editor below. The function must return an integer sum of values of valid currency.countCounterfeit has the following parameter(s):serialNumber[serialNumber[0],...serialNumber[n-1]]: an array of strings

ARTICLEViews: 1270Share
Anonymous

here you can find some best chairs available for software programmers, software developers,s and engineers which you can buy from various e-commerce websites.

ARTICLEViews: 19Share
Anonymous

Honda City e:HEV unveiled in India — check mileage, price, features, and more

ARTICLEViews: 8Share
Anonymous

react js basic setup for beginners

ARTICLEViews: 13Share
Anonymous

find the best places to live in india.

ARTICLEViews: 8Share
Anonymous

ARTICLEViews: 18Share
Anonymous

You are given two arrays A and B consisting of N integers each.

ARTICLEViews: 56Share
Anonymous

An infrastructure consisting of N cities, numbered from 1 to N, and M bidirectional roads between them is given. Roads do not intersect apart from at their start and end points (they can pass through underground tunnels to avoid collisions). For each pair of cities directly connected by a road, let's define their network rank as the total number of roads that are connected to either of the two cities. function solution(A, B, N); that, given two arrays A, B consisting of M integers each and an integer N, where A[i] and B[i] are cities at the two ends of the i-th road, returns the maximal network rank in the whole infrastructure. 1. Given A = [1, 2, 3, 3], B = [2, 3, 1, 4] and N = 4, the function should return 4. The chosen cities may be 2 and 3, and the four roads connected to them are: (2, 1), (2, 3), (3, 1), (3, 4). In the pictures below, the chosen cities and roads connected to them are marked in red. 2. Given A = [1, 2, 4, 5], B = [2, 3, 5, 6] and N = 6, the function should return 2. The chosen cities may be 1 and 2, and the two roads connected to them are: (1, 2), (2, 3).

ARTICLEViews: 217Share
Anonymous

here is the given array : [ 2, 3, 2, 3, 3] Output: 2,2,3,3,3 2,3,2,3,3 .. ... 3,3,2,3,2 total is 7

ARTICLEViews: 13Share
Anonymous

{ { "id" : 1, "Name" : "Jane Doe",  "Age" : 30, "Address" : "NYC, USA", "ZIP" : "10001", "Interest" : "Sports, Movies, Reading Books" }, { "id" : 2, "Name" : "John Doe",  "Age" : 32, "Address" : "NYC, USA", "ZIP" : "10001", "Interest" : "Racing, Reading Books, Trekking" } } Expected Output 1. Transform the above JSON in a key-value pair to be stored per interest for all of the users. The final data structure should look like below and be stored in a CSV file. ID NAME AGE ADDRESS ZIP INTEREST 1 Jane Doe 30 NYC, USA 10001 Sports 1 Jane Doe 30 NYC, USA 10001 Movies 1 Jane Doe 30 NYC, USA 10001 Reading Books 2 John Doe 32 NYC, USA 10001 Racing 2 John Doe 32 NYC, USA 10001 Reading Books 2 John Doe 32 NYC, USA 10001 Trekking Solution: import java.io.File; import org.apache.commons.io.FileUtils; import org.json.*; public class ConvertJsonToCSV {   public static void main(String[] args) throws JSONException {    String jsonArrayString = "\"{ { \"id\" : 1, \"Name\" : \"Jane Doe\",  \"Age\" : 30, \"Address\" : \"NYC, USA\", \"ZIP\" : \"10001\", \"Interest\" : \"Sports, Movies, Reading Books\" }, { \"id\" : 2, \"Name\" : \"John Doe\",  \"Age\" : 32, \"Address\" : \"NYC, USA\", \"ZIP\" : \"10001\", \"Interest\" : \"Racing, Reading Books, Trekking\" } }\"";    JSONObject output;    try {      output = new JSONObject(jsonArrayString);      JSONArray docs = output.getJSONArray("fileName");      File file = new File("newCsvFile.csv");      String csv = CDL.toString(docs);      FileUtils.writeStringToFile(file, csv);      System.out.println("Data has been Sucessfully Writeen to "+ file);      System.out.println(csv);    }    catch(Exception e) {      e.printStackTrace();    }   } }

ARTICLEViews: 11Share
Anonymous

topic to cover in Jenkins tool learning Jenkins - Home Jenkins - Overview Jenkins - Installation Jenkins - Tomcat Setup Jenkins - Git Setup Jenkins - Maven Setup Jenkins - Configuration Jenkins - Management Jenkins - Setup Build Jobs Jenkins - Unit Testing Jenkins - Automated Testing Jenkins - Notification Jenkins - Reporting Jenkins - Code Analysis Jenkins - Distributed Builds Jenkins - Automated Deployment Jenkins - Metrics and Trends Jenkins - Server Maintenance Jenkins - Continuous Deployment Jenkins - Managing Plugins Jenkins - Security Jenkins - Backup Plugin Jenkins - Remote Testing

ARTICLEViews: 7Share
Anonymous

Given an array of words and a number k, your task is to return an array with length k where the ith element is the number of unique prefixes with length i + 1 among the given words (including only words that are at most i characters long). function solution(words, k) {   const rtnArr = new Array(k);   const prfArr = [];       for(let i = 0; i < k; i++){     const prArr = words.map(item => item.length >= i+1 ? item.substring(0, i+1) : "");     const uniqueArr = prArr.filter((value, index, self) => {     return value && self.indexOf(value) === index;   });     rtnArr[i] = uniqueArr.length;   }   return rtnArr; }

ARTICLEViews: 35Share
Anonymous
Views -