IOS登陆+注册+抽奖+排行榜
要求:三个页面(登录页面,pickerView页面,排行榜页面),pickerView页面是三个组件,每个组件显示0-9,点击按钮进行随机,获得的值存入排行榜,排行榜显示大于500的最高的10个分数和对应的用户名,切换页面可以用任何方法(0-9循环显示,登录注销[可以有不同的用户],判断用户名是否为邮箱[正则表达式])
说明:
1.要修改xml文件到当前系统桌面,dic.xml保存的是用户名和密码,array.xml是保存的积分榜
2.正则表达式用在注册页面,在注册用户的时候用户名需要经过正则表达式的验证,判断是否是邮箱
3.有一个默认的admin,admin账户
4.排行榜显示是用的tableView显示的
疑惑:
1.如何创建文件在当前项目下
2.为什么view之间传数组传不了,我知道数组要先初始化
3.数组排序,用内置的排序方法,compare:,从大到小用什么参数
4.如何让tableView中的table随array的改变而刷新
项目源码:http://download.csdn.net/detail/s10141303/5970243
步骤:
注册view
RegistViewController.h:
- #import <UIKit/UIKit.h>
- @class LoginViewController;
- @interface RegistViewController : UIViewController
- - (IBAction)click:(id)sender;
- @property (retain, nonatomic) IBOutlet UITextField *txtName;
- @property (retain, nonatomic) IBOutlet UITextField *txtpassword;
- @property (retain, nonatomic) IBOutlet UITextField *txtConfirmPassword;
- @property(retain,nonatomic) NSMutableDictionary *dic;
- @property(retain,nonatomic) LoginViewController *loginView;
- @end
RegistViewController.m:
- #import "RegistViewController.h"
- #import "info.h"
- #import "LoginViewController.h"
- #define OK_BUTTON 0 //登陆按钮
- #define CANCEL_BUTTON 1 //取消按钮
- #define BOARD 2 //键盘点击
- #define RETURN_BUTTON 3 //返回登陆界面
- @interface RegistViewController ()
- @end
- @implementation RegistViewController
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- }
- return self;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- self.dic = [[[NSMutableDictionary alloc] init] autorelease];
- [self.dic setObject:@"admin" forKey:@"admin"];
- }
- - (IBAction)click:(id)sender {
- UIButton *button = (UIButton*)sender;
- //登陆按钮
- if (button.tag == OK_BUTTON)
- {
- //[[info getInfo] initDic];//初始化dic,包含了admin账号
- NSString *path = @"Users/zl201/Desktop/dic.xml";
- NSMutableDictionary *dicc = [NSMutableDictionary dictionaryWithContentsOfFile:path];
- NSLog(@"文件读取成功");
- NSLog(@"%@",dicc);
- //如果为空
- if([self.txtName.text isEqualToString:@""]||[self.txtpassword.text isEqualToString:@""]||[self.txtConfirmPassword.text isEqualToString:@""])
- {
- UIAlertView * a = [[UIAlertView alloc] initWithTitle:@"友情提醒" message:@"输入不能为空" delegate:nil cancelButtonTitle:@"重试" otherButtonTitles:nil];
- [a show];
- }
- else
- {
- //检测注册是是否是邮箱
- if ([[info getInfo] isValidateEmail:self.txtName.text]) {
- [self.txtName resignFirstResponder];
- [self.txtpassword resignFirstResponder];
- [self.txtConfirmPassword resignFirstResponder];
- //看是否包含某个键
- if ([[dicc allKeys] containsObject:self.txtName.text]) {
- UIAlertView * a = [[UIAlertView alloc] initWithTitle:@"友情提醒" message:@"该用户已经存在,请重新注册新用户名!" delegate:nil cancelButtonTitle:@"重试" otherButtonTitles:nil];
- [a show];
- self.txtName.text = @"";
- self.txtpassword.text = @"";
- self.txtConfirmPassword.text = @"";
- }
- else
- {
- //查看是否两次密码不一样
- if (![self.txtConfirmPassword.text isEqualToString:self.txtpassword.text]) {
- UIAlertView * a = [[UIAlertView alloc] initWithTitle:@"友情提醒" message:@"两次输入密码不一样" delegate:nil cancelButtonTitle:@"重试" otherButtonTitles:nil];
- [a show];
- self.txtConfirmPassword.text = @"";
- }
- //注册成功
- else{
- UIAlertView * a = [[UIAlertView alloc] initWithTitle:@"" message:@"恭喜注册成功,请点击返回登陆界面按钮!" delegate:nil cancelButtonTitle:@"确认" otherButtonTitles:nil];
- [a show];
- [info getInfo].name = self.txtName.text;
- [info getInfo].password = self.txtpassword.text;
- NSLog(@"%@,%@",[info getInfo].name,[info getInfo].password);
- //写入文件
- [self.dic setObject:self.txtpassword.text forKey:self.txtName.text];
- NSLog(@"%@",self.dic);
- NSString *path = @"Users/zl201/Desktop/dic.xml";
- [self.dic writeToFile:path atomically:YES];
- NSLog(@"文件写入成功");
- self.txtConfirmPassword.text = @"";
- self.txtpassword.text = @"";
- self.txtName.text = @"";
- }
- }
- }
- else //不是邮箱
- {
- UIAlertView *aa = [[UIAlertView alloc] initWithTitle:@"友情提醒" message:@"用户名必须是邮箱" delegate:nil cancelButtonTitle:@"确定" otherButtonTitles:nil];
- [aa show];
- }
- }
- }
- //取消按钮
- else if (button.tag == CANCEL_BUTTON)
- {
- self.txtName.text = @"";
- self.txtpassword.text = @"";
- self.txtConfirmPassword.text = @"";
- [self.txtName resignFirstResponder];
- [self.txtpassword resignFirstResponder];
- [self.txtConfirmPassword resignFirstResponder];
- }
- //面板触发退出键盘
- else if(button.tag == BOARD)
- {
- [self.txtName resignFirstResponder];
- [self.txtpassword resignFirstResponder];
- [self.txtConfirmPassword resignFirstResponder];
- }
- //返回登陆界面
- else if(button.tag == RETURN_BUTTON)
- {
- [self.loginView.view removeFromSuperview];
- self.loginView = [[[LoginViewController alloc]initWithNibName:@"LoginViewController"bundle:nil]autorelease];
- [self.view insertSubview:self.loginView.view atIndex:10];
- }
- }
- - (void)dealloc {
- [_txtName release];
- [_txtpassword release];
- [_txtConfirmPassword release];
- [_dic release];
- [super dealloc];
- }
- @end
登陆View
LoginViewController.h:
- #import <UIKit/UIKit.h>
- @class RegistViewController;
- @class SecondViewController;
- @interface LoginViewController : UIViewController
- @property (retain, nonatomic) IBOutlet UITextField *txtName;
- @property (retain, nonatomic) IBOutlet UITextField *txtPassword;
- @property (retain,nonatomic)RegistViewController *registView;
- @property(retain,nonatomic)SecondViewController *secondView;
- - (IBAction)click:(id)sender;
- //接受保存当前登陆的账户和密码
- @property(retain,nonatomic) NSString *name;
- @property(retain,nonatomic) NSString *password;
- @end
LoginViewController.m:
- #import "LoginViewController.h"
- #import "info.h"
- #import "RegistViewController.h"
- #import "SecondViewController.h"
- #define OK_BUTTON 0 //登陆按钮
- #define CANCEL_BUTTON 1 //退出系统
- #define BOARD 2 //键盘点击
- #define RESIGN_BUTTON 3 //注销按钮
- #define REGISTER_BUTTON 4 //注册按钮
- @interface LoginViewController ()
- @end
- @implementation LoginViewController
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- }
- -(void)viewDidAppear:(BOOL)animated
- {
- NSLog(@"%@",[info getInfo].name);
- NSLog(@"%@",[info getInfo].password);
- if ([info getInfo].name != NULL&&[info getInfo].password != NULL) {
- self.txtName.text = [info getInfo].name;
- self.txtPassword.text = [info getInfo].password;
- }
- }
- - (void)dealloc {
- [_txtName release];
- [_txtPassword release];
- [_registView release];
- [_secondView release];
- [_name release];
- [_password release];
- [super dealloc];
- }
- - (IBAction)click:(id)sender {
- UIButton *button = (UIButton*)sender;
- //登陆按钮
- if (button.tag == OK_BUTTON)
- {
- [self.txtName resignFirstResponder];
- [self.txtPassword resignFirstResponder];
- //读取xml文件
- NSString *path = @"Users/zl201/Desktop/dic.xml";
- NSMutableDictionary *dic = [NSMutableDictionary dictionaryWithContentsOfFile:path];
- NSLog(@"文件读取成功");
- NSLog(@"%@",dic);
- NSString *s =[dic objectForKey:self.txtName.text];
- if ([s isEqualToString:self.txtPassword.text]) {
- [info getInfo].name = self.txtName.text;
- [info getInfo].password=self.txtPassword.text;
- UIAlertView * a = [[UIAlertView alloc] initWithTitle:@"登陆状态" message:@"恭喜登陆成功" delegate:nil cancelButtonTitle:@"确认" otherButtonTitles:nil];
- [a show];
- }
- else
- {
- UIAlertView * a = [[UIAlertView alloc] initWithTitle:@"登陆状态" message:@"登陆失败" delegate:nil cancelButtonTitle:@"重试" otherButtonTitles:nil];
- [a show];
- self.txtName.text = @"";
- self.txtPassword.text = @"";
- }
- }
- //系统退出
- else if (button.tag == CANCEL_BUTTON)
- {
- exit(0);
- }
- //面板触发退出键盘
- else if(button.tag == BOARD)
- {
- [self.txtName resignFirstResponder];
- [self.txtPassword resignFirstResponder];
- }
- //注销按钮
- else if(button.tag == RESIGN_BUTTON)
- {
- [info getInfo].name=@"";
- [info getInfo].password=@"";
- self.txtName.text = @"";
- self.txtPassword.text = @"";
- [self.txtName resignFirstResponder];
- [self.txtPassword resignFirstResponder];
- }
- //注册按钮
- else if(button.tag == REGISTER_BUTTON)
- {
- [self.registView.view removeFromSuperview];
- self.registView = [[[RegistViewController alloc]initWithNibName:@"RegistViewController" bundle:nil]autorelease];
- [self.view insertSubview:self.registView.view atIndex:10];
- }
- }
- @end
抽奖view
ViewController.h:
- #import <UIKit/UIKit.h>
- @class ShowViewController;
- @interface SecondViewController : UIViewController<UIPickerViewDataSource,UIPickerViewDelegate>
- @property (retain, nonatomic) IBOutlet UIPickerView *picker;
- - (IBAction)click:(id)sender;
- - (IBAction)OK:(id)sender;
- @property(nonatomic,retain)NSArray *images;
- @property(nonatomic,retain)NSArray *column1;
- @property(nonatomic,retain)NSArray *column2;
- @property(nonatomic,retain)NSArray *column3;
- @property(nonatomic,retain)NSArray *column4;
- @property(nonatomic,retain)NSArray *column5;
- @property(nonatomic,assign)long num;
- @property (retain, nonatomic) IBOutlet UILabel *lblShow;
- @property(nonatomic,retain)ShowViewController *showView;
- @property(nonatomic,retain)NSMutableArray *array;//记录分数
- @end
ViewController.m:
- #import "SecondViewController.h"
- #import <AudioToolbox/AudioToolbox.h>
- #import "info.h"
- @interface SecondViewController ()
- @end
- @implementation SecondViewController
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- self.array = [[NSMutableArray alloc] init];
- UIImage *image1 = [UIImage imageNamed:@"apple.png"];
- UIImage *image2 = [UIImage imageNamed:@"bar.png"];
- UIImage *image3 = [UIImage imageNamed:@"cherry.png"];
- UIImage *image4 = [UIImage imageNamed:@"crown.png"];
- UIImage *image5 = [UIImage imageNamed:@"lemon.png"];
- UIImage *image6 = [UIImage imageNamed:@"seven.png"];
- self.images = @[image1,image2,image3,image4,image5,image6];
- //创建30个ImageView
- for (int i=0; i<5; i++) {
- UIImageView *imageView1 = [[UIImageView alloc] initWithImage:image1];
- UIImageView *imageView2 = [[UIImageView alloc] initWithImage:image2];
- UIImageView *imageView3 = [[UIImageView alloc] initWithImage:image3];
- UIImageView *imageView4 = [[UIImageView alloc] initWithImage:image4];
- UIImageView *imageView5 = [[UIImageView alloc] initWithImage:image5];
- UIImageView *imageView6 = [[UIImageView alloc] initWithImage:image6];
- NSArray *arr = @[imageView1,imageView2,imageView3,imageView4,imageView5,imageView6];
- NSString *str = [NSString stringWithFormat:@"column%d",i+1];
- //OC特有方法,对一个可能存在可能不存在的变量赋值,本来是一个变量,可以转化成字符串,这样就可以改变字符串了
- [self setValue:arr forKey:str]; //KVC
- [imageView1 release];
- [imageView2 release];
- [imageView3 release];
- [imageView4 release];
- [imageView5 release];
- [imageView6 release];
- }
- srandom(time(NULL));
- //默认选择在第5000行
- for (int i=0; i<5; i++) {
- [self.picker selectRow:5000 inComponent:i animated:NO];
- }
- }
- -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView
- {
- return 5;
- }
- -(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component
- {
- return [self.images count]*10000;
- }
- -(UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view
- {
- //这种写法非常消耗内存
- // UIImageView *imageView = [[UIImage alloc] initWithImage:[self.images objectAtIndex:row]];
- // return imageView;
- NSString * str = [NSString stringWithFormat:@"column%d",component+1];
- NSArray *arr = [self valueForKey:str];
- return [arr objectAtIndex:row%6];
- }
- - (void)dealloc {
- [_picker release];
- [_images release];
- [_column1 release];
- [_column2 release];
- [_column3 release];
- [_column4 release];
- [_column5 release];
- [_showView release];
- [_lblShow release];
- [super dealloc];
- }
- //退出
- - (IBAction)click:(id)sender {
- // NSLog(@"%@",srandom(time(nil)));
- exit(0);
- }
- //确定
- - (IBAction)OK:(id)sender {
- int a[5];
- bool f=false;
- for (int i=0; i<5; i++) {
- int row = random() % [self.column1 count];
- int n = random() % 35;
- int j = row *n;
- [self.picker selectRow:j inComponent:i animated:YES];
- a[i]=j%6;
- }
- int sum=0;
- for (int i=0; i<5; i++)
- {
- sum = 1;
- if (f==false)
- {
- for (int j=i+1; j<5; j++)
- {
- if (a[i] == a[j])
- {
- sum++;
- }
- if (sum>=3)
- {
- f=true;
- break;
- }
- }
- }
- else
- {
- break;
- }
- }
- if (f) {
- // UIAlertView *a = [[UIAlertView alloc] initWithTitle:@"我中了" message:@"中了500万" delegate:self cancelButtonTitle:@"取消" otherButtonTitles:nil];
- // [a show];
- //[self playMusic:@"win"];//调用播放音乐
- }
- [self playMusic:@"crunch"];
- self.num = a[0]*10000+a[1]*1000+a[2]*100+a[3]*10+a[4];
- [info getInfo].number = self.num;
- NSLog(@"%d",self.num);
- NSLog(@"%@",[info getInfo].name);
- //self.lblScore.text = [NSString stringWithFormat:"当前得分:%d",self.num];
- self.lblShow.text = @"";
- NSLog(@"%@",[info getInfo].name);
- if ([info getInfo].name!=NULL&&self.num>=4000) {
- NSString *str = [NSString stringWithFormat:@"恭喜%@获得%d的高分上榜了",[info getInfo].name,self.num];
- self.lblShow.text = str;
- CGSize size = [self.lblShow.text sizeWithFont:self.lblShow.font];
- CGRect frame = CGRectMake(self.lblShow.frame.origin.x, self.lblShow.frame.origin.y, size.width, self.lblShow.frame.size.height);
- self.lblShow.frame = frame;
- NSLog(@"恭喜获得4000以上的高分");
- [self.array addObject:[NSString stringWithFormat:@"%@ %d",[info getInfo].name,self.num]];
- NSLog(@"%@",self.array);
- NSString *path = @"Users/zl201/Desktop/array.xml";
- [self.array writeToFile:path atomically:YES];
- NSLog(@"文件写入成功");
- }
- else if ([info getInfo].name!=NULL&&self.num<4000)
- {
- NSString *str = [NSString stringWithFormat:@"%@,很遗憾只有%d分,不足4000,加油",[info getInfo].name,self.num];
- self.lblShow.text = str;
- CGSize size = [self.lblShow.text sizeWithFont:self.lblShow.font];
- CGRect frame = CGRectMake(self.lblShow.frame.origin.x, self.lblShow.frame.origin.y, size.width, self.lblShow.frame.size.height);
- self.lblShow.frame = frame;
- }
- }
- -(void)playMusic:(NSString*)s
- {
- //通过NSBundle来获得音频文件的url地址
- NSURL *url = [[NSBundle mainBundle] URLForResource:s withExtension:@"wav"];
- SystemSoundID winSound;//整形类型的id
- //用音频服务,为音频文件绑定soundID
- AudioServicesCreateSystemSoundID((CFURLRef)url, &winSound);
- //通过绑定的soundId来播放音乐
- AudioServicesPlayAlertSound(winSound);
- }@end
排行榜View
ShowViewController.h:
- #import <UIKit/UIKit.h>
- @class SecondViewController;
- @interface ShowViewController : UIViewController<UITableViewDataSource, UITableViewDelegate>
- @property (retain, nonatomic) IBOutlet UITableView *tableView;
- @property(nonatomic,retain)NSMutableArray *array;//加上头行显示给tableView
- @property(nonatomic,retain)NSMutableArray *array1;//记录分数
- @property(nonatomic,retain)SecondViewController *secView;
- @end
ShowViewController.m:
- #import "ShowViewController.h"
- #import "SecondViewController.h"
- @interface ShowViewController ()
- @end
- @implementation ShowViewController
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- }
- return self;
- }
- - (void)viewDidLoad
- {
- [super viewDidLoad];
- NSString *path = @"Users/zl201/Desktop/array.xml";
- self.array1 = [NSArray arrayWithContentsOfFile:path];
- NSLog(@"文件读入成功");
- NSLog(@"%@",self.array1);
- [self.array1 sortUsingSelector:@selector(compare:options:)]; //如何倒序
- NSLog(@"%@",self.array1);
- self.array = [NSMutableArray arrayWithObject:@"积分排行榜(>=4000):"];
- [self.array addObjectsFromArray:self.array1];
- }
- - (void)didReceiveMemoryWarning
- {
- [super didReceiveMemoryWarning];
- // Dispose of any resources that can be recreated.
- }
- - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView
- {
- return 1;
- }
- - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
- {
- return [self.array count];
- }
- - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
- {
- NSString *MyIdentifier = @"MyIdentifier";
- UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:MyIdentifier];
- if (cell == nil) {
- cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:MyIdentifier];
- }
- NSString *titleStr = [self.array objectAtIndex:indexPath.row];
- cell.textLabel.text = titleStr;
- return cell;
- }
- -(void)dealloc
- {
- [_array release];
- [_tableView release];
- [super dealloc];
- }
- @end
IOS登陆+注册+抽奖+排行榜的更多相关文章
- iOS 登陆的实现四种方式
iOS 登陆的实现四种方式 一. 网页加载: http://www.cnblogs.com/tekkaman/archive/2013/02/21/2920218.ht ml [iOS登陆的实现] A ...
- 微信小程序 使用HMACSHA1和md5为登陆注册报文添加指纹验证签名
对接口请求报文作指纹验证签名相信在开发中经常碰到, 这次在与java后端一起开发小程序时,就碰到需求对登陆注册请求报文添加指纹验证签名来防止信息被修改 先来看下我们与后端定制签名规则 2.4. 签名规 ...
- Android通过Http连接MySQL 实现登陆/注册(数据库+服务器+客户端)
写在最前: 在实际开发中,相信每个项目都会有用户登陆注册功能,这个实现的方法很多,下面是我实现的方法,供大家交流. 新人发帖,万分紧张,怎么样才能装作一副经常发帖的样子不被别人看出来呢-,- ? 好了 ...
- java 24 - 11 GUI之制作登陆注册页面
简单说说,懒得发了... 步骤: A:首先写出登陆注册需要用到类以及代码(IO流) B:然后创建登陆窗口和注册窗口 C:各个监听事件: a:登录窗口 1.重置:把2个文本框的内容全部清空 2.注册:关 ...
- PHP数据库登陆注册简单做法
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- iOS 登陆之使用ShareSDK
0. 概述 登陆要使用ShareSDK,可以实现多社交平台账号登陆,短信验证,并且都是永久免费的. 网址:www.mob.com 1.iOS 登陆之界面设置
- javaweb 登陆注册页面
视图的数据修改,表中也修改引用工具类用<%@ page import=""%> <%@ page import="java.util.Date" ...
- 用户登陆注册【JDBC版】
前言 在讲解Web开发模式的时候,曾经写过XML版的用户登陆注册案例!现在在原有的项目上,使用数据库版来完成用户的登陆注册!如果不了解的朋友,可以看看我Web开发模式的博文! 本来使用的是XML文件作 ...
- 用ajax的同步请求解决登陆注册需要根据服务器返回数据判断是否能提交的问题
最近在写www.doubilaile.com的登陆注册.需要用ajax请求服务器判断用户名是否存在,用户名和密码是否匹配,进而提交数据.碰到的问题是异步请求都能成功返回数据,但是该数据不能作为紧接着的 ...
随机推荐
- IPC----哲学家就餐问题(并发与互斥)
哲学家就餐问题描述: 5个哲学家,5个筷子.5个哲学家围坐在一张桌子上,筷子放在分别放在每个哲学家的两旁.如果所有哲学家在某个时刻同时拿起左边的筷子,那么右边的筷子就都被其他的哲学家拿了,造成大家都无 ...
- wireshark 和 Httpwatch tcpdump
wireshark 功能强大,适用性高.过滤功能好. Httpwatch 功能单一,优缺点明显,但是非常适合抓取http交互的包,而且可以非常明确的显示出整个的交互过程. tcpdump linux ...
- Mybatis中的in查询和foreach标签
Mybatis中的foreach的主要用在构建in条件中,它可以在SQL语句中进行迭代一个集合. foreach元素的属性主要有 item,index,collection,open,separato ...
- JSP页面格式化货币金额,千分位
<fmt:formatNumber value="${值}" pattern="currency"></fmt:formatNumber> ...
- WdatePicker组件不显示
突然发现时间组件不显示了,以为是浏览器的问题.在本地服务器测试了一下发现一切正常. 怀疑是前段时间中毒引起的,用工具比对了一下WdatePicker的文件包,发现My97DatePicker.htm这 ...
- nyoj_299_Matrix Power Series_矩阵快速幂
Matrix Power Series 时间限制:1000 ms | 内存限制:65535 KB 难度:4 描述 Given a n × n matrix A and a positive i ...
- 微信video标签全屏无法退出bug 本文系转载
安卓(android)微信里面video播放视频,会被强制全屏,播放完毕后还有腾讯推荐的视频,非常讨厌..强制被全屏无法解决,但是视频播放完毕后退出播放器可以解决.方法就是视频播放完毕后,用音频aud ...
- Android studio 自定义打包APK名称
Android Studio打包应用默认生成的apk名称是:app-release.apk .如果我们要让生成的apk名跟我们版本包名有联系的话,那我们就要自定义生成的apk名了,要怎么做呢. 我们只 ...
- 【leetcode】Balanced Binary Tree(middle)
Given a binary tree, determine if it is height-balanced. For this problem, a height-balanced binary ...
- 杨辉三角用java实现
代码如下: public class ErArray { public static void main(String[] args) { //杨辉三角 int[][] num = new int[1 ...