In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
// DataManager.h | |
#import <Foundation/Foundation.h> | |
#import <CoreData/CoreData.h> | |
extern NSString * const DataManagerDidSaveNotification; | |
extern NSString * const DataManagerDidSaveFailedNotification; | |
@interface DataManager : NSObject { | |
} |
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
- (CGPoint)targetContentOffsetForProposedContentOffset:(CGPoint)proposedContentOffset withScrollingVelocity:(CGPoint)velocity | |
{ | |
CGFloat offSetAdjustment = MAXFLOAT; | |
CGFloat horizontalCenter = (CGFloat) (proposedContentOffset.x + (self.collectionView.bounds.size.width / 2.0)); | |
CGRect targetRect = CGRectMake(proposedContentOffset.x, 0.0, self.collectionView.bounds.size.width, self.collectionView.bounds.size.height); | |
NSArray *array = [self layoutAttributesForElementsInRect:targetRect]; | |
for (UICollectionViewLayoutAttributes *layoutAttributes in array) | |
{ |
extension UIImage { | |
func fixedOrientation() -> UIImage { | |
if imageOrientation == UIImageOrientation.Up { | |
return self | |
} | |
var transform: CGAffineTransform = CGAffineTransformIdentity | |
import Foundation | |
import UIKit | |
// Usage Examples | |
let shadowColor = Color.shadow.value | |
let shadowColorWithAlpha = Color.shadow.withAlpha(0.5) | |
let customColorWithAlpha = Color.custom(hexString: "#123edd", alpha: 0.25).value | |
enum Color { | |
const http = require('http'); | |
const server = http.createServer(); | |
server.on('request', (request, response) => { | |
let body = []; | |
request.on('data', (chunk) => { | |
body.push(chunk); | |
}).on('end', () => { | |
body = Buffer.concat(body).toString(); |
android.support.v7.widget.util.SortedListAdapterCallback | androidx.recyclerview.widget.SortedListAdapterCallback | |
---|---|---|
android.support.v7.widget.helper.ItemTouchUIUtilImpl | androidx.recyclerview.widget.ItemTouchUIUtilImpl | |
android.support.v7.widget.helper.ItemTouchUIUtil | androidx.recyclerview.widget.ItemTouchUIUtil | |
android.support.v7.widget.helper.ItemTouchHelper | androidx.recyclerview.widget.ItemTouchHelper | |
android.support.v7.widget.WithHint | androidx.appcompat.widget.WithHint | |
android.support.v7.widget.ViewUtils | androidx.appcompat.widget.ViewUtils | |
android.support.v7.widget.ViewStubCompat | androidx.appcompat.widget.ViewStubCompat | |
android.support.v7.widget.ViewInfoStore | androidx.recyclerview.widget.ViewInfoStore | |
android.support.v7.widget.ViewBoundsCheck | androidx.recyclerview.widget.ViewBoundsCheck | |
android.support.v7.widget.VectorEnabledTintResources | androidx.appcompat.widget.VectorEnabledTintResources |