育灵童开发中心员工调薪分档及标准

2017-2-23 zhulinan 其它

[该文章已设置加密,请点击标题输入密码访问]

评论(0) 浏览(99)

yum常用命令

2019-5-17 dingshangchao 服务器

yum的命令形式一般是如下:yum [options] [command] [package ...]
常用的命令包括:


自动搜索最快镜像插件:   yum install yum-fastestmirror
安装yum图形窗口插件:    yum install yumex
查看可能批量安装的列表: yum grouplist
1 安装
yum install 全部安装
yum install package1 安装指定的安装包package1
yum groupinsall group1 安装程序组group1
2 更新和升级
yum update 全部更新
yum update package1 更新指定程序包package1
yum check-update 检查可更新的程序
yum upgrade package1 升级指定程序包package1
yum groupupdate group1 升级程序组group1
3 查找和显示
yum info package1 显示安装包信息package1
yum list 显示所有已经安装和可以安装的程序包
yum list package1 显示指定程序包安装情况package1
yum groupinfo group1 显示程序组group1信息yum search string 根据关键字string查找安装包
4 删除程序
yum remove | erase package1 删除程序包package1
yum groupremove group1 删除程序组group1
yum deplist package1 查看程序package1依赖情况
5 清除缓存
yum clean packages 清除缓存目录下的软件包
yum clean headers 清除缓存目录下的 headers
yum clean oldheaders 清除缓存目录下旧的 headers
yum clean, yum clean all (= yum clean packages; yum clean oldheaders) 清除缓存目录下的软件包及旧的headers

标签: yum的命令形式一般是如下:yum [options] [command] [package ...]

评论(0) 浏览(3)

项目中的工具类

2019-5-17 王建伟 iOS开发

项目中我们一般需要新建一个工具类,用来实现一些项目中经常使用的功能,方便复用,这边我收集了一些自己经常使用的功能

1.添加文字提示框

+(void)showHubTipWithString:(NSString *)string offsetY:(CGFloat)y{  
    if (string && string.length > 0) {
        dispatch_async(dispatch_get_main_queue(), ^{
            MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:[[UIApplication sharedApplication] keyWindow] animated:YES];
            hud.mode = MBProgressHUDModeText;
            hud.detailsLabel.font = [UIFont boldSystemFontOfSize:17.0];
            hud.detailsLabel.text =string;
            hud.margin = 20.f;
            hud.offset=SPPoint(0, y);
            hud.removeFromSuperViewOnHide = YES;
            [hud hideAnimated:YES afterDelay:0.8];
        });
    }    
}

2.添加加载提示框

+(MBProgressHUD*)showLoadingHubAddedTo:(UIView*)view{
    MBProgressHUD *hud = [[MBProgressHUD alloc] initWithView:view];
    hud.contentColor=[UIColor whiteColor];
    hud.bezelView.backgroundColor=[UIColor colorWithWhite:0.1 alpha:1];
    hud.mode = MBProgressHUDModeIndeterminate;
    hud.detailsLabel.font=SPFont(17);
    hud.minShowTime=2;
    hud.userInteractionEnabled = YES;
    hud.removeFromSuperViewOnHide = YES;
    [view addSubview:hud];
    return hud;
}

3.手机号验证

+(BOOL)validateMobile:(NSString*)mobile{
    NSString*mobileRegex=@"^(1[123456789][0-9]{9}$)";
    NSPredicate*mobileTest=[NSPredicate predicateWithFormat:@"SELF MATCHES %@",mobileRegex];
    return [mobileTest evaluateWithObject:mobile];
    
}

4.密码验证

+(BOOL)validatePassword:(NSString*)password{
    NSString*passwordRegex=@"^([a-zA-Z0-9]{6,12}$)";
    NSPredicate*passwordTest=[NSPredicate predicateWithFormat:@"SELF MATCHES %@",passwordRegex];
    return [passwordTest evaluateWithObject:password];  
}

5.获取段落行高

+(CGFloat)GetCellHeightWithString:(NSString *)string width:(CGFloat)width attributes:(NSDictionary *)attributes{
    
    
    
    CGRect sizestring = [string boundingRectWithSize:CGSizeMake(width,MAXFLOAT) options:
                        NSStringDrawingUsesLineFragmentOrigin| NSStringDrawingUsesFontLeading  attributes:attributes context:nil];
    
    return ceil(sizestring.size.height);
}

6.秒数到时间到转化

+(NSString*)changeNumberToTime:(NSInteger)number{
    NSString*minute=[NSString stringWithFormat:@"%02ld",number%3600/60];
    NSString*second=[NSString stringWithFormat:@"%02ld",number%60];
    return [NSString stringWithFormat:@"%@:%@",minute,second];
    
}

评论(0) 浏览(5)

js获取视频或者音频时长

2019-5-16 hubo JavaScript

js获取视频或者音频时长

阅读全文>>

评论(0) 浏览(4)

百宝箱

2019-5-15 zhulinan 其它

2019-05-15 其它->App Store 审核指南

阅读全文>>

评论(0) 浏览(119)

从零开始画图标系列:启动图标设计指南

2019-5-10 zhenggaoyun 视觉设计

想要在启动图标设计上入门,就要先从规范开始学习,然后了解不同的风格以及对应风格的设计过程。

阅读全文>>

评论(0) 浏览(18)

PHP 7.4 新语法:箭头函数

2019-5-10 dingshangchao php开发

短闭包,也叫做箭头函数,是一种用 php 编写的短函数。

阅读全文>>

评论(0) 浏览(12)

简单的网络加载图的实现

2019-5-10 王建伟 iOS开发

在编写项目的时候我们需要进行网络的加载,那么网络加载需要时间和重新加载的选项,所以我们可以需要一个加载界面,在网络加载的过程中,重新加载的时候呈现

编辑一个简单的网络加载界面,我们需要一个加载动画,以及加载成功或者失败的处理方法

1.建立一个UIView的子类,LoadingView

2.我们需要的属性:
a:CAShapeLayer*_loadingShapeLayer(制作简单动画);
b:UILabel*promptLabel(提示文字);
c:UIButton*reloadButton(重新加载按键) ;
d:LoadingFailBlock failBlock(加载失败的事件处理块)

3.初始化界面

+(LoadingView*)ShowLoadingViewFrame:(CGRect)frame withSuperView:(UIView *)view{
     LoadingView*loadingview=[[LoadingView alloc]initWithFrame:frame];
     [view addSubview:loadingview];
     [loadingview loadingShapeLayerAnimation];
     return loadingview;
}

-(instancetype)initWithFrame:(CGRect)frame{
    if(self=[super initWithFrame:frame]){
        self.backgroundColor=[UIColor whiteColor];
        _loadingShapeLayer=[[CAShapeLayer alloc]init];
        _loadingShapeLayer.frame=SPFrame(frame.size.width/2-40, frame.size.height/2-100, 80,80 );
        _loadingShapeLayer.path=[UIBezierPath bezierPathWithOvalInRect:SPFrame(0, 0, 80,80 )].CGPath;
        _loadingShapeLayer.fillColor=nil;
        _loadingShapeLayer.strokeColor=[UIColor lightGrayColor].CGColor;
        _loadingShapeLayer.lineWidth=2;
        _loadingShapeLayer.lineJoin=kCALineCapRound;
        _loadingShapeLayer.lineDashPattern=@[@15,@8];
        [self.layer addSublayer:_loadingShapeLayer];
        
        promptLabel=[[UILabel alloc]initWithFrame:SPFrame(frame.size.width/2-40, frame.size.height/2-100, 80,80 )];
        promptLabel.backgroundColor=[UIColor clearColor];
        promptLabel.text=@"正在加载";
        promptLabel.textColor=[UIColor lightGrayColor];
        promptLabel.font=SPFont(15);
        promptLabel.textAlignment=NSTextAlignmentCenter;
        [self addSubview:promptLabel];
      
    }
    
    return self;
}

4.实现方法:加载成功

-(void)LoadingSuccessComplation:(void (^)(void))complation{
    SPSelf;
    [UIView animateWithDuration:2 delay:0 usingSpringWithDamping:1 initialSpringVelocity:0.0f options:UIViewAnimationOptionLayoutSubviews animations:^{
        weakSelf.transform=CGAffineTransformMakeScale(0.001, 0.001);
    } completion:^(BOOL finished) {
        [weakSelf removeFromSuperview];
        
    }];
    
    if(complation){
       complation();
    }

    
}

5.实现方法:加载失败

- (void)LoadingFailComplation:(void (^)(void))complation{
    [self stopLoadingShapeLayerAnimation];
    promptLabel.text=@"加载失败";
    [self createReloadingButton];
    SPSelf;
    if(complation){
        weakSelf.failBlock = complation;
    }
    
}
-(void)createReloadingButton{
    reloadButton=[[UIButton alloc]initWithFrame:SPFrame(0, 0, 100, 30)];
    reloadButton.center=SPPoint(self.frame.size.width/2, self.frame.size.height/2+50);
    [reloadButton setTitle:@"重新加载" forState:UIControlStateNormal];
    [reloadButton setTitleColor:[UIColor orangeColor] forState:UIControlStateNormal];
    reloadButton.backgroundColor=[UIColor whiteColor];
    reloadButton.layer.cornerRadius=14;
    reloadButton.layer.masksToBounds=YES;
    reloadButton.layer.borderWidth=1;
    reloadButton.layer.borderColor=[UIColor orangeColor].CGColor;
    reloadButton.titleLabel.font=SPFont(14);
    [reloadButton addTarget:self action:@selector(reloadEvent) forControlEvents:UIControlEventTouchUpInside];
    [self addSubview:reloadButton];
    
}
/*
 *重新加载按键点击事件*
 */
-(void)reloadEvent{
    [reloadButton removeFromSuperview];
    [self loadingShapeLayerAnimation];
    self.failBlock();
    
}

6.动画实现

/*
 *load圈转动*
 */
-(void)loadingShapeLayerAnimation{
    CABasicAnimation*rotate=[CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
    rotate.fromValue=0;
    rotate.toValue=@(M_PI*2);
    rotate.duration=3;
    rotate.timingFunction=[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
    rotate.repeatCount=HUGE;
    rotate.fillMode=kCAFillModeForwards;
    rotate.removedOnCompletion=NO;
    [_loadingShapeLayer addAnimation:rotate forKey:rotate.keyPath];
    
}

评论(0) 浏览(12)

动态获取权限

2019-5-8 liuyingcong 安卓开发

   

阅读全文>>

评论(0) 浏览(14)

docker之Dockerfile

2019-5-7 hubo 服务器

docker之Dockerfile

阅读全文>>

评论(0) 浏览(10)

网站备案号:京ICP备11043289号-1 北京市公安局网络备案 海1101084571
版权所有 北京育灵童科技发展有限公司 Copyright © 2002-2019 www.elight.cn, All Rights Reserved