Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

May 12, 2022

Top 20 AWS Cloud9 Interview Questions and Answers


                AWS Cloud9 is a browser-based integrated development environment (IDE) that allows you to write, run, and debug code. A code editor, debugger, and terminal are all included. Cloud9 is pre-installed with key tools for major programming languages such as JavaScript, Python, PHP, and more, so you don't have to install files or setup your development workstation to get started. Because your Cloud9 IDE is cloud-based, you may work on your projects from any internet-connected machine, including your office, home, or anyplace else. Cloud9 also offers a smooth development experience for serverless apps, allowing you to simply define resources, debug, and switch between local and remote execution. You can share your development environment with your team fast with Cloud9, allowing you to pair programme and track each other's inputs in real time.


Amazon Athena Interview Questions and Answers


Ques. 1): How can I begin using AWS Cloud9?

Answer:

You can choose AWS Cloud9 from the AWS Management Console after logging in. The console will walk you through the options for choosing a Linux server to connect to Cloud9. In a few simple steps, you may either create a new Amazon EC2 instance (AWS Cloud9 EC2 environment) or connect your current Linux server (AWS Cloud9 SSH environment). You may access your IDE and write code in a fully configured development environment once you've created a Cloud9 environment.


AWS GuardDuty Questions and Answers


Ques. 2): Who should utilise Amazon Web Services Cloud9?

Answer:

AWS Cloud9 is available to everyone who writes code. Cloud9 provides instant access to a fully configured development environment in their browsers with preloaded runtimes, package managers, and debugging tools for those developing apps in Node.js (JavaScript), Python, PHP, Ruby, Go, and C++. Cloud9 allows you to access your work environment from any internet-connected computer, removing the need for a dedicated development machine.

AWS Cloud9 provides convenient access to their AWS resources via a preset AWS Command Line Interface (AWS CLI), ready to perform commands against AWS services, for AWS developers and those assessing new AWS services. Cloud9 has built-in tools for creating, editing, running, debugging, and deploying Lambda functions for those developing serverless apps on AWS Lambda using Node.js or Python.


AWS CloudFormation Interview Questions ans Answers


Ques. 3): What kinds of AWS Cloud9 development environments are there?

Answer:

You can use one of two types of AWS Cloud9 setups.

AWS Cloud9 EC2 environment — Allows you to create a new Amazon EC2 instance with Cloud9. These instances are set to terminate 30 minutes after you close the IDE and start immediately when you open it.

SSH environment on AWS Cloud9 — Allows you to join an existing Linux server to Cloud9. On the Linux server that you intend to use with Cloud9 SSH environments, certain requirements are required.


AWS(Amazon Web Services) Interview Questions and Answers


Ques. 4): What is AWS Cloud9, exactly?

Answer:

AWS Cloud9 is a browser-based integrated development environment (IDE) that allows you to write, run, and debug code. It combines code completion, hinting, and step-through debugging with access to a full Linux server for running and storing code.


AWS Cloud Interview Questions and Answers


Ques. 5): How can I execute my code?

Answer:

The AWS Cloud9 IDE has a run button in the toolbar as well as built-in runners for over 10 languages that will immediately start your application with the most recent code modifications. You can also alter current runners, develop your own runners, or run your code from the terminal if you want complete control over how your product is run.


AWS RedShift Interview Questions and Answers


Ques. 6): How much does AWS Cloud9 cost?

Answer:

AWS Cloud9 comes at no additional cost. You only pay for the compute and storage resources (i.e., an EC2 instance, an EBS volume) that are utilised to run and store your code if you use an Amazon EC2 instance for your AWS Cloud9 development environment. For no additional price, you can connect your Cloud9 development environment to an existing Linux server (e.g., on-premises server) through SSH.


AWS Cloud Practitioner Essentials Questions and Answers


Ques. 7): What is the best way to use AWS Cloud9 with AWS CodeStar?

Answer:

You can start modifying and committing your CodeStar project code in the Cloud9 IDE right away after launching AWS Cloud9 environments from AWS CodeStar. Any code changes you commit to your project source repository from Cloud9 are compiled and deployed automatically using CodeStar's tools.


AWS EC2 Interview Questions and Answers


Ques. 8): What resources does AWS Cloud9 create for Amazon EC2 environments?

Answer:

AWS Cloud9 creates the needed computation and storage resources in your AWS account when you create an Amazon EC2 environment. An Amazon EC2 instance, an Amazon Elastic Block Store (EBS) volume of 8 GB, an Amazon EC2 security group, and an AWS CloudFormation stack are among the resources. These resources are accessible through the different AWS service consoles. Cloud9 automatically deletes these resources when you erase your environment.


AWS Lambda Interview Questions and Answers


Ques. 9): What is the location of my code on AWS Cloud9?

Answer:

Code files, packages, and dependencies are all kept in your resources in your AWS Cloud9 environment. Your data is stored in the appropriate Amazon Elastic Block Store (EBS) volume in your AWS account if you use an EC2 environment. Your data is saved locally on your Linux server if you use an SSH environment.


AWS Cloud Security Interview Questions and Answers


Ques. 10): How can I use AWS Cloud9 to construct serverless applications for AWS Lambda?

Answer:

The AWS Resources panel in the IDE contains the built-in tools for AWS Lambda. These utilities can be used to import or generate Lambda functions in Node.js and Python. These routines can be quickly launched, previewed, debugged, and deployed right from the IDE. The AWS Serverless Application Model (AWS SAM) framework is also supported by AWS Cloud9. You may now handle many Lambda functions and serverless resources in your application with ease. If you used AWS CodeStar to provide your project, any changes you make to it will be built and sent to Lambda using git push.


AWS Simple Storage Service (S3) Interview Questions and Answers


Ques. 11): Is it possible to modify the instance type of an Amazon EC2 environment that already exists?

Answer:

Yes. With your AWS Cloud9 environment, you can change the Amazon EC2 instance type you previously selected. To do so, go to the EC2 console and locate your instance, then follow the procedures in the Amazon EC2 documentation.


AWS Fargate Interview Questions and Answers


Ques. 12): Can I use AWS Cloud9 to test my AWS Lambda functions locally?

Answer:

Yes. AWS Cloud9 can run your Node.js and Python functions locally in the IDE, simulating the AWS Lambda execution environment. This allows you to step-through debug your serverless applications without having to upload your changes to Lambda. You may also deploy your application modifications to Lambda directly from the IDE once they've been tested.


AWS SageMaker Interview Questions and Answers


Ques. 13): What are the supported programming languages?

Answer:

Node.js (JavaScript), Python, PHP, Ruby, Go, and C++ are among the programming languages supported by AWS Cloud9. It supports several major programming languages and offers features including syntax highlighting, outline view, code hinting, code completion, application runners, and step-through debugging.


AWS DynamoDB Interview Questions and Answers


Ques. 14): How do I make changes to my code?

Answer:

Auto-completion, code folding, hinting, syntax highlighting, and line manipulation are all included in the AWS Cloud9 IDE's powerful code editor. You can choose from over 30 colour schemes in the code editor to manage syntax highlighting and the UI. You may also update your CSS to completely personalise the Cloud9 UI.


AWS Cloudwatch interview Questions and Answers


Ques. 15): Is AWS Cloud9 capable of managing resources developed in Amazon EC2 environments?

Answer:

Cloud9 can not only create and delete your AWS Cloud9 EC2 environment resources on your behalf, but it can also start and stop the EC2 instances automatically to save you money. All other administration chores on these resources are your responsibility, including installing software patches on your EC2 instances and backing up your EBS volumes.


AWS Elastic Block Store (EBS) Interview Questions and Answers


Ques. 16): How do I access AWS services from AWS Cloud9?

Answer:

AWS Cloud9 EC2 environments come preinstalled with the AWS CLI, which is authenticated with the permissions of the logged-in AWS user automatically. This enables you to run interactive CLI commands against AWS services from the built-in terminal window in Cloud9 without any additional configuration.


AWS Amplify Interview Questions and Answers


Ques. 17): In AWS Cloud9 environments, are my Amazon EC2 instances always active?

Answer:

No. For Amazon EC2 instances created with AWS Cloud9, the default auto-hibernation option is 30 minutes. Your EC2 instances will automatically halt 30 minutes after you close the IDE and resume only when you reopen it with this option. As a result, EC2 instance charges are often only incurred when you are actively working. When your instance needs to be restarted, you lose any open terminal sessions in the IDE and may have to wait a bit to open it. You can modify the auto-hibernation setting and even choose to keep your EC2 instance "always on" depending on your use case.


AWS Secrets Manager Interview Questions and Answers


Ques. 18): On AWS Cloud9 EC2 setups, what tools and packages are preinstalled?

Answer:

AWS Cloud9 EC2 setups provide popular development tools like Git and Docker preinstalled. Many popular programming languages, such as Node.js and Python, have language runtimes and package managers.


AWS Django Interview Questions and Answers


Ques. 19): What is the best way to share my AWS Cloud9 installation with others?

Answer:

Click the Share button in the top right corner of your IDE to share your AWS Cloud9 environment. The AWS Identity and Access Management (IAM) user name and desired access levels for the individual with whom you want to collaborate are requested. Once you've entered these details, both participants can use the environment for real-time collaboration on IDE features and command line sessions.


AWS Cloud Support Engineer Interview Question and Answers


Ques. 20): What are the steps for connecting to source control management systems?

Answer:

You may use the same command line tools on your local PC to access your source control system by opening the terminal window within the IDE. Git is preinstalled on AWS Cloud9 EC2 environments, making it easy to retrieve your source code.


AWS Solution Architect Interview Questions and Answers


More on AWS:


AWS AppSync Interview Questions and Answers


AWS Glue Interview Questions and Answers


AWS Cloud Interview Questions and Answers


AWS VPC Interview Questions and Answers         


AWS DevOps Cloud Interview Questions and Answers


AWS Aurora Interview Questions and Answers


AWS Database Interview Questions and Answers


AWS ActiveMQ Interview Questions and Answers


AWS Control Tower Interview Questions and Answers


AWS Lake Formation Interview Questions and Answers


AWS Data Pipeline Interview Questions and Answers


Amazon CloudSearch Interview Questions and Answers 


AWS Transit Gateway Interview Questions and Answers


Amazon Detective Interview Questions and Answers


Amazon EMR Interview Questions and Answers


Amazon OpenSearch Interview Questions and Answers

 



December 02, 2019

Top 20 PHP Interview Questions and Answers



Ques: 1) What is CAPTCHA?

Answer: 

CAPTCHA stands for Completely Automated Public Turing Test to tell Computers and Humans Apart. To prevent spammers from using bots to automatically fill out forms, CAPTCHA programmers will generate an image containing distorted images of a string of numbers and letters. Computers cannot determine what the numbers and letters are from the image but humans have great pattern recognition abilities and will be able to fairly accurately determine the string of numbers and letters. By entering the numbers and letters from the image in the validation field, the application can be fairly assured that there is a human client using it.

 

BlockChain interview Questions and Answers

 

Ques: 2) What is meant by urlencode() and urldecode()?

Answer:

string urlencode(str)

When str contains a string like this “hello world” and the return value will be URL encoded and can be use to append with URLs, normally used to append data for GET like someurl.com?var=hello%world

string urldocode(str)

This will simple decode the GET variable’s value. Example: echo (urldecode($_GET_VARS[var])) will output “hello world”

 

C language Interview Questions and Answers

 

Ques: 3) What is difference between mysql_fetch_array(), mysql_fetch_row() and mysql_fetch_object()?

Answer:

mysql_fetch_array - Fetch the all matching records of results.

mysql_fetch_object - Fetch the first single matching record of results.

mysql_fetch_row - fetches a result row as array.

 

C++ language Interview Questions and Answers

 

Ques: 4) What is difference between srand & shuffle?

Answer:

The srand function seeds the random number generator with seed and shuffle is used for shuffling the array values.

shuffle - This function shuffles (randomizes the order of the elements in) an array. This function assigns new keys for the elements in array. It will remove any existing keys you may have assigned, rather than just reordering the keys.

srand - Seed the random number generator

 

Machine Learning Interview Questions and Answers

 

Ques: 5) How do you capture audio/video in PHP?

Answer:

You need a module installed - FFMPEG. FFmpeg is a complete solution to record, convert and stream audio and video. It includes libavcodec, the leading audio/video codec library. FFmpeg is developed under Linux, but it can be compiled under most operating systems, including Windows.

 

MySQL Interview Questions and Answers

 

Ques: 6) What's the difference between COPY OF A FILE & MOVE_UPLOAD_FILE in file uploading?

Answer:

Move: This function checks to ensure that the file designated by filename is a valid upload file (meaning that it was uploaded via PHP's HTTP POST upload mechanism). If the file is valid, it will be moved to the filename given by destination.

If filename is not a valid upload file, then no action will occur, and move_uploaded_file() will return FALSE.

Copy: Makes a copy of a file. Returns TRUE if the copy succeeded, FALSE otherwise.

 

PowerShell Interview Questions and Answers

 

Ques: 7) What is the difference between echo and print?

Answer:

Main difference between echo() and print() is that echo is just an statement not a function and doesn't return's value or it just prints a value whereas print() is an function which prints a value and also it returns value.

We cannot pass arguments to echo since it is just a statement whereas print is a function and we can pass arguments to it and it returns true or false. print can be used as part of a more complex expression whereas echo cannot. echo is marginally faster since it doesn't set a return value.

 

Python Interview Questions and Answers

 

Ques: 8) What is the difference between require() and include()?

Answer:

Both of these constructs includes and evaluates the specific file. The two functions are identical in every way except how they handle failure. If filepath not found, require() terminates the program and gives fatal error, but include() does not terminate the program; It gives warning message and continues to program.

include() produces a Warning while require() results in a Fatal Error if the filepath is not correct.

 

Python Pandas Interview Questions and Answers


Ques: 9) How do we know properties of the browser?

Answer:

You can gather a lot of information about a person's computer by using $_SERVER['HTTP_USER_AGENT']. This can tell us more about the user's operating system, as well as their browser. For example I am revealed to be Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/418 (KHTML, like Gecko) Safari/417.9.3 when visiting a PHP page.

This can be useful to programmers if they are using special features that may not work for everyone, or if they want to get an idea of their target audience. This also is important when using the get_browser() function for finding out more information about the browser's capabilities. By having this information the user can be directed to a version of your site best suited to their browser.

get_browser() attempts to determine the capabilities of the user's browser. This is done by looking up the browser's information in the browscap.ini file.

echo $_SERVER['HTTP_USER_AGENT'] . "<hr />\n";

$browser = get_browser();

foreach ($browser as $name => $value)  { echo "<b>$name</b> $value <br />\n";

 }

 

SQL Server Interview Questions and Answers

 

Ques: 10) What is difference between require_once(), require(), include(). Because all these function are used to call a file in another file.

Answer:

Difference between require() and require_once(): require() includes and evaluates a specific file, while require_once() does that only if it has not been included before (on the same page).

So, require_once() is recommended to use when you want to include a file where you have a lot of functions for example. This way you make sure you don't include the file more times and you will not get the "function re-declared" error.

Difference between require() and include() is that require() produces a FATAL ERROR if the file you want to include is not found, while include() only produces a WARNING.

There is also include_once() which is the same as include(), but the difference between them is the same as the difference between require() and require_once().

 

Unix interview Questions and Answers

 

Ques: 11) What are the different types of errors in PHP?

Answer:

1. Notices: These are trivial, non-critical errors that PHP encounters while executing a script - for example, accessing a variable that has not yet been defined. By default, such errors are not displayed to the user at all - although you can change this default behavior.

2. Warnings: These are more serious errors - for example, attempting to include() a file which does not exist. By default, these errors are displayed to the user, but they do not result in script termination.

3. Fatal errors: These are critical errors - for example, instantiating an object of a non-existent class, or calling a non-existent function. These errors cause the immediate termination of the script, and PHP’s default behavior is to display them to the user when they take place.

 

C# Language Interview Questions and Answers

 

Ques: 12) How to Create a Cookie & destroy it in PHP?

Answer:

setcookie(”variable”,”value”,”time”);

variable - name of the cookie variable variable - value of the cookie variable time - expiry time

Example: setcookie(”test”,$i,time()+3600);

Test - cookie variable name

$i - value of the variable ‘Test’ time()+3600 - denotes that the cookie will expire after an one hour.

Destroy a cookie by specifying expiry time

Example: setcookie(”test”,$i,time()-3600); // already expired time

Reset a cookie by specifying its name only

setcookie(”test”);

 

CSS (Cascading Style Sheets ) Interview Questions and Answers

 

Ques: 13) What is the difference between the functions unlink and unset?

Answer:

unlink is a function for file system handling. It will simply delete the file in context. unset will set UNSET the specified variable.

unlink is used to delete a file. unset is used to destroy an earlier declared variable.

 

Robotic Process Automation(RPA) Interview Questions and Answers

 

Ques: 14) How do you know (status) whether the recipient of your mail had opened the mail i.e. read the mail?

Answer:

Embed an URL in a say 0-byte image tag may be the better way to go. In other word, you embed an invisible image on you html email and when the src URL is being rendered by the server, you can track whether your recipients have view the emails or not.

 

UX Design Interview Questions and Answers

 

Ques: 15) What is difference between mysql_connect and mysql_pconnect?

Answer:

mysql_connect opens up a database connection every time a page is loaded. mysql_pconnect opens up a connection, and keeps it open across multiple requests.

mysql_pconnect uses less resources, because it does not need to establish a database connection every time a page is loaded.

 

Docker Interview Questions and Answers

 

Ques: 16) What do you need to do to improve the performance (speedy execution) for the script you have written?

Answer:

If your script is to retrieve data from Database, you should use "Limit" syntax. Break down the non dynamic sections of website which need not be repeated over a period of time as include files.

 

Google Cloud Computing Interview Questions and Answers

 

Ques: 17) How do you insert single & double quotes in MySQL db without using PHP?

Answer: 

By using &amp; / &quote;

Alternately, escape single quote using forward slash \' . In double quote you don't need to escape quotes. Insert double quotes as "".

 

Azure Interview Questions and Answers

 

Ques: 18) What is the difference between strstr & stristr?

Answer:

For strstr, the syntax is: string strstr(string $string,string $str ); The function strstr will search $str in $string. If it finds the string means it will return string from where it finds the $str upto end of $string.

For Example:

$string = "http://yahoomail.com"; $str="yahoomail";

The output is "yahoomail.com". The main difference between strstr and stristr is of case sensitivity. The former consider the case difference and later ignore the case difference.

 

Linux Interview Questions and Answers

 

Ques: 19) What is the difference between explode and split?

Answer:

Split function splits string into array by regular expression. Explode splits a string into array by string.

For Example:

explode(" and", "India and Pakistan and Srilanka"); split(" :", "India : Pakistan : Srilanka");

Both of these functions will return an array that contains India, Pakistan, and Srilanka.

 

Data Science Interview Questions and Answers

 

Ques: 20) How can you avoid execution time out error while fetching record from MySQL?

Answer:

set_time_limit -- Limits the maximum execution time

For Example:

set_time_limit(0);

If you set to 0 you say that there is not limit.

 

Edge Computing Interview Questions and Answers

 


More Interview Questions and Answers:


Hadoop Technical Interview Questions and Answers

 

Hyperion Technical Interview Questions and Answers

 

Internet of Things (IOT) Interview Questions and Answers

 

C# Language Interview Questions and Answers