Skip to content

Instantly share code, notes, and snippets.

View tjkhara's full-sized avatar

tjkhara

View GitHub Profile
@tjkhara
tjkhara / php.ini
Created July 31, 2018 19:15
PHP.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@tjkhara
tjkhara / 1embeddingphp.php
Created August 22, 2018 05:27
Create phpinfo file.
<?php
phpinfo();
// Added some comments to this file
?>
@tjkhara
tjkhara / gist:0e4dce761ab7378128baae608fc17c5f
Last active August 22, 2018 07:03
Xdebug Wizard Output
XDEBUG EXTENSION FOR PHP | DOCUMENTATION | INSTALLATION
home | updates | download | documentation | contributing | license | support | issue tracker
@tjkhara
tjkhara / generateRandomNumbers.cpp
Created September 21, 2018 06:07
Generating Random Numbers in C++
#include <iostream>
#include <cstdlib> // For rand and srand
#include <ctime> // For the time function
using namespace std;
// Function prototype
int* getRandomNumbers(int);
int main()
{
@tjkhara
tjkhara / 14_10_18_PointersToClassObjects.cpp
Created September 21, 2018 07:24
Pointers to Class Objects
/*********************************************************************
Author: Tajeshwar Singh Khara
Date: 21 September 2018 12:06:23
Description: Pointers to class objects and structures as parameters of
functions.
*********************************************************************/
#include <iostream>
#include <string>
using namespace std;
@tjkhara
tjkhara / 10DynamicPointerPointerDetailed.cpp
Created September 22, 2018 18:13
Pointer pointer array with expansion.
// Example 40
// https://www.youtube.com/watch?v=c2qx13d4YG4&list=PL6xSOsbVA1eaxY06L5ZZJfDZSohwO6AKY&index=41
// C++ Example 40 - Dynamic Pointer-pointer array detailed walkthrough
#include <iostream>
#include <string>
using namespace std;
void expand(int**& arr, int& cap, int nrOfEl)
@tjkhara
tjkhara / 1Simple2DArrayWithPointers.cpp
Created September 23, 2018 03:58
Simple 2D array with pointers
#include <iostream>
#include <iomanip>
#include <string>
using std::cout;
using std::cin;
using std::endl;
int main() {
@tjkhara
tjkhara / 2Dynamic2DArrayWithUserInput.cpp
Created September 23, 2018 04:24
2D Dynamic Array With Pointers With Menu
#include <iostream>
#include <iomanip>
#include <string>
using std::cout;
using std::cin;
using std::endl;
int main() {
@tjkhara
tjkhara / 13ValidationWhileLoop.cpp
Created September 26, 2018 05:03
Validations to check if what is entered is a number
#include <iostream>
#include <iomanip>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;
string isItANumber(string input="")
@tjkhara
tjkhara / 16JesusValidateSingleNo.cpp
Created September 28, 2018 03:59
Validation check if the value entered is the number 2
// Video: https://www.youtube.com/watch?v=kQIkWDf2XXE&feature=youtu.be
#include <iostream>
#include <iomanip>
#include <string>
using std::cout;
using std::cin;
using std::endl;
using std::string;