我正在尝试使用构建一系列包pbuilder
.这些包依赖于彼此,所以为了方便,我有一个本地存储库,我管理使用它reprepro
.此本地存储库包含al依赖项(来自以前的版本).
root@openpanel-builder ~ # export REPREPRO_BASE_DIR=/root/repository
root@openpanel-builder ~ # reprepro list lenny libgrace
lenny|main|amd64: libgrace 0.9.38.1230
lenny|main|i386: libgrace 0.9.38.1230
lenny|main|source: libgrace 0.9.38.1230
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试构建依赖包时,它找不到这些依赖项.
root@openpanel-builder ~ # pbuilder build --basetgz /var/cache/pbuilder/lenny-i386.tgz --bindmounts /root/repository /tmp/bldqaJocd/openpanel-core_0.9.12.368.dsc
I: using fakeroot in build.
Current time: Wed Dec 8 10:46:17 UTC 2010
pbuilder-time-stamp: 1291805177
Building the build Environment
-> extracting base tarball [/var/cache/pbuilder/lenny-i386.tgz]
-> creating local configuration
-> copying local configuration
-> mounting /proc filesystem
-> mounting /dev/pts filesystem
-> Mounting /root/repository …
Run Code Online (Sandbox Code Playgroud) 我需要从UIImageview中的URL加载动画Gif图像.
当我使用普通代码时,图像没有加载.
有没有其他方法加载动画Gif图像?
使用System.Random,下面总是返回0.我需要一个介于0和1之间的随机数.它总是返回0我希望有一些分布O和1.谢谢
Random random = new Random();
int randomInt = random.Next(0, 1)
Run Code Online (Sandbox Code Playgroud) 非常奇怪的错误.我使用gide http://developers.facebook.com/docs/authentication/.所以我创建了对fb的请求并传递了redirect_uri.我在localhost上使用测试站点.所以,如果我通过
redirect_uri = http://localhost/test_blog/index.php
它工作正常,但如果我通过
redirect_uri = http://localhost/test_blog/index.php?r = site/oauth2
它不想要工作.我尝试使用
redirect_uri =.urlencode(' http://localhost/test_blog/index.php?r = site/oauth2)
但不行.我尝试解释.我成功获得代码,但当我访问https://graph.facebook.com/me?access_token时,我收到错误'错误验证验证码'.我检查过,错误是在?r = site/oauth2但我需要传递一些参数可以有人帮助我吗?我读了http://forum.developers.facebook.net/viewtopic.php?id=70855的帖子,但对我来说没什么用
N
点数作为输入.
让我们说吧(x1,y1), (x2,y2)... (xn,yn)
.
是否有非组合解决方案来找到最大共线点数?它们可以安排在一个有助于这种计算的奇特数据结构中吗?
你如何检索一个IDs
in 数组Mongoid
?
arr=["id1","id2"]
User.where(:id=>arr)
Run Code Online (Sandbox Code Playgroud)
如果要检索其他属性,则可以轻松完成此操作
User.where(:nickname.in=>["kk","ll"])
Run Code Online (Sandbox Code Playgroud)
但我想知道如何在mongoid中做到这一点 - >这应该是一个非常简单和常见的操作
我用这样的商店配置创建了一个Grid组件:
//Create the store
config.store = new Ext.data.Store({
restful: true,
autoSave: false,
batch: true,
writer: new Ext.data.JsonWriter({
encode: false
}),
reader: new Ext.data.JsonReader({
totalProperty: 'total',
root: 'data',
fields: cfg.fields
}),
proxy: new Ext.data.HttpProxy({
url:cfg.rest,
listeners:{
exception: {
fn: function(proxy, type, action, options, response, arg) {
this.fireEvent('exception', proxy, type, action, options, response, arg);
},
scope: this
}
}
}),
remoteSort: true,
successProperty: 'success',
baseParams: {
start: 0,
limit: cfg.pageSize || 15
},
autoLoad: true,
listeners: {
load: {
fn: function() { …
Run Code Online (Sandbox Code Playgroud) 将方法"area"定义为"this"的属性而不是"prototype"的区别是什么?
//console.clear()
function Rectangle(w, h)
{
this.width = w;
this.height = h;
this.area = function( ) { return this.width * this.height; }
}
var r = new Rectangle(2, 3);
var a = r.area( );
//console.log(a)
function Square(s)
{
this.side= s;
}
Square.prototype.area = function(){return this.side * this.side; }
var r = new Square(2);
var a = r.area( );
//console.log(a)
Run Code Online (Sandbox Code Playgroud)
在JavaScript - The definitive guide
本节Prototypes and Inheritance
中Chapter 9 , part 1
,作者说在原型对象中定义方法"area"是有益的,但他的解释并不是真的可以理解:
"..每个Rectangle对象的区域总是指同一个函数(当然,有人可能会改变它,但你通常打算让对象的方法保持不变).对于那些方法使用常规属性是低效的.意图由同一个类的所有对象共享(即,使用相同构造函数创建的所有对象)."
我知道这个问题看起来几乎像这样一个,但事实并非如此.
我找不到一种方法来应用css cross borwser opacity!IE7有什么好处,不要进入IE8!反之亦然...谢谢你