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 "ViewController.h" | |
@interface ViewController () | |
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomConstraint; | |
@property (weak, nonatomic) IBOutlet UIButton *addButton; | |
@property (weak, nonatomic) IBOutlet UIView *containerView; | |
@property (nonatomic, weak) UIView *lastView; | |
@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
// Present the view controller using the popover style. | |
myPopoverViewController.modalPresentationStyle = UIModalPresentationPopover; | |
[self presentViewController:myPopoverViewController animated: YES completion: nil]; | |
// Get the popover presentation controller and configure it. | |
UIPopoverPresentationController *presentationController = [myPopoverViewController popoverPresentationController]; | |
presentationController.permittedArrowDirections = UIPopoverArrowDirectionLeft | UIPopoverArrowDirectionRight; | |
presentationController.sourceView = myView; | |
presentationController.sourceRect = sourceRect; |
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
<apex:page standardController="Account" extensions="AccountCaseCommentsExtension" showHeader="true" sidebar="true"> | |
<apex:pageBlock> | |
<apex:pageBlockSection> | |
<apex:pageBlockTable value="{!account.Cases}" var="c"> | |
<apex:column value="{!c.CaseNumber}" /> | |
<apex:column value="{!c.Subject}" /> | |
<apex:column value="{!caseToCaseComment[c.Id].CommentBody}" /> | |
</apex:pageBlockTable> | |
</apex:pageBlockSection> | |
</apex:pageBlock> |
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
<apex:component controller="CaseCommentsComponentController" selfClosing="true"> | |
<apex:attribute name="accountId" description="The ID of the Account to reference" type="Id" required="false" assignTo="{!theAccountId}"></apex:attribute> | |
<apex:pageBlock> | |
<apex:pageBlockSection> | |
<apex:pageBlockTable value="{!comments}" var="c"> | |
<apex:column value="{!c.Parent.CaseNumber}" /> | |
<apex:column value="{!c.Parent.Subject}" /> | |
<apex:column value="{!c.CommentBody}" /> | |
</apex:pageBlockTable> | |
</apex:pageBlockSection> |
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
<apex:page standardController="Account" showHeader="true" sidebar="true"> | |
<c:CaseCommentsComponent accountId="{!account.Id}" /> | |
</apex:page> |
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
<apex:component> | |
<apex:stylesheet value="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" /> | |
<apex:includeScript value="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js" /> | |
<apex:includeScript value="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js" /> | |
<style type="text/css"> | |
#sidebarDiv { | |
background: crimson; | |
} | |
</style> |
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 with sharing class DataWrapper { | |
public Object value { get; set; } | |
public DataWrapper() {} | |
public DataWrapper(Object theValue) { | |
value = theValue; | |
} | |
} |
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
enum PowerUp { | |
case None | |
case Scoring (Int) | |
case Velocity (Int) | |
} |
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
countingDNANucleotides = foldl (\(a,c,g,t) x -> if x == 'A' then (a+1,c,g,t) else if x == 'C' then (a,c+1,g,t) else if x == 'G' then (a,c,g+1,t) else if x == 'T' then (a,c,g,t+1) else (a,c,g,t)) (0,0,0,0) |
OlderNewer