摘自http://www.cnblogs.com/gcb999/p/3151665.html

#import <UIKit/UIKit.h>
@class User;
@protocol ASIHTTPRequestDelegate;
@interface ProfileHeaderView : UIView <ASIHTTPRequestDelegate>
@property (nonatomic, retain) User *user;
@property (nonatomic, assign) UIViewController *controller;
@end #define kPadding 10 #define kIconWidth 100
#define kIconHeight 100 #define kCountButtonHeight 35
#define kCountSize 12
#define kCountButtonWidth 55 #define kNameSize 15
#define kDescSize 10 #define kBtnFriend 1
#define kBtnFollower 2 #define kGlobalBg [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1] #import "ProfileHeaderView.h"
#import "User.h"
#import <QuartzCore/QuartzCore.h>
#import "ASIHTTPRequest.h"
#import "FriendController.h"
#import "FollowerController.h" @interface ProfileHeaderView() {
UIImageView *_icon;
UILabel *_name;
UILabel *_desc;
UILabel *_status; UIButton *_friends;
UIButton *_followers;
}
@end @implementation ProfileHeaderView
#pragma mark 监听按钮点击
- (void)btnClick:(UIButton *)btn { FriendshipController *vc = nil; if (btn.tag == kBtnFollower) {
// 粉丝
vc = [[[FollowerController alloc] init] autorelease];
vc.title = [NSString stringWithFormat:@"%@的粉丝", self.user.screenName];
} else {
// 关注
vc = [[[FriendController alloc] init] autorelease];
vc.title = [NSString stringWithFormat:@"%@的关注", self.user.screenName];
} vc.uid = self.user.uid;
[self.controller.navigationController pushViewController:vc animated:YES];
} #pragma mark 返回数目按钮的文字
- (NSString *)countText:(int)count title:(NSString *)title {
NSString *countTitle = nil;
if (count < 10000) {
countTitle = [NSString stringWithFormat:@"%i", count];
} else {
CGFloat countValue = count/10000.0;
countTitle = [NSString stringWithFormat:countValue>=100?@"%.0f万":@"%.1f万", countValue];
} return [NSString stringWithFormat:@"%@\n%@", countTitle, title];
} #pragma mark 创建一个按钮
- (UIButton *)buttonWithSelector:(SEL)selector x:(CGFloat)x y:(CGFloat)y {
UIButton *button = [[[UIButton alloc] initWithFrame:CGRectMake(x, y, kCountButtonWidth, kCountButtonHeight)] autorelease];
button.titleLabel.font = [UIFont systemFontOfSize:kCountSize];
[button addTarget:self action:selector forControlEvents:UIControlEventTouchUpInside];
button.titleLabel.numberOfLines = 0;
button.titleLabel.textAlignment = NSTextAlignmentCenter;
[button setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
[button setBackgroundImage:[UIImage resizeImage:@"skin_cell_background.png"] forState:UIControlStateNormal];
[button setBackgroundImage:[UIImage resizeImage:@"skin_cell_background_highlighted.png"] forState:UIControlStateHighlighted];
[button setBackgroundImage:[UIImage resizeImage:@"skin_cell_background_highlighted.png"] forState:UIControlStateDisabled];
return button;
} #pragma mark - user的setter
- (void)setUser:(User *)user {
if (_user != user) {
[_user release];
_user = [user retain]; // 下载图片
ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:user.avatarLarge]];
request.delegate = self;
[request startAsynchronous]; // 设置名称
_name.text = user.screenName; // 设置简介
NSString *descText = (user.descs==nil || [@"" isEqualToString:user.descs])?@"这个人比较懒,什么也没写":[NSString stringWithFormat:@"简介:\n%@", user.descs];
_desc.text = descText; // 设置数目
[_friends setTitle:[self countText:user.friendsCount title:@"关注"] forState:UIControlStateNormal];
[_followers setTitle:[self countText:user.followersCount title:@"粉丝"] forState:UIControlStateNormal]; // 微博数量
_status.text = [NSString stringWithFormat:@" 共%i条微博", user.statusesCount];
}
} #pragma mark - 生命周期方法
- (id)init {
if (self = [super init]) {
CGSize winSize = [UIScreen mainScreen].bounds.size;
// 顶部
UIImageView *topView = [[[UIImageView alloc] initWithFrame:CGRectMake(0, 0, winSize.width, kIconHeight + 2*kPadding)] autorelease];
topView.image = [UIImage imageNamed:@"profile_cover_background.png"];
[self addSubview:topView]; // 头像
CGFloat iconX = kPadding;
CGFloat iconY = kPadding;
_icon = [[[UIImageView alloc] initWithFrame:CGRectMake(iconX, iconY, kIconWidth, kIconHeight)] autorelease];
_icon.image = [UIImage imageNamed:@"avatar_default_big.png"];
_icon.layer.cornerRadius = 5;
_icon.layer.masksToBounds = YES;
[topView addSubview:_icon]; // 昵称
CGFloat nameX = iconX + kIconWidth + kPadding;
CGFloat nameY = iconY;
CGFloat nameWidth = winSize.width - nameX - kPadding;
CGFloat nameHeight = kNameSize;
_name = [[[UILabel alloc] init] autorelease];
_name.frame = CGRectMake(nameX, nameY, nameWidth, nameHeight);
_name.backgroundColor = [UIColor clearColor];
_name.font = [UIFont systemFontOfSize:kNameSize];
[topView addSubview:_name]; // 简介
CGFloat descX = nameX;
CGFloat descY = nameY + nameHeight + kPadding;
CGFloat descWidth = nameWidth;
CGFloat descheight = kIconHeight - descY;
_desc = [[[UILabel alloc] init] autorelease];
_desc.frame = CGRectMake(descX, descY, descWidth, descheight);
_desc.font = [UIFont systemFontOfSize:kDescSize];
_desc.backgroundColor = [UIColor clearColor];
_desc.numberOfLines = 0;
_desc.textColor = [UIColor whiteColor];
[topView addSubview:_desc]; // 数目
CGFloat countViewY = topView.frame.size.height;
CGFloat countViewHeight = kCountButtonHeight + 2*kPadding;
UIView *countView = [[[UIView alloc] initWithFrame:CGRectMake(0, countViewY, winSize.width, countViewHeight)] autorelease];
countView.backgroundColor = [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1];
[self addSubview:countView]; // 关注
CGFloat friendsX = kPadding;
CGFloat friendsY = kPadding;
_friends = [self buttonWithSelector:@selector(btnClick:) x:friendsX y:friendsY];
_friends.tag = kBtnFriend;
[countView addSubview:_friends]; // 粉丝
CGFloat followersX = friendsX + kCountButtonWidth + kPadding;
CGFloat followersY = friendsY;
_followers = [self buttonWithSelector:@selector(btnClick:) x:followersX y:followersY];
_followers.tag = kBtnFollower;
[countView addSubview:_followers]; // 顶部的线
CGFloat bottomHeight = 2;
UIView *bottom = [[[UIView alloc] initWithFrame:CGRectMake(0, countViewHeight - bottomHeight, winSize.width, bottomHeight)] autorelease];
bottom.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"profile_shadow_bottom.png"]];
[countView addSubview:bottom]; // 微博数
CGFloat statusX = 0;
CGFloat statusY = countViewY + countViewHeight + 2;
CGFloat statusHeight = kCountSize + kPadding;
_status = [[[UILabel alloc] init] autorelease];
_status.backgroundColor = kGlobalBg;
_status.frame = CGRectMake(statusX, statusY, winSize.width, statusHeight);
_status.font = [UIFont systemFontOfSize:kCountSize];
[self addSubview:_status]; self.frame = CGRectMake(0, 0, winSize.width, statusY + statusHeight);
}
return self;
} - (void)dealloc {
[_user release];
[super dealloc];
} #pragma mark - ASI代理
- (void)requestFinished:(ASIHTTPRequest *)request {
_icon.image = [UIImage imageWithData:[request responseData]];
}
@end
#import "MyDataController.h"
#import "StatusMgr.h"
#import "ProfileHeaderView.h"
#import "User.h" @interface MyDataController () @end @implementation MyDataController - (void)viewDidLoad
{
[super viewDidLoad];
ProfileHeaderView *headerView = [[[ProfileHeaderView alloc] init] autorelease];
headerView.controller = self;
self.tableView.tableHeaderView = headerView; self.navigationItem.leftBarButtonItem = nil;
self.navigationItem.rightBarButtonItem = nil;
} - (void)queryWithMgr:(StatusMgr *)mgr sinceId:(NSString *)sinceId maxId:(NSString *)maxId count:(int)count {
if (!_uid) {
_uid = [WeiboAccount account].uid;
}
[mgr queryUserStatusesWithSinceId:sinceId maxId:maxId count:count uid:_uid];
} - (void)refreshFinish:(User *)user {
ProfileHeaderView *headerView = (ProfileHeaderView *)self.tableView.tableHeaderView;
headerView.user = user;
} - (void)dealloc {
[_uid release];
[super dealloc];
} - (void)viewDidUnload {
self.uid = nil;
[super viewDidUnload];
} @end
//
// FriendController.m
// 新浪微博
//
// Created by mj on 13-4-22.
// Copyright (c) 2013年 itcast. All rights reserved.
// #import "FriendshipController.h"
#import "FriendshipMgr.h"
#import "User.h"
#import "Status.h"
#import "DownloadOperation.h"
#import <QuartzCore/QuartzCore.h>
#import "MyDataController.h" @interface FriendshipController () {
// 下一页的游标
int _nextCursor;
}
// 所有的关注数据
@property (nonatomic, retain) NSMutableArray *data;
@end @implementation FriendshipController
#pragma mark 下拉刷新
- (void)refreshData {
[super refreshData]; [MBProgressHUD showMessag:kLoadingMsg toView:self.view]; // 查询关注列表数据
FriendshipMgr *mgr = [FriendshipMgr mgr]; if ([self respondsToSelector:@selector(queryWithMgr:uid:count:cursor:)]) {
if (!_uid) {
_uid = [WeiboAccount account].uid;
}
[self queryWithMgr:mgr uid:_uid count:20 cursor:0];
} mgr.queryFriendsBlock =
^ (NSMutableArray *friends, int nextCursor, int totalNumber, NSString *error){
// NSLog(@"friends-%i", friends.count); [MBProgressHUD hideHUDForView:self.view animated:YES]; // 设置数据
self.data = friends; // 刷新数据
[self.tableView reloadData]; // 完成刷新数据,隐藏"下拉刷新"
[self doneRefreshData]; _nextCursor = nextCursor; //
self.forbidLoadMore = nextCursor == 0;
};
} #pragma mark 上拉加载更多
- (void)loadMoreData {
[super loadMoreData]; // 查询关注列表数据
FriendshipMgr *mgr = [FriendshipMgr mgr]; if ([self respondsToSelector:@selector(queryWithMgr:uid:count:cursor:)]) {
// if (!_uid) {
// _uid = [WeiboAccount account].uid;
// }
[self queryWithMgr:mgr uid:_uid count:20 cursor:_nextCursor];
} mgr.queryFriendsBlock =
^ (NSMutableArray *friends, int nextCursor, int totalNumber, NSString *error){
// 添加数据
[self.data addObjectsFromArray:friends]; // 刷新数据
[self.tableView reloadData]; // 完成刷新数据,隐藏"上拉加载更多"
[self doneLoadMoreData]; _nextCursor = nextCursor; // nextCursor为0代表,没有下一页面
self.forbidLoadMore = nextCursor == 0;
};
} #pragma mark - 生命周期方法
- (void)viewDidLoad
{
[super viewDidLoad]; [self refreshData];
} - (void)dealloc {
[_data release];
[_uid release];
[super dealloc];
} - (void)viewDidUnload {
self.data = nil;
self.uid = nil;
[super viewDidUnload];
} #pragma mark - 私有方法
#pragma mark 初始化Cell
- (UITableViewCell *)initCell {
UITableViewCell *cell = [[[NSBundle mainBundle] loadNibNamed:@"FriendCell" owner:nil options:nil] lastObject]; // 设置cell的背景色
UIView *bg = [[[UIView alloc] init] autorelease];
bg.backgroundColor = [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1];
cell.backgroundView = bg; // 选中的背景
UIView *selectdBg = [[[UIView alloc] init] autorelease];
selectdBg.backgroundColor = [UIColor colorWithRed:0.85 green:0.85 blue:0.85 alpha:1];
cell.selectedBackgroundView = selectdBg; // 设置imageview的圆角半径
UIImageView *imageView = (UIImageView *)[cell viewWithTag:10];
imageView.layer.cornerRadius = 10;
imageView.layer.masksToBounds = YES;
return cell;
}
#pragma mark 设置Cell的数据
- (void)setCell:(UITableViewCell *)cell data:(User *)user {
// 设置昵称
UILabel *screenNameLabel = (UILabel *)[cell viewWithTag:20];
screenNameLabel.text = user.screenName; // 设置最近一条微博的内容
UILabel *statusLabel = (UILabel *)[cell viewWithTag:30];
statusLabel.text = user.status.text; // 获取按钮
UIButton *btn = (UIButton *)[cell viewWithTag:40];
if (user.following) {
// 显示"取消关注"
[btn setNormalBg:@"userinfo_relationship_unfollowbutton_background.png" andHighlighted:@"userinfo_relationship_unfollowbutton_background_highlighted.png"];
[btn setTitle:@"取消关注" forState:UIControlStateNormal];
[btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
} else {
// 显示"加关注"
[btn setNormalBg:@"userinfo_relationship_followbutton_background.png" andHighlighted:@"userinfo_relationship_followbutton_background_highlighted.png"];
[btn setTitle:@"加关注" forState:UIControlStateNormal]; [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
}
} #pragma mark - Table view data source
#pragma mark 有多少行数据
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// 根据数据多少来决定是否要显示分隔线
if (self.data.count == 0) {
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
} else {
tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
}
return self.data.count;
}
#pragma mark 每一行的Cell
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) {
// 初始化Cell
cell = [self initCell];
} // 取出这行对应的用户数据
User *user = [self.data objectAtIndex:indexPath.row]; // 设置Cell的数据
[self setCell:cell data:user]; // 从缓存中取图片
UIImage *image = [self.imageCache objectForKey:user.profileImageUrl];
UIImageView *imageView = (UIImageView *)[cell viewWithTag:10];
if (image) {
imageView.image = image;
} else {
// 显示默认图片
imageView.image = [UIImage imageNamed:@"avatar_default.png"]; // 下载图片
[self downloadImageWithUrl:user.profileImageUrl indexPath:indexPath];
} return cell;
} #pragma mark - 代理方法
#pragma mark 每一行的高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 60;
}
#pragma mark 选中了某一行
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES]; User *user = [self.data objectAtIndex:indexPath.row]; MyDataController *mydata = [[MyDataController alloc] init];
mydata.title = user.screenName;
mydata.uid = user.uid;
[self.navigationController pushViewController:mydata animated:YES];
[mydata release];
}
@end
//
// FriendController.m
// 新浪微博
//
// Created by mj on 13-4-22.
// Copyright (c) 2013年 itcast. All rights reserved.
// #import "FriendshipController.h"
#import "FriendshipMgr.h"
#import "User.h"
#import "Status.h"
#import "DownloadOperation.h"
#import <QuartzCore/QuartzCore.h>
#import "MyDataController.h" @interface FriendshipController () {
// 下一页的游标
int _nextCursor;
}
// 所有的关注数据
@property (nonatomic, retain) NSMutableArray *data;
@end @implementation FriendshipController
#pragma mark 下拉刷新
- (void)refreshData {
[super refreshData]; [MBProgressHUD showMessag:kLoadingMsg toView:self.view]; // 查询关注列表数据
FriendshipMgr *mgr = [FriendshipMgr mgr]; if ([self respondsToSelector:@selector(queryWithMgr:uid:count:cursor:)]) {
if (!_uid) {
_uid = [WeiboAccount account].uid;
}
[self queryWithMgr:mgr uid:_uid count:20 cursor:0];
} mgr.queryFriendsBlock =
^ (NSMutableArray *friends, int nextCursor, int totalNumber, NSString *error){
// NSLog(@"friends-%i", friends.count); [MBProgressHUD hideHUDForView:self.view animated:YES]; // 设置数据
self.data = friends; // 刷新数据
[self.tableView reloadData]; // 完成刷新数据,隐藏"下拉刷新"
[self doneRefreshData]; _nextCursor = nextCursor; //
self.forbidLoadMore = nextCursor == 0;
};
} #pragma mark 上拉加载更多
- (void)loadMoreData {
[super loadMoreData]; // 查询关注列表数据
FriendshipMgr *mgr = [FriendshipMgr mgr]; if ([self respondsToSelector:@selector(queryWithMgr:uid:count:cursor:)]) {
// if (!_uid) {
// _uid = [WeiboAccount account].uid;
// }
[self queryWithMgr:mgr uid:_uid count:20 cursor:_nextCursor];
} mgr.queryFriendsBlock =
^ (NSMutableArray *friends, int nextCursor, int totalNumber, NSString *error){
// 添加数据
[self.data addObjectsFromArray:friends]; // 刷新数据
[self.tableView reloadData]; // 完成刷新数据,隐藏"上拉加载更多"
[self doneLoadMoreData]; _nextCursor = nextCursor; // nextCursor为0代表,没有下一页面
self.forbidLoadMore = nextCursor == 0;
};
} #pragma mark - 生命周期方法
- (void)viewDidLoad
{
[super viewDidLoad]; [self refreshData];
} - (void)dealloc {
[_data release];
[_uid release];
[super dealloc];
} - (void)viewDidUnload {
self.data = nil;
self.uid = nil;
[super viewDidUnload];
} #pragma mark - 私有方法
#pragma mark 初始化Cell
- (UITableViewCell *)initCell {
UITableViewCell *cell = [[[NSBundle mainBundle] loadNibNamed:@"FriendCell" owner:nil options:nil] lastObject];

//设置cell选中的背景色,cell必须是自定义的
// 设置cell的背景色
UIView *bg = [[[UIView alloc] init] autorelease];
bg.backgroundColor = [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1];
cell.backgroundView = bg; // 选中的背景
UIView *selectdBg = [[[UIView alloc] init] autorelease];
selectdBg.backgroundColor = [UIColor colorWithRed:0.85 green:0.85 blue:0.85 alpha:1];
cell.selectedBackgroundView = selectdBg; // 设置imageview的圆角半径
UIImageView *imageView = (UIImageView *)[cell viewWithTag:10];
imageView.layer.cornerRadius = 10;
imageView.layer.masksToBounds = YES;
return cell;
}
#pragma mark 设置Cell的数据
- (void)setCell:(UITableViewCell *)cell data:(User *)user {
// 设置昵称
UILabel *screenNameLabel = (UILabel *)[cell viewWithTag:20];
screenNameLabel.text = user.screenName; // 设置最近一条微博的内容
UILabel *statusLabel = (UILabel *)[cell viewWithTag:30];
statusLabel.text = user.status.text; // 获取按钮
UIButton *btn = (UIButton *)[cell viewWithTag:40];
if (user.following) {
// 显示"取消关注"
[btn setNormalBg:@"userinfo_relationship_unfollowbutton_background.png" andHighlighted:@"userinfo_relationship_unfollowbutton_background_highlighted.png"];
[btn setTitle:@"取消关注" forState:UIControlStateNormal];
[btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
} else {
// 显示"加关注"
[btn setNormalBg:@"userinfo_relationship_followbutton_background.png" andHighlighted:@"userinfo_relationship_followbutton_background_highlighted.png"];
[btn setTitle:@"加关注" forState:UIControlStateNormal]; [btn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
}
} #pragma mark - Table view data source
#pragma mark 有多少行数据
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
// 根据数据多少来决定是否要显示分隔线
if (self.data.count == 0) {
tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
} else {
tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
}
return self.data.count;
}
#pragma mark 每一行的Cell
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) {
// 初始化Cell
cell = [self initCell];
} // 取出这行对应的用户数据
User *user = [self.data objectAtIndex:indexPath.row]; // 设置Cell的数据
[self setCell:cell data:user]; // 从缓存中取图片
UIImage *image = [self.imageCache objectForKey:user.profileImageUrl];
UIImageView *imageView = (UIImageView *)[cell viewWithTag:10];
if (image) {
imageView.image = image;
} else {
// 显示默认图片
imageView.image = [UIImage imageNamed:@"avatar_default.png"]; // 下载图片
[self downloadImageWithUrl:user.profileImageUrl indexPath:indexPath];
} return cell;
} #pragma mark - 代理方法
#pragma mark 每一行的高度
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 60;
}
#pragma mark 选中了某一行
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES]; User *user = [self.data objectAtIndex:indexPath.row]; MyDataController *mydata = [[MyDataController alloc] init];
mydata.title = user.screenName;
mydata.uid = user.uid;
[self.navigationController pushViewController:mydata animated:YES];
[mydata release];
}
@end

新浪微博中tableview中头部信息的更多相关文章

  1. javafx这些学会后,开发就不难了,往tablecloumn列中添加按钮,修改javafx中tableview中tablecell中的值,修改完回车表示保存到内存中

    javafx开发过程中遇见难题,往tablecloumn列中添加按钮 想了很久的方法,也配有办法判断每行中有数据的地方添加按钮set bank_caozuo.setCellFactory((col)- ...

  2. iOS中tableView组头部或尾部标题的设置

    解决在tableView返回组标题直接返回字符串,带来的不便设置组标题样式的问题解决办法,设置尾部标题和此类似  // 返回组头部view的高度 - (CGFloat)tableView:(UITab ...

  3. tableview中头部信息

    //创建tableview中头部的文件#define kPadding 10 #define kIconWidth 100 #define kIconHeight 100 #define kCount ...

  4. HTTP消息中header头部信息的讲解

    HTTP Request的Header信息 1.HTTP请求方式 如下表: GET 向Web服务器请求一个文件 POST 向Web服务器发送数据让Web服务器进行处理 PUT 向Web服务器发送数据并 ...

  5. HTTP消息中Header头部信息整理

    1.HTTP请求方式 GET 向Web服务器请求一个文件 POST 向Web服务器发送数据让Web服务器进行处理 PUT 向Web服务器发送数据并存储在Web服务器内部 HEAD 检查一个对象是否存在 ...

  6. sublime3中如何快速生成html头部信息

    前提要安装Emmet 插件:已经结束了啊,不要以为下面的操作跟问题有关,下面是具体的生成头部信息方法 输入下边加粗的缩写,然后Tab,就可以了: 生成html4.01 Transitional用 ht ...

  7. 如何利用Social Listening从社会化媒体中“提炼”有价值的信息?

    本文转自知乎 作者:苏格兰折耳喵 ----------------------------------------------------- 在本文中,笔者将会介绍大数据分析主要的处对象---社会化媒 ...

  8. 通过拦截器Interceptor实现Spring MVC中Controller接口访问信息的记录

    java web工程项目使用了Spring+Spring MVC+Hibernate的结构,在Controller中的方法都是用于处理前端的访问信息,Controller通过调用Service进行业务 ...

  9. .NET跨平台之旅:ASP.NET Core从传统ASP.NET的Cookie中读取用户登录信息

    在解决了asp.net core中访问memcached缓存的问题后,我们开始大踏步地向.net core进军——将更多站点向asp.net core迁移,在迁移涉及获取用户登录信息的站点时,我们遇到 ...

随机推荐

  1. c++ 输出虚函数表内容

    class Base{ public: virtual void f(){cout<<"Base::f"<<endl;} virtual void g(){ ...

  2. 集团财务分析BI项目中的财务系统环境

    我国集团化经营模式起步较晚,集团管控模式及管控力度各异,集团范围内财务信息化水平及统一程度不尽相同,因此在实施集团财务分析一类的BI商业智能项目的过程中,在不同的集团之间遇到的财务系统及核算数据环境也 ...

  3. 使用线程 在shell上同步动态显示当前系统时间

    //创建一个用于刷新当前系统时间的线程 new Thread() { public void run() { // 此处为另外一个单独线程,非UI线程 Display dis=shell.getDis ...

  4. 将从数据库中获取的数据 ,以HTML表格的形式显示

    1.HTML页面 <body> <form id="form1" runat="server"> <div id="di ...

  5. 利用jQuery获取数据,JSONP

    最近工作用到了跨域请求,所以此文就有了,概念网上都有,就不细说了,直接来了. 看了一篇文章,说的是通过扩展让ASP.NET Web API支持JSONP,jsonp网上有很多的教程,js代码部分基本和 ...

  6. Enze Second day

    哈喽,很高兴在云和学院又学了一天的新知识,现在,我来继续总结一下今天所学的以及对昨天的一些补充. 变量 • 声明变量的语法格式: –数据类型  变量名; •赋值:     变量名=值; 变量的命名 • ...

  7. Map 的遍历

    一.Map的遍历 在后面java的开发过程中会遇到Map类的使用,然而map的遍历是一大问题. Map遍历用两种比较交代的方法: package edu.map; import java.util.H ...

  8. Python之美[从菜鸟到高手]--urlparse源码分析

    urlparse是用来解析url格式的,url格式如下:protocol :// hostname[:port] / path / [;parameters][?query]#fragment,其中; ...

  9. git 代理设置

    git 代理设置: git config --global http.proxy http://proxy.com:8080git config --global https.proxy http:/ ...

  10. 我在北京找工作(二):java实现算法<1> 冒泡排序+直接选择排序

    工作.工作.找工作.经过1个多星期的思想斗争还是决定了找JAVA方面的工作,因为好像能比PHP的工资高点.呵呵 :-)  (其实我这是笑脸,什么QQ输入法,模拟表情都没有,忒不人性化了.) 言归正传, ...