我正在尝试将Google联合登录与首要应用帐户集成,但我遇到了一些问题.
当我将请求发送到:https://www.google.com/accounts/o8/ud带有所有参数(见下文)时,我会返回a request_token和要求的属性列表Attribute Exchange.这是完美的,因为我们需要通过属性传递(AX)的电子邮件将用户存储在我们的应用程序数据库中,并且我们需要未来的请求令牌API requests to scopes(即:日历,联系人等).
但是,使用该URL(此处称为endpoint)不会使用户登录其托管应用程序(gmail,日历等),这是一个问题.
更改端点以https://www.google.com/a/thedomain.com/o8/ud?be=o8更改所有内容.我自动登录到其他谷歌应用程序(Gmail等).但是,使用该端点,我只通过AX 获取请求令牌或属性.显然那不是特别混合.非常一个或那个.
对端点的示例请求 https://www.google.com/accounts/o8/ud
parameters = {
'openid.ns': 'http://specs.openid.net/auth/2.0',
'openid.claimed_id': 'http://specs.openid.net/auth/2.0/identifier_select',
'openid.identity': 'http://specs.openid.net/auth/2.0/identifier_select',
'openid.return_to':'http://our.domain.com/accounts/callback/',
'openid.realm': 'http://our.domain.com/',
'openid.assoc_handle': assoc_handle,
'openid.mode': 'checkid_setup',
'openid.ns.ext2': 'http://specs.openid.net/extensions/oauth/1.0',
'openid.ext2.consumer': 'our.domain.com',
'openid.ext2.scope': 'https://mail.google.com/mail/feed/atom',
'openid.ns.ax':'http://openid.net/srv/ax/1.0',
'openid.ax.mode':'fetch_request',
'openid.ax.required':'firstname,lastname,email',
'openid.ax.type.firstname':'http://axschema.org/namePerson/first',
'openid.ax.type.lastname':'http://axschema.org/namePerson/last',
'openid.ax.type.email':'http://axschema.org/contact/email',
}
return HttpResponseRedirect(end_point + '?' + urllib.urlencode(parameters))
Run Code Online (Sandbox Code Playgroud)
(assoc_handle先前由openid初始请求成功设置)
我一直在努力让这种Hybird方法正常工作,对抗最不透明的错误信息(This page is invalid...感谢Google)以及缺乏一致的文档.我已经拖曳了每个代码示例,我可以到达这一点.任何帮助,将不胜感激 ...
我有一个网站项目,我使用内置的开发Web服务器从Visual Studio运行.网站的虚拟路径设置为/
web.config包含一个运行时元素
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="CMS.Controls" publicKeyToken="834b12a258f213f9" culture="neutral" />
<bindingRedirect oldVersion="4.1.3518.21577" newVersion="4.1.3561.21846" />
</dependentAssembly>
</assemblyBinding>
</runtime>
Run Code Online (Sandbox Code Playgroud)
我已经xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0"从根configuration元素中删除了该属性.
这是错误:
无法加载文件或程序集'CMS.Controls,Version = 4.1.3518.21577,Culture = neutral,PublicKeyToken = 834b12a258f213f9'或其依赖项之一.定位的程序集的清单定义与程序集引用不匹配.(HRESULT异常:0x80131040)
这是绑定的日志:
The operation failed.
Bind result: hr = 0x80131040. No description available.
...
LOG: DisplayName = CMS.Controls, Version=4.1.3518.21577, Culture=neutral, PublicKeyToken=834b12a258f213f9
(Fully-specified)
...
LOG: This bind starts in default load context.
LOG: Using application configuration file: D:\Project\WebSite\web.config
LOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework\v2.0.50727\config\machine.config.
LOG: Post-policy reference: CMS.Controls, …Run Code Online (Sandbox Code Playgroud) 在Postgresql 8中为什么这样可以
select * from prod where code like '1%'
select * from prod where code like '%1'
Run Code Online (Sandbox Code Playgroud)
但这会返回0行(有代码以数字1开头/结尾)
select * from prod where code like '1%1'
Run Code Online (Sandbox Code Playgroud)
更新
这发生在我目前的安装中:
# psql --version
psql (PostgreSQL) 8.3.7
create table a(code char(10));
CREATE TABLE
db=# insert into a values('111');
INSERT 0 1
db=# select * from a where code like '1%';
code
------------
111
(1 row)
db=# select * from a where code like '%1';
code
------
(0 rows)
db=# select * from …Run Code Online (Sandbox Code Playgroud) 我正在使用php和mysql.
我将发送10k ++(10万多封)电子邮件来更新我的订阅者,这是我第一次发送它们.我将使用php邮件功能,基本上这里是我要做的:
首先从数据库中获取数据:
Select name, email FROM data
Run Code Online (Sandbox Code Playgroud)
之后,使用while循环发送数据:
while($r = mysql_fetch_assoc($exe)){
...
if($mail){
echo "success<br>";
} else {
echo "failed<br>";
}
}
echo "Sent all";
Run Code Online (Sandbox Code Playgroud)
我包含if .. else语句,以确保每封电子邮件都成功发送.有什么我需要照顾的吗?发送给10K ++用户时会有任何问题吗?
您要发送的电子邮件数量是否有限制?
我的应用程序中的某些操作使用的内存比我认为的要多,我想记录当前的内存使用情况以帮助确定它们是什么.
是否有系统调用将返回当前正在使用的内存量?
我正在从Ruby脚本输出一组编号的文件.这些数字来自递增计数器,但为了使它们在目录中很好地排序,我想在文件名中使用前导零.换一种说法
file_001 ...
代替
file_1
在将数字转换为字符串时,是否有一种简单的方法可以添加前导零?(我知道我可以"如果少于10 ......如果少于100").
我正在尝试用斯洛伐克语(中欧)写一个网站.我所做的是将这两个元标记放入标题中:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Content-Language" content="sk" />
Run Code Online (Sandbox Code Playgroud)
问题是所有带有diacritique的字符都被替换为乱码(因此编码我显然不起作用).该怎么办?
这是页面的整个开头:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sk" lang="sk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Language" content="sk" />
Run Code Online (Sandbox Code Playgroud) 我强调引用不是指针,而是对象的别名.但是,我仍然不明白这对我作为一个程序员究竟意味着什么,即什么是引擎盖下的引用?
我认为理解这一点的最好方法是理解为什么我不能在地图中存储引用.
我知道我需要停止将引用视为指针的语法,只是不确定如何:/
我正在使用"top"实用程序来分析我的服务器的CPU使用情况.其中一个CPU参数标记为"st",现在显示"10.0%st"st是什么意思?你知道在哪里可以找到其他params意思吗?
c++ ×2
.net ×1
asp.net ×1
assemblies ×1
dictionary ×1
email ×1
html ×1
java ×1
linux ×1
localization ×1
macos ×1
memory-leaks ×1
oauth ×1
openid ×1
overriding ×1
php ×1
postgresql ×1
python ×1
reference ×1
ruby ×1
send ×1
sql-like ×1
std ×1
stdmap ×1
xhtml ×1