Tuesday, 17 July 2018

Styling with CSS3 - Most Popular Question & Answers 13

1. Which feature enables easy identification of corresponding style element?
Ans: Selectors

2. Which feature uses :: (double colon)?
Ans: Pseudo-Elements

3. Which selector matches the name of any element type?
Ans: The Universal Selector

4. What is best way to overcome the default settings that comes with CSS?
Ans: create reset.css in-addition to your existing css

5. Applying style to a single specific HTML element can be best achieved through ________ type selector.
Ans: ID

6. The __________ pseudo-class can be used in a style rule to change the appearance of links that the visitor has already clicked.
Ans: Visited

7. The __________ attribute can be added to most (X)HTML elements to identify the element as belonging to a group of elements within an (X)HTML document
Ans: class

8. In selectors, which one should not be used across for multiple tags?
Ans: id

9. Pseudo elements help in providing
Ans: special effects to some selectors

10. An element with position: fixed; is positioned relative to ____
Ans: the viewport.

11. An element with greater stack order is always in
Ans: front of an element with a lower stack order

12. ______ position elements don't move when the visitor scrolls the browser window up or down.
Ans: Fixed

13. The z-index property in CSS controls
Ans: Vertical stacking order of elements that overlap

14. HTML elements are positioned ___________ by default.

Ans: Static

15. Stacking context is

Ans: three-dimensional conceptualization of HTML elements along an imaginary z-axis.

16. Which snippet of CSS is commonly used to center a website horizontally

Ans: margin: 0 auto;

17. z-index only effects elements that have a position value other than

Ans: Static

18. Which of the following is the value of overflow property?

Ans: hidden, intial, scroll

19. An element with position: relative; is positioned relative to

Ans: its normal position.

20. If only one value is specified to border radius property,

Ans: This radius will be applies to all four corners

21. Which of the following is correct about Hex Code format of CSS colors?

Ans: All the options [First 2 digits red(RR), next 2 digits green(GG), last 2 digits blue(BB)]

22. Identify True or False - Lower the opacity value, the more opaque it is

Ans: False

23. Alpha channel in RGBA specifies the

Ans: Opacity of the object

24. Opacity has a default initial value of

Ans: 1

25. Opacity is not inherited. Is this correct ?

Ans: True

26. The transform-style property value flat

Ans: Specifies that child elements will not preserve its 3D position

27. Using negative values in transforms will rotate the element

Ans: Counter-clockwise

28. Transformation is an effect that lets an element change its __

Ans: Shape, Position, Size

29. CSS3 transforms allow you to _____________ elements

Ans: All the options [Rotate, Skew, Translate]

30. matrix(n,n,n,n,n,n)

Ans: Defines a 2D transformation, using a matrix of six values

31. 3D transform property is animatable. Is this true ?

Ans: False

32. rotateX(angle)

Ans: Defines a 3D rotation along the X-axis

33. The not keyword cannot be used to negate an individual feature query, only an entire media query

Ans: True

34. In video player, if the max-width property is set to 100%, __________

Ans: the video player will scale down if it has to, but never scale up to be larger than its original size

35. A responsive grid-view often has

Ans: 12 columns, and has a total width of 100%

36. @media includes a block of CSS properties only if a certain condition is true.

Ans: Yes

37. The ________ operator is used for combining multiple media features together into a single media query

Ans: and

38. Identify the animation Property

Ans: All the options [@keyframes',animation-name,animation-duration]

39. HTML elements are positioned ____ by default.

Ans: static

40. External Style sheets can contain HTML Tags?

Ans: false

41. The amount of space between letters can be specified using the ________ property in a style rule.


Ans: letter-spacing

42. What is "hgroup"?


Ans: HTML element for group of related headlines

43. An external style sheet may be linked to a HTML document through which element?


Ans: HTML Link ( tag in HTML)

44. Inline CSS uses which attribute of the HTML element?

Ans: style

45. To make the width of a table adjust to the current width of the viewer's browser window, you should specify a table width of _________


Ans: 100%
46. Opacity is inherited. State true or false.

Ans: False

47. In selectors, which one should not be used across for multiple tags?

Ans: id

48. Style tag is placed ___

Ans: In Document Head

49. The ________ attribute can be added to most (X)HTML elements to identify the element as belonging to a group of elements within an (X)HTML document.

Ans: class

50. How do you display hyperlinks without an underline





Ans: a {text-decoration:none}

51. The style element present within the head of HTML is called as _________





Ans: Inline

52. How do you make each word in a text start with a capital letter?






Ans: text-transform:capitalize

53. When a visitor clicks the submit button in a form, the ______ of each form element is sent






Ans: text-transform:capitalize
If you have more collection of questions?? or If you find any wrong answers from the above?? Feel free to comment below.

Sunday, 15 July 2018

AWS Essentials - Most Popular Questions & Answers 19

1. The committee which designs the standards & characteristics for the cloud computing is
Ans: NIST

2. I have some private servers on my premises, also I have distributed some of my workload on the public cloud, what is this architecture called?
Ans: hybrid cloud

3. Developers and organizations all global around the world leverage ______ extensively
Ans: paas

4. Cloud-computing providers offer their services as ______________
Ans: Iaas, paas, saas

5. The _____ services mixes the simplicity of ________ with the power of _____, to great effect.
Ans: paas, saas, iaas

6. Does Stopping and Terminating instances have same effect?
Ans: False

7. All Amazon services supports region?
Ans: False

8. What are the measures to be taken to ensure maximum availability?
Ans: autoscalling

9. Which is more secure?
Ans: vpc security group

10. How can you integrate IAM with data centers security?
Ans: SAML

11. What does ARN stand for?
Ans: amazon resource name

12. Route S3 can be used to route users to infrastructure outside of AWS
Ans: True

13. Difference between instance store and EBS
Ans: Once the instance is stopped and started, the data in instance storage is lost. Whereas, the data in EBS persists.

14. What is the maximum length of a file name in S3?
Ans: UTF-8 1024 bytes long

15. In S3, what does RRS stand for?
Ans: Reduced Redundancy Storage

16. What does S3 stand for?
Ans: Simple Storage Service

17. When to choose C4 instances?
Ans: High compute and Moderate Memory footprint

18. EC2 stands for
Ans: Elastic Compute Cloud

19. Which of the following is not true about Glacier
Ans: Services enables rapid disaster recovery

20. How will you secure the data at rest in EBS?
Ans: restrict access using IAM that prevents write operations to the EBS

21. Objects in S3 can be delivered through Amazon CloudFront
Ans: True

22. How do you access data on Elastic block storage?
Ans: only from an EC2

23. What’s the maximum size of the S3 bucket?
Ans: 5TB

24. Which AWS services will you use to collect and process e-commerce data for near real-time analysis?
Ans: Both DynamoDB & Redshift

25. Only 1024 objects can be placed on S3 bucket?
Ans: False

26. Amazon S3 is a?
Ans: Key-Based object store

27. What is an AMI?
Ans: Amazon Machine Image

28. You are using an S3 bucket through which you are running a photo sharing website. It is found that some of other sites owners also using you bucket URL and causing a loss to you business. How will you protect your buckets content from unauthorized usage?
Ans: Utilize bucket polices, ACLs, and user policies

29. What are the uses of Amazon Glazier?
Ans: access infrequent data and archive data

30. Why do you make subnets?
Ans: To efficiently utilize networks that have a large no. of hosts

31. What metrics can be monitored through cloudwatch without being charged?
Ans: disk, CPU, data transfer

32. Autoscaling is enabled through
Ans: cloudWatch

33. Amazon CloudFormation is a?
Ans: Deployment and management service

34. Which service in AWS allows you to create and delete stacks of AWS resources which are defined in templates?
Ans: cloudFormation

35. Which of the following is not true about Elastic Load Balancing
Ans: Can be enabled only in a single availability zone

36. Which of these services will help in better availability______?
Ans: SNS and SES

37. Which of these services are used to distribute content to end users using a global network of edge locations?
Ans: Route 53

38. You are serving content from CloudFront. Which of the following happens to an end user's request?
Ans: The user's request is routed to the nearest edge location

39. Which of the following is not correct about CloudFront?
Ans: CloudFront cannot serve content from a non AWS origin server

40. How can you restrict the access to the contents delivered in cloudfront?
Ans: Origin access identity

41. A highly available and scalable domain name system web service
Ans: Amazon Route 53

42. What happens when content is not present at an edge location and a request is made to it?
Ans: CloudFront delivers the content directly from the origin server and stores it in the cache of the edge location

43. Which of these services are used to distribute content to end users using a global network of edge locations?
Ans: cloudFront

44. What’s the maximum size of the S3 bucket?
Ans: 5TB

45. If I want my instance to run on a single-tenant hardware, which value do I have to set the instance’s tenancy attribute to?
Ans: Dedicated

46. When you need to move data over long distances using the internet, for instance across countries or continents to your Amazon S3 bucket, which method or service will you use?
Ans: Amazon Transfer Acceleration

47. Service that connects on-premises software appliances with cloud based storage
Ans: AWS Storage Gateway

48. When will you incur costs with an Elastic IP address (EIP)?
Ans: When it is allocated and associated with a stopped instance.


If you have more collection of questions?? or If you find any wrong answers from the above?? Feel free to comment below.

Azure Essentials - Most Popular Questions & Answers 45

1. Azure is Microsoft’s ___________ as a Service Web hosting service.
Ans: Infrasturcture
2. When using Azure Resource Manager, you can use a _______________ for deployment, which can build identical environments for different work scenarios such as testing, staging, and production. 
Ans: Template
3. Which one of the following serives is a NoSQL datastore? 
Ans: Tables
4. If you have to replace your current on-premise services in the form of virtual machines, then you can use Microsoft Azure cloud categorized as ____________. 
Ans: IAAS
5. You can view the latest data center map and Pay as You Go subscription information in (the) ________? 
Ans: Azure Dash Board
6. In which operating system, we can use Azure PowerShell? 
Ans: Windows OS
7. Which cloud offering focuses on the consumption of services? 
Ans: SaaS
8. Which of the following is the older service management model, where cloud services contain your cloud resources? 
Ans: Classic Portal
9. The new Azure Portal is accessed using ___________.   
Ans: https:\\portal.azure.com
10. Which Azure networking component is the core unit from which administrators can have full control over IP address assignments, name resolution, security settings, and routing rules? 
Ans: Virtual Networks (VNETs)
11. Which connection configuration offers faster speeds, higher security, lower latencies and higher reliability? 
Ans: ExpressRoute
12. When should you use a static IP address? 
Ans: DNS Server
13. A subnet is a range of IP addresses in a 
Ans: VNet
14. Default Private IP address allocation method is _________. 
Ans: dynamic
15. ___is used to route the traffic between virtual machines inside your pirvate virtual network. 
Ans: Azure Internal Load Balancers
16. The smallest recommended virtual machine size in Azure for a production environment is 
Ans: A1
17. You can estimate costs you will incur on Azure by using which tool 
Ans: Pricing Calculator
18. You need to deploy a virtual machine on Azure with a low memory entry level requirement. Which virtual machine sizes should you consider choosing? 
Ans: Basic_A0- Basic_A4
19. To how many resource groups can a resource be added 
Ans: 1
20. Which of the following Windows Server roles is not supported on Azure Virtual Machines 
Ans: Hyper-v
21. Most types of resource can be moved to a different resource group at 
Ans: Anytime
22. Which of the following helps Azure maintain high availability and fault tolerance when deploying and upgrading applications.
Ans: Availability set
23. Azure supports both .vhd and .vhdx file formats for Virtual Machines. 
Ans: False
24. Azure Virtual Machines only support VM's running Microsoft Windows operating system. 
Ans: False
25. The VM size determines the number of __________. 
Ans: Nic
26. Which type of storage offering uses SSDs and is intended for use with Virtual machines 
Ans: Premium
27. Geo Redundancy is to provide high availability in ________. 
Ans: Geographically
28. What type of storage account is backed by magnetic drives and provides the lowest cost per GB 
Ans: Standard
29. Premium storage disks for virtual machines support up to 64 TBs of storage 
Ans: True
30. If you choose this redundancy strategy, you cannot convert to another redundancy strategy without creating a new storage account and copying the data to the account. 
Ans: ZRS
31. Geo-replication is enabled by default in Windows Azure Storage 
Ans: Yes
32. In which type of Storage replication, data is not replicated across multiple datacenters? 
Ans: LRS
33. The maximum size for a file share is 5 TBs. 
Ans: True
34. Your Azure storage account is always replicated to ensure durability and high availability. By default, which of the following replications schemes is used? 
Ans: RA-GRS
35. You add a data disk to an Azure virtual machine. What drive type is created? 
Ans: SCSI
36. Is it possible to create a custom Domain name, or use your organizations domain name, such as fresco.com, in Azure Active Directory? 
Ans: True
37. Microsoft Azure Active Directory can be integrated with on-premises Active Directory to allow single sign-on. 
Ans: True
38. Which of the following individual components are included on HDInsight clusters 
Ans: Spark
39. Which of the following is also known as Compute 

Ans: Set of virtual machine instances
40. Which of the following is a worldwide content caching and delivery system for Windows Azure blob content 
Ans: CDN
41. Microsoft and Hortonworks joined their forces to make Hadoop available on ___________ for on-premise deployments
Ans:
Windows Server
42. The connection between storage and Microsoft’s CDN (Content Delivery Network) is stated to be at least _______ percent available
Ans: 99.9
43. Azure Storage plays the same role in Azure that ______ plays in Amazon Web Services. 
Ans: S3
44. What’s the maximum bandwidth provided by ExpressRoute? 
Ans: 10 Gbps

45. What is the format of an Azure Resource Template? 

Ans: JSON

46. Azure data is replicated ________ times for data protection and writes are checked for consistency.

Ans: Three


If you have more collection of questions?? or If you find any wrong answers from the above?? Feel free to comment below.



Saturday, 17 February 2018

Solution: How to get single column value returning from mysql function 1

Are you using MySQL function? Is it returning any single value? Then you may confused, how to get that value from record set after executing query. You will get idea after reading this detailed post.

Okay... Let we write one simple function named mytest(), and make it returns TRUE. Then we will see how to get and assign that TRUE to our server side script variable. 
DELIMITER $$
CREATE  FUNCTION `mytest`() RETURNS char(100) CHARSET utf8
BEGIN
RETURN 'TRUE';

END$$
DELIMITER ;
To run this function we need to use this below query.
SELECT mytest();
After running this query, We will get an out put like this below screenshot.

MySQL function return




So, We can't consider mytest() as column name when your are trying to get the value TRUE from returned record set because of that parenthesis. Correct?

To solve this we are just going to assign Alice name to that function.
SELECT mytest() AS returnval;
After running this query, We will get an out put like this below screenshot.





Now, We can use returnval as a column name and we can able to get it's value TRUE from returned record set.

Have any doubt??? Feel free to comment here!!!

Saturday, 13 May 2017

Add number of days to a Date in javascript 2

Problem:

Add number of days to a Date in javascript / Add number of days to current date in javascript

Solution:

To add number of days to a Date, we need to convert our date string to a date object. Here we are going to use javascript inheritance property (prototype) to do that.

Actual function :

Date.prototype.addDays = function(days){
     return new Date(this.getTime()+days*24*60*60*1000);
 }
In this function we are going to convert days to milliseconds using days*24*60*60*1000 and adding to our date object.

Code usage :

var ourDate = new Date('2014','11','12');
/*for current date just use below line of code instead of above line
var ourDate = new Date();
*/
//Now we are going to add 100 days to our date object.
var futureDate = ourDate.addDays(100);