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
let animationImages:[UIImage] = [UIImage(named: "img_01")!, UIImage(named: "img_02")!, UIImage(named: "img_03")!] | |
loadingImageView.animationImages = animationImages | |
loadingImageView.animationDuration = 1.5 | |
loadingImageView.animationRepeatCount = 0 | |
loadingImageView.startAnimating() | |
self.addSubview(loadingImageView) |
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
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"No network connection" | |
message:@"You must be connected to the internet to use this app." | |
delegate:nil | |
cancelButtonTitle:@"OK" | |
otherButtonTitles:nil]; | |
[alert show]; |
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 | |
// app/routes.php | |
Route::get('file/download', function() | |
{ | |
$file = 'path_to_my_file.pdf'; | |
return Response::download($file, 418, array('iron', 'man')); | |
}); |
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
$('a').on('click touchend', function(e) { | |
var el = $(this); | |
var link = el.attr('href'); | |
window.location = link; | |
}); |
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
defaults write com.jetbrains.intellij ApplePressAndHoldEnabled -bool false |
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
Event::listen('illuminate.query', function($query) { | |
var_dump($query); | |
}); |
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
$this->tableGateway->select(function (Select $select) use ($param) { |
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
$pages = $this->getPagesTable()->fetch(array('namespace'=>'event')); | |
foreach($pages as $page) { | |
// Get start date | |
$startDate = $this->getContentNodesTable()->getContentNode($page->id, 'startDate'); | |
if($startDate->content != '') { | |
$date = date('Y-m-d',$startDate->content); | |
$this->getContentNodesTable()->saveContentNode($page->id, 'startDate', $date, $language = 'en'); | |
} | |
$endDate = $this->getContentNodesTable()->getContentNode($page->id, 'endDate'); |
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
$pages = $this->getPagesTable()->fetch(array('namespace'=>'webpage'); | |
foreach($pages as $page) { | |
$this->getContentNodesTable()->saveContentNode($page->id, 'status', 'Live', $language = 'en'); | |
} | |
die('fin'); |
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
$adapter = $this->getServiceLocator()->get('Zend\Db\Adapter\Adapter'); | |
$results = $this->getPagesTable()->fetchAll(); | |
$textUtils = new Text; | |
foreach($results as $page) { | |
$prettyurl = $textUtils->prettyurl($page->name); | |
$sql = "update pages set prettyurl = '".$prettyurl."' where id = ".$page->id; | |
$adapter->query($sql, Adapter::QUERY_MODE_EXECUTE); |
NewerOlder