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 | |
$this->Html->link($artist->name, ['action' => 'view', $artis->id, 'name' => $artist->name]); |
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
Storyboard configuration: | |
1. Make a cell. | |
2. Give it a custom class of YourCell | |
3. Drag a label onto the cell, give the label a tag of 100. Configure and arrange as necessary. | |
4. Drag a text field onto the cell, give the textField a tag of 101. Configure and arrange as necessary. |
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
// | |
// UIImage+UIColor.swift | |
// | |
import UIKit | |
extension UIImage { | |
class func imageWithColor(color: UIColor) -> UIImage { | |
let rect = CGRectMake(0.0, 0.0, 1.0, 1.0) | |
UIGraphicsBeginImageContext(rect.size) |
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
// NSString_stripHtml.h | |
// Copyright 2011 Leigh McCulloch. Released under the MIT license. | |
#import <Foundation/Foundation.h> | |
@interface NSString (stripHtml) | |
- (NSString*)stripHtml; | |
@end |
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
// adds mobile class, and mobile os to html tag | |
jQuery(document).ready(function($){ | |
var deviceAgent = navigator.userAgent.toLowerCase(); | |
if (deviceAgent.match(/(iphone|ipod|ipad)/)) { | |
$('html').addClass('ios'); | |
$('html').addClass('mobile'); | |
} | |
if (deviceAgent.match(/android/)) { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.devahoy.sample.ahoygson" > | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<application | |
android:allowBackup="true" | |
android:icon="@drawable/ic_launcher" | |
android:label="@string/app_name" |
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 | |
function themename_customize_register($wp_customize){ | |
$wp_customize->add_section('themename_color_scheme', array( | |
'title' => __('Color Scheme', 'themename'), | |
'priority' => 120, | |
)); | |
// ============================= |
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
$(document).ready(function(){ | |
$('.img-responsive').each(function() { | |
var maxWidth = 180; // Max width for the image | |
var maxHeight = 3000; // Max height for the image | |
var ratio = 0; // Used for aspect ratio | |
var width = $(this).width(); // Current image width | |
var height = $(this).height(); // Current image height | |
// Check if the current width is larger than the max |
OlderNewer