JSRD

Java Regex PatternSyntaxException

String inputString=”1.I am a code error resolvern”+”2.Here I am resolving a regex exceptionn”+”3.You need to keep in mind while using the regex or special characters in javan”+”4.Some of the special symbols are reserved”; String newString=inputString.replaceAll(“n”,”**”); String anotherNewString=newString.replaceAll(“**”,”n”); will throw an Exception as ** is reserved in Java. The exception thrown will be : Exception in …

Java Regex PatternSyntaxException Read More »

Valid JSON Array of Objects

Valid JSON Array of Objects [{“Name”:”Apple””Type”:”fruit””Price”:100},{“Name”:”Pizza””Type”:”Italian””Price”:370},{“Name”:”Burger””Type”:”Cheese””Price”:310},{“Name”:”Salad””Type”:”Veg””Price”:50}]  

Python Calculate Grade

Python if Loop Calculate Grade   #!/bin/python3import mathimport osimport randomimport reimport sysdefcalculateGrade(students_marks):average=0grade=’ ‘list=[]for i in range(len(student_marks)):sum=0list=student_marks[i]for i in range(len(student_marks)):sum=sum+list[i]average=sum/len(list):print(average)if(average<50):grade=’F’elif(average>=50)and (average<60):grade=’D’  

Python-Fibonacci-Sum

Python Fibonacci Series Sum #!/bin/python3import mathimport osimport randomimport reimport sys def sumOfFibonacciNumbers(n):sum=0;if n<2:return 0else:#print(“n is” +str(n))fibonacciSeries=[0,1]for i in range(2,n):nextElement=fibonacciSeries[i-1]+fibonacciSeries[i-2]fibonacciSeries.append(nextElement)for i in range(1,len(fibonacciSeries)):sum=sum+fibonacciSeries[i]return sumif _name_==’_main_’:fptr=open(os.environ[‘OUTPUT_PATH’],’w’)n=int(input().strip())result=sumOfFibonacciNumbers(n)fptr.write(str(result)+’n’)fptr.close()  

Angular Event Binding, To-do List

How to perform Angular Event Binding import {Component} from ‘@angular/core’; @Component({ selector: ‘app-root’, templateUrl: ‘./app.component.html’ }) export class AppComponent{ name: ‘Jsrd’; show:boolean; welcomeMe(username){ this.name=username; this.show=true; }} How to create a To-do List in Angular import {Component} from ‘@angular/core’; @Component({ selector: ‘app-root’, templateUrl: ‘./app.component.html’ styleUrls:[‘./app.component.css’] }) export class AppComponent{ todos:any done:boolean newToDo: String neToDoObj:any error:boolean TODOS: …

Angular Event Binding, To-do List Read More »

Kubernetes K8s

An open-source container-orchestration system for automating computer application deployment, scaling, and management. It was originally designed by Google and is now maintained by the Cloud Native Computing Foundation. It aims to provide a “platform for automating deployment, scaling, and operations of application containers across clusters of hosts”. It works with a range of container tools …

Kubernetes K8s Read More »

Analyzing Business Needs

Which tool supports validation of the requirements process?A responsibility matrix What statement about traceability is TRUE? It gives the ability to track requirements You are working out the release planning schedule for the requirements of your project. What is the most important factor to keep in mind for release planning?Prioritize requirements by feasibility and value …

Analyzing Business Needs Read More »

Scikit Learn Python

This is the post dedicated to Scikit-Learn problems resolutions Three steps involved in scikit-learn ML are as below:Data AcquisitionData TransformationData Cleaning Question: What is Data Acquisition in Machine Learning, Data Science and Scikit-Learn?Answer: The process of measuring physical world conditions and phenomena is called Data acquisition. The digital numeric values obtained can be manipulated by …

Scikit Learn Python Read More »

Top-5/Best 5 in the World

Top 5 colleges/Universities in the World Top 5 Best Global Universities Harvard University:  https://harvard.edu/ Massachusetts Institute of Technology: https://www.mit.edu/ Stanford University: https:/stanford.edu/ University of California–Berkeley: https://berkeley.edu/ University of Oxford: https://ox.ac.uk/ Top 5 colleges/universities in Europe University of Oxford. University of Cambridge. University College London. Imperial College London. Swiss Federal Institute of Technology Zurich. Top 5 colleges/universities in USA Princeton …

Top-5/Best 5 in the World Read More »