profile

Can I set a users profile image using the Facebook API?

耗尽温柔 提交于 2019-11-26 22:11:27
I'm looking for a user.setImage call or something to that effect on the Facebook API but I can't see anything to achieve this: specifically to overwrite a user's profile image (not just post an image on their wall). I can't see anything in the docs. Do you know if this is possible and if so any docs on implementing it? Hannes You can redirect the user to the following link where [PID] stands for the id of the desired picture: http://www.facebook.com/photo.php?fbid=[PID]&makeprofile=1 On this page the user will see the picture and immediately be prompted with a dialog if he wants to set it as

Timing the CPU time of a python program?

核能气质少年 提交于 2019-11-26 21:50:56
问题 I would like to time a snippet of my code, and I would like just the CPU execution time (ignoring operating system processes etc). I've tried time.clock(), it appears too imprecise, and gives a different answer each time. (In theory surely if I run it again for the same code snippet it should return the same value??) I've played with timeit for about an hour. Essentially what kills it for me is the "setup" process, I end up having to import around 20 functions which is impractical as I'm

How to stop Selenium from creating temporary Firefox Profiles using Web Driver?

早过忘川 提交于 2019-11-26 16:03:40
I am using Selenium Web Driver API with Java. Every time I want to debug my test cases, a temporary profile for Firefox is created in the temporary files directory. This is a headache in two ways. It definitely is taking unnecessary time to create a profile and is taking unnecessary space. I cannot install any addons that will be available next time I launch my test cases. How do I get around this? Ross Patterson You can control how the Firefox driver chooses the profile. Set the webdriver.firefox.profile property to the name of the profile you want to use. Most folks think this is a bad idea,

Django-Registration & Django-Profile, using your own custom form

不羁岁月 提交于 2019-11-26 15:39:01
I am making use of django-registration and django-profile to handle registration and profiles. I would like to create a profile for the user at the time of registration. I have created a custom registration form, and added that to the urls.py using the tutorial on: http://dewful.com/?p=70 The basic idea in the tutorial is to override the default registration form to create the profile at the same time. forms.py - In my profiles app from django import forms from registration.forms import RegistrationForm from django.utils.translation import ugettext_lazy as _ from profiles.models import

How do I reload .bashrc without logging out and back in?

情到浓时终转凉″ 提交于 2019-11-26 15:34:14
If I make changes to .bashrc , how do I reload it without logging out and back in? George Hawkins You just have to enter the command: source ~/.bashrc or you can use the shorter version of the command: . ~/.bashrc or you could use; exec bash does the same thing. (and easier to remember, at least for me) exec command replaces the shell with given program, in our example, it replaces our shell with bash (with the updated configuration files) To complement and contrast the two most popular answers, . ~/.bashrc and exec bash : Both solutions effectively reload ~/.bashrc , but there are differences

How to assign Profile values?

拈花ヽ惹草 提交于 2019-11-26 12:15:09
问题 I don\'t know what I am missing, but I added Profile properties in the Web.config file but cannot access Profile. Item in the code or create a new profile. 回答1: I had the same problem today, and learned a lot. There are two kinds of project in Visual Studio -- "Web Site Projects" and "Web Application Projects." For reasons which are a complete mystery to me, Web Application Projects cannot use Profile. directly... the strongly-typed class is not magically generated for you from the Web.config

Updating every profile's registry on Windows Server 2003

ぃ、小莉子 提交于 2019-11-26 11:40:34
问题 I have a Windows Server 2003 system that is used for terminal services. We do not use roaming profiles. We do not use login scripts. I have about thirty to fourty accounts that log into this system and as such have local profiles. One of the software packages that are installed onto this system uses HKCU/Software reg tree for its licensing and so each user has the license key in their local profile. How can I update all of these different profiles registries in a deterministic manner? 回答1:

Implementing Profile Provider in ASP.NET MVC

北城以北 提交于 2019-11-26 11:35:44
For the life of me, I cannot get the SqlProfileProvider to work in an MVC project that I'm working on. The first interesting thing that I realized is that Visual Studio does not automatically generate the ProfileCommon proxy class for you. That's not a big deal since it's simpy a matter of extending the ProfileBase class. After creating a ProfileCommon class, I wrote the following Action method for creating the user profile. [AcceptVerbs("POST")] public ActionResult CreateProfile(string company, string phone, string fax, string city, string state, string zip) { MembershipUser user = Membership

How to create a UserProfile form in Django with first_name, last_name modifications?

偶尔善良 提交于 2019-11-26 10:22:22
问题 If think my question is pretty obvious and almost every developer working with UserProfile should be able to answer it. However, I could not find any help on the django documentation or in the Django Book. When you want to do a UserProfile form in with Django Forms, you\'d like to modify the profile fields as well as some User field. But there is no forms.UserProfileForm (yet?)! How do you do that? 回答1: I stumbled across this today and after some googling I found a solution that is a bit

Why can't I activate a Maven2 profile from another profile?

浪尽此生 提交于 2019-11-26 09:52:24
问题 I have a multimodule Maven2 project which builds a web application. The application is connected to a backend server and a DB. There are several server instances deployed in our environment, and there are also multiple backend and DB instances for development, UAT, production, etc. So practically, each application configuration needs these 3 coordinates: front-end server back-end server DB I am working on unifying and automating the application configuration. It is easy and obvious to