Skip to content

Instantly share code, notes, and snippets.

-- phpMyAdmin SQL Dump
-- version 4.0.4.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Dec 23, 2015 at 05:32 PM
-- Server version: 5.5.32
-- PHP Version: 5.4.19
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Http\RedirectResponse;
class RedirectIfAuthenticated {
/**
* The Guard implementation.
@waqasraza123
waqasraza123 / AppServiceProvider.php
Last active December 29, 2015 22:49
this is the error FatalErrorException in AppServiceProvider.php line 15: Class 'App\Providers\UserInfo' not found
<?php
namespace App\Providers;
include_once __DIR__."/../../../registration/php/user_info.php";
use Illuminate\Support\ServiceProvider;
use Auth;
class AppServiceProvider extends ServiceProvider {
protected $currentUser, $allUsers;
<?php
$content = file_get_contents('http://www.exhibition-directory.com/expostars/index.php?'.http_build_query($_GET));
//$content = file_get_contents('http://www.exhibition-directory.com/expostars/index.php/');
$content = str_replace('</title>','</title><base href="http://www.exhibition-directory.com/expostars/" />', $content);
$content = str_replace('</head>','<link rel="stylesheet" href="http://www.informatixtech.com/expostars/wp-content/themes/hotstar-child/hotstar-child/custom.css" type="text/stylesheet" /></head>', $content);
$content = str_replace('<form name="searchForm" action="index.php" enctype="multipart/form-data" method="get">','<form name="searchForm" action="http://www.informatixtech.com/expostars/search-page.php" enctype="multipart/form-data" method="get">', $content);
echo $content;
#include <stdio.h>
#include <iostream>
#include <stdlib.h>
using namespace std;
class MyClass{
public:
void test(){
// File Name GreetingServer.java
import java.net.*;
import java.io.*;
public class Server
{
public static Socket socket;
public static void main(String[] args){
// File Name GreetingClient.java
import java.net.*;
import java.util.Scanner;
import java.io.*;
public class Client
{
public static Socket sc;
public static void main(String [] args)
<?php
//Get current page form url e.g. &page=6
$currentPage = LengthAwarePaginator::resolveCurrentPage();
//Create a new Laravel collection from the array data
$collection = new Collection($data);
//Define how many items we want to be visible in each page
$perPage = 48;
<div class="row clearfix">
<h4 class="text-center">
@if($radius != 0 && $resultsCount == 0)
Zero Results Within {{$radius}} Km
@elseif((!empty($marketLocation) && $marketLocationMatchedCount == 0))
Not Available in {{$marketLocation}}
@elseif(!empty($marketLocation) && $marketLocationMatchedCount > 0)
Available in {{$marketLocation}}
@endif
</h4>
<?php
namespace App\Model;
use App\Http\Controllers\EventController;
use App\User;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use App\Price;