top of page

Forum Posts

Codersarts
Jan 23, 2024
In Python Coding Help
Create a program that calculates and prints the amount of change to be returned to the customer after paying the bill, based on the manager's input in the system. Sample Input: Total Invoice amount(In Dollars): 200 Amount of Tip (In cents): 10 Total Payment received by card: 160 Service Charged on payment made by card: 4% Total Payment received in Cash(In Dollars): 100 Output: Change to be returned to the customer (In Dollars): 53.50 Note: If the return to the customer is negative, then it must print 'outstanding amount and need to be paid by customer:', and the amount need to be paid # Python solution: def calculate_change(invoice_amount, tip_amount, card_payment, service_charge, cash_payment): # Convert service charge percentage to decimal service_charge_decimal = service_charge / 100 # Calculate total payment made by card (including service charge) total_card_payment = card_payment * (1 + service_charge_decimal) # Calculate total payment (card + cash) total_payment = total_card_payment + cash_payment # Calculate the change to be returned change = total_payment - (invoice_amount + tip_amount) return change # Get user input invoice_amount = float(input("Total Invoice amount (In Dollars): ")) tip_amount = int(input("Amount of Tip (In cents): ")) card_payment = float(input("Total Payment received by card: ")) service_charge = float(input("Service Charged on payment made by card (%): ")) cash_payment = float(input("Total Payment received in Cash (In Dollars): ")) # Calculate and print the change change = calculate_change(invoice_amount, tip_amount, card_payment, service_charge, cash_payment) if change >= 0: print(f"Change to be returned to the customer (In Dollars): {change:.2f}") else: print(f"Outstanding amount and need to be paid by customer: {-change:.2f}") This program takes user inputs for the invoice amount, tip amount, card payment, service charge percentage, and cash payment. It then calculates the total payment, including the service charge, and determines the change to be returned. If the change is negative, it prints the outstanding amount that needs to be paid by the customer
0
0
8
Codersarts
Jan 02, 2024
In Python Tutorial
In this lesson, we will cover the fundamental building blocks and common patterns. Basic Elements: 1. Literal Characters: • A regular expression can consist of literal characters that match exactly. For example, the regex `python` will match the string "python" in a text. 3. Character Classes: • Character classes are enclosed in square brackets ([]) and allow you to match any one of the characters within the brackets. For instance, `[aeiou]` matches any vowel. 5. Quantifiers: • Quantifiers specify how many times a character or group should appear. The asterisk `*` means zero or more occurrences, the plus `+` means one or more occurrences, and the question mark `? ` means zero or one occurrence. 7. Wildcards: • The dot (`.`) serves as a wildcard, matching any character except a newline. For example, `b.t` would match "bat," "bit," "but," etc. Examples: 1. Literal Characters: • Regex: `cat` • Matches: "cat" in "The cat is black." 4. Character Classes: • Regex: `[aeiou]` • Matches: Any vowel in "apple" or "orange." 7. Quantifiers: • Regex: `lo+l` • Matches: "lool" or "loooool" in "The cat is looking." 10. Wildcards: • Regex: `b.t` • Matches: "bat," "bit," "but," etc., in "The bat is in the box." Exercise: Write Simple Regular Expressions to Match Specific Patterns 1. Match Dates: • Write a regex pattern to match dates in the format "YYYY-MM-DD." Test it against strings like "2022-01-01" and "2023-12-31." 3. Match Email Addresses: • Create a regex pattern to match basic email addresses. Test it against strings like "user@example.com"(mailto:user@example.com) and "john_doe123@gmail.com.(mailto:john_doe123@gmail.com)" 5. Match Phone Numbers: • Develop a regex pattern to match standard U.S. phone numbers in the format "(XXX) XXX-XXXX." Test it against numbers like "(555) 123-4567." 7. Match Hexadecimal Colors: • Construct a regex pattern to match hexadecimal color codes, such as "#RRGGBB." Test it against strings like "#1a2b3c" and "#ff9900." Remember to use online regex testers or Python's re module to validate and test your patterns against different strings. Practice refining your patterns based on the results and experiment with variations of the exercises.
0
0
1
Codersarts
Jan 02, 2024
In Python Tutorial
Regular expressions (regex or regexp) are powerful and concise sequences of characters that define search patterns. They serve as a flexible tool for text processing, allowing you to describe and match complex patterns within strings. Regular expressions are widely used in programming, data validation, text manipulation, and search operations. Key Concepts: 1. Pattern Matching: • At its core, a regular expression is a pattern that describes a set of strings. It allows you to search for, match, and manipulate text based on this pattern. 3. Text Search and Manipulation: • Regular expressions provide a way to search for specific sequences of characters, validate input formats, replace text, and extract information from strings. 5. Concise Syntax: • Regular expressions have a concise syntax that enables you to express complex patterns using a relatively small amount of code. This makes them efficient for tasks involving text processing. 7. Versatility: • Regular expressions are not limited to a specific programming language or tool. They are supported across various programming languages, command-line utilities, and text editors. 9. Common Use Cases: • Regular expressions find applications in tasks such as data validation, parsing logs, searching for patterns in text files, and extracting information from structured data. Benefits: • Efficiency: • Regular expressions allow you to perform powerful text manipulations with minimal code, leading to more efficient and readable solutions. • Flexibility: • They provide a high degree of flexibility, allowing you to create patterns that match specific criteria and adapt to different scenarios. • Pattern Reusability: • Once you've defined a regular expression pattern, you can reuse it across multiple instances, promoting code reusability and maintainability. Applications: 1. Text Search: • Regular expressions excel at searching for specific patterns within text. Whether you're looking for keywords, dates, or other structured data, regex can help you locate and extract relevant information. 3. Data Validation: • Regular expressions are widely used for validating input formats. Whether it's email addresses, phone numbers, or credit card numbers, regex can help ensure that the data meets the required criteria. 5. Search and Replace: • Beyond just searching, regular expressions enable you to replace or modify text based on specific patterns. This is particularly useful when you need to make bulk changes to a document or dataset. 7. Validate with Regular Expressions: • Regular expressions can be employed to validate data against predefined patterns. For example, you can use regex to verify if a given string is a valid email address, adheres to a specific date format, or follows a custom pattern. Regular expressions are a fundamental tool in a programmer's toolkit, offering a concise and powerful way to work with textual data. Understanding how to construct and use regular expressions effectively can significantly enhance your ability to manipulate and analyze text in various programming and scripting contexts.
0
0
0
Codersarts
Jun 13, 2021
In Samples
A selection of code samples and templates for you to use to accelerate your app development. Browse samples to learn how to build different components for your applications. Provide by google official documentation https://developer.android.com/samples please share your links below in comment section so that would be helpful for others.
0
1
30
Codersarts
Jun 13, 2021
0
1
84
Codersarts
Jul 22, 2020
In Web Programming
0
0
21
Codersarts
Jul 22, 2020
In Web Programming
Short Message Posting Site content media
0
0
55
Codersarts
Jul 21, 2020
In MongoDB
After importing json file Mongodb show dbs use city --------------------------------------------- 1.Insert --------------------------------------------- Q- Insert the recored in collection "inspections" where "id" : "10021-2015-ENFP", "certificate_number" : 9278809, "business_name" : "Codersarts", "date" : "Feb 20 2019", "result" : "No Violation Issued", "sector" : "Cigarette Retail Dealer - 127". > db.inspections.insert( {"id" : "10021-2015-ENFM", "certificate_number" : 9278810, "business_name" : "Sofstack", "date" : "Feb 20 2019", "result" : "No Violation Issued", "sector" : "Noida 63", } ); Output look like: WriteResult({ "nInserted" : 1 }) ----------------------------------------------- 2. Remove(delete) ----------------------------------------------- db.inspections.remove( {"id" : "10021-2015-ENFP", "certificate_number" : 9278809, "business_name" : "Codersarts", "date" : "Feb 20 2019", "result" : "No Violation Issued", "sector" : "Cigarette Retail Dealer - 127", } ); Output look like: WriteResult({ "nRemoved" : 1 }) ------------------------------------------------- 3. Remove(delete) by given criteria(codition) ------------------------------------------------- > db.inspections.find({}) >criteria = {"result" : "pass"} output: { "result" :"No Violation Issued"} >db.inspections.find(criteria) >db.inspections.remove(criteria) ------------------------------------------------------------------ if you want to delete only one document of given crieteria then use ------------------------------------------------------------------- > criteria={"result":"No Violation Issued"} { "result" : "No Violation Issued"} > db.inspections.find(criteria).count() 3795 > db.inspections.remove(criteria,1) output: WriteResult({ "nRemoved" : 1 }) --------------------------------------------------------------------------- 4. Update: --------------------------------------------------------------------------- > db.inspections.find({}) >db.inspections.updateMany( { "result":"Pass"}, { $set: { "result": "Violation Issued" } } ) ----------------------------------------------------- 5- show column data by colum name: ------------------------------------------------------ Display city India which exist in address column >criteria = {"address.city" : "India"} output: { "address.city" :"India"} >db.inspections.find(criteria) ---------------------------------------------------------------------------------------------------------- MongoDB - Projection Queries ---------------------------------------------------------------------------------------------------------- Projection: A projection query is a query where you specify which fields should be returned. You can do this by including the field names in your query, and adding a 1 or 0 next to them, to specify whether it should be returned or not. This is a projection parameter. A projection parameter of 1 will display the field and a 0 will hide it. Example First let's do a query without projection (so we can see how many fields are returned): Without Projection: >db.inspections.find( {"result": "Violation Issued"} ) Result: With Projection Now, let's use projection to display just the name field: db.inspections.find( { "result": "Violation Issued" }, { "_id":0,"date": 1 ,"result":1} ) Result: You will notice that the _id field is automatically included, even if you don't specify it. You can exclude this field by using a 0 against it: db.inspections.find( { "result": "Violation Issued" }, { _id: 0, "date": 1 } ) Result: You can't mix 1s(inclusion) and 0s(Exclusion) db.inspections.find( { "result": "Violation Issued" }, { "date": 1, "sector":0 } ) You'll end up with this error: Error Result: -------------------------------------------------------------------------------------------------- MongoDB - Limit the Results of a Query -------------------------------------------------------------------------------------------------- Return only the number of documents you need with the limit() method In MongoDB, you can use the limit() method to specify a maximum number of documents for a cursor to return. When you query a collection using the db.inspections.find() method, you can append limit() to specify the limit. Example First let's do a query without a limit (so we can see how many documents are returned): Without a Limit db.inspections.find( { "result": "Violation Issued" }, { "date": 1 } ) Result: OK, so let's limit the results to say, 3 documents: With a Limit db.inspections.find( { "result": "Violation Issued" }, { "date": 1 } ).limit(3) Add the skip() Method You can use the skip() method to skip to a document within the cursor db.inspections.find( { "result": "Violation Issued" }, { "date": 1 } ).limit(3).skip(1) Result: Skip first result and display next three result Note that skip() can be used on any query (not just ones with limit()). -------------------------------------------------------------------------------------- MongoDB - Sort the Results of a Query --------------------------------------------------------------------------------------- The sort() method specifies a sort order for the cursor. It will typically contain one or more fields, each followed by either 1 or -1, depending on whether the sort should be in ascending or descending order. With sort() in Ascending Order A value of 1 next to a field name specifies that the documents should be sorted by the specified field in ascending order. Here we sort the results by name in ascending order: db.inspections.find( ).sort( { "date": 1 } ) With sort() in Descending Order A value of -1 next to a field name specifies descending order. Here we sort the results by name in descending order: db.inspections.find( ).sort( { "date": -1 } ) Multiple Fields db.inspections.find( ).sort( { "result": 1, "date": -1 } ) Result: Sort with Limit db.inspections.find( ).limit(3).sort( { "result": 1} ) MongoDB - Create a Relationship To create a relationship in MongoDB, either embed a BSON document within another, or reference it from another. One-to-One Relationship One-to-Many Relationship Querying the Relationship you can use $lookup to perform a left outer join on the two collections.This, in conjunction with the aggregate() method, and $match. Example: db.collection1.aggregate([ { $lookup: { from: "collection2", localField: "_id", foreignField: "artist_id", as: "band_members" } }, { $match : { artistname : "Rush" } } ]).pretty() Collection of employee MongoDB shell version v4.0.9 connecting to: mongodb://127.0.0.1:27017/?gssapiServiceName=mongodb Implicit session: session { "id" : UUID("153d94df-eb08-41ff-8348-6e2790efc0bc") } MongoDB server version: 4.0.9 Server has startup warnings: 2019-06-08T17:41:59.265+0530 I CONTROL [initandlisten] 2019-06-08T17:41:59.265+0530 I CONTROL [initandlisten] ** WARNING: Access contr ol is not enabled for the database. 2019-06-08T17:41:59.265+0530 I CONTROL [initandlisten] ** Read and wri te access to data and configuration is unrestricted. 2019-06-08T17:41:59.265+0530 I CONTROL [initandlisten] --- Enable MongoDB's free cloud-based monitoring service, which will then receive an d display metrics about your deployment (disk utilization, CPU, operation statistics, etc) . The monitoring data will be available on a MongoDB website with a unique URL acc essible to you and anyone you share the URL with. MongoDB may use this information to make prod uct improvements and to suggest MongoDB products and deployment options to you. To enable free monitoring, run the following command: db.enableFreeMonitoring() To permanently disable this reminder, run the following command: db.disableFreeM onitoring() > show dbs MongoDB 0.005GB admin 0.000GB city 0.012GB config 0.000GB employee 0.000GB local 0.000GB > use employee switched to db employee > db.employee.find().pretty() { "_id" : ObjectId("5cfa0ea5d547422e9da13839"), "no" : "1", "name" : "naveen", "salary" : 10000, "role" : "OB" } { "_id" : ObjectId("5cfa0ec5d547422e9da1383a"), "no" : "1", "name" : "jitendra", "salary" : 6500, "role" : "db" } { "_id" : ObjectId("5cfa16ffce2c8ca71875c757"), "no" : "2", "name" : "ak", "role" : "eng", "salary" : 5000 } { "_id" : ObjectId("5cfa177dce2c8ca71875c75e"), "no" : "3", "name" : "bk", "role" : "data", "salary" : 12000 } > Group By QUESTION: Example groups by the salary and no fields those documents that have SALARY greater than 6000. >db.employee.group( { key: { "salary": 1, "no": 1 }, cond: { "salary": { $gt: 6000 } }, reduce: function ( curr, result ) { }, initial: { } } ); Group by two fields Question: Example groups by the "salay" and "no" fields, those documents that have "no" field is equal to the "1" and calculates the sum of the salary field for each grouping: >db.employee.group( { key: { "salary": 1, "no": 1 }, cond: { "no": "1" }, reduce: function ( curr, result ) { result.total += curr.salary; }, initial: { total : 0 } } ); FIND RECORD WITH MATCHING WORD Question:fIND DOCUMENT FROM COLLECTION "INSPECTIONS" IN WHICH "DATE" BEGINS WITH "M". >db.inspections.find({"date":"/^M/"}) Question: FIND ALL DOCUMENTS FORM COLLECTION "INSPECTIONS" IN WHICH last digit of city end with "E" in address column. >db.inspections.find({"address.city":"/$E/"}) Question:: FIND DOCUMENTS IN WHICH CITY HAVE "V" LETTER AT ANY POSSITION IN CITY IN ADDRESS >db.inspections.find({"address.city":"/V/"}) Question:: INSERT DATA IN COLLECTIONS "EMPLOYEE" AND DISPLAY IN PROPER FORMATE USING PRETTY() >db.employee.find().pretty() Question:: INCREMENT SALARY OF EMPLOYEE "NAVEEN" OF COLLECTION "EMPLOYEE" BY 4000. >db.employee.update({"name":"naveen"},{$inc:{"salary":4000}}) where $inc function use for increment salary Question: INCREMENT ALL EMPLOYEE SALARY BY 4000 >db.employee.update({},{$inc:{"salary":4000}},{multi:true}}) Question: ADD NEW RECORD WITHOUT USING INSERT OPERATOR >db.employee.update({"no":"3"},{$set:{"no":"3","name":"bk","salary":6000,"role":"data"}},{upsert:true}) Question: Remove docuement using "unset" > db.employee.update({"name":"bk"},{$unset:{remark:"ek"}}) Question: MULTIPLY BY SALARY 2 >db.employee.update({"name":"naveen"},{$mul:{"salary":2}})
0
0
197
Codersarts
Jul 21, 2020
In Database schema
Part 1: Design the Database Database Name : sunnydb (i)The databases fields together with their datatypes : - 1. Fields for person table Id:INT, (Primary Key) firstName:VARCHAR, middleName:VARCHAR, surname:VARCHAR, email:VARCHAR, contactNumber:BIGINT, dateRelated toBirth:Date, gender:VARCHAR, emergancyContactNumber:BIGINT, addressId:INT (foreign Key related to Address table) 2. Fields for address table Id:INT, (Primary Key) country:VARCHAR, state:VARCHAR, city:VARCHAR, street:VARCHAR, house_number:VARCHAR 3. Fields for staff_type table id:INT, (Primary Key) type:VARCHAR 4. Fields for staff_grade table id:INT, (Primary Key) grade:VARCHAR 5. Fields for staff_category table id:INT, (Primary Key) 6. Fields for staff table id:INT, (Primary Key) staffCategoryId:INT ( foreign key related to staff_category table) staffTypeId:INT ( foreign key related to staff_type table) staffGradeId:INT ( foreign key related to staff_grade table) personId:INT ( foreign key related to person table) 7. Fields for er_shift table id:INT,(Primary Key) name: VARCHAR, startTime:TIME, endTIME: TIME, inchargeStaffId:INT ( foreign key related to staff table) 8. Fields for staff table id:INT, (Primary Key) emergancyRoomShiftId: INT ( foreign key related to er_shift table) staffId:INT (foreign key related to staff table) 9. Fields for patient table id:INT, (Primary Key) personId: INT ( foreign key related to person table) admittedBy: INT(foreign key related to Staff Table) supervisedBy: INT(foreign key related to Staff Table) bedId: INT(foreign key related to Staff Table) medicationId: INT(Foregin Key related to Medication table) admittedDate: Date age:INT 10. Fields for Medication table id:INT name:VARCHAR dosage:Decimal 11. Fields for Bed Table Id:INT(Primary Key) bedNo:INT(UNIQUE Key) supervisedBy:INT(foreign key related to Staff table) Query Solutions: Part3: Query the Database :- --i) Select p.firstName, p.surname inner join staff s on assign.staffId=s.id inner join er_shift shift on assign.emergancyRoomShifId= shift.id inner join staff_type type on s.staffTypeId=s.id inner join person p on p.id=s.personId where type.type='Nurse' and p.gender='female' and date between '2018-10-01' and '2018-11-30'; --ii) SELECT firstName FROM sunnydb.person where surname='Poon' and id in (select personId from sunnydb.petient where admittedDate='2018-08-31'); --iii) Select ps.firstName, p.age, p.admittedDate from petient p inner join staff s on p.personId=s.personId inner join person ps where ps.id=s.personId; --iv) select pr.id, pr.firstName, pr.surname from staff s inner join staff_type st on s.staffTypeId=st.id inner join petient p on p. supervisedBy =s.id inner join person pr on pr.id=s.personId where st.type='Nurse' group by p.supervisedBy having (count(p.supervisedBy) > 2) ; Download database design and tables scripts: github link
Hospital Management Database Schema content media
0
0
4k
Codersarts
Jul 21, 2020
In Java Assignment
Assignment 3: RMI + Hibernate – See Brightspace for due date. Read the requirements carefully, if your program does not meet the requirements expect a loss of marks for the assignment, even though your program code runs without errors. Refer to the Course Section Information (CSI) document posted in Brightspace under Course Information for additional requirements common to all assignments. Lab Partner: Optional For this lab, you may work with a lab partner. Your lab professor must be notified via email of partners with names before the due date. Please include lab section number. Both members must be registered in the same lab section. Both partners must demonstrate their program in lab together as a pair, all code files and other documents must have both members full names. Both partners need to submit the assignment in full to Brightspace, your lab professor will select one student’s submission and use it as the grade for both partners. Ensure that both submissions are the same. Description You are to develop an RMI-Hibernate-based 3-tier (Console User Interfaces, Client, Server, Database) networked multi-user version of Assignment 2. RMI will be used instead of Network socket communications, using only Tuna objects as transfer objects. The data access layer logic will have JDBC replaced with Hibernate. Setup Create an Assignment 3 project in Eclipse Add the Hibernate and ConnectorJ external Jar files as seen in lecture. Copy the starter code into your project Reference the Hibernate demo 2 from lecture – EchoClient & EchoServer with RMI and Hibernate Log into MySQL and create a user account ‘assignment3’ with password ‘password’ as well as a database ‘assignment3’ (examine the hibernate.cfg.xml file to ensure it matches your settings). There is no database script, your annotated Tuna Entity should permit Hibernate to create the database tables for you when your project runs. ToDo: datatransfer.Tuna Add annotations: Entity, with table name “tunas” primary key should be generated by MySQL and not left up to Hibernate String fields should be represented by database columns with sizes of 42 characters. isLastTuna should be annotated as @Transient Note: Older Hibernate used a mapping file, do not do this, use Annotations in your Entity class. ToDo: dataaccesslayer. TunaDaoImpl This is an enum, with one constant inside named INSTANCE. i.e. Singleton design pattern. Using Safari Books in the Library, look up: Joshua Bloch. (2008). Effective Java, Second Edition. Addison-Wesley Professional. ISBN-13: 978-0-321- 35668-0 and See Item 3: Enforce the singleton property with a private constructor or an enum type. The private constructor should construct the SessionFactory The insert method should use a Hibernate Session to insert a Tuna into the database The findByUUID should accept a String based uuid, to lookup a Tuna in the database, and return it. Make sure that Hibernate sessions are closed in their respective methods, and that the shutdown method closes the session factory and destroys the registry. ToDo: server. TunaServiceImpl This implements the remoteinterface.TunaService (which in turn extends java.rmi.Remote). Each method (insert, findByUUID) should use the TunaDaoImpl.INSTANCE to either insert or findBy as needed. (There really should not be much code here.) Note: The shutdown method is provided to you, there is no mistake that it is missing from the TunaService interface, and that there is no @Override on it either. We do not want to permit any clients to call shutdown(), only the server-side code should be able to call the shutdown() method. ToDo: server.TunaServer Typical RMI startup, should instantiate a TunaServiceImpl and export it to the registry, then bind it as “TunaService” See comments in the main method for instructions. ToDo: client.TunaClient You can use either the Hibernate Demo 2 client, or your Assignment 2 client as starter code. Obtain a connection to the RMI server, to the remote TunaService Ask the user for the data for a Tuna, then ask the remote object to insert it, then ask for a Tuna back with the generated primary key value (the client should send the UUID as a String). Ask the user if they want to continue, or shutdown if an Exception is generated by the server. Note: There is no Message object, no String commands, use RMI to make method calls against the remote object. Demonstration in lab Demonstrate that the server runs, a client runs, and the client can insert a record into the database Demonstrate that if the MySQL service is shutdown, while your server and client are running, that the client shuts down gracefully when the server encounters exceptions. Documentation Javadoc All classes, interfaces, and class/interface members need Javadoc comments in code files Place your name(s) at the top of each source code file. There is no need to generate html using the Javadoc tool. UML Sequence Diagram Diagram the sequence of client requesting a Tuna to be created. Diagram the sequence of client requesting a Tuna based on UUID. You may use the one diagram to show both sequences. I am not requesting a test plan for Assignment 3. Short Answer Questions What are some advantages and drawbacks of using RMI versus network sockets for a client-server application? What are some advantages and disadvantages of using Hibernate instead of JDBC for a data-connected application? Note on Short Answer Questions You are free to research online, can use a bullet list if you want or a paragraph, looking for about 1⁄2 page single- line-spacing per question. Make sure you cite source(s) using IEEE format. Submission Requirements Place these items into a zip archive, the zip file-name should have your name in it: Code Your Java Project Folder with *.java files and *.xml file. Documentation See the documentation section above Short answer question Your answers to the short answer question Grading Criteria (out of 10) Demonstration in lab of server and client inserting record into database (1 point) Demonstration in lab of graceful client shutdown if server encounters problem (1 point) Code – has given package structure, code matches instructions, uses RMI and Hibernate 5.x (3 points) Documentation Javadoc comments (1point) UML Sequence (2points) Questions – answers the two questions, sources are cited (2 points) Appendix – Optional UML Editor What is UMLet? A free lightweight UML editor I like using is UMLet. I find that it is easy to use and creates very nice diagrams. Note: Using UMLet isn’t a requirement, if you have an alternative tool that generates UML 2.x diagrams feel free to use it. However, note that diagrams generated by eclipse plugins are not UML 2.x so will be awarded scores of zero. Website and Download for UMLet http://www.umlet.com/ http://www.umlet.com/changes.htm See: UMLet 14.2 stand-alone i.e. http://www.umlet.com/umlet_14_2/umlet-standalone-14.2.zip Tutorials from the internet: Beginner Video: https://www.youtube.com/watch?v=3UHZedDtr28&feature=youtu.be Sequence Video 1: Sequence Video 2: (fast forward to about 5:50) https://www.youtube.com/watch?v=tEeGYtZcfJE#t=426.69671 Sequence Reference: http://www.itmeyer.at/umlet/faq/How%20to%20create%20sequence%20diagrams.htm Hidden Features Video: Please download the attached document including starter code and pdf..
0
0
317
Codersarts
Jul 21, 2020
In Database schema
The first phase of the project involves the design of the database. In this phase you need to design a database that maintain all the "Contracts" of a company. The Contract Management System (CMS) will serve the employees, managers and other stakeholders in the enterprise. You should use MySQL DBMS to implement the database system and show its execution by queries. Problem Statement: Following are the requirements for the CMS that you are going to develop. P-1) CMS system should maintain information about: 1. Departments - (Development, QA, UI, Design, Business Intelligence, Networking) 2. Contracts - (Premium, Gold, Diamond, Silver) 3. Managers - (Manager responsible for the contract) 4. Employees - (Employee ID) 5. Dept.- Employee 6. Dept.- Manager P-2) A sales associate dealing with the client must capture the following information about the contract: 1. Name of the company and the responsible of the company (First name, Last name, middle initial) who is signing the contract. 2. Contact Number - (Count the number of digits). 3. Email-id of the company. 4. Address City, Province and Postal code – Data should be only of Canada (All provinces). 5. Annual Contract Value (ACV): in dollar. 6. Initial Amount – Every Entry should be double. (ex. $101.23) 7. Service start date: Automatically allocate today’s date from system date to each contract. 8. Type of service: (Cloud, On-premises). You need to complete the database design, implement the database, collect appropriate data and store them into the database. Make sure each table in the database has sufficient number of records such that each query results in a meaningful and reasonable size of output. What you need to do: a. Draw an E-R diagram for the CMS system b. Create appropriate tables corresponding to this diagram c. Create and populate the tables using MySQL. d. Answer the following queries in SQL and give the result for your data: Insert a new contract with ACV of $90,000, On-premises services, based in Montreal, with an initial amount of $10,000 given by "GSC Corporation". Insert details of a manager "Juan Vasquez" in the database, who is managing a team of 10 developers and responsible for "On-premises" projects. Provide a list of all managers supervising projects with more than $80,000 ACV. Give a list of all the employees who are working on contracts with ACV of at least 85,000$. List of all the contracts managed by "Juan Vasquez". What you should hand in: You should print and submit a report that includes the E/R model for your database design together with reasonable assumption(s) you made; script to create and populate the tables (SQL), this must include a list of all relational schemas/tables and attributes within each table with appropriate data types, identify the key attributes for each table, and show the relationships among the tables. You should hand in the printout of tuples/records in each table, the script for the SQL queries and the output of the queries. Note: Every document related to the project work must be printed and properly bounded with a cover page indicating your group ID, each member’s student ID and name (official names only, no nicknames). Hire a Database Assignment expert for Your Project From small assignment tasks to big projects that fits your requirement and budget, And help you deliver better results.  please send your assignment requirement at contact@codersarts.com
0
0
238
Codersarts
Jul 21, 2020
In PHP
Web based System: IMPORTANT SUBMISSION INFORMATION You are to provide a working URL for your web site. This may be via your own web server or free web hosting service. This URL must be live and available from the Canada/UK from the submission date for at least THREE MONTHS to allow for marking and verification of results. It is up to you to make sure that the URL is live. If the URL is not available for marking, you are very unlikely to pass the assignment, there are many organisations offering free web hosting services with appropriate facilities for things like PHP and mySQL. Search on “free web hosting”. Provide the .zip file containing your entire website to the student server for backup purposes. SCENARIO Handyman’s Hardware is a fictitious wholesale outlet that sells household hardware for home improvement including: hand tools, power tools, keys & locks, as well as plumbing & electrical supplies, etc. to retailers. They have asked you to design, implement, test and evaluate a website for them. The owners of the business do not have any web design knowledge at all but are generally familiar with standard office IT and with using the Internet for e-mail and web access. Because some of their competitors are very up to date with modern technology, and are deploying websites to attract additional customers, the company wants a modern website which makes use of leading edge design and technology in appropriate ways. They also expect their website to meet commonly published guidelines on usability and accessibility. Note: This business is fictitious but is representative of similar businesses throughout the world. On the Internet there are links to many websites that you can use as information sources, but not implementation, sources. Please DO NOT try to contact any business directly about this assignment. They are much more interested in running their business than student assignments. Functional Requirements As a minimum, your website must provide the following: 1) Operate as a “shop front” advertising the hardware products that they supply with the aim of increasing customer business. The website should include appropriate product details, some photographs and a “how to find us”. For the purposes of the “how to find us” section, use this address: 33 The Comp, Eaton Bray, Bedfordshire, LU6 2DH. This is a real address and will come up on web mapping sites and SatNav systems with UK maps. There is no hardware retailer there! 2) An “on-line shop allowing people to order anything that the company sells. This should allow the browsing of a catalogue of stock items and the use of a shopping basket and checkout facility. 3) A searchable database of appropriate products. 4) A customer sign up and login facility to enable regular customers to use the site more easily in that their customer details are stored securely. 5) Database maintenance facilities allowing company staff to add new stock items, delete stock items that are sold, correct and update information on stock items on the database and print a catalogue of stock items for distribution locally. This should be via a web interface with appropriate security on login. 6) An invoice for the customer based on what they have ordered, with totals including shipping costs. Note: You do NOT need to implement a payment system. Instead, put a “Pay Now” button in an appropriate place that when clicked will load a page saying: “Thank you for your payment”. Assignment Tasks You are to investigate and report on some currently available websites in this area (Task 1) and then design, develop, implement and deploy a web site for the company (Tasks 2 & 3). Task 1 (approx. 900 words) Write a report for company management team that critically evaluates the website examples given below: https://www.wickes.co.uk/ https://www.diy.com/ https://www.toolstation.com/ https://www.toolsdiy.co.uk/ Note: They are all real companies. Please DO NOT contact these, or any other, companies. They are commercial operations trying to make a living and will not be keen on enquiries from students trying to do assignments! Task 2 (approx. 1,000 words) Having evaluated the example websites above, identify appropriate technologies that could be used on a website in this area of business. Outline the technologies you have identified saying what they do, how they will benefit a business and any drawbacks they have. You do not need to cover basic technologies but should focus on novel or leading-edge technologies that could enhance the websites you have seen. Task 3 (equivalent to approx. 2100 words) Design, develop and implement a live website for the given scenario that meets the functional requirements listed above. Within this task you must: a) provide website design documentation appropriate to the task. You should address usability and accessibility issues, and the key underlying principles of human computer interaction design. b) within this documentation, clearly explain how the design features used will enhance the business of the company. c) make use of appropriate novel technologies to produce a dynamic and modern website that meets the needs of the company. You must document the use of these technologies, justifying your choice of technologies and discussing alternatives. d) critically evaluate your website design and implementation indicating how it supports the requirements and how it might be improved further. If you make any assumptions that are not part of the given scenario, state these clearly and briefly justify them. (60%) IMPORTANT NOTE: Make sure that you: 1. Host your website using a suitable hosting service and include the URL in your written report. 2. Upload a .zip file containing your entire website to the student server for backup purposes. 3. Submit your written report as a single Word or .pdf document for all the above three tasks. Guidelines: You MUST underpin your analysis and evaluation of the key issues with appropriate and wide ranging academic research and ensure this is referenced using the AU Harvard system. The My Study Skills Area contains the following useful resources: You must use the AU Harvard Referencing method in your assignment. Additional notes: Students are required to indicate the exact word count on the title page of the assessment. The word count excludes the title page, executive summary, tables, figures, diagrams, footnotes, reference list and appendices. Where assessment questions have been reprinted from the assessment brief these will also be excluded from the word count. ALL other printed words ARE included in the word count. See ‘Word Count Policy’ on the homepage of this module for more information. Maximum word count: 4,000 words (N.B: As this is a design and implementation, rather than an essay/report, assignment, the word count represents an equivalent amount of work, not the actual number of words expected.) Please note that exceeding the word count will result in a reduction in grade proportionate to the number of words used in excess of the permitted limit. Hire a PHP Assignment expert for Your Project From small assignment tasks to big projects that fits your requirement and budget, And help you deliver better results.  please send your assignment requirement at contact@codersarts.com
0
0
29
Codersarts
Jul 21, 2020
In Database schema
This is database schema of a company sells computer hardware including storage, motherboard, RAM, video card, and CPU. The company maintain following information in database Product information such as name, description standard cost, list price, and product line. Inventory information for all products including warehouses where products are available. warehouses locations The company operates globally, it has warehouses in various locations around the world. Customer information including name, address, and website. Each customer has at least one contact person with detailed information including name, email, and phone. The company also places a credit limit on each customer to limit the amount that customer can owe. sales order Whenever a customer issues a purchase order, a sales order is created in the database with the pending status. When the company ships the order, the order status becomes shipped. In case the customer cancels an order, the order status becomes canceled. employee data the employee data is recorded with some basic information such as name, email, phone, job title, manager, and hire date. Download Oracle Sample database Download the following sample database in zip file format: After downloading the file, you should extract it. The zip file contains the following *.sql files: ot_create_user.sql is for creating OT user and grant privileges ot_schema.sql is for creating database objects such as tables, constraints, etc. ot_data.sql is for loading data into the tables. ot_drop.sql is for removing all objects in the sample database. Reference: https://www.oracletutorial.com/getting-started/oracle-sample-database/
Oracle Sample database Schema content media
0
0
545
Codersarts
Jul 21, 2020
In SQL Exercises
Need Help With My Database Design for Product Management Queries 1. Write a query to display the customer_id,customer full name ,city,pincode,and order details (order id,order date, product class desc, product desc, subtotal(product_quantity * product_price)) for orders shipped to cities whose pin codes do not have any 0s in them. Sort the output on customer name, order date and subtotal. (52 ROWS) [NOTE: TABLE TO BE USED - online_customer, address, order_header, order_items, product, product_class] 2. Write a Query to display product id,product description,totalquantity(sum(product quantity) for a given item whose product id is 201 and which item has been bought along with it maximum no. of times. (USE SUB-QUERY) (1 ROW) [NOTE: ORDER_ITEMS TABLE, PRODUCT TABLE] 3. Write a query to display carton id, (len*width*height) as carton_vol and identify the optimum carton (carton with the least volume whose volume is greater than the total volume of all items (len * width * height * product_quantity)) for a given order whose order id is 10006, Assume all items of an order are packed into one single carton (box). (1 ROW) [NOTE: CARTON TABLE] 4. Write a query to display details (customer id,customer fullname,order id,product quantity) of customers who bought more than ten (i.e. total order qty) products per shipped order. (11 ROWS) [NOTE: TABLES TO BE USED - online_customer, order_header, order_items,] 5. Write a query to display the order_id, customer id and cutomer full name of customers along with (product_quantity) as total quantity of products shipped for order ids > 10060. (6 ROWS) [NOTE: TABLES TO BE USED - online_customer, order_header, order_items] 6. Write a query to display country, product class description ,total quantity (sum(product_quantity),Total value (product_quantity * product price) and show which class of products have been shipped highest(Quantity) to countries outside India other than USA? Also show the total value of those items. (1 ROWS)[NOTE:PRODUCT TABLE,ADDRESS TABLE,ONLINE_CUSTOMER TABLE,ORDER_HEADER TABLE,ORDER_ITEMS TABLE,PRODUCT_CLASS TABLE] Download DDL and DML Script from github link If you need sql assignment help in any database like Mysql, Oracle, Postgres, SQL Server, SQLite and MongoDB. We offer assignment solution at affordable price. Interested to know price quote? please send your assignment details at contact@codersarts.com and our sales team will respond as soon as assignment receives.
Order Management Schema  content media
0
1
3k
Codersarts
Jul 09, 2020
In Django
We’ll assume you haveDjango installed already. You can tell Django is installed and which version by running the following command in a shell prompt (indicated by the $ prefix): $ python -m django --version If Django is installed, you should see the version of your installation. If it isn’t, you’ll get an error telling “No module named django”. Creating a project $ django-admin startproject mysite This will create a mysite directory in your current directory Let’s look at what startproject created: mysite/ manage.py mysite/ __init__.py settings.py urls.py asgi.py wsgi.py These files are: The outer mysite/ root directory is a container for your project. Its name doesn’t matter to Django; you can rename it to anything you like. manage.py: A command-line utility that lets you interact with this Django project in various ways. You can read all the details about manage.py in django-admin and manage.py. The inner mysite/ directory is the actual Python package for your project. Its name is the Python package name you’ll need to use to import anything inside it (e.g. mysite.urls). mysite/__init__.py: An empty file that tells Python that this directory should be considered a Python package. If you’re a Python beginner, read more about packages in the official Python docs. mysite/settings.py: Settings/configuration for this Django project. Django settings will tell you all about how settings work. mysite/urls.py: The URL declarations for this Django project; a “table of contents” of your Django-powered site. You can read more about URLs in URL dispatcher. mysite/asgi.py: An entry-point for ASGI-compatible web servers to serve your project. See How to deploy with ASGI for more details. mysite/wsgi.py: An entry-point for WSGI-compatible web servers to serve your project. See How to deploy with WSGI for more details. The development server Let’s verify your Django project works. Change into the outermysitedirectory, if you haven’t already, and run the following commands: $ python manage.py runserver You’ll see the following output on the command line: Performing system checks... System check identified no issues (0 silenced). You have unapplied migrations; your app may not work properly until they are applied. Run 'python manage.py migrate' to apply them. July 08, 2020 - 15:50:53 Django version 3.0, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C. You’ve started the Django development server, a lightweight Web server written purely in Python. Now that the server’s running, visit http://127.0.0.1:8000/with your Web browser. You’ll see a “Congratulations!” page, with a rocket taking off. It worked!
0
0
35
Codersarts
Jun 28, 2020
In Shell Scripting
System Call - request to the kernel layer to perform a task that must be accomplished by the operating system. Some categories of system calls: I/O creating files and directories reading/writing files positioning in files reading directories Process Control creating processes and threads terminating processes and threads obtaining process ID Communication manipulating pipes manipulating sockets managing shared memory Linux layers diagram standard stream I/O You used standard stream I/O functions (scanf, fgets, printf, fopen, fclose). These functions were intended to make I/O easier than the low level functions by handling: data conversions (e.g., printf format codes convert from C data types to character output) buffer input data, allowing multiple calls to access data that is physically read with a single input request buffer output data, allowing multiple calls to print data although a physical write is done for larger quantities efficiently read/write data Under the covers of those functions are low level I/O operations which do the real I/O work. We will discuss the internal representations of files and directories, standard I/O functions, file descriptors, and then discuss the low level I/O operations. ==========. ================= ================================================================ Function Category Purpose ========== ================== =============================================================== scanf std i/o (stream). stream input using format codes. fscanf std i/o (stream). Note that sscanf gets its data from a string variable. sscanf std i/o (stream) gets std i/o (stream) stream input of text lines fgets. std i/o (stream). stream input of text lines printf std i/o (stream) stream output using format codes fprintf std i/o (stream) stream output using format codes getc std i/o (stream) get next char from a stream fgetc std i/o (stream) get next char from a stream putc. std i/o (stream) put a char to a stream fputc std i/o (stream) put a char to a stream fopen std i/o open a file for buffered i/o fclose std i/o close a file opened by fopen fread binary read binary input of one or more logical records fwrite binary write binary output of one or more logical records fseek binary position changes file position to a location relative to a number of bytes from the beginning of the file open unix low level i/o. opens a file close unix low level i/o closes a file read unix low level i/o reads a specified number of bytes at the current position write unix low level i/o writes a specified number of bytes at the current position lseek unix low level i/o similar to fseek stat unix low returns the stat structure for a file which includes fstat level i/o inodeNr, file type, file mode, number of links, size, etc. opendir unix low level i/o. opens the specified directory for reading readdir unix low level i/o reads the next directory entry. closedir unix low level i/o. closes a directory
What is System Call content media
0
0
28
Codersarts
Jun 09, 2020
In Java Assignment
Objective Build a Java program that will support the creation of a Binary Search Tree, hereinafter referred to as a BST. This program will support reading a command file that supports insertion, deletion, searching, printing, and subtree children and depth counts. All output will be to either STDOUT or STDERR. Requirements Read the input file formatted as follows. The input file will contain at least one command per line, either insert, delete, search, print, or quit. These are defined in detail below. For example, one of the input files, named in5.txt contains the following: i 9 i 24 i 3 i 4 i 11 p q 2. The specific commands are i for insert, d for delete, s for search, p for print, and q for quit. (a) Insert The insert command uses the single character i as the command token. The command token will be followed by a single space then an integer. (This command’s success can be verified by using the print command.) For insertion or realigning operations, less than goes left, equal to or greater than goes right. (b) Delete The delete command uses the single character d as the command token. The command token will be followed by a single space, then an integer. In the event that the integer cannot be found, the program will issue an error message to STDOUT and recover gracefully to continue to accept commands from the input file. command-> d 100: integer 100 NOT found - NOT deleted (This command’s success can be verified by using the print command.) (c) Search The search command uses the single character s as the command token. The command token will be followed by a single space, then an integer. In the event that the integer cannot be located, the program will issue an error message to STDOUT and recover gracefully to continue to accept commands from the input file. command-> s 101: integer 101 NOT found (d) Print The print command uses the single character p as the command token. This command will invoke the print function which will output the data in the tree inorder. This command is critical for verification of all the commands specified above. (e) Quit The quit command uses the single character q as the command token. In the event the quit command is invoked, the program exits. There is no requirement for data persistence. Functions While there are no specific design requirements (with one exception), it might be a mean- ingful suggestion to consider breaking this problem into several small classes. For example, a BST class and a Node class would seem to be the minimal set of classes. Required Function(s) complexityIndicator Prints to STDERR the following: – NID – A difficulty rating of how difficult this assignment was on a scale of 1.0 (easy- peasy) through 5.0 (knuckle busting degree of difficulty). – Duration, in hours, of the time you spent on this assignment. – Delimit each field with a semicolon as shown below. – Sample output: ff210377@eustis:~/COP3503$ ff210377;3.5;18.5 countChildren which will count all nodes on the left branch of the BST, and then the right branch. getDepth which will provide the depth of the right and left branches of the BST. Need a quote for Homework in Java? Post your Java homework questions and get answers from qualified tutors. Are your classes going with Java? We offer Java homework help,Java Projects, Java assignment, Java project. Contact us for this Java assignment Solutions by Codersarts Specialist who can help you mentor and guide for such Java assignments. If you have project or assignment files, You can send at contact@codersarts.com directly #JavaProgrammingAssignmentHelp #ProgrammingHomeworkHelp #JavaProgrammingHomeworkHelp #javaProgrammingHelp #JavaProjectHelp #javaHomeworkHelp
Java Homework  - Building a Binary Search Tree & more content media
0
0
148
Codersarts
Jun 06, 2020
In Job
Freelance Technical Content Writing Codersarts introduces freelance technical content writing for the professionals who have taken a break from their career for any reasons. An opportunity for all the professionals who have taken a career break due any personal reasons. Be it higher studies preparation/ kids/ marriage /maternity  and enthusiastic to return to work again. Benefits of joining the Content Writing Team Experience certificate for all the duration you’ll work Flexible work hours and work load Bridge the gap of your career break If selected, you can continue for as much duration as you want New skills development Work-Life balance Stream : Computer Science Job Type : Work from home Job Profile: Writing articles on various CS technical topics Desired Skills: C/C++/Java/Python/Data Structures and Algorithm/Machine Learning/ Web programming Categories of Article Writing Writing different language code for existing Programs in existing articles - Coding or Programming Article Writing in Algo & DS Article Writing in Java Article Writing in Python Article Writing in Machine Learning Article Writing in C/C++ Article Writing in SQL How to Apply : Send your resume to  careers@codersarts.com with subject “Freelancer – Technical Content Writer and Reviewer” If you like Codersarts and would like to contribute, you can also write an article and mail your article to contact@codersarts.com. See your article appearing on the Codersarts blog page and help other students or learners. Please write comments if you find anything incorrect, or you want to share more information about the topic discussed above
0
0
63
Codersarts
Jun 06, 2020
In Job
Following internship profiles are available currently: Technical Content Engineer ( work from office ): Description: Excellent writing skills in technical content is must for content writing. You will also be responsible for Reviewing the technical content thoroughly. Duration of Internship : 6 – 12 months Stream : Computer Science Desired Skills: C/C++/Java/Python/Data Structures and Algorithm/Machine Learning/Data Science/Javascript/AngularJS/React Js/Node Js Expected Date of Joining : As soon as possible Click here to apply Why should you apply? Candidates qualified for internship will be eligible for Certificates by Codersarts Students will also get Stipend of the internship Improves your knowledge as you need to learn extensively before writing an article Flexible work timings as this is work@home Internship Duration of internship can be one month to one year. Read more – Benefits of becoming a Content Writer at Codersarts Guidelines For writing different language code for existing Programs in existing articles For other career related queries, drop a mail at careers@codersarts.com
0
0
32
Codersarts
Jun 06, 2020
In Job
How to get Technical Content Writing Internship at codersarts.com? We offer Content Writing internships/freelancing Internship opportunities available at Codersarts and open to all the students who are good in writing and at the same time knowledgeable enough to write about a particular topic. Codersarts offers two types of Content writing positions for “Work at home Technical Content Writing”. Internship (For students currently studying) Freelancers (For professionals) How to Apply Think of a topic not published at Codersarts (How to choose topic for writing?) Drop a mail and send your resume after 3 articles of yours get published to careers@codersarts.com with subject “Technical Content Writer and Reviewer” Stipend is paid #internship #workathome #internshipforstudents
0
0
18
bottom of page