This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Image { | |
protected $_image; | |
protected $_image_type; | |
/** | |
* @param string $filename |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Now with added Transparency resizing feature | |
* @param int $width | |
* @param int $height | |
*/ | |
public function resize($width,$height) | |
{ | |
$new_image = imagecreatetruecolor($width, $height); | |
if ( ($this->getImageType() == IMAGETYPE_GIF) || ($this->getImageType() == IMAGETYPE_PNG) ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Website\Controller\Action; | |
use Website\Form\Contact as ContactForm; | |
use Object\Enquiry; | |
class DefaultController extends Action | |
{ | |
public function defaultAction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController, UITableViewDelegate | |
{ | |
@IBOutlet weak var number: UILabel! | |
@IBOutlet weak var slider_value: UISlider! | |
@IBOutlet weak var table: UITableView! | |
@IBAction func sliderMoved(sender: AnyObject) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET @entityid = '3'; | |
SELECT ea.attribute_id, ea.attribute_code, eav.value AS 'value', 'varchar' AS 'type' | |
FROM catalog_category_entity e | |
JOIN catalog_category_entity_varchar eav | |
ON e.entity_id = eav.entity_id | |
JOIN eav_attribute ea | |
ON eav.attribute_id = ea.attribute_id | |
WHERE e.entity_id = @entityid | |
UNION |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace HtUserRegistration\Service; | |
use HtUserRegistration\Mapper\UserRegistrationMapperInterface; | |
use Zend\EventManager\EventInterface; | |
use ZfcUser\Entity\UserInterface; | |
use ZfcBase\EventManager\EventProvider; | |
use DateTime; | |
use HtUserRegistration\Entity\UserRegistrationInterface; | |
use HtUserRegistration\Mailer\MailerInterface; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function onBootstrap(MvcEvent $e) | |
{ | |
$app = $e->getApplication(); | |
$eventManager = $app->getEventManager(); | |
$moduleRouteListener = new ModuleRouteListener(); | |
$moduleRouteListener->attach($eventManager); | |
$sharedManager = $eventManager->getSharedManager(); | |
$sharedManager->attach('HtUserRegistration\Service\UserRegistrationService', 'createRegistrationRecord.post', function (MvcEvent $event) use ($app) { | |
die("OK we seem to be getting somewhere?"); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function onBootstrap(MvcEvent $e) | |
{ | |
$app = $e->getApplication(); | |
$eventManager = $app->getEventManager(); | |
$moduleRouteListener = new ModuleRouteListener(); | |
$moduleRouteListener->attach($eventManager); | |
$sharedManager = $eventManager->getSharedManager(); | |
$sharedManager->attach('HtUserRegistration\Service\UserRegistrationService', 'createRegistrationRecord.post', function (Event $e) use ($app) { | |
$controller = $e->getTarget(); | |
$controller->redirect()->toRoute('checkemailtoactivate'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function onBootstrap(MvcEvent $e) | |
{ | |
$app = $e->getApplication(); | |
$eventManager = $app->getEventManager(); | |
$moduleRouteListener = new ModuleRouteListener(); | |
$moduleRouteListener->attach($eventManager); | |
$sharedManager = $eventManager->getSharedManager(); | |
$sharedManager->attach('HtUserRegistration\Service\UserRegistrationService', 'createRegistrationRecord.post', function (Event $e) use ($app) { | |
$e->stopPropagation(true); | |
//->controller->redirect()->toRoute('checkemailtoactivate'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new Token | |
curl -u 'githubuser' -d '{"note":"Your Application"}' https://api.github.com/authorizations | |
# It is: "ebab4dc37e654bb230a9c69ebcd5f38e9a81e210" | |
#{ | |
# "created_at": "2013-01-04T18:00:28Z", | |
# "app": { | |
# "url": "http://developer.github.com/v3/oauth/#oauth-authorizations-api", |
OlderNewer