Showing posts with label Software Development. Show all posts
Showing posts with label Software Development. Show all posts

Tuesday 20 October 2015

Manage SPF Record - How to add SPF Record?

Manage SPF Record - How to add Spf Record?


Question: What is SPF Record?
An SPF record is a type of DNS record that identifies which mail servers are permitted to send email on behalf of your domain. Full form of DNS is Domain Name Service.


Question: What is purpose of SPF Record?
It identifies which mail servers are permitted to send email on behalf of your domain. In this way, It help us to prevent from spammer email.

Question: How to add SPF record?
You manage SPF Record, you must need have access DNS Manager.


Question: How to add SPF Record in Godaddy.com?
https://www.mail-tester.com/spf/godaddy

IF you are using other than Godaddy then check your "Web hosting company"
https://www.mail-tester.com/spf/

Question: Can we add two domain in SPF Record?
Yes, you can add two OR more domain in SPF Record.


Question: Can we add Two SPF Record
No, you can't add two OR more SPF Record.
Multiple SPF records will cause the SPF evaluation to fail with "permerror" (see RFC 7208, Section 4.5.).
But you can add multiple domain in Single SPF Record.


Question: How to add multiple domain in Single SPF Domain?
Single Domain in single SPF Record
v=spf1 include:spf.protection.outlook.com -all

Two Domain in single SPF Record
v=spf1 include:spf.protection.outlook.com include:spf.mandrillapp.com -all

Three Domain in single SPF Record
v=spf1 include:spf.protection.outlook.com include:spf.mandrillapp.com include:spf.domain.com  -all

Question: How to check SPF Record is available OR Not?
Make sure there is NO Error.


Question: How to Remove "support@mail128-15.atl41.mandrillapp.com" In Email's from?
To remove this text, you need to add SPF & DKIM Record in your DNS.
https://mandrill.zendesk.com/hc/en-us/articles/205582277-How-do-I-add-DNS-records-for-my-sending-domains-

Tuesday 18 August 2015

How do you parse and process HTML in PHP

How do you parse and process HTML in PHP


Following are different ways to parse the HTML

Use DOM: The DOM extension allows you to operate on XML documents through the DOM API with PHP 5.
$fullHTML = file_get_contents('http://www.example.com/scrap.php');
$domObj = new DOMDocument();
$domObj->loadHTML($fullHTML);
$xpath = new DOMXPath($domObj);
$tags = $xpath->query('//div[@class="myclass"]/div');
foreach ($tags as $tag) {
    print_r(trim($tag->nodeValue));
    echo "\n";
}



Use SimpleXMLElement: The SimpleXML extension provides a very simple and easily usable toolset to convert XML to an object that can be processed with normal property selectors and array iterators.
$fullHTML = file_get_contents('http://www.example.com/scrap.php');
$allData = new SimpleXMLElement($fullHTML);
print_r($allData);



Regular Expressions: It is sequence of symbols and characters expressing a string or pattern to be searched for within a longer piece of text.
$fullHTML = file_get_contents('http://www.example.com/scrap.php');
preg_match_all("/<(\w+)(\s+(\w+)\s*\=\s*(\'|")(.*?)\\4\s*)*\s*(\/>|>)/", $fullHTML, $matches);
print_r($matches);



3rd Party Libraries
There are lot of 3 party libraries which can parse your HTML/XHTMl. Following are few famous libraries.
phpQuery: phpQuery is a server-side, chainable, CSS3 selector driven Document Object Model (DOM) API based on jQuery JavaScript Library written in PHP5 and provides additional Command Line Interface (CLI).
Zend_Dom: Zend_Dom provides tools for working with DOM documents and structures.
QueryPath: QueryPath is a PHP library for manipulating XML and HTML.
FluentDom: FluentDOM provides a jQuery-like fluent XML interface for the DOMDocument in PHP.



WebServices
There are different APIs are available for the scraping the website and few of them are following.
YQL:The YQL Web Service enables applications to query, filter, and combine data from different sources across the Internet. It have like SQL syntax, familiar to any developer with database experience.
ScraperWiki: ScraperWiki's external interface allows you to extract data in the form you want for use on the web or in your own applications. You can also extract information about the state of any scraper.



Monday 17 August 2015

Edit an commit message in Github Repository - Commands

Question: How to change the Most recent commit message?
git commit --amend -m "This is updated commit message"


Question: How to change the Most recent commit message and append the files
git commit -a --amend -m "This is updated commit message"


How to display the status of files in the index versus the working directory?
git status; //;On branch test


How to create new Github directory?
git init <directory></directory>


How to get checkout from GitHub URL?
git clone /path/to/repository


Question: How to Add a files in github?
git add <files></files>


Question: How to commit the files in github?
git commit


Question: How to Push to a repository
git push origin


Question: HOw to git push in origin branch?
To push to your branch


Question: How to transfer all changes in your github?
git add file.txt
git commit  -m "We are add file.txt"
git push


Question: How to add file with commit message?
git add file.txt commit -m "We are add file.txt"


Question: How to pull all the changes ?
git pull origin


Thursday 26 March 2015

How do you disable browser Autocomplete on web form field / input tag?

How do you disable browser Autocomplete on web form field / input tag?

Question: What is Browser Autocomplete?
When we start typing in text-box, Sometimes browser start giving you suggestion. This is known as Browser Autocomplete.
For Example:
We type "mo", Its start giving you suggestion like
"Morning Forest"
"Morph"
"Mountains"
"Mom"
"Money"
..
..
etc


Question: Why browser gives us suggestion (Autocomplete)?
Technically, every text box have some name: like
<input name="username" type="text" value="" />
Above text box name is "username"
When same text-box OR text-box having same name, get multiple data by one OR different user, It start giving you suggestion which is previously entered.

In other word
Its it gives you previous keywords which was used to entered for same textbox.



Question: How to disable the autocomplete for one field?
just add the autocomplete="off" in the text box.
For Example:
<input autocomplete="off" name="username" type="text" value="" />



Question: How to disable the autocomplete for all fields in Form?
just add the autocomplete="off" in the form.
For Example:
<form action="/" autocomplete="off">
...
....
...
</form>

When you add, autocomplete=off in form tag, you need need not to add individually for each filed, it will do automatically disabled for each field in the form tag.


Question: Does all browser support autocomplete=off?
Yes, All browser in all OS.




Question: When we add autocomplete=off in text box OR form, Will it disable autocomplete for all users on different browser?
Yes, It will disable the autocomplete for all user whether they are using same OR different browser.


Question: Can we add autocomplete=off with javascript?
Yes, We can try see below example:
HTML Part
<input class="noAutoComplete" type="text" />
Javascript Part
$(function() {
    $('.noAutoComplete').attr('autocomplete', 'off');
});
After adding above JS script, It will stop autocomplete for those text-filed which have class "noAutoComplete".


Thursday 12 March 2015

Web Development Project Manager interview questions and answers

Web Development Project Manager interview questions and answers

Question: What is project management?
Project management is a process in which we manage a project as per availability of Time, Cost, Resource (developer) and scope. The main motive of project management is to complete the client expectation within the availability of time and money.


Question: What is triple constraint triangle in project management?
  • Project cost
  • Project schedule
  • Project scope


Question: How do you handle change request?
If its taking effort of 1/2 hour, we will do for client without change request otherwise.
1. Send the estimation to client
2. Approve the request by client
3. Start the Development Phase


Question: What are the CSFs in the Software project management?
CSFs (critical success factors) for Software project management are below:
  • Change management.
  • Leadership & motivating employees.
  • Team Orientation is crucial.
  • The cost evaluation must be done diligently in the given time frame.
  • Lucidity in communication.



Question: What is DSS?
DSS stands for Decision Support System.



Question: What is the WWWWWHH?
WWWWWHH stands for What, When, Who, Where, How, How Much.
This principle is given by Barry Boehm who suggests an approach that addresses project objectives, scope, schedules, responsibilities, management and technical approaches and required resources.



Question: Describe capability maturity model Integration(CMMI)?
This model is developed by Software Engineering Institute (SEI).
Every level there are some key activities required at different levels of process maturity.



Following are 5 level of capability maturity model Integration (CMMI).
Level 1: Initial.
Level 2: Repeatable.
Level 3: Defined.
Level 4: Managed.
Level 5: Optimizing.


Question: What is software project planning?
  • Scope of the project.
  • Feasibility analysis.
  • Deadline of the project.
  • Estimation of resource cost and schedule.
  • Risk analysis.
  • Overall Budget.


Question: What are the different types of software risk?
  • Project risks
  • Technical risks
  • Business risks


Question: Define CAR and DAR?
CAR - Causal analysis and resolution.
DAR - Decision Analysis and Resolution.



Question: Differentiate between SITP and UTP in testing?
System Integration Test Plan(SITP) - It is performed by the testing team.
Unit Test Plan (UTP) - It is usually performed by the developers.



Question: Define CMMI?
CMMI stands for Capability Maturity Model Integration.


Thursday 5 March 2015

How to create Dynamic XML Sitemap online?

How to create Dynamic XML Sitemap online?

Question: What is XML Sitemap?
An XML sitemap is a document that helps Google, Bing, Yahoo and other search engines for better understanding your website while crawling it. It have all website URLs with updating details of URL.


Queston: Why do you need a Sitemap?
For each website who need traffic from the Search Engines (Google, Yahoo, MSN etc), have to add the XML sitemap in your website.


Question: Sitemap need for New Website only?
No, XML Sitemap should be for New as well as Old website (Need for both type website).


Question: What are Main elements of XML Sitemap?
Element Required? Description
loc Yes Provides the full URL of the page or sitemap, including the protocol (e.g. http, https) and a trailing slash, if required by the site's hosting server. This value must be shorter than 2,048 characters.
lastmod No The date that the file was last modified, in ISO 8601 format. This can display the full date and time or, if desired, may simply be the date in the format YYYY-MM-DD.
changefreq No How frequently the page may change:
  • always
  • hourly
  • daily
  • weekly
  • monthly
  • yearly
  • never
priority No The priority of that URL relative to other URLs on the site. This allows webmasters to suggest to crawlers which pages are considered more important.



 Question: What is Format of XML SiteMap?





<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xsi:schemalocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> <url> <loc>http://example.com/</loc> <lastmod>2006-11-18</lastmod> <changefreq>daily</changefreq> <priority>0.8</priority> </url> </urlset>

Question: What should name of XML Sitemap?
sitemap.xml


Question: Where should I placed the sitemap.xml?
It must be on root folder. So that crawler can easily access it.
For Example.
http://www.web-technology-experts-notes.in/sitemap.xml


Question: From where I can generate sitemap?
http://www.xml-sitemaps.com/


Thursday 26 February 2015

What is UPnP in Skype?



What is UPnP in skype?
UPnP means Universal Plug and Play. UPnP is program that automatically connect to the router and set the ports automatically without you having to do it setup up port manually.
For more information: http://en.wikipedia.org/wiki/Universal_Plug_and_Play


What does enable UPnP do in skype?
If we check the checkbox in front of UPnP, It means we have enabled the UPnP.
When we enable the UPnP, It will connect to the router and set the port automatically.


What does disable UPnP do in skype?
If we un-check the checkbox in front of UPnP, It means we have disabled the UPnP.
When we disabled the UPnP, It will not connect to the router and never the port automatically.


Wednesday 25 February 2015

How to delete Content of File in windows and unix?


Sometimes there are need to empty a file without opening the file. We can do the same with following two methods.

Method 1.
Delete the file and re-create the file with same name and extension.


Method 2.
Follow the simple steps.
1. Press window+R
2. Type the cmd and press enter key.
3. Now you are not window command prompt area.
4. Go to the same folder where file exits to delete the content.
5. Type the following command (replace the demo.txt with your file name)
 copy /y nul demo.txt
6. Now check its empty.



Question: How to delete the content of file in Unix?
Following are three different way, choose which suites to you.
cp /dev/null filename.txt
touch filename.txt
truncate -s 0 filename.txt



Monday 19 January 2015

Difference between SSL and HTTPS


Difference between SSL and HTTPS

Today, We all do the online shopping, money transfer, different types of recharge (Mobile/DTH etc) and login to bank website etc. These all action are done on web browser (like google chrome, mozilla, internet explorer etc). When we are doing online stuff, its very necesary that the website we are using is 100% secure, So you must do online stuff when your website page start with https, like https://gmail.com.

There are two protocols (SSL and Https) which secure our online transactions. SSL and HTTPS can be seen as complementary rather than competing. Both protocols (SSL and HTTPS) works for security at different leavel and have been approved by the Internet Engineering Task Force (IETF) as a standard.


Following are main Difference between SSL and HTTPS:


S.No SSL HTTPS
1 Full form of Secure Sockets Layer Full form of HTTPS is HyperText Transfer Protocol Secure.
2 SSL is Transport layer protocol. HTTPS is application layer protocol.
3 Encryption by SSL is application-independent. Encryption by SSL is application-dependent.
4 Cryptographic Protocol that is used to provide security for the communications over the internet. HTTPS is a protocol created by combining HTTP and SSL/TLS to provide security for the communications over the internet.
5 HTTPS is less flexible as compare to HTTPS HTTPS is more flexible







Wednesday 14 January 2015

SPDY Protocol - Improve the Speed of web page

SPDY Protocol - Improve the Speed of web page

SPDY (pronounced as speedy) is an application-layer protocol developed at Google for transporting web content.
It is not replacement of HTTP. Just modifies the way HTTP requests and responses are sent over the wire.


Why it is used?
SPDY is used to reduce the load time of web page by multiplexing and compresion.


What are problem with HTTP?
  • HTTP does not have multiplexing HTTP pipelining is susceptible to head of line blocking verbose headers Requirement to use SPDY.
  • SPDY requires the SSL/TLS (with TLS extension ALPN required).



How its works?
When request sent over SPDY, HTTP requests are processed, tokenized, simplified and compressed.
SPDY prioritizing and multiplexing the transfer of web page so that only one connection per client is required.


How it reduced the load time of website?
  • Avoid multiple request by concatenate the JS, CSS files
  • Image spriting
  • Resource inlining
  • It simplified and compress the request.



Who Use/Support the SPDY?
  • Firefox supports SPDY 2 from version 11.
  • Opera browser added support for SPDY as of version 12.10.
  • Internet Explorer 11 added support for SPDY version 3.
  • Google Chrome/Chromium
  • Amazon's Silk browser for the Kindle Fire uses the SPDY protocol to communicate
  • Facebook Makes Itself a Bit More SPDY


See Features of SPDY http://www.chromium.org/spdy/spdy-whitepaper

Friday 3 October 2014

Difference Between Hadoop and Big-Data

Difference Between Hadoop and Big-Data


Big data is a term, everything where you stored lots of data which is unstructured is bigdata. For example computer hard drive where we put movies, songs, excel file, doc file, application file and reports in just one folder.

Big data is simply the large sets of data that business person and other parties put together to serve specific goals and operations. Big data can include many different kinds of data in many different kinds of formats.

Big data is just a storage system where we stored millons of millions files.




Hadoop: It is open-source software framework for storage and large-scale processing of data-sets based on mapReduce. MapReduce splits big Data over several nodes in order to achieve a parallel computing.

Hadoop is software program which works on big data to provide you useful information.

Hadoop is just a software which filter the required information from tons of information.

Hadoop Interview Questions And Answers