Sunday, May 13, 2018

Cake PHP Installation and Tutorial



1. Download XAMP and install as per your system configuration Link https://www.apachefriends.org/download.html 2. Editor for cake php https://code.visualstudio.com/Download 3. Version control svn - install version control make sure to select make sure command line tools checked for more please refer to guide https://epdf.tips/beginning-cakephp-from-novice-to-professional.html https://vimeo.com/47400017 http://web-algarve.com/books/MySQL%20&%20PHP/Learning%20PHP,%20MySQL,%20JavaScript,%20CSS%20&%20HTML5,%203rd%20Edition.pdf

local setup settings.

Step 1) C:\WINDOWS\system32\drivers\etc\ Open the "hosts" file :
127.0.0.1       localhost
127.0.0.1       test.com
127.0.0.1       example.com
Step 2) xampp\apache\conf\extra\httpd-vhosts.conf
<VirtualHost *:80>
    DocumentRoot C:/xampp/htdocs/test/
    ServerName www.test.com
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot C:/xampp/htdocs/example/
    ServerName www.example.com
</VirtualHost>
Step 3) C:\xampp\apache\conf\httpd.conf. Scroll down to the Supplemental configuration section at the end, and locate the following section (around line 500), Remove the # from the beginning of the second line so the section now looks like this:
#Virtual hosts
Include conf/extra/httpd-vhosts.conf
Step 4) Restart XAMPP and now run in your browser :
www.example.com or www.test.com

DEBUGGING please refer below link

https://www.codeproject.com/Articles/553018/Ultra-Rapid-PHP-Application-Development
https://www.youtube.com/watch?v=vH-EFil3Svg&list=PLy6f6YeaisJLnQpKpeeJX_ooJg_IH1Oib&index=3



Note : Please feel free to add useful content/links to this page




Wednesday, May 9, 2018

PHP for Beginner



1. Laravel
This is one of the oldest and most popular PHP frameworks with expressive syntax. The framework has a robust templating engine that makes web development easier. The framework takes care of common tasks such as session, caching, routing, and authentication. Laravel comes with plenty of functions that make rapid application development easier.

2. Symfony
The Symfony framework was launched back in 2005. It is known as a comprehensive PHP MVC framework that is adhered to all PHP standards. Symfony is fully compliant with the standards of PHP and the web. Its components are extensively used by well-known CMS like Drupal, OroCram, and PHP bulletin boards.

3. Zend Framework
Zend is an object oriented, MVC-based framework that uses features such as interfaces, inheritance. It allows loading components and functions that you want to use as individual libraries. Zend is built on agile functionality that helps in delivering high quality applications. It is a highly customisable framework.

4. CakePHP
CakePHP has maintained its popularity as it has evolved over time. The framework offers new functions with each new version to keep the strong user base. Using CakePHP ensures that the core of your application is well tested and continuously improved. The current version of CakePHP has functions like improved modularity and increased ability.

5. FuelPHP
FuelPHP is a flexible framework that supports MVC and HMVC architecture. It is being updated over time and expects a major overhaul in 2020. FuelPHP's significant feature is HMVC consuming less time and memory. The implementations help you create web applications with varied functions and complexities.

PHP EXAMPLE


<?php
$a =true;
$b =5.24;
$c =$a+$b;
$d= array('apple','mango');
echo "C value is : ",$c;
echo "<br/>";
echo "is an array ".is_array($d);
echo "<br/>";
$f=0;
echo "is an null ".is_null($f);
echo "<br/>";
echo "Biggest Number";
if ($a >$b)
echo " a is greater ",$a ;
else 
echo "b is greater ",$b;
/* Example program on if statements*/
echo "<br/>";
$mood ="sad";
if($mood="happy")
echo "I am a cool guy";
elseif($mood ="sad")
echo "I am a sad person";
$mood = "happy";
/* Example program on ternary operatior*/
echo "<br/>";
$text = ($mood == "happy") ? "I am in a good mood!" : "I am in sad...";
echo $text;

<?php

for ($i =1; $i<=10 ; $i++)
{
echo "i value is : ".$i ."</br>";
}

?>
for more practice and read please refer to the below useful links.


Tuesday, August 22, 2017

Machine learning


Machine learning is an application of artificial intelligence (AI) that provides systems the ability to automatically learn and improve from experience without being explicitly programmed. Machine learning focuses on the development of computer programs that can access data and use it learn for themselves.

For More Details

https://www.codeproject.com/Articles/1196024/Machine-Learning-Gradient-Descent

Friday, August 18, 2017

MFC Concepts for Preparation

MFC Concepts

Visual Studio 2015
 
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at MFC Concepts.
This section provides conceptual and task-based topics to help you program using the Microsoft Foundation Class (MFC) Library.
General MFC Topics
Discusses the technical details of the MFC Library.
Using CObject
Provides links to using CObject, the base class for most classes in MFC.
Collections
Discusses collection classes created from and not created from C++ templates.
Date and Time
Provides links to topics discussing using date and time with MFC.
Files
Discusses CFile and how to handle files in MFC.
Memory Management (MFC)
Describes how to take advantage of the general-purpose services related to memory management.
Message Handling and Mapping
Describes how messages and commands are processed by the MFC framework and how to connect them to their handler functions.
Serialization
Explains the serialization mechanism provided to allow objects to persist between runs of your program.
Unicode
Describes MFC support for the Unicode standard for encoding wide characters on Windows NT, Windows 2000, and Windows XP platforms.
Exception Handling (MFC)
Explains the exception-handling mechanisms available in MFC.
MFC Internet Programming Basics
Discusses the MFC classes that support Internet programming.
MFC Internet Programming Tasks
Discusses how to add Internet support to your applications.
MFC COM
Discusses a subset of MFC, which is designed to support COM, while most of the Active Template Library (ATL) is designed for COM programming.
Multithreading with C++ and MFC
Describes what processes and threads are and discusses the MFC approach to multithreading.
Windows Sockets in MFC
Covers the MFC implementation of Windows Sockets.
MFC Reference
Provides reference material for the MFC Library, a set of classes that constitute an application framework, which is the framework of an application written for the Windows API.
MFC Samples
Provides links to samples that show how to use MFC in desktop applications, DLLs, database applications, controls, Web applications, and more.

Friday, July 14, 2017

What i s a Function Pointer ?


function pointer is a variable that stores the address of a function that can later be called through that function pointer. This is useful because functions encapsulate behavior.
Declaring a Pointer to a Function
Declaration of pointers to functions resembles other declarations. For example, just as we write
int *p;
to say that *p has type int and implying that p is a pointer, we may write
int (*pf)(int);
to say that if we dereference pf, and call it with an int argument, the result has type int. By implication, pf is a pointer to a function that takes an int argument and returns an int result.
A pointer to a function is similar to a pointer to data but it should always be enclosed in parenthesis when using the dereference operator (*) to avoid an compilation error. It then be followed by another parenthesis containing any arguments to be passed to the function when using the *.
Because all that we can do with a function is to take its address or call it, any use of a function that is not a call is assumed to be taking its address, even without an explicit &.
Suppose we have a function with the following prototype:
int f(int); //prototype
Note that it look just like our declaration of pointer to a function:
int (*pf)(int);
Because f is a function, so is (*pf). And if (*pf) is a function, then pf must be a pointer to a function.
The declaration requires the parentheses around *pf to provide the proper operator precedence. Parentheses have a higher precedence than the * operator, so *pf(int) means pf() is a function that returns a pointer while (*pf)(int) means pf is a pointer to a function.
int (*pf)(int); // pf points to a function that returns int
int *pf(int); // pf() is a function that returns a pointer to int
Once we declare pf properly, we can assign to it the address of a matching function:
int f(int);
int (*pf)(int);
pf = f;  // pf now points to the f() function
Invoking a Function Using a Pointer
As we discussed in the previous section, (*pf) serves as a name of a function. In other words, function pointers are invoked by name just like normal function calls.
int f(int);
int (*pf)(int);
pf = f;   // pf now points to the f() function
int i = f(4);  // call f() using the function name
int j = (*pf)(4); // call f() using the pointer pf
int k = pf(5)  // also call f() using the pointer pf
The code below shows very simple usage of function pointer:
#include <iostream>
using namespace std;

int square(int n) {
 return n*n;
}

int main()
{
 int (*pf)(int);
 pf = square;
 cout << "square(7) = " << pf(7) << endl;
        return 0;
}

Here is another example using a pointer to a function.
#include <iostream>  
using namespace std;

int operation (int i, int j, int (*pf)(int,int)) {
 int k;
 k = (*pf)(i,j);
 /* This works, too.
   k = pf(i,j) 
 */
 return k;
}

int addition (int a, int b) { 
 return a+b; 
}

int division (int a, int b) { 
 return a/b; 
}

int main()  
{   
 int m = operation (10, 5, addition);
 int n = operation (10, 5, division);

 cout << "m = " << m << endl;
 cout << "n = " << n << endl;

 return 0;
}
Output is:
m = 15
n = 2


For More Please refer the link

 http://www.bogotobogo.com/cplusplus/pointers3_function_multidimensional_arrays.php

lvalue vs rvalue

  1. What is an lvalue? An lvalue is an object that: Has an identifiable memory location. Has a name (in most cases). Can appear on th...