The solution homework 3.3 M101JS: MongoDB for Node.js Developers
Making your blog accept comments
In this homework, you will add code to your blog so that it accepts comments. Download and unpack the files for this homework from the Download Handout link. You will be using the same code as you downloaded for homework 3.2, along with the changes you made.
We have removed parts of the code that uses the Node.js driver to query MongoDB from posts.js and marked the area where you need to work for HW 3.3 with “hw3.3 TODO”.
In a terminal:
Linux/Mac:
cd blog/
grep -rn "hw3.3 TODO" *
Windows:
cd blog/
find /n "hw3.3 TODO" *
You should not need to touch any other code. The database call that you are going to add will add a new comment to a given post.
This assignment has fairly little code, but it’s a little more subtle than the previous assignment because you are going to be manipulating an array within the Mongo document. For the sake of clarity, here is a document out of the posts collection from a working project that also has comments.
{
"_id" : ObjectId("513d396da0ee6e58987bae74"),
"author" : "andrew",
"body" : "Representatives from the planet Mars announced today that the planet would adopt MongoDB as a planetary standard. Head Martian Flipblip said that MongoDB was the perfect tool to store the diversity of life that exists on Mars.",
"comments" : [
{
"author" : "Larry Ellison",
"body" : "While I am deeply disappointed that Mars won't be standardizing on a relational database, I understand their desire to adopt a more modern technology for the red planet.",
"email" : "larry@oracle.com"
},
{
"author" : "Salvatore Sanfilippo",
"body" : "This make no sense to me. Redis would have worked fine."
}
],
"date" : ISODate("2013-03-11T01:54:53.692Z"),
"permalink" : "martians_to_use_mongodb",
"tags" : [
"martians",
"seti",
"nosql",
"worlddomination"
],
"title" : "Martians to use MongoDB"
}
As a reminder, to run your blog, go into the blog directory and type:
npm install
node app.js
Note that you add comments in this blog from the blog post detail page, which appears at
http://localhost:8082/post/post_slug
where post_slug is the permalink. For the sake of eliminating doubt, the permalink for the example blog post above is
Ok, now it’s time to validate you got it all working.
From the top of this page, there was one additional program that should have been downloaded:mongoProc.
With it, you can test your code and look at the Feedback section. When it says “user creation successful” and “user login successful”, you can Turn in your assignment.
Solution:
Open blog/user.js and paste following codes or make changes near hw3.3
/* The PostsDAO must be constructed with a connected database object */
function PostsDAO(db) {
"use strict";
/* If this constructor is called without the "new" operator, "this" points
* to the global object. Log a warning and call it correctly. */
if (false === (this instanceof PostsDAO)) {
console.log('Warning: PostsDAO constructor called without "new" operator');
return new PostsDAO(db);
}
var posts = db.collection("posts");
this.insertEntry = function (title, body, tags, author, callback) {
"use strict";
console.log("inserting blog entry" + title + body);
// fix up the permalink to not include whitespace
var permalink = title.replace( /\s/g, '_' );
permalink = permalink.replace( /\W/g, '' );
// Build a new post
var post = {"title": title,
"author": author,
"body": body,
"permalink":permalink,
"tags": tags,
"comments": [],
"date": new Date()}
// now insert the post
// hw3.2 TODO
//Solution:
//callback(Error("insertEntry NYI"), null);
posts.insert(post,function(err,result){
if(!err){
console.log("Post inserted " + result[0].permalink);
return callback(null, result[0].permalink);
}
return callback(err, null);
});
}
this.getPosts = function(num, callback) {
"use strict";
posts.find().sort('date', -1).limit(num).toArray(function(err, items) {
"use strict";
if (err) return callback(err, null);
console.log("Found " + items.length + " posts");
callback(err, items);
});
}
this.getPostsByTag = function(tag, num, callback) {
"use strict";
posts.find({ tags : tag }).sort('date', -1).limit(num).toArray(function(err, items) {
"use strict";
if (err) return callback(err, null);
console.log("Found " + items.length + " posts");
callback(err, items);
});
}
this.getPostByPermalink = function(permalink, callback) {
"use strict";
posts.findOne({'permalink': permalink}, function(err, post) {
"use strict";
if (err) return callback(err, null);
callback(err, post);
});
}
this.addComment = function(permalink, name, email, body, callback) {
"use strict";
var comment = {'author': name, 'body': body}
if (email != "") {
comment['email'] = email
}
// hw3.3 TODO
//callback(Error("addComment NYI"), null);
var query = { "permalink" : permalink };
var operator = { '$push' : { 'comments' : comment } };
posts.update(query, operator, function(err, updated){
"use strict"
if(err)
return callback(err, null);
//console.log("Comment: " + comment.body + " inserted in post: " + permalink );
console.log("Comment: " + updated);
return callback(null, updated);
});
}
}
module.exports.PostsDAO = PostsDAO;
In this homework, you will be enhancing the blog project to insert entries into the posts collection. After this, the blog will have basic functionality. It will allow you to add blog posts with a title, body, and tags and have it be added to the posts collection properly.
We have provided the code that creates users and allows you to log in (the assignment from last week). Download and unpack the files for this homework from the Download Handout link.
We have removed parts of the code that uses the Node.js driver to query MongoDB from posts.js and marked the area where you need to work for hw3.2 with “hw3.2 TODO”.
In a terminal:
Linux/Mac:
cd blog/
grep -rn "hw3.2 TODO" *
Windows:
cd blog/
find /n "hw3.2 TODO" *
You should not need to touch any other code. The database call that you are going to add will insert a new post into the posts collection. Here is an example of a valid blog post:
> db.posts.find().pretty()
{
"_id" : ObjectId("513d396da0ee6e58987bae74"),
"title" : "Martians to use MongoDB",
"author" : "andrew",
"body" : "Representatives from the planet Mars announced today that the planet would adopt MongoDB as a planetary standard. Head Martian Flipblip said that MongoDB was the perfect tool to store the diversity of life that exists on Mars.",
"permalink" : "martians_to_use_mongodb",
"tags" : [
"martians",
"seti",
"nosql",
"worlddomination"
],
"comments" : [ ],
"date" : ISODate("2013-03-11T01:54:53.692Z")
}
As a reminder, to run your blog, go into the blog directory and type:
npm install
node app.js
To play with the blog you can navigate to the following URLs:
Ok, now it’s time to validate you got it all working.
From the top of this page, there was one additional program that should have been downloaded:mongoProc.
With it, you can test your code and look at the Feedback section. When it says “user creation successful” and “user login successful”, you can Turn in your assignment.
Solution:
Open blog/posts.js and paste following codes or make changes near hw3.2
/* The PostsDAO must be constructed with a connected database object */
function PostsDAO(db) {
"use strict";
/* If this constructor is called without the "new" operator, "this" points
* to the global object. Log a warning and call it correctly. */
if (false === (this instanceof PostsDAO)) {
console.log('Warning: PostsDAO constructor called without "new" operator');
return new PostsDAO(db);
}
var posts = db.collection("posts");
this.insertEntry = function (title, body, tags, author, callback) {
"use strict";
console.log("inserting blog entry" + title + body);
// fix up the permalink to not include whitespace
var permalink = title.replace( /\s/g, '_' );
permalink = permalink.replace( /\W/g, '' );
// Build a new post
var post = {"title": title,
"author": author,
"body": body,
"permalink":permalink,
"tags": tags,
"comments": [],
"date": new Date()}
// now insert the post
// hw3.2 TODO
//Solution:
//callback(Error("insertEntry NYI"), null);
posts.insert(post,function(err,result){ if(!err){ console.log("Post inserted " + result[0].permalink); return callback(null, result[0].permalink); } return callback(err, null); });}
this.getPosts = function(num, callback) {
"use strict";
posts.find().sort('date', -1).limit(num).toArray(function(err, items) {
"use strict";
if (err) return callback(err, null);
console.log("Found " + items.length + " posts");
callback(err, items);
});
}
this.getPostsByTag = function(tag, num, callback) {
"use strict";
posts.find({ tags : tag }).sort('date', -1).limit(num).toArray(function(err, items) {
"use strict";
if (err) return callback(err, null);
console.log("Found " + items.length + " posts");
callback(err, items);
});
}
this.getPostByPermalink = function(permalink, callback) {
"use strict";
posts.findOne({'permalink': permalink}, function(err, post) {
"use strict";
if (err) return callback(err, null);
callback(err, post);
});
}
this.addComment = function(permalink, name, email, body, callback) {
"use strict";
var comment = {'author': name, 'body': body}
if (email != "") {
comment['email'] = email
}
// hw3.3 TODO
//callback(Error("addComment NYI"), null);
var query = { "permalink" : permalink };
var operator = { '$push' : { 'comments' : comment } };
posts.update(query, operator, function(err, updated){
"use strict"
if(err)
return callback(err, null);
//console.log("Comment: " + comment.body + " inserted in post: " + permalink );
console.log("Comment: " + updated);
return callback(null, updated);
});
}
}
module.exports.PostsDAO = PostsDAO;
Following are the list of Drupal 8 modules that we find must-have modules for 2019, by which site will be SEO friendly, most of the securities are covered, easy to write codes, easy to debug, easy administration and many more. The list of required modules are:
Paragraphs Better than Field collections module Site Builders — to make things cleaner so that you can give more editing power to your end-users https://www.drupal.org/project/paragraphs
Bootstrap Paragraphs Types This Drupal module creates a suite of Paragraph bundles to allow content creators to harness the power of the Bootstrap framework for functionality and layout. https://bp.jimbir.ch https://www.drupal.org/project/bootstrap_paragraphs
Display Suite Instead of Panels https://www.drupal.org/project/ds
admin_toolbar Useful administration menu https://www.drupal.org/project/admin_toolbar
Dropzonejs Functionality like “Media” in D7 https://www.drupal.org/project/dropzonejs
Embed Used in many fields https://www.drupal.org/project/embed
tb_megamenu Mega Menu https://www.drupal.org/project/tb_megamenu
Checklistapi simple interface for modules to create fillable, persistent checklists that track progress with completion times and users. https://www.drupal.org/project/checklistapi
Better Exposed Filters Works with Views Filters Better Exposed Filters gives you greater control over the rendering of exposed filters. https://www.drupal.org/project/better_exposed_filtersSEO Modules:
Pathauto Pathauto module automatically generates URL/path aliases for various kinds of content https://www.drupal.org/project/pathauto
seo_checklist SEO Checklist module https://www.drupal.org/project/seo_checklist
Robots txt Generates the robots.txt file dynamically and gives you the chance to edit it https://www.drupal.org/project/robotstxt
Metatag Allows you to automatically provide structured metadata https://www.drupal.org/project/metatag
Hreflang In Drupal 8, the core Content Translation module adds href lang tags only to translated entity pages. https://www.drupal.org/project/hreflang
XML sitemap Creates a sitemap that conforms to the sitemaps.org specification https://www.drupal.org/project/xmlsitemap
Security login_security limit the number of invalid login attempts before blocking accounts, or deny access by IP address, temporarily or permanently. https://www.drupal.org/project/login_security
Security Kit SecKit provides Drupal with various security-hardening options. This lets you mitigate the risks of exploitation of different web application vulnerabilities. https://www.drupal.org/project/seckit
Security Review Security Review module automates testing for many of the easy-to-make mistakes that render your site insecure. https://www.drupal.org/project/security_review
Coder Coder checks your Drupal code against coding standards and other best practices. https://www.drupal.org/project/coder
Captcha challenge-response test most often placed within web forms to determine whether the user is human. https://www.drupal.org/project/captcha
Honeypot Honeypot uses both the honeypot and timestamp methods of deterring spam bots from completing forms on your Drupal site https://www.drupal.org/project/honeypot
Encryption Needed for market and other modules https://www.drupal.org/project/encryption
Workflow This module allows you to create arbitrary Workflows, and assign them to Entities. https://www.drupal.org/project/workflow
In this internship final report sample, we are showing you the full report, with a background of the study, objectives of the study, Limitations of the Study, Selection Method of Data Collection and the whole report body.
CHAPTER 1
Introduction
1.1 Background of the study
The internship program has become the bridge for those who want to enter to corporate level from the college life, through an internship I got to know the real working environment which was very much different from my course study.
The internship has developed a kind of confidence in me that now I can do something different from new employees and I can work as an employee. The main things I learned from the internship are the value of time and the importance of punctuality and rules and regulations that we have to follow as an employee.
1.2 Objectives of the study
The general objective of this report is to partially fulfill the requirements for the degree of BCIS. However, the specific objectives are as follows:
To find the use of Websites in today’s society.
To develop the Management Skills, Personality, and Teamwork.
To develop interpersonal skills, conceptual as well as technical skills.
Tips and techniques to design and program websites.
The technique to earn online.
1.4 Limitations of the Study:
Major limitations of internship report are as follows:
Lack of proper research and detailed information about the company and its operating activities.
The time frame to perform an internship was short.
Lack of knowledge to run programs and software used by DP Sign.
Object-oriented based programming and use of different programming languages in DP Sign stopped me to learn more.
1.5 Selection Method of Data Collection
There are two major approaches to gathering information in my internship about the situation, person, problems or phenomenon and software in DP Sign.
Internal information
External Information
This information was collected with the help of both primary and secondary resources.
Primary Data: They are collected by me on the concerned topic, which is original. While studying I have come across sources such as direct interviews with the supervisor, opinion of the different employees, informal talks with the employees, etc.
Secondary Data: They are collected by me on the basis of the study of networking in organizations. For preparing this report on networking and data communication I have collected information through Nepal Bank, internet, books, teachers, and some previous records.
DP SIGN is a global IT services company providing IT consulting, technology and outsourcing services. Using our enhanced global delivery model, innovative platforming approach and industry expertise, we provide cost‐effective services that enable our clients to use IT to enhance business performance, accelerate time‐to‐market, increase productivity and improve customer service.
DP SIGN provides value to its customers through innovation, accomplishment, trust, and long‐term relationships through its unique service portfolio and expertise.
DP SIGN brings quality services and products to its customers on time and at the most competitive prices. DP SIGN has very strong software engineering processes for software design and development activities. These strengths enable DP SIGN to smoothly adapt to the rapid enhancements in the technological domain while maintaining constant focus on the ever-changing business needs of its clients. With the vision of becoming the best IT service provider of the nation, DP SIGN has been a trailblazer in various domains of software engineering in Nepal.
Embedded system programming, Quality assurance techniques and process-oriented approach towards the design and development are those where DP SIGN has become a pioneer in the local context. Again, sustained quality delivery on time, post‐delivery services, corporate culture, documented knowledge acquisition, and continuous learning environments are the critical success factors of DP SIGN to achieve its vision.
2.2 Corporate Goal of the Company
The three pillars on which the DP Sign has its corporate structure are:
Continuous improvement
Customer’s satisfaction
Quality of product and system
All these pillars are the pillars of the quality system which the organization owns in order to satisfy its customers. Continuous improvement means the process of quality is not still at a certain point, it continuously moving towards the improvement and can’t be still to some location, and the sole objective of this continuous improvement is to satisfy the customer’s need by giving the customer the quality products.
2.3 Mission Statement of the company
“Our mission is to offer advanced, convenient, and money-saving digitally printing things in Monitors or papers with the implementation of distinctive ideas and expertise. Our foundation of survival is based on providing valued clients a convenient and affordable source for digitalizing the world“.
In a clear sense, our motto is to be “A strategic partner of our clients, not a mere vendor.”
2.4 D.P. Sign’s spirit is infused into every component
D.P. Sign doesn’t simply just make and sell products; we are also deeply concerned with a number of issues, such as quality products, quick service, after-sale services and what type of services would be ideal for the clients. This enables us to refine existing work procedures and technologies. Every work is done and processed with the clients in our minds.
2.5 Services
DP SIGN offers a broad range of printing, IT consulting, custom programming services and online earning training. We have significant experience satisfying the most special technical needs of our customers. We understand the importance of a balanced technical design. We apply the appropriate level of technology to each project, keeping smaller projects simple and larger projects robust.
Our clients represent a broad cross‐section of businesses. We are very proud of the relationships we have built, and we have earned them through listening, learning, and communicating with our clients.
The categories below summarize our most common tasks.
2.5.2 Web-based application design and development
Business workflow management
CRM
MIS
2.5.3 Generic/custom software solutions (in different platforms/domains)
Auto
Pharmaceuticals
Mortgage
2.5.4 Embedded software solutions
2.5.5 Online Earning Training
2.6 Engagement Models
2.6.1. Fixed price turnkey model
This model is applicable for projects where requirement specifications and timelines are clearly defined and frozen. This helps clients if they have a fixed budget for development and are clear about their requirements. We work with our client to define expected deliverables to determine a mutually agreed fixed price.
2.6.2. Per resource model
This model offers clients the flexibility to alter requirement specification, team size and timeline of projects based on market trends and feedback. This model suits best for most of the projects due to a software development project’s inherent need for altering specifications throughout the development life cycle. The client pays a monthly fee per resource (development, QA or management).
2.6.3. Offshore model
Our core expertise lies in establishing Offshore Development Centers for its clients. Through this model we serve our clients with highly experienced professionals with varied skill sets, resources, flexibility and time & cost‐to‐market advantages, allowing them to enjoy the long term gains of offshore outsourcing. DP SIGN operates as an extension to clients’ existing software engineering business. The secret of its success can be attributed to the fact that this model gives an opportunity to the client to make direct communication with DP SIGN through the onsite center and at the same time gives them the chance of enjoying the benefits of offshore development. Round the clock development is seamlessly done with this model. In this model, the client pays an offshore center on a per month basis.
2.7 Delivery Model
A proper combination of synthesis motivates every engagement, enabling us to deliver technology solutions that give our clients a decisive competitive advantage. The client can decide among one of the following delivery models
Full offshore development
Full Onsite development with our developers and QA resource deployed at the client’s site
Hybrid model when the majority of the team is offshore and the few members are onsite to help gather business requirements and help in deliverables.
Above mentioned models cater to the different requirements of clients like augmenting their development or QA teams, forming a new and complete project team, getting architects and designers for new technology development. However, more onsite involvement increases the total cost of development. DP SIGN management team works with the client to help them choose the best model that fits into their business requirements.
2.8 Process and Standards
The following standards summarize the commitment of DP SIGN towards the international best practices.
2.8.1 Project management standards
At DP SIGN, we believe that project management is the key to the success of any project, more so for IT projects. We closely follow the PMBOK as set by the Project Management Institute (PMI) standards.
2.8.2 CMMI: The process improvement initiatives
We have initiated the development of process standards in‐house with the implementation of CMMI (Capability Maturity Model Integration). This process improvement approach will provide our organization with the essential elements of effective processes. CMMI can be used to:
guide process improvement across a project or throughout an entire organization
integrate traditionally separate organizational functions
set process improvement priorities and goals
Processes being the pivot of the realization of products/services, DP SIGN ensures that every pertinent activity comports with the defined processes. The following sequence features the processes that are executed during the entire development lifecycle
2.8.3.1. The offshore team-building process
This process primarily focuses on the team-building approach and deals with both onshore and offshore development centers. The following phases and activities summarize this process
Phase: Project team creation
Activities:
Defining and signing off the scope agreement
Identification of key team members for the project
Signing off the related agreements
Phase: Onsite to Offsite knowledge transition
Activities:
Offshore Team Building Process
Project Outsourcing Process
Project Management Process
Phase: Offshore process definition
Activities:
Tailoring standard methodology to comply with the client’s requirements
Phase: Offshore simulation
Activities:
Simulation of a client’s environment at an offshore development center
Review and comply with service level agreements
Establishment of required infrastructure
Setting up the offshore team structure
Training the ODC team for client’s requirements
Phase: Offshore project execution
Activities:
Define and review the different phases of the project
Establishment of project plans for each phase
Execution of the project in a phase‐wise manner in adherence to the corresponding project plan.
Establishment of metrics to identify the client’s satisfaction level in
Terms of team structure/communication, infrastructure, and any other relevant issues
Implementation of feedback from the client
2.8.3.2 Project outsourcing process
This process comprises of the following phases, activities, and deliverables related to the project execution.
Phase: Analysis of requirements
Activities:
Requirement capture
Describing the old architecture
Identification of critical issues
Identification/assessment of client risk and mitigation measures
Establishment of project scope
Phase: Creation of Design Documents
Activities:
Development of system design schema
Creation of detailed project plan
Deliverables:
Design documents
Hardware and system architecture
Phase: Development/Unit testing
Activities:
Modules coding
Unit testing
Test case design and documentation
Deliverables:
Test Plan
Issue tracking log
Code walkthrough review
System test cases
Phase: System Integration/Testing
Activities:
Execution of test cases
Fixing bugs
Change request review
Update test cases
Update design documents
Deliverables:
Test plan and Test cases
Test log sheet
Approved changed request
Updated design documents
Phase: Acceptance/ release to production
Activities:
Verification of acceptance criteria
Fixing bugs
Review of Change request
User training
Development of user manuals
Deliverables:
Sign off on acceptance
Detail QA reports
User manual
Installation/release notes
2.8.3.3 Project management process
Phase: Initial Project Plan
Activities:
Estimation of effort and development time with the support of lead developer and QA manager
Resource allocation for each task
Phase: Project tracking/visibility (recurring step till the delivery of project)
Activities:
Preparation of weekly status by the project manager (For some clients there will be daily Scrum).
Discussion on project status with the client in the defined period
Readjustment of resource as required
Updating the project plan in accordance with the change request issued by the client
Phase: Project plan for the next phase (recurring step till the delivery of project)
Activities:
Generation of the project plan for the next phase
Tracking of next phase
2.9 Domain Profile
DP SIGN offers its skills/services in two different segments i.e. System level programming and application-level programming.
2.9.1 System Level Programming
DP SIGN has been doing various projects related to embedded system development. It is basically developing systems in C. We have good expertise in working on the Linux platform as well as on Windows. Our work involves working in different protocols related to the network. We have also been working with media formats like MPEG4. Following is the summary of Tools and Technology we use at DP SIGN at the System Programming unit:
We provide specialized services to cater to the specific web requirements that are by practice defined by the client. In this context, we concentrate more on the implementation approach for the customer defined requirements coupled with the right technologies to deliver a high-quality web solution. Our expertise is distributed but not limited to the client-server solution, thin client-based application, and web-based application development. We have been working with our clients mostly in the area of E‐commerce solutions, CRM solutions, and third party web integration.
Here is a list of technologies and platforms that we use to bring you the best, most efficient and cost‐effective solution.
Technology
Platform
Operating System
Linux, Windows2000/ XP, WinNT
Web Page Design Scripting Technology
AJAX, HTML/DHTML, XML, JavaScript, PHP, Perl / CGI, .NET, ASP
Ultradev Dreamweaver, DeamweaverMX, PHP Editor, Microsoft Visual Basics, Microsoft Visual Studio.NET, Macromedia Flash
Programming Languages
PHP, ASP, VB, C/C++, C#
Testing Tools
Test Track, Track+, Cpp‐Unit, N‐Unit, Win Runner, Load Runner
Bug Tracking System
Bugzilla
Version Control System:
Subversion, CVS
Content Management System
Joomla, Mambo, Droople, PHPNuke
Ecommerce
Oscommerce, Creloaded, Zencart, XCart, OscMax
Design and PM tools
MS‐Project, MS‐Visio, Rational Rose
Tab: 2.2 List of technology with a platform
2.10 Competitive Advantage of DP Sign
DP SIGN maintains working hours with Time‐match/Time‐overlap facility. This way, our Japanese and American clients get complete visibility and interaction with the development team. DP SIGN possesses a strong team of architects, DBA, Programmers, QA personals and support staff with graduation in computer science from reputed universities. Not only that, it maintains formal tie‐up with reputed universities for the interrupted supply of trained human resource
Compelling cost arbitrage advantage (better than India and the Philippines)
Reduces time‐to‐market and provides a frequent delivery and support model
In‐house Training facility for the project members depending upon the nature of the project
Developers possess sound oral and written communication in English and are further trained by the American Language Center
Defined Software process with state of the art tools/techniques involved in all phases of complete life‐cycle
2.11 Physical Infrastructure
8000 sq feet Software Development Centre capable of accommodating more than 100 resources (Can be extended as and when required)
24 hour guarded premises (guarded by internationally acclaimed “Group 4 Falk) at the heart of Kathmandu.
Multi‐skilled resource pool
A strong team of architects/DBA/Programmers/QA personals and support staff
Networked workstations running Linux, embedded Linux and Windows NT/2000/XP
Dedicated server room with high security and standard network and server equipment
Hardware firewall (Sonic Wall) protected development environment
Uninterrupted Power Supply
Ergonomically designed workspaces
Backup placed at multiple locations (in multiple buildings)
Multiple leases and broad‐band internet connection extendable to 1Mbps of connectivity.
Web site development in DP Sign is done in two ways, either it is built in-house or it is bought.
2.14.2.1 In-House Development
2.14.2.1.1 Design the application architecture
Application architecture defines the technologies to be used by one or more or all information systems in terms of their data, processes, interfaces and network components. In DP Sign database like MySQL, SQL, Oracle, MySQL, etc were in use, I use MySQL. They use .net and PHP as the programming language and I prefer to use PHP language in website programming.
The physical data flow diagram is used to establish physical processes and location issues.
2.14.2.1.2 Design the database(s)
The purpose of this task is to prepare technical design specifications for a database that will be adaptable to future requirements and expansion. System analyst also participates in the database modeling and the system designers are responsible for the completion of the activity as databases are shared resource.
The database schema is also structured.
2.14.2.1.3 Design the system interface
In this, the system designer works with the system to develop input, output and dialogue specifications. For output, the terminal screen or the printed papers were used and for input, the data capture method is used.
System designers are responsible for the task and can use GUI (graphical user interface). For this, I have used Macromedia Dreamweaver and Phpmyadmin.
2.14.2.1.4 Package Design Specifications
The final design task involves packaging all the specifications from the previous design tasks into a set of specifications that will guide the computer programmer’s activities during the construction phase of the systems development methodology.
2.14.2.1.5 Update the Project Plan
Revaluation of the project is done. The project manager in conjunction with system owners and the entire team facilitates this tas
2.14.2.2 Buy Solution
If the DP Sign is willing to buy the website from the outsider then following is done:
2.14.2.2.1 Identify and Research Specific Products
In this task, we research technical alternatives. The requirements specify the functionality, features and critical performance parameters for our new website. Research and information are collected from internal standards, information services, trade newspapers, and periodicals offer. System Designer with the help of a project manager is responsible to complete the task
2.14.2.2.2 Solicit Proposals or Quotes from Vendors
The solicitation task requires the preparation of RFQ (Request for Quotations) and RFP (Request for proposal). Request for Quotations is a formal document that communicates business, technical and support requirements for the application software package to a single vendor that has been determined as being able to supply that application package and services.
Request for proposal is also a formal document that communicates business, technical and support requirements for an application software package to vendors that may wish to compete for the sale of that application package and services,
2.14.2.2.3 Select and recommend the best vendor.
The purpose of this task is to validate requests for proposals and/or quotations received from vendors. Designer involves in data and database administrators, network administrators and application administrators. The key outputs of this task are those vendor proposals that proved to be validated proposals or claims and others whose claims were not validated.
2.14.2.2.4 Contract with the awarded vendor to obtain the product
Having ranked the vendor proposals the next activity usually includes presenting a recommendation to management for final approval. Salesmanship and communication skills are important. The purpose of this activity is to negotiate a contract with the vendor who supplied the winning proposal and to debrief the vendors that submitted losing proposals. A contract will be produced to the winning vendors.
2.14.2 Online Earning Department
2.14.2.1 Online Earning Training:
In this training, we were taught how we can earn money online without investing money. This training lasts for 15 days for normal computer operator and for advance the time period is less. Online earning can be done by different means in this global market. Some of them are:
2.14.2.1.1 Online earning through blogging:
Blog or Weblog is nothing but a personal website where you can express your personal views, ideas, feelings, etc. There are many sites such as Blogger, Typepad, Soul cast who provide blog services. You can earn online through Adsense. Here you have to place Adsense ads on your blog. You will earn whenever viewers click on the ads.
2.14.2.1.2 Online earning through Ad Typing:
Online earning by Ad typing is another unique job opportunity. All you have to need to post Ads on various Free Ad sites. There are tons of sites that provide Ad Typing jobs. Typeinternational is a very popular site. Typeinternational is providing nine different homes based earnings opportunities.
2.14.2.1.3 Online earning through Medical Transcription:
Medical Transcription is the fastest-growing field in health care. It is the process where you need accurately and swiftly transcribes medical records dictated by doctors and others, including medical history and physical reports, X-ray reports and pathology reports, etc. Good English pronunciation, typing skill and acquaintance with medical terminology are the basic need of the job. You can earn lots of money through Medical Transcription.
2.14.2.1.4 Online earning through the filling of Market Survey Forms:
Filling of Market Survey Forms is another popular online job opportunity. Thousands of consumer products are fighting to get a pie of the billions of consumers worldwide. You can earn by simply filling up of forms regarding a particular product of a company.
2.14.2.1.5 Top Pay per click (PPC) Business Sites
Some of the sites that pay per click are: Name of sites
DP Sign was founded in 2007. So it is a newly entered company in the corporate world. But its sales figures are outstanding. The company has sales of over 10 million Nepali rupees in the financial year 2008-2009.
The overall sales volume is generated from three areas domestic, commercial and International. The prices of the products of the company range from Rs. 350(Domestic) to Rs. 1.5 million.
The Major portion of the revenue of DP Sign is Flex Printing, Online earning training, and website designing and programming.
The partition of sales to total sales graph is given below:
Fig: 2.2 Business volume of DP Sign
According to the figures company’s 52% sales of Revenue is earned through website designing and programming, 11% of revenue is from online training, and 15% and 22% from online training and other sources respectively
Although DP Sign was founded in 2007 it remained successful in getting its share in the market in a very short time (2007-2009) and through it’s loyal, devoted, professional and hardworking management it is expected that the company will expand its sales to about 4 million during 2010-2011.
Besides that company has also earned impressive goodwill in the market through its quality services.
2.17 Products offered by DP Sign
2.17.1 Printing Services
SN
Material Type
Rate
Remarks
1
Printed backlit with box & light with fitting at site
199.00p.sq.ft.
Without vat
2
Vinyl sticker cutting & pasting on backlit with box & light with fitting at site
221.00p.sq.ft.
Without vat
3
Flex/ Frame & fitting at site
38.00p.sq.ft.
Without vat
4
Mimaki Soljet print Normal vinyl
50.00p.sq.ft.
Without Vat
5
Soljet vinyl print & pasting on forex sheet
95.00p.sq.ft.
Without vat
Tab: 2.6 Printing product of DP Sign
2.17.2 Web services
SN
Web Service Type
Rate
1.
Domain Registration
Rs. 1000+
2.
Web space
As per space requirement
3.
.np domain registration
Free
4.
Website design and development
As per design and requirement
5.
Open Source CMS (joomla, word press, durpal, umbraco, tomato, mambo, hippo, nuxeo)
As per design and requirement
6.
Search Engine Optimization(twitter marketing, social marketing, facebook marketing, affiliation program)
As per the design and requirement
7.
Online Earning Training
Rs 1500+
Tab: 2.7 Web services providing by DP Sign
2.18 Time Frame of Internship
Fig: 2.3 Time frame representation in Gantt chart
Chapter 3
Analysis
3.1 Strategic Business Unit’s Analysis
DP Sign has different strategic business units and management as DP Sign is well aware that how to use these units strategically. In order to fully analyze the business units of DP Sign that are web development, online earning training, and printing, I have used different analysis which not only gives the true picture of the company’s different unit but it also gives the depiction of the overall industry analysis in which company is currently working. There are four types of Analysis which I have performed in order to explore the working of the organization.
3.1.1Web Development department Analysis
3.1.2 Online Earning department Analysis
3.1.3 PEST Analysis
3.1.4 SWOT Analysis
3.1.5 Five S’s of Workplace Organization.
All these analyses have been performed by getting data from real-time industry situation as well as the organization. Research articles, news articles, internship reports, manuals are being used in order to effectively analyze the working of the organization. The historical data for the analysis has been taken or a maximum of 5-7 years back while current data until 2009 has been used.
3.1.1 Web Development department Analysis
Present status of Website development in DP Sign
Though the Website development in Nepal is developing and every year many companies are being registered but a professional person is lacking in our country. DP Sign is also facing the same problem so it is hiring professionals from other countries. Like other companies in Nepal, DP Sign is also lacking local customers as our country is lacking the knowledge to use technology and computers.
But the use of technology and website in Nepal is also increasing thus DP Sign also has to focus on the local customers. Even personal websites are taking a market so DP Sign should focus on this site by reducing the costs but increase the volume of sale which ultimately leads to an increase in the profit.
Schools, colleges, institutions, shopping center are increasing thus DP Sign should focus in this sector also. One of the lackings of the DP Sign is that it lacks advertisement.
DP Sign has to face competition from:
Strong local market
New entrants in the international market
Competition from existing customers
Economic recession
From a strong local market, the competition has been arising from a few companies. These companies are well renowned not only locally but also internationally. In these local companies, DP Sign has been facing competition at website development. At locally and internationally DP Sign is facing the competition as the number of companies is increasing. As economic recession is a period of recession and throughout the global world is suffering from the economic crisis, in such a scenario, there is an effect on website development also.
In the context of DP Sign, the market capture internationally is very low in the context of other website company so the company should focus on maintaining international customers.
3.1.2 Online Earning department Analysis
In the context of DP Sign Online Earning, training generates about 15% of the Revenue. So this is also one of the most important departments of DP Sign but DP Sign is not focusing on it.
The Internet in Nepal is increasing. Some businesses and people are eager to earn online by sitting at home and being bosses of themselves so online earning has also a potential market to earn.
But DP Sign is not focusing on this sector and I suggest them to make a website to unite their team and the exchange of click can be done so that everyone can get benefits.
3.1.3 PEST Analysis
PEST analysis is the analysis which we tend to perform in order to analyze the external as well as the internal environment in which the organization is currently working. PEST analysis revolves around four things.
Political Environment
Economic Environment
Social Environment
Technological Environment
Political Factors
There are many factors, which entice the organization with the Government.
Tax policy
Quota
Cyber Laws
Online transactions law
Labor policy
Economic Environment
Recession, devaluation of the currency and the policy of the government have an adverse effect on the economy.
Social Factors
Due to an increase in the education and technology sector, the educational power of the customers is increasing at a speedy rate. They are becoming aware of the brands and the latest technology. Due to this, they are demanding a high technological website at a low price in the international market.
Technological Factors
Technology is also a key sector in terms of the external environment for website development. The technology is working as a substitute for manpower with more efficiency. DP Sign has to focus on following
Error reduction
Less labor cost
DP Sign should have to focus on maintaining the harmony between the factors of PEST analysis so that it can progress in its life cycle.
3.1.4 SWOT Analysis
Performing SWOT analysis involves the generation and recording of the strengths, weaknesses, opportunities, and threats in relation to a particular task or objective.
Strengths
Strong and Prominent International Image
Latest Technology
Competitive Workforce
Creativity and Innovation
Management Information System
ISO Certified Company
Locally Working(Expenses in NRs but earning in Dollars)
Weaknesses
Individualism
Low Production capacity
No opportunity for Training and Development
Lack of teamwork
Lack of continuity of Policies
Too much Specialized Jobs
Opportunities
New Emerging Markets
Bright Local Market
New Cyber laws and Policies
Implementation of technology and websites in government sector
Threats
Non-supportive government
Government Policies
Growing Competition
Political uncertainties
3.1.5 5 S’s of Workplace Organization.
I recommend the DP Sign to follow the 5 S’s techniques to promote workplace organization, ensure adherence to standards and foster the spirit of continues improvement.
The 1st S: Sort
To get rid of unwanted items, things should be in the right place so that it can be gain ant the right time. Decide what is needed to be kept, and what is not needed and to be discarded.
The 2nd S: Set Location and Limits
To locate a specific place for specific items of a specific quantity, where needed. Determine addresses for materials and equipment. Put them in that place and keep them there.
The 3rd S: Shine and Sweep
Shine and sweep mean to use cleaning to identify abnormalities and areas for improvement. Clean the workplace and at the same time visually sweep for abnormalities or out or control conditions.
The 4th S: Standardize
To consolidate the first 3 S’s by establishing standard procedures. Determine the best work practices and find ways of ensuring everyone does it the same “best” way.
The 5th S: Sustain
Sustain improvements and make further improvements by encouraging effective use of the ‘Check-Act-Plan-Do’ cycles. Keep all current improvements in place and develop an environment for future improvements.
3.2 What I would improve or do differently if I had the opportunity:
I could be better organized, especially with regards to the paperwork required for capital purchases and expense reporting for business travel.
I could learn to manage my time better, planning parallel execution of some short-duration activities when long-running operational activities are occurring.
This would reduce personal idle time when waiting for long-duration activities to complete.
Chapter 4
Recommendations
There are few things which can be implemented and improvements can be made.
There must be a career development opportunity for the employees so that they can work energetically in the organization as there is high turnover due to lack of information in the related sector.
Remuneration System must help in motivation as a better remuneration package can do more in this highly competitive environment.
The work environment at DP Sign is such that it does not encourage the staff to work effectively and I recommend that jobs should be such that the worker really enjoys what they are really doing.
The staff as an individual is good but as a team is very bad, this thing should be overcome by promoting the team-based culture by the company.
What I feel while working in DP Sign was that the top management is taking HRD as an expense rather than an investment as in the future the real capital or asset will be in the form of the workforce rather than monetary capital.
In DP Sign there are uses of advance technology so the employee outside the world cannot cope easily with the internal environment so the socialization process should perform while recruiting the new employee.
I suggest DP Sign to make a website to unite their online earning team and the exchange of click can be done so that everyone can get benefits.
There are problems in web hosting services as the mail is sent to the scams sector so it should be maintained and the reliable up to date time is 98% only so the web hosting services should be changed.
Chapter 5
Conclusion
During my internship training at DP Sign, I have learned a lot and my vision and practical exposure have broadened very much from my three months internship. In the website development and online earning sector, DP Sign is contributing a lot and is using modern technology to take the company to new horizons and is moving as per its slogan “A strategic partner of our clients, not a mere vendor”.
I have carried out my responsibilities and duties in the field of website designing and online earning by which I am capable to design and program website and started to earn online.
After doing my internship it becomes clear to me that books are only dealing with the ideal situation while in the real world it is not so, and you have to face many problems particularly in programming and designing field in which you are dealing with codes and the behavior of software to handle them. Besides this, I just came across with abstract and the concepts developed with thorough study able to make a vague mental image while working in a real scenario.
Further, I also concluded that 100 percent concentration, full care, analytical, descriptive, knowledge and communication skills are the key prerequisites for working in the real world.
Anyhow, precisely speaking this internship of three months is a memorable period for me during which I availed the opportunity to flourish my communication skills, polish my capabilities and abilities, upgrade my knowledge about the latest technology and application tools and broaden my vision and exposure towards practical life.
This internship proves better for me in two way, on one side it helps to develop a personality in me which exactly match the professionalism in web development and secondly it helps to strengthen my decision about the specialization in web technology as my personality exactly match the nature of the job.
Chapter 6
PROGRAM WORKPLACE RELATIONSHIP
This project has proved to be very useful in putting the theoretical knowledge learned in college into practical knowledge. Through this project, the various subjects learned by us such as the principle of management, system analysis, and design, C programming, web technologies, Object-oriented languages, organizational behavior, and other programming have been put into use practically.
The subject matter of system analysis and design and other programming languages and web technologies learned theoretically were put into use in this project. Planning of the assignment, locating information sources, collecting and analyzing data, presenting charts and tables, programming, website designing and programming, understanding system and software as well as re-engineering them, etc. which are already studied by us in books was very helpful in putting it into practical experiences and preparing this project. The theoretical knowledge of web technologies, programming languages and managerial courses were helpful in carrying out the SWOT analysis, PEST analysis, and other analysis.
This program is very helpful in putting our theoretical knowledge into practical knowledge. All the subject matter studied by us in the previous semester was put into use while carrying out this project. Studying books is a different thing and going through all the things studied is different. This program has provided a platform to undergo real-life problems and experiences of business which will be fruitful to us in the coming years.
Bibliography
Book References:
Annual Report of DP Sign
Operating Manuals of the DP Sign
Publications of the DP Sign
System Analysis and Design Methods, McGraw-Hill Companies
Internship Report Management Information System, Prentice Hall
Software Project Management by E.M. Bennaton Second Edition.
Website References:
dpsign.com.np
google.com and other search engines to search
scribd.com
esnipps.com
wikipedia.com (The encyclopedia)
APPENDICES
Fig: Sample Project Delivery Organization for a large project in DP Sign
Fig: In-House Development process in DP SIGN
Like this, we are complete the full internship report to submit to the college.
This post is regarding the internship provision internship letter, internship letter, cover letter, intern letter, letter of the internship.
17th Dec 2009
To, The HR manager Everest Bank Ltd New Baneshwor, Kathmandu
Subject: Regarding the internship provision
Respected sir/madam,
As a potential intern, with required qualifications and a strong desire to excel in the banking profession, I am seeking to align myself as an intern with a company that ranks top at the global market and also offers an internship to undergraduates like me. I am seeking a professional opportunity where my educational and other co-curricular experiences can benefit your company as well as lead me to my career goal and drive me along my career path.
I keep forth my kind request to consider my application for an internship at your bank for a period of six weeks which is a must for the course of BCIS(Bachelor in computer information system) under Pokhara University. As under the university norms, we are supposed to select the specialized subject in the final year and I have decided to take part in the IT sector. This opportunity will help me to explore more during my classes and learn more.
I assure you that I will strongly adhere to the bank norms and rules during my tenure as an intern and at any time in the future. I will also fulfill my responsibilities with utmost dedication if given any.
I wait for your positive response.
Thanking you.
Yours sincerely, Rupak Nepali BCIS 7th semester Nobel College
internship letter, cover letter, intern letter, letter of internship
In this problem, you will analyze a profile log taken from a MongoDB instance. To start, please download sysprofile.json from Download Handout link and import it with the following command:
mongoimport -d m101 -c profile < sysprofile.json
Now query the profile data, looking for all queries to the students’ collection in the databaseschool2, sorted in order of decreasing latency. What is the latency of the longest-running operation to the collection, in milliseconds?
Suppose you have a collection called tweets whose documents contain information about thecreated_at time of the tweet and the user’s followers_count at the time they issued the tweet. What can you infer from the following explain output?
In this problem, you will be using an old weather dataset. Download weather_data.csv from the Download Handout link. This is a comma separated value file that you can import into MongoDB as follows:
mongoimport –type csv –headerline weather_data.csv -d weather -c data
You can verify that you’ve imported the data correctly by running the following commands in the mongo shell:
> use weather
> db.data.find().count()
> 2963
Reading clockwise from true north, the wind direction is measured by degrees around the compass up to 360 degrees.
90 is East
180 is South
270 is West
360 is North
Your assignment is to figure out the “State” that recorded the lowest “Temperature” when the wind was coming from the west (“Wind Direction” between 180 and 360). Please enter the name of the state that meets this requirement. Do not include the surrounding quotes in providing your answer.
Answer is:
New Mexico
Write New Mexico and submit.
If you need query then following is the query to retrieve the data
If you had installed Xampp in D:/ folder then follow the following steps, if you have installed in C:/ or another folder then replace D with respective folder name.
Open up the Xampp control panel and stop Apache (Ensure that you don’t have it running as a service.
Navigate to D:/xampp/apache/conf/extra or wherever you installed Xampp
Open up your text editor with administrative privileges and open up httpd-vhosts.conf found in the D:/xampp/apache/conf/extra folder
At the very bottom of the file paste the following (check if it exists there already)
<VirtualHost *:80>
DocumentRoot “D:/xampp/htdocs”
ServerName localhost
</VirtualHost>
Without that line of code, you will lose access to your default htdocs/ For eg: http://localhost/ will be inaccessible.
Now copy and paste the code below: <VirtualHost *:80> DocumentRoot “D:/xampp/htdocs/webocreation” ServerName webocreation.dev ServerAlias www.webocreation.dev <Directory “D:/xampp/htdocs/webocreation”> AllowOverride All Require all Granted </Directory> </VirtualHost>
Now we head over to our Windows Hosts File, to edit the HOSTS. File will be located at C:/Windows/System32/drivers/etc/hosts, where hosts is the file. 127.0.0.1 localhost
Look for the line above and enter your site mimicking the layout 127.0.0.1 localhost 127.0.0.1 webocreation.dev
Change this to the domain name you choose earlier
Change it to reflect the lines above (if you have problems saving it meant you didn’t have your text editor running in admin mode.
Restart Apache and test to make sure it is working.
It is not recommended to change the default files of OpenCart as if you upgrade then all changes will be lost so we have seen one solution to achieve your requirement by changing the header.tpl. Open catalog/view/theme/YOUR_THEME/template/common/header.tpl Find the following lines of code:
For many sub-categories, you can make multiple columns of sub-categories in OpenCart. While inserting the category, in the data tab, insert the “Columns” value to show multiple columns. You can see examples of the “MP3 Players” category and its sub-categories in the default installation.
Products to show without the add to cart button, another Opencart free module “Coming Soon Products module OpenCart version 2.0”. When you enabled this module, you will be able to see the products which available date is greater than today.
The module will look like below:
Admin section will look like:
Download Coming Soon Future Products free module from the link below:
Upload the files in the root folder to your server, no file is overwritten.
Then activate the “Future Products” module.
Activating the “Future Products” module:
After uploading files to servers, it’s time to install the “Future Products” module
We are showing the “Future Products” module at the right column of the Category page (Category Layout) but you can show it wherever you like as this acts as a normal module.
Go to Admin section
Then click on Extensions on the left menu
After that Click Modules and go to “Future Products” in the modules list
Then click the Green button for the “Future Products” to install the module (see the image below)
Then click the blue edit button
After that, you will see the form which has the status field, select “Enabled” and then click the Save button.
Your module is active and is ready to use in the layout.
Setup layout for the sidebar “Future Products” module at the right column of the home page:
From the admin section go to System >> Design >> Layouts.
You will see a list of layouts, from which edit the Home layout.
Then click Blue add the button to add rows at module section which is shown in the image below:
Second, you choose the “Future Products” in the module column and Column right in the Position column and insert the sort order as required.
Then click save button
Your custom home page is ready with the “Future Products” module in the right column. Likewise, you can show in many other layouts and pages.
Codes of “Future Products” modules of the presentation layer’s controller:
Go to catalog/controller/module/futureproducts.php
Please let us know if you have any questions or concerns. Please don’t forget to post your questions or comments so that we can add extra topics and Opencart free module. You can follow us at our twitter account @rupaknpl and subscribe to our YouTube channel for opencart tutorials.
While working as drupal developer in multi language Drupal 7 site you may find EntityFieldQuery class which allows finding entities based on entity properties and keep on getting confused with the propertyCondition and entityCondition for language translation.
Below example of entity field query helps me to find node main language specific featured blog post and
global $language;
$query = new EntityFieldQuery;
$query->entityCondition('entity_type', 'node')
->entityCondition('bundle', $bundletype)
->propertyCondition('status', NODE_PUBLISHED) // in case you need it
->propertyCondition('language', $language->language)
->fieldCondition('field_featured_blog', 'value', '1', "=")
->propertyOrderBy('changed', 'DESC')
->range(0,1);
$query->execute();
Below will find data as per the translated entity based language featured blog.
global $language;
$query = new EntityFieldQuery;
$query->entityCondition('entity_type', 'node')
->entityCondition('bundle', $bundletype)
->propertyCondition('status', NODE_PUBLISHED)
->entityCondition('language', $language->language)
->fieldCondition('field_featured_blog','value', '1', "=")
->propertyOrderBy('created', 'DESC');
$query->execute();
When you do print_r($query), then you will get following:
Full details of EntityFieldQuery at:
https://api.drupal.org/api/drupal/includes%21entity.inc/class/EntityFieldQuery/7.x
The function defaults to either = or IN depending on the value param as an array or string.
https://api.drupal.org/api/drupal/includes%21entity.inc/function/EntityFieldQuery%3A%3ApropertyCondition/7.x
The protocol that use newlines to separate messages, we’ll call this protocol Line Delimited JSON (LDJ). There are no line breaks in JSON messages. Although JSON is whitespace agnostic it ignores whitespace outside of string value.
Serializing Messages with JSON
Let’s develop the message-passing protocol that uses JSON to serialize messages. Each message is a JSON-serialized object, which is a hash of key-value pairs. Here’s an example JSON object with two key-value pairs:
{"key":"value","anotherKey":"anotherValue"}
The net-watcher service we’ve been developing in this chapter sends two kinds of messages that we need to convert to JSON:
When the connection is first established, the client receives the string
Now watching target.txt for changes…
Whenever the target file changes, the client receives a string like this: File “target.txt” changed: Sat Jan 12, 2013, 12:35:52 GMT-0500 (EST)
We’ll encode the first kind of message this way:
{"type":"watching","file":"target.txt"}
The type field indicates that this is a watching message the specified file is now being watched.
The second type of message is encoded this way:
Here the type field announces that the target file has changed. The timestamp field contains an integer value representing the number of milliseconds since midnight, January 1, 1970. This happens to be an easy time format to work within JavaScript. For example, you can get the current time in this format with Date.now().
To relieve the client program from the danger of split JSON messages, we’ll implement Line Delimited JSON (LDJ) buffering client module. Then we’ll incorporate it into the network-watcher client.
First, let’s have a look at how the Node does inheritance. The following code sets up LDJClientto inherit from EventEmitter.
LDJClient is a constructor function, which means other code should call new LDJClient(stream) to get an instance. The stream parameter is an object that emits data events, such as a Socket connection. Inside the constructor function, we call the EventEmitter constructor on this. That line of code is roughly equivalent to calling super() in languages with classical inheritance.
Finally, we call util.inherits() to make LDJClient’s prototypal parent object the EventEmitterprototype. If this sounds cryptic to you, don’t worry. It’s like saying classLDJClientinherits from EventEmitter in languages with a classical inheritance model. It means that if you look for a property on an LDJClientand it’s not there, the EventEmitteris the next place to look
Exporting Functionality in a Module
Let’s pull together the previous code samples and expose LDJClientas a module. Open a text editor and insert the following: /ldj.js
“Account login module for free OpenCart version 2.0” is another opencart free extensions when it is enabled you will be able to see the login form only when the customer is not logged in and if the customer is logged in then the form will be replaced with account links.
When the customer is not logged in you will see a form like this:
When logged in it will be seen the link the image below:
account_login_form_display
Download Account Login Form display free module from the link below:
Upload the files in the root folder to your server, no file is overwritten.
Then activate the “Account Login” module.
Activating the “Account Login” module:
After uploading files to servers, it’s time to install the “Account Login” module
We are showing the “Account Login” module at the right column of the Home page (Home Layout) but you can show it wherever you like as this acts as a normal module.
Go to Admin section
Then click on Extensions on the left menu
After that Click Modules and go to “Account Login” in the modules list
Then click the Green button for the “Account Login” to install the module (see the image below)
Then click the blue edit button
After that, you will see the form which has the status field, select “Enabled” and then click the Save button.
Your module is active and is ready to use in the layout.
Setup layout for the sidebar “Account Login” module at the right column of home page:
From the admin section go to System >> Design >> Layouts.
You will see a list of layouts, from which edit the “Home” layout.
Then click Blue add the button to add rows at the module section which is shown in the image below:
Second, you choose the “Account Login” in the module column and Column right in the Position column and insert the sort order as required.
Then click save button
Your custom home page is ready with the “Account Login” module in the right column. Likewise, you can show in many other layouts and pages.
Codes of “Account Login” modules of the presentation layer’s controller:
Please let us know if you have any questions or concerns. Please don’t forget to post your questions or comments so that we can add extra topics and Opencart free module. You can follow us at our twitter account @rupaknpl and subscribe to our YouTube channel for opencart tutorials.
We have had great experienced working with Limelight CRM. Here are the following things that we have worked:
Campaign management and offer management
Maintain the servers
Sites are all hosted in RackSpace and have load balancing to balance the visitor’s load.
Maintain security: Uses Cloudflare to maintain security and have performed many other tasks to obtain the best security
Maintain page loads
Integrate limelight in more than 50 websites. Uses both the Webform and API form and integrated into the design, sometimes 2-page checkout sometime one-page-checkout
Subscription management of the campaign Have not to design the PSD but can perform image changing and editing as per the necessity of the site.
Bootstrap uses for responsiveness
Upsell management for each offer and campaigns
Payment load balancing management
and many more.
Let us know if you have any questions or suggestions or requirements. You can also find us on Twitter and Facebook.
Hi, today we are publishing another free Opencart module “Sidebar Shopping Cart” and we made this for OpenCart version 2.0.3.1. Problem is we cannot edit js file with vQmod so you need to override the common.js file. But we have described where you need to put the extra code below in this post.
JS/CSS files are rendered at the browser level, not at the server level, so vQmod has no effect on these files. You can, however, create new files and use vQmod to alter the tpl files to point to these new CSS/JS files.
Output after installing the module is shown as in the image below:
Sidebar Shopping Cart
You can see how we copied the header cart section and show it as a module inside the cart box or side shopping cart. You can show anywhere you like as this is a module so you can show at the left column, right column or top content or bottom content.
Upload the files in the root folder to your server, the common.js file is overwritten so if you have any kind of custom javascript used then please transfer to the file and upload the common.js.
Then activate the Shopping Cart module.
Activating the Sidebar Shopping Cart module:
After uploading files to servers, it’s time to install Sidebar shopping cart module
We are showing the sidebar shopping cart in the right column but you can show it wherever you like as this is acts as a normal module.
Go to Admin section
Then click on Extensions on the left menu
After that Click Modules and go to “Shopping Cart” in the modules list
Then click the green button to install the module (see the image below)
installation_of_module
Then click the blue edit button
After that, you will see the form which has the status field, select “Enabled” and then click the Save button.
Your module is active and is ready to use in the layout.
Setup layout for the sidebar shopping cart at home page:
From the admin section go to System >> Design >> Layouts.
You will see a list of layouts, from which edit the “Home” layout.
Then click Blue add the button to add rows at module section which is shown in the image below:
siderbar_shopping_cart_installation
Second, you choose the Shopping Cart in the module column and Column right in the Position column and insert the sort order as required.
Then click save button
Your custom sidebar shopping cart is showing in the right column of the home page. Likewise, you can show in many other layouts and pages.
Codes to added to common.js if you don’t want to override it:
Open catalog/view/javascript/common.js
Find the following lines of code
$('#cart > ul').load('index.php?route=common/cart/info ul li');
In part 1 we showed how to activate google reCaptcha in contact us page, now we show how to show it on the registration page. Although it is not that simple as showing in the contact us page, we have to make some changes in code. For now, we are changing directly into the default file although it is not recommended :). We will try to provide OCMOD soon in the next post so you need to wait for the next post.
First go to catalog/language/english/account/ and open register.php file.
Add the following code to the end of the file. $_['text_google_recaptcha']= 'Google reCaptcha'; $_['error_captcha'] = 'Verification code does not match the image!';
Save the file
Changes to be made at the controller file:
Go to catalog/controller/account/ and open register.php file
Find the following lines of code which is inside the index method $data['column_left'] = $this->load->controller('common/column_left');
Just above that code paste following code $data['text_google_recaptcha'] = $this->language->get('text_google_recaptcha'); if (isset($this->error['captcha'])) { $data['error_captcha'] = $this->error['captcha']; } else { $data['error_captcha'] = ''; } if ($this->config->get('config_google_captcha_status')) { $this->document->addScript('https://www.google.com/recaptcha/api.js'); $data['site_key'] = $this->config->get('config_google_captcha_public'); } else { $data['site_key'] = ''; }
Now find the following lines of code which is inside the validated method. // Agree to terms if ($this->config->get('config_account_id')) { $this->load->model('catalog/information'); $information_info = $this->model_catalog_information->getInformation($this->config->get('config_account_id')); if ($information_info && !isset($this->request->post['agree'])) { $this->error['warning'] = sprintf($this->language->get('error_agree'), $information_info['title']); } }
Now above that code paste following code. if ($this->config->get('config_google_captcha_status')) { $recaptcha = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=' . urlencode($this->config->get('config_google_captcha_secret')) . '&response=' . $this->request->post['g-recaptcha-response'] . '&remoteip=' . $this->request->server['REMOTE_ADDR']); $recaptcha = json_decode($recaptcha, true); if (!$recaptcha['success']) { $this->error['captcha'] = $this->language->get('error_captcha'); } }
Save the file and your controller is ready
Changes to be made at the template theme file:
Go to catalog/view/theme/default*/account/ and open register.tpl, default* means if you are not using default theme then it will be theme name you are using.
Find the following line of code <?php if ($text_agree) { ?>
Just above the code above, paste the following code <fieldset> <legend><?php echo $text_google_recaptcha; ?></legend> <?php if ($site_key) { ?> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10"> <div class="g-recaptcha" data-sitekey="<?php echo $site_key; ?>"></div> <?php if ($error_captcha) { ?> <div class="text-danger"><?php echo $error_captcha; ?></div> <?php } ?> </div> </div> <?php } ?> </fieldset>
Save the file
Now go to your registration page and you will see the page like below:
Activate google ReCaptcha at registration page in Opencart
Let us know if we missed anything and if you need any help.
I have started to read laravel and started it with registering http://laravelshop.com and all my updates will be posted at laravelshop.com. Today I make logo and set up server and register domain. Likewise I set up facebook page https://www.facebook.com/pages/Laravel-Shop/1420260531616136
I was searching for the best website where I can create a class diagram for free and I found Cacoo which provides a website to create class diagram for free and can store it privately and collaborate with multiple users. Being a developer I have to design a class diagram, flow charts, business organizational chart, matrix diagram, Venn diagram, SWOT diagram, and schedule diagram and many more. I was looking for a free and private class diagram and found this Cacoo and am very happy to use it and it’s drag and drop system is so easy to use.
create class diagram for free
We can draw:
Business Diagram like: Business organizational chart, matrix diagram, Venn diagram, SWOT diagram, and schedule diagram
Flow Chart
Mind Map
Network Map like network diagram and AWS design template
Office layout
Sitemap
Wireframe for different devices
UML where you can draw state machine diagram, use case diagram, sequence diagram, class diagram, activity diagram, package diagram
Database design
Greeting Card design, Happy New Year, happy holidays, happy birthday and many more
Electronics diagrams like Ohm’s law
And also contained User-defined Templates.
So containing many drawing sections, I am happy to use it and hope it keeps on providing a free account. https://cacoo.com/