Skip to content

Instantly share code, notes, and snippets.

View ikariiin's full-sized avatar
🐜
Focusing

Gourab Nag ikariiin

🐜
Focusing
View GitHub Profile
<?php
/**
* Created by PhpStorm.
* User: gourab
* Date: 20/7/15
* Time: 10:35 PM
*/
$name = "GOURAB";
$revName = strrev($name);
$len = strlen($name);
//============================================================================
// Name : Pattern.cpp
// Author : Gourab Nag
// Version : 1.0
// Copyright : None
// Description : Triangular Pattern in C++, Ansi-style
//============================================================================
#include <iostream>
#include <iomanip>
//============================================================================
// Name : Tut2.cpp
// Author : Gourab Nag
// Version :
// Copyright : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================
#include <iostream>
using namespace std;
/bin/bash /home/gourab/Desktop/xdebug/libtool --mode=compile cc -I. -I/home/gourab/Desktop/xdebug -DPHP_ATOM_INC -I/home/gourab/Desktop/xdebug/include -I/home/gourab/Desktop/xdebug/main -I/home/gourab/Desktop/xdebug -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/gourab/Desktop/xdebug/xdebug.c -o xdebug.lo
mkdir .libs
cc -I. -I/home/gourab/Desktop/xdebug -DPHP_ATOM_INC -I/home/gourab/Desktop/xdebug/include -I/home/gourab/Desktop/xdebug/main -I/home/gourab/Desktop/xdebug -I/usr/local/include/php -I/usr/local/include/php/main -I/usr/local/include/php/TSRM -I/usr/local/include/php/Zend -I/usr/local/include/php/ext -I/usr/local/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /home/gourab/Desktop/xdebug/xdebug.c -fPIC -DPIC -o .libs/xdebug.o
In file included from /home/gourab/Desktop/xdebug/xdebug.c:52:0:
/home/gourab/Desktop/xdebug/php_xde
<?php
/**
* User: gourab
* Date: 3/3/16
* Time: 1:30 PM
* Testing Threads To Create a Simple Server
*/
error_reporting(E_ALL);
class Server extends Thread {
private $port;
<?php
/**
* User: gourab
* Date: 3/3/16
* Time: 2:24 PM
* File to test the server class
*/
/* Configuration to make this script run infinitely */
/usr/local/bin/php /home/gourab/PhpstormProjects/Threads/server.php
NULL
Fatal error: Uncaught RuntimeException: the creator of Server already started it in /home/gourab/PhpstormProjects/Threads/threads.php:78
Stack trace:
#0 /home/gourab/PhpstormProjects/Threads/threads.php(78): Thread->start()
#1 /home/gourab/PhpstormProjects/Threads/server.php(18): Server->handle_start()
#2 {main}
thrown in /home/gourab/PhpstormProjects/Threads/threads.php on line 78
<?php
/********************************************************************************************
* @author Gourab Nag
* License: MIT. Get it here https://github.com/gourabNagDev/router/blob/master/MIT
* Supporting ONLY text/html
* Error Fallback-s only for 404
* Only Static Pages
* Routing information is got from the router-parser (https://gihub.com/gourabNagDev/router)
* A rules.router file must be there following the schema given in (https://github.com/gourabNagDev/router/blob/master/example.router)
* Currently I would term it is in the version even far off from alpha.
<?php
class Syntax_Exception extends Exception {
private $data = array();
public function setData(int $line_number, string $token_number) {
$this->data["line_number"] = $line_number;
$this->data["token_number"] = $token_number;
}
public $meta = array(
"type" => "syntax_error"
);
/ File Line Separator Declaration. The Separator Is Used To Explode The File Contents In The Parser;
files line-break \n ;
/ http-header Option Allows To Manipulate The HTTP-HEADERS Sent By The Server;
http-header set X-Powered-By Gourab's-Socket-Server;
/ A '#' Declaration Is Preceded By A Routing Instruction;
/ First argument to 'route' is which GET request has to be routed like '/' or '/loopback' whatever;
/ And the second argument is what type of argument the third argument would be;
/ At last the third argument is which static data or dynamic file should be served. The static static thing is kept for the purposes of images. (DATA URI);