avatar

Letter avatar like Gmail Android best practice

亡梦爱人 提交于 2020-05-22 02:06:30
问题 What is the best way of generating (in code) a letter avatar like in Gmail? Here you have an example https://drive.google.com/folderview?id=0B0Fhz5fDg1njSmpUakhhZllEWHM&usp=sharing It should look like that: 回答1: This is what I've used once.. please try and modify according to your requirements. public class LetterAvatar extends ColorDrawable { Paint paint = new Paint(); Rect bounds = new Rect(); String pLetters; private float ONE_DP = 0.0f; private Resources pResources; private int pPadding;

How to detect default avatar on facebook?

假装没事ソ 提交于 2020-01-11 06:33:23
问题 How to detect default avatar on the link like this: https://graph.facebook.com/'.$id.'/picture?type=large ? Is it the only way to get avatars (male/female) from special prepared profiles and then compare by e.g. md5() ? It's hard to believe this is the only way. 回答1: You can use the redirect=false parameter: https://graph.facebook.com/naitik/picture?redirect=false Then facebook's responce is json and contains this data: { "data": { "url": "https://fbcdn-profile-a.akamaihd.net/hprofile-ak-prn1

Find Google+ avatar for given email address without OAuth

做~自己de王妃 提交于 2020-01-09 19:06:54
问题 In my app I want to show the Google+ profile picture for a user. The only function, I found, in the API to get the profile picture needs a userId. However, I only have their email adress and not their Google+ userID. Moreover the person, whose image I want to get, should not be forced to log in and authorize my app, as this person is mostly not identical to the user of the app. So I think I need to get their userId by email. I read through the Google+ API documentation but can't find a way to

RFC for retrieving avatar image from email address

放肆的年华 提交于 2020-01-06 19:55:48
问题 AFAIK there is no RFC or other standard to retrieve an avatar (image/icon) from an email address. I think this would be a great feature. One possible solution: Get avatar via DNS user enters his email address. The domain belonging to this email adress DNS gets asked: Avatar for "foo@example.com" DNS replies: Get image from URL. For example: http://example.com/foo.png Questions Is there already a RFC or other standard? Why is there no such standard yet? How to get it come true? I know that

Carrierwave Gem: After creating user with avatar, 'cannot convert nil into string'

。_饼干妹妹 提交于 2020-01-03 04:54:08
问题 I will say when I first got carrierwave up and running, everything was working totally fine aside from the size scaling of the avatar. So now after I tried to do scaling, everything went to hell. I uninstalled the gem, did a migration to remove avatar from user, then did another migration to add. Still the same error. Note I am doing rails g uploader Avatar, NOT image. I have not touched the avatar_uploader.rb file, aside from adding require 'carrierwave/orm/activerecord' on the top line. So,

XMPPFramework - How can I update my own avatar image?

南笙酒味 提交于 2019-12-29 05:34:28
问题 I am developing an application in that I want to update my avatar image. I am following XEP-0153 guidelines to update my avatar image and I constructed an NSXMLElement correspond to the following code in XEP-0153 and sent that element through XMPPStream . <iq from='juliet@capulet.com' type='set' id='vc1'> <vCard xmlns='vcard-temp'> <PHOTO> <TYPE>image/jpeg</TYPE> <BINVAL> Base64-encoded-avatar-file-here! </BINVAL> </PHOTO> </vCard> </iq> The server responses the following error: <iq xmlns=

Adding profile picture to django user

女生的网名这么多〃 提交于 2019-12-24 03:53:32
问题 I'm trying to follow this post to associate a profile picture to a user in Django. I have the following model class MyUser(AbstractBaseUser): """ Custom user class. """ GENDER_CHOICES = ( ('M', 'Male'), ('F', 'Female'), ) email = models.EmailField('email address', unique=True, db_index=True) is_staff = models.BooleanField('is staff', default=False) first_name = models.TextField('first name', default=None, null=True) last_name = models.TextField('last name', default=None, null=True) date_of

Visual Studio 2013 GitHub avatar not being displayed

烈酒焚心 提交于 2019-12-24 03:06:18
问题 I have set up my VS 2013 with GitHub and my problem is: when I commit to GitHub, I am not seeing my GitHub avatar. 回答1: As stated in this post , you'll have to tweak the Visual Studio Git settings and tick the "Enable download of author images from 3rd party source" checkbox. If your Git repo remote origin is in a third-party Git service (such GitHub, Bitbucket, or CodePlex), select Enable download of author images from 3rd party source, and then ask team members to set up Gravatar accounts