repo_name stringlengths 6 97 | path stringlengths 3 341 | text stringlengths 8 1.02M |
|---|---|---|
Akhilsudh/Hacker-Rank-Solutions | aVeryBigSum.c | #include <stdio.h>
int main()
{
int N;
scanf("%d", &N);
int sumArray[N];
long Sum = 0;
for(int index = 0; index < N; index++)
{
scanf("%d", &sumArray[index]);
Sum += sumArray[index];
}
printf("%ld", Sum);
return 0;
}
|
Akhilsudh/Hacker-Rank-Solutions | CompareTheTriplets.c | <reponame>Akhilsudh/Hacker-Rank-Solutions<gh_stars>0
#include <stdio.h>
void compareTriplets(int a0, int a1, int a2, int b0, int b1, int b2)
{
int A = 0, B = 0;
if(a0 > b0)
{
A += 1;
}
else if(a0 < b0)
{
B += 1;
}
if(a1 > b1)
{
A += 1;
}
else if(a1 < b1)
{
B += 1;
}
if(a2 > b2)
{
A += 1;
... |
Akhilsudh/Hacker-Rank-Solutions | PlusMinus.c | #include <stdio.h>
int main()
{
float p = 0, n = 0, z = 0;
int N;
int num;
scanf("%d", &N);
for(int i = 0; i < N; i++)
{
scanf("%d", &num);
if(num > 0)
p += 1;
if(num < 0)
n += 1;
if(num == 0)
z += 1;
}
printf("%f\n%f\n%f", p/N, n/N, z/N);
return 0;
}
|
Akhilsudh/Hacker-Rank-Solutions | DiagonalDifference.c | <gh_stars>0
#include <stdio.h>
#include <math.h>
int main()
{
int i, j, n;
int A = 0, B = 0;
scanf("%d", &n);
int arr[n][n];
for(i = 0; i < n; i++)
{
for(j = 0; j < n; j++)
{
scanf("%d", &arr[i][j]);
}
}
for(i = 0; i < n; i++)
{
A += arr[i][i];
B += arr[i][(n - 1) - i];
}
printf("%d", abs(A-B... |
Akhilsudh/Hacker-Rank-Solutions | appleAndOranges.c | #include <stdio.h>
int main()
{
int aCount = 0, oCount = 0;
int s,t,a,b,m,n,i;
scanf("%d%d%d%d%d%d", &s, &t, &a, &b, &m, &n);
int aPos[m];
int oPos[n];
for(i = 0; i < m; i++)
{
scanf("%d", &aPos[i]);
if((aPos[i]+a >= s) && (aPos[i]+a <= t))
aCount++;
}
for(i = 0; i < n; i++)
{
scanf("%d", &oPos[i]);... |
Akhilsudh/Hacker-Rank-Solutions | GradingStudents.c | <filename>GradingStudents.c
#include <stdio.h>
int main()
{
int n, num, div;
scanf("%d", &n);
for(int i = 0; i < n; i++)
{
scanf("%d", &num);
if((num % 5) != 0)
{
div = num/5 + 1;
if((((div*5) - num) < 3) && num >= 38)
printf("%d\n", div * 5);
else
printf("%d\n", num);
}
else
printf("... |
Akhilsudh/Hacker-Rank-Solutions | SolveMeFirst.c | <reponame>Akhilsudh/Hacker-Rank-Solutions<filename>SolveMeFirst.c
#include <stdio.h>
#include <string.h>
int solveMeFirst(int a , int b)
{
return (a + b)
}
int main()
{
int x, y;
scanf("%d %d", &x, &y);
printf("%d", solveMeFirst(x, y));
return 0;
}
|
LYM-mg/MGDemo | MGDemo/turnView/Class/Animation/V/CustomAnimateTransitionPop.h | <reponame>LYM-mg/MGDemo
//
// CustomAnimateTransitionPop.h
// animateTransition
//
// Created by ming on 16/6/26.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface CustomAnimateTransitionPop : NSObject<UIViewControllerAnimatedTransitioning>
@pro... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Animation/C/TimerViewController.h | //
// TimerViewController.h
// RulerDemo
//
// Created by newunion on 2018/8/6.
// Copyright © 2018年 ShouBaTeam. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TimerViewController : UIViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIGestureRecognizer+Block.h | <reponame>LYM-mg/MGDemo<filename>MGDemo/turnView/MGCategory/UIGestureRecognizer+Block.h
//
// UIGestureRecognizer+Block.h
// MGDemo
//
// Created by <EMAIL> on 2017/7/29.
// Copyright © 2017年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^MGGestureBlock)(id gesture);
@interface UIGestureReco... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UITextField+Shake.h | //
// UITextField+Shake.h
// VideoShare
//
// Created by i-<EMAIL> on 2017/6/21.
// Copyright © 2017年 i-Techsys. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UITextField (Shake)
/**
* 为textField扩展一个左右晃动的动画
*/
- (void)shakeWithDuration:(CFTimeInterval)duration;
@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/NSTimer+Block.h | //
// NSTimer+Block.h
// drawDemo
//
// Created by newunion on 2018/12/10.
// Copyright © 2018年 firestonetmt. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSTimer (Block)
+ (NSTimer*)scheduledTimerWithTimeInterval:(NSTimeInterval)interval block:(void(^)(void))block... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIImage+ImageEffects.h | //
// UIImage+ImageEffects.h
// SwiftLive
//
// Created by 查俊松 on 16/4/29.
// Copyright © 2016年 DotC_United. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (ImageEffects)
- (UIImage *)applyLightEffect;
- (UIImage *)applyExtraLightEffect;
- (UIImage *)applyDarkEffect;
- (UIImage *)applyTintEff... |
LYM-mg/MGDemo | MGDemo/turnView/ThirdLib/refresh/PMLineLayer.h | //
// PMLineLayer.h
// PMElasticRefresh
//
// Created by Andy on 16/4/16.
// Copyright © 2016年 AYJk. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>
@interface PMLineLayer : CAShapeLayer
- (instancetype)initWithSize:(CGSize)ballSize StrokeColor:(UIColor *)strokeColor animationHeig... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/V/MGSearchCell.h | <gh_stars>100-1000
//
// MGSearchCell.h
// MGDemo
//
// Created by ming on 16/6/21.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGSearchCell : UITableViewCell
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/C/MGHeadPushViewController.h | <reponame>LYM-mg/MGDemo
//
#import "MGHeadPushViewController.h"
#import "MGHomeModel.h"
@interface MGHeadPushViewController : UIViewController
//headModel用来设置导航条的属性,在推荐页面push来时直接把headModel正向传值传来,需要注意这里重写set方法赋值的时
//当前控制器的navigationController是空的,无法修改导航条的属性
@property (nonatomic, strong) MGHomeModel *headModel;
/** ... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UINavigationBar+ChangeColor.h | //
// UINavigationBar+ChangeColor.h
// ProductionReport
//
// Created by i-Tech<EMAIL> on 17/1/17.
// Copyright © 2017年 i-Techsys. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UINavigationBar (ChangeColor)
/**
* 隐藏导航栏下的横线,背景色置空
*/
- (void)star;
/**
* @param color 最终显示颜色
* @param scrollView ... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/V/MGHeadView.h | //
// MGHeadView.h
// turnView
//
// Created by ming on 16/6/13.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
/** 屏幕宽度 */
#define MGScreen_W [UIScreen mainScreen].bounds.size.width
@class MGSectionModel;
@interface MGHeadView : UITableViewHeaderFooterView
/** sertion模型 */
@property... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIDevice+Extension.h | <reponame>LYM-mg/MGDemo
//
// UIDevice+Extension.h
// MGMiaoBo
//
// Created by ming on 16/9/10.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIDevice (Extension)
/** 当前试试设备 */
+ (NSString*)deviceVersion;
/** 是否横屏 */
- (BOOL)isLandscape;
/**
* 强制屏幕转屏
*
* @param orie... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/Pubuliu/Cell/MGShopCell.h | <filename>MGDemo/turnView/Class/ming/Pubuliu/Cell/MGShopCell.h
//
// MGShopCell.h
// MGPuBuLiuDemo
//
// Created by ming on 16/6/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@class MGShopModel;
@interface MGShopCell : UICollectionViewCell
@property (nonatomic, strong) MGShopModel... |
LYM-mg/MGDemo | MGDemo/turnView/Extesion/UIColor+HexColor.h | //
// UIColor+HexColor.h
// HexColor
//
// Created by <NAME> on 16/4/26.
// Copyright © 2016年 <NAME>. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (HexColor)
//16进制自动转换RGB颜色
+ (UIColor *)colorWithHexString:(NSString *)stringToConvert;
@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UINavigationBar+Extension.h | <gh_stars>100-1000
//
// UINavigationBar+Extension.h
// MGDemo
//
// Created by <EMAIL> on 2017/7/29.
// Copyright © 2017年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UINavigationBar (Extension)
//@property (nonatomic,assign) BOOL mg_hideStatusBarBackgroungView;
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Extesion/MQGradientProgressView.h | <reponame>LYM-mg/MGDemo
//
// MQGradientProgressView.h
// MQGradientProgress
//
// Created by <EMAIL> on 2017/8/25.
// Copyright © 2017年 i-Techsys. All rights reserved.
//
#import <UIKit/UIKit.h>
#define MQRGBColor(r, g, b) [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
@interface MQGr... |
LYM-mg/MGDemo | MGDemo/turnView/OSSImage.h | <filename>MGDemo/turnView/OSSImage.h
//
// OSSImage.h
// ImageUploaderDemo
//
// Created by apiapia on 8/1/17.
// Copyright © 2017 cnwoxiang. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef NS_ENUM(NSInteger, UploadImageState) {
UploadImageFailed = 0,
UploadImag... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/M/MGCellModel.h | <filename>MGDemo/turnView/Class/Search/M/MGCellModel.h<gh_stars>100-1000
//
// MGCellModel.h
// turnView
//
// Created by ming on 16/6/13.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MGCellModel : NSObject
/** 标题 */
@property (nonatomic, copy) NSString *title;
@... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/Pubuliu/Model/MGShopModel.h | //
// MGShopModel.h
// MGPuBuLiuDemo
//
// Created by ming on 16/6/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGShopModel : NSObject
@property (nonatomic, assign) CGFloat w;
@property (nonatomic, assign) CGFloat h;
@property (nonatomic, copy) NSString *img;
@property ... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIButton+Extension.h | <reponame>LYM-mg/MGDemo
//
// UIButton+Extension.m
// Created by <EMAIL> on 2017/7/29.
// Copyright © 2017年 ming. All rights reserved.
#import <UIKit/UIKit.h>
typedef void(^MGBtnBlock)(id btn);
@interface UIButton (Extension)
#pragma mark - SEL回调
+ (UIButton *)ButtonWithTitle:(NSString *)title backgroundColor: (... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIViewController+Utils.h | <filename>MGDemo/turnView/MGCategory/UIViewController+Utils.h
//
// UIViewController+Utils.h
// SwiftLive
//
// Created by Victor on 16/6/12.
// Copyright © 2016年 DotC_United. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIViewController (Utils)
+ (UIViewController *)currentVC;
+ (UIViewController *... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/M/MGHomeModel.h | <filename>MGDemo/turnView/Class/ming/M/MGHomeModel.h
//
// MGHomeModel.h
// MGDemo
//
// Created by ming on 16/7/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MGHomeModel : NSObject
/** 颜色 */
@property (nonatomic, copy) NSString *color;
/** 名字 */
@property (no... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/C/MGCollectionController.h | //
// MGCollectionController.h
// MGDemo
//
// Created by ming on 16/6/22.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGCollectionController : UIViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/M/MGBodyModel.h | //
// MGBodyModel.h
// MGDemo
//
// Created by ming on 16/7/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MGBodyModel : NSObject
/** 每一行的标题 */
@property (nonatomic, copy) NSString *section_title;
/** 图片的URL */
@property (nonatomic, copy) NSString *imageURL;
/**... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Animation/V/CustomAnimateTransitionPush.h | <filename>MGDemo/turnView/Class/Animation/V/CustomAnimateTransitionPush.h
//
// CustomAnimateTransitionPop.h
// animateTransition
//
// Created by ming on 16/6/26.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface CustomAnimateTransitionPush : N... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/M/MGSectionModel.h | //
// MGSectionModel.h
// turnView
//
// Created by ming on 16/6/13.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MGSectionModel : NSObject
/** 头部标题 */
@property (nonatomic, copy) NSString *sectionTitle;
/** 是否是展开的 */
@property (nonatomic, assign) BOOL isExpande... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIView+LYMExtension.h | <filename>MGDemo/turnView/MGCategory/UIView+LYMExtension.h<gh_stars>100-1000
//
// UIView+LYMExtension.h
// UIView+LYMExtension.h
//
// Created by ming on 13/12/10.
// Copyright © 2013年 ming. All rights reserved.
/**
此类不仅封装了控件的Frame,还封装了快速从XIB创建View的方法(仅限于XIB中只有一个View的时候)
此外,还封装了两个View是否有重叠的方法
*/
#import <UIKit... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/V/MGHeaderReusableView.h | //
// MGHeaderReusableView.h
// MGDemo
//
// Created by ming on 16/7/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@class MGHomeModel;
@interface MGHeaderReusableView : UICollectionReusableView
/** 头部模型属性 */
@property (nonatomic, strong) MGHomeModel *homeModel;
//便利构造方法
+ (instan... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Animation/C/MGDealImageViewController.h | <reponame>LYM-mg/MGDemo<filename>MGDemo/turnView/Class/Animation/C/MGDealImageViewController.h
//
// MGDealImageViewController.h
// MGDemo
//
// Created by newunion on 2019/4/4.
// Copyright © 2019年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface MGDealImageViewController... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/C/MGTranstionViewController.h | <gh_stars>100-1000
//
// MGTranstionViewController.h
// MGDemo
//
// Created by newunion on 2018/1/16.
// Copyright © 2018年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGTranstionViewController : UIViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/C/MGHeaderCollectionVC.h | <reponame>LYM-mg/MGDemo
//
// MGHeaderCollectionVC.h
// MGDemo
//
// Created by ming on 16/7/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGHeaderCollectionVC : UIViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIView+SpeedCreat.h | <reponame>LYM-mg/MGDemo<filename>MGDemo/turnView/MGCategory/UIView+SpeedCreat.h
//
// UIView+SpeedCreat.h
// Firestonelamp
//
// Created by newunion on 2019/3/20.
// Copyright © 2019年 firestonetmt. All rights reserved.
//
#import <UIKit/UIKit.h>
#pragma mark - UILabel
@interface UILabe... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/C/MGSearchViewController.h | <filename>MGDemo/turnView/Class/Search/C/MGSearchViewController.h
//
// MGSearchViewController.h
// MGDemo
//
// Created by ming on 16/6/21.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGSearchViewController : UITableViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/C/MGGIFViewController.h | <gh_stars>100-1000
//
// MGGIFViewController.h
// MGDemo
//
// Created by newunion on 2018/1/12.
// Copyright © 2018年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGGIFViewController : UIViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIColor+Extension.h | <reponame>LYM-mg/MGDemo
//
// UIColor+Extension.h
// VideoShare
//
// Created by <EMAIL> on 2017/6/20.
// Copyright © 2017年 i-Techsys. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIColor (Extension)
//随机颜色
+ (UIColor *)randomColor;
/** 16禁止转RGB */
+ (UIColor *)colorWithHexString:(NSString *)colorS... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Animation/C/MGAnimationPushVC.h | <reponame>LYM-mg/MGDemo
//
// MGAnimationPushVC.h
// MGDemo
//
// Created by ming on 16/7/8.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGAnimationPushVC : UIViewController
/** image */
@property (nonatomic,strong) UIImage *myImage;
/** backImageView */
@property (nonato... |
LYM-mg/MGDemo | MGDemo/turnView/ThirdLib/refresh/UIScrollView+ElasticRefresh.h | <reponame>LYM-mg/MGDemo<gh_stars>100-1000
//
// UIScrollView+ElasticRefresh.h
// PMElasticRefresh
//
// Created by Andy on 16/4/16.
// Copyright © 2016年 AYJk. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "PMElasticView.h"
@interface UIScrollView (ElasticRefresh)
@property (nonatomic, strong) PMElasticV... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/V/MGBodyCell.h | //
// MGBodyCell.h
// MGDemo
//
// Created by ming on 16/7/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@class MGBodyModel;
@interface MGBodyCell : UICollectionViewCell
/** 模型属性 */
@property (nonatomic, strong) MGBodyModel *bodyModel;
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/V/TableViewHead.h | <filename>MGDemo/turnView/Class/Search/V/TableViewHead.h
//
// TableViewHead.h
// turnView
//
// Created by ming on 16/6/13.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface TableViewHead : UIView
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/Animation/C/MGAllocViewController.h | //
// MGAllocViewController.h
// MGDemo
//
// Created by newunion on 2019/4/9.
// Copyright © 2019 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface MGAllocViewController : UIViewController
@end
NS_ASSUME_NONNULL_END
|
LYM-mg/MGDemo | MGDemo/turnView/Class/Animation/C/MGAnimationVC.h | //
// MGAnimationVC.h
// MGDemo
//
// Created by ming on 16/7/8.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGAnimationVC : UIViewController
/** 当前按钮 */
@property(strong,nonatomic)UIButton *button;
@end
|
LYM-mg/MGDemo | MGDemo/turnView/ThirdLib/refresh/PMElasticRefresh.h | //
// PMElasticRefresh.h
// PMElasticRefresh
//
// Created by Andy on 16/4/16.
// Copyright © 2016年 AYJk. All rights reserved.
//
#ifndef PMElasticRefresh_h
#define PMElasticRefresh_h
#import "UIScrollView+ElasticRefresh.h"
#endif /* PMElasticRefresh_h */
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/ViewController/UIViewController+Extension.h | <filename>MGDemo/turnView/MGCategory/ViewController/UIViewController+Extension.h
//
// UIViewController+Extension.h
// NewUnion
//
// Created by Ming on 16/12/18.
// Copyright © 2016年 NewUnion. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIViewController (Extension)
/**
* 导航栏当前控制器
*/
+ (UIViewCo... |
LYM-mg/MGDemo | MGDemo/turnView/ThirdLib/LLGifView/LLGifImageView.h | <reponame>LYM-mg/MGDemo
//
// LLGifImageView.h
// LLGifView
//
// Created by WangZhaomeng on 2017/6/14.
// Copyright © 2017年 MaoChao Network Co. Ltd. All rights reserved.
//
#import <UIKit/UIKit.h>
/**
播放gif图片类。优化播放gif时内存占用过高。
原理是时间换空间,播发时并不是把所有图片缓存到内存中,而是实时的从资源中读取图片显示。
帧与帧的间隔越小CPU占用越大。
另外还实现了gif动画的暂停、快进、慢放功能... |
LYM-mg/MGDemo | MGDemo/turnView/ThirdLib/refresh/PMElasticView.h | <gh_stars>100-1000
//
// PMElasticView.h
// PMElasticRefresh
//
// Created by Andy on 16/4/13.
// Copyright © 2016年 AYJk. All rights reserved.
//
#import <UIKit/UIKit.h>
typedef void(^PMRefreshBlock)(void);
@interface PMElasticView : UIView
- (instancetype)initWithBindingScrollView:(UIScrollView *)bindingScrollV... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/C/MGVideoViewController.h | <filename>MGDemo/turnView/Class/ming/C/MGVideoViewController.h
//
// MGVideoViewController.h
// turnView
//
// Created by ming on 16/6/14.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGVideoViewController : UIViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/V/MGHeaderFlowLayout.h | <filename>MGDemo/turnView/Class/ming/V/MGHeaderFlowLayout.h
//
// MGHeaderFlowLayout.h
// MGDemo
//
// Created by ming on 16/7/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGHeaderFlowLayout : UICollectionViewFlowLayout
//默认为64.0, default is 64.0
@property (nonatomic, a... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/C/MGAlertController.h | //
// MGAlertController.h
// MGDemo
//
// Created by newunion on 2018/1/17.
// Copyright © 2018年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGAlertController : UIAlertController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/MGRefreshGifHeader.h | /*
@header MGRefreshGifHeader.h
@abstract MGMiaoBo 关于源代码文件的一些基本描述
@author Created by ming on 16/9/10.
Copyright © 2016年 ming. All rights reserved.
*/
//#import <MJRefresh/MJRefresh.h>
//@interface MGRefreshGifHeader : MJRefreshGifHeader
//
//@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIButton+EnlargeTouchArea.h | //
// UIButton+EnlargeTouchArea.h
// SwiftLive
//
// Created by Victor on 16/4/25.
// Copyright © 2016年 DotC_United. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIButton (EnlargeTouchArea)
- (void)setEnlargeEdgeWithTop:(CGFloat)top right:(CGFloat)right bottom:(CGFloat)bottom left:(CGFloat)left;
@... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIView+MGBadge.h | <filename>MGDemo/turnView/MGCategory/UIView+MGBadge.h
//
// UIView+MGBadge.h
// MGDemo
//
// Created by newunion on 2019/4/10.
// Copyright © 2019 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "MGBadgeProtocol.h"
NS_ASSUME_NONNULL_BEGIN
@interface UIView (MGBadge)<MGBadgeProtocol>
@end
NS_ASSUM... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIBarButtonItem+Extension.h | //
// UIBarButtonItem+Extension.h
// 03-百思不得姐-我的
//
// Created by ming on 13/12/5.
// Copyright © 2013年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIBarButtonItem (Extension)
/** 设置背景图片和颜色 */
+ (UIBarButtonItem *)itemWithBackgroundImage:(NSString *)backgroundImage BackgroundhighImage:(NSStri... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/MGButton+Delay.h | //
// MGButton+Delay.h
// MGDemo
//
// Created by newunion on 2018/1/22.
// Copyright © 2018年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
#define defaultInterval 1.0//默认时间间隔
@interface MGButton_Delay: UIButton
@property(nonatomic,assign) IBInspectable CGFloat timeInterval;//用这个给重复点击加间隔
@property(nonatom... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/NSObject+HUD.h | <filename>MGDemo/turnView/MGCategory/NSObject+HUD.h
//
// NSObject+HUD.h
// MGMiaoBo
//
// Created by ming on 16/9/10.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSObject (HUD)
/**
* 弹框提示
*
* @param info 要提醒的内容
*/
- (void)showInfo:(NSString *)info;
#prag... |
LYM-mg/MGDemo | MGDemo/turnView/MGNavVC.h | //
// MGNavVC.h
// MGDemo
//
// Created by ming on 16/7/8.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGNavVC : UINavigationController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/MGCategoryHeader.h | /*
@header CategoryHeader.h
@abstract MGMiaoBo 关于源代码文件的一些基本描述
@author Created by ming on 16/9/10.
Copyright © 2016年 ming. All rights reserved.
*/
#import "UIView+LYMExtension.h"
#import "UIButton+Extension.h"
#import "UIViewController+HUD.h"
#import "UIImage+Extension.h"
#import "UIImageView+Extension.h"
#i... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/UIImage+Extension.h | <gh_stars>100-1000
//
// UIImage+Extension.h
// MGMiaoBo
//
// Created by ming on 16/9/10.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIImage (Extension)
/**
* 生成一张高斯模糊的图片
*
* @param image 原图
* @param blur 模糊程度 (0~1)
*
* @return 高斯模糊图片
*/
+ (UIImage *)blurIm... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/M/MGCar.h | <reponame>LYM-mg/MGDemo
//
// MGCar.h
// MGDemo
//
// Created by ming on 16/7/7.
// Copyright © 2016年 ming. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface MGCar : NSObject
/** 图标 */
@property (nonatomic, copy) NSString *icon;
/** 名称 */
@property (nonatomic, copy) NSString *name;
+ (instanc... |
LYM-mg/MGDemo | MGDemo/turnView/Class/Search/C/MGTableController.h | //
// MGTableController.h
// turnView
//
// Created by ming on 16/6/13.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface MGTableController : UITableViewController
@end
|
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/Pubuliu/Layout/MGWaterflowLayout.h | //
// MGWaterflowLayout.h
// MGPuBuLiuDemo
//
// Created by ming on 16/6/9.
// Copyright © 2016年 ming. All rights reserved.
//
#import <UIKit/UIKit.h>
@class MGWaterflowLayout;
@protocol MGWaterflowLayoutDelegate <NSObject>
@required
- (CGFloat)waterflowLayout:(MGWaterflowLayout *)waterflowLayout heightForItemA... |
LYM-mg/MGDemo | MGDemo/turnView/ThirdLib/LLGifView/LLGifView.h | //
// LLGifView.h
// LLFoundation
//
// Created by wangzhaomeng on 16/11/15.
// Copyright © 2016年 MaoChao Network Co. Ltd. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface LLGifView : UIView
- (id)initWithFrame:(CGRect)frame filePath:(NSString *)filePath;
- (id)initWithFrame:(CGRect)frame data:(NSData *... |
LYM-mg/MGDemo | MGDemo/turnView/ThirdLib/refresh/PMBallLayer.h | //
// PMBallLayer.h
// PMElasticRefresh
//
// Created by Andy on 16/4/13.
// Copyright © 2016年 AYJk. All rights reserved.
//
#import <QuartzCore/QuartzCore.h>
#import <UIKit/UIKit.h>
@interface PMBallLayer : CAShapeLayer
- (instancetype)initWithSize:(CGSize)ballSize fillColor:(UIColor *)fillColor animationHeight:... |
LYM-mg/MGDemo | MGDemo/turnView/MGCategory/NSString+Extension.h | <reponame>LYM-mg/MGDemo<filename>MGDemo/turnView/MGCategory/NSString+Extension.h
//
// NSString+NSString_Extension.h
// VideoShare
//
// Created by <EMAIL> on 2017/6/18.
// Copyright © 2017年 i-Techsys. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface NSString (Extension)
/** 获取Cache目录: */
- (... |
LYM-mg/MGDemo | MGDemo/turnView/Class/ming/V/MGRmndCell.h | <gh_stars>100-1000
//
// MGRmndCell.h
// MGHuntForCity
//
// Created by MacBook on 15/7/2.
// Copyright (c) 2015年 维尼的小熊. All rights reserved.
//
#import <UIKit/UIKit.h>
@class MGBodyModel;
@interface MGRmndCell : UITableViewCell
/** cell的模型 */
@property (nonatomic, strong) MGBodyModel *model;
+ (instancetype)c... |
r4d2/fatal | fatal/type/reflect_member_function.h | <reponame>r4d2/fatal<filename>fatal/type/reflect_member_function.h
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be f... |
r4d2/fatal | fatal/type/traits.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/type/enum.h | <gh_stars>1-10
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
... |
r4d2/fatal | fatal/type/call_traits.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/type/transform.h | <filename>fatal/type/transform.h
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the sa... |
r4d2/fatal | fatal/container/variant.h | <reponame>r4d2/fatal
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory... |
r4d2/fatal | fatal/container/flag_set.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/type/sequence.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/math/numerics.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/type/prefix_tree.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/preprocessor.h | <gh_stars>1-10
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
... |
r4d2/fatal | fatal/type/tag.h | <filename>fatal/type/tag.h
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same dir... |
r4d2/fatal | fatal/type/map.h | <reponame>r4d2/fatal
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory... |
r4d2/fatal | fatal/test/driver.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/container/tuple_tags.h | <filename>fatal/container/tuple_tags.h
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in ... |
r4d2/fatal | fatal/type/pair.h | <reponame>r4d2/fatal
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory... |
r4d2/fatal | fatal/test/lib.h | <reponame>r4d2/fatal
/*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory... |
r4d2/fatal | fatal/type/list.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
r4d2/fatal | fatal/container/tagged_tuple.h | /*
* Copyright (c) 2014, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#pragma once
... |
BranchofLight/Breakout | src/Rect.h | #pragma once
// Struct for creating rectangles
/*struct Rect
{
float x;
float y;
float width;
float height;
};
bool isRectCollision(Rect r1, Rect r2)
{
// Calculate the sides of first
float leftThis = r1.x;
float rightThis = r1.x + r1.width;
float topThis = r1.y;
float bottomThis = r1.y +... |
BranchofLight/Breakout | src/GameObject.h | <gh_stars>0
// Class Objectives:
// - Create a base class for all objects used
#pragma once;
#include "LineSegment.h"
enum DIRECTION { UP, DOWN, LEFT, RIGHT, NONE };
class GameObject
{
public:
GameObject(int, int, std::string);
~GameObject();
void move(DIRECTION, float);
void accelerate(float);... |
BranchofLight/Breakout | src/AngleMath.h | <reponame>BranchofLight/Breakout<gh_stars>0
#pragma once
#include <SFML\System.hpp>
#include "LineSegment.h"
// This will be part of the physics engine in later games
int dot(sf::Vector2<int>, sf::Vector2<int>);
int calculateAngle(LineSegment, LineSegment);
int normalizeAngle(int);
static const float PI = ... |
BranchofLight/Breakout | src/Ball.h | <reponame>BranchofLight/Breakout<filename>src/Ball.h
// Class Objectives:
// - Contain all code for handling ball objects
#pragma once;
#include "GameObject.h"
#include "Paddle.h"
class Ball : public GameObject
{
public:
Ball(int, int, std::string);
~Ball();
void dropBall(float);
bool getHasDropp... |
BranchofLight/Breakout | src/Brick.h | <reponame>BranchofLight/Breakout
// Class Objectives:
// - Handle all brick functionality
#pragma once
#include "GameObject.h"
class Brick : public GameObject
{
public:
Brick(int, int, std::string);
~Brick();
void handleCollision();
void handleBallCollision();
private:
};
|
BranchofLight/Breakout | src/LineSegment.h | #pragma once
#include <SFML\System.hpp>
class LineSegment
{
public:
LineSegment();
LineSegment(int, int, int, int);
LineSegment calculateNormal();
int** getArray();
sf::Vector2<int> p1;
sf::Vector2<int> p2;
};
|
BranchofLight/Breakout | src/Game.h | <reponame>BranchofLight/Breakout
// Class Objectives:
// Setup game
// Handle any changes in view (eg. menus, level advances, etc) including generating a new level
// Hold reference to a Level which holds all level objects
// Changes score as approriate
// Disposes of all objects when game is closed
#pragma onc... |
BranchofLight/Breakout | src/ResourceManager.h | <reponame>BranchofLight/Breakout
// Class objectives:
// - Hold and manage all objects that the game contains
// MAYBE: Have functions to allow concurrent data between new levels (eg. same active powerups still active, etc)
#pragma once;
#include <vector>
#include "GameObject.h"
#include "Ball.h"
#include "P... |
BranchofLight/Breakout | src/stdafx.h | <filename>src/stdafx.h
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
// TODO: reference additional headers your program requires here
#include <SFML/Graphics... |
BranchofLight/Breakout | src/Paddle.h | <gh_stars>0
// Class objectives:
// - Contain all functionality for the paddle
#pragma once
#include "GameObject.h"
class Paddle : public GameObject
{
public:
Paddle(int, int, std::string);
~Paddle();
void handleCollision();
void move(DIRECTION, float);
DIRECTION getDirectionMoving();
pri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.