Month: July 2020

Before understanding the embedded PHP we have to know that we can write our complete web applications in standalone PHP, but in most cases, PHP is embedded in HTML or XML file. Before Knowing Just because PHP is a scripting language & is used for making the page dynamic and process Logical tasks.

A source file can contain numerous lines of codes including PHP or non-PHP style. Working with PHP is quite different from HTML because the clients are unable to download the source code in PHP. Do you know that what happens when a user requests a PHP page? -The code in the requested file is processed by the server then it displays you the result in HTML form.

The main aim of working with PHP is to use the processing powers of the server to build the dynamic web pages. This means that if you click “view source” on a PHP page, you are not able to see the PHP codes you will see only HTML tags. Due to this, you cannot see how a PHP page is made and what logic is used to process the page with the help of “view source”.

Example PHP code

            echo "Hello world using echo </br>";  
            ECHO "Hello world using ECHO </br>";  
            EcHo "Hello world using EcHo </br>";  

Embedding PHP in HTML

Have a look on given example :

Echo "<html>"; 
Echo "<title>HTML with PHP</title>"; 
Echo "<b>ExpertPHP Example</b>";  
//your php code goes here   

As i told you that you can even embed php code within HTML Tags too, please have a look on given example.

<title>Embed PHP within HTML tags</title>
Put here your HTML code
        // php code goes here
Back into normal HTML

You can also put your html code within specific conditions of PHP.

<?php if(your condition) { ?>
<?php } ?>

Transact-SQL statements can refer to GETDATE anywhere they can refer to a datetime expression.

GETDATE is a nondeterministic function. Views and expressions that reference this function in a column cannot be indexed.

Using SWITCHOFFSET with the function GETDATE() can cause the query to run slowly because the query optimizer is unable to obtain accurate cardinality estimates for the GETDATE value. We recommend that you precompute the GETDATE value and then specify that value in the query as shown in the following example. In addition, use the OPTION (RECOMPILE) query hint to force the query optimizer to recompile a query plan the next time the same query is executed. The optimizer will then have accurate cardinality estimates for GETDATE() and will produce a more efficient query plan.

SELECT RIGHT(YEAR(Creation_Date), 2) YY FROM Table_Name


| YY |
| 10 |
| 11 |
| 13 |
All About Bitcoins

8th November 2016 made me re-think our physical currency in use. Well, demonetization really hit hard and no one could ever stop talking about it. What indulged me into thinking about it so much was the concept of currency in itself. What is currency anyway? A few paper notes and metal coins governed by authority and buy us whatever we want and make us lure about it just like flies over sweet. Besides treating it as God, we always forget that it is made by us, humans (well the government is human too).  But, someone in some other part of the world by the name Satoshi Nakamoto thought of inventing some other kind of currency, BITCOIN. As interesting as the word sounds, the concept of Bitcoin in itself is quite engrossing.

Before going any further into the topic, we cannot deny that we’ve all (especially millennials) had that wild fantasy of trading Bitcoins and becoming rich! But very few know how to do it.

So let’s give this fantasy a strong base and understand how exactly the concept of Bitcoins work.

NOTE: We will use the acronym BTC for BITCOIN in the upcoming lines of writing. Nothing technical, this is just to avoid getting fed up by the frequent use of the B-word.

So, in layman terms, BTC is a virtual currency. There is no central authorized body governing it. It is completely intangible, can’t be kept in your wallet of course. It can be just transferred digitally. The only way you can feel it is through some digits popping on your screen.

You can use bitcoins to pay for friends, merchants, etc. Every single purchase is immediately logged digitally (on computers) on a transaction log that tracks the time of purchase and who owns how many BTCs. Think of this transaction log as an audit trail: it contains every single piece of information on every BTC transaction. This digital transaction log is called ‘blockchain’. The blockchain records every single transaction – of present and past – and the ownership of every single BTC in circulation. The people who are constantly verifying the blockchain, ensuring that all the information is correct and updating it each time a transaction is made, are called ‘miners’. One way to think of miners is those who confirm transactions. Their job is to ensure that the transaction is secure and processed properly and safely. In return for their services, miners are paid fees by the vendors/merchants of each transaction and are also given physical, minted BTCs.

BTCs are growing in popularity, and although they were largely used by speculators who were looking at it as a way to make money by buying BTCs at lower prices and selling them at higher prices (much like trading foreign exchange or forex), there is a growing trend of businesses accepting BTC as a form of payment. Many big companies like WordPress,, and Reddit accept BTC, and growing numbers of brick and mortar stores are starting to accept them internationally as well

How are bitcoins priced?

The value of a bitcoin is constantly changing, and there is no centralized exchange for it. Think of it this way: each time a bitcoin changes ownership from the seller to buyer, the two parties need to agree on its price. There is no ‘fixed’ price. Usually, it’s the seller’s responsibility to give a fair price to the buyer based on what rate bitcoins are being traded in elsewhere. The difference between bitcoins and other currencies is that there is no centralized bank that prints the currency and sets relative values. Through transactions, the value of bitcoin fluctuates through supply and demand.

How do I get started?

You can obtain bitcoins in a number of ways, but before we get to that, you’ll need to get yourself a ‘Bitcoin wallet’.

A Bitcoin wallet is first required to get started with using bitcoins. A wallet can be created easily through different online applications. Your Bitcoin wallet is essentially just like, well, any other wallet.

Think of a Bitcoin wallet like an “app” that you would install on your phone. You can download your wallet on your computer through a software wallet, on your mobile, and also on the web. Once you’ve got yourself a Bitcoin wallet, you’re good to go. It takes just a few minutes to get a wallet; once you have one, you can start accumulating bitcoins.

How do I get bitcoins?

Obtaining bitcoins is a relatively easy process. The three common ways are:

  • If you are selling a good, you can accept bitcoins as a form of payment.
  • You can purchase and sell bitcoins through Bitcoin exchanges (this is the most common way. Exchanges are typically found online.)
  • You can trade bitcoins for traditional currencies of countries.

In India, it’s not very easy to convert rupees to other currencies since the Indian currency is not freely convertible. Due to this hindrance, obtaining bitcoins is not as hassle-free as it is in other countries. Another problem with obtaining bitcoins in India is that there is an electronic method to transfer funds safely; most transfers happen through NEFT. Due to these hindrances, the liquidity of bitcoins is relatively scarce in India but is picking up.

The RBI has taken notice of Bitcoin but has not outlawed it. As Mark Twain popularly said, “The more things are forbidden, the more popular they become.”

That not being the end of the story, we can only expect Bitcoin’s meteoric rise in popularity to continue.

Hope this information got you excited enough for your next BTC transaction. Thank you!

What Is Artificial Intelligence (AI)?

Artificial intelligence (AI) refers to the simulation of human intelligence in machines that are programmed to think like humans and mimic their actions. The term may also be applied to any machine that exhibits traits associated with a human mind such as learning and problem-solving.

The ideal characteristic of artificial intelligence is its ability to rationalize and take actions that have the best chance of achieving a specific goal.

Understanding Artificial Intelligence

When most people hear the term artificial intelligence, the first thing they usually think of is robots. That’s because big-budget films and novels weave stories about human-like machines that wreak havoc on Earth. But nothing could be further from the truth.

Artificial intelligence is based on the principle that human intelligence can be defined in a way that a machine can easily mimic it and execute tasks, from the most simple to those that are even more complex. The goals of artificial intelligence include learning, reasoning, and perception.

As technology advances, previous benchmarks that defined artificial intelligence become outdated. For example, machines that calculate basic functions or recognize text through optimal character recognition are no longer considered to embody artificial intelligence, since this function is now taken for granted as an inherent computer function.

AI is continuously evolving to benefit many different industries. Machines are wired using a cross-disciplinary approach based in mathematics, computer science, linguistics, psychology, and more.

Applications of Artificial Intelligence

The applications for artificial intelligence are endless. The technology can be applied to many different sectors and industries. AI is being tested and used in the healthcare industry for dosing drugs and different treatment in patients, and for surgical procedures in the operating room.

Other examples of machines with artificial intelligence include computers that play chess and self-driving cars. Each of these machines must weigh the consequences of any action they take, as each action will impact the end result. In chess, the end result is winning the game. For self-driving cars, the computer system must account for all external data and compute it to act in a way that prevents a collision.

Artificial intelligence also has applications in the financial industry, where it is used to detect and flag activity in banking and finance such as unusual debit card usage and large account deposits—all of which help a bank’s fraud department. Applications for AI are also being used to help streamline and make trading easier. This is done by making supply, demand, and pricing of securities easier to estimate.

Categorization of Artificial Intelligence

Artificial intelligence can be divided into two different categories: weak and strong. Weak artificial intelligence embodies a system designed to carry out one particular job. Weak AI systems include video games such as the chess example from above and personal assistants such as Amazon’s Alexa and Apple’s Siri. You ask the assistant a question, it answers it for you.

Strong artificial intelligence systems are systems that carry on the tasks considered to be human-like. These tend to be more complex and complicated systems. They are programmed to handle situations in which they may be required to problem solve without having a person intervene. These kinds of systems can be found in applications like self-driving cars or in hospital operating rooms.

Special Considerations

Since its beginning, artificial intelligence has come under scrutiny from scientists and the public alike. One common theme is the idea that machines will become so highly developed that humans will not be able to keep up and they will take off on their own, redesigning themselves at an exponential rate.

Another is that machines can hack into people’s privacy and even be weaponized. Other arguments debate the ethics of artificial intelligence and whether intelligent systems such as robots should be treated with the same rights as humans.

Self-driving cars have been fairly controversial as their machines tend to be designed for the lowest possible risk and the least casualties. If presented with a scenario of colliding with one person or another at the same time, these cars would calculate the option that would cause the least amount of damage.

Another contentious issue many people have with artificial intelligence is how it may affect human employment. With many industries looking to automate certain jobs through the use of intelligent machinery, there is a concern that people would be pushed out of the workforce. Self-driving cars may remove the need for taxis and car-share programs, while manufacturers may easily replace human labor with machines, making people’s skills more obsolete.