pygame系列_原创百度随心听音乐播放器_完整版
程序名:PyMusic
解释:pygame+music
之前发布了自己写的小程序:百度随心听音乐播放器的一些效果图
你可以去到这里再次看看效果:
这个程序的灵感来自于百度随心听
说明:
动作按钮全部是画出来的,没有用到任何图片
用到图片的只有:背景,歌手图片,作者图片
经过一个阶段的调试,现在算是可以拿上台面和大家交流
功能介绍:
A.四个按钮介绍
1.完成停止,播放音乐功能
2.喜欢/不喜欢当前所播放的音乐
3.删除当前所播放的音乐(物理环境下不会删除,删除的是内存中的)
4.下一曲
5.当鼠标经过按钮的时候,按钮颜色会变化
B.状态栏(最下面)
1.显示所有歌曲数(AllSongs)
2.当前播放的歌曲是第只歌曲
3.当前音量(范围:0 - 10)
4.音量的图形显示(这里没有用到图片,而是系统画出来的:-))
5.我的邮箱信息:hongtenzone@foxmail.com
C.右下角
1.当鼠标移动到黄色圆区域,会展示出我的相片和'Yes,You are Luck:)'字样
鼠标一开的时候会自动隐藏(我想接触过android系统手机的的朋友,可能有这样的经历,在工具里面有一个地方
当点击三下的时候,会出现android里面的一副图片....对我这里的灵感来自于这里ll)
=======================================
下面我说说我做的思路吧
我想有一部分朋友会喜欢的...:)
首先,主题功能是音乐播放,那么我们就应该实现这个音乐播放的功能
哈哈,这个灵感来自于我之前写的小游戏:
在这个游戏中,我实现了音乐的播放,于是乎我就想在音乐播放上面做一些文章...
接下来是程序PyMusic的主题界面需要考虑,我个人喜欢听歌...百度音乐,百度随心听都是常去的地方..
百度随心听的界面设计简洁,很适合我的风格...所以我选择了百度随心听..
于是乎我看是看百度随心听的代码...一不小心被我大概看明白了按钮之间的逻辑....
一时间,头脑中出现了PyMusic的原型....
为什么不做一个呢?我就这样问着我自己,慢慢在脑海中呈现PyMusic的原型...
然后开始动笔,把pyMusic的原型在纸上画了出来....
画好了,就开始分析...(这个过程有一点长..)
然后把原型中的物体(按钮,图片加载..)一个一个的实现..
最后加上我的小自信..呵呵,成啦..
=======================================
一些细节
在做PyMusic的过程中,需要注意一些细节的地方
我下面把这些地方罗列出来
1.音量图形的初始化
VOLUME_POINTS = []
VOLUME_POINTS_START = []
VOLUME_RECT_COLORS = []
for p in range(170, 250, 7):
VOLUME_POINTS.append([SCREEN_W - p,SCREEN_H + 20])
for ps in range(175, 250, 7):
VOLUME_POINTS_START.append([SCREEN_W - ps, SCREEN_H])
VOLUME_RECT_COLORS.append((randint(0, 255), randint(0, 255), randint(0, 255)))
2.加载歌曲和图片
SONG_ARRAY = []
SONG_IMAGE = []
for song in range(len(SONGS)):
SONG_ARRAY.append(pygame.mixer.Sound(os.path.join(DATA_DIR, SOUND_DIR, SONGS[song][0])))
SONG_IMAGE.append(pygame.image.load(os.path.join(DATA_DIR, IMAGE_DIR, SONGS[song][3])).convert())
3.字体加载
font = pygame.font.Font(os.path.join(DATA_DIR, FONT_DIR, 'TORK____.ttf'), 14)
font_song_title = pygame.font.Font(os.path.join(DATA_DIR, FONT_DIR, 'msyhbd.ttf'), 24)
font_song = pygame.font.Font(os.path.join(DATA_DIR, FONT_DIR, 'msyh.ttf'), 16)
4.停止/播放按钮
def button_play(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[0], CIRCLR_R, CIRCLR_W)
points=[(77,340),(77,360),(95,350)]
pygame.draw.polygon(screen,color,points) def button_stop(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[0], CIRCLR_R, CIRCLR_W)
pygame.draw.rect(screen,
color,
Rect(77, 340, 5, 23 ))
pygame.draw.rect(screen,
color,
Rect(88, 340, 5, 23 ))
5.删除歌曲按钮
def button_del(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[2], CIRCLR_R, CIRCLR_W)
pygame.draw.circle(screen, color, (215, 340), 6, 3)
pygame.draw.rect(screen,
color,
Rect(200, 340, 30, 6 ))
pygame.draw.rect(screen,
color,
Rect(204, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(210, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(217, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(223, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(204, 360, 22, 5 ))
6.作者信息展示
def button_authon_image(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[4], CIRCLR_R, CIRCLR_W)
pygame.draw.rect(screen,
(255, 255, 255),
Rect(418, 248, 144, 154 ))
screen.blit(author_image, (420, 250))
luck = font_song_title.render('Yes, You are Luck :-)', True, (255,165,10))
screen.blit(luck, (280, 416))
7.第一个监听器
def listener():
global PLAY_FLAG
global PREFER_FLAG
x, y = pygame.mouse.get_pos()
color = (255,255,25)
color_red = (230, 0, 0)
for index in range(len(CIRCLES_POS)):
p_x = (CIRCLES_POS[index][0] - x)**2
p_y = (CIRCLES_POS[index][1] - y)**2
p_r = (CIRCLR_R)**2
if (p_x + p_y <= p_r):
if index == 0 and PLAY_FLAG:
button_stop(screen, color)
elif index == 0 and not PLAY_FLAG:
button_play(screen, color)
elif index == 1 and PREFER_FLAG:
button_perfer(screen, color)
elif index == 1 and not PREFER_FLAG:
button_perfer(screen, color_red)
elif index == 2:
button_del(screen, color)
elif index == 3:
button_next_song(screen, color)
elif index == 4:
button_authon_image(screen, color)
8.第二个监听器
def mouse_down_listener(sound):
global PLAY_FLAG
global PREFER_FLAG
global SONG_FLAG
x, y = pygame.mouse.get_pos()
for index in range(len(CIRCLES_POS)):
p_x = (CIRCLES_POS[index][0] - x)**2
p_y = (CIRCLES_POS[index][1] - y)**2
p_r = (CIRCLR_R)**2
if (p_x + p_y <= p_r):
if index == 0 and PLAY_FLAG:
#print('stop now......')
sound.stop()
PLAY_FLAG = False
elif index == 0 and not PLAY_FLAG:
#print('play now ... ... ... ...')
sound.play(0)
PLAY_FLAG = True
elif index == 1 and PREFER_FLAG:
print('perfer song....<<', SONGS[SONG_FLAG][1], '>>')
PREFER_FLAG = False
elif index == 1 and not PREFER_FLAG:
print('not perfer song... <<', SONGS[SONG_FLAG][1], '>>')
PREFER_FLAG = True
elif index == 2:
sound.stop()
print('delete song....<<', SONGS[SONG_FLAG][1], '>>')
if SONG_FLAG > 0:
SONGS.pop(SONG_FLAG)
SONG_IMAGE.pop(SONG_FLAG)
SONG_ARRAY.pop(SONG_FLAG)
if SONG_FLAG >= len(SONGS) - 1:
SONG_FLAG -= 1
else:
print('This is the last song.')
elif index == 3:
sound.stop()
if SONG_FLAG < len(SONGS) - 1:
SONG_FLAG += 1
else:
SONG_FLAG = 0
#print('next song....')
9.鼠标按下事件
elif event.type == MOUSEBUTTONDOWN:
pressed_array = pygame.mouse.get_pressed()
for index in range(len(pressed_array)):
if pressed_array[index]:
if index == 0: #When the LEFT button down
mouse_down_listener(bg_sound)
上面的都是一些细节的地方...
=======================================
下面是完整代码部分:
=======================================
#pygame music import os, pygame
from pygame.locals import *
from sys import exit
from random import * __des__ = '''
Name:
PyMusic
'''
__version__ = '2.0'
__author__ = {'name' : 'Hongten',
'mail' : 'hongtenzone@foxmail.com',
'blog' : 'http://www.cnblogs.com/hongten',
'version' : __version__} if not pygame.mixer: print('Warning, sound disabled!')
if not pygame.font: print('Warning, fonts disabled!') pygame.init() SCREEN_W = 580
SCREEN_H = 450
SCREEN_DEFAULT_SIZE = (SCREEN_W, SCREEN_H + 20)
VOLUME = 5
IMAGE_START_POS = (60, 60)
IMAGE_END_POS = (245, 245)
CIRCLES_POS = [(85, 350), (150, 350), (215, 350), (280, 350), (555, 425)]
CIRCLR_R = 25
CIRCLR_W = 3 PLAY_FLAG = True
PREFER_FLAG = True DATA_DIR = 'data'
IMAGE_DIR = 'image'
BG_IMAGE_DIR = 'image\\background'
FONT_DIR = 'font'
SOUND_DIR = 'sound' BG_IMAGE = 'bg.jpg'
AUTHOR_IMAGE = 'author.png'
#size:(240*240)
BGS = []
SONG_FLAG = 0
SONGS = [('1.OGG', 'You Raise Me Up', 'WestLife', '1.png'),
('2.OGG', '不完整的旋律', '王力宏', '2.png'),
('3.OGG', 'A Place Nearby' , 'Lene Marlin', '3.png'),
('4.OGG', 'Just Give Me A Reason' , 'Pink', '4.png'),
('5.OGG', '我 ' , '张国荣', '5.png'),
('6.OGG', '大城小爱' , '王力宏', '6.png'),
('7.OGG', '聊天' , '郭静', '7.png')]
westlift = 'westlife.png' VOLUME_POINTS = []
VOLUME_POINTS_START = []
VOLUME_RECT_COLORS = []
for p in range(170, 250, 7):
VOLUME_POINTS.append([SCREEN_W - p,SCREEN_H + 20])
for ps in range(175, 250, 7):
VOLUME_POINTS_START.append([SCREEN_W - ps, SCREEN_H])
VOLUME_RECT_COLORS.append((randint(0, 255), randint(0, 255), randint(0, 255))) screen = pygame.display.set_mode(SCREEN_DEFAULT_SIZE, 0, 32)
bg = pygame.image.load(os.path.join(DATA_DIR, BG_IMAGE_DIR, BG_IMAGE)).convert()
author_image = pygame.image.load(os.path.join(DATA_DIR, IMAGE_DIR, AUTHOR_IMAGE)).convert() SONG_ARRAY = []
SONG_IMAGE = []
for song in range(len(SONGS)):
SONG_ARRAY.append(pygame.mixer.Sound(os.path.join(DATA_DIR, SOUND_DIR, SONGS[song][0])))
SONG_IMAGE.append(pygame.image.load(os.path.join(DATA_DIR, IMAGE_DIR, SONGS[song][3])).convert()) font = pygame.font.Font(os.path.join(DATA_DIR, FONT_DIR, 'TORK____.ttf'), 14)
font_song_title = pygame.font.Font(os.path.join(DATA_DIR, FONT_DIR, 'msyhbd.ttf'), 24)
font_song = pygame.font.Font(os.path.join(DATA_DIR, FONT_DIR, 'msyh.ttf'), 16) def draw_picture_rect():
#picture rect
pygame.draw.rect(screen,
(255, 255, 255),
Rect(IMAGE_START_POS, IMAGE_END_POS)) def button_play(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[0], CIRCLR_R, CIRCLR_W)
points=[(77,340),(77,360),(95,350)]
pygame.draw.polygon(screen,color,points) def button_stop(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[0], CIRCLR_R, CIRCLR_W)
pygame.draw.rect(screen,
color,
Rect(77, 340, 5, 23 ))
pygame.draw.rect(screen,
color,
Rect(88, 340, 5, 23 )) def button_perfer(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[1], CIRCLR_R, CIRCLR_W)
points=[(138,340),(162,340),(150,363)]
pygame.draw.polygon(screen,color,points) def button_del(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[2], CIRCLR_R, CIRCLR_W)
pygame.draw.circle(screen, color, (215, 340), 6, 3)
pygame.draw.rect(screen,
color,
Rect(200, 340, 30, 6 ))
pygame.draw.rect(screen,
color,
Rect(204, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(210, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(217, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(223, 340, 3, 20 ))
pygame.draw.rect(screen,
color,
Rect(204, 360, 22, 5 )) def button_next_song(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[3], CIRCLR_R, CIRCLR_W)
points_one =[(270,343),(270,357),(277,350)]
points_two =[(277,343),(277,357),(284,350)]
pygame.draw.polygon(screen,color,points_one)
pygame.draw.polygon(screen,color,points_two)
pygame.draw.rect(screen,
color,
Rect(284, 343, 5, 15 )) def button_authon_image(screen, color):
pygame.draw.circle(screen, color, CIRCLES_POS[4], CIRCLR_R, CIRCLR_W)
pygame.draw.rect(screen,
(255, 255, 255),
Rect(418, 248, 144, 154 ))
screen.blit(author_image, (420, 250))
luck = font_song_title.render('Yes, You are Luck :-)', True, (255,165,10))
screen.blit(luck, (280, 416)) def listener():
global PLAY_FLAG
global PREFER_FLAG
x, y = pygame.mouse.get_pos()
color = (255,255,25)
color_red = (230, 0, 0)
for index in range(len(CIRCLES_POS)):
p_x = (CIRCLES_POS[index][0] - x)**2
p_y = (CIRCLES_POS[index][1] - y)**2
p_r = (CIRCLR_R)**2
if (p_x + p_y <= p_r):
if index == 0 and PLAY_FLAG:
button_stop(screen, color)
elif index == 0 and not PLAY_FLAG:
button_play(screen, color)
elif index == 1 and PREFER_FLAG:
button_perfer(screen, color)
elif index == 1 and not PREFER_FLAG:
button_perfer(screen, color_red)
elif index == 2:
button_del(screen, color)
elif index == 3:
button_next_song(screen, color)
elif index == 4:
button_authon_image(screen, color) def mouse_down_listener(sound):
global PLAY_FLAG
global PREFER_FLAG
global SONG_FLAG
x, y = pygame.mouse.get_pos()
for index in range(len(CIRCLES_POS)):
p_x = (CIRCLES_POS[index][0] - x)**2
p_y = (CIRCLES_POS[index][1] - y)**2
p_r = (CIRCLR_R)**2
if (p_x + p_y <= p_r):
if index == 0 and PLAY_FLAG:
#print('stop now......')
sound.stop()
PLAY_FLAG = False
elif index == 0 and not PLAY_FLAG:
#print('play now ... ... ... ...')
sound.play(0)
PLAY_FLAG = True
elif index == 1 and PREFER_FLAG:
print('perfer song....<<', SONGS[SONG_FLAG][1], '>>')
PREFER_FLAG = False
elif index == 1 and not PREFER_FLAG:
print('not perfer song... <<', SONGS[SONG_FLAG][1], '>>')
PREFER_FLAG = True
elif index == 2:
sound.stop()
print('delete song....<<', SONGS[SONG_FLAG][1], '>>')
if SONG_FLAG > 0:
SONGS.pop(SONG_FLAG)
SONG_IMAGE.pop(SONG_FLAG)
SONG_ARRAY.pop(SONG_FLAG)
if SONG_FLAG >= len(SONGS) - 1:
SONG_FLAG -= 1
else:
print('This is the last song.')
elif index == 3:
sound.stop()
if SONG_FLAG < len(SONGS) - 1:
SONG_FLAG += 1
else:
SONG_FLAG = 0
#print('next song....') def draw_button(sound):
color = (255,255,255)
color_red = (230, 0, 0)
#play or stop
if PLAY_FLAG:
sound.play(0)
button_stop(screen, color)
elif not PLAY_FLAG:
button_play(screen, color)
#perfer song
if PREFER_FLAG:
button_perfer(screen, color)
elif not PREFER_FLAG:
button_perfer(screen, color_red)
#delete
button_del(screen, color)
#next song
button_next_song(screen, color) def draw_volume_info():
#the background of volume
pygame.draw.rect(screen,
(255, 255, 255),
Rect((VOLUME_POINTS_START[-1][0],
VOLUME_POINTS_START[-1][1]),
(VOLUME_POINTS[-10][0] - VOLUME_POINTS_START[-1][0],
20)))
#the size of volume
for v in range(VOLUME+1):
if v > 0:
pygame.draw.rect(screen,
VOLUME_RECT_COLORS[v],
Rect((VOLUME_POINTS_START[-v][0],
VOLUME_POINTS_START[-v][1]),
(VOLUME_POINTS[-v][0] - VOLUME_POINTS_START[-v][0],
20))) def draw_song_title():
title = font_song_title.render(SONGS[SONG_FLAG][1], True, (255,165,0))
songer = font_song.render(SONGS[SONG_FLAG][2], True, (255, 255, 255))
screen.blit(title, (320, 60))
screen.blit(songer, (320, 110)) def draw_state_bar_info():
pygame.draw.line(screen, (165,42,42),(0, SCREEN_H), (SCREEN_W, SCREEN_H))
#music info
music_info = 'AllSongs: ' + str(len(SONGS)) +' Current: ' + str(SONG_FLAG + 1)
text = font.render(music_info, True, (255,255,255))
screen.blit(text, (0, SCREEN_H+5))
#author into
author_info = font.render('hongtenzone@foxmail.com', True, (255,255,255))
screen.blit(author_info, (SCREEN_W - 160, SCREEN_H+5))
#volume info
volume_text = font.render('Volume: ' + str(VOLUME), True, (255, 255, 255))
screen.blit(volume_text, (SCREEN_W - 310, SCREEN_H+5)) while True: screen.blit(bg, (0, 0))
pic = SONG_IMAGE[SONG_FLAG]
bg_sound = SONG_ARRAY[SONG_FLAG]
bg_sound.set_volume(0.1 * VOLUME)
draw_button(bg_sound)
listener()
for event in pygame.event.get():
if event.type == QUIT:
bg_sound.stop()
exit()
elif event.type == KEYDOWN:
if event.key == K_UP:
pass
elif event.key == K_DOWN:
pass
elif event.key == K_LEFT:
if VOLUME > 0:
VOLUME -= 1
elif event.key == K_RIGHT:
if VOLUME <= 9:
VOLUME += 1
elif event.type == MOUSEMOTION:
pass elif event.type == MOUSEBUTTONDOWN:
pressed_array = pygame.mouse.get_pressed()
for index in range(len(pressed_array)):
if pressed_array[index]:
if index == 0: #When the LEFT button down
mouse_down_listener(bg_sound) #picture rect
draw_picture_rect()
#volume information
draw_volume_info()
#state bar information
draw_state_bar_info()
#song title
draw_song_title() screen.blit(pic, (62.5, 62.5))
pygame.display.update()
你在运行的时候,肯恩会遇到一些问题,系统找不到音乐和图片....
这个由于文件中的音乐,字体和图片有一点大,所以我把图片和音乐删掉..你可以进行添加即可
还请大家给我想想办法,我好上传源文件给大家伙下载...
========================================================
More reading,and english is important.
I'm Hongten
大哥哥大姐姐,觉得有用打赏点哦!多多少少没关系,一分也是对我的支持和鼓励。谢谢。
Hongten博客排名在100名以内。粉丝过千。
Hongten出品,必是精品。
E | hongtenzone@foxmail.com B | http://www.cnblogs.com/hongten
========================================================
pygame系列_原创百度随心听音乐播放器_完整版的更多相关文章
- C#_音乐播放器_用ListBox显示歌词
在用ListBox显示歌词的时候,可以显示多行,同时可以控制每一行显示的样式等等.控制显示样式是在它的DrawItem事件中来控制的.首先要先将ListBox的DrawMode属性设置为OwnerDr ...
- pygame系列_百度随心听_完美的UI设计
这个程序的灵感来自于百度随心听 下面是我的程序截图: 说明: 动作按钮全部是画出来的,没有用到任何图片 用到图片的只有:背景,歌手图片,作者图片 代码正在调试中.... 如果你鼠标移动到黄色小圆里面, ...
- Android 仿百度网页音乐播放器圆形图片转圈播放效果
百度网页音乐播放器的效果 如下 : http://www.baidu.com/baidu?word=%E4%B8%80%E7%9B%B4%E5%BE%88%E5%AE%89%E9%9D%99& ...
- Ubuntu 14.04 用户如何安装深度音乐播放器和百度音乐插件
播放本地音乐或者收听国外的音乐电台,Ubuntu 14.04 自带的音乐播放器 Rhythmbox 完全能够满足,但是如果你想有像酷狗那样的国内播放器就需要折腾一下,还好有深度音乐播放器,这是一款完全 ...
- 原创: 做一款属于自己风格的音乐播放器 (HTML5的Audio新特性)
灵感的由来是前些天看到了博: http://www.cnblogs.com/li-cheng 的首页有一个很漂亮的播放器,感觉很不错,是用Flex做的Flash播放器. 于是我也便想到了,自己也来来弄 ...
- Thinkphp5.0 仿百度糯米 开发多商家 电商平台(完整版)
目录第1章 课程简介第2章 需求分析第3章 快速掌握thinkphp5第4章 任性的TP5模块第5章 生活服务分类管理模块第6章 百度地图应用封装第7章 打造属于TP5自己的发送邮件服务第8章 商户模 ...
- 如何利用百度音乐播放器的API接口来获取高音质歌曲
第一步:在网页中打开以下网址: http://box.zhangmen.baidu.com/x?op=12&count=1&title=时间都去哪儿了$$王铮亮$$$$ 其中红色地方可 ...
- 【Linux_Fedora_应用系列】_1_如何安装音乐播放器和mp3解码
因为安装环境的不同,Fedora在安装后会安装不同的软件包.通常在安装的时候有多种选择: 1.桌面环境: 适合个人日常使用,安装包含办公软件(Fedora 默认安装Open Office).娱乐影音软 ...
- 你也可以用java的swing可以做出这么炫的mp3播放器_源码下载
I had published the blog : 你用java的swing可以做出这么炫的mp3播放器吗? and to display some screenshots about this M ...
随机推荐
- 原创:分享asp.net伪静态成目录形式iis如何设置
服务器租用详解asp.net伪静态成目录形式iis如何设置: 一.首先介绍一下asp.net伪静态成html后缀iis如何设置的 iis6 伪静态 iis配置方法 图解 1.右键点击 要设置网站的网站 ...
- #!/bin/bash
#!/bin/bash是指此脚本使用/bin/bash来解释执行. 其中,#!是一个特殊的表示符,其后,跟着解释此脚本的shell路径. bash只是shell的一种,还有很多其它shell,如:sh ...
- django LDAP
> http://goodosoft.github.io/2015/02/25/Using-AD-as-authentication-for-Django/ > http://my.osc ...
- 2.python基础深入(元组、字符串、列表、字典)
一,对象与类 对象: python中一切皆为对象,所谓对象:我自己就是一个对象,我玩的电脑就是对象,玩的手机就是对象. 我们通过描述属性(特征)和行为来描述一个对象的. 在python中,一个对象的特 ...
- 【HTTP协议】响应头中的Content-Length和Transfer-Encoding
来源: http://blog.csdn.net/superhosts/article/details/8737434 http://bbs.csdn.net/topics/390384017 对于h ...
- ios学习总结(1) -- 创建第一个ios项目
原文地址 下载并打开xcode. 接着新建一个工程,如下图所示: 点击Create a new Xcode project,之后选择ios下的Application,点击Single View App ...
- JDK1.7 HashMap 源码分析
概述 HashMap是Java里基本的存储Key.Value的一个数据类型,了解它的内部实现,可以帮我们编写出更高效的Java代码. 本文主要分析JDK1.7中HashMap实现,JDK1.8中的Ha ...
- curl请求的url中含有空格
curl请求的url中含有空格时(例如rul的参数是sql查询语句,url=www.tets.com/query.php?sql=select * from t1),curl_easy_perform ...
- [Android UI] Shape详解 (GradientDrawable)
转载自:http://blog.csdn.net/feng88724/article/details/6398193 在Android开发过程中,经常需要改变控件的默认样式, 那么通常会使用多个图片来 ...
- 图解SQL的inner join、left join、right join、full outer join、union、union all的区别
SQL的Join语法有很多,inner join(等值连接) 只返回两个表中联结字段相等的行,left join(左联接) 返回包括左表中的所有记录和右表中联结字段相等的记录,right join(右 ...