This document summarizes a library management system project completed in two phases. Phase 1 involved building a Windows Forms frontend to support basic library functions like adding members and checking items in/out. Phase 2 focused on developing the database backend with stored procedures and a new data access layer. Key aspects included checking items in/out transactions, displaying overdue items with LINQ, and allowing additional functions like adding new items.
Learn how to leverage functional concepts of Partial Application and Function Composition for Dependency Injection in C#. This is to achieve Simplicity.
Learn how to leverage functional concepts of Partial Application and Function Composition for Dependency Injection in C#. This is to achieve Simplicity.
Maintaining sanity in a large redux appNitish Kumar
The most common complaint about using Redux with React is how it makes you write a lot of boilerplate. We’ll see how Redux lets us choose how verbose we'd like our code to be, depending on personal style, team preferences, longer term maintainability, etc.
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteRavi Bhadauria
This presentation is one of the best presentations from our study material for our JavaScript Object Oriented workshops which ADMEC conducts every week at the
center.
Forms are inevitable. Forms are hard. Forms with React sometimes even harder. In this talk, we’ll start by exploring best practices to efficiently work with react/redux forms and proceed with building a custom abstraction layer for easier form management.
Maintaining sanity in a large redux appNitish Kumar
The most common complaint about using Redux with React is how it makes you write a lot of boilerplate. We’ll see how Redux lets us choose how verbose we'd like our code to be, depending on personal style, team preferences, longer term maintainability, etc.
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteRavi Bhadauria
This presentation is one of the best presentations from our study material for our JavaScript Object Oriented workshops which ADMEC conducts every week at the
center.
Forms are inevitable. Forms are hard. Forms with React sometimes even harder. In this talk, we’ll start by exploring best practices to efficiently work with react/redux forms and proceed with building a custom abstraction layer for easier form management.
Pepsi RefreshEverything Multitouch Grant Proposalprosper50
The following informational material was created to intruduce the public to my ongoing research of multitouch technology.
My research focuses on the evaluation of usability characteristics of various multitouch devices for children with physical disabilities who are unable to utilize a traditional computer or mouse.
Facilitation techniques for Effective ScrumMastersMarcos Garrido
In this presentation you will learn how to identify and treat most common behavioral dysfunctions, how to build consensus and how to run effective meetings in an Agile environment.
Presented at the Scrum Gathering New Orleans 2014 by Marcos Garrido and Rafael Sabbagh.
Saleem Malik Painting / Coating, Insulation and Fire proofing inspectorsalimmalic
I developed a clear understanding of the different aspects of the works of Painting / Coating, Insulation and Fire proofing as well as an awareness of likely future developments in this field. This gave me practical experience of producing creative ideas within a strict deadline and demonstrated my ability to prioritize tasks. Now I am working in CAPE EAST WLL QATAR as a PAINTING/INSULATION INSPECTOR
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS : PowerShell ISEHitesh Mohapatra
WINDOWS ADMINISTRATION AND WORKING WITH OBJECTS
CREATING AND MANAGING ACTIVE DIRECTORY OBJECTS
CONFIGURING NETWORK SETTINGS ON WINDOWS SERVER
CREATING A WEB SITE
SELECTING, SORTING, AND DISPLAYING DATA
FILTERING OBJECTS AND ENUMERATING OBJECTS
Portfolio of .Net work by Robert Tanenbaum showing both code and screenshots of Windows Forms, Web Sites, polymorphism, T-SQL and other .Net technologies.
Atlassian is unveiling a new dashboard that will be added to all of our products, based on the OpenSocial specification. This session explores Atlassian's use of OpenSocial, and details the new Atlassian dashboards and Gadgets.
Atlassian Speaker: Tim Moore
Key Takeaways:
* Overview of OpenSocial
* Deep-dive on Atlassian dashboards and Gadgets
* Demos, how-tos and more
The program will read the file like this, java homework6Bank sma.pdfivylinvaydak64229
The program will read the file like this,
> java homework6/Bank small.txt 4
acct:0 bal:999 trans:1
acct:1 bal:1001 trans:1
acct:2 bal:999 trans:1
acct:3 bal:1001 trans:1
acct:4 bal:999 trans:1
acct:5 bal:1001 trans:1
acct:6 bal:999 trans:1
acct:7 bal:1001 trans:1
acct:8 bal:999 trans:1
acct:9 bal:1001 trans:1
acct:10 bal:999 trans:1
acct:11 bal:1001 trans:1
acct:12 bal:999 trans:1
acct:13 bal:1001 trans:1
acct:14 bal:999 trans:1
acct:15 bal:1001 trans:1
acct:16 bal:999 trans:1
acct:17 bal:1001 trans:1
acct:18 bal:999 trans:1
acct:19 bal:1001 trans:1
Each text file looks something like:
1 2 1
3 4 1
5 6 1
7 8 1
9 10 1
11 12 1
File Format: Each line in the external file represents a single transaction, and contains three
numbers: the id of the account from which the money is being transferred, the id of the account
to which the money is going, and the amount of money. For example the line:
17 6 104
indicates that $104 is being transferred from Account #17 to Account #6.
The test data provided includes transfers with the same from and to account numbers, so make
sure your program will work correctly for these transfers. For example:
5 5 40
Count these as two transactions for the account (one transaction taking money from the account
and one putting money into the account).
My goal is to pass each transaction into the queue, the queue will hold the transaction, the
worker will take the transaction, complete the deposit/withdraw, and update the balance of the
account accordingly. I am required to use BlockingQueue. My problem is that the program is not
running correctly. I need to fix the Bank class, how I start up the Bank in main thread, and also
work on Worker class.
More info:
Details
I recommend a design with four classes—Bank, Account, Transaction, and Worker. Both the
Account and Transactions classes are quite simple.
Account needs to store an id number, the current balance for the account, and the number of
transactions that have occurred on the account. Remember that multiple worker threads may be
accessing an account simultaneously and you must ensure that they cannot corrupt its data. You
may also want to override the toString method to handle printing of account information.
Transaction is a simple class that stores information on each transaction (see below for more
information about each transaction). If you’re careful you can treat the Transaction as
immutable. This means that you do not have to worry about multiple threads accessing it.
Remember an immutable object’s values never change, therefore its values are not subject to
corruption in a concurrent environment.
The Bank class maintains a list of accounts and the BlockingQueue used to communicate
between the main thread and the worker threads. The Bank is also responsible for starting up the
worker threads, reading transactions from the file, and printing out all the account values when
everything is done. Note: make sure you start up all the worker threads before reading the
tr.
2. The application must validate user input to make sure data is entered for valid fields and all input meets business rules.
3. Items already checked-out cannot be checked-out by someone else until they have been checked back in.
4.
5. Find the Item the member wishes to check-out. The librarian enters the ISBN & Copy Number of the Item the member wishes to borrow, then clicks on the “Search” button next to the Copy No. field.
6.
7. Convert a juvenile member to an adult member if the date is after their 18th birthday.
11. Use ADO.NET objects to call the stored procedures & read the data returned into the entity objects.
12.
13.
14. A method in the Data Access Layer that returned the ItemOnLoanContext object created by the .dbml file.
15. A method in the Business Layer that performed a Linq query against the ItemOnLoadContext returned by the DataAccessLayer & returned the results of that query.
18. Flag adults whose memberships have expired when looking them up and give the librarian the option to renew their memberships.
19. Detect when a juvenile member’s 18th birthday has passed and automatically promote them into adult members. The librarian must be notified when this promotion is done.
22. The Member look-up page had to use an AJAX UpdatePanel and an Update Progress control. The user has to be able to select books that the member has checked-out and check them in from the Member Look-up page. The Update Progress control must be displayed as the check-ins are done & the page must refresh showing all Items the member still has on loan.
37. Code all error handling in the WCF Service Library so it passed strongly typed FaultException objects to the client when an unrecoverable error occurred.
38. Host the WCF Service Library in a WCF Web Host website.
45. The definition of the service behavior (in the <service> element). This specifies the fully-qualified name of the class that implements the service, and is the linkage between the Service.svc file and the configuration information.
46. The definition of the endpoint for the service, which includes the service’s endpoint, binding and contract in the <endpoint> element.
47. Additional information about the security configuration is included in the <behaviors> element of the web configuration file. Things defined here include:
48. The type of service credentials to use, in this case user name credentials, and the name of the provider class to use to verify the user, in this case AspNetSqlmembershipProvider.
49. The type of service authorization to use, in the <serviceAuthorizaton> tag. The tag has attributes that specify Principal Permission mode (UseAspNetRoles) and the role provider class name (AspNetSqlRoleProvider).
50.
51. Allow the user to create a new session of an existing course of study
56. File: The variable contains the name of an XML file in the XML folder
57.
58. For variables known to contain at least one paragraph of text (as opposed to a couple of words), a multi-line Text Box is displayed.
59. For variables of type Cost, a plain Text Box is used, but the value is formatted properly when the Text Changed event is fired.
60. For variables of type File, a Drop Down List is displayed. The choices provided are a list of all of the XML files in the XML folder, minus the configuration file.
61. For all other variables, a plain, single line, default sized Text Box is displayed.Below is the control’s Bind method, which is where the logic described above is implemented.<br />/// <summary><br />/// The user calls this method to have it display <br />/// </summary><br />/// <param name=quot;
variablequot;
>The Variable object to associate with this <br />/// control.</param><br />/// The list of values to bind the DropDownList's DataSource to<br />public void Bind( Variable variable, List<string> contracts ) {<br /> // Hide all of the child controls<br /> ddlFileValue.Visible = txtDateValue.Visible = <br /> txtTextValue.Visible = false;<br /> // Does this variable's name contain the word quot;
Datequot;
in it?<br /> if ( variable.Name.ToLower().Contains( quot;
datequot;
) ) {<br /> // It does. Set the VariableType to Date<br /> VariableType = VariableTypes.Date;<br /> // Show the txtDateValue control<br /> txtDateValue.Visible = true;<br /> // The name doesn't have quot;
Datequot;
in it. Is it quot;
templatequot;
?<br /> } else if ( variable.Name.ToLower() == quot;
templatequot;
) {<br /> // It is. Set the VariableType to File<br /> VariableType = VariableTypes.File;<br /> // Show the ddlFileValue control<br /> ddlFileValue.Visible = true;<br /> } else {<br /> // It isn't template, either. Switch on the variable's Type<br /> switch ( variable.Type.ToLower() ) {<br /> case quot;
costquot;
:<br /> // Set the VariableType to Cost<br /> VariableType = VariableTypes.Cost;<br /> // Show the txtCostValue control<br /> txtTextValue.Visible = true;<br /> break;<br /> case quot;
filequot;
:<br /> // Set the VariableType to File<br /> VariableType = VariableTypes.File;<br /> // Show the ddlFileValue control<br /> ddlFileValue.Visible = true;<br /> break;<br /> default:<br /> // Set the VariableType to Text<br /> VariableType = VariableTypes.Text;<br /> // Does the variable's name contain quot;
paragraphquot;
?<br /> if ( variable.Name.ToLower().Contains( quot;
paragraphquot;
) ||<br /> variable.Name.ToLower() == quot;
classtimesquot;
) {<br /> // It does. Make the txtTextValue control multiline<br /> txtTextValue.TextMode = TextBoxMode.MultiLine;<br /> txtTextValue.Rows = 5;<br /> txtTextValue.Columns = 35;<br /> }<br /> // Show the txtTextValue control<br /> txtTextValue.Visible = true;<br /> break;<br /> }<br /> }<br /> // Save the VariableType in the ViewState<br /> ViewState[ quot;
VariableTypequot;
] = VariableType;<br /> // Is the list of contracts null or empty?<br /> if ( contracts != null && contracts.Count > 0 ) {<br /> // It is not. Set it up<br /> FileList = contracts;<br /> }<br /> // Now set the proper child control's Text or Value property<br /> Text = variable.Value;<br />}<br />Updating a Contract<br />One of the optional requirements we had was to provide a means for the users to update a contract. The issue is that the contracts are stored as XML files and are translated into PDF files by a custom program, called the Generator. The Generator is an ASP.NET application that is accessible over the web & is used by students to print a copy of the contract for the class they are going to take. They then sign & return the contract to SetFocus before the class starts.<br />We decided to implement this functionality by using an XML Stylesheet Transforms, or XSLTs. The page we designed to accomplish this task is shown below.<br />The user chooses one of the XML files in the XML folder from the drop down & clicks the “Download” button. At that time, the XML file is transformed into a Word 2007 format document and downloaded to the user’s PC. The user may then edit the document and make any changes required.<br />When the user is done editing the file, they return to the above page and click the “Browse” button. This displays a dialog showing all files & folders on their local hard drive. The user locates the file they have edited & select it. Next, the user clicks the “Upload” button. At that time, the file is uploaded back to the server & transformed back into XML.<br />Below is the code that transforms the original XML file into Word 2007 format.<br />public static string Transform( string XmlFile, string TransformXslt, <br /> string TemplateFile ) {<br /> // Is the XmlFileName parameter null or empty?<br /> if ( String.IsNullOrEmpty( XmlFile ) ) {<br /> // It is. Throw an ArgumentException<br /> throw new ArgumentException( <br /> quot;
Must specify the fully-qualified XML file to transformquot;
, <br /> quot;
XmlFilequot;
);<br /> }<br /> // Does the file specified by XmlFile really exist?<br /> FileInfo xmlFile = new FileInfo( XmlFile);<br /> if ( !xmlFile.Exists ) {<br /> // It does not. Throw a FileNotFoundException<br /> throw new FileNotFoundException( <br /> quot;
Cannot find the XmlFile at the specified pathquot;
, XmlFile );<br /> }<br /> // Is the TransformXslt parameter null or empty?<br /> if ( String.IsNullOrEmpty( TransformXslt ) ) {<br /> // It is. Throw an ArgumentException<br /> throw new ArgumentException( <br /> quot;
Must specify a fully-qualified XML file for the transformquot;
,<br /> quot;
TransformXsltquot;
);<br /> }<br /> // Does the file specified by TransforXslt really exist?<br /> FileInfo transformXslt = new FileInfo( TransformXslt );<br /> if ( !transformXslt.Exists ) {<br /> // It does not. Throw a FileNotFoundException<br /> throw new FileNotFoundException( <br /> quot;
Cannot find the XSLT file at the specified pathquot;
, TransformXslt );<br /> }<br /> // Is the TemplateFile parameter null or empty?<br /> if ( String.IsNullOrEmpty( TemplateFile ) ) {<br /> // It is. Throw an ArgumentException<br /> throw new ArgumentException( <br /> quot;
Must specify a fully-qualified Word Template for the transformquot;
, <br /> quot;
TemplateFilequot;
);<br /> }<br /> // Does the file specified by TemplateFile really exist?<br /> FileInfo templateFile = new FileInfo( TemplateFile );<br /> if ( !templateFile.Exists ) {<br /> // It does not. Throw a FileNotFoundException<br /> throw new FileNotFoundException( <br /> quot;
Cannot find the Word template file at the specified pathquot;
, <br /> TemplateFile );<br /> }<br /> // Get a temporary file name to use for the output file<br /> string outputDocument = Path.GetTempFileName();<br /> outputDocument = Path.ChangeExtension( outputDocument, quot;
docxquot;
);<br /> <br /> // Create a writer for the output of the Xsl Transformation.<br /> StringWriter stringWriter = new StringWriter();<br /> XmlWriter xmlWriter = XmlWriter.Create( stringWriter );<br /> // Create the Xsl Transformation object.<br /> XslCompiledTransform transform = new XslCompiledTransform();<br /> transform.Load( TransformXslt );<br /> // Transform the xml data into Open XML 2.0 Wordprocessing format.<br /> transform.Transform( XmlFile, xmlWriter );<br /> // Create an Xml Document of the new content.<br /> XmlDocument newWordContent = new XmlDocument();<br /> newWordContent.LoadXml( stringWriter.ToString() );<br /> // Copy the Word 2007 template document to the output file.<br /> File.Copy( TemplateFile, outputDocument, true);<br /> // Use the Open XML SDK version 2.0 to open the output document in edit mode.<br /> using ( WordprocessingDocument output = <br />WordprocessingDocument.Open( outputDocument, true ) ) {<br /> // Using the body element within the new content XmlDocument, <br /> // create a new Open Xml Body object.<br /> Body updatedBodyContent = <br /> new Body( newWordContent.DocumentElement.InnerXml );<br /> // Replace the existing Document Body with the new content.<br /> output.MainDocumentPart.Document.Body = updatedBodyContent;<br /> // Save the updated output document.<br /> output.MainDocumentPart.Document.Save();<br /> }<br /> // Return the output file's name<br /> return outputDocument;<br />}<br />