在我的Ubuntu 9.04盒子上编译webkit-1.1.5包时,我在链接器阶段得到了这个错误:
libtool: link: gcc -ansi -fno-strict-aliasing -O2 -Wall -W -Wcast-align -Wchar-subscripts -Wreturn-type -Wformat -Wformat-security -Wno-format-y2k -Wundef -Wmissing-format-attribute -Wpointer-arith -Wwrite-strings -Wno-unused-parameter -Wno-parentheses -fno-exceptions -fvisibility=hidden -D_REENTRANT -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -g -O2 -O2 -o Programs/.libs/GtkLauncher WebKitTools/GtkLauncher/Programs_GtkLauncher-main.o -pthread ./.libs/libwebkit-1.0.so /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0.so /usr/lib/libatk-1.0.so /usr/lib/libpangoft2-1.0.so /usr/lib/libgdk_pixbuf-2.0.so -lm /usr/lib/libpangocairo-1.0.so /usr/lib/libgio-2.0.so /usr/lib/libcairo.so /usr/lib/libpango-1.0.so /usr/lib/libfreetype.so -lfontconfig /usr/lib/libgmodule-2.0.so /usr/lib/libgobject-2.0.so /usr/lib/libgthread-2.0.so -lrt /usr/lib/libglib-2.0.so -pthread
make[1]: Leaving directory `/home/nagul/build_area/webkit-1.1.5'
WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp: In function ‘NPError webkit_test_plugin_get_value(NPP_t*, NPPVariable, void*)’:
WebKitTools/DumpRenderTree/gtk/TestNetscapePlugin/TestNetscapePlugin.cpp:221: warning: deprecated …Run Code Online (Sandbox Code Playgroud) 做基于组件的开发,我发现自己经常这样做:
public class SomeClass
{
SomeOtherClass foo;
public SomeOtherClass Foo
{
get { return foo; }
set {
if (value != foo) {
if (value != null) {
// subscribe to some events
value.SomeEvent += foo_SomeEvent;
}
if (foo != null) {
// unsubscribe from subscribed events
foo.SomeEvent -= foo_SomeEvent;
}
foo = value;
}
}
}
void foo_SomeEvent(object sender, EventArgs e)
{
// do stuff
}
}
Run Code Online (Sandbox Code Playgroud)
有没有更优雅的方式来做这个事件"换出"?
(当然,如果foo是不可变的话,可以避免整个问题,但是我不会得到任何视觉设计师的支持.)
我想在我的页面上运行JavaScript函数,但仅在显示选项卡时.
其实有两个问题.我没有使用ajax标签,所以如果我只想在显示标签后运行代码,我会将我的JavaScript放在'load'或'show'回调中吗?
根据上面的答案,我的代码将如何完成以下操作:
我希望这样
我正在开发一个使用python-openid的Django应用程序.该应用程序正在我家的开发服务器上运行.
与stackoverflow的登录机制类似,我希望用户使用他们的Google凭据登录我的网站.
我实现这个代码的代码,运行了几个星期,然后停止工作.我在以下Google网页的登录过程中遇到问题:https: //www.google.com/accounts/o8/ud并显示以下消息:"您请求的页面无效." 它将随机重新开始工作,但每隔几周就会失败一次.
通过雅虎的登录工作了几个月,今天已停止使用以下消息:"此页面已过期,请返回原始页面,请再试一次"在此页面上:https://open.login.yahooapis.com /的OpenID/OP/AUTH
以下是LiveHttpHeaders for Google捕获的请求:
https://www.google.com/accounts/o8/ud
POST /accounts/o8/ud HTTP/1.1
Host: www.google.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.10) Gecko/2009042513 Ubuntu/8.04 (hardy) Firefox/3.0.10
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://127.0.0.1:8000/users/login/
Content-Length:907
openid.ax.if_available=ext1&openid.mode=checkid_setup&openid.ns=http://specs.openid.net/auth/2.0&openid.realm=http://127.0.0.1:8000/accounts/login/&openid.return_to=http://127.0.0.1:8000/users/login/finish/?janrain_nonce=2009-10-05T19%3A10%3A11ZtioiRm&openid.ax.count.ext1=unlimited&openid.ax.mode=fetch_request&openid.sreg.optional=email&openid.claimed_id=http://specs.openid.net/auth/2.0/identifier_select&openid.ns.sreg=http://openid.net/extensions/sreg/1.1&openid.ns.ax=http://openid.net/srv/ax/1.0&openid.identity=http://specs.openid.net/auth/2.0/identifier_select&openid.assoc_handle=AOQobUcnzec0bpeZRztjqPrr5TQUA0aPL7SIuOPOMgWxex2HRAP09AyJ&openid.ax.required=ext0&openid.ax.type.ext0=http://schema.openid.net/namePerson&openid.ax.type.ext1=http://schema.openid.net/contact/web/default
HTTP/1.x 400 Bad Request
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Run Code Online (Sandbox Code Playgroud)
我不确定这里发生了什么,并希望得到一些帮助.
假设我有一些struct像这样的简单:
public struct WeightedInt {
public int value;
public double weight;
}
Run Code Online (Sandbox Code Playgroud)
那么假设我有一个这种结构的实例集合:
List<WeightedInt> weightedInts = new List<WeightedInt>();
Run Code Online (Sandbox Code Playgroud)
正如我理解值类型与引用类型一样,值类型在堆栈上分配,因此一旦实例化所述对象的函数终止,就会从内存中清除值类型对象.这意味着在以下代码中:
void AddWeightedIntToList(int value, double weight) {
WeightedInt wint = new WeightedInt();
wint.value = value;
wint.weight = weight;
weightedInts.Add(wint);
}
Run Code Online (Sandbox Code Playgroud)
添加局部变量的副本,而完成后局部变量本身将从内存中删除.wintweightedIntsAddWeightedIntToList
首先:这是正确的吗?
其次,这个wint存储副本在哪里存储?它不能在堆栈上,因为一旦函数完成它就会消失(对吗?).这是否意味着副本与weightedInts?一起存储在堆上?它被删除后是垃圾收集,好像它是一个引用类型的实例?
这个问题肯定可以在某个地方的文章中得到解答,在这种情况下,该文章的链接将是一个完全可以接受的答案.我没有找到任何运气.
我不能把它当作应该工作,我对CSS不太好,我需要你的帮助!
我有一个这样的页面:
<html>
<head><title>title</title></head>
<body>
<div id="page">
<div id="container">
<div id="head"><img src="..." alt="..." /></div>
<div id="content">
<div id="menu"><ul><li>...</li></ul></div>
<div id="content_body">stuff here</div>
</div>
<div id="footer"></div>
</div>
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
好.我的容器div有一个背景颜色,我想要,只要我在content_body div中的文本扩展,容器div的背景也会扩展,但它保持一个固定的高度(它只是扩展徽标图像高度),菜单和content_body div中的文字不在后台.
我的CSS:
body
{
font-family: Tahoma, Verdana, Arial, Times New Roman;
background-color: #333333;
background-image: url(Images/bg.png);
background-repeat: repeat-x;
color: #000000;
margin: 0px;
}
input
{
font-family: Tahoma, Verdana, Arial, Times New Roman;
font-weight: bold;
}
h2
{
text-decoration: underline;
font-style: italic;
}
#page
{
width: 100%;
}
#container
{
overflow: visible; …Run Code Online (Sandbox Code Playgroud) 我希望在针发生之后得到字符串的第一位...
$user = strstr('someemail@yahoo.com', '@', true);
Run Code Online (Sandbox Code Playgroud)
但这只适用于PHP版本5.3.0,我有5.2.9有没有办法可以获得相同的结果?
相当简单的新手问题:
python中用于在Python中指定日期(和时间)的对象是什么?
例如,要创建一个包含给定日期和时间的对象(比方说'05/10/09 18:00').
编辑
根据S.Lott的要求,到目前为止我所拥有的是:
class Some:
date =
Run Code Online (Sandbox Code Playgroud)
我停在那里,在"="符号之后我意识到我不知道正确的物体是什么;)
我尝试为jinja2进行扩展.我写了这样的代码:
但我得到例外:'NoneType' object is not iterable.哪个错误?那会回来parse.什么应该接受和返回_media?
你怎么能把一个单词分成它的组成字母?
代码示例不起作用
class Test {
public static void main( String[] args) {
String[] result = "Stack Me 123 Heppa1 oeu".split("\\a");
// output should be
// S
// t
// a
// c
// k
// M
// e
// H
// e
// ...
for ( int x=0; x<result.length; x++) {
System.out.println(result[x] + "\n");
}
}
}
Run Code Online (Sandbox Code Playgroud)
问题似乎在于角色\\a.它应该是[A-Za-z].