Skip to content

Instantly share code, notes, and snippets.

View wethu's full-sized avatar

Ellis wethu

  • Ellis Gray
  • Gold Coast
View GitHub Profile
- (UIButton *)submitButton {
if (_submitButton == nil) {
_submitButton = [UIButton new];
_submitButton.translatesAutoresizingMaskIntoConstraints = NO;
[_submitButton addTarget:self action:@selector(submitButtonTapped:) forControlEvents:UIControlEventTouchUpInside];
CGRect layerBounds = _submitButton.layer.bounds;
layerBounds.size.height += 4.0f;
layerBounds.size.width += 4.0f;
_submitButton.layer.bounds = layerBounds;
_submitButton.layer.cornerRadius = 5;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
products *product = [self.products objectAtIndex:indexPath.row];
[self.navController performSegueWithIdentifier:@"PushJobForm" sender:product];
}
#import "CPRNavigationController.h"
#import "CPRJobFormController.h"
@implementation CPRNavigationController
-(void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
CPRJobFormController *controller = [segue destinationViewController];
controller.product = sender;
}
@end
Oct 8 15:18:47 MacbookPro fontd[260]: BUG in libdispatch client: dispatch_mig_server: mach_msg() failed (ipc/send) invalid memory - 0x1000000c
Oct 8 15:18:47 MacbookPro parentalcontrolsd[722]: StartObservingFSEvents [849:] -- *** StartObservingFSEvents started event stream
Oct 8 15:18:52 MacbookPro distnoted[728]: # distnote server agent absolute time: 38.777699557 civil time: Wed Oct 8 15:18:52 2014 pid: 728 uid: 89 root: no
Oct 8 15:19:06 MacbookPro com.apple.SecurityServer[15]: Session 100012 created
Oct 8 15:19:23 MacbookPro mds_stores[220]: (/private/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T)(Error) IndexGeneral in void setAttributes(si_set_attr_ctx *, Boolean):Couldn't update index oid:12019590 options:10 updateErr:-1 resolveErr:2
-- Must have died here:
Oct 8 15:20:18 MacbookPro apsd[80]: Failed to send activation record to service com.apple.ManagedClient.enroll
Oct 8 15:22:18 MacbookPro mds[56]: (Normal) Volume: volume:0x7fe256800000 ********** Bootstrapped Creating a default stor
@wethu
wethu / House.rb
Last active August 29, 2015 14:07
class House < ActiveRecord::Base
has_many :house_classes
has_many :students, :through => :house_classes
has_many :referrals
has_one :hoh
end
@wethu
wethu / helper.rb
Created September 28, 2014 13:44
def form_for_login(&block)
form_for(resource,
:as => resource_name,
:url => session_path(resource_name),
:html => {
:class => 'navbar-form navbar-right',
:role => 'login'}) do block
yield
end
end
#import "CPRObjectLoader.h"
#import "CPRObjectManager.h"
#import "CPRPersistentStack.h"
// Added these to see if the frameworks wernt' getting linked but they were
#import <CoreData/CoreData.h>
#import <RestKit/RestKit.h>
@interface CPRObjectLoader()
class Ability
include CanCan::Ability
def initialize(user)
# Define abilities for the passed in user here. For example:
#
# user ||= User.new # guest user (not logged in)
# if user.admin?
# can :manage, :all
# else
class Controller < ApplicationController
# This will not increment each child
def index
@form = Form.new(Parent.new)
end
end
<table class="table">
<th width="20%">Time/Date Created</th>
<th width="80%">Client/Product</th>
<% @jobs.each do |job| %>
<% present job do |job_presenter| %>
<% job_presenter.check_status %>
<tr>
<td><%= job_presenter.date_time_graphic %></td>
<!-- <td> -->
<%= content_tag :td, :class => job_presenter.job_status do %>